[llvm-commits] [llvm] r122912 - /llvm/trunk/lib/CodeGen/EdgeBundles.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jan 5 13:50:24 PST 2011


Author: stoklund
Date: Wed Jan  5 15:50:24 2011
New Revision: 122912

URL: http://llvm.org/viewvc/llvm-project?rev=122912&view=rev
Log:
Add a hidden command line option to display edge bundle graphs as they are
calculated.

Modified:
    llvm/trunk/lib/CodeGen/EdgeBundles.cpp

Modified: llvm/trunk/lib/CodeGen/EdgeBundles.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/EdgeBundles.cpp?rev=122912&r1=122911&r2=122912&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/EdgeBundles.cpp (original)
+++ llvm/trunk/lib/CodeGen/EdgeBundles.cpp Wed Jan  5 15:50:24 2011
@@ -15,10 +15,15 @@
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/Passes.h"
+#include "llvm/Support/CommandLine.h"
 #include "llvm/Support/GraphWriter.h"
 
 using namespace llvm;
 
+static cl::opt<bool>
+ViewEdgeBundles("view-edge-bundles", cl::Hidden,
+                cl::desc("Pop up a window to show edge bundle graphs"));
+
 char EdgeBundles::ID = 0;
 
 INITIALIZE_PASS(EdgeBundles, "edge-bundles", "Bundle Machine CFG Edges",
@@ -46,6 +51,8 @@
       EC.join(OutE, 2 * (*SI)->getNumber());
   }
   EC.compress();
+  if (ViewEdgeBundles)
+    view();
   return false;
 }
 





More information about the llvm-commits mailing list