[Mlir-commits] [mlir] [mlir][ODS] Allow parameters on side-effect resources (PR #213792)

Mehdi Amini llvmlistbot at llvm.org
Wed Aug 19 02:46:05 PDT 2026


================
@@ -22,9 +22,12 @@ include "mlir/IR/OpBase.td"
 //===----------------------------------------------------------------------===//
 
 // A generic resource that can be attached to a general base side effect.
-class Resource<string resourceName> {
+class Resource<string resourceName, code resourceParameters = [{}]> {
   /// The resource that the associated effect is being applied to.
   string name = resourceName;
+
+  /// The optional effect parameters attribute.
+  code parameters = resourceParameters;
----------------
joker-eph wrote:

I find it confusing why this is part of the resource and not just some annotation on the effect itself? 

You're passing here arbitrary "code" but it'll be set for a given resource? 

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


More information about the Mlir-commits mailing list