X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FPasses.html;h=bbf6b3dc943b217bdb50e8661d94e9b68faed3d6;hb=6c7e8a02d81be9b66a8cfc6f8b6f20d48088d915;hp=c144e2ba63d3368a05b7f453e0bd19f8a0b835a5;hpb=c86b67742a3298c0a5a715b57a64f11107b8a3f2;p=oota-llvm.git diff --git a/docs/Passes.html b/docs/Passes.html index c144e2ba63d..bbf6b3dc943 100644 --- a/docs/Passes.html +++ b/docs/Passes.html @@ -78,33 +78,31 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "
\n" if !
\n" if !
\n" if !
\n" if !
\n" if !
\n" if !
\n" if !
\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". +
+ @@ -294,52 +296,6 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "\n" if !
Yet to be written.
- - -
- 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.
-
- This pass, only available in opt
, prints the call graph to
- standard output in a human-readable form.
-
- This pass, only available in opt
, prints the SCCs of the call
- graph to standard output in a human-readable form.
-
- This pass, only available in opt
, prints the SCCs of each
- function CFG to standard output in a human-readable form.
-
\n" if !
- 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.
+
+ 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 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.
\n" if !
- 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. -
-\n" if !
+Yet to be written.
+
- The PrintFunctionPass
class is designed to be pipelined with
- other FunctionPass
es, 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.
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.
+
- 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.
- 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.
- 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 FunctionPass
es, and prints out the functions of the module
+ as they are processed.
@@ -616,7 +583,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "
\n" if !
@@ -739,27 +706,12 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "
\n" if !
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.- 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 - subexpressions, eliminating them when possible. -
-- This pass performs global value numbering to eliminate fully redundant - instructions. It also performs simple dead load elimination. + 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. -
-This transformation should be followed by strength reduction after all of the @@ -1181,6 +1104,35 @@ if (i == j)
+ 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. +
++ 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. +
+- Lowers operations on vector datatypes into operations on more primitive vector - datatypes, and finally to scalar operations. -
-- 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 -
- 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. -
-- Ensure that functions have at most one ret instruction in them. - Additionally, it keeps track of which node is the new exit node of the CFG. + This pass performs various transformations related to eliminating memcpy + calls, or transforming sets of stores into memset's.
- 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: + Ensure that functions have at most one ret instruction in them. + Additionally, it keeps track of which node is the new exit node of the CFG.
- -void test(int *p, int *q) -{ - if (p != q) - return; - - if (*p != *q) - foo(); // unreachable -}
- Converts @malloc and @free calls to malloc and - free instructions. -
-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 @@ -1751,6 +1640,42 @@ if (i == j)
+ 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). +
++ 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: +
+ +Yet to be written.
++ Same as dead argument elimination, but deletes arguments to functions which + are external. This is only for use by bugpoint.
Yet to be written.
++ This pass is used by bugpoint to extract all blocks from the module into their + own functions.
Yet to be written.
++ Ensures that the module is in the form required by the Module Verifier pass. +
+ ++ Running the verifier runs this pass automatically, so there should be no need + to use it directly. +
Yet to be written.
++ Verifies an LLVM IR code. This is useful to run after an optimization which is + undergoing testing. Note that llvm-as verifies its input before + emitting bitcode, and also that malformed bitcode is likely to make LLVM + crash. All language front-ends are therefore encouraged to verify their output + before performing optimizing transformations. +
+ ++ Note that this does not provide full security verification (like Java), but + instead just tries to ensure that code is well-formed. +
Yet to be written.
++ Displays the control flow graph using the GraphViz tool. +
Yet to be written.
++ Displays the control flow graph using the GraphViz tool, but omitting function + bodies. +