[PATCH] D78876: [mlir] Don't allocate an operand storage if the operation is known to never have operands

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 26 19:07:06 PDT 2020


mehdi_amini accepted this revision.
mehdi_amini added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/IR/Operation.cpp:113
+    if (const AbstractOperation *abstractOp = name.getAbstractOperation())
+      needsOperandStorage = !abstractOp->hasTrait<OpTrait::ZeroOperands>();
+  }
----------------
Nice!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78876/new/

https://reviews.llvm.org/D78876





More information about the llvm-commits mailing list