diff options
| author | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-11-29 11:06:18 +0000 | 
|---|---|---|
| committer | Nicolai Haehnle <nhaehnle@gmail.com> | 2018-11-29 11:06:18 +0000 | 
| commit | f96456c611d07296ea0cd6bea0fbc6f928caa7ad (patch) | |
| tree | 7074e3df46d92625eced4e321b7c364550d45dcf /llvm/lib/Target | |
| parent | d1f45dad84f81ba79a44eb28efd94864384391ce (diff) | |
| download | bcm5719-llvm-f96456c611d07296ea0cd6bea0fbc6f928caa7ad.tar.gz bcm5719-llvm-f96456c611d07296ea0cd6bea0fbc6f928caa7ad.zip | |
AMDGPU/InsertWaitcnt: Remove unused WaitAtBeginning
Reviewers: msearles, rampitec, scott.linder, kanarayan
Subscribers: arsenm, kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits, hakzsam
Differential Revision: https://reviews.llvm.org/D54229
llvm-svn: 347851
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp | 29 | 
1 files changed, 2 insertions, 27 deletions
| diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp index c33350d7546..0f16117efd3 100644 --- a/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp +++ b/llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp @@ -293,9 +293,6 @@ public:                     const SIRegisterInfo *TRI, const MachineRegisterInfo *MRI,                     unsigned OpNo, int32_t Val); -  void setWaitAtBeginning() { WaitAtBeginning = true; } -  void clearWaitAtBeginning() { WaitAtBeginning = false; } -  bool getWaitAtBeginning() const { return WaitAtBeginning; }    int32_t getMaxVGPR() const { return VgprUB; }    int32_t getMaxSGPR() const { return SgprUB; } @@ -343,7 +340,6 @@ public:  private:    const GCNSubtarget *ST = nullptr; -  bool WaitAtBeginning = false;    bool RevisitLoop = false;    int32_t PostOrder = 0;    int32_t ScoreLBs[NUM_INST_CNTS] = {0}; @@ -867,18 +863,9 @@ void SIInsertWaitcnts::generateWaitcntInstBefore(    AMDGPU::Waitcnt Wait; -  // See if an s_waitcnt is forced at block entry, or is needed at -  // program end. -  if (ScoreBrackets->getWaitAtBeginning()) { -    // Note that we have already cleared the state, so we don't need to update -    // it. -    ScoreBrackets->clearWaitAtBeginning(); -    Wait = AMDGPU::Waitcnt::allZero(); -  } -    // See if this instruction has a forced S_WAITCNT VM.    // TODO: Handle other cases of NeedsWaitcntVmBefore() -  else if (MI.getOpcode() == AMDGPU::BUFFER_WBINVL1 || +  if (MI.getOpcode() == AMDGPU::BUFFER_WBINVL1 ||             MI.getOpcode() == AMDGPU::BUFFER_WBINVL1_SC ||             MI.getOpcode() == AMDGPU::BUFFER_WBINVL1_VOL) {      Wait.VmCnt = 0; @@ -1274,9 +1261,8 @@ void SIInsertWaitcnts::mergeInputScoreBrackets(MachineBasicBlock &Block) {      BlockWaitcntBrackets *PredScoreBrackets =          BlockWaitcntBracketsMap[Pred].get();      bool Visited = BlockVisitedSet.count(Pred); -    if (!Visited || PredScoreBrackets->getWaitAtBeginning()) { +    if (!Visited)        continue; -    }      for (auto T : inst_counter_types()) {        int span =            PredScoreBrackets->getScoreUB(T) - PredScoreBrackets->getScoreLB(T); @@ -1287,17 +1273,6 @@ void SIInsertWaitcnts::mergeInputScoreBrackets(MachineBasicBlock &Block) {      }    } -#if 0 -  // LC does not (unlike) add a waitcnt at beginning. Leaving it as marker. -  // TODO: how does LC distinguish between function entry and main entry? -  // If this is the entry to a function, force a wait. -  MachineBasicBlock &Entry = Block.getParent()->front(); -  if (Entry.getNumber() == Block.getNumber()) { -    ScoreBrackets->setWaitAtBeginning(); -    return; -  } -#endif -    // Now set the current Block's brackets to the largest ending bracket.    for (auto T : inst_counter_types()) {      ScoreBrackets->setScoreUB(T, MaxPending[T]); | 

