From: David Bolvansky Date: Wed, 24 Jul 2019 20:27:32 +0000 (+0000) Subject: Let CorrelatedValuePropagation preserve LazyValueInfo X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3d24386b4b61f95038c1c9ef6a90f31f178fcd53;p=llvm Let CorrelatedValuePropagation preserve LazyValueInfo Summary: This patch makes CorrelatedValuePropagation preserve LazyValueInfo by adding LazyValueInfo::eraseValue & calling it whenever an instruction is erased. Passes `make check` , test-suite, and SPECrate 2017. Patch by aqjune (Juneyoung Lee) Reviewers: reames, mzolotukhin Reviewed By: reames Subscribers: xbolva00, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D59349 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366942 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp b/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp index 89497177524..5629debe802 100644 --- a/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp +++ b/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp @@ -85,6 +85,7 @@ namespace { AU.addRequired(); AU.addPreserved(); AU.addPreserved(); + AU.addPreserved(); } }; @@ -796,5 +797,6 @@ CorrelatedValuePropagationPass::run(Function &F, FunctionAnalysisManager &AM) { PreservedAnalyses PA; PA.preserve(); PA.preserve(); + PA.preserve(); return PA; }