How can I tell if BB can reach EXIT_BLOCK_PTR?
Joern Rennecke
amylaar@spamcop.net
Fri Nov 19 16:54:00 GMT 2010
Quoting Ian Lance Taylor <iant@google.com>:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> Given a basic block BB, is there a way to tell if it will reach
>> EXIT_BLOCK_PTR?
>
> Seems like you should be able to use dominated_by_p.
Unless he wants to know if it will *actually* reach EXIT_BLOCK_PTR,
in which case this is a form of the halting problem.
E.g. it is not generally correct to move an idempotent side effect out of a
loop to a postdominator; you first have to prove that the loop terminates.
More information about the Gcc
mailing list