[PATCH] D23687: AMDGPU/SI: Use a better method for determining the largest pressure sets
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 18 12:09:04 PDT 2016
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:100
@@ -105,1 +99,3 @@
+ VGPRSetID = NumRegPressureSets;
+ std::map<unsigned, unsigned> PressureSetRegUnits;
----------------
DenseMap?
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:118
@@ +117,3 @@
+ for (unsigned i = 0; i < NumRegPressureSets; ++i) {
+ //dbgs() << getRegPressureSetName(i) << " has " << PressureSetRegUnits[i] << " units.\n";
+ if (isVGPRPressureSet(i) && PressureSetRegUnits[i] > VGPRMax) {
----------------
Leftevor debug printing
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:981
@@ +980,3 @@
+SIRegisterInfo::getRegPressureSetLimits(const MachineFunction &MF) const {
+ std::pair<unsigned, unsigned> Limits = std::make_pair(0, 0);
+
----------------
Can use the constructor parameters instead of make_pair, but this is also the default
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:987-991
@@ +986,7 @@
+
+ if (!isSGPRSet && !isVGPRSet)
+ continue;
+
+ if (isSGPRSet && isVGPRSet)
+ continue;
+
----------------
This is the same as isSGPRSet == isVGPRSet
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:1006
@@ +1005,3 @@
+SIRegisterInfo::getMaxRegPressure(ArrayRef<unsigned> SetPressure) const {
+ std::pair<unsigned, unsigned> MaxPressure = std::make_pair(0, 0);
+
----------------
Ditto
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:1008
@@ +1007,3 @@
+
+ for (unsigned i = 0; i < SetPressure.size(); i++) {
+ bool isSGPRSet = SGPRPressureSets.test(i);
----------------
Save size
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:1012-1017
@@ +1011,8 @@
+
+ if (!isSGPRSet && !isVGPRSet)
+ continue;
+
+ // Ignore the sets that contain sgprs and vgprs.
+ if (isSGPRSet && isVGPRSet)
+ continue;
+
----------------
This is the same as isSGPRSet == isVGPRSet
https://reviews.llvm.org/D23687
More information about the llvm-commits
mailing list