X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FPasses.rst;h=a288933b7bc1fb2de207e8b8eca5beaf33fb2913;hb=dd2d4303527c4be7d5a050f1cc11831e76114181;hp=d279eca3afb65ac3c9c41f57dd249074242b2265;hpb=8256a98847ea90fae11ee95a0a3089e60f623b84;p=oota-llvm.git diff --git a/docs/Passes.rst b/docs/Passes.rst index d279eca3afb..a288933b7bc 100644 --- a/docs/Passes.rst +++ b/docs/Passes.rst @@ -476,7 +476,7 @@ transformation obviously invalidates the CFG, but can update forward dominator ------------------------------------------------- This pass munges the code in the input function to better prepare it for -SelectionDAG-based code generation. This works around limitations in it's +SelectionDAG-based code generation. This works around limitations in its basic-block-at-a-time approach. It should eventually be removed. ``-constmerge``: Merge Duplicate Global Constants @@ -490,7 +490,7 @@ string is available. ``-constprop``: Simple constant propagation ------------------------------------------- -This file implements constant propagation and merging. It looks for +This pass implements constant propagation and merging. It looks for instructions involving only constant operands and replaces them with a constant value instead of an instruction. For example: @@ -505,8 +505,8 @@ becomes i32 3 NOTE: this pass has a habit of making definitions be dead. It is a good idea -to to run a :ref:`Dead Instruction Elimination ` pass sometime -after running this pass. +to run a :ref:`Dead Instruction Elimination ` pass sometime after +running this pass. .. _passes-dce: @@ -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 ----------------------------------------------------- @@ -1037,7 +1018,7 @@ as: * Proves conditional branches to be unconditional Note that this pass has a habit of making definitions be dead. It is a good -idea to to run a :ref:`DCE ` pass sometime after running this pass. +idea to run a :ref:`DCE ` pass sometime after running this pass. ``-simplify-libcalls``: Simplify well-known library calls ---------------------------------------------------------