[MLIR] Clean up `shape` to `std` lowering

Apply post-commit suggestions to the new lowering.

Differential Revision: https://reviews.llvm.org/D81160
This commit is contained in:
Frederik Gossen 2020-06-08 08:58:06 +00:00
parent 47dff1881f
commit 24edbdf99b
2 changed files with 7 additions and 6 deletions

View File

@ -9,7 +9,7 @@
#ifndef MLIR_CONVERSION_SHAPETOSTANDARD_SHAPETOSTANDARD_H_
#define MLIR_CONVERSION_SHAPETOSTANDARD_SHAPETOSTANDARD_H_
#include "mlir/Transforms/DialectConversion.h"
#include <memory>
namespace mlir {
@ -17,6 +17,7 @@ class MLIRContext;
class ModuleOp;
template <typename T>
class OperationPass;
class OwningRewritePatternList;
void populateShapeToStandardConversionPatterns(
OwningRewritePatternList &patterns, MLIRContext *ctx);

View File

@ -14,7 +14,8 @@
#include "mlir/Dialect/StandardOps/IR/Ops.h"
#include "mlir/Transforms/DialectConversion.h"
namespace mlir {
using namespace mlir;
namespace {
/// Conversion patterns.
@ -90,7 +91,7 @@ class ConvertShapeToStandardPass
} // namespace
void populateShapeToStandardConversionPatterns(
void mlir::populateShapeToStandardConversionPatterns(
OwningRewritePatternList &patterns, MLIRContext *ctx) {
// clang-format off
patterns.insert<
@ -99,8 +100,7 @@ void populateShapeToStandardConversionPatterns(
// clang-format on
}
std::unique_ptr<OperationPass<ModuleOp>> createConvertShapeToStandardPass() {
std::unique_ptr<OperationPass<ModuleOp>>
mlir::createConvertShapeToStandardPass() {
return std::make_unique<ConvertShapeToStandardPass>();
}
} // namespace mlir