[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/2854038.2854050acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

Symbolic range analysis of pointers

Published: 29 February 2016 Publication History

Abstract

Alias analysis is one of the most fundamental techniques that compilers use to optimize languages with pointers. However, in spite of all the attention that this topic has received, the current state-of-the-art approaches inside compilers still face challenges regarding precision and speed. In particular, pointer arithmetic, a key feature in C and C++, is yet to be handled satisfactorily. This paper presents a new alias analysis algorithm to solve this problem. The key insight of our approach is to combine alias analysis with symbolic range analysis. This combination lets us disambiguate fields within arrays and structs, effectively achieving more precision than traditional algorithms. To validate our technique, we have implemented it on top of the LLVM compiler. Tests on a vast suite of benchmarks show that we can disambiguate several kinds of C idioms that current state-of-the-art analyses cannot deal with. In particular, we can disambiguate 1.35x more queries than the alias analysis currently available in LLVM. Furthermore, our analysis is very fast: we can go over one million assembly instructions in 10 seconds.

Supplementary Material

Auxiliary Archive (p171-paisante-s.zip)

References

[1]
A. V. Aho, M. S. Lam, R. Sethi, and J. D. Ullman. Compilers: Principles, Techniques, and Tools (2nd Edition). Addison Wesley, 2006.
[2]
L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, 1994.
[3]
G. Balakrishnan and T. Reps. Analyzing memory accesses in x86 executables. In In CC, pages 5–23. Springer, 2004.
[4]
W. Blume and R. Eigenmann. Symbolic range propagation. In In IPPS, pages 357–363, 1994.
[5]
R. Bodik, R. Gupta, and V. Sarkar. ABCD: eliminating array bounds checks on demand. In In PLDI, pages 321–333. ACM, 2000.
[6]
J.-D. Choi, R. Cytron, and J. Ferrante. Automatic construction of sparse data flow evaluation graphs. In In POPL, pages 55– 66. ACM, 1991.
[7]
P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In In POPL, pages 238–252. ACM, 1977.
[8]
R. Cytron, J. Ferrante, B. Rosen, M. Wegman, and K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. TOPLAS, 13(4):451–490, 1991.
[9]
D. Grunwald, B. Zorn, and R. Henderson. Improving the cache locality of memory allocation. In In PLDI, pages 177– 186. ACM, 1993.
[10]
B. Hardekopf and C. Lin. The ant and the grasshopper: fast and accurate pointer analysis for millions of lines of code. In In PLDI, pages 290–299. ACM, 2007.
[11]
B. Hardekopf and C. Lin. Flow-sensitive pointer analysis for millions of lines of code. In In CGO, pages 265–280, 2011.
[12]
M. Hind. Pointer analysis: Haven’t we solved this problem yet? In In PASTE, pages 54–61. ACM, 2001.
[13]
N. D. Jones and S. S. Muchnick. A flexible approach to interprocedural data flow analysis and programs with recursive data structures. In In POPL, pages 66–74. ACM, 1982.
[14]
C. Lattner and V. S. Adve. LLVM: A compilation framework for lifelong program analysis & transformation. In CGO, pages 75––88. IEEE, 2004.
[15]
H. Nazaré, I. Maffra, W. Santos, L. Barbosa, L. Gonnord, and F. M. Q. Pereira. Validation of memory accesses through symbolic analyses. In In OOPSLA, pages 791–809. ACM, 2014.
[16]
H. Oh, W. Lee, K. Heo, H. Yang, and K. Yi. Selective contextsensitivity guided by impact pre-analysis. In In PLDI, pages 475–484. ACM, 2014.
[17]
D. J. Pearce, P. H. J. Kelly, and C. Hankin. Efficient fieldsensitive pointer analysis for C. In In PASTE, pages 37–42, 2004.
[18]
F. M. Q. Pereira and D. Berlin. Wave propagation and deep propagation for pointer analysis. In In CGO, pages 126–135. IEEE, 2009.
[19]
R. Rugina and M. C. Rinard. Symbolic bounds analysis of pointers, array indices, and accessed memory regions. TOPLAS, 27(2):185–235, 2005.
[20]
B. G. Ryder, W. A. Landi, P. A. Stocks, S. Zhang, and R. Altucher. A schema for interprocedural modification side-effect analysis with pointer aliasing. ACM Trans. Program. Lang. Syst., 23(2):105–186, 2001.
[21]
L. Shang, X. Xie, and J. Xue. On-demand dynamic symmarybased points-to analysis. In In CGO, pages 264–274. ACM, 2012.
[22]
B. Steensgaard. Points-to analysis in almost linear time. In In POPL, pages 32–41, 1996.
[23]
A. L. C. Tavares, B. Boissinot, F. M. Q. Pereira, and F. Rastello. Parameterized construction of program representations for sparse dataflow analyses. In In Compiler Construction, pages 2–21. Springer, 2014.
[24]
M. Wolfe. High Performance Compilers for Parallel Computing. Adison-Wesley, 1st edition, 1996.
[25]
D. Yan, G. Xu, and A. Rountev. Demand-driven contextsensitive alias analysis for java. In In ISSTA, pages 155–165. ACM, 2011.
[26]
S. H. Yong and S. Horwitz. Pointer-range analysis. In In SAS, pages 133–148. Springer, 2004.
[27]
Q. Zhang, X. Xiao, C. Zhang, H. Yuan, and Z. Su. Efficient subcubic alias analysis for C. In In OOPSLA, pages 829–845. ACM, 2014.
[28]
Q. Zhao, R. Rabbah, and W.-F. Wong. Dynamic memory optimization using pool allocation and prefetching. SIGARCH Comput. Archit. News, 33(5):27–32, 2005.

Cited By

View all
  • (2024)Representing Data Collections in an SSA FormProceedings of the 2024 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO57630.2024.10444817(308-321)Online publication date: 2-Mar-2024
  • (2023)Rapid: Region-Based Pointer DisambiguationProceedings of the ACM on Programming Languages10.1145/36228597:OOPSLA2(1729-1757)Online publication date: 16-Oct-2023
  • (2022)The road not taken: exploring alias analysis based optimizations missed by the compilerProceedings of the ACM on Programming Languages10.1145/35633166:OOPSLA2(786-810)Online publication date: 31-Oct-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
CGO '16: Proceedings of the 2016 International Symposium on Code Generation and Optimization
February 2016
283 pages
ISBN:9781450337786
DOI:10.1145/2854038
Permission to make digital or hard copies of all or part 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 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. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

In-Cooperation

  • IEEE-CS: Computer Society

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 February 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Alias analysis
  2. precision
  3. range analysis
  4. speed

Qualifiers

  • Research-article

Conference

CGO '16

Acceptance Rates

CGO '16 Paper Acceptance Rate 25 of 108 submissions, 23%;
Overall Acceptance Rate 312 of 1,061 submissions, 29%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)22
  • Downloads (Last 6 weeks)2
