X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=docs%2FPasses.html;h=853ca8cfdba9cbc6b4f0f129f14d271ae44c0b8b;hb=a75ce9f5d2236d93c117e861e60e6f3f748c9555;hp=22a73516cb7ded02b6b2948592afd3fabc896073;hpb=3ee8fc964952a65bcb3668b85938c46f90631e42;p=oota-llvm.git diff --git a/docs/Passes.html b/docs/Passes.html index 22a73516cb7..853ca8cfdba 100644 --- a/docs/Passes.html +++ b/docs/Passes.html @@ -27,7 +27,7 @@ while () { my $o = $order{$1}; $o = "000" unless defined $o; push @x, "$o-$1$2\n"; - push @y, "$o $2\n"; + push @y, "$o -$1: $2\n"; } @x = map { s/^\d\d\d//; $_ } sort @x; @y = map { s/^\d\d\d//; $_ } sort @y; @@ -75,10 +75,8 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! ANALYSIS PASSES OptionName -aa-evalExhaustive Alias Analysis Precision Evaluator --anders-aaAndersen's Interprocedural Alias Analysis -basicaaBasic Alias Analysis (default AA impl) -basiccgBasic CallGraph Construction --basicvnBasic Value Numbering (default GVN impl) -codegenprepareOptimize for code generation -count-aaCount Alias Analysis Query Responses -debug-aaAA use debugger @@ -87,37 +85,57 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -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) +-dot-domPrint dominator tree of function to 'dot' file +-dot-dom-onlyPrint dominator tree of function to 'dot' file (with no function bodies) +-dot-postdomPrint post dominator tree of function to 'dot' file +-dot-postdom-onlyPrint post dominator tree of function to 'dot' file (with no function bodies) -globalsmodref-aaSimple mod/ref analysis for globals -instcountCounts the various types of Instructions +-interprocedural-aa-evalExhaustive Interprocedural Alias Analysis Precision Evaluator +-interprocedural-basic-aaInterprocedural Basic Alias Analysis -intervalsInterval Partition Construction --load-vnLoad Value Numbering --loopsNatural Loop Construction +-iv-usersInduction Variable Users +-lazy-value-infoLazy Value Information Analysis +-ldaLoop Dependence Analysis +-libcall-aaLibCall Alias Analysis +-lintCheck for common errors in LLVM IR +-live-valuesValue Liveness Analysis +-loopsNatural Loop Information -memdepMemory Dependence Analysis +-module-debuginfoPrints module debug info metadata -no-aaNo Alias Analysis (always returns 'may' alias) -no-profileNo Profile Information +-pointertrackingTrack pointer bounds -postdomfrontierPost-Dominance Frontier Construction -postdomtreePost-Dominator Tree Construction -print-alias-setsAlias Set Printer -print-callgraphPrint a call graph -print-callgraph-sccsPrint SCCs of the Call Graph -print-cfg-sccsPrint SCCs of each function CFG +-print-dbginfoPrint debug info in human readable form +-print-dom-infoDominator Info Printer -print-externalfnconstantsPrint external fn callsites passed constants -print-functionPrint function to stderr -print-modulePrint module to stderr -print-used-typesFind Used Types +-profile-estimatorEstimate profiling information -profile-loaderLoad profile information from llvmprof.out +-regionsDetect single entry single exit regions in a function +-profile-verifierVerify profiling information -scalar-evolutionScalar Evolution Analysis +-scev-aaScalarEvolution-based Alias Analysis -targetdataTarget Data Layout TRANSFORM PASSES OptionName +-abcdRemove redundant conditional branches -adceAggressive Dead Code Elimination +-always-inlineInliner for always_inline functions -argpromotionPromote 'by reference' arguments to scalars -block-placementProfile Guided Basic Block Placement -break-crit-edgesBreak critical edges in CFG -codegenpreparePrepare a function for code generation --condpropConditional Propagation -constmergeMerge Duplicate Global Constants -constpropSimple constant propagation -dceDead Code Elimination @@ -125,19 +143,14 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -deadtypeelimDead Type Elimination -dieDead Instruction Elimination -dseDead Store Elimination --gcseGlobal Common Subexpression Elimination +-functionattrsDeduce function attributes -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 --insert-block-profilingInsert instrumentation for block profiling -insert-edge-profilingInsert instrumentation for edge profiling --insert-function-profilingInsert instrumentation for function profiling --insert-null-profiling-rsMeasure profiling framework overhead --insert-rs-profiling-frameworkInsert random sampling instrumentation framework +-insert-optimal-edge-profilingInsert optimal instrumentation for edge profiling -instcombineCombine redundant instructions -internalizeInternalize Global Symbols -ipconstpropInterprocedural constant propagation @@ -154,24 +167,33 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! -loop-unrollUnroll loops -loop-unswitchUnswitch loops -loopsimplifyCanonicalize natural loops --lowerallocsLower allocations from instructions to calls +-loweratomicLower atomic intrinsics -lowerinvokeLower invoke and unwind, for unwindless code generators -lowersetjmpLower Set Jump -lowerswitchLower SwitchInst's to branches -mem2regPromote Memory to Register -memcpyoptOptimize use of memcpy and friends +-mergefuncMerge Functions -mergereturnUnify function exit nodes --predsimplifyPredicate Simplifier +-partial-inlinerPartial Inliner +-partialspecializationPartial Specialization -prune-ehRemove unused exception handling info --raiseallocsRaise allocations from calls to instructions -reassociateReassociate expressions -reg2memDemote all values to stack slots -scalarreplScalar Replacement of Aggregates -sccpSparse Conditional Constant Propagation +-sinkCode Sinking -simplify-libcallsSimplify well-known library calls +-simplify-libcalls-halfpowrSimplify half_powr library calls -simplifycfgSimplify the CFG +-split-gepsSplit complex GEPs into simple GEPs +-ssiStatic Single Information Construction +-ssi-everythingStatic Single Information Construction (everything, intended for debugging) -stripStrip all symbols from a module +-strip-dead-debug-infoStrip debug info for unused symbols -strip-dead-prototypesRemove unused function declarations +-strip-debug-declareStrip all llvm.dbg.declare intrinsics +-strip-nondebugStrip all symbols, except dbg symbols, from a module -sretpromotionPromote sret arguments -tailcallelimTail Call Elimination -tailduplicateTail Duplication @@ -181,10 +203,15 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if ! OptionName -deadarghaX0rDead Argument Hacking (BUGPOINT USE ONLY; DO NOT USE) -extract-blocksExtract Basic Blocks From Module (for bugpoint use) +-instnamerAssign names to anonymous instructions -preverifyPreliminary module verification -verifyModule Verifier -view-cfgView CFG of function -view-cfg-onlyView CFG of function (with no function bodies) +-view-domView dominator tree of function +-view-dom-onlyView dominator tree of function (with no function bodies) +-view-postdomView post dominator tree of function +-view-postdom-onlyView post dominator tree of function (with no function bodies) @@ -196,7 +223,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

- Exhaustive Alias Analysis Precision Evaluator + -aa-eval: Exhaustive Alias Analysis Precision Evaluator

This is a simple N^2 alias analysis accuracy evaluator. @@ -210,75 +237,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

-
-

- This is an implementation of Andersen's interprocedural alias - analysis -

- -

- In pointer analysis terms, this is a subset-based, flow-insensitive, - field-sensitive, and context-insensitive algorithm pointer algorithm. -

- -

- This algorithm is implemented as three stages: -

- -
    -
  1. Object identification.
  2. -
  3. Inclusion constraint identification.
  4. -
  5. Offline constraint graph optimization.
  6. -
  7. Inclusion constraint solving.
  8. -
- -

- The object identification stage identifies all of the memory objects in the - program, which includes globals, heap allocated objects, and stack allocated - objects. -

- -

- The inclusion constraint identification stage finds all inclusion constraints - in the program by scanning the program, looking for pointer assignments and - other statements that effect the points-to graph. For a statement like - A = B, this statement is processed to - indicate that A can point to anything that B can point - to. Constraints can handle copies, loads, and stores, and address taking. -

- -

- The offline constraint graph optimization portion includes offline variable - substitution algorithms intended to computer pointer and location - equivalences. Pointer equivalences are those pointers that will have the - same points-to sets, and location equivalences are those variables that - always appear together in points-to sets. -

- -

- The inclusion constraint solving phase iteratively propagates the inclusion - constraints until a fixed point is reached. This is an O(n³) - algorithm. -

- -

- Function constraints are handled as if they were structs with X - fields. Thus, an access to argument X of function Y is - an access to node index getNode(Y) + X. - This representation allows handling of indirect calls without any issues. To - wit, an indirect call Y(a,b) is - equivalent to *(Y + 1) = a, *(Y + 2) = - b. The return node for a function F is always - located at getNode(F) + CallReturnPos. The arguments - start at getNode(F) + CallArgPos. -

-
- - -

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

\n" if !

Yet to be written.

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

\n" if !

-
-

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

-
- - -

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

+
+

+ This pass, only available in opt, prints the dominator tree + 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 dominator tree + 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. +

+
+ + + +
+

+ This pass, only available in opt, prints the post dominator tree + 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 post dominator tree + 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. +

+
+ + +

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

\n" if !

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

\n" if !

+
+

This pass implements a simple N^2 alias analysis accuracy evaluator. + Basically, for each function in the program, it simply queries to see how the + alias analysis implementation answers alias queries between each pair of + pointers in the function. +

+
+ + + +
+

This pass defines the default implementation of the Alias Analysis interface + that simply implements a few identities (two different globals cannot alias, + etc), but otherwise does no analysis. +

+
+ + +

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

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

+

Bookkeeping for "interesting" users of expressions computed from + induction variables.

+
+ + + +
+

Interface for lazy computation of value constraint information.

+
+ + + +
+

Loop dependence analysis framework, which is used to detect dependences in + memory accesses in loops.

+
+ + + +
+

LibCall Alias Analysis.

+
+ + + +
+

This pass statically checks for common and easily-identified constructs + which produce undefined or likely unintended behavior in LLVM IR.

+ +

It is not a guarantee of correctness, in two ways. First, it isn't + comprehensive. There are checks which could be done statically which are + not yet implemented. Some of these are indicated by TODO comments, but + those aren't comprehensive either. Second, many conditions cannot be + checked statically. This pass does no dynamic instrumentation, so it + can't check for all possible problems.

-

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

Another limitation is that it assumes all code will be executed. A store + through a null pointer in a basic block which is never reached is harmless, + but this pass will warn about it anyway.

+ +

Optimization passes may make conditions that this pass checks for more or + less obvious. If an optimization pass appears to be introducing a warning, + it may be that the optimization pass is merely exposing an existing + condition in the code.

+ +

This code may be run before instcombine. In many cases, instcombine checks + for the same kinds of things and turns instructions with undefined behavior + into unreachable (or equivalent). Because of this, this pass makes some + effort to look through bitcasts and so on.

+
+

LLVM IR Value liveness analysis pass.

+
+ + +

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

\n" if !

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

\n" if !

+
+

This pass decodes the debug info metadata in a module and prints in a + (sufficiently-prepared-) human-readable form. + + For example, run this pass from opt along with the -analyze option, and + it'll print to standard output. +

+
+ + +

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

\n" if !

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

\n" if !

+
+

Tracking of pointer bounds. +

+
+ + +

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

\n" if !

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

\n" if !

Yet to be written.

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

\n" if !

This pass, only available in opt, prints the call graph to - standard output in a human-readable form. + standard error 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. + graph to standard error 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. + function CFG to standard error in a human-readable form.

+
+

Pass that prints instructions, and associated debug info:

+
    + +
  • source/line/col information
  • +
  • original variable name
  • +
  • original type name
  • +
+
+ + + +
+

Dominator Info Printer.

+
+ + +

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

+
+

Profiling information that estimates the profiling information + in a very crude and unimaginative way. +

+
+ + +

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

\n" if !

+
+

Pass that checks profiling information for plausibility.

+
+ +
+

+ The RegionInfo pass detects single entry single exit regions in a + function, where a region is defined as any subgraph that is connected to the + remaining graph at only two spots. Furthermore, an hierarchical region tree is + built. +

+
+ + +

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

\n" if !

+
+

Simple alias analysis implemented in terms of ScalarEvolution queries. + + This differs from traditional loop dependence analysis in that it tests + for dependencies within a single iteration of a loop, rather than + dependencies between different iterations. + + ScalarEvolution has a more complete understanding of pointer arithmetic + than BasicAliasAnalysis' collection of ad-hoc analyses. +

+
+ + + +
+

+ performs code stripping. this transformation can delete: +

+ +
    +
  1. names for virtual registers
  2. +
  3. symbols for internal globals and functions
  4. +
  5. debug information
  6. +
+ +

+ note that this transformation makes code much less readable, so it should + only be used in situations where the strip utility would be used, + such as reducing code size or making it harder to reverse engineer code. +

+
+ + +

Provides other passes access to information on how the size and alignment @@ -680,7 +857,22 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

+
+

ABCD removes conditional branch instructions that can be proved redundant. + With the SSI representation, each variable has a constraint. By analyzing these + constraints we can prove that a branch is redundant. When a branch is proved + redundant it means that one direction will always be taken; thus, we can change + this branch into an unconditional jump.

+

It is advisable to run SimplifyCFG and + Aggressive Dead Code Elimination after ABCD + to clean up the code.

+
+ + +

ADCE aggressively tries to eliminate code. This pass is similar to @@ -691,7 +883,16 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

+
+

A custom inliner that handles only functions that are marked as + "always inline".

+
+ + +

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

\n" if !

This pass is a very simple profile guided basic block placement algorithm. @@ -734,7 +935,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

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

\n" if !

This pass munges the code in the input function to better prepare it for @@ -757,16 +958,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

-
-

This pass propagates information about conditional expressions through the - program, allowing it to eliminate conditional branches in some cases.

-
- - -

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

\n" if !

This file implements constant propagation and merging. It looks for @@ -795,7 +987,7 @@ perl -e '$/ = undef; for (split(/\n/, <>)) { s:^ *///? ?::; print "

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

@@ -859,24 +1051,22 @@ 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). +

