[Mlir-commits] [mlir] [mlir][mesh] Better Op result names (PR #82408)
Mehdi Amini
llvmlistbot at llvm.org
Tue Feb 20 12:03:39 PST 2024
================
@@ -180,6 +182,20 @@ Type mesh::shardType(Type type, MeshOp mesh, MeshShardingAttr sharding) {
return type;
}
+// static void getAsmMultiResultNames(Operation* op, StringRef namePrefix,
+// function_ref<void(Value, StringRef)> setNameFn) {
+// if (op->getNumResults() == 1) {
+// setNameFn(op->getResult(0), namePrefix);
+// return;
+// }
+// SmallString<64> str;
+// for (auto [i, result]: llvm::enumerate(op->getResults())) {
+// (Twine(namePrefix) + "_" + Twine(i) + "_").toStringRef(str);
+// setNameFn(result, str);
+// str.clear();
+// }
+// }
+
----------------
joker-eph wrote:
Remove?
https://github.com/llvm/llvm-project/pull/82408
More information about the Mlir-commits
mailing list