[llvm] [TBAA] Fix the case where a subobject gets accessed at a non-zero offset. (PR #101485)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 12:17:36 PDT 2024
================
@@ -613,12 +613,13 @@ static bool mayBeAccessToSubobjectOf(TBAAStructTagNode BaseTag,
}
if (BaseType.getNode() == SubobjectTag.getBaseType()) {
----------------
efriedma-quic wrote:
I think I see... the old code detects whether both accesses refer to the same object, but we also care about overlapping objects. According to the TBAA rules, objects have to be properly nested. So the only way to get overlap is if one of the accesses is a "whole-object" access. Therefore, this check.
LangRef says "the access type is a scalar type descriptor", which I guess isn't accurate? Please propose a patch to fix the language there.
https://github.com/llvm/llvm-project/pull/101485
More information about the llvm-commits
mailing list