[PATCH] D87371: [MC] [Win64EH] Try to generate packed unwind info where possible

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 05:07:11 PDT 2020


mstorsjo added inline comments.


================
Comment at: llvm/lib/MC/MCWin64EH.cpp:1119
   Streamer.SwitchSection(XData);
-  ARM64EmitUnwindInfo(Streamer, info);
+  ARM64EmitUnwindInfo(Streamer, info, false);
 }
----------------
The `false` parameter (to the parameter `TryPacked`) here was the reason why this didn't match anything for real code generation. With D87448 in place, we don't call this needlessly.

Alternatively, we could remove the `TryPacked` parameter, and just look at `info->HandlesExceptions` (as we already do). In that case, a plain `.seh_handlerdata` wouldn't skip making packed info, but that feels a bit risky (as `.seh_handlerdata` implies switching to the xdata section, supposedly after emitting the preceding unwind info there). But then again, if there's no unwind handler set, nothing would be able to find the trailing data written to the xdata section anyway? So maybe we could just remove this extra check as well?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87371/new/

https://reviews.llvm.org/D87371



More information about the llvm-commits mailing list