AMDGPU/SI: Use a better method for determining the largest pressure sets
authorTom Stellard <thomas.stellard@amd.com>
Fri, 26 Aug 2016 21:16:37 +0000 (21:16 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 26 Aug 2016 21:16:37 +0000 (21:16 +0000)
commit7c463c91684103668a290a3d3463b161ee240c0a
tree20c961f454f62d50515fc3f6d8434189febc5a73
parentebe8d627c180215d758c3995129bbd85cd5c33c1
AMDGPU/SI: Use a better method for determining the largest pressure sets

Summary:
There are a few different sgpr pressure sets, but we only care about
the one which covers all of the sgprs.  We were using hard-coded
register pressure set names to determine the reg set id for the
biggest sgpr set.  However, we were using the wrong name, and this
method is pretty fragile, since the reg pressure set names may
change.

The new method just looks for the pressure set that contains the most
reg units and sets that set as our SGPR pressure set.  We've also
adopted the same technique for determining our VGPR pressure set.

Reviewers: arsenm

Subscribers: MatzeB, arsenm, llvm-commits, kzhuravl

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

llvm-svn: 279867
llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.h