[llvm] [AArch64] Restore Z-registers before P-registers (PR #79623)
Sander de Smalen via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 08:06:47 PST 2024
================
@@ -3201,11 +3196,27 @@ bool AArch64FrameLowering::restoreCalleeSavedRegisters(
return true;
}
+ // For performance reasons restore SVE register in increasing order
+ auto PPRBegin =
+ std::find_if(RegPairs.begin(), RegPairs.end(), [](const RegPairInfo &c) {
+ return c.Type == RegPairInfo::PPR;
+ });
----------------
sdesmalen-arm wrote:
nit:
```suggestion
auto IsPPR = [](const RegPairInfo &c) { return c.Type == RegPairInfo::PPR; };
auto PPRBegin = std::find_if(RegPairs.begin(), RegPairs.end(), IsPPR);
auto PPREnd = std::find_if(RegPairs.rbegin(), RegPairs.rend(), IsPPR);
```
(same suggestion for ZPR)
https://github.com/llvm/llvm-project/pull/79623
More information about the llvm-commits
mailing list