[LLVMdev] how to eliminate dead infinite loops?

Owen Anderson resistor at mac.com
Wed Nov 24 15:58:03 PST 2010


On Nov 24, 2010, at 1:23 PM, Andrew Clinton wrote:
> 
> FYI, removing the ScalarEvolution conditional in the LoopDeletion code 
> (and copying the algorithm to my own loop deletion pass) seems to 
> correctly handle the elimination of infinite loops.  However I'd still 
> like to find a way to do this with standard passes if possible.

There is no way to do this with the standard pass set, because removing an infinite loop is
an invalid transformation.  John Regehr wrote a pretty good exposé about why it's illegal
here: http://blog.regehr.org/archives/140

--Owen



More information about the llvm-dev mailing list