[llvm] 1205720 - [AMDGPU] Initialize gpr upper bounds to -1. NFC.

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 11:59:32 PDT 2020


Author: Jay Foad
Date: 2020-04-29T19:58:06+01:00
New Revision: 120572072eaba4acabcd723317467e20285c4479

URL: https://github.com/llvm/llvm-project/commit/120572072eaba4acabcd723317467e20285c4479
DIFF: https://github.com/llvm/llvm-project/commit/120572072eaba4acabcd723317467e20285c4479.diff

LOG: [AMDGPU] Initialize gpr upper bounds to -1. NFC.

These upper bounds are inclusive, so -1 (rather than 0) is the natural
way to express an empty range.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
index 43c8b8e2c97b..c09d5deead1f 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -328,8 +328,8 @@ class WaitcntBrackets {
   uint32_t LastFlat[NUM_INST_CNTS] = {0};
   // wait_cnt scores for every vgpr.
   // Keep track of the VgprUB and SgprUB to make merge at join efficient.
-  int32_t VgprUB = 0;
-  int32_t SgprUB = 0;
+  int32_t VgprUB = -1;
+  int32_t SgprUB = -1;
   uint32_t VgprScores[NUM_INST_CNTS][NUM_ALL_VGPRS] = {{0}};
   // Wait cnt scores for every sgpr, only lgkmcnt is relevant.
   uint32_t SgprScores[SQ_MAX_PGM_SGPRS] = {0};


        


More information about the llvm-commits mailing list