Combine doesn't update NOTE_INSN_FUNCTION_USAGE

Alexandre Oliva aoliva@redhat.com
Fri Feb 2 12:28:00 GMT 2001


Remember that port that makes heavy use of by-reference arguments to
libcalls?  A relatively large test, from a commercial testsuite, has
exposed a problem in combine.  It would ``combine'' the insn in which
a reg was set to the address of the argument into the CALL_INSN.  This
would succeed, even though it wouldn't modify the CALL_INSN at all.
And it would end up deleting the insn in which the reg was set, in
case it was not used anywhere else, which happened to be the case.

Then, flow noticed the reg was used in the CALL_INSN_FUNCTION_USAGE
and propagated its liveness up to the beginning of the basic block,
where it was dead before.  Crash!

This trivial patch fixes it.  Ok to install, if it bootstraps on
i686-pc-linux-gnu and doesn't break previously-working tests in this
new port?



More information about the Gcc-patches mailing list