21 - Advanced Topics Alias Analysis Last Time What is...

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

View Full Document Right Arrow Icon
Advanced Topics Last Time Experimental Methodology Today What’s a managed language? Alias Analysis - dealing with pointers Focus on statically typed managed languages Method invocation resolution CS 380C Lecture 21 1 Alias Analysis Alias Analysis What is pointer analysis? For umanaged languages like C, C++, and managed languages like C#, Java, Modula-3 Goal: given two memory references, m and n ,and ap rogrampo int , p ,can m and n access the same memory location? Pointer analysis is an important problem Compiler optimizations require alias information Error detection Program slicing/debugging Data structure shape analysis: is it a tree? Object inlining, object colocation, synchronization elimination, etc. CS 380C Lecture 21 2 Alias Analysis
Background image of page 1

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

View Full DocumentRight Arrow Icon
Pointer analysis is hard Undecidable in general [Landi 92] Many approximations Near linear, but imprecise [Steensgaard 97] Double exponential shape analysis [Sagiv 98] Why haven’t we solved this problem? [Hind 01] No one algorithm satisfes all client needs Sample Client driven results: Error detection: needs high precision, but a demand driven precision can provide precision at low cost [Guyer/Lin 03] Scalar optimizations: do not need high precision [Chowdhury et al. 03, Diwan et al. 98/01] Object colocation: a Fast, simple, and unsound analysis is e±ective [Guyer/McKinley 04] CS 380C Lecture 21 3 Alias Analysis Taxonomy Interprocedural data-²ow analysis Interprocedural or intraprocedural? Do we compute the e±ects oF calls? Context-sensitive or insensitive? Do we take into account the calling context? ³low-sensitive or insensitive? Do we take into account control ²ow More precise means more expensive. Address-taken: ³low and context insensitive. Intraprocedural or interprocedural. Every variable that may be aliased goes in a single set. Single pass. Steensgaard: ³low and context insensitive. Interprocedural. Uses union-fnd to create sets oF aliases. Single pass. Anderson: ³low and context insensitive. Interprocedural. Creates sets oF aliases. Iterative on the C³G. Burke: ³low-insensitive and context sensitive. Interprocedural. Iterative on the C³G and Call graph. Choi et al.: ³low and context sensitive. Interprocedural. Iterative on the C³G and Call graph. CS 380C Lecture 21 4 Alias Analysis
Background image of page 2
Example: Simple Alias Analysis Language context Modula-3: a statically-typed, object-oriented programming language.
Background image of page 3

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

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

Page1 / 16

21 - Advanced Topics Alias Analysis Last Time What is...

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

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