Instantiate virtual args in function-call usage

Alexandre Oliva aoliva@redhat.com
Sat Jan 13 02:06:00 GMT 2001


On Jan 11, 2001, Richard Henderson <rth@redhat.com> wrote:

> On Thu, Jan 11, 2001 at 09:31:36PM -0200, Alexandre Oliva wrote:
>> > Surely eliminate_regs_in_insn needs changes as well?
>> 
>> I didn't find a need for it.  Maybe just because reload() cleans up
>> afterwards?

> Oh, nevermind.  You call eliminate_regs yourself while
> fixing things up.  And of course function_usage things
> aren't used during reload itself.

> The patch is fine.

Not as much as I'd like.  I've just found one corner case in which it
wouldn't work correctly.  In this case, the register was found to be
equivalent to a SYMBOL_REF, for which CONSTANT_P didn't hold, so
eliminate_regs() wouldn't replace it.  Later on, the location would be
replaced with regno_reg_rtx, that turned out to refer to the register
itself.  Oops.

Here's a patch that makes sure this doesn't happen, and covers
constants and invalid addresses too (which should be fine for call
usage).

Ok to install?



More information about the Gcc-patches mailing list