You can re-create LoopInfo from updated dominator tree.
Just update dominator tree for function and check LoopInfo::Analyze for new
LoopInfo.
Regards,
Ashutosh
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Sridhar G
Sent: Wednesday, February 25, 2015 11:28 AM
To: llvmdev at cs.uiuc.edu
Subject: [LLVMdev] Calculate LoopInfo again
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/6cf2f300/attachment.html>