On 6/21/10 9:55 PM, Jeff Law wrote:
On 06/16/10 09:57, Maxim Kuvyrkov wrote:
IRA and reload has special relationship with pseudos that are set only
once. When such pseudos initialized with constants or instances that
can be considered constant across the function, reload can
rematerialize them instead of spilling or apply other optimizations.
This patch makes sure that we don't unnecessarily set same pseudo more
than once.
OK to apply?
OK. THanks,
Thank you for reviewing this and other patches.
There is similar code in gcse.c:pre_delete():
/* Create a pseudo-reg to store the result of reaching
expressions into. Get the mode for the new pseudo from
the mode of the original destination pseudo. */
if (expr->reaching_reg == NULL)
expr->reaching_reg = gen_reg_rtx_and_attrs (SET_DEST (set));
gcse_emit_move_after (expr->reaching_reg, SET_DEST (set), insn);
delete_insn (insn);
occr->deleted_p = 1;
changed = 1;
gcse_subst_count++;
From quick look at PRE, it seem that creating a new pseudo for PRE is
also correct. Do you know off-hand if this indeed is the case?