A simple interprocedural pass which walks the call-graph, looking for + functions which do not access or only read non-local memory, and marking them + readnone/readonly. In addition, it marks function arguments (of pointer type) + 'nocapture' if a call to the function does not create any copies of the pointer + value that outlive the call. This more or less means that the pointer is only + dereferenced, and not returned from the function or stored in a global. + This pass is implemented as a bottom-up traversal of the call-graph.

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

\n" if !

@@ -902,60 +1092,18 @@ 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 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. -

-
- - -

- This pass finds places where memory allocation functions may escape into - indirect land. Some transforms are much easier (aka possible) only if free - or malloc are not called indirectly. -

- -

- Thus find places where the address of memory functions are taken and construct - bounce functions with direct calls of those functions. + This pass performs global value numbering to eliminate fully and partially + redundant instructions. It also performs redundant load elimination.

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

\n" if !

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

\n" if !

-
-

- This pass instruments the specified program with counters for basic block - profiling, which counts the number of times each basic block executes. This - is the most basic form of profiling, which can tell which blocks are hot, but - cannot reliably detect hot paths through the CFG. -

- -

- Note that this implementation is very naïve. Control equivalent regions of - the CFG should not require duplicate counters, but it does put duplicate - counters in. -

-
- - -

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

\n" if !

