search for: addrequiredid

Displaying 20 results from an estimated 87 matches for "addrequiredid".

Did you mean: addrequired
2014 Sep 29
2
[LLVMdev] questions about getAnalysisUsage
Hi, I notice that there are several different methods called inside getAnalysisUsage(). The parameters of addRequiredID and addPreservedID are passID. What is the difference between Required and Preserved? There are also function named addRequired<PassName>() called. What is the difference between addRequired<PassName>() and addRequiredID(PassID)? Thanks a lot! Best,...
2012 Aug 06
3
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
...n pass (i.e., I don't want to use opt). I wrote a Module pass which already calls other analysis and transformation passes in its getAnalysisUsage method: void MyPass::getAnalysisUsage(AnalysisUsage& AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); } However, I couldn't figure out how to call the LoopRotate and LoopUnroll passes since I cannot use addRequiredID or addRequired for these two transformations. In Scalar.h, I...
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); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); AU.addRequired<ScalarEvolution>(); AU.addPreserved<ScalarEvolution>(); } When I run it with opt -load, I'm getting the following error:...
2013 Apr 03
1
[LLVMdev] YSU_Student
...ass (i.e., I don't want to use opt). I wrote a Module pass which already calls other analysis and transformation passes in its getAnalysisUsage method: void MyPass::getAnalysisUsage(AnalysisUsage& AU) const { AU.addRequired<LoopInfo>(); AU.addPreserved<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addPreservedID(LoopSimplifyID); AU.addRequiredID(LCSSAID); AU.addPreservedID(LCSSAID); } However, I couldn't figure out how to call the LoopRotate and LoopUnroll passes since I cannot use addRequiredID or addRequired for these two transformations. how can I do i...
2012 Apr 12
0
[LLVMdev] Function Pass Manager
...mespace { struct MyPass : public FunctionPass { static char ID; // Pass identification, replacement for typeid MyPass() : FunctionPass(ID) { initializeMyPassPass(*PassRegistry::getPassRegistry()); } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredID(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_...
2012 Aug 06
0
[LLVMdev] How to call some transformation passes (LoopRotate and LoopUnroll) from my own pass
...opt). I wrote a Module > pass which already calls other analysis and transformation passes in > its getAnalysisUsage method: > > > void MyPass::getAnalysisUsage(AnalysisUsage& AU) const { > AU.addRequired<LoopInfo>(); > AU.addPreserved<LoopInfo>(); > AU.addRequiredID(LoopSimplifyID); > AU.addPreservedID(LoopSimplifyID); > AU.addRequiredID(LCSSAID); > AU.addPreservedID(LCSSAID); > } > > However, I couldn't figure out how to call the LoopRotate and > LoopUnroll passes since I cannot use addRequiredID or addRequired for > these...
2009 May 13
3
[LLVMdev] ModulePass using BreakCriticalEdges
Hi, I'm writing a ModulePass that needs critical edges split up. I have the statement AU.addRequiredID(BreakCriticalEdgesID); in my getAnalysisUsage() but the pass never gets executed. I guess I have to request pass execution for each function, but I can't get behind how to do that, since there is no analysis group for that kind of transformation. Thanks, Andi
2006 Sep 09
1
[LLVMdev] Help with pass registration
...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
2007 Apr 07
1
[LLVMdev] Pass management
Dear guys, I need help fixing a little piece of code. I have a pass that I really want to execute after the TwoAddressinstructionPass. But if I write "AU.addRequiredID(TwoAddressInstructionPassID);" in my pass' getAnalysisUsage, I end up getting the infamous: PassManagerT.h:387: failed assertion `getAnalysisOrNullUp(P) && dynamic_cast<ImmutablePass*>(getAnalysisOrNullUp(P)) && "Pass available but not found! " "Pe...
2007 Dec 04
0
[LLVMdev] Requiring dynamically loaded passes
.... > > More specifically, to refer to the pass name in AddRequired, I need > to declare it first but then I can't think of a way to load the > module implementing the pass dynamically instead of linking it > statically. I think if you define the pass ID in your host and use AddRequiredID instead of AddRequired: char LoadablePassID = 0; ... AU.addRequiredID(lookupPassInfo((intptr_t) &LoadablePassID)); then it should work if the loadable module references the same pass ID as an extern: extern char ExternalPassID; class ThePass : public ImmutablePa...
2007 Dec 04
3
[LLVMdev] Requiring dynamically loaded passes
Is it possible to AddRequired<...> a pass that is dynamically loaded? This would be very convenient for a course project but the documentation about pass interactions says nothing about dynamically loaded passes and vice versa. More specifically, to refer to the pass name in AddRequired, I need to declare it first but then I can't think of a way to load the module
2009 May 13
0
[LLVMdev] ModulePass using BreakCriticalEdges [Followup]
Hi, Andreas Neustifter wrote: > I'm writing a ModulePass that needs critical edges split up. I have the > statement > > AU.addRequiredID(BreakCriticalEdgesID); > > in my getAnalysisUsage() but the pass never gets executed. > > I guess I have to request pass execution for each function, but I can't > get behind how to do that, since there is no analysis group for that > kind of transformation. I now also adde...
2015 Jun 08
2
[LLVMdev] Use Callgraph
Hi All, I tried to use CallGraph in llvm by adding "AU.addRequired<CallGraph>();" in getAnalysisUsage function. But it reports an error: include/llvm/PassAnalysisSupport.h:56:39: error: ‘ID’ is not a member of ‘llvm::CallGraph’ return addRequiredID(PassClass::ID); How to use it correctly? Thanks, Haopeng
2015 Jul 09
3
[LLVMdev] PHI Elimination in Register Allocation Pass
...e before or after the register allocation phase. And I intend to implement the allocator registers using the resources of SSA representation, making this step (*PHI Elimination*) vital for development. Looking at the source code of allocators of LLVM, I see no explicit call of PHI Elimination (*AU.addRequiredID (PHIEliminationID)*), my question is whether if this step is called, occurs when and where such a call? -- Natanael Ramos Membro do corpo discente de Ciência da Computação pelo Instituto Federal de Minas Gerais - Campus Formiga -------------- next part -------------- An HTML attachment was scrubb...
2009 Nov 20
0
[LLVMdev] PassManager again...
...on't get it: If I use AU.addRequired<ProfileInfo>() in SelectionDAGISel.cpp the wrong ProfileInfo is used. It uses the "No ProfileInfo" implementation if ProfileInfo but not the one from ProfileInfoLoaderPass. (Which is immediately discarded after creation.) When I use AU.addRequiredID(ProfileLoaderPassID) I get assertions that a normal constructor is not available. Interesting enough its not the ProfileInfoLoader constructor thats misssing but the one from MachineFunctionAnalysis, which indeed has none. This raises the question why different passes are loaded (in a different...
2012 Jun 05
2
[LLVMdev] Function Pass Manager
...FunctionPass { > static char ID; // Pass identification, replacement for typeid > MyPass() : FunctionPass(ID) { > initializeMyPassPass(*PassRegistry::getPassRegistry()); > } > virtual void getAnalysisUsage(AnalysisUsage&AU) const { > AU.addRequiredID(LoopSimplifyID); > AU.addPreservedID(LoopSimplifyID); > } > virtual bool runOnFunction(Function&F); > }; > } Is LoopSimplifyID an analysis pass or a transform (optimization) pass? You cannot reliably use the addRequired() method to force a transform pas...
2009 May 11
2
[LLVMdev] Pass Manager hangs with CallGraph and LoopSimplify
...addRequired< CallGraph >(); au.setPreservesAll(); } bool runOnModule(Module &m) { return false; } }; class After : public FunctionPass { public: static char ID; After() : FunctionPass(&ID) {} void getAnalysisUsage(AnalysisUsage &au) const { au.addRequiredID( LoopSimplifyID ); au.addRequired< Before >(); au.setPreservesAll(); } bool runOnFunction(Function &f) { return false; } }; char Before::ID = 0; char After::ID = 0; namespace { RegisterPass< Before > x("before", "before"); RegisterPass&l...
2009 Nov 17
4
[LLVMdev] PassManager again...
Hi, Devang Patel wrote: > On Tue, Nov 17, 2009 at 9:03 AM, Andreas Neustifter > <astifter-llvm at gmx.at> wrote: > >> Okay, so the ProfileInfoLoader is working, but when I examine the executions more closely I see that the ProfileInfo generated by the ProfileInfoLoader is immediately discarded, when the SelectionDAGISel kicks in the "No Profile Info"-Implementation
2012 Oct 31
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I'm trying to write a MachineFunctionPass to do register allocation. I have code that worked with an old version of LLVM. It does not work with llvm-3.1. (or various other versions that I've tried). The first problem is that including this line: AU.addRequiredID(TwoAddressInstructionPassID); in method getAnalysisUsage causes a runtime error: Unable to schedule 'Eliminate PHI nodes for register allocation' required by 'Unnamed pass: implement Pass::getPassName()' Unable to schedule pass UNREACHABLE executed at ... I'm invoking the pa...
2011 Dec 14
2
[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass
...ops, and so I want to use MemoryDependenceAnalysis in LICM, but when I modify getAnalysisUsge to include this : virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); AU.addRequired<DominatorTree>(); AU.addRequired<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addRequired<MemoryDependenceAnalysis>(); // <--- added AU.addRequired<AliasAnalysis>(); AU.addPreserved<AliasAnalysis>(); AU.addPreserved("scalar-evolution"); AU.addPreservedID(LoopSimplifyID); AU.addRequired&lt...