On 08/05/2010 06:46 AM, Wenbin Zhang wrote:> Hi all, > I'm using postDominatorTree to do some program analysis. My code works > well for small tests, but when I run it on real applications, the > following error occurs: > /Inorder PostDominator Tree: DFSNumbers invalid: 0 slow queries. > [1] <<exit node>> {0,21} > [2] %bb1 {1,2} > [2] %bb {3,4} > [2] %entry {5,6} > [2] %bb8 {7,20} > [3] %bb7 {8,9} > [3] %bb2 {10,11} > [3] %bb6 {12,13} > [3] %bb5 {14,19} > [4] %bb4 {15,16} > [4] %bb3 {17,18} > 0 opt 0x085643e8 > Stack dump: > 0. Program arguments: opt > -load=/home/a_i/llvm/llvm-2.7/Release/lib/ConsDumper.so -consdumper -f > -o pbzip2_2s.bc pbzip2.bc -debug > 1. Running pass 'dump constraints' on module 'pbzip2.bc'. > Segmentation fault/ > I have no hint about this. Does anyone know about the reason?Not yet. However I would love to find the reason. Can you reproduce this with the development version of LLVM aka LLVM trunk? Do you believe this bug is in the postdominator implementation or in you code? Can you extract a simplified test case with bugpoint? Adding this to the bugtracker might be a good idea. Tobias
I'll try the trunk, as well as check my code again. If indeed it's not fixed, I'll try to post a triggering case here. Thanks for the advice~ Best, --Wenbin ----- Original Message ----- From: "Tobias Grosser" <grosser at fim.uni-passau.de> To: "Wenbin Zhang" <zhangwen at cse.ohio-state.edu> Cc: <llvmdev at cs.uiuc.edu> Sent: Thursday, August 05, 2010 3:07 AM Subject: Re: [LLVMdev] a problem when using postDominatorTree> On 08/05/2010 06:46 AM, Wenbin Zhang wrote: >> Hi all, >> I'm using postDominatorTree to do some program analysis. My code works >> well for small tests, but when I run it on real applications, the >> following error occurs: >> /Inorder PostDominator Tree: DFSNumbers invalid: 0 slow queries. >> [1] <<exit node>> {0,21} >> [2] %bb1 {1,2} >> [2] %bb {3,4} >> [2] %entry {5,6} >> [2] %bb8 {7,20} >> [3] %bb7 {8,9} >> [3] %bb2 {10,11} >> [3] %bb6 {12,13} >> [3] %bb5 {14,19} >> [4] %bb4 {15,16} >> [4] %bb3 {17,18} >> 0 opt 0x085643e8 >> Stack dump: >> 0. Program arguments: opt >> -load=/home/a_i/llvm/llvm-2.7/Release/lib/ConsDumper.so -consdumper -f >> -o pbzip2_2s.bc pbzip2.bc -debug >> 1. Running pass 'dump constraints' on module 'pbzip2.bc'. >> Segmentation fault/ >> I have no hint about this. Does anyone know about the reason? > > Not yet. However I would love to find the reason. > > Can you reproduce this with the development version of LLVM aka LLVM > trunk? Do you believe this bug is in the postdominator implementation or > in you code? > Can you extract a simplified test case with bugpoint? > > Adding this to the bugtracker might be a good idea. > > Tobias >
Wenbin Zhang wrote:> I'll try the trunk, as well as check my code again. If indeed it's not > fixed, I'll try to post a triggering case here. > Thanks for the advice~ >Did you run the -mergereturn pass (it might also be called UnifyExitNodes in the source code)? This is the pass that ensures that each function has exactly one basic block that returns control to the caller. It's possible that PostDominator doesn't handle functions with multiple exits (if someone knows whether it does or not, please let me know). -- John T.> Best, > --Wenbin > > > ----- Original Message ----- > From: "Tobias Grosser" <grosser at fim.uni-passau.de> > To: "Wenbin Zhang" <zhangwen at cse.ohio-state.edu> > Cc: <llvmdev at cs.uiuc.edu> > Sent: Thursday, August 05, 2010 3:07 AM > Subject: Re: [LLVMdev] a problem when using postDominatorTree > > > >> On 08/05/2010 06:46 AM, Wenbin Zhang wrote: >> >>> Hi all, >>> I'm using postDominatorTree to do some program analysis. My code works >>> well for small tests, but when I run it on real applications, the >>> following error occurs: >>> /Inorder PostDominator Tree: DFSNumbers invalid: 0 slow queries. >>> [1] <<exit node>> {0,21} >>> [2] %bb1 {1,2} >>> [2] %bb {3,4} >>> [2] %entry {5,6} >>> [2] %bb8 {7,20} >>> [3] %bb7 {8,9} >>> [3] %bb2 {10,11} >>> [3] %bb6 {12,13} >>> [3] %bb5 {14,19} >>> [4] %bb4 {15,16} >>> [4] %bb3 {17,18} >>> 0 opt 0x085643e8 >>> Stack dump: >>> 0. Program arguments: opt >>> -load=/home/a_i/llvm/llvm-2.7/Release/lib/ConsDumper.so -consdumper -f >>> -o pbzip2_2s.bc pbzip2.bc -debug >>> 1. Running pass 'dump constraints' on module 'pbzip2.bc'. >>> Segmentation fault/ >>> I have no hint about this. Does anyone know about the reason? >>> >> Not yet. However I would love to find the reason. >> >> Can you reproduce this with the development version of LLVM aka LLVM >> trunk? Do you believe this bug is in the postdominator implementation or >> in you code? >> Can you extract a simplified test case with bugpoint? >> >> Adding this to the bugtracker might be a good idea. >> >> Tobias >> >> > >
On 08/05/2010 06:00 PM, John Criswell wrote:> Wenbin Zhang wrote: >> I'll try the trunk, as well as check my code again. If indeed it's not >> fixed, I'll try to post a triggering case here. >> Thanks for the advice~ >> > > Did you run the -mergereturn pass (it might also be called > UnifyExitNodes in the source code)? This is the pass that ensures that > each function has exactly one basic block that returns control to the > caller. > > It's possible that PostDominator doesn't handle functions with multiple > exits (if someone knows whether it does or not, please let me know).It should. There are still limitations in terms of infinite loops that are are not analyzed by the PostDominator analysis, but multiple exits should be handled correctly. At least there is code try to support them. Tobi
Seemingly Similar Threads
- [LLVMdev] a problem when using postDominatorTree
- [LLVMdev] a problem when using postDominatorTree
- [LLVMdev] a problem when using postDominatorTree
- [LLVMdev] a problem when using postDominatorTree
- [LLVMdev] how to check whether from basicblock A we can go to basicblock B within the same function?