mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool>
This is to be consistent with StringSet and ultimately with the standard library's associative container insert function. This lead to updating SmallSet::insert to return pair<iterator, bool>, and then to update SmallPtrSet::insert to return pair<iterator, bool>, and then to update all the existing users of those functions... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222334 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -762,7 +762,7 @@ static bool isHighCostExpansion(const SCEV *S,
|
||||
Processed, SE);
|
||||
}
|
||||
|
||||
if (!Processed.insert(S))
|
||||
if (!Processed.insert(S).second)
|
||||
return false;
|
||||
|
||||
if (const SCEVAddExpr *Add = dyn_cast<SCEVAddExpr>(S)) {
|
||||
@@ -975,7 +975,7 @@ void Cost::RatePrimaryRegister(const SCEV *Reg,
|
||||
Lose();
|
||||
return;
|
||||
}
|
||||
if (Regs.insert(Reg)) {
|
||||
if (Regs.insert(Reg).second) {
|
||||
RateRegister(Reg, Regs, L, SE, DT);
|
||||
if (LoserRegs && isLoser())
|
||||
LoserRegs->insert(Reg);
|
||||
@@ -2802,7 +2802,7 @@ void LSRInstance::CollectChains() {
|
||||
User::op_iterator IVOpIter = findIVOperand(I->op_begin(), IVOpEnd, L, SE);
|
||||
while (IVOpIter != IVOpEnd) {
|
||||
Instruction *IVOpInst = cast<Instruction>(*IVOpIter);
|
||||
if (UniqueOperands.insert(IVOpInst))
|
||||
if (UniqueOperands.insert(IVOpInst).second)
|
||||
ChainInstruction(I, IVOpInst, ChainUsersVec);
|
||||
IVOpIter = findIVOperand(std::next(IVOpIter), IVOpEnd, L, SE);
|
||||
}
|
||||
@@ -3122,7 +3122,7 @@ LSRInstance::CollectLoopInvariantFixupsAndFormulae() {
|
||||
const SCEV *S = Worklist.pop_back_val();
|
||||
|
||||
// Don't process the same SCEV twice
|
||||
if (!Visited.insert(S))
|
||||
if (!Visited.insert(S).second)
|
||||
continue;
|
||||
|
||||
if (const SCEVNAryExpr *N = dyn_cast<SCEVNAryExpr>(S))
|
||||
@@ -3774,7 +3774,7 @@ void LSRInstance::GenerateCrossUseConstantOffsets() {
|
||||
for (int LUIdx = UsedByIndices.find_first(); LUIdx != -1;
|
||||
LUIdx = UsedByIndices.find_next(LUIdx))
|
||||
// Make a memo of this use, offset, and register tuple.
|
||||
if (UniqueItems.insert(std::make_pair(LUIdx, Imm)))
|
||||
if (UniqueItems.insert(std::make_pair(LUIdx, Imm)).second)
|
||||
WorkItems.push_back(WorkItem(LUIdx, Imm, OrigReg));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user