search for: registeranalysisgroup

Displaying 20 results from an estimated 32 matches for "registeranalysisgroup".

2007 Sep 14
2
[LLVMdev] RegisterAnalysisGroup
Can someone explain how RegisterPass and RegisterAnalysisGroup conspire to pick the right member of an analysis group when command-line options dictate non-default implementations? For example, when I pass -anders-aa to opt, where in the code is that option parsed and setNormalCtor called on the analysis group to change from the default basicaa?...
2007 Sep 14
0
[LLVMdev] RegisterAnalysisGroup
On Sep 14, 2007, at 1:43 PM, David Greene wrote: > Can someone explain how RegisterPass and RegisterAnalysisGroup > conspire to pick the right member of an analysis group when command- > line > options dictate non-default implementations? > > For example, when I pass -anders-aa to opt, where in the code is > that option > parsed and setNormalCtor called on the analysis group to change...
2007 Sep 14
2
[LLVMdev] RegisterAnalysisGroup
...er wrote: > When basicaa registers itself as part of the analysis group, it uses: > > RegisterPass<BasicAliasAnalysis> > X("basicaa", "Basic Alias Analysis (default AA impl)"); > > // Declare that we implement the AliasAnalysis interface > RegisterAnalysisGroup<AliasAnalysis, true> Y(X); > > The "true" says that it is the default, Right, I get that. My question is how a pass that requires AliasAnalysis gets Andersens when -anders-aa is passed on the command-line. Someone has to call setNormalCtor on the PassInfo for the AliasAnalys...
2007 Sep 14
0
[LLVMdev] RegisterAnalysisGroup
...egisters itself as part of the analysis group, it uses: > > > > RegisterPass<BasicAliasAnalysis> > > X("basicaa", "Basic Alias Analysis (default AA impl)"); > > > > // Declare that we implement the AliasAnalysis interface > > RegisterAnalysisGroup<AliasAnalysis, true> Y(X); > > > > The "true" says that it is the default, > > Right, I get that. My question is how a pass that requires AliasAnalysis > gets Andersens when -anders-aa is passed on the command-line. > Someone has to call setNormalCtor on the...
2007 Sep 15
1
[LLVMdev] RegisterAnalysisGroup
...alysis group, it >>> uses: >>> >>> RegisterPass<BasicAliasAnalysis> >>> X("basicaa", "Basic Alias Analysis (default AA impl)"); >>> >>> // Declare that we implement the AliasAnalysis interface >>> RegisterAnalysisGroup<AliasAnalysis, true> Y(X); >>> >>> The "true" says that it is the default, >> >> Right, I get that. My question is how a pass that requires >> AliasAnalysis >> gets Andersens when -anders-aa is passed on the command-line. >> Someone...
2008 Oct 08
2
[LLVMdev] Error while making new pass
...>> (addRequired(CallGraph)) in getAnalysisUsage function of this new >> pass. > > A module pass may not required CallGraph. Probably, you want to make > your pass a CallGraphSCCPass, e.g. Inliner. > >> I also added it to CallGraph Analysis group through >> "RegisterAnalysisGroup" >> >> This new pass is not part of any LLVM library and is not present in >> LLVM source tree . Rather it is part of my own project tree. I >> included required header files and specified the required library in >> the linker. It compiles and links fine but when...
2008 Oct 08
0
[LLVMdev] Error while making new pass
...lModRefPass is also a ModulePass and it uses CallGraph Analysis. > So, I think it should not necessary to extend CallGraphSCCPass to use > CallGraph information. Module Pass shoule be sufficient... ok, but you're Registering your pass in CallGraph Analysis group. What if you remove "RegisterAnalysisGroup" ? Is there a need ? - Devang > > > > --Kapil > > On 10/8/08, Devang Patel <dpatel at apple.com> wrote: >> Hi Kapil, >> >> On Oct 8, 2008, at 10:19 AM, kapil anand wrote: >> >>> Hi all, >>> >>> I need a new kind of anal...
2010 Feb 22
2
[LLVMdev] Regarding a pass in LLVM
...ying to add a pass inn LLVM, and I actually want to add it in source code, not just directly into object code. For that I included the lines in my file MyAna.cpp (llvm-2.6/lib/ana/MyAna.cpp) char MyAna::ID = 0; static RegisterPass<MyAna> X("my-aa","My Analysis"); static RegisterAnalysisGroup<AliasAnalysis> Y(X); ModulePass *llvm::createMyAnaPass() { return new MyAna(); } I also included createMyAnaPass() in Passes.h and LinkAllPasses.h But when I do make I get the following error : /home/ambika/llvm/llvm-obj/tools/opt/Release/opt.o: In function `global constructors keyed to o...
2008 Oct 08
2
[LLVMdev] Error while making new pass
...ds the ModulePass class and follows the conventions used in GlobalModRefPass, which is also a Module Pass.I need the CallGraph analysis for this pass, hence I have added (addRequired(CallGraph)) in getAnalysisUsage function of this new pass. I also added it to CallGraph Analysis group through "RegisterAnalysisGroup" This new pass is not part of any LLVM library and is not present in LLVM source tree . Rather it is part of my own project tree. I included required header files and specified the required library in the linker. It compiles and links fine but when I reach at getAnalysis function to get Call...
2007 Aug 10
2
[LLVMdev] Choosing Alias Analysis
...Patel wrote: > > Or is it sufficient than an Andersen's object is constructed and > > that that > > constitutes "availability?" > > What do you mean by "available" ? You are using quotes :) "Available" as referenced by PassSupport.h: /// RegisterAnalysisGroup - Register a Pass as a member of an analysis /// _group_. Analysis groups are used to define an interface (which need not /// derive from Pass) that is required by passes to do their job. Analysis /// Groups differ from normal analyses because any available implementation of /// the group wil...
2007 Aug 10
0
[LLVMdev] Choosing Alias Analysis
On Aug 10, 2007, at 10:15 AM, David Greene wrote: > However, what happens when alias analysis information gets > invalidated? > Is Andersen's still "available" in the sense analysis groups use it? > > If not, it seems it would be tough to make sure Andersen's is always > used everywhere that AliasAnalysis is asked for because there are > passes > llvm
2007 Aug 10
3
[LLVMdev] Choosing Alias Analysis
On Thursday 09 August 2007 19:21, Chris Lattner wrote: > Interesting question, I don't have an answer to this. To make things more > complicated, you can have multiple instances of an analysis group and may > want different things at different times: > > -basicaa -licm -something_that_invalidates_aa -andersaa -licm -whatever Some questions about that: How does this
2010 Feb 23
2
[LLVMdev] Regarding a pass in LLVM
...code, not just directly into object code. >> >> For that I included the lines in my file MyAna.cpp >> (llvm-2.6/lib/ana/MyAna.cpp) >> >> >> char MyAna::ID = 0; >> static RegisterPass<MyAna> X("my-aa","My Analysis"); >> static RegisterAnalysisGroup<AliasAnalysis> Y(X); >> >> ModulePass *llvm::createMyAnaPass() { return new MyAna(); } >> >> >> I also included createMyAnaPass() in Passes.h and LinkAllPasses.h >> But when I do make I get the following error : >> >> /home/ambika/llvm/llvm-obj/...
2014 Jun 12
3
[LLVMdev] Creating and implementing an analysis group out of tree
...outside of the source tree. My understanding is that building out of tree requires different methods to register the passes. For example, the class RegisterPass, which the tutorial instructs you to use (and is used by sample repository you linked), never shows up in the source tree. Likewise for RegisterAnalysisGroup. Furthermore I've found that just copying the way it's done in the source tree and not using RegisterPass causes opt to not recognize your command-line arguments. Do you know of any other projects that will demonstrate how to build passes out of tree, only creating an analysis group as we...
2009 May 10
2
[LLVMdev] Get the call graph SCCs from a function pass
On 5/10/09, Török Edwin <edwintorok at gmail.com> wrote: > On 2009-05-10 20:11, Nick Johnson wrote: > > Hello, > > > > I'm writing a Function Pass. This function pass needs access to the > > CallGraph and CallGraph SCCs. Is there any way I can get CallGraph > > information without changing my pass to a CallGraphSCCPass ? > > > Does
2009 May 10
0
[LLVMdev] Get the call graph SCCs from a function pass
...there any way I can get CallGraph >> > information without changing my pass to a CallGraphSCCPass ? >> >> >> Does getAnalysis<CallGraph>() work? >> >> > AFAIK, it's not a pass. > > It is, see lib/Analysis/IPA/CallGraph.cpp: static RegisterAnalysisGroup<CallGraph> X("Call Graph"); static RegisterPass<BasicCallGraph> Y("basiccg", "Basic CallGraph Construction", false, true); static RegisterAnalysisGroup<CallGraph, true> Z(Y); I know that using getAnalysis<CallGraph> works in a ModulePass, but n...
2010 Feb 22
0
[LLVMdev] Regarding a pass in LLVM
...y want to add it in > source code, not just directly into object code. > > For that I included the lines in my file MyAna.cpp > (llvm-2.6/lib/ana/MyAna.cpp) > > > char MyAna::ID = 0; > static RegisterPass<MyAna> X("my-aa","My Analysis"); > static RegisterAnalysisGroup<AliasAnalysis> Y(X); > > ModulePass *llvm::createMyAnaPass() { return new MyAna(); } > > > I also included createMyAnaPass() in Passes.h and LinkAllPasses.h > But when I do make I get the following error : > > /home/ambika/llvm/llvm-obj/tools/opt/Release/opt.o: In func...
2008 Oct 08
0
[LLVMdev] Error while making new pass
...s pass, hence I have added > (addRequired(CallGraph)) in getAnalysisUsage function of this new > pass. A module pass may not required CallGraph. Probably, you want to make your pass a CallGraphSCCPass, e.g. Inliner. > I also added it to CallGraph Analysis group through > "RegisterAnalysisGroup" > > This new pass is not part of any LLVM library and is not present in > LLVM source tree . Rather it is part of my own project tree. I > included required header files and specified the required library in > the linker. It compiles and links fine but when I reach at...
2008 Oct 08
1
[LLVMdev] Error while making new pass
...dulePass and it uses CallGraph Analysis. > > So, I think it should not necessary to extend CallGraphSCCPass to use > > CallGraph information. Module Pass shoule be sufficient... > > ok, but you're Registering your pass in CallGraph Analysis group. > What if you remove "RegisterAnalysisGroup" ? Is there a need ? > - > Devang > > > > > > > > --Kapil > > > > On 10/8/08, Devang Patel <dpatel at apple.com> wrote: > >> Hi Kapil, > >> > >> On Oct 8, 2008, at 10:19 AM, kapil anand wrote: > >> > >&gt...
2008 Dec 10
2
[LLVMdev] AliasAnalysis tutorial 2
...DeadStoreEliminationPass which performs an AA). In particular, the pass is run (runOnFunction) but the derived method from AliasAnalysis (like 'alias' or 'getModRefInfo') are not chained with those from basicAA when needed. Now, i'm trying to understand how opt, RegisterPass, RegisterAnalysisGroup etc, are working, but it is quite difficult (very high level C++!) Thank you. Julien John Criswell a écrit : > I'm assuming that by "creating your own PassManager" you mean that > you're writing your own C++ tool that creates a PassManager object and > then explicitl...