diff options
| author | Nicolas Vasilache <ntv@google.com> | 2018-12-07 10:21:52 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 14:22:49 -0700 |
| commit | 879be718a0dda9aa3e98b5ad9f08908418d7f778 (patch) | |
| tree | 707a466acb0166c7a821f0567b3768cc5a2c8cee /mlir/lib/Transforms | |
| parent | db1b9f738104fef5b89447c228d01e4b0d0a7c40 (diff) | |
| download | bcm5719-llvm-879be718a0dda9aa3e98b5ad9f08908418d7f778.tar.gz bcm5719-llvm-879be718a0dda9aa3e98b5ad9f08908418d7f778.zip | |
[MLIR] Fix the name of the MaterializeVectorPass
PiperOrigin-RevId: 224536381
Diffstat (limited to 'mlir/lib/Transforms')
| -rw-r--r-- | mlir/lib/Transforms/MaterializeVectors.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/mlir/lib/Transforms/MaterializeVectors.cpp b/mlir/lib/Transforms/MaterializeVectors.cpp index b5e0f75406e..4c81eb9942d 100644 --- a/mlir/lib/Transforms/MaterializeVectors.cpp +++ b/mlir/lib/Transforms/MaterializeVectors.cpp @@ -194,8 +194,8 @@ struct MaterializationState { DenseMap<const MLValue *, MLValue *> *substitutionsMap; }; -struct MaterializeVectors : public FunctionPass { - MaterializeVectors() : FunctionPass(&MaterializeVectors::passID) {} +struct MaterializeVectorsPass : public FunctionPass { + MaterializeVectorsPass() : FunctionPass(&MaterializeVectorsPass::passID) {} PassResult runOnMLFunction(MLFunction *f) override; @@ -207,7 +207,7 @@ struct MaterializeVectors : public FunctionPass { } // end anonymous namespace -char MaterializeVectors::passID = 0; +char MaterializeVectorsPass::passID = 0; /// Given a shape with sizes greater than 0 along all dimensions, /// returns the distance, in number of elements, between a slice in a dimension @@ -641,7 +641,7 @@ static bool emitSlice(MaterializationState *state, /// 3. get the superVectorType for this particular terminator and the /// corresponding hardware vector type (for now limited to F32) /// TODO(ntv): be more general than F32. -/// 4. emit the transitive useDef set to operate on the finer grain vector +/// 4. emit the transitive useDef set to operate on the finer-grain vector /// types. /// /// Notes @@ -709,7 +709,7 @@ static bool materialize(MLFunction *f, return false; } -PassResult MaterializeVectors::runOnMLFunction(MLFunction *f) { +PassResult MaterializeVectorsPass::runOnMLFunction(MLFunction *f) { using matcher::Op; LLVM_DEBUG(dbgs() << "\nMaterializeVectors on MLFunction\n"); LLVM_DEBUG(f->print(dbgs())); @@ -736,17 +736,15 @@ PassResult MaterializeVectors::runOnMLFunction(MLFunction *f) { terminators.insert(cast<OperationStmt>(m.first)); } - // Call materialization. auto fail = materialize(f, terminators, &state); - return fail ? PassResult::Failure : PassResult::Success; } -FunctionPass *mlir::createMaterializeVectors() { - return new MaterializeVectors(); +FunctionPass *mlir::createMaterializeVectorsPass() { + return new MaterializeVectorsPass(); } -static PassRegistration<MaterializeVectors> +static PassRegistration<MaterializeVectorsPass> pass("materialize-vectors", "Materializes super-vectors to vectors of the " "proper size for the hardware"); |

