diff options
author | Sean Silva <silvasean@google.com> | 2020-11-12 17:08:56 -0800 |
---|---|---|
committer | Sean Silva <silvasean@google.com> | 2020-11-24 13:53:22 -0800 |
commit | dfbb5a087e20ea1c14300eef600e52360320b390 (patch) | |
tree | 4077cf873691f57990ea519542f969969d3dba68 /llvm/lib/CodeGen/CommandFlags.cpp | |
parent | b228e2bd92a7959b6a48ac208871ad0cb5c09ebf (diff) | |
download | llvm-dfbb5a087e20ea1c14300eef600e52360320b390.zip llvm-dfbb5a087e20ea1c14300eef600e52360320b390.tar.gz llvm-dfbb5a087e20ea1c14300eef600e52360320b390.tar.bz2 |
[mlir] Remove SameOperandsAndResultShape when redundant with ElementwiseMappable
SameOperandsAndResultShape and ElementwiseMappable have similar
verification, but in general neither is strictly redundant with the
other.
Examples:
- SameOperandsAndResultShape allows
`"foo"(%0) : tensor<2xf32> -> tensor<?xf32> but ElementwiseMappable
does not.
- ElementwiseMappable allows
`select %scalar_pred, %true_tensor, %false_tensor` but
SameOperandsAndResultShape does not.
SameOperandsAndResultShape is redundant with ElementwiseMappable when
we can prove that the mixed scalar/non-scalar case cannot happen. In
those situations, `ElementwiseMappable & SameOperandsAndResultShape ==
ElementwiseMappable`:
- Ops with 1 operand: the case of mixed scalar and non-scalar operands
cannot happen since there is only one operand.
- When SameTypeOperands is also present, the mixed scalar/non-scalar
operand case cannot happen.
Differential Revision: https://reviews.llvm.org/D91396
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
0 files changed, 0 insertions, 0 deletions