[llvm] [EdgeBundle] Correct edge bundle label name in output graph. NFC. (PR #106661)

Kai Luo via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 21:34:42 PDT 2024


https://github.com/bzEq updated https://github.com/llvm/llvm-project/pull/106661

>From 2e56297d91a2c259ac89f84b52f14d2efa5b35d5 Mon Sep 17 00:00:00 2001
From: Kai Luo <lkail at cn.ibm.com>
Date: Fri, 30 Aug 2024 12:21:51 +0800
Subject: [PATCH 1/2] Correct edge bundle label name

---
 llvm/lib/CodeGen/EdgeBundles.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/EdgeBundles.cpp b/llvm/lib/CodeGen/EdgeBundles.cpp
index 3dd354e8ab7e80..f79110c579c870 100644
--- a/llvm/lib/CodeGen/EdgeBundles.cpp
+++ b/llvm/lib/CodeGen/EdgeBundles.cpp
@@ -80,7 +80,8 @@ raw_ostream &WriteGraph<>(raw_ostream &O, const EdgeBundles &G,
   O << "digraph {\n";
   for (const auto &MBB : *MF) {
     unsigned BB = MBB.getNumber();
-    O << "\t\"" << printMBBReference(MBB) << "\" [ shape=box ]\n"
+    O << "\t\"" << printMBBReference(MBB) << "\" [ shape=box, label = \""
+      << printMBBReference(MBB) << "\"" << " ]\n"
       << '\t' << G.getBundle(BB, false) << " -> \"" << printMBBReference(MBB)
       << "\"\n"
       << "\t\"" << printMBBReference(MBB) << "\" -> " << G.getBundle(BB, true)

>From 07de87629e104f12d4415738f7236a711eb9efb4 Mon Sep 17 00:00:00 2001
From: Kai Luo <lkail at cn.ibm.com>
Date: Fri, 30 Aug 2024 12:34:28 +0800
Subject: [PATCH 2/2] Remove spaces

---
 llvm/lib/CodeGen/EdgeBundles.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/EdgeBundles.cpp b/llvm/lib/CodeGen/EdgeBundles.cpp
index f79110c579c870..1f83dfff643cee 100644
--- a/llvm/lib/CodeGen/EdgeBundles.cpp
+++ b/llvm/lib/CodeGen/EdgeBundles.cpp
@@ -80,7 +80,7 @@ raw_ostream &WriteGraph<>(raw_ostream &O, const EdgeBundles &G,
   O << "digraph {\n";
   for (const auto &MBB : *MF) {
     unsigned BB = MBB.getNumber();
-    O << "\t\"" << printMBBReference(MBB) << "\" [ shape=box, label = \""
+    O << "\t\"" << printMBBReference(MBB) << "\" [ shape=box, label=\""
       << printMBBReference(MBB) << "\"" << " ]\n"
       << '\t' << G.getBundle(BB, false) << " -> \"" << printMBBReference(MBB)
       << "\"\n"



More information about the llvm-commits mailing list