From 0e15dc26ec9fccbde6091309434da4004d9d14ae Mon Sep 17 00:00:00 2001
From: Gordon Henriksen \n" if !$on && $_ =~ /\S/; print "
Yet to be written.
+This is 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 is inspired and adapted from code by: Naveen Neelakantam, Francesco + Spadini, and Wojciech Stryjewski.
Yet to be written.
++ 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: +
+ ++ 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
.
+
Yet to be written.
++ This is 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. +
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.
+
Yet to be written.
+
+ 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.
+
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.
+
Yet to be written.
+
+ This pass, only available in opt
, prints
+ the SCCs of each function CFG to standard output in a human-readable form.
+
Yet to be written.
++ 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. +
Yet to be written.
++ A pass which can be used to count how many alias queries + are being made and how the alias analysis implementation being used responds. +
Yet to be written.
++ This simple pass checks alias analysis users to ensure that if they + create a new value, they do not query AA without informing it of the value. + It acts as a shim over any other AA pass you want. +
+ ++ Yes keeping track of every value in the program is expensive, but this is + a debugging pass. +
Yet to be written.
++ This pass is a simple dominator construction algorithm for finding forward + dominator frontiers. +
Yet to be written.
++ This pass is a simple dominator construction algorithm for finding forward + dominators. +
Yet to be written.
+
+ 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.
+
Yet to be written.
-Yet to be written.
++ This simple pass provides alias and mod/ref information for global values + that do not have their address taken, and keeps track of whether functions + read or write memory (are "pure"). For this simple (but very common) case, + we can provide pretty accurate and useful information. +
Yet to be written.
++ This pass collects the count of all instructions and reports them +
Yet to be written.
++ This analysis calculates and represents the interval partition of a function, + or a preexisting interval partition. +
+ ++ In this way, the interval partition may be used to reduce a flow graph down + to its degenerate single node interval partition (unless it is irreducible). +
Yet to be written.
++ 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. +
Yet to be written.
++ This analysis is used to identify natural loops and determine the loop depth + of various nodes of the CFG. Note that the loops identified may actually be + several natural loops that share the same header node... not just a single + natural loop. +
Basically we "place" the entry block, then loop over all successors in a DFO, placing the most frequently executed successor until we run out of blocks. Did we mention that this was extremely simplistic? This is @@ -644,12 +788,32 @@ if (i == j)
Yet to be written.
+ + ++ This pass performs global value numbering to eliminate fully redundant + instructions. It also performs simple dead load elimination. +
+Yet to be written.
++ 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. +