Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Using the output of a user defined analysis pass in a user defined transform Pass"
2011 Aug 22
1
[LLVMdev] Infinite loop when adding a new analysis pass
I am trying to add an analysis pass as a FunctionPass, and let LICM
(LoopPass) depends upon it. So in LICM.cpp, I have the following:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<DominatorTree>();
AU.addRequired<LoopInfo>();
AU.addRequiredID(LoopSimplifyID);
AU.addRequired<AliasAnalysis>();
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>()"
2011 May 17
0
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Hi,
I am running into the same issue with a module pass, that calls
LoopInfo.(does not call DominatorTree)
I am using RegisterPass, since it is a dynamically loaded module(as per
lib/Transforms/Hello)
It does seem possible from the discussion, to use LoopInfo inside a
ModulePass.
I am wondering what the fix to this problem was.
Also, the code works in 2.7.(I did not try 2.8)
Thanks,
Arushi
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
2011 Dec 14
0
[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass
On Dec 14, 2011, at 7:09 AM, David Gardner wrote:
> I'm attempting to add some support for hoisting/sinking of memory-using
> intrinsics in loops, and so I want to use MemoryDependenceAnalysis in
> LICM, but when I modify getAnalysisUsge to include this :
>
> virtual void getAnalysisUsage(AnalysisUsage &AU) const {
> AU.setPreservesCFG();
>
2011 Dec 14
2
[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass
I'm attempting to add some support for hoisting/sinking of memory-using
intrinsics in loops, and so I want to use MemoryDependenceAnalysis in
LICM, but when I modify getAnalysisUsge to include this :
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
AU.addRequired<DominatorTree>();
AU.addRequired<LoopInfo>();
2011 Mar 03
0
[LLVMdev] how can I have LoopInfo in a module pass?
I think this assertion failure may be caused by the getAnalysisUsage(). Mine is like the following:
class myclass : public ModulePass{
...
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
}
...
}
Is it enough? Thanks!
Best,
--Wenbin
----- Original Message -----
From: Wenbin Zhang
To: John Criswell
Cc: llvmdev 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
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
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) {
>>
>>
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
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 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
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>();
> ......
>
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
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
1
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
Your constructor is not calling initializeTestMPPass(), and you're
using RegisterPass which I think was deprecated in favor of
INITIALIZE_PASS. You can look at, for example,
lib/Transforms/Scalar/IndVarSimplify.cpp for examples of how to
initialize, e.g. having "INITIALIZE_PASS_DEPENDENCY(LoopInfo)"
sandwiched between BEGIN and END. Note that you'll want a forward
declaration of
2010 Nov 17
1
[LLVMdev] L->isLoopInvariant giving wrong results?
my changed code.
namespace {
class MyLoopPass:public LoopPass {
bool changed;
public:
static char ID;
Loop* curLoop;
// AnalysisType* AA;
DominatorTree* DT;
LoopInfo* LI;
MyLoopPass() : LoopPass(ID){}
bool isLoopInvariantInst(Instruction &I) ;
bool runOnLoop(Loop * L, LPPassManager &lpm);
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
2011 Mar 03
0
[LLVMdev] how can I have LoopInfo in a module pass?
On 3/3/11 3:09 PM, Wenbin Zhang wrote:
> Hi all,
> I tried to have a LoopInfo object in a function pass, add
> addRequired<LoopInfo> in getAnalysisUsage, and then use
> getAnalysis<LoopInfo> in runOnFunction(). It worked OK.
> Now I want to have a module pass to traverse the functions, and
> similarly I want to have to loop information of the functions. When I
>
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