mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 16:45:03 +00:00
LSR: Move set instead of copying. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229871 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4dad5f2731
commit
c69bd70cd1
@ -1327,11 +1327,9 @@ void LSRUse::DeleteFormula(Formula &F) {
|
||||
/// RecomputeRegs - Recompute the Regs field, and update RegUses.
|
||||
void LSRUse::RecomputeRegs(size_t LUIdx, RegUseTracker &RegUses) {
|
||||
// Now that we've filtered out some formulae, recompute the Regs set.
|
||||
SmallPtrSet<const SCEV *, 4> OldRegs = Regs;
|
||||
SmallPtrSet<const SCEV *, 4> OldRegs = std::move(Regs);
|
||||
Regs.clear();
|
||||
for (SmallVectorImpl<Formula>::const_iterator I = Formulae.begin(),
|
||||
E = Formulae.end(); I != E; ++I) {
|
||||
const Formula &F = *I;
|
||||
for (const Formula &F : Formulae) {
|
||||
if (F.ScaledReg) Regs.insert(F.ScaledReg);
|
||||
Regs.insert(F.BaseRegs.begin(), F.BaseRegs.end());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user