[all-commits] [llvm/llvm-project] 2c9e14: [AArch64][SME] Avoid ZA save state changes in loop...
Benjamin Maxwell via All-commits
all-commits at lists.llvm.org
Thu Jul 17 02:58:52 PDT 2025
Branch: refs/heads/users/MacDue/sme-loops
Home: https://github.com/llvm/llvm-project
Commit: 2c9e14c536635939b7e162e9277911e73fd84283
https://github.com/llvm/llvm-project/commit/2c9e14c536635939b7e162e9277911e73fd84283
Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
Date: 2025-07-17 (Thu, 17 Jul 2025)
Changed paths:
M llvm/lib/Target/AArch64/AArch64.h
M llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
M llvm/lib/Target/AArch64/MachineSMEABIPass.cpp
A llvm/test/CodeGen/AArch64/sme-lazy-save-in-loop.ll
M llvm/test/CodeGen/AArch64/sme-za-control-flow.ll
Log Message:
-----------
[AArch64][SME] Avoid ZA save state changes in loops in MachineSMEABIPass
This patch uses the MachineLoopInfo to give blocks within loops a higher
weight when choosing the bundle ZA state. MachineLoopInfo does not find
loop trip counts, so this uses an arbitrary weight (default 10), which
can be configured with the `-aarch64-sme-abi-loop-edge-weight` flag.
This makes the MachineSMEABIPass pass more likely to pick a bundle state
that matches the loop's entry/exit state, which avoids state changes in
the loop (which we assume will happen more than once).
This does require some extra analysis, so this is only enabled at -O1
and above.
Change-Id: If318c809d2f7cc1fca144fbe424ba2a2ca7fb19f
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list