diff options
author | Benjamin Maxwell <benjamin.maxwell@arm.com> | 2025-07-09 10:55:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-09 10:55:33 +0100 |
commit | c3d9f31b11eb3db5591e21cb9d6def98d39c1cb1 (patch) | |
tree | 21bce6309c5a0bf5e69c56f46eb57f97f49a1dcd /llvm/lib/CodeGen/CodeGen.cpp | |
parent | d3d4066409c4da9e002a41c03ce226fea3e6dc00 (diff) | |
download | llvm-c3d9f31b11eb3db5591e21cb9d6def98d39c1cb1.zip llvm-c3d9f31b11eb3db5591e21cb9d6def98d39c1cb1.tar.gz llvm-c3d9f31b11eb3db5591e21cb9d6def98d39c1cb1.tar.bz2 |
[AArch64][SVE] Avoid using the SVE stack size before it is determined (#147561)
This patch adds asserts to `getStackSizeSVE()` and
`getSVECalleeSavedStackSize()` to check they are only called after the
SVE stack size has been determined.
This patch then fixes issues in three places:
* `AArch64FrameLowering::homogeneousPrologEpilog()`
- This function is called before callee saves or SVE stack sizes have
been determined
- This check has been updated to use `isLikelyToHaveSVEStack()`
- `isLikelyToHaveSVEStack()` conservatively returns if a function is
likely to have an SVE stack
* `produceCompactUnwindFrame()`
- This function checked the SVE CS stack size before callee-saves had
been determined
- This has been replaced with a more conservative `isSVECC()` check
* `AArch64FrameLowering::resolveFrameOffsetReference()`
- This was hit by some post-PEI MIR tests
- This case was fixed by adding "stackSizeSVE" to the YAML for
`AArch64FunctionInfo`
Diffstat (limited to 'llvm/lib/CodeGen/CodeGen.cpp')
0 files changed, 0 insertions, 0 deletions