diff options
author | River Riddle <riddleriver@gmail.com> | 2020-04-07 13:58:12 -0700 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-04-07 14:08:52 -0700 |
commit | 1834ad4a69701d338da1c5e2272e5523e0bbcb49 (patch) | |
tree | c05a2c19fa96e3e6bb463fd37647682fb37fead1 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
parent | 80aca1eaf778a58458833591e82b74647b5b7280 (diff) | |
download | llvm-1834ad4a69701d338da1c5e2272e5523e0bbcb49.zip llvm-1834ad4a69701d338da1c5e2272e5523e0bbcb49.tar.gz llvm-1834ad4a69701d338da1c5e2272e5523e0bbcb49.tar.bz2 |
[mlir][Pass] Update the PassGen to generate base classes instead of utilities
Summary:
This is much cleaner, and fits the same structure as many other tablegen backends. This was not done originally as the CRTP in the pass classes made it overly verbose/complex.
Differential Revision: https://reviews.llvm.org/D77367
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r-- | mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp index e7e48ac..dacd688 100644 --- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp +++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp @@ -10,13 +10,13 @@ // //===----------------------------------------------------------------------===// +#include "PassDetail.h" #include "mlir/Transforms/Passes.h" #include "mlir/IR/Builders.h" #include "mlir/IR/Function.h" #include "mlir/Interfaces/LoopLikeInterface.h" #include "mlir/Interfaces/SideEffects.h" -#include "mlir/Pass/Pass.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" @@ -28,11 +28,7 @@ using namespace mlir; namespace { /// Loop invariant code motion (LICM) pass. struct LoopInvariantCodeMotion - : public PassWrapper<LoopInvariantCodeMotion, OperationPass<>> { -/// Include the generated pass utilities. -#define GEN_PASS_LoopInvariantCodeMotion -#include "mlir/Transforms/Passes.h.inc" - + : public LoopInvariantCodeMotionBase<LoopInvariantCodeMotion> { void runOnOperation() override; }; } // end anonymous namespace |