[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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335268 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Scott Linder
2018-06-21 18:48:48 +00:00
parent 3316883bba
commit cbeaa8b0e2
+1
View File
@@ -1868,6 +1868,7 @@ bool SIInsertWaitcnts::runOnMachineFunction(MachineFunction &MF) {
BlockVisitedSet.clear();
VCCZBugHandledSet.clear();
LoopWaitcntDataMap.clear();
BlockWaitcntProcessedSet.clear();
// Walk over the blocks in reverse post-dominator order, inserting
// s_waitcnt where needed.