search for: addrequiredtransit

Displaying 20 results from an estimated 23 matches for "addrequiredtransit".

2010 Apr 01
2
[LLVMdev] AnalysisUsage: addRequired vs. addRequiredTransitive
..." MDA > specifically does NOT compute results in its runOnFunction(), > instead computing results on-demand when a user queries it. > Because MDA depends on AA, we must ensure that, as long as MDA is > alive and responding to queries, AA is alive as well. That is what > addRequiredTransitive does. I'm not sure if I follow this. So let's say I'm writing a pass Foo, and Foo depends on MDA. You're saying that Foo's getAnalysisUsage must call addRequiredTransitive< MemoryDependenceAnalysis>, not addRequired<MemoryDependenceAnalysis>, because otherw...
2010 Apr 01
0
[LLVMdev] AnalysisUsage: addRequired vs. addRequiredTransitive
...gt; specifically does NOT compute results in its runOnFunction(), > > instead computing results on-demand when a user queries it. Because > > MDA depends on AA, we must ensure that, as long as MDA is alive and > > responding to queries, AA is alive as well. That is what > > addRequiredTransitive does. > > I'm not sure if I follow this. So let's say I'm writing a pass Foo, > and Foo depends on MDA. You're saying that Foo's getAnalysisUsage must > call addRequiredTransitive< MemoryDependenceAnalysis>, not > addRequired<MemoryDependenceAnalysis&...
2010 Mar 31
2
[LLVMdev] AnalysisUsage: addRequired vs. addRequiredTransitive
Hi, I'm a bit confused about the distinction between addRequired and addRequiredTransitive in AnalysisUsage. From PassAnalysisSupport.h: "REQUIRES (must be available when the pass runs), REQUIRES TRANSITIVE (must be available throughout the lifetime of the pass)." The part that's confusing me is "must be available when the pass runs". I don't see how...
2006 Oct 21
1
[LLVMdev] addRequired vs addRequiredTransitive
I am having a hard time figuring out the difference between addRequired and addRequiredTransitive. Could someone please clarify the difference? Let's say I have a function pass P1 that relies on a function pass P2. P1 computes some sort of analysis on a function F and P2 uses that analysis when it processes F. Does that mean that I should use addRequiredTransitive? Thanks, Ryan
2010 Mar 31
0
[LLVMdev] AnalysisUsage: addRequired vs. addRequiredTransitive
On Mar 31, 2010, at 2:53 PM, Trevor Harmon wrote: > I'm a bit confused about the distinction between addRequired and > addRequiredTransitive in AnalysisUsage. From PassAnalysisSupport.h: > > "REQUIRES (must be available when the pass runs), REQUIRES TRANSITIVE > (must be available throughout the lifetime of the pass)." > > The part that's confusing me is "must be available when the pass > ru...
2014 Apr 18
3
[LLVMdev] PassManager Woes
...A B ^ ^ / | | | C D | ^ ^ | |\ | | | \ | \ | \ | F E The arrows represent direct use of analysis pass data. So even though C is built upon information from A, F directly accesses information from both C and A. I have tried all kinds of combinations of addRequired and addRequiredTransitive but no matter what, pass C gets rerun before pass F as expected but pass A does not. This leads to a situation where pass F uses up to date information from pass C and out of date information from pass A, leading to an analysis inconsistency and a compiler abort. Note that even though pass C ru...
2012 Mar 21
0
[LLVMdev] llvm seg fault when specifying addRequiredTransitive in module pass
Hi all, I am using llvm to perform some static analysis with a module pass. In getAnalysisUsage(), I specified some required passes by: addRequiredTransitive<LoopInfo>(); When I run my pass using opt, it crashes with segmentation fault with callstack: #0 0x0877aebd in llvm::PMTopLevelManager::findAnalysisUsage (this=0x8c10934, P=0xb15b988) at PassManager.cpp:573 #1 0x0877aa9b in llvm::PMTopLevelManager::setLastUser (this=0x8c10934, Analysis...
2018 Jan 28
4
Polly Dependency Analysis in MyPass
...ysis<polly::ScopInfoWrapperPass>().getSI(); for (auto &It : SI) { assert(It.second && "Invalid SCoP object!"); dp.recomputeDependences(It.second.get(), polly::Dependences::AL_Access); } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredTransitive<polly::ScopInfoWrapperPass>(); AU.setPreservesAll(); } }; } char mypass::ID = 0; static RegisterPass<mypass> X("mypass", "mypass World Pass", false, false); please help. i have been trying a lot. -------------- next part -------------- An HTML attachment...
2018 Jan 29
0
Polly Dependency Analysis in MyPass
...tSI(); > > for (auto &It : SI) { > assert(It.second && "Invalid SCoP object!"); > dp.recomputeDependences(It.second.get(), polly::Dependences::AL_Access); > } > virtual void getAnalysisUsage(AnalysisUsage &AU) const > { > > AU.addRequiredTransitive<polly::ScopInfoWrapperPass>(); > AU.setPreservesAll(); > } > }; > } > char mypass::ID = 0; > static RegisterPass<mypass> X("mypass", "mypass World Pass", false, false); > > please help. i have been trying a lot. > > _________...
2018 Jan 29
1
Polly Dependency Analysis in MyPass
...ss>().getSI(); for (auto &It : SI) { assert(It.second && "Invalid SCoP object!"); dp.recomputeDependences(It.second.get(), polly::Dependences::AL_Access); } return false; } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredTransitive<polly::ScopInfoWrapperPass>(); AU.addRequired<LoopInfoWrapperPass>(); AU.addRequired<RegionInfoPass>(); AU.addRequired<DominatorTreeWrapperPass>(); AU.addRequiredTransitive<ScalarEvolutionWrapperPass>(); AU.addRequiredTransitive<polly::ScopDetectionWrap...
2008 Aug 27
1
[LLVMdev] Loop Info Stability
I have an analysis pass which uses Scalar Evolution information. My pass implements getAnalysisUsage as: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequiredTransitive<LoopInfo>(); AU.addRequiredTransitive<ScalarEvolution>(); AU.addRequiredTransitive<TargetData>(); } However, I am seeing cases where I'm getting bogus Loop data. That is, the Loop object seems to be corrupted (empty block lists, etc.). At first my pass wa...
2012 Mar 07
3
[LLVMdev] Alias analysis result
Hello everyone, I am trying to find the alias between a store instruction's pointer operand and function arguments. This is the code, virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredTransitive<AliasAnalysis>(); AU.addPreserved<AliasAnalysis>(); } virtual bool runOnFunction(Function &F) { AliasAnalysis &AA = getAnalysis<AliasAnalysis>(); for(Function::iterator i=F.begin();i!=F.end();++i){ for(BasicBlock::iterator j=i-...
2012 Apr 13
2
[LLVMdev] Incorrect result in LLVM Alias Analysis
...20; } int main(){ int *a=(int *)malloc(sizeof(int)); *a=15; map(a); return 0; } I want to check if the pointer operand of each store instruction aliases with the function's arguments. I have used below code for this, virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequiredTransitive<AliasAnalysis>(); AU.addPreserved<AliasAnalysis>(); } virtual bool runOnFunction(Function &F) { AliasAnalysis &AA = getAnalysis<AliasAnalysis>(); for(Function::iterator i=F.begin();i!=F.end();++i){ for(BasicBlock::iterator j=i->begin();j!=i-&g...
2018 Jan 28
0
Polly Dependency Analysis in MyPass
...tSI(); > > for (auto &It : SI) { > assert(It.second && "Invalid SCoP object!"); > dp.recomputeDependences(It.second.get(), > polly::Dependences::AL_Access); } > virtual void getAnalysisUsage(AnalysisUsage &AU) const > { > > AU.addRequiredTransitive<polly::ScopInfoWrapperPass>(); > AU.setPreservesAll(); > } > }; > } > char mypass::ID = 0; > static RegisterPass<mypass> X("mypass", "mypass World Pass", false, false); > > please help. i have been trying a lot. > --------------...
2018 Jan 28
1
Polly Dependency Analysis in MyPass
...&It : SI) { >> assert(It.second && "Invalid SCoP object!"); >> dp.recomputeDependences(It.second.get(), >> polly::Dependences::AL_Access); } >> virtual void getAnalysisUsage(AnalysisUsage &AU) const >> { >> >> AU.addRequiredTransitive<polly::ScopInfoWrapperPass>(); >> AU.setPreservesAll(); >> } >> }; >> } >> char mypass::ID = 0; >> static RegisterPass<mypass> X("mypass", "mypass World Pass", false, >> false); >> >> please help. i ha...
2009 May 14
0
[LLVMdev] Chaining analyses from an analysis group
Hello, Two questions regarding analysis groups that ``chain'' their results, like AliasAnalysis. (1) I have an analysis group, let's call it Provider. I also have two implementations of it: ProviderA and ProviderB. The "writing a pass" document suggests using: au.addRequiredTransitive< Provider >(); Within the getAnalysisUsage() method of both ProviderA and ProviderB. But... I'm doing something wrong, and I get an infinite recursion. (2) ALSO, I'm confused. Should I get the previous results using: Provider &previous = getAnalysis< Provider >();...
2009 Aug 12
0
[LLVMdev] Trasitively requiring RegisterCoalescer in RegAllocLinearScan
Hi all, A question for other regalloc hackers - is there any good reason why we're requiring RegisterCoalescer tranisitively in RegAllocLinearScan (via addRequiredTransitive) ? If there's no reason I'll switch it to a plain requirement (addRequired). It's not a big deal, but is a little cleaner. Cheers, Lang.
2010 Nov 22
0
[LLVMdev] pass visibility question
...e::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<UnifyFunctionExitNodes>(); AU.addRequired<MemoryDependenceAnalysis>(); AU.setPreservesAll(); } }; void MemoryDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); AU.addRequiredTransitive<AliasAnalysis>(); } The passmanager structure looks as follows: Target Data Layout Basic Alias Analysis (default AA impl) Type-Based Alias Analysis ModulePass Manager Basic CallGraph Construction Global Value Liveness Analysis Unnamed pass: implement Pass::getPassName()...
2012 Mar 08
0
[LLVMdev] Alias analysis result
...t that the right way to do it? borya043 wrote: > > Hello everyone, > I am trying to find the alias between a store instruction's pointer > operand > and function arguments. This is the code, > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > > AU.addRequiredTransitive<AliasAnalysis>(); > AU.addPreserved<AliasAnalysis>(); > } > virtual bool runOnFunction(Function &F) { > > > AliasAnalysis &AA = getAnalysis<AliasAnalysis>(); > > for(Function::iterator i=F.begin();i!=F.end();++i){ &...
2012 Apr 12
0
[LLVMdev] Incorrect result in LLVM Alias Analysis
Hi Adarsh, > I have used the follwing command, > opt -load LLVComMan.so -ComMan -memdep -tbaa -mem2reg maptest.ll -S > What option other than -mem2reg should be included in this case to get the > right results? Does the order in which I specify the optimizations to be run > make a difference? what is in maptest.ll? Ciao, Duncan.