[SEH] Reimplement x64 SEH using WinEHPrepare
authorReid Kleckner <reid@kleckner.net>
Fri, 17 Apr 2015 01:01:27 +0000 (01:01 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 17 Apr 2015 01:01:27 +0000 (01:01 +0000)
commit9dea1d0d01f611d15fe4963d2241bc10546a243f
tree1d7e27e5ef6bbc29ed25dd325c819e6906195d1d
parent02916381eb87518ba6d541b065141a72b60561da
[SEH] Reimplement x64 SEH using WinEHPrepare

This now emits simple, unoptimized xdata tables for __C_specific_handler
based on the handlers listed in @llvm.eh.actions calls produced by
WinEHPrepare.

This adds support for running __finally blocks when exceptions are
thrown, and removes the old landingpad fan-in codepath.

I ran some manual execution tests on small basic test cases with and
without optimization, as well as on Chrome base_unittests, which uses a
small amount of SEH.  I'm sure there are bugs, and we may need to
revert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235154 91177308-0d34-0410-b5e6-96231b3b80d8
19 files changed:
include/llvm/CodeGen/FunctionLoweringInfo.h
include/llvm/CodeGen/MachineModuleInfo.h
include/llvm/CodeGen/SelectionDAGISel.h
lib/CodeGen/AsmPrinter/Win64Exception.cpp
lib/CodeGen/MachineModuleInfo.cpp
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/WinEH/seh-catch-all.ll
test/CodeGen/WinEH/seh-inlined-finally.ll
test/CodeGen/WinEH/seh-outlined-finally.ll
test/CodeGen/WinEH/seh-prepared-basic.ll [new file with mode: 0644]
test/CodeGen/WinEH/seh-simple.ll
test/CodeGen/X86/seh-basic.ll [deleted file]
test/CodeGen/X86/seh-except-finally.ll [new file with mode: 0644]
test/CodeGen/X86/seh-filter.ll [deleted file]
test/CodeGen/X86/seh-finally.ll
test/CodeGen/X86/seh-safe-div.ll
test/CodeGen/X86/win_eh_prepare.ll