Download presentation
Presentation is loading. Please wait.
1
Pointer Analysis for CASH Compiler Framework Deepak Garg Himanshu Jain Spring 2005
2
Project Goal Flow insensitive, context insensitive Pointer analysis for CASH Use a constraint based formulation Compare with existing pointer analysis in CASH
3
Possible choices: – Context sensitive vs. insensitive – Flow sensitive vs. insensitive We choose flow insensitive, context insensitive analysis – Scalable – Results reasonably good Pointer Analysis
4
Two popular analyses –Andersen’s analysis (O(n 3 )) –Steensgaard’s analysis (O(n (n,n))) Both create points-to graphs for program locations Andersen’s more accurate (we will implement this) Flow & Context Insensitive Analysis
5
Example a = &b b = &c a = &d d = &e a bd ce Andersen’s analysis a c,e b,d Steensgaard’s analysis
6
Using Constraints Both analysis can be expressed in constraint-based frameworks High-level idea –Traverse IR and generate constraints that express points-to information –Use constraint solver to solve constraints
7
Implementing Andersen’s Traverse program expressions Give each expression e a type written e: is a set of program locations e: means “e may evaluate to address of any location in ”
8
Implementing Andersen’s Typing rules generate constraints on types Example:
9
Solving the Constraints Banshee framework –General purpose constraint solver for set- based constraints –Given specification of constraint language, generates a constraint solver for it Can be easily used for Andersen’s analysis
10
Where we are… Know how to use Banshee Have read about Andersen’s analysis TODO: –Are studying the existing pointer analysis in CASH –Design a constraint generation procedure for CASH IR –Interface with Banshee
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.