[all-commits] [llvm/llvm-project] d9e04b: [mlir][CAPI] Expose the rest of MLIRContext's cons...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Mon Jul 10 13:17:34 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9e04b0626aef6269abd6328f6a189c313eacbba
      https://github.com/llvm/llvm-project/commit/d9e04b0626aef6269abd6328f6a189c313eacbba
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2023-07-10 (Mon, 10 Jul 2023)

  Changed paths:
    M mlir/include/mlir-c/IR.h
    M mlir/include/mlir-c/Support.h
    M mlir/include/mlir/CAPI/Support.h
    M mlir/lib/CAPI/IR/IR.cpp
    M mlir/lib/CAPI/IR/Support.cpp
    M mlir/test/CAPI/ir.c

  Log Message:
  -----------
  [mlir][CAPI] Expose the rest of MLIRContext's constructors

It's recommended practice that people calling MLIR in a loop
pre-create a LLVM ThreadPool and a dialect registry and then
explicitly pass those into a MLIRContext for each compilation.
However, the C API does not expose the functions needed to follow this
recommendation from a project that isn't calling MLIR's C++ dilectly.

Add the necessary APIs to mlir-c, including a wrapper around LLVM's
ThreadPool struct (so as to avoid having to amend or re-export parts
of the LLVM API).

Reviewed By: makslevental

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




More information about the All-commits mailing list