[PATCH] D48391: [AMDGPU] Fix bug with tracking processed blocks in SIInsertWaitcnts

Scott Linder via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 20 13:08:37 PDT 2018


scott.linder created this revision.
scott.linder added a reviewer: msearles.
Herald added subscribers: llvm-commits, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl, arsenm.

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

I was not able to reproduce this consistently (depends on non-deterministic addresses), so I could not include a test.


Repository:
  rL LLVM

https://reviews.llvm.org/D48391

Files:
  lib/Target/AMDGPU/SIInsertWaitcnts.cpp


Index: lib/Target/AMDGPU/SIInsertWaitcnts.cpp
===================================================================
--- lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -1868,6 +1868,7 @@
   BlockVisitedSet.clear();
   VCCZBugHandledSet.clear();
   LoopWaitcntDataMap.clear();
+  BlockWaitcntProcessedSet.clear();
 
   // Walk over the blocks in reverse post-dominator order, inserting
   // s_waitcnt where needed.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48391.152137.patch
Type: text/x-patch
Size: 450 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180620/3fea4798/attachment.bin>


More information about the llvm-commits mailing list