@@ -7,6 +7,9 @@ LLVM's Analysis and Transform Passes
7
7
8
8
Introduction
9
9
============
10
+ .. warning :: This document is not updated frequently, and the list of passes
11
+ is most likely incomplete. It is possible to list passes known by the opt
12
+ tool using ``opt -print-passes ``.
10
13
11
14
This document serves as a high level summary of the optimization features that
12
15
LLVM provides. Optimizations are implemented as Passes that traverse some
@@ -193,15 +196,12 @@ memory operations it depends on. It builds on alias analysis information, and
193
196
tries to provide a lazy, caching interface to a common kind of alias
194
197
information query.
195
198
196
- ``module-debuginfo ``: Decodes module-level debug info
197
- -----------------------------------------------------
199
+ ``print< module-debuginfo> ``: Decodes module-level debug info
200
+ ------------------------------------------------------------
198
201
199
- This pass decodes the debug info metadata in a module and prints in a
202
+ This pass decodes the debug info metadata in a module and prints it to standard output in a
200
203
(sufficiently-prepared-) human-readable form.
201
204
202
- For example, run this pass from ``opt `` along with the ``-analyze `` option, and
203
- it'll print to standard output.
204
-
205
205
``postdomtree ``: Post-Dominator Tree Construction
206
206
-------------------------------------------------
207
207
@@ -228,18 +228,18 @@ standard error in a human-readable form.
228
228
``print-cfg-sccs ``: Print SCCs of each function CFG
229
229
---------------------------------------------------
230
230
231
- This pass, only available in ``opt ``, printsthe SCCs of each function CFG to
231
+ This pass, only available in ``opt ``, prints the SCCs of each function CFG to
232
232
standard error in a human-readable fom.
233
233
234
- ``print- function ``: Print function to stderr
235
- --------------------------------------------
234
+ ``function(print) ``: Print function to stderr
235
+ ---------------------------------------------
236
236
237
237
The ``PrintFunctionPass `` class is designed to be pipelined with other
238
238
``FunctionPasses ``, and prints out the functions of the module as they are
239
239
processed.
240
240
241
- ``print- module ``: Print module to stderr
242
- ----------------------------------------
241
+ ``module(print) ``: Print module to stderr
242
+ -----------------------------------------
243
243
244
244
This pass simply prints out the entire module when it is executed.
245
245
@@ -924,17 +924,8 @@ code size or making it harder to reverse engineer code.
924
924
``strip-dead-debug-info ``: Strip debug info for unused symbols
925
925
--------------------------------------------------------------
926
926
927
- .. FIXME: this description is the same as for -strip
928
-
929
- performs code stripping. this transformation can delete:
930
-
931
- * names for virtual registers
932
- * symbols for internal globals and functions
933
- * debug information
934
-
935
- note that this transformation makes code much less readable, so it should only
936
- be used in situations where the strip utility would be used, such as reducing
937
- code size or making it harder to reverse engineer code.
927
+ Performs code stripping. Similar to strip, but only strips debug info for
928
+ unused symbols.
938
929
939
930
``strip-dead-prototypes ``: Strip Unused Function Prototypes
940
931
-----------------------------------------------------------
@@ -947,32 +938,13 @@ functions).
947
938
``strip-debug-declare ``: Strip all ``llvm.dbg.declare `` intrinsics
948
939
------------------------------------------------------------------
949
940
950
- .. FIXME: this description is the same as for -strip
951
-
952
- This pass implements code stripping. Specifically, it can delete:
953
-
954
- #. names for virtual registers
955
- #. symbols for internal globals and functions
956
- #. debug information
957
-
958
- Note that this transformation makes code much less readable, so it should only
959
- be used in situations where the 'strip' utility would be used, such as reducing
960
- code size or making it harder to reverse engineer code.
941
+ Performs code stripping. Similar to strip, but only strips
942
+ ``llvm.dbg.declare `` intrinsics.
961
943
962
944
``strip-nondebug ``: Strip all symbols, except dbg symbols, from a module
963
945
------------------------------------------------------------------------
964
946
965
- .. FIXME: this description is the same as for -strip
966
-
967
- This pass implements code stripping. Specifically, it can delete:
968
-
969
- #. names for virtual registers
970
- #. symbols for internal globals and functions
971
- #. debug information
972
-
973
- Note that this transformation makes code much less readable, so it should only
974
- be used in situations where the 'strip' utility would be used, such as reducing
975
- code size or making it harder to reverse engineer code.
947
+ Performs code stripping. Similar to strip, but dbg info is preserved.
976
948
977
949
``tailcallelim ``: Tail Call Elimination
978
950
---------------------------------------
0 commit comments