Integrate llvm-project @97c0dbe1ad6dacbcca84e63e9d726b85b65af4fe (#17946)
Bumps llvm-project to:
https://github.com/llvm/llvm-project/commit/15495b8cd4051d05c1b88c919e7c509a8ea4056a
- Updated `refine_usage.mlir` and `flatten_tuples_in_cfg.mlir` tests
likely due to https://github.com/llvm/llvm-project/pull/97697
Still carrying revert: 97c0dbe1ad6dacbcca84e63e9d726b85b65af4fe
(TODO: bump torch-mlir and update
to bumped submodule)
---------
Signed-off-by: aviator19941 <avinash.sharma@amd.com>
diff --git a/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir
index dc4f204..e557198 100644
--- a/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir
+++ b/compiler/plugins/input/StableHLO/Conversion/Preprocessing/test/flatten_tuples_in_cfg.mlir
@@ -15,7 +15,7 @@
// CHECK: func.func private @callee(%arg0: i1, %arg1: tensor<f32>, %arg2: tensor<f32>, %arg3: tensor<f32>) -> (tensor<f32>, tensor<f32>)
func.func private @callee(%arg0: i1, %arg1: tuple<tensor<f32>, tuple<tensor<f32>, tensor<f32>>>) -> tuple<tensor<f32>, tensor<f32>> {
- // CHECK-NEXT: cf.cond_br %arg0, ^[[BB:.+]](%arg2, %arg3 : tensor<f32>, tensor<f32>), ^bb2(%arg1 : tensor<f32>)
+ // CHECK-NEXT: cf.cond_br %arg0, ^[[BB:.+]](%arg2, %arg3 : tensor<f32>, tensor<f32>), ^bb2
// CHECK: ^[[BB]](%[[V0:[^:]+]]: tensor<f32>, %[[V1:[^:]+]]: tensor<f32>)
// CHECK-NEXT: return %[[V0]], %[[V1]] : tensor<f32>, tensor<f32>
%0 = stablehlo.get_tuple_element %arg1[0] : (tuple<tensor<f32>, tuple<tensor<f32>, tensor<f32>>>) -> tensor<f32>
diff --git a/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp b/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp
index 8eba3c9..c2c5c03 100644
--- a/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp
+++ b/compiler/src/iree/compiler/Codegen/Dialect/GPU/Transforms/Transforms.cpp
@@ -9,6 +9,7 @@
#include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUAttrs.h"
#include "iree/compiler/Codegen/Dialect/GPU/IR/IREEGPUOps.h"
#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/LogicalResult.h"
#include "llvm/Support/MathExtras.h"
diff --git a/compiler/src/iree/compiler/Dialect/HAL/Transforms/CaptureExecutableSources.cpp b/compiler/src/iree/compiler/Dialect/HAL/Transforms/CaptureExecutableSources.cpp
index 60d8ddc..4874a39 100644
--- a/compiler/src/iree/compiler/Dialect/HAL/Transforms/CaptureExecutableSources.cpp
+++ b/compiler/src/iree/compiler/Dialect/HAL/Transforms/CaptureExecutableSources.cpp
@@ -10,6 +10,7 @@
#include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
#include "iree/compiler/Dialect/HAL/IR/HALOps.h"
#include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
+#include "mlir/IR/AsmState.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/LocationSnapshot.h"
diff --git a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir
index 1815518..32bd4d1 100644
--- a/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir
+++ b/compiler/src/iree/compiler/Dialect/Stream/Transforms/test/refine_usage.mlir
@@ -82,14 +82,14 @@
// CHECK: %[[SELECT:.+]] = arith.select %[[COND]], %[[SPLAT1]], %[[FILL1]] : !stream.resource<external>
%bb1_1_new = arith.select %cond, %splat1, %fill1 : !stream.resource<*>
// CHECK: cf.cond_br %[[COND]], ^bb1(%[[FILL0]], %[[SELECT]]
- // CHECK-SAME: ^bb2(%[[FILL0]], %[[SELECT]]
+ // CHECK-SAME: ^bb2
cf.cond_br %cond, ^bb1(%fill0, %bb1_1_new : !stream.resource<*>, !stream.resource<*>),
^bb2(%fill0, %bb1_1_new : !stream.resource<*>, !stream.resource<*>)
-// CHECK: ^bb2(%[[BB2_ARG0:.+]]: !stream.resource<transient>, %[[BB2_ARG1:.+]]: !stream.resource<external>)
+// CHECK: ^bb2
^bb2(%bb2_0: !stream.resource<*>, %bb2_1: !stream.resource<*>):
// CHECK-NOT: stream.async.transfer
%external_transfer = stream.async.transfer %bb2_1 : !stream.resource<*>{%size} -> !stream.resource<external>{%size}
- // CHECK: util.return %[[BB2_ARG0]], %[[BB2_ARG1]] : !stream.resource<transient>, !stream.resource<external>
+ // CHECK: util.return %[[FILL0]], %[[SELECT]] : !stream.resource<transient>, !stream.resource<external>
util.return %bb2_0, %external_transfer : !stream.resource<*>, !stream.resource<external>
}
diff --git a/compiler/src/iree/compiler/Dialect/Util/Transforms/ImportResources.cpp b/compiler/src/iree/compiler/Dialect/Util/Transforms/ImportResources.cpp
index 625f680..ed231a6 100644
--- a/compiler/src/iree/compiler/Dialect/Util/Transforms/ImportResources.cpp
+++ b/compiler/src/iree/compiler/Dialect/Util/Transforms/ImportResources.cpp
@@ -10,6 +10,7 @@
#include "iree/compiler/Dialect/Util/Transforms/Passes.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/Debug.h"
+#include "mlir/IR/AsmState.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinDialect.h"
#include "mlir/Pass/Pass.h"
diff --git a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/VectorExt/IR/VectorExtOps.h b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/VectorExt/IR/VectorExtOps.h
index bd67409..cc92bb6 100644
--- a/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/VectorExt/IR/VectorExtOps.h
+++ b/llvm-external-projects/iree-dialects/include/iree-dialects/Dialect/VectorExt/IR/VectorExtOps.h
@@ -17,6 +17,7 @@
#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
+#include "llvm/ADT/MapVector.h"
namespace mlir::iree_compiler::IREE::VectorExt {
diff --git a/third_party/llvm-project b/third_party/llvm-project
index 9372a3b..97c0dbe 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit 9372a3b70cf3969dac2d1a14cf41358205944e60
+Subproject commit 97c0dbe1ad6dacbcca84e63e9d726b85b65af4fe