OSDN Git Service

Mark that SpeculativeExecution preserves Globals Alias Analysis.
authorKristof Beyls <kristof.beyls@arm.com>
Tue, 3 May 2016 08:33:26 +0000 (08:33 +0000)
committerKristof Beyls <kristof.beyls@arm.com>
Tue, 3 May 2016 08:33:26 +0000 (08:33 +0000)
commite3e438a4cd0541646a7301eaef8a33ac4d59c5e5
treecadedf89c14def3aaecb62c0e6db89c320ee6774
parent6386c04b9ee4b5f44520f36d291026689b07eb5d
Mark that SpeculativeExecution preserves Globals Alias Analysis.

A few benchmarks with lots of accesses to global variables in the hot
loops regressed a lot since r266399, which added the
SpeculativeExecution pass to the default pipeline. The problem is that
this pass doesn't mark Globals Alias Analysis as preserved. Globals
Alias Analysis is computed in a module pass, whereas
SpeculativeExecution is a function pass, and a lot of passes dependent
on the Globals Alias Analysis to optimize these benchmarks are also
function passes. As such, the Globals Alias Analysis information cannot
be recomputed between SpeculativeExecution and the following function
passes needing that information.

SpeculativeExecution doesn't invalidate Globals Alias Analysis, so mark
it as such to fix those performance regressions.

Differential Revision: http://reviews.llvm.org/D19806

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268370 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SpeculativeExecution.cpp
test/Transforms/PhaseOrdering/globalaa-retained.ll [new file with mode: 0644]