[LLVMdev] Calculate LoopInfo again

Sridhar G g.sridhar53 at gmail.com
Tue Feb 24 21:58:11 PST 2015


Hello,
I am iterating over loops using LoopInfo iterator. If a condition satisfies
on some loop, I change the loop body and remove it from that particular
loop. Also, I remove all incoming edges to the loop header, latch and
preHeader. Hence, these will be the unreachable blocks in the function.

If that condition satisfies, then I start iterating the loops from the
beginning skipping the modified loop. So, I need to re-calculate the
LoopInfo.

How to build LoopInfo again with the updated CFG structure?

If I just call getAnalysis<LoopInfo>() again, the modified loop will still
be present in it.

-- 
Regards,
Sridhar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150225/fef14cb4/attachment.html>


More information about the llvm-dev mailing list