[all-commits] [llvm/llvm-project] 7714e0: RegAllocGreedy: Allow last chance recolor to retry...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Apr 25 14:07:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7714e0317520207572168388f22012dd9e152e9e
      https://github.com/llvm/llvm-project/commit/7714e0317520207572168388f22012dd9e152e9e
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-04-25 (Mon, 25 Apr 2022)

  Changed paths:
    M llvm/lib/CodeGen/RegAllocGreedy.cpp
    A llvm/test/CodeGen/AMDGPU/regalloc-fail-unsatisfiable-overlapping-tuple-hints.mir

  Log Message:
  -----------
  RegAllocGreedy: Allow last chance recolor to retry overlapping tuples

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.




More information about the All-commits mailing list