diff options
| author | Jacques Pienaar <jpienaar@google.com> | 2018-11-06 18:34:18 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 13:49:34 -0700 |
| commit | 6f0fb2272344bf7528066e1554c8cbb78078ae2a (patch) | |
| tree | 71f8e70ec4188a07873ce18f6060709a8bd6be7e /mlir/lib/Transforms/PipelineDataTransfer.cpp | |
| parent | 559e816f3f33cd39d4ca8945b683ee89e75c65e6 (diff) | |
| download | bcm5719-llvm-6f0fb2272344bf7528066e1554c8cbb78078ae2a.tar.gz bcm5719-llvm-6f0fb2272344bf7528066e1554c8cbb78078ae2a.zip | |
Add static pass registration
Add static pass registration and change mlir-opt to use it. Future work is needed to refactor the registration for PassManager usage.
Change build targets to alwayslink to enforce registration.
PiperOrigin-RevId: 220390178
Diffstat (limited to 'mlir/lib/Transforms/PipelineDataTransfer.cpp')
| -rw-r--r-- | mlir/lib/Transforms/PipelineDataTransfer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mlir/lib/Transforms/PipelineDataTransfer.cpp b/mlir/lib/Transforms/PipelineDataTransfer.cpp index c59e007e543..52052e09d7b 100644 --- a/mlir/lib/Transforms/PipelineDataTransfer.cpp +++ b/mlir/lib/Transforms/PipelineDataTransfer.cpp @@ -47,10 +47,14 @@ struct PipelineDataTransfer : public FunctionPass, // Collect all 'for' statements. void visitForStmt(ForStmt *forStmt) { forStmts.push_back(forStmt); } std::vector<ForStmt *> forStmts; + + static char passID; }; } // end anonymous namespace +char PipelineDataTransfer::passID = 0; + /// Creates a pass to pipeline explicit movement of data across levels of the /// memory hierarchy. FunctionPass *mlir::createPipelineDataTransferPass() { @@ -306,3 +310,8 @@ PassResult PipelineDataTransfer::runOnForStmt(ForStmt *forStmt) { return success(); } + +static PassRegistration<PipelineDataTransfer> pass( + "pipeline-data-transfer", + "Pipeline non-blocking data transfers between explicitly managed levels of " + "the memory hierarchy"); |

