On 10/21/2016 09:43 AM, Eric Botcazou wrote:
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.
I feel the fact that they have different properties means we shouldn't try to unify them: we'll just end up with a long list of boolean parameters, with no way of quickly telling what a given function call is doing. A copy loop is short enough that it can be implemented in-place and people can quickly tell what is going on by looking at it.
Maybe the inner if statement could be a small helper function (append_copy_of_reg_note).
Bernd