[PATCH] D23927: GVN-hoist: invalidate MD cache (PR29144)
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 09:27:14 PDT 2016
Lgtm
On Fri, Aug 26, 2016, 9:07 AM Sebastian Pop <sebpop at gmail.com> wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160826/1309d1e6/attachment.html>
More information about the llvm-commits
mailing list