diff options
| author | River Riddle <riddleriver@gmail.com> | 2020-04-01 01:50:29 -0700 |
|---|---|---|
| committer | River Riddle <riddleriver@gmail.com> | 2020-04-01 02:10:46 -0700 |
| commit | 9a277af2d429e1d53f65417400583d5ea66d3ed1 (patch) | |
| tree | 82a73475fc5475d96ec44bc5722f9e7aec526614 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
| parent | 3dddd8969f4d5bb05d65c6014934e24795843182 (diff) | |
[mlir][Pass] Add support for generating pass utilities via tablegen
This revision adds support for generating utilities for passes such as options/statistics/etc. that can be inferred from the tablegen definition. This removes additional boilerplate from the pass, and also makes it easier to remove the reliance on the pass registry to provide certain things(e.g. the pass argument).
Differential Revision: https://reviews.llvm.org/D76659
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
| -rw-r--r-- | mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp index 30922484dae0..7407676d5877 100644 --- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp +++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp @@ -28,7 +28,10 @@ using namespace mlir; namespace { /// Loop invariant code motion (LICM) pass. struct LoopInvariantCodeMotion : public OperationPass<LoopInvariantCodeMotion> { -public: +/// Include the generated pass utilities. +#define GEN_PASS_LoopInvariantCodeMotion +#include "mlir/Transforms/Passes.h.inc" + void runOnOperation() override; }; } // end anonymous namespace |
