diff options
author | River Riddle <riddleriver@gmail.com> | 2020-04-07 13:56:16 -0700 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2020-04-07 14:08:52 -0700 |
commit | 80aca1eaf778a58458833591e82b74647b5b7280 (patch) | |
tree | f38add6f74980acce56446dd2db7d238f3d0efa4 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
parent | 722f909f7aa1d5ab21f68eb8ce1baf109cc5bb13 (diff) | |
download | llvm-80aca1eaf778a58458833591e82b74647b5b7280.zip llvm-80aca1eaf778a58458833591e82b74647b5b7280.tar.gz llvm-80aca1eaf778a58458833591e82b74647b5b7280.tar.bz2 |
[mlir][Pass] Remove the use of CRTP from the Pass classes
This revision removes all of the CRTP from the pass hierarchy in preparation for using the tablegen backend instead. This creates a much cleaner interface in the C++ code, and naturally fits with the rest of the infrastructure. A new utility class, PassWrapper, is added to replicate the existing behavior for passes not suitable for using the tablegen backend.
Differential Revision: https://reviews.llvm.org/D77350
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r-- | mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp index 7407676..e7e48ac 100644 --- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp +++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp @@ -27,7 +27,8 @@ using namespace mlir; namespace { /// Loop invariant code motion (LICM) pass. -struct LoopInvariantCodeMotion : public OperationPass<LoopInvariantCodeMotion> { +struct LoopInvariantCodeMotion + : public PassWrapper<LoopInvariantCodeMotion, OperationPass<>> { /// Include the generated pass utilities. #define GEN_PASS_LoopInvariantCodeMotion #include "mlir/Transforms/Passes.h.inc" |