[all-commits] [llvm/llvm-project] d4b1be: RegAllocGreedy: Fix illegal eviction assert for ur...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Tue Apr 12 16:17:10 PDT 2022
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2022-04-12 (Tue, 12 Apr 2022)
RegAllocGreedy: Fix illegal eviction assert for urgent evictions
The condition in canEvictInterferenceBasedOnCost is slightly different
from the assertion in evictInteference.
canEvictInterferenceBasedOnCost uses a <= check for the cascade number
for legality, but the assert was checking for <. For equal cascade
numbers for an urgent eviction, canEvictInterferenceBasedOnCost could
return success. The actual eviction would then hit this assert. Avoid
ever returning true for equivalent cascade numbers.
The resulting failed allocation seems a bit off to me. e.g. in
illegal-eviction-assert.mir, I wuold assume %0 gets allocated starting
at $vgpr0. That was its initial allocation choice, but was later
evicted. In this example no evictions can help improve anything.
More information about the All-commits