Some Haifa scheduler bugs

Jeffrey A Law law@hurl.cygnus.com
Wed Sep 3 09:37:00 GMT 1997


  In message < Pine.SOL.3.90.970903182436.5858D-100000@bond.informatik.rwth-aachen.de >you write:
  > Ok, I'll retry the tests without that option. But this is not the only
  > case that Haifa can create incorrect code; there is an additional problem
  > that can show up on any SMALL_REGISTER_CLASSES machine. Haifa can increase
  > the lifetime of pseudo registers, which can cause incorrect code to be
  > generated. These examples were made on an i586-linux configuration with
  > egcs-970828:
[ ... ]
In general, that's not going to work.

Basically any machine that defines SMALL_REGISTER_CLASSES and passes args in
registers is playing with fire -- reload can and will silently generate incorrect
code for such targets.  For that reason I _highly_ recommend against using
registers for parameter passing on the x86 targets.

Turning on the instruction scheduler in that case is just going to make a
bad problem worse -- but the problem isn't the instruction scheduler itself.

  > It seems that at least these changes are necessary:
  > 1. Function arguments must be moved into pseudos immediately at the top
  > of a function.
Nontrivial to do in haifa.

jeff



More information about the Gcc mailing list