Remove LowerInvoke's obsolete "-enable-correct-eh-support" option

This option caused LowerInvoke to generate code using SJLJ-based
exception handling, but there is no code left that interprets the
jmp_buf stack that the resulting code maintained (llvm.sjljeh.jblist).
This option has been obsolete for a while, and replaced by
SjLjEHPrepare.

This leaves the default behaviour of LowerInvoke, which is to convert
invokes to calls.

Differential Revision: http://llvm-reviews.chandlerc.com/D3136

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204388 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mark Seaborn
2014-03-20 19:54:47 +00:00
parent 56210e69eb
commit 9bb9615e1f
11 changed files with 18 additions and 644 deletions

View File

@@ -112,11 +112,6 @@ End-user Options
optimizations allow the code generator to make use of some instructions which
would otherwise not be usable (such as ``fsin`` on X86).
.. option:: --enable-correct-eh-support
Instruct the **lowerinvoke** pass to insert code for correct exception
handling support. This is expensive and is by default omitted for efficiency.
.. option:: --stats
Print statistics recorded by code-generation passes.

View File

@@ -190,12 +190,6 @@ CODE GENERATION OPTIONS
**-enable-correct-eh-support**
Make the -lowerinvoke pass insert expensive, but correct, EH code.
**-jit-enable-eh**
Exception handling should be enabled in the just-in-time compiler.

View File

@@ -893,33 +893,14 @@ this would require knowledge of the entire call graph of the program including
any libraries which may not be available in bitcode form); it simply lowers
every atomic intrinsic.
``-lowerinvoke``: Lower invoke and unwind, for unwindless code generators
-------------------------------------------------------------------------
``-lowerinvoke``: Lower invokes to calls, for unwindless code generators
------------------------------------------------------------------------
This transformation is designed for use by code generators which do not yet
support stack unwinding. This pass supports two models of exception handling
lowering, the "cheap" support and the "expensive" support.
"Cheap" exception handling support gives the program the ability to execute any
program which does not "throw an exception", by turning "``invoke``"
instructions into calls and by turning "``unwind``" instructions into calls to
``abort()``. If the program does dynamically use the "``unwind``" instruction,
the program will print a message then abort.
"Expensive" exception handling support gives the full exception handling
support to the program at the cost of making the "``invoke``" instruction
really expensive. It basically inserts ``setjmp``/``longjmp`` calls to emulate
the exception handling as necessary.
Because the "expensive" support slows down programs a lot, and EH is only used
for a subset of the programs, it must be specifically enabled by the
``-enable-correct-eh-support`` option.
Note that after this pass runs the CFG is not entirely accurate (exceptional
control flow edges are not correct anymore) so only very simple things should
be done after the ``lowerinvoke`` pass has run (like generation of native
code). This should not be used as a general purpose "my LLVM-to-LLVM pass
doesn't support the ``invoke`` instruction yet" lowering pass.
support stack unwinding. This pass converts ``invoke`` instructions to
``call`` instructions, so that any exception-handling ``landingpad`` blocks
become dead code (which can be removed by running the ``-simplifycfg`` pass
afterwards).
``-lowerswitch``: Lower ``SwitchInst``\ s to branches
-----------------------------------------------------