Displaying 20 results from an estimated 3000 matches similar to: "addRequired() + getAnalysis() for new / non-legacy pass manager"
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:
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>();
>
>
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 "
2009 Dec 08
2
[LLVMdev] getAnalysisIfAvailable<>(...)
Is it consistent to have a Pass instance's run method's implementation use getAnalysisIfAvailable<AnalysisType>() (vs just using getAnalysis< AnalysisType >) when that same instance's getAnalysisUsage(AnalysisUsage &au) implementation invokes au.addRequired<AnalysisType>()?
For example in the implementation of SelectionDAGISel::runOnMachineFunction(...) (called
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 &&
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 Dec 08
0
[LLVMdev] getAnalysisIfAvailable<>(...)
Hi!
If a pass is required then it makes sense to
getAnalysis<DwarfWriter>(). getAnalysisIfAvailable<>() is used for
cases where a pass want to take advantage of (or fix up) info only
*if* it is available.
If you prepare a patch to fix getAnalysisifAvailable<>() uses (e.g.
DwarfWriter requests you mention below) then I'll apply it.
-
Devang
On Tue, Dec 8, 2009 at 11:11
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&
2008 Dec 02
1
[LLVMdev] Error when using getAnalysis
Sure. I've attached the code for the test pass I wrote, as well as the
code and bitcode for the testcase I'm running. All the functionality has
been stripped out of the pass, and the pass compiles without a problem, but
the error appears when the pass is run.
Jeff
On Tue, 2 Dec 2008 11:06:44 -0800, Devang Patel <dpatel at apple.com> wrote:
> On Dec 2, 2008, at 10:40 AM, Jeff
2008 Dec 02
0
[LLVMdev] Error when using getAnalysis
On Dec 2, 2008, at 10:40 AM, Jeff Yeong-Peng Hao wrote:
>
> 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:
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 {
2011 Oct 13
2
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
I wrote a pass(that is to be loaded by opt) that I would like to use
in conjunction with MemoryDependenceAnalysis. I have tried using by
including its header and adding this to my pass:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
errs() << "addRequired called\n";
AU.addRequired<MemoryDependenceAnalysis>();
}
And in my
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
2011 Nov 09
1
[LLVMdev] loadable passes with dependencies?
Awesome, that let me get far enough to trip:
Assertion failed: (ResultPass && "Unable to find requested analysis
info"), function getAnalysisID
Is there something else I forgot?
On 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
2020 Oct 02
2
Pass dependency error
Hi all,
I am getting the infamous error:
Assertion `ResultPass && "getAnalysis*() called on an analysis that was
not " "'required' by pass!"'
but i really don't understand why.
I have:
voidInstrumentationPass::getAnalysisUsage(llvm::AnalysisUsage&AU) const{
AU.setPreservesAll();
AU.addRequired<DetectKernelsPass>();
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 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 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) {
2011 Oct 13
0
[LLVMdev] pass utilizing MemoryDependenceAnalysis?
My pass(that I want to use MemoryDependenceAnalysis) is a ModulePass.
When I changed my assignment to:
MD = &getAnalysis<MemoryDependenceAnalysis>(F);
It fixed my initial problem but left me with:
Assertion failed: (ResultPass && "Unable to find requested
analysis info"), function getAnalysisID
On Thu, Oct 13, 2011 at 1:43 PM, ret val <retval386 at
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