[llvm] r279907 - GVN-hoist: invalidate MD cache (PR29144)
Sebastian Pop via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 19:48:41 PDT 2016
Author: spop
Date: Fri Aug 26 21:48:41 2016
New Revision: 279907
URL: http://llvm.org/viewvc/llvm-project?rev=279907&view=rev
Log:
GVN-hoist: invalidate MD cache (PR29144)
Without invalidating the entries in the MD cache we would try to access instructions
that were removed in previous iterations of hoisting.
Differential Revision: https://reviews.llvm.org/D23927
Modified:
llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp?rev=279907&r1=279906&r2=279907&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp Fri Aug 26 21:48:41 2016
@@ -846,6 +846,8 @@ private:
Repl->intersectOptionalDataWith(I);
combineKnownMetadata(Repl, I);
I->replaceAllUsesWith(Repl);
+ // Also invalidate the Alias Analysis cache.
+ MD->removeInstruction(I);
I->eraseFromParent();
}
More information about the llvm-commits
mailing list