27 cl::desc(
"Pop up a window to show edge bundle graphs"));
32 "Bundle Machine CFG Edges",
50bool EdgeBundlesWrapperLegacy::runOnMachineFunction(
MachineFunction &MF) {
57void EdgeBundles::init() {
61 for (
const auto &
MBB : *MF) {
65 EC.
join(OutE, 2 * Succ->getNumber());
75 for (
unsigned i = 0, e = MF->getNumBlockIDs(); i != e; ++i) {
78 Blocks[b0].push_back(i);
80 Blocks[b1].push_back(i);
94 for (
const auto &
MBB : *MF) {
121 return !PAC.preserved() && !PAC.preservedSet<
CFGAnalyses>() &&
static cl::opt< bool > ViewEdgeBundles("view-edge-bundles", cl::Hidden, cl::desc("Pop up a window to show edge bundle graphs"))
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
This templated class represents "all analyses that operate over <a particular IR unit>" (e....
API to communicate dependencies between analyses during invalidation.
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
Represents analyses that only rely on functions' control flow.
EdgeBundles run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
bool invalidate(MachineFunction &MF, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &Inv)
unsigned getBundle(unsigned N, bool Out) const
getBundle - Return the ingoing (Out = false) or outgoing (Out = true) bundle number for basic block N
unsigned getNumBundles() const
getNumBundles - Return the total number of bundles in the CFG.
void view() const
view - Visualize the annotated bipartite CFG with Graphviz.
void compress()
compress - Compress equivalence classes by numbering them 0 .
void clear()
clear - Clear all classes so that grow() will assign a unique class to every integer.
unsigned join(unsigned a, unsigned b)
Join the equivalence classes of a and b.
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...
iterator_range< succ_iterator > successors()
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
unsigned getNumBlockIDs() const
getNumBlockIDs - Return the number of MBB ID's allocated.
A set of analyses that are preserved following a run of a transformation pass.
PreservedAnalysisChecker getChecker() const
Build a checker for this PreservedAnalyses and the specified analysis type.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
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.
char & EdgeBundlesWrapperLegacyID
EdgeBundles analysis - Bundle machine CFG edges.
Printable printMBBReference(const MachineBasicBlock &MBB)
Prints a machine basic block reference.
A special type used by analysis passes to provide an address that identifies that particular analysis...