[MemorySSA] Loop passes should mark MSSA preserved when available.
authorAlina Sbirlea <asbirlea@google.com>
Sat, 17 Aug 2019 01:02:12 +0000 (01:02 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Sat, 17 Aug 2019 01:02:12 +0000 (01:02 +0000)
commitf92109dc01b831304bedc990c41d8ea4bfd0a277
treea12698af0bdebeeff1feb60961f931868fe7ca32
parentedf504f5038b573a3e2f0eedfa7de69ec0ab9e7f
[MemorySSA] Loop passes should mark MSSA preserved when available.

This patch applies only to the new pass manager.
Currently, when MSSA Analysis is available, and pass to each loop pass, it will be preserved by that loop pass.
Hence, mark the analysis preserved based on that condition, vs the current `EnableMSSALoopDependency`. This leaves the global flag to affect only the entry point in the loop pass manager (in FunctionToLoopPassAdaptor).

llvm-svn: 369181
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp
llvm/lib/Transforms/Scalar/LoopRotation.cpp
llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp