[all-commits] [llvm/llvm-project] f61d10: Add a basic C API for the MLIR PassManager as well...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Tue Nov 3 22:37:19 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f61d1028fa55846aadcd69be17ba06bf8a710952
      https://github.com/llvm/llvm-project/commit/f61d1028fa55846aadcd69be17ba06bf8a710952
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    A mlir/include/mlir-c/Pass.h
    A mlir/include/mlir-c/Transforms.h
    M mlir/include/mlir/CAPI/IR.h
    A mlir/include/mlir/CAPI/Pass.h
    M mlir/include/mlir/Transforms/CMakeLists.txt
    M mlir/lib/CAPI/CMakeLists.txt
    M mlir/lib/CAPI/IR/CMakeLists.txt
    A mlir/lib/CAPI/IR/Pass.cpp
    A mlir/lib/CAPI/Transforms/CMakeLists.txt
    A mlir/lib/CAPI/Transforms/Passes.cpp
    M mlir/test/CAPI/CMakeLists.txt
    A mlir/test/CAPI/pass.c
    M mlir/test/CMakeLists.txt
    M mlir/test/lit.cfg.py
    M mlir/tools/mlir-tblgen/CMakeLists.txt
    A mlir/tools/mlir-tblgen/PassCAPIGen.cpp

  Log Message:
  -----------
  Add a basic C API for the MLIR PassManager as well as a basic TableGen backend for creating passes

This is exposing the basic functionalities (create, nest, addPass, run) of
the PassManager through the C API in the new header: `include/mlir-c/Pass.h`.

In order to exercise it in the unit-test, a basic TableGen backend is
also provided to generate a simple C wrapper around the pass
constructor. It is used to expose the libTransforms passes to the C API.

Reviewed By: stellaraccident, ftynse

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


  Commit: b4fa6d3e13ef66baec8c2610c5ce39f3e470da12
      https://github.com/llvm/llvm-project/commit/b4fa6d3e13ef66baec8c2610c5ce39f3e470da12
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M mlir/include/mlir/CAPI/Utils.h
    M mlir/lib/CAPI/IR/AffineExpr.cpp
    M mlir/lib/CAPI/IR/AffineMap.cpp
    M mlir/lib/CAPI/IR/Diagnostics.cpp
    M mlir/lib/CAPI/IR/IR.cpp

  Log Message:
  -----------
  Switch the CallbackOstream wrapper in the MLIR C API to an Unbuffered stream

This delegate the control of the buffering to the user of the API. This
seems like a safer option as messages are immediately propagated to the
user, which may lead to less surprising behavior during debugging for
instance.
In terms of performance, a user can add a buffered stream on the other
side of the callback.

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


  Commit: 065047ab01b30ead4c7b618e57266482fb61d901
      https://github.com/llvm/llvm-project/commit/065047ab01b30ead4c7b618e57266482fb61d901
  Author: Mehdi Amini <joker.eph at gmail.com>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M mlir/CMakeLists.txt

  Log Message:
  -----------
  Enable -Werror-implicit-function-declaration by default (NFC)

This is useful in C source files where it is easy for a typo to be
silently assumed by the compiler to be an implicit declaration.

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


Compare: https://github.com/llvm/llvm-project/compare/06926e0f012c...065047ab01b3


More information about the All-commits mailing list