search for: dominatortree

Displaying 20 results from an estimated 260 matches for "dominatortree".

2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
I still have the addRequired: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); } The other line DominatorTree *dt = &getAnalysis<DominatorTree>(); Is for later use when I try to use PromoteMemToReg On Tue, Nov 8, 2011 at 4:22 PM, Michael Ilseman <michael at lunarg.com> wrote: > Something's different here, earlier in the thread y...
2011 Nov 08
4
[LLVMdev] loadable passes with dependencies?
Just shows me what I expect void getAnalysisUsage(AnalysisUsage &AU) const { DominatorTree *dt = &getAnalysis<DominatorTree>(); So I'm only using it for DominatorTree(so I can use PromoteMemToReg). Thanks On Tue, Nov 8, 2011 at 2:28 PM, Tobias Grosser <tobias at grosser.es> wrote: > On 11/08/2011 07:33 PM, ret val wrote: >> >> Sorry to keep dragging...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
On 11/8/11 4:34 PM, ret val wrote: > I still have the addRequired: > virtual void getAnalysisUsage(AnalysisUsage&AU) const { > AU.addRequired<DominatorTree>(); > } > > The other line > DominatorTree *dt =&getAnalysis<DominatorTree>(); > Is for later use when I try to use PromoteMemToReg Isn't DominatorTree a FunctionPass? If your pass is a ModulePass, you need to pass a Function * or Function &...
2011 Nov 09
1
[LLVMdev] loadable passes with dependencies?
...n Tue, Nov 8, 2011 at 5:47 PM, John Criswell <criswell at illinois.edu> wrote: > On 11/8/11 4:34 PM, ret val wrote: >> >> I still have the addRequired: >>         virtual void getAnalysisUsage(AnalysisUsage&AU) const { >>                        AU.addRequired<DominatorTree>(); >>         } >> >> The other line >>         DominatorTree *dt =&getAnalysis<DominatorTree>(); >> Is for later use when I try to use PromoteMemToReg > > Isn't DominatorTree a FunctionPass?  If your pass is a ModulePass, you need > to pass...
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
Something's different here, earlier in the thread you said you had: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); } Now you have: void getAnalysisUsage(AnalysisUsage &AU) const { DominatorTree *dt = &getAnalysis<DominatorTree>(); I'm sort of confused, why did this change happen? I think the "AU.addRequired" was correct to have in getAnalysisUsage, and the &qu...
2007 Dec 03
1
[LLVMdev] Using Function Passes from Module Passes
Dear All, I'm having some problems using a function pass from a Module pass. My code is as follows: DominatorTree & domTree; ... Function &F = *I; // I is an interator from using Module::begin() ... domTree = getAnalysis<DominatorTree>(F); When I compile this code, I get the following error: /home/vadve/criswell/src/llvm22/include/llvm/Pass.h: In member function 'llvm::FunctionPass& ll...
2009 May 01
1
[LLVMdev] DominatorTrees, DominanceFrontiers, interfaces and cloning
Hello, I have a transform that, given a function F, will produce a new function G such that the basic blocks of G are (copies of) a subset of the basic blocks of F, and such that control flow is connected as you would expect. Given DominatorTree and DominanceFrontier of F, I would also like to efficiently compute DominatorTrees and DominanceFrontiers of G. I understand how to do this mathematically, but I'm having some problems with the llvm codebase. I have two questions: (1) Is there any way to clone a DominatorTree or DominanceFr...
2011 Jan 31
2
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
I am creating a new pass (function pass) called Dfl from the Hello example and notes on "Writing an LLVM Pass". When I compile the program I get inncomplete type error (llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier). The code is given below. Surinder struct Dfl : public FunctionPass { raw_ostream *Out; static char ID; // Dfl() : FunctionPass(&ID) { } // virtual bool runOnFunction(Function &F) { // //BlocksCounter++; EdgesCounter++; In...
2010 May 10
2
[LLVMdev] [Fwd: Error while running my pass with opt]
ambika wrote: > Here is getAnalysisUsage() i am using, > > void getAnalysisUsage(AnalysisUsage &AU) const { > AU.setPreservesAll(); > AU.addRequired<DominatorTree>(); > } > > and then I use it as, > > > bool ptrTest::runOnModule(Module &M) { > > DominatorTree &DT = getAnalysis<DominatorTree>(); > ...... > > } > Weird. There is nothing unusual about your getAnalysisUsage() method at all. I as...
2013 Apr 12
2
[LLVMdev] Runtime exception in DominatorTree.getRootNode()
...llvm/Support/raw_ostream.h" #include "llvm/Analysis/Dominators.h" using namespace llvm; namespace { struct Hello : public FunctionPass { static char ID; Hello() : FunctionPass(ID) { } virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); } virtual bool runOnFunction(Function &F) { DominatorTree& DT = getAnalysis<DominatorTree>(); BasicBlock* BB = DT.getRoot(); return false; } }; } char Hello::ID = 0; static RegisterPass<Hello> Z("hello", "My test analysis&quo...
2010 May 28
2
[LLVMdev] Basic doubt related to Module::iterator
Hi, Yeah I found that it is running LLVM's functions. The functions that are running are: main llvm.dbg.func.start llvm.dbg.stoppoint scanf llvm.dbg.region.end But I dont want all the functions to be called as I am using Dominator Trees and whenever I the statement DominatorTree &DT = getAnalysis<DominatorTree>(F); is encountered by functions other than main, it gives error. What can I do? regards, Ambika Trevor Harmon wrote: > On May 24, 2010, at 12:58 PM, ambika wrote: > >> I run this for different files, each having one function each ie main()...
2011 May 03
4
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
When migrating my project to 2.9, I've encountered a strange segfault where if a ModulePass's getAnalysisUsage adds LoopInfo and DominatorTree, then llvm::PMTopLevelManager::findAnalysisUsage will segfault. What's odd is that if I rearrange this (add required for DominatorTree before LoopInfo), it does not segfault. I realize that LoopInfo requires and preserves DominatorTree, but this behavior is strange. All my other passes migrated...
2013 Apr 12
0
[LLVMdev] Runtime exception in DominatorTree.getRootNode()
...quot;llvm/Analysis/Dominators.h" > > using namespace llvm; > > namespace { > struct Hello : public FunctionPass { > static char ID; > Hello() : FunctionPass(ID) { } > virtual void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired<DominatorTree>(); > } > virtual bool runOnFunction(Function &F) { > DominatorTree& DT = getAnalysis<DominatorTree>(); > BasicBlock* BB = DT.getRoot(); > return false; > } > }; > } > char Hello::ID = 0; > static RegisterPass<Hello&g...
2013 Apr 12
0
[LLVMdev] Runtime exception in DominatorTree.getRootNode()
On 4/11/13 10:30 PM, Bill He wrote: > 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: > http://llvm.org/docs/doxygen/html/classllvm_1_1DominatorTree.html > > And here's my runtime exception: &g...
2011 Jan 31
0
[LLVMdev] Error : llvm/include/llvm/Pass.h:188: error: incomplete type 'llvm::DominatorTree' used in nested name specifier
...;surifilms at gmail.com> wrote: > I am creating a new pass (function pass) called Dfl from the Hello > example and notes on "Writing an LLVM Pass". When I compile the > program I get inncomplete type error (llvm/include/llvm/Pass.h:188: > error: incomplete type 'llvm::DominatorTree' used in nested name > specifier). The code is given below. > > Surinder > > struct Dfl : public FunctionPass { > raw_ostream *Out; > static char ID; > // > Dfl() : FunctionPass(&ID) { } > // > virtual bool runOnFunction(Function &F) {...
2010 May 11
0
[LLVMdev] [Fwd: Error while running my pass with opt]
John Criswell wrote: > ambika wrote: >> Here is getAnalysisUsage() i am using, >> >> void getAnalysisUsage(AnalysisUsage&AU) const { >> AU.setPreservesAll(); >> AU.addRequired<DominatorTree>(); >> } >> >> and then I use it as, >> >> >> bool ptrTest::runOnModule(Module&M) { >> >> DominatorTree&DT = getAnalysis<DominatorTree>(); DominatorTree is per-function. In a ModulePass you need to pass a Function in order f...
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: http://llvm.org/docs/doxygen/html/classllvm_1_1DominatorTree.html And here's my runtime exception: dyld: lazy symbol binding failed: Symbol...
2010 Oct 20
5
[LLVMdev] Pass Incompatibility
I have a transformation where I'd like to use both DominatorTree (for ExtractCodeRegion), and DemoteRegisterToMemory (i.e., reg2mem). The transformation is phased, so all occurrences of getAnalysis<DominatorTree>(Function) happen before any occurrence of getAnalysisID<FunctionPass>(&DemoteRegisterToMemoryID, Function). If I register these two pa...
2010 May 28
0
[LLVMdev] Basic doubt related to Module::iterator
...g LLVM's functions. The functions that are > running are: > > main > llvm.dbg.func.start > llvm.dbg.stoppoint > scanf > llvm.dbg.region.end > > But I dont want all the functions to be called as I am using Dominator > Trees and whenever I the statement > > DominatorTree &DT = getAnalysis<DominatorTree>(F); > > is encountered by functions other than main, it gives error. > > What can I do? > You should first check to see if the function is an external function before calling getAnalysis<DominatorTree>() on it: if (!(F->isDecl...
2008 Mar 05
1
[LLVMdev] getAnalysis*() called on an analysis that was not " "'required' by pass!
Hello, I'd appreciate it if anyone can tell me what the error message means and point out what I am doing wrong. Thank you. I am trying to use the result of the DominatorTree analysis in my ModulePass class as explained in the section "Writing an LLVM Pass". http://llvm.org/docs/WritingAnLLVMPass.html#interaction I called the method "addRequired<DominatorTree>()" in the method "getAnalysisUsage(AnalysisUsage&)", but I get the foll...