[mlir][irdl] Add `irdl.any_of` operation
The `irdl.any_of` operation represent a constraint that is satisfied if any of its subconstraint is satisfied. For instance, in the following example: ``` %0 = irdl.is f32 %1 = irdl.is f64 %2 = irdl.any_of(f32, f64) ``` `%2` can only be satisfied by `f32` or `f64`. Note that the verification algorithm required by `irdl.any_of` is non-trivial, since we want that the order of arguments of `irdl.any_of` to not matter. For this reason, our registration algorithm fails if two constraints used by `any_of` might be satisfied by the same `Attribute`. This is approximated by checking the possible `Attribute` bases of each constraints. Depends on D145734 Reviewed By: Mogball Differential Revision: https://reviews.llvm.org/D145735
Loading
Please sign in to comment