On 21/10/16 08:43, Eric Botcazou wrote:
That's also overcomplicated.
Yes, I agree that's too heavy.

rtx *ptail = &REG_NOTES (to_insn);
while (*ptail != NULL_RTX)
    ptail = &XEXP (*ptail, 1);

Thanks very much Bernd, yes, this is better. And through manipulating pointer directly, those bidirectional new functions are unnecessary.


gives you a pointer to the end which you can then use to append,
unconditionally. As mentioned above, I think it would be simpler to keep
this logic in the caller functions and avoid introducing
append_insn_reg_notes.
I disagree: there are currently n ways of copying NOTEs in the RTL middle-end,
with different properties each time.  We need only one primitive in rtlanal.c.
That's my view, those duplicated code in emit-rtl.c and sel-sched-ir.c really can be shared and append all REG_NOTES from one insn to another seems qualify one primitive in rtlanal.c

I will come up with a patch much lighter.

Thanks.


Reply via email to