similar to: [LLVMdev] Accessing Dominator Tree

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Accessing Dominator Tree"

2011 Jul 29
0
[LLVMdev] Accessing Dominator Tree
On 7/29/11 9:43 AM, david.dewey at comcast.net wrote: > > Hello, > > I am working on a project that requires me to perform some analysis on > a bitcode file outside the existing LLVM analysis frameworks (opt, > etc.). In what I am doing, I need to be able to access the dominator > tree for a given function. Is there a way I can instantiate a > DominatorTree object
2011 Jul 29
2
[LLVMdev] Accessing Dominator Tree
John, Thanks for the quick reply.  Using a PassManager object should work fine.  As you said, my only objection is to exec'ing opt.  I had actually tried instantiating a PassManager object before, but I was definitely not doing it right.  I will take a look at how clang and SAFECode use it, and see if I can get it working. Thanks, David ----- Original Message ----- From:
2011 Jul 29
0
[LLVMdev] Accessing Dominator Tree
On 7/29/11 10:00 AM, david.dewey at comcast.net wrote: > > John, > > Thanks for the quick reply. Using a PassManager object should work > fine. As you said, my only objection is to exec'ing opt. > > I had actually tried instantiating a PassManager object before, but I > was definitely not doing it right. I will take a look at how clang > and SAFECode use it,
2011 Nov 16
0
[LLVMdev] CallSite in innermost loop
On Nov 16, 2011, at 2:43 AM, Pankaj Gode wrote: > In order to detect whether CallSite is present in innermost loop, do I need to insert logic from LoopInfo pass for collecting loops, within a CallGraphSCC pass? > > Is there any other approach for this? > PassManager not only schedules passes, it also - manages memory - ensures that analysis info is valid at the point of use -
2011 Nov 16
2
[LLVMdev] CallSite in innermost loop
In order to detect whether CallSite is present in innermost loop, do I need to insert logic from LoopInfo pass for collecting loops, within a CallGraphSCC pass?   Is there any other approach for this?   Regards, Pankaj -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111116/cd9d51b7/attachment.html>
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>(); > ...... >
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) { >> >>
2009 Feb 12
2
[LLVMdev] DominatorTree Information required in CallGraphPass
Hi all, I am implementing a new pass for LLVM which extends Call Graph SCCPass. I need DominatorTree Information when I get to individual function. I have added AU.addrequired<DominatorTree>() and AU.addRequired<DominanceFrontier>() in getAnalysisUsage() function. But, when I get to the pass, Pass Manager gives following runtime error Unable to schedule 'Dominator Tree
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
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
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:
2009 Feb 12
0
[LLVMdev] DominatorTree Information required in CallGraphPass
On Feb 11, 2009, at 6:05 PM, kapil anand wrote: > Hi all, > > I am implementing a new pass for LLVM which extends Call Graph > SCCPass. I need DominatorTree Information when I get to individual > function. I have added AU.addrequired<DominatorTree>() and > AU.addRequired<DominanceFrontier>() in getAnalysisUsage() function. > > But, when I get to the pass,
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
2011 May 04
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi Michael, > 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. I suggest you build LLVM with assertions enabled - then you should get a helpful error message rather than a segfault. I think you are not allowed to
2010 May 09
0
[LLVMdev] [Fwd: Error while running my pass with opt]
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>(); ...... } John Criswell wrote: > ambika wrote: >> But this is already present in
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.
2011 May 04
2
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Thanks for the response. I do have assertions enabled, and none of them are getting hit. I did do a search of the mailing list for the past year (approximately) before writing my email, and what I found was that you should be allowed to use LoopInfo and other analysis function passes from a module pass, with the only difference being that getAnalysis is passed the function. The example code I
2010 May 09
2
[LLVMdev] [Fwd: Error while running my pass with opt]
ambika wrote: > But this is already present in my pass. > And I am not able to understand the cause for the error: > Can you send a copy of your getAnalysisUsage() method for your pass? There are some funny errors that can occur when you do things that the PassManager cannot handle. For example, if you're requiring a transform pass, that can cause strange assertions from the
2013 Apr 12
0
[LLVMdev] Runtime exception in DominatorTree.getRootNode()
On 4/12/13 9:51 AM, Bill He wrote: > 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! Odd. I would think that opt would have that pass linked in statically. I'm not sure why it's not working. Does anyone else have an idea? -- John T. > > opt -load
2011 May 04
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi Michael, hi Duncan, yesterday I stumbled over something that might be related. At least I could also just be doing some initialization wrong or something in this direction... In my case, I hit a segfault in PassInfo::isAnalysisGroup() after PassManager.add(myModulePass) is called. My setup seems fairly simple, the attached code should reproduce the error. Compile with g++ test.cpp