search for: runonfunctions

Displaying 20 results from an estimated 819 matches for "runonfunctions".

Did you mean: runonfunction
2011 Jun 29
2
[LLVMdev] How to disable pass grouping(scheduling)
Hi all, Llvm can automatically group a list passes. I want to do some experiment to see the difference between grouping and non-grouping execution. Considering the following example, if I want to apply transformation A, B and C. The execution order is: A.doInitialization(); B.doInitialization(); C.doInitialization(); A.runOnFunction(); B.runOnFunction(); C.runOnFunction();
2011 Jun 29
2
[LLVMdev] How to disable pass grouping(scheduling)
Thanks John, this is an easy way to achieve this goal, but I'm wondering if this is the only way? I have around 100 passes. Quoting John Criswell <criswell at illinois.edu>: > On 6/28/11 11:35 PM, kecheng at cecs.pdx.edu wrote: >> Hi all, >> >> Llvm can automatically group a list passes. I want to do some >> experiment to see the difference between grouping
2010 Apr 01
2
[LLVMdev] AnalysisUsage: addRequired vs. addRequiredTransitive
On Mar 31, 2010, at 3:13 PM, Owen Anderson wrote: > Some analyses, like Andersen's AA, do all their computation in their > runOnFunction(). Therefore, anything they depended on can be > destroyed after the runOnFunction() returns. What about AA itself? Would addRequired<AliasAnalysis> keep AliasAnalysis alive (but allow AliasAnalysis's dependencies to die)? >
2011 Jun 29
0
[LLVMdev] How to disable pass grouping(scheduling)
On 6/28/11 11:35 PM, kecheng at cecs.pdx.edu wrote: > Hi all, > > Llvm can automatically group a list passes. I want to do some > experiment to see the difference between grouping and non-grouping > execution. > Considering the following example, if I want to apply transformation > A, B and C. The execution order is: > A.doInitialization(); >
2010 Apr 01
0
[LLVMdev] AnalysisUsage: addRequired vs. addRequiredTransitive
On Fri Apr 02 00:37:03 +0200 2010, Trevor Harmon wrote: > On Mar 31, 2010, at 3:13 PM, Owen Anderson wrote: > > Others, like MemoryDependenceAnalysis, are "lazy." 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
2010 Apr 20
1
[LLVMdev] iterate over loops inside the runOnFunction
Hello I'm wandring to write a Function parser that iterates over loops inside each function and inside each loop iterates over instructions So I found a way to do the Function parser that iterates over BasicBlocks (using the runOnfunction Pass) but I no know how make it iterates over loops ? So my question is there any way to make a loop inside the runOnfunction to iterate over
2019 Dec 26
2
Calling LowerSwitchPass causing crash in llvm 9
Hi, I am trying to call LowerSwitchPass directly in my custom pass in this way: FunctionPass *lower = createLowerSwitchPass(); lower->runOnFunction(*f); But it will crash when running lower->runOnFunction(*f) in llvm-9. I was using this method in llvm-8 and it worked fine. It seems the crash happens at the first line of the LowerSwitch::runOnFunction(Function &F) in the newer
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
2011 Oct 14
2
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
#include "llvm/Module.h" #include "llvm/Analysis/MemoryDependenceAnalysis.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; struct Hello: public ModulePass { public: static char ID; MemoryDependenceAnalysis *MD; Hello(): ModulePass(ID) { ;; } virtual void getAnalysisUsage(AnalysisUsage &AU) const {
2018 Aug 11
3
ScalarEvolution in a ModulePass
Hey LLVMDev, I'm working on a ModulePass that uses ScalarEvolution along with several other analyses. After some debugging, it looks to me like ScalarEvolutionWrapperPass does not handle memory correctly for this case. Here's my current understanding of the problem. ScalarEvolutionWrapperPass maintains a unique_ptr to a ScalarEvolution. Calling getSE() dereferences this pointer.
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
2019 Dec 27
2
Calling LowerSwitchPass causing crash in llvm 9
There is no “switch” instruction in the target object code. It usually gets compiled into a switch table with instructions to load from it. Afaik Zhang > 在 2019年12月26日,17:49,n3v3rm03 via llvm-dev <llvm-dev at lists.llvm.org> 写道: > > Sorry I found an early thread discussing this question. I guess I shouldn't create lower switch pass like this. > However, I have another
2009 Aug 21
0
[LLVMdev] How to force MemoryDependenceAnalysis to run on original module
On Aug 21, 2009, at 3:04 AM, Marc Brünink wrote: >> This isn't really possible. The issue is that MemDep doesn't just >> "analyze your function". It is designed to be as lazy as possible, >> which means that it only does analysis when a query is performed. >> This >> means that if you have MemDep->Pass1->Pass2 and Pass2 uses MemDep
2009 Aug 21
2
[LLVMdev] How to force MemoryDependenceAnalysis to run on original module
Chris Lattner schrieb: > > On Aug 20, 2009, at 11:44 AM, Marc Brünink wrote: > >> Hi, >> >> I do have a FunctionPass that does change the code. This FunctionPass >> requires another FunctionPass which performs all the necessary analyses. >> This AnalysisPass again requires MemoryDependenceAnalysis. >> >> The problem is, that I would like
2011 Oct 14
0
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
In runOnFunction(), you should check to see if the function F is a declaration before calling getAnalysis(F). Calling getAnalysis<FunctionPass>() on a function that is a declaration will trigger an assertion if the function is just a declaration. To see if a function is a declaration, call its isDeclaration() method (i.e. if (F->isDeclaration()) ... ) -- John T. On 10/13/11 8:09
2011 Oct 15
1
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
This gives me: Assertion failed: (0 && "Unable to find on the fly pass"), function getOnTheFlyPass, file PassManager.cpp #include "llvm/Module.h" #include "llvm/Analysis/MemoryDependenceAnalysis.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; struct Hello: public FunctionPass { public: static char ID; Hello(): FunctionPass(ID) {
2013 Apr 12
2
[LLVMdev] Runtime exception in DominatorTree.getRootNode()
Hi all, I am trying to traverse a dominator tree and have encountered a weird runtime exception: Here's my simple code: virtual bool runOnFunction(Function &F) { DominatorTree& DT = getAnalysis<DominatorTree>(); * DomTreeNode* rootNode = DT.getRootNode();* return false. } Here's the documentation page:
2008 Aug 27
2
[LLVMdev] IntervalPartition and Intervals per function
Hi, I wrote a Function pass that requires the IntervalPartition pass in order to obtain the set of intervals for every function: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<IntervalPartition>(); } and get a handle to it in the runOnFunction method of my CustomPass: bool CustomPass::runOnFunction(Function& F) { IntervalPartition& iPart =
2010 Jul 22
2
[LLVMdev] Controlling the order of a FunctionPass
Hi, I would like my FunctionPasses to be invoked in reverse call graph order (callees before callers). However, "Writing an LLVM Pass" notes that "FunctionPass's do not require that they are executed in a particular order." Is there any way at all to specify an ordering? If this is not possible, I'm thinking of a workaround in which my runOnFunction method
2013 Apr 12
2
[LLVMdev] Runtime exception in DominatorTree.getRootNode()
Thanks for your reply, John. I am using opt to run my pass. Should opt by default link in the library? Would you please give me some idea on fixing it? Thanks! opt -load ../../../Debug+Asserts/lib/LLVMHello.dylib -hello < hello.bc > /dev/null My pass is just: #include "llvm/IR/Function.h" #include "llvm/Pass.h" #include "llvm/Support/raw_ostream.h" #include