[PATCH] D78875: [mlir] Optimize operand storage such that all operations can have resizable operand lists

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 26 02:38:56 PDT 2020


rriddle created this revision.
rriddle added a reviewer: mehdi_amini.
Herald added subscribers: llvm-commits, Kayjukh, frgossen, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, jpienaar.
Herald added a reviewer: nicolasvasilache.
Herald added a reviewer: antiagainst.
Herald added a reviewer: aartbik.
Herald added a project: LLVM.
rriddle updated this revision to Diff 260154.
rriddle added a comment.
rriddle added a child revision: D78876: [mlir] Don't allocate an operand storage if the operation is known to never have operands.

Fix a few typos


This revision refactors the structure of the operand storage such that there is no additional memory cost for resizable operand lists until it is required. This is done by using two different internal representations for the operand storage:

- One using trailing operands
- One using a dynamically allocated std::vector<OpOperand>

This allows for removing the resizable operand list bit, and will free up APIs from needing to workaround non-resizable operand lists.

Depends On D78854 <https://reviews.llvm.org/D78854>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78875

Files:
  mlir/include/mlir/Dialect/Affine/IR/AffineOps.td
  mlir/include/mlir/IR/OpBase.td
  mlir/include/mlir/IR/Operation.h
  mlir/include/mlir/IR/OperationSupport.h
  mlir/include/mlir/IR/UseDefLists.h
  mlir/include/mlir/TableGen/Operator.h
  mlir/lib/Dialect/Affine/IR/AffineOps.cpp
  mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
  mlir/lib/IR/Operation.cpp
  mlir/lib/IR/OperationSupport.cpp
  mlir/lib/Parser/Parser.cpp
  mlir/lib/TableGen/Operator.cpp
  mlir/lib/Transforms/Utils/Utils.cpp
  mlir/test/mlir-tblgen/op-operand.td
  mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
  mlir/tools/mlir-tblgen/OpFormatGen.cpp
  mlir/unittests/IR/OperationSupportTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78875.260154.patch
Type: text/x-patch
Size: 35943 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200426/8590de46/attachment.bin>


More information about the llvm-commits mailing list