Add a hidden command line option to display edge bundle graphs as they are

calculated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122912 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2011-01-05 21:50:24 +00:00
parent 7008f1e9ab
commit 6b705d4825

View File

@ -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;
}