[llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 29 16:51:04 PST 2024
efriedma-quic wrote:
It seems weird to be generating actual instructions in the text section for the sake of unwind info, particularly for functions marked "nounwind".
Suppose we have a function that's aarch64_pstate_sm_body or aarch64_pstate_sm_enabled. We can statically determine whether SME is supposed to be enabled at any given point in the function. If we encode that information into the DWARF, the unwinder/debugger can figure it out too.
For aarch64_pstate_sm_compatible, we always have the result of __arm_sme_state saved in some register. (With one minor exception: if we're currently executing code in the function itself or __arm_sme_state, we might not have the value saved yet. But in that case a debugger can directly inspect the PSTATE register).
So if we invent an appropriate DWARF encoding, we should be able to represent all the necessary information without requiring any code at runtime, I think. Given that, what's the advantage of generating code to explicitly compute/spill "VG"?
https://github.com/llvm/llvm-project/pull/83301
More information about the llvm-commits
mailing list