[all-commits] [llvm/llvm-project] 4d0d29: [mlir][python] Allow specifying block arg locations

rk via All-commits all-commits at lists.llvm.org
Tue May 9 09:40:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4d0d295b618edfc937d5bf247f0853df5c70cb96
      https://github.com/llvm/llvm-project/commit/4d0d295b618edfc937d5bf247f0853df5c70cb96
  Author: Rahul Kayaith <rkayaith at gmail.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/python/mlir/dialects/_func_ops_ext.py
    M mlir/test/python/ir/blocks.py

  Log Message:
  -----------
  [mlir][python] Allow specifying block arg locations

Currently blocks are always created with UnknownLoc's for their arguments. This
adds an `arg_locs` argument to all block creation APIs, which takes an optional
sequence of locations to use, one per block argument. If no locations are
supplied, the current Location context is used.

Reviewed By: ftynse

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




More information about the All-commits mailing list