protect label from being optimized

Kunal Parmar kunalparmar@gmail.com
Sat Apr 19 14:10:00 GMT 2008


Hi Joern,

 >The insn that loads the return register with the label needs a REG_LABEL
 >note to avoid the ref count dropping to zero.

The insn has a REG_LABEL (foo.c.110r.vregs) and the label also has a ref 
count of 1.

 >You would have to put a (set (pc) (reg RA)) into the pattern of the
 >call insn.  And no matter if you make this a call_insn, jump_insn,
 >or some newly invented type of insn, I think you will have to change
 >some middle-end code to cope with an insn that is both a call and a jump.

Does this mean that there is no way for me to handle this in RTL without 
changing
target independent code ?
In that case, since I don't want to change the target independent code, 
will it be
sufficient if I create a new pattern that holds the label number in the 
pattern and
during final pattern matching, uses this to spit the label manually ? 
Can I assume
that there won't be multiple labels with the same number ?

Thanks in advance,
Kunal



More information about the Gcc mailing list