¡¡Chinese Journal of Computers   Full Text
  TitleAn Aggressively Field-Sensitive Unification-Based Pointer Analysis
  AuthorsYU Hong-Tao ZHANG Zhao-Qing
  Address(Key Laboratory of Computer System and Architecture, Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190)
  Year2009
  IssueNo.9(1722¡ª1735)
  Abstract &
  Background
Abstract Pointer analysis is the basis of most other static program analyses for C programming language. The precision of pointer analysis is crucial to optimizing compilers and software productivity tools. Field-sensitivity is used to describe whether a pointer analysis needs to distinguish different field members. Field-insensitive pointer analysis considers all fields of one structural object as the same object. On the contrary, field-sensitive pointer analysis considers different fields as different objects. This paper proposes an aggressively field-sensitive unification-based pointer analysis. Different from existed methods, the method takes target machine architecture into consider in the phase of high-level analysis in order to precisely distinguish fields of structure objects. In the method, a field of a structural object is aggressively represented by a pair of offset from its base structure and size of its own data type. The original inference system is improved to avoid the loss of precision due to joining type variables. All structural memory operations are flattened to a series of scalar memory operations based on the target machine information to guarantee the correctness of type inference system. Lots of experiments indicate that the new method is more precise than the existed method while maintaining almost the same efficiency. Furthermore, the method is portable since the aggressive field representation have been implemented on the intermediate representation of the authors¡¯ compiler. Keywords field-sensitive; unification-based; Steensgaard-style; pointer analysis; alias analysis