25 cl::desc(
"Pop up a window to show edge bundle graphs"));
44 for (
const auto &MBB : *MF) {
45 unsigned OutE = 2 * MBB.getNumber() + 1;
48 SE = MBB.succ_end();
SI != SE; ++
SI)
49 EC.
join(OutE, 2 * (*SI)->getNumber());
59 for (
unsigned i = 0, e = MF->getNumBlockIDs(); i != e; ++i) {
62 Blocks[b0].push_back(i);
64 Blocks[b1].push_back(i);
79 for (
const auto &MBB : *MF) {
80 unsigned BB = MBB.getNumber();
81 O <<
"\t\"BB#" << BB <<
"\" [ shape=box ]\n"
82 <<
'\t' <<
G.getBundle(BB,
false) <<
" -> \"BB#" << BB <<
"\"\n"
83 <<
"\t\"BB#" << BB <<
"\" -> " <<
G.getBundle(BB,
true) <<
'\n';
85 SE = MBB.succ_end();
SI != SE; ++
SI)
86 O <<
"\t\"BB#" << BB <<
"\" -> \"BB#" << (*SI)->getNumber()
87 <<
"\" [ color=lightgray ]\n";
void grow(unsigned N)
grow - Increase capacity to hold 0 .
void compress()
compress - Compress equivalence classes by numbering them 0 .
void view() const
view - Visualize the annotated bipartite CFG with Graphviz.
void clear()
clear - Clear all classes so that grow() will assign a unique class to every integer.
unsigned getNumBlockIDs() const
getNumBlockIDs - Return the number of MBB ID's allocated.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
unsigned getNumBundles() const
getNumBundles - Return the total number of bundles in the CFG.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
void ViewGraph(const GraphType &G, const Twine &Name, bool ShortNames=false, const Twine &Title="", GraphProgram::Name Program=GraphProgram::DOT)
ViewGraph - Emit a dot graph, run 'dot', run gv on the postscript file, then cleanup.
void join(unsigned a, unsigned b)
join - Join the equivalence classes of a and b.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
static cl::opt< bool > ViewEdgeBundles("view-edge-bundles", cl::Hidden, cl::desc("Pop up a window to show edge bundle graphs"))
unsigned getBundle(unsigned N, bool Out) const
getBundle - Return the ingoing (Out = false) or outgoing (Out = true) bundle number for basic block N...
char & EdgeBundlesID
EdgeBundles analysis - Bundle machine CFG edges.
std::vector< MachineBasicBlock * >::const_iterator const_succ_iterator
This class implements an extremely fast bulk output stream that can only output to a stream...