[all-commits] [llvm/llvm-project] a5ef51: [mlir] Add support for "promised" interfaces

River Riddle via All-commits all-commits at lists.llvm.org
Fri Jun 9 11:30:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a5ef51d786f241cdd9d1bec62fbc2bf89a766b7d
      https://github.com/llvm/llvm-project/commit/a5ef51d786f241cdd9d1bec62fbc2bf89a766b7d
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2023-06-09 (Fri, 09 Jun 2023)

  Changed paths:
    M flang/include/flang/Optimizer/Support/InitFIR.h
    M flang/lib/Frontend/CMakeLists.txt
    M flang/lib/Lower/CMakeLists.txt
    M flang/lib/Optimizer/Builder/CMakeLists.txt
    M flang/lib/Optimizer/Support/CMakeLists.txt
    M flang/tools/bbc/CMakeLists.txt
    M flang/tools/fir-opt/CMakeLists.txt
    M flang/tools/tco/CMakeLists.txt
    M flang/unittests/Optimizer/CMakeLists.txt
    M mlir/cmake/modules/AddMLIR.cmake
    M mlir/cmake/modules/CMakeLists.txt
    M mlir/cmake/modules/MLIRConfig.cmake.in
    M mlir/examples/toy/Ch5/CMakeLists.txt
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/examples/toy/Ch6/CMakeLists.txt
    M mlir/examples/toy/Ch6/toyc.cpp
    M mlir/examples/toy/Ch7/CMakeLists.txt
    M mlir/examples/toy/Ch7/toyc.cpp
    A mlir/include/mlir/Dialect/Func/Extensions/AllExtensions.h
    A mlir/include/mlir/Dialect/Func/Extensions/InlinerExtension.h
    M mlir/include/mlir/Dialect/Func/IR/FuncOps.td
    M mlir/include/mlir/IR/Attributes.h
    M mlir/include/mlir/IR/Dialect.h
    M mlir/include/mlir/IR/DialectRegistry.h
    M mlir/include/mlir/IR/OpDefinition.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/include/mlir/IR/StorageUniquerSupport.h
    M mlir/include/mlir/IR/Types.h
    A mlir/include/mlir/InitAllExtensions.h
    M mlir/lib/Dialect/Func/CMakeLists.txt
    A mlir/lib/Dialect/Func/Extensions/AllExtensions.cpp
    A mlir/lib/Dialect/Func/Extensions/CMakeLists.txt
    A mlir/lib/Dialect/Func/Extensions/InlinerExtension.cpp
    M mlir/lib/Dialect/Func/IR/CMakeLists.txt
    M mlir/lib/Dialect/Func/IR/FuncOps.cpp
    M mlir/lib/IR/Dialect.cpp
    M mlir/test/CAPI/ir.c
    M mlir/tools/mlir-opt/CMakeLists.txt
    M mlir/tools/mlir-opt/mlir-opt.cpp
    M mlir/unittests/Interfaces/CMakeLists.txt

  Log Message:
  -----------
  [mlir] Add support for "promised" interfaces

Promised interfaces allow for a dialect to "promise" the implementation of an interface, i.e.
declare that it supports an interface, but have the interface defined in an extension in a library
separate from the dialect itself. A promised interface is powerful in that it alerts the user when
the interface is attempted to be used (e.g. via cast/dyn_cast/etc.) and the implementation has
not yet been provided. This makes the system much more robust against misconfiguration,
and ensures that we do not lose the benefit we currently have of defining the interface in
the dialect library.

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




More information about the All-commits mailing list