Integrate llvm-project and bump dependencies

* llvm-project: eb27da7dec67f1a36505b589b786ba1a499c274a
* mlir-hlo: 6643eac37609bdf91409627279d8b5ae28acf39c
* tensorflow: fddb6c72caa6a63ec86263a4d4230812c861cd10.

Rename Standard dialect of Func dialect and add missing dependencies to HAL/LLVM_AOT target
diff --git a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
index eb8b4e9..a64813a 100644
--- a/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
+++ b/build_tools/bazel_to_cmake/bazel_to_cmake_targets.py
@@ -67,7 +67,7 @@
     "@llvm-project//mlir:MemRefDialect": ["MLIRMemRef"],
     "@llvm-project//mlir:SCFToGPUPass": ["MLIRSCFToGPU"],
     "@llvm-project//mlir:SCFDialect": ["MLIRSCF"],
-    "@llvm-project//mlir:StandardOps": ["MLIRStandard"],
+    "@llvm-project//mlir:FuncDialect": ["MLIRFunc"],
     "@llvm-project//mlir:ShapeTransforms": ["MLIRShapeOpsTransforms"],
     "@llvm-project//mlir:SideEffects": ["MLIRSideEffectInterfaces"],
     "@llvm-project//mlir:SPIRVDialect": ["MLIRSPIRV"],
diff --git a/integrations/tensorflow/WORKSPACE b/integrations/tensorflow/WORKSPACE
index 8b04d07..5a94c36 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 = "62b8d4dd3f9e09810f4b2ab65d875dabce33548e"
+TENSORFLOW_COMMIT = "fddb6c72caa6a63ec86263a4d4230812c861cd10"
 
 git_repository(
     name = "org_tensorflow",
diff --git a/integrations/tensorflow/iree-dialects/BUILD b/integrations/tensorflow/iree-dialects/BUILD
index d1fa450..2ce6051 100644
--- a/integrations/tensorflow/iree-dialects/BUILD
+++ b/integrations/tensorflow/iree-dialects/BUILD
@@ -270,6 +270,7 @@
         "@llvm-project//mlir:ArithmeticUtils",
         "@llvm-project//mlir:ControlFlowInterfaces",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MathDialect",
@@ -277,7 +278,6 @@
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
         "@llvm-project//mlir:SideEffectInterfaces",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TensorUtils",
@@ -301,6 +301,7 @@
         "@llvm-project//mlir:Affine",
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:LinalgTransforms",
@@ -309,7 +310,6 @@
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TensorUtils",
@@ -480,11 +480,11 @@
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ControlFlowInterfaces",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
@@ -528,12 +528,12 @@
         ":IREEPyDMTransforms",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ArithmeticDialect",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:MlirOptLib",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
index d22db18..2fbe942 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
@@ -22,7 +22,7 @@
   MLIRSideEffectInterfaces
   MLIRSupport
   MLIRSCF
-  MLIRStandard
+  MLIRFunc
   MLIRTensor
   MLIRViewLikeInterface
 )
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
index 4fb8a6b..57f9d86 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/LinalgExtOps.cpp
@@ -14,11 +14,11 @@
 #include "llvm/Support/SMLoc.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/Utils/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Utils/StructuredOpsUtils.h"
 #include "mlir/IR/Attributes.h"
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp
index 439e2f2..06bc712 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp
@@ -9,8 +9,8 @@
 #include "llvm/ADT/SmallBitVector.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
index 26c64bf..0cd7fd0 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
@@ -18,7 +18,7 @@
   MLIRMemRef
   MLIRPass
   MLIRSCF
-  MLIRStandard
+  MLIRFunc
   MLIRSupport
   MLIRTensor
   MLIRTransforms
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
index 4f9f8c5..52c9dcf 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
@@ -11,11 +11,11 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
@@ -91,7 +91,7 @@
 struct LinalgExtToLoopsPass
     : public LinalgExtToLoopsBase<LinalgExtToLoopsPass> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<linalg::LinalgDialect, StandardOpsDialect,
+    registry.insert<linalg::LinalgDialect, func::FuncDialect,
                     mlir::arith::ArithmeticDialect, math::MathDialect,
                     memref::MemRefDialect, scf::SCFDialect>();
   }
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp
index f9dbf7d..25df1f8 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp
@@ -13,10 +13,10 @@
 #include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 #include "mlir/IR/Matchers.h"
@@ -262,7 +262,7 @@
     registry.insert<
         AffineDialect, IREE::Input::IREEInputDialect, linalg::LinalgDialect,
         IREE::LinalgExt::IREELinalgExtDialect, memref::MemRefDialect,
-        StandardOpsDialect, mlir::arith::ArithmeticDialect, math::MathDialect,
+        func::FuncDialect, mlir::arith::ArithmeticDialect, math::MathDialect,
         tensor::TensorDialect, scf::SCFDialect>();
   }
   void runOnOperation() override;
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp
index 7ce82a6..057ffef 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp
@@ -10,7 +10,7 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Dominance.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt
index 6c120a2..afafb18 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt
@@ -11,7 +11,7 @@
   IREEPyDMDialect
   MLIRIR
   MLIRParser
-  MLIRStandard
+  MLIRFunc
   MLIRTransformUtils
 )
 
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp
index 67957a6..b8aa35e 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp
@@ -9,7 +9,7 @@
 #include "iree-dialects/Dialect/Input/InputOps.h"
 #include "iree-dialects/Dialect/PyDM/IR/PyDMOps.h"
 #include "iree-dialects/Dialect/PyDM/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinDialect.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
@@ -222,7 +222,7 @@
     : public LowerIREEPyDMToRTLBase<LowerIREEPyDMToRTLPass> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<mlir::iree_compiler::IREE::Input::IREEInputDialect,
-                    BuiltinDialect, StandardOpsDialect>();
+                    BuiltinDialect, func::FuncDialect>();
   }
 
   void runOnOperation() override {
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt
index b9b3d02..e4da8ea 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt
@@ -13,7 +13,7 @@
   MLIRControlFlow
   MLIRIR
   MLIRMath
-  MLIRStandard
+  MLIRFunc
   MLIRTransformUtils
 )
 
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp
index fe60831..cd5e652 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp
@@ -13,8 +13,8 @@
 #include "iree-dialects/Dialect/PyDM/Transforms/ToIREE/TypeConverter.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinDialect.h"
 
 using namespace mlir;
@@ -27,7 +27,7 @@
     : public ConvertIREEPyDMToIREEBase<ConvertIREEPyDMToIREEPass> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<mlir::iree_compiler::IREE::Input::IREEInputDialect,
-                    BuiltinDialect, StandardOpsDialect, math::MathDialect>();
+                    BuiltinDialect, func::FuncDialect, math::MathDialect>();
   }
 
   void runOnOperation() override {
@@ -44,7 +44,7 @@
         .addLegalDialect<mlir::iree_compiler::IREE::Input::IREEInputDialect>();
     target.addLegalDialect<mlir::arith::ArithmeticDialect>();
     target.addLegalDialect<mlir::math::MathDialect>();
-    target.addLegalDialect<mlir::StandardOpsDialect>();
+    target.addLegalDialect<mlir::func::FuncDialect>();
 
     // Some CFG ops can be present in the original pydm program. Need to
     // verify legality based on types.
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp
index b0c48b1..b8a81fe 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/LoweringPatterns.cpp
@@ -9,8 +9,8 @@
 #include "iree-dialects/Dialect/PyDM/Transforms/ToIREE/Patterns.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Support/LLVM.h"
@@ -463,8 +463,8 @@
       return rewriter.notifyMatchFailure(srcOp,
                                          "result types could not be converted");
     }
-    rewriter.replaceOpWithNewOp<mlir::CallOp>(srcOp, srcOp.callee(),
-                                              resultTypes, adaptor.operands());
+    rewriter.replaceOpWithNewOp<mlir::func::CallOp>(
+        srcOp, srcOp.callee(), resultTypes, adaptor.operands());
     return success();
   }
 };
@@ -856,7 +856,8 @@
     // Raise and return block.
     rewriter.setInsertionPointToEnd(raiseAndReturnBlock);
     auto nullReturnValue = getNullValue(loc, rewriter, convertedReturnType);
-    rewriter.create<mlir::ReturnOp>(loc, ValueRange{status, nullReturnValue});
+    rewriter.create<mlir::func::ReturnOp>(loc,
+                                          ValueRange{status, nullReturnValue});
     return success();
   }
 };
@@ -871,7 +872,7 @@
     auto loc = srcOp.getLoc();
     auto zeroResult =
         rewriter.create<arith::ConstantOp>(loc, rewriter.getI32IntegerAttr(0));
-    rewriter.replaceOpWithNewOp<mlir::ReturnOp>(
+    rewriter.replaceOpWithNewOp<mlir::func::ReturnOp>(
         srcOp, ValueRange{zeroResult, adaptor.getOperands()[0]});
     return success();
   }
diff --git a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt
index 2417731..901fde6 100644
--- a/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt
+++ b/integrations/tensorflow/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt
@@ -4,7 +4,7 @@
   LINK_LIBS PUBLIC
   IREEPyDMDialect
   MLIRIR
-  MLIRStandard
+  MLIRFunc
   MLIRTransformUtils
 )
 
diff --git a/integrations/tensorflow/iree-dialects/python/CMakeLists.txt b/integrations/tensorflow/iree-dialects/python/CMakeLists.txt
index 8b899d5..c29cd84 100644
--- a/integrations/tensorflow/iree-dialects/python/CMakeLists.txt
+++ b/integrations/tensorflow/iree-dialects/python/CMakeLists.txt
@@ -62,7 +62,7 @@
   # build burden by ~5x. Make it stop.
   MLIRPythonSources.Core
   MLIRPythonSources.Dialects.builtin
-  MLIRPythonSources.Dialects.std
+  MLIRPythonSources.Dialects.func
   MLIRPythonSources.Passes
   IREEDialectsPythonSources
   IREEDialectsPythonExtensions
diff --git a/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt b/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
index 6c347b4..473ad48 100644
--- a/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
+++ b/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
@@ -6,7 +6,7 @@
   MLIROptLib
   MLIRSCF
   MLIRSCFTransforms
-  MLIRStandard
+  MLIRFunc
   MLIRTensor
   MLIRTransforms
   IREEInputDialect
diff --git a/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp b/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
index e9faaa7..e2029b6 100644
--- a/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
+++ b/integrations/tensorflow/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
@@ -11,11 +11,11 @@
 #include "iree-dialects/Dialect/PyDM/IR/PyDMDialect.h"
 #include "iree-dialects/Dialect/PyDM/Transforms/Passes.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Dialect.h"
@@ -44,7 +44,7 @@
       mlir::iree_compiler::IREE::PYDM::IREEPyDMDialect,
       // Upstream dialects
       mlir::arith::ArithmeticDialect, mlir::linalg::LinalgDialect,
-      mlir::memref::MemRefDialect, mlir::StandardOpsDialect,
+      mlir::memref::MemRefDialect, mlir::func::FuncDialect,
       mlir::scf::SCFDialect, mlir::tensor::TensorDialect>();
 
   IREE::LinalgExt::registerTiledOpInterfaceExternalModels(registry);
diff --git a/integrations/tensorflow/iree_tf_compiler/BUILD b/integrations/tensorflow/iree_tf_compiler/BUILD
index ac60619..11b6d60 100644
--- a/integrations/tensorflow/iree_tf_compiler/BUILD
+++ b/integrations/tensorflow/iree_tf_compiler/BUILD
@@ -55,10 +55,10 @@
     deps = [
         "//iree_tf_compiler/TFL",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MlirOptLib",
         "@llvm-project//mlir:QuantOps",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TosaDialect",
         "@org_tensorflow//tensorflow/compiler/mlir/lite:tensorflow_lite",
@@ -112,11 +112,11 @@
     deps = [
         "//iree_tf_compiler/MHLO",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@org_tensorflow//tensorflow/compiler/mlir/hlo:hlo_dialect_registration",
         "@org_tensorflow//tensorflow/compiler/mlir/xla:hlo_to_mlir_hlo",
diff --git a/integrations/tensorflow/iree_tf_compiler/MHLO/BUILD b/integrations/tensorflow/iree_tf_compiler/MHLO/BUILD
index e4adca9..77828ab 100644
--- a/integrations/tensorflow/iree_tf_compiler/MHLO/BUILD
+++ b/integrations/tensorflow/iree_tf_compiler/MHLO/BUILD
@@ -24,13 +24,13 @@
     ],
     deps = [
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFToStandard",
         "@llvm-project//mlir:SCFTransforms",
         "@llvm-project//mlir:Shape",
         "@llvm-project//mlir:ShapeTransforms",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TransformUtils",
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/BUILD b/integrations/tensorflow/iree_tf_compiler/TF/BUILD
index d432d7d..84adfce 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/BUILD
+++ b/integrations/tensorflow/iree_tf_compiler/TF/BUILD
@@ -35,6 +35,7 @@
         "//iree_tf_compiler/MHLO",
         "//iree_tf_compiler/Utils",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MemRefDialect",
@@ -42,7 +43,6 @@
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:Shape",
         "@llvm-project//mlir:ShapeTransforms",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TransformUtils",
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp b/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp
index d576659..1c61314 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/ConvertToMHLO.cpp
@@ -8,9 +8,9 @@
 #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h"
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
 #include "mlir-hlo/Dialect/mhlo/transforms/rewriters.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/Pass.h"
@@ -40,7 +40,7 @@
                 mlir::tf_device::TensorFlowDeviceDialect,
                 mlir::tf_saved_model::TensorFlowSavedModelDialect,
                 chlo::HloClientDialect, mhlo::MhloDialect, shape::ShapeDialect,
-                mlir::arith::ArithmeticDialect, StandardOpsDialect>();
+                mlir::arith::ArithmeticDialect, func::FuncDialect>();
   }
 
   StringRef getArgument() const override { return "iree-tf-convert-to-mhlo"; }
@@ -91,11 +91,11 @@
     target.addLegalDialect<chlo::HloClientDialect>();
     target.addLegalDialect<linalg::LinalgDialect>();
     target.addLegalDialect<mhlo::MhloDialect>();
-    target.addLegalDialect<mlir::StandardOpsDialect,
+    target.addLegalDialect<mlir::func::FuncDialect,
                            mlir::arith::ArithmeticDialect>();
     target.addLegalDialect<shape::ShapeDialect>();
     target.addLegalDialect<tensor::TensorDialect>();
-    target.addLegalOp<mlir::CallOp>();
+    target.addLegalOp<mlir::func::CallOp>();
     target.addLegalOp<mlir::tensor::CastOp>();
     target.addLegalOp<mlir::tensor::DimOp>();
 
diff --git a/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp b/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp
index cc7cde8..69fba8b 100644
--- a/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/TF/SavedModelToIreeABI.cpp
@@ -22,6 +22,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/JSON.h"
 #include "mlir/Dialect/Affine/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/MLIRContext.h"
@@ -510,8 +511,8 @@
   // Emit the call to the internal func.
   ResultRange internalResults =
       builder
-          .create<CallOp>(loc, internalFunc.getType().getResults(),
-                          internalFunc.getName(), callArgs)
+          .create<func::CallOp>(loc, internalFunc.getType().getResults(),
+                                internalFunc.getName(), callArgs)
           .getResults();
 
   // And then unflatten the results for return from the wrapper.
@@ -540,7 +541,7 @@
 
   assert(llvm::all_of(wrapperReturns, [](Value v) { return v != nullptr; }) &&
          "not all call returns mapped");
-  builder.create<ReturnOp>(loc, wrapperReturns);
+  builder.create<func::ReturnOp>(loc, wrapperReturns);
 
   // Add ABI attribute.
   {
diff --git a/integrations/tensorflow/iree_tf_compiler/TFL/BUILD b/integrations/tensorflow/iree_tf_compiler/TFL/BUILD
index b608c56..42e1dff 100644
--- a/integrations/tensorflow/iree_tf_compiler/TFL/BUILD
+++ b/integrations/tensorflow/iree_tf_compiler/TFL/BUILD
@@ -50,13 +50,13 @@
         "//iree-dialects:IREEInputDialect",
         "//iree_tf_compiler/Utils",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:QuantOps",
         "@llvm-project//mlir:ReconcileUnrealizedCasts",
         "@llvm-project//mlir:Shape",
         "@llvm-project//mlir:ShapeTransforms",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TosaDialect",
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 c4fb70d..816cd4e 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-import-tflite-main.cpp
@@ -65,7 +65,7 @@
   registry.insert<mlir::TFL::TensorFlowLiteDialect>();
   registry.insert<mlir::tosa::TosaDialect>();
   registry.insert<quant::QuantizationDialect>();
-  registry.insert<StandardOpsDialect, mlir::arith::ArithmeticDialect>();
+  registry.insert<func::FuncDialect, mlir::arith::ArithmeticDialect>();
 
   RegisterAllTensorFlowDialects(registry);
 
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 f14ab88..c5e0d64 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-import-xla-main.cpp
@@ -16,8 +16,8 @@
 #include "llvm/Support/InitLLVM.h"
 #include "llvm/Support/ToolOutputFile.h"
 #include "mlir-hlo/Dialect/mhlo/IR/register.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Dialect.h"
@@ -145,7 +145,7 @@
 
   DialectRegistry registry;
   mlir::mhlo::registerAllMhloDialects(registry);
-  registry.insert<mlir::StandardOpsDialect, mlir::arith::ArithmeticDialect,
+  registry.insert<mlir::func::FuncDialect, mlir::arith::ArithmeticDialect,
                   mlir::math::MathDialect>();
   MLIRContext context;
   OwningOpRef<mlir::ModuleOp> module =
diff --git a/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp b/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp
index cccfab2..4db1b9f 100644
--- a/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp
+++ b/integrations/tensorflow/iree_tf_compiler/iree-opt-tflite-main.cpp
@@ -12,8 +12,8 @@
 
 #include "iree_tf_compiler/TFL/Passes.h"
 #include "llvm/Support/InitLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Quant/QuantOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/IR/Dialect.h"
 #include "mlir/Support/MlirOptMain.h"
@@ -29,7 +29,7 @@
   registry.insert<mlir::quant::QuantizationDialect>();
   registry.insert<mlir::TF::TensorFlowDialect>();
   registry.insert<mlir::TFL::TensorFlowLiteDialect>();
-  registry.insert<mlir::StandardOpsDialect>();
+  registry.insert<mlir::func::FuncDialect>();
   registry.insert<mlir::tosa::TosaDialect>();
 
   RegisterAllTensorFlowDialects(registry);
diff --git a/iree/compiler/Bindings/Native/Transforms/BUILD b/iree/compiler/Bindings/Native/Transforms/BUILD
index 60ee5b8..00d59ed 100644
--- a/iree/compiler/Bindings/Native/Transforms/BUILD
+++ b/iree/compiler/Bindings/Native/Transforms/BUILD
@@ -26,11 +26,11 @@
         "//iree/compiler/Utils",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:Shape",
         "@llvm-project//mlir:ShapeTransforms",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TransformUtils",
diff --git a/iree/compiler/Bindings/Native/Transforms/CMakeLists.txt b/iree/compiler/Bindings/Native/Transforms/CMakeLists.txt
index 56ef523..f64f353 100644
--- a/iree/compiler/Bindings/Native/Transforms/CMakeLists.txt
+++ b/iree/compiler/Bindings/Native/Transforms/CMakeLists.txt
@@ -21,11 +21,11 @@
   DEPS
     LLVMSupport
     MLIRAffineUtils
+    MLIRFunc
     MLIRIR
     MLIRPass
     MLIRShape
     MLIRShapeOpsTransforms
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTransformUtils
diff --git a/iree/compiler/Bindings/Native/Transforms/WrapEntryPoints.cpp b/iree/compiler/Bindings/Native/Transforms/WrapEntryPoints.cpp
index d06cd63..ce174bc 100644
--- a/iree/compiler/Bindings/Native/Transforms/WrapEntryPoints.cpp
+++ b/iree/compiler/Bindings/Native/Transforms/WrapEntryPoints.cpp
@@ -8,7 +8,7 @@
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "llvm/ADT/STLExtras.h"
 #include "mlir/Dialect/Affine/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/MLIRContext.h"
@@ -29,7 +29,7 @@
     : public PassWrapper<WrapEntryPointsPass, OperationPass<ModuleOp>> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<StandardOpsDialect, mlir::arith::ArithmeticDialect,
+    registry.insert<func::FuncDialect, mlir::arith::ArithmeticDialect,
                     mlir::tensor::TensorDialect, IREE::HAL::HALDialect>();
   }
 
@@ -170,8 +170,8 @@
     }
 
     // Make the call with the original types.
-    auto callOp = entryBuilder.create<CallOp>(entryFuncOp.getLoc(), entryFuncOp,
-                                              arguments);
+    auto callOp = entryBuilder.create<func::CallOp>(entryFuncOp.getLoc(),
+                                                    entryFuncOp, arguments);
 
     // Marshal results.
     SmallVector<Value> results;
@@ -189,7 +189,7 @@
         results.push_back(result.value());
       }
     }
-    entryBuilder.create<ReturnOp>(entryFuncOp.getLoc(), results);
+    entryBuilder.create<func::ReturnOp>(entryFuncOp.getLoc(), results);
 
     return wrapperFuncOp;
   }
diff --git a/iree/compiler/Bindings/TFLite/Transforms/BUILD b/iree/compiler/Bindings/TFLite/Transforms/BUILD
index 7ea993b..f48e476 100644
--- a/iree/compiler/Bindings/TFLite/Transforms/BUILD
+++ b/iree/compiler/Bindings/TFLite/Transforms/BUILD
@@ -28,6 +28,7 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:AffineUtils",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:Shape",
diff --git a/iree/compiler/Bindings/TFLite/Transforms/CMakeLists.txt b/iree/compiler/Bindings/TFLite/Transforms/CMakeLists.txt
index de5230f..549559d 100644
--- a/iree/compiler/Bindings/TFLite/Transforms/CMakeLists.txt
+++ b/iree/compiler/Bindings/TFLite/Transforms/CMakeLists.txt
@@ -22,6 +22,7 @@
     LLVMSupport
     MLIRAffineUtils
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRPass
     MLIRShape
diff --git a/iree/compiler/Bindings/TFLite/Transforms/WrapEntryPoints.cpp b/iree/compiler/Bindings/TFLite/Transforms/WrapEntryPoints.cpp
index e320dd2..e330c8d 100644
--- a/iree/compiler/Bindings/TFLite/Transforms/WrapEntryPoints.cpp
+++ b/iree/compiler/Bindings/TFLite/Transforms/WrapEntryPoints.cpp
@@ -12,6 +12,7 @@
 #include "llvm/ADT/StringExtras.h"
 #include "mlir/Dialect/Affine/Utils.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/MLIRContext.h"
@@ -48,7 +49,7 @@
     : public PassWrapper<WrapEntryPointsPass, OperationPass<ModuleOp>> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect, mlir::arith::ArithmeticDialect,
+    registry.insert<mlir::func::FuncDialect, mlir::arith::ArithmeticDialect,
                     mlir::tensor::TensorDialect, IREE::HAL::HALDialect,
                     IREE::Util::UtilDialect>();
   }
@@ -239,7 +240,7 @@
     // Replace each exit from the function with a storage back to the shape
     // variables.
     for (auto returnOp :
-         llvm::to_vector<4>(calcFuncOp.getOps<mlir::ReturnOp>())) {
+         llvm::to_vector<4>(calcFuncOp.getOps<mlir::func::ReturnOp>())) {
       auto exitLoc = returnOp.getLoc();
       OpBuilder exitBuilder(returnOp);
 
@@ -265,11 +266,11 @@
           exitBuilder.createOrFold<arith::ConstantIntOp>(exitLoc, 0, 1);
       exitBuilder.create<IREE::Util::GlobalStoreOp>(
           exitLoc, falseValue, dirtyGlobalOp.getSymbolName());
-      exitBuilder.create<mlir::ReturnOp>(exitLoc);
+      exitBuilder.create<mlir::func::ReturnOp>(exitLoc);
       returnOp.erase();
     }
 
-    OpBuilder::atBlockBegin(returnBlock).create<mlir::ReturnOp>(loc);
+    OpBuilder::atBlockBegin(returnBlock).create<mlir::func::ReturnOp>(loc);
 
     return calcFuncOp;
   }
@@ -385,7 +386,7 @@
         entryBuilder);
 
     auto exitBuilder = OpBuilder::atBlockBegin(exitBlock);
-    exitBuilder.create<mlir::ReturnOp>(loc);
+    exitBuilder.create<mlir::func::ReturnOp>(loc);
   }
 
   // Creates a function to resize |inputGlobalOps| and sets the |dirtyGlobalOp|
@@ -422,7 +423,7 @@
     auto trueValue = exitBuilder.createOrFold<arith::ConstantIntOp>(loc, 1, 1);
     exitBuilder.create<IREE::Util::GlobalStoreOp>(loc, trueValue,
                                                   dirtyGlobalOp.getName());
-    exitBuilder.create<mlir::ReturnOp>(loc);
+    exitBuilder.create<mlir::func::ReturnOp>(loc);
   }
 
   // Creates a function to query the |outputGlobalOps| at runtime by the
