]> granicus.if.org Git - llvm/commit
Reapply "AMDGPU: Scavenge register instead of findUnusedReg"
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 27 Mar 2019 17:31:29 +0000 (17:31 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 27 Mar 2019 17:31:29 +0000 (17:31 +0000)
commit50359ffe2c43b91f9b210e876da8c7d67a04f103
treea0f9ce63ac63a3e96328166a4fee3524a497877f
parent5503f81d14fefaa85a00f5d70891b1d55ddd0066
Reapply "AMDGPU: Scavenge register instead of findUnusedReg"

This reapplies r356149, using the correct overload of findUnusedReg
which passes the current iterator.

This worked most of the time, because the scavenger iterator was moved
at the end of the frame index loop in PEI. This would fail if the
spill was the first instruction. This was further hidden by the fact
that the scavenger wasn't passed in for normal frame index
elimination.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357098 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/SIRegisterInfo.cpp
test/CodeGen/AMDGPU/pei-reg-scavenger-position.mir [new file with mode: 0644]