X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FPasses.html;h=bbf6b3dc943b217bdb50e8661d94e9b68faed3d6;hb=9e6d1d1f5034347d237941f1bf08fba5c1583cd3;hp=bb1a64bd978061edb7fbd999aac2eabf56a76883;hpb=845f524c25de18917f72e8847d7e138d65e4ef08;p=oota-llvm.git diff --git a/docs/Passes.html b/docs/Passes.html index bb1a64bd978..bbf6b3dc943 100644 --- a/docs/Passes.html +++ b/docs/Passes.html @@ -78,33 +78,31 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -anders-aaAndersen's Interprocedural Alias Analysis -basicaaBasic Alias Analysis (default AA impl) -basiccgBasic CallGraph Construction --basicvnBasic Value Numbering (default GVN impl) --callgraphPrint a call graph --callsccPrint SCCs of the Call Graph --cfgsccPrint SCCs of each function CFG -codegenprepareOptimize for code generation -count-aaCount Alias Analysis Query Responses -debug-aaAA use debugger -domfrontierDominance Frontier Construction -domtreeDominator Tree Construction --externalfnconstantsPrint external fn callsites passed constants +-dot-callgraphPrint Call Graph to 'dot' file +-dot-cfgPrint CFG of function to 'dot' file +-dot-cfg-onlyPrint CFG of function to 'dot' file (with no function bodies) -globalsmodref-aaSimple mod/ref analysis for globals -instcountCounts the various types of Instructions -intervalsInterval Partition Construction --load-vnLoad Value Numbering -loopsNatural Loop Construction -memdepMemory Dependence Analysis -no-aaNo Alias Analysis (always returns 'may' alias) -no-profileNo Profile Information -postdomfrontierPost-Dominance Frontier Construction -postdomtreePost-Dominator Tree Construction --printPrint function to stderr -print-alias-setsAlias Set Printer --print-callgraphPrint Call Graph to 'dot' file --print-cfgPrint CFG of function to 'dot' file --print-cfg-onlyPrint CFG of function to 'dot' file (with no function bodies) --printmPrint module to stderr --printusedtypesFind Used Types +-print-callgraphPrint a call graph +-print-callgraph-sccsPrint SCCs of the Call Graph +-print-cfg-sccsPrint SCCs of each function CFG +-print-externalfnconstantsPrint external fn callsites passed constants +-print-functionPrint function to stderr +-print-modulePrint module to stderr +-print-used-typesFind Used Types -profile-loaderLoad profile information from llvmprof.out -scalar-evolutionScalar Evolution Analysis -targetdataTarget Data Layout @@ -125,11 +123,9 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -deadtypeelimDead Type Elimination -dieDead Instruction Elimination -dseDead Store Elimination --gcseGlobal Common Subexpression Elimination -globaldceDead Global Elimination -globaloptGlobal Variable Optimizer -gvnGlobal Value Numbering --gvnpreGlobal Value Numbering/Partial Redundancy Elimination -indmemremIndirect Malloc and Free Removal -indvarsCanonicalize Induction Variables -inlineFunction Integration/Inlining @@ -161,9 +157,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -mem2regPromote Memory to Register -memcpyoptOptimize use of memcpy and friends -mergereturnUnify function exit nodes --predsimplifyPredicate Simplifier -prune-ehRemove unused exception handling info --raiseallocsRaise allocations from calls to instructions -reassociateReassociate expressions -reg2memDemote all values to stack slots -scalarreplScalar Replacement of Aggregates @@ -274,6 +268,12 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! located at getNode(F) + CallReturnPos. The arguments start at getNode(F) + CallArgPos.

+ +

+ Please keep in mind that the current andersen's pass has many known + problems and bugs. It should be considered "research quality". +

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

\n" if !

Yet to be written.

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

- This is the default implementation of the ValueNumbering - interface. It walks the SSA def-use chains to trivially identify - 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). -

-
- - -
- Print a call graph -
-
-

- This pass, only available in opt, prints the call graph to - standard output in a human-readable form. -

-
- - -
- Print SCCs of the Call Graph -
-
-

- This pass, only available in opt, prints the SCCs of the call - graph to standard output in a human-readable form. -

-
- - -
- Print SCCs of each function CFG -
-
-

- This pass, only available in opt, prints the SCCs of each - function CFG to standard output in a human-readable form. -

-
-
Optimize for code generation @@ -412,14 +360,38 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

- Print external fn callsites passed constants + Print Call Graph to 'dot' file

- This pass, only available in opt, prints out call sites to - external functions that are called with constant arguments. This can be - useful when looking for standard library functions we should constant fold - or handle in alias analyses. + This pass, only available in opt, prints the call graph into a + .dot graph. This graph can then be processed with the "dot" tool + to convert it to postscript or some other suitable format. +

+
+ + +
+ Print CFG of function to 'dot' file +
+
+

+ This pass, only available in opt, prints the control flow graph + into a .dot graph. This graph can then be processed with the + "dot" tool to convert it to postscript or some other suitable format. +

+
+ + +
+ Print CFG of function to 'dot' file (with no function bodies) +
+
+

+ This pass, only available in opt, prints the control flow graph + into a .dot graph, omitting the function bodies. This graph can + then be processed with the "dot" tool to convert it to postscript or some + other suitable format.

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

\n" if !

- -
- Load Value Numbering -
-
-

- This pass value numbers load and call instructions. To do this, it finds - lexically identical load instructions, and uses alias analysis to determine - which loads are guaranteed to produce the same value. To value number call - instructions, it looks for calls to functions that do not write to memory - which do not have intervening instructions that clobber the memory that is - read from. -

- -

- This pass builds off of another value numbering pass to implement value - numbering for non-load and non-call instructions. It uses Alias Analysis so - that it can disambiguate the load instructions. The more powerful these base - analyses are, the more powerful the resultant value numbering will be. -

-
-
Natural Loop Construction @@ -557,64 +507,73 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

- Print function to stderr + Alias Set Printer +
+
+

Yet to be written.

+
+ + +
+ Print a call graph

- The PrintFunctionPass class is designed to be pipelined with - other FunctionPasses, and prints out the functions of the module - as they are processed. + This pass, only available in opt, prints the call graph to + standard output in a human-readable form.

- Alias Set Printer + Print SCCs of the Call Graph
-

Yet to be written.

+

+ This pass, only available in opt, prints the SCCs of the call + graph to standard output in a human-readable form. +

- Print Call Graph to 'dot' file + Print SCCs of each function CFG

- This pass, only available in opt, prints the call graph into a - .dot graph. This graph can then be processed with the "dot" tool - to convert it to postscript or some other suitable format. + This pass, only available in opt, prints the SCCs of each + function CFG to standard output in a human-readable form.

- Print CFG of function to 'dot' file + Print external fn callsites passed constants

- This pass, only available in opt, prints the control flow graph - into a .dot graph. This graph can then be processed with the - "dot" tool to convert it to postscript or some other suitable format. + This pass, only available in opt, prints out call sites to + external functions that are called with constant arguments. This can be + useful when looking for standard library functions we should constant fold + or handle in alias analyses.

- Print CFG of function to 'dot' file (with no function bodies) + Print function to stderr

- This pass, only available in opt, prints the control flow graph - into a .dot graph, omitting the function bodies. This graph can - then be processed with the "dot" tool to convert it to postscript or some - other suitable format. + The PrintFunctionPass class is designed to be pipelined with + other FunctionPasses, and prints out the functions of the module + as they are processed.

- Print module to stderr + Print module to stderr

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

\n" if !

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

\n" if !

- - -
-

- 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 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). -

-
-
Dead Global Elimination @@ -906,35 +848,11 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

- 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. + This pass performs global value numbering to eliminate fully and partially + redundant instructions. It also performs redundant load elimination.

- - -
-

- This pass performs a hybrid of global value numbering and partial redundancy - elimination, known as GVN-PRE. It performs partial redundancy elimination on - values, rather than lexical expressions, allowing a more comprehensive view - the optimization. It replaces redundant values with uses of earlier - occurences of the same value. While this is beneficial in that it eliminates - unneeded computation, it also increases register pressure by creating large - 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. -

-
@@ -1570,28 +1488,6 @@ if (X < 3) {

- - -
-

- Path-sensitive optimizer. In a branch where x == y, replace uses of - x with y. Permits further optimization, such as the - elimination of the unreachable call: -

- -
void test(int *p, int *q)
-{
-  if (p != q)
-    return;
-
-  if (*p != *q)
-    foo(); // unreachable
-}
-
-
Remove unused exception handling info @@ -1605,17 +1501,6 @@ if (X < 3) {

- - -
-

- Converts @malloc and @free calls to malloc and - free instructions. -

-
-
Reassociate expressions @@ -1647,7 +1532,7 @@ if (X < 3) {

This file demotes all registers to memory references. It is intented to be the inverse of -mem2reg. By converting to - load instructions, the only values live accross basic blocks are + load instructions, the only values live across basic blocks are alloca instructions and load instructions before phi nodes. It is intended that this should make CFG hacking much easier. To make later hacking easier, the entry block is split into two, such @@ -1902,8 +1787,8 @@ if (X < 3) { integrals f.e.

  • All of the constants in a switch statement are of the correct type.
  • 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!]
  • +
  • It is illegal to put a label into any other type (like a structure) or + to return one.
  • 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.
  • @@ -1957,9 +1842,9 @@ if (X < 3) {
    Valid CSS! + src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"> Valid HTML 4.01! + src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"> Reid Spencer
    LLVM Compiler Infrastructure