[LoopExtract][NewPM] Port -loop-extract to NPM
authorArthur Eubanks <aeubanks@google.com>
Wed, 7 Oct 2020 21:40:35 +0000 (14:40 -0700)
committerArthur Eubanks <aeubanks@google.com>
Wed, 14 Oct 2020 05:55:42 +0000 (22:55 -0700)
commit518ec05a104a237b6ccae20e1e84c2b462fc3ca1
tree1e83529e3eb9e1b563c9fccacd4cf9ee9f8069e1
parent9670a45c980c371c5ece8047a00b8b2abec73823
[LoopExtract][NewPM] Port -loop-extract to NPM

-loop-extract-single is just -loop-extract on one loop.

-loop-extract depended on -break-crit-edges and -loop-simplify in the
legacy PM, but the NPM doesn't allow specifying pass dependencies like
that, so manually add those passes to the RUN lines where necessary.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D89016
18 files changed:
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/IPO/LoopExtractor.h [new file with mode: 0644]
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/IPO/IPO.cpp
llvm/lib/Transforms/IPO/LoopExtractor.cpp
llvm/test/Transforms/CodeExtractor/2004-03-13-LoopExtractorCrash.ll
llvm/test/Transforms/CodeExtractor/2004-03-14-DominanceProblem.ll
llvm/test/Transforms/CodeExtractor/2004-03-14-NoSwitchSupport.ll
llvm/test/Transforms/CodeExtractor/2004-03-17-MissedLiveIns.ll
llvm/test/Transforms/CodeExtractor/2004-03-17-UpdatePHIsOutsideRegion.ll
llvm/test/Transforms/CodeExtractor/2004-03-18-InvokeHandling.ll
llvm/test/Transforms/CodeExtractor/BlockAddressReference.ll
llvm/test/Transforms/CodeExtractor/BlockAddressSelfReference.ll
llvm/test/Transforms/CodeExtractor/LoopExtractor.ll
llvm/test/Transforms/CodeExtractor/LoopExtractor_alloca.ll
llvm/test/Transforms/CodeExtractor/LoopExtractor_crash.ll
llvm/test/Transforms/CodeExtractor/LoopExtractor_min_wrapper.ll