mirror-llvm-project/llvm
Feng Zou 9466be2c87
[X86][APX] Fix per-function V3 unwind for EGPR functions on Windows x64 (#212924)
A function that saves a callee-saved EGPR (R16-R31) cannot be encoded with V1/V2 unwind info, so it must use V3 even when the module default stays on V1/V2 (e.g. an APX clone created by auto-dispatch alongside a baseline generic clone). The previous code rejected such functions with a recoverable backend diagnostic ("EGPR (R16-R31) requires V3 unwind info on Windows x64") instead of emitting valid V3 unwind info.

Introduce a single shared predicate, requiresWinX64UnwindV3(MF), that returns true when the whole module is in V3 mode, or when the function needs an unwind table and may use EGPR. It is consumed by X86FrameLowering (SEH prolog/epilog layout), the X86WinEHUnwindV2 pass (which skips such functions), and the X86WinEHUnwindV3 pass (which stamps a per-function .seh_unwindversion 3 on every WinEH frame -- the entry block and each funclet). Also widen the SEH_UnwindVersion pseudo operand from i1imm to i8imm since it holds 1, 2 or 3.
2026-08-01 12:43:17 +08:00
..
benchmarks [ADT] Add single-pass merge for ImmutableSet/ImmutableMap (#209807) 2026-07-21 12:33:28 +01:00
bindings [IR] Remove deprecated BranchInst (#212095) 2026-07-26 19:07:01 +02:00
cmake [Darwin][tests] Partially restore some of the change in #212329 (#212826) 2026-07-29 17:56:05 +00:00
docs [RISCV][MC] Add experimental Smcsps and Sscsps support (#211712) 2026-08-01 11:05:22 +08:00
examples
include [BFI] Simplify irreducible header discovery. NFC (#213213) 2026-07-31 19:04:36 -07:00
lib [X86][APX] Fix per-function V3 unwind for EGPR functions on Windows x64 (#212924) 2026-08-01 12:43:17 +08:00
projects
resources
runtimes [LLVM] Remove 'LLVM_LIBC_GPU_BUILD' logic (#211265) 2026-07-22 11:11:55 -05:00
test [X86][APX] Fix per-function V3 unwind for EGPR functions on Windows x64 (#212924) 2026-08-01 12:43:17 +08:00
tools [IPO] Remove IR Outliner (#211971) 2026-07-31 15:03:31 -07:00
unittests [RISCV][MC] Add experimental Smcsps and Sscsps support (#211712) 2026-08-01 11:05:22 +08:00
utils [IPO] Remove IR Outliner (#211971) 2026-07-31 15:03:31 -07:00
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt [LLVM] Remove 'LLVM_LIBC_GPU_BUILD' logic (#211265) 2026-07-22 11:11:55 -05:00
CMakePresets.json
configure
CREDITS.TXT
LICENSE.TXT
Maintainers.md
README.txt
RELEASE_TESTERS.TXT

The LLVM Compiler Infrastructure
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.md for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.