This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Rename the Standard dialect to the Func dialect
ClosedPublic

Authored by rriddle on Feb 26 2022, 2:51 PM.

Details

Summary

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

Diff Detail

Event Timeline

rriddle created this revision.Feb 26 2022, 2:51 PM
rriddle requested review of this revision.Feb 26 2022, 2:51 PM
lattner accepted this revision.Feb 26 2022, 4:59 PM
This revision is now accepted and ready to land.Feb 26 2022, 4:59 PM
ftynse added inline comments.Feb 28 2022, 2:59 AM
mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
102

This needs the ::func namespace.

mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
78

This needs the ::func namespace.

ftynse requested changes to this revision.Feb 28 2022, 3:05 AM

Looks good in general.

There are a couple of build failures on less frequently used targets (namely spirv and vulkan runner), and in flang. Some Python updates are also missing, in particular there are imports that are not of the form import mlir.dialects.std that may not have been caught by the rename regexp.

mlir/test/python/dialects/scf.py
67

There's a name conflict between the imported func module and the func variable defined at line 62.

This revision now requires changes to proceed.Feb 28 2022, 3:05 AM
rriddle requested review of this revision.Feb 28 2022, 9:25 AM
rriddle updated this revision to Diff 411821.
rriddle marked 3 inline comments as done.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 9:25 AM
rriddle updated this revision to Diff 411848.Feb 28 2022, 11:07 AM

Thanks @ftynse , everything should be good now.

rriddle updated this revision to Diff 411907.Feb 28 2022, 3:09 PM
ftynse accepted this revision.Mar 1 2022, 2:09 AM
This revision is now accepted and ready to land.Mar 1 2022, 2:09 AM
This revision was landed with ongoing or failed builds.Mar 1 2022, 12:10 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 12:10 PM
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp