Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Pointer Analysis for CASH Compiler Framework Deepak Garg Himanshu Jain Spring 2005."— Presentation transcript:

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

2 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

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

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

5 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

6 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

7 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 )

8 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

9 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

10 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

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

12 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 = 

13 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


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

Similar presentations


Ads by Google