This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Points-to Analysis in Almost Linear Time Bjarne Steensgaard Microsoft Research One Microsoft Way Redmond, WA 98052, USA [email protected] A b strac t We present an interprocedural flow-insensitive points-to analysis based on type inference methods with an almost linear time cost complexity. To our knowledge, this is the asymptotically fastest non-trivial interprocedural points-to analysis algorithm yet described. The algorithm is based on a non-standard type system. The type inferred for any variable represents a set of locations and includes a type which in turn represents a set of locations possibly pointed to by the variable. The type inferred for a function variable repre- sents a set of functions it may point to and includes a type signature for these functions. The results are equivalent to those of a flow- insensitive alias analysis (and control flow analysis) that assumes alias relations are reflexive and transitive. This work makes three contributions. The first is a type system for describing a universally valid storage shape graph for a program in linear space. The second is a constraint system which often leads to better results than the “obvious” constraint system for the given type system. The third is an almost linear time algorithm for points-to analysis by solving a constraint system. In troduc t ion Modern optimizing compilers and program understanding and brows- ing tools for pointer languages such as C [KR88] are dependent on semantic information obtained by either an alias analysis or a points-to analysis. Alias analyses compute pairs of expressions (or access paths) that may be aliased ( e.g. , [LR92, LRZ93]). Points- to analyses compute a store model using abstract locations ( e.g. , [CWZ90, EGH94, WL95, Ruf95]). Most current compilers and programming tools use only in- traprocedural analyses, as the polynomial time and space complex- ity of the common data-flow based analyses prevents the use of interprocedural analyses for large programs. Interprocedural analy- sis is becoming increasingly important, as it is necessary to support whole-program optimization and various program understanding tools. Previously published interprocedural analysis algorithms have not been reported to have been successfully applied to pro- grams around 100,000 lines of C code (the published results are practically all for less than 10,000 lines of C code). Copyright c 1995 by the Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that new copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted....
View Full Document
This note was uploaded on 02/24/2012 for the course CSE 503 taught by Professor Davidnotikin during the Winter '11 term at University of Washington.
- Winter '11