lecture-13 Pointer Analysis

lecture-13 Pointer Analysis - Next Section: Pointer...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Next Section: Pointer Analysis • Outline: – What is pointer analysis – Intraprocedural pointer analysis – Unification based interprocedural pointer analysis (Steensgaard) Pointer and Alias Analysis • Aliases: two expressions that denote the same memory location. • Aliases are introduced by: – pointers – call-by-reference – array indexing – C unions Useful for what? Improve the precision of analyses that require knowing what is modified or referenced (eg const prop, CSE …) Eliminate redundant loads/stores and dead stores. Parallelization of code – can recursive calls to quick_sort be run in parallel? Yes, provided that they reference distinct regions of the array. Identify objects to be tracked in error detection tools x := *p; ... y := *p; // replace with y := x? *x := . ..; // is *x dead? x.lock(); ... y.unlock(); // same object as x? Kinds of alias information Points-to information (must or may versions) – at program point, compute a set of pairs of the form p x, where p points to x. – can represent this information in a points-to graph Alias pairs – at each program point, compute the set of of all pairs (e 1 ,e 2 ) where e 1 and e 2 must/may reference the same memory.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

lecture-13 Pointer Analysis - Next Section: Pointer...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online