[LLVMdev] How to avoid loopverify failures after replacing the backedge with an edge(latchBB to exitBB) in a looppass?

zhiyuan yang sjtu.yzy at gmail.com
Tue May 7 20:26:25 PDT 2013


Hi,

I am writing a loop pass to replace the backedge with an edge from latch to
exit.
Now I just replace the terminator of latch with another BranchInst, and the
loop will not be a loop after my pass. However, it turns out a failure of
loopverify after executing my pass:

opt: ~/llvm/llvm-trunk/include/llvm/Analysis/LoopInfoImpl.h:297: void
llvm::LoopBase<N, M>::verifyLoop() const [with BlockT = llvm::BasicBlock,
LoopT = llvm::Loop]: Assertion `HasInsideLoopPreds && "Loop block has no
in-loop predecessors!"' failed.

Does this mean I should keep it still a loop after my pass? If so, how
could I bypass it?
-- 

*Thank you && Best Regards,*

*Zhiyuan Yang*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130508/8c090e6f/attachment.html>


More information about the llvm-dev mailing list