Hello folks, I wrote a transforming looppass for my project, opt --help can see it. I want clang to use my pass too, so that I don't have to compile to IR, opt, and then llc to binary manually. Now I am trying to add my pass to O2 by mimicking LICM pass. I add a line "MPM.add(createMyPass());" in PassManagerBuilder::populateModulePassManager, and got assertion fail "void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed." I can't figure out how to solve this? thanks for any inputs. yuanfang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111115/fd89ce69/attachment.html>
Hi Yuanfang,> I wrote a transforming looppass for my project, opt --help can see it. I want > clang to use my pass too, so that I don't have to compile to IR, opt, and then > llc to binary manually. Now I am trying to add my pass to O2 by mimicking LICM > pass. > > I add a line "MPM.add(createMyPass());" > in PassManagerBuilder::populateModulePassManager, and got assertion fail "void > llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected > required passes to be initialized"' failed." I can't figure out how to solve > this? thanks for any inputs.maybe you need to use INITIALIZE_PASS_DEPENDENCY. If you grep for this in lib/Transforms/Scalar you will see several examples. Ciao, Duncan.> > yuanfang > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Possibly Parallel Threads
- [LLVMdev] unconditional branch folding
- [LLVMdev] byval attr for base+range parameters
- [RFC] Introducing classes for the codegen driven by new pass manager
- [RFC] Introducing classes for the codegen driven by new pass manager
- [RFC] Introducing classes for the codegen driven by new pass manager