[all-commits] [llvm/llvm-project] 09aaf5: [RFC][MC][MachO]Only emits compact-unwind format f...

Vy Nguyen via All-commits all-commits at lists.llvm.org
Thu May 18 10:28:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09aaf53a05e3786eea374f3ce57574225036412d
      https://github.com/llvm/llvm-project/commit/09aaf53a05e3786eea374f3ce57574225036412d
  Author: Vy Nguyen <vyng at google.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M clang/include/clang/Basic/CodeGenOptions.def
    M clang/include/clang/Driver/Options.td
    M clang/lib/CodeGen/BackendUtil.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/Driver/femit-dwarf-unwind.c
    M clang/test/Driver/femit-dwarf-unwind.s
    M clang/tools/driver/cc1as_main.cpp
    M lld/MachO/UnwindInfoSection.cpp
    M lld/test/MachO/Inputs/eh-frame-x86_64-r.o
    M lld/test/MachO/compact-unwind-both-local-and-dylib-personality.s
    M lld/test/MachO/compact-unwind-generated.test
    M lld/test/MachO/compact-unwind-lsda-folding.s
    M lld/test/MachO/compact-unwind-stack-ind.s
    M lld/test/MachO/compact-unwind.s
    M lld/test/MachO/eh-frame-personality-dedup.s
    M lld/test/MachO/eh-frame.s
    M lld/test/MachO/icf-only-lsda-folded.s
    M lld/test/MachO/icf.s
    M lld/test/MachO/invalid/compact-unwind-bad-reloc.s
    M lld/test/MachO/invalid/compact-unwind-personalities.s
    M llvm/include/llvm/MC/MCAsmBackend.h
    M llvm/include/llvm/MC/MCContext.h
    M llvm/include/llvm/MC/MCTargetOptions.h
    M llvm/include/llvm/MC/MCTargetOptionsCommandFlags.h
    M llvm/lib/MC/MCAsmBackend.cpp
    M llvm/lib/MC/MCContext.cpp
    M llvm/lib/MC/MCStreamer.cpp
    M llvm/lib/MC/MCTargetOptionsCommandFlags.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
    M llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp
    M llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h
    M llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp
    M llvm/test/CodeGen/X86/2014-08-29-CompactUnwind.ll
    M llvm/test/CodeGen/X86/compact-unwind.ll
    M llvm/test/MC/AArch64/arm64-leaf-compact-unwind.s
    M llvm/test/MC/MachO/AArch64/emit-dwarf-unwind.s
    M llvm/test/MC/MachO/ARM/compact-unwind-armv7k.s
    M llvm/test/MC/X86/compact-unwind.s

  Log Message:
  -----------
  [RFC][MC][MachO]Only emits compact-unwind format for "canonical" personality symbols. For the rest, use DWARFs.

Details: https://github.com/rust-lang/rust/issues/102754

The MachO format uses 2 bits to encode these personality funtions, with 0 reserved for "no-personality".
This means we can only have up to 3 personality. There are already three popular personalities:  __gxx_personality_v0, __gcc_personality_v0, and __objc_personality_v0.
As a result, any system that needs custom-personality will run into a problem.

This patch implemented jyknight's proposal to simply force DWARFs for all non-canonical personality functions.

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




More information about the All-commits mailing list