search for: getanalysisusage

Displaying 20 results from an estimated 519 matches for "getanalysisusage".

2011 Nov 08
4
[LLVMdev] loadable passes with dependencies?
Just shows me what I expect void getAnalysisUsage(AnalysisUsage &AU) const { DominatorTree *dt = &getAnalysis<DominatorTree>(); So I'm only using it for DominatorTree(so I can use PromoteMemToReg). Thanks On Tue, Nov 8, 2011 at 2:28 PM, Tobias Grosser <tobias at grosser.es> wrote: > On 11/08/2011 07:33 PM, ret val w...
2010 May 10
2
[LLVMdev] [Fwd: Error while running my pass with opt]
ambika wrote: > Here is getAnalysisUsage() i am using, > > void getAnalysisUsage(AnalysisUsage &AU) const { > AU.setPreservesAll(); > AU.addRequired<DominatorTree>(); > } > > and then I use it as, > > > bool ptrTest::runOnModule(Module &M) { > > DominatorTree &DT =...
2016 Jan 22
4
LLVM - getAnalysisUsage()
Hi, I am using llvm-3.8 for my project. Following is my getAnalysisUsage() method: virtual void getAnalysisUsage(AnalysisUsage &AU) const override { AU.setPreservesAll(); AU.addRequired<X>(); AU.addRequired<Y>(); AU.addRequired<Z>(); } Now, if I call getAnalysis<X>(*F), instead of invoking just the X pass, all the passes, i.e.,...
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
I still have the addRequired: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); } The other line DominatorTree *dt = &getAnalysis<DominatorTree>(); Is for later use when I try to use PromoteMemToReg On Tue, Nov 8, 2011 at 4:22 PM, Michael Ilseman <michael at lunarg.co...
2005 Sep 05
2
[LLVMdev] Pass is not automatically registered
...yzer> X("depana", "Dependence Analysis"); I traced into struct RegisterAnalysis ctor, but my pass doesn't appear. I put it in an anonymous namespace, it doesn't work too. The class definitions: class DependenceAnalyzer : public MachineFunctionPass { virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<LiveIntervals>(); AU.addRequired<LiveVariables>(); MachineFunctionPass::getAnalysisUsage(AU); } class RegAllocMultibank : public MachineFunctionPass { virtual void getAnalysisUsage(AnalysisUsa...
2019 Aug 14
2
Doubt regarding getAnalysisUsage
Hi, I have a doubt regarding *getAnalysisUsage.* My assumption is that, as analysis passes will not change the IR, all the passes required by an analysis pass should be preserved. Say, I have an analysis pass which requires another analysis pass called *SomeAnalysis* and I have not added *AU.addPreserved<SomeAnalysis>() *to my pass. Woul...
2010 May 09
2
[LLVMdev] [Fwd: Error while running my pass with opt]
ambika wrote: > But this is already present in my pass. > And I am not able to understand the cause for the error: > Can you send a copy of your getAnalysisUsage() method for your pass? There are some funny errors that can occur when you do things that the PassManager cannot handle. For example, if you're requiring a transform pass, that can cause strange assertions from the PassManager. Requiring a BasicBlock pass from a FunctionPass might also...
2002 Dec 01
1
[LLVMdev] PassManager error message hard to decipher
...cular PassManager error for what seem to be legal dependencies. Here is the situation. We have 5 passes, RegisterAllocator, FunctionLiveVarInfo, CoalesceCopies, DominanceForest, and UnionSSAVars, with dependencies as follows: class RegisterAllocator : public FunctionPass { . . . virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<FunctionLiveVarInfo>(); AU.addRequired<CoalesceCopies>(); } . . . }; class FunctionLiveVarInfo : public FunctionPass { . . . virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } . . . }; class...
2010 May 09
0
[LLVMdev] [Fwd: Error while running my pass with opt]
Here is getAnalysisUsage() i am using, void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequired<DominatorTree>(); } and then I use it as, bool ptrTest::runOnModule(Module &M) { DominatorTree &DT = getAnalysis<DominatorTree>(); ...... } John...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
Something's different here, earlier in the thread you said you had: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); } Now you have: void getAnalysisUsage(AnalysisUsage &AU) const { DominatorTree *dt = &getAnalysis<DominatorTree>(); I'm sort of confused, why did this change happen? I think the &...
2010 May 11
0
[LLVMdev] [Fwd: Error while running my pass with opt]
John Criswell wrote: > ambika wrote: >> Here is getAnalysisUsage() i am using, >> >> void getAnalysisUsage(AnalysisUsage&AU) const { >> AU.setPreservesAll(); >> AU.addRequired<DominatorTree>(); >> } >> >> and then I use it as, >> >> >> bool ptrTest::runOnModule(Module&am...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
On 11/8/11 4:34 PM, ret val wrote: > I still have the addRequired: > virtual void getAnalysisUsage(AnalysisUsage&AU) const { > AU.addRequired<DominatorTree>(); > } > > The other line > DominatorTree *dt =&getAnalysis<DominatorTree>(); > Is for later use when I try to use PromoteMemToReg Isn't DominatorTree a FunctionPass? I...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
On 11/08/2011 08:50 PM, ret val wrote: > Just shows me what I expect > void getAnalysisUsage(AnalysisUsage&AU) const { > DominatorTree *dt =&getAnalysis<DominatorTree>(); > > So I'm only using it for DominatorTree(so I can use PromoteMemToReg). Interesting. Is the same assert triggered when you use RegisterPass to register the pass? Is getAnalysisUsage() call...
2011 Nov 09
1
[LLVMdev] loadable passes with dependencies?
...find requested analysis info"), function getAnalysisID Is there something else I forgot? On Tue, Nov 8, 2011 at 5:47 PM, John Criswell <criswell at illinois.edu> wrote: > On 11/8/11 4:34 PM, ret val wrote: >> >> I still have the addRequired: >>         virtual void getAnalysisUsage(AnalysisUsage&AU) const { >>                        AU.addRequired<DominatorTree>(); >>         } >> >> The other line >>         DominatorTree *dt =&getAnalysis<DominatorTree>(); >> Is for later use when I try to use PromoteMemToReg > >...
2011 Feb 28
1
[LLVMdev] LoopInfo of a basic block
On Mon, Feb 28, 2011 at 6:04 PM, Naznin Fauzia <laboni14 at gmail.com> wrote: > Thanks Devang and John. My pass is actually a loop pass, not a function > pass. So, I couldnt override the getAnalysisUsage. > A LoopPass is no different from a FunctionPass here. You can use getAnalysisUsage and getAnalysis in a LoopPass. > I am in a loop pass, I know the outermost loop. Now How can I get the > loopInfo from here? I couldn't find helpful methods in the LoopInfo class > documents. &g...
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!...
2016 Jan 22
3
LLVM - getAnalysisUsage()
...On Fri, Jan 22, 2016 at 12:24 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> On Jan 21, 2016, at 9:05 PM, Syed Rafiul Hussain via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> I am using llvm-3.8 for my project. Following is my getAnalysisUsage() method: >> >> virtual void getAnalysisUsage(AnalysisUsage &AU) const override >> { >> AU.setPreservesAll(); >> AU.addRequired<X>(); >> AU.addRequired<Y>(); >> AU.addRequired<Z>(); >> } >> >> Now, if I call g...
2011 Feb 28
2
[LLVMdev] LoopInfo of a basic block
...method of the class LoopInfo. >> But I dont know how to get the LoopInfo. >> >> BasicBlock* bb = inst.getParent(); >> >> (... what should I add here?) >> >> Loop* innerloop = LI -> getLoopFor(bb): >> > > Two steps: > 1) In your pass's getAnalysisUsage(), request LoopInfo. > > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired<LoopInfo>(); > } > > 2) In your runOnLoop() method get the analysis. > > LoopPass *LI = &getAnalysis<LoopInfo>(); > > Now, you can do LI->getLoop...
2009 Nov 17
0
[LLVMdev] Getting optimization level in getAnalysisUsage()
Hi, Is it possible to access the optimization level in getAnalysisUsage() on a machine function pass? Once the pass is running, it is available through getAnalysis<MachineFunctionAnalysis>().getOptLevel(). That doesn't work during getAnalysisUsage(), though. /jakob
2012 Mar 02
2
[LLVMdev] Interactions between module and loop passes
...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.setPreservesAll(); } }; class ModPass2 : public ModulePass{ virtual void getAnalysis...