@@ -449,7 +450,7 @@
 
     // Always call the recalculation function - it checks for whether it needs
     // to run based on the dirty flag value.
-    entryBuilder.create<mlir::CallOp>(loc, calculateShapeFuncOp);
+    entryBuilder.create<mlir::func::CallOp>(loc, calculateShapeFuncOp);
 
     auto *exitBlock = buildSwitch(
         loc, entryBlock->getArgument(0), outputDynamicDims.size(),
@@ -459,7 +460,7 @@
         entryBuilder);
 
     auto exitBuilder = OpBuilder::atBlockBegin(exitBlock);
-    exitBuilder.create<mlir::ReturnOp>(loc);
+    exitBuilder.create<mlir::func::ReturnOp>(loc);
   }
 
   // Creates the corresponding wrapper function for the given entry point.
@@ -528,8 +529,8 @@
           arg.getLoc(), inputDynamicDims.tensorType, arg,
           TypeAttr::get(inputDynamicDims.tensorType), dynamicDims));
     }
-    auto callOp = entryBuilder.create<mlir::CallOp>(entryFuncOp.getLoc(),
-                                                    entryFuncOp, callOperands);
+    auto callOp = entryBuilder.create<mlir::func::CallOp>(
+        entryFuncOp.getLoc(), entryFuncOp, callOperands);
     SmallVector<Value> callResults;
     for (auto output : llvm::zip(callOp.getResults(), outputDynamicDims)) {
       auto result = std::get<0>(output);
@@ -558,7 +559,8 @@
         entryBuilder.create<arith::ConstantIntOp>(entryFuncOp.getLoc(), 0, 1),
         dirtyGlobalOp.getSymbolName());
 
-    entryBuilder.create<mlir::ReturnOp>(entryFuncOp.getLoc(), callResults);
+    entryBuilder.create<mlir::func::ReturnOp>(entryFuncOp.getLoc(),
+                                              callResults);
   }
 
   void wrapEntryPoint(mlir::FuncOp funcOp) {
diff --git a/iree/compiler/Codegen/Common/BUILD b/iree/compiler/Codegen/Common/BUILD
index 2afb52f..5859f09 100644
--- a/iree/compiler/Codegen/Common/BUILD
+++ b/iree/compiler/Codegen/Common/BUILD
@@ -83,6 +83,7 @@
         "@llvm-project//mlir:BufferizationTransforms",
         "@llvm-project//mlir:CFGTransforms",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:GPUDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LLVMCommonConversion",
@@ -98,7 +99,6 @@
         "@llvm-project//mlir:SCFDialect",
         "@llvm-project//mlir:SCFTransforms",
         "@llvm-project//mlir:SideEffectInterfaces",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
diff --git a/iree/compiler/Codegen/Common/CMakeLists.txt b/iree/compiler/Codegen/Common/CMakeLists.txt
index d06bc9d..90fd4ef 100644
--- a/iree/compiler/Codegen/Common/CMakeLists.txt
+++ b/iree/compiler/Codegen/Common/CMakeLists.txt
@@ -58,6 +58,7 @@
     MLIRArithmeticTransforms
     MLIRBufferization
     MLIRBufferizationTransforms
+    MLIRFunc
     MLIRGPUOps
     MLIRIR
     MLIRLLVMCommonConversion
@@ -73,7 +74,6 @@
     MLIRSCFToControlFlow
     MLIRSCFTransforms
     MLIRSideEffectInterfaces
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTransforms
diff --git a/iree/compiler/Codegen/Common/DestructiveUpdateUtils.cpp b/iree/compiler/Codegen/Common/DestructiveUpdateUtils.cpp
index 60bdac3..592ed8d 100644
--- a/iree/compiler/Codegen/Common/DestructiveUpdateUtils.cpp
+++ b/iree/compiler/Codegen/Common/DestructiveUpdateUtils.cpp
@@ -17,10 +17,10 @@
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Dominance.h"
 #include "mlir/IR/PatternMatch.h"
diff --git a/iree/compiler/Codegen/Common/FlattenMemRefSubspanPass.cpp b/iree/compiler/Codegen/Common/FlattenMemRefSubspanPass.cpp
index 6daea2d..9b94632 100644
--- a/iree/compiler/Codegen/Common/FlattenMemRefSubspanPass.cpp
+++ b/iree/compiler/Codegen/Common/FlattenMemRefSubspanPass.cpp
@@ -38,8 +38,8 @@
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/AffineExpr.h"
 #include "mlir/IR/AffineMap.h"
diff --git a/iree/compiler/Codegen/Common/FoldTensorExtractOpPass.cpp b/iree/compiler/Codegen/Common/FoldTensorExtractOpPass.cpp
index 5d680c1..21cf61c 100644
--- a/iree/compiler/Codegen/Common/FoldTensorExtractOpPass.cpp
+++ b/iree/compiler/Codegen/Common/FoldTensorExtractOpPass.cpp
@@ -6,8 +6,8 @@
 #include "iree/compiler/Codegen/PassDetail.h"
 #include "iree/compiler/Codegen/Passes.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
diff --git a/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp b/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp
index 4621f4f..10b5c58 100644
--- a/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp
+++ b/iree/compiler/Codegen/Common/IREEComprehensiveBufferizePass.cpp
@@ -4,7 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-//===- IREEComprehensiveBufferizePass.cpp.cpp - -------------------------===//
+//===- IREEComprehensiveBufferizePass.cpp - -------------------------===//
 //
 // Wrapper pass to use MLIRs ComprehensiveBufferization pass.
 //
@@ -33,6 +33,7 @@
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/Bufferization/Transforms/BufferUtils.h"
 #include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
@@ -77,8 +78,8 @@
     registry
         .insert<arith::ArithmeticDialect, IREE::Util::UtilDialect,
                 linalg::LinalgDialect, memref::MemRefDialect, scf::SCFDialect,
-                StandardOpsDialect, tensor::TensorDialect,
-                vector::VectorDialect, AffineDialect, IREE::Flow::FlowDialect,
+                func::FuncDialect, tensor::TensorDialect, vector::VectorDialect,
+                AffineDialect, IREE::Flow::FlowDialect,
                 bufferization::BufferizationDialect>();
   }
 
diff --git a/iree/compiler/Codegen/Common/LinalgBufferizePass.cpp b/iree/compiler/Codegen/Common/LinalgBufferizePass.cpp
index 6775676..391ee1a 100644
--- a/iree/compiler/Codegen/Common/LinalgBufferizePass.cpp
+++ b/iree/compiler/Codegen/Common/LinalgBufferizePass.cpp
@@ -52,6 +52,7 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Analysis/SliceAnalysis.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
@@ -978,7 +979,7 @@
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<mlir::bufferization::BufferizationDialect,
                     IREE::Util::UtilDialect, linalg::LinalgDialect,
-                    memref::MemRefDialect, scf::SCFDialect, StandardOpsDialect,
+                    memref::MemRefDialect, scf::SCFDialect, func::FuncDialect,
                     mlir::math::MathDialect, mlir::arith::ArithmeticDialect>();
   }
   void runOnOperation() override;
diff --git a/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp b/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp
index 5a4df84..1d95769 100644
--- a/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp
+++ b/iree/compiler/Codegen/Common/OptimizeVectorTransferPass.cpp
@@ -7,9 +7,9 @@
 #include "iree/compiler/Codegen/PassDetail.h"
 #include "iree/compiler/Codegen/Passes.h"
 #include "mlir/Dialect/Affine/LoopUtils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/Transforms/Hoisting.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
 #include "mlir/Pass/Pass.h"
diff --git a/iree/compiler/Codegen/Common/VectorizeConv.cpp b/iree/compiler/Codegen/Common/VectorizeConv.cpp
index 8f89aca..a2712dc 100644
--- a/iree/compiler/Codegen/Common/VectorizeConv.cpp
+++ b/iree/compiler/Codegen/Common/VectorizeConv.cpp
@@ -9,9 +9,9 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Debug.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Utils/StructuredOpsUtils.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/AffineExpr.h"
diff --git a/iree/compiler/Codegen/Dialect/BUILD b/iree/compiler/Codegen/Dialect/BUILD
index 9c6008b..6718c02 100644
--- a/iree/compiler/Codegen/Dialect/BUILD
+++ b/iree/compiler/Codegen/Dialect/BUILD
@@ -58,9 +58,9 @@
         "//iree/compiler/Codegen/Utils",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Parser",
-        "@llvm-project//mlir:StandardOps",
     ],
 )
 
diff --git a/iree/compiler/Codegen/Dialect/CMakeLists.txt b/iree/compiler/Codegen/Dialect/CMakeLists.txt
index 16f6826..f0155db 100644
--- a/iree/compiler/Codegen/Dialect/CMakeLists.txt
+++ b/iree/compiler/Codegen/Dialect/CMakeLists.txt
@@ -30,9 +30,9 @@
     ::IREECodegenDialectGen
     ::LoweringConfigGen
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRParser
-    MLIRStandard
     iree::compiler::Codegen::Utils
   PUBLIC
 )
diff --git a/iree/compiler/Codegen/Dialect/LoweringConfig.cpp b/iree/compiler/Codegen/Dialect/LoweringConfig.cpp
index ddd7575..f3c7409 100644
--- a/iree/compiler/Codegen/Dialect/LoweringConfig.cpp
+++ b/iree/compiler/Codegen/Dialect/LoweringConfig.cpp
@@ -8,7 +8,7 @@
 
 #include "iree/compiler/Codegen/Dialect/IREECodegenDialect.h"
 #include "llvm/ADT/TypeSwitch.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/DialectImplementation.h"
 
 #define GET_ATTRDEF_CLASSES
diff --git a/iree/compiler/Codegen/Interfaces/BUILD b/iree/compiler/Codegen/Interfaces/BUILD
index 9a323e0..ef69d02 100644
--- a/iree/compiler/Codegen/Interfaces/BUILD
+++ b/iree/compiler/Codegen/Interfaces/BUILD
@@ -59,11 +59,11 @@
         "@llvm-project//mlir:ArithmeticTransforms",
         "@llvm-project//mlir:BufferizationDialect",
         "@llvm-project//mlir:BufferizationTransforms",
+        "@llvm-project//mlir:FuncTransforms",
         "@llvm-project//mlir:LinalgTransforms",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:ModuleBufferization",
         "@llvm-project//mlir:SCFTransforms",
-        "@llvm-project//mlir:StandardOpsTransforms",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorTransforms",
         "@llvm-project//mlir:VectorTransforms",
diff --git a/iree/compiler/Codegen/Interfaces/CMakeLists.txt b/iree/compiler/Codegen/Interfaces/CMakeLists.txt
index 4a4929f..ea969f2 100644
--- a/iree/compiler/Codegen/Interfaces/CMakeLists.txt
+++ b/iree/compiler/Codegen/Interfaces/CMakeLists.txt
@@ -35,11 +35,11 @@
     MLIRArithmeticTransforms
     MLIRBufferization
     MLIRBufferizationTransforms
+    MLIRFuncTransforms
     MLIRLinalgTransforms
     MLIRMemRef
     MLIRModuleBufferization
     MLIRSCFTransforms
-    MLIRStandardOpsTransforms
     MLIRSupport
     MLIRTensorTransforms
     MLIRVectorTransforms
diff --git a/iree/compiler/Codegen/LLVMCPU/BUILD b/iree/compiler/Codegen/LLVMCPU/BUILD
index 3d842a6..e101f53 100644
--- a/iree/compiler/Codegen/LLVMCPU/BUILD
+++ b/iree/compiler/Codegen/LLVMCPU/BUILD
@@ -52,6 +52,8 @@
         "@llvm-project//mlir:CFGTransforms",
         "@llvm-project//mlir:ControlFlowToLLVM",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
+        "@llvm-project//mlir:FuncTransforms",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LLVMCommonConversion",
         "@llvm-project//mlir:LLVMDialect",
@@ -70,8 +72,6 @@
         "@llvm-project//mlir:ReconcileUnrealizedCasts",
         "@llvm-project//mlir:SCFDialect",
         "@llvm-project//mlir:SCFTransforms",
-        "@llvm-project//mlir:StandardOps",
-        "@llvm-project//mlir:StandardOpsTransforms",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TosaDialect",
         "@llvm-project//mlir:TosaToStandard",
diff --git a/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt b/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt
index 3f4d299..820fd97 100644
--- a/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt
+++ b/iree/compiler/Codegen/LLVMCPU/CMakeLists.txt
@@ -36,6 +36,8 @@
     MLIRArmNeon
     MLIRArmNeon2dToIntr
     MLIRControlFlowToLLVM
+    MLIRFunc
+    MLIRFuncTransforms
     MLIRIR
     MLIRLLVMCommonConversion
     MLIRLLVMIR
@@ -53,8 +55,6 @@
     MLIRSCF
     MLIRSCFToControlFlow
     MLIRSCFTransforms
-    MLIRStandard
-    MLIRStandardOpsTransforms
     MLIRStandardToLLVM
     MLIRTensor
     MLIRTosa
diff --git a/iree/compiler/Codegen/LLVMCPU/ConvertToLLVM.cpp b/iree/compiler/Codegen/LLVMCPU/ConvertToLLVM.cpp
index 9929eb8..94031f7 100644
--- a/iree/compiler/Codegen/LLVMCPU/ConvertToLLVM.cpp
+++ b/iree/compiler/Codegen/LLVMCPU/ConvertToLLVM.cpp
@@ -33,12 +33,12 @@
 #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
 #include "mlir/Conversion/VectorToSCF/VectorToSCF.h"
 #include "mlir/Dialect/ArmNeon/ArmNeonDialect.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/LLVMIR/LLVMTypes.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/Math/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/BuiltinAttributes.h"
@@ -459,12 +459,12 @@
     // Add default zero return value.
     // TODO(ataei): do something meaningful with the return value; non-zero will
     // have the runtime bail out with an error.
-    for (auto returnOp :
-         llvm::make_early_inc_range(llvmFuncOp.getOps<mlir::ReturnOp>())) {
+    for (auto returnOp : llvm::make_early_inc_range(
+             llvmFuncOp.getOps<mlir::func::ReturnOp>())) {
       rewriter.setInsertionPoint(returnOp);
       auto returnValue = rewriter.createOrFold<mlir::arith::ConstantIntOp>(
           returnOp.getLoc(), 0, 32);
-      rewriter.replaceOpWithNewOp<mlir::ReturnOp>(returnOp, returnValue);
+      rewriter.replaceOpWithNewOp<mlir::func::ReturnOp>(returnOp, returnValue);
     }
 
     rewriter.eraseOp(stdFuncOp);
@@ -738,7 +738,7 @@
 
   LLVMConversionTarget target(getContext());
   target.addLegalOp<ModuleOp>();
-  target.addIllegalDialect<StandardOpsDialect, mlir::arith::ArithmeticDialect,
+  target.addIllegalDialect<func::FuncDialect, mlir::arith::ArithmeticDialect,
                            IREE::Util::UtilDialect, IREE::HAL::HALDialect,
                            math::MathDialect, tosa::TosaDialect>();
   target.addIllegalOp<UnrealizedConversionCastOp>();
@@ -748,7 +748,7 @@
     if (isEntryPoint(funcOp)) return false;
     return true;
   });
-  target.addDynamicallyLegalDialect<StandardOpsDialect, mlir::math::MathDialect,
+  target.addDynamicallyLegalDialect<func::FuncDialect, mlir::math::MathDialect,
                                     mlir::arith::ArithmeticDialect,
                                     IREE::Util::UtilDialect,
                                     IREE::HAL::HALDialect, math::MathDialect>(
diff --git a/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp b/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
index c9e9161..95bcd63 100644
--- a/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
+++ b/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
@@ -14,11 +14,11 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/TargetSelect.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/IR/LinalgInterfaces.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
diff --git a/iree/compiler/Codegen/LLVMCPU/Passes.cpp b/iree/compiler/Codegen/LLVMCPU/Passes.cpp
index 544f28e..9a2f78b 100644
--- a/iree/compiler/Codegen/LLVMCPU/Passes.cpp
+++ b/iree/compiler/Codegen/LLVMCPU/Passes.cpp
@@ -17,9 +17,9 @@
 #include "mlir/Conversion/ReconcileUnrealizedCasts/ReconcileUnrealizedCasts.h"
 #include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/Passes.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/Pass/PassManager.h"
 #include "mlir/Transforms/Passes.h"
 
diff --git a/iree/compiler/Codegen/LLVMCPU/VectorContractCustomKernels.cpp b/iree/compiler/Codegen/LLVMCPU/VectorContractCustomKernels.cpp
index 8cadc1a..9e303d2 100644
--- a/iree/compiler/Codegen/LLVMCPU/VectorContractCustomKernels.cpp
+++ b/iree/compiler/Codegen/LLVMCPU/VectorContractCustomKernels.cpp
@@ -16,9 +16,9 @@
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
 #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
 #include "mlir/Dialect/ArmNeon/ArmNeonDialect.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/LLVMIR/LLVMTypes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/Pass/Pass.h"
diff --git a/iree/compiler/Codegen/LLVMGPU/BUILD b/iree/compiler/Codegen/LLVMGPU/BUILD
index e2262d1..87af66b 100644
--- a/iree/compiler/Codegen/LLVMGPU/BUILD
+++ b/iree/compiler/Codegen/LLVMGPU/BUILD
@@ -52,6 +52,8 @@
         "@llvm-project//mlir:ArithmeticToLLVM",
         "@llvm-project//mlir:ArithmeticTransforms",
         "@llvm-project//mlir:ControlFlowToLLVM",
+        "@llvm-project//mlir:FuncDialect",
+        "@llvm-project//mlir:FuncTransforms",
         "@llvm-project//mlir:GPUDialect",
         "@llvm-project//mlir:GPUToNVVMTransforms",
         "@llvm-project//mlir:GPUToROCDLTransforms",
@@ -72,8 +74,6 @@
         "@llvm-project//mlir:SCFDialect",
         "@llvm-project//mlir:SCFToControlFlow",
         "@llvm-project//mlir:SCFTransforms",
-        "@llvm-project//mlir:StandardOps",
-        "@llvm-project//mlir:StandardOpsTransforms",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
         "@llvm-project//mlir:VectorOps",
diff --git a/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt b/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt
index ba62196..3448329 100644
--- a/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt
+++ b/iree/compiler/Codegen/LLVMGPU/CMakeLists.txt
@@ -43,6 +43,8 @@
     MLIRArithmeticToLLVM
     MLIRArithmeticTransforms
     MLIRControlFlowToLLVM
+    MLIRFunc
+    MLIRFuncTransforms
     MLIRGPUOps
     MLIRGPUToNVVMTransforms
     MLIRGPUToROCDLTransforms
@@ -62,8 +64,6 @@
     MLIRSCF
     MLIRSCFToControlFlow
     MLIRSCFTransforms
-    MLIRStandard
-    MLIRStandardOpsTransforms
     MLIRStandardToLLVM
     MLIRSupport
     MLIRTransforms
diff --git a/iree/compiler/Codegen/LLVMGPU/ConvertToLLVM.cpp b/iree/compiler/Codegen/LLVMGPU/ConvertToLLVM.cpp
index 4cef1e0..4cce8cf 100644
--- a/iree/compiler/Codegen/LLVMGPU/ConvertToLLVM.cpp
+++ b/iree/compiler/Codegen/LLVMGPU/ConvertToLLVM.cpp
@@ -13,11 +13,11 @@
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
 #include "mlir/Conversion/LLVMCommon/TypeConverter.h"
 #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/NVVMDialect.h"
 #include "mlir/Dialect/LLVMIR/ROCDLDialect.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
diff --git a/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp b/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
index 2fb13d7..00ad5d9 100644
--- a/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
+++ b/iree/compiler/Codegen/LLVMGPU/ConvertToNVVM.cpp
@@ -19,9 +19,9 @@
 #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
 #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/NVVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 #include "mlir/Transforms/Passes.h"
diff --git a/iree/compiler/Codegen/LLVMGPU/ConvertToROCDL.cpp b/iree/compiler/Codegen/LLVMGPU/ConvertToROCDL.cpp
index 22cdfe5..732d003 100644
--- a/iree/compiler/Codegen/LLVMGPU/ConvertToROCDL.cpp
+++ b/iree/compiler/Codegen/LLVMGPU/ConvertToROCDL.cpp
@@ -19,9 +19,9 @@
 #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
 #include "mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/ROCDLDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 #include "mlir/Transforms/Passes.h"
diff --git a/iree/compiler/Codegen/LLVMGPU/LLVMGPUTileAndDistribute.cpp b/iree/compiler/Codegen/LLVMGPU/LLVMGPUTileAndDistribute.cpp
index 223d25c..3674387 100644
--- a/iree/compiler/Codegen/LLVMGPU/LLVMGPUTileAndDistribute.cpp
+++ b/iree/compiler/Codegen/LLVMGPU/LLVMGPUTileAndDistribute.cpp
@@ -16,9 +16,9 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/NVVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/Support/MathExtras.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
diff --git a/iree/compiler/Codegen/LLVMGPU/Passes.cpp b/iree/compiler/Codegen/LLVMGPU/Passes.cpp
index c41c6b1..0ef1ebc 100644
--- a/iree/compiler/Codegen/LLVMGPU/Passes.cpp
+++ b/iree/compiler/Codegen/LLVMGPU/Passes.cpp
@@ -13,9 +13,9 @@
 #include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"
 #include "mlir/Conversion/VectorToGPU/VectorToGPU.h"
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/Passes.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/Pass/PassManager.h"
 #include "mlir/Pass/PassOptions.h"
 #include "mlir/Pass/PassRegistry.h"
diff --git a/iree/compiler/Codegen/SPIRV/BUILD b/iree/compiler/Codegen/SPIRV/BUILD
index 57efa7b..15befe7 100644
--- a/iree/compiler/Codegen/SPIRV/BUILD
+++ b/iree/compiler/Codegen/SPIRV/BUILD
@@ -57,6 +57,8 @@
         "@llvm-project//mlir:ArithmeticTransforms",
         "@llvm-project//mlir:BufferizationDialect",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
+        "@llvm-project//mlir:FuncTransforms",
         "@llvm-project//mlir:GPUDialect",
         "@llvm-project//mlir:GPUToSPIRV",
         "@llvm-project//mlir:GPUTransforms",
@@ -76,8 +78,6 @@
         "@llvm-project//mlir:SPIRVDialect",
         "@llvm-project//mlir:SPIRVTransforms",
         "@llvm-project//mlir:SideEffectInterfaces",
-        "@llvm-project//mlir:StandardOps",
-        "@llvm-project//mlir:StandardOpsTransforms",
         "@llvm-project//mlir:StandardToSPIRV",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TosaDialect",
diff --git a/iree/compiler/Codegen/SPIRV/CMakeLists.txt b/iree/compiler/Codegen/SPIRV/CMakeLists.txt
index bee7ea5..0199a18 100644
--- a/iree/compiler/Codegen/SPIRV/CMakeLists.txt
+++ b/iree/compiler/Codegen/SPIRV/CMakeLists.txt
@@ -46,6 +46,8 @@
     MLIRArithmeticToSPIRV
     MLIRArithmeticTransforms
     MLIRBufferization
+    MLIRFunc
+    MLIRFuncTransforms
     MLIRGPUOps
     MLIRGPUToSPIRV
     MLIRGPUTransforms
@@ -65,8 +67,6 @@
     MLIRSPIRVConversion
     MLIRSPIRVTransforms
     MLIRSideEffectInterfaces
-    MLIRStandard
-    MLIRStandardOpsTransforms
     MLIRStandardToSPIRV
     MLIRSupport
     MLIRTosa
diff --git a/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp b/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp
index 07587ca..4c430a4 100644
--- a/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp
+++ b/iree/compiler/Codegen/SPIRV/ConvertToSPIRVPass.cpp
@@ -35,13 +35,13 @@
 #include "mlir/Conversion/TosaToStandard/TosaToStandard.h"
 #include "mlir/Conversion/VectorToSPIRV/VectorToSPIRV.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
 #include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Codegen/SPIRV/Passes.cpp b/iree/compiler/Codegen/SPIRV/Passes.cpp
index 588bef7..c9ed9b3 100644
--- a/iree/compiler/Codegen/SPIRV/Passes.cpp
+++ b/iree/compiler/Codegen/SPIRV/Passes.cpp
@@ -20,11 +20,11 @@
 #include "llvm/Support/Debug.h"
 #include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/Passes.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
 #include "mlir/Dialect/SPIRV/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/PassManager.h"
 #include "mlir/Pass/PassOptions.h"
diff --git a/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp b/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp
index 816817b..86931f0 100644
--- a/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp
+++ b/iree/compiler/Codegen/SPIRV/SPIRVTileAndDistribute.cpp
@@ -22,6 +22,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/LoopUtils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Transforms/Hoisting.h"
@@ -30,7 +31,6 @@
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Matchers.h"
diff --git a/iree/compiler/Codegen/SPIRV/SPIRVVectorizeLoadStore.cpp b/iree/compiler/Codegen/SPIRV/SPIRVVectorizeLoadStore.cpp
index b670d66..d0fb79f 100644
--- a/iree/compiler/Codegen/SPIRV/SPIRVVectorizeLoadStore.cpp
+++ b/iree/compiler/Codegen/SPIRV/SPIRVVectorizeLoadStore.cpp
@@ -19,9 +19,9 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/AffineExpr.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Codegen/Transforms/BUILD b/iree/compiler/Codegen/Transforms/BUILD
index 3284872..fadcdbe 100644
--- a/iree/compiler/Codegen/Transforms/BUILD
+++ b/iree/compiler/Codegen/Transforms/BUILD
@@ -26,12 +26,12 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:Affine",
         "@llvm-project//mlir:AffineUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgInterfaces",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
         "@llvm-project//mlir:VectorOps",
diff --git a/iree/compiler/Codegen/Transforms/CMakeLists.txt b/iree/compiler/Codegen/Transforms/CMakeLists.txt
index d9e68e7..c7f9ecd 100644
--- a/iree/compiler/Codegen/Transforms/CMakeLists.txt
+++ b/iree/compiler/Codegen/Transforms/CMakeLists.txt
@@ -23,11 +23,11 @@
     LLVMSupport
     MLIRAffine
     MLIRAffineUtils
+    MLIRFunc
     MLIRIR
     MLIRLinalg
     MLIRMemRef
     MLIRPass
-    MLIRStandard
     MLIRSupport
     MLIRTransforms
     MLIRVector
diff --git a/iree/compiler/ConstEval/BUILD b/iree/compiler/ConstEval/BUILD
index 4a5f7a1..9c0c8db 100644
--- a/iree/compiler/ConstEval/BUILD
+++ b/iree/compiler/ConstEval/BUILD
@@ -69,7 +69,7 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
+        "@llvm-project//mlir:FuncDialect",
     ],
 )
 
