Fernando Magno Quintao Pereira
2006-Sep-09 05:16 UTC
[LLVMdev] Help with pass registration
Dear guys, I have updated my LLVM to the top of CVS, and now I am getting errors like this one below when I write new passes: "llc: PassManagerT.h:387: void llvm::PassManagerT<Trait>::markPassUsed(const llvm::PassInfo*, llvm::Pass*) [with Trait = llvm::FTraits]: Assertion `getAnalysisOrNullUp(P) && dynamic_cast<ImmutablePass*>(getAnalysisOrNullUp(P)) && "Pass available but not found! " "Perhaps this is a module pass requiring a function pass?"' failed." Could someone give me pointers to know more about this type of errors? I think I am not registering my new passes properly in the new llvm distribution, because I am getting this even if I try to write a very simple machine function pass that only returns false and preserves all the other passes. Thanks a lot, Fernando
On Fri, 8 Sep 2006, Fernando Magno Quintao Pereira wrote:> I have updated my LLVM to the top of CVS, and now I am getting > errors like this one below when I write new passes:What does your getAnalysisUsage method look like? -Chris> "llc: PassManagerT.h:387: void > llvm::PassManagerT<Trait>::markPassUsed(const llvm::PassInfo*, > llvm::Pass*) [with Trait = llvm::FTraits]: Assertion > `getAnalysisOrNullUp(P) && > dynamic_cast<ImmutablePass*>(getAnalysisOrNullUp(P)) && "Pass available > but not found! " "Perhaps this is a module pass requiring a function > pass?"' failed." > > Could someone give me pointers to know more about this type of errors? I > think I am not registering my new passes properly in the new llvm > distribution, > because I am getting this even if I try to write a very simple machine > function pass that only returns false and preserves all the other passes. > > Thanks a lot, > > Fernando > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.org/
Fernando Magno Quintao Pereira
2006-Sep-09 19:30 UTC
[LLVMdev] Help with pass registration
> > I have updated my LLVM to the top of CVS, and now I am getting > > errors like this one below when I write new passes: > > What does your getAnalysisUsage method look like? >Chris, I think I've figured the problem out. I have a very basic question though. What is the difference between addRequired, and addRequiredID? For instance, in RegAllocLocal.cpp, you have both: AU.addRequired<LiveVariables>(); AU.addRequiredID(PHIEliminationID); When should I use one, and when the other should be used? Thanks a lot, Fernando