[PATCH] D72559: [mlir] Add trait for staging update of broadcastable trait

Jacques Pienaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 11 10:08:59 PST 2020


jpienaar created this revision.
jpienaar added a reviewer: antiagainst.
Herald added subscribers: llvm-commits, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, burmako, rriddle, mehdi_amini.
Herald added a project: LLVM.

Broadcastable trait in ODS does not merely imply the operands and
results are broadcast compatible, it also implies that the element type
of the operands and results are the same. Add a new trait,
BroadcastableWithSameElementType, that covers that and alias the
previous uses to it (staging this to decouple updating the user
callsites). This composite trait should, post removal, then be
decomposed again.

Doing some intermediate work to have getBroadcastedType take an optional
elementType as input and use that if specified, instead of the common element
type of type1 and type2 in this function.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72559

Files:
  mlir/include/mlir/Dialect/Traits.h
  mlir/include/mlir/IR/OpBase.td
  mlir/lib/Dialect/Traits.cpp
  mlir/test/lib/TestDialect/TestOps.td
  mlir/tools/mlir-tblgen/RewriterGen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72559.237512.patch
Type: text/x-patch
Size: 7800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200111/fc75569d/attachment.bin>


More information about the llvm-commits mailing list