hc2428 at columbia.edu
2009-May-08 00:07 UTC
[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: void ({ }*)* @llvm.dbg.func.start, void ({ }*, { }*)* @llvm.dbg.declare, void ({ }*, { }*)* @llvm.dbg.declare, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void ({ }*)* @llvm.dbg.region.end AliasSet[0xea7040,1] must alias, Mod/Ref Pointers: (i32** %XX, 8) AliasSet[0xea6d40,1] must alias, Mod Pointers: (i32** %YY, 8) AliasSet[0xea6ec0,1] must alias, Mod/Ref Pointers: (i32* %0, 4) AliasSet[0xea67d0,1] must alias, Mod/Ref Pointers: (i32* %retval, 4) The output for -steens-aa in poolalloc module is: Alias Set Tracker: 5 alias sets for 4 pointer values. AliasSet[0xeb0e20,0] may alias, Mod/Ref 10 Call Sites: void ({ }*)* @llvm.dbg.func.start, void ({ }*, { }*)* @llvm.dbg.declare, void ({ }*, { }*)* @llvm.dbg.declare, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void ({ }*)* @llvm.dbg.region.end AliasSet[0xeb5a20,1] must alias, Mod/Ref Pointers: (i32** %XX, 8) AliasSet[0xebb210,1] must alias, Mod Pointers: (i32** %YY, 8) AliasSet[0xebabb0,1] must alias, Mod/Ref Pointers: (i32* %0, 4) AliasSet[0xebac10,1] must alias, Mod/Ref Pointers: (i32* %retval, 4) 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? Sorry I am just a freshman to the alias analysis area, please shed some light on the understanding of the output formats. Best, Heming
Eli Friedman
2009-May-08 00:19 UTC
[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
hc2428 at columbia.edu
2009-May-08 00:29 UTC
[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, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void (i32, i32, { }*)* @llvm.dbg.stoppoint, void ({ }*)* @llvm.dbg.region.end AliasSet[0xeb81e0,1] must alias, Mod/Ref Pointers: (i32** @XX, 8) AliasSet[0xea5fc0,1] must alias, Mod Pointers: (i32** @YY, 8) AliasSet[0xeab830,1] must alias, Mod/Ref Pointers: (i32* %0, 4) AliasSet[0xea5e70,1] must alias, Mod/Ref Pointers: (i32* %retval, 4) I am sure that the XX and YY are global: @XX = common global i32* null ; <i32**> [#uses=4] @YY = common global i32* null ; <i32**> [#uses=3] would you please tell me more details? Thanks, Heming> 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 > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Seemingly Similar Threads
- [LLVMdev] Some questions on the output formats of AliasSetTracker
- [LLVMdev] Some questions on the output formats of AliasSetTracker
- [LLVMdev] Some questions on the output formats of AliasSetTracker
- [LLVMdev] AliasSetTracker and UnknownInst's (callsites mostly) problem
- [LLVMdev] Possible issue with DenseMap when using AliasSetTracker