aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/FileCheck
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2023-08-02 08:18:03 +0100
committerJay Foad <jay.foad@amd.com>2023-08-07 15:41:40 +0100
commit97324f6274184e607fa6d6cffb1aebee317d4644 (patch)
tree650d434473f5c4203cc1421e0d3afa3f84ae2bb0 /llvm/lib/FileCheck
parent68a0a3737163d5ee4cb5e8bb10128dc589e40d9a (diff)
downloadllvm-97324f6274184e607fa6d6cffb1aebee317d4644.zip
llvm-97324f6274184e607fa6d6cffb1aebee317d4644.tar.gz
llvm-97324f6274184e607fa6d6cffb1aebee317d4644.tar.bz2
[AggressiveAntiDepBreaker] Refix renaming a subregister of a live register
This patch reworks the fix from D20627 "Do not rename registers that do not start an independent live range". That fix depended on the scheduler dependency graph having redundant edges. Those edges are removed by D156552 "[MachineScheduler] Track physical register dependencies per-regunit" with the result that on several Hexagon lit tests, the post-RA scheduler would schedule the code in a way that fails machine verification. Consider this code where D11 is a pair R23:R22: SU(0): %R2<def> = A2_add %R23, %R17<kill> (anti dependency on R23 here) SU(8): %R23<def> = S2_asr_i_r %R22, 31 (data dependency on R23->D11 here) SU(10): %D0<def> = A2_tfrp %D11<kill> The original fix would detect this situation by examining the dependency from SU(8) to SU(10) and seeing that D11 is not a subreg of R23. A slightly more complicated example: SU(0): %R2<def> = A2_add %R23, %R17<kill> (anti dependency on R23 here) SU(8): %R23<def> = S2_asr_i_r %R22, 31 (data dependency on R23 here) SU(9): %R23<def> = S2_asr_i_r %R23, 31 (data dependency on R23->D11 here) SU(10): %D0<def> = A2_tfrp %D11<kill> The original fix also worked on this example, but only because ScheduleDAGInstrs adds an extra data dependency edge directly from SU(8) to SU(10). This edge is redundant, since you could infer it transitively from the edges SU(8)->SU(9) and SU(9)->SU(10), and since none of the data that SU(8) writes to R23 is read by SU(10). After D156552 the redundant edge SU(8)->SU(10) will not be present, so when we examine the successors of SU(8) we will not find any that read from a superreg of R23. This patch removes the original fix from D20627, which examined edges in the dependency graph. Instead it extends a check that was already being done in FindSuitableFreeRegisters: instead of checking that *some* register is a superreg of all registers in the rename group, we now check that the specific register that carries the anti-dependency that we want to break is a superreg of all registers in the rename group. Differential Revision: https://reviews.llvm.org/D156880
Diffstat (limited to 'llvm/lib/FileCheck')
0 files changed, 0 insertions, 0 deletions