[all-commits] [llvm/llvm-project] eefed1: RegAllocGreedy: Roll back successful recolorings o...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Tue Apr 12 16:03:01 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eefed1dbf053f0a16e4c431688cafb02c99cbb7d
https://github.com/llvm/llvm-project/commit/eefed1dbf053f0a16e4c431688cafb02c99cbb7d
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2022-04-12 (Tue, 12 Apr 2022)
Changed paths:
M llvm/lib/CodeGen/RegAllocGreedy.cpp
M llvm/lib/CodeGen/RegAllocGreedy.h
A llvm/test/CodeGen/AMDGPU/issue48473.mir
A llvm/test/CodeGen/AMDGPU/regalloc-failure-overlapping-insert-assert.mir
A llvm/test/CodeGen/RISCV/regalloc-last-chance-recoloring-failure.ll
Log Message:
-----------
RegAllocGreedy: Roll back successful recolorings on failure
This is a replacement for the original fix attempted in
c46aab01c002b7a04135b8b7f1f52d8c9ae23a58.
This fixes "overlapping insert" assertion failures when trying to
unwind an unsuccessful recoloring attempt.
The problem would occur when there are multiple recoloring candidates
which recursively required recoloring. If one recoloring candidate was
successfully recolored at one level, and the next recoloring candidate
was unsuccessful, we would not roll back the first candidates
successful recoloring. The forgotten successful recoloring may have
been assigned to something that conflicts with a register that needs
to be restored in a parent recoloring attempt.
See the testcase added in issue48473 for a more concrete example with
explanation.
More information about the All-commits
mailing list