[PATCH] EH: Prune unreachable resume instructions during Dwarf EH preparation
Reid Kleckner
rnk at google.com
Wed Feb 18 17:38:35 PST 2015
Hi majnemer,
Today a simple function that only catches exceptions and doesn't run
destructor cleanups ends up containing a dead call to _Unwind_Resume
(PR20300). We can't remove these dead resume instructions during normal
optimization because inlining might introduce additional landingpads
that do have cleanups to run. Instead we can do this during EH
preparation, which is guaranteed to run after inlining.
Fixes PR20300.
http://reviews.llvm.org/D7744
Files:
include/llvm/CodeGen/Passes.h
lib/CodeGen/CodeGen.cpp
lib/CodeGen/DwarfEHPrepare.cpp
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/Mips/eh.ll
test/CodeGen/X86/dwarf-eh-prepare.ll
test/CodeGen/X86/gcc_except_table.ll
test/CodeGen/X86/gcc_except_table_functions.ll
test/CodeGen/XCore/exception.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7744.20244.patch
Type: text/x-patch
Size: 17638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150219/33699664/attachment.bin>
More information about the llvm-commits
mailing list