Displaying 20 results from an estimated 496 matches for "loopinfo".
2012 Mar 09
3
[LLVMdev] How to keep FunctionPass analysis result alive in Module Pass?
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 analysis result for the last function is valid, because all the res...
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 analysis result for the last
> function...
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 getAnalysis<>(function)...
2011 Mar 03
2
[LLVMdev] how can I have LoopInfo in a module pass?
Thanks John, I modify my code to like this:
bool XXX::ModulePass(Module &M){
....
LoopInfo &li = getAnalysis<LoopInfo>(fi);
....
}
Here fi is a Function* pointing to main().
Now when I run the pass, another error shows up:
AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*, llvm::Function&) [with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass &a...
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 cs.uiuc.edu
Sent: Thursday, March 03, 2011 5:04 PM
Subject: Re: [LLVMdev] how can I have LoopInfo in a module pass?
Thanks John, I modi...
2011 Feb 28
2
[LLVMdev] LoopInfo of a basic block
...wrote:
>
>> Hi all,
>>
>> How Can I get the Loops around an Instruction?
>>
>> I know I can get the basic block of an instruction using
>> inst.getParent() which returns a BasicBlock*. Now I want to use the
>> getLoopFor(BasicBlock) method of the class LoopInfo.
>> But I dont know how to get the LoopInfo.
>>
>> BasicBlock* bb = inst.getParent();
>>
>> (... what should I add here?)
>>
>> Loop* innerloop = LI -> getLoopFor(bb):
>>
>
> Two steps:
> 1) In your pass's getAnalysisUsage(), request L...
2011 Mar 03
2
[LLVMdev] how can I have LoopInfo in a module pass?
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 did the ab...
2012 Mar 09
2
[LLVMdev] How to keep FunctionPass analysis result alive in Module Pass?
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 foo(llvm::Function *F1, ll...
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 function...
2019 Apr 02
2
How can I use llvm::LoopInfo in the runOnModule method?
Hi all,
I tried to have a LoopInfo object in a function pass, and add addRequired
in getAnalysisUsage, and then use getAnalysis 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 did the above in runOnModule, and bui...
2009 May 08
3
[LLVMdev] problem with analysis required
...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& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const
[with AnalysisType = llvm::LoopInfo]: Assertion `ResultPass &&
"getAnalysis*() called on an analysis that was not " "'required' by
pass!"' failed.
<snip_gdb_trace>
#4 0x083006f2 in llvm::Pass::getAnalysisID<llvm::LoopInfo> (this=0x86cfc48,
PI=0x86cbfe0) at /root/llvm-2.4/inclu...
2011 Feb 28
0
[LLVMdev] LoopInfo of a basic block
Thanks Devang and John. My pass is actually a loop pass, not a function
pass. So, I couldnt override the getAnalysisUsage.
I am in a loop pass, I know the outermost loop. Now How can I get the
loopInfo from here? I couldn't find helpful methods in the LoopInfo class
documents.
On Mon, Feb 28, 2011 at 5:52 PM, John Criswell <criswell at illinois.edu>wrote:
> On 2/28/11 4:43 PM, Devang Patel wrote:
>
>
> On Feb 28, 2011, at 2:35 PM, Naznin Fauzia wrote:
>
> Hi all,...
2011 Nov 10
3
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
LLVMers,
I am doing a CallGraphPass but would like to get the LoopInfo of the
functions inside this pass, is this possible? Currently I have a function
inside the CallGraph struct:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
}
And later inside the pass I am calling:...
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 explanation - please anyone correct me if this is wrong:
>
> What you're getting fr...
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:
/net/hc295/nwarkari/llvm/llvm-2.3/include/llvm/PassAnalysisSupport.h:193:
AnalysisType& l...
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 foo(llvm::Functi...
2011 Feb 28
1
[LLVMdev] LoopInfo of a basic block
...s is actually a loop pass, not a function
> pass. So, I couldnt override the getAnalysisUsage.
>
A LoopPass is no different from a FunctionPass here. You can use
getAnalysisUsage and getAnalysis in a LoopPass.
> I am in a loop pass, I know the outermost loop. Now How can I get the
> loopInfo from here? I couldn't find helpful methods in the LoopInfo class
> documents.
>
>
> On Mon, Feb 28, 2011 at 5:52 PM, John Criswell <criswell at illinois.edu>wrote:
>
>> On 2/28/11 4:43 PM, Devang Patel wrote:
>>
>>
>> On Feb 28, 2011, at 2:35 PM, N...
2011 Feb 28
2
[LLVMdev] LoopInfo of a basic block
Hi all,
How Can I get the Loops around an Instruction?
I know I can get the basic block of an instruction using inst.getParent()
which returns a BasicBlock*. Now I want to use the getLoopFor(BasicBlock)
method of the class LoopInfo.
But I dont know how to get the LoopInfo.
BasicBlock* bb = inst.getParent();
(... what should I add here?)
Loop* innerloop = LI -> getLoopFor(bb):
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/...
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 &&am...
2015 Oct 28
2
how to get LoopInfo in FunctionPass in LLVM3.7.0
I want get some loop information(the methods are included in LoopInfo
class) ,but when I use "const LoopInfo *LI=&getAnalysis<LoopInfo>()", I got
a compiler error.
the version of LLVM is 3.7.0.
can anyone help me?please give me some example.thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists...