X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FPasses.html;h=bb1a64bd978061edb7fbd999aac2eabf56a76883;hb=befc9c16fae1719cafe9f54ab2b67219db44dc11;hp=3492a2797092ea4338e62da4d8563941a341cfc8;hpb=90a52145aba097dffcf92080975749778201f16c;p=oota-llvm.git diff --git a/docs/Passes.html b/docs/Passes.html index 3492a279709..bb1a64bd978 100644 --- a/docs/Passes.html +++ b/docs/Passes.html @@ -116,7 +116,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -argpromotionPromote 'by reference' arguments to scalars -block-placementProfile Guided Basic Block Placement -break-crit-edgesBreak critical edges in CFG --ceeCorrelated Expression Elimination +-codegenpreparePrepare a function for code generation -condpropConditional Propagation -constmergeMerge Duplicate Global Constants -constpropSimple constant propagation @@ -142,8 +142,10 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -internalizeInternalize Global Symbols -ipconstpropInterprocedural constant propagation -ipsccpInterprocedural Sparse Conditional Constant Propagation +-jump-threadingThread control through conditional blocks -lcssaLoop-Closed SSA Form Pass -licmLoop Invariant Code Motion +-loop-deletionDead Loop Deletion Pass -loop-extractExtract loops into new functions -loop-extract-singleExtract at most one loop into a new function -loop-index-splitIndex Split Loops @@ -152,14 +154,12 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -loop-unrollUnroll loops -loop-unswitchUnswitch loops -loopsimplifyCanonicalize natural loops --lower-packedlowers packed operations to operations on smaller packed datatypes -lowerallocsLower allocations from instructions to calls --lowergcLower GC intrinsics, for GCless code generators -lowerinvokeLower invoke and unwind, for unwindless code generators --lowerselectLower select instructions to branches -lowersetjmpLower Set Jump -lowerswitchLower SwitchInst's to branches -mem2regPromote Memory to Register +-memcpyoptOptimize use of memcpy and friends -mergereturnUnify function exit nodes -predsimplifyPredicate Simplifier -prune-ehRemove unused exception handling info @@ -171,6 +171,8 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -simplify-libcallsSimplify well-known library calls -simplifycfgSimplify the CFG -stripStrip all symbols from a module +-strip-dead-prototypesRemove unused function declarations +-sretpromotionPromote sret arguments -tailcallelimTail Call Elimination -tailduplicateTail Duplication @@ -296,7 +298,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

- Basic Value Numbering (default GVN impl) + Basic Value Numbering (default Value Numbering impl)

@@ -305,6 +307,12 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! lexically identical expressions. This does not require any ahead of time analysis, so it is a very fast default implementation.

+

+ The ValueNumbering analysis passes are mostly deprecated. They are only used + by the Global Common Subexpression Elimination pass, which + is deprecated by the Global Value Numbering pass (which + does its value numbering on its own). +

@@ -739,27 +747,12 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

- Correlated Expression Elimination + Prepare a function for code generation
-

Correlated Expression Elimination propagates information from conditional - branches to blocks dominated by destinations of the branch. It propagates - information from the condition check itself into the body of the branch, - allowing transformations like these for example:

- -
-if (i == 7)
-  ... 4*i;  // constant propagation
-
-M = i+1; N = j+1;
-if (i == j)
-  X = M-N;  // = M-M == 0;
-
- -

This is called Correlated Expression Elimination because we eliminate or - simplify expressions that are correlated with the direction of a branch. In - this way we use static information to give us some information about the - dynamic value of a variable.

+ 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 + basic-block-at-a-time approach. It should eventually be removed.
@@ -872,9 +865,13 @@ if (i == j)

This pass is designed to be a very quick global transformation that eliminates global common subexpressions from a function. It does this by - using an existing value numbering implementation to identify the common + using an existing value numbering analysis pass to identify the common subexpressions, eliminating them when possible.

+

+ This pass is deprecated by the Global Value Numbering pass + (which does a better job with its own value numbering). +

@@ -912,6 +909,10 @@ if (i == j) This pass performs global value numbering to eliminate fully redundant instructions. It also performs simple dead load elimination.

