[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 14:27:46 PST 2019
qcolombet added inline comments.
================
Comment at: llvm/lib/CodeGen/RegAllocGreedy.cpp:2626
+ assert(!FixedRegisters.count(VirtReg.reg));
FixedRegisters.insert(VirtReg.reg);
SmallVector<unsigned, 4> CurrentNewVRegs;
----------------
rudkx wrote:
> qcolombet wrote:
> > 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`.
> Yes, I realize, but that would require assigning the result of `::insert`, asserting on it, and then doing something like `(void) inserted;` to avoid a warning, so this seemed cleaner and simpler to me.
>
> Having said that, if you feel strongly about doing that rather than calling `::count` I'm more than happy to fix it up.
I don't feel strongly either way.
The only reason I brought it up is because `::count` is not free. But given that's in anyway in any critical path plus that's just assert, up to you :).
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