[PATCH] D156491: [RA] Split a virtual register in cold blocks if it is not assigned preferred physical register

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 15:28:00 PDT 2023


Carrot added a comment.

In D156491#4540597 <https://reviews.llvm.org/D156491#4540597>, @MatzeB wrote:

> Interesting! This is showing some neat improvements enabling more shrink-wrapping in the test-cases.
>
> Though I suspect changes of the splitting algorithm could trigger regressions (given it's all heuristics). So I would feel better if this change was backed up by more statistics. (Something like compiling llvm-test-suite and collecting regalloc stats or remarks?) and/or report any other benchmarks you did?

Regressions are really observed, such as ARM/fptosi-sat-scalar.ll. 
Internal analysis shows it has big impact to tcmalloc and protobuf parsing. I will run it on SPEC INT.



================
Comment at: llvm/test/CodeGen/AMDGPU/ran-out-of-sgprs-allocation-failure.mir:105
-  ; CHECK-NEXT:   renamable $sgpr60 = COPY killed renamable $sgpr76
-  ; CHECK-NEXT:   renamable $sgpr64_sgpr65_sgpr66_sgpr67_sgpr68_sgpr69_sgpr70_sgpr71_sgpr72_sgpr73_sgpr74_sgpr75_sgpr76_sgpr77_sgpr78_sgpr79_sgpr80_sgpr81_sgpr82_sgpr83_sgpr84_sgpr85_sgpr86_sgpr87_sgpr88_sgpr89_sgpr90_sgpr91_sgpr92_sgpr93_sgpr94_sgpr95 = SI_SPILL_S1024_RESTORE %stack.1, implicit $exec, implicit $sgpr32 :: (load (s1024) from %stack.1, align 4, addrspace 5)
-  ; CHECK-NEXT:   renamable $sgpr61 = COPY killed renamable $sgpr80
----------------
arsenm wrote:
> This is a huge improvement (though this heuristic is probably not the reason it should have split)
Thank you for the confirmation, I really don't what it is doing.


================
Comment at: llvm/test/DebugInfo/X86/live-debug-values.ll:31-32
 
+; XFAIL: *
+; This test is failing after splitting the live range of variable "n" in %bb.3.
+
----------------
MatzeB wrote:
> uhoh...
I guess the debug information is not maintained well when live range split occurs.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156491/new/

https://reviews.llvm.org/D156491



More information about the llvm-commits mailing list