+

+ Note that this pass does the value numbering itself, it does not use the + ValueNumbering analysis passes. +

@@ -929,6 +930,10 @@ if (i == j) live ranges, and should be used with caution on platforms that are very sensitive to register pressure.

+

+ Note that this pass does the value numbering itself, it does not use the + ValueNumbering analysis passes. +

@@ -1181,6 +1186,35 @@ if (i == j)

+ +
+ Thread control through conditional blocks +
+
+

+ Jump threading tries to find distinct threads of control flow running through + a basic block. This pass looks at blocks that have multiple predecessors and + multiple successors. If one or more of the predecessors of the block can be + proven to always cause a jump to one of the successors, we forward the edge + from the predecessor to the successor by duplicating the contents of this + block. +

+

+ An example of when this can occur is code like this: +

+ +
if () { ...
+  X = 4;
+}
+if (X < 3) {
+ +

+ In this case, the unconditional branch at the end of the first if can be + revectored to the false side of the second if. +

+
+
Loop-Closed SSA Form Pass @@ -1246,6 +1280,18 @@ if (i == j) variable.
+ +
+ Dead Loop Deletion Pass +
+
+

+ This file implements the Dead Loop Deletion Pass. This pass is responsible + for eliminating loops with non-infinite computable trip counts that have no + side effects or volatile instructions, and do not contribute to the + computation of the function's return value. +

+
@@ -1388,17 +1434,6 @@ if (i == j)

- -
- lowers packed operations to operations on smaller packed datatypes -
-
-

- Lowers operations on vector datatypes into operations on more primitive vector - datatypes, and finally to scalar operations. -

-
-
Lower allocations from instructions to calls @@ -1415,29 +1450,6 @@ if (i == j)

- -
- Lower GC intrinsics, for GCless code generators -
-
-

- This file implements lowering for the llvm.gc* intrinsics for targets - that do not natively support them (which includes the C backend). Note that - the code generated is not as efficient as it would be for targets that - natively support the GC intrinsics, but it is useful for getting new targets - up-and-running quickly. -

- -

- This pass implements the code transformation described in this paper: -

- -

- "Accurate Garbage Collection in an Uncooperative Environment" - Fergus Henderson, ISMM, 2002 -

-
-
Lower invoke and unwind, for unwindless code generators @@ -1479,25 +1491,6 @@ if (i == j)

- -
- Lower select instructions to branches -
-
-

- Lowers select instructions into conditional branches for targets that do not - have conditional moves or that have not implemented the select instruction - yet. -

- -

- Note that this pass could be improved. In particular it turns every select - instruction into a new conditional branch, even though some common cases have - select instructions on the same predicate next to each other. It would be - better to use the same branch for the whole group of selects. -

-
-
Lower Set Jump @@ -1555,6 +1548,17 @@ if (i == j)

+ +
+ Optimize use of memcpy and friend +
+
+

+ This pass performs various transformations related to eliminating memcpy + calls, or transforming sets of stores into memset's. +

+
+
Unify function exit nodes @@ -1751,6 +1755,42 @@ if (i == j)

+ +
+ Remove unused function declarations +
+
+

+ This pass loops over all of the functions in the input module, looking for + dead declarations and removes them. Dead declarations are declarations of + functions for which no implementation is available (i.e., declarations for + unused library functions). +

+
+ + +
+ Promote sret arguments +
+
+

+ This pass finds functions that return a struct (using a pointer to the struct + as the first argument of the function, marked with the 'sret' attribute) and + replaces them with a new function that simply returns each of the elements of + that struct (using multiple return values). +

+ +

+ This pass works under a number of conditions: +

+ + +
+
Tail Call Elimination @@ -1864,7 +1904,7 @@ if (i == j)
  • The code is in valid SSA form.
  • It should be illegal to put a label into any other type (like a structure) or to return one. [except constant arrays!]
  • -
  • Only phi nodes can be self referential: %x = add int %x, %x is +
  • Only phi nodes can be self referential: %x = add i32 %x, %x is invalid.
  • PHI nodes must have an entry for each predecessor, with no extras.
  • PHI nodes must be the first thing in a basic block, all grouped