[PATCH] D54229: AMDGPU/InsertWaitcnt: Remove unused WaitAtBeginning
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 29 03:09:44 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL347851: AMDGPU/InsertWaitcnt: Remove unused WaitAtBeginning (authored by nha, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54229/new/
https://reviews.llvm.org/D54229
Files:
llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
Index: llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ llvm/trunk/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -293,9 +293,6 @@
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 @@
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 @@
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 @@
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 @@
}
}
-#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]);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54229.175837.patch
Type: text/x-patch
Size: 2595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181129/0252c930/attachment.bin>
More information about the llvm-commits
mailing list