This is the mail archive of the
mailing list for the GCC project.
Re: RFA: patch for PR42973
On Wed, Feb 10, 2010 at 5:53 PM, Vladimir Makarov <firstname.lastname@example.org> wrote:
> Steven Bosscher wrote:
>> On Tue, Feb 9, 2010 at 9:00 PM, Vladimir Makarov <email@example.com>
>>> + ?for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
>>> + ? ?if (REG_NOTE_KIND (link) == REG_DEAD)
>>> + ? ? ?break;
>>> + ?if (! link)
>>> + ? ?return;
>> What is the purpose of this code? Obviously you're looking for a
>> REG_DEAD note, but you're not looking at this note anywhere to see
>> which reg dies.
> If there are no REG_DEAD notes, there is no sense to try copy generation.
> ?The code in the function after the mentioned code is expensive. ?So major
> purpose of the code fragment is to speed up constraint and shuffle copy
OK, perhaps it's just me, but I didn't understand that from the code.
Could you add a comment there?
Also, note you should do:
if (! find_reg_note (insn, REG_DEAD, NULL))
instead of the loop.