[llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 09:20:37 PST 2024


rsandifo-arm wrote:

The mechanism is intended to be more general than simply streaming VL vs non-streaming VL.  It is possible to change the non-streaming VL from one value to another, such as via a linux prctl.  In those cases there would be no way for the unwinder to recover the previous VL unless the previous VL was specifically saved.

So yes, I agree it's unusual to emit code specifically for unwinding purposes, but it seemed like the best compromise.

FWIW, there are already other situations where unwinding constrains code generation.  For example, if a big-endian function follows the SVE PCS and needs to save Z8, it must do the save using ST1D rather than STR, so that the low 64 bits (D8) are laid out as the unwinder expects.  Using ST1D requires a predicate input and has a smaller range, so it isn't the instruction that would naturally be chosen.

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


More information about the llvm-commits mailing list