[PATCH] D23927: GVN-hoist: invalidate MD cache (PR29144)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 09:05:25 PDT 2016
sebpop created this revision.
sebpop added a reviewer: dberlin.
sebpop added a subscriber: llvm-commits.
Without invalidating the entries in the MD cache we would try to access instructions
that were removed in previous iterations of hoisting.
https://reviews.llvm.org/D23927
Files:
llvm/lib/Transforms/Scalar/GVNHoist.cpp
Index: llvm/lib/Transforms/Scalar/GVNHoist.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/GVNHoist.cpp
+++ llvm/lib/Transforms/Scalar/GVNHoist.cpp
@@ -847,6 +847,8 @@
Repl->intersectOptionalDataWith(I);
combineKnownMetadata(Repl, I);
I->replaceAllUsesWith(Repl);
+ // Also invalidate the Alias Analysis cache.
+ MD->removeInstruction(I);
I->eraseFromParent();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23927.69385.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160826/cf0fbd45/attachment.bin>
More information about the llvm-commits
mailing list