diff --git a/iree/compiler/ConstEval/CMakeLists.txt b/iree/compiler/ConstEval/CMakeLists.txt
index 3b44e79..9c0a3e4 100644
--- a/iree/compiler/ConstEval/CMakeLists.txt
+++ b/iree/compiler/ConstEval/CMakeLists.txt
@@ -46,9 +46,9 @@
     ::PassesIncGen
     ::Runtime
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     iree::compiler::Bindings::Native::Transforms
     iree::compiler::Dialect::Flow::Transforms
     iree::compiler::Dialect::HAL::Transforms
diff --git a/iree/compiler/ConstEval/JitGlobals.cpp b/iree/compiler/ConstEval/JitGlobals.cpp
index 21947c91..eda8cac 100644
--- a/iree/compiler/ConstEval/JitGlobals.cpp
+++ b/iree/compiler/ConstEval/JitGlobals.cpp
@@ -19,7 +19,7 @@
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
@@ -56,7 +56,7 @@
     OpBuilder funcBuilder = OpBuilder::atBlockEnd(entryBlock);
     Value loadValue =
         funcBuilder.create<IREE::Util::GlobalLoadOp>(loc, globalOp);
-    funcBuilder.create<ReturnOp>(loc, ValueRange{loadValue});
+    funcBuilder.create<func::ReturnOp>(loc, ValueRange{loadValue});
     return funcSymbolName;
   }
 
diff --git a/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/BUILD b/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/BUILD
index 22002c0..8a6eed2 100644
--- a/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/BUILD
+++ b/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/BUILD
@@ -20,8 +20,8 @@
     ],
     deps = [
         "//iree/compiler/Dialect/Flow/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TensorDialect",
     ],
 )
diff --git a/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/CMakeLists.txt b/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/CMakeLists.txt
index 8b427cc..3275a0b 100644
--- a/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/CMakeLists.txt
+++ b/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/CMakeLists.txt
@@ -18,8 +18,8 @@
   SRCS
     "ConvertTensorToFlow.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     MLIRTensor
     iree::compiler::Dialect::Flow::IR
   PUBLIC
diff --git a/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/ConvertTensorToFlow.cpp b/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/ConvertTensorToFlow.cpp
index a9a8c7c..5aafe9c 100644
--- a/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/ConvertTensorToFlow.cpp
+++ b/iree/compiler/Dialect/Flow/Conversion/TensorToFlow/ConvertTensorToFlow.cpp
@@ -8,7 +8,7 @@
 
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 
 namespace mlir {
diff --git a/iree/compiler/Dialect/Flow/IR/BUILD b/iree/compiler/Dialect/Flow/IR/BUILD
index 09c0f5c..048b269 100644
--- a/iree/compiler/Dialect/Flow/IR/BUILD
+++ b/iree/compiler/Dialect/Flow/IR/BUILD
@@ -69,12 +69,12 @@
         "@llvm-project//mlir:Analysis",
         "@llvm-project//mlir:ArithmeticUtils",
         "@llvm-project//mlir:ControlFlowInterfaces",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:InferTypeOpInterface",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:SideEffects",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TransformUtils",
diff --git a/iree/compiler/Dialect/Flow/IR/CMakeLists.txt b/iree/compiler/Dialect/Flow/IR/CMakeLists.txt
index a1677e9..97403e2 100644
--- a/iree/compiler/Dialect/Flow/IR/CMakeLists.txt
+++ b/iree/compiler/Dialect/Flow/IR/CMakeLists.txt
@@ -41,12 +41,12 @@
     MLIRAnalysis
     MLIRArithmeticUtils
     MLIRControlFlowInterfaces
+    MLIRFunc
     MLIRIR
     MLIRInferTypeOpInterface
     MLIRMemRef
     MLIRParser
     MLIRSideEffectInterfaces
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTransformUtils
diff --git a/iree/compiler/Dialect/Flow/IR/FlowDialect.cpp b/iree/compiler/Dialect/Flow/IR/FlowDialect.cpp
index 294d873..257f656 100644
--- a/iree/compiler/Dialect/Flow/IR/FlowDialect.cpp
+++ b/iree/compiler/Dialect/Flow/IR/FlowDialect.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowTypes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "llvm/Support/SourceMgr.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/DialectImplementation.h"
diff --git a/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp b/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp
index 378caca..64b121e 100644
--- a/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp
+++ b/iree/compiler/Dialect/Flow/IR/FlowOpFolders.cpp
@@ -18,8 +18,8 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/StringExtras.h"
 #include "mlir/Dialect/Arithmetic/Utils/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Flow/IR/FlowOps.cpp b/iree/compiler/Dialect/Flow/IR/FlowOps.cpp
index 515f30d..aa6b96a 100644
--- a/iree/compiler/Dialect/Flow/IR/FlowOps.cpp
+++ b/iree/compiler/Dialect/Flow/IR/FlowOps.cpp
@@ -15,7 +15,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "mlir/Analysis/SliceAnalysis.h"
 #include "mlir/Dialect/Arithmetic/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Flow/Transforms/BUILD b/iree/compiler/Dialect/Flow/Transforms/BUILD
index 6e14f12..22205dd 100644
--- a/iree/compiler/Dialect/Flow/Transforms/BUILD
+++ b/iree/compiler/Dialect/Flow/Transforms/BUILD
@@ -82,6 +82,7 @@
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ControlFlowOps",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgInterfaces",
         "@llvm-project//mlir:LinalgOps",
@@ -90,7 +91,6 @@
         "@llvm-project//mlir:MemRefTransforms",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TensorUtils",
diff --git a/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt b/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt
index 7981ddb..d34379a 100644
--- a/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt
+++ b/iree/compiler/Dialect/Flow/Transforms/CMakeLists.txt
@@ -61,6 +61,7 @@
     MLIRAffine
     MLIRArithmetic
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRLinalg
     MLIRLinalgTransforms
@@ -68,7 +69,6 @@
     MLIRMemRefTransforms
     MLIRPass
     MLIRSCF
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTensorUtils
diff --git a/iree/compiler/Dialect/Flow/Transforms/ConvertLinalgTensorOps.cpp b/iree/compiler/Dialect/Flow/Transforms/ConvertLinalgTensorOps.cpp
index ed63358..23ae92a 100644
--- a/iree/compiler/Dialect/Flow/Transforms/ConvertLinalgTensorOps.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/ConvertLinalgTensorOps.cpp
@@ -9,8 +9,8 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowTypes.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Interfaces/InferTypeOpInterface.h"
@@ -93,9 +93,10 @@
   }
 };
 
-struct ConvertSplatConstantOp : public OpRewritePattern<mlir::ConstantOp> {
+struct ConvertSplatConstantOp
+    : public OpRewritePattern<mlir::func::ConstantOp> {
   using OpRewritePattern::OpRewritePattern;
-  LogicalResult matchAndRewrite(mlir::ConstantOp op,
+  LogicalResult matchAndRewrite(mlir::func::ConstantOp op,
                                 PatternRewriter &rewriter) const override {
     if (op->getParentOfType<IREE::Flow::DispatchWorkgroupsOp>()) {
       return rewriter.notifyMatchFailure(op, "ignoring dispatch ops");
@@ -105,7 +106,7 @@
       return rewriter.notifyMatchFailure(op, "only looking for splats");
     }
     auto tensorType = op.getType().cast<TensorType>();
-    auto elementValue = rewriter.createOrFold<mlir::ConstantOp>(
+    auto elementValue = rewriter.createOrFold<mlir::func::ConstantOp>(
         op.getLoc(), tensorType.getElementType(),
         splatAttr.getSplatValue<Attribute>());
     rewriter.replaceOpWithNewOp<IREE::Flow::TensorSplatOp>(
@@ -126,7 +127,7 @@
 
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<IREE::Flow::FlowDialect, tensor::TensorDialect,
-                    linalg::LinalgDialect, mlir::StandardOpsDialect,
+                    linalg::LinalgDialect, mlir::func::FuncDialect,
                     mlir::arith::ArithmeticDialect, mlir::math::MathDialect>();
   }
   void runOnOperation() override {
diff --git a/iree/compiler/Dialect/Flow/Transforms/ConvertToFlow.cpp b/iree/compiler/Dialect/Flow/Transforms/ConvertToFlow.cpp
index 881e52e..f68a046 100644
--- a/iree/compiler/Dialect/Flow/Transforms/ConvertToFlow.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/ConvertToFlow.cpp
@@ -10,9 +10,9 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowTypes.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
@@ -100,7 +100,7 @@
           ConvertToFlowBeforeDispatchFormation> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<IREE::Flow::FlowDialect, tensor::TensorDialect,
-                    linalg::LinalgDialect, mlir::StandardOpsDialect,
+                    linalg::LinalgDialect, mlir::func::FuncDialect,
                     mlir::arith::ArithmeticDialect, mlir::math::MathDialect>();
   }
   void runOnOperation() override {
@@ -128,7 +128,7 @@
           ConvertToFlowAfterDispatchFormation> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<IREE::Flow::FlowDialect, tensor::TensorDialect,
-                    linalg::LinalgDialect, mlir::StandardOpsDialect,
+                    linalg::LinalgDialect, mlir::func::FuncDialect,
                     mlir::arith::ArithmeticDialect, mlir::math::MathDialect>();
   }
   void runOnOperation() override {
diff --git a/iree/compiler/Dialect/Flow/Transforms/DeduplicateExecutables.cpp b/iree/compiler/Dialect/Flow/Transforms/DeduplicateExecutables.cpp
index 0783dc5..b33cdab 100644
--- a/iree/compiler/Dialect/Flow/Transforms/DeduplicateExecutables.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/DeduplicateExecutables.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
 #include "llvm/ADT/PostOrderIterator.h"
 #include "llvm/ADT/SetVector.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/RegionGraphTraits.h"
diff --git a/iree/compiler/Dialect/Flow/Transforms/DispatchLinalgOnTensors.cpp b/iree/compiler/Dialect/Flow/Transforms/DispatchLinalgOnTensors.cpp
index fb1655a..5241fd8 100644
--- a/iree/compiler/Dialect/Flow/Transforms/DispatchLinalgOnTensors.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/DispatchLinalgOnTensors.cpp
@@ -16,11 +16,11 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Debug.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Block.h"
 #include "mlir/IR/BlockAndValueMapping.h"
diff --git a/iree/compiler/Dialect/Flow/Transforms/ExpandTensorShapes.cpp b/iree/compiler/Dialect/Flow/Transforms/ExpandTensorShapes.cpp
index afe2d19..a560f70 100644
--- a/iree/compiler/Dialect/Flow/Transforms/ExpandTensorShapes.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/ExpandTensorShapes.cpp
@@ -17,7 +17,7 @@
 #include "llvm/ADT/BreadthFirstIterator.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -342,7 +342,7 @@
 //  ->
 //  %r, %rd = call @foo(%a, %ad)
 //  %2 = flow.tensor.tie_shape %r : tensor<?xf32>{%rd}
-static void expandCallOp(mlir::CallOp op, IndexSet &indexSet,
+static void expandCallOp(mlir::func::CallOp op, IndexSet &indexSet,
                          TensorDimMap &tensorDimMap) {
   if (!usesDynamicTensors(op)) return;
 
@@ -351,8 +351,8 @@
   auto operands = expandOperands(op.getLoc(), op.operands(), tensorDimMap,
                                  indexSet, builder);
   auto resultTypes = expandTypes(op.getResultTypes());
-  auto newOp = builder.create<mlir::CallOp>(op.getLoc(), op.getCallee(),
-                                            resultTypes, operands);
+  auto newOp = builder.create<mlir::func::CallOp>(op.getLoc(), op.getCallee(),
+                                                  resultTypes, operands);
 
   // Insert shape ties on results that we are sinking across the call edge.
   // The hope is that by moving the ties here we can fold with queries inside of
@@ -390,13 +390,13 @@
 //  return %1
 //  ->
 //  return %0, %d
-static void expandReturnOp(mlir::ReturnOp op, IndexSet &indexSet,
+static void expandReturnOp(mlir::func::ReturnOp op, IndexSet &indexSet,
                            TensorDimMap &tensorDimMap) {
   if (!usesDynamicTensors(op)) return;
   OpBuilder builder(op);
   auto operands = expandOperands(op.getLoc(), op.operands(), tensorDimMap,
                                  indexSet, builder);
-  builder.create<mlir::ReturnOp>(op.getLoc(), operands);
+  builder.create<mlir::func::ReturnOp>(op.getLoc(), operands);
   op.erase();
 }
 
@@ -484,9 +484,9 @@
     expandInitializerOp(initializerOp, globalMap, indexSet, tensorDimMap);
   } else if (auto funcOp = dyn_cast<mlir::FuncOp>(op)) {
     expandFuncOp(funcOp, globalMap, indexSet, tensorDimMap);
-  } else if (auto callOp = dyn_cast<mlir::CallOp>(op)) {
+  } else if (auto callOp = dyn_cast<mlir::func::CallOp>(op)) {
     expandCallOp(callOp, indexSet, tensorDimMap);
-  } else if (auto returnOp = dyn_cast<mlir::ReturnOp>(op)) {
+  } else if (auto returnOp = dyn_cast<mlir::func::ReturnOp>(op)) {
     expandReturnOp(returnOp, indexSet, tensorDimMap);
   } else if (auto branchOp = dyn_cast<mlir::cf::BranchOp>(op)) {
     expandBranchOp(branchOp, indexSet, tensorDimMap);
@@ -515,7 +515,7 @@
   ExpandTensorShapesPass() = default;
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Flow::FlowDialect>();
     registry.insert<IREE::Util::UtilDialect>();
diff --git a/iree/compiler/Dialect/Flow/Transforms/ExportBenchmarkFuncs.cpp b/iree/compiler/Dialect/Flow/Transforms/ExportBenchmarkFuncs.cpp
index c27dceb..0fa5bcd 100644
--- a/iree/compiler/Dialect/Flow/Transforms/ExportBenchmarkFuncs.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/ExportBenchmarkFuncs.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -105,14 +105,15 @@
       args.push_back(blockBuilder.createOrFold<IREE::Util::GlobalLoadOp>(
           loc, dummyInputVariableOps[i]));
     }
-    auto callOp = blockBuilder.create<mlir::CallOp>(loc, entryFuncOp, args);
+    auto callOp =
+        blockBuilder.create<mlir::func::CallOp>(loc, entryFuncOp, args);
 
     // Sink all results with do_not_optimize to ensure that DCE does not
     // remove the call.
     for (auto result : callOp.getResults()) {
       blockBuilder.create<IREE::Util::DoNotOptimizeOp>(loc, result);
     }
-    blockBuilder.create<mlir::ReturnOp>(loc);
+    blockBuilder.create<mlir::func::ReturnOp>(loc);
 
     // Ensure the original function is not exported and not inlined.
     entryFuncOp->setAttr("noinline", moduleBuilder.getUnitAttr());
diff --git a/iree/compiler/Dialect/Flow/Transforms/InjectDispatchTracing.cpp b/iree/compiler/Dialect/Flow/Transforms/InjectDispatchTracing.cpp
index a3b7531..d61d3e3 100644
--- a/iree/compiler/Dialect/Flow/Transforms/InjectDispatchTracing.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/InjectDispatchTracing.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Diagnostics.h"
diff --git a/iree/compiler/Dialect/Flow/Transforms/OutlineDispatchRegions.cpp b/iree/compiler/Dialect/Flow/Transforms/OutlineDispatchRegions.cpp
index 574bbd8..43d51f2 100644
--- a/iree/compiler/Dialect/Flow/Transforms/OutlineDispatchRegions.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/OutlineDispatchRegions.cpp
@@ -11,7 +11,7 @@
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -102,7 +102,7 @@
   for (auto &block : funcOp.getBlocks()) {
     if (auto returnOp = dyn_cast<IREE::Flow::ReturnOp>(block.back())) {
       OpBuilder builder(returnOp);
-      builder.create<mlir::ReturnOp>(
+      builder.create<mlir::func::ReturnOp>(
           returnOp.getLoc(), llvm::to_vector<4>(returnOp.getOperands()));
       returnOp.erase();
     }
diff --git a/iree/compiler/Dialect/Flow/Transforms/PadTensorToSubTensorInsert.cpp b/iree/compiler/Dialect/Flow/Transforms/PadTensorToSubTensorInsert.cpp
index 8231985..6941fb6 100644
--- a/iree/compiler/Dialect/Flow/Transforms/PadTensorToSubTensorInsert.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/PadTensorToSubTensorInsert.cpp
@@ -14,9 +14,9 @@
 
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/Pass/Pass.h"
@@ -102,9 +102,9 @@
 struct PadTensorToSubTensorInsertPass
     : public PadTensorToSubTensorInsertBase<PadTensorToSubTensorInsertPass> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<linalg::LinalgDialect, memref::MemRefDialect,
-                    StandardOpsDialect, mlir::math::MathDialect,
-                    mlir::arith::ArithmeticDialect>();
+    registry
+        .insert<linalg::LinalgDialect, memref::MemRefDialect, func::FuncDialect,
+                mlir::math::MathDialect, mlir::arith::ArithmeticDialect>();
   }
 
   void runOnOperation() override {
diff --git a/iree/compiler/Dialect/Flow/Transforms/PromoteTensorLoads.cpp b/iree/compiler/Dialect/Flow/Transforms/PromoteTensorLoads.cpp
index 6cafd04..c67ab91 100644
--- a/iree/compiler/Dialect/Flow/Transforms/PromoteTensorLoads.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/PromoteTensorLoads.cpp
@@ -8,7 +8,7 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/PatternMatch.h"
@@ -68,7 +68,7 @@
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
     registry
-        .insert<FlowDialect, StandardOpsDialect, mlir::arith::ArithmeticDialect,
+        .insert<FlowDialect, func::FuncDialect, mlir::arith::ArithmeticDialect,
                 mlir::math::MathDialect, tensor::TensorDialect>();
   }
 
@@ -79,7 +79,7 @@
 
     conversionTarget.addLegalDialect<IREE::Flow::FlowDialect>();
     conversionTarget
-        .addLegalDialect<StandardOpsDialect, mlir::arith::ArithmeticDialect,
+        .addLegalDialect<func::FuncDialect, mlir::arith::ArithmeticDialect,
                          mlir::math::MathDialect>();
     setupStandardToFlowTensorLoadLegality(context, conversionTarget);
     populateStandardToFlowTensorLoadPatterns(context, conversionPatterns);
diff --git a/iree/compiler/Dialect/Flow/Transforms/StripSignednessPass.cpp b/iree/compiler/Dialect/Flow/Transforms/StripSignednessPass.cpp
index 67a89ba..edeb4f3 100644
--- a/iree/compiler/Dialect/Flow/Transforms/StripSignednessPass.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/StripSignednessPass.cpp
@@ -6,8 +6,8 @@
 
 #include "iree/compiler/Dialect/Flow/Transforms/PassDetail.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
diff --git a/iree/compiler/Dialect/Flow/Transforms/TestPartitionableLoopsInterface.cpp b/iree/compiler/Dialect/Flow/Transforms/TestPartitionableLoopsInterface.cpp
index ff9ec75..08af87c 100644
--- a/iree/compiler/Dialect/Flow/Transforms/TestPartitionableLoopsInterface.cpp
+++ b/iree/compiler/Dialect/Flow/Transforms/TestPartitionableLoopsInterface.cpp
@@ -7,7 +7,7 @@
 #include "iree/compiler/Dialect/Flow/IR/PartitionableLoopsInterface.h"
 #include "iree/compiler/Dialect/Flow/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
 static const char kAttributeName[] = "__test_interface__";
diff --git a/iree/compiler/Dialect/HAL/Conversion/BUILD b/iree/compiler/Dialect/HAL/Conversion/BUILD
index 7466430..dab7003 100644
--- a/iree/compiler/Dialect/HAL/Conversion/BUILD
+++ b/iree/compiler/Dialect/HAL/Conversion/BUILD
@@ -25,9 +25,9 @@
         "//iree/compiler/Dialect/HAL/IR",
         "//iree/compiler/Dialect/HAL/Utils",
         "//iree/compiler/Dialect/Util/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MemRefDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/HAL/Conversion/CMakeLists.txt b/iree/compiler/Dialect/HAL/Conversion/CMakeLists.txt
index 10f781b..cf1f3e5 100644
--- a/iree/compiler/Dialect/HAL/Conversion/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Conversion/CMakeLists.txt
@@ -21,9 +21,9 @@
     "ConversionTarget.cpp"
     "TypeConverter.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
     MLIRMemRef
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::HAL::Utils
diff --git a/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.cpp b/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.cpp
index 925d60c..feb11bd 100644
--- a/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.cpp
@@ -9,8 +9,8 @@
 #include "iree/compiler/Dialect/HAL/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/BuiltinTypes.h"
 
diff --git a/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.h b/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.h
index 88869ad..d9ab289 100644
--- a/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.h
+++ b/iree/compiler/Dialect/HAL/Conversion/ConversionTarget.h
@@ -8,7 +8,7 @@
 #define IREE_COMPILER_DIALECT_HAL_CONVERSION_CONVERSIONTARGET_H_
 
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/MLIRContext.h"
diff --git a/iree/compiler/Dialect/HAL/Conversion/HALToVM/BUILD b/iree/compiler/Dialect/HAL/Conversion/HALToVM/BUILD
index 5ad0810..0c18c9b 100644
--- a/iree/compiler/Dialect/HAL/Conversion/HALToVM/BUILD
+++ b/iree/compiler/Dialect/HAL/Conversion/HALToVM/BUILD
@@ -36,9 +36,9 @@
         "//iree/compiler/Dialect/VM/Conversion/UtilToVM",
         "//iree/compiler/Dialect/VM/IR",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/HAL/Conversion/HALToVM/CMakeLists.txt b/iree/compiler/Dialect/HAL/Conversion/HALToVM/CMakeLists.txt
index 365ec6d..ae6438f 100644
--- a/iree/compiler/Dialect/HAL/Conversion/HALToVM/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Conversion/HALToVM/CMakeLists.txt
@@ -27,9 +27,9 @@
     "ConvertSemaphoreOps.cpp"
   DEPS
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::HAL::Utils
diff --git a/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertExecutableOps.cpp b/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertExecutableOps.cpp
index 66a1169..0c36d87 100644
--- a/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertExecutableOps.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertExecutableOps.cpp
@@ -13,7 +13,7 @@
 #include "iree/compiler/Dialect/VM/Conversion/ImportUtils.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
 #include "llvm/ADT/DenseMap.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertHALToVM.cpp b/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertHALToVM.cpp
index 5e6cc1d..e2515f5 100644
--- a/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertHALToVM.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/HALToVM/ConvertHALToVM.cpp
@@ -17,7 +17,7 @@
 #include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertUtilToVM.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/BUILD b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/BUILD
index 05d977a..4804c99 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/BUILD
+++ b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/BUILD
@@ -28,11 +28,11 @@
         "//iree/compiler/Dialect/Util/Conversion",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
         "@llvm-project//mlir:Shape",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/CMakeLists.txt b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/CMakeLists.txt
index 3b2348a..c913f1b 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/CMakeLists.txt
@@ -22,11 +22,11 @@
   DEPS
     LLVMSupport
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRPass
     MLIRSCF
     MLIRShape
-    MLIRStandard
     MLIRTensor
     MLIRTransforms
     iree::compiler::Dialect::HAL::Conversion
diff --git a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertShapeOps.cpp b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertShapeOps.cpp
index 5a97093..8a09f5d 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertShapeOps.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertShapeOps.cpp
@@ -7,7 +7,7 @@
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
 #include "llvm/ADT/ArrayRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/MLIRContext.h"
 #include "mlir/IR/PatternMatch.h"
diff --git a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStandardToHAL.cpp b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStandardToHAL.cpp
index f36f431..37f65ef 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStandardToHAL.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStandardToHAL.cpp
@@ -9,8 +9,8 @@
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Transforms/DialectConversion.h"
 
diff --git a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStructuralOps.cpp b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStructuralOps.cpp
index bf4381e..e18b1d0 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStructuralOps.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/StandardToHAL/ConvertStructuralOps.cpp
@@ -10,8 +10,8 @@
 #include "iree/compiler/Dialect/Util/Conversion/ConversionPatterns.h"
 #include "llvm/ADT/DenseMap.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
@@ -66,32 +66,33 @@
   }
 };
 
-class CallOpConversion : public OpConversionPattern<mlir::CallOp> {
+class CallOpConversion : public OpConversionPattern<mlir::func::CallOp> {
  public:
   using OpConversionPattern::OpConversionPattern;
 
   LogicalResult matchAndRewrite(
-      mlir::CallOp op, OpAdaptor adaptor,
+      mlir::func::CallOp op, OpAdaptor adaptor,
       ConversionPatternRewriter &rewriter) const override {
     SmallVector<Type, 4> resultTypes;
     if (failed(getTypeConverter()->convertTypes(op.getResultTypes(),
                                                 resultTypes))) {
       return rewriter.notifyMatchFailure(op, "unable to convert result types");
     }
-    rewriter.replaceOpWithNewOp<mlir::CallOp>(op, resultTypes, op.getCallee(),
-                                              adaptor.operands());
+    rewriter.replaceOpWithNewOp<mlir::func::CallOp>(
+        op, resultTypes, op.getCallee(), adaptor.operands());
     return success();
   }
 };
 
-class ReturnOpConversion : public OpConversionPattern<mlir::ReturnOp> {
+class ReturnOpConversion : public OpConversionPattern<mlir::func::ReturnOp> {
  public:
   using OpConversionPattern::OpConversionPattern;
 
   LogicalResult matchAndRewrite(
-      mlir::ReturnOp returnOp, OpAdaptor adaptor,
+      mlir::func::ReturnOp returnOp, OpAdaptor adaptor,
       ConversionPatternRewriter &rewriter) const override {
-    rewriter.replaceOpWithNewOp<mlir::ReturnOp>(returnOp, adaptor.operands());
+    rewriter.replaceOpWithNewOp<mlir::func::ReturnOp>(returnOp,
+                                                      adaptor.operands());
     return success();
   }
 };
diff --git a/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/BUILD b/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/BUILD
index 8baadd4..598caf5 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/BUILD
+++ b/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/BUILD
@@ -27,9 +27,9 @@
         "//iree/compiler/Dialect/Stream/IR",
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/CMakeLists.txt b/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/CMakeLists.txt
index b05b872..50881e7 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/CMakeLists.txt
@@ -19,9 +19,9 @@
     "ConvertStreamToHAL.cpp"
   DEPS
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::HAL::Conversion
     iree::compiler::Dialect::HAL::IR
diff --git a/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/ConvertStreamToHAL.cpp b/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/ConvertStreamToHAL.cpp
index 927931d..2fb2950 100644
--- a/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/ConvertStreamToHAL.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/StreamToHAL/ConvertStreamToHAL.cpp
@@ -14,7 +14,7 @@
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamTypes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 namespace mlir {
diff --git a/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/BUILD b/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/BUILD
index 2ade4a3..d5bc780 100644
--- a/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/BUILD
+++ b/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/BUILD
@@ -22,8 +22,8 @@
         "//iree/compiler/Dialect/HAL/IR",
         "//iree/compiler/Dialect/Util/Conversion",
         "//iree/compiler/Dialect/Util/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/CMakeLists.txt b/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/CMakeLists.txt
index 20521d9..519ba33 100644
--- a/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/CMakeLists.txt
@@ -18,8 +18,8 @@
   SRCS
     "ConvertUtilToHAL.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::Util::Conversion
diff --git a/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/ConvertUtilToHAL.cpp b/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/ConvertUtilToHAL.cpp
index 1ba4337..339618e 100644
--- a/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/ConvertUtilToHAL.cpp
+++ b/iree/compiler/Dialect/HAL/Conversion/UtilToHAL/ConvertUtilToHAL.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/Util/Conversion/ConversionPatterns.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/MLIRContext.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/DialectConversion.h"
diff --git a/iree/compiler/Dialect/HAL/IR/BUILD b/iree/compiler/Dialect/HAL/IR/BUILD
index 5bd260c..362a0b7 100644
--- a/iree/compiler/Dialect/HAL/IR/BUILD
+++ b/iree/compiler/Dialect/HAL/IR/BUILD
@@ -74,11 +74,11 @@
         ":HALTypesGen",
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:SideEffects",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:ViewLikeInterface",
@@ -96,10 +96,10 @@
         "//iree/compiler/Dialect/Util/IR",
         "//iree/compiler/Dialect/VM/Conversion",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Parser",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TransformUtils",
     ],
 )
diff --git a/iree/compiler/Dialect/HAL/IR/CMakeLists.txt b/iree/compiler/Dialect/HAL/IR/CMakeLists.txt
index be77535..d133270 100644
--- a/iree/compiler/Dialect/HAL/IR/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/IR/CMakeLists.txt
@@ -43,11 +43,11 @@
     ::HALStructsGen
     ::HALTypesGen
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRMemRef
     MLIRParser
     MLIRSideEffectInterfaces
-    MLIRStandard
     MLIRSupport
     MLIRTransformUtils
     MLIRViewLikeInterface
@@ -65,10 +65,10 @@
   DEPS
     ::IR
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRMemRef
     MLIRParser
-    MLIRStandard
     MLIRTransformUtils
     iree::compiler::Dialect::HAL::Conversion::HALToVM
     iree::compiler::Dialect::HAL::hal_imports
diff --git a/iree/compiler/Dialect/HAL/IR/HALDialect.cpp b/iree/compiler/Dialect/HAL/IR/HALDialect.cpp
index 7b01c9d..90bd8d7 100644
--- a/iree/compiler/Dialect/HAL/IR/HALDialect.cpp
+++ b/iree/compiler/Dialect/HAL/IR/HALDialect.cpp
@@ -14,7 +14,7 @@
 #include "iree/compiler/Dialect/VM/Conversion/ConversionDialectInterface.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/SourceMgr.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/DialectImplementation.h"
 #include "mlir/IR/OpImplementation.h"
 #include "mlir/Parser.h"
diff --git a/iree/compiler/Dialect/HAL/IR/HALOpFolders.cpp b/iree/compiler/Dialect/HAL/IR/HALOpFolders.cpp
index 27f95a1..807d6cd 100644
--- a/iree/compiler/Dialect/HAL/IR/HALOpFolders.cpp
+++ b/iree/compiler/Dialect/HAL/IR/HALOpFolders.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/StringExtras.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/Matchers.h"
diff --git a/iree/compiler/Dialect/HAL/IR/HALOps.cpp b/iree/compiler/Dialect/HAL/IR/HALOps.cpp
index 75a1a5b..2469273 100644
--- a/iree/compiler/Dialect/HAL/IR/HALOps.cpp
+++ b/iree/compiler/Dialect/HAL/IR/HALOps.cpp
@@ -11,7 +11,7 @@
 #include "llvm/ADT/Hashing.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/SMLoc.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/IR/HALTypes.cpp b/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
index 6fcdf64..aeaf387 100644
--- a/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
+++ b/iree/compiler/Dialect/HAL/IR/HALTypes.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/StringExtras.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/DialectImplementation.h"
 
diff --git a/iree/compiler/Dialect/HAL/Target/CUDA/NoLoopUnrollPass.cpp b/iree/compiler/Dialect/HAL/Target/CUDA/NoLoopUnrollPass.cpp
index dfb6059..bc00605 100644
--- a/iree/compiler/Dialect/HAL/Target/CUDA/NoLoopUnrollPass.cpp
+++ b/iree/compiler/Dialect/HAL/Target/CUDA/NoLoopUnrollPass.cpp
@@ -4,6 +4,7 @@
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 #include "iree/compiler/Dialect/HAL/Target/CUDA/LLVMPasses.h"
+#include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/LoopPass.h"
 #include "llvm/InitializePasses.h"
 #include "llvm/Pass.h"
diff --git a/iree/compiler/Dialect/HAL/Target/LLVM/BUILD b/iree/compiler/Dialect/HAL/Target/LLVM/BUILD
index 790fc66..86996c7 100644
--- a/iree/compiler/Dialect/HAL/Target/LLVM/BUILD
+++ b/iree/compiler/Dialect/HAL/Target/LLVM/BUILD
@@ -46,6 +46,7 @@
         "@llvm-project//llvm:AArch64CodeGen",
         "@llvm-project//llvm:ARMAsmParser",
         "@llvm-project//llvm:ARMCodeGen",
+        "@llvm-project//llvm:Analysis",
         "@llvm-project//llvm:BitReader",
         "@llvm-project//llvm:BitWriter",
         "@llvm-project//llvm:Core",
diff --git a/iree/compiler/Dialect/HAL/Target/LLVM/CMakeLists.txt b/iree/compiler/Dialect/HAL/Target/LLVM/CMakeLists.txt
index acd2759..cda6592 100644
--- a/iree/compiler/Dialect/HAL/Target/LLVM/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Target/LLVM/CMakeLists.txt
@@ -29,6 +29,7 @@
     ::LinkerTool
     ::StaticLibraryGenerator
     IREELLVMCPUTargetDeps
+    LLVMAnalysis
     LLVMBitReader
     LLVMBitWriter
     LLVMCore
diff --git a/iree/compiler/Dialect/HAL/Target/LLVM/LLVMAOTTarget.cpp b/iree/compiler/Dialect/HAL/Target/LLVM/LLVMAOTTarget.cpp
index 685f9f3..ce53caa 100644
--- a/iree/compiler/Dialect/HAL/Target/LLVM/LLVMAOTTarget.cpp
+++ b/iree/compiler/Dialect/HAL/Target/LLVM/LLVMAOTTarget.cpp
@@ -17,6 +17,7 @@
 #include "iree/compiler/Dialect/HAL/Target/LLVM/LinkerTool.h"
 #include "iree/compiler/Dialect/HAL/Target/LLVM/StaticLibraryGenerator.h"
 #include "iree/compiler/Dialect/HAL/Target/TargetRegistry.h"
+#include "llvm/Analysis/TargetTransformInfo.h"
 #include "llvm/Bitcode/BitcodeReader.h"
 #include "llvm/Bitcode/BitcodeWriter.h"
 #include "llvm/IR/LLVMContext.h"
diff --git a/iree/compiler/Dialect/HAL/Target/LLVM/LinkerTool.cpp b/iree/compiler/Dialect/HAL/Target/LLVM/LinkerTool.cpp
index e34dd4a..5142475 100644
--- a/iree/compiler/Dialect/HAL/Target/LLVM/LinkerTool.cpp
+++ b/iree/compiler/Dialect/HAL/Target/LLVM/LinkerTool.cpp
@@ -6,6 +6,7 @@
 
 #include "iree/compiler/Dialect/HAL/Target/LLVM/LinkerTool.h"
 
+#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Process.h"
 
 #define DEBUG_TYPE "llvmaot-linker"
diff --git a/iree/compiler/Dialect/HAL/Transforms/AssignTargetDevices.cpp b/iree/compiler/Dialect/HAL/Transforms/AssignTargetDevices.cpp
index 19a73c6..d92aae6 100644
--- a/iree/compiler/Dialect/HAL/Transforms/AssignTargetDevices.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/AssignTargetDevices.cpp
@@ -12,7 +12,7 @@
 #include "iree/compiler/Dialect/HAL/Target/TargetBackend.h"
 #include "iree/compiler/Dialect/HAL/Target/TargetRegistry.h"
 #include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/Transforms/BUILD b/iree/compiler/Dialect/HAL/Transforms/BUILD
index a455ea5..66658ac 100644
--- a/iree/compiler/Dialect/HAL/Transforms/BUILD
+++ b/iree/compiler/Dialect/HAL/Transforms/BUILD
@@ -53,9 +53,9 @@
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:BufferizationDialect",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/HAL/Transforms/BenchmarkBatchDispatches.cpp b/iree/compiler/Dialect/HAL/Transforms/BenchmarkBatchDispatches.cpp
index d1458ed..f58ee8a 100644
--- a/iree/compiler/Dialect/HAL/Transforms/BenchmarkBatchDispatches.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/BenchmarkBatchDispatches.cpp
@@ -7,7 +7,7 @@
 #include "iree/compiler/Dialect/HAL/IR/HALDialect.h"
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Pass/Pass.h"
 
 namespace mlir {
@@ -24,7 +24,7 @@
       : repeatCount_(repeatCount) {}
 
   void getDependentDialects(DialectRegistry& registry) const override {
-    registry.insert<HALDialect, StandardOpsDialect,
+    registry.insert<HALDialect, func::FuncDialect,
                     mlir::arith::ArithmeticDialect>();
   }
 
diff --git a/iree/compiler/Dialect/HAL/Transforms/CMakeLists.txt b/iree/compiler/Dialect/HAL/Transforms/CMakeLists.txt
index 00d37cc..37c3850 100644
--- a/iree/compiler/Dialect/HAL/Transforms/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Transforms/CMakeLists.txt
@@ -37,9 +37,9 @@
     MLIRArithmetic
     MLIRBufferization
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     MLIRSupport
     MLIRTransforms
     iree::compiler::Dialect::Flow::IR
diff --git a/iree/compiler/Dialect/HAL/Transforms/ConvertToHAL.cpp b/iree/compiler/Dialect/HAL/Transforms/ConvertToHAL.cpp
index 89183a1..8748b58 100644
--- a/iree/compiler/Dialect/HAL/Transforms/ConvertToHAL.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/ConvertToHAL.cpp
@@ -20,7 +20,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "iree/compiler/Dialect/Util/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
@@ -40,7 +40,7 @@
     : public PassWrapper<ConvertToHALPass, OperationPass<ModuleOp>> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::HAL::HALDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
diff --git a/iree/compiler/Dialect/HAL/Transforms/ElideRedundantCommands.cpp b/iree/compiler/Dialect/HAL/Transforms/ElideRedundantCommands.cpp
index ba2c6dd..1353403 100644
--- a/iree/compiler/Dialect/HAL/Transforms/ElideRedundantCommands.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/ElideRedundantCommands.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
 #include "llvm/ADT/BitVector.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/Transforms/MaterializeInterfaces.cpp b/iree/compiler/Dialect/HAL/Transforms/MaterializeInterfaces.cpp
index 0f1156c..7d99766 100644
--- a/iree/compiler/Dialect/HAL/Transforms/MaterializeInterfaces.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/MaterializeInterfaces.cpp
@@ -16,7 +16,7 @@
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
 #include "llvm/ADT/StringSet.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/Transforms/MaterializeResourceCaches.cpp b/iree/compiler/Dialect/HAL/Transforms/MaterializeResourceCaches.cpp
index 36aeae6..c65cd67 100644
--- a/iree/compiler/Dialect/HAL/Transforms/MaterializeResourceCaches.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/MaterializeResourceCaches.cpp
@@ -11,7 +11,7 @@
 #include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
 #include "iree/compiler/Dialect/HAL/Utils/DeviceSwitchBuilder.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp b/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp
index aa8029c..0f35a7e 100644
--- a/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/MemoizeDeviceQueries.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/HAL/IR/HALOps.h"
 #include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
 #include "llvm/ADT/StringSet.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/Transforms/PackDispatchOperands.cpp b/iree/compiler/Dialect/HAL/Transforms/PackDispatchOperands.cpp
index 6cbbbc6..dc03c3c 100644
--- a/iree/compiler/Dialect/HAL/Transforms/PackDispatchOperands.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/PackDispatchOperands.cpp
@@ -8,7 +8,7 @@
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/Transforms/VerifyTargetEnvironment.cpp b/iree/compiler/Dialect/HAL/Transforms/VerifyTargetEnvironment.cpp
index ecc24c4..d2cd0c4 100644
--- a/iree/compiler/Dialect/HAL/Transforms/VerifyTargetEnvironment.cpp
+++ b/iree/compiler/Dialect/HAL/Transforms/VerifyTargetEnvironment.cpp
@@ -12,7 +12,7 @@
 #include "iree/compiler/Dialect/HAL/Target/TargetBackend.h"
 #include "iree/compiler/Dialect/HAL/Target/TargetRegistry.h"
 #include "iree/compiler/Dialect/HAL/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/Dialect/HAL/Utils/BUILD b/iree/compiler/Dialect/HAL/Utils/BUILD
index a0febfd..15677a5 100644
--- a/iree/compiler/Dialect/HAL/Utils/BUILD
+++ b/iree/compiler/Dialect/HAL/Utils/BUILD
@@ -23,8 +23,8 @@
         "//iree/compiler/Dialect/HAL/IR",
         "//iree/compiler/Utils",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/HAL/Utils/CMakeLists.txt b/iree/compiler/Dialect/HAL/Utils/CMakeLists.txt
index 643b46b..52d4b59 100644
--- a/iree/compiler/Dialect/HAL/Utils/CMakeLists.txt
+++ b/iree/compiler/Dialect/HAL/Utils/CMakeLists.txt
@@ -20,8 +20,8 @@
     "InferCustomKernelsTargetInfoFromParent.cpp"
   DEPS
     LLVMSupport
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     MLIRSupport
     MLIRTransforms
     iree::compiler::Dialect::HAL::IR
diff --git a/iree/compiler/Dialect/Modules/Check/IR/BUILD b/iree/compiler/Dialect/Modules/Check/IR/BUILD
index f594b91..884acdd 100644
--- a/iree/compiler/Dialect/Modules/Check/IR/BUILD
+++ b/iree/compiler/Dialect/Modules/Check/IR/BUILD
@@ -40,8 +40,8 @@
     deps = [
         ":check_ops_gen",
         "//iree/compiler/Dialect/HAL/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
     ],
 )
 
diff --git a/iree/compiler/Dialect/Modules/Check/IR/CMakeLists.txt b/iree/compiler/Dialect/Modules/Check/IR/CMakeLists.txt
index 9aa35fd..91ed871 100644
--- a/iree/compiler/Dialect/Modules/Check/IR/CMakeLists.txt
+++ b/iree/compiler/Dialect/Modules/Check/IR/CMakeLists.txt
@@ -21,8 +21,8 @@
     "CheckOps.cpp.inc"
   DEPS
     ::check_ops_gen
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     iree::compiler::Dialect::HAL::IR
   PUBLIC
 )
diff --git a/iree/compiler/Dialect/Modules/Check/IR/CheckOps.cpp b/iree/compiler/Dialect/Modules/Check/IR/CheckOps.cpp
index 9e1fc33..184b8d9 100644
--- a/iree/compiler/Dialect/Modules/Check/IR/CheckOps.cpp
+++ b/iree/compiler/Dialect/Modules/Check/IR/CheckOps.cpp
@@ -7,7 +7,7 @@
 #include "iree/compiler/Dialect/Modules/Check/IR/CheckOps.h"
 
 #include "iree/compiler/Dialect/HAL/IR/HALTypes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/OpImplementation.h"
 #include "mlir/IR/PatternMatch.h"
 
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/BUILD b/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/BUILD
index 48fa3df..98ad98e 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/BUILD
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/BUILD
@@ -23,10 +23,10 @@
         "//iree/compiler/Dialect/Modules/VMVX/IR",
         "//iree/compiler/Dialect/Modules/VMVX/IR:VMVXDialect",
         "//iree/compiler/Dialect/Util/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/CMakeLists.txt b/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/CMakeLists.txt
index 8870228..94e81e6 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/CMakeLists.txt
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/CMakeLists.txt
@@ -18,10 +18,10 @@
   SRCS
     "ConvertHALToVMVX.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
     MLIRMemRef
     MLIRPass
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::Modules::VMVX::IR
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/ConvertHALToVMVX.cpp b/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/ConvertHALToVMVX.cpp
index 07d53f3..734801a 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/ConvertHALToVMVX.cpp
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/HALToVMVX/ConvertHALToVMVX.cpp
@@ -12,8 +12,8 @@
 #include "iree/compiler/Dialect/Modules/VMVX/IR/VMVXTypes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/BUILD b/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/BUILD
index 680fb46..646414e 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/BUILD
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/BUILD
@@ -23,12 +23,12 @@
         "//iree/compiler/Dialect/Modules/VMVX/IR:VMVXDialect",
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//mlir:Affine",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/CMakeLists.txt b/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/CMakeLists.txt
index 0b0833b..fa103bf 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/CMakeLists.txt
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/CMakeLists.txt
@@ -19,12 +19,12 @@
     "ConvertStandardToVMVX.cpp"
   DEPS
     MLIRAffine
+    MLIRFunc
     MLIRIR
     MLIRLinalg
     MLIRMath
     MLIRMemRef
     MLIRPass
-    MLIRStandard
     MLIRSupport
     MLIRTransforms
     iree::compiler::Dialect::Modules::VMVX::IR
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/ConvertStandardToVMVX.cpp b/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/ConvertStandardToVMVX.cpp
index 8d49eae..eb25233 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/ConvertStandardToVMVX.cpp
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/StandardToVMVX/ConvertStandardToVMVX.cpp
@@ -11,10 +11,10 @@
 #include "iree/compiler/Dialect/Modules/VMVX/IR/VMVXTypes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/AffineExpr.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/BUILD b/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/BUILD
index 398c92e..70f01aa 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/BUILD
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/BUILD
@@ -24,9 +24,9 @@
         "//iree/compiler/Dialect/VM/Conversion",
         "//iree/compiler/Dialect/VM/Conversion/StandardToVM",
         "//iree/compiler/Dialect/VM/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/CMakeLists.txt b/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/CMakeLists.txt
index 0c42b8a..3ae796d 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/CMakeLists.txt
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/CMakeLists.txt
@@ -18,9 +18,9 @@
   SRCS
     "ConvertVMVXToVM.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::Modules::VMVX::IR
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/ConvertVMVXToVM.cpp b/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/ConvertVMVXToVM.cpp
index 5c6d11a..e2b2b19 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/ConvertVMVXToVM.cpp
+++ b/iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM/ConvertVMVXToVM.cpp
@@ -13,7 +13,7 @@
 #include "iree/compiler/Dialect/VM/Conversion/ImportUtils.h"
 #include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/Modules/VMVX/IR/BUILD b/iree/compiler/Dialect/Modules/VMVX/IR/BUILD
index 47d1dd5..f6196f3 100644
--- a/iree/compiler/Dialect/Modules/VMVX/IR/BUILD
+++ b/iree/compiler/Dialect/Modules/VMVX/IR/BUILD
@@ -57,9 +57,9 @@
         "//iree/compiler/Dialect/Util/IR",
         "//iree/compiler/Dialect/VM/IR",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:SideEffects",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Translation",
@@ -76,9 +76,9 @@
         "//iree/compiler/Dialect/Modules/VMVX/Conversion/VMVXToVM",
         "//iree/compiler/Dialect/VM/Conversion",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Parser",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
     ],
diff --git a/iree/compiler/Dialect/Modules/VMVX/IR/CMakeLists.txt b/iree/compiler/Dialect/Modules/VMVX/IR/CMakeLists.txt
index d48bdf9..de91f29 100644
--- a/iree/compiler/Dialect/Modules/VMVX/IR/CMakeLists.txt
+++ b/iree/compiler/Dialect/Modules/VMVX/IR/CMakeLists.txt
@@ -31,9 +31,9 @@
     ::VMVXOpInterfaceGen
     ::VMVXOpsGen
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRSideEffectInterfaces
-    MLIRStandard
     MLIRSupport
     MLIRTransformUtils
     MLIRTranslation
@@ -52,9 +52,9 @@
   DEPS
     ::IR
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRParser
-    MLIRStandard
     MLIRSupport
     MLIRTransformUtils
     iree::compiler::Dialect::Modules::VMVX::Conversion::VMVXToVM
diff --git a/iree/compiler/Dialect/Modules/VMVX/Transforms/BUILD b/iree/compiler/Dialect/Modules/VMVX/Transforms/BUILD
index 00b113b..42ed489 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Transforms/BUILD
+++ b/iree/compiler/Dialect/Modules/VMVX/Transforms/BUILD
@@ -39,6 +39,8 @@
         "@llvm-project//mlir:AffineTransforms",
         "@llvm-project//mlir:ArithmeticTransforms",
         "@llvm-project//mlir:CFGTransforms",
+        "@llvm-project//mlir:FuncDialect",
+        "@llvm-project//mlir:FuncTransforms",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgInterfaces",
         "@llvm-project//mlir:LinalgOps",
@@ -49,8 +51,6 @@
         "@llvm-project//mlir:MemRefTransforms",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
-        "@llvm-project//mlir:StandardOpsTransforms",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TosaToStandard",
diff --git a/iree/compiler/Dialect/Modules/VMVX/Transforms/CMakeLists.txt b/iree/compiler/Dialect/Modules/VMVX/Transforms/CMakeLists.txt
index d31920d..045c789 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Transforms/CMakeLists.txt
+++ b/iree/compiler/Dialect/Modules/VMVX/Transforms/CMakeLists.txt
@@ -25,6 +25,8 @@
     MLIRAffineToStandard
     MLIRAffineTransforms
     MLIRArithmeticTransforms
+    MLIRFunc
+    MLIRFuncTransforms
     MLIRIR
     MLIRLinalg
     MLIRLinalgTransforms
@@ -35,8 +37,6 @@
     MLIRPass
     MLIRSCF
     MLIRSCFToControlFlow
-    MLIRStandard
-    MLIRStandardOpsTransforms
     MLIRSupport
     MLIRTensor
     MLIRTosaToStandard
diff --git a/iree/compiler/Dialect/Modules/VMVX/Transforms/Conversion.cpp b/iree/compiler/Dialect/Modules/VMVX/Transforms/Conversion.cpp
index eb380fe..8a5ea75 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Transforms/Conversion.cpp
+++ b/iree/compiler/Dialect/Modules/VMVX/Transforms/Conversion.cpp
@@ -15,8 +15,8 @@
 #include "llvm/ADT/STLExtras.h"
 #include "mlir/Conversion/TosaToStandard/TosaToStandard.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"
@@ -67,7 +67,7 @@
     conversionTarget.addIllegalDialect<tensor::TensorDialect>();
     conversionTarget.addLegalDialect<IREE::Util::UtilDialect>();
     conversionTarget.addLegalDialect<IREE::VMVX::VMVXDialect>();
-    conversionTarget.addLegalDialect<mlir::StandardOpsDialect,
+    conversionTarget.addLegalDialect<mlir::func::FuncDialect,
                                      mlir::arith::ArithmeticDialect>();
     conversionTarget.addLegalDialect<mlir::AffineDialect>();
     conversionTarget.addLegalDialect<memref::MemRefDialect>();
diff --git a/iree/compiler/Dialect/Modules/VMVX/Transforms/Passes.cpp b/iree/compiler/Dialect/Modules/VMVX/Transforms/Passes.cpp
index 3790efd..94ac38c 100644
--- a/iree/compiler/Dialect/Modules/VMVX/Transforms/Passes.cpp
+++ b/iree/compiler/Dialect/Modules/VMVX/Transforms/Passes.cpp
@@ -16,9 +16,9 @@
 #include "mlir/Conversion/VectorToSCF/VectorToSCF.h"
 #include "mlir/Dialect/Affine/Passes.h"
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/Passes.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/Pass/PassRegistry.h"
 #include "mlir/Transforms/Passes.h"
 
diff --git a/iree/compiler/Dialect/Stream/Analysis/BUILD b/iree/compiler/Dialect/Stream/Analysis/BUILD
index b8e7ce8..5cf70fa 100644
--- a/iree/compiler/Dialect/Stream/Analysis/BUILD
+++ b/iree/compiler/Dialect/Stream/Analysis/BUILD
@@ -28,9 +28,9 @@
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:Analysis",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
     ],
 )
diff --git a/iree/compiler/Dialect/Stream/Analysis/CMakeLists.txt b/iree/compiler/Dialect/Stream/Analysis/CMakeLists.txt
index 7cff2f2..cee091e 100644
--- a/iree/compiler/Dialect/Stream/Analysis/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/Analysis/CMakeLists.txt
@@ -23,9 +23,9 @@
   DEPS
     LLVMSupport
     MLIRAnalysis
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     MLIRSupport
     iree::compiler::Dialect::Stream::IR
     iree::compiler::Dialect::Util::Analysis
diff --git a/iree/compiler/Dialect/Stream/Analysis/ResourceUsage.cpp b/iree/compiler/Dialect/Stream/Analysis/ResourceUsage.cpp
index 9cd0aba..f67d592 100644
--- a/iree/compiler/Dialect/Stream/Analysis/ResourceUsage.cpp
+++ b/iree/compiler/Dialect/Stream/Analysis/ResourceUsage.cpp
@@ -18,7 +18,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -422,7 +422,7 @@
                 return WalkResult::advance();
               });
         })
