search for: functionpass

Displaying 20 results from an estimated 793 matches for "functionpass".

2010 Apr 13
2
[LLVMdev] The "scope" of passes
Devang Patel wrote: > On Mon, Apr 12, 2010 at 6:41 PM, ether zhhb <etherzhhb at gmail.com> wrote: > > >> that's because FunctionPass implement the "addLowerLevelRequiredPass" >> function, but others not. >> >> so, is there any special reason that only "addLowerLevelRequiredPass" is >> allow? >> >> > > There is no reason to not allow it. It is not done because the...
2004 Jun 24
3
[LLVMdev] Pass vs. FunctionPass
I wonder in what cases FunctionPass is better that Pass. For example, addPassesToEmitAssembly takes PassManger and addPassesToJITCompile takes FunctionPassManager. Another question is about FunctionPassManager::run(Function&) and FunctionPass(Function&). The former calls the later, which is fine, but the latter looks lik...
2010 Apr 19
2
[LLVMdev] The "scope" of passes
...> <mailto:criswell at uiuc.edu>> wrote: > > Devang Patel wrote: > > On Mon, Apr 12, 2010 at 6:41 PM, ether zhhb > <etherzhhb at gmail.com <mailto:etherzhhb at gmail.com>> wrote: > > > > that's because FunctionPass implement the > "addLowerLevelRequiredPass" > function, but others not. > > so, is there any special reason that only > "addLowerLevelRequiredPass" is > allow? > > > > >...
2010 Apr 23
2
[LLVMdev] The &quot;scope&quot; of passes
> Personally, I would make everything a FunctionPass.   What if a FunctionPass requires the results of a LoopPass? Is there a way to get all loops of a function without using LoopPass and LoopInfo?
2011 Jan 06
2
[LLVMdev] Identify Loops from within FunctionPass, or possible to intermix different types of Passes?
LLVMers, I have a traversal plan which needs to visit certain types of Functions. For each instruction in such functions, I will need to know: 1. is it located inside a loop 2. if yes, what level of loop nest it is currently in. So on the highest level, it should be a FunctionPass. However, in order to identify loops and loop-nest levels, it should also be a LoopPass. Is there a reasonably simple way to identify loop(s) within a function under FunctionPass? (Any existing LLVM code that I can take a look?) OR Is it possible to intermix different types of LLVM Passes? E...
2009 Aug 10
2
[LLVMdev] How to use a FunctionPass in a ModulePass?
Hi, all: I wanted to use a FunctionPass (e.g. *MemoryDependenceAnalysis*) in a ModulePass, and then I used the method "getAnalysis<* MemoryDependenceAnalysis*>(llvm::Function *)" described at http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass to get the FunctionPass. But , it still crashed when I invoked this pass i...
2009 Aug 10
0
[LLVMdev] How to use a FunctionPass in a ModulePass?
On Mon, Aug 10, 2009 at 3:35 AM, gauss<gausszhch at gmail.com> wrote: > Hi, all: > > I wanted to use a FunctionPass (e.g. MemoryDependenceAnalysis) in a > ModulePass, and then I used the method > "getAnalysis<MemoryDependenceAnalysis>(llvm::Function *)"  described at > http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass to get the > FunctionPass. But , it still crashed when I invok...
2006 May 01
3
[LLVMdev] ModulePasses requiring FunctionPasses
...te a ModulePass which requires PostDominator sets for every function in the module. Now finding post dominators is a function pass. The link on the llvm.org website says that : "Currently it is illegal for a ModulePass<http://llvm.org/docs/WritingAnLLVMPass.html#ModulePass>to require a FunctionPass <http://llvm.org/docs/WritingAnLLVMPass.html#FunctionPass>. This is because there is only one instance of the FunctionPass<http://llvm.org/docs/WritingAnLLVMPass.html#FunctionPass>object ever created, thus nowhere to store information for all of the functions in the program at the same...
2010 Apr 17
0
[LLVMdev] The "scope" of passes
...i John, sorry for reply so late. On Tue, Apr 13, 2010 at 10:38 PM, John Criswell <criswell at uiuc.edu> wrote: > Devang Patel wrote: > >> On Mon, Apr 12, 2010 at 6:41 PM, ether zhhb <etherzhhb at gmail.com> wrote: >> >> >> >>> that's because FunctionPass implement the "addLowerLevelRequiredPass" >>> function, but others not. >>> >>> so, is there any special reason that only "addLowerLevelRequiredPass" is >>> allow? >>> >>> >>> >> >> There is no reason to...
2018 Aug 11
3
ScalarEvolution in a ModulePass
...etSE() dereferences this pointer. Meanwhile runOnFunction() resets the pointer to point to a new ScalarEvolution. As a result, runOnFunction destructs and frees any ScalarEvolution the unique_ptr pointed to before. The ModulePass I'm working on uses ScalarEvolution and several other analysis FunctionPasses, including DominatorTree, LoopInfo, OptimizationRemarkEmitter, and a custom analysis pass I'm working on, which resembles LoopInfo. To run ScalarEvolution and these other analysis FunctionPasses in a ModulePass, the ModulePass creates lambdas to get the analysis for a particular function, e....
2009 Mar 19
3
[LLVMdev] Pass Manager Question
Dear All, If I have a ModulePass that requires a FunctionPass, and I include a line like the following: <variable> = &getAnalysis<TheFunctionPass>(*Function); ... will the PassManager blindly re-run the FunctionPass each time the ModulePass requests it, or does it use the Pass dependency information to re-run the FunctionPass only when neces...
2009 Aug 11
1
[LLVMdev] How to use a FunctionPass in a ModulePass?
Hi, Devang. Thank you for your reply. But in my case, my ModulePass requires another FunctionPass (e.g. MemoryDependenceAnalysis) rather than the opposite direction. Is it also limited? - gauss Devang Patel-2 wrote: > > On Mon, Aug 10, 2009 at 3:35 AM, gauss<gausszhch at gmail.com> wrote: >> Hi, all: >> >> I wanted to use a FunctionPass (e.g. MemoryDependence...
2010 Apr 23
0
[LLVMdev] The &quot;scope&quot; of passes
On Thu, Apr 22, 2010 at 11:50 PM, Arjun <arjunsingri at gmail.com> wrote: >> Personally, I would make everything a FunctionPass. > > What if a FunctionPass requires the results of a LoopPass? Is there a way to get > all loops of a function without using LoopPass and LoopInfo? A LoopPass operates on loops. It updates/deletes loops. Its end result is modified loops. A FunctionPass operates on entire function. LoopI...
2011 Jan 06
0
[LLVMdev] Identify Loops from within FunctionPass, or possible to intermix different types of Passes?
...LVMers, > > I have a traversal plan which needs to visit certain types of Functions. For each instruction in such functions, I will need to know: > 1. is it located inside a loop > 2. if yes, what level of loop nest it is currently in. > > So on the highest level, it should be a FunctionPass. However, in order to identify loops and loop-nest levels, it should also be a LoopPass. > > Is there a reasonably simple way to identify loop(s) within a function under FunctionPass? > > (Any existing LLVM code that I can take a look?) Your FunctionPass can use LoopInfo to get this...
2010 Apr 24
2
[LLVMdev] The &quot;scope&quot; of passes
...the same loop twice. Doing that with LoopInfo requires the use of a flag. On Fri, Apr 23, 2010 at 12:41 PM, Devang Patel <devang.patel at gmail.com>wrote: > On Thu, Apr 22, 2010 at 11:50 PM, Arjun <arjunsingri at gmail.com> wrote: > >> Personally, I would make everything a FunctionPass. > > > > What if a FunctionPass requires the results of a LoopPass? Is there a way > to get > > all loops of a function without using LoopPass and LoopInfo? > > A LoopPass operates on loops. It updates/deletes loops. Its end result > is modified loops. > A FunctionP...
2004 Jun 24
0
[LLVMdev] Pass vs. FunctionPass
On Thu, 24 Jun 2004, Vladimir Prus wrote: > I wonder in what cases FunctionPass is better that Pass. For example, > addPassesToEmitAssembly takes PassManger and addPassesToJITCompile takes > FunctionPassManager. Here's a simple way to look at it. Use a Function pass whenever you can. A function pass will always work where a Pass works (it derives from pass as you...
2009 Sep 16
1
[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
...with me, its not about the profiling but about the Pass interaction.) Then the LowerSetJumpPass is executed and I want to verify that the esimtated ProfileInfo survives this pass by calling again the ProfileVerifierPass. This is what it looks like: No Profile Information ModulePass Manager FunctionPass Manager Dominator Tree Construction Natural Loop Information Profiling information estimator Profiling information verifier Lower Set Jump FunctionPass Manager Profiling information verifier Preliminary module verification Dominator Tree Co...
2018 May 07
2
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
...globals-aa -die -inline -debug-pass=Details foo.ll -S then I will get this pass structure: Target Library Information Target Transform Information Target Pass Configuration Assumption Cache Tracker Profile summary info ModulePass Manager CallGraph Construction Globals Alias Analysis FunctionPass Manager BasicBlockPass Manager Dead Instruction Elimination Call Graph SCC Pass Manager Function Integration/Inlining FunctionPass Manager Module Verifier Print Module IR FPPassManager:: getAnalysisUsage is doing setPreservesAll(), but is it correct that...
2013 Mar 30
2
[LLVMdev] Missed optimisation opportunities?
...n long fib (long al_x) long ll_i=0, ll_ret=0, ll_last=0, ll_last2=1 if isnull(al_x) then return al_x end if ll_i=1 do while ll_i<=al_x ll_ret=ll_last+ll_last2 ll_last2=ll_last ll_last=ll_ret ll_i++ loop return ll_ret end function With the following function passes; FunctionPasses->add(new DataLayout(*JITEngine->getDataLayout())); FunctionPasses->add(createBasicAliasAnalysisPass()); FunctionPasses->add(createPromoteMemoryToRegisterPass()); FunctionPasses->add(createInstructionCombiningPass()); FunctionPasses->add(createReas...
2006 Oct 08
1
[LLVMdev] modulepass requiring a functionpass
I have a ModulePass, which we'll call MP, that generates a dependency graph for an entire program. I want MP to require the UnifyFunctionExitNodes pass, which is a FunctionPass. Since its not possible to make a ModulePass depend on a FunctionPass, is my only choice to make MP a FunctionPass in which the runOnFunction() routine does nothing, and the doFinalization routine does all the work that the runOnModule() pass did when MP was a ModulePass? Regards, Ryan