================
@@ -1409,10 +1428,17 @@ StackOffset
AArch64FrameLowering::resolveFrameOffsetReference(
isTargetWindows(MF) && AFI->getSVECalleeSavedStackSize();
if (isSVE) {
+ StackOffset AccessOffset{};
----------------
sdesmalen-arm wrote:
I found this logic quite difficult to follow without any comments to explain
it. If it would have been written like something like below, it would have made
it easier to follow:
```
StackOffset FPOffset = ...;
StackOffset SPOffset = ...;
// ObjectOffset assumes ZPR and PPR are allocated together and does not account
for
// for the split, so we must adjust the offsets.
if (AFI->hasSplitSVEObjects() && MFI.getStackID(FI) ==
TargetStackID::ScalableVector) {
// Accessing the SVE area from FP, requires jumping over/offsetting by the
predicate area.
FPOffset -= PPRStackSize;
// SVEStackSize includes both predicates and data-vectors, so must subtract
predicate size.
}
```
Maybe that's subjective, but I think extra comments definitely help.
https://github.com/llvm/llvm-project/pull/142392
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits