[flang-commits] [flang] 23aa5a7 - [mlir] Rename the Standard dialect to the Func dialect

River Riddle via flang-commits flang-commits at lists.llvm.org
Tue Mar 1 12:10:22 PST 2022


Author: River Riddle
Date: 2022-03-01T12:10:04-08:00
New Revision: 23aa5a744666b281af807b1f598f517bf0d597cb

URL: https://github.com/llvm/llvm-project/commit/23aa5a744666b281af807b1f598f517bf0d597cb
DIFF: https://github.com/llvm/llvm-project/commit/23aa5a744666b281af807b1f598f517bf0d597cb.diff

LOG: [mlir] Rename the Standard dialect to the Func dialect

The last remaining operations in the standard dialect all revolve around
FuncOp/function related constructs. This patch simply handles the initial
renaming (which by itself is already huge), but there are a large number
of cleanups unlocked/necessary afterwards:

* Removing a bunch of unnecessary dependencies on Func
* Cleaning up the From/ToStandard conversion passes
* Preparing for the move of FuncOp to the Func dialect

See the discussion at https://discourse.llvm.org/t/standard-dialect-the-final-chapter/6061

Differential Revision: https://reviews.llvm.org/D120624

Added: 
    mlir/docs/Dialects/Func.md
    mlir/include/mlir-c/Dialect/Func.h
    mlir/include/mlir/Dialect/Func/CMakeLists.txt
    mlir/include/mlir/Dialect/Func/IR/CMakeLists.txt
    mlir/include/mlir/Dialect/Func/IR/FuncOps.h
    mlir/include/mlir/Dialect/Func/IR/FuncOps.td
    mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt
    mlir/include/mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h
    mlir/include/mlir/Dialect/Func/Transforms/FuncConversions.h
    mlir/include/mlir/Dialect/Func/Transforms/Passes.h
    mlir/include/mlir/Dialect/Func/Transforms/Passes.td
    mlir/lib/CAPI/Dialect/Func.cpp
    mlir/lib/Dialect/Func/CMakeLists.txt
    mlir/lib/Dialect/Func/IR/CMakeLists.txt
    mlir/lib/Dialect/Func/IR/FuncOps.cpp
    mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Func/Transforms/DecomposeCallGraphTypes.cpp
    mlir/lib/Dialect/Func/Transforms/FuncBufferize.cpp
    mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
    mlir/lib/Dialect/Func/Transforms/PassDetail.h
    mlir/python/mlir/dialects/FuncOps.td
    mlir/python/mlir/dialects/_func_ops_ext.py
    mlir/python/mlir/dialects/func.py
    mlir/test/lib/Dialect/Func/CMakeLists.txt
    mlir/test/lib/Dialect/Func/TestDecomposeCallGraphTypes.cpp
    mlir/test/python/dialects/func.py

Modified: 
    flang/include/flang/Lower/Support/Utils.h
    flang/include/flang/Optimizer/Builder/Factory.h
    flang/include/flang/Optimizer/Builder/Runtime/Character.h
    flang/include/flang/Optimizer/Builder/Runtime/Numeric.h
    flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
    flang/include/flang/Optimizer/Builder/Runtime/Transformational.h
    flang/include/flang/Optimizer/Dialect/CanonicalizationPatterns.td
    flang/include/flang/Optimizer/Dialect/FIROps.h
    flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
    flang/include/flang/Optimizer/Support/InitFIR.h
    flang/include/flang/Optimizer/Support/Utils.h
    flang/include/flang/Optimizer/Transforms/Passes.td
    flang/lib/Lower/Bridge.cpp
    flang/lib/Lower/CMakeLists.txt
    flang/lib/Lower/ConvertExpr.cpp
    flang/lib/Optimizer/Builder/Runtime/Character.cpp
    flang/lib/Optimizer/Builder/Runtime/Numeric.cpp
    flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
    flang/lib/Optimizer/Builder/Runtime/Transformational.cpp
    flang/lib/Optimizer/CodeGen/CGOps.h
    flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
    flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
    flang/lib/Optimizer/Dialect/FIRDialect.cpp
    flang/lib/Optimizer/Dialect/FIROps.cpp
    flang/lib/Optimizer/Transforms/AbstractResult.cpp
    flang/lib/Optimizer/Transforms/AffineDemotion.cpp
    flang/lib/Optimizer/Transforms/AffinePromotion.cpp
    flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp
    flang/lib/Optimizer/Transforms/CharacterConversion.cpp
    flang/lib/Optimizer/Transforms/MemRefDataFlowOpt.cpp
    flang/lib/Optimizer/Transforms/MemoryAllocation.cpp
    flang/lib/Optimizer/Transforms/PassDetail.h
    flang/lib/Optimizer/Transforms/RewriteLoop.cpp
    mlir/benchmark/python/common.py
    mlir/docs/Bindings/Python.md
    mlir/docs/Bufferization.md
    mlir/docs/DialectConversion.md
    mlir/docs/Dialects/Affine.md
    mlir/docs/Dialects/Vector.md
    mlir/docs/Dialects/emitc.md
    mlir/docs/LangRef.md
    mlir/docs/OpDefinitions.md
    mlir/docs/Passes.md
    mlir/docs/SymbolsAndSymbolTables.md
    mlir/docs/TargetLLVMIR.md
    mlir/docs/Tutorials/CreatingADialect.md
    mlir/docs/Tutorials/Toy/Ch-5.md
    mlir/examples/standalone/standalone-opt/standalone-opt.cpp
    mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
    mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
    mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
    mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
    mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
    mlir/include/mlir-c/Registration.h
    mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
    mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
    mlir/include/mlir/Conversion/LinalgToStandard/LinalgToStandard.h
    mlir/include/mlir/Conversion/Passes.td
    mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
    mlir/include/mlir/Dialect/Affine/Analysis/AffineAnalysis.h
    mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.td
    mlir/include/mlir/Dialect/ArmSVE/ArmSVEDialect.h
    mlir/include/mlir/Dialect/CMakeLists.txt
    mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
    mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
    mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
    mlir/include/mlir/Dialect/Math/IR/MathOps.td
    mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
    mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h
    mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
    mlir/include/mlir/Dialect/PDL/IR/PDLOps.td
    mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
    mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
    mlir/include/mlir/Dialect/Tosa/Utils/CoversionUtils.h
    mlir/include/mlir/InitAllDialects.h
    mlir/include/mlir/InitAllPasses.h
    mlir/lib/CAPI/Dialect/CMakeLists.txt
    mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
    mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
    mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
    mlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
    mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
    mlir/lib/Conversion/ComplexToStandard/CMakeLists.txt
    mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
    mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp
    mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
    mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
    mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt
    mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
    mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp
    mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp
    mlir/lib/Conversion/MathToLibm/CMakeLists.txt
    mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
    mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    mlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp
    mlir/lib/Conversion/PassDetail.h
    mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
    mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
    mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
    mlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt
    mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
    mlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt
    mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp
    mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
    mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp
    mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
    mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
    mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp
    mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
    mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
    mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamedPass.cpp
    mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
    mlir/lib/Conversion/TosaToSCF/CMakeLists.txt
    mlir/lib/Conversion/TosaToStandard/CMakeLists.txt
    mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp
    mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp
    mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
    mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
    mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp
    mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
    mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
    mlir/lib/Dialect/Affine/Analysis/NestedMatcher.cpp
    mlir/lib/Dialect/Affine/Analysis/Utils.cpp
    mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
    mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
    mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
    mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
    mlir/lib/Dialect/ArmSVE/Transforms/CMakeLists.txt
    mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
    mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
    mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp
    mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCountingOpt.cpp
    mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
    mlir/lib/Dialect/Async/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
    mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
    mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
    mlir/lib/Dialect/CMakeLists.txt
    mlir/lib/Dialect/GPU/CMakeLists.txt
    mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
    mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
    mlir/lib/Dialect/Linalg/ComprehensiveBufferize/CMakeLists.txt
    mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
    mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
    mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
    mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
    mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp
    mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
    mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
    mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
    mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
    mlir/lib/Dialect/Linalg/Utils/Utils.cpp
    mlir/lib/Dialect/Math/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Math/Transforms/ExpandTanh.cpp
    mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
    mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
    mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp
    mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp
    mlir/lib/Dialect/MemRef/Transforms/PassDetail.h
    mlir/lib/Dialect/SCF/CMakeLists.txt
    mlir/lib/Dialect/SCF/SCF.cpp
    mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
    mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
    mlir/lib/Dialect/SCF/Transforms/ForToWhile.cpp
    mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
    mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
    mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
    mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
    mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
    mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp
    mlir/lib/Dialect/SCF/Utils/CMakeLists.txt
    mlir/lib/Dialect/SCF/Utils/Utils.cpp
    mlir/lib/Dialect/Shape/Transforms/ShapeToShapeLowering.cpp
    mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt
    mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
    mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
    mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
    mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
    mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
    mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
    mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
    mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
    mlir/lib/Dialect/Vector/Utils/CMakeLists.txt
    mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
    mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
    mlir/lib/ExecutionEngine/CMakeLists.txt
    mlir/lib/IR/Operation.cpp
    mlir/lib/Parser/Parser.cpp
    mlir/lib/Target/Cpp/CMakeLists.txt
    mlir/lib/Target/Cpp/TranslateRegistration.cpp
    mlir/lib/Target/Cpp/TranslateToCpp.cpp
    mlir/python/CMakeLists.txt
    mlir/python/mlir/dialects/_builtin_ops_ext.py
    mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
    mlir/test/CAPI/CMakeLists.txt
    mlir/test/CAPI/ir.c
    mlir/test/CAPI/pass.c
    mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir
    mlir/test/Conversion/ArithmeticToLLVM/convert-nd-vector-to-llvmir.mlir
    mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
    mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
    mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir
    mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
    mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
    mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
    mlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
    mlir/test/Dialect/Arithmetic/ops.mlir
    mlir/test/Dialect/Tensor/invalid.mlir
    mlir/test/IR/core-ops.mlir
    mlir/test/IR/generic-visitors-interrupt.mlir
    mlir/test/IR/generic-visitors.mlir
    mlir/test/IR/invalid-ops.mlir
    mlir/test/IR/invalid.mlir
    mlir/test/IR/op-stats.mlir
    mlir/test/IR/parser.mlir
    mlir/test/IR/print-op-generic.mlir
    mlir/test/IR/visitors.mlir
    mlir/test/Integration/Dialect/SparseTensor/python/test_stress.py
    mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py
    mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py
    mlir/test/Transforms/test-legalizer.mlir
    mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp
    mlir/test/lib/Dialect/Affine/TestLoopFusion.cpp
    mlir/test/lib/Dialect/CMakeLists.txt
    mlir/test/lib/Dialect/GPU/CMakeLists.txt
    mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
    mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp
    mlir/test/lib/Dialect/Linalg/CMakeLists.txt
    mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
    mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
    mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
    mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
    mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
    mlir/test/lib/Dialect/Test/CMakeLists.txt
    mlir/test/lib/Dialect/Test/TestDialect.cpp
    mlir/test/lib/Dialect/Test/TestPatterns.cpp
    mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
    mlir/test/lib/Dialect/Vector/CMakeLists.txt
    mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
    mlir/test/lib/IR/TestMatchers.cpp
    mlir/test/lib/IR/TestOperationEquals.cpp
    mlir/test/lib/IR/TestPrintDefUse.cpp
    mlir/test/lib/IR/TestPrintNesting.cpp
    mlir/test/lib/IR/TestSlicing.cpp
    mlir/test/lib/Transforms/TestInlining.cpp
    mlir/test/mlir-opt/commandline.mlir
    mlir/test/python/dialects/builtin.py
    mlir/test/python/dialects/linalg/opdsl/emit_convolution.py
    mlir/test/python/dialects/linalg/opdsl/emit_fill.py
    mlir/test/python/dialects/linalg/opdsl/emit_matmul.py
    mlir/test/python/dialects/linalg/opdsl/emit_misc.py
    mlir/test/python/dialects/linalg/opdsl/emit_pooling.py
    mlir/test/python/dialects/linalg/ops.py
    mlir/test/python/dialects/memref.py
    mlir/test/python/dialects/scf.py
    mlir/test/python/dialects/vector.py
    mlir/test/python/integration/dialects/linalg/opsrun.py
    mlir/test/python/ir/blocks.py
    mlir/test/python/ir/dialects.py
    mlir/test/python/ir/operation.py
    mlir/test/python/pass_manager.py
    mlir/tools/mlir-opt/CMakeLists.txt
    mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
    mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
    mlir/tools/mlir-vulkan-runner/CMakeLists.txt
    mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
    mlir/unittests/Conversion/PDLToPDLInterp/CMakeLists.txt
    mlir/unittests/Interfaces/CMakeLists.txt
    mlir/unittests/Interfaces/InferTypeOpInterfaceTest.cpp
    mlir/utils/vim/syntax/mlir.vim

Removed: 
    mlir/docs/Dialects/Standard.md
    mlir/include/mlir-c/Dialect/Standard.h
    mlir/include/mlir/Dialect/StandardOps/CMakeLists.txt
    mlir/include/mlir/Dialect/StandardOps/IR/CMakeLists.txt
    mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
    mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
    mlir/include/mlir/Dialect/StandardOps/Transforms/CMakeLists.txt
    mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h
    mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h
    mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
    mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td
    mlir/lib/CAPI/Dialect/Standard.cpp
    mlir/lib/Dialect/StandardOps/CMakeLists.txt
    mlir/lib/Dialect/StandardOps/IR/Ops.cpp
    mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
    mlir/lib/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.cpp
    mlir/lib/Dialect/StandardOps/Transforms/FuncBufferize.cpp
    mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp
    mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
    mlir/python/mlir/dialects/StandardOps.td
    mlir/python/mlir/dialects/_std_ops_ext.py
    mlir/python/mlir/dialects/std.py
    mlir/test/lib/Dialect/StandardOps/CMakeLists.txt
    mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp
    mlir/test/python/dialects/std.py


################################################################################
diff  --git a/flang/include/flang/Lower/Support/Utils.h b/flang/include/flang/Lower/Support/Utils.h
index 0acd6076ca30c..40968d42233d9 100644
--- a/flang/include/flang/Lower/Support/Utils.h
+++ b/flang/include/flang/Lower/Support/Utils.h
@@ -16,7 +16,7 @@
 #include "flang/Common/indirection.h"
 #include "flang/Parser/char-block.h"
 #include "flang/Semantics/tools.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinAttributes.h"
 #include "llvm/ADT/StringRef.h"
 #include <cstdint>

diff  --git a/flang/include/flang/Optimizer/Builder/Factory.h b/flang/include/flang/Optimizer/Builder/Factory.h
index cc25c673c5ead..d0d5510d6d9a3 100644
--- a/flang/include/flang/Optimizer/Builder/Factory.h
+++ b/flang/include/flang/Optimizer/Builder/Factory.h
@@ -17,7 +17,7 @@
 
 #include "flang/Optimizer/Dialect/FIROps.h"
 #include "flang/Optimizer/Dialect/FIRType.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "llvm/ADT/iterator_range.h"
 
 namespace mlir {

diff  --git a/flang/include/flang/Optimizer/Builder/Runtime/Character.h b/flang/include/flang/Optimizer/Builder/Runtime/Character.h
index 42493025195b4..b13a651daf4aa 100644
--- a/flang/include/flang/Optimizer/Builder/Runtime/Character.h
+++ b/flang/include/flang/Optimizer/Builder/Runtime/Character.h
@@ -9,7 +9,7 @@
 #ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_CHARACTER_H
 #define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_CHARACTER_H
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 namespace fir {
 class ExtendedValue;

diff  --git a/flang/include/flang/Optimizer/Builder/Runtime/Numeric.h b/flang/include/flang/Optimizer/Builder/Runtime/Numeric.h
index 323cc2ce6d49a..9380ad76ccd73 100644
--- a/flang/include/flang/Optimizer/Builder/Runtime/Numeric.h
+++ b/flang/include/flang/Optimizer/Builder/Runtime/Numeric.h
@@ -9,7 +9,7 @@
 #ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_NUMERIC_H
 #define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_NUMERIC_H
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 namespace fir {
 class ExtendedValue;

diff  --git a/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h b/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
index 9907d674da90d..1f15fddc7780d 100644
--- a/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
+++ b/flang/include/flang/Optimizer/Builder/Runtime/Reduction.h
@@ -16,7 +16,7 @@
 #ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_REDUCTION_H
 #define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_REDUCTION_H
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 namespace fir {
 class ExtendedValue;

diff  --git a/flang/include/flang/Optimizer/Builder/Runtime/Transformational.h b/flang/include/flang/Optimizer/Builder/Runtime/Transformational.h
index 5f1f28b78656e..1657dff0fd52b 100644
--- a/flang/include/flang/Optimizer/Builder/Runtime/Transformational.h
+++ b/flang/include/flang/Optimizer/Builder/Runtime/Transformational.h
@@ -10,7 +10,7 @@
 #ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TRANSFORMATIONAL_H
 #define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_TRANSFORMATIONAL_H
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 namespace fir {
 class ExtendedValue;

diff  --git a/flang/include/flang/Optimizer/Dialect/CanonicalizationPatterns.td b/flang/include/flang/Optimizer/Dialect/CanonicalizationPatterns.td
index 65f669c94cbe5..8760c6a7c24cc 100644
--- a/flang/include/flang/Optimizer/Dialect/CanonicalizationPatterns.td
+++ b/flang/include/flang/Optimizer/Dialect/CanonicalizationPatterns.td
@@ -16,7 +16,6 @@
 
 include "mlir/IR/OpBase.td"
 include "mlir/Dialect/Arithmetic/IR/ArithmeticOps.td"
-include "mlir/Dialect/StandardOps/IR/Ops.td"
 include "flang/Optimizer/Dialect/FIROps.td"
 
 def IdenticalTypePred : Constraint<CPred<"$0.getType() == $1.getType()">>;

diff  --git a/flang/include/flang/Optimizer/Dialect/FIROps.h b/flang/include/flang/Optimizer/Dialect/FIROps.h
index 3a67577d1c9a8..a78c853149c86 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROps.h
+++ b/flang/include/flang/Optimizer/Dialect/FIROps.h
@@ -11,7 +11,7 @@
 
 #include "flang/Optimizer/Dialect/FIRType.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Interfaces/LoopLikeInterface.h"
 #include "mlir/Interfaces/SideEffectInterfaces.h"
 

diff  --git a/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h b/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
index c99f2a39bc914..28fecd3ad93e8 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
+++ b/flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
@@ -10,7 +10,7 @@
 #define FORTRAN_OPTIMIZER_DIALECT_FIROPSSUPPORT_H
 
 #include "flang/Optimizer/Dialect/FIROps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinOps.h"
 
 namespace fir {
@@ -25,7 +25,7 @@ inline bool nonVolatileLoad(mlir::Operation *op) {
 /// return true iff the Operation is a call
 inline bool isaCall(mlir::Operation *op) {
   return isa<fir::CallOp>(op) || isa<fir::DispatchOp>(op) ||
-         isa<mlir::CallOp>(op) || isa<mlir::CallIndirectOp>(op);
+         isa<mlir::func::CallOp>(op) || isa<mlir::func::CallIndirectOp>(op);
 }
 
 /// return true iff the Operation is a fir::CallOp, fir::DispatchOp,

diff  --git a/flang/include/flang/Optimizer/Support/InitFIR.h b/flang/include/flang/Optimizer/Support/InitFIR.h
index 30108ec2069b9..f31251842a463 100644
--- a/flang/include/flang/Optimizer/Support/InitFIR.h
+++ b/flang/include/flang/Optimizer/Support/InitFIR.h
@@ -28,7 +28,7 @@ namespace fir::support {
   mlir::AffineDialect, FIROpsDialect, mlir::acc::OpenACCDialect,               \
       mlir::omp::OpenMPDialect, mlir::scf::SCFDialect,                         \
       mlir::arith::ArithmeticDialect, mlir::cf::ControlFlowDialect,            \
-      mlir::StandardOpsDialect, mlir::vector::VectorDialect
+      mlir::func::FuncDialect, mlir::vector::VectorDialect
 
 // The definitive list of dialects used by flang.
 #define FLANG_DIALECT_LIST                                                     \

diff  --git a/flang/include/flang/Optimizer/Support/Utils.h b/flang/include/flang/Optimizer/Support/Utils.h
index 26783d289cea7..d25a4005f4017 100644
--- a/flang/include/flang/Optimizer/Support/Utils.h
+++ b/flang/include/flang/Optimizer/Support/Utils.h
@@ -15,7 +15,7 @@
 
 #include "flang/Common/default-kinds.h"
 #include "flang/Optimizer/Dialect/FIRType.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinAttributes.h"
 
 namespace fir {

diff  --git a/flang/include/flang/Optimizer/Transforms/Passes.td b/flang/include/flang/Optimizer/Transforms/Passes.td
index fa92753e8eea3..d81cb36dacc6a 100644
--- a/flang/include/flang/Optimizer/Transforms/Passes.td
+++ b/flang/include/flang/Optimizer/Transforms/Passes.td
@@ -25,7 +25,7 @@ def AbstractResultOpt : Pass<"abstract-result-opt", "mlir::FuncOp"> {
   }];
   let constructor = "::fir::createAbstractResultOptPass()";
   let dependentDialects = [
-    "fir::FIROpsDialect", "mlir::StandardOpsDialect"
+    "fir::FIROpsDialect", "mlir::func::FuncDialect"
   ];
   let options = [
     Option<"passResultAsBox", "abstract-result-as-box",
@@ -56,7 +56,7 @@ def AffineDialectPromotion : Pass<"promote-to-affine", "::mlir::FuncOp"> {
   }];
   let constructor = "::fir::createPromoteToAffinePass()";
   let dependentDialects = [
-    "fir::FIROpsDialect", "mlir::StandardOpsDialect", "mlir::AffineDialect"
+    "fir::FIROpsDialect", "mlir::func::FuncDialect", "mlir::AffineDialect"
   ];
 }
 
@@ -70,7 +70,7 @@ def AffineDialectDemotion : Pass<"demote-affine", "::mlir::FuncOp"> {
   }];
   let constructor = "::fir::createAffineDemotionPass()";
   let dependentDialects = [
-    "fir::FIROpsDialect", "mlir::StandardOpsDialect", "mlir::AffineDialect"
+    "fir::FIROpsDialect", "mlir::func::FuncDialect", "mlir::AffineDialect"
   ];
 }
 
@@ -122,7 +122,7 @@ def CFGConversion : Pass<"cfg-conversion", "::mlir::FuncOp"> {
   }];
   let constructor = "::fir::createFirToCfgPass()";
   let dependentDialects = [
-    "fir::FIROpsDialect", "mlir::StandardOpsDialect"
+    "fir::FIROpsDialect", "mlir::func::FuncDialect"
   ];
   let options = [
     Option<"forceLoopToExecuteOnce", "always-execute-loop-body", "bool",
@@ -148,7 +148,7 @@ def MemRefDataFlowOpt : Pass<"fir-memref-dataflow-opt", "::mlir::FuncOp"> {
   }];
   let constructor = "::fir::createMemDataFlowOptPass()";
   let dependentDialects = [
-    "fir::FIROpsDialect", "mlir::StandardOpsDialect"
+    "fir::FIROpsDialect", "mlir::func::FuncDialect"
   ];
 }
 

diff  --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index b8b52e48f99c4..6e50e1c35e058 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -427,7 +427,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
   /// Generate the cleanup block before the program exits
   void genExitRoutine() {
     if (blockIsUnterminated())
-      builder->create<mlir::ReturnOp>(toLocation());
+      builder->create<mlir::func::ReturnOp>(toLocation());
   }
   void genFIR(const Fortran::parser::EndProgramStmt &) { genExitRoutine(); }
 
@@ -459,7 +459,7 @@ class FirConverter : public Fortran::lower::AbstractConverter {
             TODO(loc, "Convert to actual type");
           return builder->create<fir::LoadOp>(loc, resultRef);
         });
-    builder->create<mlir::ReturnOp>(loc, resultVal);
+    builder->create<mlir::func::ReturnOp>(loc, resultVal);
   }
 
   void genFIRProcedureExit(Fortran::lower::pft::FunctionLikeUnit &funit,

diff  --git a/flang/lib/Lower/CMakeLists.txt b/flang/lib/Lower/CMakeLists.txt
index 031701e99902e..e60087e3fc17c 100644
--- a/flang/lib/Lower/CMakeLists.txt
+++ b/flang/lib/Lower/CMakeLists.txt
@@ -37,9 +37,9 @@ add_flang_library(FortranLower
   FortranEvaluate
   FortranSemantics
   MLIRAffineToStandard
+  MLIRFunc
   MLIRLLVMIR
   MLIRSCFToControlFlow
-  MLIRStandard
 
   LINK_COMPONENTS
   Support

diff  --git a/flang/lib/Lower/ConvertExpr.cpp b/flang/lib/Lower/ConvertExpr.cpp
index 60745b83cc11f..dd8c6ced3cbc5 100644
--- a/flang/lib/Lower/ConvertExpr.cpp
+++ b/flang/lib/Lower/ConvertExpr.cpp
@@ -31,7 +31,7 @@
 #include "flang/Semantics/symbol.h"
 #include "flang/Semantics/tools.h"
 #include "flang/Semantics/type.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "llvm/Support/Debug.h"
 
 #define DEBUG_TYPE "flang-lower-expr"

diff  --git a/flang/lib/Optimizer/Builder/Runtime/Character.cpp b/flang/lib/Optimizer/Builder/Runtime/Character.cpp
index 5a2ea82932d39..2575e6538925c 100644
--- a/flang/lib/Optimizer/Builder/Runtime/Character.cpp
+++ b/flang/lib/Optimizer/Builder/Runtime/Character.cpp
@@ -13,7 +13,7 @@
 #include "flang/Optimizer/Builder/FIRBuilder.h"
 #include "flang/Optimizer/Builder/Runtime/RTBuilder.h"
 #include "flang/Runtime/character.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 using namespace Fortran::runtime;
 

diff  --git a/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp b/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp
index 5c7da46cfc3ff..f3db5412e7be3 100644
--- a/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp
+++ b/flang/lib/Optimizer/Builder/Runtime/Numeric.cpp
@@ -12,7 +12,7 @@
 #include "flang/Optimizer/Builder/FIRBuilder.h"
 #include "flang/Optimizer/Builder/Runtime/RTBuilder.h"
 #include "flang/Runtime/numeric.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 using namespace Fortran::runtime;
 

diff  --git a/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp b/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
index c726d3c508e18..750968d130381 100644
--- a/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
+++ b/flang/lib/Optimizer/Builder/Runtime/Reduction.cpp
@@ -13,7 +13,7 @@
 #include "flang/Optimizer/Builder/FIRBuilder.h"
 #include "flang/Optimizer/Builder/Runtime/RTBuilder.h"
 #include "flang/Runtime/reduction.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 using namespace Fortran::runtime;
 

diff  --git a/flang/lib/Optimizer/Builder/Runtime/Transformational.cpp b/flang/lib/Optimizer/Builder/Runtime/Transformational.cpp
index 467f09ef2f7b4..9d2a18caf145b 100644
--- a/flang/lib/Optimizer/Builder/Runtime/Transformational.cpp
+++ b/flang/lib/Optimizer/Builder/Runtime/Transformational.cpp
@@ -15,7 +15,7 @@
 #include "flang/Optimizer/Builder/Runtime/RTBuilder.h"
 #include "flang/Runtime/matmul.h"
 #include "flang/Runtime/transformational.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 using namespace Fortran::runtime;
 

diff  --git a/flang/lib/Optimizer/CodeGen/CGOps.h b/flang/lib/Optimizer/CodeGen/CGOps.h
index f5f552c633762..c6419aad9b379 100644
--- a/flang/lib/Optimizer/CodeGen/CGOps.h
+++ b/flang/lib/Optimizer/CodeGen/CGOps.h
@@ -14,7 +14,7 @@
 #define OPTIMIZER_CODEGEN_CGOPS_H
 
 #include "flang/Optimizer/Dialect/FIRType.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 using namespace mlir;
 

diff  --git a/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp b/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
index a4c9305daa708..5ebf14bf4b00c 100644
--- a/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
+++ b/flang/lib/Optimizer/CodeGen/PreCGRewrite.cpp
@@ -262,7 +262,7 @@ class CodeGenRewrite : public CodeGenRewriteBase<CodeGenRewrite> {
     mlir::OpBuilder rewriter(&context);
     mlir::ConversionTarget target(context);
     target.addLegalDialect<mlir::arith::ArithmeticDialect, FIROpsDialect,
-                           FIRCodeGenDialect, mlir::StandardOpsDialect>();
+                           FIRCodeGenDialect, mlir::func::FuncDialect>();
     target.addIllegalOp<ArrayCoorOp>();
     target.addIllegalOp<ReboxOp>();
     target.addDynamicallyLegalOp<EmboxOp>([](EmboxOp embox) {

diff  --git a/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp b/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
index 575d267495404..ef4b59ee7bf05 100644
--- a/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
+++ b/flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
@@ -599,20 +599,20 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
           auto newArg = func.front().insertArgument(fixup.index,
                                                     newInTys[fixup.index], loc);
           offset++;
-          func.walk([&](mlir::ReturnOp ret) {
+          func.walk([&](mlir::func::ReturnOp ret) {
             rewriter->setInsertionPoint(ret);
             auto oldOper = ret.getOperand(0);
             auto oldOperTy = ReferenceType::get(oldOper.getType());
             auto cast = rewriter->create<ConvertOp>(loc, oldOperTy, newArg);
             rewriter->create<fir::StoreOp>(loc, oldOper, cast);
-            rewriter->create<mlir::ReturnOp>(loc);
+            rewriter->create<mlir::func::ReturnOp>(loc);
             ret.erase();
           });
         } break;
         case FixupTy::Codes::ReturnType: {
           // The function is still returning a value, but its type has likely
           // changed to suit the target ABI convention.
-          func.walk([&](mlir::ReturnOp ret) {
+          func.walk([&](mlir::func::ReturnOp ret) {
             rewriter->setInsertionPoint(ret);
             auto oldOper = ret.getOperand(0);
             auto oldOperTy = ReferenceType::get(oldOper.getType());
@@ -621,7 +621,7 @@ class TargetRewrite : public TargetRewriteBase<TargetRewrite> {
             auto cast = rewriter->create<ConvertOp>(loc, oldOperTy, mem);
             rewriter->create<fir::StoreOp>(loc, oldOper, cast);
             mlir::Value load = rewriter->create<fir::LoadOp>(loc, mem);
-            rewriter->create<mlir::ReturnOp>(loc, load);
+            rewriter->create<mlir::func::ReturnOp>(loc, load);
             ret.erase();
           });
         } break;

diff  --git a/flang/lib/Optimizer/Dialect/FIRDialect.cpp b/flang/lib/Optimizer/Dialect/FIRDialect.cpp
index 45320d52b022e..6193924651cc1 100644
--- a/flang/lib/Optimizer/Dialect/FIRDialect.cpp
+++ b/flang/lib/Optimizer/Dialect/FIRDialect.cpp
@@ -42,7 +42,7 @@ struct FIRInlinerInterface : public mlir::DialectInlinerInterface {
   /// return.
   void handleTerminator(mlir::Operation *op,
                         llvm::ArrayRef<mlir::Value> valuesToRepl) const final {
-    auto returnOp = cast<mlir::ReturnOp>(op);
+    auto returnOp = cast<mlir::func::ReturnOp>(op);
     assert(returnOp.getNumOperands() == valuesToRepl.size());
     for (const auto &it : llvm::enumerate(returnOp.getOperands()))
       valuesToRepl[it.index()].replaceAllUsesWith(it.value());

diff  --git a/flang/lib/Optimizer/Dialect/FIROps.cpp b/flang/lib/Optimizer/Dialect/FIROps.cpp
index 0f1f594fa9dec..9a9a31e5d53fe 100644
--- a/flang/lib/Optimizer/Dialect/FIROps.cpp
+++ b/flang/lib/Optimizer/Dialect/FIROps.cpp
@@ -16,7 +16,7 @@
 #include "flang/Optimizer/Dialect/FIRType.h"
 #include "flang/Optimizer/Support/Utils.h"
 #include "mlir/Dialect/CommonFolders.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinAttributes.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Diagnostics.h"

diff  --git a/flang/lib/Optimizer/Transforms/AbstractResult.cpp b/flang/lib/Optimizer/Transforms/AbstractResult.cpp
index 156ff413d29c9..f885ffbdd8cbb 100644
--- a/flang/lib/Optimizer/Transforms/AbstractResult.cpp
+++ b/flang/lib/Optimizer/Transforms/AbstractResult.cpp
@@ -11,7 +11,7 @@
 #include "flang/Optimizer/Dialect/FIROps.h"
 #include "flang/Optimizer/Dialect/FIRType.h"
 #include "flang/Optimizer/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Diagnostics.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -149,14 +149,14 @@ class SaveResultOpConversion
   }
 };
 
-class ReturnOpConversion : public mlir::OpRewritePattern<mlir::ReturnOp> {
+class ReturnOpConversion : public mlir::OpRewritePattern<mlir::func::ReturnOp> {
 public:
   using OpRewritePattern::OpRewritePattern;
   ReturnOpConversion(mlir::MLIRContext *context,
                      const AbstractResultOptions &opt)
       : OpRewritePattern(context), options{opt} {}
   mlir::LogicalResult
-  matchAndRewrite(mlir::ReturnOp ret,
+  matchAndRewrite(mlir::func::ReturnOp ret,
                   mlir::PatternRewriter &rewriter) const override {
     rewriter.setInsertionPoint(ret);
     auto returnedValue = ret.getOperand(0);
@@ -177,7 +177,7 @@ class ReturnOpConversion : public mlir::OpRewritePattern<mlir::ReturnOp> {
     if (!replacedStorage)
       rewriter.create<fir::StoreOp>(ret.getLoc(), returnedValue,
                                     options.newArg);
-    rewriter.replaceOpWithNewOp<mlir::ReturnOp>(ret);
+    rewriter.replaceOpWithNewOp<mlir::func::ReturnOp>(ret);
     return mlir::success();
   }
 
@@ -239,8 +239,8 @@ class AbstractResultOpt : public fir::AbstractResultOptBase<AbstractResultOpt> {
               rewriter.create<fir::BoxAddrOp>(loc, bufferType, options.newArg);
         }
         patterns.insert<ReturnOpConversion>(context, options);
-        target.addDynamicallyLegalOp<mlir::ReturnOp>(
-            [](mlir::ReturnOp ret) { return ret.operands().empty(); });
+        target.addDynamicallyLegalOp<mlir::func::ReturnOp>(
+            [](mlir::func::ReturnOp ret) { return ret.operands().empty(); });
       }
     }
 
@@ -249,7 +249,7 @@ class AbstractResultOpt : public fir::AbstractResultOptBase<AbstractResultOpt> {
 
     // Convert the calls and, if needed,  the ReturnOp in the function body.
     target.addLegalDialect<fir::FIROpsDialect, mlir::arith::ArithmeticDialect,
-                           mlir::StandardOpsDialect>();
+                           mlir::func::FuncDialect>();
     target.addIllegalOp<fir::SaveResultOp>();
     target.addDynamicallyLegalOp<fir::CallOp>([](fir::CallOp call) {
       return !mustConvertCallOrFunc(call.getFunctionType());

diff  --git a/flang/lib/Optimizer/Transforms/AffineDemotion.cpp b/flang/lib/Optimizer/Transforms/AffineDemotion.cpp
index ceebc26bf25b5..01f2c99eb7561 100644
--- a/flang/lib/Optimizer/Transforms/AffineDemotion.cpp
+++ b/flang/lib/Optimizer/Transforms/AffineDemotion.cpp
@@ -23,9 +23,9 @@
 #include "flang/Optimizer/Transforms/Passes.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinAttributes.h"
 #include "mlir/IR/IntegerSet.h"
 #include "mlir/IR/Visitors.h"
@@ -158,7 +158,7 @@ class AffineDialectDemotion
     });
     target.addLegalDialect<FIROpsDialect, mlir::scf::SCFDialect,
                            mlir::arith::ArithmeticDialect,
-                           mlir::StandardOpsDialect>();
+                           mlir::func::FuncDialect>();
 
     if (mlir::failed(mlir::applyPartialConversion(function, target,
                                                   std::move(patterns)))) {

diff  --git a/flang/lib/Optimizer/Transforms/AffinePromotion.cpp b/flang/lib/Optimizer/Transforms/AffinePromotion.cpp
index daf84b65ef6cc..e771c2c921621 100644
--- a/flang/lib/Optimizer/Transforms/AffinePromotion.cpp
+++ b/flang/lib/Optimizer/Transforms/AffinePromotion.cpp
@@ -21,8 +21,8 @@
 #include "flang/Optimizer/Dialect/FIRType.h"
 #include "flang/Optimizer/Transforms/Passes.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinAttributes.h"
 #include "mlir/IR/IntegerSet.h"
 #include "mlir/IR/Visitors.h"
@@ -595,7 +595,7 @@ class AffineDialectPromotion
     mlir::ConversionTarget target = *context;
     target.addLegalDialect<
         mlir::AffineDialect, FIROpsDialect, mlir::scf::SCFDialect,
-        mlir::arith::ArithmeticDialect, mlir::StandardOpsDialect>();
+        mlir::arith::ArithmeticDialect, mlir::func::FuncDialect>();
     target.addDynamicallyLegalOp<IfOp>([&functionAnalysis](fir::IfOp op) {
       return !(functionAnalysis.getChildIfAnalysis(op).canPromoteToAffine());
     });

diff  --git a/flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp b/flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp
index 81e37f6f32bbe..e9c4ef995deda 100644
--- a/flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp
+++ b/flang/lib/Optimizer/Transforms/ArrayValueCopy.cpp
@@ -792,7 +792,7 @@ class ArrayValueCopyConverter
     mlir::ConversionTarget target(*context);
     target.addLegalDialect<
         FIROpsDialect, mlir::scf::SCFDialect, mlir::arith::ArithmeticDialect,
-        mlir::cf::ControlFlowDialect, mlir::StandardOpsDialect>();
+        mlir::cf::ControlFlowDialect, mlir::func::FuncDialect>();
     target.addIllegalOp<ArrayFetchOp, ArrayUpdateOp, ArrayModifyOp>();
     // Rewrite the array fetch and array update ops.
     if (mlir::failed(

diff  --git a/flang/lib/Optimizer/Transforms/CharacterConversion.cpp b/flang/lib/Optimizer/Transforms/CharacterConversion.cpp
index f58d03c5c4fe3..650b990ef54c5 100644
--- a/flang/lib/Optimizer/Transforms/CharacterConversion.cpp
+++ b/flang/lib/Optimizer/Transforms/CharacterConversion.cpp
@@ -13,7 +13,7 @@
 #include "flang/Optimizer/Support/FIRContext.h"
 #include "flang/Optimizer/Support/KindMapping.h"
 #include "flang/Optimizer/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Diagnostics.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -107,7 +107,7 @@ class CharacterConversion
       mlir::ConversionTarget target(*context);
       target.addLegalDialect<mlir::AffineDialect, fir::FIROpsDialect,
                              mlir::arith::ArithmeticDialect,
-                             mlir::StandardOpsDialect>();
+                             mlir::func::FuncDialect>();
 
       // apply the patterns
       target.addIllegalOp<fir::CharConvertOp>();

diff  --git a/flang/lib/Optimizer/Transforms/MemRefDataFlowOpt.cpp b/flang/lib/Optimizer/Transforms/MemRefDataFlowOpt.cpp
index f3f86cb3047e6..726fa015920d8 100644
--- a/flang/lib/Optimizer/Transforms/MemRefDataFlowOpt.cpp
+++ b/flang/lib/Optimizer/Transforms/MemRefDataFlowOpt.cpp
@@ -11,7 +11,7 @@
 #include "flang/Optimizer/Dialect/FIROps.h"
 #include "flang/Optimizer/Dialect/FIRType.h"
 #include "flang/Optimizer/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Dominance.h"
 #include "mlir/IR/Operation.h"
 #include "mlir/Transforms/Passes.h"

diff  --git a/flang/lib/Optimizer/Transforms/MemoryAllocation.cpp b/flang/lib/Optimizer/Transforms/MemoryAllocation.cpp
index 76ca3fd5e1fc4..408cdc6e2525f 100644
--- a/flang/lib/Optimizer/Transforms/MemoryAllocation.cpp
+++ b/flang/lib/Optimizer/Transforms/MemoryAllocation.cpp
@@ -11,7 +11,7 @@
 #include "flang/Optimizer/Dialect/FIROps.h"
 #include "flang/Optimizer/Dialect/FIRType.h"
 #include "flang/Optimizer/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Diagnostics.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -41,7 +41,7 @@ class ReturnAnalysis {
     if (auto func = mlir::dyn_cast<mlir::FuncOp>(op))
       for (mlir::Block &block : func)
         for (mlir::Operation &i : block)
-          if (mlir::isa<mlir::ReturnOp>(i)) {
+          if (mlir::isa<mlir::func::ReturnOp>(i)) {
             returnMap[op].push_back(&i);
             break;
           }
@@ -189,7 +189,7 @@ class MemoryAllocationOpt
     const auto &analysis = getAnalysis<ReturnAnalysis>();
 
     target.addLegalDialect<fir::FIROpsDialect, mlir::arith::ArithmeticDialect,
-                           mlir::StandardOpsDialect>();
+                           mlir::func::FuncDialect>();
     target.addDynamicallyLegalOp<fir::AllocaOp>([&](fir::AllocaOp alloca) {
       return keepStackAllocation(alloca, &func.front(), options);
     });

diff  --git a/flang/lib/Optimizer/Transforms/PassDetail.h b/flang/lib/Optimizer/Transforms/PassDetail.h
index 02d203f17097d..c81993d239c1f 100644
--- a/flang/lib/Optimizer/Transforms/PassDetail.h
+++ b/flang/lib/Optimizer/Transforms/PassDetail.h
@@ -10,10 +10,10 @@
 
 #include "flang/Optimizer/Dialect/FIRDialect.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/OpenACC/OpenACC.h"
 #include "mlir/Dialect/OpenMP/OpenMPDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Pass/PassRegistry.h"
 

diff  --git a/flang/lib/Optimizer/Transforms/RewriteLoop.cpp b/flang/lib/Optimizer/Transforms/RewriteLoop.cpp
index 4e20a4b862bf4..c2a9cc7bac0d3 100644
--- a/flang/lib/Optimizer/Transforms/RewriteLoop.cpp
+++ b/flang/lib/Optimizer/Transforms/RewriteLoop.cpp
@@ -12,7 +12,7 @@
 #include "flang/Optimizer/Transforms/Passes.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.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"
 #include "llvm/Support/CommandLine.h"
@@ -304,7 +304,7 @@ class CfgConversion : public CFGConversionBase<CfgConversion> {
         context, forceLoopToExecuteOnce);
     mlir::ConversionTarget target(*context);
     target.addLegalDialect<mlir::AffineDialect, mlir::cf::ControlFlowDialect,
-                           FIROpsDialect, mlir::StandardOpsDialect>();
+                           FIROpsDialect, mlir::func::FuncDialect>();
 
     // apply the patterns
     target.addIllegalOp<ResultOp, DoLoopOp, IfOp, IterWhileOp>();

diff  --git a/mlir/benchmark/python/common.py b/mlir/benchmark/python/common.py
index a34091106daa9..9ab6b1aaea0dc 100644
--- a/mlir/benchmark/python/common.py
+++ b/mlir/benchmark/python/common.py
@@ -6,9 +6,9 @@
 from mlir import ir
 from mlir.dialects import arith
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import memref
 from mlir.dialects import scf
-from mlir.dialects import std
 from mlir.passmanager import PassManager
 
 
@@ -93,15 +93,15 @@ def emit_benchmark_wrapped_main_func(func, timer_func):
         iter_args = list(wrapped_func.arguments[-num_results - 1:-1])
         loop = scf.ForOp(zero, n_iterations, one, iter_args)
         with ir.InsertionPoint(loop.body):
-            start = std.CallOp(timer_func, [])
-            call = std.CallOp(
+            start = func.CallOp(timer_func, [])
+            call = func.CallOp(
                 func,
                 wrapped_func.arguments[:-num_results - 1] + loop.inner_iter_args
             )
-            end = std.CallOp(timer_func, [])
+            end = func.CallOp(timer_func, [])
             time_taken = arith.SubIOp(end, start)
             memref.StoreOp(time_taken, timer_buffer, [loop.induction_variable])
             scf.YieldOp(list(call.results))
-        std.ReturnOp(loop)
+        func.ReturnOp(loop)
 
     return wrapped_func

diff  --git a/mlir/docs/Bindings/Python.md b/mlir/docs/Bindings/Python.md
index c9d38bbc7a548..f867948cc0078 100644
--- a/mlir/docs/Bindings/Python.md
+++ b/mlir/docs/Bindings/Python.md
@@ -885,16 +885,16 @@ Each dialect with a mapping to python requires that an appropriate
 `_{DIALECT_NAMESPACE}_ops_gen.py` wrapper module is created. This is done by
 invoking `mlir-tblgen` on a python-bindings specific tablegen wrapper that
 includes the boilerplate and actual dialect specific `td` file. An example, for
-the `StandardOps` (which is assigned the namespace `std` as a special case):
+the `Func` (which is assigned the namespace `func` as a special case):
 
 ```tablegen
-#ifndef PYTHON_BINDINGS_STANDARD_OPS
-#define PYTHON_BINDINGS_STANDARD_OPS
+#ifndef PYTHON_BINDINGS_FUNC_OPS
+#define PYTHON_BINDINGS_FUNC_OPS
 
 include "mlir/Bindings/Python/Attributes.td"
-include "mlir/Dialect/StandardOps/IR/Ops.td"
+include "mlir/Dialect/Func/IR/FuncOps.td"
 
-#endif
+#endif // PYTHON_BINDINGS_FUNC_OPS
 ```
 
 In the main repository, building the wrapper is done via the CMake function

diff  --git a/mlir/docs/Bufferization.md b/mlir/docs/Bufferization.md
index 2f1d7a17c4c47..3f39e8de2632f 100644
--- a/mlir/docs/Bufferization.md
+++ b/mlir/docs/Bufferization.md
@@ -169,7 +169,7 @@ struct TensorBufferizePass : public TensorBufferizeBase<TensorBufferizePass> {
 
     populateTensorBufferizePatterns(typeConverter, patterns);
     target.addIllegalOp<tensor::CastOp, tensor::ExtractOp>();
-    target.addLegalDialect<StandardOpsDialect>();
+    target.addLegalDialect<func::FuncDialect>();
 
     if (failed(
             applyPartialConversion(getOperation(), target, std::move(patterns))))

diff  --git a/mlir/docs/DialectConversion.md b/mlir/docs/DialectConversion.md
index 4731ef5efbc5a..1173a0d01dbab 100644
--- a/mlir/docs/DialectConversion.md
+++ b/mlir/docs/DialectConversion.md
@@ -100,9 +100,9 @@ struct MyTarget : public ConversionTarget {
     /// constraints.
     addDynamicallyLegalDialect<AffineDialect>([](Operation *op) { ... });
 
-    /// Mark `std.return` as dynamically legal, but provide a specific legality
+    /// Mark `func.return` as dynamically legal, but provide a specific legality
     /// callback.
-    addDynamicallyLegalOp<ReturnOp>([](ReturnOp op) { ... });
+    addDynamicallyLegalOp<func::ReturnOp>([](func::ReturnOp op) { ... });
 
     /// Treat unknown operations, i.e. those without a legalization action
     /// directly set, as dynamically legal.
@@ -424,15 +424,15 @@ Example output is shown below:
 
 ```
 //===-------------------------------------------===//
-Legalizing operation : 'std.return'(0x608000002e20) {
-  "std.return"() : () -> ()
+Legalizing operation : 'func.return'(0x608000002e20) {
+  "func.return"() : () -> ()
 
   * Fold {
   } -> FAILURE : unable to fold
 
-  * Pattern : 'std.return -> ()' {
+  * Pattern : 'func.return -> ()' {
     ** Insert  : 'spv.Return'(0x6070000453e0)
-    ** Replace : 'std.return'(0x608000002e20)
+    ** Replace : 'func.return'(0x608000002e20)
 
     //===-------------------------------------------===//
     Legalizing operation : 'spv.Return'(0x6070000453e0) {
@@ -445,8 +445,8 @@ Legalizing operation : 'std.return'(0x608000002e20) {
 //===-------------------------------------------===//
 ```
 
-This output is describing the legalization of an `std.return` operation. We
+This output is describing the legalization of an `func.return` operation. We
 first try to legalize by folding the operation, but that is unsuccessful for
-`std.return`. From there, a pattern is applied that replaces the `std.return`
+`func.return`. From there, a pattern is applied that replaces the `func.return`
 with a `spv.Return`. The newly generated `spv.Return` is then processed for
 legalization, but is found to already legal as per the target.

diff  --git a/mlir/docs/Dialects/Affine.md b/mlir/docs/Dialects/Affine.md
index 4e1ca8fe23938..89d9d89964f94 100644
--- a/mlir/docs/Dialects/Affine.md
+++ b/mlir/docs/Dialects/Affine.md
@@ -66,7 +66,7 @@ argument for an op with trait `AffineScope` (eg. `FuncOp`), 2. a value defined
 at the top level of an `AffineScope` op (i.e., immediately enclosed by the
 latter), 3. a value that dominates the `AffineScope` op enclosing the value's
 use, 4. the result of a
-[`constant` operation](Standard.md/#stdconstant-constantop), 5. the result of an
+constant operation, 5. the result of an
 [`affine.apply` operation](#affineapply-affineapplyop) that recursively takes as
 arguments any valid symbolic identifiers, or 6. the result of a
 [`dim` operation](MemRef.md/#memrefdim-mlirmemrefdimop) on either a memref that

diff  --git a/mlir/docs/Dialects/Func.md b/mlir/docs/Dialects/Func.md
new file mode 100644
index 0000000000000..4d94d1a2b0cd7
--- /dev/null
+++ b/mlir/docs/Dialects/Func.md
@@ -0,0 +1,15 @@
+# 'func' Dialect
+
+This dialect provides documentation for operations within the Func dialect.
+
+This dialect contains operations surrounding high order function
+abstractions, such as calls.
+
+**Please post an RFC on the [forum](https://llvm.discourse.group/c/mlir/31)
+before adding or changing any operation in this dialect.**
+
+[TOC]
+
+## Operations
+
+[include "Dialects/FuncOps.md"]

diff  --git a/mlir/docs/Dialects/Standard.md b/mlir/docs/Dialects/Standard.md
deleted file mode 100644
index 942a97676c8f7..0000000000000
--- a/mlir/docs/Dialects/Standard.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# 'std' Dialect
-
-This dialect provides documentation for operations within the Standard dialect.
-
-Note: This dialect is a collection of operations for several 
diff erent concepts,
-and should be split into multiple more-focused dialects accordingly.
-
-**Please post an RFC on the [forum](https://llvm.discourse.group/c/mlir/31)
-before adding or changing any operation in this dialect.**
-
-[TOC]
-
-## Operations
-
-[include "Dialects/StandardOps.md"]

diff  --git a/mlir/docs/Dialects/Vector.md b/mlir/docs/Dialects/Vector.md
index 33289ab991039..c010c3cda53c0 100644
--- a/mlir/docs/Dialects/Vector.md
+++ b/mlir/docs/Dialects/Vector.md
@@ -99,7 +99,7 @@ Some existing Standard and Vector Dialect on `n-D` `vector` types comprise:
 
 ```mlir
 %2 = arith.addf %0, %1 : vector<3x7x8xf32> // -> vector<3x7x8xf32> %2 =
-arith.mulf %0, %1 : vector<3x7x8xf32> // -> vector<3x7x8xf32> %2 = std.splat
+arith.mulf %0, %1 : vector<3x7x8xf32> // -> vector<3x7x8xf32> %2 = vector.splat
 %1 : vector<3x7x8xf32> // -> vector<3x7x8xf32>
 
 %1 = vector.extract %0[1]: vector<3x7x8xf32> // -> vector<7x8xf32> %1 =

diff  --git a/mlir/docs/Dialects/emitc.md b/mlir/docs/Dialects/emitc.md
index e90fd32d3328a..8974e82c0bf78 100644
--- a/mlir/docs/Dialects/emitc.md
+++ b/mlir/docs/Dialects/emitc.md
@@ -26,10 +26,10 @@ translating the following operations:
 *   'cf' Dialect
     *   `cf.br`
     *   `cf.cond_br`
-*   'std' Dialect
-    *   `std.call`
-    *   `std.constant`
-    *   `std.return`
+*   'func' Dialect
+    *   `func.call`
+    *   `func.constant`
+    *   `func.return`
 *   'scf' Dialect
     *   `scf.for`
     *   `scf.if`

diff  --git a/mlir/docs/LangRef.md b/mlir/docs/LangRef.md
index 2fe1c6248c8a4..927d50f3bbe1c 100644
--- a/mlir/docs/LangRef.md
+++ b/mlir/docs/LangRef.md
@@ -256,10 +256,10 @@ between, and within, 
diff erent dialects.
 A few of the dialects supported by MLIR:
 
 *   [Affine dialect](Dialects/Affine.md)
+*   [Func dialect](Dialects/Func.md)
 *   [GPU dialect](Dialects/GPU.md)
 *   [LLVM dialect](Dialects/LLVM.md)
 *   [SPIR-V dialect](Dialects/SPIR-V.md)
-*   [Standard dialect](Dialects/Standard.md)
 *   [Vector dialect](Dialects/Vector.md)
 
 ### Target specific operations

diff  --git a/mlir/docs/OpDefinitions.md b/mlir/docs/OpDefinitions.md
index 09a3ca570060f..87c33b5574937 100644
--- a/mlir/docs/OpDefinitions.md
+++ b/mlir/docs/OpDefinitions.md
@@ -861,7 +861,7 @@ The `elements` of an optional group have the following requirements:
     -   All region variables can be used. When a non-variable length region is
         used, if the group is not present the region is empty.
 
-An example of an operation with an optional group is `std.return`, which has a
+An example of an operation with an optional group is `func.return`, which has a
 variadic number of operands.
 
 ```tablegen

diff  --git a/mlir/docs/Passes.md b/mlir/docs/Passes.md
index 13ec3ba4680d5..aeed41a706a0a 100644
--- a/mlir/docs/Passes.md
+++ b/mlir/docs/Passes.md
@@ -28,6 +28,10 @@ This document describes the available MLIR passes and their contracts.
 
 [include "ArithmeticPasses.md"]
 
+## `func` Dialect Passes
+
+[include "FuncPasses.md"]
+
 ## `gpu` Dialect Passes
 
 [include "GPUPasses.md"]
@@ -68,10 +72,6 @@ This document describes the available MLIR passes and their contracts.
 
 [include "SPIRVPasses.md"]
 
-## `standard` Dialect Passes
-
-[include "StandardPasses.md"]
-
 ## `tensor` Dialect Passes
 
 [include "TensorPasses.md"]

diff  --git a/mlir/docs/SymbolsAndSymbolTables.md b/mlir/docs/SymbolsAndSymbolTables.md
index 25df6e256df96..3786682f23697 100644
--- a/mlir/docs/SymbolsAndSymbolTables.md
+++ b/mlir/docs/SymbolsAndSymbolTables.md
@@ -33,7 +33,7 @@ result value, and may be referred to by other operations to provide a symbolic
 link, or use, to the symbol. An example of a `Symbol` operation is
 [`builtin.func`](Dialects/Builtin.md/#func-mlirfuncop). `builtin.func` defines a
 symbol name, which is [referred to](#referencing-a-symbol) by operations like
-[`std.call`](Dialects/Standard.md/#stdcall-callop).
+[`func.call`](Dialects/Func.md/#funccall-callop).
 
 ### Defining or declaring a Symbol
 

diff  --git a/mlir/docs/TargetLLVMIR.md b/mlir/docs/TargetLLVMIR.md
index f56ada65ea8ab..e3ebe9973ba23 100644
--- a/mlir/docs/TargetLLVMIR.md
+++ b/mlir/docs/TargetLLVMIR.md
@@ -348,7 +348,7 @@ individual scalar arguments.
 
 Examples:
 
-This convention is implemented in the conversion of `std.func` and `std.call` to
+This convention is implemented in the conversion of `builtin.func` and `func.call` to
 the LLVM dialect, with the former unpacking the descriptor into a set of
 individual values and the latter packing those values back into a descriptor so
 as to make it transparently usable by other operations. Conversions from other
@@ -481,7 +481,7 @@ be returned from a function, the ranked descriptor it points to is copied into
 dynamically allocated memory, and the pointer in the unranked descriptor is
 updated accordingly. The allocation happens immediately before returning. It is
 the responsibility of the caller to free the dynamically allocated memory. The
-default conversion of `std.call` and `std.call_indirect` copies the ranked
+default conversion of `func.call` and `func.call_indirect` copies the ranked
 descriptor to newly allocated memory on the caller's stack. Thus, the convention
 of the ranked memref descriptor pointed to by an unranked memref descriptor
 being stored on stack is respected.

diff  --git a/mlir/docs/Tutorials/CreatingADialect.md b/mlir/docs/Tutorials/CreatingADialect.md
index 3f39cfcec840a..2926c3682ede3 100644
--- a/mlir/docs/Tutorials/CreatingADialect.md
+++ b/mlir/docs/Tutorials/CreatingADialect.md
@@ -130,7 +130,7 @@ mlir/lib/Conversion/GPUCommon.
 Each conversion typically exists in a separate library, declared with
 add_mlir_conversion_library().  Conversion libraries typically depend
 on their source and target dialects, but may also depend on other
-dialects (e.g. MLIRStandard).  Typically this dependence is specified
+dialects (e.g. MLIRFunc).  Typically this dependence is specified
 using target_link_libraries() and the PUBLIC keyword.  For instance:
 
 ```cmake

diff  --git a/mlir/docs/Tutorials/Toy/Ch-5.md b/mlir/docs/Tutorials/Toy/Ch-5.md
index b5ab60628a359..0d04738e1e8b9 100644
--- a/mlir/docs/Tutorials/Toy/Ch-5.md
+++ b/mlir/docs/Tutorials/Toy/Ch-5.md
@@ -63,9 +63,9 @@ void ToyToAffineLoweringPass::runOnOperation() {
 
   // We define the specific operations, or dialects, that are legal targets for
   // this lowering. In our case, we are lowering to a combination of the
-  // `Affine`, `Arithmetic`, `MemRef`, and `Standard` dialects.
+  // `Affine`, `Arithmetic`, `Func`, and `MemRef` dialects.
   target.addLegalDialect<AffineDialect, arith::ArithmeticDialect,
-                         memref::MemRefDialect, StandardOpsDialect>();
+                         func::FuncDialect, memref::MemRefDialect>();
 
   // We also define the Toy dialect as Illegal so that the conversion will fail
   // if any of these operations are *not* converted. Given that we actually want

diff  --git a/mlir/examples/standalone/standalone-opt/standalone-opt.cpp b/mlir/examples/standalone/standalone-opt/standalone-opt.cpp
index e279545d8a1f1..5a1354d4648ef 100644
--- a/mlir/examples/standalone/standalone-opt/standalone-opt.cpp
+++ b/mlir/examples/standalone/standalone-opt/standalone-opt.cpp
@@ -28,7 +28,7 @@ int main(int argc, char **argv) {
 
   mlir::DialectRegistry registry;
   registry.insert<mlir::standalone::StandaloneDialect,
-                  mlir::arith::ArithmeticDialect, mlir::StandardOpsDialect>();
+                  mlir::arith::ArithmeticDialect, mlir::func::FuncDialect>();
   // Add the following to include *all* MLIR Core dialects, or selectively
   // include what you need like above. You only need to register dialects that
   // will be *parsed* by the tool, not the one generated

diff  --git a/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
index 545a71445ac7c..89941531cf49e 100644
--- a/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
+++ b/mlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
@@ -17,8 +17,8 @@
 
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "llvm/ADT/Sequence.h"
@@ -229,8 +229,8 @@ struct ReturnOpLowering : public OpRewritePattern<toy::ReturnOp> {
     if (op.hasOperand())
       return failure();
 
-    // We lower "toy.return" directly to "std.return".
-    rewriter.replaceOpWithNewOp<ReturnOp>(op);
+    // We lower "toy.return" directly to "func.return".
+    rewriter.replaceOpWithNewOp<func::ReturnOp>(op);
     return success();
   }
 };
@@ -279,7 +279,7 @@ namespace {
 struct ToyToAffineLoweringPass
     : public PassWrapper<ToyToAffineLoweringPass, OperationPass<FuncOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<AffineDialect, memref::MemRefDialect, StandardOpsDialect>();
+    registry.insert<AffineDialect, func::FuncDialect, memref::MemRefDialect>();
   }
   void runOnOperation() final;
 };
@@ -305,9 +305,9 @@ void ToyToAffineLoweringPass::runOnOperation() {
 
   // We define the specific operations, or dialects, that are legal targets for
   // this lowering. In our case, we are lowering to a combination of the
-  // `Affine`, `Arithmetic`, `MemRef`, and `Standard` dialects.
+  // `Affine`, `Arithmetic`, `Func`, and `MemRef` dialects.
   target.addLegalDialect<AffineDialect, arith::ArithmeticDialect,
-                         memref::MemRefDialect, StandardOpsDialect>();
+                         func::FuncDialect, memref::MemRefDialect>();
 
   // We also define the Toy dialect as Illegal so that the conversion will fail
   // if any of these operations are *not* converted. Given that we actually want

diff  --git a/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
index 78de920c2a257..fa7d4c784bfc4 100644
--- a/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
+++ b/mlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
@@ -17,8 +17,8 @@
 
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "llvm/ADT/Sequence.h"
@@ -229,8 +229,8 @@ struct ReturnOpLowering : public OpRewritePattern<toy::ReturnOp> {
     if (op.hasOperand())
       return failure();
 
-    // We lower "toy.return" directly to "std.return".
-    rewriter.replaceOpWithNewOp<ReturnOp>(op);
+    // We lower "toy.return" directly to "func.return".
+    rewriter.replaceOpWithNewOp<func::ReturnOp>(op);
     return success();
   }
 };
@@ -279,7 +279,7 @@ namespace {
 struct ToyToAffineLoweringPass
     : public PassWrapper<ToyToAffineLoweringPass, OperationPass<FuncOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<AffineDialect, memref::MemRefDialect, StandardOpsDialect>();
+    registry.insert<AffineDialect, func::FuncDialect, memref::MemRefDialect>();
   }
   void runOnOperation() final;
 };
@@ -305,9 +305,9 @@ void ToyToAffineLoweringPass::runOnOperation() {
 
   // We define the specific operations, or dialects, that are legal targets for
   // this lowering. In our case, we are lowering to a combination of the
-  // `Affine`, `Arithmetic`, `MemRef`, and `Standard` dialects.
+  // `Affine`, `Arithmetic`, `Func`, and `MemRef` dialects.
   target.addLegalDialect<AffineDialect, arith::ArithmeticDialect,
-                         memref::MemRefDialect, StandardOpsDialect>();
+                         func::FuncDialect, memref::MemRefDialect>();
 
   // We also define the Toy dialect as Illegal so that the conversion will fail
   // if any of these operations are *not* converted. Given that we actually want

diff  --git a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
index 855566b3f46fb..ca7a598633983 100644
--- a/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
+++ b/mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
@@ -35,10 +35,10 @@
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "llvm/ADT/Sequence.h"
@@ -91,8 +91,8 @@ class PrintOpLowering : public ConversionPattern {
 
       // Insert a newline after each of the inner dimensions of the shape.
       if (i != e - 1)
-        rewriter.create<CallOp>(loc, printfRef, rewriter.getIntegerType(32),
-                                newLineCst);
+        rewriter.create<func::CallOp>(loc, printfRef,
+                                      rewriter.getIntegerType(32), newLineCst);
       rewriter.create<scf::YieldOp>(loc);
       rewriter.setInsertionPointToStart(loop.getBody());
     }
@@ -101,8 +101,9 @@ class PrintOpLowering : public ConversionPattern {
     auto printOp = cast<toy::PrintOp>(op);
     auto elementLoad =
         rewriter.create<memref::LoadOp>(loc, printOp.input(), loopIvs);
-    rewriter.create<CallOp>(loc, printfRef, rewriter.getIntegerType(32),
-                            ArrayRef<Value>({formatSpecifierCst, elementLoad}));
+    rewriter.create<func::CallOp>(
+        loc, printfRef, rewriter.getIntegerType(32),
+        ArrayRef<Value>({formatSpecifierCst, elementLoad}));
 
     // Notify the rewriter that this operation has been removed.
     rewriter.eraseOp(op);

diff  --git a/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp b/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
index 78de920c2a257..fa7d4c784bfc4 100644
--- a/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
+++ b/mlir/examples/toy/Ch7/mlir/LowerToAffineLoops.cpp
@@ -17,8 +17,8 @@
 
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "llvm/ADT/Sequence.h"
@@ -229,8 +229,8 @@ struct ReturnOpLowering : public OpRewritePattern<toy::ReturnOp> {
     if (op.hasOperand())
       return failure();
 
-    // We lower "toy.return" directly to "std.return".
-    rewriter.replaceOpWithNewOp<ReturnOp>(op);
+    // We lower "toy.return" directly to "func.return".
+    rewriter.replaceOpWithNewOp<func::ReturnOp>(op);
     return success();
   }
 };
@@ -279,7 +279,7 @@ namespace {
 struct ToyToAffineLoweringPass
     : public PassWrapper<ToyToAffineLoweringPass, OperationPass<FuncOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<AffineDialect, memref::MemRefDialect, StandardOpsDialect>();
+    registry.insert<AffineDialect, func::FuncDialect, memref::MemRefDialect>();
   }
   void runOnOperation() final;
 };
@@ -305,9 +305,9 @@ void ToyToAffineLoweringPass::runOnOperation() {
 
   // We define the specific operations, or dialects, that are legal targets for
   // this lowering. In our case, we are lowering to a combination of the
-  // `Affine`, `Arithmetic`, `MemRef`, and `Standard` dialects.
+  // `Affine`, `Arithmetic`, `Func`, and `MemRef` dialects.
   target.addLegalDialect<AffineDialect, arith::ArithmeticDialect,
-                         memref::MemRefDialect, StandardOpsDialect>();
+                         func::FuncDialect, memref::MemRefDialect>();
 
   // We also define the Toy dialect as Illegal so that the conversion will fail
   // if any of these operations are *not* converted. Given that we actually want

diff  --git a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
index 855566b3f46fb..ca7a598633983 100644
--- a/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
+++ b/mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
@@ -35,10 +35,10 @@
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "llvm/ADT/Sequence.h"
@@ -91,8 +91,8 @@ class PrintOpLowering : public ConversionPattern {
 
       // Insert a newline after each of the inner dimensions of the shape.
       if (i != e - 1)
-        rewriter.create<CallOp>(loc, printfRef, rewriter.getIntegerType(32),
-                                newLineCst);
+        rewriter.create<func::CallOp>(loc, printfRef,
+                                      rewriter.getIntegerType(32), newLineCst);
       rewriter.create<scf::YieldOp>(loc);
       rewriter.setInsertionPointToStart(loop.getBody());
     }
@@ -101,8 +101,9 @@ class PrintOpLowering : public ConversionPattern {
     auto printOp = cast<toy::PrintOp>(op);
     auto elementLoad =
         rewriter.create<memref::LoadOp>(loc, printOp.input(), loopIvs);
-    rewriter.create<CallOp>(loc, printfRef, rewriter.getIntegerType(32),
-                            ArrayRef<Value>({formatSpecifierCst, elementLoad}));
+    rewriter.create<func::CallOp>(
+        loc, printfRef, rewriter.getIntegerType(32),
+        ArrayRef<Value>({formatSpecifierCst, elementLoad}));
 
     // Notify the rewriter that this operation has been removed.
     rewriter.eraseOp(op);

diff  --git a/mlir/include/mlir-c/Dialect/Standard.h b/mlir/include/mlir-c/Dialect/Func.h
similarity index 72%
rename from mlir/include/mlir-c/Dialect/Standard.h
rename to mlir/include/mlir-c/Dialect/Func.h
index 200962177cb95..4bdac4268d0c9 100644
--- a/mlir/include/mlir-c/Dialect/Standard.h
+++ b/mlir/include/mlir-c/Dialect/Func.h
@@ -1,4 +1,4 @@
-//===-- mlir-c/Dialect/Standard.h - C API for Standard dialect ----*- C -*-===//
+//===-- mlir-c/Dialect/Func.h - C API for Func dialect ------------*- C -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM
 // Exceptions.
@@ -8,15 +8,15 @@
 //===----------------------------------------------------------------------===//
 //
 // This header declares the C interface for registering and accessing the
-// Standard dialect. A dialect should be registered with a context to make it
+// Func dialect. A dialect should be registered with a context to make it
 // available to users of the context. These users must load the dialect
 // before using any of its attributes, operations or types. Parser and pass
 // manager can load registered dialects automatically.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MLIR_C_DIALECT_STANDARD_H
-#define MLIR_C_DIALECT_STANDARD_H
+#ifndef MLIR_C_DIALECT_FUNC_H
+#define MLIR_C_DIALECT_FUNC_H
 
 #include "mlir-c/Registration.h"
 
@@ -24,10 +24,10 @@
 extern "C" {
 #endif
 
-MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Standard, std);
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Func, func);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif // MLIR_C_DIALECT_STANDARD_H
+#endif // MLIR_C_DIALECT_FUNC_H

diff  --git a/mlir/include/mlir-c/Registration.h b/mlir/include/mlir-c/Registration.h
index 442449626632c..ab37866d9c5ef 100644
--- a/mlir/include/mlir-c/Registration.h
+++ b/mlir/include/mlir-c/Registration.h
@@ -20,7 +20,7 @@ extern "C" {
 // Dialect registration declarations.
 // Registration entry-points for each dialect are declared using the common
 // MLIR_DECLARE_DIALECT_REGISTRATION_CAPI macro, which takes the dialect
-// API name (i.e. "Standard", "Tensor", "Linalg") and namespace (i.e. "std",
+// API name (i.e. "Func", "Tensor", "Linalg") and namespace (i.e. "func",
 // "tensor", "linalg"). The following declarations are produced:
 //
 //   /// Gets the above hook methods in struct form for a dialect by namespace.

diff  --git a/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h b/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
index 89d884469770d..9214b333cfde0 100644
--- a/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
+++ b/mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
@@ -25,8 +25,8 @@ class MLIRContext;
 /// to derive the bitwidth from the LLVM data layout.
 static constexpr unsigned kDeriveIndexBitwidthFromDataLayout = 0;
 
-/// Options to control the Standard dialect to LLVM lowering. The struct is used
-/// to share lowering options between passes, patterns, and type converter.
+/// Options to control the LLVM lowering. The struct is used to share lowering
+/// options between passes, patterns, and type converter.
 class LowerToLLVMOptions {
 public:
   explicit LowerToLLVMOptions(MLIRContext *ctx);

diff  --git a/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h b/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
index aa59fda2d5fb5..e5d4b5fd8e9d6 100644
--- a/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
+++ b/mlir/include/mlir/Conversion/LLVMCommon/TypeConverter.h
@@ -26,7 +26,7 @@ namespace LLVM {
 class LLVMDialect;
 } // namespace LLVM
 
-/// Conversion from types in the Standard dialect to the LLVM IR dialect.
+/// Conversion from types to the LLVM IR dialect.
 class LLVMTypeConverter : public TypeConverter {
   /// Give structFuncArgTypeConverter access to memref-specific functions.
   friend LogicalResult

diff  --git a/mlir/include/mlir/Conversion/LinalgToStandard/LinalgToStandard.h b/mlir/include/mlir/Conversion/LinalgToStandard/LinalgToStandard.h
index ff538ac8ec1c7..a891962634ffd 100644
--- a/mlir/include/mlir/Conversion/LinalgToStandard/LinalgToStandard.h
+++ b/mlir/include/mlir/Conversion/LinalgToStandard/LinalgToStandard.h
@@ -20,7 +20,7 @@ class OperationPass;
 namespace linalg {
 
 //===----------------------------------------------------------------------===//
-// Patterns to convert a LinalgOp to std.call @external library implementation.
+// Patterns to convert a LinalgOp to func.call @external library implementation.
 //===----------------------------------------------------------------------===//
 // These patterns are exposed individually because they are expected to be
 // typically used individually.

diff  --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td
index 09a5b9358b940..33bc5c28d7451 100644
--- a/mlir/include/mlir/Conversion/Passes.td
+++ b/mlir/include/mlir/Conversion/Passes.td
@@ -67,9 +67,9 @@ def ConvertAffineToStandard : Pass<"lower-affine"> {
   }];
   let constructor = "mlir::createLowerAffinePass()";
   let dependentDialects = [
+    "func::FuncDialect",
     "memref::MemRefDialect",
     "scf::SCFDialect",
-    "StandardOpsDialect",
     "vector::VectorDialect"
   ];
 }
@@ -227,9 +227,9 @@ def ConvertGpuOpsToNVVMOps : Pass<"convert-gpu-to-nvvm", "gpu::GPUModuleOp"> {
   let summary = "Generate NVVM operations for gpu operations";
   let constructor = "mlir::createLowerGpuOpsToNVVMOpsPass()";
   let dependentDialects = [
+    "func::FuncDialect",
     "memref::MemRefDialect",
     "NVVM::NVVMDialect",
-    "StandardOpsDialect",
   ];
   let options = [
     Option<"indexBitwidth", "index-bitwidth", "unsigned",
@@ -327,7 +327,7 @@ def ConvertLinalgToStandard : Pass<"convert-linalg-to-std", "ModuleOp"> {
   let summary = "Convert the operations from the linalg dialect into the "
                 "Standard dialect";
   let constructor = "mlir::createConvertLinalgToStandardPass()";
-  let dependentDialects = ["memref::MemRefDialect", "StandardOpsDialect"];
+  let dependentDialects = ["func::FuncDialect", "memref::MemRefDialect"];
 }
 
 //===----------------------------------------------------------------------===//
@@ -356,7 +356,7 @@ def ConvertMathToLibm : Pass<"convert-math-to-libm", "ModuleOp"> {
   let constructor = "mlir::createConvertMathToLibmPass()";
   let dependentDialects = [
     "arith::ArithmeticDialect",
-    "StandardOpsDialect",
+    "func::FuncDialect",
     "vector::VectorDialect",
   ];
 }
@@ -553,7 +553,7 @@ def ConvertShapeToStandard : Pass<"convert-shape-to-std", "ModuleOp"> {
                 "dialect";
   let constructor = "mlir::createConvertShapeToStandardPass()";
   let dependentDialects = [
-    "StandardOpsDialect",
+    "func::FuncDialect",
     "scf::SCFDialect",
   ];
 }
@@ -705,7 +705,7 @@ def TosaToStandard : Pass<"tosa-to-standard"> {
   let summary = "Lower TOSA to the Standard dialect";
   let dependentDialects = [
     "arith::ArithmeticDialect",
-    "StandardOpsDialect",
+    "func::FuncDialect",
     "tensor::TensorDialect",
   ];
   let description = [{

diff  --git a/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h b/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
index 66b82264445b9..1f649f358a2a4 100644
--- a/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
+++ b/mlir/include/mlir/Conversion/VectorToSCF/VectorToSCF.h
@@ -74,7 +74,7 @@ struct VectorTransferToSCFOptions {
   }
 };
 
-/// Collect a set of patterns to convert from the Vector dialect to SCF + std.
+/// Collect a set of patterns to convert from the Vector dialect to SCF + func.
 void populateVectorToSCFConversionPatterns(
     RewritePatternSet &patterns,
     const VectorTransferToSCFOptions &options = VectorTransferToSCFOptions());

diff  --git a/mlir/include/mlir/Dialect/Affine/Analysis/AffineAnalysis.h b/mlir/include/mlir/Dialect/Affine/Analysis/AffineAnalysis.h
index 872b1f8743955..af2bebbccaab6 100644
--- a/mlir/include/mlir/Dialect/Affine/Analysis/AffineAnalysis.h
+++ b/mlir/include/mlir/Dialect/Affine/Analysis/AffineAnalysis.h
@@ -16,7 +16,7 @@
 #define MLIR_DIALECT_AFFINE_ANALYSIS_AFFINEANALYSIS_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/Value.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/SmallVector.h"

diff  --git a/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.td b/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.td
index 3452ccdca6dae..ab45bebce8920 100644
--- a/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/Arithmetic/Transforms/Passes.td
@@ -31,7 +31,7 @@ def ArithmeticBufferize : Pass<"arith-bufferize", "ModuleOp"> {
 def ArithmeticExpandOps : Pass<"arith-expand"> {
   let summary = "Legalize Arithmetic ops to be convertible to LLVM.";
   let constructor = "mlir::arith::createArithmeticExpandOpsPass()";
-  let dependentDialects = ["StandardOpsDialect"];
+  let dependentDialects = ["func::FuncDialect"];
 }
 
 #endif // MLIR_DIALECT_ARITHMETIC_TRANSFORMS_PASSES

diff  --git a/mlir/include/mlir/Dialect/ArmSVE/ArmSVEDialect.h b/mlir/include/mlir/Dialect/ArmSVE/ArmSVEDialect.h
index 47686dd5424b9..282623caf15ac 100644
--- a/mlir/include/mlir/Dialect/ArmSVE/ArmSVEDialect.h
+++ b/mlir/include/mlir/Dialect/ArmSVE/ArmSVEDialect.h
@@ -19,7 +19,7 @@
 #include "mlir/Interfaces/SideEffectInterfaces.h"
 
 #include "mlir/Dialect/ArmSVE/ArmSVEDialect.h.inc"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 #define GET_OP_CLASSES
 #include "mlir/Dialect/ArmSVE/ArmSVE.h.inc"

diff  --git a/mlir/include/mlir/Dialect/CMakeLists.txt b/mlir/include/mlir/Dialect/CMakeLists.txt
index 7dd5843288135..d61773dc416c6 100644
--- a/mlir/include/mlir/Dialect/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/CMakeLists.txt
@@ -9,6 +9,7 @@ add_subdirectory(Complex)
 add_subdirectory(ControlFlow)
 add_subdirectory(DLTI)
 add_subdirectory(EmitC)
+add_subdirectory(Func)
 add_subdirectory(GPU)
 add_subdirectory(Math)
 add_subdirectory(Linalg)
@@ -23,7 +24,6 @@ add_subdirectory(SCF)
 add_subdirectory(Shape)
 add_subdirectory(SparseTensor)
 add_subdirectory(SPIRV)
-add_subdirectory(StandardOps)
 add_subdirectory(Tensor)
 add_subdirectory(Tosa)
 add_subdirectory(Vector)

diff  --git a/mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td b/mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
index ba0ed638b7df3..b7ca06448db44 100644
--- a/mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
+++ b/mlir/include/mlir/Dialect/ControlFlow/IR/ControlFlowOps.td
@@ -11,8 +11,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef STANDARD_OPS
-#define STANDARD_OPS
+#ifndef MLIR_DIALECTS_CONTROLFLOW_IR_CONTROLFLOWOPS_TD
+#define MLIR_DIALECTS_CONTROLFLOW_IR_CONTROLFLOWOPS_TD
 
 include "mlir/IR/OpAsmInterface.td"
 include "mlir/Interfaces/ControlFlowInterfaces.td"
@@ -310,4 +310,4 @@ def SwitchOp : CF_Op<"switch",
   let hasVerifier = 1;
 }
 
-#endif // STANDARD_OPS
+#endif // MLIR_DIALECTS_CONTROLFLOW_IR_CONTROLFLOWOPS_TD

diff  --git a/mlir/include/mlir/Dialect/StandardOps/CMakeLists.txt b/mlir/include/mlir/Dialect/Func/CMakeLists.txt
similarity index 100%
rename from mlir/include/mlir/Dialect/StandardOps/CMakeLists.txt
rename to mlir/include/mlir/Dialect/Func/CMakeLists.txt

diff  --git a/mlir/include/mlir/Dialect/Func/IR/CMakeLists.txt b/mlir/include/mlir/Dialect/Func/IR/CMakeLists.txt
new file mode 100644
index 0000000000000..08a6123dd2006
--- /dev/null
+++ b/mlir/include/mlir/Dialect/Func/IR/CMakeLists.txt
@@ -0,0 +1,8 @@
+set(LLVM_TARGET_DEFINITIONS FuncOps.td)
+mlir_tablegen(FuncOps.h.inc -gen-op-decls)
+mlir_tablegen(FuncOps.cpp.inc -gen-op-defs)
+mlir_tablegen(FuncOpsDialect.h.inc -gen-dialect-decls)
+mlir_tablegen(FuncOpsDialect.cpp.inc -gen-dialect-defs)
+add_public_tablegen_target(MLIRFuncOpsIncGen)
+
+add_mlir_doc(FuncOps FuncOps Dialects/ -gen-op-doc)

diff  --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h b/mlir/include/mlir/Dialect/Func/IR/FuncOps.h
similarity index 51%
rename from mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
rename to mlir/include/mlir/Dialect/Func/IR/FuncOps.h
index 6964621d67563..8e1bf85bda115 100644
--- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.h
+++ b/mlir/include/mlir/Dialect/Func/IR/FuncOps.h
@@ -1,44 +1,32 @@
-//===- Ops.h - Standard MLIR Operations -------------------------*- C++ -*-===//
+//===- FuncOps.h - Func Dialect Operations ----------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-//
-// This file defines convenience types for working with standard operations
-// in the MLIR operation set.
-//
-//===----------------------------------------------------------------------===//
 
-#ifndef MLIR_DIALECT_STANDARDOPS_IR_OPS_H
-#define MLIR_DIALECT_STANDARDOPS_IR_OPS_H
+#ifndef MLIR_DIALECT_FUNC_IR_OPS_H
+#define MLIR_DIALECT_FUNC_IR_OPS_H
 
 #include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
 #include "mlir/IR/Builders.h"
+#include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Dialect.h"
 #include "mlir/IR/OpImplementation.h"
 #include "mlir/Interfaces/CallInterfaces.h"
-#include "mlir/Interfaces/CastInterfaces.h"
 #include "mlir/Interfaces/ControlFlowInterfaces.h"
 #include "mlir/Interfaces/InferTypeOpInterface.h"
 #include "mlir/Interfaces/SideEffectInterfaces.h"
 
-// Pull in all enum type definitions and utility function declarations.
-#include "mlir/Dialect/StandardOps/IR/OpsEnums.h.inc"
-
 namespace mlir {
-class AffineMap;
-class Builder;
-class FuncOp;
-class OpBuilder;
 class PatternRewriter;
 } // namespace mlir
 
 #define GET_OP_CLASSES
-#include "mlir/Dialect/StandardOps/IR/Ops.h.inc"
+#include "mlir/Dialect/Func/IR/FuncOps.h.inc"
 
-#include "mlir/Dialect/StandardOps/IR/OpsDialect.h.inc"
+#include "mlir/Dialect/Func/IR/FuncOpsDialect.h.inc"
 
-#endif // MLIR_DIALECT_STANDARDOPS_IR_OPS_H
+#endif // MLIR_DIALECT_FUNC_IR_OPS_H

diff  --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/Func/IR/FuncOps.td
similarity index 74%
rename from mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
rename to mlir/include/mlir/Dialect/Func/IR/FuncOps.td
index 4fa909c56b695..a2fd77305daa9 100644
--- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
+++ b/mlir/include/mlir/Dialect/Func/IR/FuncOps.td
@@ -1,56 +1,51 @@
-//===- Ops.td - Standard operation definitions -------------*- tablegen -*-===//
+//===- FuncOps.td - Func operation definitions -------------*- tablegen -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-//
-// Defines some MLIR standard operations.
-//
-//===----------------------------------------------------------------------===//
 
-#ifndef STANDARD_OPS
-#define STANDARD_OPS
+#ifndef MLIR_DIALECT_FUNC_IR_FUNCOPS_TD
+#define MLIR_DIALECT_FUNC_IR_FUNCOPS_TD
 
 include "mlir/IR/OpAsmInterface.td"
 include "mlir/IR/SymbolInterfaces.td"
 include "mlir/Interfaces/CallInterfaces.td"
-include "mlir/Interfaces/CastInterfaces.td"
 include "mlir/Interfaces/ControlFlowInterfaces.td"
 include "mlir/Interfaces/InferTypeOpInterface.td"
 include "mlir/Interfaces/SideEffectInterfaces.td"
 
-def StandardOps_Dialect : Dialect {
-  let name = "std";
-  let cppNamespace = "::mlir";
+def Func_Dialect : Dialect {
+  let name = "func";
+  let cppNamespace = "::mlir::func";
   let dependentDialects = ["cf::ControlFlowDialect"];
   let hasConstantMaterializer = 1;
   let emitAccessorPrefix = kEmitAccessorPrefix_Prefixed;
 }
 
-// Base class for Standard dialect ops.
-class Std_Op<string mnemonic, list<Trait> traits = []> :
-    Op<StandardOps_Dialect, mnemonic, traits>;
+// Base class for Func dialect ops.
+class Func_Op<string mnemonic, list<Trait> traits = []> :
+    Op<Func_Dialect, mnemonic, traits>;
 
 //===----------------------------------------------------------------------===//
 // CallOp
 //===----------------------------------------------------------------------===//
 
-def CallOp : Std_Op<"call",
+def CallOp : Func_Op<"call",
     [CallOpInterface, MemRefsNormalizable,
      DeclareOpInterfaceMethods<SymbolUserOpInterface>]> {
   let summary = "call operation";
   let description = [{
-    The `call` operation represents a direct call to a function that is within
-    the same symbol scope as the call. The operands and result types of the
-    call must match the specified function type. The callee is encoded as a
+    The `func.call` operation represents a direct call to a function that is
+    within the same symbol scope as the call. The operands and result types of
+    the call must match the specified function type. The callee is encoded as a
     symbol reference attribute named "callee".
 
     Example:
 
     ```mlir
-    %2 = call @my_add(%0, %1) : (f32, f32) -> f32
+    %2 = func.call @my_add(%0, %1) : (f32, f32) -> f32
     ```
   }];
 
@@ -105,7 +100,7 @@ def CallOp : Std_Op<"call",
 // CallIndirectOp
 //===----------------------------------------------------------------------===//
 
-def CallIndirectOp : Std_Op<"call_indirect", [
+def CallIndirectOp : Func_Op<"call_indirect", [
       CallOpInterface,
       TypesMatchWith<"callee input types match argument types",
                      "callee", "callee_operands",
@@ -116,19 +111,18 @@ def CallIndirectOp : Std_Op<"call_indirect", [
     ]> {
   let summary = "indirect call operation";
   let description = [{
-    The `call_indirect` operation represents an indirect call to a value of
-    function type. Functions are first class types in MLIR, and may be passed as
-    arguments and merged together with block arguments. The operands and result
-    types of the call must match the specified function type.
+    The `func.call_indirect` operation represents an indirect call to a value
+    of function type. The operands and result types of the call must match the
+    specified function type.
 
     Function values can be created with the
-    [`constant` operation](#stdconstant-constantop).
+    [`func.constant` operation](#funcconstant-constantop).
 
     Example:
 
     ```mlir
-    %31 = call_indirect %15(%0, %1)
-            : (tensor<16xf32>, tensor<16xf32>) -> tensor<16xf32>
+    %func = func.constant @my_func : (tensor<16xf32>, tensor<16xf32>) -> tensor<16xf32>
+    %result = func.call_indirect %func(%0, %1) : (tensor<16xf32>, tensor<16xf32>) -> tensor<16xf32>
     ```
   }];
 
@@ -160,38 +154,31 @@ def CallIndirectOp : Std_Op<"call_indirect", [
   }];
 
   let hasCanonicalizeMethod = 1;
-
-  let assemblyFormat =
-    "$callee `(` $callee_operands `)` attr-dict `:` type($callee)";
+  let assemblyFormat = [{
+    $callee `(` $callee_operands `)` attr-dict `:` type($callee)
+  }];
 }
 
 //===----------------------------------------------------------------------===//
 // ConstantOp
 //===----------------------------------------------------------------------===//
 
-def ConstantOp : Std_Op<"constant",
+def ConstantOp : Func_Op<"constant",
     [ConstantLike, NoSideEffect,
      DeclareOpInterfaceMethods<OpAsmOpInterface, ["getAsmResultNames"]>]> {
   let summary = "constant";
   let description = [{
-    Syntax:
-
-    ```
-    operation ::= ssa-id `=` `std.constant` attribute-value `:` type
-    ```
-
-    The `constant` operation produces an SSA value from a symbol reference to a
-    `builtin.func` operation
+    The `func.constant` operation produces an SSA value from a symbol reference
+    to a `func.func` operation
 
     Example:
 
     ```mlir
     // Reference to function @myfn.
-    %2 = constant @myfn : (tensor<16xf32>, f32) -> tensor<16xf32>
+    %2 = func.constant @myfn : (tensor<16xf32>, f32) -> tensor<16xf32>
 
     // Equivalent generic forms
-    %2 = "std.constant"() {value = @myfn}
-       : () -> ((tensor<16xf32>, f32) -> tensor<16xf32>)
+    %2 = "func.constant"() { value = @myfn } : () -> ((tensor<16xf32>, f32) -> tensor<16xf32>)
     ```
 
     MLIR does not allow direct references to functions in SSA operands because
@@ -218,11 +205,11 @@ def ConstantOp : Std_Op<"constant",
 // ReturnOp
 //===----------------------------------------------------------------------===//
 
-def ReturnOp : Std_Op<"return", [NoSideEffect, HasParent<"FuncOp">,
+def ReturnOp : Func_Op<"return", [NoSideEffect, HasParent<"FuncOp">,
                                 MemRefsNormalizable, ReturnLike, Terminator]> {
-  let summary = "return operation";
+  let summary = "Function return operation";
   let description = [{
-    The `return` operation represents a return operation within a function.
+    The `func.return` operation represents a return operation within a function.
     The operation takes variable number of operands and produces no results.
     The operand number and types must match the signature of the function
     that contains the operation.
@@ -230,7 +217,7 @@ def ReturnOp : Std_Op<"return", [NoSideEffect, HasParent<"FuncOp">,
     Example:
 
     ```mlir
-    func @foo() : (i32, f8) {
+    func.func @foo() : (i32, f8) {
       ...
       return %0, %1 : i32, f8
     }
@@ -239,12 +226,12 @@ def ReturnOp : Std_Op<"return", [NoSideEffect, HasParent<"FuncOp">,
 
   let arguments = (ins Variadic<AnyType>:$operands);
 
-  let builders = [
-    OpBuilder<(ins),
-    [{ build($_builder, $_state, llvm::None); }]>];
+  let builders = [OpBuilder<(ins), [{
+    build($_builder, $_state, llvm::None);
+  }]>];
 
   let assemblyFormat = "attr-dict ($operands^ `:` type($operands))?";
   let hasVerifier = 1;
 }
 
-#endif // STANDARD_OPS
+#endif // MLIR_DIALECT_FUNC_IR_FUNCOPS_TD

diff  --git a/mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt
new file mode 100644
index 0000000000000..33c72e3c075cc
--- /dev/null
+++ b/mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt
@@ -0,0 +1,5 @@
+set(LLVM_TARGET_DEFINITIONS Passes.td)
+mlir_tablegen(Passes.h.inc -gen-pass-decls -name Func)
+add_public_tablegen_target(MLIRFuncTransformsIncGen)
+
+add_mlir_doc(Passes FuncPasses ./ -gen-pass-doc)

diff  --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h b/mlir/include/mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h
similarity index 95%
rename from mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h
rename to mlir/include/mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h
index d96e17604d128..3f811d7e12d8e 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h
+++ b/mlir/include/mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h
@@ -15,8 +15,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MLIR_DIALECT_STANDARDOPS_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H
-#define MLIR_DIALECT_STANDARDOPS_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H
+#ifndef MLIR_DIALECT_FUNC_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H
+#define MLIR_DIALECT_FUNC_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H
 
 #include "mlir/Transforms/DialectConversion.h"
 
@@ -88,4 +88,4 @@ void populateDecomposeCallGraphTypesPatterns(MLIRContext *context,
 
 } // namespace mlir
 
-#endif // MLIR_DIALECT_STANDARDOPS_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H
+#endif // MLIR_DIALECT_FUNC_TRANSFORMS_DECOMPOSECALLGRAPHTYPES_H

diff  --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h b/mlir/include/mlir/Dialect/Func/Transforms/FuncConversions.h
similarity index 90%
rename from mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h
rename to mlir/include/mlir/Dialect/Func/Transforms/FuncConversions.h
index 8457805217bef..adcd3087b7e2f 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/FuncConversions.h
+++ b/mlir/include/mlir/Dialect/Func/Transforms/FuncConversions.h
@@ -1,4 +1,4 @@
-//===- FuncConversions.h - Patterns for converting std.funcs ----*- C++ -*-===//
+//===- FuncConversions.h - Patterns for converting func.func ----*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,12 +6,12 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This files contains patterns for converting standard functions.
+// This files contains patterns for converting functions.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MLIR_DIALECT_STANDARDOPS_TRANSFORMS_FUNCCONVERSIONS_H_
-#define MLIR_DIALECT_STANDARDOPS_TRANSFORMS_FUNCCONVERSIONS_H_
+#ifndef MLIR_DIALECT_FUNC_TRANSFORMS_FUNCCONVERSIONS_H_
+#define MLIR_DIALECT_FUNC_TRANSFORMS_FUNCCONVERSIONS_H_
 
 #include "mlir/Support/LLVM.h"
 #include "llvm/ADT/STLExtras.h"
@@ -70,4 +70,4 @@ bool isLegalForReturnOpTypeConversionPattern(Operation *op,
 bool isNotBranchOpInterfaceOrReturnLikeOp(Operation *op);
 } // namespace mlir
 
-#endif // MLIR_DIALECT_STANDARDOPS_TRANSFORMS_FUNCCONVERSIONS_H_
+#endif // MLIR_DIALECT_FUNC_TRANSFORMS_FUNCCONVERSIONS_H_

diff  --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h b/mlir/include/mlir/Dialect/Func/Transforms/Passes.h
similarity index 81%
rename from mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
rename to mlir/include/mlir/Dialect/Func/Transforms/Passes.h
index 57bd00313dc2e..5dd3059a1f86a 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/Func/Transforms/Passes.h
@@ -6,13 +6,13 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This header file defines prototypes that expose pass constructors in the loop
+// This header file defines prototypes that expose pass constructors in the Func
 // transformation library.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MLIR_DIALECT_STANDARDOPS_TRANSFORMS_PASSES_H
-#define MLIR_DIALECT_STANDARDOPS_TRANSFORMS_PASSES_H
+#ifndef MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_H
+#define MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_H
 
 #include "mlir/Pass/Pass.h"
 
@@ -23,6 +23,7 @@ class BufferizeTypeConverter;
 
 class RewritePatternSet;
 
+namespace func {
 /// Creates an instance of func bufferization pass.
 std::unique_ptr<Pass> createFuncBufferizePass();
 
@@ -32,8 +33,9 @@ std::unique_ptr<Pass> createFuncBufferizePass();
 
 /// Generate the code for registering passes.
 #define GEN_PASS_REGISTRATION
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h.inc"
+#include "mlir/Dialect/Func/Transforms/Passes.h.inc"
 
+} // namespace func
 } // namespace mlir
 
-#endif // MLIR_DIALECT_STANDARDOPS_TRANSFORMS_PASSES_H
+#endif // MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_H

diff  --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td b/mlir/include/mlir/Dialect/Func/Transforms/Passes.td
similarity index 78%
rename from mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td
rename to mlir/include/mlir/Dialect/Func/Transforms/Passes.td
index c871379f45087..d928e2f069458 100644
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/Func/Transforms/Passes.td
@@ -1,4 +1,4 @@
-//===-- Passes.td - StandardOps pass definition file -------*- tablegen -*-===//
+//===-- Passes.td - Func pass definition file --------------*- tablegen -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,17 +6,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MLIR_DIALECT_STANDARD_TRANSFORMS_PASSES
-#define MLIR_DIALECT_STANDARD_TRANSFORMS_PASSES
+#ifndef MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_TD
+#define MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_TD
 
 include "mlir/Pass/PassBase.td"
 
 def FuncBufferize : Pass<"func-bufferize", "ModuleOp"> {
   let summary = "Bufferize func/call/return ops";
   let description = [{
-    A bufferize pass that bufferizes std.func and std.call ops.
+    A bufferize pass that bufferizes builtin.func and func.call ops.
 
-    Because this pass updates std.func ops, it must be a module pass. It is
+    Because this pass updates builtin.func ops, it must be a module pass. It is
     useful to keep this pass separate from other bufferizations so that the
     other ones can be run at function-level in parallel.
 
@@ -35,9 +35,9 @@ def FuncBufferize : Pass<"func-bufferize", "ModuleOp"> {
     Finally, this pass fails for unknown terminators, as we cannot decide
     whether they need rewriting.
   }];
-  let constructor = "mlir::createFuncBufferizePass()";
+  let constructor = "mlir::func::createFuncBufferizePass()";
   let dependentDialects = ["bufferization::BufferizationDialect",
                            "memref::MemRefDialect"];
 }
 
-#endif // MLIR_DIALECT_STANDARD_TRANSFORMS_PASSES
+#endif // MLIR_DIALECT_FUNC_TRANSFORMS_PASSES_TD

diff  --git a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
index 4c0146056aa72..54c1fa9968ac4 100644
--- a/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
+++ b/mlir/include/mlir/Dialect/Linalg/Transforms/Transforms.h
@@ -541,9 +541,9 @@ makeTiledLoopRanges(RewriterBase &b, Location loc, AffineMap map,
 /// operand_dim_1 = dim %operand, 1 : memref<50x100xf32>
 /// scf.for %k = %c0 to operand_dim_0 step %c10 {
 ///   scf.for %l = %c0 to operand_dim_1 step %c25 {
-///     %4 = std.subview %operand[%k, %l][%c10, %c25][%c1, %c1]
+///     %4 = memref.subview %operand[%k, %l][%c10, %c25][%c1, %c1]
 ///       : memref<50x100xf32> to memref<?x?xf32, #strided>
-///     %5 = std.subview %result[%k, %l][%c10, %c25][%c1, %c1]
+///     %5 = memref.subview %result[%k, %l][%c10, %c25][%c1, %c1]
 ///       : memref<50x100xf32> to memref<?x?xf32, #strided>
 ///     linalg.generic pointwise_2d_trait %4, %5 {
 ///     ^bb0(%operand_in: f32, %result_in: f32):

diff  --git a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
index dfc2a30c5c519..310d4d29202d1 100644
--- a/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
+++ b/mlir/include/mlir/Dialect/Linalg/Utils/Utils.h
@@ -9,10 +9,10 @@
 #ifndef MLIR_DIALECT_LINALG_UTILS_UTILS_H
 #define MLIR_DIALECT_LINALG_UTILS_UTILS_H
 
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SetVector.h"
 

diff  --git a/mlir/include/mlir/Dialect/Math/IR/MathOps.td b/mlir/include/mlir/Dialect/Math/IR/MathOps.td
index d0bfdf4544782..c636c70ded7eb 100644
--- a/mlir/include/mlir/Dialect/Math/IR/MathOps.td
+++ b/mlir/include/mlir/Dialect/Math/IR/MathOps.td
@@ -732,12 +732,6 @@ def Math_SqrtOp : Math_FloatUnaryOp<"sqrt"> {
 def Math_TanhOp : Math_FloatUnaryOp<"tanh"> {
   let summary = "hyperbolic tangent of the specified value";
   let description = [{
-    Syntax:
-
-    ```
-    operation ::= ssa-id `=` `std.tanh` ssa-use `:` type
-    ```
-
     The `tanh` operation computes the hyperbolic tangent. It takes one operand
     and returns one result of the same type. This type may be a float scalar
     type, a vector whose element type is float, or a tensor of floats. It has

diff  --git a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
index ae4ce7d4b0909..f4e126ee3f6ad 100644
--- a/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
+++ b/mlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
@@ -903,7 +903,7 @@ def LoadOp : MemRef_Op<"load",
     In an `affine.if` or `affine.for` body, the indices of a load are restricted
     to SSA values bound to surrounding loop induction variables,
     [symbols](Affine.md/#dimensions-and-symbols), results of a
-    [`constant` operation](Standard.md/#stdconstant-constantop), or the result of an
+    constant operations, or the result of an
     `affine.apply` operation that can in turn take as arguments all of the
     aforementioned SSA values or the recursively result of such an
     `affine.apply` operation.

diff  --git a/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h b/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h
index 701a8c36d111b..e7bfe739e24a9 100644
--- a/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h
+++ b/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.h
@@ -18,7 +18,9 @@
 namespace mlir {
 
 class AffineDialect;
-class StandardOpsDialect;
+namespace func {
+class FuncDialect;
+} // namespace func
 namespace tensor {
 class TensorDialect;
 } // namespace tensor

diff  --git a/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td b/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
index 0f2e3a91a2554..9cf6f3dfc5138 100644
--- a/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/MemRef/Transforms/Passes.td
@@ -14,7 +14,7 @@ include "mlir/Pass/PassBase.td"
 def ExpandOps : Pass<"memref-expand", "FuncOp"> {
   let summary = "Legalize memref operations to be convertible to LLVM.";
   let constructor = "mlir::memref::createExpandOpsPass()";
-  let dependentDialects = ["StandardOpsDialect"];
+  let dependentDialects = ["func::FuncDialect"];
 }
 
 def FoldSubViewOps : Pass<"fold-memref-subview-ops"> {
@@ -45,7 +45,7 @@ def NormalizeMemRefs : Pass<"normalize-memrefs", "ModuleOp"> {
     contained in the op. Operations marked with the [MemRefsNormalizable]
     (https://mlir.llvm.org/docs/Traits/#memrefsnormalizable) trait are
     expected to be normalizable. Supported operations include affine
-    operations, memref.alloc, memref.dealloc, and std.return.
+    operations, memref.alloc, memref.dealloc, and func.return.
 
     Given an appropriate layout map specified in the code, this transformation
     can express tiled or linearized access to multi-dimensional data

diff  --git a/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td b/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td
index 61fe1261e6dd9..56100641281de 100644
--- a/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td
+++ b/mlir/include/mlir/Dialect/PDL/IR/PDLOps.td
@@ -314,7 +314,7 @@ def PDL_OperationOp : PDL_Op<"operation", [AttrSizedOperandSegments]> {
 
     ```mlir
     // Define an instance with single range of operands.
-    %op = pdl.operation "std.return"(%allArgs : !pdl.range<value>)
+    %op = pdl.operation "func.return"(%allArgs : !pdl.range<value>)
     ```
 
     2) A variadic number of either !pdl.value or !pdl.range<value>:

diff  --git a/mlir/include/mlir/Dialect/StandardOps/IR/CMakeLists.txt b/mlir/include/mlir/Dialect/StandardOps/IR/CMakeLists.txt
deleted file mode 100644
index c1756e94ba128..0000000000000
--- a/mlir/include/mlir/Dialect/StandardOps/IR/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-set(LLVM_TARGET_DEFINITIONS Ops.td)
-mlir_tablegen(Ops.h.inc -gen-op-decls)
-mlir_tablegen(Ops.cpp.inc -gen-op-defs)
-mlir_tablegen(OpsDialect.h.inc -gen-dialect-decls)
-mlir_tablegen(OpsDialect.cpp.inc -gen-dialect-defs)
-mlir_tablegen(OpsEnums.h.inc -gen-enum-decls)
-mlir_tablegen(OpsEnums.cpp.inc -gen-enum-defs)
-add_public_tablegen_target(MLIRStandardOpsIncGen)
-
-add_mlir_doc(Ops StandardOps Dialects/ -gen-op-doc)

diff  --git a/mlir/include/mlir/Dialect/StandardOps/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/StandardOps/Transforms/CMakeLists.txt
deleted file mode 100644
index 4cfeeded772d0..0000000000000
--- a/mlir/include/mlir/Dialect/StandardOps/Transforms/CMakeLists.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-set(LLVM_TARGET_DEFINITIONS Passes.td)
-mlir_tablegen(Passes.h.inc -gen-pass-decls -name Standard)
-add_public_tablegen_target(MLIRStandardTransformsIncGen)
-
-add_mlir_doc(Passes StandardPasses ./ -gen-pass-doc)

diff  --git a/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h b/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
index b0508c067d900..218aa120718da 100644
--- a/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
+++ b/mlir/include/mlir/Dialect/Tosa/Transforms/PassDetail.h
@@ -9,7 +9,7 @@
 #ifndef MLIR_DIALECT_TOSA_TRANSFORMS_PASSDETAIL_H
 #define MLIR_DIALECT_TOSA_TRANSFORMS_PASSDETAIL_H
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Pass/Pass.h"

diff  --git a/mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td b/mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
index 0de4d3229f132..8a929775b8353 100644
--- a/mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
@@ -24,7 +24,7 @@ def TosaInferShapes : Pass<"tosa-infer-shapes", "FuncOp"> {
 
   let constructor = "createTosaInferShapesPass()";
   let dependentDialects = [
-    "StandardOpsDialect",
+    "func::FuncDialect",
     "tensor::TensorDialect",
     "tosa::TosaDialect",
   ];

diff  --git a/mlir/include/mlir/Dialect/Tosa/Utils/CoversionUtils.h b/mlir/include/mlir/Dialect/Tosa/Utils/CoversionUtils.h
index 0848979be31eb..7182bb77de1ce 100644
--- a/mlir/include/mlir/Dialect/Tosa/Utils/CoversionUtils.h
+++ b/mlir/include/mlir/Dialect/Tosa/Utils/CoversionUtils.h
@@ -14,7 +14,7 @@
 #define DIALECT_TOSA_UTILS_COVERSION_UTILS_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/Dialect/Utils/StructuredOpsUtils.h"
 #include "mlir/IR/PatternMatch.h"

diff  --git a/mlir/include/mlir/InitAllDialects.h b/mlir/include/mlir/InitAllDialects.h
index 7cc54c00aaa39..9487876ef32af 100644
--- a/mlir/include/mlir/InitAllDialects.h
+++ b/mlir/include/mlir/InitAllDialects.h
@@ -26,6 +26,7 @@
 #include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
 #include "mlir/Dialect/DLTI/DLTI.h"
 #include "mlir/Dialect/EmitC/IR/EmitC.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/LLVMIR/NVVMDialect.h"
@@ -44,7 +45,6 @@
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
 #include "mlir/Dialect/SparseTensor/IR/SparseTensor.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/Tensor/IR/TensorTilingInterfaceImpl.h"
@@ -71,6 +71,7 @@ inline void registerAllDialects(DialectRegistry &registry) {
                   complex::ComplexDialect,
                   DLTIDialect,
                   emitc::EmitCDialect,
+                  func::FuncDialect,
                   gpu::GPUDialect,
                   LLVM::LLVMDialect,
                   linalg::LinalgDialect,
@@ -82,7 +83,6 @@ inline void registerAllDialects(DialectRegistry &registry) {
                   pdl_interp::PDLInterpDialect,
                   quant::QuantizationDialect,
                   spirv::SPIRVDialect,
-                  StandardOpsDialect,
                   arm_sve::ArmSVEDialect,
                   vector::VectorDialect,
                   NVVM::NVVMDialect,

diff  --git a/mlir/include/mlir/InitAllPasses.h b/mlir/include/mlir/InitAllPasses.h
index eb74ca02a8eac..ccbb74d5a7b26 100644
--- a/mlir/include/mlir/InitAllPasses.h
+++ b/mlir/include/mlir/InitAllPasses.h
@@ -19,6 +19,7 @@
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
 #include "mlir/Dialect/Async/Passes.h"
 #include "mlir/Dialect/Bufferization/Transforms/Passes.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/Passes.h"
@@ -29,7 +30,6 @@
 #include "mlir/Dialect/Shape/Transforms/Passes.h"
 #include "mlir/Dialect/SparseTensor/Pipelines/Passes.h"
 #include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/Dialect/Tensor/Transforms/Passes.h"
 #include "mlir/Dialect/Tosa/Transforms/Passes.h"
 #include "mlir/Dialect/Vector/Transforms/Passes.h"
@@ -58,6 +58,7 @@ inline void registerAllPasses() {
   registerAsyncPasses();
   arith::registerArithmeticPasses();
   bufferization::registerBufferizationPasses();
+  func::registerFuncPasses();
   registerGPUPasses();
   registerGpuSerializeToCubinPass();
   registerGpuSerializeToHsacoPass();
@@ -69,7 +70,6 @@ inline void registerAllPasses() {
   registerSCFPasses();
   registerShapePasses();
   spirv::registerSPIRVPasses();
-  registerStandardPasses();
   tensor::registerTensorPasses();
   tosa::registerTosaOptPasses();
   vector::registerVectorPasses();

diff  --git a/mlir/lib/CAPI/Dialect/CMakeLists.txt b/mlir/lib/CAPI/Dialect/CMakeLists.txt
index f66f7b0b87227..9822f059e6cc6 100644
--- a/mlir/lib/CAPI/Dialect/CMakeLists.txt
+++ b/mlir/lib/CAPI/Dialect/CMakeLists.txt
@@ -80,13 +80,13 @@ add_mlir_upstream_c_api_library(MLIRCAPISparseTensor
   MLIRSparseTensorTransforms
 )
 
-add_mlir_upstream_c_api_library(MLIRCAPIStandard
-  Standard.cpp
+add_mlir_upstream_c_api_library(MLIRCAPIFunc
+  Func.cpp
 
   PARTIAL_SOURCES_INTENDED
   LINK_LIBS PUBLIC
   MLIRCAPIIR
-  MLIRStandard
+  MLIRFunc
 )
 
 add_mlir_upstream_c_api_library(MLIRCAPITensor

diff  --git a/mlir/lib/CAPI/Dialect/Standard.cpp b/mlir/lib/CAPI/Dialect/Func.cpp
similarity index 60%
rename from mlir/lib/CAPI/Dialect/Standard.cpp
rename to mlir/lib/CAPI/Dialect/Func.cpp
index 57083a8a21a38..a49d2f4258ee3 100644
--- a/mlir/lib/CAPI/Dialect/Standard.cpp
+++ b/mlir/lib/CAPI/Dialect/Func.cpp
@@ -1,4 +1,4 @@
-//===- Standard.cpp - C Interface for Standard dialect --------------------===//
+//===- Func.cpp - C Interface for Func dialect ----------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir-c/Dialect/Standard.h"
+#include "mlir-c/Dialect/Func.h"
 #include "mlir/CAPI/Registration.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
-MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Standard, std, mlir::StandardOpsDialect)
+MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Func, func, mlir::func::FuncDialect)

diff  --git a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
index 7c91af4c49f09..78d8fd2c89b65 100644
--- a/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
+++ b/mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
@@ -16,9 +16,9 @@
 #include "../PassDetail.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/Utils.h"
+#include "mlir/Dialect/Func/IR/FuncOps.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/BlockAndValueMapping.h"
 #include "mlir/IR/IntegerSet.h"
@@ -553,9 +553,9 @@ class LowerAffinePass : public ConvertAffineToStandardBase<LowerAffinePass> {
     populateAffineToStdConversionPatterns(patterns);
     populateAffineToVectorConversionPatterns(patterns);
     ConversionTarget target(getContext());
-    target
-        .addLegalDialect<arith::ArithmeticDialect, memref::MemRefDialect,
-                         scf::SCFDialect, StandardOpsDialect, VectorDialect>();
+    target.addLegalDialect<arith::ArithmeticDialect, func::FuncDialect,
+                           memref::MemRefDialect, scf::SCFDialect,
+                           VectorDialect>();
     if (failed(applyPartialConversion(getOperation(), target,
                                       std::move(patterns))))
       signalPassFailure();

diff  --git a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
index 9ad3f6b12106a..36969a0be4567 100644
--- a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
+++ b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
@@ -14,11 +14,11 @@ add_mlir_conversion_library(MLIRAffineToStandard
   MLIRAffine
   MLIRAffineUtils
   MLIRArithmetic
+  MLIRFunc
   MLIRIR
   MLIRMemRef
   MLIRSCF
   MLIRPass
-  MLIRStandard
   MLIRTransforms
   MLIRVector
   )

diff  --git a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
index a709a97c2fe0a..6b2007a208093 100644
--- a/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
+++ b/mlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp
@@ -14,10 +14,10 @@
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Async/IR/Async.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
 #include "mlir/Dialect/LLVMIR/FunctionCallUtils.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
-#include "mlir/Dialect/StandardOps/Transforms/FuncConversions.h"
 #include "mlir/IR/ImplicitLocOpBuilder.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Pass/Pass.h"
@@ -549,8 +549,8 @@ class RuntimeCreateOpLowering : public OpConversionPattern<RuntimeCreateOp> {
 
     // Tokens creation maps to a simple function call.
     if (resultType.isa<TokenType>()) {
-      rewriter.replaceOpWithNewOp<CallOp>(op, kCreateToken,
-                                          converter->convertType(resultType));
+      rewriter.replaceOpWithNewOp<func::CallOp>(
+          op, kCreateToken, converter->convertType(resultType));
       return success();
     }
 
@@ -574,8 +574,8 @@ class RuntimeCreateOpLowering : public OpConversionPattern<RuntimeCreateOp> {
         return rewriter.create<LLVM::PtrToIntOp>(loc, i64, gep);
       };
 
-      rewriter.replaceOpWithNewOp<CallOp>(op, kCreateValue, resultType,
-                                          sizeOf(value));
+      rewriter.replaceOpWithNewOp<func::CallOp>(op, kCreateValue, resultType,
+                                                sizeOf(value));
 
       return success();
     }
@@ -601,9 +601,9 @@ class RuntimeCreateGroupOpLowering
     TypeConverter *converter = getTypeConverter();
     Type resultType = op.getResult().getType();
 
-    rewriter.replaceOpWithNewOp<CallOp>(op, kCreateGroup,
-                                        converter->convertType(resultType),
-                                        adaptor.getOperands());
+    rewriter.replaceOpWithNewOp<func::CallOp>(
+        op, kCreateGroup, converter->convertType(resultType),
+        adaptor.getOperands());
     return success();
   }
 };
@@ -627,8 +627,8 @@ class RuntimeSetAvailableOpLowering
             .Case<TokenType>([](Type) { return kEmplaceToken; })
             .Case<ValueType>([](Type) { return kEmplaceValue; });
 
-    rewriter.replaceOpWithNewOp<CallOp>(op, apiFuncName, TypeRange(),
-                                        adaptor.getOperands());
+    rewriter.replaceOpWithNewOp<func::CallOp>(op, apiFuncName, TypeRange(),
+                                              adaptor.getOperands());
 
     return success();
   }
@@ -653,8 +653,8 @@ class RuntimeSetErrorOpLowering
             .Case<TokenType>([](Type) { return kSetTokenError; })
             .Case<ValueType>([](Type) { return kSetValueError; });
 
-    rewriter.replaceOpWithNewOp<CallOp>(op, apiFuncName, TypeRange(),
-                                        adaptor.getOperands());
+    rewriter.replaceOpWithNewOp<func::CallOp>(op, apiFuncName, TypeRange(),
+                                              adaptor.getOperands());
 
     return success();
   }
@@ -679,8 +679,8 @@ class RuntimeIsErrorOpLowering : public OpConversionPattern<RuntimeIsErrorOp> {
             .Case<GroupType>([](Type) { return kIsGroupError; })
             .Case<ValueType>([](Type) { return kIsValueError; });
 
-    rewriter.replaceOpWithNewOp<CallOp>(op, apiFuncName, rewriter.getI1Type(),
-                                        adaptor.getOperands());
+    rewriter.replaceOpWithNewOp<func::CallOp>(
+        op, apiFuncName, rewriter.getI1Type(), adaptor.getOperands());
     return success();
   }
 };
@@ -704,8 +704,8 @@ class RuntimeAwaitOpLowering : public OpConversionPattern<RuntimeAwaitOp> {
             .Case<ValueType>([](Type) { return kAwaitValue; })
             .Case<GroupType>([](Type) { return kAwaitGroup; });
 
-    rewriter.create<CallOp>(op->getLoc(), apiFuncName, TypeRange(),
-                            adaptor.getOperands());
+    rewriter.create<func::CallOp>(op->getLoc(), apiFuncName, TypeRange(),
+                                  adaptor.getOperands());
     rewriter.eraseOp(op);
 
     return success();
@@ -741,8 +741,9 @@ class RuntimeAwaitAndResumeOpLowering
     auto resumePtr = rewriter.create<LLVM::AddressOfOp>(
         op->getLoc(), LLVM::LLVMPointerType::get(resumeFnTy), kResume);
 
-    rewriter.create<CallOp>(op->getLoc(), apiFuncName, TypeRange(),
-                            ValueRange({operand, handle, resumePtr.getRes()}));
+    rewriter.create<func::CallOp>(
+        op->getLoc(), apiFuncName, TypeRange(),
+        ValueRange({operand, handle, resumePtr.getRes()}));
     rewriter.eraseOp(op);
 
     return success();
@@ -770,7 +771,7 @@ class RuntimeResumeOpLowering : public OpConversionPattern<RuntimeResumeOp> {
 
     // Call async runtime API to execute a coroutine in the managed thread.
     auto coroHdl = adaptor.handle();
-    rewriter.replaceOpWithNewOp<CallOp>(
+    rewriter.replaceOpWithNewOp<func::CallOp>(
         op, TypeRange(), kExecute, ValueRange({coroHdl, resumePtr.getRes()}));
 
     return success();
@@ -795,8 +796,8 @@ class RuntimeStoreOpLowering : public OpConversionPattern<RuntimeStoreOp> {
     // Get a pointer to the async value storage from the runtime.
     auto i8Ptr = AsyncAPI::opaquePointerType(rewriter.getContext());
     auto storage = adaptor.storage();
-    auto storagePtr = rewriter.create<CallOp>(loc, kGetValueStorage,
-                                              TypeRange(i8Ptr), storage);
+    auto storagePtr = rewriter.create<func::CallOp>(loc, kGetValueStorage,
+                                                    TypeRange(i8Ptr), storage);
 
     // Cast from i8* to the LLVM pointer type.
     auto valueType = op.value().getType();
@@ -838,8 +839,8 @@ class RuntimeLoadOpLowering : public OpConversionPattern<RuntimeLoadOp> {
     // Get a pointer to the async value storage from the runtime.
     auto i8Ptr = AsyncAPI::opaquePointerType(rewriter.getContext());
     auto storage = adaptor.storage();
-    auto storagePtr = rewriter.create<CallOp>(loc, kGetValueStorage,
-                                              TypeRange(i8Ptr), storage);
+    auto storagePtr = rewriter.create<func::CallOp>(loc, kGetValueStorage,
+                                                    TypeRange(i8Ptr), storage);
 
     // Cast from i8* to the LLVM pointer type.
     auto valueType = op.result().getType();
@@ -878,7 +879,7 @@ class RuntimeAddToGroupOpLowering
       return rewriter.notifyMatchFailure(op, "only token type is supported");
 
     // Replace with a runtime API function call.
-    rewriter.replaceOpWithNewOp<CallOp>(
+    rewriter.replaceOpWithNewOp<func::CallOp>(
         op, kAddTokenToGroup, rewriter.getI64Type(), adaptor.getOperands());
 
     return success();
@@ -902,8 +903,8 @@ class RuntimeNumWorkerThreadsOpLowering
                   ConversionPatternRewriter &rewriter) const override {
 
     // Replace with a runtime API function call.
-    rewriter.replaceOpWithNewOp<CallOp>(op, kGetNumWorkerThreads,
-                                        rewriter.getIndexType());
+    rewriter.replaceOpWithNewOp<func::CallOp>(op, kGetNumWorkerThreads,
+                                              rewriter.getIndexType());
 
     return success();
   }
@@ -932,8 +933,8 @@ class RefCountingOpLowering : public OpConversionPattern<RefCountingOp> {
         rewriter.getI64IntegerAttr(op.count()));
 
     auto operand = adaptor.operand();
-    rewriter.replaceOpWithNewOp<CallOp>(op, TypeRange(), apiFunctionName,
-                                        ValueRange({operand, count}));
+    rewriter.replaceOpWithNewOp<func::CallOp>(op, TypeRange(), apiFunctionName,
+                                              ValueRange({operand, count}));
 
     return success();
   }
@@ -961,14 +962,14 @@ class RuntimeDropRefOpLowering
 //===----------------------------------------------------------------------===//
 
 namespace {
-class ReturnOpOpConversion : public OpConversionPattern<ReturnOp> {
+class ReturnOpOpConversion : public OpConversionPattern<func::ReturnOp> {
 public:
   using OpConversionPattern::OpConversionPattern;
 
   LogicalResult
-  matchAndRewrite(ReturnOp op, OpAdaptor adaptor,
+  matchAndRewrite(func::ReturnOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    rewriter.replaceOpWithNewOp<ReturnOp>(op, adaptor.getOperands());
+    rewriter.replaceOpWithNewOp<func::ReturnOp>(op, adaptor.getOperands());
     return success();
   }
 };
@@ -1032,8 +1033,8 @@ void ConvertAsyncToLLVMPass::runOnOperation() {
           converter, ctx);
 
   ConversionTarget target(*ctx);
-  target
-      .addLegalOp<arith::ConstantOp, ConstantOp, UnrealizedConversionCastOp>();
+  target.addLegalOp<arith::ConstantOp, func::ConstantOp,
+                    UnrealizedConversionCastOp>();
   target.addLegalDialect<LLVM::LLVMDialect>();
 
   // All operations from Async dialect must be lowered to the runtime API and
@@ -1043,9 +1044,10 @@ void ConvertAsyncToLLVMPass::runOnOperation() {
   // Add dynamic legality constraints to apply conversions defined above.
   target.addDynamicallyLegalOp<FuncOp>(
       [&](FuncOp op) { return converter.isSignatureLegal(op.getType()); });
-  target.addDynamicallyLegalOp<ReturnOp>(
-      [&](ReturnOp op) { return converter.isLegal(op.getOperandTypes()); });
-  target.addDynamicallyLegalOp<CallOp>([&](CallOp op) {
+  target.addDynamicallyLegalOp<func::ReturnOp>([&](func::ReturnOp op) {
+    return converter.isLegal(op.getOperandTypes());
+  });
+  target.addDynamicallyLegalOp<func::CallOp>([&](func::CallOp op) {
     return converter.isSignatureLegal(op.getCalleeType());
   });
 

diff  --git a/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt b/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
index f86c652fb467d..c797998b8551f 100644
--- a/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/AsyncToLLVM/CMakeLists.txt
@@ -13,9 +13,9 @@ add_mlir_conversion_library(MLIRAsyncToLLVM
   LINK_LIBS PUBLIC
   MLIRArithmetic
   MLIRAsync
+  MLIRFuncTransforms
   MLIRLLVMCommonConversion
   MLIRLLVMIR
-  MLIRStandardOpsTransforms
   MLIRStandardToLLVM
   MLIRTransforms
   )

diff  --git a/mlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt b/mlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
index 8f6a0d7edbddc..a02f97d259d02 100644
--- a/mlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
@@ -12,8 +12,8 @@ add_mlir_conversion_library(MLIRComplexToLLVM
 
   LINK_LIBS PUBLIC
   MLIRComplex
+  MLIRFuncTransforms
   MLIRLLVMCommonConversion
   MLIRLLVMIR
-  MLIRStandardOpsTransforms
   MLIRTransforms
   )

diff  --git a/mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp b/mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
index c061495fda0b4..5e2f707f44938 100644
--- a/mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
+++ b/mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
@@ -13,8 +13,8 @@
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Complex/IR/Complex.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 
 using namespace mlir;
 using namespace mlir::LLVM;

diff  --git a/mlir/lib/Conversion/ComplexToStandard/CMakeLists.txt b/mlir/lib/Conversion/ComplexToStandard/CMakeLists.txt
index 8579ec8feacf1..b592d3dd0051f 100644
--- a/mlir/lib/Conversion/ComplexToStandard/CMakeLists.txt
+++ b/mlir/lib/Conversion/ComplexToStandard/CMakeLists.txt
@@ -10,8 +10,8 @@ add_mlir_conversion_library(MLIRComplexToStandard
   LINK_LIBS PUBLIC
   MLIRArithmetic
   MLIRComplex
+  MLIRFunc
   MLIRIR
   MLIRMath
-  MLIRStandard
   MLIRTransforms
   )

diff  --git a/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp b/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
index 63f862dcce6bc..ae27bba06214c 100644
--- a/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
+++ b/mlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
@@ -14,8 +14,8 @@
 #include "../PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Complex/IR/Complex.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/ImplicitLocOpBuilder.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -652,7 +652,7 @@ void ConvertComplexToStandardPass::runOnOperation() {
   populateComplexToStandardConversionPatterns(patterns);
 
   ConversionTarget target(getContext());
-  target.addLegalDialect<arith::ArithmeticDialect, StandardOpsDialect,
+  target.addLegalDialect<arith::ArithmeticDialect, func::FuncDialect,
                          math::MathDialect>();
   target.addLegalOp<complex::CreateOp, complex::ImOp, complex::ReOp>();
   if (failed(applyPartialConversion(function, target, std::move(patterns))))

diff  --git a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp
index 2ba829567600c..cc97ef73d7bfa 100644
--- a/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp
+++ b/mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp
@@ -29,7 +29,7 @@ using namespace mlir;
 #define PASS_NAME "convert-cf-to-llvm"
 
 namespace {
-/// Lower `std.assert`. The default lowering calls the `abort` function if the
+/// Lower `cf.assert`. The default lowering calls the `abort` function if the
 /// assertion is violated and has no effect otherwise. The failure message is
 /// ignored by the default lowering but should be propagated by any custom
 /// lowering.

diff  --git a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
index 91926027d498f..f0577a7533cd7 100644
--- a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
+++ b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "GPUOpsLowering.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Builders.h"
 #include "llvm/Support/FormatVariadic.h"
 

diff  --git a/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h b/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
index b3f3dd901e9b8..97006b199b3f2 100644
--- a/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
+++ b/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
@@ -16,7 +16,7 @@
 namespace mlir {
 
 // Rewriting that replaces Op with XOp, YOp, or ZOp depending on the dimension
-// that Op operates on.  Op is assumed to return an `std.index` value and
+// that Op operates on.  Op is assumed to return an `index` value and
 // XOp, YOp and ZOp are assumed to return an `llvm.i32` value.  Depending on
 // `indexBitwidth`, sign-extend or truncate the resulting value to match the
 // bitwidth expected by the consumers of the value.

diff  --git a/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h b/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
index 00230c906dc2b..7a707e5aa54bc 100644
--- a/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
+++ b/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
@@ -9,9 +9,9 @@
 #define MLIR_CONVERSION_GPUCOMMON_OPTOFUNCCALLLOWERING_H_
 
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Builders.h"
 
 namespace mlir {
@@ -24,7 +24,7 @@ namespace mlir {
 /// function called and then the result casted back.
 ///
 /// Example with NVVM:
-///   %exp_f32 = std.exp %arg_f32 : f32
+///   %exp_f32 = math.exp %arg_f32 : f32
 ///
 /// will be transformed into
 ///   llvm.call @__nv_expf(%arg_f32) : (f32) -> f32

diff  --git a/mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt b/mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt
index c2249ae8333e8..8ac1039cbe2a8 100644
--- a/mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt
+++ b/mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt
@@ -6,13 +6,13 @@ add_mlir_conversion_library(MLIRGPUToVulkanTransforms
   MLIRConversionPassIncGen
 
   LINK_LIBS PUBLIC
+  MLIRFunc
   MLIRGPUOps
   MLIRIR
   MLIRLLVMIR
   MLIRPass
   MLIRSPIRV
   MLIRSPIRVSerialization
-  MLIRStandard
   MLIRSupport
   MLIRTransforms
   MLIRTranslation

diff  --git a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
index e106ebf3c44c4..c87922602278c 100644
--- a/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
+++ b/mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
@@ -15,10 +15,10 @@
 
 #include "../PassDetail.h"
 #include "mlir/Conversion/GPUToVulkan/ConvertGPUToVulkanPass.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
@@ -170,7 +170,7 @@ void ConvertGpuLaunchFuncToVulkanLaunchFunc::convertGpuLaunchFunc(
                               gpuLaunchOperands.end());
 
   // Create vulkan launch call op.
-  auto vulkanLaunchCallOp = builder.create<CallOp>(
+  auto vulkanLaunchCallOp = builder.create<func::CallOp>(
       loc, TypeRange{}, SymbolRefAttr::get(builder.getContext(), kVulkanLaunch),
       vulkanLaunchOperands);
 

diff  --git a/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp b/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp
index c654a30c7b03d..f8d81c57b7747 100644
--- a/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp
+++ b/mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp
@@ -7,12 +7,12 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Conversion/LinalgToSPIRV/LinalgToSPIRV.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
 #include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Utils/StructuredOpsUtils.h"
 #include "mlir/IR/AffineExpr.h"
 #include "mlir/Transforms/DialectConversion.h"

diff  --git a/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp b/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp
index 7b3afe8795347..cfa93c7e0ea6a 100644
--- a/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp
+++ b/mlir/lib/Conversion/LinalgToStandard/LinalgToStandard.cpp
@@ -10,11 +10,11 @@
 
 #include "../PassDetail.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/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 
 using namespace mlir;
 using namespace mlir::linalg;
@@ -102,7 +102,7 @@ LogicalResult mlir::linalg::LinalgOpToLibraryCallRewrite::matchAndRewrite(
 
   // TODO: Add support for more complex library call signatures that include
   // indices or captured values.
-  rewriter.replaceOpWithNewOp<mlir::CallOp>(
+  rewriter.replaceOpWithNewOp<func::CallOp>(
       op, libraryCallName.getValue(), TypeRange(),
       createTypeCanonicalizedMemRefOperands(rewriter, op->getLoc(),
                                             op->getOperands()));
@@ -129,9 +129,9 @@ void ConvertLinalgToStandardPass::runOnOperation() {
   auto module = getOperation();
   ConversionTarget target(getContext());
   target.addLegalDialect<AffineDialect, arith::ArithmeticDialect,
-                         memref::MemRefDialect, scf::SCFDialect,
-                         StandardOpsDialect>();
-  target.addLegalOp<ModuleOp, FuncOp, ReturnOp>();
+                         func::FuncDialect, memref::MemRefDialect,
+                         scf::SCFDialect>();
+  target.addLegalOp<ModuleOp, FuncOp, func::ReturnOp>();
   RewritePatternSet patterns(&getContext());
   populateLinalgToStandardConversionPatterns(patterns);
   if (failed(applyFullConversion(module, target, std::move(patterns))))

diff  --git a/mlir/lib/Conversion/MathToLibm/CMakeLists.txt b/mlir/lib/Conversion/MathToLibm/CMakeLists.txt
index c195aa2d82994..2e283f8b7ddac 100644
--- a/mlir/lib/Conversion/MathToLibm/CMakeLists.txt
+++ b/mlir/lib/Conversion/MathToLibm/CMakeLists.txt
@@ -13,8 +13,8 @@ add_mlir_conversion_library(MLIRMathToLibm
   LINK_LIBS PUBLIC
   MLIRArithmetic
   MLIRDialectUtils
+  MLIRFuncTransforms
   MLIRMath
-  MLIRStandardOpsTransforms
   MLIRVector
   MLIRVectorUtils
   )

diff  --git a/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp b/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
index 450f04bce6248..569625ff0eb3a 100644
--- a/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
+++ b/mlir/lib/Conversion/MathToLibm/MathToLibm.cpp
@@ -10,8 +10,8 @@
 
 #include "../PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Utils/IndexingUtils.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Dialect/Vector/Utils/VectorUtils.h"
@@ -107,8 +107,8 @@ ScalarOpToLibmCall<Op>::matchAndRewrite(Op op,
   }
   assert(isa<FunctionOpInterface>(SymbolTable::lookupSymbolIn(module, name)));
 
-  rewriter.replaceOpWithNewOp<CallOp>(op, name, op.getType(),
-                                      op->getOperands());
+  rewriter.replaceOpWithNewOp<func::CallOp>(op, name, op.getType(),
+                                            op->getOperands());
 
   return success();
 }
@@ -142,7 +142,7 @@ void ConvertMathToLibmPass::runOnOperation() {
 
   ConversionTarget target(getContext());
   target.addLegalDialect<arith::ArithmeticDialect, BuiltinDialect,
-                         StandardOpsDialect, vector::VectorDialect>();
+                         func::FuncDialect, vector::VectorDialect>();
   target.addIllegalDialect<math::MathDialect>();
   if (failed(applyPartialConversion(module, target, std::move(patterns))))
     signalPassFailure();

diff  --git a/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp b/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
index 56413c4155903..c0d9a2953291f 100644
--- a/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
+++ b/mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
@@ -1753,7 +1753,7 @@ struct ViewOpLowering : public ConvertOpToLLVMPattern<memref::ViewOp> {
 // AtomicRMWOpLowering
 //===----------------------------------------------------------------------===//
 
-/// Try to match the kind of a std.atomic_rmw to determine whether to use a
+/// Try to match the kind of a memref.atomic_rmw to determine whether to use a
 /// lowering to llvm.atomicrmw or fallback to llvm.cmpxchg.
 static Optional<LLVM::AtomicBinOp>
 matchSimpleAtomicOp(memref::AtomicRMWOp atomicOp) {

diff  --git a/mlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp b/mlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp
index 68fed9b5f3aa4..dc23a6ee7de44 100644
--- a/mlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp
+++ b/mlir/lib/Conversion/OpenACCToSCF/OpenACCToSCF.cpp
@@ -9,9 +9,9 @@
 #include "../PassDetail.h"
 #include "mlir/Conversion/OpenACCToSCF/ConvertOpenACCToSCF.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/OpenACC/OpenACC.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 using namespace mlir;

diff  --git a/mlir/lib/Conversion/PassDetail.h b/mlir/lib/Conversion/PassDetail.h
index 99841f0ec34d5..6eba8111293b1 100644
--- a/mlir/lib/Conversion/PassDetail.h
+++ b/mlir/lib/Conversion/PassDetail.h
@@ -15,7 +15,6 @@
 
 namespace mlir {
 class AffineDialect;
-class StandardOpsDialect;
 
 // Forward declaration from Dialect.h
 template <typename ConcreteDialect>
@@ -42,6 +41,10 @@ class GPUDialect;
 class GPUModuleOp;
 } // namespace gpu
 
+namespace func {
+class FuncDialect;
+} // namespace func
+
 namespace LLVM {
 class LLVMDialect;
 } // namespace LLVM

diff  --git a/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt b/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
index b787ddfc2e625..fd26f310db1ca 100644
--- a/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
+++ b/mlir/lib/Conversion/SCFToGPU/CMakeLists.txt
@@ -13,12 +13,12 @@ add_mlir_conversion_library(MLIRSCFToGPU
   MLIRAffineToStandard
   MLIRArithmetic
   MLIRComplex
+  MLIRFunc
   MLIRGPUTransforms
   MLIRIR
   MLIRLinalg
   MLIRMemRef
   MLIRPass
-  MLIRStandard
   MLIRSupport
   MLIRTransforms
   )

diff  --git a/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
index 99a8b83882970..523d234f27b06 100644
--- a/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
+++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
@@ -17,11 +17,11 @@
 #include "mlir/Conversion/AffineToStandard/AffineToStandard.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/GPU/ParallelLoopMapper.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/AffineExpr.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"

diff  --git a/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
index 6acfd3852f78e..52234844892f5 100644
--- a/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
+++ b/mlir/lib/Conversion/SCFToGPU/SCFToGPUPass.cpp
@@ -12,9 +12,9 @@
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Complex/IR/Complex.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 #include "llvm/ADT/ArrayRef.h"

diff  --git a/mlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt b/mlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt
index 2e26b7553f43d..c6ef843713b64 100644
--- a/mlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt
+++ b/mlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt
@@ -13,9 +13,9 @@ add_mlir_conversion_library(MLIRSCFToOpenMP
   LINK_LIBS PUBLIC
   MLIRAnalysis
   MLIRArithmetic
+  MLIRFunc
   MLIRLLVMIR
   MLIROpenMP
   MLIRSCF
-  MLIRStandard
   MLIRTransforms
   )

diff  --git a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
index c9c5017e0382e..6cb90ed6767ac 100644
--- a/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
+++ b/mlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
@@ -16,11 +16,11 @@
 #include "mlir/Analysis/SliceAnalysis.h"
 #include "mlir/Dialect/Affine/Analysis/LoopAnalysis.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/OpenMP/OpenMPDialect.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/ImplicitLocOpBuilder.h"
 #include "mlir/IR/SymbolTable.h"
 #include "mlir/Transforms/DialectConversion.h"

diff  --git a/mlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt b/mlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt
index 615c6b2a6d759..2f9412754926a 100644
--- a/mlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt
+++ b/mlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt
@@ -14,10 +14,10 @@ add_mlir_conversion_library(MLIRSCFToSPIRV
   MLIRSPIRV
   MLIRSPIRVConversion
   MLIRStandardToSPIRV
+  MLIRFunc
   MLIRIR
   MLIRPass
   MLIRSCF
-  MLIRStandard
   MLIRSupport
   MLIRTransforms
   )

diff  --git a/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp b/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp
index 9f1f93f9abf7c..867399821891d 100644
--- a/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp
+++ b/mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp
@@ -20,10 +20,10 @@
 #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h"
 #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/SymbolTable.h"
 #include "mlir/Transforms/DialectConversion.h"

diff  --git a/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp b/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
index 14ae384aa2dc9..0120bbc123d9b 100644
--- a/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
+++ b/mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
@@ -13,11 +13,11 @@
 #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h"
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
 #include "mlir/Conversion/LLVMCommon/TypeConverter.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
 #include "mlir/Dialect/SPIRV/Utils/LayoutUtils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Support/LogicalResult.h"

diff  --git a/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp b/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp
index f24ae5bbd6cf7..25d5d5b5856e4 100644
--- a/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp
+++ b/mlir/lib/Conversion/ShapeToStandard/ConvertShapeConstraints.cpp
@@ -10,9 +10,9 @@
 
 #include "../PassDetail.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.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/PatternMatch.h"
 #include "mlir/Pass/Pass.h"

diff  --git a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
index a7cf8a80fe8c2..bdeba081ca4c7 100644
--- a/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
+++ b/mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
@@ -10,9 +10,9 @@
 
 #include "../PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.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/BlockAndValueMapping.h"
 #include "mlir/IR/ImplicitLocOpBuilder.h"
@@ -668,7 +668,7 @@ void ConvertShapeToStandardPass::runOnOperation() {
   // Setup target legality.
   MLIRContext &ctx = getContext();
   ConversionTarget target(ctx);
-  target.addLegalDialect<arith::ArithmeticDialect, StandardOpsDialect,
+  target.addLegalDialect<arith::ArithmeticDialect, func::FuncDialect,
                          SCFDialect, tensor::TensorDialect>();
   target.addLegalOp<CstrRequireOp, FuncOp, ModuleOp>();
 

diff  --git a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt b/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
index ec31d8170ec05..feb42b153e722 100644
--- a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
+++ b/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
@@ -16,9 +16,9 @@ add_mlir_conversion_library(MLIRStandardToLLVM
   MLIRArithmeticToLLVM
   MLIRControlFlowToLLVM
   MLIRDataLayoutInterfaces
+  MLIRFunc
   MLIRLLVMCommonConversion
   MLIRLLVMIR
   MLIRMath
-  MLIRStandard
   MLIRTransforms
   )

diff  --git a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
index 6caaa0bfc993e..a98d89ea84af9 100644
--- a/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
+++ b/mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
@@ -20,9 +20,9 @@
 #include "mlir/Conversion/LLVMCommon/VectorPattern.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/FunctionCallUtils.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/IR/BlockAndValueMapping.h"
@@ -55,7 +55,7 @@ static void filterFuncAttributes(ArrayRef<NamedAttribute> attrs,
   for (const auto &attr : attrs) {
     if (attr.getName() == SymbolTable::getSymbolAttrName() ||
         attr.getName() == FunctionOpInterface::getTypeAttrName() ||
-        attr.getName() == "std.varargs" ||
+        attr.getName() == "func.varargs" ||
         (filterArgAttrs &&
          attr.getName() == FunctionOpInterface::getArgDictAttrName()))
       continue;
@@ -228,7 +228,7 @@ struct FuncOpConversionBase : public ConvertOpToLLVMPattern<FuncOp> {
                             ConversionPatternRewriter &rewriter) const {
     // Convert the original function arguments. They are converted using the
     // LLVMTypeConverter provided to this legalization pattern.
-    auto varargsAttr = funcOp->getAttrOfType<BoolAttr>("std.varargs");
+    auto varargsAttr = funcOp->getAttrOfType<BoolAttr>("func.varargs");
     TypeConverter::SignatureConversion result(funcOp.getNumArguments());
     auto llvmType = getTypeConverter()->convertFunctionSignature(
         funcOp.getType(), varargsAttr && varargsAttr.getValue(), result);
@@ -388,11 +388,11 @@ struct BarePtrFuncOpConversion : public FuncOpConversionBase {
   }
 };
 
-struct ConstantOpLowering : public ConvertOpToLLVMPattern<ConstantOp> {
-  using ConvertOpToLLVMPattern<ConstantOp>::ConvertOpToLLVMPattern;
+struct ConstantOpLowering : public ConvertOpToLLVMPattern<func::ConstantOp> {
+  using ConvertOpToLLVMPattern<func::ConstantOp>::ConvertOpToLLVMPattern;
 
   LogicalResult
-  matchAndRewrite(ConstantOp op, OpAdaptor adaptor,
+  matchAndRewrite(func::ConstantOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
     auto type = typeConverter->convertType(op.getResult().getType());
     if (!type || !LLVM::isCompatibleType(type))
@@ -474,11 +474,12 @@ struct CallOpInterfaceLowering : public ConvertOpToLLVMPattern<CallOpType> {
   }
 };
 
-struct CallOpLowering : public CallOpInterfaceLowering<CallOp> {
+struct CallOpLowering : public CallOpInterfaceLowering<func::CallOp> {
   using Super::Super;
 };
 
-struct CallIndirectOpLowering : public CallOpInterfaceLowering<CallIndirectOp> {
+struct CallIndirectOpLowering
+    : public CallOpInterfaceLowering<func::CallIndirectOp> {
   using Super::Super;
 };
 
@@ -515,11 +516,11 @@ struct UnrealizedConversionCastOpLowering
 // can only return 0 or 1 value, we pack multiple values into a structure type.
 // Emit `UndefOp` followed by `InsertValueOp`s to create such structure if
 // necessary before returning it
-struct ReturnOpLowering : public ConvertOpToLLVMPattern<ReturnOp> {
-  using ConvertOpToLLVMPattern<ReturnOp>::ConvertOpToLLVMPattern;
+struct ReturnOpLowering : public ConvertOpToLLVMPattern<func::ReturnOp> {
+  using ConvertOpToLLVMPattern<func::ReturnOp>::ConvertOpToLLVMPattern;
 
   LogicalResult
-  matchAndRewrite(ReturnOp op, OpAdaptor adaptor,
+  matchAndRewrite(func::ReturnOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
     Location loc = op.getLoc();
     unsigned numArguments = op.getNumOperands();

diff  --git a/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt b/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
index 979780aea2284..3589e9804d0b5 100644
--- a/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
+++ b/mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
@@ -12,6 +12,7 @@ add_mlir_conversion_library(MLIRStandardToSPIRV
   LINK_LIBS PUBLIC
   MLIRArithmeticToSPIRV
   MLIRControlFlowToSPIRV
+  MLIRFunc
   MLIRIR
   MLIRMathToSPIRV
   MLIRMemRef
@@ -20,6 +21,5 @@ add_mlir_conversion_library(MLIRStandardToSPIRV
   MLIRSPIRVConversion
   MLIRSupport
   MLIRTransformUtils
-  MLIRStandard
   MLIRTensor
   )

diff  --git a/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp b/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp
index 36d39c85bfbd2..e72863c8442a3 100644
--- a/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp
+++ b/mlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp
@@ -11,11 +11,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "../SPIRVCommon/Pattern.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
 #include "mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h"
 #include "mlir/Dialect/SPIRV/Utils/LayoutUtils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/AffineMap.h"
 #include "mlir/Support/LogicalResult.h"
@@ -36,13 +36,13 @@ using namespace mlir;
 
 namespace {
 
-/// Converts std.return to spv.Return.
-class ReturnOpPattern final : public OpConversionPattern<ReturnOp> {
+/// Converts func.return to spv.Return.
+class ReturnOpPattern final : public OpConversionPattern<func::ReturnOp> {
 public:
-  using OpConversionPattern<ReturnOp>::OpConversionPattern;
+  using OpConversionPattern<func::ReturnOp>::OpConversionPattern;
 
   LogicalResult
-  matchAndRewrite(ReturnOp returnOp, OpAdaptor adaptor,
+  matchAndRewrite(func::ReturnOp returnOp, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override;
 };
 
@@ -114,7 +114,7 @@ class TensorExtractPattern final
 //===----------------------------------------------------------------------===//
 
 LogicalResult
-ReturnOpPattern::matchAndRewrite(ReturnOp returnOp, OpAdaptor adaptor,
+ReturnOpPattern::matchAndRewrite(func::ReturnOp returnOp, OpAdaptor adaptor,
                                  ConversionPatternRewriter &rewriter) const {
   if (returnOp.getNumOperands() > 1)
     return failure();

diff  --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
index dad77e6612db0..c7cef4171d7c3 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
@@ -12,10 +12,10 @@
 
 #include "mlir/Conversion/TosaToLinalg/TosaToLinalg.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/Math/IR/Math.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tensor/Utils/Utils.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"

diff  --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
index a7fe498e98714..a3fd8b52b2f03 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp
@@ -12,10 +12,10 @@
 
 #include "mlir/Conversion/TosaToLinalg/TosaToLinalg.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/Math/IR/Math.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tensor/Utils/Utils.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"

diff  --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamedPass.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamedPass.cpp
index ccf6424390a2c..391b4ba5b6412 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamedPass.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamedPass.cpp
@@ -13,10 +13,10 @@
 #include "../PassDetail.h"
 #include "mlir/Conversion/TosaToLinalg/TosaToLinalg.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/Math/IR/Math.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Dialect/Tosa/Transforms/PassDetail.h"
@@ -34,14 +34,14 @@ struct TosaToLinalgNamed : public TosaToLinalgNamedBase<TosaToLinalgNamed> {
 public:
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<arith::ArithmeticDialect, linalg::LinalgDialect,
-                    math::MathDialect, StandardOpsDialect,
-                    tensor::TensorDialect, scf::SCFDialect>();
+                    math::MathDialect, func::FuncDialect, tensor::TensorDialect,
+                    scf::SCFDialect>();
   }
 
   void runOnOperation() override {
     RewritePatternSet patterns(&getContext());
     ConversionTarget target(getContext());
-    target.addLegalDialect<linalg::LinalgDialect, StandardOpsDialect,
+    target.addLegalDialect<linalg::LinalgDialect, func::FuncDialect,
                            tosa::TosaDialect, tensor::TensorDialect,
                            scf::SCFDialect>();
 

diff  --git a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
index 583ea05279d59..e8ceac2f257a9 100644
--- a/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
+++ b/mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
@@ -13,10 +13,10 @@
 #include "../PassDetail.h"
 #include "mlir/Conversion/TosaToLinalg/TosaToLinalg.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/Math/IR/Math.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Dialect/Tosa/Transforms/PassDetail.h"
@@ -35,14 +35,14 @@ struct TosaToLinalg : public TosaToLinalgBase<TosaToLinalg> {
 public:
   void getDependentDialects(DialectRegistry &registry) const override {
     registry.insert<arith::ArithmeticDialect, linalg::LinalgDialect,
-                    math::MathDialect, StandardOpsDialect,
-                    tensor::TensorDialect, scf::SCFDialect>();
+                    math::MathDialect, func::FuncDialect, tensor::TensorDialect,
+                    scf::SCFDialect>();
   }
 
   void runOnOperation() override {
     RewritePatternSet patterns(&getContext());
     ConversionTarget target(getContext());
-    target.addLegalDialect<linalg::LinalgDialect, StandardOpsDialect,
+    target.addLegalDialect<linalg::LinalgDialect, func::FuncDialect,
                            tensor::TensorDialect, scf::SCFDialect>();
     target.addIllegalDialect<tosa::TosaDialect>();
 

diff  --git a/mlir/lib/Conversion/TosaToSCF/CMakeLists.txt b/mlir/lib/Conversion/TosaToSCF/CMakeLists.txt
index 189c25c2d89c9..62d3e8616eeda 100644
--- a/mlir/lib/Conversion/TosaToSCF/CMakeLists.txt
+++ b/mlir/lib/Conversion/TosaToSCF/CMakeLists.txt
@@ -11,8 +11,8 @@ add_mlir_conversion_library(MLIRTosaToSCF
 
   LINK_LIBS PUBLIC
   MLIRIR
+  MLIRFunc
   MLIRSCF
-  MLIRStandard
   MLIRPass
   MLIRTensor
   MLIRTosa

diff  --git a/mlir/lib/Conversion/TosaToStandard/CMakeLists.txt b/mlir/lib/Conversion/TosaToStandard/CMakeLists.txt
index e57ab2008e09c..4946be66ec702 100644
--- a/mlir/lib/Conversion/TosaToStandard/CMakeLists.txt
+++ b/mlir/lib/Conversion/TosaToStandard/CMakeLists.txt
@@ -11,8 +11,8 @@ add_mlir_conversion_library(MLIRTosaToStandard
 
   LINK_LIBS PUBLIC
   MLIRArithmetic
+  MLIRFunc
   MLIRIR
-  MLIRStandard
   MLIRPass
   MLIRTosa
   MLIRTosaTransforms

diff  --git a/mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp b/mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp
index 6e1c4e99165f7..0dec3fffb399e 100644
--- a/mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp
+++ b/mlir/lib/Conversion/TosaToStandard/TosaToStandard.cpp
@@ -12,7 +12,7 @@
 
 #include "mlir/Conversion/TosaToStandard/TosaToStandard.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/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/IR/PatternMatch.h"
@@ -69,7 +69,7 @@ Attribute getConstantAttr(Type type, int64_t value, PatternRewriter &rewriter) {
   return rewriter.getIntegerAttr(type, value);
 }
 
-// This converts the TOSA ApplyScale operator to a set of StandardOps ops,
+// This converts the TOSA ApplyScale operator to a set of arithmetic ops,
 // using 64-bit operations to perform the necessary multiply, bias, and shift.
 // Multiple types are used to use minimal bit width operations.
 class ApplyScaleOpConverter : public OpRewritePattern<tosa::ApplyScaleOp> {

diff  --git a/mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp b/mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp
index 072df36798b4a..fb1e9f3d10799 100644
--- a/mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp
+++ b/mlir/lib/Conversion/TosaToStandard/TosaToStandardPass.cpp
@@ -13,7 +13,7 @@
 #include "../PassDetail.h"
 #include "mlir/Conversion/TosaToStandard/TosaToStandard.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/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Dialect/Tosa/Transforms/PassDetail.h"
@@ -36,7 +36,7 @@ struct TosaToStandard : public TosaToStandardBase<TosaToStandard> {
     target.addIllegalOp<tosa::SliceOp>();
     target.addIllegalOp<tosa::ApplyScaleOp>();
     target.addLegalDialect<arith::ArithmeticDialect>();
-    target.addLegalDialect<StandardOpsDialect>();
+    target.addLegalDialect<func::FuncDialect>();
     target.addLegalDialect<tensor::TensorDialect>();
 
     mlir::tosa::populateTosaToStandardConversionPatterns(&patterns);

diff  --git a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
index 2487dd9401a36..99bb415d65e74 100644
--- a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
+++ b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
@@ -10,10 +10,10 @@
 
 #include "mlir/Conversion/LLVMCommon/VectorPattern.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/FunctionCallUtils.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/Transforms/VectorTransforms.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/Support/MathExtras.h"

diff  --git a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
index 0045266bb5398..cc4581318a81d 100644
--- a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
+++ b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
@@ -18,9 +18,9 @@
 #include "mlir/Dialect/ArmNeon/ArmNeonDialect.h"
 #include "mlir/Dialect/ArmSVE/ArmSVEDialect.h"
 #include "mlir/Dialect/ArmSVE/Transforms.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
 #include "mlir/Dialect/X86Vector/Transforms.h"
 #include "mlir/Dialect/X86Vector/X86VectorDialect.h"
@@ -88,7 +88,7 @@ void LowerVectorToLLVMPass::runOnOperation() {
   LLVMConversionTarget target(getContext());
   target.addLegalDialect<arith::ArithmeticDialect>();
   target.addLegalDialect<memref::MemRefDialect>();
-  target.addLegalDialect<StandardOpsDialect>();
+  target.addLegalDialect<func::FuncDialect>();
   target.addLegalOp<UnrealizedConversionCastOp>();
   if (armNeon) {
     // TODO: we may or may not want to include in-dialect lowering to

diff  --git a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
index 34d268bdc1ad8..70203f91c0ff4 100644
--- a/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
+++ b/mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
@@ -18,10 +18,10 @@
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
 #include "mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/LLVMIR/ROCDLDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"

diff  --git a/mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp b/mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp
index 5e60bed7b074d..9ce623b562b04 100644
--- a/mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp
+++ b/mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp
@@ -11,8 +11,8 @@
 #include "mlir/Conversion/LLVMCommon/ConversionTarget.h"
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
 #include "mlir/Dialect/AMX/AMXDialect.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"
 

diff  --git a/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp b/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
index e1c489984c68e..8609aa248a4e7 100644
--- a/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/AffineAnalysis.cpp
@@ -18,7 +18,7 @@
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/IR/AffineValueMap.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/AffineExprVisitor.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/IntegerSet.h"

diff  --git a/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp b/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
index 30f95dd05fce2..b46d91fbef095 100644
--- a/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/AffineStructures.cpp
@@ -17,7 +17,7 @@
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/IR/AffineValueMap.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/AffineExprVisitor.h"
 #include "mlir/IR/IntegerSet.h"
 #include "mlir/Support/LLVM.h"

diff  --git a/mlir/lib/Dialect/Affine/Analysis/NestedMatcher.cpp b/mlir/lib/Dialect/Affine/Analysis/NestedMatcher.cpp
index c38cdb7582d30..90a9e9dddd75f 100644
--- a/mlir/lib/Dialect/Affine/Analysis/NestedMatcher.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/NestedMatcher.cpp
@@ -10,7 +10,7 @@
 
 #include "mlir/Dialect/Affine/Analysis/NestedMatcher.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/STLExtras.h"

diff  --git a/mlir/lib/Dialect/Affine/Analysis/Utils.cpp b/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
index 0eb5289f45c64..e9eb3d5954e15 100644
--- a/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
+++ b/mlir/lib/Dialect/Affine/Analysis/Utils.cpp
@@ -18,7 +18,7 @@
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/IR/AffineValueMap.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/IntegerSet.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/Support/Debug.h"

diff  --git a/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp b/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
index 587a0d2d67fa4..1b329353153b0 100644
--- a/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
@@ -25,8 +25,8 @@
 #include "mlir/Dialect/Affine/LoopUtils.h"
 #include "mlir/Dialect/Affine/Passes.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/Support/CommandLine.h"

diff  --git a/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp b/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
index bd331525b01c0..c480746132416 100644
--- a/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
@@ -82,7 +82,7 @@ bool isOpLoopInvariant(Operation &op, Value indVar, ValueRange iterArgs,
   } else if (isa<AffineDmaStartOp, AffineDmaWaitOp>(op)) {
     // TODO: Support DMA ops.
     return false;
-  } else if (!isa<arith::ConstantOp, ConstantOp>(op)) {
+  } else if (!isa<arith::ConstantOp, func::ConstantOp>(op)) {
     // Register op in the set of ops that have users.
     opsWithUsers.insert(&op);
     if (isa<AffineMapAccessInterface>(op)) {

diff  --git a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
index f4536a899b979..6faf612af87af 100644
--- a/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
@@ -26,12 +26,12 @@ add_mlir_dialect_library(MLIRAffineTransforms
   MLIRAffineAnalysis
   MLIRAffineUtils
   MLIRArithmetic
+  MLIRFunc
   MLIRIR
   MLIRMemRef
   MLIRPass
   MLIRSCFUtils
   MLIRSideEffectInterfaces
-  MLIRStandard
   MLIRTransformUtils
   MLIRVector
   MLIRVectorUtils

diff  --git a/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp b/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
index 42ab36297be49..478ca9fbebce0 100644
--- a/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
+++ b/mlir/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
@@ -9,7 +9,7 @@
 #include "PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Transforms/DialectConversion.h"
 
@@ -197,7 +197,7 @@ struct ArithmeticExpandOpsPass
 
     arith::populateArithmeticExpandOpsPatterns(patterns);
 
-    target.addLegalDialect<arith::ArithmeticDialect, StandardOpsDialect>();
+    target.addLegalDialect<arith::ArithmeticDialect, func::FuncDialect>();
     // clang-format off
     target.addIllegalOp<
       arith::CeilDivSIOp,

diff  --git a/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h b/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
index 0947804f125fc..8db4f122852e3 100644
--- a/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Arithmetic/Transforms/PassDetail.h
@@ -13,12 +13,14 @@
 
 namespace mlir {
 
-class StandardOpsDialect;
-
 namespace bufferization {
 class BufferizationDialect;
 } // namespace bufferization
 
+namespace func {
+class FuncDialect;
+} // namespace func
+
 namespace memref {
 class MemRefDialect;
 } // namespace memref

diff  --git a/mlir/lib/Dialect/ArmSVE/Transforms/CMakeLists.txt b/mlir/lib/Dialect/ArmSVE/Transforms/CMakeLists.txt
index 80f6e305a188b..7871cb0041818 100644
--- a/mlir/lib/Dialect/ArmSVE/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/ArmSVE/Transforms/CMakeLists.txt
@@ -6,8 +6,8 @@ add_mlir_dialect_library(MLIRArmSVETransforms
 
   LINK_LIBS PUBLIC
   MLIRArmSVE
+  MLIRFunc
   MLIRIR
   MLIRLLVMCommonConversion
   MLIRLLVMIR
-  MLIRStandard
   )

diff  --git a/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp b/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
index 0145ec37422d3..c019b5c9bf0dd 100644
--- a/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
+++ b/mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
@@ -71,9 +71,9 @@ void mlir::populateArmSVELegalizeForLLVMExportPatterns(
   // Populate conversion patterns
 
   // clang-format off
-  patterns.add<ForwardOperands<CallOp>,
-               ForwardOperands<CallIndirectOp>,
-               ForwardOperands<ReturnOp>>(converter,
+  patterns.add<ForwardOperands<func::CallOp>,
+               ForwardOperands<func::CallIndirectOp>,
+               ForwardOperands<func::ReturnOp>>(converter,
                                           &converter.getContext());
   patterns.add<SdotOpLowering,
                SmmlaOpLowering,

diff  --git a/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
index c4ba141b9bca0..62ddf2fe1e769 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncParallelFor.cpp
@@ -17,8 +17,8 @@
 #include "mlir/Dialect/Async/IR/Async.h"
 #include "mlir/Dialect/Async/Passes.h"
 #include "mlir/Dialect/Async/Transforms.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/ImplicitLocOpBuilder.h"
 #include "mlir/IR/Matchers.h"
@@ -431,7 +431,7 @@ static ParallelComputeFunction createParallelComputeFunction(
 
   b.create<scf::ForOp>(blockFirstCoord[0], blockEndCoord[0], c1, ValueRange(),
                        workLoopBuilder(0));
-  b.create<ReturnOp>(ValueRange());
+  b.create<func::ReturnOp>(ValueRange());
 
   return {op.getNumLoops(), func, std::move(computeFuncType.captures)};
 }
@@ -541,8 +541,8 @@ static FuncOp createAsyncDispatchFunction(ParallelComputeFunction &computeFunc,
       operands[1] = midIndex;
       operands[2] = end;
 
-      executeBuilder.create<CallOp>(executeLoc, func.sym_name(),
-                                    func.getCallableResults(), operands);
+      executeBuilder.create<func::CallOp>(executeLoc, func.sym_name(),
+                                          func.getCallableResults(), operands);
       executeBuilder.create<async::YieldOp>(executeLoc, ValueRange());
     };
 
@@ -562,9 +562,10 @@ static FuncOp createAsyncDispatchFunction(ParallelComputeFunction &computeFunc,
   SmallVector<Value> computeFuncOperands = {blockStart};
   computeFuncOperands.append(forwardedInputs.begin(), forwardedInputs.end());
 
-  b.create<CallOp>(computeFunc.func.sym_name(),
-                   computeFunc.func.getCallableResults(), computeFuncOperands);
-  b.create<ReturnOp>(ValueRange());
+  b.create<func::CallOp>(computeFunc.func.sym_name(),
+                         computeFunc.func.getCallableResults(),
+                         computeFuncOperands);
+  b.create<func::ReturnOp>(ValueRange());
 
   return func;
 }
@@ -608,9 +609,9 @@ static void doAsyncDispatch(ImplicitLocOpBuilder &b, PatternRewriter &rewriter,
     SmallVector<Value> operands = {c0, blockSize};
     appendBlockComputeOperands(operands);
 
-    b.create<CallOp>(parallelComputeFunction.func.sym_name(),
-                     parallelComputeFunction.func.getCallableResults(),
-                     operands);
+    b.create<func::CallOp>(parallelComputeFunction.func.sym_name(),
+                           parallelComputeFunction.func.getCallableResults(),
+                           operands);
     b.create<scf::YieldOp>();
   };
 
@@ -627,8 +628,9 @@ static void doAsyncDispatch(ImplicitLocOpBuilder &b, PatternRewriter &rewriter,
     SmallVector<Value> operands = {group, c0, blockCount, blockSize};
     appendBlockComputeOperands(operands);
 
-    b.create<CallOp>(asyncDispatchFunction.sym_name(),
-                     asyncDispatchFunction.getCallableResults(), operands);
+    b.create<func::CallOp>(asyncDispatchFunction.sym_name(),
+                           asyncDispatchFunction.getCallableResults(),
+                           operands);
 
     // Wait for the completion of all parallel compute operations.
     b.create<AwaitAllOp>(group);
@@ -685,9 +687,9 @@ doSequentialDispatch(ImplicitLocOpBuilder &b, PatternRewriter &rewriter,
     // Call parallel compute function inside the async.execute region.
     auto executeBodyBuilder = [&](OpBuilder &executeBuilder,
                                   Location executeLoc, ValueRange executeArgs) {
-      executeBuilder.create<CallOp>(executeLoc, compute.sym_name(),
-                                    compute.getCallableResults(),
-                                    computeFuncOperands(iv));
+      executeBuilder.create<func::CallOp>(executeLoc, compute.sym_name(),
+                                          compute.getCallableResults(),
+                                          computeFuncOperands(iv));
       executeBuilder.create<async::YieldOp>(executeLoc, ValueRange());
     };
 
@@ -702,8 +704,8 @@ doSequentialDispatch(ImplicitLocOpBuilder &b, PatternRewriter &rewriter,
   b.create<scf::ForOp>(c1, blockCount, c1, ValueRange(), loopBuilder);
 
   // Call parallel compute function for the first block in the caller thread.
-  b.create<CallOp>(compute.sym_name(), compute.getCallableResults(),
-                   computeFuncOperands(c0));
+  b.create<func::CallOp>(compute.sym_name(), compute.getCallableResults(),
+                         computeFuncOperands(c0));
 
   // Wait for the completion of all async compute operations.
   b.create<AwaitAllOp>(group);

diff  --git a/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp
index 3fd80ea9f9ee7..18c2f2eaf5667 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCounting.cpp
@@ -16,7 +16,7 @@
 #include "mlir/Dialect/Async/IR/Async.h"
 #include "mlir/Dialect/Async/Passes.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/ImplicitLocOpBuilder.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
@@ -317,7 +317,7 @@ AsyncRuntimeRefCountingPass::addAddRefBeforeFunctionCall(Value value) {
   Location loc = value.getLoc();
 
   for (Operation *user : value.getUsers()) {
-    if (!isa<CallOp>(user))
+    if (!isa<func::CallOp>(user))
       continue;
 
     // Add a reference before the function call to pass the value at `+1`

diff  --git a/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCountingOpt.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCountingOpt.cpp
index 025dab515bc57..14fe91a902016 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCountingOpt.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncRuntimeRefCountingOpt.cpp
@@ -13,7 +13,7 @@
 #include "PassDetail.h"
 #include "mlir/Dialect/Async/IR/Async.h"
 #include "mlir/Dialect/Async/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/Support/Debug.h"
 
@@ -139,7 +139,7 @@ LogicalResult AsyncRuntimeRefCountingOptPass::optimizeReferenceCounting(
             break;
 
           // Find the first function call user of the reference counted value.
-          Operation *functionCall = dyn_cast<CallOp>(user);
+          Operation *functionCall = dyn_cast<func::CallOp>(user);
           if (functionCall &&
               (!firstFunctionCallUser ||
                functionCall->isBeforeInBlock(firstFunctionCallUser))) {

diff  --git a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
index d1d3e4f5326a9..3f0d089ed9a04 100644
--- a/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
+++ b/mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp
@@ -17,8 +17,8 @@
 #include "mlir/Dialect/Async/IR/Async.h"
 #include "mlir/Dialect/Async/Passes.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/BlockAndValueMapping.h"
 #include "mlir/IR/ImplicitLocOpBuilder.h"
 #include "mlir/IR/PatternMatch.h"
@@ -175,7 +175,7 @@ static CoroMachinery setupCoroMachinery(FuncOp func) {
   // This will be the return value of a coroutine ramp function.
   SmallVector<Value, 4> ret{retToken};
   ret.insert(ret.end(), retValues.begin(), retValues.end());
-  builder.create<ReturnOp>(ret);
+  builder.create<func::ReturnOp>(ret);
 
   // `async.await` op lowering will create resume blocks for async
   // continuations, and will conditionally branch to cleanup or suspend blocks.
@@ -327,7 +327,7 @@ outlineExecuteOp(SymbolTable &symbolTable, ExecuteOp execute) {
   // Replace the original `async.execute` with a call to outlined function.
   {
     ImplicitLocOpBuilder callBuilder(loc, execute);
-    auto callOutlinedFunc = callBuilder.create<CallOp>(
+    auto callOutlinedFunc = callBuilder.create<func::CallOp>(
         func.getName(), execute.getResultTypes(), functionInputs.getArrayRef());
     execute.replaceAllUsesWith(callOutlinedFunc.getResults());
     execute.erase();
@@ -561,7 +561,7 @@ class YieldOpLowering : public OpConversionPattern<async::YieldOp> {
 };
 
 //===----------------------------------------------------------------------===//
-// Convert std.assert operation to cf.cond_br into `set_error` block.
+// Convert cf.assert operation to cf.cond_br into `set_error` block.
 //===----------------------------------------------------------------------===//
 
 class AssertOpLowering : public OpConversionPattern<cf::AssertOp> {
@@ -618,7 +618,7 @@ static CoroMachinery rewriteFuncAsCoroutine(FuncOp func) {
   func.insertResult(0, TokenType::get(ctx), {});
   for (Block &block : func.getBlocks()) {
     Operation *terminator = block.getTerminator();
-    if (auto returnOp = dyn_cast<ReturnOp>(*terminator)) {
+    if (auto returnOp = dyn_cast<func::ReturnOp>(*terminator)) {
       ImplicitLocOpBuilder builder(loc, returnOp);
       builder.create<YieldOp>(returnOp.getOperands());
       returnOp.erase();
@@ -631,10 +631,10 @@ static CoroMachinery rewriteFuncAsCoroutine(FuncOp func) {
 ///
 /// The invocation of this function is safe only when call ops are traversed in
 /// reverse order of how they appear in a single block. See `funcsToCoroutines`.
-static void rewriteCallsiteForCoroutine(CallOp oldCall, FuncOp func) {
+static void rewriteCallsiteForCoroutine(func::CallOp oldCall, FuncOp func) {
   auto loc = func.getLoc();
   ImplicitLocOpBuilder callBuilder(loc, oldCall);
-  auto newCall = callBuilder.create<CallOp>(
+  auto newCall = callBuilder.create<func::CallOp>(
       func.getName(), func.getCallableResults(), oldCall.getArgOperands());
 
   // Await on the async token and all the value results and unwrap the latter.
@@ -716,7 +716,7 @@ funcsToCoroutines(ModuleOp module,
     });
     // Rewrite the callsites to await on results of the newly created coroutine.
     for (Operation *op : users) {
-      if (CallOp call = dyn_cast<mlir::CallOp>(*op)) {
+      if (func::CallOp call = dyn_cast<func::CallOp>(*op)) {
         FuncOp caller = call->getParentOfType<FuncOp>();
         rewriteCallsiteForCoroutine(call, func); // Careful, erases the call op.
         addToWorklist(caller);
@@ -794,7 +794,7 @@ void AsyncToAsyncRuntimePass::runOnOperation() {
     return !walkResult.wasInterrupted();
   });
   runtimeTarget.addLegalOp<cf::AssertOp, arith::XOrIOp, arith::ConstantOp,
-                           ConstantOp, cf::BranchOp, cf::CondBranchOp>();
+                           func::ConstantOp, cf::BranchOp, cf::CondBranchOp>();
 
   // Assertions must be converted to runtime errors inside async functions.
   runtimeTarget.addDynamicallyLegalOp<cf::AssertOp>(

diff  --git a/mlir/lib/Dialect/Async/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Async/Transforms/CMakeLists.txt
index e5f9c75af28ed..de74c6180d52b 100644
--- a/mlir/lib/Dialect/Async/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Async/Transforms/CMakeLists.txt
@@ -14,11 +14,11 @@ add_mlir_dialect_library(MLIRAsyncTransforms
   LINK_LIBS PUBLIC
   MLIRArithmetic
   MLIRAsync
+  MLIRFunc
   MLIRIR
   MLIRPass
   MLIRSCF
   MLIRSCFToControlFlow
-  MLIRStandard
   MLIRTransforms
   MLIRTransformUtils
 )

diff  --git a/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp b/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
index de3a2e1c0782b..e233ef7ba88ed 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
@@ -8,8 +8,8 @@
 
 #include "PassDetail.h"
 #include "mlir/Dialect/Bufferization/Transforms/Passes.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/Operation.h"
 #include "mlir/Pass/Pass.h"
 
@@ -62,7 +62,7 @@ static void updateFuncOp(FuncOp func,
 // out-params.
 static void updateReturnOps(FuncOp func,
                             ArrayRef<BlockArgument> appendedEntryArgs) {
-  func.walk([&](ReturnOp op) {
+  func.walk([&](func::ReturnOp op) {
     SmallVector<Value, 6> copyIntoOutParams;
     SmallVector<Value, 6> keepAsReturnOperands;
     for (Value operand : op.getOperands()) {
@@ -75,7 +75,7 @@ static void updateReturnOps(FuncOp func,
     for (auto t : llvm::zip(copyIntoOutParams, appendedEntryArgs))
       builder.create<memref::CopyOp>(op.getLoc(), std::get<0>(t),
                                      std::get<1>(t));
-    builder.create<ReturnOp>(op.getLoc(), keepAsReturnOperands);
+    builder.create<func::ReturnOp>(op.getLoc(), keepAsReturnOperands);
     op.erase();
   });
 }
@@ -84,7 +84,7 @@ static void updateReturnOps(FuncOp func,
 // temporary buffers for newly introduced out params.
 static LogicalResult updateCalls(ModuleOp module) {
   bool didFail = false;
-  module.walk([&](CallOp op) {
+  module.walk([&](func::CallOp op) {
     SmallVector<Value, 6> replaceWithNewCallResults;
     SmallVector<Value, 6> replaceWithOutParams;
     for (OpResult result : op.getResults()) {
@@ -112,8 +112,8 @@ static LogicalResult updateCalls(ModuleOp module) {
     newOperands.append(outParams.begin(), outParams.end());
     auto newResultTypes = llvm::to_vector<6>(llvm::map_range(
         replaceWithNewCallResults, [](Value v) { return v.getType(); }));
-    auto newCall = builder.create<CallOp>(op.getLoc(), op.getCalleeAttr(),
-                                          newResultTypes, newOperands);
+    auto newCall = builder.create<func::CallOp>(op.getLoc(), op.getCalleeAttr(),
+                                                newResultTypes, newOperands);
     for (auto t : llvm::zip(replaceWithNewCallResults, newCall.getResults()))
       std::get<0>(t).replaceAllUsesWith(std::get<1>(t));
     op.erase();

diff  --git a/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp b/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
index a10d322778b8d..24ecadb5e8f4d 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
+++ b/mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
@@ -13,7 +13,7 @@
 #include "mlir/Dialect/Bufferization/Transforms/Bufferize.h"
 #include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h"
 #include "mlir/Dialect/Bufferization/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/Operation.h"
 #include "mlir/Pass/PassManager.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
@@ -175,10 +175,9 @@ struct OneShotBufferizePass
 
       BufferizationOptions::OpFilterEntry::FilterFn filterFn =
           [&](Operation *op) {
-            // Disallow non-std dialect ops. I.e., no ops related to function
+            // Disallow non-func dialect ops. I.e., no ops related to function
             // calls.
-            if (op->getDialect()->getNamespace() ==
-                StandardOpsDialect::getDialectNamespace())
+            if (isa<func::FuncDialect>(op->getDialect()))
               return false;
             // Filter may be specified via options.
             if (this->dialectFilter.hasValue())

diff  --git a/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
index 56fc326b4fa92..c72292187776e 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Bufferization/Transforms/CMakeLists.txt
@@ -15,10 +15,10 @@ add_mlir_dialect_library(MLIRBufferizationTransforms
   LINK_LIBS PUBLIC
   MLIRBufferization
   MLIRControlFlowInterfaces
+  MLIRFunc
   MLIRInferTypeOpInterface
   MLIRIR
   MLIRMemRef
   MLIRPass
-  MLIRStandard
   MLIRTransforms
 )

diff  --git a/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h b/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
index 37f88113c59b0..d695f2a409ccb 100644
--- a/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Bufferization/Transforms/PassDetail.h
@@ -13,12 +13,14 @@
 
 namespace mlir {
 
-class StandardOpsDialect;
-
 namespace bufferization {
 class BufferizationDialect;
 } // namespace bufferization
 
+namespace func {
+class FuncDialect;
+} // namespace func
+
 namespace memref {
 class MemRefDialect;
 } // namespace memref

diff  --git a/mlir/lib/Dialect/CMakeLists.txt b/mlir/lib/Dialect/CMakeLists.txt
index 9d6a30ca3d7f1..766dd263e7a28 100644
--- a/mlir/lib/Dialect/CMakeLists.txt
+++ b/mlir/lib/Dialect/CMakeLists.txt
@@ -9,6 +9,7 @@ add_subdirectory(Complex)
 add_subdirectory(ControlFlow)
 add_subdirectory(DLTI)
 add_subdirectory(EmitC)
+add_subdirectory(Func)
 add_subdirectory(GPU)
 add_subdirectory(Linalg)
 add_subdirectory(LLVMIR)
@@ -23,7 +24,6 @@ add_subdirectory(SCF)
 add_subdirectory(Shape)
 add_subdirectory(SparseTensor)
 add_subdirectory(SPIRV)
-add_subdirectory(StandardOps)
 add_subdirectory(Tensor)
 add_subdirectory(Tosa)
 add_subdirectory(Utils)

diff  --git a/mlir/lib/Dialect/Func/CMakeLists.txt b/mlir/lib/Dialect/Func/CMakeLists.txt
new file mode 100644
index 0000000000000..9f57627c321fb
--- /dev/null
+++ b/mlir/lib/Dialect/Func/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory(IR)
+add_subdirectory(Transforms)

diff  --git a/mlir/lib/Dialect/Func/IR/CMakeLists.txt b/mlir/lib/Dialect/Func/IR/CMakeLists.txt
new file mode 100644
index 0000000000000..0045a9aebc154
--- /dev/null
+++ b/mlir/lib/Dialect/Func/IR/CMakeLists.txt
@@ -0,0 +1,17 @@
+add_mlir_dialect_library(MLIRFunc
+  FuncOps.cpp
+
+  ADDITIONAL_HEADER_DIRS
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Func
+
+  DEPENDS
+  MLIRFuncOpsIncGen
+
+  LINK_LIBS PUBLIC
+  MLIRCallInterfaces
+  MLIRControlFlow
+  MLIRControlFlowInterfaces
+  MLIRInferTypeOpInterface
+  MLIRIR
+  MLIRSideEffectInterfaces
+  )

diff  --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/Func/IR/FuncOps.cpp
similarity index 86%
rename from mlir/lib/Dialect/StandardOps/IR/Ops.cpp
rename to mlir/lib/Dialect/Func/IR/FuncOps.cpp
index cc304511c9f7a..b1a557b3c6c27 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/Func/IR/FuncOps.cpp
@@ -1,4 +1,4 @@
-//===- Ops.cpp - Standard MLIR Operations ---------------------------------===//
+//===- FuncOps.cpp - Func Dialect Operations ------------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,12 +6,9 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 
-#include "mlir/Dialect/CommonFolders.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
-#include "mlir/IR/AffineExpr.h"
-#include "mlir/IR/AffineMap.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
@@ -30,33 +27,30 @@
 #include "llvm/Support/raw_ostream.h"
 #include <numeric>
 
-#include "mlir/Dialect/StandardOps/IR/OpsDialect.cpp.inc"
-
-// Pull in all enum type definitions and utility function declarations.
-#include "mlir/Dialect/StandardOps/IR/OpsEnums.cpp.inc"
+#include "mlir/Dialect/Func/IR/FuncOpsDialect.cpp.inc"
 
 using namespace mlir;
+using namespace mlir::func;
 
 //===----------------------------------------------------------------------===//
-// StandardOpsDialect Interfaces
+// FuncDialect Interfaces
 //===----------------------------------------------------------------------===//
 namespace {
-/// This class defines the interface for handling inlining with standard
-/// operations.
-struct StdInlinerInterface : public DialectInlinerInterface {
+/// This class defines the interface for handling inlining with func operations.
+struct FuncInlinerInterface : public DialectInlinerInterface {
   using DialectInlinerInterface::DialectInlinerInterface;
 
   //===--------------------------------------------------------------------===//
   // Analysis Hooks
   //===--------------------------------------------------------------------===//
 
-  /// All call operations within standard ops can be inlined.
+  /// All call operations can be inlined.
   bool isLegalToInline(Operation *call, Operation *callable,
                        bool wouldBeCloned) const final {
     return true;
   }
 
-  /// All operations within standard ops can be inlined.
+  /// All operations can be inlined.
   bool isLegalToInline(Operation *, Region *, bool,
                        BlockAndValueMapping &) const final {
     return true;
@@ -69,7 +63,7 @@ struct StdInlinerInterface : public DialectInlinerInterface {
   /// Handle the given inlined terminator by replacing it with a new operation
   /// as necessary.
   void handleTerminator(Operation *op, Block *newDest) const final {
-    // Only "std.return" needs to be handled here.
+    // Only return needs to be handled here.
     auto returnOp = dyn_cast<ReturnOp>(op);
     if (!returnOp)
       return;
@@ -84,7 +78,7 @@ struct StdInlinerInterface : public DialectInlinerInterface {
   /// as necessary.
   void handleTerminator(Operation *op,
                         ArrayRef<Value> valuesToRepl) const final {
-    // Only "std.return" needs to be handled here.
+    // Only return needs to be handled here.
     auto returnOp = cast<ReturnOp>(op);
 
     // Replace the values directly with the return operands.
@@ -96,24 +90,21 @@ struct StdInlinerInterface : public DialectInlinerInterface {
 } // namespace
 
 //===----------------------------------------------------------------------===//
-// StandardOpsDialect
+// FuncDialect
 //===----------------------------------------------------------------------===//
 
-void StandardOpsDialect::initialize() {
+void FuncDialect::initialize() {
   addOperations<
 #define GET_OP_LIST
-#include "mlir/Dialect/StandardOps/IR/Ops.cpp.inc"
+#include "mlir/Dialect/Func/IR/FuncOps.cpp.inc"
       >();
-  addInterfaces<StdInlinerInterface>();
+  addInterfaces<FuncInlinerInterface>();
 }
 
 /// Materialize a single constant operation from a given attribute value with
 /// the desired resultant type.
-Operation *StandardOpsDialect::materializeConstant(OpBuilder &builder,
-                                                   Attribute value, Type type,
-                                                   Location loc) {
-  if (arith::ConstantOp::isBuildableWith(value, type))
-    return builder.create<arith::ConstantOp>(loc, type, value);
+Operation *FuncDialect::materializeConstant(OpBuilder &builder, Attribute value,
+                                            Type type, Location loc) {
   if (ConstantOp::isBuildableWith(value, type))
     return builder.create<ConstantOp>(loc, type,
                                       value.cast<FlatSymbolRefAttr>());
@@ -247,4 +238,4 @@ LogicalResult ReturnOp::verify() {
 //===----------------------------------------------------------------------===//
 
 #define GET_OP_CLASSES
-#include "mlir/Dialect/StandardOps/IR/Ops.cpp.inc"
+#include "mlir/Dialect/Func/IR/FuncOps.cpp.inc"

diff  --git a/mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
similarity index 63%
rename from mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
rename to mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
index 3ee725bc0489d..dfc429c7a1d84 100644
--- a/mlir/lib/Dialect/StandardOps/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Func/Transforms/CMakeLists.txt
@@ -1,23 +1,23 @@
-add_mlir_dialect_library(MLIRStandardOpsTransforms
+add_mlir_dialect_library(MLIRFuncTransforms
   DecomposeCallGraphTypes.cpp
   FuncBufferize.cpp
   FuncConversions.cpp
 
   ADDITIONAL_HEADER_DIRS
-  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/StandardOps/Transforms
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Func/Transforms
 
   DEPENDS
-  MLIRStandardTransformsIncGen
+  MLIRFuncTransformsIncGen
 
   LINK_LIBS PUBLIC
   MLIRAffine
   MLIRArithmeticTransforms
   MLIRBufferization
   MLIRBufferizationTransforms
+  MLIRFunc
   MLIRIR
   MLIRMemRef
   MLIRPass
   MLIRSCF
-  MLIRStandard
   MLIRTransforms
   )

diff  --git a/mlir/lib/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.cpp b/mlir/lib/Dialect/Func/Transforms/DecomposeCallGraphTypes.cpp
similarity index 98%
rename from mlir/lib/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.cpp
rename to mlir/lib/Dialect/Func/Transforms/DecomposeCallGraphTypes.cpp
index f9d9c5c31e669..d3df225d1920b 100644
--- a/mlir/lib/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.cpp
+++ b/mlir/lib/Dialect/Func/Transforms/DecomposeCallGraphTypes.cpp
@@ -6,11 +6,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/IR/BuiltinOps.h"
 
 using namespace mlir;
+using namespace mlir::func;
 
 //===----------------------------------------------------------------------===//
 // ValueDecomposer

diff  --git a/mlir/lib/Dialect/StandardOps/Transforms/FuncBufferize.cpp b/mlir/lib/Dialect/Func/Transforms/FuncBufferize.cpp
similarity index 85%
rename from mlir/lib/Dialect/StandardOps/Transforms/FuncBufferize.cpp
rename to mlir/lib/Dialect/Func/Transforms/FuncBufferize.cpp
index 9351b676b97a2..15208b57ce7fa 100644
--- a/mlir/lib/Dialect/StandardOps/Transforms/FuncBufferize.cpp
+++ b/mlir/lib/Dialect/Func/Transforms/FuncBufferize.cpp
@@ -1,4 +1,4 @@
-//===- Bufferize.cpp - Bufferization for std ops --------------------------===//
+//===- Bufferize.cpp - Bufferization for func ops -------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,19 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file implements bufferization of std.func's and std.call's.
+// This file implements bufferization of builtin.func's and func.call's.
 //
 //===----------------------------------------------------------------------===//
 
 #include "PassDetail.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/Bufferization/Transforms/Bufferize.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
-#include "mlir/Dialect/StandardOps/Transforms/FuncConversions.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 using namespace mlir;
+using namespace mlir::func;
 
 namespace {
 struct FuncBufferizePass : public FuncBufferizeBase<FuncBufferizePass> {
@@ -59,6 +60,6 @@ struct FuncBufferizePass : public FuncBufferizeBase<FuncBufferizePass> {
 };
 } // namespace
 
-std::unique_ptr<Pass> mlir::createFuncBufferizePass() {
+std::unique_ptr<Pass> mlir::func::createFuncBufferizePass() {
   return std::make_unique<FuncBufferizePass>();
 }

diff  --git a/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp b/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
similarity index 95%
rename from mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp
rename to mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
index ee614fd27a769..c1e69d0ed0ba8 100644
--- a/mlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp
+++ b/mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
@@ -1,4 +1,4 @@
-//===- FuncConversions.cpp - Standard Function conversions ----------------===//
+//===- FuncConversions.cpp - Function conversions -------------------------===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,15 +6,16 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/Transforms/FuncConversions.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 using namespace mlir;
+using namespace mlir::func;
 
 namespace {
-/// Converts the operand and result types of the Standard's CallOp, used
-/// together with the FuncOpSignatureConversion.
+/// Converts the operand and result types of the CallOp, used together with the
+/// FuncOpSignatureConversion.
 struct CallOpSignatureConversion : public OpConversionPattern<CallOp> {
   using OpConversionPattern<CallOp>::OpConversionPattern;
 

diff  --git a/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h b/mlir/lib/Dialect/Func/Transforms/PassDetail.h
similarity index 68%
rename from mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
rename to mlir/lib/Dialect/Func/Transforms/PassDetail.h
index eadd026ead3ca..d6020f89a87a7 100644
--- a/mlir/lib/Dialect/StandardOps/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/Func/Transforms/PassDetail.h
@@ -1,4 +1,4 @@
-//===- PassDetail.h - GPU Pass class details --------------------*- C++ -*-===//
+//===- PassDetail.h - Func Pass class details -------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef DIALECT_STANDARD_TRANSFORMS_PASSDETAIL_H_
-#define DIALECT_STANDARD_TRANSFORMS_PASSDETAIL_H_
+#ifndef DIALECT_FUNC_TRANSFORMS_PASSDETAIL_H_
+#define DIALECT_FUNC_TRANSFORMS_PASSDETAIL_H_
 
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Pass/Pass.h"
@@ -25,8 +25,8 @@ class MemRefDialect;
 } // namespace memref
 
 #define GEN_PASS_CLASSES
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h.inc"
+#include "mlir/Dialect/Func/Transforms/Passes.h.inc"
 
 } // namespace mlir
 
-#endif // DIALECT_STANDARD_TRANSFORMS_PASSDETAIL_H_
+#endif // DIALECT_FUNC_TRANSFORMS_PASSDETAIL_H_

diff  --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt
index b08468c3a8eb7..a2e706c67a478 100644
--- a/mlir/lib/Dialect/GPU/CMakeLists.txt
+++ b/mlir/lib/Dialect/GPU/CMakeLists.txt
@@ -69,6 +69,7 @@ add_mlir_dialect_library(MLIRGPUTransforms
   MLIRArithmetic
   MLIRAsync
   MLIRDataLayoutInterfaces
+  MLIRFunc
   MLIRGPUOps
   MLIRIR
   MLIRLLVMIR
@@ -76,7 +77,6 @@ add_mlir_dialect_library(MLIRGPUTransforms
   MLIRMemRef
   MLIRPass
   MLIRSCF
-  MLIRStandard
   MLIRSupport
   MLIRTransformUtils
   )

diff  --git a/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp b/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
index 3b0f51444e027..5278ad9b8db6b 100644
--- a/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
@@ -14,11 +14,11 @@
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
 #include "mlir/Dialect/DLTI/DLTI.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/GPU/Utils.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/SymbolTable.h"
@@ -60,8 +60,8 @@ static void injectGpuIndexOperations(Location loc, Region &launchFuncOpBody,
 /// operations may not have side-effects, as otherwise sinking (and hence
 /// duplicating them) is not legal.
 static bool isLikelyAnIndexComputation(Operation *op) {
-  return isa<arith::ConstantOp, ConstantOp, memref::DimOp, arith::SelectOp,
-             arith::CmpIOp>(op);
+  return isa<arith::ConstantOp, func::ConstantOp, memref::DimOp,
+             arith::SelectOp, arith::CmpIOp>(op);
 }
 
 /// For a given operation `op`, computes whether it is beneficial to sink the

diff  --git a/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
index 6e62e4a1aadb4..2fccf2da7cebf 100644
--- a/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
@@ -7,8 +7,8 @@ add_mlir_dialect_library(MLIRLinalgAnalysis
   LINK_LIBS PUBLIC
   MLIRAffineAnalysis
   MLIRAnalysis
+  MLIRFunc
   MLIRIR
   MLIRLinalg
   MLIRMemRef
-  MLIRStandard
   )

diff  --git a/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp b/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
index ee5c6da544b09..46d4f67c57b21 100644
--- a/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
+++ b/mlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
@@ -12,8 +12,8 @@
 
 #include "mlir/Dialect/Linalg/Analysis/DependenceAnalysis.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/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 
 #include "llvm/Support/CommandLine.h"

diff  --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/CMakeLists.txt b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/CMakeLists.txt
index 74104ec1d5ebe..066204d8b65d2 100644
--- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/CMakeLists.txt
@@ -17,8 +17,8 @@ add_mlir_dialect_library(MLIRModuleBufferization
   LINK_LIBS PUBLIC
   MLIRBufferization
   MLIRBufferizationTransforms
+  MLIRFunc
+  MLIRFuncTransforms
   MLIRIR
   MLIRMemRef
-  MLIRStandard
-  MLIRStandardOpsTransforms
 )

diff  --git a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
index 4abfec9c8fbdb..5daa764c6d221 100644
--- a/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
+++ b/mlir/lib/Dialect/Linalg/ComprehensiveBufferize/ModuleBufferization.cpp
@@ -76,8 +76,8 @@
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/Bufferization/Transforms/Bufferize.h"
 #include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.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/Operation.h"
 
 using namespace mlir;
@@ -122,7 +122,7 @@ static const ModuleBufferizationState &
 getModuleBufferizationState(const BufferizationState &state) {
   Optional<const ModuleBufferizationState *> maybeState =
       state.getDialectState<ModuleBufferizationState>(
-          StandardOpsDialect::getDialectNamespace());
+          func::FuncDialect::getDialectNamespace());
   assert(maybeState.hasValue() && "ModuleBufferizationState does not exist");
   return **maybeState;
 }
@@ -131,7 +131,7 @@ getModuleBufferizationState(const BufferizationState &state) {
 static ModuleBufferizationState &
 getModuleBufferizationState(BufferizationState &state) {
   return state.getOrCreateDialectState<ModuleBufferizationState>(
-      StandardOpsDialect::getDialectNamespace());
+      func::FuncDialect::getDialectNamespace());
 }
 
 /// Return the state (phase) of analysis of the FuncOp.
@@ -147,10 +147,10 @@ getFuncOpAnalysisState(const BufferizationState &state, FuncOp funcOp) {
 
 /// Return the unique ReturnOp that terminates `funcOp`.
 /// Return nullptr if there is no such unique ReturnOp.
-static ReturnOp getAssumedUniqueReturnOp(FuncOp funcOp) {
-  ReturnOp returnOp;
+static func::ReturnOp getAssumedUniqueReturnOp(FuncOp funcOp) {
+  func::ReturnOp returnOp;
   for (Block &b : funcOp.body()) {
-    if (auto candidateOp = dyn_cast<ReturnOp>(b.getTerminator())) {
+    if (auto candidateOp = dyn_cast<func::ReturnOp>(b.getTerminator())) {
       if (returnOp)
         return nullptr;
       returnOp = candidateOp;
@@ -192,7 +192,7 @@ equivalentFuncOpBBArgsAnalysis(Operation *op, BufferizationState &state,
 
   // Support only single return-terminated block in the function.
   auto funcOp = cast<FuncOp>(op);
-  ReturnOp returnOp = getAssumedUniqueReturnOp(funcOp);
+  func::ReturnOp returnOp = getAssumedUniqueReturnOp(funcOp);
   assert(returnOp && "expected func with single return op");
 
   for (OpOperand &returnVal : returnOp->getOpOperands())
@@ -350,7 +350,7 @@ getBufferizedFunctionType(MLIRContext *ctx, TypeRange argumentTypes,
 static void equivalenceAnalysis(FuncOp funcOp,
                                 BufferizationAliasInfo &aliasInfo,
                                 ModuleBufferizationState &moduleState) {
-  funcOp->walk([&](CallOp callOp) {
+  funcOp->walk([&](func::CallOp callOp) {
     FuncOp calledFunction = getCalledFunction(callOp);
     assert(calledFunction && "could not retrieved called FuncOp");
 
@@ -424,7 +424,7 @@ static LogicalResult bufferizeFuncOpBoundary(FuncOp funcOp,
   }
 
   // Support only single return-terminated block in the function.
-  ReturnOp returnOp = getAssumedUniqueReturnOp(funcOp);
+  func::ReturnOp returnOp = getAssumedUniqueReturnOp(funcOp);
   assert(returnOp && "expected func with single return op");
 
   // 1. For each FuncOp result, keep track of which inplace argument it reuses.
@@ -454,7 +454,7 @@ static LogicalResult bufferizeFuncOpBoundary(FuncOp funcOp,
       funcOp.getContext(), funcOp.getType().getInputs(), retValues.getTypes(),
       state.getOptions());
   OpBuilder b(returnOp);
-  b.create<ReturnOp>(returnOp.getLoc(), returnValues);
+  b.create<func::ReturnOp>(returnOp.getLoc(), returnValues);
   returnOp->erase();
 
   // 3. Rewrite the bbArgs.
@@ -528,7 +528,7 @@ getFuncOpsOrderedByCalls(ModuleOp moduleOp,
   DenseMap<FuncOp, unsigned> numberCallOpsContainedInFuncOp;
   WalkResult res = moduleOp.walk([&](FuncOp funcOp) -> WalkResult {
     if (!funcOp.body().empty()) {
-      ReturnOp returnOp = getAssumedUniqueReturnOp(funcOp);
+      func::ReturnOp returnOp = getAssumedUniqueReturnOp(funcOp);
       if (!returnOp)
         return funcOp->emitError()
                << "cannot bufferize a FuncOp with tensors and "
@@ -538,7 +538,7 @@ getFuncOpsOrderedByCalls(ModuleOp moduleOp,
     numberCallOpsContainedInFuncOp[funcOp] = 0;
     return funcOp.walk([&](CallOpInterface callOp) -> WalkResult {
       // Only support CallOp for now.
-      if (!isa<CallOp>(callOp.getOperation()))
+      if (!isa<func::CallOp>(callOp.getOperation()))
         return callOp->emitError() << "expected a CallOp";
       FuncOp calledFunction = getCalledFunction(callOp);
       assert(calledFunction && "could not retrieved called FuncOp");
@@ -690,10 +690,11 @@ getEquivalentFuncArgIdx(FuncOp funcOp, const ModuleBufferizationState &state,
 }
 
 struct CallOpInterface
-    : public BufferizableOpInterface::ExternalModel<CallOpInterface, CallOp> {
+    : public BufferizableOpInterface::ExternalModel<CallOpInterface,
+                                                    func::CallOp> {
   bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand,
                               const BufferizationState &state) const {
-    CallOp callOp = cast<CallOp>(op);
+    func::CallOp callOp = cast<func::CallOp>(op);
     FuncOp funcOp = getCalledFunction(callOp);
     assert(funcOp && "expected CallOp to a FuncOp");
 
@@ -709,7 +710,7 @@ struct CallOpInterface
 
   bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand,
                                const BufferizationState &state) const {
-    CallOp callOp = cast<CallOp>(op);
+    func::CallOp callOp = cast<func::CallOp>(op);
     FuncOp funcOp = getCalledFunction(callOp);
     assert(funcOp && "expected CallOp to a FuncOp");
 
@@ -726,7 +727,7 @@ struct CallOpInterface
   SmallVector<OpResult>
   getAliasingOpResult(Operation *op, OpOperand &opOperand,
                       const BufferizationState &state) const {
-    CallOp callOp = cast<CallOp>(op);
+    func::CallOp callOp = cast<func::CallOp>(op);
     FuncOp funcOp = getCalledFunction(callOp);
     assert(funcOp && "expected CallOp to a FuncOp");
     const ModuleBufferizationState &moduleState =
@@ -746,7 +747,7 @@ struct CallOpInterface
   SmallVector<OpOperand *>
   getAliasingOpOperand(Operation *op, OpResult opResult,
                        const BufferizationState &state) const {
-    CallOp callOp = cast<CallOp>(op);
+    func::CallOp callOp = cast<func::CallOp>(op);
     FuncOp funcOp = getCalledFunction(callOp);
     assert(funcOp && "expected CallOp to a FuncOp");
     const ModuleBufferizationState &moduleState =
@@ -774,12 +775,11 @@ struct CallOpInterface
   /// bufferization to allow FuncOp that are inplaceable to write inPlace.
   LogicalResult bufferize(Operation *op, RewriterBase &rewriter,
                           const BufferizationState &state) const {
-    CallOp callOp = cast<CallOp>(op);
+    func::CallOp callOp = cast<func::CallOp>(op);
     unsigned numResults = callOp.getNumResults();
     unsigned numOperands = callOp->getNumOperands();
     FuncOp funcOp = getCalledFunction(callOp);
-    assert(isa<CallOp>(callOp.getOperation()) && funcOp &&
-           "expected CallOp to a FuncOp");
+    assert(funcOp && "expected CallOp to a FuncOp");
     const ModuleBufferizationState &moduleState =
         getModuleBufferizationState(state);
 
@@ -885,7 +885,7 @@ struct CallOpInterface
     }
 
     // 4. Create the new CallOp.
-    Operation *newCallOp = rewriter.create<CallOp>(
+    Operation *newCallOp = rewriter.create<func::CallOp>(
         callOp.getLoc(), funcOp.sym_name(), resultTypes, newOperands);
     newCallOp->setAttrs(callOp->getAttrs());
     // Get replacement values for non-tensor / non-equivalent results.
@@ -904,7 +904,7 @@ struct CallOpInterface
 
 struct ReturnOpInterface
     : public BufferizableOpInterface::ExternalModel<ReturnOpInterface,
-                                                    ReturnOp> {
+                                                    func::ReturnOp> {
   bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand,
                               const BufferizationState &state) const {
     return true;
@@ -924,7 +924,7 @@ struct ReturnOpInterface
   LogicalResult bufferize(Operation *op, RewriterBase &rewriter,
                           const BufferizationState &state) const {
 #ifndef NDEBUG
-    auto returnOp = cast<ReturnOp>(op);
+    auto returnOp = cast<func::ReturnOp>(op);
     assert(isa<FuncOp>(returnOp->getParentOp()) &&
            "only support FuncOp parent for ReturnOp");
 #endif // NDEBUG
@@ -967,8 +967,8 @@ struct FuncOpInterface
 
 void mlir::linalg::comprehensive_bufferize::std_ext::
     registerModuleBufferizationExternalModels(DialectRegistry &registry) {
-  registry.addOpInterface<CallOp, std_ext::CallOpInterface>();
-  registry.addOpInterface<ReturnOp, std_ext::ReturnOpInterface>();
+  registry.addOpInterface<func::CallOp, std_ext::CallOpInterface>();
+  registry.addOpInterface<func::ReturnOp, std_ext::ReturnOpInterface>();
   registry.addOpInterface<FuncOp, std_ext::FuncOpInterface>();
 }
 

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp b/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
index 42bb8dcdc8bd1..31d3f8b4aa33e 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
@@ -12,12 +12,12 @@
 #include "mlir/Dialect/Arithmetic/Utils/Utils.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
 #include "mlir/Dialect/Bufferization/Transforms/Bufferize.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Passes.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
 #include "mlir/Dialect/Math/IR/Math.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/BuiltinDialect.h"
@@ -178,9 +178,9 @@ struct LinalgBufferizePass : public LinalgBufferizeBase<LinalgBufferizePass> {
     ConversionTarget target(context);
     bufferization::BufferizeTypeConverter typeConverter;
 
-    // Mark all Standard operations legal.
+    // Mark certain operations legal.
     target.addLegalDialect<arith::ArithmeticDialect, AffineDialect,
-                           memref::MemRefDialect, StandardOpsDialect,
+                           func::FuncDialect, memref::MemRefDialect,
                            tensor::TensorDialect>();
     target.addIllegalOp<InitTensorOp>();
 

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
index a688eb59a6f12..f1fbbf3d158e0 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
@@ -39,6 +39,8 @@ add_mlir_dialect_library(MLIRLinalgTransforms
   MLIRArithmeticTransforms
   MLIRBufferization
   MLIRComplex
+  MLIRFunc
+  MLIRFuncTransforms
   MLIRInferTypeOpInterface
   MLIRIR
   MLIRMemRef
@@ -51,8 +53,6 @@ add_mlir_dialect_library(MLIRLinalgTransforms
   MLIRSCFUtils
   MLIRPass
   MLIRSparseTensor
-  MLIRStandard
-  MLIRStandardOpsTransforms
   MLIRStandardToLLVM
   MLIRTensor
   MLIRTensorTilingInterfaceImpl

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
index d7869b4a9f417..449a7ebda2f62 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferizePass.cpp
@@ -49,7 +49,7 @@ struct LinalgComprehensiveModuleBufferize
         .insert<bufferization::BufferizationDialect, linalg::LinalgDialect,
                 memref::MemRefDialect, tensor::TensorDialect,
                 vector::VectorDialect, scf::SCFDialect,
-                arith::ArithmeticDialect, StandardOpsDialect, AffineDialect>();
+                arith::ArithmeticDialect, func::FuncDialect, AffineDialect>();
     affine_ext::registerBufferizableOpInterfaceExternalModels(registry);
     arith::registerBufferizableOpInterfaceExternalModels(registry);
     linalg::registerBufferizableOpInterfaceExternalModels(registry);

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp b/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
index afe82ff8bdfac..9a87871478cf1 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp
@@ -8,9 +8,9 @@
 
 #include "PassDetail.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
+#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/FuncConversions.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/OpDefinition.h"
 #include "mlir/Transforms/DialectConversion.h"

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp b/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp
index 68fdd91e92ba0..c7ff94c301f9b 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/ElementwiseToLinalg.cpp
@@ -10,10 +10,10 @@
 
 #include "PassDetail.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/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 using namespace mlir;

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp b/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
index da45a6c64e9cd..f2a5937f7c0ca 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/HoistPadding.cpp
@@ -12,11 +12,11 @@
 
 #include "mlir/Dialect/Linalg/Transforms/HoistPadding.h"
 #include "mlir/Analysis/SliceAnalysis.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/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Dialect/Vector/Utils/VectorUtils.h"
@@ -368,7 +368,7 @@ HoistingAnalysis::getPackedTensorSizes(ImplicitLocOpBuilder &b) {
 }
 
 static bool isDefinedOutsideOrConstant(scf::ForOp outer, Value v) {
-  return outer.isDefinedOutsideOfLoop(v) || v.getDefiningOp<ConstantOp>();
+  return outer.isDefinedOutsideOfLoop(v) || v.getDefiningOp<func::ConstantOp>();
 }
 
 /// Return the current iteration number in the loop (iv - lb).ceilDiv(step).

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
index 8650d574de289..4e3c7c8497d5a 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Hoisting.cpp
@@ -15,11 +15,11 @@
 #include "mlir/Analysis/SliceAnalysis.h"
 #include "mlir/Dialect/Affine/Analysis/AffineStructures.h"
 #include "mlir/Dialect/Affine/IR/AffineValueMap.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/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Dialect/Vector/Utils/VectorUtils.h"

diff  --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
index 0d8632df6b0e0..c9d337be7f353 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
@@ -365,7 +365,7 @@ vectorizeOneOp(OpBuilder &b, LinalgOp linalgOp, Operation *op,
 
   // 2. Constant ops don't get vectorized but rather broadcasted at their users.
   // Clone so that the constant is not confined to the linalgOp block .
-  if (isa<arith::ConstantOp, ConstantOp>(op))
+  if (isa<arith::ConstantOp, func::ConstantOp>(op))
     return VectorizationResult{VectorizationStatus::NewOp, b.clone(*op)};
 
   // 3. Only ElementwiseMappable are allowed in the generic vectorization.
@@ -428,8 +428,8 @@ static bool hasOnlyScalarElementwiseOp(Region &r) {
   if (!llvm::hasSingleElement(r))
     return false;
   for (Operation &op : r.front()) {
-    if (!(isa<arith::ConstantOp, ConstantOp, linalg::YieldOp, linalg::IndexOp>(
-              op) ||
+    if (!(isa<arith::ConstantOp, func::ConstantOp, linalg::YieldOp,
+              linalg::IndexOp>(op) ||
           OpTrait::hasElementwiseMappableTraits(&op)) ||
         llvm::any_of(op.getResultTypes(),
                      [](Type type) { return !type.isIntOrIndexOrFloat(); }))

diff  --git a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
index dacabad7ddf8c..510ddefebea78 100644
--- a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
+++ b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
@@ -9,11 +9,11 @@ add_mlir_dialect_library(MLIRLinalgUtils
   MLIRAffineAnalysis
   MLIRAffineUtils
   MLIRArithmetic
+  MLIRFunc
   MLIRIR
   MLIRLinalg
   MLIRSCF
   MLIRPass
-  MLIRStandard
   MLIRTensorUtils
   MLIRTransformUtils
   )

diff  --git a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
index 3dfb336a9bf17..3a54d66f6b6ee 100644
--- a/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/Linalg/Utils/Utils.cpp
@@ -19,10 +19,10 @@
 #include "mlir/Dialect/Affine/LoopUtils.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.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/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/Tensor/Utils/Utils.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"

diff  --git a/mlir/lib/Dialect/Math/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Math/Transforms/CMakeLists.txt
index 96bb17e650d15..2fb4c5e526c90 100644
--- a/mlir/lib/Dialect/Math/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Math/Transforms/CMakeLists.txt
@@ -9,10 +9,10 @@ add_mlir_dialect_library(MLIRMathTransforms
   LINK_LIBS PUBLIC
   MLIRArithmetic
   MLIRDialectUtils
+  MLIRFunc
   MLIRIR
   MLIRMath
   MLIRPass
-  MLIRStandard
   MLIRTransforms
   MLIRX86Vector
   MLIRVector

diff  --git a/mlir/lib/Dialect/Math/Transforms/ExpandTanh.cpp b/mlir/lib/Dialect/Math/Transforms/ExpandTanh.cpp
index 9416ac544f176..7b6f96905a01f 100644
--- a/mlir/lib/Dialect/Math/Transforms/ExpandTanh.cpp
+++ b/mlir/lib/Dialect/Math/Transforms/ExpandTanh.cpp
@@ -11,9 +11,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Math/IR/Math.h"
 #include "mlir/Dialect/Math/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/Transforms/DialectConversion.h"
 

diff  --git a/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt b/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
index d27f02edf9daf..ceaede262a23a 100644
--- a/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
+++ b/mlir/lib/Dialect/MemRef/IR/CMakeLists.txt
@@ -6,7 +6,6 @@ add_mlir_dialect_library(MLIRMemRef
   ${PROJECT_SOURCE_DIR}/inlude/mlir/Dialect/MemRefDialect
 
   DEPENDS
-  MLIRStandardOpsIncGen
   MLIRMemRefOpsIncGen
 
   LINK_COMPONENTS

diff  --git a/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt b/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
index 834346d3d1d4b..79789f61a305a 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/MemRef/Transforms/CMakeLists.txt
@@ -16,11 +16,11 @@ add_mlir_dialect_library(MLIRMemRefTransforms
   MLIRAffine
   MLIRAffineUtils
   MLIRArithmetic
+  MLIRFunc
   MLIRInferTypeOpInterface
   MLIRLoopLikeInterface
   MLIRMemRef
   MLIRPass
-  MLIRStandard
   MLIRTensor
   MLIRTransforms
   MLIRVector

diff  --git a/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp b/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp
index ca490a28332c4..7c969d3e30a79 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp
+++ b/mlir/lib/Dialect/MemRef/Transforms/ExpandOps.cpp
@@ -16,9 +16,9 @@
 
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/MemRef/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/TypeUtilities.h"
 #include "mlir/Transforms/DialectConversion.h"
 
@@ -129,7 +129,7 @@ struct ExpandOpsPass : public ExpandOpsBase<ExpandOpsPass> {
     ConversionTarget target(ctx);
 
     target.addLegalDialect<arith::ArithmeticDialect, memref::MemRefDialect,
-                           StandardOpsDialect>();
+                           func::FuncDialect>();
     target.addDynamicallyLegalOp<memref::AtomicRMWOp>(
         [](memref::AtomicRMWOp op) {
           return op.kind() != arith::AtomicRMWKind::maxf &&

diff  --git a/mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp b/mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp
index 89936111fce55..3ac903877cf49 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp
+++ b/mlir/lib/Dialect/MemRef/Transforms/NormalizeMemRefs.cpp
@@ -125,7 +125,7 @@ void NormalizeMemRefs::setCalleesAndCallersNonNormalizable(
   }
 
   // Functions called by this function.
-  funcOp.walk([&](CallOp callOp) {
+  funcOp.walk([&](func::CallOp callOp) {
     StringAttr callee = callOp.getCalleeAttr().getAttr();
     for (FuncOp &funcOp : normalizableFuncs) {
       // We compare FuncOp and callee's name.
@@ -161,7 +161,7 @@ bool NormalizeMemRefs::areMemRefsNormalizable(FuncOp funcOp) {
     return false;
 
   if (funcOp
-          .walk([&](CallOp callOp) -> WalkResult {
+          .walk([&](func::CallOp callOp) -> WalkResult {
             for (unsigned resIndex :
                  llvm::seq<unsigned>(0, callOp.getNumResults())) {
               Value oldMemRef = callOp.getResult(resIndex);
@@ -206,7 +206,7 @@ void NormalizeMemRefs::updateFunctionSignature(FuncOp funcOp,
 
     // Traverse ReturnOps to check if an update to the return type in the
     // function signature is required.
-    funcOp.walk([&](ReturnOp returnOp) {
+    funcOp.walk([&](func::ReturnOp returnOp) {
       for (const auto &operandEn : llvm::enumerate(returnOp.getOperands())) {
         Type opType = operandEn.value().getType();
         MemRefType memrefType = opType.dyn_cast<MemRefType>();
@@ -249,12 +249,12 @@ void NormalizeMemRefs::updateFunctionSignature(FuncOp funcOp,
     // that the non-CallOp has no memrefs to be replaced.
     // TODO: Handle cases where a non-CallOp symbol use of a function deals with
     // memrefs.
-    auto callOp = dyn_cast<CallOp>(userOp);
+    auto callOp = dyn_cast<func::CallOp>(userOp);
     if (!callOp)
       continue;
     Operation *newCallOp =
-        builder.create<CallOp>(userOp->getLoc(), callOp.getCalleeAttr(),
-                               resultTypes, userOp->getOperands());
+        builder.create<func::CallOp>(userOp->getLoc(), callOp.getCalleeAttr(),
+                                     resultTypes, userOp->getOperands());
     bool replacingMemRefUsesFailed = false;
     bool returnTypeChanged = false;
     for (unsigned resIndex : llvm::seq<unsigned>(0, userOp->getNumResults())) {
@@ -391,7 +391,8 @@ void NormalizeMemRefs::normalizeFuncOpMemRefs(FuncOp funcOp,
   // `updateFunctionSignature()`.
   funcOp.walk([&](Operation *op) {
     if (op->hasTrait<OpTrait::MemRefsNormalizable>() &&
-        op->getNumResults() > 0 && !isa<CallOp>(op) && !funcOp.isExternal()) {
+        op->getNumResults() > 0 && !isa<func::CallOp>(op) &&
+        !funcOp.isExternal()) {
       // Create newOp containing normalized memref in the operation result.
       Operation *newOp = createOpResultsNormalized(funcOp, op);
       // When all of the operation results have no memrefs or memrefs without

diff  --git a/mlir/lib/Dialect/MemRef/Transforms/PassDetail.h b/mlir/lib/Dialect/MemRef/Transforms/PassDetail.h
index d1e5baa798fd1..318469f67fdb4 100644
--- a/mlir/lib/Dialect/MemRef/Transforms/PassDetail.h
+++ b/mlir/lib/Dialect/MemRef/Transforms/PassDetail.h
@@ -14,7 +14,6 @@
 namespace mlir {
 
 class AffineDialect;
-class StandardOpsDialect;
 
 // Forward declaration from Dialect.h
 template <typename ConcreteDialect>
@@ -24,6 +23,10 @@ namespace arith {
 class ArithmeticDialect;
 } // namespace arith
 
+namespace func {
+class FuncDialect;
+} // namespace func
+
 namespace memref {
 class MemRefDialect;
 } // namespace memref

diff  --git a/mlir/lib/Dialect/SCF/CMakeLists.txt b/mlir/lib/Dialect/SCF/CMakeLists.txt
index 4288c0cc8022c..595e8f79ba65e 100644
--- a/mlir/lib/Dialect/SCF/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/CMakeLists.txt
@@ -10,10 +10,10 @@ add_mlir_dialect_library(MLIRSCF
   LINK_LIBS PUBLIC
   MLIRArithmetic
   MLIRBufferization
+  MLIRFunc
   MLIRIR
   MLIRLoopLikeInterface
   MLIRSideEffectInterfaces
-  MLIRStandard
   )
 
 add_subdirectory(Transforms)

diff  --git a/mlir/lib/Dialect/SCF/SCF.cpp b/mlir/lib/Dialect/SCF/SCF.cpp
index f35d74879d99e..ab00578d1a16e 100644
--- a/mlir/lib/Dialect/SCF/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/SCF.cpp
@@ -10,7 +10,7 @@
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Bufferization/IR/Bufferization.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/Matchers.h"
 #include "mlir/IR/PatternMatch.h"

diff  --git a/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp b/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
index b31593b90ea67..d6803031e894d 100644
--- a/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/Bufferize.cpp
@@ -9,11 +9,11 @@
 #include "mlir/Dialect/Bufferization/Transforms/Bufferize.h"
 #include "PassDetail.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/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 using namespace mlir;

diff  --git a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
index 4858954343c31..df087e57b436a 100644
--- a/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/Transforms/CMakeLists.txt
@@ -24,12 +24,12 @@ add_mlir_dialect_library(MLIRSCFTransforms
   MLIRBufferization
   MLIRBufferizationTransforms
   MLIRDialectUtils
+  MLIRFunc
   MLIRIR
   MLIRMemRef
   MLIRPass
   MLIRSCF
   MLIRSCFUtils
-  MLIRStandard
   MLIRSupport
   MLIRTensor
   MLIRTransforms

diff  --git a/mlir/lib/Dialect/SCF/Transforms/ForToWhile.cpp b/mlir/lib/Dialect/SCF/Transforms/ForToWhile.cpp
index faf0da11302c8..aab11e708e90a 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ForToWhile.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ForToWhile.cpp
@@ -12,10 +12,10 @@
 
 #include "PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 

diff  --git a/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
index 493a1b891e343..4c2df93f8a383 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopPipelining.cpp
@@ -12,10 +12,10 @@
 
 #include "PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
 #include "mlir/Dialect/SCF/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Support/MathExtras.h"

diff  --git a/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
index 34e79c775053c..5e1dbf108527d 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopRangeFolding.cpp
@@ -12,11 +12,11 @@
 
 #include "PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
 #include "mlir/Dialect/SCF/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 
 using namespace mlir;

diff  --git a/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp b/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
index 503c9b05c483f..106100ad92ada 100644
--- a/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
@@ -15,11 +15,11 @@
 #include "mlir/Dialect/Affine/Analysis/AffineStructures.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
 #include "mlir/Dialect/SCF/Utils/AffineCanonicalizationUtils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Utils/StaticValueUtils.h"
 #include "mlir/IR/AffineExpr.h"
 #include "mlir/IR/BlockAndValueMapping.h"

diff  --git a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
index f4f87511603bc..5435186ecae09 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopFusion.cpp
@@ -11,11 +11,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "PassDetail.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/OpDefinition.h"

diff  --git a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
index 8e35efa852d5e..5cee4ac8d6ecb 100644
--- a/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/ParallelLoopTiling.cpp
@@ -13,11 +13,11 @@
 #include "PassDetail.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
 #include "mlir/Dialect/SCF/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 
 using namespace mlir;
 using namespace mlir::scf;

diff  --git a/mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp b/mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp
index 3a963c70e1148..50bc4f5408971 100644
--- a/mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp
+++ b/mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp
@@ -7,10 +7,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "PassDetail.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/Passes.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Transforms/DialectConversion.h"
 
 using namespace mlir;

diff  --git a/mlir/lib/Dialect/SCF/Utils/CMakeLists.txt b/mlir/lib/Dialect/SCF/Utils/CMakeLists.txt
index bad518fe8acfd..6ad4606dd48fc 100644
--- a/mlir/lib/Dialect/SCF/Utils/CMakeLists.txt
+++ b/mlir/lib/Dialect/SCF/Utils/CMakeLists.txt
@@ -11,9 +11,9 @@ add_mlir_dialect_library(MLIRSCFUtils
   MLIRAnalysis
   MLIRArithmetic
   MLIRDialectUtils
+  MLIRFunc
   MLIRIR
   MLIRSCF
-  MLIRStandard
   MLIRSupport
   MLIRTransforms
   )

diff  --git a/mlir/lib/Dialect/SCF/Utils/Utils.cpp b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
index 83766b18e2ed7..f1f34eaf00bee 100644
--- a/mlir/lib/Dialect/SCF/Utils/Utils.cpp
+++ b/mlir/lib/Dialect/SCF/Utils/Utils.cpp
@@ -13,8 +13,8 @@
 #include "mlir/Dialect/SCF/Utils/Utils.h"
 #include "mlir/Analysis/SliceAnalysis.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BlockAndValueMapping.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"
@@ -147,8 +147,8 @@ FailureOr<FuncOp> mlir::outlineSingleBlockRegion(RewriterBase &rewriter,
         outlinedFuncBlockArgs.take_front(numOriginalBlockArguments));
     // Explicitly set up a new ReturnOp terminator.
     rewriter.setInsertionPointToEnd(outlinedFuncBody);
-    rewriter.create<ReturnOp>(loc, originalTerminator->getResultTypes(),
-                              originalTerminator->getOperands());
+    rewriter.create<func::ReturnOp>(loc, originalTerminator->getResultTypes(),
+                                    originalTerminator->getOperands());
   }
 
   // Reconstruct the block that was deleted and add a
@@ -164,7 +164,8 @@ FailureOr<FuncOp> mlir::outlineSingleBlockRegion(RewriterBase &rewriter,
     SmallVector<Value> callValues;
     llvm::append_range(callValues, newBlock->getArguments());
     llvm::append_range(callValues, outlinedValues);
-    Operation *call = rewriter.create<CallOp>(loc, outlinedFunc, callValues);
+    Operation *call =
+        rewriter.create<func::CallOp>(loc, outlinedFunc, callValues);
 
     // `originalTerminator` was moved to `outlinedFuncBody` and is still valid.
     // Clone `originalTerminator` to take the callOp results then erase it from

diff  --git a/mlir/lib/Dialect/Shape/Transforms/ShapeToShapeLowering.cpp b/mlir/lib/Dialect/Shape/Transforms/ShapeToShapeLowering.cpp
index e9e7f00c61644..a0e93f8513ce4 100644
--- a/mlir/lib/Dialect/Shape/Transforms/ShapeToShapeLowering.cpp
+++ b/mlir/lib/Dialect/Shape/Transforms/ShapeToShapeLowering.cpp
@@ -8,9 +8,9 @@
 
 #include "PassDetail.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Shape/IR/Shape.h"
 #include "mlir/Dialect/Shape/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
@@ -66,8 +66,8 @@ void ShapeToShapeLowering::runOnOperation() {
   populateShapeRewritePatterns(patterns);
 
   ConversionTarget target(getContext());
-  target.addLegalDialect<arith::ArithmeticDialect, ShapeDialect,
-                         StandardOpsDialect>();
+  target.addLegalDialect<arith::ArithmeticDialect, func::FuncDialect,
+                         ShapeDialect>();
   target.addIllegalOp<NumElementsOp>();
   if (failed(mlir::applyPartialConversion(getOperation(), target,
                                           std::move(patterns))))

diff  --git a/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt b/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt
index e76261f292fe5..f5c4733af4d59 100644
--- a/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt
+++ b/mlir/lib/Dialect/SparseTensor/Pipelines/CMakeLists.txt
@@ -8,6 +8,7 @@ add_mlir_dialect_library(MLIRSparseTensorPipelines
   MLIRArithmeticTransforms
   MLIRAffineToStandard
   MLIRBufferizationTransforms
+  MLIRFuncTransforms
   MLIRLinalgTransforms
   MLIRMathToLLVM
   MLIRMemRefToLLVM
@@ -16,7 +17,6 @@ add_mlir_dialect_library(MLIRSparseTensorPipelines
   MLIRSCFToControlFlow
   MLIRSparseTensor
   MLIRSparseTensorTransforms
-  MLIRStandardOpsTransforms
   MLIRTensorTransforms
   MLIRVectorToLLVM
   MLIRVectorTransforms

diff  --git a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
index ff6577abaa019..6d0d674c6d721 100644
--- a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
@@ -11,10 +11,10 @@
 #include "mlir/Conversion/Passes.h"
 #include "mlir/Dialect/Arithmetic/Transforms/Passes.h"
 #include "mlir/Dialect/Bufferization/Transforms/Passes.h"
+#include "mlir/Dialect/Func/Transforms/Passes.h"
 #include "mlir/Dialect/Linalg/Passes.h"
 #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
 #include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/Passes.h"
 #include "mlir/Dialect/Tensor/Transforms/Passes.h"
 #include "mlir/Dialect/Vector/Transforms/Passes.h"
 #include "mlir/Pass/PassManager.h"
@@ -38,7 +38,7 @@ void mlir::sparse_tensor::buildSparseCompiler(
   pm.addNestedPass<FuncOp>(createConvertLinalgToLoopsPass());
   pm.addNestedPass<FuncOp>(createConvertVectorToSCFPass());
   pm.addNestedPass<FuncOp>(createConvertSCFToCFPass());
-  pm.addPass(createFuncBufferizePass());
+  pm.addPass(func::createFuncBufferizePass());
   pm.addPass(arith::createConstantBufferizePass());
   pm.addNestedPass<FuncOp>(createTensorBufferizePass());
   pm.addNestedPass<FuncOp>(

diff  --git a/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt b/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
index 15d57bc0fc737..51d7bd4fa8728 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
@@ -13,6 +13,7 @@ add_mlir_dialect_library(MLIRSparseTensorTransforms
   LINK_LIBS PUBLIC
   MLIRArithmetic
   MLIRBufferization
+  MLIRFunc
   MLIRIR
   MLIRLLVMIR
   MLIRLinalg
@@ -22,7 +23,6 @@ add_mlir_dialect_library(MLIRSparseTensorTransforms
   MLIRSCF
   MLIRSCFTransforms
   MLIRSCFUtils
-  MLIRStandard
   MLIRSparseTensor
   MLIRSparseTensorUtils
   MLIRTensor

diff  --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
index 07875fcfc727f..ce76ef289348e 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
@@ -17,13 +17,13 @@
 #include "CodegenUtils.h"
 
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
 #include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/ExecutionEngine/SparseTensorUtils.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -71,21 +71,24 @@ static FlatSymbolRefAttr getFunc(Operation *op, StringRef name,
 }
 
 /// Creates a `CallOp` to the function reference returned by `getFunc()`.
-static CallOp createFuncCall(OpBuilder &builder, Operation *op, StringRef name,
-                             TypeRange resultType, ValueRange operands,
-                             EmitCInterface emitCInterface) {
+static func::CallOp createFuncCall(OpBuilder &builder, Operation *op,
+                                   StringRef name, TypeRange resultType,
+                                   ValueRange operands,
+                                   EmitCInterface emitCInterface) {
   auto fn = getFunc(op, name, resultType, operands, emitCInterface);
-  return builder.create<CallOp>(op->getLoc(), resultType, fn, operands);
+  return builder.create<func::CallOp>(op->getLoc(), resultType, fn, operands);
 }
 
 /// Replaces the `op` with  a `CallOp` to the function reference returned
 /// by `getFunc()`.
-static CallOp replaceOpWithFuncCall(PatternRewriter &rewriter, Operation *op,
-                                    StringRef name, TypeRange resultType,
-                                    ValueRange operands,
-                                    EmitCInterface emitCInterface) {
+static func::CallOp replaceOpWithFuncCall(PatternRewriter &rewriter,
+                                          Operation *op, StringRef name,
+                                          TypeRange resultType,
+                                          ValueRange operands,
+                                          EmitCInterface emitCInterface) {
   auto fn = getFunc(op, name, resultType, operands, emitCInterface);
-  return rewriter.replaceOpWithNewOp<CallOp>(op, resultType, fn, operands);
+  return rewriter.replaceOpWithNewOp<func::CallOp>(op, resultType, fn,
+                                                   operands);
 }
 
 /// Generates dimension size call.
@@ -357,13 +360,13 @@ static void insertScalarIntoDenseTensor(ConversionPatternRewriter &rewriter,
 //===----------------------------------------------------------------------===//
 
 /// Sparse conversion rule for returns.
-class SparseReturnConverter : public OpConversionPattern<ReturnOp> {
+class SparseReturnConverter : public OpConversionPattern<func::ReturnOp> {
 public:
   using OpConversionPattern::OpConversionPattern;
   LogicalResult
-  matchAndRewrite(ReturnOp op, OpAdaptor adaptor,
+  matchAndRewrite(func::ReturnOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    rewriter.replaceOpWithNewOp<ReturnOp>(op, adaptor.getOperands());
+    rewriter.replaceOpWithNewOp<func::ReturnOp>(op, adaptor.getOperands());
     return success();
   }
 };

diff  --git a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
index 62bec937121cd..d51be6b1b670a 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/Bufferization/IR/Bufferization.h"
+#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
 #include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/Transforms/FuncConversions.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
 using namespace mlir;
@@ -84,11 +84,12 @@ struct SparseTensorConversionPass
     // all sparse tensor types have been fully rewritten.
     target.addDynamicallyLegalOp<FuncOp>(
         [&](FuncOp op) { return converter.isSignatureLegal(op.getType()); });
-    target.addDynamicallyLegalOp<CallOp>([&](CallOp op) {
+    target.addDynamicallyLegalOp<func::CallOp>([&](func::CallOp op) {
       return converter.isSignatureLegal(op.getCalleeType());
     });
-    target.addDynamicallyLegalOp<ReturnOp>(
-        [&](ReturnOp op) { return converter.isLegal(op.getOperandTypes()); });
+    target.addDynamicallyLegalOp<func::ReturnOp>([&](func::ReturnOp op) {
+      return converter.isLegal(op.getOperandTypes());
+    });
     target.addDynamicallyLegalOp<tensor::DimOp>([&](tensor::DimOp op) {
       return converter.isLegal(op.getOperandTypes());
     });

diff  --git a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
index 427ee30795945..1f7246bf8d4ae 100644
--- a/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
@@ -15,6 +15,7 @@
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.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/Linalg/Utils/Utils.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
@@ -23,7 +24,6 @@
 #include "mlir/Dialect/SparseTensor/IR/SparseTensor.h"
 #include "mlir/Dialect/SparseTensor/Transforms/Passes.h"
 #include "mlir/Dialect/SparseTensor/Utils/Merger.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/IR/TensorEncoding.h"

diff  --git a/mlir/lib/Dialect/StandardOps/CMakeLists.txt b/mlir/lib/Dialect/StandardOps/CMakeLists.txt
deleted file mode 100644
index f1689abb6e8b9..0000000000000
--- a/mlir/lib/Dialect/StandardOps/CMakeLists.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-add_mlir_dialect_library(MLIRStandard
-  IR/Ops.cpp
-
-  ADDITIONAL_HEADER_DIRS
-  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/StandardOps
-
-  DEPENDS
-  MLIRStandardOpsIncGen
-
-  LINK_LIBS PUBLIC
-  MLIRArithmetic
-  MLIRCallInterfaces
-  MLIRCastInterfaces
-  MLIRControlFlow
-  MLIRControlFlowInterfaces
-  MLIRInferTypeOpInterface
-  MLIRIR
-  MLIRSideEffectInterfaces
-  MLIRVectorInterfaces
-  )
-
-add_subdirectory(Transforms)

diff  --git a/mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp b/mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
index 41b11ea197b22..a28913cdabae3 100644
--- a/mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
+++ b/mlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp
@@ -15,9 +15,9 @@
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.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/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.h"
 #include "mlir/Dialect/Tensor/Transforms/Passes.h"

diff  --git a/mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
index 8b10f9da183d0..e98d3dfe26a70 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
+++ b/mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
@@ -13,8 +13,8 @@ add_mlir_dialect_library(MLIRTosaTransforms
   MLIRTosaPassIncGen
 
   LINK_LIBS PUBLIC
+  MLIRFunc
   MLIRPass
   MLIRTosa
-  MLIRStandard
   MLIRTransformUtils
   )

diff  --git a/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp b/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
index c23830259f9a5..67531ba2403ae 100644
--- a/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
+++ b/mlir/lib/Dialect/Tosa/Transforms/TosaInferShapes.cpp
@@ -12,7 +12,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Analysis/DataFlowAnalysis.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Dialect/Tosa/Transforms/PassDetail.h"
@@ -224,7 +224,7 @@ void propagateShapesInRegion(Region &region) {
           // being replaceable if it is used by a ReturnOp or a TosaOp.
           bool replaceable = true;
           for (auto *user : result.getUsers()) {
-            if (isa<ReturnOp>(user))
+            if (isa<func::ReturnOp>(user))
               continue;
             if (user->getDialect()->getNamespace() ==
                 TosaDialect::getDialectNamespace())
@@ -287,7 +287,7 @@ struct TosaInferShapes : public TosaInferShapesBase<TosaInferShapes> {
 
     // Insert UnrealizedConversionCasts to guarantee ReturnOp agress with
     // the FuncOp type.
-    func.walk([&](ReturnOp op) {
+    func.walk([&](func::ReturnOp op) {
       FuncOp parent = dyn_cast<FuncOp>(op->getParentOp());
       if (!parent)
         return;
@@ -315,7 +315,7 @@ struct TosaInferShapes : public TosaInferShapesBase<TosaInferShapes> {
       }
 
       if (castAdded) {
-        rewriter.replaceOpWithNewOp<ReturnOp>(op, castedValues);
+        rewriter.replaceOpWithNewOp<func::ReturnOp>(op, castedValues);
       }
     });
   }

diff  --git a/mlir/lib/Dialect/Vector/Utils/CMakeLists.txt b/mlir/lib/Dialect/Vector/Utils/CMakeLists.txt
index a25198686dab9..c1954407f4b63 100644
--- a/mlir/lib/Dialect/Vector/Utils/CMakeLists.txt
+++ b/mlir/lib/Dialect/Vector/Utils/CMakeLists.txt
@@ -9,9 +9,9 @@ add_mlir_dialect_library(MLIRVectorUtils
   MLIRAffineAnalysis
   MLIRArithmetic
   MLIRDialectUtils
+  MLIRFunc
   MLIRIR
   MLIRMemRef
-  MLIRStandard
   MLIRTensor
   MLIRVector
   MLIRVectorInterfaces

diff  --git a/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp b/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
index 5388b7bd6ca1f..774b1f3617161 100644
--- a/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
+++ b/mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
@@ -15,8 +15,8 @@
 #include "mlir/Dialect/Affine/Analysis/LoopAnalysis.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.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/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/Builders.h"
@@ -283,7 +283,7 @@ bool matcher::operatesOnSuperVectorsOf(Operation &op,
     superVectorType = transfer.getVectorType();
     mustDivide = true;
   } else if (op.getNumResults() == 0) {
-    if (!isa<ReturnOp>(op)) {
+    if (!isa<func::ReturnOp>(op)) {
       op.emitError("NYI: assuming only return operations can have 0 "
                    " results at this point");
     }

diff  --git a/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp b/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
index 0fbd54b2375be..bdd8d1fd31e60 100644
--- a/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
+++ b/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
@@ -12,7 +12,6 @@
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/X86Vector/X86VectorDialect.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"

diff  --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index 7d758fdbdd619..f067a04bcddef 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -77,9 +77,9 @@ add_mlir_library(MLIRJitRunner
   LINK_LIBS PUBLIC
   ${dialect_libs}
   MLIRExecutionEngine
+  MLIRFunc
   MLIRIR
   MLIRParser
-  MLIRStandard
   MLIRLLVMToLLVMIRTranslation
   MLIRTargetLLVMIRExport
   MLIRTransforms

diff  --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp
index 72738971db6d5..89a6b27c5feaa 100644
--- a/mlir/lib/IR/Operation.cpp
+++ b/mlir/lib/IR/Operation.cpp
@@ -608,8 +608,8 @@ void OpState::printOpName(Operation *op, OpAsmPrinter &p,
     name = name.drop_front(defaultDialect.size() + 1);
   // TODO: remove this special case (and update test/IR/parser.mlir)
   else if ((defaultDialect.empty() || defaultDialect == "builtin") &&
-           name.startswith("std."))
-    name = name.drop_front(4);
+           name.startswith("func."))
+    name = name.drop_front(5);
   p.getStream() << name;
 }
 

diff  --git a/mlir/lib/Parser/Parser.cpp b/mlir/lib/Parser/Parser.cpp
index 54e4e762d5640..7a48aa92fa29b 100644
--- a/mlir/lib/Parser/Parser.cpp
+++ b/mlir/lib/Parser/Parser.cpp
@@ -1672,8 +1672,9 @@ FailureOr<OperationName> OperationParser::parseCustomOperationName() {
       // default dialect (set through OpAsmOpInterface).
       opInfo = RegisteredOperationName::lookup(
           Twine(defaultDialect + "." + opName).str(), getContext());
-      if (!opInfo && getContext()->getOrLoadDialect("std")) {
-        opInfo = RegisteredOperationName::lookup(Twine("std." + opName).str(),
+      // FIXME: Remove this in favor of using default dialects.
+      if (!opInfo && getContext()->getOrLoadDialect("func")) {
+        opInfo = RegisteredOperationName::lookup(Twine("func." + opName).str(),
                                                  getContext());
       }
       if (opInfo) {

diff  --git a/mlir/lib/Target/Cpp/CMakeLists.txt b/mlir/lib/Target/Cpp/CMakeLists.txt
index da34dcc87c1dd..8263ef4e8eda5 100644
--- a/mlir/lib/Target/Cpp/CMakeLists.txt
+++ b/mlir/lib/Target/Cpp/CMakeLists.txt
@@ -9,10 +9,10 @@ add_mlir_translation_library(MLIRTargetCpp
   MLIRArithmetic
   MLIRControlFlow
   MLIREmitC
+  MLIRFunc
   MLIRIR
   MLIRMath
   MLIRSCF
-  MLIRStandard
   MLIRSupport
   MLIRTranslation
   )

diff  --git a/mlir/lib/Target/Cpp/TranslateRegistration.cpp b/mlir/lib/Target/Cpp/TranslateRegistration.cpp
index 889637bec5506..82574091e6466 100644
--- a/mlir/lib/Target/Cpp/TranslateRegistration.cpp
+++ b/mlir/lib/Target/Cpp/TranslateRegistration.cpp
@@ -9,9 +9,9 @@
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/ControlFlow/IR/ControlFlow.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/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Dialect.h"
 #include "mlir/Target/Cpp/CppEmitter.h"
@@ -44,8 +44,8 @@ void registerToCppTranslation() {
         registry.insert<arith::ArithmeticDialect,
                         cf::ControlFlowDialect,
                         emitc::EmitCDialect,
+                        func::FuncDialect,
                         math::MathDialect,
-                        StandardOpsDialect,
                         scf::SCFDialect>();
         // clang-format on
       });

diff  --git a/mlir/lib/Target/Cpp/TranslateToCpp.cpp b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
index 69b6cbfee64bf..ce1483b733f15 100644
--- a/mlir/lib/Target/Cpp/TranslateToCpp.cpp
+++ b/mlir/lib/Target/Cpp/TranslateToCpp.cpp
@@ -8,8 +8,8 @@
 
 #include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
 #include "mlir/Dialect/EmitC/IR/EmitC.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/Dialect.h"
@@ -238,7 +238,7 @@ static LogicalResult printOperation(CppEmitter &emitter,
 }
 
 static LogicalResult printOperation(CppEmitter &emitter,
-                                    mlir::ConstantOp constantOp) {
+                                    func::ConstantOp constantOp) {
   Operation *operation = constantOp.getOperation();
   Attribute value = constantOp.getValueAttr();
 
@@ -311,7 +311,7 @@ static LogicalResult printOperation(CppEmitter &emitter,
   return success();
 }
 
-static LogicalResult printOperation(CppEmitter &emitter, mlir::CallOp callOp) {
+static LogicalResult printOperation(CppEmitter &emitter, func::CallOp callOp) {
   if (failed(emitter.emitAssignPrefix(*callOp.getOperation())))
     return failure();
 
@@ -545,7 +545,8 @@ static LogicalResult printOperation(CppEmitter &emitter, scf::YieldOp yieldOp) {
   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()) {
@@ -909,17 +910,22 @@ LogicalResult CppEmitter::emitLabel(Block &block) {
 LogicalResult CppEmitter::emitOperation(Operation &op, bool trailingSemicolon) {
   LogicalResult status =
       llvm::TypeSwitch<Operation *, LogicalResult>(&op)
+          // Builtin ops.
+          .Case<FuncOp, ModuleOp>(
+              [&](auto op) { return printOperation(*this, op); })
+          // CF ops.
+          .Case<cf::BranchOp, cf::CondBranchOp>(
+              [&](auto op) { return printOperation(*this, op); })
           // EmitC ops.
           .Case<emitc::ApplyOp, emitc::CallOp, emitc::ConstantOp,
                 emitc::IncludeOp, emitc::VariableOp>(
               [&](auto op) { return printOperation(*this, op); })
+          // Func ops.
+          .Case<func::CallOp, func::ConstantOp, func::ReturnOp>(
+              [&](auto op) { return printOperation(*this, op); })
           // SCF ops.
           .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>(
-              [&](auto op) { return printOperation(*this, op); })
           // Arithmetic ops.
           .Case<arith::ConstantOp>(
               [&](auto op) { return printOperation(*this, op); })

diff  --git a/mlir/python/CMakeLists.txt b/mlir/python/CMakeLists.txt
index bf379e9b2ec8c..1477ffea76f49 100644
--- a/mlir/python/CMakeLists.txt
+++ b/mlir/python/CMakeLists.txt
@@ -80,6 +80,15 @@ declare_mlir_dialect_python_bindings(
     dialects/cf.py
   DIALECT_NAME cf)
 
+declare_mlir_dialect_python_bindings(
+  ADD_TO_PARENT MLIRPythonSources.Dialects
+  ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
+  TD_FILE dialects/FuncOps.td
+  SOURCES
+    dialects/func.py
+    dialects/_func_ops_ext.py
+  DIALECT_NAME func)
+
 declare_mlir_dialect_python_bindings(
   ADD_TO_PARENT MLIRPythonSources.Dialects
   ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
@@ -164,15 +173,6 @@ declare_mlir_dialect_python_bindings(
   SOURCES dialects/sparse_tensor.py
   DIALECT_NAME sparse_tensor)
 
-declare_mlir_dialect_python_bindings(
-  ADD_TO_PARENT MLIRPythonSources.Dialects
-  ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
-  TD_FILE dialects/StandardOps.td
-  SOURCES
-    dialects/std.py
-    dialects/_std_ops_ext.py
-  DIALECT_NAME std)
-
 declare_mlir_dialect_python_bindings(
   ADD_TO_PARENT MLIRPythonSources.Dialects
   ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/mlir"
@@ -232,7 +232,7 @@ declare_mlir_python_extension(MLIRPythonExtension.Core
     MLIRCAPIRegistration  # TODO: See about dis-aggregating
 
     # Dialects
-    MLIRCAPIStandard
+    MLIRCAPIFunc
 )
 
 declare_mlir_python_extension(MLIRPythonExtension.Dialects.Linalg.Pybind

diff  --git a/mlir/python/mlir/dialects/StandardOps.td b/mlir/python/mlir/dialects/FuncOps.td
similarity index 70%
rename from mlir/python/mlir/dialects/StandardOps.td
rename to mlir/python/mlir/dialects/FuncOps.td
index 5b7caabc23419..1728091f44440 100644
--- a/mlir/python/mlir/dialects/StandardOps.td
+++ b/mlir/python/mlir/dialects/FuncOps.td
@@ -1,4 +1,4 @@
-//===-- StandardOps.td - Entry point for StandardOps bind --*- tablegen -*-===//
+//===-- FuncOps.td - Entry point for Func bind -------------*- tablegen -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,15 +6,15 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This is the main file from which the Python bindings for the Standard
-// dialect are generated.
+// This is the main file from which the Python bindings for the Func dialect
+// are generated.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef PYTHON_BINDINGS_STANDARD_OPS
-#define PYTHON_BINDINGS_STANDARD_OPS
+#ifndef PYTHON_BINDINGS_FUNC
+#define PYTHON_BINDINGS_FUNC
 
 include "mlir/Bindings/Python/Attributes.td"
-include "mlir/Dialect/StandardOps/IR/Ops.td"
+include "mlir/Dialect/Func/IR/FuncOps.td"
 
 #endif

diff  --git a/mlir/python/mlir/dialects/_builtin_ops_ext.py b/mlir/python/mlir/dialects/_builtin_ops_ext.py
index 78f8c95c42da5..a3a1474692661 100644
--- a/mlir/python/mlir/dialects/_builtin_ops_ext.py
+++ b/mlir/python/mlir/dialects/_builtin_ops_ext.py
@@ -162,7 +162,7 @@ def from_py_func(FuncOp,
     """
 
     def decorator(f):
-      from . import std
+      from . import func
       # Introspect the callable for optional features.
       sig = inspect.signature(f)
       has_arg_func_op = False
@@ -208,15 +208,15 @@ def decorator(f):
             return_values = return_values.results
           else:
             return_values = list(return_values)
-          std.ReturnOp(return_values)
+          func.ReturnOp(return_values)
           # Recompute the function type.
           return_types = [v.type for v in return_values]
           function_type = FunctionType.get(inputs=inputs, results=return_types)
           func_op.attributes["type"] = TypeAttr.get(function_type)
 
       def emit_call_op(*call_args):
-        call_op = std.CallOp(return_types, FlatSymbolRefAttr.get(symbol_name),
-                             call_args)
+        call_op = func.CallOp(return_types, FlatSymbolRefAttr.get(symbol_name),
+                              call_args)
         if return_types is None:
           return None
         elif len(return_types) == 1:

diff  --git a/mlir/python/mlir/dialects/_std_ops_ext.py b/mlir/python/mlir/dialects/_func_ops_ext.py
similarity index 97%
rename from mlir/python/mlir/dialects/_std_ops_ext.py
rename to mlir/python/mlir/dialects/_func_ops_ext.py
index f4cb6186b1657..850562673b7ee 100644
--- a/mlir/python/mlir/dialects/_std_ops_ext.py
+++ b/mlir/python/mlir/dialects/_func_ops_ext.py
@@ -46,8 +46,8 @@ def __init__(self,
     For example
 
         f = builtin.FuncOp("foo", ...)
-        std.CallOp(f, [args])
-        std.CallOp([result_types], "foo", [args])
+        func.CallOp(f, [args])
+        func.CallOp([result_types], "foo", [args])
 
     In all cases, the location and insertion point may be specified as keyword
     arguments if not provided by the surrounding context managers.

diff  --git a/mlir/python/mlir/dialects/std.py b/mlir/python/mlir/dialects/func.py
similarity index 87%
rename from mlir/python/mlir/dialects/std.py
rename to mlir/python/mlir/dialects/func.py
index 8e55807a04204..dc554c22173bc 100644
--- a/mlir/python/mlir/dialects/std.py
+++ b/mlir/python/mlir/dialects/func.py
@@ -2,4 +2,4 @@
 #  See https://llvm.org/LICENSE.txt for license information.
 #  SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 
-from ._std_ops_gen import *
+from ._func_ops_gen import *

diff  --git a/mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py b/mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
index 453a3e80cd9ad..ff5c405d788a9 100644
--- a/mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
+++ b/mlir/python/mlir/dialects/linalg/opdsl/lang/emitter.py
@@ -6,8 +6,8 @@
 
 from .....ir import *
 
+from .... import func
 from .... import linalg
-from .... import std
 from .... import math
 from .... import arith
 from ...._ods_common import get_op_result_or_value as _get_op_result_or_value, get_op_results_or_values as _get_op_results_or_values

diff  --git a/mlir/test/CAPI/CMakeLists.txt b/mlir/test/CAPI/CMakeLists.txt
index 9610df62457e1..8a7a567f2a775 100644
--- a/mlir/test/CAPI/CMakeLists.txt
+++ b/mlir/test/CAPI/CMakeLists.txt
@@ -34,7 +34,7 @@ _add_capi_test_executable(mlir-capi-ir-test
   ir.c
   LINK_LIBS PRIVATE
     MLIRCAPIIR
-    MLIRCAPIStandard
+    MLIRCAPIFunc
     MLIRCAPIRegistration
 )
 

diff  --git a/mlir/test/CAPI/ir.c b/mlir/test/CAPI/ir.c
index c8d27398d6fc5..f2769d34cdd2b 100644
--- a/mlir/test/CAPI/ir.c
+++ b/mlir/test/CAPI/ir.c
@@ -16,7 +16,7 @@
 #include "mlir-c/BuiltinAttributes.h"
 #include "mlir-c/BuiltinTypes.h"
 #include "mlir-c/Diagnostics.h"
-#include "mlir-c/Dialect/Standard.h"
+#include "mlir-c/Dialect/Func.h"
 #include "mlir-c/IntegerSet.h"
 #include "mlir-c/Registration.h"
 #include "mlir-c/Support.h"
@@ -161,7 +161,7 @@ MlirModule makeAndDumpAdd(MlirContext ctx, MlirLocation location) {
   populateLoopBody(ctx, loopBody, location, funcBody);
 
   MlirOperationState retState = mlirOperationStateGet(
-      mlirStringRefCreateFromCString("std.return"), location);
+      mlirStringRefCreateFromCString("func.return"), location);
   MlirOperation ret = mlirOperationCreate(&retState);
   mlirBlockAppendOwnedOperation(funcBody, ret);
 
@@ -837,10 +837,10 @@ int printBuiltinAttributes(MlirContext ctx) {
 
   const char data[] = "abcdefghijklmnopqestuvwxyz";
   MlirAttribute opaque =
-      mlirOpaqueAttrGet(ctx, mlirStringRefCreateFromCString("std"), 3, data,
+      mlirOpaqueAttrGet(ctx, mlirStringRefCreateFromCString("func"), 3, data,
                         mlirNoneTypeGet(ctx));
   if (!mlirAttributeIsAOpaque(opaque) ||
-      !stringIsEqual("std", mlirOpaqueAttrGetDialectNamespace(opaque)))
+      !stringIsEqual("func", mlirOpaqueAttrGetDialectNamespace(opaque)))
     return 4;
 
   MlirStringRef opaqueData = mlirOpaqueAttrGetData(opaque);
@@ -848,7 +848,7 @@ int printBuiltinAttributes(MlirContext ctx) {
       strncmp(data, opaqueData.data, opaqueData.length))
     return 5;
   mlirAttributeDump(opaque);
-  // CHECK: #std.abc
+  // CHECK: #func.abc
 
   MlirAttribute string =
       mlirStringAttrGet(ctx, mlirStringRefCreate(data + 3, 2));
@@ -1514,7 +1514,7 @@ int registerOnlyStd() {
   if (mlirContextGetNumLoadedDialects(ctx) != 1)
     return 1;
 
-  MlirDialectHandle stdHandle = mlirGetDialectHandle__std__();
+  MlirDialectHandle stdHandle = mlirGetDialectHandle__func__();
 
   MlirDialect std = mlirContextGetOrLoadDialect(
       ctx, mlirDialectHandleGetNamespace(stdHandle));
@@ -1546,10 +1546,10 @@ int registerOnlyStd() {
           mlirContextIsRegisteredOperation(
               ctx, mlirStringRefCreateFromCString("cf.cond_br")));
 
-  // CHECK: std.not_existing_op is_registered: 0
-  fprintf(stderr, "std.not_existing_op is_registered: %d\n",
+  // CHECK: func.not_existing_op is_registered: 0
+  fprintf(stderr, "func.not_existing_op is_registered: %d\n",
           mlirContextIsRegisteredOperation(
-              ctx, mlirStringRefCreateFromCString("std.not_existing_op")));
+              ctx, mlirStringRefCreateFromCString("func.not_existing_op")));
 
   // CHECK: not_existing_dialect.not_existing_op is_registered: 0
   fprintf(stderr, "not_existing_dialect.not_existing_op is_registered: %d\n",
@@ -1674,7 +1674,7 @@ int testClone() {
 
   MlirContext ctx = mlirContextCreate();
   mlirRegisterAllDialects(ctx);
-  mlirContextGetOrLoadDialect(ctx, mlirStringRefCreateFromCString("std"));
+  mlirContextGetOrLoadDialect(ctx, mlirStringRefCreateFromCString("func"));
   MlirLocation loc = mlirLocationUnknownGet(ctx);
   MlirType indexType = mlirIndexTypeGet(ctx);
   MlirStringRef valueStringRef = mlirStringRefCreateFromCString("value");
@@ -1923,7 +1923,7 @@ int testDialectRegistry() {
     return 1;
   }
 
-  MlirDialectHandle stdHandle = mlirGetDialectHandle__std__();
+  MlirDialectHandle stdHandle = mlirGetDialectHandle__func__();
   mlirDialectHandleInsertDialect(stdHandle, registry);
 
   MlirContext ctx = mlirContextCreate();

diff  --git a/mlir/test/CAPI/pass.c b/mlir/test/CAPI/pass.c
index c4974488c5f2d..d83d44d929312 100644
--- a/mlir/test/CAPI/pass.c
+++ b/mlir/test/CAPI/pass.c
@@ -43,7 +43,7 @@ void testRunPassOnModule() {
   // CHECK-LABEL: Operations encountered:
   // CHECK: arith.addi        , 1
   // CHECK: builtin.func      , 1
-  // CHECK: std.return        , 1
+  // CHECK: func.return        , 1
   {
     MlirPassManager pm = mlirPassManagerCreate(ctx);
     MlirPass printOpStatPass = mlirCreateTransformsPrintOpStats();
@@ -85,7 +85,7 @@ void testRunPassOnNestedModule() {
   // CHECK-LABEL: Operations encountered:
   // CHECK: arith.addi        , 1
   // CHECK: builtin.func      , 1
-  // CHECK: std.return        , 1
+  // CHECK: func.return        , 1
   {
     MlirPassManager pm = mlirPassManagerCreate(ctx);
     MlirOpPassManager nestedFuncPm = mlirPassManagerGetNestedUnder(
@@ -101,7 +101,7 @@ void testRunPassOnNestedModule() {
   // CHECK-LABEL: Operations encountered:
   // CHECK: arith.addf        , 1
   // CHECK: builtin.func      , 1
-  // CHECK: std.return        , 1
+  // CHECK: func.return        , 1
   {
     MlirPassManager pm = mlirPassManagerCreate(ctx);
     MlirOpPassManager nestedModulePm = mlirPassManagerGetNestedUnder(

diff  --git a/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir b/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir
index 14c0c3bd451ab..be285b7d00e11 100644
--- a/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir
+++ b/mlir/test/Conversion/ArithmeticToLLVM/arith-to-llvm.mlir
@@ -324,7 +324,7 @@ func @index_vector(%arg0: vector<4xindex>) {
   %0 = arith.constant dense<[0, 1, 2, 3]> : vector<4xindex>
   // CHECK: %[[V:.*]] = llvm.add %{{.*}}, %[[CST]] : vector<4xi64>
   %1 = arith.addi %arg0, %0 : vector<4xindex>
-  std.return
+  func.return
 }
 
 // -----
@@ -347,7 +347,7 @@ func @cmpf_2dvector(%arg0 : vector<4x3xf32>, %arg1 : vector<4x3xf32>) {
   // CHECK: %[[CMP:.*]] = llvm.fcmp "olt" %[[EXTRACT1]], %[[EXTRACT2]] : vector<3xf32>
   // CHECK: %[[INSERT:.*]] = llvm.insertvalue %[[CMP]], %2[0] : !llvm.array<4 x vector<3xi1>>
   %0 = arith.cmpf olt, %arg0, %arg1 : vector<4x3xf32>
-  std.return
+  func.return
 }
 
 // -----
@@ -358,7 +358,7 @@ func @cmpi_0dvector(%arg0 : vector<i32>, %arg1 : vector<i32>) {
   // CHECK: %[[ARG1:.*]] = builtin.unrealized_conversion_cast
   // CHECK: %[[CMP:.*]] = llvm.icmp "ult" %[[ARG0]], %[[ARG1]] : vector<1xi32>
   %0 = arith.cmpi ult, %arg0, %arg1 : vector<i32>
-  std.return
+  func.return
 }
 
 // -----
@@ -372,7 +372,7 @@ func @cmpi_2dvector(%arg0 : vector<4x3xi32>, %arg1 : vector<4x3xi32>) {
   // CHECK: %[[CMP:.*]] = llvm.icmp "ult" %[[EXTRACT1]], %[[EXTRACT2]] : vector<3xi32>
   // CHECK: %[[INSERT:.*]] = llvm.insertvalue %[[CMP]], %2[0] : !llvm.array<4 x vector<3xi1>>
   %0 = arith.cmpi ult, %arg0, %arg1 : vector<4x3xi32>
-  std.return
+  func.return
 }
 
 // -----

diff  --git a/mlir/test/Conversion/ArithmeticToLLVM/convert-nd-vector-to-llvmir.mlir b/mlir/test/Conversion/ArithmeticToLLVM/convert-nd-vector-to-llvmir.mlir
index 1d40ba6f8a572..d754235d46020 100644
--- a/mlir/test/Conversion/ArithmeticToLLVM/convert-nd-vector-to-llvmir.mlir
+++ b/mlir/test/Conversion/ArithmeticToLLVM/convert-nd-vector-to-llvmir.mlir
@@ -208,5 +208,5 @@ func @select_2d(%arg0 : vector<4x3xi1>, %arg1 : vector<4x3xi32>, %arg2 : vector<
   // CHECK: %[[SELECT:.*]] = llvm.select %[[EXTRACT1]], %[[EXTRACT2]], %[[EXTRACT3]] : vector<3xi1>, vector<3xi32>
   // CHECK: %[[INSERT:.*]] = llvm.insertvalue %[[SELECT]], %{{.*}}[0] : !llvm.array<4 x vector<3xi32>>
   %0 = arith.select %arg0, %arg1, %arg2 : vector<4x3xi1>, vector<4x3xi32>
-  std.return
+  func.return
 }

diff  --git a/mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir b/mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
index 3c75bb944f08f..6e6f0a967ab44 100644
--- a/mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
+++ b/mlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
@@ -49,7 +49,7 @@ gpu.module @test_module {
     // CHECK: = llvm.sext %{{.*}} : i32 to i64
     %gDimZ = gpu.grid_dim z
 
-    std.return %tIdX, %tIdY, %tIdZ, %bDimX, %bDimY, %bDimZ,
+    func.return %tIdX, %tIdY, %tIdZ, %bDimX, %bDimY, %bDimZ,
                %bIdX, %bIdY, %bIdZ, %gDimX, %gDimY, %gDimZ
         : index, index, index, index, index, index,
           index, index, index, index, index, index
@@ -67,7 +67,7 @@ gpu.module @test_module {
     %0 = arith.addi %idx, %idx : index
     // CHECK: llvm.return %{{.*}} : i64
     // CHECK32: llvm.return %{{.*}} : i32
-    std.return %0 : index
+    func.return %0 : index
   }
 }
 
@@ -140,7 +140,7 @@ gpu.module @test_module {
     // CHECK: nvvm.shfl.sync idx {{.*}} {return_value_and_is_valid} : f32 -> !llvm.struct<(f32, i1)>
     %shfli, %predi = gpu.shuffle idx %arg0, %arg1, %arg2 : f32
 
-    std.return %shfl, %shflu, %shfld, %shfli : f32, f32,f32, f32
+    func.return %shfl, %shflu, %shfld, %shfli : f32, f32,f32, f32
   }
 }
 
@@ -151,7 +151,7 @@ gpu.module @test_module {
   builtin.func @gpu_sync() {
     // CHECK: nvvm.barrier0
     gpu.barrier
-    std.return
+    func.return
   }
 }
 
@@ -166,7 +166,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_fabsf(%{{.*}}) : (f32) -> f32
     %result64 = math.abs %arg_f64 : f64
     // CHECK: llvm.call @__nv_fabs(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -181,7 +181,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_ceilf(%{{.*}}) : (f32) -> f32
     %result64 = math.ceil %arg_f64 : f64
     // CHECK: llvm.call @__nv_ceil(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -196,7 +196,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_floorf(%{{.*}}) : (f32) -> f32
     %result64 = math.floor %arg_f64 : f64
     // CHECK: llvm.call @__nv_floor(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -211,7 +211,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_cosf(%{{.*}}) : (f32) -> f32
     %result64 = math.cos %arg_f64 : f64
     // CHECK: llvm.call @__nv_cos(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -225,7 +225,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_expf(%{{.*}}) : (f32) -> f32
     %result64 = math.exp %arg_f64 : f64
     // CHECK: llvm.call @__nv_exp(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -239,7 +239,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_exp2f(%{{.*}}) : (f32) -> f32
     %result64 = math.exp2 %arg_f64 : f64
     // CHECK: llvm.call @__nv_exp2(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -254,7 +254,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_logf(%{{.*}}) : (f32) -> f32
     %result64 = math.log %arg_f64 : f64
     // CHECK: llvm.call @__nv_log(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -269,7 +269,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_log10f(%{{.*}}) : (f32) -> f32
     %result64 = math.log10 %arg_f64 : f64
     // CHECK: llvm.call @__nv_log10(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -284,7 +284,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_log1pf(%{{.*}}) : (f32) -> f32
     %result64 = math.log1p %arg_f64 : f64
     // CHECK: llvm.call @__nv_log1p(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -299,7 +299,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_log2f(%{{.*}}) : (f32) -> f32
     %result64 = math.log2 %arg_f64 : f64
     // CHECK: llvm.call @__nv_log2(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -314,7 +314,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_sinf(%{{.*}}) : (f32) -> f32
     %result64 = math.sin %arg_f64 : f64
     // CHECK: llvm.call @__nv_sin(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -333,7 +333,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_tanhf(%{{.*}}) : (f32) -> f32
     %result64 = math.tanh %arg_f64 : f64
     // CHECK: llvm.call @__nv_tanh(%{{.*}}) : (f64) -> f64
-    std.return %result16, %result32, %result64 : f16, f32, f64
+    func.return %result16, %result32, %result64 : f16, f32, f64
   }
 }
 
@@ -353,7 +353,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_rsqrtf(%{{.*}}) : (f32) -> f32
     %result64 = math.rsqrt %arg_f64 : f64
     // CHECK: llvm.call @__nv_rsqrt(%{{.*}}) : (f64) -> f64
-    std.return %result16, %result32, %result64 : f16, f32, f64
+    func.return %result16, %result32, %result64 : f16, f32, f64
   }
 }
 
@@ -373,7 +373,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_sqrtf(%{{.*}}) : (f32) -> f32
     %result64 = math.sqrt %arg_f64 : f64
     // CHECK: llvm.call @__nv_sqrt(%{{.*}}) : (f64) -> f64
-    std.return %result16, %result32, %result64 : f16, f32, f64
+    func.return %result16, %result32, %result64 : f16, f32, f64
   }
 }
 
@@ -393,7 +393,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_atanf(%{{.*}}) : (f32) -> f32
     %result64 = math.atan %arg_f64 : f64
     // CHECK: llvm.call @__nv_atan(%{{.*}}) : (f64) -> f64
-    std.return %result16, %result32, %result64 : f16, f32, f64
+    func.return %result16, %result32, %result64 : f16, f32, f64
   }
 }
 
@@ -414,7 +414,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_atan2f(%{{.*}}) : (f32, f32) -> f32
     %result64 = math.atan2 %arg_f64, %arg_f64 : f64
     // CHECK: llvm.call @__nv_atan2(%{{.*}}) : (f64, f64) -> f64
-    std.return %result16, %result32, %result64 : f16, f32, f64
+    func.return %result16, %result32, %result64 : f16, f32, f64
   }
 }
 
@@ -432,7 +432,7 @@ gpu.module @test_module {
       // CHECK: llvm.call @__nv_expf(%{{.*}}) : (f32) -> f32
       %result64 = math.exp %arg_f64 : f64
       // CHECK: llvm.call @__nv_exp(%{{.*}}) : (f64) -> f64
-      std.return %result32, %result64 : f32, f64
+      func.return %result32, %result64 : f32, f64
     }
     "test.finish" () : () -> ()
   }) : () -> ()
@@ -449,7 +449,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_expm1f(%{{.*}}) : (f32) -> f32
     %result64 = math.expm1 %arg_f64 : f64
     // CHECK: llvm.call @__nv_expm1(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -464,7 +464,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__nv_powf(%{{.*}}, %{{.*}}) : (f32, f32) -> f32
     %result64 = math.powf %arg_f64, %arg_f64 : f64
     // CHECK: llvm.call @__nv_pow(%{{.*}}, %{{.*}}) : (f64, f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 

diff  --git a/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir b/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
index 42da06e2172f3..89c1ee0212b59 100644
--- a/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
+++ b/mlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
@@ -49,7 +49,7 @@ gpu.module @test_module {
     // CHECK: = llvm.sext %{{.*}} : i32 to i64
     %gDimZ = gpu.grid_dim z
 
-    std.return %tIdX, %tIdY, %tIdZ, %bDimX, %bDimY, %bDimZ,
+    func.return %tIdX, %tIdY, %tIdZ, %bDimX, %bDimY, %bDimZ,
                %bIdX, %bIdY, %bIdZ, %gDimX, %gDimY, %gDimZ
         : index, index, index, index, index, index,
           index, index, index, index, index, index
@@ -67,7 +67,7 @@ gpu.module @test_module {
     %0 = arith.addi %idx, %idx : index
     // CHECK: llvm.return %{{.*}} : i64
     // CHECK32: llvm.return %{{.*}} : i32
-    std.return %0 : index
+    func.return %0 : index
   }
 }
 
@@ -78,7 +78,7 @@ gpu.module @test_module {
   builtin.func @gpu_sync() {
     // CHECK: rocdl.barrier
     gpu.barrier
-    std.return
+    func.return
   }
 }
 
@@ -93,7 +93,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_fabs_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.abs %arg_f64 : f64
     // CHECK: llvm.call @__ocml_fabs_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -108,7 +108,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_ceil_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.ceil %arg_f64 : f64
     // CHECK: llvm.call @__ocml_ceil_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -123,7 +123,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_floor_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.floor %arg_f64 : f64
     // CHECK: llvm.call @__ocml_floor_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -138,7 +138,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_cos_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.cos %arg_f64 : f64
     // CHECK: llvm.call @__ocml_cos_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -155,7 +155,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_exp_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.exp %arg_f64 : f64
     // CHECK: llvm.call @__ocml_exp_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -172,7 +172,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_exp2_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.exp2 %arg_f64 : f64
     // CHECK: llvm.call @__ocml_exp2_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -192,7 +192,7 @@ gpu.module @test_module {
       // CHECK: llvm.call @__ocml_exp_f32(%{{.*}}) : (f32) -> f32
       %result64 = math.exp %arg_f64 : f64
       // CHECK: llvm.call @__ocml_exp_f64(%{{.*}}) : (f64) -> f64
-      std.return %result32, %result64 : f32, f64
+      func.return %result32, %result64 : f32, f64
     }
     "test.finish" () : () -> ()
   }) : () -> ()
@@ -211,7 +211,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_expm1_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.expm1 %arg_f64 : f64
     // CHECK: llvm.call @__ocml_expm1_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -226,7 +226,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_log_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.log %arg_f64 : f64
     // CHECK: llvm.call @__ocml_log_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -241,7 +241,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_log1p_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.log1p %arg_f64 : f64
     // CHECK: llvm.call @__ocml_log1p_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -256,7 +256,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_log10_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.log10 %arg_f64 : f64
     // CHECK: llvm.call @__ocml_log10_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -271,7 +271,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_log2_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.log2 %arg_f64 : f64
     // CHECK: llvm.call @__ocml_log2_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -291,7 +291,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_rsqrt_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.rsqrt %arg_f64 : f64
     // CHECK: llvm.call @__ocml_rsqrt_f64(%{{.*}}) : (f64) -> f64
-    std.return %result16, %result32, %result64 : f16, f32, f64
+    func.return %result16, %result32, %result64 : f16, f32, f64
   }
 }
 
@@ -311,7 +311,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_sqrt_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.sqrt %arg_f64 : f64
     // CHECK: llvm.call @__ocml_sqrt_f64(%{{.*}}) : (f64) -> f64
-    std.return %result16, %result32, %result64 : f16, f32, f64
+    func.return %result16, %result32, %result64 : f16, f32, f64
   }
 }
 
@@ -326,7 +326,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_tanh_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.tanh %arg_f64 : f64
     // CHECK: llvm.call @__ocml_tanh_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -341,7 +341,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_atan_f32(%{{.*}}) : (f32) -> f32
     %result64 = math.atan %arg_f64 : f64
     // CHECK: llvm.call @__ocml_atan_f64(%{{.*}}) : (f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -356,7 +356,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_atan2_f32(%{{.*}}) : (f32, f32) -> f32
     %result64 = math.atan2 %arg_f64, %arg_f64 : f64
     // CHECK: llvm.call @__ocml_atan2_f64(%{{.*}}) : (f64, f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 
@@ -371,7 +371,7 @@ gpu.module @test_module {
     // CHECK: llvm.call @__ocml_pow_f32(%{{.*}}, %{{.*}}) : (f32, f32) -> f32
     %result64 = math.powf %arg_f64, %arg_f64 : f64
     // CHECK: llvm.call @__ocml_pow_f64(%{{.*}}, %{{.*}}) : (f64, f64) -> f64
-    std.return %result32, %result64 : f32, f64
+    func.return %result32, %result64 : f32, f64
   }
 }
 

diff  --git a/mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir b/mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir
index b2de213b4e34c..002c3cd83d41b 100644
--- a/mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir
+++ b/mlir/test/Conversion/MathToLLVM/math-to-llvm.mlir
@@ -10,7 +10,7 @@ func @ops(%arg0: f32, %arg1: f32, %arg2: i32, %arg3: i32, %arg4: f64) {
   %19 = math.sqrt %arg0 : f32
 // CHECK: = "llvm.intr.sqrt"(%{{.*}}) : (f64) -> f64
   %20 = math.sqrt %arg4 : f64
-  std.return
+  func.return
 }
 
 // -----
@@ -22,7 +22,7 @@ func @log1p(%arg0 : f32) {
   // CHECK: %[[ADD:.*]] = llvm.fadd %[[ONE]], %arg0 : f32
   // CHECK: %[[LOG:.*]] = "llvm.intr.log"(%[[ADD]]) : (f32) -> f32
   %0 = math.log1p %arg0 : f32
-  std.return
+  func.return
 }
 
 // -----
@@ -35,7 +35,7 @@ func @log1p_2dvector(%arg0 : vector<4x3xf32>) {
   // CHECK: %[[LOG:.*]] = "llvm.intr.log"(%[[ADD]]) : (vector<3xf32>) -> vector<3xf32>
   // CHECK: %[[INSERT:.*]] = llvm.insertvalue %[[LOG]], %{{.*}}[0] : !llvm.array<4 x vector<3xf32>>
   %0 = math.log1p %arg0 : vector<4x3xf32>
-  std.return
+  func.return
 }
 
 // -----
@@ -47,7 +47,7 @@ func @expm1(%arg0 : f32) {
   // CHECK: %[[EXP:.*]] = "llvm.intr.exp"(%arg0) : (f32) -> f32
   // CHECK: %[[SUB:.*]] = llvm.fsub %[[EXP]], %[[ONE]] : f32
   %0 = math.expm1 %arg0 : f32
-  std.return
+  func.return
 }
 
 // -----
@@ -59,7 +59,7 @@ func @rsqrt(%arg0 : f32) {
   // CHECK: %[[SQRT:.*]] = "llvm.intr.sqrt"(%arg0) : (f32) -> f32
   // CHECK: %[[DIV:.*]] = llvm.fdiv %[[ONE]], %[[SQRT]] : f32
   %0 = math.rsqrt %arg0 : f32
-  std.return
+  func.return
 }
 
 // -----
@@ -69,7 +69,7 @@ func @rsqrt(%arg0 : f32) {
 func @sine(%arg0 : f32) {
   // CHECK: "llvm.intr.sin"(%arg0) : (f32) -> f32
   %0 = math.sin %arg0 : f32
-  std.return
+  func.return
 }
 
 // -----
@@ -80,7 +80,7 @@ func @ctlz(%arg0 : i32) {
   // CHECK: %[[ZERO:.+]] = llvm.mlir.constant(false) : i1
   // CHECK: "llvm.intr.ctlz"(%arg0, %[[ZERO]]) : (i32, i1) -> i32
   %0 = math.ctlz %arg0 : i32
-  std.return
+  func.return
 }
 
 // -----
@@ -91,7 +91,7 @@ func @cttz(%arg0 : i32) {
   // CHECK: %[[ZERO:.+]] = llvm.mlir.constant(false) : i1
   // CHECK: "llvm.intr.cttz"(%arg0, %[[ZERO]]) : (i32, i1) -> i32
   %0 = math.cttz %arg0 : i32
-  std.return
+  func.return
 }
 
 // -----
@@ -102,7 +102,7 @@ func @cttz_vec(%arg0 : vector<4xi32>) {
   // CHECK: %[[ZERO:.+]] = llvm.mlir.constant(false) : i1
   // CHECK: "llvm.intr.cttz"(%arg0, %[[ZERO]]) : (vector<4xi32>, i1) -> vector<4xi32>
   %0 = math.cttz %arg0 : vector<4xi32>
-  std.return
+  func.return
 }
 
 // -----
@@ -112,7 +112,7 @@ func @cttz_vec(%arg0 : vector<4xi32>) {
 func @ctpop(%arg0 : i32) {
   // CHECK: "llvm.intr.ctpop"(%arg0) : (i32) -> i32
   %0 = math.ctpop %arg0 : i32
-  std.return
+  func.return
 }
 
 // -----
@@ -122,7 +122,7 @@ func @ctpop(%arg0 : i32) {
 func @ctpop_vector(%arg0 : vector<3xi32>) {
   // CHECK: "llvm.intr.ctpop"(%arg0) : (vector<3xi32>) -> vector<3xi32>
   %0 = math.ctpop %arg0 : vector<3xi32>
-  std.return
+  func.return
 }
 
 // -----
@@ -134,7 +134,7 @@ func @rsqrt_double(%arg0 : f64) {
   // CHECK: %[[SQRT:.*]] = "llvm.intr.sqrt"(%arg0) : (f64) -> f64
   // CHECK: %[[DIV:.*]] = llvm.fdiv %[[ONE]], %[[SQRT]] : f64
   %0 = math.rsqrt %arg0 : f64
-  std.return
+  func.return
 }
 
 // -----
@@ -146,7 +146,7 @@ func @rsqrt_vector(%arg0 : vector<4xf32>) {
   // CHECK: %[[SQRT:.*]] = "llvm.intr.sqrt"(%arg0) : (vector<4xf32>) -> vector<4xf32>
   // CHECK: %[[DIV:.*]] = llvm.fdiv %[[ONE]], %[[SQRT]] : vector<4xf32>
   %0 = math.rsqrt %arg0 : vector<4xf32>
-  std.return
+  func.return
 }
 
 // -----
@@ -159,7 +159,7 @@ func @rsqrt_multidim_vector(%arg0 : vector<4x3xf32>) {
   // CHECK: %[[DIV:.*]] = llvm.fdiv %[[ONE]], %[[SQRT]] : vector<3xf32>
   // CHECK: %[[INSERT:.*]] = llvm.insertvalue %[[DIV]], %{{.*}}[0] : !llvm.array<4 x vector<3xf32>>
   %0 = math.rsqrt %arg0 : vector<4x3xf32>
-  std.return
+  func.return
 }
 
 // -----
@@ -169,6 +169,6 @@ func @rsqrt_multidim_vector(%arg0 : vector<4x3xf32>) {
 func @powf(%arg0 : f64) {
   // CHECK: %[[POWF:.*]] = "llvm.intr.pow"(%arg0, %arg0) : (f64, f64) -> f64
   %0 = math.powf %arg0, %arg0 : f64
-  std.return
+  func.return
 }
 

diff  --git a/mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir b/mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
index 85c6ca17747ba..32f9c2fef0585 100644
--- a/mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
+++ b/mlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
@@ -571,7 +571,7 @@ func @address_space(%arg0 : memref<32xf32, affine_map<(d0) -> (d0)>, 7>) {
   %1 = arith.constant 7 : index
   // CHECK: llvm.load %{{.*}} : !llvm.ptr<f32, 5>
   %2 = memref.load %0[%1] : memref<32xf32, affine_map<(d0) -> (d0)>, 5>
-  std.return
+  func.return
 }
 
 // -----

diff  --git a/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir b/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
index 97d4c9f69bab6..5ebee9a4d5e25 100644
--- a/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
+++ b/mlir/test/Conversion/ShapeToStandard/shape-to-standard.mlir
@@ -74,7 +74,7 @@ func @get_extent_shape_of(%arg : tensor<2x3xf32>, %idx : index) -> index {
 
 // -----
 
-// Express `get_extent` as `std.tensor.extract`.
+// Express `get_extent` as `tensor.extract`.
 // CHECK-LABEL: @get_extent_from_extent_tensor
 // CHECK-SAME: (%[[EXTENTS:.*]]: tensor<?xindex>, %[[IDX:.*]]: index) -> index
 func @get_extent_from_extent_tensor(%extents : tensor<?xindex>, %idx : index)

diff  --git a/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir b/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
index 479ccaad2da6c..e774b9085db67 100644
--- a/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
+++ b/mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
@@ -454,7 +454,7 @@ func @dfs_block_order(%arg0: i32) -> (i32) {
 func @ceilf(%arg0 : f32) {
   // CHECK: "llvm.intr.ceil"(%arg0) : (f32) -> f32
   %0 = math.ceil %arg0 : f32
-  std.return
+  func.return
 }
 
 // -----
@@ -464,7 +464,7 @@ func @ceilf(%arg0 : f32) {
 func @floorf(%arg0 : f32) {
   // CHECK: "llvm.intr.floor"(%arg0) : (f32) -> f32
   %0 = math.floor %arg0 : f32
-  std.return
+  func.return
 }
 
 // -----
@@ -507,7 +507,7 @@ func @fmaf(%arg0: f32, %arg1: vector<4xf32>) {
   %0 = math.fma %arg0, %arg0, %arg0 : f32
   // CHECK: %[[V:.*]] = "llvm.intr.fma"(%[[ARG1]], %[[ARG1]], %[[ARG1]]) : (vector<4xf32>, vector<4xf32>, vector<4xf32>) -> vector<4xf32>
   %1 = math.fma %arg1, %arg1, %arg1 : vector<4xf32>
-  std.return
+  func.return
 }
 
 // -----
@@ -521,10 +521,10 @@ func @switchi8(%arg0 : i8) -> i32 {
   ]
 ^bb1:
   %c_1 = arith.constant 1 : i32
-  std.return %c_1 : i32
+  func.return %c_1 : i32
 ^bb3:
   %c_42 = arith.constant 42 : i32
-  std.return %c_42: i32
+  func.return %c_42: i32
 }
 // CHECK:     llvm.switch %arg0 : i8, ^bb1 [
 // CHECK-NEXT:       42: ^bb1,

diff  --git a/mlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir b/mlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
index 4fc94af8f6a93..2f313e339cfba 100644
--- a/mlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
+++ b/mlir/test/Conversion/StandardToSPIRV/std-ops-to-spirv.mlir
@@ -264,7 +264,7 @@ func @shift_vector(%arg0 : vector<4xi32>, %arg1 : vector<4xi32>) {
 // -----
 
 //===----------------------------------------------------------------------===//
-// std.cmpf
+// arith.cmpf
 //===----------------------------------------------------------------------===//
 
 module attributes {
@@ -348,7 +348,7 @@ func @cmpf(%arg0 : f32, %arg1 : f32) {
 // -----
 
 //===----------------------------------------------------------------------===//
-// std.cmpi
+// arith.cmpi
 //===----------------------------------------------------------------------===//
 
 module attributes {
@@ -849,7 +849,7 @@ func @sitofp(%arg0 : i64) -> f64 {
 // -----
 
 //===----------------------------------------------------------------------===//
-// std.return
+// func.return
 //===----------------------------------------------------------------------===//
 
 module attributes {

diff  --git a/mlir/test/Dialect/Arithmetic/ops.mlir b/mlir/test/Dialect/Arithmetic/ops.mlir
index 3a7934286bb85..af8588dc62cc1 100644
--- a/mlir/test/Dialect/Arithmetic/ops.mlir
+++ b/mlir/test/Dialect/Arithmetic/ops.mlir
@@ -903,8 +903,8 @@ func @test_constant() -> () {
   // CHECK: %c42_i32_0 = arith.constant 42 : i32
   %1 = arith.constant 42 : i32
 
-  // CHECK: %c43 = arith.constant {crazy = "std.foo"} 43 : index
-  %2 = arith.constant {crazy = "std.foo"} 43: index
+  // CHECK: %c43 = arith.constant {crazy = "func.foo"} 43 : index
+  %2 = arith.constant {crazy = "func.foo"} 43: index
 
   // CHECK: %cst = arith.constant 4.300000e+01 : bf16
   %3 = arith.constant 43.0 : bf16

diff  --git a/mlir/test/Dialect/Tensor/invalid.mlir b/mlir/test/Dialect/Tensor/invalid.mlir
index 5c48a085d35a2..3aaa18e784619 100644
--- a/mlir/test/Dialect/Tensor/invalid.mlir
+++ b/mlir/test/Dialect/Tensor/invalid.mlir
@@ -91,7 +91,7 @@ func @tensor.generate(%m : index, %n : index)
 
 func @tensor.generate(%m : index, %n : index)
     -> tensor<?x3x?xf32> {
-  // expected-error @+2 {{op expects regions to end with 'tensor.yield', found 'std.return'}}
+  // expected-error @+2 {{op expects regions to end with 'tensor.yield', found 'func.return'}}
   // expected-note @+1 {{in custom textual format, the absence of terminator implies 'tensor.yield'}}
   %tnsr = tensor.generate %m, %n {
     ^bb0(%i : index, %j : index, %k : index):

diff  --git a/mlir/test/IR/core-ops.mlir b/mlir/test/IR/core-ops.mlir
index 55280b2ac8b8c..74dde5c378e44 100644
--- a/mlir/test/IR/core-ops.mlir
+++ b/mlir/test/IR/core-ops.mlir
@@ -205,7 +205,7 @@ func @zero_dim_no_idx(%arg0 : memref<i32>, %arg1 : memref<i32>, %arg2 : memref<i
 // CHECK-LABEL: func @return_op(%arg0: i32) -> i32 {
 func @return_op(%a : i32) -> i32 {
   // CHECK: return %arg0 : i32
-  "std.return" (%a) : (i32)->()
+  "func.return" (%a) : (i32)->()
 }
 
 // CHECK-LABEL: func @calls(%arg0: i32) {
@@ -215,7 +215,7 @@ func @calls(%arg0: i32) {
   // CHECK: %1 = call @return_op(%0) : (i32) -> i32
   %y = call @return_op(%x) : (i32) -> i32
   // CHECK: %2 = call @return_op(%0) : (i32) -> i32
-  %z = "std.call"(%x) {callee = @return_op} : (i32) -> i32
+  %z = "func.call"(%x) {callee = @return_op} : (i32) -> i32
 
   // CHECK: %f = constant @affine_apply : () -> ()
   %f = constant @affine_apply : () -> ()
@@ -230,7 +230,7 @@ func @calls(%arg0: i32) {
   %2 = call_indirect %f_0(%arg0) : (i32) -> i32
 
   // CHECK: %4 = call_indirect %f_0(%arg0) : (i32) -> i32
-  %3 = "std.call_indirect"(%f_0, %arg0) : ((i32) -> i32, i32) -> i32
+  %3 = "func.call_indirect"(%f_0, %arg0) : ((i32) -> i32, i32) -> i32
 
   return
 }

diff  --git a/mlir/test/IR/generic-visitors-interrupt.mlir b/mlir/test/IR/generic-visitors-interrupt.mlir
index 3b4cb0496b71c..35099f0e7a328 100644
--- a/mlir/test/IR/generic-visitors-interrupt.mlir
+++ b/mlir/test/IR/generic-visitors-interrupt.mlir
@@ -108,7 +108,7 @@ func @main(%arg0: f32) -> f32 {
 // CHECK: step 0 op 'builtin.module' before all regions
 // CHECK: step 1 op 'builtin.func' before all regions
 // CHECK: step 2 op 'arith.addf' before all regions
-// CHECK: step 3 op 'std.return' before all regions
+// CHECK: step 3 op 'func.return' before all regions
 // CHECK: step 4 op 'builtin.func' after all regions
 // CHECK: step 5 op 'builtin.module' after all regions
 
@@ -131,7 +131,7 @@ func @main(%arg0: f32) -> f32 {
 // CHECK: step 4 op 'foo' before region #1
 // CHECK: step 5 op 'bar1' before all regions
 // CHECK: step 6 op 'arith.addf' before all regions
-// CHECK: step 7 op 'std.return' before all regions
+// CHECK: step 7 op 'func.return' before all regions
 // CHECK: step 8 op 'builtin.func' after all regions
 // CHECK: step 9 op 'builtin.module' after all regions
 
@@ -152,6 +152,6 @@ func @main(%arg0: f32) -> f32 {
 // CHECK: step 2 op 'foo' before all regions
 // CHECK: step 3 op 'bar0' before all regions
 // CHECK: step 4 op 'arith.addf' before all regions
-// CHECK: step 5 op 'std.return' before all regions
+// CHECK: step 5 op 'func.return' before all regions
 // CHECK: step 6 op 'builtin.func' after all regions
 // CHECK: step 7 op 'builtin.module' after all regions

diff  --git a/mlir/test/IR/generic-visitors.mlir b/mlir/test/IR/generic-visitors.mlir
index c87bd559be9b3..b14cf93bc34e5 100644
--- a/mlir/test/IR/generic-visitors.mlir
+++ b/mlir/test/IR/generic-visitors.mlir
@@ -36,7 +36,7 @@ func @structured_cfg() {
 // CHECK: step 14 op 'use3' before all regions
 // CHECK: step 15 op 'scf.yield' before all regions
 // CHECK: step 16 op 'scf.for' after all regions
-// CHECK: step 17 op 'std.return' before all regions
+// CHECK: step 17 op 'func.return' before all regions
 // CHECK: step 18 op 'builtin.func' after all regions
 // CHECK: step 19 op 'builtin.module' after all regions
 

diff  --git a/mlir/test/IR/invalid-ops.mlir b/mlir/test/IR/invalid-ops.mlir
index 8415126f42fcf..b5a0f1056c7d5 100644
--- a/mlir/test/IR/invalid-ops.mlir
+++ b/mlir/test/IR/invalid-ops.mlir
@@ -37,8 +37,8 @@ func @unknown_custom_op() {
 // -----
 
 func @unknown_std_op() {
-  // expected-error at +1 {{unregistered operation 'std.foo_bar_op' found in dialect ('std') that does not allow unknown operations}}
-  %0 = "std.foo_bar_op"() : () -> index
+  // expected-error at +1 {{unregistered operation 'func.foo_bar_op' found in dialect ('func') that does not allow unknown operations}}
+  %0 = "func.foo_bar_op"() : () -> index
   return
 }
 
@@ -98,7 +98,7 @@ func @func_with_ops(tensor<12xi1>, tensor<42xi32>, tensor<42xi32>) {
 
 func @return_not_in_function() {
   "foo.region"() ({
-    // expected-error at +1 {{'std.return' op expects parent op 'builtin.func'}}
+    // expected-error at +1 {{'func.return' op expects parent op 'builtin.func'}}
     return
   }): () -> ()
   return

diff  --git a/mlir/test/IR/invalid.mlir b/mlir/test/IR/invalid.mlir
index c510ed69645cf..bd422f9250c3c 100644
--- a/mlir/test/IR/invalid.mlir
+++ b/mlir/test/IR/invalid.mlir
@@ -355,13 +355,13 @@ func @malformed_type(%a : intt) { // expected-error {{expected non-function type
 
 func @resulterror() -> i32 {
 ^bb42:
-  return    // expected-error {{'std.return' op has 0 operands, but enclosing function (@resulterror) returns 1}}
+  return    // expected-error {{'func.return' op has 0 operands, but enclosing function (@resulterror) returns 1}}
 }
 
 // -----
 
 func @func_resulterror() -> i32 {
-  return // expected-error {{'std.return' op has 0 operands, but enclosing function (@func_resulterror) returns 1}}
+  return // expected-error {{'func.return' op has 0 operands, but enclosing function (@func_resulterror) returns 1}}
 }
 
 // -----
@@ -536,7 +536,7 @@ func @return_type_mismatch() -> i32 {
 
 func @return_inside_loop() {
   affine.for %i = 1 to 100 {
-    // expected-error at -1 {{op expects regions to end with 'affine.yield', found 'std.return'}}
+    // expected-error at -1 {{op expects regions to end with 'affine.yield', found 'func.return'}}
     // expected-note at -2 {{in custom textual format, the absence of terminator implies}}
     return
   }

diff  --git a/mlir/test/IR/op-stats.mlir b/mlir/test/IR/op-stats.mlir
index 19a4af28e35dc..7f1cd0d2d1bbe 100644
--- a/mlir/test/IR/op-stats.mlir
+++ b/mlir/test/IR/op-stats.mlir
@@ -31,6 +31,6 @@ func @main(tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32> {
 
 // CHECK-LABEL: Operations encountered
 // CHECK: arith.addf , 6
+// CHECK: func.return , 1
 // CHECK: long_op_name , 1
-// CHECK: std.return , 1
 // CHECK: xla.add , 17

diff  --git a/mlir/test/IR/parser.mlir b/mlir/test/IR/parser.mlir
index 5e47d37613859..67c18a7644db1 100644
--- a/mlir/test/IR/parser.mlir
+++ b/mlir/test/IR/parser.mlir
@@ -456,11 +456,11 @@ func @verbose_terminators() -> (i1, i17) {
 ^bb2(%a : i17):
   %true = arith.constant true
 // CHECK:  return %{{.*}}, %{{.*}} : i1, i17
-  "std.return"(%true, %a) : (i1, i17) -> ()
+  "func.return"(%true, %a) : (i1, i17) -> ()
 
 ^bb3(%b : i1, %c : i17):
 // CHECK:  return %{{.*}}, %{{.*}} : i1, i17
-  "std.return"(%b, %c) : (i1, i17) -> ()
+  "func.return"(%b, %c) : (i1, i17) -> ()
 }
 
 // CHECK-LABEL: func @condbr_simple
@@ -1276,17 +1276,11 @@ func @default_dialect(%bool : i1) {
     // example.
     // CHECK:  "test.op_with_attr"() {test.attr = "test.value"} : () -> ()
     "test.op_with_attr"() {test.attr = "test.value"} : () -> ()
-
-    // TODO: remove this after removing the special casing for std in the printer.
-    // Verify that operations in the standard dialect keep the `std.` prefix.
-    // CHECK: cf.assert
-    cf.assert %bool, "Assertion"
     "test.terminator"() : ()->()
   }
-  // The same operation outside of the region does not have an std. prefix.
-  // CHECK-NOT: std.assert
+  // The same operation outside of the region does not have an func. prefix.
   // CHECK: return
-  std.return
+  func.return
 }
 
 // CHECK-LABEL: func @unreachable_dominance_violation_ok

diff  --git a/mlir/test/IR/print-op-generic.mlir b/mlir/test/IR/print-op-generic.mlir
index 7e90a19e9fbdf..e12eda8f17812 100644
--- a/mlir/test/IR/print-op-generic.mlir
+++ b/mlir/test/IR/print-op-generic.mlir
@@ -9,5 +9,5 @@ func @pretty_names() {
   // GENERIC: %0 = "test.string_attr_pretty_name"()
   return
   // CHECK: return
-  // GENERIC: "std.return"()
+  // GENERIC: "func.return"()
 }

diff  --git a/mlir/test/IR/visitors.mlir b/mlir/test/IR/visitors.mlir
index 23903b898357d..189b305bbe58d 100644
--- a/mlir/test/IR/visitors.mlir
+++ b/mlir/test/IR/visitors.mlir
@@ -30,7 +30,7 @@ func @structured_cfg() {
 // CHECK:       Visiting op 'use1'
 // CHECK:       Visiting op 'use2'
 // CHECK:       Visiting op 'use3'
-// CHECK:       Visiting op 'std.return'
+// CHECK:       Visiting op 'func.return'
 
 // CHECK-LABEL: Block pre-order visits
 // CHECK:       Visiting block ^bb0 from region 0 from operation 'builtin.module'
@@ -53,7 +53,7 @@ func @structured_cfg() {
 // CHECK:       Visiting op 'scf.if'
 // CHECK:       Visiting op 'use3'
 // CHECK:       Visiting op 'scf.for'
-// CHECK:       Visiting op 'std.return'
+// CHECK:       Visiting op 'func.return'
 // CHECK:       Visiting op 'builtin.func'
 // CHECK:       Visiting op 'builtin.module'
 
@@ -73,7 +73,7 @@ func @structured_cfg() {
 
 // CHECK-LABEL: Op pre-order erasures
 // CHECK:       Erasing op 'scf.for'
-// CHECK:       Erasing op 'std.return'
+// CHECK:       Erasing op 'func.return'
 
 // CHECK-LABEL: Block pre-order erasures
 // CHECK:       Erasing block ^bb0 from region 0 from operation 'scf.for'
@@ -85,7 +85,7 @@ func @structured_cfg() {
 // CHECK:       Erasing op 'scf.if'
 // CHECK:       Erasing op 'use3'
 // CHECK:       Erasing op 'scf.for'
-// CHECK:       Erasing op 'std.return'
+// CHECK:       Erasing op 'func.return'
 
 // CHECK-LABEL: Block post-order erasures (skip)
 // CHECK:       Erasing block ^bb0 from region 0 from operation 'scf.if'
@@ -99,7 +99,7 @@ func @structured_cfg() {
 // CHECK:       Erasing op 'scf.if'
 // CHECK:       Erasing op 'use3'
 // CHECK:       Erasing op 'scf.for'
-// CHECK:       Erasing op 'std.return'
+// CHECK:       Erasing op 'func.return'
 // CHECK:       Erasing op 'builtin.func'
 // CHECK:       Erasing op 'builtin.module'
 
@@ -135,7 +135,7 @@ func @unstructured_cfg() {
 // CHECK:       Visiting op 'op1'
 // CHECK:       Visiting op 'cf.br'
 // CHECK:       Visiting op 'op2'
-// CHECK:       Visiting op 'std.return'
+// CHECK:       Visiting op 'func.return'
 
 // CHECK-LABEL: Block pre-order visits
 // CHECK:       Visiting block ^bb0 from region 0 from operation 'builtin.module'
@@ -156,7 +156,7 @@ func @unstructured_cfg() {
 // CHECK:       Visiting op 'cf.br'
 // CHECK:       Visiting op 'op2'
 // CHECK:       Visiting op 'regionOp0'
-// CHECK:       Visiting op 'std.return'
+// CHECK:       Visiting op 'func.return'
 // CHECK:       Visiting op 'builtin.func'
 // CHECK:       Visiting op 'builtin.module'
 
@@ -174,7 +174,7 @@ func @unstructured_cfg() {
 
 // CHECK-LABEL: Op pre-order erasures (skip)
 // CHECK:       Erasing op 'regionOp0'
-// CHECK:       Erasing op 'std.return'
+// CHECK:       Erasing op 'func.return'
 
 // CHECK-LABEL: Block pre-order erasures (skip)
 // CHECK:       Erasing block ^bb0 from region 0 from operation 'regionOp0'
@@ -188,7 +188,7 @@ func @unstructured_cfg() {
 // CHECK:       Erasing op 'cf.br'
 // CHECK:       Erasing op 'op2'
 // CHECK:       Erasing op 'regionOp0'
-// CHECK:       Erasing op 'std.return'
+// CHECK:       Erasing op 'func.return'
 
 // CHECK-LABEL: Block post-order erasures (skip)
 // CHECK:       Erasing block ^bb0 from region 0 from operation 'regionOp0'
@@ -202,7 +202,7 @@ func @unstructured_cfg() {
 // CHECK:       Erasing op 'cf.br'
 // CHECK:       Erasing op 'op2'
 // CHECK:       Erasing op 'regionOp0'
-// CHECK:       Erasing op 'std.return'
+// CHECK:       Erasing op 'func.return'
 
 // CHECK-LABEL: Block post-order erasures (no skip)
 // CHECK:       Erasing block ^bb0 from region 0 from operation 'regionOp0'

diff  --git a/mlir/test/Integration/Dialect/SparseTensor/python/test_stress.py b/mlir/test/Integration/Dialect/SparseTensor/python/test_stress.py
index 7958e76862c46..2afcf5506ce42 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/python/test_stress.py
+++ b/mlir/test/Integration/Dialect/SparseTensor/python/test_stress.py
@@ -16,7 +16,7 @@
 from mlir.execution_engine import ExecutionEngine
 
 from mlir.dialects import builtin
-from mlir.dialects import std
+from mlir.dialects import func
 from mlir.dialects import sparse_tensor as st
 
 _SCRIPT_PATH = os.path.dirname(os.path.abspath(__file__))
@@ -122,7 +122,7 @@ def build(self, types: List[ir.Type]):
           st.ReleaseOp(v.result)
           v = w
         self._assertEqualsRoundtripTp(v.result.type)
-        std.ReturnOp(v)
+        func.ReturnOp(v)
     return self
 
   def writeTo(self, filename):

diff  --git a/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py b/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py
index 3a936e6cda50a..e93c9343dd497 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py
+++ b/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco.py
@@ -34,8 +34,8 @@
 from mlir import runtime
 from mlir.dialects import arith
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
 from mlir.dialects import sparse_tensor
 from mlir.dialects.linalg.opdsl import lang
 

diff  --git a/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py b/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py
index 4236d710adf30..90a12cc329dd6 100644
--- a/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py
+++ b/mlir/test/Integration/Dialect/SparseTensor/taco/tools/mlir_pytaco_utils.py
@@ -314,7 +314,7 @@ def _get_output_sparse_tensor_kernel(
 func @{_ENTRY_NAME}(%t: tensor<{shape}x{type}, #enc>, %filename: !Ptr)
 attributes {{ llvm.emit_c_interface }} {{
   sparse_tensor.out %t, %filename : tensor<{shape}x{type}, #enc>, !Ptr
-  std.return
+  func.return
 }}"""
 
 

diff  --git a/mlir/test/Transforms/test-legalizer.mlir b/mlir/test/Transforms/test-legalizer.mlir
index 556e820465da5..59a892910948e 100644
--- a/mlir/test/Transforms/test-legalizer.mlir
+++ b/mlir/test/Transforms/test-legalizer.mlir
@@ -4,7 +4,7 @@
 func @verifyDirectPattern() -> i32 {
   // CHECK-NEXT:  "test.legal_op_a"() {status = "Success"}
   %result = "test.illegal_op_a"() : () -> (i32)
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return %result : i32
 }
 
@@ -12,7 +12,7 @@ func @verifyDirectPattern() -> i32 {
 func @verifyLargerBenefit() -> i32 {
   // CHECK-NEXT:  "test.legal_op_a"() {status = "Success"}
   %result = "test.illegal_op_c"() : () -> (i32)
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return %result : i32
 }
 
@@ -29,7 +29,7 @@ func @remap_input_1_to_1(%arg0: i64) {
 func @remap_call_1_to_1(%arg0: i64) {
   // CHECK-NEXT: call @remap_input_1_to_1(%arg0) : (f64) -> ()
   call @remap_input_1_to_1(%arg0) : (i64) -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -78,7 +78,7 @@ func @no_remap_nested() {
       // CHECK-NEXT: "test.valid"{{.*}} : (i64, i64)
       "test.invalid"(%i0, %i1) : (i64, i64) -> ()
   }) : () -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -92,7 +92,7 @@ func @remap_moved_region_args() {
     ^bb1(%i0: i64, %unused: i16, %i1: i64, %2: f32):
       "test.invalid"(%i0, %i1, %2) : (i64, i64, f32) -> ()
   }) : () -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -106,7 +106,7 @@ func @remap_cloned_region_args() {
     ^bb1(%i0: i64, %unused: i16, %i1: i64, %2: f32):
       "test.invalid"(%i0, %i1, %2) : (i64, i64, f32) -> ()
   }) {legalizer.should_clone} : () -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -118,7 +118,7 @@ func @remap_drop_region() {
     ^bb1(%i0: i64, %unused: i16, %i1: i64, %2: f32):
       "test.invalid"(%i0, %i1, %2) : (i64, i64, f32) -> ()
   }) : () -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -135,7 +135,7 @@ func @up_to_date_replacement(%arg: i8) -> i8 {
   // CHECK-NEXT: return
   %repl_1 = "test.rewrite"(%arg) : (i8) -> i8
   %repl_2 = "test.rewrite"(%repl_1) : (i8) -> i8
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return %repl_2 : i8
 }
 
@@ -146,7 +146,7 @@ func @remove_foldable_op(%arg0 : i32) -> (i32) {
   %0 = "test.op_with_region_fold"(%arg0) ({
     "foo.op_with_region_terminator"() : () -> ()
   }) : (i32) -> (i32)
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return %0 : i32
 }
 
@@ -157,7 +157,7 @@ func @create_block() {
   // CHECK: ^{{.*}}(%{{.*}}: i32, %{{.*}}: i32):
   "test.create_block"() : () -> ()
 
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -165,7 +165,7 @@ func @create_block() {
 func @bounded_recursion() {
   // CHECK: test.recursive_rewrite 0
   test.recursive_rewrite 3
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -227,7 +227,7 @@ func @create_illegal_block() {
   // expected-remark at +1 {{op 'test.create_illegal_block' is not legalizable}}
   "test.create_illegal_block"() : () -> ()
 
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -243,7 +243,7 @@ func @undo_block_arg_replace() {
 
     "test.return"(%arg0) : (i32) -> ()
   }) : () -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -279,7 +279,7 @@ func @undo_block_erase() {
 func @undo_child_created_before_parent() {
   // expected-remark at +1 {{is not legalizable}}
   "test.illegal_op_with_region_anchor"() : () -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 
@@ -291,7 +291,7 @@ func @undo_child_created_before_parent() {
 func @blackhole() {
   %input = "test.blackhole_producer"() : () -> (i32)
   "test.blackhole"(%input) : (i32) -> ()
-  // expected-remark at +1 {{op 'std.return' is not legalizable}}
+  // expected-remark at +1 {{op 'func.return' is not legalizable}}
   return
 }
 

diff  --git a/mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp b/mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp
index dbe2a74cd55ac..9969678456661 100644
--- a/mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp
+++ b/mlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp
@@ -10,8 +10,8 @@
 #include "TestTypes.h"
 #include "mlir/Conversion/LLVMCommon/Pattern.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 
 using namespace mlir;
@@ -40,7 +40,7 @@ class TestConvertCallOp
   }
   StringRef getArgument() const final { return "test-convert-call-op"; }
   StringRef getDescription() const final {
-    return "Tests conversion of `std.call` to `llvm.call` in "
+    return "Tests conversion of `func.call` to `llvm.call` in "
            "presence of custom types";
   }
 
@@ -65,7 +65,7 @@ class TestConvertCallOp
     ConversionTarget target(getContext());
     target.addLegalDialect<LLVM::LLVMDialect>();
     target.addIllegalDialect<test::TestDialect>();
-    target.addIllegalDialect<StandardOpsDialect>();
+    target.addIllegalDialect<func::FuncDialect>();
 
     if (failed(applyPartialConversion(m, target, std::move(patterns))))
       signalPassFailure();

diff  --git a/mlir/test/lib/Dialect/Affine/TestLoopFusion.cpp b/mlir/test/lib/Dialect/Affine/TestLoopFusion.cpp
index 592f41ee547ce..30a2e09cdbc3b 100644
--- a/mlir/test/lib/Dialect/Affine/TestLoopFusion.cpp
+++ b/mlir/test/lib/Dialect/Affine/TestLoopFusion.cpp
@@ -14,7 +14,7 @@
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Affine/LoopFusionUtils.h"
 #include "mlir/Dialect/Affine/LoopUtils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Pass/Pass.h"
 
 #define DEBUG_TYPE "test-loop-fusion"

diff  --git a/mlir/test/lib/Dialect/CMakeLists.txt b/mlir/test/lib/Dialect/CMakeLists.txt
index 87078f8cee684..4f5bbfba74063 100644
--- a/mlir/test/lib/Dialect/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/CMakeLists.txt
@@ -1,5 +1,6 @@
 add_subdirectory(Affine)
 add_subdirectory(DLTI)
+add_subdirectory(Func)
 add_subdirectory(GPU)
 add_subdirectory(Linalg)
 add_subdirectory(Math)
@@ -7,7 +8,6 @@ add_subdirectory(MemRef)
 add_subdirectory(SCF)
 add_subdirectory(Shape)
 add_subdirectory(SPIRV)
-add_subdirectory(StandardOps)
 add_subdirectory(Tensor)
 add_subdirectory(Test)
 add_subdirectory(Tosa)

diff  --git a/mlir/test/lib/Dialect/StandardOps/CMakeLists.txt b/mlir/test/lib/Dialect/Func/CMakeLists.txt
similarity index 68%
rename from mlir/test/lib/Dialect/StandardOps/CMakeLists.txt
rename to mlir/test/lib/Dialect/Func/CMakeLists.txt
index b85de09e10bf4..4320ffaea0108 100644
--- a/mlir/test/lib/Dialect/StandardOps/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/Func/CMakeLists.txt
@@ -1,5 +1,5 @@
 # Exclude tests from libMLIR.so
-add_mlir_library(MLIRStandardOpsTestPasses
+add_mlir_library(MLIRFuncTestPasses
   TestDecomposeCallGraphTypes.cpp
 
   EXCLUDE_FROM_LIBMLIR
@@ -7,12 +7,12 @@ add_mlir_library(MLIRStandardOpsTestPasses
   LINK_LIBS PUBLIC
   MLIRAffine
   MLIRPass
-  MLIRStandardOpsTransforms
+  MLIRFuncTransforms
   MLIRTestDialect
   MLIRTransformUtils
   )
 
-target_include_directories(MLIRStandardOpsTestPasses
+target_include_directories(MLIRFuncTestPasses
   PRIVATE
   ${CMAKE_CURRENT_SOURCE_DIR}/../Test
   ${CMAKE_CURRENT_BINARY_DIR}/../Test

diff  --git a/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp b/mlir/test/lib/Dialect/Func/TestDecomposeCallGraphTypes.cpp
similarity index 91%
rename from mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp
rename to mlir/test/lib/Dialect/Func/TestDecomposeCallGraphTypes.cpp
index c6d61d9bba77e..9236f8215f70d 100644
--- a/mlir/test/lib/Dialect/StandardOps/TestDecomposeCallGraphTypes.cpp
+++ b/mlir/test/lib/Dialect/Func/TestDecomposeCallGraphTypes.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "TestDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
-#include "mlir/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/DialectConversion.h"
@@ -43,11 +43,11 @@ struct TestDecomposeCallGraphTypes
 
     target.addLegalDialect<test::TestDialect>();
 
-    target.addDynamicallyLegalOp<ReturnOp>([&](ReturnOp op) {
+    target.addDynamicallyLegalOp<func::ReturnOp>([&](func::ReturnOp op) {
       return typeConverter.isLegal(op.getOperandTypes());
     });
-    target.addDynamicallyLegalOp<CallOp>(
-        [&](CallOp op) { return typeConverter.isLegal(op); });
+    target.addDynamicallyLegalOp<func::CallOp>(
+        [&](func::CallOp op) { return typeConverter.isLegal(op); });
     target.addDynamicallyLegalOp<FuncOp>([&](FuncOp op) {
       return typeConverter.isSignatureLegal(op.getType());
     });

diff  --git a/mlir/test/lib/Dialect/GPU/CMakeLists.txt b/mlir/test/lib/Dialect/GPU/CMakeLists.txt
index a3cf36b028407..97fc6699f6fbf 100644
--- a/mlir/test/lib/Dialect/GPU/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/GPU/CMakeLists.txt
@@ -10,6 +10,7 @@ add_mlir_library(MLIRGPUTestPasses
 
   LINK_LIBS PUBLIC
   MLIRAffine
+  MLIRFunc
   MLIRGPUOps
   MLIRGPUToGPURuntimeTransforms
   MLIRLLVMToLLVMIRTranslation
@@ -19,6 +20,5 @@ add_mlir_library(MLIRGPUTestPasses
   MLIRROCDLIR
   MLIRROCDLToLLVMIRTranslation
   MLIRSCF
-  MLIRStandard
   MLIRTransformUtils
   )

diff  --git a/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp b/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
index 6c3e6ff5de8b1..b9c40350ecdcf 100644
--- a/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
+++ b/mlir/test/lib/Dialect/GPU/TestGpuMemoryPromotion.cpp
@@ -12,12 +12,12 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/GPU/MemoryPromotion.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Attributes.h"
 #include "mlir/Pass/Pass.h"
 
@@ -32,7 +32,7 @@ class TestGpuMemoryPromotionPass
     : public PassWrapper<TestGpuMemoryPromotionPass,
                          OperationPass<gpu::GPUFuncOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<AffineDialect, memref::MemRefDialect, StandardOpsDialect,
+    registry.insert<AffineDialect, func::FuncDialect, memref::MemRefDialect,
                     scf::SCFDialect>();
   }
   StringRef getArgument() const final { return "test-gpu-memory-promotion"; }

diff  --git a/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp b/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp
index 4d45c49e66233..0a68509cf2df2 100644
--- a/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp
+++ b/mlir/test/lib/Dialect/GPU/TestGpuRewrite.cpp
@@ -11,9 +11,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/MemRef/IR/MemRef.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
 
@@ -23,7 +23,7 @@ namespace {
 struct TestGpuRewritePass
     : public PassWrapper<TestGpuRewritePass, OperationPass<ModuleOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<arith::ArithmeticDialect, StandardOpsDialect,
+    registry.insert<arith::ArithmeticDialect, func::FuncDialect,
                     memref::MemRefDialect>();
   }
   StringRef getArgument() const final { return "test-gpu-rewrite"; }

diff  --git a/mlir/test/lib/Dialect/Linalg/CMakeLists.txt b/mlir/test/lib/Dialect/Linalg/CMakeLists.txt
index 1fe3db2e9e676..56879a18883b1 100644
--- a/mlir/test/lib/Dialect/Linalg/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/Linalg/CMakeLists.txt
@@ -16,6 +16,8 @@ add_mlir_library(MLIRLinalgTestPasses
   MLIRArithmeticTransforms
   MLIRBufferization
   MLIRBufferizationTransforms
+  MLIRFunc
+  MLIRFuncTransforms
   MLIRGPUTransforms
   MLIRLinalg
   MLIRLinalgTransforms
@@ -24,8 +26,6 @@ add_mlir_library(MLIRLinalgTestPasses
   MLIRPass
   MLIRSCF
   MLIRSCFTransforms
-  MLIRStandard
-  MLIRStandardOpsTransforms
   MLIRTensor
   MLIRTensorTransforms
   MLIRTransformUtils

diff  --git a/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
index 3c0249e4825ed..7e4ed8f7a38ac 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgCodegenStrategy.cpp
@@ -13,11 +13,11 @@
 #include <utility>
 
 #include "mlir/Dialect/Affine/IR/AffineOps.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/CodegenStrategy.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
@@ -41,11 +41,11 @@ struct TestLinalgCodegenStrategy
   void getDependentDialects(DialectRegistry &registry) const override {
     // clang-format off
     registry.insert<AffineDialect,
+                    func::FuncDialect,
                     gpu::GPUDialect,
                     linalg::LinalgDialect,
                     memref::MemRefDialect,
                     scf::SCFDialect,
-                    StandardOpsDialect,
                     vector::VectorDialect>();
     // clang-format on
   }

diff  --git a/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
index f8a39b02aae88..d2784b64d65f2 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp
@@ -114,8 +114,8 @@ struct TestLinalgFusionTransforms
     : public PassWrapper<TestLinalgFusionTransforms<LoopType>,
                          OperationPass<FuncOp>> {
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<AffineDialect, linalg::LinalgDialect, memref::MemRefDialect,
-                    scf::SCFDialect, StandardOpsDialect>();
+    registry.insert<AffineDialect, func::FuncDialect, linalg::LinalgDialect,
+                    memref::MemRefDialect, scf::SCFDialect>();
   }
   TestLinalgFusionTransforms() = default;
   TestLinalgFusionTransforms(const TestLinalgFusionTransforms &pass) {}

diff  --git a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
index 6f3d7c9840090..1eb163424e849 100644
--- a/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
+++ b/mlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp
@@ -12,6 +12,7 @@
 
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.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/Passes.h"
@@ -19,7 +20,6 @@
 #include "mlir/Dialect/Linalg/Transforms/Hoisting.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.h"
 #include "mlir/Dialect/Linalg/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/Dialect/Vector/IR/VectorOps.h"
 #include "mlir/Pass/PassManager.h"
 #include "mlir/Transforms/GreedyPatternRewriteDriver.h"
@@ -39,9 +39,9 @@ struct TestLinalgTransforms
   void getDependentDialects(DialectRegistry &registry) const override {
     // clang-format off
     registry.insert<AffineDialect,
+                    func::FuncDialect,
                     memref::MemRefDialect,
                     scf::SCFDialect,
-                    StandardOpsDialect,
                     linalg::LinalgDialect,
                     vector::VectorDialect,
                     gpu::GPUDialect>();

diff  --git a/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp b/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
index 120c44edbc78d..7194c368c1954 100644
--- a/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
+++ b/mlir/test/lib/Dialect/SCF/TestLoopUnrolling.cpp
@@ -11,9 +11,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/Pass/Pass.h"
 
@@ -49,7 +49,7 @@ class TestLoopUnrollingPass
   }
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<arith::ArithmeticDialect, StandardOpsDialect>();
+    registry.insert<arith::ArithmeticDialect, func::FuncDialect>();
   }
 
   void runOnOperation() override {

diff  --git a/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp b/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
index 0feb3e04bc717..e9d89f145ef57 100644
--- a/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
+++ b/mlir/test/lib/Dialect/SCF/TestSCFUtils.cpp
@@ -11,10 +11,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/SCF/SCF.h"
 #include "mlir/Dialect/SCF/Transforms.h"
 #include "mlir/Dialect/SCF/Utils/Utils.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/Builders.h"
 #include "mlir/IR/PatternMatch.h"
 #include "mlir/Pass/Pass.h"
@@ -146,7 +146,7 @@ class TestSCFPipeliningPass
   }
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<arith::ArithmeticDialect, StandardOpsDialect>();
+    registry.insert<arith::ArithmeticDialect, func::FuncDialect>();
   }
 
   void runOnOperation() override {

diff  --git a/mlir/test/lib/Dialect/Test/CMakeLists.txt b/mlir/test/lib/Dialect/Test/CMakeLists.txt
index 06fd28032e8dc..de0e6d2f7ad07 100644
--- a/mlir/test/lib/Dialect/Test/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/Test/CMakeLists.txt
@@ -59,6 +59,8 @@ add_mlir_library(MLIRTestDialect
   MLIRDerivedAttributeOpInterface
   MLIRDialect
   MLIRDLTI
+  MLIRFunc
+  MLIRFuncTransforms
   MLIRIR
   MLIRInferTypeOpInterface
   MLIRLinalg
@@ -66,8 +68,6 @@ add_mlir_library(MLIRTestDialect
   MLIRLLVMIR
   MLIRPass
   MLIRReduce
-  MLIRStandard
-  MLIRStandardOpsTransforms
   MLIRTensor
   MLIRTransformUtils
   MLIRTransforms

diff  --git a/mlir/test/lib/Dialect/Test/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp
index f3f4d54d26e1d..e0c5eea373b0d 100644
--- a/mlir/test/lib/Dialect/Test/TestDialect.cpp
+++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp
@@ -12,7 +12,7 @@
 #include "TestTypes.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/Dialect/DLTI/DLTI.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/DialectImplementation.h"
@@ -368,8 +368,8 @@ struct FoldToCallOpPattern : public OpRewritePattern<FoldToCallOp> {
 
   LogicalResult matchAndRewrite(FoldToCallOp op,
                                 PatternRewriter &rewriter) const override {
-    rewriter.replaceOpWithNewOp<CallOp>(op, TypeRange(), op.getCalleeAttr(),
-                                        ValueRange());
+    rewriter.replaceOpWithNewOp<func::CallOp>(op, TypeRange(),
+                                              op.getCalleeAttr(), ValueRange());
     return success();
   }
 };

diff  --git a/mlir/test/lib/Dialect/Test/TestPatterns.cpp b/mlir/test/lib/Dialect/Test/TestPatterns.cpp
index 5e0c253a77861..69ad6ab4982f4 100644
--- a/mlir/test/lib/Dialect/Test/TestPatterns.cpp
+++ b/mlir/test/lib/Dialect/Test/TestPatterns.cpp
@@ -9,8 +9,8 @@
 #include "TestDialect.h"
 #include "TestTypes.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
-#include "mlir/Dialect/StandardOps/Transforms/FuncConversions.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
+#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/Pass/Pass.h"
@@ -642,7 +642,7 @@ struct TestLegalizePatternDriver
   TestLegalizePatternDriver(ConversionMode mode) : mode(mode) {}
 
   void getDependentDialects(DialectRegistry &registry) const override {
-    registry.insert<StandardOpsDialect>();
+    registry.insert<func::FuncDialect>();
   }
 
   void runOnOperation() override {
@@ -679,8 +679,8 @@ struct TestLegalizePatternDriver
       return converter.isSignatureLegal(op.getType()) &&
              converter.isLegal(&op.getBody());
     });
-    target.addDynamicallyLegalOp<CallOp>(
-        [&](CallOp op) { return converter.isLegal(op); });
+    target.addDynamicallyLegalOp<func::CallOp>(
+        [&](func::CallOp op) { return converter.isLegal(op); });
 
     // TestCreateUnregisteredOp creates `arith.constant` operation,
     // which was not added to target intentionally to test

diff  --git a/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp b/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
index ba37c0fb9a235..974c3daa304f0 100644
--- a/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
+++ b/mlir/test/lib/Dialect/Tosa/TosaTestPasses.cpp
@@ -10,7 +10,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/Tensor/IR/Tensor.h"
 #include "mlir/Dialect/Tosa/IR/TosaOps.h"
 #include "mlir/Dialect/Tosa/Transforms/PassDetail.h"

diff  --git a/mlir/test/lib/Dialect/Vector/CMakeLists.txt b/mlir/test/lib/Dialect/Vector/CMakeLists.txt
index 7629595876215..595bf54beb703 100644
--- a/mlir/test/lib/Dialect/Vector/CMakeLists.txt
+++ b/mlir/test/lib/Dialect/Vector/CMakeLists.txt
@@ -7,13 +7,13 @@ add_mlir_library(MLIRVectorTestPasses
   LINK_LIBS PUBLIC
   MLIRAffine
   MLIRAnalysis
+  MLIRFunc
   MLIRLinalg
   MLIRLinalgTransforms
   MLIRLLVMIR
   MLIRMemRef
   MLIRPass
   MLIRSCF
-  MLIRStandard
   MLIRTransformUtils
   MLIRVector
   MLIRVectorToSCF

diff  --git a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
index 1791768da811d..67e33d3aa0b4a 100644
--- a/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
+++ b/mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp
@@ -10,13 +10,13 @@
 
 #include "mlir/Analysis/SliceAnalysis.h"
 #include "mlir/Dialect/Affine/IR/AffineOps.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/Linalg/IR/Linalg.h"
 #include "mlir/Dialect/Linalg/Passes.h"
 #include "mlir/Dialect/Linalg/Transforms/Transforms.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/Transforms/VectorTransforms.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Pass/PassManager.h"
@@ -391,7 +391,7 @@ struct TestVectorToLoopPatterns
           type.getNumElements() % multiplicity != 0)
         return mlir::WalkResult::advance();
       auto filterAlloc = [](Operation *op) {
-        return !isa<arith::ConstantOp, memref::AllocOp, CallOp>(op);
+        return !isa<arith::ConstantOp, memref::AllocOp, func::CallOp>(op);
       };
       auto dependentOps = getSlice(op, filterAlloc);
       // Create a loop and move instructions from the Op slice into the loop.

diff  --git a/mlir/test/lib/IR/TestMatchers.cpp b/mlir/test/lib/IR/TestMatchers.cpp
index f76078f02d00c..4f8d97f6fdbdb 100644
--- a/mlir/test/lib/IR/TestMatchers.cpp
+++ b/mlir/test/lib/IR/TestMatchers.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
+#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Matchers.h"
 #include "mlir/Pass/Pass.h"

diff  --git a/mlir/test/lib/IR/TestOperationEquals.cpp b/mlir/test/lib/IR/TestOperationEquals.cpp
index dc655ab3f7060..ede4da7775d86 100644
--- a/mlir/test/lib/IR/TestOperationEquals.cpp
+++ b/mlir/test/lib/IR/TestOperationEquals.cpp
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/Pass.h"
 

diff  --git a/mlir/test/lib/IR/TestPrintDefUse.cpp b/mlir/test/lib/IR/TestPrintDefUse.cpp
index 8a854e6a059d6..bb180e0e19e59 100644
--- a/mlir/test/lib/IR/TestPrintDefUse.cpp
+++ b/mlir/test/lib/IR/TestPrintDefUse.cpp
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/Pass.h"
 

diff  --git a/mlir/test/lib/IR/TestPrintNesting.cpp b/mlir/test/lib/IR/TestPrintNesting.cpp
index e2841feb01fa1..f50d917e79c6c 100644
--- a/mlir/test/lib/IR/TestPrintNesting.cpp
+++ b/mlir/test/lib/IR/TestPrintNesting.cpp
@@ -6,7 +6,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/Pass/Pass.h"
 

diff  --git a/mlir/test/lib/IR/TestSlicing.cpp b/mlir/test/lib/IR/TestSlicing.cpp
index a253c59706014..ac40c818d5e92 100644
--- a/mlir/test/lib/IR/TestSlicing.cpp
+++ b/mlir/test/lib/IR/TestSlicing.cpp
@@ -11,8 +11,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "mlir/Analysis/SliceAnalysis.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/BuiltinOps.h"
 #include "mlir/IR/PatternMatch.h"
@@ -39,7 +39,7 @@ static LogicalResult createBackwardSliceFunction(Operation *op,
   getBackwardSlice(op, &slice);
   for (Operation *slicedOp : slice)
     builder.clone(*slicedOp, mapper);
-  builder.create<ReturnOp>(loc);
+  builder.create<func::ReturnOp>(loc);
   return success();
 }
 

diff  --git a/mlir/test/lib/Transforms/TestInlining.cpp b/mlir/test/lib/Transforms/TestInlining.cpp
index 9e43e80347213..f4d5eed024ab6 100644
--- a/mlir/test/lib/Transforms/TestInlining.cpp
+++ b/mlir/test/lib/Transforms/TestInlining.cpp
@@ -13,7 +13,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "TestDialect.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/Pass/Pass.h"
@@ -34,8 +34,9 @@ struct Inliner : public PassWrapper<Inliner, OperationPass<FuncOp>> {
     auto function = getOperation();
 
     // Collect each of the direct function calls within the module.
-    SmallVector<CallIndirectOp, 16> callers;
-    function.walk([&](CallIndirectOp caller) { callers.push_back(caller); });
+    SmallVector<func::CallIndirectOp, 16> callers;
+    function.walk(
+        [&](func::CallIndirectOp caller) { callers.push_back(caller); });
 
     // Build the inliner interface.
     InlinerInterface interface(&getContext());

diff  --git a/mlir/test/mlir-opt/commandline.mlir b/mlir/test/mlir-opt/commandline.mlir
index baee3d7f0187e..29cef56b7ac68 100644
--- a/mlir/test/mlir-opt/commandline.mlir
+++ b/mlir/test/mlir-opt/commandline.mlir
@@ -13,6 +13,7 @@
 // CHECK-NEXT: complex
 // CHECK-NEXT: dlti
 // CHECK-NEXT: emitc
+// CHECK-NEXT: func
 // CHECK-NEXT: gpu
 // CHECK-NEXT: linalg
 // CHECK-NEXT: llvm
@@ -28,7 +29,6 @@
 // CHECK-NEXT: shape
 // CHECK-NEXT: sparse_tensor
 // CHECK-NEXT: spv
-// CHECK-NEXT: std
 // CHECK-NEXT: tensor
 // CHECK-NEXT: test
 // CHECK-NEXT: tosa

diff  --git a/mlir/test/python/dialects/builtin.py b/mlir/test/python/dialects/builtin.py
index 7caf5b5d892ce..d07c094850a4a 100644
--- a/mlir/test/python/dialects/builtin.py
+++ b/mlir/test/python/dialects/builtin.py
@@ -2,7 +2,7 @@
 
 from mlir.ir import *
 import mlir.dialects.builtin as builtin
-import mlir.dialects.std as std
+import mlir.dialects.func as func
 
 
 def run(f):
@@ -92,7 +92,7 @@ def kwargs_func_op(a, b=None, **kwargs):
       # CHECK: return %arg1 : f64
       @builtin.FuncOp.from_py_func(f32, f64, results=[f64])
       def explicit_results(a, b):
-        std.ReturnOp([b])
+        func.ReturnOp([b])
 
   print(m)
 
@@ -125,42 +125,42 @@ def testBuildFuncOp():
     f32 = F32Type.get()
     tensor_type = RankedTensorType.get((2, 3, 4), f32)
     with InsertionPoint.at_block_begin(m.body):
-      func = builtin.FuncOp(name="some_func",
+      f = builtin.FuncOp(name="some_func",
                             type=FunctionType.get(
                                 inputs=[tensor_type, tensor_type],
                                 results=[tensor_type]),
                             visibility="nested")
       # CHECK: Name is: "some_func"
-      print("Name is: ", func.name)
+      print("Name is: ", f.name)
 
       # CHECK: Type is: (tensor<2x3x4xf32>, tensor<2x3x4xf32>) -> tensor<2x3x4xf32>
-      print("Type is: ", func.type)
+      print("Type is: ", f.type)
 
       # CHECK: Visibility is: "nested"
-      print("Visibility is: ", func.visibility)
+      print("Visibility is: ", f.visibility)
 
       try:
-        entry_block = func.entry_block
+        entry_block = f.entry_block
       except IndexError as e:
         # CHECK: External function does not have a body
         print(e)
 
-      with InsertionPoint(func.add_entry_block()):
-        std.ReturnOp([func.entry_block.arguments[0]])
+      with InsertionPoint(f.add_entry_block()):
+        func.ReturnOp([f.entry_block.arguments[0]])
         pass
 
       try:
-        func.add_entry_block()
+        f.add_entry_block()
       except IndexError as e:
         # CHECK: The function already has an entry block!
         print(e)
 
       # Try the callback builder and passing type as tuple.
-      func = builtin.FuncOp(name="some_other_func",
+      f = builtin.FuncOp(name="some_other_func",
                             type=([tensor_type, tensor_type], [tensor_type]),
                             visibility="nested",
-                            body_builder=lambda func: std.ReturnOp(
-                                [func.entry_block.arguments[0]]))
+                            body_builder=lambda f: func.ReturnOp(
+                                [f.entry_block.arguments[0]]))
 
   # CHECK: module  {
   # CHECK:  func nested @some_func(%arg0: tensor<2x3x4xf32>, %arg1: tensor<2x3x4xf32>) -> tensor<2x3x4xf32> {
@@ -181,34 +181,34 @@ def testFuncArgumentAccess():
     f32 = F32Type.get()
     f64 = F64Type.get()
     with InsertionPoint(module.body):
-      func = builtin.FuncOp("some_func", ([f32, f32], [f32, f32]))
-      with InsertionPoint(func.add_entry_block()):
-        std.ReturnOp(func.arguments)
-      func.arg_attrs = ArrayAttr.get([
+      f = builtin.FuncOp("some_func", ([f32, f32], [f32, f32]))
+      with InsertionPoint(f.add_entry_block()):
+        func.ReturnOp(f.arguments)
+      f.arg_attrs = ArrayAttr.get([
           DictAttr.get({
               "custom_dialect.foo": StringAttr.get("bar"),
               "custom_dialect.baz": UnitAttr.get()
           }),
           DictAttr.get({"custom_dialect.qux": ArrayAttr.get([])})
       ])
-      func.result_attrs = ArrayAttr.get([
+      f.result_attrs = ArrayAttr.get([
           DictAttr.get({"custom_dialect.res1": FloatAttr.get(f32, 42.0)}),
           DictAttr.get({"custom_dialect.res2": FloatAttr.get(f64, 256.0)})
       ])
 
       other = builtin.FuncOp("other_func", ([f32, f32], []))
       with InsertionPoint(other.add_entry_block()):
-        std.ReturnOp([])
+        func.ReturnOp([])
       other.arg_attrs = [
           DictAttr.get({"custom_dialect.foo": StringAttr.get("qux")}),
           DictAttr.get()
       ]
 
   # CHECK: [{custom_dialect.baz, custom_dialect.foo = "bar"}, {custom_dialect.qux = []}]
-  print(func.arg_attrs)
+  print(f.arg_attrs)
 
   # CHECK: [{custom_dialect.res1 = 4.200000e+01 : f32}, {custom_dialect.res2 = 2.560000e+02 : f64}]
-  print(func.result_attrs)
+  print(f.result_attrs)
 
   # CHECK: func @some_func(
   # CHECK: %[[ARG0:.*]]: f32 {custom_dialect.baz, custom_dialect.foo = "bar"},

diff  --git a/mlir/test/python/dialects/std.py b/mlir/test/python/dialects/func.py
similarity index 92%
rename from mlir/test/python/dialects/std.py
rename to mlir/test/python/dialects/func.py
index 2a3b2df88e4b0..c4d6417f0558c 100644
--- a/mlir/test/python/dialects/std.py
+++ b/mlir/test/python/dialects/func.py
@@ -3,7 +3,7 @@
 from mlir.ir import *
 from mlir.dialects import arith
 from mlir.dialects import builtin
-from mlir.dialects import std
+from mlir.dialects import func
 
 
 def constructAndPrintInModule(f):
@@ -85,10 +85,10 @@ def testFunctionCalls():
   qux.sym_visibility = StringAttr.get("private")
 
   with InsertionPoint(builtin.FuncOp("caller", ([], [])).add_entry_block()):
-    std.CallOp(foo, [])
-    std.CallOp([IndexType.get()], "bar", [])
-    std.CallOp([F32Type.get()], FlatSymbolRefAttr.get("qux"), [])
-    std.ReturnOp([])
+    func.CallOp(foo, [])
+    func.CallOp([IndexType.get()], "bar", [])
+    func.CallOp([F32Type.get()], FlatSymbolRefAttr.get("qux"), [])
+    func.ReturnOp([])
 
 
 # CHECK: func private @foo()

diff  --git a/mlir/test/python/dialects/linalg/opdsl/emit_convolution.py b/mlir/test/python/dialects/linalg/opdsl/emit_convolution.py
index 25a3de05f0493..6e3ba8fd72c9c 100644
--- a/mlir/test/python/dialects/linalg/opdsl/emit_convolution.py
+++ b/mlir/test/python/dialects/linalg/opdsl/emit_convolution.py
@@ -2,8 +2,8 @@
 
 from mlir.ir import *
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
 
 from mlir.dialects.linalg.opdsl.lang import *
 

diff  --git a/mlir/test/python/dialects/linalg/opdsl/emit_fill.py b/mlir/test/python/dialects/linalg/opdsl/emit_fill.py
index 1a0d08a0dce79..814a6d2a6ccef 100644
--- a/mlir/test/python/dialects/linalg/opdsl/emit_fill.py
+++ b/mlir/test/python/dialects/linalg/opdsl/emit_fill.py
@@ -2,8 +2,8 @@
 
 from mlir.ir import *
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
 
 from mlir.dialects.linalg.opdsl.lang import *
 

diff  --git a/mlir/test/python/dialects/linalg/opdsl/emit_matmul.py b/mlir/test/python/dialects/linalg/opdsl/emit_matmul.py
index 1b31ed040ad2e..b3b4537874282 100644
--- a/mlir/test/python/dialects/linalg/opdsl/emit_matmul.py
+++ b/mlir/test/python/dialects/linalg/opdsl/emit_matmul.py
@@ -2,8 +2,8 @@
 
 from mlir.ir import *
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
 
 from mlir.dialects.linalg.opdsl.lang import *
 

diff  --git a/mlir/test/python/dialects/linalg/opdsl/emit_misc.py b/mlir/test/python/dialects/linalg/opdsl/emit_misc.py
index 85699493dd4db..81de8fc0f2045 100644
--- a/mlir/test/python/dialects/linalg/opdsl/emit_misc.py
+++ b/mlir/test/python/dialects/linalg/opdsl/emit_misc.py
@@ -2,8 +2,8 @@
 
 from mlir.ir import *
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
 
 from mlir.dialects.linalg.opdsl.lang import *
 

diff  --git a/mlir/test/python/dialects/linalg/opdsl/emit_pooling.py b/mlir/test/python/dialects/linalg/opdsl/emit_pooling.py
index d68b43de7535b..b97b0188e0e8d 100644
--- a/mlir/test/python/dialects/linalg/opdsl/emit_pooling.py
+++ b/mlir/test/python/dialects/linalg/opdsl/emit_pooling.py
@@ -2,8 +2,8 @@
 
 from mlir.ir import *
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
 
 from mlir.dialects.linalg.opdsl.lang import *
 

diff  --git a/mlir/test/python/dialects/linalg/ops.py b/mlir/test/python/dialects/linalg/ops.py
index 08be2ccada5f7..6f912c8bb129a 100644
--- a/mlir/test/python/dialects/linalg/ops.py
+++ b/mlir/test/python/dialects/linalg/ops.py
@@ -1,10 +1,10 @@
 # RUN: %PYTHON %s | FileCheck %s
 
 from mlir.ir import *
+from mlir.dialects import arith
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
-from mlir.dialects import arith
 
 from mlir.dialects.linalg.opdsl.lang import *
 

diff  --git a/mlir/test/python/dialects/memref.py b/mlir/test/python/dialects/memref.py
index f2eda0a620610..db917678ba18f 100644
--- a/mlir/test/python/dialects/memref.py
+++ b/mlir/test/python/dialects/memref.py
@@ -1,7 +1,7 @@
 # RUN: %PYTHON %s | FileCheck %s
 
 from mlir.ir import *
-import mlir.dialects.std as std
+import mlir.dialects.func as func
 import mlir.dialects.memref as memref
 
 
@@ -63,10 +63,10 @@ def testCustomBuidlers():
         return
       }
     """)
-    func = module.body.operations[0]
-    func_body = func.regions[0].blocks[0]
+    f = module.body.operations[0]
+    func_body = f.regions[0].blocks[0]
     with InsertionPoint.at_block_terminator(func_body):
-      memref.LoadOp(func.arguments[0], func.arguments[1:])
+      memref.LoadOp(f.arguments[0], f.arguments[1:])
 
     # CHECK: func @f1(%[[ARG0:.*]]: memref<?x?xf32>, %[[ARG1:.*]]: index, %[[ARG2:.*]]: index)
     # CHECK: memref.load %[[ARG0]][%[[ARG1]], %[[ARG2]]]

diff  --git a/mlir/test/python/dialects/scf.py b/mlir/test/python/dialects/scf.py
index 562356f312f34..f434e806ed47f 100644
--- a/mlir/test/python/dialects/scf.py
+++ b/mlir/test/python/dialects/scf.py
@@ -2,8 +2,8 @@
 
 from mlir.ir import *
 from mlir.dialects import arith
+from mlir.dialects import func
 from mlir.dialects import scf
-from mlir.dialects import std
 from mlir.dialects import builtin
 
 
@@ -59,16 +59,16 @@ def testOpsAsArguments():
   index_type = IndexType.get()
   callee = builtin.FuncOp(
       "callee", ([], [index_type, index_type]), visibility="private")
-  func = builtin.FuncOp("ops_as_arguments", ([], []))
-  with InsertionPoint(func.add_entry_block()):
+  f = builtin.FuncOp("ops_as_arguments", ([], []))
+  with InsertionPoint(f.add_entry_block()):
     lb = arith.ConstantOp.create_index(0)
     ub = arith.ConstantOp.create_index(42)
     step = arith.ConstantOp.create_index(2)
-    iter_args = std.CallOp(callee, [])
+    iter_args = func.CallOp(callee, [])
     loop = scf.ForOp(lb, ub, step, iter_args)
     with InsertionPoint(loop.body):
       scf.YieldOp(loop.inner_iter_args)
-    std.ReturnOp([])
+    func.ReturnOp([])
 
 
 # CHECK-LABEL: TEST: testOpsAsArguments

diff  --git a/mlir/test/python/dialects/vector.py b/mlir/test/python/dialects/vector.py
index b8db94070d6a2..5c2043eec84b6 100644
--- a/mlir/test/python/dialects/vector.py
+++ b/mlir/test/python/dialects/vector.py
@@ -2,7 +2,7 @@
 
 from mlir.ir import *
 import mlir.dialects.builtin as builtin
-import mlir.dialects.std as std
+import mlir.dialects.func as func
 import mlir.dialects.vector as vector
 
 def run(f):
@@ -40,16 +40,16 @@ def testTransferReadOp():
     mask_type = VectorType.get(vector_type.shape, IntegerType.get_signless(1))
     identity_map = AffineMap.get_identity(vector_type.rank)
     identity_map_attr = AffineMapAttr.get(identity_map)
-    func = builtin.FuncOp("transfer_read",
+    f = builtin.FuncOp("transfer_read",
                           ([memref_type, index_type,
                             F32Type.get(), mask_type], []))
-    with InsertionPoint(func.add_entry_block()):
-      A, zero, padding, mask = func.arguments
+    with InsertionPoint(f.add_entry_block()):
+      A, zero, padding, mask = f.arguments
       vector.TransferReadOp(vector_type, A, [zero, zero], identity_map_attr,
                             padding, mask, None)
       vector.TransferReadOp(vector_type, A, [zero, zero], identity_map_attr,
                             padding, None, None)
-      std.ReturnOp([])
+      func.ReturnOp([])
 
   # CHECK: @transfer_read(%[[MEM:.*]]: memref<?x?xf32>, %[[IDX:.*]]: index,
   # CHECK: %[[PAD:.*]]: f32, %[[MASK:.*]]: vector<2x3xi1>)

diff  --git a/mlir/test/python/integration/dialects/linalg/opsrun.py b/mlir/test/python/integration/dialects/linalg/opsrun.py
index c4e580f89c94d..54e1c85b29561 100644
--- a/mlir/test/python/integration/dialects/linalg/opsrun.py
+++ b/mlir/test/python/integration/dialects/linalg/opsrun.py
@@ -4,8 +4,8 @@
 import sys
 from mlir.ir import *
 from mlir.dialects import builtin
+from mlir.dialects import func
 from mlir.dialects import linalg
-from mlir.dialects import std
 from mlir.passmanager import *
 from mlir.execution_engine import *
 

diff  --git a/mlir/test/python/ir/blocks.py b/mlir/test/python/ir/blocks.py
index 5aa1bf82de779..9ccffaeb2ec08 100644
--- a/mlir/test/python/ir/blocks.py
+++ b/mlir/test/python/ir/blocks.py
@@ -6,8 +6,7 @@
 from mlir.ir import *
 from mlir.dialects import builtin
 from mlir.dialects import cf
-# Note: std dialect needed for terminators.
-from mlir.dialects import std
+from mlir.dialects import func
 
 
 def run(f):
@@ -39,7 +38,7 @@ def testBlockCreation():
       successor_block = entry_block.create_after(i32_arg.type)
       with InsertionPoint(successor_block) as successor_ip:
         assert successor_ip.block == successor_block
-        std.ReturnOp([])
+        func.ReturnOp([])
       middle_block = successor_block.create_before(i16_arg.type)
 
       with InsertionPoint(entry_block) as entry_ip:
@@ -63,11 +62,11 @@ def testFirstBlockCreation():
     module = Module.create()
     f32 = F32Type.get()
     with InsertionPoint(module.body):
-      func = builtin.FuncOp("test", ([f32], []))
-      entry_block = Block.create_at_start(func.operation.regions[0], [f32])
+      f = builtin.FuncOp("test", ([f32], []))
+      entry_block = Block.create_at_start(f.operation.regions[0], [f32])
       with InsertionPoint(entry_block):
-        std.ReturnOp([])
+        func.ReturnOp([])
 
     print(module)
     assert module.operation.verify()
-    assert func.body.blocks[0] == entry_block
+    assert f.body.blocks[0] == entry_block

diff  --git a/mlir/test/python/ir/dialects.py b/mlir/test/python/ir/dialects.py
index 10e1a67b931f8..65e81e84354c2 100644
--- a/mlir/test/python/ir/dialects.py
+++ b/mlir/test/python/ir/dialects.py
@@ -16,10 +16,10 @@ def run(f):
 @run
 def testDialectDescriptor():
   ctx = Context()
-  d = ctx.get_dialect_descriptor("std")
-  # CHECK: <DialectDescriptor std>
+  d = ctx.get_dialect_descriptor("func")
+  # CHECK: <DialectDescriptor func>
   print(d)
-  # CHECK: std
+  # CHECK: func
   print(d.namespace)
   try:
     _ = ctx.get_dialect_descriptor("not_existing")
@@ -34,8 +34,8 @@ def testDialectDescriptor():
 def testUserDialectClass():
   ctx = Context()
   # Access using attribute.
-  d = ctx.dialects.std
-  # CHECK: <Dialect std (class mlir.dialects._std_ops_gen._Dialect)>
+  d = ctx.dialects.func
+  # CHECK: <Dialect func (class mlir.dialects._func_ops_gen._Dialect)>
   print(d)
   try:
     _ = ctx.dialects.not_existing
@@ -45,8 +45,8 @@ def testUserDialectClass():
     assert False, "Expected exception"
 
   # Access using index.
-  d = ctx.dialects["std"]
-  # CHECK: <Dialect std (class mlir.dialects._std_ops_gen._Dialect)>
+  d = ctx.dialects["func"]
+  # CHECK: <Dialect func (class mlir.dialects._func_ops_gen._Dialect)>
   print(d)
   try:
     _ = ctx.dialects["not_existing"]
@@ -56,8 +56,8 @@ def testUserDialectClass():
     assert False, "Expected exception"
 
   # Using the 'd' alias.
-  d = ctx.d["std"]
-  # CHECK: <Dialect std (class mlir.dialects._std_ops_gen._Dialect)>
+  d = ctx.d["func"]
+  # CHECK: <Dialect func (class mlir.dialects._func_ops_gen._Dialect)>
   print(d)
 
 
@@ -102,5 +102,5 @@ def testIsRegisteredOperation():
 
   # CHECK: cf.cond_br: True
   print(f"cf.cond_br: {ctx.is_registered_operation('cf.cond_br')}")
-  # CHECK: std.not_existing: False
-  print(f"std.not_existing: {ctx.is_registered_operation('std.not_existing')}")
+  # CHECK: func.not_existing: False
+  print(f"func.not_existing: {ctx.is_registered_operation('func.not_existing')}")

diff  --git a/mlir/test/python/ir/operation.py b/mlir/test/python/ir/operation.py
index 7608bc56f0b74..2b63f15422da7 100644
--- a/mlir/test/python/ir/operation.py
+++ b/mlir/test/python/ir/operation.py
@@ -128,7 +128,7 @@ def testBlockAndRegionOwners():
       r"""
     builtin.module {
       builtin.func @f() {
-        std.return
+        func.return
       }
     }
   """, ctx)
@@ -564,7 +564,7 @@ def testOperationPrint():
 
   # Test get_asm with options.
   # CHECK: value = opaque<"elided_large_const", "0xDEADBEEF"> : tensor<4xi32>
-  # CHECK: "std.return"(%arg0) : (i32) -> () -:4:7
+  # CHECK: "func.return"(%arg0) : (i32) -> () -:4:7
   module.operation.print(
       large_elements_limit=2,
       enable_debug_info=True,
@@ -587,7 +587,7 @@ def testKnownOpView():
     """)
     print(module)
 
-    # addf should map to a known OpView class in the std dialect.
+    # addf should map to a known OpView class in the arithmetic dialect.
     # We know the OpView for it defines an 'lhs' attribute.
     addf = module.body.operations[2]
     # CHECK: <mlir.dialects._arith_ops_gen._AddFOp object

diff  --git a/mlir/test/python/pass_manager.py b/mlir/test/python/pass_manager.py
index e5a42573a0e22..3531b0507a343 100644
--- a/mlir/test/python/pass_manager.py
+++ b/mlir/test/python/pass_manager.py
@@ -92,5 +92,5 @@ def testRunPipeline():
 # CHECK: Operations encountered:
 # CHECK: builtin.func      , 1
 # CHECK: builtin.module    , 1
-# CHECK: std.return        , 1
+# CHECK: func.return        , 1
 run(testRunPipeline)

diff  --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt
index b83548e2c19df..34cf3a97d85d9 100644
--- a/mlir/tools/mlir-opt/CMakeLists.txt
+++ b/mlir/tools/mlir-opt/CMakeLists.txt
@@ -15,6 +15,7 @@ if(MLIR_INCLUDE_TESTS)
     MLIRTestStandardToLLVM
     MLIRAffineTransformsTestPasses
     MLIRDLTITestPasses
+    MLIRFuncTestPasses
     MLIRGPUTestPasses
     MLIRLinalgTestPasses
     MLIRMathTestPasses
@@ -22,7 +23,6 @@ if(MLIR_INCLUDE_TESTS)
     MLIRSCFTestPasses
     MLIRShapeTestPasses
     MLIRSPIRVTestPasses
-    MLIRStandardOpsTestPasses
     MLIRTensorTestPasses
     MLIRTestAnalysis
     MLIRTestDialect

diff  --git a/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt b/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
index 9c8ec7e0aecb0..74bf6db556d92 100644
--- a/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
@@ -18,6 +18,7 @@ if (MLIR_ENABLE_SPIRV_CPU_RUNNER)
     MLIRAnalysis
     MLIRArithmetic
     MLIRExecutionEngine
+    MLIRFunc
     MLIRGPUOps
     MLIRIR
     MLIRJitRunner
@@ -26,7 +27,6 @@ if (MLIR_ENABLE_SPIRV_CPU_RUNNER)
     MLIRMemRef
     MLIRParser
     MLIRSPIRV
-    MLIRStandard
     MLIRTargetLLVMIRExport
     MLIRTransforms
     MLIRTranslation

diff  --git a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
index b386e9126a21e..213e46075a47d 100644
--- a/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
+++ b/mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
@@ -16,6 +16,7 @@
 #include "mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h"
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
@@ -23,7 +24,6 @@
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
 #include "mlir/Dialect/SPIRV/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/ExecutionEngine/JitRunner.h"
 #include "mlir/ExecutionEngine/OptUtils.h"
 #include "mlir/Pass/Pass.h"
@@ -99,7 +99,7 @@ int main(int argc, char **argv) {
   mlir::DialectRegistry registry;
   registry.insert<mlir::arith::ArithmeticDialect, mlir::LLVM::LLVMDialect,
                   mlir::gpu::GPUDialect, mlir::spirv::SPIRVDialect,
-                  mlir::StandardOpsDialect, mlir::memref::MemRefDialect>();
+                  mlir::func::FuncDialect, mlir::memref::MemRefDialect>();
   mlir::registerLLVMDialectTranslation(registry);
 
   return mlir::JitRunnerMain(argc, argv, registry, jitRunnerConfig);

diff  --git a/mlir/tools/mlir-vulkan-runner/CMakeLists.txt b/mlir/tools/mlir-vulkan-runner/CMakeLists.txt
index cde6e1a31317b..5e0ae1402280a 100644
--- a/mlir/tools/mlir-vulkan-runner/CMakeLists.txt
+++ b/mlir/tools/mlir-vulkan-runner/CMakeLists.txt
@@ -58,6 +58,7 @@ if (MLIR_ENABLE_VULKAN_RUNNER)
     MLIRAnalysis
     MLIRArithmetic
     MLIRExecutionEngine
+    MLIRFunc
     MLIRGPUOps
     MLIRIR
     MLIRJitRunner
@@ -69,7 +70,6 @@ if (MLIR_ENABLE_VULKAN_RUNNER)
     MLIRParser
     MLIRSPIRV
     MLIRSPIRVTransforms
-    MLIRStandard
     MLIRSupport
     MLIRTargetLLVMIRExport
     MLIRTransforms

diff  --git a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
index 1d72c3c936639..46b6e67bc043c 100644
--- a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
+++ b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
@@ -20,6 +20,7 @@
 #include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
 #include "mlir/Conversion/StandardToSPIRV/StandardToSPIRVPass.h"
 #include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
+#include "mlir/Dialect/Func/IR/FuncOps.h"
 #include "mlir/Dialect/GPU/GPUDialect.h"
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
@@ -28,7 +29,6 @@
 #include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
 #include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
 #include "mlir/Dialect/SPIRV/Transforms/Passes.h"
-#include "mlir/Dialect/StandardOps/IR/Ops.h"
 #include "mlir/ExecutionEngine/JitRunner.h"
 #include "mlir/ExecutionEngine/OptUtils.h"
 #include "mlir/Pass/Pass.h"
@@ -75,7 +75,7 @@ int main(int argc, char **argv) {
   mlir::DialectRegistry registry;
   registry.insert<mlir::arith::ArithmeticDialect, mlir::LLVM::LLVMDialect,
                   mlir::gpu::GPUDialect, mlir::spirv::SPIRVDialect,
-                  mlir::StandardOpsDialect, mlir::memref::MemRefDialect>();
+                  mlir::func::FuncDialect, mlir::memref::MemRefDialect>();
   mlir::registerLLVMDialectTranslation(registry);
 
   return mlir::JitRunnerMain(argc, argv, registry, jitRunnerConfig);

diff  --git a/mlir/unittests/Conversion/PDLToPDLInterp/CMakeLists.txt b/mlir/unittests/Conversion/PDLToPDLInterp/CMakeLists.txt
index 316003cdc3a59..aedd1852a8c20 100644
--- a/mlir/unittests/Conversion/PDLToPDLInterp/CMakeLists.txt
+++ b/mlir/unittests/Conversion/PDLToPDLInterp/CMakeLists.txt
@@ -3,6 +3,6 @@ add_mlir_unittest(MLIRPDLToPDLInterpTests
 )
 target_link_libraries(MLIRPDLToPDLInterpTests
   PRIVATE
-  MLIRStandard
+  MLIRFunc
   MLIRPDLToPDLInterp
 )

diff  --git a/mlir/unittests/Interfaces/CMakeLists.txt b/mlir/unittests/Interfaces/CMakeLists.txt
index d86710c2781a7..54a6837b0ed88 100644
--- a/mlir/unittests/Interfaces/CMakeLists.txt
+++ b/mlir/unittests/Interfaces/CMakeLists.txt
@@ -9,7 +9,7 @@ target_link_libraries(MLIRInterfacesTests
   MLIRControlFlowInterfaces
   MLIRDataLayoutInterfaces
   MLIRDLTI
+  MLIRFunc
   MLIRInferTypeOpInterface
   MLIRParser
-  MLIRStandard
 )

diff  --git a/mlir/unittests/Interfaces/InferTypeOpInterfaceTest.cpp b/mlir/unittests/Interfaces/InferTypeOpInterfaceTest.cpp
index 386253b9fdd0d..c74f76cd5f76c 100644
--- a/mlir/unittests/Interfaces/InferTypeOpInterfaceTest.cpp
+++ b/mlir/unittests/Interfaces/InferTypeOpInterfaceTest.cpp
@@ -8,7 +8,7 @@
 
 #include "mlir/Interfaces/InferTypeOpInterface.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/Builders.h"
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/Dialect.h"
@@ -33,7 +33,7 @@ class ValueShapeRangeTest : public testing::Test {
       }
     )MLIR";
 
-    registry.insert<StandardOpsDialect, arith::ArithmeticDialect>();
+    registry.insert<func::FuncDialect, arith::ArithmeticDialect>();
     ctx.appendDialectRegistry(registry);
     module = parseSourceString(ir, &ctx);
     mapFn = cast<FuncOp>(module->front());

diff  --git a/mlir/utils/vim/syntax/mlir.vim b/mlir/utils/vim/syntax/mlir.vim
index 8caa06e1a843c..5246aa04510e7 100644
--- a/mlir/utils/vim/syntax/mlir.vim
+++ b/mlir/utils/vim/syntax/mlir.vim
@@ -34,7 +34,6 @@ syn match mlirType /\<vector\ze\s*<.*>/
 syn match mlirType /x\s*\zsvector/
 
 " Operations.
-" Standard dialect ops.
 " TODO: this list is not exhaustive.
 syn keyword mlirOps alloc alloca addf addi and call call_indirect cmpf cmpi
 syn keyword mlirOps constant dealloc divf dma_start dma_wait dim exp


        


More information about the flang-commits mailing list