MachineRegisterInfo: Introduce isPhysRegUsed()
authorMatthias Braun <matze@braunis.de>
Tue, 18 Aug 2015 18:54:27 +0000 (18:54 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 18 Aug 2015 18:54:27 +0000 (18:54 +0000)
commit28fbb4be5df108cf72a99b73c7c99ded16f3b82f
tree9821f77873528cdf579d3175e25425a373c59910
parentebb4ccb3a80f91be7ff03732bc69881502aa3dbd
MachineRegisterInfo: Introduce isPhysRegUsed()

This method checks whether a physical regiser or any of its aliases are
used in the function.

Using this function in SIRegisterInfo::findUnusedReg() should also fix
this reported failure:

http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20150803/292143.html
http://reviews.llvm.org/rL242173#inline-533

The report doesn't come with a testcase and I don't know enough about
AMDGPU to create one myself.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245329 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineRegisterInfo.h
lib/CodeGen/ExecutionDepsFix.cpp
lib/CodeGen/MachineRegisterInfo.cpp
lib/Target/AMDGPU/SIRegisterInfo.cpp