Integrate llvm-project at 9b32886e7e705bb28aab57682e612375075a0ad7 (#8967)

* Reset third_party/llvm-project: 9b32886e7e705bb28aab57682e612375075a0ad7 (2022-04-22 09:20:18 +0000): [mlir][Arithmetic] Use common constant fold function in RemSI and RemUI to cover splat.
* Update mlir-hlo to bbd8077e020d4359ae0bcf8b5a895a5ebe2f020d
* Update TensorFlow to 5abd3d88570e304f3d3f9bb99eb98620e2839a31
* Update FuncOp to func::FuncOp and update parseRegion API usages
diff --git a/integrations/tensorflow/WORKSPACE b/integrations/tensorflow/WORKSPACE
index e7f47e7..32af2bf 100644
--- a/integrations/tensorflow/WORKSPACE
+++ b/integrations/tensorflow/WORKSPACE
@@ -7,7 +7,7 @@
 
 load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
 
-TENSORFLOW_COMMIT = "d1086f2605bc84ca817223fa8b91c8b9b0ae1949"
+TENSORFLOW_COMMIT = "5abd3d88570e304f3d3f9bb99eb98620e2839a31"
 
 git_repository(
     name = "org_tensorflow",
diff --git a/integrations/tensorflow/iree_tf_compiler/MHLO/EmitDefaultIREEABI.cpp b/integrations/tensorflow/iree_tf_compiler/MHLO/EmitDefaultIREEABI.cpp
index 10e2b45..f94ac96 100644
--- a/integrations/tensorflow/iree_tf_compiler/MHLO/EmitDefaultIREEABI.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/MHLO/EmitDefaultIREEABI.cpp
@@ -6,6 +6,7 @@
 
 #include "iree_tf_compiler/MHLO/Passes.h"
 #include "llvm/Support/JSON.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -20,7 +21,7 @@
 namespace MHLO {
 
 class EmitDefaultIREEABIPass
-    : public PassWrapper<EmitDefaultIREEABIPass, OperationPass<FuncOp>> {
+    : public PassWrapper<EmitDefaultIREEABIPass, OperationPass<func::FuncOp>> {
  public:
   StringRef getArgument() const override {
     return "iree-mhlo-emit-default-iree-abi";
@@ -130,7 +131,7 @@
   }
 };
 
-std::unique_ptr<OperationPass<FuncOp>> createEmitDefaultIREEABIPass() {
+std::unique_ptr<OperationPass<func::FuncOp>> createEmitDefaultIREEABIPass() {
   return std::make_unique<EmitDefaultIREEABIPass>();
 }
 
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp b/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp
index 4312c2c..706785e 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp
@@ -32,7 +32,7 @@
 // It does not require the same number of options as we can hardcode as the pass
 // the IREE requires.
 class ConvertToMHLOPass
-    : public PassWrapper<ConvertToMHLOPass, OperationPass<FuncOp>> {
+    : public PassWrapper<ConvertToMHLOPass, OperationPass<func::FuncOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<mlir::linalg::LinalgDialect, mlir::TF::TensorFlowDialect,
                     mlir::tf_executor::TensorFlowExecutorDialect,
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/LowerGlobalTensors.cpp b/integrations/tensorflow/iree_tf_compiler/TF/LowerGlobalTensors.cpp
index 70dbbc8..316de31 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/LowerGlobalTensors.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/LowerGlobalTensors.cpp
@@ -82,7 +82,7 @@
   }
 
   // TODO(silvasean): Make this conversion interprocedural.
-  for (auto func : module.getOps<FuncOp>()) {
+  for (auto func : module.getOps<func::FuncOp>()) {
     if (!tf_saved_model::IsExported(func)) {
       continue;
     }
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/PropagateResourceCasts.cpp b/integrations/tensorflow/iree_tf_compiler/TF/PropagateResourceCasts.cpp
index 4bc8501..e419ccd 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/PropagateResourceCasts.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/PropagateResourceCasts.cpp
@@ -68,7 +68,7 @@
 
   void runOnOperation() override {
     auto operation = getOperation();
-    for (auto func : operation.getOps<FuncOp>()) {
+    for (auto func : operation.getOps<func::FuncOp>()) {
       for (auto cast : func.getOps<mlir::TF::CastOp>()) {
         auto input = cast.x();
         auto output = cast.getResult();
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp b/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp
index 9bcafbc..00ccd5b 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp
@@ -409,7 +409,7 @@
   }
 };
 
-LogicalResult materializeABIWrapper(ModuleOp module, FuncOp internalFunc,
+LogicalResult materializeABIWrapper(ModuleOp module, func::FuncOp internalFunc,
                                     StringRef exportedName) {
   Location loc = internalFunc.getLoc();
   OpBuilder builder(internalFunc);
@@ -492,7 +492,8 @@
   // Create the wrapper function.
   FunctionType wrapperFuncType =
       builder.getFunctionType(wrapperArgTypes, wrapperResultTypes);
-  auto wrapperFunc = builder.create<FuncOp>(loc, exportedName, wrapperFuncType);
+  auto wrapperFunc =
+      builder.create<func::FuncOp>(loc, exportedName, wrapperFuncType);
   SymbolTable::setSymbolVisibility(wrapperFunc,
                                    SymbolTable::Visibility::Public);
   Block *entryBlock = wrapperFunc.addEntryBlock();
@@ -595,7 +596,7 @@
     (void)savedModelIndexPathIdent;
 
     // Handle saved model exported functions.
-    for (auto func : getOperation().getOps<FuncOp>()) {
+    for (auto func : getOperation().getOps<func::FuncOp>()) {
       // Transfer exported names to IREE.
       auto exportedNames = mlir::tf_saved_model::GetExportedNames(func);
       if (exportedNames.empty()) continue;
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/StripAsserts.cpp b/integrations/tensorflow/iree_tf_compiler/TF/StripAsserts.cpp
index 67e4a28..b32b143 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/StripAsserts.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/StripAsserts.cpp
@@ -12,7 +12,7 @@
 namespace TF {
 
 class StripAssertsPass
-    : public PassWrapper<StripAssertsPass, OperationPass<FuncOp>> {
+    : public PassWrapper<StripAssertsPass, OperationPass<func::FuncOp>> {
  public:
   StringRef getArgument() const override { return "iree-tf-strip-asserts"; }
 
@@ -33,7 +33,7 @@
   }
 };
 
-std::unique_ptr<OperationPass<FuncOp>> createStripAssertsPass() {
+std::unique_ptr<OperationPass<func::FuncOp>> createStripAssertsPass() {
   return std::make_unique<StripAssertsPass>();
 }
 
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/StripMetadata.cpp b/integrations/tensorflow/iree_tf_compiler/TF/StripMetadata.cpp
index f1fc99c..e9c16e7 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/StripMetadata.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/StripMetadata.cpp
@@ -54,7 +54,8 @@
 };
 
 class StripFunctionMetadataPass
-    : public PassWrapper<StripFunctionMetadataPass, OperationPass<FuncOp>> {
+    : public PassWrapper<StripFunctionMetadataPass,
+                         OperationPass<func::FuncOp>> {
  public:
   StringRef getArgument() const override {
     return "iree-tf-strip-function-metadata";
@@ -97,7 +98,7 @@
   return std::make_unique<StripModuleMetadataPass>();
 }
 
-std::unique_ptr<OperationPass<FuncOp>> createStripFunctionMetadataPass() {
+std::unique_ptr<OperationPass<func::FuncOp>> createStripFunctionMetadataPass() {
   return std::make_unique<StripFunctionMetadataPass>();
 }
 
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/VerifyFullyConverted.cpp b/integrations/tensorflow/iree_tf_compiler/TF/VerifyFullyConverted.cpp
index 027caa1..746bb7d 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/VerifyFullyConverted.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/VerifyFullyConverted.cpp
@@ -21,7 +21,8 @@
 namespace TF {
 
 class VerifyFullyConvertedPass
-    : public PassWrapper<VerifyFullyConvertedPass, OperationPass<FuncOp>> {
+    : public PassWrapper<VerifyFullyConvertedPass,
+                         OperationPass<func::FuncOp>> {
  public:
   StringRef getArgument() const override {
     return "iree-tf-verify-fully-converted";
@@ -49,7 +50,7 @@
 
 static PassRegistration<VerifyFullyConvertedPass> pass;
 
-std::unique_ptr<OperationPass<FuncOp>> createVerifyFullyConvertedPass() {
+std::unique_ptr<OperationPass<func::FuncOp>> createVerifyFullyConvertedPass() {
   return std::make_unique<VerifyFullyConvertedPass>();
 }
 
diff --git a/integrations/tensorflow/iree_tf_compiler/TFL/ConvertMetadata.cpp b/integrations/tensorflow/iree_tf_compiler/TFL/ConvertMetadata.cpp
index f14c213..50e0f08 100644
--- a/integrations/tensorflow/iree_tf_compiler/TFL/ConvertMetadata.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TFL/ConvertMetadata.cpp
@@ -56,7 +56,8 @@
   // TF/TFL pack their I/O names on an annoying dictionary. We want our shape
   // names to match up with those for readability so we extract them here.
   // Is this ugly? Yeah - but such is what we have to deal with here.
-  void setupEntryPointAttrs(FuncOp funcOp, DictionaryAttr entryFunctionAttr) {
+  void setupEntryPointAttrs(func::FuncOp funcOp,
+                            DictionaryAttr entryFunctionAttr) {
     funcOp.setPublic();
 
     auto inputsAttr =
@@ -98,7 +99,8 @@
   return std::make_unique<ConvertModuleMetadataPass>();
 }
 
-std::unique_ptr<OperationPass<FuncOp>> createConvertFunctionMetadataPass() {
+std::unique_ptr<OperationPass<func::FuncOp>>
+createConvertFunctionMetadataPass() {
   return std::make_unique<ConvertFunctionMetadataPass>();
 }
 
diff --git a/integrations/tensorflow/iree_tf_compiler/TFL/LowerGlobalTensors.cpp b/integrations/tensorflow/iree_tf_compiler/TFL/LowerGlobalTensors.cpp
index ecc9ab6..e723413 100644
--- a/integrations/tensorflow/iree_tf_compiler/TFL/LowerGlobalTensors.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TFL/LowerGlobalTensors.cpp
@@ -35,8 +35,8 @@
     auto moduleOp = getOperation();
     mlir::OpBuilder builder(moduleOp.getBodyRegion());
 
-    DenseMap<StringRef, FuncOp> symNameToFunction;
-    for (auto func : moduleOp.getOps<FuncOp>()) {
+    DenseMap<StringRef, func::FuncOp> symNameToFunction;
+    for (auto func : moduleOp.getOps<func::FuncOp>()) {
       symNameToFunction[func.getSymName()] = func;
     }
 
@@ -58,7 +58,7 @@
                          init.session_init_function());
           continue;
         }
-        FuncOp initFunc = std::get<1>(*findInitFunc);
+        func::FuncOp initFunc = std::get<1>(*findInitFunc);
         for (auto assign : initFunc.getOps<mlir::TFL::AssignVariableOp>()) {
           auto handle = dyn_cast<mlir::TFL::VarHandleOp>(
               assign.resource_id().getDefiningOp());
@@ -94,7 +94,7 @@
     // TF::CallOnceOps are no longer needed as we have already extracted their
     // state.
     SmallVector<mlir::TFL::CallOnceOp> callOnceOps;
-    for (auto func : moduleOp.getOps<FuncOp>()) {
+    for (auto func : moduleOp.getOps<func::FuncOp>()) {
       for (auto init : func.getOps<mlir::TFL::CallOnceOp>()) {
         callOnceOps.push_back(init);
       }
diff --git a/integrations/tensorflow/iree_tf_compiler/TFL/Passes.cpp b/integrations/tensorflow/iree_tf_compiler/TFL/Passes.cpp
index 7b7d493..6adf676 100644
--- a/integrations/tensorflow/iree_tf_compiler/TFL/Passes.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TFL/Passes.cpp
@@ -46,7 +46,7 @@
   //----------------------------------------------------------------------------
 
   pm.addPass(createConvertModuleMetadataPass());
-  pm.nest<FuncOp>().addPass(createConvertFunctionMetadataPass());
+  pm.nest<func::FuncOp>().addPass(createConvertFunctionMetadataPass());
 
   //----------------------------------------------------------------------------
   // Convert all TFL ops to TOSA ops
@@ -55,7 +55,7 @@
   mlir::tosa::TOSATFTFLLegalizationPipelineOptions tosaOptions;
   pm.addPass(createLowerGlobalTensorsPass());
   mlir::tosa::createTFTFLtoTOSALegalizationPipeline(pm, tosaOptions);
-  pm.nest<FuncOp>().addPass(mlir::tosa::createStripQuantTypesPass());
+  pm.nest<func::FuncOp>().addPass(mlir::tosa::createStripQuantTypesPass());
   pm.addPass(createCanonicalizerPass());
   pm.addPass(createReconcileUnrealizedCastsPass());
 
@@ -73,7 +73,7 @@
   // Remove the rest of the TFL goo and verify that all ops converted
   //----------------------------------------------------------------------------
 
-  pm.nest<FuncOp>().addPass(createStripFunctionMetadataPass());
+  pm.nest<func::FuncOp>().addPass(createStripFunctionMetadataPass());
   pm.addPass(createStripModuleMetadataPass());
   pm.addPass(createVerifyFullyConvertedPass());
 }
diff --git a/integrations/tensorflow/iree_tf_compiler/TFL/RetainCallOnceFuncs.cpp b/integrations/tensorflow/iree_tf_compiler/TFL/RetainCallOnceFuncs.cpp
index c9a605e..263ac68 100644
--- a/integrations/tensorflow/iree_tf_compiler/TFL/RetainCallOnceFuncs.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TFL/RetainCallOnceFuncs.cpp
@@ -8,6 +8,7 @@
 #include "iree_tf_compiler/TFL/Passes.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/FormatVariadic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Support/LLVM.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -28,7 +29,7 @@
   void runOnOperation() override {
     auto moduleOp = getOperation();
 
-    llvm::DenseMap<StringRef, FuncOp> funcMap;
+    llvm::DenseMap<StringRef, func::FuncOp> funcMap;
     for (auto func : moduleOp.getOps<mlir::func::FuncOp>()) {
       funcMap[func.getSymName()] = func;
     }
diff --git a/integrations/tensorflow/iree_tf_compiler/TFL/StripMetadata.cpp b/integrations/tensorflow/iree_tf_compiler/TFL/StripMetadata.cpp
index 181962c..6dadf7e 100644
--- a/integrations/tensorflow/iree_tf_compiler/TFL/StripMetadata.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TFL/StripMetadata.cpp
@@ -82,7 +82,7 @@
   return std::make_unique<StripModuleMetadataPass>();
 }
 
-std::unique_ptr<OperationPass<FuncOp>> createStripFunctionMetadataPass() {
+std::unique_ptr<OperationPass<func::FuncOp>> createStripFunctionMetadataPass() {
   return std::make_unique<StripFunctionMetadataPass>();
 }
 
diff --git a/integrations/tensorflow/iree_tf_compiler/TFL/VerifyFullyConverted.cpp b/integrations/tensorflow/iree_tf_compiler/TFL/VerifyFullyConverted.cpp
index d9a22d4..fd8172b 100644
--- a/integrations/tensorflow/iree_tf_compiler/TFL/VerifyFullyConverted.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TFL/VerifyFullyConverted.cpp
@@ -37,7 +37,7 @@
 
 }  // anonymous namespace
 
-std::unique_ptr<OperationPass<FuncOp>> createVerifyFullyConvertedPass() {
+std::unique_ptr<OperationPass<func::FuncOp>> createVerifyFullyConvertedPass() {
   return std::make_unique<VerifyFullyConvertedPass>();
 }
 
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
index 976c83d..0be9ef3 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
@@ -236,7 +236,7 @@
   // function.
   std::string entryName = "main";
   SymbolTable symbolTable(module.get());
-  auto mainFunc = symbolTable.lookup<FuncOp>(entryName);
+  auto mainFunc = symbolTable.lookup<func::FuncOp>(entryName);
   if (!mainFunc) {
     llvm::errs() << "Unable to find main function '" << entryName
                  << "' in converted module.\n";
@@ -272,7 +272,7 @@
 
   // Note that we emit the ABI last since any needed function-level
   // transformations (i.e. de-tupling, etc) should have been done.
-  pm.addNestedPass<FuncOp>(
+  pm.addNestedPass<func::FuncOp>(
       iree_integrations::MHLO::createEmitDefaultIREEABIPass());
 
   if (failed(pm.run(*module))) {
diff --git a/iree/compiler/Codegen/Common/WorkGroupSwizzle.cpp b/iree/compiler/Codegen/Common/WorkGroupSwizzle.cpp
index 39162c6..c3e72b6 100644
--- a/iree/compiler/Codegen/Common/WorkGroupSwizzle.cpp
+++ b/iree/compiler/Codegen/Common/WorkGroupSwizzle.cpp
@@ -70,7 +70,7 @@
   void runOnOperation() override {
     if (swizzleLogTile == 0) return;
     unsigned swizzleTile = pow(2, swizzleLogTile);
-    FuncOp funcOp = getOperation();
+    func::FuncOp funcOp = getOperation();
     std::array<IREE::HAL::InterfaceWorkgroupIDOp, 2> oldWorkgroupIds;
     bool xFound = false, yFound = false;
     funcOp.walk([&](IREE::HAL::InterfaceWorkgroupIDOp idOp) {
diff --git a/iree/compiler/Codegen/LLVMCPU/Passes.cpp b/iree/compiler/Codegen/LLVMCPU/Passes.cpp
index b4b5ced..3748935 100644
--- a/iree/compiler/Codegen/LLVMCPU/Passes.cpp
+++ b/iree/compiler/Codegen/LLVMCPU/Passes.cpp
@@ -253,8 +253,9 @@
   passManager.addPass(createVerifyLinalgTransformLegalityPass());
 
   // Do first level of tiling and distribution.
-  passManager.addNestedPass<FuncOp>(createInsertDistributionInfoPass());
-  passManager.addNestedPass<FuncOp>(createTileAndDistributeToWorkgroupsPass());
+  passManager.addNestedPass<func::FuncOp>(createInsertDistributionInfoPass());
+  passManager.addNestedPass<func::FuncOp>(
+      createTileAndDistributeToWorkgroupsPass());
   passManager.addPass(createCanonicalizerPass());
   passManager.addPass(createCSEPass());
   passManager.addNestedPass<func::FuncOp>(
@@ -320,8 +321,9 @@
   passManager.addPass(createVerifyLinalgTransformLegalityPass());
 
   // Do first level of tiling and distribution.
-  passManager.addNestedPass<FuncOp>(createInsertDistributionInfoPass());
-  passManager.addNestedPass<FuncOp>(createTileAndDistributeToWorkgroupsPass());
+  passManager.addNestedPass<func::FuncOp>(createInsertDistributionInfoPass());
+  passManager.addNestedPass<func::FuncOp>(
+      createTileAndDistributeToWorkgroupsPass());
   passManager.addPass(createCanonicalizerPass());
   passManager.addPass(createCSEPass());
   passManager.addNestedPass<func::FuncOp>(
diff --git a/iree/compiler/Dialect/Flow/IR/FlowOps.cpp b/iree/compiler/Dialect/Flow/IR/FlowOps.cpp
index d1379df..64f6a19 100644
--- a/iree/compiler/Dialect/Flow/IR/FlowOps.cpp
+++ b/iree/compiler/Dialect/Flow/IR/FlowOps.cpp
@@ -496,7 +496,6 @@
     }
   }
   return parser.parseRegion(body, regionArgs, regionArgTypes,
-                            /*argLocations=*/{},
                             /*enableNameShadowing=*/true);
 }
 
diff --git a/iree/compiler/Dialect/HAL/Transforms/DumpExecutableBenchmarks.cpp b/iree/compiler/Dialect/HAL/Transforms/DumpExecutableBenchmarks.cpp
index e6318dd..5728b33 100644
--- a/iree/compiler/Dialect/HAL/Transforms/DumpExecutableBenchmarks.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/DumpExecutableBenchmarks.cpp
@@ -178,7 +178,7 @@
   // Create an exported benchmark function that runs the dispatches.
   auto funcType =
       moduleBuilder.getFunctionType({moduleBuilder.getI32Type()}, {});
-  auto funcOp = moduleBuilder.create<mlir::FuncOp>(loc, baseName, funcType);
+  auto funcOp = moduleBuilder.create<func::FuncOp>(loc, baseName, funcType);
   funcOp.setVisibility(SymbolTable::Visibility::Public);
 
   // Mark the function as being a dispatch benchmark.
diff --git a/iree/compiler/Dialect/Stream/IR/StreamOps.cpp b/iree/compiler/Dialect/Stream/IR/StreamOps.cpp
index f77d09e..0e99a0f 100644
--- a/iree/compiler/Dialect/Stream/IR/StreamOps.cpp
+++ b/iree/compiler/Dialect/Stream/IR/StreamOps.cpp
@@ -285,7 +285,6 @@
     }
   }
   return parser.parseRegion(body, regionArgs, operandTypes,
-                            /*argLocations=*/{},
                             /*enableNameShadowing=*/false);
 }
 
@@ -358,7 +357,6 @@
     }
   }
   if (failed(parser.parseRegion(body, regionArgs, operandTypes,
-                                /*argLocations=*/{},
                                 /*enableNameShadowing=*/false))) {
     return failure();
   }
diff --git a/iree/compiler/Utils/PassUtils.h b/iree/compiler/Utils/PassUtils.h
index 5581c3e..18cf953 100644
--- a/iree/compiler/Utils/PassUtils.h
+++ b/iree/compiler/Utils/PassUtils.h
@@ -18,7 +18,8 @@
 /// Constructs a pipeline of passes across multiple nested op types.
 ///
 /// Usage:
-///   using FunctionLikeNest = MultiOpNest<FuncOp, IREE::Util::InitializerOp>;
+///   using FunctionLikeNest = MultiOpNest<func::FuncOp,
+///                                        IREE::Util::InitializerOp>;
 ///
 ///   FunctionLikeNest(passManager)
 ///     .addPass(createMyPass)
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
index a3059e8..f287c81 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
@@ -1440,13 +1440,11 @@
   if (succeeded(parser.parseOptionalKeyword("outs"))) {
     bool _1;
     SmallVector<NamedAttrList> _2;
-    SmallVector<Location> _3;
     outputsOperandsLoc = parser.getCurrentLocation();
     if (mlir::function_interface_impl::parseFunctionArgumentList(
             parser,
             /*allowAttributes=*/false,
             /*allowVariadic=*/false, outsOperands, outsTypes, /*argAttrs=*/_2,
-            /*argLocations=*/_3,
             /*isVariadic=*/_1) ||
         parser.resolveOperands(outsOperands, outsTypes, outputsOperandsLoc,
                                result.operands))
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertToLoops.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertToLoops.cpp
index 10629da..a593fbc 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertToLoops.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/ConvertToLoops.cpp
@@ -109,7 +109,7 @@
 };
 } // namespace
 
-std::unique_ptr<OperationPass<FuncOp>>
+std::unique_ptr<OperationPass<func::FuncOp>>
 IREE::LinalgExt::createLinalgExtToLoopsPass() {
   return std::make_unique<LinalgExtToLoopsPass>();
 }
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/Tiling.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/Tiling.cpp
index c95f927..825ba70 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/Tiling.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Passes/Tiling.cpp
@@ -281,7 +281,7 @@
 }
 
 void TiledOpInterfaceTilingPass::runOnOperation() {
-  FuncOp funcOp = getOperation();
+  func::FuncOp funcOp = getOperation();
   MLIRContext *context = funcOp.getContext();
 
   RewritePatternSet patterns(context);
@@ -360,7 +360,7 @@
   }
 }
 
-std::unique_ptr<OperationPass<FuncOp>>
+std::unique_ptr<OperationPass<func::FuncOp>>
 IREE::LinalgExt::createTiledOpInterfaceTilingPass() {
   return std::make_unique<TiledOpInterfaceTilingPass>();
 }
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Transforms/TransformInterpreter.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Transforms/TransformInterpreter.cpp
index 2440976..a59abca 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Transforms/TransformInterpreter.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgTransform/Transforms/TransformInterpreter.cpp
@@ -59,7 +59,7 @@
 /// Run enabling transformations (LICM and its variants, single-iteration loop
 /// removal, CSE) on the given function.
 static LogicalResult performEnablerTransformations(
-    FuncOp func, RewriteListener &listener,
+    func::FuncOp func, RewriteListener &listener,
     linalg::LinalgEnablingOptions options = linalg::LinalgEnablingOptions()) {
   MLIRContext *ctx = func->getContext();
   RewritePatternSet patterns(ctx);
@@ -95,7 +95,7 @@
 static LogicalResult performEnablerTransformations(
     Operation *containerOp, RewriteListener &listener,
     linalg::LinalgEnablingOptions options = linalg::LinalgEnablingOptions()) {
-  auto res = containerOp->walk([&](FuncOp func) {
+  auto res = containerOp->walk([&](func::FuncOp func) {
     if (failed(performEnablerTransformations(func, listener, options)))
       return WalkResult::interrupt();
     return WalkResult::advance();
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp
index 2e14e37..a288346 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp
@@ -661,7 +661,7 @@
     auto newFuncType = mlir::FunctionType::get(
         srcOp.getContext(), signatureConversion.getConvertedTypes(),
         convertedResultTypes);
-    auto newFuncOp = rewriter.create<mlir::FuncOp>(
+    auto newFuncOp = rewriter.create<func::FuncOp>(
         srcOp.getLoc(), srcOp.getName(), newFuncType);
     newFuncOp.setVisibility(srcOp.getVisibility());
     rewriter.inlineRegionBefore(srcOp.getBody(), newFuncOp.getBody(),
@@ -836,7 +836,7 @@
     Value status = adaptor.getOperands()[0];
     // Get the containing function return type so that we can create a
     // suitable null return value.
-    auto parentFunc = srcOp->getParentOfType<mlir::FuncOp>();
+    auto parentFunc = srcOp->getParentOfType<func::FuncOp>();
     if (!parentFunc)
       return rewriter.notifyMatchFailure(srcOp, "not contained by a func");
     Type convertedReturnType = parentFunc.getFunctionType().getResult(1);
diff --git a/third_party/llvm-project b/third_party/llvm-project
index bf59cd7..9b32886 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit bf59cd72447facdb7b17fc00c502d18a02135abb
+Subproject commit 9b32886e7e705bb28aab57682e612375075a0ad7
diff --git a/third_party/mlir-hlo b/third_party/mlir-hlo
index e7c0954..bbd8077 160000
--- a/third_party/mlir-hlo
+++ b/third_party/mlir-hlo
@@ -1 +1 @@
-Subproject commit e7c09547f52f495160553a02151ca0e927c67bc8
+Subproject commit bbd8077e020d4359ae0bcf8b5a895a5ebe2f020d