[PATCH] D56467: [MemorySSA] Remove optimized value when reseting optimized.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 8 17:15:52 PST 2019
asbirlea created this revision.
asbirlea added a reviewer: george.burgess.iv.
Herald added subscribers: Prazek, jlebar, sanjoy.
If we don't reset the optimized value O for access A, even though A is no longer optimized to O, A will still show up in that O's users list.
This fails verification when hoisting a Def outside a loop, even though the updates are correct.
The reason is that the phi in the loop header still find as user the hoisted def, because the Def has a pointer to the Phi in its optimized operand.
Repository:
rL LLVM
https://reviews.llvm.org/D56467
Files:
include/llvm/Analysis/MemorySSA.h
Index: include/llvm/Analysis/MemorySSA.h
===================================================================
--- include/llvm/Analysis/MemorySSA.h
+++ include/llvm/Analysis/MemorySSA.h
@@ -404,6 +404,7 @@
void resetOptimized() {
OptimizedID = INVALID_MEMORYACCESS_ID;
+ setOperand(1, nullptr);
}
void print(raw_ostream &OS) const;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56467.180773.patch
Type: text/x-patch
Size: 352 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190109/8a194f37/attachment.bin>
More information about the llvm-commits
mailing list