Prioritize smaller register classes for urgent evictions.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 30 May 2012 21:46:58 +0000 (21:46 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 30 May 2012 21:46:58 +0000 (21:46 +0000)
commit9cda1be0aa5e9e70ae493ef6944a8c202c1c70e6
tree886e4eafdbb8bc44151cfaf1f60ed627b5b7a90d
parentff09e56cda85c1740ac1689018dfe0d3cf49ae6c
Prioritize smaller register classes for urgent evictions.

It helps compile exotic inline asm. In the test case, normal GR32
virtual registers use up eax-edx so the final GR32_ABCD live range has
no registers left. Since all the live ranges were tiny, we had no way of
prioritizing the smaller register class.

This patch allows tiny unspillable live ranges to be evicted by tiny
unspillable live ranges from a smaller register class.

<rdar://problem/11542429>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157715 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocGreedy.cpp
test/CodeGen/X86/inline-asm.ll