[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:25:43 PST 2019
qcolombet added a comment.
Hi Mark,
I am not sure that's the right fix, because by design, last chance recoloring was allowed to evict things that got scavenged.
To elaborate a bit on that, it is supposed to be fine to split the value (by spilling or copy insertion) but it is not fine to have it appears twice in the "moving part" (the fixedRegisters set).
If you evict something, the idea was the evicted register would still be here but with a smaller live-range, e.g.,
reg1(Rx) =
...
= reg1(Rx)
During last chance recoloring, if we were to scavenge reg1 and then evict it, we would end up with something like:
reg1(unassigned) =
Tmp(unassigned) = live-rangeSplittingOp reg1(unassigned)
...
regNew(unassigned) = live-rangeSplittingOp Tmp(unassigned)
= regNew(unassigned)
Which is fine.
When reverting the last coloring changes if it fails, reg1 can get back to its old assignment (Rx here) with no problem.
IIRC there was a bug with the order in which we assign them back, but I thought it was fixed.
What is the problem you're seeing?
Cheers,
-Quentin
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