Skip to content

Commit 1858722

Browse files
j2kuncopybara-github
authored andcommitted
add ValueBoundsOpInterface registrations (needed for apply-folders)
PiperOrigin-RevId: 885756691
1 parent 80c8b4e commit 1858722

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

tools/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ cc_binary(
178178
"@llvm-project//mlir:ArithDialect",
179179
"@llvm-project//mlir:ArithToLLVM",
180180
"@llvm-project//mlir:ArithTransforms",
181+
"@llvm-project//mlir:ArithValueBoundsOpInterfaceImpl",
181182
"@llvm-project//mlir:BufferizationDialect",
182183
"@llvm-project//mlir:BufferizationToMemRef",
183184
"@llvm-project//mlir:BufferizationTransforms",
@@ -208,6 +209,7 @@ cc_binary(
208209
"@llvm-project//mlir:SCFToControlFlow",
209210
"@llvm-project//mlir:SCFTransforms",
210211
"@llvm-project//mlir:Support",
212+
"@llvm-project//mlir:TensorDialect",
211213
"@llvm-project//mlir:TensorExtensions",
212214
"@llvm-project//mlir:TensorInferTypeOpInterfaceImpl",
213215
"@llvm-project//mlir:TensorToLinalg",

tools/heir-opt.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,10 @@
131131
#include "mlir/include/mlir/Conversion/UBToLLVM/UBToLLVM.h" // from @llvm-project
132132
#include "mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h" // from @llvm-project
133133
#include "mlir/include/mlir/Dialect/Affine/IR/AffineOps.h" // from @llvm-project
134+
#include "mlir/include/mlir/Dialect/Affine/IR/ValueBoundsOpInterfaceImpl.h" // from @llvm-project
134135
#include "mlir/include/mlir/Dialect/Affine/Transforms/Passes.h" // from @llvm-project
135136
#include "mlir/include/mlir/Dialect/Arith/IR/Arith.h" // from @llvm-project
137+
#include "mlir/include/mlir/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.h" // from @llvm-project
136138
#include "mlir/include/mlir/Dialect/Arith/Transforms/BufferDeallocationOpInterfaceImpl.h" // from @llvm-project
137139
#include "mlir/include/mlir/Dialect/Arith/Transforms/BufferizableOpInterfaceImpl.h" // from @llvm-project
138140
#include "mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h" // from @llvm-project
@@ -149,11 +151,14 @@
149151
#include "mlir/include/mlir/Dialect/Linalg/Transforms/BufferizableOpInterfaceImpl.h" // from @llvm-project
150152
#include "mlir/include/mlir/Dialect/Math/IR/Math.h" // from @llvm-project
151153
#include "mlir/include/mlir/Dialect/MemRef/IR/MemRef.h" // from @llvm-project
154+
#include "mlir/include/mlir/Dialect/MemRef/IR/ValueBoundsOpInterfaceImpl.h" // from @llvm-project
152155
#include "mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h" // from @llvm-project
153156
#include "mlir/include/mlir/Dialect/SCF/IR/SCF.h" // from @llvm-project
157+
#include "mlir/include/mlir/Dialect/SCF/IR/ValueBoundsOpInterfaceImpl.h" // from @llvm-project
154158
#include "mlir/include/mlir/Dialect/SCF/Transforms/BufferizableOpInterfaceImpl.h" // from @llvm-project
155159
#include "mlir/include/mlir/Dialect/Tensor/Extensions/AllExtensions.h" // from @llvm-project
156160
#include "mlir/include/mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h" // from @llvm-project
161+
#include "mlir/include/mlir/Dialect/Tensor/IR/ValueBoundsOpInterfaceImpl.h" // from @llvm-project
157162
#include "mlir/include/mlir/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.h" // from @llvm-project
158163
#include "mlir/include/mlir/Pass/PassManager.h" // from @llvm-project
159164
#include "mlir/include/mlir/Pass/PassRegistry.h" // from @llvm-project
@@ -272,8 +277,15 @@ int main(int argc, char** argv) {
272277
mlir::linalg::registerBufferizableOpInterfaceExternalModels(registry);
273278
scf::registerBufferizableOpInterfaceExternalModels(registry);
274279
tensor::registerBufferizableOpInterfaceExternalModels(registry);
275-
mlir::arith::registerConvertArithToLLVMInterface(registry);
276280
mlir::LLVM::registerInlinerInterface(registry);
281+
mlir::arith::registerConvertArithToLLVMInterface(registry);
282+
283+
// ValueBoundsOpInterface
284+
mlir::affine::registerValueBoundsOpInterfaceExternalModels(registry);
285+
mlir::arith::registerValueBoundsOpInterfaceExternalModels(registry);
286+
mlir::memref::registerValueBoundsOpInterfaceExternalModels(registry);
287+
mlir::scf::registerValueBoundsOpInterfaceExternalModels(registry);
288+
mlir::tensor::registerValueBoundsOpInterfaceExternalModels(registry);
277289

278290
// Custom passes in HEIR
279291
registerEmitCInterfacePass();

0 commit comments

Comments
 (0)