CMoCS = Code Motion of Control Structures in High-Level Languages, pre-SSA, control dependence, intervals, if but not when to move Cytron, Lowry and Zadeck, 1986 GVNRC = Global Value Numbers and Redundant Computations, EPR, somewhat ad-hoc, much implementation detail, expressions only Rosen, Wegman and Zadeck, 1988 DEVP = Detecting Equality of Variables in Programs, partition value graph, commoning across loops, functional mem model Alpern, Wegman and Zadeck, 1988 EMCSSA = an Efficient Method of Computing Static Single Assignment Form, compute SSA, control dependence, dominance frontiers, ptr & codegen dead code? Cytron, Ferrante, Rosen, Wegman and Zadeck, 1989 CPCB = Constant Propagation with Conditional Branches, combined w/dead code, discussion of inlining only live code, SSA graph Wegman and Zadeck, 1991 (TOPLAS date) BIV = Beyond Induction Variables, find all kinds using cycles in the "SSA graph", SSA link? Wolfe, PLDI 92 HAPLEI = How to Analyze Large Programs Efficiently and Informatively SSA, slotwise flow analysis, lattice, pseudo-bidirectional EPR Damdhere, Rosen and Zadeck, PLDI 92 LCM = Lazy Code Motion better EPR in a unidirectional flow framework Knoop, Ruthing and Stiffen, PLDI 92 DBPA = Dependence Based Program Analysis, comparison of SSA and PDG, claimed better computation, theoretical Johnson and Pingali, PLDI 93 CMoCS GVNRC DEVP EMCSSA CPCB BIV HAPLEI LCM DBPA SSA: proto X X X X X X &PDG EPR: X ? X X loop: X X X rep alg: X X imp tec: X X X X effects: X n/a n/a Interesting algorithms: CMoCS More of a bag of tricks than an algorithm. How to use control dependency and SSA to move conditionally executed code out of loops when it is protected by an invariant conditional. If all protected code is moved out, then the conditional is moved out too. Some discussion of how you delineate a chunk of code. Makes some use of intervals. Motion is safe w.r.t. control flow and data dependency. CPCB "sparse conditional constant" Does constant propagation concurrently with detecting constant conditionals so that dead code won't weaken result. Low linear complexity. Can be used for type inference. Discussion of how to inline only those parts of a function that aren't dead in the calling context. Inlining is done concurrently with constant propagation, but the decision to inline must be made beforehand (?). Computationally arbitrary "derive type" methods (such as compile-time method selection) could also be done concurrently. Since it's an optimistic algorithm, only the final result is correct. GVNRC/HAPLEI/LCM "elimination of partial redundancy" Various algorithms that seem to supersede loop-invariant and global common subexpression optimization. Various tweaks need to be done on the flow graph beforehand to provide places to move code to, e.g. adding "landing pads". Side effect/aliasing issues are relevant, but ignored. Motion is safe w.r.t. control flow (and data dependency at least in GVNRC). The SSA approach seems to be to model aliasing and side-effects as assignments to variables. EPR papers (except GVNRC) seem to concentrate on "code placement"? DEVP "value graph partition" Partitions nodes (e.g. IR tuples) in the value graph (a proto SSA graph?) into sets that compute the same value. As an extensions, if loops and if-then-elses have been detected, then values can be detected to be equal even if they are computed during the process of different (but parallel) control structures. In this case, special "structured" phi functions are used. Motion is not discussed; the obvious application is a common-subexpression optimization or simply to constant-fold equality tests. Might be combined with CMoCS to do loop-invariant optimization on conditionals and loops. Some discussion of handling side-effects by a functional memory model; this seems to be the general SSA approach. Note that this makes SSA conversion necessary when pointers are side-effected even if normal program variables are never assigned. BIV Adaptation of algorithm for finding graph cycles and rules for pattern-matching various kinds of induction variables when they appear as a cycle.