> No, it isn't.  Expanders call other expanders to do fancy stuff.  When
> everything is done, they tag a REG_EQUAL note on the last insn.
> One of the purposes of set_unique_reg_note is lubricate this process:
> the layered expanders can add multiple REG_EQUAL notes.  We only want
> the most high-level note, so we discard the previous one from the
> next lower level.  Well, we realize now that we only want the most
> high-level note that makes sense, actually.  We either have to make it
> make sense, or abandon adding it.

This would have been a valid design 20 years ago when notes were implemented.
But, for the past couple of decades, set_unique_reg_note hasn't touched the 
datum and all bugs over the years in this area have been fixed in the caller.
So this one should be fixed the same way, I see no reason to special-case it.

> If every expander has to analyze the instructions that have been issued
> to figure out if the new note needs to be modified, or cannot be applied
> at all, you end up with umpteen duplications of the checks I added to
> set_unique_reg_note prepended to its call sites.

Yes, expanders must know what they're doing, but this isn't new.

-- 
Eric Botcazou

Reply via email to