Parameterized Construction of Program Representations for Sparse Dataflow Analyses

  • André Tavares
  • Benoit Boissinot
  • Fernando Pereira
  • Fabrice Rastello
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8409)

Abstract

Data-flow analyses usually associate information with control flow regions. Informally, if these regions are too small, like a point between two consecutive statements, we call the analysis dense. On the other hand, if these regions include many such points, then we call it sparse. This paper presents a systematic method to build program representations that support sparse analyses. To pave the way to this framework we clarify the bibliography about well-known intermediate program representations. We show that our approach, up to parameter choice, subsumes many of these representations, such as the SSA, SSI and e-SSA forms. In particular, our algorithms are faster, simpler and more frugal than the previous techniques used to construct SSI - Static Single Information - form programs. We produce intermediate representations isomorphic to Choi et al.’s Sparse Evaluation Graphs (SEG) for the family of data-flow problems that can be partitioned per variables. However, contrary to SEGs, we can handle - sparsely - problems that are not in this family. We have tested our ideas in the LLVM compiler, comparing different program representations in terms of size and construction time.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ananian, S.: The static single information form. Master’s thesis. MIT (September 1999)Google Scholar
  2. 2.
    Appel, A.W., Palsberg, J.: Modern Compiler Implementation in Java, 2nd edn. Cambridge University Press (2002)Google Scholar
  3. 3.
    Biggar, P., de Vries, E., Gregg, D.: A practical solution for scripting language compilers. In: SAC, pp. 1916–1923. ACM (2009)Google Scholar
  4. 4.
    Bodik, R., Gupta, R., Sarkar, V.: ABCD: Eliminating array bounds checks on demand. In: PLDI, pp. 321–333. ACM (2000)Google Scholar
  5. 5.
    Boissinot, B., Hack, S., Grund, D., de Dinechin, B.D., Rastello, F.: Fast liveness checking for SSA-form programs. In: CGO, pp. 35–44. IEEE (2008)Google Scholar
  6. 6.
    Briggs, P., Cooper, K.D., Torczon, L.: Improvements to graph coloring register allocation. TOPLAS 16(3), 428–455 (1994)CrossRefGoogle Scholar
  7. 7.
    Campos, V.H.S., Rodrigues, R.E., de Assis Costa, I.R., Pereira, F.M.Q.: Speed and precision in range analysis. In: de Carvalho Junior, F.H., Barbosa, L.S. (eds.) SBLP 2012. LNCS, vol. 7554, pp. 42–56. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  8. 8.
    Chambers, C., Ungar, D.: Customization: Optimizing compiler technology for self, a dynamically-typed object-oriented programming language. SIGPLAN Not. 24(7), 146–160 (1989)CrossRefGoogle Scholar
  9. 9.
    Choi, J.-D., Cytron, R., Ferrante, J.: Automatic construction of sparse data flow evaluation graphs. In: POPL, pp. 55–66. ACM (1991)Google Scholar
  10. 10.
    Chow, F., Chan, S., Liu, S.-M., Lo, R., Streich, M.: Effective representation of aliases and indirect memory operations in SSA form. In: Gyimóthy, T. (ed.) CC 1996. LNCS, vol. 1060, pp. 253–267. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  11. 11.
    Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL, pp. 238–252. ACM (1977)Google Scholar
  12. 12.
    Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Rival, X.: Why does astrée scale up? Form. Methods Syst. Des. 35(3), 229–264 (2009)CrossRefMATHGoogle Scholar
  13. 13.
    Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Efficiently computing static single assignment form and the control dependence graph. TOPLAS 13(4), 451–490 (1991)CrossRefGoogle Scholar
  14. 14.
    de Ferrière, F.: Improvements to the ψ-SSA representation. In: SCOPES, pp. 111–121. ACM (2007)Google Scholar
  15. 15.
    Teixeira, D.C., Pereira, F.M.Q.: The design and implementation of a non-iterative range analysis algorithm on a production Compiler. In: SBLP, pp. 45–59. SBC (2011)Google Scholar
  16. 16.
    Fink, S.J., Knobe, K., Sarkar, V.: Unified analysis of array and object references in strongly typed languages. In: SAS 2000. LNCS, vol. 1824, pp. 155–174. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  17. 17.
    Gawlitza, T., Leroux, J., Reineke, J., Seidl, H., Sutre, G., Wilhelm, R.: Polynomial precise interval analysis revisited. Efficient Algorithms 1, 422–437 (2009)CrossRefGoogle Scholar
  18. 18.
    George, L., Matthias, B.: Taming the IXP network processor. In: PLDI, pp. 26–37. ACM (2003)Google Scholar
  19. 19.
    An, J.H., Chaudhuri, A., Foster, J.S., Hicks, M.: Dynamic inference of static types for ruby. In: POPL, pp. 459–472. ACM (2011)Google Scholar
  20. 20.
    Johnson, R., Pearson, D., Pingali, K.: The program tree structure. In: PLDI, pp. 171–185. ACM (1994)Google Scholar
  21. 21.
    Johnson, R., Pingali, K.: Dependence-based program analysis. In: PLDI, pp. 78–89. ACM (1993)Google Scholar
  22. 22.
    Lattner, C., Adve, V.S.: LLVM: A compilation framework for lifelong program analysis & transformation. In: CGO, pp. 75–88. IEEE (2004)Google Scholar
  23. 23.
    Lo, R., Chow, F., Kennedy, R., Liu, S.-M., Tu, P.: Register promotion by sparse partial redundancy elimination of loads and stores. In: PLDI, pp. 26–37. ACM (1998)Google Scholar
  24. 24.
    Mahlke, S., Ravindran, R., Schlansker, M., Schreiber, R., Sherwood, T.: Bitwidth cognizant architecture synthesis of custom hardware accelerators. TCAD 20(11), 1355–1371 (2001)Google Scholar
  25. 25.
    Miné, A.: The octagon abstract domain. Higher Order Symbol. Comput. 19, 31–100 (2006)CrossRefMATHGoogle Scholar
  26. 26.
    Nanda, M.G., Sinha, S.: Accurate interprocedural null-dereference analysis for java. In: ICSE, pp. 133–143 (2009)Google Scholar
  27. 27.
    Nielson, F., Nielson, H.R., Hankin, C.: Principles of program analysis. Springer (2005)Google Scholar
  28. 28.
    Oh, H., Heo, K., Lee, W., Lee, W., Yi, K.: Design and implementation of sparse global analyses for c-like languages. In: PLDI, pp. 229–238. ACM (2012)Google Scholar
  29. 29.
    Pingali, K., Bilardi, G.: Optimal control dependence computation and the roman chariots problem. In: TOPLAS, pp. 462–491. ACM (1997)Google Scholar
  30. 30.
    Plevyak, J.B.: Optimization of Object-Oriented and Concurrent Programs. PhD thesis, University of Illinois at Urbana-Champaign (1996)Google Scholar
  31. 31.
    Ramalingam, G.: On sparse evaluation representations. Theoretical Computer Science 277(1-2), 119–147 (2002)CrossRefMATHMathSciNetGoogle Scholar
  32. 32.
    Rimsa, A., d’Amorim, M., Quintão Pereira, F.M.: Tainted flow analysis on e-SSA-form programs. In: Knoop, J. (ed.) CC 2011. LNCS, vol. 6601, pp. 124–143. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  33. 33.
    Rimsa, A.A., D’Amorim, M., Pereira, F.M.Q., Bigonha, R.: Efficient static checker for tainted variable attacks. Science of Computer Programming 80, 91–105 (2014)CrossRefGoogle Scholar
  34. 34.
    Rodrigues, R.E., Campos, V.H.S., Pereira, F.M.Q.: A fast and low overhead technique to secure programs against integer overflows. In: CGO, pp. 1–11. ACM (2013)Google Scholar
  35. 35.
    Singer, J.: Static Program Analysis Based on Virtual Register Renaming. PhD thesis, University of Cambridge (2006)Google Scholar
  36. 36.
    Stephenson, M., Babb, J., Amarasinghe, S.: Bitwidth analysis with application to silicon compilation. In: PLDI, pp. 108–120. ACM (2000)Google Scholar
  37. 37.
    Su, Z., Wagner, D.: A class of polynomially solvable range constraints for interval analysis without widenings. Theoretical Computeter Science 345(1), 122–138 (2005)CrossRefMATHMathSciNetGoogle Scholar
  38. 38.
    Tobin-Hochstadt, S., Felleisen, M.: The design and implementation of typed scheme. In: POPL, pp. 395–406 (2008)Google Scholar
  39. 39.
    Wegman, M.N., Zadeck, F.K.: Constant propagation with conditional branches. TOPLAS 13(2) (1991)Google Scholar
  40. 40.
    Weiss, M.: The transitive closure of control dependence: The iterated join. TOPLAS 1(2), 178–190 (1992)Google Scholar
  41. 41.
    Zadeck, F.K.: Incremental Data Flow Analysis in a Structured Program Editor. PhD thesis, Rice University (1984)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • André Tavares
    • 1
  • Benoit Boissinot
    • 2
  • Fernando Pereira
    • 1
  • Fabrice Rastello
    • 3
  1. 1.UFMGBrasil
  2. 2.Ens LyonFrance
  3. 3.InriaFrance

Personalised recommendations