Increasing the Scope and Resolution of Interprocedural Static Single Assignment

  • Silvian Calman
  • Jianwen Zhu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5673)

Abstract

While intraprocedural Static Single Assignment (SSA) is ubiquitous in modern compilers, the use of interprocedural SSA, although seemingly a natural extension, is limited. We find that part of the impediment is due to the narrow scope of variables handled by previously reported approaches, leading to limited benefits in optimization.

In this study, we increase the scope of Interprocedural SSA (ISSA) to record elements and singleton heap variables. We show that ISSA scales reasonably well (to all MediaBench and most of the SPEC2K), while resolving on average 1.72 times more loads to their definition. We propose and evaluate an interprocedural copy propagation and an interprocedural liveness analysis and demonstrate their effectiveness on reducing input and output instructions by 44.5% and 23.3%, respectively. ISSA is then leveraged for constant propagation and dead code removal, where 11.8% additional expressions are folded.

Keywords

SSA interprocedural dataflow constant propagation 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Cytron, R., Ferrante, J., Rosen, B.K., Wegman, M.N., Zadeck, F.K.: Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems 13(4), 451–490 (1991)CrossRefGoogle Scholar
  2. 2.
    Wegman, M.N., Zadeck, F.K.: Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems 13(2), 181–210 (1991)CrossRefGoogle Scholar
  3. 3.
    Gal, A., Probst, C.W., Franz, M.: HotpathVM: an effective JIT compiler for resource-constrained devices. In: VEE 2006: Proceedings of the 2nd international conference on Virtual execution environments, pp. 144–153. ACM, New York (2006)Google Scholar
  4. 4.
    Stoutchinin, A., Gao, G.: If-conversion in SSA form. In: Danelutto, M., Vanneschi, M., Laforenza, D. (eds.) Euro-Par 2004. LNCS, vol. 3149, pp. 336–345. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  5. 5.
    Wolfe, M.: Beyond induction variables. In: Proceedings of the Conference on Programming Language Design and Implementation (PLDI), vol. 7(27), pp. 162–174. ACM Press, New York (1992)Google Scholar
  6. 6.
    Hasti, R., Horwitz, S.: Using static single assignment form to improve flow-insensitive pointer analysis. In: Proceedings of SIGPLAN Conference on Programming Language Design and Implementation, pp. 97–105 (1998)Google Scholar
  7. 7.
    Kennedy, R., Chan, S., Liu, S.M., Lo, R., Tu, P., Chow, F.: Partial redundancy elimination in SSA form. ACM Trans. Program. Lang. Syst. 21(3), 627–676 (1999)CrossRefGoogle Scholar
  8. 8.
    Brisk, P., Verma, A.K., Ienne, P.: Optimal polynomial-time interprocedural register allocation for high-level synthesis and asip design. In: ICCAD 2007: Proceedings of the 2007 IEEE/ACM international conference on Computer-aided design, Piscataway, NJ, USA, pp. 172–179. IEEE Press, Los Alamitos (2007)CrossRefGoogle Scholar
  9. 9.
    Liao, S.W.: SUIF Explorer: An interactive and interprocedural parallelizer. PhD thesis, Stanford University, CA, USA, Adviser-Monica S. Lam (2000)Google Scholar
  10. 10.
    Steensgaard, B.: Efficient context-sensitive pointer analysis for C programs. In: Proceedings of the 1996 International Conference on Compiler Construction, April 1996, pp. 136–150 (1996)Google Scholar
  11. 11.
    Staiger, S., Vogel, G., Keul, S., Wiebe, E.: Interprocedural Static Single Assignment Form. In: Proceedings of the 14th Working Conference on Reverse Engineering, pp. 1–10 (2007)Google Scholar
  12. 12.
    Andersen, O.: Program Analysis and Specialization for the C Programming Language. PhD thesis, Computer Science Department, University of Copenhagen (1994)Google Scholar
  13. 13.
    Cytron, R., Gershbein, R.: Efficient accommodation of alias information in SSA form. In: Proceedings of the ACM SIGPLAN 1993 Conference on Programming Language Design and Implementation, pp. 36–45 (1993)Google Scholar
  14. 14.
    Chow, F.C., 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
  15. 15.
    Choi, J.D., Cytron, R., Ferrante, J.: On the efficient engineering of ambitious program analysis. IEEE Trans. Softw. Eng. 20(2), 105–114 (1994)CrossRefGoogle Scholar
  16. 16.
    Lattner, C.: LLVM: An infrastructure for multi-stage optimization. Master’s thesis, Computer Science Dept., University of Illinois at Urbana-Champaign (December 2002)Google Scholar
  17. 17.
    Lee, C., Potkonjak, M., Mangione-Smith, W.H.: Mediabench: A tool for evaluating and synthesizing multimedia and communications systems. In: Micro 30 (1997)Google Scholar
  18. 18.
    Standard Performance Evaluation Corporation: SPEC CPU2000 benchmarks, http://www.specbench.org/cpu2000/
  19. 19.
    Wegman, M.N., Zadeck, F.K.: Constant propagation with conditional branches. ACM Trans. Program. Lang. Syst. 13(2), 181–210 (1991)CrossRefGoogle Scholar
  20. 20.
    Liao, S.W., Diwan, A., Bosch Jr., R.P., Ghuloum, A., Lam, M.S.: SUIF Explorer: An interactive and interprocedural parallelizer. In: Proceedings of the 7th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pp. 37–48 (1999)Google Scholar
  21. 21.
    Horwitz, S., Reps, T., Binkley, D.: Interprocedural slicing using dependence graphs. In: PLDI 1988: Proceedings of the ACM SIGPLAN 1988 conference on Programming Language design and Implementation, pp. 35–46. ACM, New York (1988)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Silvian Calman
    • 1
  • Jianwen Zhu
    • 1
  1. 1.Department of Electrical and Computer EngineeringUniversity of TorontoTorontoCanada

Personalised recommendations