Use std::includes instead of my own implementation.

Jakob's review.

llvm-svn: 154377
This commit is contained in:
Andrew Trick 2012-04-10 03:12:29 +00:00
parent 9e92090b3c
commit 9002c3157f
1 changed files with 2 additions and 9 deletions

View File

@ -1135,15 +1135,8 @@ findRegUnitSet(const std::vector<RegUnitSet> &UniqueSets,
// Return true if the RUSubSet is a subset of RUSuperSet.
static bool isRegUnitSubSet(const std::vector<unsigned> &RUSubSet,
const std::vector<unsigned> &RUSuperSet) {
for (RegUnitSet::iterator SubIdx = RUSubSet.begin(), EndIdx = RUSubSet.end(),
SearchIdx = RUSuperSet.begin(), SearchEnd = RUSuperSet.end();
SubIdx != EndIdx; ++SubIdx) {
SearchIdx = find(SearchIdx, SearchEnd, *SubIdx);
if (SearchIdx == SearchEnd)
return false;
++SearchIdx;
}
return true;
return std::includes(RUSuperSet.begin(), RUSuperSet.end(),
RUSubSet.begin(), RUSubSet.end());
}
// Iteratively prune unit sets.