Simple recompute_reg_usage cleanup

Joern Rennecke amylaar@cygnus.co.uk
Fri Dec 3 17:43:00 GMT 1999


> The VTOP notes only seem to be used by loop.c and reorg.c and in both
> cases they are only used to guess program flow which we can determine
> more accurately from the CFG.

No, loop also wants to know if the loop condition has already been evaluated
for the first iteration, yielding true.
I.e. VTOP also says something about the range of values that the
iteration varaible can hold.

> How about looking to see if the test at then end of the loop latch
> checks a BIV or GIV?

There are often loops where the biv is not tested in the last test -
especially after gcc has a go at reshaping the loop.
We could address this issue by checking if any loop exit uses a giv.

But that would still fail pointer-chasing loops where the exit condition
is that a pointer is zero, and loops that use an end marker (e.g. strlen).


More information about the Gcc-patches mailing list