Code Extractor Issue

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Code Extractor Issue

Ben Mayne-3
Code Extractor Issue

I'm having an issue with the CodeExtractor.  When I try to extract the lone basic block from the following function, I get an assertion error.


define i32 @test(i32 %x) {
        %tmp = call i32 @test3( i32 %x )                ; <i32> [#uses=1]
        ret i32 %tmp
}

The assertion error is:

lli: Dominators.cpp:71: void llvm::DominatorTree::splitBlock(llvm::BasicBlock*): Assertion `NewBB->getTerminator()->getNumSuccessors() == 1 && "NewBB should have a single successor!"' failed.
lli((anonymous namespace)::PrintStackTrace()+0x22)[0x87f7cb8]
lli((anonymous namespace)::SignalHandler(int)+0x110)[0x87f7f7c]
/lib/tls/libc.so.6[0x59fa48]
/lib/tls/libc.so.6(abort+0x129)[0x5a1319]
/lib/tls/libc.so.6(__assert_fail+0x101)[0x598f41]
lli(llvm::DominatorTree::splitBlock(llvm::BasicBlock*)+0xb7)[0x874edff]
lli[0x86b2672]
lli[0x86b2b15]
lli(llvm::ExtractCodeRegion(llvm::DominatorTree&, std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > const&, bool)+0x39)[0x86b321d]

I just updated to llvm-2.1 from llvm-1.9 where I was never having this problem.  I don't understand exactly what it's complaining about (maybe the fact that the terminator instruction is a 'ret' instruction?, but I don't see why it couldn't handle this kind of a block).

Thanks,
Ben Mayne


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Code Extractor Issue

Evan Cheng-2
Please file a bug. Thanks.

Evan

On Feb 1, 2008, at 12:03 PM, Ben Mayne wrote:

I'm having an issue with the CodeExtractor.  When I try to extract the lone basic block from the following function, I get an assertion error.


define i32 @test(i32 %x) {
        %tmp = call i32 @test3( i32 %x )                ; <i32> [#uses=1]
        ret i32 %tmp
}

The assertion error is:

lli: Dominators.cpp:71: void llvm::DominatorTree::splitBlock(llvm::BasicBlock*): Assertion `NewBB->getTerminator()->getNumSuccessors() == 1 && "NewBB should have a single successor!"' failed.
lli((anonymous namespace)::PrintStackTrace()+0x22)[0x87f7cb8]
lli((anonymous namespace)::SignalHandler(int)+0x110)[0x87f7f7c]
/lib/tls/libc.so.6[0x59fa48]
/lib/tls/libc.so.6(abort+0x129)[0x5a1319]
/lib/tls/libc.so.6(__assert_fail+0x101)[0x598f41]
lli(llvm::DominatorTree::splitBlock(llvm::BasicBlock*)+0xb7)[0x874edff]
lli[0x86b2672]
lli[0x86b2b15]
lli(llvm::ExtractCodeRegion(llvm::DominatorTree&, std::vector<llvm::BasicBlock*, std::allocator<llvm::BasicBlock*> > const&, bool)+0x39)[0x86b321d]

I just updated to llvm-2.1 from llvm-1.9 where I was never having this problem.  I don't understand exactly what it's complaining about (maybe the fact that the terminator instruction is a 'ret' instruction?, but I don't see why it couldn't handle this kind of a block).

Thanks,
Ben Mayne

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev