]> granicus.if.org Git - llvm/commit
[SystemZ] implement shouldCoalesce()
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 29 Sep 2017 14:31:39 +0000 (14:31 +0000)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 29 Sep 2017 14:31:39 +0000 (14:31 +0000)
commite2ff20cbface83819e447eef1345ddaa9bfec441
treeafb341e3ec2e33ad65aebc6827c37602b1f0d111
parent1be91bb29f0fc97083ee5eeee701f1a5a9388e50
[SystemZ]  implement shouldCoalesce()

Implement shouldCoalesce() to help regalloc avoid running out of GR128
registers.

If a COPY involving a subreg of a GR128 is coalesced, the live range of the
GR128 virtual register will be extended. If this happens where there are
enough phys-reg clobbers present, regalloc will run out of registers (if
there is not a single GR128 allocatable register available).

This patch tries to allow coalescing only when it can prove that this will be
safe by checking the (local) interval in question.

Review: Ulrich Weigand, Quentin Colombet
https://reviews.llvm.org/D37899
https://bugs.llvm.org/show_bug.cgi?id=34610

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314516 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetRegisterInfo.h
lib/CodeGen/RegisterCoalescer.cpp
lib/Target/AMDGPU/SIRegisterInfo.cpp
lib/Target/AMDGPU/SIRegisterInfo.h
lib/Target/ARM/ARMBaseRegisterInfo.cpp
lib/Target/ARM/ARMBaseRegisterInfo.h
lib/Target/SystemZ/SystemZRegisterInfo.cpp
lib/Target/SystemZ/SystemZRegisterInfo.h
test/CodeGen/SystemZ/regalloc-GR128.ll [new file with mode: 0644]