-
-

- This pass instruments the specified program with counters for function - profiling, which counts the number of times each function is called. -

-
- - -
-

- The basic profiler that does nothing. It is the default profiler and thus - terminates RSProfiler chains. It is useful for measuring - framework overhead. -

-
- - - -
-

- The second stage of the random-sampling instrumentation framework, duplicates - all instructions in a function, ignoring the profiling code, then connects the - two versions together at the entry and at backedges. At each connection point - a choice is made as to whether to jump to the profiled code (take a sample) or - execute the unprofiled code. -

- -

- After this pass, it is highly recommended to runmem2reg - and adce. instcombine, - load-vn, gdce, and - dse also are good to run afterwards. +

This pass instruments the specified program with counters for edge profiling. + Edge profiling can give a reasonable approximation of the hot paths through a + program, and is used for a wide variety of program transformations.

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

\n" if !

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

\n" if !

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

\n" if !

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

\n" if !

@@ -1217,7 +1313,7 @@ if (X < 3) {

@@ -1246,7 +1342,7 @@ if (X < 3) {

@@ -1282,7 +1378,7 @@ if (X < 3) {

@@ -1295,7 +1391,7 @@ if (X < 3) {

@@ -1308,7 +1404,7 @@ if (X < 3) {

@@ -1320,7 +1416,7 @@ if (X < 3) {

@@ -1331,7 +1427,7 @@ if (X < 3) {

@@ -1345,7 +1441,7 @@ if (X < 3) {

A simple loop rotation transformation.

@@ -1353,7 +1449,7 @@ if (X < 3) {

@@ -1365,7 +1461,7 @@ if (X < 3) {

@@ -1395,7 +1491,7 @@ if (X < 3) {

@@ -1436,7 +1532,7 @@ if (X < 3) {

@@ -1452,7 +1548,25 @@ if (X < 3) {

+
+

+ This pass lowers atomic intrinsics to non-atomic form for use in a known + non-preemptible environment. +

+ +

+ The pass does not verify that the environment is non-preemptible (in + general this would require knowledge of the entire call graph of the + program including any libraries which may not be available in bitcode form); + it simply lowers every atomic intrinsic. +

+
+ + +

@@ -1493,7 +1607,7 @@ if (X < 3) {

@@ -1522,7 +1636,7 @@ if (X < 3) {

@@ -1534,7 +1648,7 @@ if (X < 3) {

@@ -1550,7 +1664,7 @@ if (X < 3) {

@@ -1561,7 +1675,28 @@ if (X < 3) {

+
+

This pass looks for equivalent functions that are mergable and folds them. + + A hash is computed from the function, based on its type and number of + basic blocks. + + Once all hashes are computed, we perform an expensive equality comparison + on each function pair. This takes n^2/2 comparisons per bucket, so it's + important that the hash function be high quality. The equality comparison + iterates through each instruction in each basic block. + + When a match is found the functions are folded. If both functions are + overridable, we move the functionality into a new internal function and + leave two overridable thunks to it. +

+
+ + +

@@ -1572,53 +1707,46 @@ 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: +

This pass performs partial inlining, typically by inlining an if + statement that surrounds the body of the function.

- -
void test(int *p, int *q)
-{
-  if (p != q)
-    return;
-
-  if (*p != *q)
-    foo(); // unreachable
-}
-

- This file implements a simple interprocedural pass which walks the call-graph, - turning invoke instructions into call instructions if and - only if the callee cannot throw an exception. It implements this as a - bottom-up traversal of the call-graph. +

This pass finds function arguments that are often a common constant and + specializes a version of the called function for that constant. + + This pass simply does the cloning for functions it specializes. It depends + on IPSCCP and DAE to clean up the results. + + The initial heuristic favors constant arguments that are used in control + flow.

- Converts @malloc and @free calls to malloc and - free instructions. + This file implements a simple interprocedural pass which walks the call-graph, + turning invoke instructions into call instructions if and + only if the callee cannot throw an exception. It implements this as a + bottom-up traversal of the call-graph.

@@ -1641,13 +1769,13 @@ 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 @@ -1658,7 +1786,7 @@ if (X < 3) {

@@ -1680,7 +1808,7 @@ if (X < 3) {

@@ -1703,7 +1831,17 @@ if (X < 3) {

+
+

This pass moves instructions into successor blocks, when possible, so that + they aren't executed on paths where their results aren't needed. +

+
+ + +

@@ -1716,7 +1854,17 @@ if (X < 3) {

+
+

Simple pass that applies an experimental transformation on calls + to specific functions. +

+
+ + +

@@ -1735,11 +1883,48 @@ if (X < 3) {

+
+

This function breaks GEPs with more than 2 non-zero operands into smaller + GEPs each with no more than 2 non-zero operands. This exposes redundancy + between GEPs with common initial operand sequences. +

+
+ + + +
+

This pass converts a list of variables to the Static Single Information + form. + + We are building an on-demand representation, that is, we do not convert + every single variable in the target function to SSI form. Rather, we receive + a list of target variables that must be converted. We also do not + completely convert a target variable to the SSI format. Instead, we only + change the variable in the points where new information can be attached + to its live range, that is, at branch points. +

+
+ + + +
+

A pass that runs SSI on every non-void variable, intended for debugging. +

+
+ + +

- Performs code stripping. This transformation can delete: + performs code stripping. this transformation can delete:

    @@ -1749,7 +1934,7 @@ if (X < 3) {

- Note that this transformation makes code much less readable, so it should + note that this transformation makes code much less readable, so it should only be used in situations where the strip utility would be used, such as reducing code size or making it harder to reverse engineer code.

@@ -1757,7 +1942,7 @@ if (X < 3) {

@@ -1770,7 +1955,43 @@ if (X < 3) {

+
+

This pass implements code stripping. Specifically, it can delete:

+
    +
  • names for virtual registers
  • +
  • symbols for internal globals and functions
  • +
  • debug information
  • +
+

+ Note that this transformation makes code much less readable, so it should + only be used in situations where the 'strip' utility would be used, such as + reducing code size or making it harder to reverse engineer code. +

+
+ + + +
+

This pass implements code stripping. Specifically, it can delete:

+
    +
  • names for virtual registers
  • +
  • symbols for internal globals and functions
  • +
  • debug information
  • +
+

+ Note that this transformation makes code much less readable, so it should + only be used in situations where the 'strip' utility would be used, such as + reducing code size or making it harder to reverse engineer code. +

+
+ + +

@@ -1793,7 +2014,7 @@ if (X < 3) {

@@ -1825,7 +2046,7 @@ if (X < 3) {

@@ -1845,7 +2066,7 @@ if (X < 3) {

@@ -1856,7 +2077,7 @@ if (X < 3) {

@@ -1866,7 +2087,19 @@ if (X < 3) {

+
+

This is a little utility pass that gives instructions names, this is mostly + useful when diffing the effect of an optimization because deleting an + unnamed instruction can change all other instruction numbering, making the + diff very noisy. +

+
+ + +

@@ -1882,7 +2115,7 @@ if (X < 3) {

@@ -1902,8 +2135,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.
  • @@ -1933,7 +2166,7 @@ if (X < 3) {

    @@ -1943,7 +2176,7 @@ if (X < 3) {

    @@ -1952,14 +2185,60 @@ if (X < 3) {

    + + +
    +

    + Displays the dominator tree using the GraphViz tool. +

    +
    + + + +
    +

    + Displays the dominator tree using the GraphViz tool, but omitting function + bodies. +

    +
    + + + +
    +

    + Displays the post dominator tree using the GraphViz tool. +

    +
    + + + +
    +

    + Displays the post dominator tree using the GraphViz tool, but omitting + function bodies. +

    +
    +
    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