summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/EdgeBundles.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-05 21:50:24 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-01-05 21:50:24 +0000
commitf3ac7336848a3dfd09b624b07b2296f8afaa4f20 (patch)
treed3fc4d60fbb05bf050ef4b8629f36c9e91ad50ac /llvm/lib/CodeGen/EdgeBundles.cpp
parent88b4b2794c650a127fae2dd450fc537659c2de3d (diff)
downloadbcm5719-llvm-f3ac7336848a3dfd09b624b07b2296f8afaa4f20.tar.gz
bcm5719-llvm-f3ac7336848a3dfd09b624b07b2296f8afaa4f20.zip
Add a hidden command line option to display edge bundle graphs as they are
calculated. llvm-svn: 122912
Diffstat (limited to 'llvm/lib/CodeGen/EdgeBundles.cpp')
-rw-r--r--llvm/lib/CodeGen/EdgeBundles.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/EdgeBundles.cpp b/llvm/lib/CodeGen/EdgeBundles.cpp
index d7e73d160eb..aed8bc94799 100644
--- a/llvm/lib/CodeGen/EdgeBundles.cpp
+++ b/llvm/lib/CodeGen/EdgeBundles.cpp
@@ -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 @@ bool EdgeBundles::runOnMachineFunction(MachineFunction &mf) {
EC.join(OutE, 2 * (*SI)->getNumber());
}
EC.compress();
+ if (ViewEdgeBundles)
+ view();
return false;
}
OpenPOWER on IntegriCloud