HomePhabricator

[BasicAA] Use PhiValuesAnalysis if available when handling phi alias

Description

[BasicAA] Use PhiValuesAnalysis if available when handling phi alias

By using PhiValuesAnalysis we can get all the values reachable from a phi, so
we can be more precise instead of giving up when a phi has phi operands. We
can't make BaseicAA directly use PhiValuesAnalysis though, as the user of
BasicAA may modify the function in ways that PhiValuesAnalysis can't cope with.

For this optional usage to work correctly BasicAAWrapperPass now needs to be not
marked as CFG-only (i.e. it is now invalidated even when CFG is preserved) due
to how the legacy pass manager handles dependent passes being invalidated,
namely the depending pass still has a pointer to the now-dead dependent pass.

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

Details

Committed
john.brawnJul 30 2018, 4:52 AM
Differential Revision
D44564: [BasicAA] Use PhiValuesAnalysis if available when handling phi alias
Parents
rL338241: [clangd] Fix a comment. NFC
Branches
Unknown
Tags
Unknown