-        .Case([&](mlir::ReturnOp op) {
+        .Case([&](mlir::func::ReturnOp op) {
           auto operandUsage = solver.getElementFor<ValueResourceUsage>(
               *this, Position::forValue(op.getOperand(operandIdx)),
               DFX::Resolution::REQUIRED);
diff --git a/iree/compiler/Dialect/Stream/Conversion/BUILD b/iree/compiler/Dialect/Stream/Conversion/BUILD
index 0a187e7..b832d7c 100644
--- a/iree/compiler/Dialect/Stream/Conversion/BUILD
+++ b/iree/compiler/Dialect/Stream/Conversion/BUILD
@@ -20,8 +20,8 @@
     ],
     deps = [
         "//iree/compiler/Dialect/Stream/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/Stream/Conversion/CMakeLists.txt b/iree/compiler/Dialect/Stream/Conversion/CMakeLists.txt
index ed6cbea..5028cc7 100644
--- a/iree/compiler/Dialect/Stream/Conversion/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/Conversion/CMakeLists.txt
@@ -18,8 +18,8 @@
   SRCS
     "PatternUtils.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::Stream::IR
   PUBLIC
diff --git a/iree/compiler/Dialect/Stream/Conversion/FlowToStream/BUILD b/iree/compiler/Dialect/Stream/Conversion/FlowToStream/BUILD
index 025e0d1..5b92132 100644
--- a/iree/compiler/Dialect/Stream/Conversion/FlowToStream/BUILD
+++ b/iree/compiler/Dialect/Stream/Conversion/FlowToStream/BUILD
@@ -22,8 +22,8 @@
         "//iree/compiler/Dialect/Flow/IR",
         "//iree/compiler/Dialect/Stream/Conversion",
         "//iree/compiler/Dialect/Stream/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TensorDialect",
     ],
 )
diff --git a/iree/compiler/Dialect/Stream/Conversion/FlowToStream/CMakeLists.txt b/iree/compiler/Dialect/Stream/Conversion/FlowToStream/CMakeLists.txt
index c5651f7..6ac4da0 100644
--- a/iree/compiler/Dialect/Stream/Conversion/FlowToStream/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/Conversion/FlowToStream/CMakeLists.txt
@@ -18,8 +18,8 @@
   SRCS
     "ConvertFlowToStream.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     MLIRTensor
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::Stream::Conversion
diff --git a/iree/compiler/Dialect/Stream/Conversion/FlowToStream/ConvertFlowToStream.cpp b/iree/compiler/Dialect/Stream/Conversion/FlowToStream/ConvertFlowToStream.cpp
index 8058f18..4a5fe70 100644
--- a/iree/compiler/Dialect/Stream/Conversion/FlowToStream/ConvertFlowToStream.cpp
+++ b/iree/compiler/Dialect/Stream/Conversion/FlowToStream/ConvertFlowToStream.cpp
@@ -11,7 +11,7 @@
 #include "iree/compiler/Dialect/Stream/Conversion/PatternUtils.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamDialect.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 
 namespace mlir {
diff --git a/iree/compiler/Dialect/Stream/Conversion/HALToStream/BUILD b/iree/compiler/Dialect/Stream/Conversion/HALToStream/BUILD
index b00816d..7ab01a3 100644
--- a/iree/compiler/Dialect/Stream/Conversion/HALToStream/BUILD
+++ b/iree/compiler/Dialect/Stream/Conversion/HALToStream/BUILD
@@ -22,7 +22,7 @@
         "//iree/compiler/Dialect/HAL/IR",
         "//iree/compiler/Dialect/Stream/Conversion",
         "//iree/compiler/Dialect/Stream/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
     ],
 )
diff --git a/iree/compiler/Dialect/Stream/Conversion/HALToStream/CMakeLists.txt b/iree/compiler/Dialect/Stream/Conversion/HALToStream/CMakeLists.txt
index 51c682f..02a67a0 100644
--- a/iree/compiler/Dialect/Stream/Conversion/HALToStream/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/Conversion/HALToStream/CMakeLists.txt
@@ -18,8 +18,8 @@
   SRCS
     "ConvertHALToStream.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     iree::compiler::Dialect::HAL::IR
     iree::compiler::Dialect::Stream::Conversion
     iree::compiler::Dialect::Stream::IR
diff --git a/iree/compiler/Dialect/Stream/Conversion/HALToStream/ConvertHALToStream.cpp b/iree/compiler/Dialect/Stream/Conversion/HALToStream/ConvertHALToStream.cpp
index 474a186..c92f063 100644
--- a/iree/compiler/Dialect/Stream/Conversion/HALToStream/ConvertHALToStream.cpp
+++ b/iree/compiler/Dialect/Stream/Conversion/HALToStream/ConvertHALToStream.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/Stream/Conversion/PatternUtils.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamDialect.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 namespace mlir {
 namespace iree_compiler {
diff --git a/iree/compiler/Dialect/Stream/Conversion/PatternUtils.cpp b/iree/compiler/Dialect/Stream/Conversion/PatternUtils.cpp
index 202040f..c023ad6 100644
--- a/iree/compiler/Dialect/Stream/Conversion/PatternUtils.cpp
+++ b/iree/compiler/Dialect/Stream/Conversion/PatternUtils.cpp
@@ -8,7 +8,7 @@
 
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamTypes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 namespace mlir {
 namespace iree_compiler {
diff --git a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/BUILD b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/BUILD
index b31c035..5cfcd02 100644
--- a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/BUILD
+++ b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/BUILD
@@ -26,11 +26,11 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:Shape",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/CMakeLists.txt b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/CMakeLists.txt
index 78e80da..fb1898b 100644
--- a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/CMakeLists.txt
@@ -23,11 +23,11 @@
     LLVMSupport
     MLIRArithmetic
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRMemRef
     MLIRPass
     MLIRShape
-    MLIRStandard
     MLIRTensor
     MLIRTransforms
     iree::compiler::Dialect::Stream::Conversion
diff --git a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStandardToStream.cpp b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStandardToStream.cpp
index 839a18a..764b588 100644
--- a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStandardToStream.cpp
+++ b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStandardToStream.cpp
@@ -9,8 +9,8 @@
 #include "iree/compiler/Dialect/Stream/IR/StreamDialect.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamTypes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Transforms/DialectConversion.h"
 
diff --git a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStructuralOps.cpp b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStructuralOps.cpp
index 2b7201c..30e9024 100644
--- a/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStructuralOps.cpp
+++ b/iree/compiler/Dialect/Stream/Conversion/StandardToStream/ConvertStructuralOps.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/Stream/IR/StreamTypes.h"
 #include "llvm/ADT/DenseMap.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
@@ -83,10 +83,10 @@
   return expandedOperands;
 }
 
-struct CallOpConversion : public OpConversionPattern<mlir::CallOp> {
+struct CallOpConversion : public OpConversionPattern<mlir::func::CallOp> {
   using OpConversionPattern::OpConversionPattern;
   LogicalResult matchAndRewrite(
-      mlir::CallOp op, OpAdaptor adaptor,
+      mlir::func::CallOp op, OpAdaptor adaptor,
       ConversionPatternRewriter &rewriter) const override {
     // Expand any resource operands to resource + size.
     auto expandedOperands =
@@ -115,7 +115,7 @@
     // Create a new call that takes the expanded input operands and returns the
     // expanded output results. We can't directly replace the original call as
     // the result counts differ.
-    auto callOp = rewriter.create<mlir::CallOp>(
+    auto callOp = rewriter.create<mlir::func::CallOp>(
         op.getLoc(), expandedTypes, op.getCallee(), expandedOperands);
 
     // Tie all resource results together so we end up with 1:1 results with the
@@ -141,15 +141,15 @@
   }
 };
 
-struct ReturnOpConversion : public OpConversionPattern<mlir::ReturnOp> {
+struct ReturnOpConversion : public OpConversionPattern<mlir::func::ReturnOp> {
   using OpConversionPattern::OpConversionPattern;
   LogicalResult matchAndRewrite(
-      mlir::ReturnOp op, OpAdaptor adaptor,
+      mlir::func::ReturnOp op, OpAdaptor adaptor,
       ConversionPatternRewriter &rewriter) const override {
     // Expand any resource operands to resource + size.
     auto expandedOperands =
         expandResourceOperands(op.getLoc(), adaptor.getOperands(), rewriter);
-    rewriter.replaceOpWithNewOp<mlir::ReturnOp>(op, expandedOperands);
+    rewriter.replaceOpWithNewOp<mlir::func::ReturnOp>(op, expandedOperands);
     return success();
   }
 };
@@ -225,15 +225,17 @@
     return typeConverter.isSignatureLegal(op.getType()) &&
            typeConverter.isLegal(&op.getBody());
   });
-  conversionTarget.addDynamicallyLegalOp<mlir::CallOp>([&](mlir::CallOp op) {
-    return llvm::all_of(
-               op.getOperandTypes(),
-               [&](Type type) { return typeConverter.isLegal(type); }) &&
-           llvm::all_of(op.getResultTypes(),
-                        [&](Type type) { return typeConverter.isLegal(type); });
-  });
-  conversionTarget.addDynamicallyLegalOp<mlir::ReturnOp>(
-      [&](mlir::ReturnOp op) {
+  conversionTarget.addDynamicallyLegalOp<mlir::func::CallOp>(
+      [&](mlir::func::CallOp op) {
+        return llvm::all_of(
+                   op.getOperandTypes(),
+                   [&](Type type) { return typeConverter.isLegal(type); }) &&
+               llvm::all_of(op.getResultTypes(), [&](Type type) {
+                 return typeConverter.isLegal(type);
+               });
+      });
+  conversionTarget.addDynamicallyLegalOp<mlir::func::ReturnOp>(
+      [&](mlir::func::ReturnOp op) {
         return llvm::all_of(op.getOperandTypes(), [&](Type type) {
           return typeConverter.isLegal(type);
         });
diff --git a/iree/compiler/Dialect/Stream/Conversion/UtilToStream/BUILD b/iree/compiler/Dialect/Stream/Conversion/UtilToStream/BUILD
index e880f5b..a4fcf72 100644
--- a/iree/compiler/Dialect/Stream/Conversion/UtilToStream/BUILD
+++ b/iree/compiler/Dialect/Stream/Conversion/UtilToStream/BUILD
@@ -22,8 +22,8 @@
         "//iree/compiler/Dialect/Stream/Conversion",
         "//iree/compiler/Dialect/Stream/IR",
         "//iree/compiler/Dialect/Util/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/Stream/Conversion/UtilToStream/CMakeLists.txt b/iree/compiler/Dialect/Stream/Conversion/UtilToStream/CMakeLists.txt
index 274da6a..d24223c 100644
--- a/iree/compiler/Dialect/Stream/Conversion/UtilToStream/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/Conversion/UtilToStream/CMakeLists.txt
@@ -18,8 +18,8 @@
   SRCS
     "ConvertUtilToStream.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::Stream::Conversion
     iree::compiler::Dialect::Stream::IR
diff --git a/iree/compiler/Dialect/Stream/Conversion/UtilToStream/ConvertUtilToStream.cpp b/iree/compiler/Dialect/Stream/Conversion/UtilToStream/ConvertUtilToStream.cpp
index 7993743..c6d1186 100644
--- a/iree/compiler/Dialect/Stream/Conversion/UtilToStream/ConvertUtilToStream.cpp
+++ b/iree/compiler/Dialect/Stream/Conversion/UtilToStream/ConvertUtilToStream.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Stream/Conversion/PatternUtils.h"
 #include "iree/compiler/Dialect/Stream/IR/StreamOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/MLIRContext.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/DialectConversion.h"
diff --git a/iree/compiler/Dialect/Stream/IR/BUILD b/iree/compiler/Dialect/Stream/IR/BUILD
index 1ad2709..645dfc1 100644
--- a/iree/compiler/Dialect/Stream/IR/BUILD
+++ b/iree/compiler/Dialect/Stream/IR/BUILD
@@ -70,12 +70,12 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ArithmeticUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:InferTypeOpInterface",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:SideEffects",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TransformUtils",
diff --git a/iree/compiler/Dialect/Stream/IR/CMakeLists.txt b/iree/compiler/Dialect/Stream/IR/CMakeLists.txt
index 51fb3d8..d62d387 100644
--- a/iree/compiler/Dialect/Stream/IR/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/IR/CMakeLists.txt
@@ -41,12 +41,12 @@
     LLVMSupport
     MLIRArithmetic
     MLIRArithmeticUtils
+    MLIRFunc
     MLIRIR
     MLIRInferTypeOpInterface
     MLIRMemRef
     MLIRParser
     MLIRSideEffectInterfaces
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTransformUtils
diff --git a/iree/compiler/Dialect/Stream/IR/StreamDialect.cpp b/iree/compiler/Dialect/Stream/IR/StreamDialect.cpp
index 247e8b1..665a769 100644
--- a/iree/compiler/Dialect/Stream/IR/StreamDialect.cpp
+++ b/iree/compiler/Dialect/Stream/IR/StreamDialect.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/Stream/IR/StreamTypes.h"
 #include "llvm/Support/SourceMgr.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/DialectImplementation.h"
@@ -111,9 +111,9 @@
 Operation *StreamDialect::materializeConstant(OpBuilder &builder,
                                               Attribute value, Type type,
                                               Location loc) {
-  if (mlir::ConstantOp::isBuildableWith(value, type)) {
-    return builder.create<mlir::ConstantOp>(loc, type,
-                                            value.cast<FlatSymbolRefAttr>());
+  if (mlir::func::ConstantOp::isBuildableWith(value, type)) {
+    return builder.create<mlir::func::ConstantOp>(
+        loc, type, value.cast<FlatSymbolRefAttr>());
   } else if (arith::ConstantOp::isBuildableWith(value, type)) {
     return builder.create<arith::ConstantOp>(loc, type, value);
   } else if (value.isa<IREE::Stream::TimepointAttr>()) {
diff --git a/iree/compiler/Dialect/Stream/IR/StreamOpFolders.cpp b/iree/compiler/Dialect/Stream/IR/StreamOpFolders.cpp
index 22671c6..077fd17 100644
--- a/iree/compiler/Dialect/Stream/IR/StreamOpFolders.cpp
+++ b/iree/compiler/Dialect/Stream/IR/StreamOpFolders.cpp
@@ -17,8 +17,8 @@
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/StringExtras.h"
 #include "mlir/Dialect/Arithmetic/Utils/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Stream/IR/StreamOps.cpp b/iree/compiler/Dialect/Stream/IR/StreamOps.cpp
index adac0dc..c9db68a 100644
--- a/iree/compiler/Dialect/Stream/IR/StreamOps.cpp
+++ b/iree/compiler/Dialect/Stream/IR/StreamOps.cpp
@@ -14,7 +14,7 @@
 #include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/CommandLine.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Stream/Transforms/AnnotateDispatchArguments.cpp b/iree/compiler/Dialect/Stream/Transforms/AnnotateDispatchArguments.cpp
index 6f92699..84e577a 100644
--- a/iree/compiler/Dialect/Stream/Transforms/AnnotateDispatchArguments.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/AnnotateDispatchArguments.cpp
@@ -16,7 +16,7 @@
 #include "llvm/ADT/APInt.h"
 #include "llvm/Support/Alignment.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Stream/Transforms/BUILD b/iree/compiler/Dialect/Stream/Transforms/BUILD
index f9c804f..531da5a 100644
--- a/iree/compiler/Dialect/Stream/Transforms/BUILD
+++ b/iree/compiler/Dialect/Stream/Transforms/BUILD
@@ -65,12 +65,12 @@
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ControlFlowOps",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TransformUtils",
diff --git a/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt b/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt
index 5807634..c537436 100644
--- a/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt
+++ b/iree/compiler/Dialect/Stream/Transforms/CMakeLists.txt
@@ -47,12 +47,12 @@
     MLIRAnalysis
     MLIRArithmetic
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRLinalg
     MLIRMemRef
     MLIRPass
     MLIRSCF
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTransformUtils
diff --git a/iree/compiler/Dialect/Stream/Transforms/ConvertToStream.cpp b/iree/compiler/Dialect/Stream/Transforms/ConvertToStream.cpp
index 3d11c9c..6d40290 100644
--- a/iree/compiler/Dialect/Stream/Transforms/ConvertToStream.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/ConvertToStream.cpp
@@ -21,7 +21,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "iree/compiler/Dialect/Util/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/Transforms/Patterns.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
@@ -181,7 +181,7 @@
 class ConvertToStreamPass : public ConvertToStreamBase<ConvertToStreamPass> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<mlir::tensor::TensorDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp b/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp
index 832b39d..a00595e 100644
--- a/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/EncodeTensors.cpp
@@ -16,7 +16,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
@@ -557,7 +557,7 @@
     : public EncodeHostTensorsBase<EncodeHostTensorsPass> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
@@ -692,7 +692,7 @@
     : public EncodeDeviceTensorsBase<EncodeDeviceTensorsPass> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Flow::FlowDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/FoldUniformOperands.cpp b/iree/compiler/Dialect/Stream/Transforms/FoldUniformOperands.cpp
index 1157df2..f0551bd 100644
--- a/iree/compiler/Dialect/Stream/Transforms/FoldUniformOperands.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/FoldUniformOperands.cpp
@@ -13,7 +13,7 @@
 #include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/EquivalenceClasses.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Stream/Transforms/FuseDispatchBindings.cpp b/iree/compiler/Dialect/Stream/Transforms/FuseDispatchBindings.cpp
index 59137cb..8111382 100644
--- a/iree/compiler/Dialect/Stream/Transforms/FuseDispatchBindings.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/FuseDispatchBindings.cpp
@@ -13,7 +13,7 @@
 #include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/EquivalenceClasses.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Stream/Transforms/LayoutSlices.cpp b/iree/compiler/Dialect/Stream/Transforms/LayoutSlices.cpp
index b648105..970ee9f 100644
--- a/iree/compiler/Dialect/Stream/Transforms/LayoutSlices.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/LayoutSlices.cpp
@@ -17,7 +17,7 @@
 #include "iree/compiler/Utils/IndexSet.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
@@ -247,7 +247,7 @@
 class LayoutSlicesPass : public LayoutSlicesBase<LayoutSlicesPass> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/MaterializeBuiltins.cpp b/iree/compiler/Dialect/Stream/Transforms/MaterializeBuiltins.cpp
index 4f4a3bc..3fe08e1 100644
--- a/iree/compiler/Dialect/Stream/Transforms/MaterializeBuiltins.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/MaterializeBuiltins.cpp
@@ -15,10 +15,10 @@
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/TypeSwitch.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
@@ -71,7 +71,7 @@
 
   void getDependentDialects(DialectRegistry &registry) const override {
     // We need to include all dialects that the builtin modules use.
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<mlir::linalg::LinalgDialect>();
     registry.insert<mlir::memref::MemRefDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/MaterializeCopyOnWrite.cpp b/iree/compiler/Dialect/Stream/Transforms/MaterializeCopyOnWrite.cpp
index f6392f5..d562fa3 100644
--- a/iree/compiler/Dialect/Stream/Transforms/MaterializeCopyOnWrite.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/MaterializeCopyOnWrite.cpp
@@ -14,7 +14,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -157,7 +157,7 @@
   MaterializeCopyOnWritePass() = default;
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/OutlineConstants.cpp b/iree/compiler/Dialect/Stream/Transforms/OutlineConstants.cpp
index 50ea9d0..33859a0 100644
--- a/iree/compiler/Dialect/Stream/Transforms/OutlineConstants.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/OutlineConstants.cpp
@@ -12,7 +12,7 @@
 #include "iree/compiler/Dialect/Stream/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -67,7 +67,7 @@
   OutlineConstantsPass() = default;
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Util::UtilDialect>();
   }
diff --git a/iree/compiler/Dialect/Stream/Transforms/PackAllocations.cpp b/iree/compiler/Dialect/Stream/Transforms/PackAllocations.cpp
index ef381cd..b24bc17 100644
--- a/iree/compiler/Dialect/Stream/Transforms/PackAllocations.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/PackAllocations.cpp
@@ -13,7 +13,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
@@ -36,7 +36,7 @@
 class PackAllocationsPass : public PackAllocationsBase<PackAllocationsPass> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
   }
diff --git a/iree/compiler/Dialect/Stream/Transforms/PackConstants.cpp b/iree/compiler/Dialect/Stream/Transforms/PackConstants.cpp
index 096a9bd..768b1c9 100644
--- a/iree/compiler/Dialect/Stream/Transforms/PackConstants.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/PackConstants.cpp
@@ -14,8 +14,8 @@
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "iree/compiler/Utils/IndexSet.h"
 #include "llvm/Support/Debug.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
@@ -445,7 +445,7 @@
 class PackConstantsPass : public PackConstantsBase<PackConstantsPass> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<mlir::scf::SCFDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/PropagateSubviews.cpp b/iree/compiler/Dialect/Stream/Transforms/PropagateSubviews.cpp
index 380bdb4..24c15fd 100644
--- a/iree/compiler/Dialect/Stream/Transforms/PropagateSubviews.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/PropagateSubviews.cpp
@@ -18,7 +18,7 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
@@ -383,7 +383,7 @@
 //  ->
 //  %r, %rsz, %ro, %rl = call @foo(%0, %sz, %o, %l)
 //  %2 = stream.resource.subview %r[%ro] : {%rsz} -> {%rl}
-static void expandCallOp(mlir::CallOp op, IndexSet &indexSet,
+static void expandCallOp(mlir::func::CallOp op, IndexSet &indexSet,
                          SubviewMap &subviewMap) {
   if (!usesResources(op)) return;
 
@@ -392,8 +392,8 @@
   auto operands =
       expandOperands(op.getLoc(), op.operands(), subviewMap, indexSet, builder);
   auto resultTypes = expandTypes(op.getResultTypes());
-  auto newOp = builder.create<mlir::CallOp>(op.getLoc(), op.getCallee(),
-                                            resultTypes, operands);
+  auto newOp = builder.create<mlir::func::CallOp>(op.getLoc(), op.getCallee(),
+                                                  resultTypes, operands);
 
   // Insert subviews on results that we are sinking across the call edge.
   // The hope is that by moving the subviews here we can fold with uses inside
@@ -431,13 +431,13 @@
 //  return %1
 //  ->
 //  return %0, %sz, %o, %l
-static void expandReturnOp(mlir::ReturnOp op, IndexSet &indexSet,
+static void expandReturnOp(mlir::func::ReturnOp op, IndexSet &indexSet,
                            SubviewMap &subviewMap) {
   if (!usesResources(op)) return;
   OpBuilder builder(op);
   auto operands =
       expandOperands(op.getLoc(), op.operands(), subviewMap, indexSet, builder);
-  builder.create<mlir::ReturnOp>(op.getLoc(), operands);
+  builder.create<mlir::func::ReturnOp>(op.getLoc(), operands);
   op.erase();
 }
 
@@ -486,9 +486,9 @@
     expandInitializerOp(initializerOp, globalMap, indexSet, subviewMap);
   } else if (auto funcOp = dyn_cast<mlir::FuncOp>(op)) {
     expandFuncOp(funcOp, globalMap, indexSet, subviewMap);
-  } else if (auto callOp = dyn_cast<mlir::CallOp>(op)) {
+  } else if (auto callOp = dyn_cast<mlir::func::CallOp>(op)) {
     expandCallOp(callOp, indexSet, subviewMap);
-  } else if (auto returnOp = dyn_cast<mlir::ReturnOp>(op)) {
+  } else if (auto returnOp = dyn_cast<mlir::func::ReturnOp>(op)) {
     expandReturnOp(returnOp, indexSet, subviewMap);
   } else if (auto branchOp = dyn_cast<mlir::cf::BranchOp>(op)) {
     expandBranchOp(branchOp, indexSet, subviewMap);
@@ -515,7 +515,7 @@
   PropagateSubviewsPass() = default;
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/PropagateTimepoints.cpp b/iree/compiler/Dialect/Stream/Transforms/PropagateTimepoints.cpp
index 5c82ba2..d2b0e55 100644
--- a/iree/compiler/Dialect/Stream/Transforms/PropagateTimepoints.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/PropagateTimepoints.cpp
@@ -17,7 +17,7 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
@@ -387,7 +387,7 @@
 //  ->
 //  %rt, %r = call @foo(%t, %0)
 //  stream.timepoint.await %rt, %t
-static void expandCallOp(mlir::CallOp op,
+static void expandCallOp(mlir::func::CallOp op,
                          BlockAndValueMapping &resourceTimepointMap) {
   if (!usesResources(op)) return;
 
@@ -396,8 +396,8 @@
   auto operands =
       expandOperands(op.getLoc(), op.operands(), resourceTimepointMap, builder);
   auto resultTypes = expandTypes(op.getResultTypes());
-  auto newOp = builder.create<mlir::CallOp>(op.getLoc(), op.getCallee(),
-                                            resultTypes, operands);
+  auto newOp = builder.create<mlir::func::CallOp>(op.getLoc(), op.getCallee(),
+                                                  resultTypes, operands);
 
   // Insert awaits on results that we are sinking across the call edge.
   // The hope is that by moving the awaits here we can fold with uses inside
@@ -434,13 +434,13 @@
 //  return %1
 //  ->
 //  return %t, %0
-static void expandReturnOp(mlir::ReturnOp op,
+static void expandReturnOp(mlir::func::ReturnOp op,
                            BlockAndValueMapping &resourceTimepointMap) {
   if (!usesResources(op)) return;
   OpBuilder builder(op);
   auto operands =
       expandOperands(op.getLoc(), op.operands(), resourceTimepointMap, builder);
-  builder.create<mlir::ReturnOp>(op.getLoc(), operands);
+  builder.create<mlir::func::ReturnOp>(op.getLoc(), operands);
   op.erase();
 }
 
@@ -547,9 +547,9 @@
     expandInitializerOp(initializerOp, globalMap, resourceTimepointMap);
   } else if (auto funcOp = dyn_cast<mlir::FuncOp>(op)) {
     expandFuncOp(funcOp, globalMap, resourceTimepointMap);
-  } else if (auto callOp = dyn_cast<mlir::CallOp>(op)) {
+  } else if (auto callOp = dyn_cast<mlir::func::CallOp>(op)) {
     expandCallOp(callOp, resourceTimepointMap);
-  } else if (auto returnOp = dyn_cast<mlir::ReturnOp>(op)) {
+  } else if (auto returnOp = dyn_cast<mlir::func::ReturnOp>(op)) {
     expandReturnOp(returnOp, resourceTimepointMap);
   } else if (auto branchOp = dyn_cast<mlir::cf::BranchOp>(op)) {
     expandBranchOp(branchOp, resourceTimepointMap);
@@ -582,7 +582,7 @@
   PropagateTimepointsPass() = default;
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::cf::ControlFlowDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/RefineUsage.cpp b/iree/compiler/Dialect/Stream/Transforms/RefineUsage.cpp
index 9d7f331..83b84ad 100644
--- a/iree/compiler/Dialect/Stream/Transforms/RefineUsage.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/RefineUsage.cpp
@@ -15,7 +15,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -231,7 +231,7 @@
 
     // Results:
     SmallVector<Type> newOutputs;
-    auto anyReturnOp = *op.getOps<mlir::ReturnOp>().begin();
+    auto anyReturnOp = *op.getOps<mlir::func::ReturnOp>().begin();
     for (auto outputType : llvm::enumerate(op.getType().getResults())) {
       auto oldType = outputType.value().dyn_cast<IREE::Stream::ResourceType>();
       if (!oldType) {
@@ -329,7 +329,7 @@
   patterns.insert<ApplyInitializerOp, ApplyFuncOp>(context, analysis);
   patterns.insert<ApplyGenericOp<IREE::Util::DoNotOptimizeOp>,
                   ApplyGenericOp<mlir::arith::SelectOp>,
-                  ApplyGenericOp<mlir::CallOp>>(context, analysis);
+                  ApplyGenericOp<mlir::func::CallOp>>(context, analysis);
   patterns.insert<ApplyStreamableOp<IREE::Stream::TensorImportOp>,
                   ApplyStreamableOp<IREE::Stream::TensorExportOp>,
                   ApplyStreamableOp<IREE::Stream::AsyncAllocaOp>,
@@ -359,7 +359,7 @@
   RefineUsagePass() = default;
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
   }
diff --git a/iree/compiler/Dialect/Stream/Transforms/ScheduleAllocation.cpp b/iree/compiler/Dialect/Stream/Transforms/ScheduleAllocation.cpp
index 954a7c8..448e170 100644
--- a/iree/compiler/Dialect/Stream/Transforms/ScheduleAllocation.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/ScheduleAllocation.cpp
@@ -16,7 +16,7 @@
 #include "llvm/ADT/BitVector.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Analysis/Liveness.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
@@ -1399,7 +1399,7 @@
     : public ScheduleAllocationBase<ScheduleAllocationPass> {
  public:
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Stream::StreamDialect>();
     registry.insert<IREE::Util::UtilDialect>();
diff --git a/iree/compiler/Dialect/Stream/Transforms/ScheduleConcurrency.cpp b/iree/compiler/Dialect/Stream/Transforms/ScheduleConcurrency.cpp
index 7e184a6..bf7b1f2 100644
--- a/iree/compiler/Dialect/Stream/Transforms/ScheduleConcurrency.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/ScheduleConcurrency.cpp
@@ -16,7 +16,7 @@
 #include "iree/compiler/Utils/GraphUtils.h"
 #include "llvm/ADT/BitVector.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Stream/Transforms/ScheduleExecution.cpp b/iree/compiler/Dialect/Stream/Transforms/ScheduleExecution.cpp
index cff4868..7727a49 100644
--- a/iree/compiler/Dialect/Stream/Transforms/ScheduleExecution.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/ScheduleExecution.cpp
@@ -16,7 +16,7 @@
 #include "iree/compiler/Utils/GraphUtils.h"
 #include "llvm/ADT/EquivalenceClasses.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp b/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp
index 0b02115..0149ea7 100644
--- a/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp
+++ b/iree/compiler/Dialect/Stream/Transforms/SpecializeDispatches.cpp
@@ -13,7 +13,7 @@
 #include "iree/compiler/Utils/IndexSet.h"
 #include "llvm/ADT/BitVector.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Attributes.h"
diff --git a/iree/compiler/Dialect/Util/Analysis/Constant/BUILD b/iree/compiler/Dialect/Util/Analysis/Constant/BUILD
index 7064e4c..5bdcce9 100644
--- a/iree/compiler/Dialect/Util/Analysis/Constant/BUILD
+++ b/iree/compiler/Dialect/Util/Analysis/Constant/BUILD
@@ -25,10 +25,10 @@
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ArithmeticDialect",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgInterfaces",
         "@llvm-project//mlir:LinalgOps",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
     ],
diff --git a/iree/compiler/Dialect/Util/Analysis/Constant/CMakeLists.txt b/iree/compiler/Dialect/Util/Analysis/Constant/CMakeLists.txt
index 6b8aae1..744c361 100644
--- a/iree/compiler/Dialect/Util/Analysis/Constant/CMakeLists.txt
+++ b/iree/compiler/Dialect/Util/Analysis/Constant/CMakeLists.txt
@@ -22,9 +22,9 @@
   DEPS
     LLVMSupport
     MLIRArithmetic
+    MLIRFunc
     MLIRIR
     MLIRLinalg
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     iree::compiler::Dialect::Util::Analysis
diff --git a/iree/compiler/Dialect/Util/Conversion/BUILD b/iree/compiler/Dialect/Util/Conversion/BUILD
index a3b1b0c..9949359 100644
--- a/iree/compiler/Dialect/Util/Conversion/BUILD
+++ b/iree/compiler/Dialect/Util/Conversion/BUILD
@@ -21,8 +21,8 @@
     deps = [
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/Util/Conversion/CMakeLists.txt b/iree/compiler/Dialect/Util/Conversion/CMakeLists.txt
index dbf27e4..61089e5 100644
--- a/iree/compiler/Dialect/Util/Conversion/CMakeLists.txt
+++ b/iree/compiler/Dialect/Util/Conversion/CMakeLists.txt
@@ -19,8 +19,8 @@
     "ConversionPatterns.cpp"
   DEPS
     LLVMSupport
+    MLIRFunc
     MLIRIR
-    MLIRStandard
     MLIRSupport
     MLIRTransforms
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/Util/Conversion/ConversionPatterns.cpp b/iree/compiler/Dialect/Util/Conversion/ConversionPatterns.cpp
index 039f4f3..5eb16a6 100644
--- a/iree/compiler/Dialect/Util/Conversion/ConversionPatterns.cpp
+++ b/iree/compiler/Dialect/Util/Conversion/ConversionPatterns.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "llvm/ADT/DenseMap.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Util/IR/BUILD b/iree/compiler/Dialect/Util/IR/BUILD
index 6349c18..2b200e2 100644
--- a/iree/compiler/Dialect/Util/IR/BUILD
+++ b/iree/compiler/Dialect/Util/IR/BUILD
@@ -75,12 +75,12 @@
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ControlFlowInterfaces",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:SideEffectInterfaces",
         "@llvm-project//mlir:SideEffects",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
diff --git a/iree/compiler/Dialect/Util/IR/CMakeLists.txt b/iree/compiler/Dialect/Util/IR/CMakeLists.txt
index 2b44852..7d31da3 100644
--- a/iree/compiler/Dialect/Util/IR/CMakeLists.txt
+++ b/iree/compiler/Dialect/Util/IR/CMakeLists.txt
@@ -45,11 +45,11 @@
     MLIRArithmetic
     MLIRControlFlow
     MLIRControlFlowInterfaces
+    MLIRFunc
     MLIRIR
     MLIRMemRef
     MLIRParser
     MLIRSideEffectInterfaces
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTransforms
diff --git a/iree/compiler/Dialect/Util/IR/ClosureOpUtils.cpp b/iree/compiler/Dialect/Util/IR/ClosureOpUtils.cpp
index 6336a75..52455c9 100644
--- a/iree/compiler/Dialect/Util/IR/ClosureOpUtils.cpp
+++ b/iree/compiler/Dialect/Util/IR/ClosureOpUtils.cpp
@@ -7,7 +7,7 @@
 #include "iree/compiler/Dialect/Util/IR/ClosureOpUtils.h"
 
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 namespace mlir {
 namespace iree_compiler {
diff --git a/iree/compiler/Dialect/Util/IR/UtilOpFolders.cpp b/iree/compiler/Dialect/Util/IR/UtilOpFolders.cpp
index 1b74216..032827c 100644
--- a/iree/compiler/Dialect/Util/IR/UtilOpFolders.cpp
+++ b/iree/compiler/Dialect/Util/IR/UtilOpFolders.cpp
@@ -7,7 +7,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/BitVector.h"
 #include "llvm/ADT/EquivalenceClasses.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/Matchers.h"
diff --git a/iree/compiler/Dialect/Util/IR/UtilOps.cpp b/iree/compiler/Dialect/Util/IR/UtilOps.cpp
index ee63f5e..fcbf88b 100644
--- a/iree/compiler/Dialect/Util/IR/UtilOps.cpp
+++ b/iree/compiler/Dialect/Util/IR/UtilOps.cpp
@@ -9,7 +9,7 @@
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/SMLoc.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/Diagnostics.h"
diff --git a/iree/compiler/Dialect/Util/IR/UtilTypes.cpp b/iree/compiler/Dialect/Util/IR/UtilTypes.cpp
index e5fc087..d77e7a4 100644
--- a/iree/compiler/Dialect/Util/IR/UtilTypes.cpp
+++ b/iree/compiler/Dialect/Util/IR/UtilTypes.cpp
@@ -8,7 +8,7 @@
 
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "llvm/ADT/BitVector.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
diff --git a/iree/compiler/Dialect/Util/Transforms/ApplyPatterns.cpp b/iree/compiler/Dialect/Util/Transforms/ApplyPatterns.cpp
index 966724d..7ba3350 100644
--- a/iree/compiler/Dialect/Util/Transforms/ApplyPatterns.cpp
+++ b/iree/compiler/Dialect/Util/Transforms/ApplyPatterns.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "iree/compiler/Dialect/Util/Transforms/Passes.h"
 #include "iree/compiler/Dialect/Util/Transforms/Patterns.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinDialect.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
@@ -31,7 +31,7 @@
 
   void getDependentDialects(DialectRegistry &registry) const override {
     registry
-        .insert<BuiltinDialect, StandardOpsDialect, IREE::Util::UtilDialect>();
+        .insert<BuiltinDialect, func::FuncDialect, IREE::Util::UtilDialect>();
   }
 
   void runOnOperation() override {
diff --git a/iree/compiler/Dialect/Util/Transforms/BUILD b/iree/compiler/Dialect/Util/Transforms/BUILD
index 69e55fc..37408e4 100644
--- a/iree/compiler/Dialect/Util/Transforms/BUILD
+++ b/iree/compiler/Dialect/Util/Transforms/BUILD
@@ -38,9 +38,9 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:Analysis",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/Util/Transforms/CMakeLists.txt b/iree/compiler/Dialect/Util/Transforms/CMakeLists.txt
index 3639b8d..1b9c77c 100644
--- a/iree/compiler/Dialect/Util/Transforms/CMakeLists.txt
+++ b/iree/compiler/Dialect/Util/Transforms/CMakeLists.txt
@@ -32,9 +32,9 @@
     LLVMSupport
     MLIRAnalysis
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     MLIRSupport
     MLIRTransforms
     iree::compiler::Dialect::Util::Analysis
diff --git a/iree/compiler/Dialect/Util/Transforms/CombineInitializers.cpp b/iree/compiler/Dialect/Util/Transforms/CombineInitializers.cpp
index 84ba47a..59d1135 100644
--- a/iree/compiler/Dialect/Util/Transforms/CombineInitializers.cpp
+++ b/iree/compiler/Dialect/Util/Transforms/CombineInitializers.cpp
@@ -13,7 +13,7 @@
 #include "iree/compiler/Dialect/Util/Transforms/Passes.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/IR/PatternMatch.h"
diff --git a/iree/compiler/Dialect/Util/Transforms/FoldGlobals.cpp b/iree/compiler/Dialect/Util/Transforms/FoldGlobals.cpp
index 4d4d97e..bf63271 100644
--- a/iree/compiler/Dialect/Util/Transforms/FoldGlobals.cpp
+++ b/iree/compiler/Dialect/Util/Transforms/FoldGlobals.cpp
@@ -16,7 +16,7 @@
 #include "llvm/ADT/EquivalenceClasses.h"
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
@@ -253,9 +253,9 @@
   if (arith::ConstantOp::isBuildableWith(attr, type)) {
     // Common case fast-path.
     return builder.create<arith::ConstantOp>(loc, type, attr);
-  } else if (mlir::ConstantOp::isBuildableWith(attr, type)) {
-    return builder.create<mlir::ConstantOp>(loc, type,
-                                            attr.cast<FlatSymbolRefAttr>());
+  } else if (mlir::func::ConstantOp::isBuildableWith(attr, type)) {
+    return builder.create<mlir::func::ConstantOp>(
+        loc, type, attr.cast<FlatSymbolRefAttr>());
   }
   // Fallback that asks a dialect to materialize things. This may fail!
   auto *op = attr.getDialect().materializeConstant(builder, attr, type, loc);
@@ -395,7 +395,7 @@
   }
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<mlir::StandardOpsDialect>();
+    registry.insert<mlir::func::FuncDialect>();
     registry.insert<mlir::arith::ArithmeticDialect>();
     registry.insert<IREE::Util::UtilDialect>();
   }
diff --git a/iree/compiler/Dialect/Util/Transforms/Patterns.cpp b/iree/compiler/Dialect/Util/Transforms/Patterns.cpp
index 42dbe1f..e4fb8d7 100644
--- a/iree/compiler/Dialect/Util/Transforms/Patterns.cpp
+++ b/iree/compiler/Dialect/Util/Transforms/Patterns.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilDialect.h"
 #include "iree/compiler/Dialect/Util/IR/UtilOps.h"
 #include "llvm/ADT/BitVector.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Dominance.h"
diff --git a/iree/compiler/Dialect/VM/Conversion/BUILD b/iree/compiler/Dialect/VM/Conversion/BUILD
index 6d49265..2a26156 100644
--- a/iree/compiler/Dialect/VM/Conversion/BUILD
+++ b/iree/compiler/Dialect/VM/Conversion/BUILD
@@ -30,9 +30,9 @@
         "//iree/compiler/Dialect/VM/IR",
         "//iree/compiler/Utils",
         "@llvm-project//llvm:Support",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Parser",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/VM/Conversion/CMakeLists.txt b/iree/compiler/Dialect/VM/Conversion/CMakeLists.txt
index 3cb1337..01c0b37 100644
--- a/iree/compiler/Dialect/VM/Conversion/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Conversion/CMakeLists.txt
@@ -26,9 +26,9 @@
     "TypeConverter.cpp"
   DEPS
     LLVMSupport
+    MLIRFunc
     MLIRIR
     MLIRParser
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::Util::IR
     iree::compiler::Dialect::VM::IR
diff --git a/iree/compiler/Dialect/VM/Conversion/ImportUtils.h b/iree/compiler/Dialect/VM/Conversion/ImportUtils.h
index 4235814..bf2e057 100644
--- a/iree/compiler/Dialect/VM/Conversion/ImportUtils.h
+++ b/iree/compiler/Dialect/VM/Conversion/ImportUtils.h
@@ -9,7 +9,7 @@
 
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Operation.h"
diff --git a/iree/compiler/Dialect/VM/Conversion/MathToVM/BUILD b/iree/compiler/Dialect/VM/Conversion/MathToVM/BUILD
index 62e8706..38ce8c2 100644
--- a/iree/compiler/Dialect/VM/Conversion/MathToVM/BUILD
+++ b/iree/compiler/Dialect/VM/Conversion/MathToVM/BUILD
@@ -22,10 +22,10 @@
         "//iree/compiler/Dialect/Util/IR",
         "//iree/compiler/Dialect/VM/Conversion",
         "//iree/compiler/Dialect/VM/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/VM/Conversion/MathToVM/CMakeLists.txt b/iree/compiler/Dialect/VM/Conversion/MathToVM/CMakeLists.txt
index a8bf122..78831d2 100644
--- a/iree/compiler/Dialect/VM/Conversion/MathToVM/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Conversion/MathToVM/CMakeLists.txt
@@ -18,10 +18,10 @@
   SRCS
     "ConvertMathToVM.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
     MLIRMath
     MLIRPass
-    MLIRStandard
     MLIRTransformUtils
     MLIRTransforms
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/VM/Conversion/MathToVM/ConvertMathToVM.cpp b/iree/compiler/Dialect/VM/Conversion/MathToVM/ConvertMathToVM.cpp
index 1c6fa4b..e7898b5 100644
--- a/iree/compiler/Dialect/VM/Conversion/MathToVM/ConvertMathToVM.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/MathToVM/ConvertMathToVM.cpp
@@ -10,8 +10,8 @@
 #include "iree/compiler/Dialect/VM/Conversion/TargetOptions.h"
 #include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/VM/Conversion/MemRefToVM/BUILD b/iree/compiler/Dialect/VM/Conversion/MemRefToVM/BUILD
index b6c86ca..d7db19d 100644
--- a/iree/compiler/Dialect/VM/Conversion/MemRefToVM/BUILD
+++ b/iree/compiler/Dialect/VM/Conversion/MemRefToVM/BUILD
@@ -25,10 +25,10 @@
         "@llvm-project//mlir:Affine",
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:BufferizationDialect",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/VM/Conversion/MemRefToVM/CMakeLists.txt b/iree/compiler/Dialect/VM/Conversion/MemRefToVM/CMakeLists.txt
index 4b66999..73b9923 100644
--- a/iree/compiler/Dialect/VM/Conversion/MemRefToVM/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Conversion/MemRefToVM/CMakeLists.txt
@@ -21,10 +21,10 @@
     MLIRAffine
     MLIRArithmetic
     MLIRBufferization
+    MLIRFunc
     MLIRIR
     MLIRMemRef
     MLIRPass
-    MLIRStandard
     MLIRTransformUtils
     MLIRTransforms
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/VM/Conversion/MemRefToVM/ConvertMemRefToVM.cpp b/iree/compiler/Dialect/VM/Conversion/MemRefToVM/ConvertMemRefToVM.cpp
index bf1dacf..9a89f2f 100644
--- a/iree/compiler/Dialect/VM/Conversion/MemRefToVM/ConvertMemRefToVM.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/MemRefToVM/ConvertMemRefToVM.cpp
@@ -13,8 +13,8 @@
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/VM/Conversion/StandardToVM/BUILD b/iree/compiler/Dialect/VM/Conversion/StandardToVM/BUILD
index 70ee04d..d0d1d6b 100644
--- a/iree/compiler/Dialect/VM/Conversion/StandardToVM/BUILD
+++ b/iree/compiler/Dialect/VM/Conversion/StandardToVM/BUILD
@@ -24,10 +24,10 @@
         "//iree/compiler/Dialect/VM/Conversion",
         "//iree/compiler/Dialect/VM/IR",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/VM/Conversion/StandardToVM/CMakeLists.txt b/iree/compiler/Dialect/VM/Conversion/StandardToVM/CMakeLists.txt
index 9504883..1344452 100644
--- a/iree/compiler/Dialect/VM/Conversion/StandardToVM/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Conversion/StandardToVM/CMakeLists.txt
@@ -20,10 +20,10 @@
     "ConvertStandardToVMTest.cpp"
   DEPS
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRMath
     MLIRPass
-    MLIRStandard
     MLIRTransformUtils
     MLIRTransforms
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVM.cpp b/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVM.cpp
index 9d116f4..8f07600 100644
--- a/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVM.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVM.cpp
@@ -12,8 +12,8 @@
 #include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
@@ -134,10 +134,10 @@
   }
 };
 
-class ReturnOpConversion : public OpConversionPattern<mlir::ReturnOp> {
+class ReturnOpConversion : public OpConversionPattern<mlir::func::ReturnOp> {
   using OpConversionPattern::OpConversionPattern;
   LogicalResult matchAndRewrite(
-      mlir::ReturnOp srcOp, OpAdaptor adaptor,
+      mlir::func::ReturnOp srcOp, OpAdaptor adaptor,
       ConversionPatternRewriter &rewriter) const override {
     rewriter.replaceOpWithNewOp<IREE::VM::ReturnOp>(srcOp,
                                                     adaptor.getOperands());
@@ -799,10 +799,10 @@
   }
 };
 
-class CallOpConversion : public OpConversionPattern<CallOp> {
+class CallOpConversion : public OpConversionPattern<func::CallOp> {
   using OpConversionPattern::OpConversionPattern;
   LogicalResult matchAndRewrite(
-      CallOp srcOp, OpAdaptor adaptor,
+      func::CallOp srcOp, OpAdaptor adaptor,
       ConversionPatternRewriter &rewriter) const override {
     // Convert function result types. The conversion framework will ensure
     // that the callee has been equivalently converted.
diff --git a/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVMTest.cpp b/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVMTest.cpp
index f0fe130..b3afbf2 100644
--- a/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVMTest.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVMTest.cpp
@@ -7,7 +7,7 @@
 #include "iree/compiler/Dialect/VM/Conversion/StandardToVM/ConvertStandardToVM.h"
 #include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/VM/IR/VMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
 
@@ -36,8 +36,8 @@
   void runOnOperation() override {
     ConversionTarget target(getContext());
     target.addLegalDialect<IREE::VM::VMDialect>();
-    target.addIllegalDialect<StandardOpsDialect,
-                             mlir::arith::ArithmeticDialect>();
+    target
+        .addIllegalDialect<func::FuncDialect, mlir::arith::ArithmeticDialect>();
 
     IREE::VM::TypeConverter typeConverter(
         IREE::VM::TargetOptions::FromFlags::get());
diff --git a/iree/compiler/Dialect/VM/Conversion/TypeConverter.cpp b/iree/compiler/Dialect/VM/Conversion/TypeConverter.cpp
index 5a00c9c..de49260 100644
--- a/iree/compiler/Dialect/VM/Conversion/TypeConverter.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/TypeConverter.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
 #include "llvm/Support/Debug.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinTypes.h"
 
 #define DEBUG_TYPE "iree-vm"
diff --git a/iree/compiler/Dialect/VM/Conversion/UtilToVM/BUILD b/iree/compiler/Dialect/VM/Conversion/UtilToVM/BUILD
index fc5a72b..05e29cc 100644
--- a/iree/compiler/Dialect/VM/Conversion/UtilToVM/BUILD
+++ b/iree/compiler/Dialect/VM/Conversion/UtilToVM/BUILD
@@ -26,9 +26,9 @@
         "//iree/compiler/Dialect/Util/IR",
         "//iree/compiler/Dialect/VM/Conversion",
         "//iree/compiler/Dialect/VM/IR",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
     ],
diff --git a/iree/compiler/Dialect/VM/Conversion/UtilToVM/CMakeLists.txt b/iree/compiler/Dialect/VM/Conversion/UtilToVM/CMakeLists.txt
index 963ac6b..a873a44 100644
--- a/iree/compiler/Dialect/VM/Conversion/UtilToVM/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Conversion/UtilToVM/CMakeLists.txt
@@ -22,9 +22,9 @@
     "ConvertStatusOps.cpp"
     "ConvertUtilToVM.cpp"
   DEPS
+    MLIRFunc
     MLIRIR
     MLIRPass
-    MLIRStandard
     MLIRTransformUtils
     MLIRTransforms
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertListOps.cpp b/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertListOps.cpp
index 6a2ff3e..928724a 100644
--- a/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertListOps.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertListOps.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertUtilToVM.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertUtilToVM.cpp b/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertUtilToVM.cpp
index 9bab556..83164bb 100644
--- a/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertUtilToVM.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/UtilToVM/ConvertUtilToVM.cpp
@@ -10,7 +10,7 @@
 #include "iree/compiler/Dialect/Util/IR/UtilTypes.h"
 #include "iree/compiler/Dialect/VM/Conversion/TypeConverter.h"
 #include "iree/compiler/Dialect/VM/IR/VMOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/Dialect/VM/Conversion/VMToEmitC/BUILD b/iree/compiler/Dialect/VM/Conversion/VMToEmitC/BUILD
index c25e411..35d8e6a 100644
--- a/iree/compiler/Dialect/VM/Conversion/VMToEmitC/BUILD
+++ b/iree/compiler/Dialect/VM/Conversion/VMToEmitC/BUILD
@@ -42,10 +42,10 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ControlFlowOps",
         "@llvm-project//mlir:EmitC",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/Dialect/VM/Conversion/VMToEmitC/CMakeLists.txt b/iree/compiler/Dialect/VM/Conversion/VMToEmitC/CMakeLists.txt
index e603168..ddc508f 100644
--- a/iree/compiler/Dialect/VM/Conversion/VMToEmitC/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Conversion/VMToEmitC/CMakeLists.txt
@@ -30,10 +30,10 @@
     LLVMSupport
     MLIRControlFlow
     MLIREmitC
+    MLIRFunc
     MLIRIR
     MLIRMath
     MLIRPass
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::Util::Conversion
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp b/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp
index 5e7664f..f3cc426 100644
--- a/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp
+++ b/iree/compiler/Dialect/VM/Conversion/VMToEmitC/ConvertVMToEmitC.cpp
@@ -15,8 +15,8 @@
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
 #include "mlir/Dialect/EmitC/IR/EmitC.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinDialect.h"
@@ -571,7 +571,7 @@
 
     releaseRefs(builder, location, funcOp, typeConverter);
 
-    builder.create<mlir::ReturnOp>(location, callOp.getResult(0));
+    builder.create<mlir::func::ReturnOp>(location, callOp.getResult(0));
   };
 
   auto ctx = builder.getContext();
@@ -603,7 +603,7 @@
         /*templateArgs=*/ArrayAttr{},
         /*operands=*/ArrayRef<Value>{});
 
-    builder.create<mlir::ReturnOp>(location, statusOp.getResult(0));
+    builder.create<mlir::func::ReturnOp>(location, statusOp.getResult(0));
   };
 
   return failableCall(builder, location, type, callee, args, templateArgs,
@@ -614,14 +614,14 @@
 /// continuation and failure block based on the truthiness of the result
 /// value, i.e. a truthy value branches to the continuation block when
 /// `negateCondition` is false.
-mlir::CallOp failableCall(
+mlir::func::CallOp failableCall(
     OpBuilder &builder, Location location, mlir::FuncOp &callee,
     ArrayRef<Value> operands,
-    const std::function<void(mlir::CallOp &)> &failureBlockBuilder,
+    const std::function<void(mlir::func::CallOp &)> &failureBlockBuilder,
     bool negateCondition = false) {
   auto ctx = builder.getContext();
 
-  auto callOp = builder.create<mlir::CallOp>(
+  auto callOp = builder.create<mlir::func::CallOp>(
       /*location=*/location,
       /*callee=*/callee,
       /*operands=*/operands);
@@ -664,17 +664,17 @@
   return callOp;
 }
 
-mlir::CallOp returnIfError(OpBuilder &builder, Location location,
-                           mlir::FuncOp &callee, ArrayRef<Value> operands,
-                           IREE::VM::EmitCTypeConverter &typeConverter) {
+mlir::func::CallOp returnIfError(OpBuilder &builder, Location location,
+                                 mlir::FuncOp &callee, ArrayRef<Value> operands,
+                                 IREE::VM::EmitCTypeConverter &typeConverter) {
   auto blockBuilder = [&builder, &location,
-                       &typeConverter](mlir::CallOp &callOp) {
+                       &typeConverter](mlir::func::CallOp &callOp) {
     Block *block = builder.getBlock();
     mlir::FuncOp funcOp = cast<mlir::FuncOp>(block->getParentOp());
 
     releaseRefs(builder, location, funcOp, typeConverter);
 
-    builder.create<mlir::ReturnOp>(location, callOp.getResult(0));
+    builder.create<mlir::func::ReturnOp>(location, callOp.getResult(0));
   };
 
   return failableCall(builder, location, callee, operands, blockBuilder,
@@ -745,7 +745,7 @@
         /*operands=*/
         ArrayRef<Value>{allocatorOp.getResult(0), castedModuleOp.getResult(0)});
 
-    builder.create<mlir::ReturnOp>(loc);
+    builder.create<mlir::func::ReturnOp>(loc);
   }
 
   // alloc_state
@@ -998,7 +998,7 @@
         /*templateArgs=*/ArrayAttr{},
         /*operands=*/ArrayRef<Value>{});
 
-    builder.create<mlir::ReturnOp>(loc, status.getResult(0));
+    builder.create<mlir::func::ReturnOp>(loc, status.getResult(0));
   }
 
   // free_state
@@ -1104,7 +1104,7 @@
         /*operands=*/
         ArrayRef<Value>{allocatorOp.getResult(0), stateOp.getResult(0)});
 
-    builder.create<mlir::ReturnOp>(loc);
+    builder.create<mlir::func::ReturnOp>(loc);
   }
 
   // resolve_import
@@ -1193,7 +1193,7 @@
         /*templateArgs=*/ArrayAttr{},
         /*operands=*/ArrayRef<Value>{});
 
-    builder.create<mlir::ReturnOp>(loc, status.getResult(0));
+    builder.create<mlir::func::ReturnOp>(loc, status.getResult(0));
   }
 
   // create
@@ -1349,7 +1349,8 @@
           /*operands=*/
           ArrayRef<Value>{funcOp.getArgument(0), module.getResult()});
 
-      builder.create<mlir::ReturnOp>(loc, vmInitializeStatus.getResult(0));
+      builder.create<mlir::func::ReturnOp>(loc,
+                                           vmInitializeStatus.getResult(0));
     }
 
     builder.setInsertionPointToEnd(condBlock);
@@ -1391,7 +1392,7 @@
         ArrayRef<Value>{vmModulePtr.getResult(), funcOp.getArgument(0),
                         funcOp.getArgument(1)});
 
-    builder.create<mlir::ReturnOp>(loc, status.getResult(0));
+    builder.create<mlir::func::ReturnOp>(loc, status.getResult(0));
   }
 
   return success();
@@ -1646,7 +1647,7 @@
           /*templateArgs=*/ArrayAttr{},
           /*operands=*/ArrayRef<Value>{});
 
-      rewriter.create<mlir::ReturnOp>(loc, status.getResult(0));
+      rewriter.create<mlir::func::ReturnOp>(loc, status.getResult(0));
     }
 
     exportOp.function_refAttr(FlatSymbolRefAttr::get(newFuncOp.getOperation()));
@@ -2165,7 +2166,7 @@
           /*templateArgs=*/ArrayAttr{},
           /*operands=*/ArrayRef<Value>{});
 
-      rewriter.create<mlir::ReturnOp>(loc, status.getResult(0));
+      rewriter.create<mlir::func::ReturnOp>(loc, status.getResult(0));
     }
 
     return success();
@@ -3730,7 +3731,7 @@
         /*templateArgs=*/ArrayAttr{},
         /*operands=*/ArrayRef<Value>{});
 
-    rewriter.replaceOpWithNewOp<mlir::ReturnOp>(op, status.getResult(0));
+    rewriter.replaceOpWithNewOp<mlir::func::ReturnOp>(op, status.getResult(0));
 
     return success();
   }
@@ -3768,7 +3769,7 @@
           /*templateArgs=*/ArrayAttr{},
           /*operands=*/ArrayRef<Value>{});
 
-      rewriter.create<mlir::ReturnOp>(loc, status.getResult(0));
+      rewriter.create<mlir::func::ReturnOp>(loc, status.getResult(0));
     }
     Block *failureBlock;
     {
@@ -3842,7 +3843,7 @@
           ArrayRef<Value>{messageSizeIntOp.getResult(0),
                           messageDataOp.getResult(0)});
 
-      rewriter.create<mlir::ReturnOp>(loc, status.getResult(0));
+      rewriter.create<mlir::func::ReturnOp>(loc, status.getResult(0));
     }
 
     Type boolType = rewriter.getIntegerType(1);
@@ -5042,7 +5043,7 @@
                          OperationPass<IREE::VM::ModuleOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<mlir::emitc::EmitCDialect, mlir::BuiltinDialect,
-                    mlir::StandardOpsDialect, mlir::arith::ArithmeticDialect,
+                    mlir::func::FuncDialect, mlir::arith::ArithmeticDialect,
                     mlir::math::MathDialect, IREE::Util::UtilDialect>();
   }
 
@@ -5092,7 +5093,7 @@
 
     target.addLegalDialect<
         emitc::EmitCDialect, mlir::BuiltinDialect, mlir::cf::ControlFlowDialect,
-        mlir::StandardOpsDialect, mlir::arith::ArithmeticDialect,
+        mlir::func::FuncDialect, mlir::arith::ArithmeticDialect,
         mlir::math::MathDialect>();
 
     target.addDynamicallyLegalOp<mlir::FuncOp>([&](mlir::FuncOp op) {
diff --git a/iree/compiler/Dialect/VM/IR/BUILD b/iree/compiler/Dialect/VM/IR/BUILD
index 2a3b380..15749b4 100644
--- a/iree/compiler/Dialect/VM/IR/BUILD
+++ b/iree/compiler/Dialect/VM/IR/BUILD
@@ -72,10 +72,10 @@
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ControlFlowInterfaces",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:SideEffects",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
     ],
diff --git a/iree/compiler/Dialect/VM/IR/CMakeLists.txt b/iree/compiler/Dialect/VM/IR/CMakeLists.txt
index f89f2c2..0bde18f 100644
--- a/iree/compiler/Dialect/VM/IR/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/IR/CMakeLists.txt
@@ -41,10 +41,10 @@
     ::VMStructsGen
     LLVMSupport
     MLIRControlFlowInterfaces
+    MLIRFunc
     MLIRIR
     MLIRParser
     MLIRSideEffectInterfaces
-    MLIRStandard
     MLIRSupport
     MLIRTransformUtils
     iree::compiler::Dialect::Util::IR
diff --git a/iree/compiler/Dialect/VM/Target/C/BUILD b/iree/compiler/Dialect/VM/Target/C/BUILD
index bd6b2be..c3963b0 100644
--- a/iree/compiler/Dialect/VM/Target/C/BUILD
+++ b/iree/compiler/Dialect/VM/Target/C/BUILD
@@ -32,9 +32,9 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ControlFlowOps",
         "@llvm-project//mlir:EmitC",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
     ],
 )
diff --git a/iree/compiler/Dialect/VM/Target/C/CMakeLists.txt b/iree/compiler/Dialect/VM/Target/C/CMakeLists.txt
index 682d2a6..9724bf1 100644
--- a/iree/compiler/Dialect/VM/Target/C/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Target/C/CMakeLists.txt
@@ -25,9 +25,9 @@
     LLVMSupport
     MLIRControlFlow
     MLIREmitC
+    MLIRFunc
     MLIRIR
     MLIRSCF
-    MLIRStandard
     MLIRSupport
   PUBLIC
 )
diff --git a/iree/compiler/Dialect/VM/Target/C/TranslateToCpp.cpp b/iree/compiler/Dialect/VM/Target/C/TranslateToCpp.cpp
index c64409b..a00d12b 100644
--- a/iree/compiler/Dialect/VM/Target/C/TranslateToCpp.cpp
+++ b/iree/compiler/Dialect/VM/Target/C/TranslateToCpp.cpp
@@ -12,7 +12,7 @@
 #include "mlir/Dialect/EmitC/IR/EmitC.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Dialect.h"
@@ -80,7 +80,7 @@
 }
 
 static LogicalResult printOperation(CppEmitter &emitter,
-                                    mlir::ConstantOp constantOp) {
+                                    mlir::func::ConstantOp constantOp) {
   Operation *operation = constantOp.getOperation();
   Attribute value = constantOp.getValueAttr();
 
@@ -150,7 +150,7 @@
   return success();
 }
 
