Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Add a new information and preserve it in LLVM"
2014 Aug 29
2
[LLVMdev] The problem of densemap and loop
Dear John,
First thing, the 3 loops in Densemap are all " Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch> " in the 3 functions.
The dense map is in a ImmutablePass. I got it in FunctionPass and tried insert the information in this FunctionPass. So to turn the FunctionPass to ModulePass may be a better idea?
Another interesting thing: if just before
2014 Aug 28
2
[LLVMdev] The problem of densemap and loop
Hello, everyone,
I created a dense map like this: DenseMap<Loop *, int> ls;
And I have a module which contains 3 functions:
function F and it has a loop which is " Loop at depth 1 containing: %1<header><exiting>,%3,%5<latch> "
function G and it has two loops which are "
Loop at depth 1 containing: %8<header><exiting>,%10,%14<latch>
2010 Jul 22
3
[LLVMdev] Controlling the order of a FunctionPass
On Jul 22, 2010, at 2:05 PM, John Criswell wrote:
> If you write your pass as a ModulePass, then you can iterate over the
> functions in any order that you want.
I had considered that, but my FunctionPass depends on other passes
processing the functions first:
void MyPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<UnifyFunctionExitNodes>();
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:
LoopInfo &LI =
2011 Nov 10
1
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
On 11/10/11 11:48 AM, Ryan Taylor wrote:
> John,
>
> Thanks, this does not compile though, I get this error:
First, please CC the llvmdev list. That way, others having the same
question can see the conversation, and others on the list can help
correct any errors I make.
:)
>
> cdfg_pass.cpp:511:11: error: ‘class llvm::Function’ has no member
> named ‘getDeclaration’
2010 Jul 23
0
[LLVMdev] Controlling the order of a FunctionPass
Trevor Harmon wrote:
> On Jul 22, 2010, at 2:05 PM, John Criswell wrote:
>
>
>> If you write your pass as a ModulePass, then you can iterate over the
>> functions in any order that you want.
>>
>
> I had considered that, but my FunctionPass depends on other passes
> processing the functions first:
>
Two things to consider:
1) The PassManager
2011 Nov 10
4
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
John,
This did not work. It compiles (isDeclaration was the name of the
function) and I passed a reference (&F) (F is a function pointer). I still
get the opt load error from the original message (UNREACHABLE exectuted!).
Thanks.
On Thu, Nov 10, 2011 at 10:00 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> 1. Ok will do.
> 2. Ok, will do.
> 3. It's a CallGraphPass. I
2011 Nov 10
0
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
1. Ok will do.
2. Ok, will do.
3. It's a CallGraphPass. I mentioned this in my first post.
4. Yep, I have the header files included, I'm not sure it would compile
otherwise (previously). I would get an error like LoopInfo not declared.
I'll try your suggestions, thanks again!
On Thu, Nov 10, 2011 at 9:57 AM, John Criswell <criswell at illinois.edu>wrote:
> On 11/10/11
2010 Jul 22
2
[LLVMdev] Controlling the order of a FunctionPass
Hi,
I would like my FunctionPasses to be invoked in reverse call graph
order (callees before callers). However, "Writing an LLVM Pass" notes
that "FunctionPass's do not require that they are executed in a
particular order." Is there any way at all to specify an ordering?
If this is not possible, I'm thinking of a workaround in which my
runOnFunction method
2010 Jul 22
0
[LLVMdev] Controlling the order of a FunctionPass
Trevor Harmon wrote:
> Hi,
>
> I would like my FunctionPasses to be invoked in reverse call graph
> order (callees before callers). However, "Writing an LLVM Pass" notes
> that "FunctionPass's do not require that they are executed in a
> particular order." Is there any way at all to specify an ordering?
>
> If this is not possible, I'm
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, llvm::Function *F2) {
llvm::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 result for
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
2006 May 31
2
[LLVMdev] Adding an object to llc (analysis pass)
Hi
Am Dienstag, 30. Mai 2006 19:21 schrieb Chris Lattner:
> On Tue, 30 May 2006, Silken Tiger wrote:
> > Everthing now compiles fine, but when running llc with invoking my own
> > backend derived from the cbackend i get the following error:
> > namespace llvm {
> > class MParSchedule : public BasicBlockPass {
> > public:
> >
> >
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 above in runOnModule, and run the pass, the following error popped
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 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
2012 Mar 23
3
[LLVMdev] Function Pass Manager
Hi,
I'm writing a function pass which is dynamically loaded by opt and I
need some analysis and passes to be run before my pass:
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
AU.addRequiredID(LoopSimplifyID);
AU.addPreservedID(LoopSimplifyID);
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 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