RFA: fix rtl-optimization/56833
Eric Botcazou
ebotcazou@adacore.com
Thu May 23 15:00:00 GMT 2013
> But I can see that there could be a problem with an earlier value
> that used to be valid in a multi-hard-register sub register to be
> considered to be still valid.
> Setting the mode of every constituent register but the first one
> (which has the new value recorded) to VOIDmode at the same time
> as updating reg_set_luid should be sufficent to address this issue.
Agreed.
> The pass was originally written with word_mode == Pmode targets like
> the SH in mind, where multi-hard-register values are uninteresting.
>
> But for targets like the avr, most or all of the interesting values
> will be in multi-hard-register registers.
The patch is OK on principle, but can you factor out the common code? The
endings of move2add_use_add2_insn and move2add_use_add3_insn are identical so
it would be nice to have e.g. a record_reg_value helper function and call it
from there. Similarly, the 3 new checks look strictly identical.
--
Eric Botcazou
More information about the Gcc-patches
mailing list