[all-commits] [llvm/llvm-project] 74a58e: [mlir][CAPI][Python] Plumb OpPrintingFlags to C an...

Stella Laurenzo via All-commits all-commits at lists.llvm.org
Wed Oct 21 12:15:41 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 74a58ec9c27f48eb26094667156934c6ca9d0012
      https://github.com/llvm/llvm-project/commit/74a58ec9c27f48eb26094667156934c6ca9d0012
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2020-10-21 (Wed, 21 Oct 2020)

  Changed paths:
    M mlir/include/mlir-c/IR.h
    M mlir/include/mlir/CAPI/IR.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/Bindings/Python/IRModules.cpp
    M mlir/lib/Bindings/Python/IRModules.h
    M mlir/lib/CAPI/IR/IR.cpp
    M mlir/test/Bindings/Python/ir_operation.py
    M mlir/test/CAPI/ir.c

  Log Message:
  -----------
  [mlir][CAPI][Python] Plumb OpPrintingFlags to C and Python APIs.

* Adds a new MlirOpPrintingFlags type and supporting accessors.
* Adds a new mlirOperationPrintWithFlags function.
* Adds a full featured python Operation.print method with all options and the ability to print directly to files/stdout in text or binary.
* Adds an Operation.get_asm which delegates to print and returns a str or bytes.
* Reworks Operation.__str__ to be based on get_asm.

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




More information about the All-commits mailing list