[Mlir-commits] [mlir] [MLIR] Introduce new C bindings to differentiate between discardable and inherent attributes (PR #66332)

Mehdi Amini llvmlistbot at llvm.org
Sat Sep 16 20:44:04 PDT 2023


================
@@ -552,25 +552,69 @@ MLIR_CAPI_EXPORTED intptr_t mlirOperationGetNumSuccessors(MlirOperation op);
 MLIR_CAPI_EXPORTED MlirBlock mlirOperationGetSuccessor(MlirOperation op,
                                                        intptr_t pos);
 
+/// Returns an inherent attribute attached to the operation given its name.
----------------
joker-eph wrote:

We could, I wasn't sure if it was useful for the C API, the alternative may be to add a `bool hasInherentAttr(name)` API that the use could check on top of this one to distinguish?

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


More information about the Mlir-commits mailing list