[Mlir-commits] [mlir] [mlir-tblgen] Relax builder ambiguity check (PR #118310)

Jakub Kuderski llvmlistbot at llvm.org
Mon Dec 2 09:27:10 PST 2024


================
@@ -3088,6 +3088,26 @@ void OpEmitter::buildParamList(SmallVectorImpl<MethodParameter> &paramList,
       defaultValuedAttrStartIndex = i;
     }
   }
+
+  // Check if parameters besides default valued one are enough to distinguish
+  // between builders with wrapped and unwrapped arguments.
+  bool hasBuilderAmbiguity = true;
+  for (int i = 0; i < op.getNumArgs(); ++i) {
----------------
kuhar wrote:

nit: don't recompute the end after every iteration: https://llvm.org/docs/CodingStandards.html#don-t-evaluate-end-every-time-through-a-loop

You could probably also turn this into a range for loop

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


More information about the Mlir-commits mailing list