[all-commits] [llvm/llvm-project] c53816: [mlir] Add insert before/after to list-like constr...

ftynse via All-commits all-commits at lists.llvm.org
Wed Sep 23 08:29:52 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c538169ee99516c178ecc00a5ec5187d78941fac
      https://github.com/llvm/llvm-project/commit/c538169ee99516c178ecc00a5ec5187d78941fac
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-09-23 (Wed, 23 Sep 2020)

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

  Log Message:
  -----------
  [mlir] Add insert before/after to list-like constructs in C API

Blocks in a region and operations in a block are organized in a linked list.
The C API only provides functions to append or to insert elements at the
specified numeric position in the list. The latter is expensive since it
requires to traverse the list. Add insert before/after functionality with low
cost that relies on the iplist elements being convertible to iterators.

Reviewed By: stellaraccident

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




More information about the All-commits mailing list