File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 17
17
typedef std::string ministring;
18
18
#endif
19
19
20
- template <class T , class U > bool contains (const T& container, const U& contained) {
21
- return container.find (contained) != container. end ( );
20
+ template <class T , class U > static bool contains (const T& container, const U& contained) {
21
+ return container.count (contained);
22
22
}
23
23
24
24
#if DEBUG
@@ -650,7 +650,7 @@ void Relooper::Calculate(Block *Entry) {
650
650
Block *Curr = *iter;
651
651
for (BlockBranchMap::iterator iter = Curr->BranchesOut.begin(); iter != Curr->BranchesOut.end(); iter++) {
652
652
Block *Target = iter->first;
653
- if (Hoisted.find( Target) == Hoisted.end() && NextEntries.find( Target) == NextEntries.end()) {
653
+ if (!contains(Hoisted, Target) && !contains(NextEntries, Target))
654
654
// abort this hoisting
655
655
abort = true;
656
656
break;
You can’t perform that action at this time.
0 commit comments