|
19 | 19 | #include "mlir/Dialect/Arith/IR/Arith.h" |
20 | 20 | #include "mlir/Dialect/Linalg/IR/Linalg.h" |
21 | 21 | #include "mlir/Dialect/MLProgram/IR/MLProgram.h" |
22 | | -#include "mlir/Dialect/MemRef/IR/MemRef.h" |
23 | 22 | #include "mlir/Dialect/Tensor/IR/Tensor.h" |
24 | 23 | #include "mlir/IR/Matchers.h" |
25 | 24 | #include "mlir/Interfaces/ValueBoundsOpInterface.h" |
@@ -400,18 +399,6 @@ struct HoistableLinalgOpInterfaceHelper { |
400 | 399 | } |
401 | 400 | }; |
402 | 401 |
|
403 | | -/// TODO(jtuyls): Remove when added to upstream. |
404 | | -struct ExpandShapeOpValueBoundsInterface |
405 | | - : public ValueBoundsOpInterface::ExternalModel< |
406 | | - ExpandShapeOpValueBoundsInterface, memref::ExpandShapeOp> { |
407 | | - void populateBoundsForShapedValueDim(Operation *op, Value value, int64_t dim, |
408 | | - ValueBoundsConstraintSet &cstr) const { |
409 | | - auto expandOp = cast<memref::ExpandShapeOp>(op); |
410 | | - assert(value == expandOp.getResult() && "invalid value"); |
411 | | - cstr.bound(value)[dim] == expandOp.getOutputShape()[dim]; |
412 | | - } |
413 | | -}; |
414 | | - |
415 | 402 | } // namespace |
416 | 403 |
|
417 | 404 | void registerUtilExternalModels(DialectRegistry ®istry) { |
@@ -529,12 +516,6 @@ void registerUtilExternalModels(DialectRegistry ®istry) { |
529 | 516 | IREE::Util::AssumeIntOp::attachInterface< |
530 | 517 | UtilAssumeIntValueBoundsOpInterface>(*context); |
531 | 518 | }); |
532 | | - |
533 | | - registry.addExtension(+[](MLIRContext *context, |
534 | | - memref::MemRefDialect *dialect) { |
535 | | - memref::ExpandShapeOp::attachInterface<ExpandShapeOpValueBoundsInterface>( |
536 | | - *context); |
537 | | - }); |
538 | 519 | } |
539 | 520 |
|
540 | 521 | } // namespace mlir::iree_compiler |
0 commit comments