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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 28 08:21:47 PDT 2025


================
@@ -69,6 +69,10 @@ class GCNHazardRecognizer final : public ScheduleHazardRecognizer {
   // Advance over a MachineInstr bundle. Look for hazards in the bundled
   // instructions.
   void processBundle();
+  // Recede over a MachineInstr bundle. Adds bundled instructions to the
+  // EmittedInstrs queue in bottom-up scheduling mode.
+  // TODO: Hazard detection is not yet implemented.
----------------
jayfoad wrote:

> I think the point here is that from GFX11+ there are actually no hazards that are detected as part of MI scheduling.

How did you infer that? Do you mean that none of the hazards that are handled by `GCNHazardRecognizer::getHazardType` are enabled on GFX11+? I don't really understand the different entrypoints into `GCNHazardRecognizer` and why they handle different sets of hazards.

But anyway _not_ handling hazards in the post-RA scheduler should at least be safe, since they will all be handled later by the standalone hazard recognizer pass.

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


More information about the llvm-commits mailing list