search for: createmypasspass

Displaying 2 results from an estimated 2 matches for "createmypasspass".

2012 Apr 12
0
[LLVMdev] Function Pass Manager
...pass", "mypass", false, false) INITIALIZE_PASS_DEPENDENCY(LoopSimplify) INITIALIZE_PASS_END(MyPass, "mypass", "mypass", false, false) bool MyPass::runOnFunction(Function &F) { return MyPass::ID == 0; } FunctionPass *llvm::createMyPassPass() { return new MyPass(); } It's a simple FunctionPass requiring a lower level pass, LoopSimplify. I wrote this pass among the other llvm passes in Transform/Scalar, it's not a dynamic loaded pass. It's worth to note that if I change this pass to be a ModulePass instead, the requi...
2012 Mar 23
3
[LLVMdev] Function Pass Manager
Hi, I'm writing a function pass which is dynamically loaded by opt and I need some analysis and passes to be run before my pass: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID);