[llvm] [AArch64] Support instruction fusion for MCA (PR #215789)
Andrew Savonichev via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 02:10:06 PDT 2026
asavonic wrote:
> A simple example of how things can drift is the fact that many macro fusions currently exist on AArch64 backend but miss in this patch.
Of course. My point is that it is easy to add missing cases. It takes more effort to go through the tests and verify that MCA results align with hardware. Hence why I only added patterns that I could verify.
> I think the way forward might be trying enhance TableGen to better support this use case, and other backends while expanding its adoption.
Current TableGen backend for MacroFusion is implemented for MachineInst API and ScheduleDAG. It relies on features that MCA does not have, or they do not make sense for MCA, like `RunPreRA`. If someone can redesign TableGen MacroFusion to be generic enough and still express all we need, that would be great. Then we can generate the same predicate functions, and replace hand-written ones.
Until then, can we proceed with the current approach? Is integration to MCA through `CustomBehaviour::getFusionPredicates` and `MicroOpQueueStage` suitable, or we want something else?
https://github.com/llvm/llvm-project/pull/215789
More information about the llvm-commits
mailing list