diff options
author | Andrew Trick <atrick@apple.com> | 2012-04-10 03:12:29 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-04-10 03:12:29 +0000 |
commit | c72e08b4a95e494d3bfdf1262ea8b28f614ac40e (patch) | |
tree | fcb1394807764047f66774b18df59f2619392a43 /utils/TableGen/CodeGenRegisters.cpp | |
parent | decb37eb2b56643cd3d1ebf1af2b7a9c04e1b2f2 (diff) |
Use std::includes instead of my own implementation.
Jakob's review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154377 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenRegisters.cpp')
-rw-r--r-- | utils/TableGen/CodeGenRegisters.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/utils/TableGen/CodeGenRegisters.cpp b/utils/TableGen/CodeGenRegisters.cpp index fc5c78019c..bd1eefe36f 100644 --- a/utils/TableGen/CodeGenRegisters.cpp +++ b/utils/TableGen/CodeGenRegisters.cpp @@ -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. |