]> granicus.if.org Git - llvm/commit
Revert [Windows] Disable TrapUnreachable for Win64, add SEH_NoReturn
authorReid Kleckner <rnk@google.com>
Tue, 3 Sep 2019 22:27:27 +0000 (22:27 +0000)
committerReid Kleckner <rnk@google.com>
Tue, 3 Sep 2019 22:27:27 +0000 (22:27 +0000)
commitc567ef3ff1ad5b6a8f85ec86aed4236534051e2a
tree0272f311ac6eb28025a0e4c65b97a676707b805c
parent88aeff1dc71ebe76f697a8fda2b3cc5825bcf202
Revert [Windows] Disable TrapUnreachable for Win64, add SEH_NoReturn

This reverts r370525 (git commit 0bb1630685fba255fa93def92603f064c2ffd203)
Also reverts r370543 (git commit 185ddc08eed6542781040b8499ef7ad15c8ae9f4)

The approach I took only works for functions marked `noreturn`. In
general, a call that is not known to be noreturn may be followed by
unreachable for other reasons. For example, there could be multiple call
sites to a function that throws sometimes, and at some call sites, it is
known to always throw, so it is followed by unreachable. We need to
insert an `int3` in these cases to pacify the Windows unwinder.

I think this probably deserves its own standalone, Win64-only fixup pass
that runs after block placement. Implementing that will take some time,
so let's revert to TrapUnreachable in the mean time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370829 91177308-0d34-0410-b5e6-96231b3b80d8
21 files changed:
lib/Target/X86/X86FrameLowering.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/X86/X86InstrCompiler.td
lib/Target/X86/X86InstrInfo.td
lib/Target/X86/X86MCInstLower.cpp
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/WinEH/wineh-noret-cleanup.ll
test/CodeGen/X86/br-fold.ll
test/CodeGen/X86/catchpad-lifetime.ll
test/CodeGen/X86/catchpad-regmask.ll
test/CodeGen/X86/catchret-regmask.ll
test/CodeGen/X86/empty-function.ll
test/CodeGen/X86/funclet-layout.ll
test/CodeGen/X86/noreturn-call-win64.ll [deleted file]
test/CodeGen/X86/pr24374.ll
test/CodeGen/X86/trap.ll
test/CodeGen/X86/unreachable-trap.ll
test/CodeGen/X86/win64_call_epi.ll
test/CodeGen/X86/win64_eh.ll
test/DebugInfo/COFF/local-variable-gap.ll