Pointer Analysis for CASH Compiler Framework Deepak Garg Himanshu Jain Spring 2005.

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

Optimizing Memory Accesses for Spatial Computation Mihai Budiu, Seth Goldstein CGO 2003.
R O O T S Field-Sensitive Points-to-Analysis Eda GÜNGÖR
Runtime Techniques for Efficient and Reliable Program Execution Harry Xu CS 295 Winter 2012.
Link-Time Path-Sensitive Memory Redundancy Elimination Manel Fernández and Roger Espasa Computer Architecture Department Universitat.
Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers Presentation by Patrick Kaleem Justin.
Idea of Register Allocation x = m[0]; y = m[1]; xy = x*y; z = m[2]; yz = y*z; xz = x*z; r = xy + yz; m[3] = r + xz x y z xy yz xz r {} {x} {x,y} {y,x,xy}
Dynamic Memory Allocation (also see pointers lectures) -L. Grewe.
Analysis of programs with pointers. Simple example What are the dependences in this program? Problem: just looking at variable names will not give you.
CS412/413 Introduction to Compilers Radu Rugina Lecture 37: DU Chains and SSA Form 29 Apr 02.
Demand-driven Alias Analysis Implementation Based on Open64 Xiaomi An
Flow insensitive pointer analysis: fixed S1: l := new Cons p := l S2: t := new Cons *p := t p := t l p S1 l p tS2 l p S1 t S2 l t S1 p S2 l t S1 p S2 l.
School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) Pointer Analysis.
Flow-Insensitive Points-to Analysis with Term and Set Constraints Presentation by Kaleem Travis Patrick.
Parallel Inclusion-based Points-to Analysis Mario Méndez-Lojo Augustine Mathew Keshav Pingali The University of Texas at Austin (USA) 1.
Faculty of Computer Science LCPC 2007 Using ZBDDs in Points-to Analysis Stephen Curial Jose Nelson Amaral Department of Computing Science University of.
Parameterized Object Sensitivity for Points-to Analysis for Java Presented By: - Anand Bahety Dan Bucatanschi.
The Ant and The Grasshopper Fast and Accurate Pointer Analysis for Millions of Lines of Code Ben Hardekopf and Calvin Lin PLDI 2007 (Best Paper & Best.
Program Analysis with Set Constraints Ravi Chugh.
Aliases in a bug finding tool Benjamin Chelf Seth Hallem June 5 th, 2002.
Next Section: Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis (Wilson & Lam) –Unification.
Administrative info Subscribe to the class mailing list –instructions are on the class web page, which is accessible from my home page, which is accessible.
Set Constraint-Based Program Analysis Manuel Fähndrich CS590 UW Spring 2001.
From last time: reaching definitions For each use of a variable, determine what assignments could have set the value being read from the variable Information.
“Tracking Pointers with Path and Context Sensitivity for Bug Detection in C Programs” CMSC 838Z – Spring 2004 V. Benjamin Livshits and Monica S. Lam presented.
Another example p := &x; *p := 5 y := x + 1;. Another example p := &x; *p := 5 y := x + 1; x := 5; *p := 3 y := x + 1; ???
Range Analysis. Intraprocedural Points-to Analysis Want to compute may-points-to information Lattice:
From last class: CSE Want to compute when an expression is available in a var Domain:
Pointer Analysis for CASH Compiler Framework Deepak Garg Himanshu Jain Spring 2005.
Class canceled next Tuesday. Recap: Components of IR Control dependencies: sequencing of operations –evaluation of if & then –side-effects of statements.
Intraprocedural Points-to Analysis Flow functions:
Swerve: Semester in Review. Topics  Symbolic pointer analysis  Model checking –C programs –Abstract counterexamples  Symbolic simulation and execution.
ESP [Das et al PLDI 2002] Interface usage rules in documentation –Order of operations, data access –Resource management –Incomplete, wordy, not checked.
Projects. Dataflow analysis Dataflow analysis: what is it? A common framework for expressing algorithms that compute information about a program Why.
Comparison Caller precisionCallee precisionCode bloat Inlining context-insensitive interproc Context sensitive interproc Specialization.
Reps Horwitz and Sagiv 95 (RHS) Another approach to context-sensitive interprocedural analysis Express the problem as a graph reachability query Works.
An Efficient Inclusion-Based Points-To Analysis for Strictly-Typed Languages John Whaley Monica S. Lam Computer Systems Laboratory Stanford University.
Recap from last time We saw various different issues related to program analysis and program transformations You were not expected to know all of these.
Pointer analysis. Pointer Analysis Outline: –What is pointer analysis –Intraprocedural pointer analysis –Interprocedural pointer analysis Andersen and.
Automatic Pool Allocation for Disjoint Data Structures Presented by: Chris Lattner Joint work with: Vikram Adve ACM.
Chapter 16:Electricity Section 3 – Circuits.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University STATIC ANALYSES FOR JAVA IN THE PRESENCE OF DISTRIBUTED COMPONENTS AND.
Pointer Analysis The material in these slides has been taken from two different papers, [Hardekopf07] and [Pereira11]. See "A bit of History" in the last.
Putting Pointer Analysis to Work Rakesh Ghiya and Laurie J. Hendren Presented by Shey Liggett & Jason Bartkowiak.
A GPU Implementation of Inclusion-based Points-to Analysis Mario Méndez-Lojo (AMD) Martin Burtscher (Texas State University, USA) Keshav Pingali (U.T.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Fast Points-to Analysis for Languages with Structured Types Michael Jung and Sorin A. Huss Integrated Circuits and Systems Lab. Department of Computer.
Lesson 2 How do electric circuits work?. Electric Circuits You know that electric circuits only work when the circuit is closed. OPEN.
PRESTO: Program Analyses and Software Tools Research Group, Ohio State University Merging Equivalent Contexts for Scalable Heap-cloning-based Points-to.
Pointer Analysis Survey. Rupesh Nasre. Aug 24, 2007.
Pointer Analysis for Multithreaded Programs Radu Rugina and Martin Rinard M I T Laboratory for Computer Science.
Points-To Analysis in Almost Linear Time Josh Bauman Jason Bartkowiak CSCI 3294 OCTOBER 9, 2001.
Electrical Circuits. In this activity you will: In this activity you will learn about two types of circuits. You will write a paragraph comparing and.
CS 3220: Compilation Techniques for Parallel Systems Spring Pitt CS
Pointer and Escape Analysis for Multithreaded Programs Alexandru Salcianu Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology.
Points-to Analysis as a System of Linear Equations Rupesh Nasre. Computer Science and Automation Indian Institute of Science Advisor: Prof. R. Govindarajan.
Selected Topics in Data Networking Explore Social Networks:
1PLDI 2000 Off-line Variable Substitution for Scaling Points-to Analysis Atanas (Nasko) Rountev PROLANGS Group Rutgers University Satish Chandra Bell Labs.
Online Cycle Detection and Difference Propagation for Pointer Analysis David J. Pearce, Paul H.J. Kelly and Chris Hankin Imperial College, London
More Code Generation and Optimization Pat Morin COMP 3002.
Manuel Fahndrich Jakob Rehof Manuvir Das
Dataflow analysis.
Graph-Based Operational Semantics
Garbage Collection Modern programming languages provide garbage collection mechanisms for reclaiming the memory locations that are no longer used by programs.
Basic Electrical Circuits
Indirection.
Pointer analysis.
Basic Electrical Circuits
Assignment #2 (Assignment due: Nov. 06, 2018) v1 v2 v3 v4 v5
Pointer analysis John Rollinson & Kaiyuan Li
Presentation transcript:

Pointer Analysis for CASH Compiler Framework Deepak Garg Himanshu Jain Spring 2005

Project Goals Andersen’s Pointer Analysis for CASH –Flow sensitive formulation on Pegasus circuits –Context insensitive –Intra-procedural Constraint based formulation –Solve using Banshee Use points-to sets to remove token edges between loads and stores

Andersen’s Analysis (without SSA) a = &b b = &c a = &d d = &e a bd ce Points-to relationships Flow Insensitive

Andersen’s Analysis (with SSA) a = &b b = &c a’ = &d d = &e a bd ce Points-to relationships Flow Sensitive a’

Implementing Andersen’s for PEGASUS circuit Assign a type  x to each wire x  x has the form ref (l x, P x ) l x is the name of a location (register/memory) P x is a set of types that x can point to Types are sets

Assignment constraint copy x = y ref (l x, P x ) ref (l y, P y ) Constraint: P y µ P x copy = hold/nop/reg/cast/eta

Join nodes Constraints: P y µ P x P z µ P x join = mu/mux/switch ref (l x, P x ) ref (l y, P y ) x =  (y, z) ref (l z, P z )

Call nodes ref (l w, ref (“malloc”, Y)) op_cal ref (l v, ref (l x, P x )) l x, P x and X are new ref (l w, _) op_cal ref (l v, U) Any function name U is the universal set

Store and load Constraint: P y µ P x ref (l y, P y ) *w = y y ref (l w, ref(l x, P x )) w z = *w ref (l w, ref(l x, P x )) w z ref (l z, P z ) Constraint: P x µ P z

Token Dependencies Token dependencies depict temporal dependence between operations Unnecessary token edges reduce parallelization Token dependencies between load and store operations can be removed using points-to sets

Identifying Token Dependencies Just looking at token edges is not enough load tkand store Indirect dependence Take the transitive closure of token edges

Removing Token Dependencies Identify read and write sets for each load and store node load x = *y store *u = v Read1 = {y, pts_to(y)} Write1 = {x} Read2 = {v, u} Write2 = {pts_to(u)} Dependence is false when Read1 Å Write2 =  Read2 Å Write1 =  Write1 Å Write2 = 

Implementation Constraints are solved using Banshee framework Implementation reports false dependencies between nodes Very useful in detecting false dependencies with malloc() calls Tested on small examples, plan to run on real benchmarks