This is an archive of the discontinued LLVM Phabricator instance.

[Attributor] Remove notional overindexing check
ClosedPublic

Authored by nikic on Jan 13 2022, 1:51 AM.

Details

Summary

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, this is the last usage of isGEPWithNoNotionalOverIndexing() and I'd like to get rid of it.

Diff Detail

Event Timeline

nikic created this revision.Jan 13 2022, 1:51 AM
nikic requested review of this revision.Jan 13 2022, 1:51 AM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
ormris removed a subscriber: ormris.Jan 18 2022, 9:49 AM
jdoerfert accepted this revision.Jan 18 2022, 9:57 AM

LG, see comment

llvm/lib/Transforms/IPO/AttributorAttributes.cpp
1185

dyn_cast? I agree we can drop the indices check. We need to verify it's a GEP though, at least given the code as it is.

This revision is now accepted and ready to land.Jan 18 2022, 9:57 AM
nikic added inline comments.Jan 18 2022, 10:42 AM
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
1185

Ooops, this was indeed supposed to be dyn_cast. Thanks for catching!

This revision was automatically updated to reflect the committed changes.