[PATCH] D87027: [MemCpyOptimizer] Change required analysis order for BasicAA/PhiValuesAnalysis

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 06:58:41 PDT 2020


dmgreen created this revision.
dmgreen added reviewers: asbirlea, fhahn, efriedma.
Herald added subscribers: nikic, kerbowa, hiraditya, nhaehnle, jvesely.
Herald added a project: LLVM.
dmgreen requested review of this revision.

This is a followup to D74494 <https://reviews.llvm.org/D74494>, which made a number of changes including the apparently innocuous reordering of required passes in MemCpyOptimizer. This however altered the creation order of BasicAA vs Phi Values analysis, meaning BasicAA did not pick up PhiValues as a cached result. Instead if we require MemoryDependence first it will require PhiValuesAnalysis allowing BasicAA to use it for better results.

I don't claim this is an excellent design, but it fixes a nasty little regressions we got from D74494 <https://reviews.llvm.org/D74494> where a query later in JumpThreading was getting worse results.


https://reviews.llvm.org/D87027

Files:
  llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
  llvm/test/CodeGen/AMDGPU/opt-pipeline.ll
  llvm/test/Other/opt-O2-pipeline.ll
  llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
  llvm/test/Other/opt-O3-pipeline.ll
  llvm/test/Other/opt-Os-pipeline.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87027.289434.patch
Type: text/x-patch
Size: 5384 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200902/6b8892db/attachment.bin>


More information about the llvm-commits mailing list