Combine doesn't update NOTE_INSN_FUNCTION_USAGE

Alexandre Oliva aoliva@redhat.com
Sat Feb 9 01:13:00 GMT 2002


On Feb  2, 2001, Alexandre Oliva <aoliva@redhat.com> wrote:
              ^ that's right!

> Remember that port that makes heavy use of by-reference arguments to
> libcalls?

FWIW, that was SH5 in SHcompact mode.

> 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!

Here's an updated version of the patch such that it applies cleanly in
GCC mainline.  Ok to install?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: combine-fusage.patch
Type: text/x-patch
Size: 2007 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20020209/151b67c2/attachment.bin>
-------------- next part --------------

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


More information about the Gcc-patches mailing list