[AMDGPU] GCNHazardRecognizer: ignore all meta instructions
authorJay Foad <jay.foad@amd.com>
Tue, 27 Apr 2021 16:03:22 +0000 (17:03 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 27 Apr 2021 19:17:15 +0000 (20:17 +0100)
This is hopefully NFC, but should be more robust in ignoring all
instructions that should be ignored, instead of just some of them.

Differential Revision: https://reviews.llvm.org/D101372

llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp

index f5db222..82e1c58 100644 (file)
@@ -348,8 +348,7 @@ 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() || CurrCycleInstr->isDebugInstr() ||
-      CurrCycleInstr->isKill()) {
+  if (CurrCycleInstr->isMetaInstruction()) {
     CurrCycleInstr = nullptr;
     return;
   }