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

Kerry McLaughlin via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 10 09:37:16 PDT 2024


================
@@ -196,12 +196,14 @@ bool AArch64FunctionInfo::needsAsyncDwarfUnwindInfo(
     const MachineFunction &MF) const {
   if (!NeedsAsyncDwarfUnwindInfo) {
     const Function &F = MF.getFunction();
+    const AArch64FunctionInfo *AFI = MF.getInfo<AArch64FunctionInfo>();
     //  The check got "minsize" is because epilogue unwind info is not emitted
     //  (yet) for homogeneous epilogues, outlined functions, and functions
     //  outlined from.
-    NeedsAsyncDwarfUnwindInfo = needsDwarfUnwindInfo(MF) &&
-                                F.getUWTableKind() == UWTableKind::Async &&
-                                !F.hasMinSize();
+    NeedsAsyncDwarfUnwindInfo =
+        (needsDwarfUnwindInfo(MF) && F.getUWTableKind() == UWTableKind::Async &&
----------------
kmclaughlin-arm wrote:

This PR does include a change to `AArch64FrameLowering::homogeneousPrologEpilog` which disables homogeneous epilogues if the function has streaming-mode changes.

I hadn't considered outlining, but I can see that when considering candidates we must be able to outline all CFI instructions in the function. Am I correct in thinking that this is the reason we would need to disable outlining when there are streaming-mode changes which require async unwind info?

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


More information about the cfe-commits mailing list