aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riddleriver@gmail.com>2020-04-07 13:56:16 -0700
committerRiver Riddle <riddleriver@gmail.com>2020-04-07 14:08:52 -0700
commit80aca1eaf778a58458833591e82b74647b5b7280 (patch)
treef38add6f74980acce56446dd2db7d238f3d0efa4 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
parent722f909f7aa1d5ab21f68eb8ce1baf109cc5bb13 (diff)
downloadllvm-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.cpp3
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"