Displaying 20 results from an estimated 605 matches for "aliasanalysis".
2015 Apr 29
2
[LLVMdev] AliasAnalysis calling failed in Pass interaction
...PA. Now I am implementing a
Program Dependence Graph(PDG) on LLVM. I have 4 passes here:
1. ProgramDependenceGraph (a *ModulePass *on the highest level)
2. DataDependenceGraph (a Intermediate *FunctionPass*).
3. FlowDependenceAnalysis Pass (a intermediate *FunctionPass*) which uses
llvm built-in AliasAnalysis (-basicaa)
4. AliasAnalysis Pass (LLVM built-in Pass)
When my call chain is
DatadependenceGraph <-- FlowDependenceAnalysis <-- AliasAnalysis
everything is fine and basicaa is executed successfully.
My problem is, *when I use a Module Pass to call a Function Pass, the low
level AliasAnaly...
2012 Apr 06
5
[LLVMdev] Incorrect result in LLVM Alias Analysis
I want to check if the values a and b in the program alias.
int main() {
int *a,*b;
a=(int *)malloc(sizeof(int));
b=(int *)malloc(sizeof(int));
*a=10;
*b=8;
return 0;
}
I use the below code for this (getAnalysisUsage method has been defined)
AliasAnalysis::Location loc1=AliasAnalysis::Location(k1); //a
AliasAnalysis::Location loc2=AliasAnalysis::Location(k2); //b
AliasAnalysis::AliasResult ar=AA.alias(loc1,loc2);
But I get ar=1 i.e May Alias result. Where am I going wrong? I have
included -basicaa option in the opt command for running this.
-------...
2014 Apr 24
4
[LLVMdev] writing an alias analysis pass?
Hi,
I'm attempting to do some alias analysis & other memory inspection. I've
written a pointless AliasAnalysis pass (that says everything must alias) to
attempt to verify that my pass is getting picked up & run by opt.
I run opt with: opt -load ~/Applications/llvm/lib/MustAA.so -must-aa
-aa-eval -debug < trace0.ll
I see my pass being initialized, but never being called (I see only may
alias results...
2012 Mar 07
3
[LLVMdev] Alias analysis result
Hello everyone,
I am trying to find the alias between a store instruction's pointer operand
and function arguments. This is the code,
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequiredTransitive<AliasAnalysis>();
AU.addPreserved<AliasAnalysis>();
}
virtual bool runOnFunction(Function &F) {
AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
for(Function::iterator i=F.begin();i!=F.end();++i){
for(BasicBlock::iterator j=i->begin();j!=i->...
2012 Apr 06
0
[LLVMdev] Incorrect result in LLVM Alias Analysis
...to check if the values a and b in the program alias.
>
> int main() {
> int *a,*b;
> a=(int *)malloc(sizeof(int));
> b=(int *)malloc(sizeof(int));
> *a=10;
> *b=8;
> return 0;
> }
>
> I use the below code for this (getAnalysisUsage method has been defined)
>
> AliasAnalysis::Location loc1=AliasAnalysis::Location(k1); //a
> AliasAnalysis::Location loc2=AliasAnalysis::Location(k2); //b
> AliasAnalysis::AliasResult ar=AA.alias(loc1,loc2);
>
> But I get ar=1 i.e May Alias result. Where am I going wrong?
did you run a basic set of optimizers first? Alias anal...
2008 Dec 10
2
[LLVMdev] AliasAnalysis tutorial 2
...ith
existing AA (andersen for example) : when calling with opt, this works
well, but
when adding in local PassManager ( with add() ), it is not working (I
test this with
the DeadStoreEliminationPass which performs an AA).
In particular, the pass is run (runOnFunction) but the derived method from
AliasAnalysis (like 'alias' or 'getModRefInfo') are not chained with
those from
basicAA when needed.
Now, i'm trying to understand how opt, RegisterPass, RegisterAnalysisGroup
etc, are working, but it is quite difficult (very high level C++!)
Thank you.
Julien
John Criswell a écrit :
&...
2012 Apr 13
2
[LLVMdev] Incorrect result in LLVM Alias Analysis
...(int *)malloc(sizeof(int));
*a=15;
map(a);
return 0;
}
I want to check if the pointer operand of each store instruction aliases
with the function's arguments. I have used below code for this,
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequiredTransitive<AliasAnalysis>();
AU.addPreserved<AliasAnalysis>();
}
virtual bool runOnFunction(Function &F) {
AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
for(Function::iterator i=F.begin();i!=F.end();++i){
for(BasicBlock::iterator j=i->begin();j!=i->end();++j)
{...
2012 Feb 15
2
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Just want to test out the LLVM's AliasAnalysis::getModRefInfo API. The
input C code is very simple:
void foo(int *a, int *b)
{
for(int i=0; i<10; i++)
b[i] = a[i]*a[i];
}
int main()
{
int a[10];
int b[10];
for(int i=0; i<10; i++)
a[i] = i;
foo(a,b);
return 0;
}
Obviously, for "foo", it only reads from a...
2008 Dec 10
0
[LLVMdev] AliasAnalysis tutorial 2
...r example) : when calling with opt, this works
> well, but
> when adding in local PassManager ( with add() ), it is not working (I
> test this with
> the DeadStoreEliminationPass which performs an AA).
> In particular, the pass is run (runOnFunction) but the derived method from
> AliasAnalysis (like 'alias' or 'getModRefInfo') are not chained with
> those from
> basicAA when needed.
>
> Now, i'm trying to understand how opt, RegisterPass, RegisterAnalysisGroup
> etc, are working, but it is quite difficult (very high level C++!)
>
> Thank you.
>...
2013 Sep 05
1
[LLVMdev] why functionattrs doesn't add dependency of AliasAnalysis
...Manager.cpp:616: void
llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI &&
"Expected required passes to be initialized"' failed.
The strangest thing is the opt doesn't suffer from this issue. please note
that directly use -functionattrs, it can run without AliasAnalysis. Could
you explain why?
liuxin at rd58:~/testbed$ opt -functionattrs -debug-pass=Structure < pf.bc >
/dev/null
Pass Arguments: -targetlibinfo -no-aa -basiccg -functionattrs -preverify
-domtree -verify
Target Library Information
No Alias Analysis (always returns 'may' alias)
Modu...
2008 Dec 09
0
[LLVMdev] AliasAnalysis tutorial 2
...ur own C++ tool that creates a PassManager object and
then explicitly adds passes using the add() method of PassManager. Is
this correct?
In that case, I think all you need to do is to explicitly specify your
alias analysis as one of the passes to run:
PassManager Passes;
Passes.add (new YourAliasAnalysisPass());
Passes.add (new WhateverPassUsesTheAliasAnalysisInterface());
Creating a pass in the AliasAnalysis group doesn't mean that it will
automatically be run when an alias analysis is needed. Rather, what it
means is that *if* a pass requests an AliasAnalysis group pass *and*
your pass h...
2008 Dec 09
2
[LLVMdev] AliasAnalysis tutorial
Hi !
I'm writting an AliasAnalysis using the online tutorial
(http://www.llvm.org/docs/AliasAnalysis.html).
My problem is to chain this pass (function Pass in my case) with the
basicAA ...
I know that my pass is running (runOnFunction) but the virtual methods
derived from AliasAnalysis
(alias, getModRefInfo, etc ... ) are never...
2008 Dec 09
1
[LLVMdev] AliasAnalysis tutorial 2
Hi !
In my quest of implementing my own AA, i understood that it doesn't work
because i don't use the 'opt' tool but i create my own PassManager (this
for other reasons).
The problem is the same with other existing AA (AndersensPass or
globalModRefPass) :
these AApasses are not chained with the basicAA when they are created in
PassManager ...
So my question is now : how to
2014 Apr 29
4
[LLVMdev] writing an alias analysis pass?
...3 PM, Jingyue Wu <jingyue at google.com> wrote:
>
>
>
> On Thu, Apr 24, 2014 at 4:38 PM, Matthew O'Connor <thegreendragon at gmail.com> wrote:
> Hi,
>
> I'm attempting to do some alias analysis & other memory inspection. I've written a pointless AliasAnalysis pass (that says everything must alias) to attempt to verify that my pass is getting picked up & run by opt.
>
> I run opt with: opt -load ~/Applications/llvm/lib/MustAA.so -must-aa -aa-eval -debug < trace0.ll
>
> I see my pass being initialized, but never being called (I see on...
2015 Jun 13
7
[LLVMdev] AliasAnalysis refactoring for the new pass manager
...efactoring the alias analysis layers to remove the usage of
analysis groups and make the logic sharable between old and new pass
managers, and I have a couple of questions below.
As background, the overall plan that I've discussed with Hal and a few
others previously is as follows:
- Create an AliasAnalysisManager which is provided by a normal analysis
pass.
- Use type erasure to register classes which conform to the core
AliasAnalysis concept with the AliasAnalysisManager.
- The concept will consist solely of the virtual methods currently on
AliasAnalysis -- all the helpers and such will just be dire...
2012 Apr 11
3
[LLVMdev] Incorrect result in LLVM Alias Analysis
...>>
>> int main() {
>> int *a,*b;
>> a=(int *)malloc(sizeof(int));
>> b=(int *)malloc(sizeof(int));
>> *a=10;
>> *b=8;
>> return 0;
>> }
>>
>> I use the below code for this (getAnalysisUsage method has been defined)
>>
>> AliasAnalysis::Location loc1=AliasAnalysis::Location(k1); //a
>> AliasAnalysis::Location loc2=AliasAnalysis::Location(k2); //b
>> AliasAnalysis::AliasResult ar=AA.alias(loc1,loc2);
>>
>> But I get ar=1 i.e May Alias result. Where am I going wrong?
>
> did you run a basic set of opt...
2010 May 26
2
[LLVMdev] AliasAnalysis as a Loadable Module, Possible 2.6->2.7 issue
Hi all,
First time posting to llvmdev, be gentle :).
I'm working on an AliasAnalysis implementation and running into an
issue on 2.7, that doesn't exist in 2.6 as far as I can tell.
Short version: has anyone been able to load an AliasAnalysis module
into 2.7's opt?
Longer version:
Even with a dummy pass implementation (just returns MayAlias for
everything), I'm getti...
2012 Feb 16
0
[LLVMdev] Wrong AliasAnalysis::getModRefInfo result
Something must be wrong, more probable on my side. So the C source code is
unchanged, I just did another experiment to first extract all the GEPs in
the code, and call AliasAnalysis::alias on each pair of GEPs. Here is the
code:
AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
TargetData &TD = getAnalysis<TargetData>();
for (Module::iterator it = M.begin(); it != M.end(); it++){
Function &F = *it;
errs().write_escape...
2012 Jan 03
2
[LLVMdev] AliasAnalysis and memory dependency
Hi all,
I want to find memory dependency between CallInst instruction and other.
So i used the following code:
* AliasAnalysis &AA=getAnalysis<AliasAnalysis>();*
* if(isa<StoreInst>(inst1)){*
* ** **if(isa<CallInst>(inst2))**{*
* CallInst *call_inst2= dyn_cast<CallInst>(inst2); *
* if(AA.getModRefInfo(inst1,call_inst2)==mod)**{*
* //*
* } *
*...
2013 Apr 17
2
[LLVMdev] alias analysis in backend
Hi Hal,
Thanks. How about a symbol with two different immediate offsets - the Value* would be the same, right? I don't see how AliasAnalysis::Location would handle this... And BasicAliasAnalysis does
if (V1 == V2) return MustAlias;
, so I'm not sure how this would be done .. ?
/Jonas
> -----Original Message-----
> From: Hal Finkel [mailto:hfinkel at anl.gov]
> Sent: Tuesday, April 16, 2013 7:35 PM
> To: Jonas Pauls...