Add NoOpLoopNestPass and LOOPNEST_PASS macro
authorWhitney Tsang <whitneyt@ca.ibm.com>
Fri, 5 Nov 2021 15:19:56 +0000 (15:19 +0000)
committerWhitney Tsang <whitneyt@ca.ibm.com>
Fri, 5 Nov 2021 16:11:48 +0000 (16:11 +0000)
commit93421108d2551f91eb33a8c95bc94661ba953b64
tree78d0973a5cf23a7b4c8b03427da5288fd023b88f
parent085accea3c56f6924350b82f499fe20786a12d32
Add NoOpLoopNestPass and LOOPNEST_PASS macro

Having a NoOpLoopNestPass can ensure that only outermost loop is invoked
for a LoopNestPass with a lit test.

There are some existing passes that are implemented as LoopNestPass, but
they are still using LOOP_PASS macro.
It would be easier to identify LoopNestPasses with a LOOPNEST_PASS
macro.

Differential Revision: https://reviews.llvm.org/D113185
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/test/Other/loopnest-pass-ordering.ll [new file with mode: 0644]
llvm/test/Other/print-passes.ll