[PATCH] D65338: [MemorySSA] Extend allowed behavior for simplified instructions.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 10:52:12 PDT 2019
asbirlea added inline comments.
================
Comment at: lib/Analysis/MemorySSAUpdater.cpp:538
CloneWasSimplified ? nullptr : MUD);
- MSSA->insertIntoListsForBlock(NewUseOrDef, NewBB, MemorySSA::End);
+ if (NewUseOrDef)
+ MSSA->insertIntoListsForBlock(NewUseOrDef, NewBB, MemorySSA::End);
----------------
george.burgess.iv wrote:
> `NewUseOrDef` should always be non-null, no?
No, this can now be null.
Say we have a simplified instruction such that the clone is not a `MemoryAccess`. We pass the `Template` as nullptr to `createDefinedAccess`, and inside it we call `createNewAccess` which will return nullptr. Since we didn't pass a `Template`, the assertion won't hit, i.e. once the instruction is simplified we cannot rely on the Template info, and we can no longer assume we will actually create a MemoryAccess.
Does this make sense?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65338/new/
https://reviews.llvm.org/D65338
More information about the llvm-commits
mailing list