Hi all, the CallGraph pass is only available in opt. Is there any substantial reason for that? Or is it only because it seems not to be useful for llc? I want to use it in an backend that is derived from the CBackend. I need the information what functions are called in every other function to build communication struktures between the functions. The backend is generating VHDL from C code. (VHDL is a hardware description language, which means it is used to generate hardware, for those who are not familiar with this.) I've managed to compile my backend with the CallGraph pass, but when it try to use it, I get an error, which I could't fix until now. llc --load=/home/paul/LLVM/install/llvm-2.2/lib/MParSchedule.so --load=/home/paul/LLVM/install/llvm-2.2/lib/libLLVMVHDLBackend.so -f -march=vhdl test.o -o llvm.vhd llc: /home/paul/LLVM/src/llvm-2.2/lib/VMCore/PassManager.cpp:922: virtual void llvm::PMDataManager::addLowerLevelRequiredPass(llvm::Pass*, llvm::Pass*): Assertion `0 && "Unable to handle Pass that requires lower level Analysis pass"' failed. llc[0x85e922c] /lib/i686/cmov/libc.so.6(abort+0x101)[0x401e6981] /lib/i686/cmov/libc.so.6(__assert_fail+0xee)[0x401de10e] llc(llvm::PMDataManager::addLowerLevelRequiredPass(llvm::Pass*, llvm::Pass*)+0x7d)[0x857da0d I'm suspecting the reason for the error is connected with the reason that caused to make CallGraph a opt only pass. Thanks for your time ! - Paul
Paul, On Jun 2, 2008, at 12:38 AM, Paul Arndt wrote:> Hi all, > > the CallGraph pass is only available in opt. Is there any > substantial reason > for that? Or is it only because it seems not to be useful for llc?No, that's not true.> I want to use it in an backend that is derived from the CBackend. I > need the > information what functions are called in every other function to build > communication struktures between the functions. The backend is > generating > VHDL from C code. (VHDL is a hardware description language, which > means it is > used to generate hardware, for those who are not familiar with this.) > > I've managed to compile my backend with the CallGraph pass, but when > it try to > use it, I get an error, which I could't fix until now. > > > > llc --load=/home/paul/LLVM/install/llvm-2.2/lib/MParSchedule.so -- > load=/home/paul/LLVM/install/llvm-2.2/lib/libLLVMVHDLBackend.so -f - > march=vhdl > test.o -o llvm.vhd > llc: /home/paul/LLVM/src/llvm-2.2/lib/VMCore/PassManager.cpp:922: > virtual void > llvm::PMDataManager::addLowerLevelRequiredPass(llvm::Pass*, > llvm::Pass*): > Assertion `0 && "Unable to handle Pass that requires lower level > Analysis > pass"' failed. > llc[0x85e922c] > /lib/i686/cmov/libc.so.6(abort+0x101)[0x401e6981] > /lib/i686/cmov/libc.so.6(__assert_fail+0xee)[0x401de10e] > llc(llvm::PMDataManager::addLowerLevelRequiredPass(llvm::Pass*, > llvm::Pass*)+0x7d)[0x857da0dThis error indicates that pass manager is not able to schedule your pass. 918 // Module Level pass may required Function Level analysis info 919 // (e.g. dominator info). Pass manager uses on the fly function pass manager 920 // to provide this on demand. In that case, in Pass manager terminology, 921 // module level pass is requiring lower level analysis info managed by 922 // lower level pass manager. 923 924 // When Pass manager is not able to order required analysis info, Pass manager 925 // checks whether any lower level manager will be able to provide this 926 // analysis info on demand or not. 927 assert (0 && "Unable to handle Pass that requires lower level Analysis pass"); What is the skeleton of your pass structure ? Use -debug-pass=? argument on the llc command line to understand what pass manager is trying to do. Try 'llc --help-hidden' for more info. - Devang
Hi Paul,> > Assertion `0 && "Unable to handle Pass that requires lower level > > Analysis > > pass"' failed.I have been struggling with the same problem as well, when I wanted to make a loop pass depend on a module pass (IIRC). You should probably pull your program through gdb and get a backtrace so you can see what pass is causing the problem. Also, a paste of the passes you are trying to schedule would help as well (you were building your own program, not using the builtin opt / llc / etc, right? Gr. Matthijs -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080603/8f7fda77/attachment.sig>
Seemingly Similar Threads
- [LLVMdev] want to use CallGraph Pass in llc
- [LLVMdev] Patch: PassManager should call add() instead of addLowerLevelRequiredPass()
- [LLVMdev] Possible bug in PassManager - Higher pass requires lower pass
- [LLVMdev] poolallocation error
- [LLVMdev] poolallocation error