Simple and Efficient Construction of Static Single Assignment Form

Similar documents
Static single assignment

8. Static Single Assignment Form. Marcus Denker

Shengyue Wang, Xiaoru Dai, Kiran S. Yellajyosula, Antonia Zhai, Pen-Chung Yew Department of Computer Science & Engineering University of Minnesota

SSA-based Register Allocation with PBQP

6. Intermediate Representation

SSA Construction. Daniel Grund & Sebastian Hack. CC Winter Term 09/10. Saarland University

A Practical and Fast Iterative Algorithm for φ-function Computation Using DJ Graphs

Improvements to Linear Scan register allocation

SSA-Based Register Allocation with PBQP

6. Intermediate Representation!

Chip-Multithreading Systems Need A New Operating Systems Scheduler

Control-Flow Analysis

Static Single Assignment Form in the COINS Compiler Infrastructure

Semantics of an Intermediate Language for Program Transformation

Inlining Java Native Calls at Runtime

Verified Construction of Static Single Assignment Form

CSE P 501 Compilers. SSA Hal Perkins Spring UW CSE P 501 Spring 2018 V-1

Effective Memory Protection Using Dynamic Tainting

An Overview of GCC Architecture (source: wikipedia) Control-Flow Analysis and Loop Detection

LLVM and IR Construction

Bumyong Choi Leo Porter Dean Tullsen University of California, San Diego ASPLOS

APPENDIX Summary of Benchmarks

Low-Complexity Reorder Buffer Architecture*

Data Structures and Algorithms in Compiler Optimization. Comp314 Lecture Dave Peixotto

Automatic Selection of Compiler Options Using Non-parametric Inferential Statistics

Flow-sensitive Alias Analysis

ATOS introduction ST/Linaro Collaboration Context

Preference-Guided Register Assignment

Breaking Cyclic-Multithreading Parallelization with XML Parsing. Simone Campanoni, Svilen Kanev, Kevin Brownell Gu-Yeon Wei, David Brooks

SVF: Static Value-Flow Analysis in LLVM

Register Packing Exploiting Narrow-Width Operands for Reducing Register File Pressure

CONTROL FLOW ANALYSIS. The slides adapted from Vikram Adve

Intermediate representation

Intermediate Representation (IR)

Accuracy Enhancement by Selective Use of Branch History in Embedded Processor

Compiler Construction 2016/2017 Loop Optimizations

Microarchitecture Overview. Performance

The Designing and Implementation of A SSA-based register allocator

Parameterized Construction of Program Representations for Sparse Dataflow Analyses

A Cost Effective Spatial Redundancy with Data-Path Partitioning. Shigeharu Matsusaka and Koji Inoue Fukuoka University Kyushu University/PREST

Speculative Multithreaded Processors

What If. Static Single Assignment Form. Phi Functions. What does φ(v i,v j ) Mean?

Computing Static Single Assignment (SSA) Form. Control Flow Analysis. Overview. Last Time. Constant propagation Dominator relationships

Aries: Transparent Execution of PA-RISC/HP-UX Applications on IPF/HP-UX

Static Single Assignment (SSA) Form

Homework I - Solution

CIS 341 Final Examination 3 May 2011

COMPILER OPTIMIZATION EFFECTS ON REGISTER COLLISIONS. A Thesis. presented to. the Faculty of California Polytechnic State University, San Luis Obispo

Revisiting Out-of-SSA Translation for Correctness, Code Quality, and Efficiency

Memory Prefetching for the GreenDroid Microprocessor. David Curran December 10, 2012

POSH: A TLS Compiler that Exploits Program Structure

IntFlow: Integer Error Handling With Information Flow Tracking

Compiler Construction 2009/2010 SSA Static Single Assignment Form

Execution-based Prediction Using Speculative Slices

Outline. Speculative Register Promotion Using Advanced Load Address Table (ALAT) Motivation. Motivation Example. Motivation

Strato: A Retargetable Framework for Low- Level Inlined Reference Monitors

Microarchitecture Overview. Performance

Advanced C Programming

Implementation and Evaluation of Link Time Optimization with libfirm

An Analysis of the Performance Impact of Wrong-Path Memory References on Out-of-Order and Runahead Execution Processors

An Analysis of the Amount of Global Level Redundant Computation in the SPEC 95 and SPEC 2000 Benchmarks

Accelerating Dynamic Detection of Uses of Undefined Values with Static Value-Flow Analysis

Punctual Coalescing. Fernando Magno Quintão Pereira

