[all-commits] [llvm/llvm-project] d464ed: [X86][Win64] Avoid statepoints prior to SEH epilogue
zero9178 via All-commits
all-commits at lists.llvm.org
Wed Feb 15 13:47:43 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d464edde9571817fbaa02f07082c3fdde22aebbc
https://github.com/llvm/llvm-project/commit/d464edde9571817fbaa02f07082c3fdde22aebbc
Author: Markus Böck <markus.boeck02 at gmail.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M llvm/lib/Target/X86/X86MCInstLower.cpp
M llvm/test/CodeGen/X86/win64-seh-epilogue-statepoint.ll
Log Message:
-----------
[X86][Win64] Avoid statepoints prior to SEH epilogue
This patchs purpose is very similar to https://reviews.llvm.org/D119644
The gist of the issue is that SEH unwinding has certain invariants around call instructions. One of those is that a call instruction must not be immediately followed by the function epilogue. Failing to do so leads to Windows' unwinder not recognizing the frame and skipping it when unwinding the stack.
LLVM ensures this invariant by inserting a noop after a call prior to an epilogue. The implementation however, makes the unfortunate assumption that pseudo instructions may not be calls, leading to statepoints being skipped and no noop being inserted.
This patch fixes that issue by only skipping over pseudo instructions that aren't calls.
Differential Revision: https://reviews.llvm.org/D143812
More information about the All-commits
mailing list