@@ -16,15 +16,15 @@ Introduction
1616 is most likely incomplete. It is possible to list passes known by the opt
1717 tool using ``opt -print-passes ``.
1818
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
2020LLVM provides. Optimizations are implemented as Passes that traverse some
2121portion of a program to either collect information or transform the program.
2222The table below divides the passes that LLVM provides into three categories.
2323Analysis passes compute information that other passes can use or for debugging
2424or program visualization purposes. Transform passes can use (or invalidate)
2525the 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
2828are neither analysis nor transform passes. The table of contents above
2929provides a quick summary of each pass and links to the more complete pass
3030description later in the document.
@@ -61,7 +61,7 @@ Yet to be written.
6161``da ``: Dependence Analysis
6262---------------------------
6363
64- Dependence analysis framework, which is used to detect dependences in memory
64+ Dependence analysis framework, which is used to detect dependencies in memory
6565accesses.
6666
6767``domfrontier ``: Dominance Frontier Construction
@@ -90,7 +90,7 @@ postscript or some other suitable format.
9090This pass, only available in ``opt ``, prints the control flow graph into a
9191``.dot `` graph. This graph can then be processed with the :program: `dot ` tool
9292to 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
9494functions that are printed. All functions that contain the specified substring
9595will be printed.
9696
@@ -101,7 +101,7 @@ This pass, only available in ``opt``, prints the control flow graph into a
101101``.dot `` graph, omitting the function bodies. This graph can then be processed
102102with the :program: `dot ` tool to convert it to postscript or some other suitable
103103format.
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
105105functions that are printed. All functions that contain the specified substring
106106will be printed.
107107
@@ -240,7 +240,7 @@ standard error in a human-readable form.
240240---------------------------------------------------
241241
242242This 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 .
244244
245245``function(print) ``: Print function to stderr
246246---------------------------------------------
@@ -486,7 +486,7 @@ Bottom-up inlining of functions into callees.
486486``instcombine ``: Combine redundant instructions
487487-----------------------------------------------
488488
489- Combine instructions to form fewer, simple instructions. This pass does not
489+ Combine instructions to form fewer, simpler instructions. This pass does not
490490modify the CFG. This pass is where algebraic simplification happens.
491491
492492This pass combines things like:
@@ -502,7 +502,7 @@ into:
502502
503503 %Z = add i32 %X, 2
504504
505- This is a simple worklist driven algorithm.
505+ This is a simple worklist- driven algorithm.
506506
507507This pass guarantees that the following canonicalizations are performed on the
508508program:
@@ -532,9 +532,9 @@ library calls on different targets.
532532``aggressive-instcombine ``: Combine expression patterns
533533--------------------------------------------------------
534534
535- Combine expression patterns to form expressions with fewer, simple instructions.
535+ Combine expression patterns to form expressions with fewer, simpler instructions.
536536
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 ``
538538into smaller width when applicable.
539539
540540It differs from instcombine pass in that it can modify CFG and contains pattern
@@ -722,7 +722,7 @@ determine the trip counts of loops easily.
722722---------------------------------------------
723723
724724This pass implements a simple unroll and jam classical loop optimisation pass.
725- It transforms loop from:
725+ It transforms a loop from:
726726
727727.. code-block :: c++
728728
@@ -799,11 +799,11 @@ This pass looks for equivalent functions that are mergeable and folds them.
799799
800800Total-ordering is introduced among the functions set: we define comparison
801801that 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.
803803
804- For every new function we check for equivalent in tree.
804+ For every new function we check for equivalent in the tree.
805805
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,
807807we move the functionality into a new internal function and leave two
808808overridable thunks to it.
809809
@@ -838,7 +838,7 @@ For example: 4 + (x + 5) ⇒ x + (4 + 5)
838838
839839In the implementation of this algorithm, constants are assigned rank = 0,
840840function 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
842842at 2), which effectively gives values in deep loops higher rank than values not
843843in loops.
844844
@@ -1019,7 +1019,7 @@ noisy.
10191019``verify ``: Module Verifier
10201020---------------------------
10211021
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
10231023undergoing testing. Note that llvm-as verifies its input before emitting
10241024bitcode, and also that malformed bitcode is likely to make LLVM crash. All
10251025language front-ends are therefore encouraged to verify their output before
@@ -1059,7 +1059,7 @@ instead just tries to ensure that code is well-formed.
10591059----------------------------------
10601060
10611061Displays 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
10631063functions that are displayed. All functions that contain the specified substring
10641064will be displayed.
10651065
@@ -1068,7 +1068,7 @@ will be displayed.
10681068
10691069Displays the control flow graph using the GraphViz tool, but omitting function
10701070bodies.
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
10721072functions that are displayed. All functions that contain the specified substring
10731073will be displayed.
10741074
0 commit comments