search for: initialize_pass_end

Displaying 20 results from an estimated 46 matches for "initialize_pass_end".

2015 Sep 28
2
Registering a MachineFunctionPass
I had INITIALIZE_PASS_BEGIN and INITIALIZE_PASS_END macros. I replaced them with INITIALIZE_PASS but I get the same error. If I understand correctly, I need to modify Passes.h, InitializePasses.h, and Codegen.cpp files to register my pass, right? Another question is: Is it necessary to have the createNoopInserterPass function? Erdem ----...
2015 Aug 21
2
Guidelines for pass initialization?
Does anyone know what the guidelines are supposed to be for properly initializing a pass? Looking around, we seem to have three styles of pass registration in use. INITIALIZE_PASS(...) INITIALIZE_PASS_BEGIN(...) INITIALIZE_PASS_DEPENDENCY(...) ... INITIALIZE_PASS_END(...) static RegisterPass<FooPass> X(...); (This is the one encouraged in the docs, but seemingly the least widely used in tree?) As far as I can tell, these often appear to work interchangeably. (At least for passes with only "well known" dependencies.) Can anyone expose a set...
2017 Oct 03
2
About LLVM Pass dependency
Hello I am working on pass which has dependency on multiple passes. Say D1,D2,D3 I used INITIALIZE_PASS_BEGIN INITIALIZE_PASS_DEPENDENCY(D1) INITIALIZE_PASS_DEPENDENCY(D2) INITIALIZE_PASS_DEPENDENCY(D3) INITIALIZE_PASS_END. While running it through opt tool it, I had to specify this D1,D2,D3 pass names to get this pass executed before my pass. Is there way, to let llvm pass manager to know execute all dependencies without having to specify explicitly.? I suspect i am doing something wrong in my code, May be. Than...
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
...dRequired<DominatorTree>(); } And changed the bottom of my pass too: char Hello::ID = 0; namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) INITIALIZE_PASS_DEPENDENCY(DominatorTree) INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) class StaticInitializer { public: StaticInitializer() { PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeHelloPass(Registry); } }; static StaticInitializer InitializeEverything; Thanks again On Tu...
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
...cny is by doing something like this: char Hello::ID = 0; namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) INITIALIZE_PASS_DEPENDENCY(DominatorTree) INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) Unfortunately this gives me(when I try to run it). opt: Unknown command line argument '-hello'. If I instead using RegisterPass like in the guide the Pass is loaded fine, a assert is just tripped for not having Dom...
2011 Nov 08
4
[LLVMdev] loadable passes with dependencies?
...bottom of my pass too: >> >> char Hello::ID = 0; >> namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } >> INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) >> INITIALIZE_PASS_DEPENDENCY(DominatorTree) >> INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) >> >> class StaticInitializer { >> public: >>        StaticInitializer() { >>                PassRegistry&Registry = *PassRegistry::getPassRegistry(); >>                initializeHelloPass(R...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...t; > And changed the bottom of my pass too: > > char Hello::ID = 0; > namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } > INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) > INITIALIZE_PASS_DEPENDENCY(DominatorTree) > INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) > > class StaticInitializer { > public: > StaticInitializer() { > PassRegistry&Registry = *PassRegistry::getPassRegistry(); > initializeHelloPass(Registry); > } > }; > > static StaticInitial...
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
...> char Hello::ID = 0; >> >> namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } >> >> INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) >> >> INITIALIZE_PASS_DEPENDENCY(DominatorTree) >> >> INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) >> >> >> >> class StaticInitializer { >> >> public: >> >>        StaticInitializer() { >> >>                PassRegistry&Registry = >> >> *PassRegistry::g...
2011 Aug 22
1
[LLVMdev] Infinite loop when adding a new analysis pass
...icm", "Loop Invariant Code Motion", false, false) INITIALIZE_PASS_DEPENDENCY(DominatorTree) INITIALIZE_PASS_DEPENDENCY(LoopInfo) INITIALIZE_PASS_DEPENDENCY(LoopSimplify) INITIALIZE_PASS_DEPENDENCY(MyAnalysis) // add this dependency INITIALIZE_AG_DEPENDENCY(AliasAnalysis) INITIALIZE_PASS_END(LICM, "licm", "Loop Invariant Code Motion", false, false) Howerver, I got an infinite loop when trying opt -O3 t.bc -o out.bc Where t.bc is created using clang from int main() { return 0; } What am I missing ? All files are attacahed (include/Analysis/MyAnalysis.h, lib/...
2018 Apr 14
0
Error: Verify if there is a pass dependency cycle
Hi, You need to initialize your pass with: INITIALIZE_PASS_BEGIN(YourPass, "your-pass", "Your Pass", /*cfgonly=*/false, /*analysis=*/false) INITIALIZE_PASS_DEPENDENCY(PostDominatorTreeWrapperPass) INITIALIZE_PASS_END(YourPass, "your-pass", "Your Pass", /*cfgonly=*/false, /*analysis=*/false) So as to both register your pass, and have PostDominatorTreeWrapperPass (which is the Analysis pass in charge of creating the PostDominatorTree) initialized before your pass. It also give a pretty name...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...this: > char Hello::ID = 0; > namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } > INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) > INITIALIZE_PASS_DEPENDENCY(DominatorTree) > INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) > > Unfortunately this gives me(when I try to run it). > opt: Unknown command line argument '-hello'. > > If I instead using RegisterPass like in the guide the Pass is loaded > fine, a assert is ju...
2013 Sep 05
1
[LLVMdev] why functionattrs doesn't add dependency of AliasAnalysis
...rms/IPO/FunctionAttrs.cpp @@ -76,6 +76,7 @@ namespace { char FunctionAttrs::ID = 0; INITIALIZE_PASS_BEGIN(FunctionAttrs, "functionattrs", "Deduce function attributes", false, false) +INITIALIZE_AG_DEPENDENCY(AliasAnalysis) INITIALIZE_AG_DEPENDENCY(CallGraph) INITIALIZE_PASS_END(FunctionAttrs, "functionattrs", "Deduce function attributes", false, false) Do you guys just miss the dependency for it? thanks, --lx -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...t;> > >> char Hello::ID = 0; > >> namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } > >> INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) > >> INITIALIZE_PASS_DEPENDENCY(DominatorTree) > >> INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) > >> > >> class StaticInitializer { > >> public: > >> StaticInitializer() { > >> PassRegistry&Registry = *PassRegistry::getPassRegistry(); > >>...
2017 Oct 03
1
About LLVM Pass dependency
...wrote: > >> Hello >> I am working on pass which has dependency on multiple passes. Say >> D1,D2,D3 >> I used >> INITIALIZE_PASS_BEGIN >> INITIALIZE_PASS_DEPENDENCY(D1) >> INITIALIZE_PASS_DEPENDENCY(D2) >> INITIALIZE_PASS_DEPENDENCY(D3) >> INITIALIZE_PASS_END. >> >> While running it through opt tool it, I had to specify this D1,D2,D3 pass >> names >> to get this pass executed before my pass. >> Is there way, to let llvm pass manager to know execute all dependencies >> without >> having to specify explicitly.? &...
2018 Apr 12
2
Error: Verify if there is a pass dependency cycle
Hi everyone, I write a new FunctionPass which wants to use pass PostDominatorTree, so I implement the next function: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<PostDominatorTree>(); AU.setPreservesAll(); } Then I get PDT through the next statement: PostDominatorTree *PDT = &getAnalysis<PostDominatorTree>(); My code can be successfully
2011 May 03
4
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
...lt;LoopInfo>(); AU.addRequired<DominatorTree>(); } void Foo::print(std::ostream&, const Module*) const { } char Foo::ID = 0; INITIALIZE_PASS_BEGIN(Foo, "foo", "foo bar", true, true) INITIALIZE_PASS_DEPENDENCY(LoopInfo) INITIALIZE_PASS_DEPENDENCY(DominatorTree) INITIALIZE_PASS_END(Foo, "foo", "foo bar", true, true) Foo *createFooPass() { return new Foo(); } void runFooPass(Module &M) { PassManager PM; PM.add(createFooPass()); PM.run(M); } Program received signal SIGSEGV, Segmentation fault. #0 0x0832312f in llvm::PMTopLevelManage...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
...llo::ID = 0; >>>>> namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } >>>>> INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) >>>>> INITIALIZE_PASS_DEPENDENCY(DominatorTree) >>>>> INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) >>>>> >>>>> class StaticInitializer { >>>>> public: >>>>> StaticInitializer() { >>>>> PassRegistry&Registry = >>>>&...
2011 Nov 09
1
[LLVMdev] loadable passes with dependencies?
...;>>>>> namespace llvm { void initializeHelloPass(llvm::PassRegistry&); } >>>>>> INITIALIZE_PASS_BEGIN(Hello, "hello", "Hello World Pass", false, true) >>>>>> INITIALIZE_PASS_DEPENDENCY(DominatorTree) >>>>>> INITIALIZE_PASS_END(Hello, "hello", "Hello World Pass", false, true) >>>>>> >>>>>> class StaticInitializer { >>>>>> public: >>>>>>        StaticInitializer() { >>>>>>                PassRegistry&Registry =...
2012 Apr 12
0
[LLVMdev] Function Pass Manager
...dRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); } virtual bool runOnFunction(Function &F); }; } char MyPass::ID = 0; INITIALIZE_PASS_BEGIN(MyPass, "mypass", "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....
2011 Dec 06
2
[LLVMdev] Assertion `PI && "Expected required passes to be initialized"' failed for AliasAnalysis.
...;, 2670 "Compile-time instrumentation for runtime " 2671 "data race detection with ThreadSanitizer", 2672 false, false) 2673 INITIALIZE_PASS_DEPENDENCY(TargetData) 2674 INITIALIZE_AG_DEPENDENCY(AliasAnalysis) 2675 INITIALIZE_PASS_END(ThreadSanitizer, "tsan", 2676 "Compile-time instrumentation for runtime " 2677 "data race detection with ThreadSanitizer", 2678 false, false) 2679 However when I run Clang with my pass enabled, I get the fol...