]> granicus.if.org Git - llvm/commit
[RegAllocGreedy] IMPLICIT_DEF values shouldn't prefer registers
authorJohn Brawn <john.brawn@arm.com>
Fri, 14 Dec 2018 14:07:57 +0000 (14:07 +0000)
committerJohn Brawn <john.brawn@arm.com>
Fri, 14 Dec 2018 14:07:57 +0000 (14:07 +0000)
commit98689c01bbfee97c6fc97c657416b4330592be80
treed1881a4847d12ec29c3ea0780a87500fba3c015c
parent5e8ab56369160860a57b7f8d881612fbef18e2cc
[RegAllocGreedy] IMPLICIT_DEF values shouldn't prefer registers

It costs nothing to spill an IMPLICIT_DEF value (the only spill code that's
generated is a KILL of the value), so when creating split constraints if the
live-out value is IMPLICIT_DEF the exit constraint should be DontCare instead
of PrefReg.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349151 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/RegAllocGreedy.cpp
test/CodeGen/AMDGPU/subreg-split-live-in-error.mir
test/CodeGen/Thumb/ragreedy-implicit-def.ll [new file with mode: 0644]
test/CodeGen/X86/pr38795.ll