[llvm] [AArch64] Fix SVE callee-save layout for nounwind functions on Windows (PR #156467)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 10 02:26:24 PDT 2025


================
@@ -3319,6 +3318,7 @@ static void computeCalleeSaveRegisterPairs(
       ByteOffset += StackFillDir * StackHazardSize;
     LastReg = RPI.Reg1;
 
+    bool NeedsWinCFI = needsWinCFI(MF);
----------------
sdesmalen-arm wrote:

No strong opinion here, but I thought the general preference was to define variables closer to where they are used (although I can't find that being explicitly described in the coding standard). In this case `needsWinCFI` has no side-effects so the compiler can easily figure out the best place to put it.

https://github.com/llvm/llvm-project/pull/156467


More information about the llvm-commits mailing list