[Mlir-commits] [mlir] [mlir][gpu] Clean up repeated spaces in op syntax. NFC. (PR #89249)

Maksim Levental llvmlistbot at llvm.org
Thu Apr 18 09:52:23 PDT 2024


================
@@ -55,7 +55,7 @@ class GPU_IndexOp<string mnemonic, list<Trait> traits = []> :
         DeclareOpInterfaceMethods<InferIntRangeInterface>,
         DeclareOpInterfaceMethods<OpAsmOpInterface, ["getAsmResultNames"]>])>,
     Arguments<(ins GPU_DimensionAttr:$dimension)>, Results<(outs Index)> {
-  let assemblyFormat = "$dimension attr-dict";
+  let assemblyFormat = "`` $dimension attr-dict";
----------------
makslevental wrote:

I suspect this conditional is the problem

https://github.com/llvm/llvm-project/blob/5b95c9e0cad189cc609c31029f6bc3a89bc7b612/mlir/tools/mlir-tblgen/OpFormatGen.cpp#L2379-L2382

either it should be `(shouldEmitSpace && !lastWasPunctuation)` or just `if (shouldEmitSpace)` (at least if we take the comment at face value).

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


More information about the Mlir-commits mailing list