mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Prefer SmallVector::append/insert over push_back loops.
Same functionality, but hoists the vector growth out of the loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -545,8 +545,7 @@ void RegAllocPBQP::initializeGraph(PBQPRAGraph &G, VirtRegMap &VRM,
|
||||
if (VRegAllowed.empty()) {
|
||||
SmallVector<unsigned, 8> NewVRegs;
|
||||
spillVReg(VReg, NewVRegs, MF, LIS, VRM, VRegSpiller);
|
||||
for (auto NewVReg : NewVRegs)
|
||||
Worklist.push_back(NewVReg);
|
||||
Worklist.insert(Worklist.end(), NewVRegs.begin(), NewVRegs.end());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user