Deleted Added
full compact
EdgeBundles.cpp (218893) EdgeBundles.cpp (221345)
1//===-------- EdgeBundles.cpp - Bundles of CFG edges ----------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 39 unchanged lines hidden (view full) ---

48 // Join the outgoing bundle with the ingoing bundles of all successors.
49 for (MachineBasicBlock::const_succ_iterator SI = MBB.succ_begin(),
50 SE = MBB.succ_end(); SI != SE; ++SI)
51 EC.join(OutE, 2 * (*SI)->getNumber());
52 }
53 EC.compress();
54 if (ViewEdgeBundles)
55 view();
1//===-------- EdgeBundles.cpp - Bundles of CFG edges ----------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 39 unchanged lines hidden (view full) ---

48 // Join the outgoing bundle with the ingoing bundles of all successors.
49 for (MachineBasicBlock::const_succ_iterator SI = MBB.succ_begin(),
50 SE = MBB.succ_end(); SI != SE; ++SI)
51 EC.join(OutE, 2 * (*SI)->getNumber());
52 }
53 EC.compress();
54 if (ViewEdgeBundles)
55 view();
56
57 // Compute the reverse mapping.
58 Blocks.clear();
59 Blocks.resize(getNumBundles());
60
61 for (unsigned i = 0, e = MF->getNumBlockIDs(); i != e; ++i) {
62 unsigned b0 = getBundle(i, 0);
63 unsigned b1 = getBundle(i, 1);
64 Blocks[b0].push_back(i);
65 if (b1 != b0)
66 Blocks[b1].push_back(i);
67 }
68
56 return false;
57}
58
59/// view - Visualize the annotated bipartite CFG with Graphviz.
60void EdgeBundles::view() const {
61 ViewGraph(*this, "EdgeBundles");
62}
63

--- 13 unchanged lines hidden (view full) ---

77 for (MachineBasicBlock::const_succ_iterator SI = I->succ_begin(),
78 SE = I->succ_end(); SI != SE; ++SI)
79 O << "\t\"BB#" << BB << "\" -> \"BB#" << (*SI)->getNumber()
80 << "\" [ color=lightgray ]\n";
81 }
82 O << "}\n";
83 return O;
84}
69 return false;
70}
71
72/// view - Visualize the annotated bipartite CFG with Graphviz.
73void EdgeBundles::view() const {
74 ViewGraph(*this, "EdgeBundles");
75}
76

--- 13 unchanged lines hidden (view full) ---

90 for (MachineBasicBlock::const_succ_iterator SI = I->succ_begin(),
91 SE = I->succ_end(); SI != SE; ++SI)
92 O << "\t\"BB#" << BB << "\" -> \"BB#" << (*SI)->getNumber()
93 << "\" [ color=lightgray ]\n";
94 }
95 O << "}\n";
96 return O;
97}
85
86