Suggestion for a fix to Bug middle-end/20177
James E Wilson
wilson@specifixinc.com
Fri Mar 18 10:03:00 GMT 2005
Mostafa Hagog wrote:
> The question is: what is the correct fix for the longer term ?
> is it enough to mark the SMSed block dirty? or do we need
> also to keep the REG_DEAD correct in each basic-block
> separately?
You either have to keep all REG_NOTES up to date, or call code that will
recompute them. You can recompute REG_DEAD/REG_UNUSED notes by calling
back into flow. This is presumably what happens when you mark the block
dirty, so that would be a sufficient solution for REG_DEAD/REG_UNUSED.
See for instance code in combine.c that updates REG_NOTES after
combination. This is in distribute_notes.
By the way, REG_UNUSED means that this instructions sets a register, and
this value dies here. There are no uses of this register before the
next set or the end of the function. Thus it holds register life info
that is complimentary to REG_DEAD.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
More information about the Gcc
mailing list