This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Functioncall clobbering constant memory
- To: gcc at gcc dot gnu dot org
- Subject: Functioncall clobbering constant memory
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Sun, 3 Dec 00 08:58:33 EST
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?