Revital1 Eres wrote:
Hello,

I want to emit the following SPU insn:
emit_insn (gen_iorti3 (r77, tmp, GEN_INT(0)));

r77 is defined as 'fixed register' which is a register that the register
allocator can not use.  (triggers by SPU option -mfixed-range)
r77 is used to pass information to some other routine at run-time (the
next instruction is branch to this routine; the routine does not exist
at the compile time of the function which contains this instruction).

The problem is that r77 is not used in it's function after this instruction
and thus DCE deletes it.

My question is as follows:
I understood I can not make DCE ignore an insn.  However,
can I teach DCE to ignore instructions which sets fixed register?
(or there is another way to make DCE ignore that insn)


You really need to show that the register is used somewhere -- mixing implicit and explicit uses (and defs) of objects is ultimately going to lead to problems. Pick one (I usually recommend explicit) and stick to it. From what little information you've given, I'd say explicit uses/defs is the way to go.

jeff


Reply via email to