Skip to content

Commit 35d5c37

Browse files
committed
Greedy: Use initializer list for recoloring candidates (NFC)
1 parent b049f4a commit 35d5c37

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/lib/CodeGen/RegAllocGreedy.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2486,15 +2486,13 @@ void RAGreedy::tryHintRecoloring(const LiveInterval &VirtReg) {
24862486
// We have a broken hint, check if it is possible to fix it by
24872487
// reusing PhysReg for the copy-related live-ranges. Indeed, we evicted
24882488
// some register and PhysReg may be available for the other live-ranges.
2489-
SmallSet<Register, 4> Visited;
2490-
SmallVector<Register, 2> RecoloringCandidates;
24912489
HintsInfo Info;
24922490
Register Reg = VirtReg.reg();
24932491
MCRegister PhysReg = VRM->getPhys(Reg);
24942492
// Start the recoloring algorithm from the input live-interval, then
24952493
// it will propagate to the ones that are copy-related with it.
2496-
Visited.insert(Reg);
2497-
RecoloringCandidates.push_back(Reg);
2494+
SmallSet<Register, 4> Visited = {Reg};
2495+
SmallVector<Register, 2> RecoloringCandidates = {Reg};
24982496

24992497
LLVM_DEBUG(dbgs() << "Trying to reconcile hints for: " << printReg(Reg, TRI)
25002498
<< '(' << printReg(PhysReg, TRI) << ")\n");

0 commit comments

Comments
 (0)