[all-commits] [llvm/llvm-project] bdc318: [mlir][python] Implement more SymbolTable methods.

Stella Laurenzo via All-commits all-commits at lists.llvm.org
Mon Nov 29 20:32:41 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bdc3183742f1e996d58bdf23b91966e64ad5e9a3
  Author: Stella Laurenzo <stellaraccident at gmail.com>
  Date:   2021-11-29 (Mon, 29 Nov 2021)

  Changed paths:
    M mlir/include/mlir-c/IR.h
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/lib/Bindings/Python/IRModule.h
    M mlir/lib/CAPI/IR/IR.cpp
    M mlir/python/mlir/_mlir_libs/_mlir/ir.pyi
    M mlir/test/python/ir/operation.py
    A mlir/test/python/ir/symbol_table.py

  Log Message:
  [mlir][python] Implement more SymbolTable methods.

* set_symbol_name, get_symbol_name, set_visibility, get_visibility, replace_all_symbol_uses, walk_symbol_tables
* In integrations I've been doing, I've been reaching for all of these to do both general IR manipulation and module merging.
* I don't love the replace_all_symbol_uses underlying APIs since they necessitate SYMBOL_COUNT walks and have various sharp edges. I'm hoping that whatever emerges eventually for this can still retain this simple API as a one-shot.

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

More information about the All-commits mailing list