[PATCH] D117203: [Attributor] Remove notional overindexing check
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 01:51:57 PST 2022
nikic created this revision.
Herald added subscribers: ormris, okura, jdoerfert, kuter, uenoku, arphaman, hiraditya.
Herald added a reviewer: uenoku.
Herald added a reviewer: homerdin.
nikic requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
AAPointerInfo currently bails on constant expression GEPs with notional overindexing. I don't think this is really relevant for this analysis and it should just check for constant indices instead. (Note that it would be fine to not check that either, as there are additional GEPOperator checks below that.)
After D117201 <https://reviews.llvm.org/D117201>, this is the last usage of isGEPWithNoNotionalOverIndexing() and I'd like to get rid of it.
https://reviews.llvm.org/D117203
Files:
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
Index: llvm/lib/Transforms/IPO/AttributorAttributes.cpp
===================================================================
--- llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -1182,7 +1182,8 @@
return HandlePassthroughUser(Usr, OffsetInfoMap[CurPtr], Follow);
if (CE->isCompare())
return true;
- if (!CE->isGEPWithNoNotionalOverIndexing()) {
+ auto *GEP = cast<GEPOperator>(CE);
+ if (!GEP || !GEP->hasAllConstantIndices()) {
LLVM_DEBUG(dbgs() << "[AAPointerInfo] Unhandled constant user " << *CE
<< "\n");
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117203.399594.patch
Type: text/x-patch
Size: 682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220113/c6af1800/attachment.bin>
More information about the llvm-commits
mailing list