Reflects downloads up to 13 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Representing Data Collections in an SSA FormProceedings of the 2024 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO57630.2024.10444817(308-321)Online publication date: 2-Mar-2024
  • (2023)Rapid: Region-Based Pointer DisambiguationProceedings of the ACM on Programming Languages10.1145/36228597:OOPSLA2(1729-1757)Online publication date: 16-Oct-2023
  • (2022)The road not taken: exploring alias analysis based optimizations missed by the compilerProceedings of the ACM on Programming Languages10.1145/35633166:OOPSLA2(786-810)Online publication date: 31-Oct-2022
  • (2021)Memory-safe elimination of side channelsProceedings of the 2021 IEEE/ACM International Symposium on Code Generation and Optimization10.1109/CGO51591.2021.9370305(200-210)Online publication date: 27-Feb-2021
  • (2019)IGC: the open source Intel graphics compilerProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314902(254-265)Online publication date: 16-Feb-2019
  • (2019)IGC: The Open Source Intel Graphics Compiler2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2019.8661189(254-265)Online publication date: Feb-2019
  • (2018)Loop-Oriented Pointer Analysis for Automatic SIMD VectorizationACM Transactions on Embedded Computing Systems10.1145/316836417:2(1-31)Online publication date: 30-Jan-2018
  • (2018)A Demand-Driven Pointer-Range Analysis Technique for Data Transmission Optimization2018 IEEE Intl Conf on Parallel & Distributed Processing with Applications, Ubiquitous Computing & Communications, Big Data & Cloud Computing, Social Computing & Networking, Sustainable Computing & Communications (ISPA/IUCC/BDCloud/SocialCom/SustainCom)10.1109/BDCloud.2018.00088(557-564)Online publication date: Dec-2018
  • (2018)Combining range and inequality information for pointer disambiguationScience of Computer Programming10.1016/j.scico.2017.10.014152:C(161-184)Online publication date: 15-Jan-2018
  • (2017)Pointer disambiguation via strict inequalitiesProceedings of the 2017 International Symposium on Code Generation and Optimization10.5555/3049832.3049848(134-147)Online publication date: 4-Feb-2017
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media