A Sparse Algorithm for Predicated Global Value Numbering

Static Memory Leak Detection Using Full-Sparse Value-Flow Analysis

Instruction Selection on SSA Graphs

2D-Profiling: Detecting Input-Dependent Branches with a Single Input Data Set

Speeding up context-, object- and field-sensitive SDG generation

ECE 5775 (Fall 17) High-Level Digital Design Automation. Static Single Assignment

Static Single Assignment Form in the COINS Compiler Infrastructure - Current Status and Background -

ECE 5775 High-Level Digital Design Automation Fall More CFG Static Single Assignment

Sparse Conditional Constant Propagation

Wish Branch: A New Control Flow Instruction Combining Conditional Branching and Predicated Execution

Design of Experiments - Terminology

A New Elimination-Based Data Flow Analysis Framework Using Annotated Decomposition Trees

Single-Pass Generation of Static Single Assignment Form for Structured Languages

SSA-Form Register Allocation

Inserting Data Prefetches into Loops in Dynamically Translated Code in IA-32EL. Inserting Prefetches IA-32 Execution Layer - 1

EECS 583 Class 16 Research Topic 1 Automatic Parallelization

Sparse Conditional Constant Propagation

Compiler Construction 2010/2011 Loop Optimizations

Control Flow Analysis & Def-Use. Hwansoo Han

Lecture Compiler Middle-End

José F. Martínez 1, Jose Renau 2 Michael C. Huang 3, Milos Prvulovic 2, and Josep Torrellas 2

Topic I (d): Static Single Assignment Form (SSA)

Advanced Compilers CMPSCI 710 Spring 2003 Computing SSA

Computer System. Performance

COS 320. Compiling Techniques

Sparse Conditional Constant Propagation

Conditional Elimination through Code Duplication

Register allocation. Register allocation: ffl have value in a register when used. ffl limited resources. ffl changes instruction choices

A Bad Name. CS 2210: Optimization. Register Allocation. Optimization. Reaching Definitions. Dataflow Analyses 4/10/2013

Intermediate Representations. Reading & Topics. Intermediate Representations CS2210

CIS 341 Final Examination 4 May 2017

Phi-Predication for Light-Weight If-Conversion

Architecture Cloning For PowerPC Processors. Edwin Chan, Raul Silvera, Roch Archambault IBM Toronto Lab Oct 17 th, 2005

Towards an SSA based compiler back-end: some interesting properties of SSA and its extensions

7. Optimization! Prof. O. Nierstrasz! Lecture notes by Marcus Denker!

Chapter 10. Improving the Runtime Type Checker Type-Flow Analysis

SSA Based Mobile Code: Construction and Empirical Evaluation

Transcription:

Simple and Efficient Construction of Static Single Assignment Form saarland university Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and Andreas Zwinkau computer science Institute for Program Structures and Data Organization, Karlsruhe Institute of Technology (KIT) 1 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and KIT University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association www.kit.edu

