[Mlir-commits] [mlir] [mlir][gpu] Clean up prints in GPU dialect. NFC. (PR #136250)
Ivan Butygin
llvmlistbot at llvm.org
Fri Apr 18 04:48:32 PDT 2025
================
@@ -479,10 +481,11 @@ static void printAttributions(OpAsmPrinter &p, StringRef keyword,
if (values.empty())
return;
- p << ' ' << keyword << '(';
- llvm::interleaveComma(
- values, p, [&p](BlockArgument v) { p << v << " : " << v.getType(); });
- p << ')';
+ auto printBlockArg = [](BlockArgument v) {
+ return llvm::formatv("{} : {}", v, v.getType());
----------------
Hardcode84 wrote:
This code is technically more expensive as `llvm::formatv` allocates a temp string, but I don't think it matters for printers much.
https://github.com/llvm/llvm-project/pull/136250
More information about the Mlir-commits
mailing list