You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Name locally allocated variables by their real name.
If an array is allocated locally in a function (rather than globally or
passed via function arguments), LLVM may emit IR that does not use the
original source name, as in:
float elems[4];
becomes:
%13 = alloca float, i64 %12, align 16, !dbg !1416
tail call void @llvm.dbg.declare(metadata !{float* %13}, metadata
!495), !dbg !1416
Originally, the variable could only be identified by the slot number
13, but the actual name (elems) is stored in debug information. This
patch will identify this case, search for the debug declare call,
extract the name of the variable, and store it for future usage.
In the past, a load from elems would generate the following output for a
GEP in the dynamic trace:
0,54,func_name,43,50,29,824880
2,64,0,1,indvars.iv,
1,64,140727758711584,1,13,
r,64,140727758711584,1,50,
And now, the third line becomes:
1,64,140727758711584,1,elems,
Change-Id: I07e8ddc3f12cdaeeee6a3d41e8a39816eab8fa57
0 commit comments