Functioncall clobbering constant memory

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Sun Dec 3 05:58:00 GMT 2000


Normally, we say that a call doesn't clobber constant memory, but it does
if that constant memory is being set by the result of the function
(meaning it's address is passed to initialize the memory).

However, we indicate that with a (CLOBBER (MEM ...)) insn.  reorg.c skips
those, but it really needs to know about that one!

I can see two fixes:

(1) Don't skip them in reorg.c.
(2) Move the CLOBBER to CALL_INSN_FUNCTION_USAGE

The latter seems more "correct".  As far as I can tell, all users of
CALL_INSN_FUNCTION_USAGE can handle MEM.

What do others think?


More information about the Gcc mailing list