summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIInsertWaits.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/SIInsertWaits.cpp55
1 files changed, 0 insertions, 55 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp b/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp
index ead4c9ebf18..75adb2b767f 100644
--- a/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp
@@ -127,18 +127,6 @@ private:
/// \brief Insert S_NOP between an instruction writing M0 and S_SENDMSG.
void handleSendMsg(MachineBasicBlock &MBB, MachineBasicBlock::iterator I);
- /// \param DPP The DPP instruction
- /// \param SearchI The iterator to start look for hazards.
- /// \param SearchMBB The basic block we are operating on.
- /// \param WaitStates Then number of wait states that need to be inserted
- /// When a hazard is detected.
- void insertDPPWaitStates(MachineBasicBlock::iterator DPP,
- MachineBasicBlock::reverse_iterator SearchI,
- MachineBasicBlock *SearchMBB,
- unsigned WaitStates);
-
- void insertDPPWaitStates(MachineBasicBlock::iterator DPP);
-
/// Return true if there are LGKM instrucitons that haven't been waited on
/// yet.
bool hasOutstandingLGKM() const;
@@ -522,45 +510,6 @@ void SIInsertWaits::handleSendMsg(MachineBasicBlock &MBB,
}
}
-void SIInsertWaits::insertDPPWaitStates(MachineBasicBlock::iterator DPP,
- MachineBasicBlock::reverse_iterator SearchI,
- MachineBasicBlock *SearchMBB,
- unsigned WaitStates) {
-
- MachineBasicBlock::reverse_iterator E = SearchMBB->rend();
-
- for (; WaitStates > 0; --WaitStates, ++SearchI) {
-
- // If we have reached the start of the block, we need to check predecessors.
- if (SearchI == E) {
- for (MachineBasicBlock *Pred : SearchMBB->predecessors()) {
- // We only need to check fall-through blocks. Branch instructions
- // give us enough wait states.
- if (Pred->getFirstTerminator() == Pred->end()) {
- insertDPPWaitStates(DPP, Pred->rbegin(), Pred, WaitStates);
- break;
- }
- }
- return;
- }
-
- for (MachineOperand &Op : SearchI->operands()) {
- if (!Op.isReg() || !Op.isDef())
- continue;
-
- if (DPP->readsRegister(Op.getReg(), TRI)) {
- TII->insertWaitStates(*DPP->getParent(), DPP, WaitStates);
- return;
- }
- }
- }
-}
-
-void SIInsertWaits::insertDPPWaitStates(MachineBasicBlock::iterator DPP) {
- MachineBasicBlock::reverse_iterator I(DPP);
- insertDPPWaitStates(DPP, I, DPP->getParent(), 2);
-}
-
// FIXME: Insert waits listed in Table 4.2 "Required User-Inserted Wait States"
// around other non-memory instructions.
bool SIInsertWaits::runOnMachineFunction(MachineFunction &MF) {
@@ -630,10 +579,6 @@ bool SIInsertWaits::runOnMachineFunction(MachineFunction &MF) {
}
}
- if (TII->isDPP(*I)) {
- insertDPPWaitStates(I);
- }
-
// Record pre-existing, explicitly requested waits
if (I->getOpcode() == AMDGPU::S_WAITCNT) {
handleExistingWait(*I);
OpenPOWER on IntegriCloud