[all-commits] [llvm/llvm-project] a03911: [mlir] Move the Operation OperandStorage to the fi...

River Riddle via All-commits all-commits at lists.llvm.org
Wed Nov 3 11:34:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0391134462a7a41ab781065322b4caa50eb59d2
      https://github.com/llvm/llvm-project/commit/a0391134462a7a41ab781065322b4caa50eb59d2
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2021-11-03 (Wed, 03 Nov 2021)

  Changed paths:
    M mlir/include/mlir/IR/Operation.h
    M mlir/include/mlir/IR/OperationSupport.h
    M mlir/lib/IR/Operation.cpp
    M mlir/lib/IR/OperationSupport.cpp

  Log Message:
  -----------
  [mlir] Move the Operation OperandStorage to the first trailing object

The main benefits of this change are faster access to operands
(no need to compute the offset, as it is now right after the
operation), simpler code(no need to manage a lot of the "is the
operand storage trailing" logic we had to before). The major
downside to this though, is that operand holding operations now
grow in size by 1 word (as no matter how we do this change, there
will need to be some additional book keeping).

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




More information about the All-commits mailing list