search for: functionpasses

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

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? >> >> > >
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 like this: bool FunctionPass::run(Function &F) { if
2010 Apr 19
2
[LLVMdev] The "scope" of passes
ether zhhb wrote: > hi John, > > sorry for reply so late. > > On Tue, Apr 13, 2010 at 10:38 PM, John Criswell <criswell at uiuc.edu > <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: > >
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
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 in tool 'opt'. However, if I change my pass to
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 ,
2006 May 01
3
[LLVMdev] ModulePasses requiring FunctionPasses
I am trying to write 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>.
2010 Apr 17
0
[LLVMdev] The "scope" of passes
hi 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
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.g....
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 necessary. -- John T.
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.
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
2011 Jan 06
0
[LLVMdev] Identify Loops from within FunctionPass, or possible to intermix different types of Passes?
On Jan 6, 2011, at 9:21 AM, Chuck Zhao wrote: > 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
2010 Apr 24
2
[LLVMdev] The &quot;scope&quot; of passes
But is there a better way of getting the loops in a function than using LoopInfo? For some tasks it is necessary that we don't process 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: > >>
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've noticed),
2009 Sep 16
1
[LLVMdev] FunctionPass Analysis is not saved after ModulePasses run?
Hi, I have a problem with the following scenario: I use the ProfileEstimatorPass to get ProfileInfo and verifiy this info with the ProfileVerifierPass. (Please bear 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
2018 May 07
2
Preservation of CallGraph (by BasicBlockPass, FunctionPass)
If I run: opt -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
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(createReasso...
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