26 cl::desc(
"Pop up a window to show edge bundle graphs"));
45 for (
const auto &
MBB : *MF) {
50 EC.
join(OutE, 2 * (*SI)->getNumber());
60 for (
unsigned i = 0, e = MF->getNumBlockIDs();
i != e; ++
i) {
63 Blocks[b0].push_back(
i);
65 Blocks[b1].push_back(
i);
81 for (
const auto &
MBB : *MF) {
83 O <<
"\t\"BB#" << BB <<
"\" [ shape=box ]\n"
84 <<
'\t' <<
G.getBundle(BB,
false) <<
" -> \"BB#" << BB <<
"\"\n"
85 <<
"\t\"BB#" << BB <<
"\" -> " <<
G.getBundle(BB,
true) <<
'\n';
88 O <<
"\t\"BB#" << BB <<
"\" -> \"BB#" << (*SI)->getNumber()
89 <<
"\" [ color=lightgray ]\n";
void grow(unsigned N)
grow - Increase capacity to hold 0 .
int getNumber() const
MachineBasicBlocks are uniquely numbered at the function level, unless they're not in a MachineFuncti...
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.
succ_iterator succ_begin()
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
unsigned join(unsigned a, unsigned b)
Join the equivalence classes of a and b.
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...