[llvm] [AArch64] Disable Pre-RA Scheduler for Neoverse V2 (PR #127784)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 01:56:01 PST 2025


https://github.com/davemgreen commented:

This doesn't feel to me like the right approach - in that if it was randomly right or wrong before it will still be randomly right or wrong, not always right (or more likely to be right, heuristics being what they are). I agree that scheduling for register pressure is the most important thing to consider, but there are times when scheduling on OoO can be helpful (out of a mis-predict for example, where you need to get instructions through the pipeline as efficiently as possible).

But it appears this might be running into problems at the moment. Disabling enableMachineScheduler() starts to enable some scheduling out of SDAG, and that might be hitting crashed now. (You could say that if it was scheduling out of SDAG for register pressure then we don't need to alter the scheduling later on, it looked like it was trying hybrid at the moment). There is a chance this works differently to specifying the option, can you give it another test?

The best way to test perf might be to check the codesize (at -O3). It is the number of dynamically executed spills that is likely the most important, but codesize can be a proxy for the number of spills. Is it possible to add a test case for the problem you saw where no scheduling was better than with? We have seen a case recently where in-order scheduling was accidentally better than OoO, but I don't believe that the default order worked well there either.

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


More information about the llvm-commits mailing list