[PATCH] D58200: [RegAllocGreedy] Take last chance recoloring into account in evicting.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 13:53:50 PST 2019


qcolombet accepted this revision.
qcolombet added a comment.
This revision is now accepted and ready to land.

Hi Mark,

Actually, re-reading through the code (it's been a while since I touched it), you're right, the intent was to freeze those regs when we scavenge them but do whatever we want to the others.
Bottom line, the fix looks good to me.

Nitpick below.

Cheers,
-Quentin



================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:2626
+  assert(!FixedRegisters.count(VirtReg.reg));
   FixedRegisters.insert(VirtReg.reg);
   SmallVector<unsigned, 4> CurrentNewVRegs;
----------------
IIRC ::insert returns a boolean that says whether or not it has been inserted.
Thus, we can avoid the call to count and assert on the result of `::insert`.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58200/new/

https://reviews.llvm.org/D58200





More information about the llvm-commits mailing list