CUMULATIVE_ARGS in hooks (Was: RFC: semi-automatic hookization)
Ian Lance Taylor
iant@google.com
Wed Nov 17 02:04:00 GMT 2010
Joern Rennecke <amylaar@spamcop.net> writes:
> Quoting Ian Lance Taylor <iant@google.com>:
>
>> Joern Rennecke <amylaar@spamcop.net> writes:
>>
>>> Before I go and make all these target changes & test them, is there at
>>> least agreemwent that this is the right approach, i.e replacing
>>> CUMULATIVE_ARG *
>>> with void *, and splitting up x_rtl into two variables.
>>
>> I don't know how we want to get there, but it seems to me that the place
>> we want to end up is with the target hooks defined to take an argument
>> of type struct cumulative_args * (or a better name if we can think of
>> one).
>
> Actually, this doesn't work, because then different target vectors have
> different types. You might get away with it now, but LTO on a multi-target
> compiler would fail.
Good point.
> I think we should just
> typedef void *cumulative_args_t;
>
> and use that for our hooks.
Another area where we can do something much nicer when we move to C++.
Ian
More information about the Gcc
mailing list