similar to: [LLVMdev] getAnalysis*() called on an analysis that was not " "'required' by pass!

Displaying 20 results from an estimated 70000 matches similar to: "[LLVMdev] getAnalysis*() called on an analysis that was not " "'required' by pass!"

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>()"
2009 Apr 30
1
[LLVMdev] Assertion `ResultPass && "getAnalysis*() called on an analysis that was not " "'required' by pass!"' failed.
Hello, I have two passes, A and B. A is a function pass. B is a module pass. Each uses their getAnalysisUsage() method to .addRequired() several passes, and each .setPreserveAll()s. **Pass B requires pass A**. But, when I call getAnalysis<A> from within B, it exclaims: Assertion `ResultPass && "getAnalysis*() called on an analysis that was not "
2006 Jun 01
2
[LLVMdev] Adding an object to llc (analysis pass)
Hi > Right it does. However, does something *else* require MParSchedule? If > so, what? Ok, i am writing on a different backend based on the cbackend. The test usage of this pass looks like this: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.addRequired<MParSchedule>(); AU.setPreservesAll(); } and then in the
2008 Dec 01
0
[LLVMdev] Error when using getAnalysis
nitisha warkari wrote: > Hi, > > I'm trying to use the function getAnalysis. This is the code I'm using : > > void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired<LoopInfo>(); > AU.setPreservesAll(); > } > > virtual bool runOnModule(Module &M) { > LoopInfo &LI = getAnalysis<LoopInfo>(); > >
2010 Sep 15
0
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
hi, On Wed, Sep 15, 2010 at 8:21 PM, Mariusz Grad <mariusz.grad at gmail.com> wrote: > Hi, > > I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. > It compiles smoothly, but whenever I try to run it I got error like this: > opt: .. PassAnalysisSupport.h:203: AnalysisType&
2017 Feb 14
2
addRequired() + getAnalysis() for new / non-legacy pass manager
Hi! I am trying to extend the native AliasAnalysis of LLVM to use an external analysis pass. Doing this with the legacy pass manager works fine through calling addRequired() in the getAnalysisUsage and getAnalysis() in function runOnFunction(). In the new pass manager, I haven't found a similar way of doing this. When running opt with -O3, I encounter the following error: >Assertion
2008 Dec 02
2
[LLVMdev] Error when using getAnalysis
Hi, I had a question about this as well. The documentation about writing a pass shows an example like what John wrote, calling a function pass within a module pass on a per function basis. However, if I code it that way, I still get the same error: opt: /x/jeffhao/llvm/llvm/include/llvm/PassAnalysisSupport.h:232: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*,
2009 May 08
0
[LLVMdev] problem with analysis required
Kshitiz Garg wrote: > Hello, > I was trying to get the loop info in a module pass to be able to > iterate over the loops int the module itself. Since my pass requires > to make module level changes including adding new types to module > hence a looppass cannot be used here. > I am getting the following error on running opt. > > opt:
2010 Sep 15
2
[LLVMdev] getAnalysis<LoopInfo> from ModulePass
Hi, I wrote tiny ModulePass which iterates over functions and then uses getAnalysis<LoopInfo> in order to get informations about the loop. It compiles smoothly, but whenever I try to run it I got error like this: opt: .. PassAnalysisSupport.h:203: AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass &&
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) {
2009 May 08
3
[LLVMdev] problem with analysis required
Hello, I was trying to get the loop info in a module pass to be able to iterate over the loops int the module itself. Since my pass requires to make module level changes including adding new types to module hence a looppass cannot be used here. I am getting the following error on running opt. opt: /root/llvm-2.4/include/llvm/PassAnalysisSupport.h:199: AnalysisType&
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
2008 Nov 30
3
[LLVMdev] Error when using getAnalysis
Hi, I'm trying to use the function getAnalysis. This is the code I'm using : void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<LoopInfo>(); AU.setPreservesAll(); } virtual bool runOnModule(Module &M) { LoopInfo &LI = getAnalysis<LoopInfo>(); } I get following error when I try to run my pass : opt:
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 {
2012 Mar 09
0
[LLVMdev] How to keep FunctionPass analysis result alive in Module Pass?
On 3/9/12 4:28 PM, Fan Long wrote: > Thank you for your quick reply. > > Actually I am using a std::map to map Function* to LoopInfo*, but that > does not help in this case. Each time I call > getAnalysis<llvm::LoopInfo>(*F), it returns the same instance of > llvm::LoopInfo, so the std::map is just mapping every function into > the same instance. It seems only the
2012 Mar 13
0
[LLVMdev] How to keep FunctionPass analysis result alive in Module Pass?
On 3/13/12 11:39 AM, Tobias von Koch wrote: > Hi John & Fan, > > I hit the exact same problem today. I can confirm that Fan's > observation of getting the /*same*/ LoopInfo* from subsequent calls to > getAnalysis<LoopInfo>(function) for /*distinct*/ functions is indeed true. > > I was very surprised by this at first as well, but I think I've found > an
2012 Mar 13
2
[LLVMdev] How to keep FunctionPass analysis result alive in Module Pass?
Hi John & Fan, I hit the exact same problem today. I can confirm that Fan's observation of getting the *same* LoopInfo* from subsequent calls to getAnalysis<LoopInfo>(function) for *distinct* functions is indeed true. I was very surprised by this at first as well, but I think I've found an explanation - please anyone correct me if this is wrong: What you're getting from
2012 Aug 29
0
[LLVMdev] How to require ScalarEvolution analysis in a Module pass?
Guys, What I want to do is to hack global opt pass, which needs ScalarEvolution analysis. However opt crashed saying "opt: /home/xchen/llvm/include/llvm/PassAnalysisSupport.h:242: AnalysisType& llvm::Pass::getAnalysisID(const void*, llvm::Function&) [with AnalysisType = llvm::ScalarEvolution]: Assertion `ResultPass && "Unable to find requested analysis info"'
2012 Mar 09
0
[LLVMdev] How to keep FunctionPass analysis result alive in Module Pass?
On 3/9/12 4:10 PM, Fan Long wrote: > Hello, > I am trying to write a new ModulePass using LoopInfo analysis result, but it seems I misunderstand some concept about PassManager. Basically I want to keep LoopInfo analysis result alive. Here is an example showing the problem I encountered, assuming I already addRequired<llvm::LoopInfo>() in getAnalysisUsage: > > void
2006 Jun 01
0
[LLVMdev] Adding an object to llc (analysis pass)
On Thu, 1 Jun 2006, Silken Tiger wrote: >> Right it does. However, does something *else* require MParSchedule? If >> so, what? > Ok, i am writing on a different backend based on the cbackend. Ok. > The test usage of this pass looks like this: > > void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired<LoopInfo>(); >