[llvm] [AMDGPU] Support bottom-up postRA scheduing. (PR #135295)

Harrison Hao via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 07:31:08 PDT 2025


================
@@ -417,7 +417,11 @@ void GCNHazardRecognizer::AdvanceCycle() {
 }
 
 void GCNHazardRecognizer::RecedeCycle() {
-  llvm_unreachable("hazard recognizer does not support bottom-up scheduling.");
+  assert(!IsHazardRecognizerMode &&
+         "Bottom-up scheduling shouldn't run in hazard recognizer mode");
+  if (ST.getGeneration() < AMDGPUSubtarget::GFX11)
+    report_fatal_error("Hazard recognizer does not support bottom-up "
+                       "scheduling on pre‑GFX11.");
----------------
harrisonGPU wrote:

Yes, it generates correct code on GFX10, but I think we should enable it first, because I believe there isn’t a single approach that can handle all instruction scheduling cases.

https://github.com/llvm/llvm-project/pull/135295


More information about the llvm-commits mailing list