Thanks for looking at this, Jeff.
On 07/27/2010 07:09 PM, Jeff Law wrote:
It seems to me implementing this optimization well requires insn
movement which is going to affect register lifetimes. Furthermore,
this optimization is sitting inside a while (changed) style loop. At
the least we need to mark blocks where the life data has become
inaccurate so that we don't mis-optimize based on inaccurate life data.
I haven't thought deeply about the problem, but it may well be the case
that as the cfgcleanup loop iterates new opportunities may be exposed
and thus it'd be useful to go ahead and update the life information.
I'm fairly certain I've observed this to happen. Note that other
transformations done in cfgcleanup can make life information inaccurate
before we even try to run head merging, making it impossible to do the
analysis.