From 6fd529b97e721ffba77f701f9805ef9ab871b310 Mon Sep 17 00:00:00 2001 From: Victor Perez Date: Tue, 5 Dec 2023 12:23:14 +0000 Subject: [PATCH 1/2] [SYCL-MLIR][NFC] Adapt `IntegerRangeAnalysis` changes for upstreaming - Remove not needed headers being included - Fix `check-mlir` due to variable being used in label in test Signed-off-by: Victor Perez --- .../DataFlow/IntegerRangeAnalysis.cpp | 12 ----------- .../Dialect/Arith/int-range-interface.mlir | 21 ++++++++++++------- 2 files changed, 13 insertions(+), 20 deletions(-) diff --git a/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp b/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp index e4ed92ad2badb..c26a6a42db7f2 100644 --- a/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp +++ b/mlir/lib/Analysis/DataFlow/IntegerRangeAnalysis.cpp @@ -14,22 +14,10 @@ #include "mlir/Analysis/DataFlow/IntegerRangeAnalysis.h" #include "mlir/Analysis/DataFlow/ConstantPropagationAnalysis.h" -#include "mlir/Analysis/DataFlow/SparseAnalysis.h" -#include "mlir/Analysis/DataFlowFramework.h" -#include "mlir/IR/BuiltinAttributes.h" -#include "mlir/IR/Dialect.h" -#include "mlir/IR/OpDefinition.h" -#include "mlir/IR/Value.h" -#include "mlir/Interfaces/ControlFlowInterfaces.h" #include "mlir/Interfaces/InferIntRangeInterface.h" #include "mlir/Interfaces/LoopLikeInterface.h" -#include "mlir/Support/LLVM.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/Support/Casting.h" #include "llvm/Support/Debug.h" -#include #include -#include #define DEBUG_TYPE "int-range-analysis" diff --git a/mlir/test/Dialect/Arith/int-range-interface.mlir b/mlir/test/Dialect/Arith/int-range-interface.mlir index 7bc064cac7cf6..e17c12c104ccf 100644 --- a/mlir/test/Dialect/Arith/int-range-interface.mlir +++ b/mlir/test/Dialect/Arith/int-range-interface.mlir @@ -731,18 +731,23 @@ func.func @extui_uses_unsigned(%arg0 : i32) -> i1 { func.return %4 : i1 } -/// Catch a bug that crash in getLoopBoundFromFold when -/// SparseConstantPropagation loaded in the solver. - -// CHECK-LABEL: func.func @caller(%[[ARG0:.*]] -// CHECK: call @callee(%[[ARG0]]) -// CHECK-LABEL: func.func @callee(%[[ARG0]] -// CHECK: %[[LOAD:.*]] = affine.load %[[ARG0]] -// CHECK: scf.for {{.*}} to %[[LOAD]] +/// Catch a bug that caused a crash in getLoopBoundFromFold when +// SparseConstantPropagation is loaded in the solver. + +// CHECK-LABEL: func.func @caller( +// CHECK-SAME: %[[VAL_0:.*]]: memref) { +// CHECK: call @callee(%[[VAL_0]]) : (memref) -> () +// CHECK: return +// CHECK: } func.func @caller(%arg0: memref) { call @callee(%arg0) : (memref) -> () return } + +// CHECK-LABEL: func.func private @callee( +// CHECK-SAME: %[[VAL_0:.*]]: memref) { +// CHECK: return +// CHECK: } func.func private @callee(%arg0: memref) { %c1 = arith.constant 1 : index %c0 = arith.constant 0 : index From 0b85205127d0678d3bc8ec6db16ae8a3c9ddea08 Mon Sep 17 00:00:00 2001 From: Victor Perez Date: Tue, 5 Dec 2023 14:31:00 +0000 Subject: [PATCH 2/2] Drop unintended change --- mlir/test/Dialect/Arith/int-range-interface.mlir | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/test/Dialect/Arith/int-range-interface.mlir b/mlir/test/Dialect/Arith/int-range-interface.mlir index e17c12c104ccf..02a9827d19d8f 100644 --- a/mlir/test/Dialect/Arith/int-range-interface.mlir +++ b/mlir/test/Dialect/Arith/int-range-interface.mlir @@ -732,7 +732,7 @@ func.func @extui_uses_unsigned(%arg0 : i32) -> i1 { } /// Catch a bug that caused a crash in getLoopBoundFromFold when -// SparseConstantPropagation is loaded in the solver. +/// SparseConstantPropagation is loaded in the solver. // CHECK-LABEL: func.func @caller( // CHECK-SAME: %[[VAL_0:.*]]: memref) {