[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

llvm-svn: 335268
This commit is contained in:
Scott Linder 2018-06-21 18:48:48 +00:00
parent 766c77efd7
commit 5792dd0f39
1 changed files with 1 additions and 0 deletions

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.