[all-commits] [llvm/llvm-project] 31ebe9: [mlir][c] Expose AsmState. (#66693)

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Mon Sep 18 20:12:25 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 31ebe98e481be15387fcff510212cc4c2662fc01
      https://github.com/llvm/llvm-project/commit/31ebe98e481be15387fcff510212cc4c2662fc01
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2023-09-18 (Mon, 18 Sep 2023)

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

  Log Message:
  -----------
  [mlir][c] Expose AsmState. (#66693)

Enable usage where capturing AsmState is good (e.g., avoiding creating AsmState over and over again when walking IR and printing).

This also only changes one C API to verify plumbing. But using the AsmState makes the cost more explicit than the flags interface (which hides the traversals and construction here) and also enables a more efficient usage C side.




More information about the All-commits mailing list