Merge branch 'google' into main-to-google
diff --git a/SUBMODULE_VERSIONS.txt b/SUBMODULE_VERSIONS.txt
index 48294e9..6788611 100644
--- a/SUBMODULE_VERSIONS.txt
+++ b/SUBMODULE_VERSIONS.txt
@@ -4,16 +4,16 @@
 4fb0ff7069bd88ee85902f4d0bb62794e5f6d021 third_party/flatcc
 b1fbd33c06cdb0024c67733c6fdec2009d17b384 third_party/googletest
 88b845dee001723c4a0db1fe5477de735b6d3bb0 third_party/liburing
-d4688e7011f5ef5706b46055ee718fb62697a5dc third_party/llvm-bazel
-c9ff39a3f9840c84453f23a37386a3dc374f055a third_party/llvm-project
+bc9a93fad937a6c05099beb5d1983e570f83b49d third_party/llvm-bazel
+df6d0579e18e868ef4b6e97794eacd5af86e1b8a third_party/llvm-project
 e691ab9fc49d728f6632408d534b82cb3d137b3f third_party/mlir-emitc
-daf6bde6f530813f17d02c2870ab44879b6dacc8 third_party/mlir-hlo
+7629dfdd81ccc098be1d2d6405198cce28ae8b8d third_party/mlir-hlo
 2b2bd45bbf9be04fd22ece5cc1f54679202e9257 third_party/pffft
 d8c7ee00a687ac369e62e2032514a93a9b413502 third_party/pybind11
 2887692065c38ef6617f423feafc6b69dd0a0681 third_party/ruy
 685f86471e9d26b3eb7676695a2e2cefb4551ae9 third_party/spirv_cross
 f8bf11a0253a32375c32cad92c841237b96696c0 third_party/spirv_headers
-8e157e2dcc631cd1234dff0997a6f014be15457f third_party/tensorflow
+34d16275066e19532891c3425b86a32dc60219cf third_party/tensorflow
 9c3dac3ed2bd647b8d63f197fed058fee97a7e1e third_party/tracy
 9bd3f561bcee3f01d22912de10bb07ce4e23d378 third_party/vulkan_headers
 3528e2aed3e8808f33e1e7d63eeb1560456a605a third_party/vulkan_memory_allocator
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
index c978a7f..c61d963 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
@@ -88,8 +88,8 @@
                                        inputArrayFlag.end());
   std::vector<std::string> outputArrays(outputArrayFlag.begin(),
                                         outputArrayFlag.end());
