forked from OSchip/llvm-project
[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:
parent
47dff1881f
commit
24edbdf99b
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue