[PATCH] D87778: [MemorySSA] Be more conservative when traversing MemoryPhis.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 14:38:00 PDT 2020
asbirlea added a comment.
I'm in favor of being conservative here and checking for only constant indexes on the geps.
================
Comment at: llvm/include/llvm/Analysis/MemorySSA.h:1262
if (Translator.getAddr() != Location.Ptr) {
- CurrentPair.second = Location.getWithNewPtr(Translator.getAddr());
+ CurrentPair.second = Location.getWithNewPtr(Translator.getAddr())
+ .getWithNewSize(LocationSize::unknown());
----------------
I'm not clear that the size should be always unknown after phi translation with different ptr, but feel free to correct me.
Here's my suggestion.
```
if (Translator.getAddr() != Location.Ptr) {
CurrentPair.second = CurrentPair.second.getWithNewPtr(Translator.getAddr());
if (PerformedPhiTranslation)
*PerformedPhiTranslation = true;
} else {
CurrentPair.second = Location.getWithNewSize(LocationSize::unknown());
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87778/new/
https://reviews.llvm.org/D87778
More information about the llvm-commits
mailing list