This is the mail archive of the gcc@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]

Re: The "980505-1.c" bug (The Story Continued)



You're missing a critical piece of understanding.

The references to (reg 23) in the notes of the RETVAL insn are wrong
once CSE changes the code in the libcall block to use the constant
instead of (reg 23) as an argument.

The notes should have been modified during the first CSE pass to refer
to the real arguments used in the libcall sequence.

This is what my patch fixed.  The notes in the RETVAL insn are updated
at the same time as the instructions in the libcall sequence itself are
updated.


You briefly touched on this in one of your messages:

  The solution that would lead to the best optimisation is by making sure that
  the expression list of the call is correct: The constants are put directly
  on the stack, so the expression list should say THAT, and not say that register
  23 was used.

This is exactly what my patch does.




--


jeff


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