Message ID | 20141216133908.GA8604@atmel.com |
---|---|
State | New |
Headers | show |
> The cprop_hardreg pass does not consider REG_DEAD notes when > propagating, and this causes issues if target specific code uses > dead_or_set_regno_p to know if it can clobber registers. As explained in the audit trail, it doesn't have to. > Killing regs that are marked REG_DEAD fixes the immediate problem. > Is that the right approach? What do you guys think? Nope, consumers of REG_DEAD notes must instead explicitly ask the DF framework to recompute them.
diff --git gcc/regcprop.c gcc/regcprop.c index daeb980..4f00fc4 100644 --- gcc/regcprop.c +++ gcc/regcprop.c @@ -815,6 +815,9 @@ copyprop_hardreg_forward_1 (basic_block bb, struct value_data *vd) would clobbers. */ for (link = REG_NOTES (insn); link; link = XEXP (link, 1)) { + if (REG_NOTE_KIND (link) == REG_DEAD) + kill_value (XEXP (link, 0), vd); + if (REG_NOTE_KIND (link) == REG_UNUSED) { kill_value (XEXP (link, 0), vd);