AMDGPU/SI: Add SI Machine Scheduler
[oota-llvm.git] / lib / Target / AMDGPU / SIInstrInfo.cpp
index bd80756d5c8fb790a5aec60f0f80563313ac676b..1e10d25e8fb7a39fbdfc9a1832620a00a20f64aa 100644 (file)
@@ -3079,3 +3079,15 @@ uint64_t SIInstrInfo::getScratchRsrcWords23() const {
 
   return Rsrc23;
 }
+
+bool SIInstrInfo::isLowLatencyInstruction(const MachineInstr *MI) const {
+  unsigned Opc = MI->getOpcode();
+
+  return isSMRD(Opc);
+}
+
+bool SIInstrInfo::isHighLatencyInstruction(const MachineInstr *MI) const {
+  unsigned Opc = MI->getOpcode();
+
+  return isMUBUF(Opc) || isMTBUF(Opc) || isMIMG(Opc);
+}