[LoopDist] Port to new PM
authorAdam Nemet <anemet@apple.com>
Mon, 18 Jul 2016 16:29:27 +0000 (16:29 +0000)
committerAdam Nemet <anemet@apple.com>
Mon, 18 Jul 2016 16:29:27 +0000 (16:29 +0000)
commitb2593f78cabbea2703d6442c016638740fe5f660
tree9f06e403d90ba5b30f94d26ffbe010e168a56091
parent79ac42a5c99135ed6ecf8c011471d42ec5269f6c
[LoopDist] Port to new PM

Summary:
The direct motivation for the port is to ensure that the OptRemarkEmitter
tests work with the new PM.

This remains a function pass because we not only create multiple loops
but could also version the original loop.

In the test I need to invoke opt
with -passes='require<aa>,loop-distribute'.  LoopDistribute does not
directly depend on AA however LAA does.  LAA uses getCachedResult so
I *think* we need manually pull in 'aa'.

Reviewers: davidxl, silvas

Subscribers: sanjoy, llvm-commits, mzolotukhin

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

llvm-svn: 275811
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/Scalar/LoopDistribute.h [new file with mode: 0644]
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/Scalar/LoopDistribute.cpp
llvm/lib/Transforms/Scalar/Scalar.cpp
llvm/test/Transforms/LoopDistribute/diagnostics-with-hotness-lazy-BFI.ll
llvm/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll