[PATCH] D123270: RegAllocGreedy: Allow last chance recolor to retry overlapping tuples

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 6 17:23:55 PDT 2022


arsenm created this revision.
arsenm added reviewers: qcolombet, MatzeB, kparzysz, uabelho.
Herald added subscribers: kerbowa, hiraditya, jvesely.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Last chance recoloring didn't try recoloring a done register with the
same class since it believed there was no point. This doesn't
necessarily apply if the members in that class overlap. Allow the
recoloring to proceed if the assigned interfering physical register
overlaps with the candidate register.

      

This avoids an allocation failure with overlapping tuples. This
testcase could be handled better, and I don't believe should reach
last chance recoloring. The failure only manifests with the mutually
unsatisfiable register hints to overlapping tuples. The earlier
assignment decisions probably should have figured out that using these
hints was a bad idea.


https://reviews.llvm.org/D123270

Files:
  llvm/lib/CodeGen/RegAllocGreedy.cpp
  llvm/test/CodeGen/AMDGPU/regalloc-fail-unsatisfiable-overlapping-tuple-hints.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123270.421050.patch
Type: text/x-patch
Size: 6920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220407/d73298c8/attachment.bin>


More information about the llvm-commits mailing list