]> granicus.if.org Git - llvm/commit
[AMDGPU] Do not allow register coalescer to create big superregs
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Wed, 18 Jan 2017 17:30:05 +0000 (17:30 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Wed, 18 Jan 2017 17:30:05 +0000 (17:30 +0000)
commitd78f00a4d1a7031f5b52d7907a054f2be16f38d5
tree5536317d8f4c8df4a2f5a0b61cb679765da3c435
parent4a6dec640839a6fba799f1a553934f51dcd977e1
[AMDGPU] Do not allow register coalescer to create big superregs

Limit register coalescer by not allowing it to artificially increase
size of registers beyond dword. Such super-registers are in fact
register sequences and not distinct HW registers.

With more super-regs we would need to allocate adjacent registers
and constraint regalloc more than needed. Moreover, our super
registers are overlapping. For instance we have VGPR0_VGPR1_VGPR2,
VGPR1_VGPR2_VGPR3, VGPR2_VGPR3_VGPR4 etc, which complicates registers
allocation even more, resulting in excessive spilling.

Differential Revision: https://reviews.llvm.org/D28782

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292413 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIRegisterInfo.cpp
lib/Target/AMDGPU/SIRegisterInfo.h
test/CodeGen/AMDGPU/half.ll
test/CodeGen/AMDGPU/limit-coalesce.mir [new file with mode: 0644]