summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
diff options
context:
space:
mode:
authorDavid Stuttard <david.stuttard@amd.com>2019-03-05 10:25:16 +0000
committerDavid Stuttard <david.stuttard@amd.com>2019-03-05 10:25:16 +0000
commit81eec58a0d55acde898e861ad99a6b329c364764 (patch)
tree53b8078fd637f90656f20b24c20593a93e762a1e /llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
parent5eaa55f6166fadc7536253fd1dd4a307a130b720 (diff)
downloadbcm5719-llvm-81eec58a0d55acde898e861ad99a6b329c364764.tar.gz
bcm5719-llvm-81eec58a0d55acde898e861ad99a6b329c364764.zip
[AMDGPU] Omit KILL instructions from hazard recognizer
Summary: In some cases the KILL was causing a hazard to be introduced as these were scheduled into hazard slots, but don't result in an instruction. KILL shouldn't be considered for hazard recognition. Change-Id: Ib6d2a2160f8c94cd0ce611ab198c7e4f46aeffcf Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58898 llvm-svn: 355384
Diffstat (limited to 'llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
index 4af8a457a0e..5fbcfa99978 100644
--- a/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp
@@ -241,9 +241,8 @@ void GCNHazardRecognizer::AdvanceCycle() {
// 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->isImplicitDef())
- return;
- else if (CurrCycleInstr->isDebugInstr())
+ if (CurrCycleInstr->isImplicitDef() || CurrCycleInstr->isDebugInstr() ||
+ CurrCycleInstr->isKill())
return;
unsigned NumWaitStates = TII.getNumWaitStates(*CurrCycleInstr);
OpenPOWER on IntegriCloud