-  auto loc = mlir::FileLineColLoc::get(inputFile->getBufferIdentifier(), 0, 0,
-                                       &context);
+  auto loc = mlir::FileLineColLoc::get(&context,
+                                       inputFile->getBufferIdentifier(), 0, 0);
   OwningModuleRef module = tflite::FlatBufferToMlir(
       absl::string_view(inputFile->getBufferStart(),
                         inputFile->getBufferSize()),
diff --git a/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp b/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp
index 6bdb41d..2a05d92 100644
--- a/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/FoldCompatibleDispatchRegions.cpp
@@ -71,7 +71,7 @@
 
   // Location is original region + new region location (both probably fused).
   SmallVector<Location, 2> fusedLocs = {regionOp.getLoc(), otherLoc};
-  auto fusedLoc = FusedLoc::get(fusedLocs, regionOp.getContext());
+  auto fusedLoc = FusedLoc::get(regionOp.getContext(), fusedLocs);
 
   // Clone with new results.
   SmallVector<Value, 8> operands;
diff --git a/iree/compiler/Dialect/Flow/Transforms/FormStreams.cpp b/iree/compiler/Dialect/Flow/Transforms/FormStreams.cpp
index c0209fc..4a86c0d 100644
--- a/iree/compiler/Dialect/Flow/Transforms/FormStreams.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/FormStreams.cpp
@@ -123,9 +123,8 @@
     OpBuilder blockBuilder = OpBuilder::atBlockEnd(&block);
     blockBuilder.setInsertionPointAfter(streamOps.back());
     auto fragmentLoc = FusedLoc::get(
-        llvm::to_vector<8>(llvm::map_range(
-            streamOps, [](Operation *op) { return op->getLoc(); })),
-        context);
+        context, llvm::to_vector<8>(llvm::map_range(
+                     streamOps, [](Operation *op) { return op->getLoc(); })));
 
     // Find all input operands and results that escape the fragment.
     llvm::SmallSetVector<Operation *, 8> streamOpSet{streamOps.begin(),
diff --git a/iree/compiler/Dialect/Flow/Utils/DispatchUtils.cpp b/iree/compiler/Dialect/Flow/Utils/DispatchUtils.cpp
index 65138b3..8c13cdb 100644
--- a/iree/compiler/Dialect/Flow/Utils/DispatchUtils.cpp
+++ b/iree/compiler/Dialect/Flow/Utils/DispatchUtils.cpp
@@ -81,7 +81,7 @@
   for (auto *op : ops) {
     opLocs.push_back(op->getLoc());
   }
-  auto regionLoc = FusedLoc::get(opLocs, workload.getContext());
+  auto regionLoc = FusedLoc::get(workload.getContext(), opLocs);
 
   // Get a list of values that we need to capture and values that escape the
   // region and need to be returned.
diff --git a/iree/compiler/Dialect/HAL/Transforms/MaterializeConstantPoolBuffers.cpp b/iree/compiler/Dialect/HAL/Transforms/MaterializeConstantPoolBuffers.cpp
index 77681fc..f654edf 100644
--- a/iree/compiler/Dialect/HAL/Transforms/MaterializeConstantPoolBuffers.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/MaterializeConstantPoolBuffers.cpp
@@ -168,11 +168,11 @@
                                 SymbolTable &moduleSymbolTable,
                                 Block::iterator insertionPoint) {
     auto *context = poolOp.getContext();
-    auto variableLoc = FusedLoc::get(
-        llvm::to_vector<8>(llvm::map_range(
-            splatOps,
-            [](ConstantPoolSplatOp splatOp) { return splatOp.getLoc(); })),
-        context);
+    auto variableLoc =
+        FusedLoc::get(context, llvm::to_vector<8>(llvm::map_range(
+                                   splatOps, [](ConstantPoolSplatOp splatOp) {
+                                     return splatOp.getLoc();
+                                   })));
     auto variableName = (poolOp.getName() + "_splats").str();
     auto variableOp = OpBuilder(context).create<IREE::HAL::VariableOp>(
         variableLoc, variableName, /*isMutable=*/false,
diff --git a/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp b/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp
index 9b0cdb8..fa249a0 100644
--- a/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp
@@ -61,10 +61,9 @@
       auto pattern = matchOps.front().pattern();
 
       // Merge all the locs as we are deduping the original query ops.
-      auto fusedLoc = FusedLoc::get(
-          llvm::to_vector<4>(llvm::map_range(
-              matchOps, [&](Operation *op) { return op->getLoc(); })),
-          moduleOp.getContext());
+      auto fusedLoc =
+          moduleBuilder.getFusedLoc(llvm::to_vector<4>(llvm::map_range(
+              matchOps, [&](Operation *op) { return op->getLoc(); })));
 
       // The initializer will perform the query once and store it in the
       // variable.
diff --git a/iree/compiler/Dialect/HAL/Transforms/PackConstantPoolStorage.cpp b/iree/compiler/Dialect/HAL/Transforms/PackConstantPoolStorage.cpp
index b65ce08..8ca839a 100644
--- a/iree/compiler/Dialect/HAL/Transforms/PackConstantPoolStorage.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/PackConstantPoolStorage.cpp
@@ -244,11 +244,11 @@
     // be useful if we wanted to map back a module size through data blobs.
     // With buffer <-> constant it's possible to build a tree map of
     // contributions in the source. TBD ;)
-    storageBuffer.loc = FusedLoc::get(
-        llvm::to_vector<8>(llvm::map_range(
-            storageBuffer.spans,
-            [](ConstantSpan &span) { return span.valueOp.getLoc(); })),
-        context);
+    storageBuffer.loc =
+        FusedLoc::get(context, llvm::to_vector<8>(llvm::map_range(
+                                   storageBuffer.spans, [](ConstantSpan &span) {
+                                     return span.valueOp.getLoc();
+                                   })));
 
     // TODO(#3354): replace this with an #iree.composite_buffer attribute or
     // something so we can reuse the uniqued storage for each constant and just
diff --git a/iree/compiler/Dialect/VM/IR/VMOpFolders.cpp b/iree/compiler/Dialect/VM/IR/VMOpFolders.cpp
index e02de42..b002f4f 100644
--- a/iree/compiler/Dialect/VM/IR/VMOpFolders.cpp
+++ b/iree/compiler/Dialect/VM/IR/VMOpFolders.cpp
@@ -518,7 +518,7 @@
     if (auto mulOp = dyn_cast_or_null<T>(op.lhs().getDefiningOp())) {
       if (matchPattern(mulOp.rhs(), m_Constant(&c2))) {
         auto c = rewriter.createOrFold<CONST_OP>(
-            FusedLoc::get({mulOp.getLoc(), op.getLoc()}, rewriter.getContext()),
+            rewriter.getFusedLoc({mulOp.getLoc(), op.getLoc()}),
             constFoldBinaryOp<IntegerAttr>(
                 {c1, c2},
                 [](const APInt &a, const APInt &b) { return a * b; }));
diff --git a/iree/test/e2e/xla_ops/BUILD b/iree/test/e2e/xla_ops/BUILD
index f3e3f3a..3858b49 100644
--- a/iree/test/e2e/xla_ops/BUILD
+++ b/iree/test/e2e/xla_ops/BUILD
@@ -279,6 +279,8 @@
         "-iree-flow-dispatch-linalg-on-tensors",
     ],
     driver = "cuda",
+    # TODO: broken internally
+    tags = ["notap"],
     target_backend = "cuda",
 )
 
diff --git a/iree/test/e2e/xla_ops/CMakeLists.txt b/iree/test/e2e/xla_ops/CMakeLists.txt
index e1c0dc0..1b9e95b 100644
--- a/iree/test/e2e/xla_ops/CMakeLists.txt
+++ b/iree/test/e2e/xla_ops/CMakeLists.txt
@@ -246,6 +246,8 @@
     "cuda"
   COMPILER_FLAGS
     "-iree-flow-dispatch-linalg-on-tensors"
+  LABELS
+    "notap"
 )
 
 ### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
diff --git a/third_party/llvm-bazel b/third_party/llvm-bazel
index d4688e7..bc9a93f 160000
--- a/third_party/llvm-bazel
+++ b/third_party/llvm-bazel
@@ -1 +1 @@
-Subproject commit d4688e7011f5ef5706b46055ee718fb62697a5dc
+Subproject commit bc9a93fad937a6c05099beb5d1983e570f83b49d
diff --git a/third_party/llvm-project b/third_party/llvm-project
index c9ff39a..df6d057 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit c9ff39a3f9840c84453f23a37386a3dc374f055a
+Subproject commit df6d0579e18e868ef4b6e97794eacd5af86e1b8a
diff --git a/third_party/mlir-hlo b/third_party/mlir-hlo
index daf6bde..7629dfd 160000
--- a/third_party/mlir-hlo
+++ b/third_party/mlir-hlo
@@ -1 +1 @@
-Subproject commit daf6bde6f530813f17d02c2870ab44879b6dacc8
+Subproject commit 7629dfdd81ccc098be1d2d6405198cce28ae8b8d
diff --git a/third_party/tensorflow b/third_party/tensorflow
index 8e157e2..34d1627 160000
--- a/third_party/tensorflow
+++ b/third_party/tensorflow
@@ -1 +1 @@
-Subproject commit 8e157e2dcc631cd1234dff0997a6f014be15457f
+Subproject commit 34d16275066e19532891c3425b86a32dc60219cf