HomePhabricator

[MemCpyOptimizer] Change required analysis order for BasicAA/PhiValuesAnalysis

Authored by dmgreen on Sep 3 2020, 4:01 AM.

Description

[MemCpyOptimizer] Change required analysis order for BasicAA/PhiValuesAnalysis

This is a followup to 1ccfb52a61748, 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 where a query later in JumpThreading was getting worse
results.

Differential Revision: https://reviews.llvm.org/D87027

Details