Modern Intermediate Representations Optimization Optimization SSA AST non-ssa Two-phase approach: Construct non-ssa intermediate representation from AST Compute dominance tree Compute liveness Construct SSA form 2 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Simple and Efficient SSA Construction Optimization Optimization SSA AST non-ssa Our SSA construction algorithm Requires no prior analysis Constructs SSA form directly from AST 3 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Straight-Line Code Data structure: For each basic block: Mapping Variables Values Code: a = 42; b = a; a = a + b; IR: v 0 : 42 v 1 : v 0 + v 0 Mapping: "a" v 0 4 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Straight-Line Code Data structure: For each basic block: Mapping Variables Values Code: a = 42; b = a; a = a + b; IR: v 0 : 42 v 1 : v 0 + v 0 Mapping: "a" v 0 "b" v 0 4 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Straight-Line Code Data structure: For each basic block: Mapping Variables Values Code: a = 42; b = a; a = a + b; IR: v 0 : 42 v 1 : v 0 + v 0 Mapping: "a" v 0 "b" v 0 4 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Straight-Line Code Data structure: For each basic block: Mapping Variables Values Code: a = 42; b = a; a = a + b; IR: v 0 : 42 v 1 : v 0 + v 0 Mapping: "a" v 1 "b" v 0 4 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Properties of Basic Blocks Filled All code of this block has already been constructed Existing mapping will not change Sealed The block is connected to all its direct control flow predecessors All direct control flow predecessors are filled 5 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { start Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { start v 0 :... Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { while start v 0 :... Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { while start v 0 :... if Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { while start v 0 :... if Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 0 :... if Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { start while v 1 :... then v 0 :... if Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks start v 0 :... void foo(void) { while (...) { if (...) { while v 1 :... then if endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { v 0 :... start while if v 1 :... then use(v? ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 1 :... v 0 :... if v 2 : φ(v?, v? ) use(v? ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 1 :... v 0 :... if v 2 : φ(v 1, v? ) use(v? ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 3 : v 1 :... v 0 :... if v 2 : φ(v 1, v 3 ) use(v? ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 3 : v 1 :... v 0 :... if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 3 : v 1 :... v 0 :... if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 3 : v 1 :... v 0 :... if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 1 :... v 0 :... v 3 : φ(v?, v? ) if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 1 :... v 0 :... v 3 : φ(v 0, v? ) if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks void foo(void) { while (...) { if (...) { then while start v 1 :... v 0 :... v 3 : φ(v 0, v 2 ) if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks start v 0 :... void foo(void) { while (...) { if (...) { end then while v 1 :... v 3 : φ(v 0, v 2 ) if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks start v 0 :... void foo(void) { while (...) { if (...) { end use(v? ) then while v 1 :... v 3 : φ(v 0, v 2 ) if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Handling Multiple Basic Blocks start v 0 :... void foo(void) { while (...) { if (...) { end use(v 3 ) then while v 1 :... v 3 : φ(v 0, v 2 ) if v 2 : φ(v 1, v 3 ) use(v 2 ) endif Filled: Inserted all instructions Sealed: Connected to all direct predecessors 6 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Guarantees for Constructed SSA Form Pruned SSA form No dead φ functions. Minimal SSA form (Cytron et al.) φ functions only occur at iterated dominance frontiers.? 7 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Trivial φ Functions v 0 :... v 0 :... v 1 : φ(v 0, v 1 ) v 1 : φ(v 0, v 0 ) use(v 1 ) use(v 1 ) Trivial φ function Just references one value (except itself) 8 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Optimization of Trivial φ Functions v v v φ 0 φ 1 φ 1 Optimization of trivial φ functions Replace trivial φ function by its unique operand Iterative approach to remove all trivial φ functions 9 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Guarantees for Constructed SSA Form Theorem A program in SSA form with a reducible control flow graph without any trivial φ functions is in minimal SSA form. Pruned SSA form No dead φ functions. Minimal SSA form (Cytron et al.) φ functions only occur at iterated dominance frontiers. for Java and most C programs 10 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Irreducible Control Flow v 0 :... v 1 : φ(v 0,v 2 ) v 2 : φ(v 0,v 1 ) v 0 φ 1 φ 2 use use(v 2 ) Redundant set of φ functions Generalization of trivial φ functions Just reference one value (except themselves) 11 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Redundant φ Functions and SCCs v φ 0 φ 1 φ 2 Lemma Let P be a redundant set of φ functions. Then there is a strongly connected component S P that is also redundant. 12 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Optimization of Redundant φ Functions x y x y x y φ 0 φ 0 φ 0 φ 1 φ 1 φ 2 φ 2 Algorithm to find all redundant φ functions Use Tarjan s algorithm to find φ-sccs of maximum size If SCC is not redundant: Check for redundant inner SCC 13 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

New Criterion for Minimal SSA Form Definition (Minimal SSA form (SCC)) A program is in minimal SSA form if it contains no redundant φ-sccs. Advantages Independent of the source program Implies Cytron et al. s criterion 14 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Optimizations and φ-sccs void foo(void) { x = 42 while (...) { if (...) { x = 42 then end use(v 3 ) while start v 1 : 42 v 0 : 42 v 3 : φ(v 0, v 2 ) if v 2 : φ(v 1, v 3 ) use(v 2 ) endif 15 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Guarantees for Constructed SSA Form Pruned SSA form No dead φ functions. Minimal SSA form (Cytron et al.) φ functions only occur at iterated dominance frontiers. Minimal SSA form (SCC) No redundant φ-scc. Can we have even fewer φ functions? 16 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

On-the-Fly Optimizations int bar(int x) { int mask = 0; int res; if (x & mask) { res = 0; else { res = x; return res; v 0 : x v 1 : 0 v 2 : v 0 & v 1 v 3 : v 2 = 0 condjump v 3 v 5 : φ(v 1,v 0 ) return v 5 17 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

On-the-Fly Optimizations int bar(int x) { int mask = 0; int res; if (x & mask) { res = 0; else { res = x; return res; v 0 : x v 0 : x v 1 : 0 v 2 : v 0 & v 1 v 3 : v 2 = 0 condjump v 3 v 5 : φ(v 1,v 0 ) return v 5 17 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

On-the-Fly Optimizations int bar(int x) { int mask = 0; int res; if (x & mask) { res = 0; else { res = x; return res; v 0 : x v 1 : 0 v 0 : x v 1 : 0 v 2 : v 0 & v 1 v 3 : v 2 = 0 condjump v 3 v 5 : φ(v 1,v 0 ) return v 5 17 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

On-the-Fly Optimizations int bar(int x) { int mask = 0; int res; if (x & mask) { res = 0; else { res = x; return res; v 0 : x v 1 : 0 v 3 : false v 0 : x v 1 : 0 v 2 : v 0 & v 1 v 3 : v 2 = 0 condjump v 3 v 5 : φ(v 1,v 0 ) return v 5 17 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

On-the-Fly Optimizations int bar(int x) { int mask = 0; int res; if (x & mask) { res = 0; else { res = x; return res; v 0 : x v 1 : 0 v 3 : false v 0 : x v 1 : 0 v 2 : v 0 & v 1 v 3 : v 2 = 0 condjump v 3 v 5 : φ(v 1,v 0 ) return v 5 17 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

On-the-Fly Optimizations int bar(int x) { int mask = 0; int res; if (x & mask) { res = 0; else { res = x; return res; v 0 : x v 1 : 0 v 3 : false return v 0 v 0 : x v 1 : 0 v 2 : v 0 & v 1 v 3 : v 2 = 0 condjump v 3 v 5 : φ(v 1,v 0 ) return v 5 17 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Evaluation Setup Setup to evaluate our SSA construction algorithm Full-fledged implementation in cparser/libfirm Proof-of-concept implementation in clang/llvm Comparison against existing SSA construction algorithm Sreedhar and Gao Better than Cytron et al. Highly-tuned implementation C programs of SPEC CINT2000 benchmark 18 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Number of Constructed IR Instructions non-ssa Benchmark LLVM SSA non-ssa SSA 164.gzip 12,038 9,187 131% 175.vpr 40,701 27,155 150% 176.gcc 516,537 395,652 131% 181.mcf 3,988 2,613 153% 186.crafty 44,891 36,050 125% 197.parser 30,237 20,485 148% 253.perlbmk 185,576 140,489 132% 254.gap 201,185 149,755 134% 255.vortex 126,097 88,257 143% 256.bzip2 8,605 6,012 143% 300.twolf 76,078 58,737 130% Average 138% 19 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Quality Comparison Benchmark Number of φ functions Redundant φ-sccs LLVM Our Optimization Irreducible 164.gzip 594 594 0 0 0 175.vpr 1,201 1,201 0 0 0 176.gcc 12,904 12,910 6 2 3 181.mcf 154 154 0 0 0 186.crafty 1,466 1,466 0 0 0 197.parser 1,243 1,243 0 0 0 253.perlbmk 5,840 5,857 17 0 5 254.gap 9,325 9,326 1 0 0 255.vortex 2,739 2,737 2 1 0 256.bzip2 359 359 0 0 0 300.twolf 2,849 2,849 0 0 0 Sum 38,674 38,696 22 3 8 20 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Compilation Speed Benchmark LLVM Our Our LLVM 164.gzip 969,233,677 967,798,047 99.85% 175.vpr 3,039,801,575 3,025,286,080 99.52% 176.gcc 25,935,984,569 26,009,545,723 100.28% 181.mcf 722,918,540 722,507,455 99.94% 186.crafty 3,653,881,430 3,632,605,590 99.42% 197.parser 2,084,205,254 2,068,075,482 99.23% 253.perlbmk 12,246,953,644 12,062,833,383 98.50% 254.gap 8,358,757,289 8,339,871,545 99.77% 255.vortex 7,841,416,740 7,845,699,772 100.05% 256.bzip2 569,176,687 564,577,209 99.19% 300.twolf 6,424,027,368 6,408,289,297 99.76% Average 99.59% 21 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and

Conclusion Summary Simple SSA construction algorithm: 375 LOC vs. 1141 LOC Guarantees minimal and pruned SSA form Can reuse conservative optimizations New criterion for minimal SSA form A lot more in the paper Give it a try! 22 March 22, 2013 Matthias Braun, Sebastian Buchwald, Sebastian Hack, Roland Leißa, Christoph Mallon and