Displaying 2 results from an estimated 2 matches for "samememberaccess".
2019 Jun 05
2
llvm-ir: TBAA and struct copies
...the access size, I do see a possible solution:
in TypeBasedAliasAnalysis.cpp, in function bool mayBeAccessToSubobjectOf(...):
https://github.com/llvm/llvm-project/blob/master/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp#L619
if (BaseType.getNode() == SubobjectTag.getBaseType()) {
bool SameMemberAccess = OffsetInBase == SubobjectTag.getOffset(); // **** HERE
if (GenericTag) {
*GenericTag = SameMemberAccess ? SubobjectTag.getNode() :
createAccessTag(CommonType);
}
MayAlias = SameMemberAccess;
return true;
}
For...
2019 Jun 04
2
llvm-ir: TBAA and struct copies
Hi,
I have a question about the current definition of TBAA (See [1]).
In the LLVM-IR code that we produce, we generate load/stores of struct types. (See [2] and [3] for a godbolt example showing the issue)
For following c-alike code:
struct S { int dummy; short e, f; } x,y;
struct S* p = &x;
int foobar() {
x.f=42;
*p=y; //**** struct copy
return x.f;
}
We produce: