Local update flow info assumes valid situations are illegal

Alexandre Oliva aoliva@redhat.com
Wed Jan 3 17:25:00 GMT 2001


I've observed a significant number of failures lately, related with
having regmove replace uses of certain registers with uses of others,
such that the originally used register becomes dead.
verify_local_live_at_start() didn't like that.

I've recently been presented with another testcase in which all uses
of a register could be optimized away by combine, so the register
became dead in the whole basic block.

In other cases, a fixed hardware register was not used at all before
some split introduced uses thereof; in this case, the register ended
up live in the beginning of the block, even though it was dead at the end.

In all of these situations, what there was in common was that the
register was dead at the end of the basic block, so, if usage of the
register changed within the block, life information would (or
wouldn't) propagate up from the block end, and the register would end
up dead (or live) in the head, and we'd crash except in certain
common, but not certain, circumstances.

This patch addresses this issue.  With it, we'll only crash when the
register whose life info has changed if it was live at the end of the
basic block.  If it was dead, it's reasonable to have its life info
change at the head, so we'll accept it without crashing.

There's not much to test in this patch, since it pretty much only
avoids crashes, but I've tested it with a couple of targets on which
I've observed failures before, and didn't observe them any more.

Ok to install?



More information about the Gcc-patches mailing list