[PATCH] D59349: Let CorrelatedValuePropagation preserve LazyValueInfo

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 15 11:50:04 PDT 2019


reames added inline comments.


================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:122
   S->replaceAllUsesWith(ReplaceWith);
+  LVI->eraseValue(S);
   S->eraseFromParent();
----------------
I'm confused why we need this.  LVI uses ValueHandles, which should delete the entry from the cache once it's destroyed.  Do you have a test case where that is not happening?


================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:815
   PA.preserve<DominatorTreeAnalysis>();
+  PA.preserve<LazyValueAnalysis>();
   return PA;
----------------
Have you checked the history?  I believe that CVP used to preserve LVI.  Why was that removed?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59349/new/

https://reviews.llvm.org/D59349





More information about the llvm-commits mailing list