[all-commits] [llvm/llvm-project] 5099a4: [MLIR] Replace dialect registration hooks with dia...

George Lyon via All-commits all-commits at lists.llvm.org
Tue Feb 9 09:11:53 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5099a48a3bdc6a25b83c47281251825101727e96
      https://github.com/llvm/llvm-project/commit/5099a48a3bdc6a25b83c47281251825101727e96
  Author: George <GeorgeLyon at users.noreply.github.com>
  Date:   2021-02-09 (Tue, 09 Feb 2021)

  Changed paths:
    M mlir/include/mlir-c/Registration.h
    M mlir/include/mlir/CAPI/Registration.h
    M mlir/lib/CAPI/IR/CMakeLists.txt
    A mlir/lib/CAPI/IR/DialectHandle.cpp
    M mlir/test/CAPI/ir.c

  Log Message:
  -----------
  [MLIR] Replace dialect registration hooks with dialect handle

Replace MlirDialectRegistrationHooks with MlirDialectHandle, which under-the-hood is an opaque pointer to MlirDialectRegistrationHooks. Then we expose the functionality previously directly on MlirDialectRegistrationHooks, as functions which take the opaque MlirDialectHandle struct. This makes the actual structure of the registration hooks an implementation detail, and happens to avoid this issue: https://llvm.discourse.group/t/strange-swift-issues-with-dialect-registration-hooks/2759/3

Reviewed By: stellaraccident

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




More information about the All-commits mailing list