[Mlir-commits] [mlir] [MLIR][ODS] Allow operations to specify interfaces using the `HasParent` trait constraint (PR #66196)

Morten Borup Petersen llvmlistbot at llvm.org
Mon Sep 18 23:34:34 PDT 2023


mortbopet wrote:

> WDYT about adding a new trait called hasInterfaceParent?

Sure, whatever can accomplish this pattern. The original idea of folding this into the `HasParent` trait was to allow for situations where an operation requires _either_ a specific operation or a specific interface as a parent. But in reality, i don't think this is a realistic situation - if an op needs an interface, then that seems like a pretty explicit requirement that isn't to be mixed with other ops.

https://github.com/llvm/llvm-project/pull/66196


More information about the Mlir-commits mailing list