[all-commits] [llvm/llvm-project] 99e50e: [WinEH][ARM64] Split Unwind Info for Fucntions Lar...

Zhaoshi Zheng via All-commits all-commits at lists.llvm.org
Fri Aug 5 12:01:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 99e50e583867ac35ace36f5da50b3a3ff7c51d2e
      https://github.com/llvm/llvm-project/commit/99e50e583867ac35ace36f5da50b3a3ff7c51d2e
  Author: Zhaoshi Zheng <zhaoshiz at quicinc.com>
  Date:   2022-08-05 (Fri, 05 Aug 2022)

  Changed paths:
    M llvm/include/llvm/MC/MCWinEH.h
    M llvm/lib/MC/MCWin64EH.cpp
    A llvm/test/MC/AArch64/seh-large-func-multi-epilog.s
    A llvm/test/MC/AArch64/seh-large-func.s
    M llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp

  Log Message:
  -----------
  [WinEH][ARM64] Split Unwind Info for Fucntions Larger than 1MB

Create function segments and emit unwind info of them.

A segment must be less than 1MB and no prolog or epilog is splitted between two
segments.

This patch should generate correct, though not optimal, unwind info for large
functions. Currently it only generate pacted info (.pdata) only for functions
that are less than 1MB (single-segment functions). This is NFC from before this
patch.

The next step is to enable (.pdata) only unwind info for the first segment or
segments that have neither prolog or epilog in a multi-segment function.

Another future work item is to further split segments that require more than 255
code words or have more than 65535 epilogs.

Reference:
https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling#function-fragments

Differential Revision: https://reviews.llvm.org/D130049




More information about the All-commits mailing list