[LLVMdev] BasicBlock succ iterator
criswell at illinois.edu
Thu Oct 13 07:27:38 PDT 2011
On 10/13/11 1:20 AM, neda 8664 wrote:
> Hi, All
> I want to implement DSWP Which is used for parallelization of loops.
> For this purpose, the loop was replaced with a new basic block in main
> And new functions were created and basic blocks of Loop assigned to
> them.I have checked blocks and branches for Succ and Pred relation and
> I have not found any problems.
> However I get the following error:
> //opt: /home/llvm/src/include/llvm///Support/CFG.h:105:
> llvm::SuccIterator<Term_, BB_>::SuccIterator(Term_) [with Term_ =
> llvm::TerminatorInst*, BB_ = llvm::BasicBlock]: Assertion `T &&
> "getTerminator returned null!"' failed.
> 0 opt 0x0848e569
> Stack dump:
> 0. Program arguments: opt -dot-cfg -dot-postdom -dot-dom -load
> /home/llvm/src/Release/lib///parallel.so -parallel obj.o -o out.o
> 1. Running pass 'Function Pass Manager' on module 'obj.o'.
> 2. Running pass 'Loop Pass Manager' on function '@main'
> Aborted (core dumped)/
> I do not know why this error occurred.Who knows why this error occurs
> and what should I do?
Every basic block in LLVM is required to have a Terminator instruction
(http://llvm.org/docs/LangRef.html#terminators). I suspect that you've
created a basic block without a Terminator instruction. Call the dump()
method on all the basic blocks you added and see if they have a
-- John T.
> Best regards
> 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