[LLVMdev] How to avoid loopverify failures after replacing the backedge with an edge(latchBB to exitBB) in a looppass?
atrick at apple.com
Tue May 7 22:02:06 PDT 2013
On May 7, 2013, at 8:26 PM, zhiyuan yang <sjtu.yzy at gmail.com> wrote:
> 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?
You might need to call LPPassManager::deleteLoopFromQueue().
> Thank you && Best Regards,
> Zhiyuan Yang
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev