[PATCH] D93529: [AA] Store and return estimated PartialAlias offsets.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 23 01:31:35 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1207
+ // cache.
+ if ((Off + VRightSize->getValue()).ule(VLeftSize->getValue()))
+ AAQI.setClobberOffset({LeftPtr, RightPtr}, Off.getSExtValue());
----------------
I'm not sure this code is the right place to perform these access size checks. Consider the case where BatchAA is queried for the same pointers with different location sizes in a row. The first query is such that they are PartialAlias and the LocationSize fits into the larger access. The second one is also PartialAlias, but does not fit. In this case, the getClobberOffset() API will still return a result though, and a caller may incorrectly assume that the access is nested based on this check, even though it isn't.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93529/new/
https://reviews.llvm.org/D93529
More information about the llvm-commits
mailing list