Benjamin Maxwell c3d9f31b11
[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`
2025-07-09 10:55:33 +01:00
..