-static LogicalResult printOperation(CppEmitter &emitter, mlir::CallOp callOp) {
+static LogicalResult printOperation(CppEmitter &emitter, mlir::func::CallOp callOp) {
   if (failed(emitter.emitAssignPrefix(*callOp.getOperation())))
     return failure();
 
@@ -384,7 +384,7 @@
   return success();
 }
 
-static LogicalResult printOperation(CppEmitter &emitter, ReturnOp returnOp) {
+static LogicalResult printOperation(CppEmitter &emitter, func::ReturnOp returnOp) {
   raw_ostream &os = emitter.ostream();
   os << "return";
   switch (returnOp.getNumOperands()) {
@@ -753,8 +753,8 @@
           .Case<scf::ForOp, scf::IfOp, scf::YieldOp>(
               [&](auto op) { return printOperation(*this, op); })
           // Standard ops.
-          .Case<cf::BranchOp, mlir::CallOp, cf::CondBranchOp, mlir::ConstantOp,
-                FuncOp, ModuleOp, ReturnOp>(
+          .Case<cf::BranchOp, mlir::func::CallOp, cf::CondBranchOp, mlir::func::ConstantOp,
+                FuncOp, ModuleOp, func::ReturnOp>(
               [&](auto op) { return printOperation(*this, op); })
           .Default([&](Operation *) {
             return op.emitOpError("unable to find printer for op");
diff --git a/iree/compiler/Dialect/VM/Transforms/BUILD b/iree/compiler/Dialect/VM/Transforms/BUILD
index 405645a..9647602 100644
--- a/iree/compiler/Dialect/VM/Transforms/BUILD
+++ b/iree/compiler/Dialect/VM/Transforms/BUILD
@@ -38,6 +38,7 @@
         "@llvm-project//mlir:AffineToStandardTransforms",
         "@llvm-project//mlir:AffineTransforms",
         "@llvm-project//mlir:AffineUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:MemRefDialect",
diff --git a/iree/compiler/Dialect/VM/Transforms/CMakeLists.txt b/iree/compiler/Dialect/VM/Transforms/CMakeLists.txt
index a5de8a5..c17f567 100644
--- a/iree/compiler/Dialect/VM/Transforms/CMakeLists.txt
+++ b/iree/compiler/Dialect/VM/Transforms/CMakeLists.txt
@@ -29,6 +29,7 @@
     MLIRAffineToStandard
     MLIRAffineTransforms
     MLIRAffineUtils
+    MLIRFunc
     MLIRIR
     MLIRMath
     MLIRMemRef
diff --git a/iree/compiler/Dialect/VM/Transforms/Conversion.cpp b/iree/compiler/Dialect/VM/Transforms/Conversion.cpp
index 6a51411..52f7834 100644
--- a/iree/compiler/Dialect/VM/Transforms/Conversion.cpp
+++ b/iree/compiler/Dialect/VM/Transforms/Conversion.cpp
@@ -70,7 +70,7 @@
 
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<IREE::Util::UtilDialect, IREE::VM::VMDialect,
-                    StandardOpsDialect, mlir::arith::ArithmeticDialect,
+                    func::FuncDialect, mlir::arith::ArithmeticDialect,
                     math::MathDialect, AffineDialect, memref::MemRefDialect>();
   }
 
@@ -126,8 +126,8 @@
                                conversionPatterns);
     populateAffineToStdConversionPatterns(conversionPatterns);
 
-    conversionTarget.addIllegalDialect<StandardOpsDialect,
-                                       mlir::arith::ArithmeticDialect>();
+    conversionTarget
+        .addIllegalDialect<func::FuncDialect, mlir::arith::ArithmeticDialect>();
     conversionTarget.addIllegalDialect<AffineDialect>();
     conversionTarget.addIllegalDialect<math::MathDialect>();
 
diff --git a/iree/compiler/InputConversion/Common/BUILD b/iree/compiler/InputConversion/Common/BUILD
index b935bda..23f8b17 100644
--- a/iree/compiler/InputConversion/Common/BUILD
+++ b/iree/compiler/InputConversion/Common/BUILD
@@ -60,6 +60,7 @@
         "//iree/compiler/Dialect/Util/IR",
         "//llvm-external-projects/iree-dialects:IREEInputDialect",
         "@llvm-project//mlir:ArithmeticDialect",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:LinalgTransforms",
@@ -67,7 +68,6 @@
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
         "@llvm-project//mlir:SCFToControlFlow",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Transforms",
     ],
 )
diff --git a/iree/compiler/InputConversion/Common/CMakeLists.txt b/iree/compiler/InputConversion/Common/CMakeLists.txt
index eb60c59..4e19ebd 100644
--- a/iree/compiler/InputConversion/Common/CMakeLists.txt
+++ b/iree/compiler/InputConversion/Common/CMakeLists.txt
@@ -48,6 +48,7 @@
     ::PassesIncGen
     IREEInputDialect
     MLIRArithmetic
+    MLIRFunc
     MLIRIR
     MLIRLinalg
     MLIRLinalgTransforms
@@ -55,7 +56,6 @@
     MLIRPass
     MLIRSCF
     MLIRSCFToControlFlow
-    MLIRStandard
     MLIRTransforms
     iree::compiler::Dialect::Flow::IR
     iree::compiler::Dialect::HAL::IR
diff --git a/iree/compiler/InputConversion/Common/IREEImportPublic.cpp b/iree/compiler/InputConversion/Common/IREEImportPublic.cpp
index e6a8ae2..aac6181 100644
--- a/iree/compiler/InputConversion/Common/IREEImportPublic.cpp
+++ b/iree/compiler/InputConversion/Common/IREEImportPublic.cpp
@@ -18,8 +18,8 @@
 #include "iree/compiler/InputConversion/Common/PassDetail.h"
 #include "iree/compiler/InputConversion/Common/Passes.h"
 #include "mlir/Conversion/SCFToControlFlow/SCFToControlFlow.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinDialect.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/Pass.h"
@@ -44,7 +44,7 @@
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<IREE::Input::IREEInputDialect, IREE::Flow::FlowDialect,
                     IREE::HAL::HALDialect, IREE::Util::UtilDialect,
-                    mlir::StandardOpsDialect, mlir::arith::ArithmeticDialect>();
+                    mlir::func::FuncDialect, mlir::arith::ArithmeticDialect>();
   }
   void runOnOperation() override;
 };
@@ -213,7 +213,7 @@
           rewriter.create<IREE::Util::InitializerOp>(srcOp.getLoc());
       auto ip = rewriter.saveInsertionPoint();
       rewriter.setInsertionPointToStart(initializerOp.addEntryBlock());
-      auto callOp = rewriter.create<mlir::CallOp>(
+      auto callOp = rewriter.create<mlir::func::CallOp>(
           srcOp.getLoc(), srcOp.initializerAttr(), TypeRange{newType});
       rewriter.create<IREE::Util::GlobalStoreOp>(
           srcOp.getLoc(), callOp.getResult(0), srcOp.getName());
diff --git a/iree/compiler/InputConversion/MHLO/BUILD b/iree/compiler/InputConversion/MHLO/BUILD
index 9ffa4f1..00b5217 100644
--- a/iree/compiler/InputConversion/MHLO/BUILD
+++ b/iree/compiler/InputConversion/MHLO/BUILD
@@ -75,6 +75,7 @@
         "@llvm-project//mlir:ComplexDialect",
         "@llvm-project//mlir:ControlFlowOps",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:LinalgTransforms",
@@ -87,7 +88,6 @@
         "@llvm-project//mlir:Shape",
         "@llvm-project//mlir:ShapeToStandard",
         "@llvm-project//mlir:ShapeTransforms",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
diff --git a/iree/compiler/InputConversion/MHLO/BroadcastingToLinalgPatterns.cpp b/iree/compiler/InputConversion/MHLO/BroadcastingToLinalgPatterns.cpp
index d51abd8..c3ebdbb 100644
--- a/iree/compiler/InputConversion/MHLO/BroadcastingToLinalgPatterns.cpp
+++ b/iree/compiler/InputConversion/MHLO/BroadcastingToLinalgPatterns.cpp
@@ -15,9 +15,9 @@
 #include "mlir-hlo/Dialect/mhlo/transforms/rewriters.h"
 #include "mlir-hlo/utils/broadcast_utils.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 
 namespace mlir {
diff --git a/iree/compiler/InputConversion/MHLO/CMakeLists.txt b/iree/compiler/InputConversion/MHLO/CMakeLists.txt
index 3fda299..ccd8640 100644
--- a/iree/compiler/InputConversion/MHLO/CMakeLists.txt
+++ b/iree/compiler/InputConversion/MHLO/CMakeLists.txt
@@ -64,6 +64,7 @@
     MLIRAffineUtils
     MLIRComplex
     MLIRControlFlow
+    MLIRFunc
     MLIRIR
     MLIRLinalg
     MLIRLinalgTransforms
@@ -77,7 +78,6 @@
     MLIRShape
     MLIRShapeOpsTransforms
     MLIRShapeToStandard
-    MLIRStandard
     MLIRSupport
     MLIRTensor
     MLIRTransforms
diff --git a/iree/compiler/InputConversion/MHLO/ConvertComplexToReal.cpp b/iree/compiler/InputConversion/MHLO/ConvertComplexToReal.cpp
index 8c7c7cd..98706ad 100644
--- a/iree/compiler/InputConversion/MHLO/ConvertComplexToReal.cpp
+++ b/iree/compiler/InputConversion/MHLO/ConvertComplexToReal.cpp
@@ -9,7 +9,7 @@
 #include "iree/compiler/InputConversion/MHLO/Rewriters.h"
 #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h"
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 namespace mlir {
@@ -389,8 +389,7 @@
 
     target.addLegalDialect<mhlo::MhloDialect>();
     target.addLegalDialect<chlo::HloClientDialect>();
-    target
-        .addLegalDialect<StandardOpsDialect, mlir::arith::ArithmeticDialect>();
+    target.addLegalDialect<func::FuncDialect, mlir::arith::ArithmeticDialect>();
 
     // For the test, require that casts fully convert.
     target.addIllegalOp<mhlo::ComplexOp>();
diff --git a/iree/compiler/InputConversion/MHLO/ConvertMHLOToFlow.cpp b/iree/compiler/InputConversion/MHLO/ConvertMHLOToFlow.cpp
index 1d7995f..6da3583 100644
--- a/iree/compiler/InputConversion/MHLO/ConvertMHLOToFlow.cpp
+++ b/iree/compiler/InputConversion/MHLO/ConvertMHLOToFlow.cpp
@@ -11,7 +11,7 @@
 #include "iree/compiler/Dialect/Flow/IR/FlowDialect.h"
 #include "iree/compiler/Dialect/Flow/IR/FlowOps.h"
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/BuiltinTypes.h"
diff --git a/iree/compiler/InputConversion/MHLO/FlattenTuplesInCFG.cpp b/iree/compiler/InputConversion/MHLO/FlattenTuplesInCFG.cpp
index 139a4b0..23eabe9 100644
--- a/iree/compiler/InputConversion/MHLO/FlattenTuplesInCFG.cpp
+++ b/iree/compiler/InputConversion/MHLO/FlattenTuplesInCFG.cpp
@@ -12,6 +12,7 @@
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
 #include "mlir/Dialect/Affine/Utils.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -117,7 +118,7 @@
   return false;
 }
 
-bool convertReturnOp(mlir::ReturnOp *op, OpBuilder &builder,
+bool convertReturnOp(mlir::func::ReturnOp *op, OpBuilder &builder,
                      BlockAndValueMapping *mapping) {
   llvm::SmallVector<Value, 10> newOperands;
   if (untupleAndLookupValues(op->getOperands(), &newOperands, builder,
@@ -125,11 +126,11 @@
     return true;
   }
 
-  builder.create<mlir::ReturnOp>(op->getLoc(), newOperands);
+  builder.create<mlir::func::ReturnOp>(op->getLoc(), newOperands);
   return false;
 }
 
-bool convertCallOp(CallOp *oldOp, OpBuilder &builder,
+bool convertCallOp(func::CallOp *oldOp, OpBuilder &builder,
                    BlockAndValueMapping *mapping) {
   llvm::SmallVector<Value, 4> newArgs;
   if (untupleAndLookupValues(oldOp->getOperands(), &newArgs, builder,
@@ -139,8 +140,8 @@
 
   SmallVector<Type, 4> resultTypes;
   untupleTypes(oldOp->getOperation()->getResultTypes(), &resultTypes);
-  auto newOp = builder.create<CallOp>(oldOp->getLoc(), oldOp->getCallee(),
-                                      resultTypes, newArgs);
+  auto newOp = builder.create<func::CallOp>(oldOp->getLoc(), oldOp->getCallee(),
+                                            resultTypes, newArgs);
   copyOperationAttrs(oldOp->getOperation(), newOp.getOperation());
 
   auto newResults = newOp.getResults();
@@ -154,7 +155,7 @@
   return false;
 }
 
-bool convertIndirectCallOp(CallIndirectOp *oldOp, OpBuilder &builder,
+bool convertIndirectCallOp(func::CallIndirectOp *oldOp, OpBuilder &builder,
                            BlockAndValueMapping *mapping) {
   llvm::SmallVector<Value, 4> newArgs;
   if (untupleAndLookupValues(oldOp->getOperands(), &newArgs, builder,
@@ -162,8 +163,8 @@
     return true;
   }
 
-  auto newOp = builder.create<CallIndirectOp>(oldOp->getLoc(),
-                                              oldOp->getCallee(), newArgs);
+  auto newOp = builder.create<func::CallIndirectOp>(
+      oldOp->getLoc(), oldOp->getCallee(), newArgs);
   copyOperationAttrs(oldOp->getOperation(), newOp.getOperation());
 
   for (int i = 0; i < newOp.getNumResults(); ++i) {
@@ -217,11 +218,11 @@
 
 bool convertOperation(Operation *op, OpBuilder &builder,
                       BlockAndValueMapping *mapping) {
-  if (auto returnOp = dyn_cast<mlir::ReturnOp>(op)) {
+  if (auto returnOp = dyn_cast<mlir::func::ReturnOp>(op)) {
     return convertReturnOp(&returnOp, builder, mapping);
-  } else if (auto callOp = dyn_cast<CallOp>(op)) {
+  } else if (auto callOp = dyn_cast<func::CallOp>(op)) {
     return convertCallOp(&callOp, builder, mapping);
-  } else if (auto callIndirectOp = dyn_cast<CallIndirectOp>(op)) {
+  } else if (auto callIndirectOp = dyn_cast<func::CallIndirectOp>(op)) {
     return convertIndirectCallOp(&callIndirectOp, builder, mapping);
   } else if (auto branchOp = dyn_cast<cf::BranchOp>(op)) {
     return convertBranchOp(&branchOp, builder, mapping);
diff --git a/iree/compiler/InputConversion/MHLO/LegalizeInputTypes.cpp b/iree/compiler/InputConversion/MHLO/LegalizeInputTypes.cpp
index 891c063..40217da 100644
--- a/iree/compiler/InputConversion/MHLO/LegalizeInputTypes.cpp
+++ b/iree/compiler/InputConversion/MHLO/LegalizeInputTypes.cpp
@@ -10,8 +10,8 @@
 #include "iree/compiler/InputConversion/MHLO/Passes.h"
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
 #include "mlir/Dialect/Affine/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
diff --git a/iree/compiler/InputConversion/MHLO/MHLOToLinalgOnTensors.cpp b/iree/compiler/InputConversion/MHLO/MHLOToLinalgOnTensors.cpp
index 4266848..08b9833 100644
--- a/iree/compiler/InputConversion/MHLO/MHLOToLinalgOnTensors.cpp
+++ b/iree/compiler/InputConversion/MHLO/MHLOToLinalgOnTensors.cpp
@@ -24,10 +24,10 @@
 #include "mlir-hlo/Dialect/mhlo/transforms/rewriters.h"
 #include "mlir/Dialect/Complex/IR/Complex.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
@@ -322,9 +322,9 @@
 
     // Structural patterns (functions, cfg, terminators).
     patterns.insert<BuiltinFuncOpPattern>(*typeConverter, context);
-    patterns.insert<GenericTypeConvert>(ReturnOp::getOperationName(),
+    patterns.insert<GenericTypeConvert>(func::ReturnOp::getOperationName(),
                                         *typeConverter, context);
-    patterns.insert<GenericTypeConvert>(CallOp::getOperationName(),
+    patterns.insert<GenericTypeConvert>(func::CallOp::getOperationName(),
                                         *typeConverter, context);
     patterns.insert<GenericTypeConvert>(cf::CondBranchOp::getOperationName(),
                                         *typeConverter, context);
diff --git a/iree/compiler/InputConversion/MHLO/MHLOToMHLOPreprocessing.cpp b/iree/compiler/InputConversion/MHLO/MHLOToMHLOPreprocessing.cpp
index 9c2a5df..571ea7f 100644
--- a/iree/compiler/InputConversion/MHLO/MHLOToMHLOPreprocessing.cpp
+++ b/iree/compiler/InputConversion/MHLO/MHLOToMHLOPreprocessing.cpp
@@ -14,9 +14,9 @@
 #include "mlir-hlo/Dialect/mhlo/IR/chlo_ops.h"
 #include "mlir-hlo/Dialect/mhlo/IR/hlo_ops.h"
 #include "mlir-hlo/Dialect/mhlo/transforms/rewriters.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BuiltinTypes.h"
@@ -922,7 +922,7 @@
     // chlo::PopulateLegalizeChloToHloPatterns(context, &conversionPatterns);
     conversionTarget.addLegalDialect<
         shape::ShapeDialect, chlo::HloClientDialect, mhlo::MhloDialect,
-        math::MathDialect, mlir::StandardOpsDialect,
+        math::MathDialect, mlir::func::FuncDialect,
         mlir::arith::ArithmeticDialect, mlir::tensor::TensorDialect>();
     // conversionTarget.addIllegalDialect<chlo::HloClientDialect>();
     if (failed(applyPartialConversion(getOperation(), conversionTarget,
diff --git a/iree/compiler/Utils/BUILD b/iree/compiler/Utils/BUILD
index 78a9829..89311cb 100644
--- a/iree/compiler/Utils/BUILD
+++ b/iree/compiler/Utils/BUILD
@@ -46,10 +46,10 @@
         "//iree/compiler/Dialect/Util/IR",
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ArithmeticDialect",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
diff --git a/iree/compiler/Utils/CMakeLists.txt b/iree/compiler/Utils/CMakeLists.txt
index eb73468..ff41241 100644
--- a/iree/compiler/Utils/CMakeLists.txt
+++ b/iree/compiler/Utils/CMakeLists.txt
@@ -38,10 +38,10 @@
   DEPS
     LLVMSupport
     MLIRArithmetic
+    MLIRFunc
     MLIRIR
     MLIRParser
     MLIRPass
-    MLIRStandard
     MLIRSupport
     MLIRTransformUtils
     MLIRTransforms
diff --git a/iree/compiler/Utils/ModuleUtils.h b/iree/compiler/Utils/ModuleUtils.h
index 4450c37..fbb97be 100644
--- a/iree/compiler/Utils/ModuleUtils.h
+++ b/iree/compiler/Utils/ModuleUtils.h
@@ -7,7 +7,7 @@
 #ifndef IREE_COMPILER_UTILS_MODULEUTILS_H_
 #define IREE_COMPILER_UTILS_MODULEUTILS_H_
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/Operation.h"
 #include "mlir/IR/SymbolTable.h"
diff --git a/iree/tools/BUILD b/iree/tools/BUILD
index 30f9096..01da9a3 100644
--- a/iree/tools/BUILD
+++ b/iree/tools/BUILD
@@ -144,6 +144,7 @@
         "@llvm-project//mlir:ControlFlowOps",
         "@llvm-project//mlir:ConversionPasses",
         "@llvm-project//mlir:EmitC",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:GPUDialect",
         "@llvm-project//mlir:GPUToSPIRV",
         "@llvm-project//mlir:GPUTransforms",
@@ -163,7 +164,6 @@
         "@llvm-project//mlir:SPIRVDialect",
         "@llvm-project//mlir:SPIRVTransforms",
         "@llvm-project//mlir:Shape",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:StandardToSPIRV",
         "@llvm-project//mlir:TensorInferTypeOpInterfaceImpl",
         "@llvm-project//mlir:Transforms",
diff --git a/iree/tools/CMakeLists.txt b/iree/tools/CMakeLists.txt
index 6e8defb..63b778c 100644
--- a/iree/tools/CMakeLists.txt
+++ b/iree/tools/CMakeLists.txt
@@ -287,7 +287,7 @@
       MLIRSPIRV
       MLIRSPIRVTransforms
       MLIRShape
-      MLIRStandard
+      MLIRFunc
       MLIRStandardToSPIRV
       MLIRTensorInferTypeOpInterfaceImpl
       MLIRTosa
diff --git a/iree/tools/init_mlir_dialects.h b/iree/tools/init_mlir_dialects.h
index eab52c8..198f98c 100644
--- a/iree/tools/init_mlir_dialects.h
+++ b/iree/tools/init_mlir_dialects.h
@@ -16,6 +16,7 @@
 #include "mlir/Dialect/ArmNeon/ArmNeonDialect.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
@@ -25,7 +26,6 @@
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tensor/IR/TensorInferTypeOpInterfaceImpl.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
@@ -53,7 +53,7 @@
                   quant::QuantizationDialect,
                   spirv::SPIRVDialect,
                   arm_neon::ArmNeonDialect,
-                  StandardOpsDialect,
+                  func::FuncDialect,
                   mlir::arith::ArithmeticDialect,
                   vector::VectorDialect,
                   tensor::TensorDialect,
diff --git a/llvm-external-projects/iree-compiler-api/python/CMakeLists.txt b/llvm-external-projects/iree-compiler-api/python/CMakeLists.txt
index c2f00d0..2571ecf 100644
--- a/llvm-external-projects/iree-compiler-api/python/CMakeLists.txt
+++ b/llvm-external-projects/iree-compiler-api/python/CMakeLists.txt
@@ -62,11 +62,11 @@
   MLIRPythonSources.Dialects.arith
   MLIRPythonSources.Dialects.builtin
   MLIRPythonSources.Dialects.cf
+  MLIRPythonSources.Dialects.func
   MLIRPythonSources.Dialects.linalg
   MLIRPythonSources.Dialects.math
   MLIRPythonSources.Dialects.memref
   MLIRPythonSources.Dialects.shape
-  MLIRPythonSources.Dialects.std
   MLIRPythonSources.Dialects.tensor
   MLIRPythonSources.Dialects.tosa
   MLIRPythonSources.Dialects.vector
diff --git a/llvm-external-projects/iree-dialects/BUILD b/llvm-external-projects/iree-dialects/BUILD
index 957be8d..7f99cb5 100644
--- a/llvm-external-projects/iree-dialects/BUILD
+++ b/llvm-external-projects/iree-dialects/BUILD
@@ -270,6 +270,7 @@
         "@llvm-project//mlir:ArithmeticUtils",
         "@llvm-project//mlir:ControlFlowInterfaces",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MathDialect",
@@ -277,7 +278,6 @@
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
         "@llvm-project//mlir:SideEffectInterfaces",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TensorUtils",
@@ -301,6 +301,7 @@
         "@llvm-project//mlir:Affine",
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:DialectUtils",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:LinalgTransforms",
@@ -309,7 +310,6 @@
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:Pass",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:TensorUtils",
@@ -480,11 +480,11 @@
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ControlFlowInterfaces",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:MathDialect",
         "@llvm-project//mlir:Parser",
         "@llvm-project//mlir:Pass",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TransformUtils",
         "@llvm-project//mlir:Transforms",
@@ -529,12 +529,12 @@
         "@llvm-project//llvm:Support",
         "@llvm-project//mlir:ArithmeticDialect",
         "@llvm-project//mlir:ControlFlowOps",
+        "@llvm-project//mlir:FuncDialect",
         "@llvm-project//mlir:IR",
         "@llvm-project//mlir:LinalgOps",
         "@llvm-project//mlir:MemRefDialect",
         "@llvm-project//mlir:MlirOptLib",
         "@llvm-project//mlir:SCFDialect",
-        "@llvm-project//mlir:StandardOps",
         "@llvm-project//mlir:Support",
         "@llvm-project//mlir:TensorDialect",
         "@llvm-project//mlir:Transforms",
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
index d22db18..2fbe942 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/CMakeLists.txt
@@ -22,7 +22,7 @@
   MLIRSideEffectInterfaces
   MLIRSupport
   MLIRSCF
-  MLIRStandard
+  MLIRFunc
   MLIRTensor
   MLIRViewLikeInterface
 )
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 a895a0f..b692d30 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
@@ -14,11 +14,11 @@
 #include "llvm/Support/SMLoc.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/Utils/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Utils/StructuredOpsUtils.h"
 #include "mlir/IR/Attributes.h"
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp
index 439e2f2..06bc712 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/IR/TiledOpInterface.cpp
@@ -9,8 +9,8 @@
 #include "llvm/ADT/SmallBitVector.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
index 26c64bf..0cd7fd0 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/CMakeLists.txt
@@ -18,7 +18,7 @@
   MLIRMemRef
   MLIRPass
   MLIRSCF
-  MLIRStandard
+  MLIRFunc
   MLIRSupport
   MLIRTensor
   MLIRTransforms
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
index 4f9f8c5..52c9dcf 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/ConvertToLoops.cpp
@@ -11,11 +11,11 @@
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallVector.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
@@ -91,7 +91,7 @@
 struct LinalgExtToLoopsPass
     : public LinalgExtToLoopsBase<LinalgExtToLoopsPass> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<linalg::LinalgDialect, StandardOpsDialect,
+    registry.insert<linalg::LinalgDialect, func::FuncDialect,
                     mlir::arith::ArithmeticDialect, math::MathDialect,
                     memref::MemRefDialect, scf::SCFDialect>();
   }
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp
index f9dbf7d..25df1f8 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/LinalgExt/Transforms/Tiling.cpp
@@ -13,10 +13,10 @@
 #include "iree-dialects/Dialect/LinalgExt/Transforms/Transforms.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 #include "mlir/IR/Matchers.h"
@@ -262,7 +262,7 @@
     registry.insert<
         AffineDialect, IREE::Input::IREEInputDialect, linalg::LinalgDialect,
         IREE::LinalgExt::IREELinalgExtDialect, memref::MemRefDialect,
-        StandardOpsDialect, mlir::arith::ArithmeticDialect, math::MathDialect,
+        func::FuncDialect, mlir::arith::ArithmeticDialect, math::MathDialect,
         tensor::TensorDialect, scf::SCFDialect>();
   }
   void runOnOperation() override;
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp
index 7ce82a6..057ffef 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/Optimize/VariablesToSSA.cpp
@@ -10,7 +10,7 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/Support/Debug.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Dominance.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt
index 6c120a2..afafb18 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/CMakeLists.txt
@@ -11,7 +11,7 @@
   IREEPyDMDialect
   MLIRIR
   MLIRParser
-  MLIRStandard
+  MLIRFunc
   MLIRTransformUtils
 )
 
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp
index 67957a6..b8aa35e 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/RTL/LowerToRTLPass.cpp
@@ -9,7 +9,7 @@
 #include "iree-dialects/Dialect/Input/InputOps.h"
 #include "iree-dialects/Dialect/PyDM/IR/PyDMOps.h"
 #include "iree-dialects/Dialect/PyDM/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinDialect.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
@@ -222,7 +222,7 @@
     : public LowerIREEPyDMToRTLBase<LowerIREEPyDMToRTLPass> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<mlir::iree_compiler::IREE::Input::IREEInputDialect,
-                    BuiltinDialect, StandardOpsDialect>();
+                    BuiltinDialect, func::FuncDialect>();
   }
 
   void runOnOperation() override {
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt
index b9b3d02..e4da8ea 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/CMakeLists.txt
@@ -13,7 +13,7 @@
   MLIRControlFlow
   MLIRIR
   MLIRMath
-  MLIRStandard
+  MLIRFunc
   MLIRTransformUtils
 )
 
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp
index fe60831..cd5e652 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Transforms/ToIREE/ConversionPass.cpp
@@ -13,8 +13,8 @@
 #include "iree-dialects/Dialect/PyDM/Transforms/ToIREE/TypeConverter.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinDialect.h"
 
 using namespace mlir;
@@ -27,7 +27,7 @@
     : public ConvertIREEPyDMToIREEBase<ConvertIREEPyDMToIREEPass> {
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<mlir::iree_compiler::IREE::Input::IREEInputDialect,
-                    BuiltinDialect, StandardOpsDialect, math::MathDialect>();
+                    BuiltinDialect, func::FuncDialect, math::MathDialect>();
   }
 
   void runOnOperation() override {
@@ -44,7 +44,7 @@
         .addLegalDialect<mlir::iree_compiler::IREE::Input::IREEInputDialect>();
     target.addLegalDialect<mlir::arith::ArithmeticDialect>();
     target.addLegalDialect<mlir::math::MathDialect>();
-    target.addLegalDialect<mlir::StandardOpsDialect>();
+    target.addLegalDialect<mlir::func::FuncDialect>();
 
     // Some CFG ops can be present in the original pydm program. Need to
     // verify legality based on types.
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 b0c48b1..b8a81fe 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
@@ -9,8 +9,8 @@
 #include "iree-dialects/Dialect/PyDM/Transforms/ToIREE/Patterns.h"
 #include "llvm/ADT/TypeSwitch.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Support/LLVM.h"
@@ -463,8 +463,8 @@
       return rewriter.notifyMatchFailure(srcOp,
                                          "result types could not be converted");
     }
-    rewriter.replaceOpWithNewOp<mlir::CallOp>(srcOp, srcOp.callee(),
-                                              resultTypes, adaptor.operands());
+    rewriter.replaceOpWithNewOp<mlir::func::CallOp>(
+        srcOp, srcOp.callee(), resultTypes, adaptor.operands());
     return success();
   }
 };
@@ -856,7 +856,8 @@
     // Raise and return block.
     rewriter.setInsertionPointToEnd(raiseAndReturnBlock);
     auto nullReturnValue = getNullValue(loc, rewriter, convertedReturnType);
-    rewriter.create<mlir::ReturnOp>(loc, ValueRange{status, nullReturnValue});
+    rewriter.create<mlir::func::ReturnOp>(loc,
+                                          ValueRange{status, nullReturnValue});
     return success();
   }
 };
@@ -871,7 +872,7 @@
     auto loc = srcOp.getLoc();
     auto zeroResult =
         rewriter.create<arith::ConstantOp>(loc, rewriter.getI32IntegerAttr(0));
-    rewriter.replaceOpWithNewOp<mlir::ReturnOp>(
+    rewriter.replaceOpWithNewOp<mlir::func::ReturnOp>(
         srcOp, ValueRange{zeroResult, adaptor.getOperands()[0]});
     return success();
   }
diff --git a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt
index 2417731..901fde6 100644
--- a/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/lib/Dialect/PyDM/Utils/CMakeLists.txt
@@ -4,7 +4,7 @@
   LINK_LIBS PUBLIC
   IREEPyDMDialect
   MLIRIR
-  MLIRStandard
+  MLIRFunc
   MLIRTransformUtils
 )
 
diff --git a/llvm-external-projects/iree-dialects/python/CMakeLists.txt b/llvm-external-projects/iree-dialects/python/CMakeLists.txt
index f4f052f..ab6fd08 100644
--- a/llvm-external-projects/iree-dialects/python/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/python/CMakeLists.txt
@@ -62,7 +62,7 @@
   # build burden by ~5x. Make it stop.
   MLIRPythonSources.Core
   MLIRPythonSources.Dialects.builtin
-  MLIRPythonSources.Dialects.std
+  MLIRPythonSources.Dialects.func
   MLIRPythonSources.Dialects.cf
   MLIRPythonSources.Passes
   IREEDialectsPythonSources
diff --git a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
index a6c5bd4..735f948 100644
--- a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
+++ b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/CMakeLists.txt
@@ -7,7 +7,7 @@
   MLIROptLib
   MLIRSCF
   MLIRSCFTransforms
-  MLIRStandard
+  MLIRFunc
   MLIRTensor
   MLIRTransforms
   IREEInputDialect
diff --git a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
index 734a282..f935ca5 100644
--- a/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
+++ b/llvm-external-projects/iree-dialects/tools/iree-dialects-opt/iree-dialects-opt.cpp
@@ -12,11 +12,11 @@
 #include "iree-dialects/Dialect/PyDM/Transforms/Passes.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/AsmState.h"
 #include "mlir/IR/Dialect.h"
@@ -46,7 +46,7 @@
       // Upstream dialects
       mlir::arith::ArithmeticDialect, mlir::cf::ControlFlowDialect,
       mlir::linalg::LinalgDialect, mlir::memref::MemRefDialect,
-      mlir::StandardOpsDialect, mlir::scf::SCFDialect,
+      mlir::func::FuncDialect, mlir::scf::SCFDialect,
       mlir::tensor::TensorDialect>();
 
   IREE::LinalgExt::registerTiledOpInterfaceExternalModels(registry);
diff --git a/third_party/llvm-project b/third_party/llvm-project
index ba54ebe..eb27da7 160000
--- a/third_party/llvm-project
+++ b/third_party/llvm-project
@@ -1 +1 @@
-Subproject commit ba54ebeb5eba0f63de8ce2d73a85e9bf508008f6
+Subproject commit eb27da7dec67f1a36505b589b786ba1a499c274a
diff --git a/third_party/mlir-hlo b/third_party/mlir-hlo
index c33b60e..397198a 160000
--- a/third_party/mlir-hlo
+++ b/third_party/mlir-hlo
@@ -1 +1 @@
-Subproject commit c33b60ec3b27479c9fa27edf84473854e187da18
+Subproject commit 397198ab53521856c05a044432c923286ab02480