Skip to content

Commit

Permalink
Let CorrelatedValuePropagation preserve LazyValueInfo
Browse files Browse the repository at this point in the history
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

llvm-svn: 366942
  • Loading branch information
davidbolvansky committed Jul 24, 2019
1 parent 70964d4 commit d2904cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
Expand Up @@ -85,6 +85,7 @@ namespace {
AU.addRequired<LazyValueInfoWrapperPass>();
AU.addPreserved<GlobalsAAWrapperPass>();
AU.addPreserved<DominatorTreeWrapperPass>();
AU.addPreserved<LazyValueInfoWrapperPass>();
}
};

Expand Down Expand Up @@ -796,5 +797,6 @@ CorrelatedValuePropagationPass::run(Function &F, FunctionAnalysisManager &AM) {
PreservedAnalyses PA;
PA.preserve<GlobalsAA>();
PA.preserve<DominatorTreeAnalysis>();
PA.preserve<LazyValueAnalysis>();
return PA;
}

0 comments on commit d2904cc

Please sign in to comment.