search for: modpass2

Displaying 5 results from an estimated 5 matches for "modpass2".

Did you mean: modpass1
2009 Apr 09
3
[LLVMdev] Pass Manager Restriction?
...const {} }; struct FunPass1 : public FunctionPass { static char ID; FunPass1() : FunctionPass((intptr_t)&ID) {} virtual bool runOnFunction(Function &F) {return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<ModPass1>(); } }; struct ModPass2 : public ModulePass { static char ID; ModPass2() : ModulePass((intptr_t)&ID) {} virtual bool runOnModule(Module &M) { return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<FunPass1>(); } }; char ModPass1::ID = 0; char FunPass1::ID =...
2009 Apr 10
0
[LLVMdev] Pass Manager Restriction?
"A module pass can use function level passes (e.g. dominators) using getAnalysis interfacegetAnalysis<DominatorTree>(Function), if the function pass does not require any module passes." http://llvm.org/docs/WritingAnLLVMPass.html In your case, A module pass (ModPass2) is trying tu use function level pass (FunPass1) which uses module level pass (ModPass1). This is not supported. - Devang On Apr 9, 2009, at 3:13 PM, Joseph Blomstedt wrote: > Having a ModulePass that requires a FunctionPass that in turn requires > another ModulePass results in an asse...
2009 Apr 10
2
[LLVMdev] Pass Manager Restriction?
...;A module pass can use function level passes (e.g. dominators) using > getAnalysis interfacegetAnalysis<DominatorTree>(Function), if the > function pass does not require any module passes." > > http://llvm.org/docs/WritingAnLLVMPass.html > > In your case, A module pass (ModPass2) is trying tu use function level > pass (FunPass1) which uses module level pass (ModPass1). This is not > supported. > > - > Devang > > On Apr 9, 2009, at 3:13 PM, Joseph Blomstedt wrote: > >> Having a ModulePass that requires a FunctionPass that in turn requires >&...
2012 Mar 02
2
[LLVMdev] Interactions between module and loop passes
...anation why loop passes cannot be scheduled between two module passes? Perhaps I misunderstood the behaviour of pass managers. I paste here my "usage" information: int main(...){ Module m = ... //Read module PassManager pm; pm.add(new ModPass1); pm.add(new LoopPass); pm.add(new ModPass2); pm.run(m); } class ModPass1 : public ModulePass{ virtual void getAnalysisUsage(AnalysisUsage&AU) const{ AU.setPreservesAll(); } }; class LoopPass : public LoopPass{ virtual void getAnalysisUsage(AnalysisUsage&AU) const{ AU.setRequires<ModPass1>(); AU.se...
2012 Mar 02
0
[LLVMdev] Interactions between module and loop passes
...o module passes? Perhaps I misunderstood the > behaviour of pass managers. > > I paste here my "usage" information: > > int main(...){ > > Module m = ... //Read module > PassManager pm; > > pm.add(new ModPass1); > pm.add(new LoopPass); > pm.add(new ModPass2); > pm.run(m); > > } > > class ModPass1 : public ModulePass{ > > virtual void getAnalysisUsage(AnalysisUsage&AU) const{ > AU.setPreservesAll(); > } > }; > > class LoopPass : public LoopPass{ > > virtual void getAnalysisUsage(Anal...