[llvm] r335268 - [AMDGPU] Fix bug with tracking processed blocks in SIInsertWaitcnts

Scott Linder via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 21 11:48:49 PDT 2018


Author: scott.linder
Date: Thu Jun 21 11:48:48 2018
New Revision: 335268

URL: http://llvm.org/viewvc/llvm-project?rev=335268&view=rev
Log:
[AMDGPU] Fix bug with tracking processed blocks in SIInsertWaitcnts

BlockWaitcntProcessedSet was not being cleared between calls, so it was
producing incorrect counts in cases where MBB addresses happened to coincide
across multiple calls.

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


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

Modified: llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp?rev=335268&r1=335267&r2=335268&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp Thu Jun 21 11:48:48 2018
@@ -1868,6 +1868,7 @@ bool SIInsertWaitcnts::runOnMachineFunct
   BlockVisitedSet.clear();
   VCCZBugHandledSet.clear();
   LoopWaitcntDataMap.clear();
+  BlockWaitcntProcessedSet.clear();
 
   // Walk over the blocks in reverse post-dominator order, inserting
   // s_waitcnt where needed.




More information about the llvm-commits mailing list