This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: A plan to remove CUMULATIVE_ARGS [was: Re: RFA: PR44566: accessor macros (1/3): CUMULATIVE_ARGS]


On Fri, Jun 25, 2010 at 10:15:39AM -0400, Joern Rennecke wrote:
> Quoting Nathan Froyd <froydnj@codesourcery.com>:
>
>> I don't understand the argument here.  How is moving around
>> CUMULATIVE_ARGS in the target hook interface making it "more
>> entrenched"?  Converting all references to CUMULATIVE_ARGS to use
>> pointers is actually making things less entrenched, because then the
>> layout of CUMULATIVE_ARGS need not be exposed to the non-backend
>> portions of the compiler.
>
> That's a misunderstanding then.  No, changing from CUMULATIVE_ARGS to
> CUMULATIVE_ARGS * does not create any new problems (as long as you don't
> have any arrays / pointer-arithmetic (e.g. increment) on these pointers).
> I meant you increase the problem when you increase the number of target
> hooks that use CUMULATIVE_ARGS, or increase the number of their
> implementations in the various config/*/* files.

But you're not increasing the number of points that use CUMULATIVE_ARGS.
If you have a target macro that uses CUMULATIVE_ARGS, and you change
that to a target hook that uses CUMULATIVE_ARGS *, you haven't changed
the number of points in the backend that deal with it.  I don't see how
moving the implementation of CUMULATIVE_ARGS-using bits from
config/$ARCH/$ARCH.h to config/$ARCH/$ARCH.c is contributing to further
entrenchment.  It's making things better because of the above layout
concern and because you don't have random backend bits being stuck into
the middle-end via macros.

-Nathan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]