1 / 12

May-Alias Analysis for L3

May-Alias Analysis for L3. David Abraham, Elisabeth Crawford, Sue Ann Hong, and Virginia Vassilevska. Introduction. What does alias mean? Two pointers alias each other if both point to the same memory location What is alias analysis ?

yin
Download Presentation

May-Alias Analysis for L3

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. May-Alias Analysis for L3 David Abraham, Elisabeth Crawford, Sue Ann Hong, and Virginia Vassilevska

  2. Introduction • What does alias mean? • Two pointers alias each other if both point to the same memory location • What is alias analysis? • Determining what each pointer references, so we can tell if two pointers alias each other • Why is alias analysis useful? • Many code optimizations are overly conservative without alias information memory p q

  3. BEFORE a = mem(p) mem(q) = b c = mem(p) d = a + c Is q an alias of p? Yes or Don’t Know: mem(q) store kills availability of mem(p) No: apply common sub-expression elimination, and then copy propagation AFTER a = mem(p) mem(q) = b d = a + a Use of Alias-Analysis

  4. May-Alias Analysis • Can’t statically track what each pointer refers to exactly • So be conservative - track what each pointer may refer to • p, q may alias each other if they may refer to same memory location

  5. Some May-Alias Rules • Let alias(q) = set of memory locations that q may alias

  6. May-Alias Dataflow Analysis • For each statement s: • IN(s) = alias information for each pointer on entry to s • OUT(s) = alias information for each pointer on exit from s • IN(s)=unionpOUT(p), where p is predecessor of s • OUT = IN with statement rule applied

  7. Experimental Setup • L3 Test Suite: • Correctness tests (not reported here) • Big directory performance tests • Tested combinations of optimizations to identify performance gains and hits

  8. Runtime Results

  9. More Runtime Results

  10. Code Transformation Results

  11. Conclusions • Alias analysis can greatly increase the effectiveness of optimizations, in terms of: • Runtime performance • Temp usage • Alias analysis works best in tandem with copy propagation • Alias analysis is expensive; performance payoffs may not be worthwhile in a JIT compiler

  12. Bibliography • Modern Compiler Implementation in ML, Appel • On the importance of points-to-analysis and other memory disambiguation methods for C programs, Ghiya, Lavery, and Sehr • An improved intra-procedural may-alias analysis algorithm, Goyal • Advanced Compiler Design and Implementation, Muchnick • Survey of Alias Analysis, Wu

More Related