@@ -16,15 +16,15 @@ Introduction
16
16
is most likely incomplete. It is possible to list passes known by the opt
17
17
tool using ``opt -print-passes ``.
18
18
19
- This document serves as a high level summary of the optimization features that
19
+ This document serves as a high- level summary of the optimization features that
20
20
LLVM provides. Optimizations are implemented as Passes that traverse some
21
21
portion of a program to either collect information or transform the program.
22
22
The table below divides the passes that LLVM provides into three categories.
23
23
Analysis passes compute information that other passes can use or for debugging
24
24
or program visualization purposes. Transform passes can use (or invalidate)
25
25
the analysis passes. Transform passes all mutate the program in some way.
26
- Utility passes provides some utility but don't otherwise fit categorization.
27
- For example passes to extract functions to bitcode or write a module to bitcode
26
+ Utility passes provide some utility but don't otherwise fit categorization.
27
+ For example, passes to extract functions to bitcode or write a module to bitcode
28
28
are neither analysis nor transform passes. The table of contents above
29
29
provides a quick summary of each pass and links to the more complete pass
30
30
description later in the document.
@@ -61,7 +61,7 @@ Yet to be written.
61
61
``da ``: Dependence Analysis
62
62
---------------------------
63
63
64
- Dependence analysis framework, which is used to detect dependences in memory
64
+ Dependence analysis framework, which is used to detect dependencies in memory
65
65
accesses.
66
66
67
67
``domfrontier ``: Dominance Frontier Construction
@@ -90,7 +90,7 @@ postscript or some other suitable format.
90
90
This pass, only available in ``opt ``, prints the control flow graph into a
91
91
``.dot `` graph. This graph can then be processed with the :program: `dot ` tool
92
92
to convert it to postscript or some other suitable format.
93
- Additionally the ``-cfg-func-name=<substring> `` option can be used to filter the
93
+ Additionally, the ``-cfg-func-name=<substring> `` option can be used to filter the
94
94
functions that are printed. All functions that contain the specified substring
95
95
will be printed.
96
96
@@ -101,7 +101,7 @@ This pass, only available in ``opt``, prints the control flow graph into a
101
101
``.dot `` graph, omitting the function bodies. This graph can then be processed
102
102
with the :program: `dot ` tool to convert it to postscript or some other suitable
103
103
format.
104
- Additionally the ``-cfg-func-name=<substring> `` option can be used to filter the
104
+ Additionally, the ``-cfg-func-name=<substring> `` option can be used to filter the
105
105
functions that are printed. All functions that contain the specified substring
106
106
will be printed.
107
107
@@ -240,7 +240,7 @@ standard error in a human-readable form.
240
240
---------------------------------------------------
241
241
242
242
This pass, only available in ``opt ``, prints the SCCs of each function CFG to
243
- standard error in a human-readable fom .
243
+ standard error in a human-readable form .
244
244
245
245
``function(print) ``: Print function to stderr
246
246
---------------------------------------------
@@ -486,7 +486,7 @@ Bottom-up inlining of functions into callees.
486
486
``instcombine ``: Combine redundant instructions
487
487
-----------------------------------------------
488
488
489
- Combine instructions to form fewer, simple instructions. This pass does not
489
+ Combine instructions to form fewer, simpler instructions. This pass does not
490
490
modify the CFG. This pass is where algebraic simplification happens.
491
491
492
492
This pass combines things like:
@@ -502,7 +502,7 @@ into:
502
502
503
503
%Z = add i32 %X, 2
504
504
505
- This is a simple worklist driven algorithm.
505
+ This is a simple worklist- driven algorithm.
506
506
507
507
This pass guarantees that the following canonicalizations are performed on the
508
508
program:
@@ -532,9 +532,9 @@ library calls on different targets.
532
532
``aggressive-instcombine ``: Combine expression patterns
533
533
--------------------------------------------------------
534
534
535
- Combine expression patterns to form expressions with fewer, simple instructions.
535
+ Combine expression patterns to form expressions with fewer, simpler instructions.
536
536
537
- For example, this pass reduce width of expressions post-dominated by TruncInst
537
+ For example, this pass reduces the width of expressions post-dominated by `` TruncInst ``
538
538
into smaller width when applicable.
539
539
540
540
It differs from instcombine pass in that it can modify CFG and contains pattern
@@ -722,7 +722,7 @@ determine the trip counts of loops easily.
722
722
---------------------------------------------
723
723
724
724
This pass implements a simple unroll and jam classical loop optimisation pass.
725
- It transforms loop from:
725
+ It transforms a loop from:
726
726
727
727
.. code-block :: c++
728
728
@@ -799,11 +799,11 @@ This pass looks for equivalent functions that are mergeable and folds them.
799
799
800
800
Total-ordering is introduced among the functions set: we define comparison
801
801
that answers for every two functions which of them is greater. It allows to
802
- arrange functions into the binary tree.
802
+ arrange functions into a binary tree.
803
803
804
- For every new function we check for equivalent in tree.
804
+ For every new function we check for equivalent in the tree.
805
805
806
- If equivalent exists we fold such functions. If both functions are overridable,
806
+ If equivalent exists, we fold such functions. If both functions are overridable,
807
807
we move the functionality into a new internal function and leave two
808
808
overridable thunks to it.
809
809
@@ -838,7 +838,7 @@ For example: 4 + (x + 5) ⇒ x + (4 + 5)
838
838
839
839
In the implementation of this algorithm, constants are assigned rank = 0,
840
840
function arguments are rank = 1, and other values are assigned ranks
841
- corresponding to the reverse post order traversal of current function (starting
841
+ corresponding to the reverse post- order traversal of the current function (starting
842
842
at 2), which effectively gives values in deep loops higher rank than values not
843
843
in loops.
844
844
@@ -1019,7 +1019,7 @@ noisy.
1019
1019
``verify ``: Module Verifier
1020
1020
---------------------------
1021
1021
1022
- Verifies an LLVM IR code. This is useful to run after an optimization which is
1022
+ Verifies LLVM IR code. This is useful to run after an optimization which is
1023
1023
undergoing testing. Note that llvm-as verifies its input before emitting
1024
1024
bitcode, and also that malformed bitcode is likely to make LLVM crash. All
1025
1025
language front-ends are therefore encouraged to verify their output before
@@ -1059,7 +1059,7 @@ instead just tries to ensure that code is well-formed.
1059
1059
----------------------------------
1060
1060
1061
1061
Displays the control flow graph using the GraphViz tool.
1062
- Additionally the ``-cfg-func-name=<substring> `` option can be used to filter the
1062
+ Additionally, the ``-cfg-func-name=<substring> `` option can be used to filter the
1063
1063
functions that are displayed. All functions that contain the specified substring
1064
1064
will be displayed.
1065
1065
@@ -1068,7 +1068,7 @@ will be displayed.
1068
1068
1069
1069
Displays the control flow graph using the GraphViz tool, but omitting function
1070
1070
bodies.
1071
- Additionally the ``-cfg-func-name=<substring> `` option can be used to filter the
1071
+ Additionally, the ``-cfg-func-name=<substring> `` option can be used to filter the
1072
1072
functions that are displayed. All functions that contain the specified substring
1073
1073
will be displayed.
1074
1074
0 commit comments