@@ -45,84 +45,6 @@ class DFCalculateWorkObject {
45
45
const DomTreeNodeT *parentNode;
46
46
};
47
47
48
- template <class BlockT , bool IsPostDom>
49
- void DominanceFrontierBase<BlockT, IsPostDom>::removeBlock(BlockT *BB) {
50
- assert (find (BB) != end () && " Block is not in DominanceFrontier!" );
51
- for (iterator I = begin (), E = end (); I != E; ++I)
52
- I->second .remove (BB);
53
- Frontiers.erase (BB);
54
- }
55
-
56
- template <class BlockT , bool IsPostDom>
57
- void DominanceFrontierBase<BlockT, IsPostDom>::addToFrontier(iterator I,
58
- BlockT *Node) {
59
- assert (I != end () && " BB is not in DominanceFrontier!" );
60
- I->second .insert (Node);
61
- }
62
-
63
- template <class BlockT , bool IsPostDom>
64
- void DominanceFrontierBase<BlockT, IsPostDom>::removeFromFrontier(
65
- iterator I, BlockT *Node) {
66
- assert (I != end () && " BB is not in DominanceFrontier!" );
67
- assert (I->second .count (Node) && " Node is not in DominanceFrontier of BB" );
68
- I->second .remove (Node);
69
- }
70
-
71
- template <class BlockT , bool IsPostDom>
72
- bool DominanceFrontierBase<BlockT, IsPostDom>::compareDomSet(
73
- DomSetType &DS1, const DomSetType &DS2) const {
74
- std::set<BlockT *> tmpSet;
75
- for (BlockT *BB : DS2)
76
- tmpSet.insert (BB);
77
-
78
- for (typename DomSetType::const_iterator I = DS1.begin (), E = DS1.end ();
79
- I != E;) {
80
- BlockT *Node = *I++;
81
-
82
- if (tmpSet.erase (Node) == 0 )
83
- // Node is in DS1 but tnot in DS2.
84
- return true ;
85
- }
86
-
87
- if (!tmpSet.empty ()) {
88
- // There are nodes that are in DS2 but not in DS1.
89
- return true ;
90
- }
91
-
92
- // DS1 and DS2 matches.
93
- return false ;
94
- }
95
-
96
- template <class BlockT , bool IsPostDom>
97
- bool DominanceFrontierBase<BlockT, IsPostDom>::compare(
98
- DominanceFrontierBase<BlockT, IsPostDom> &Other) const {
99
- DomSetMapType tmpFrontiers;
100
- for (typename DomSetMapType::const_iterator I = Other.begin (),
101
- E = Other.end ();
102
- I != E; ++I)
103
- tmpFrontiers.insert (std::make_pair (I->first , I->second ));
104
-
105
- for (typename DomSetMapType::iterator I = tmpFrontiers.begin (),
106
- E = tmpFrontiers.end ();
107
- I != E;) {
108
- BlockT *Node = I->first ;
109
- const_iterator DFI = find (Node);
110
- if (DFI == end ())
111
- return true ;
112
-
113
- if (compareDomSet (I->second , DFI->second ))
114
- return true ;
115
-
116
- ++I;
117
- tmpFrontiers.erase (Node);
118
- }
119
-
120
- if (!tmpFrontiers.empty ())
121
- return true ;
122
-
123
- return false ;
124
- }
125
-
126
48
template <class BlockT , bool IsPostDom>
127
49
void DominanceFrontierBase<BlockT, IsPostDom>::print(raw_ostream &OS) const {
128
50
for (const_iterator I = begin (), E = end (); I != E; ++I) {
0 commit comments