Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Questions about trip count"
2010 Aug 14
0
[LLVMdev] Questions about trip count
On Thu, Aug 12, 2010 at 5:22 PM, Tobias Grosser
<grosser at fim.uni-passau.de>wrote:
> On 08/12/2010 09:41 PM, Douglas do Couto Teixeira wrote:
>
>> Dear guys,
>>
>> I am having problems to obtain good information from the LoopInfo.
>> I am always getting a trip count of 0, even though I am clearly passing
>> a loop with a constant bound. I am using
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 &&
2017 Jul 10
2
Problems with registering of ModulePass (with Dependencies)
Hello,
I have created a ModulePass, that now needs LoopInfo information.
The ModulePass registration is taken from [1]. I use clang to directly invoke
it (This is also a hard requirement, because I need the fancy output of clang
warnings/remarks).
The problem is, that the dependency to the LoopInfoWrapperPass does not seem
to work. The error is:
--- snip ---
clang-4.0:
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:
2019 Mar 26
2
On-the-fly passes
I'm seeing some very unexpected behavior in a ModulePass I've created.
To support both the legacy and new pass managers, I've abstracted away
the code to get the passes it depends on:
bool MyPass::runOnModule(Module &M) override {
auto DominatorGetter = [this] (Function &F) -> DominatorTree & {
return
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&
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>();
>
>
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*,
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
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
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
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
2011 Sep 12
1
[LLVMdev] IVUsers (LoopPass) analysis in a ModulePass?
Hi Tim,
> From: Tim Creech <tcreech at umd.edu>
> Subject: [LLVMdev] IVUsers (LoopPass) analysis in a ModulePass?
> Date: September 1, 2011 11:46:28 AM PDT
> To: llvmdev at cs.uiuc.edu
>
> Hi all,
> I have a loadable ModulePass which does transformations, and I would like to
> use IVUsers analysis within it. I noticed when I try to do this (via
> the usual
2010 Nov 17
0
[LLVMdev] L->isLoopInvariant giving wrong results?
i am getting seg fault on functions like I->eraseFromParent also.
I'm assuming that the problem comes when i change the loop structure.
On Thu, Nov 18, 2010 at 4:05 AM, Sreeraj a <writetosrj at gmail.com> wrote:
> The funny thing is that i am manually able to hoist the Loop invariant
> instruction to the basicBlock terminator, by editing the human readable form
> and then
2010 Nov 17
2
[LLVMdev] L->isLoopInvariant giving wrong results?
The funny thing is that i am manually able to hoist the Loop invariant
instruction to the basicBlock terminator, by editing the human readable form
and then using llvm-as to convert it into bytecode.
On Thu, Nov 18, 2010 at 4:01 AM, Chris Lattner <clattner at apple.com> wrote:
>
> On Nov 17, 2010, at 1:38 PM, Sreeraj a wrote:
>
> > Thanks Chris,
> >
> > I was
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
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:
2010 May 08
3
[LLVMdev] [Fwd: Error while running my pass with opt]
Hi,
you need something like this in your pass:
void YourPass::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<DominatorTree>();
}
because you need to specify which analysis you are using.
Tobi
2018 Feb 07
2
Question about using LoopAccessLegacyAnalysis
Hi LLVM community,
I am writing a custom pass for analyzing the dependence information for the memory access within a loop. I found “LoopAccessLegacyAnalysis” class useful, however I m not able to obtain information from that pass. Here is what I did to get the information:
// require pass
virtual void getAnalysisUsage(AnalysisUsage &AU) const
{