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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 3 06:35:22 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.");
----------------
jayfoad wrote:

I'm not sure whether this should be an error or not. The compiler will still generate correct code, even on GFX10 or earlier, right? The only problem is that the post-RA scheduler will not be aware of some hazards, so there will be more work for the standalone hazard recognizer pass to do.

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


More information about the llvm-commits mailing list