We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5046a7 commit 595d8d4Copy full SHA for 595d8d4
llvm/utils/TableGen/CodeGenRegisters.cpp
@@ -1898,13 +1898,8 @@ void CodeGenRegBank::computeRegUnitWeights() {
1898
static std::vector<RegUnitSet>::const_iterator
1899
findRegUnitSet(const std::vector<RegUnitSet> &UniqueSets,
1900
const RegUnitSet &Set) {
1901
- std::vector<RegUnitSet>::const_iterator I = UniqueSets.begin(),
1902
- E = UniqueSets.end();
1903
- for (; I != E; ++I) {
1904
- if (I->Units == Set.Units)
1905
- break;
1906
- }
1907
- return I;
+ return find_if(UniqueSets,
+ [&Set](const RegUnitSet &I) { return I.Units == Set.Units; });
1908
}
1909
1910
// Return true if the RUSubSet is a subset of RUSuperSet.
0 commit comments