search for: aliasset

Displaying 20 results from an estimated 131 matches for "aliasset".

2009 May 08
2
[LLVMdev] Some questions on the output formats of AliasSetTracker
Dear Staff, Here are some questions on the output formats of AliasSetTracker. The code is as below: int G1 = 9; int G2 = 5; int main() { int * XX; int * YY; XX = &G1; YY = XX; YY = &G2; XX = &G2; } The output for -anders-aa is: Alias Set Tracker: 5 alias sets for 4 pointer values. AliasSet[0xea6fb0,0] may alias, Mod/Ref 10 Call Sites...
2015 Jul 28
1
[LLVMdev] AliasSetTracker and UnknownInst's (callsites mostly) problem
Hi all, There is a problem about how AliasSetTracker merging AliasSet's when meet UnknownInst. When adding new pointer it looks for existing AliasSet's aliased with new pointer. And merging them together. It is ok for pointers: if %A mayalias %B and %B mayalias %C then %A mayalias %C. But the same logic when adding callsite is wrong...
2016 Jan 27
2
Skip redundant checks in AliasSet::aliasesUnknownInst
...vroman at gmail.com>> wrote: > > Thank you for the idea! Could you please explain it? > > > Which part are you having trouble with, so i know where to concetrate? > > If I’m not > mistaken, you advise to insert the unknown insts of an every AS from > AliasSetTracker::add(const AliasSetTracker &AST) into a smallptrset > and consequently append it to merged alias sets from > AliasSetTracker::findAliasSetForUnknownInst. > > > Well, no. This is not the only place duplication can occur, because > the merging of unknownInsts can...
2009 May 08
1
[LLVMdev] Some questions on the output formats of AliasSetTracker
Quoting Eli Friedman <eli.friedman at gmail.com>: Dear Eli, Thanks very much for your reply. I have modified the XX and YY to be global variables, but the output of AliasSetTracker are still MUST alias: Alias Set Tracker: 5 alias sets for 4 pointer values. AliasSet[0xea55d0,0] may alias, Mod/Ref 8 Call Sites: void ({ }*)* @llvm.dbg.func.start, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @...
2009 May 08
0
[LLVMdev] Some questions on the output formats of AliasSetTracker
Dear Staff, Here are some questions on the output formats of AliasSetTracker. The code is as below: int G1 = 9; int G2 = 5; int main() { int * XX; int * YY; XX = &G1; YY = XX; YY = &G2; XX = &G2; } The output for -anders-aa is (the command is: opt -anders-aa test.bc -disable-output -print-al...
2013 Nov 11
2
[LLVMdev] What's the Alias Analysis does clang use ?
...etelementptr inbounds float* %1, i64 1 LICM hoisting to entry: %5 = load float** %v2.addr, align 8 LICM hoisting to entry: %arrayidx2 = getelementptr inbounds float* %2, i64 1 LICM hoisting to entry: %12 = load float** %t.addr, align 8 Alias Set Tracker: 10 alias sets for 13 pointer values. AliasSet[0x1b7e800, 1] must alias, Mod/Ref Pointers: (float** %v0.addr, 8) AliasSet[0x1b7d7e0, 1] must alias, Mod/Ref Pointers: (float** %v1.addr, 8) AliasSet[0x1b7d8a0, 1] must alias, Mod/Ref Pointers: (float** %v2.addr, 8) AliasSet[0x1b912e0, 1] must alias, Mod/Ref Pointers: (float** %t.addr...
2013 Nov 12
0
[LLVMdev] What's the Alias Analysis does clang use ?
...* > %1, i64 1 > LICM hoisting to entry: %5 = load float** %v2.addr, align 8 > LICM hoisting to entry: %arrayidx2 = getelementptr inbounds float* > %2, i64 1 > LICM hoisting to entry: %12 = load float** %t.addr, align 8 > Alias Set Tracker: 10 alias sets for 13 pointer values. > AliasSet[0x1b7e800, 1] must alias, Mod/Ref Pointers: (float** > %v0.addr, 8) > AliasSet[0x1b7d7e0, 1] must alias, Mod/Ref Pointers: (float** > %v1.addr, 8) > AliasSet[0x1b7d8a0, 1] must alias, Mod/Ref Pointers: (float** > %v2.addr, 8) > AliasSet[0x1b912e0, 1] must alias, Mod/Ref Pointers:...
2013 Jan 22
1
[LLVMdev] Confusion about Alias Analysis Results -print-no-aliases&&-print-alias-sets
...------------------------------------</div><div>$clang++ -emit-llvm -S uaf.cpp -o uaf.ll</div><div>$opt -globalsmodref-aa -basicaa -scev-aa -print-alias-sets uaf.ll</div><div><div>Alias Set Tracker: 4 alias sets for 7 pointer values.</div><div> AliasSet[0x93a80b8, 1] must alias, Mod Pointers: (i32* %retval, 4)</div><div> AliasSet[0x93a80e0, 4] may alias, Mod/Ref Pointers: (void (%class.B*)*** %4, 4), (void (%class.B*)** %vfn, 4), (void (%class.B*)*** %9, 4), (void (%class.B*)** %vfn2, 4)</div><div> 6 Unknown ins...
2014 Sep 29
2
[LLVMdev] Alias Analysis across functions
...} return sum1; } int func () { int A[100], B[100]; int i = 0; for (; i < 100; ++i) { A[i] = B[i] = i; } return sum(A,B); } Arguments to opt: "-mem2reg -basicaa -scev-aa -print-alias-sets" Output: Function: func Alias Set Tracker: 2 alias sets for 2 pointer values. AliasSet[0x2bc88b0, 2] may alias, Mod/Ref Pointers: (i32* %A.arrayidx, 4), (i32* %B.arrayidx2, 4) 1 Unknown instructions: i32 %call AliasSet[0x2bc8490, 1] must alias, Mod forwarding to 0x2bc88b0 Function: sum Alias Set Tracker: 1 alias sets for 2 pointer values. AliasSet[0x2bcbb50, 2] may...
2018 Jun 11
4
One more No-alias case on Alias analysis
...ppet is as following: char buf[4]; void test (int idx) { char *a = &buf[3 - idx]; char *b = &buf[idx]; *a = 1; *b = 2; } I can see below output from alias set tracker for above code snippet. Alias sets for function 'test': Alias Set Tracker: 1 alias sets for 2 pointer values.   AliasSet[0x53d8070, 2] may alias, Mod       Pointers: (i8* %arrayidx, 1), (i8* %arrayidx2, 1) As you can see on above code snippet, the 'a' and 'b' are not aliased. I think if we have following offset form, we can say No-alias between them. offset1 = odd_number - index offset2 = index...
2007 Jun 25
2
[LLVMdev] Question about Alias Analysis
...g -basicaa -anders-aa -show-alias-sets) is also shown below. I guess what confuses me is that it doesn't seem like it was able to figure out that *b = a. Am I looking at this wrong? Is there a more accurate way of getting the alias information out of the pass? Thanks, Ben Chambers Output: AliasSet[0x601e70,2] may alias, Mod/Ref Pointers: (i32* %a, 4), (i32* %tmp1, 4) AliasSet[0x601ea0,1] must alias, Mod/Ref Pointers: (i32** %b, 4) AliasSet[0x601f10,1] must alias, Mod/Ref Pointers: (i32* %tmp, 4) AliasSet[0x601f60,1] must alias, Mod/Ref Pointers: (i32* %retval, 4) Input: int mai...
2016 Jan 27
2
Skip redundant checks in AliasSet::aliasesUnknownInst
Thank you for the idea! Could you please explain it? If I’m not mistaken, you advise to insert the unknown insts of an every AS from AliasSetTracker::add(const AliasSetTracker &AST) into a smallptrset and consequently append it to merged alias sets from AliasSetTracker::findAliasSetForUnknownInst. I think that Philip proposed something similar to your approach in https://llvm.org/bugs/show_bug.cgi?id=23077. 2016-01-24 22:44 GMT+05:0...
2009 May 08
0
[LLVMdev] Some questions on the output formats of AliasSetTracker
On Thu, May 7, 2009 at 5:07 PM, <hc2428 at columbia.edu> wrote: > However, I am a little confused with these output. In Both anders-aa > and steens-aa, XX and YY should stay in the same AliasSet, and their > alias relationship should be May Alias, right? %XX and %YY are the results of alloca instructions (i.e. equivalent to the C expressions "&XX" and "&YY"), so they do not in fact alias. -Eli
2006 Jan 15
1
[LLVMdev] A question about alias analysis
Thank you, Chris. The following is my comprehension about the AliasSetTracker, please correct me. 1. A aliasset "as" represents a memory object, and all pointer "p" in "as" represent values with the type of pointer that may/must point to the memory object "as". 2. If a aliasset is "forwarding", it has been merged t...
2011 Dec 02
0
[LLVMdev] tbaa
Can you post the source code of your test case? Gan On Fri, Dec 2, 2011 at 1:44 PM, <liyi at cs.toronto.edu> wrote: > Hi, > > Could anyone tell me how exactly do I use "Type Based Alias Analysis"? > > I compiled the C program with Clang, and verified that there is tbaa > metadata in the IR code. > > But then when I use "opt -tbaa input.c.bc
2006 Jan 15
1
[LLVMdev] A question about alias analysis
Oh, your meaning is pointers in a aliasset have equal address logically? But I think that two pointers are alias means they point to a same memory object, so if pointers "p" and "q" are alias, it seem as p = q, not &p = &q. Another question is about "forwarding". "AliasSet[XXXX, 0] may alias, M...
2006 May 14
2
[LLVMdev] __main() function and AliasSet
In a code segment of my pass plugin, I try to gather AliasSets for all StoreInst, LoadInst and CallInst instructions in a function. Some behaviors of the pass puzzled me. Below is the *.ll of the test program which I run the pass on, it was get with "llvm-gcc -Wl,--disable-opt" from a rather simple *.c program. ----------------------------------...
2019 Jun 01
2
Question about a AA result and its use in Dependence Analysis
....body ] %q = phi float* [ %h, %entry ], [ %p, %for.body ] %0 = load float, float* %p, align 4 store float undef, float* %q, align 4 %branch_cond = fcmp ugt float %0, 0.0 br i1 %branch_cond, label %for.cond.cleanup, label %for.body } Alias Set Tracker: 2 alias sets for 2 pointer values. AliasSet[0x83e1fe0, 1] must alias, Ref Pointers: (float* %p, LocationSize::precise(4)) AliasSet[0x83e3390, 1] must alias, Mod Pointers: (float* %q, LocationSize::precise(4)) da analyze - %0 = load float, float* %p, align 4 store float undef, float* %q, align 4 none! -----Original Mess...
2018 Apr 15
2
LLVM Alias Analysis (Load and store from same address is not showed up in same set)
...lo world\n"); } int main(){ ind_call(hello); return 0; } So, I do the following: bin/opt -basicaa -cfl-anders-aa -print-alias-sets bin/test/test.bc I get the following result: Alias sets for function 'ind_call': Alias Set Tracker: 2 alias sets for 2 pointer values. AliasSet[0x91a5820, 1] must alias, Mod/Ref Pointers: (i32 ()** %compr.addr, 8) AliasSet[0x91a58c0, 2] may alias, Mod/Ref Pointers: (i32 ()** @fp, 8) 1 Unknown instructions: i32 %call Alias sets for function 'hello': Alias Set Tracker: 1 alias sets for 0 pointer values. AliasSet[0x9...
2006 Jan 14
1
[LLVMdev] A question about alias analysis
Hello, I got a strange result when I used alias analysis DSAA, can you tell what is wrong? 1. The following is the primary body of my pass "fps.cpp": AliasAnalysis *AA = &getAnalysis<AliasAnalysis>(); AliasSetTracker AST(*AA); for (Module::iterator fi = M.begin(), fe = M.end(); fi != fe; ++fi ) for (Function::iterator bi = fi->begin(), be = fi->end(); bi != be; ++bi) AST.add(*bi); for (AliasSetTracker::iterator I = AST.begin(), E = AST.end(); I != E; ++I) { AliasSet &AS = *I; AS...