diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-03-20 11:40:34 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-06-04 11:58:51 +0000 |
| commit | 4b6eb0e63c698094db5506763df44cc83c19f643 (patch) | |
| tree | f1d30b8c10bc6db323b91538745ae8ab8b593910 /contrib/llvm-project/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp | |
| parent | 76886853f03395abb680824bcc74e98f83bd477a (diff) | |
Diffstat (limited to 'contrib/llvm-project/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/llvm-project/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp b/contrib/llvm-project/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp index bc2fb1e9770c..ff5d0b0af6a4 100644 --- a/contrib/llvm-project/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp +++ b/contrib/llvm-project/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp @@ -349,20 +349,16 @@ void GCNHazardRecognizer::AdvanceCycle() { return; } - // Do not track non-instructions which do not affect the wait states. - // If included, these instructions can lead to buffer overflow such that - // detectable hazards are missed. - if (CurrCycleInstr->isMetaInstruction()) { - CurrCycleInstr = nullptr; - return; - } - if (CurrCycleInstr->isBundle()) { processBundle(); return; } unsigned NumWaitStates = TII.getNumWaitStates(*CurrCycleInstr); + if (!NumWaitStates) { + CurrCycleInstr = nullptr; + return; + } // Keep track of emitted instructions EmittedInstrs.push_front(CurrCycleInstr); @@ -409,7 +405,7 @@ static int getWaitStatesSince(GCNHazardRecognizer::IsHazardFn IsHazard, if (IsHazard(*I)) return WaitStates; - if (I->isInlineAsm() || I->isMetaInstruction()) + if (I->isInlineAsm()) continue; WaitStates += SIInstrInfo::getNumWaitStates(*I); @@ -1549,7 +1545,7 @@ int GCNHazardRecognizer::checkMAIHazards90A(MachineInstr *MI) { } int GCNHazardRecognizer::checkMAILdStHazards(MachineInstr *MI) { - // On gfx90a+ releveant hazards are checked in checkMAIVALUHazards() + // On gfx90a+ relevant hazards are checked in checkMAIVALUHazards() if (!ST.hasMAIInsts() || ST.hasGFX90AInsts()) return 0; |
