[PBQP] Callee saved regs should have a higher cost than scratch regs
authorArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Tue, 4 Nov 2014 20:51:29 +0000 (20:51 +0000)
committerArnaud A. de Grandmaison <arnaud.degrandmaison@arm.com>
Tue, 4 Nov 2014 20:51:29 +0000 (20:51 +0000)
commite1bec7513461e3710f661b73ba11a76eca032ffc
treebf03a2bf0aeb67eb8d5847ffa8aa65da378ef7f6
parent8025a39d11d9308afa42d8e252ef23902fbd142d
[PBQP] Callee saved regs should have a higher cost than scratch regs

Registers are not all equal. Some are not allocatable (infinite cost),
some have to be preserved but can be used, and some others are just free
to use.

Ensure there is a cost hierarchy reflecting this fact, so that the
allocator will favor scratch registers over callee-saved registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221293 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocPBQP.cpp
test/CodeGen/AArch64/PBQP-csr.ll [new file with mode: 0644]