D A C U C P Speculative Alias Analysis for Executable Code Manel Fernández and Roger Espasa Computer Architecture Department Universitat Politècnica de.

Slides:



Advertisements
Similar presentations
Dataflow Analysis for Datarace-Free Programs (ESOP 11) Arnab De Joint work with Deepak DSouza and Rupesh Nasre Indian Institute of Science, Bangalore.
Advertisements

Link-Time Path-Sensitive Memory Redundancy Elimination Manel Fernández and Roger Espasa Computer Architecture Department Universitat.
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
P3 / 2004 Register Allocation. Kostis Sagonas 2 Spring 2004 Outline What is register allocation Webs Interference Graphs Graph coloring Spilling Live-Range.
UPC Compiler Support for Trace-Level Speculative Multithreaded Architectures Antonio González λ,ф Carlos Molina ψ Jordi Tubella ф INTERACT-9, San Francisco.
1 CS 201 Compiler Construction Lecture 3 Data Flow Analysis.
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Compilation 2011 Static Analysis Johnni Winther Michael I. Schwartzbach Aarhus University.
Programmability Issues
Course Outline Traditional Static Program Analysis –Theory Compiler Optimizations; Control Flow Graphs Data-flow Analysis – today’s class –Classic analyses.
Data-Flow Analysis Framework Domain – What kind of solution is the analysis looking for? Ex. Variables have not yet been defined – Algorithm assigns a.
UPC Microarchitectural Techniques to Exploit Repetitive Computations and Values Carlos Molina Clemente LECTURA DE TESIS, (Barcelona,14 de Diciembre de.
Prof. Necula CS 164 Lecture 141 Run-time Environments Lecture 8.
Sim-alpha: A Validated, Execution-Driven Alpha Simulator Rajagopalan Desikan, Doug Burger, Stephen Keckler, Todd Austin.
Limits on ILP. Achieving Parallelism Techniques – Scoreboarding / Tomasulo’s Algorithm – Pipelining – Speculation – Branch Prediction But how much more.
Code Compaction of an Operating System Kernel Haifeng He, John Trimble, Somu Perianayagam, Saumya Debray, Gregory Andrews Computer Science Department.
1 S. Tallam, R. Gupta, and X. Zhang PACT 2005 Extended Whole Program Paths Sriraman Tallam Rajiv Gupta Xiangyu Zhang University of Arizona.
Static Analysis of Embedded C Code John Regehr University of Utah Joint work with Nathan Cooprider.
Common Sub-expression Elim Want to compute when an expression is available in a var Domain:
Recap from last time We were trying to do Common Subexpression Elimination Compute expressions that are available at each program point.
Vertically Integrated Analysis and Transformation for Embedded Software John Regehr University of Utah.
UPC Reducing Misspeculation Penalty in Trace-Level Speculative Multithreaded Architectures Carlos Molina ψ, ф Jordi Tubella ф Antonio González λ,ф ISHPC-VI,
A Hybrid Approach of Failed Disk Recovery Using RAID-6 Codes: Algorithms and Performance Evaluation Yinlong Xu University of Science and Technology of.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
Memory Systems Performance Workshop 2004© David Ryan Koes MSP 2004 Programmer Specified Pointer Independence David Koes Mihai Budiu Girish Venkataramani.
CS 536 Spring Run-time organization Lecture 19.
Chapter XI Reduced Instruction Set Computing (RISC) CS 147 Li-Chuan Fang.
2/15/2006"Software-Hardware Cooperative Memory Disambiguation", Alok Garg, HPCA Software-Hardware Cooperative Memory Disambiguation Ruke Huang, Alok.
Register Allocation (via graph coloring)
Run-time Environment and Program Organization
1 Liveness analysis and Register Allocation Cheng-Chia Chen.
Recap from last time: live variables x := 5 y := x + 2 x := x + 1 y := x y...
Machine-Independent Optimizations Ⅰ CS308 Compiler Theory1.
Direction of analysis Although constraints are not directional, flow functions are All flow functions we have seen so far are in the forward direction.
Catching Accurate Profiles in Hardware Satish Narayanasamy, Timothy Sherwood, Suleyman Sair, Brad Calder, George Varghese Presented by Jelena Trajkovic.
UPC Trace-Level Speculative Multithreaded Architecture Carlos Molina Universitat Rovira i Virgili – Tarragona, Spain Antonio González.
Memory Consistency Models Some material borrowed from Sarita Adve’s (UIUC) tutorial on memory consistency models.
Precision Going back to constant prop, in what cases would we lose precision?
Impact Analysis of Database Schema Changes Andy Maule, Wolfgang Emmerich and David S. Rosenblum London Software Systems Dept. of Computer Science, University.
1 CS 201 Compiler Construction Data Flow Analysis.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
Data Flow in Static Profiling Cathal Boogerd, Delft University, The Netherlands Leon Moonen, Simula Research Lab, Norway ?
Department of Computer Science A Static Program Analyzer to increase software reuse Ramakrishnan Venkitaraman and Gopal Gupta.
CSC-682 Cryptography & Computer Security Sound and Precise Analysis of Web Applications for Injection Vulnerabilities Pompi Rotaru Based on an article.
1 Fast and Efficient Partial Code Reordering Xianglong Huang (UT Austin, Adverplex) Stephen M. Blackburn (Intel) David Grove (IBM) Kathryn McKinley (UT.
Static Program Analyses of DSP Software Systems Ramakrishnan Venkitaraman and Gopal Gupta.
Compiler Principles Fall Compiler Principles Lecture 0: Local Optimizations Roman Manevich Ben-Gurion University.
Advanced Computer Architecture Lab University of Michigan Compiler Controlled Value Prediction with Branch Predictor Based Confidence Eric Larson Compiler.
Limits of Instruction-Level Parallelism Presentation by: Robert Duckles CSE 520 Paper being presented: Limits of Instruction-Level Parallelism David W.
ESEC/FSE-99 1 Data-Flow Analysis of Program Fragments Atanas Rountev 1 Barbara G. Ryder 1 William Landi 2 1 Department of Computer Science, Rutgers University.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
Exploiting Scratchpad-aware Scheduling on VLIW Architectures for High-Performance Real-Time Systems Yu Liu and Wei Zhang Department of Electrical and Computer.
Pointer Analysis for Multithreaded Programs Radu Rugina and Martin Rinard M I T Laboratory for Computer Science.
1/25 June 28 th, 2006 BranchTap: Improving Performance With Very Few Checkpoints Through Adaptive Speculation Control BranchTap Improving Performance With.
BarrierWatch: Characterizing Multithreaded Workloads across and within Program-Defined Epochs Socrates Demetriades and Sangyeun Cho Computer Frontiers.
Static Identification of Delinquent Loads V.M. Panait A. Sasturkar W.-F. Fong.
Methodology to Compute Architectural Vulnerability Factors Chris Weaver 1, 2 Shubhendu S. Mukherjee 1 Joel Emer 1 Steven K. Reinhardt 1, 2 Todd Austin.
2D-Profiling Detecting Input-Dependent Branches with a Single Input Data Set Hyesoon Kim M. Aater Suleman Onur Mutlu Yale N. Patt HPS Research Group The.
IA64 Complier Optimizations Alex Bobrek Jonathan Bradbury.
Thermal-Aware Data Flow Analysis José L. Ayala – Complutense University (Spain) David Atienza – EPFL (Switzerland) Philip Brisk – EPFL (Switzerland)
Optimization Simone Campanoni
Memory Protection through Dynamic Access Control Kun Zhang, Tao Zhang and Santosh Pande College of Computing Georgia Institute of Technology.
Code Generation Instruction Selection Higher level instruction -> Low level instruction Register Allocation Which register to assign to hold which items?
Run-time organization
Topic 17: Memory Analysis
Hyesoon Kim Onur Mutlu Jared Stark* Yale N. Patt
Lecture 4: Instruction Set Design/Pipelining
rePLay: A Hardware Framework for Dynamic Optimization
Pointer analysis John Rollinson & Kaiyuan Li
Presentation transcript:

D A C U C P Speculative Alias Analysis for Executable Code Manel Fernández and Roger Espasa Computer Architecture Department Universitat Politècnica de Catalunya Barcelona, Spain

D A C U C P Motivation Alias analysis Provides information for memory disambiguation  Key issue in today’s optimizing compilers Formulated as a dataflow analysis  In terms of source language constructs  Trade-off between cost and precision Executable code optimizers New optimization opportunities appear  Whole program view, etc. Limited usefulness of “traditional” analyses  High level information is lost  Object code is larger than corresponding source code Memory disambiguation is one of the weak points of object code modification

D A C U C P Alias analysis on executable code Existing techniques Instruction inspection  Register use-def chains Residue-based alias analysis  [Debray et al. POPL ‘98]  Arithmetic computations mod-k –Small displacements from a base register  “Fine grain” disambiguation Problems of existing alias analysis Low precision  Conservative assumptions Strong resource-usage constraints  Widening: less precision joining different definitions  Context-insensitive formulation

D A C U C P Talk outline Motivation Speculative alias analysis Evaluation Summary

D A C U C P Speculative alias analysis Existing analysis are conservative Trade off between cost and precision A new variable: safeness Analysis becomes speculative  Increases precision at low cost  Analysis is not always correct Our proposals Two may-alias approaches  Region-based alias analysis  Profile-guided alias analysis Well-suited for speculative optimizations  Speculative reordering based on check-and-recovery schemes  E.g.: reordering memory operations Safeness Precision Resource usage (cost) Resource usage (cost) Alias Analysis Alias Analysis

D A C U C P Propagating memory regions Observations Conservative propagation of descriptors  E.g.: operating different definitions Loads produce conservative descriptors  Nothing is known about the loaded value Key ideas Propagation without losing precision  Propagating “very basic” information “Guessing” possible memory regions  Memory regions “are disjoint” –Global –Stack –Heap... I 2 load (sp),r1 I 2 add gp,r1,r1 I 1 store r0,(r1) I 2 load (sp),r0...

D A C U C P Region-based alias analysis Interprocedural low-level scheme Well-suited for executable code Computation of memory regions For each register r defines S  S : set of regions { Global, Stack, Heap }  T = ,  = { G,S,H } Dataflow propagation Speculative approach  Assumptions are not always correct “Coarse-grain” disambiguation  Can be applied coupled to a residue-based scheme Aggressive region-based analysis Loaded values are hardly ever aliased with other pointers  E.g.: linked lists Set load destination descriptors to T instead of ... I 2 load (sp),r1 I 2 add gp,r1,r1 I 1 store r0,(r1) I 2 load (sp),r0...

D A C U C P Propagating likely paths Observations Widening operation is conservative  E.g.: several definitions reaching a use Context-insensitive analysis  Context-sensitive is not feasible Key ideas Propagation without loosing precision  Reducing the number of paths “Cold” references are not important  Conflicts are not significant at run time  Ignore “cold” paths I 1 store r0,(r1) I 2 load (sp),r0... add sp,0,r1... add gp,0,r1 Hot path

D A C U C P Profile-guided alias analysis Interprocedural general scheme Needs profile information Only likely executed paths are considered Applied on top of any dataflow analysis  Redefine join operation Speculative approach  “Cold” paths are ignored “Likely-path” disambiguation

D A C U C P A combined algorithm Alias analysis scheme Phase 1  Use-def chains Phase 2  Residue-based  Region-based Phase 3  Profile-guided Phase 2 Disambiguation scheme Input: I 1,I 2 Output: {dependent, independent, likely independent, unknown} Method: if ud-chains (I 1,I 2 ) ≠ unknown return ud-chains (I 1,I 2 ); if aliasing (I 1,I 2,safe) ≠ unknown return aliasing (I 1,I 2,safe); if aliasing (I 1,I 2,unsafe) ≠ unknown return likely independent; else return unknown; End Method

D A C U C P Talk outline Motivation Speculative alias analysis Evaluation Summary

D A C U C P Methodology Benchmark suite SPECint95  Compiled on an AlphaServer with full optimizations  Intrumented using Pixie to get profiling information Experimental framework Alto executable optimizer SimpleScalar safe simulator Evaluation Static precision Misspeculation rate

D A C U C P Evaluating effectiveness Disambiguation query “Question” made to the memory disambiguator Relationship between two memory references  Dependent, independent, likely independent  Unknown Set of disambiguation queries Pair of references that belong to the same function Building the set  Consider every load/store in a hot path (2nd item)  Consider every load/store in previous paths (1st item) Typical behavior of compiler optimizations

D A C U C P Static precision

D A C U C P Misspeculation rate

D A C U C P Talk outline Motivation Speculative alias analysis Evaluation Summary

D A C U C P Summary Memory disambiguation is one of the weak points of object code modification Speculative alias analysis Compromise among cost, precision and safeness  Region-based alias analysis  Profile-guided alias analysis Well-suited for executable code Conclusions Precision increases from 16% up to 83% in average Misspeculation rate around 1%  In front of 2% using an “always speculate” scheme To be used for reordering memory operations with high recovery cost