ABSTRACT
Conventional dataflow analysis computes information about what facts may or will not hold during the execution of a program. Sometimes it is useful, for program optimization, to know how often or with what probability a fact holds true during program execution. In this paper, we provide a precise formulation of this problem for a large class of dataflow problems --- the class of finite bi-distributive subset problems. We show how it can be reduced to a generalization of the standard dataflow analysis problem, one that requires a sum-over-all-paths quantity instead of the usual meet-overall-paths quantity. We show that Kildall's result expressing the meet-over-all-paths value as a maximal-fixed-point carries over to the generalized setting. We then outline ways to adapt the standard dataflow analysis algorithms to solve this generalized problem, both in the intraprocedural and the interprocedural case.
- 1.EE. Allen and J. Cocke. A program data flow analysis procedure. Commun. of the ACM, 19(3):137-147, March 1976.]] Google ScholarDigital Library
- 2.D. F. Bacon, M. Wegman, and K. Zadeck. Rapid type analysis for C++. Technical Report RC number pending, IBM T.J. Watson Research Center, 1996.]]Google Scholar
- 3.T. Ball and J.R. Lares. Optimally profiling and tracing programs. In Conference Record of the Nineteenth ACM Symposium on Principles of Programming Languages, pages 59-70, 1992.]] Google ScholarDigital Library
- 4.Paul R. Carini, Michael Hind, and Harini Srinivasan. Flow-sensitive type analysis for C++. Technical Report RC 20267, iBM T.J. Watson Research Center, 1995.]]Google Scholar
- 5.T.H. Cormen, C.E. Leiserson, and R.L. Rivest. Introduction to Algorithms. MIT Press, Cambridge, MA, 1990.]] Google ScholarDigital Library
- 6.J. Dean, C. Chambers, and D. Grove. Selective specialization for object-oriented languages. In Proceedings of the ACM SIGPLAN '95 Conference on Programming Language Design and implementation, pages 93-102, 1995.]] Google ScholarDigital Library
- 7.M. Gondran and M. Minoux. Graphs and Algorithms. John Wiley and Sons, New York, 1984.]] Google ScholarDigital Library
- 8.J.B. Kam and j.D. Ullman. Global data flow analysis and iterative algorithms. J. ACM, 23:158-171, 1976.]] Google ScholarDigital Library
- 9.J.B. Kam and J.D. Ullman. Monotone data flow analysis frameworks. Acta lnformatica, 7:305-317, 1977.]]Google ScholarDigital Library
- 10.G. Kildall. A unified approach to global program optimization. In Conference Record of the First ACM Symposium on Principles of Programming Languages, pages 194-206, New York, NY, 1973. ACM.]] Google ScholarDigital Library
- 11.J. Knoop and B. Steffen. The interprocedural coincidence theorem. In U. Kastens and P. Pfahler, editors, Proceedings of the Fourth International Conference on Compiler Construction,Lecture Notes in Computer Science Vol. 641, pages 125-140. Springer Verlag, 1992.]] Google ScholarDigital Library
- 12.Hemant D. Pande and Barbara G. Ryder. Static type determination for C++. in Proceedings of the Sixth Usenix C+ + Technical Conference, pages 85-97, April 1994.]] Google ScholarDigital Library
- 13.Hemant D. Pande and Barbara G. Ryder. Static type determination and aliasing for C++. Technical Report LCSR-TR-250, Department of Computer Science, Rutgers University, July 1995.]]Google Scholar
- 14.J.R.C. Patterson. Accurate static branch prediction by value range propagation. In Proceedings of the ACM SIGPLAN '95 Conference on Programming Language Design and implementation, pages 67-78, 1995.]] Google ScholarDigital Library
- 15.T. Proebsting and C. Fischer. Probabilistic register allocation. In Proceedings of the ACM SIGPLAN '92 Conference on Programming Language Design and Implementation, pages 300-310, 1992.]] Google ScholarDigital Library
- 16.C.V. Ramamoorthy. Discrete markov analysis of computer programs. In Proceedings of the ACM 20th National Conference, pages 386-391, 1965.]] Google ScholarDigital Library
- 17.T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural datafiow analysis via graph teachability. In Conference Record of the Twenty-Second ACM Symposium on Principles of Programming Languages, pages 49-61, 1995.]] Google ScholarDigital Library
- 18.B. Ryder and M. Paull. Elimination algorithms for data flow analysis. ACM Computing Surveys, 18(3), September 1986.]] Google ScholarDigital Library
- 19.M. Sagiv, T. Reps, and S. Horwitz. Precise interprocedural dataftow analysis with applications to constant propagation. To appear in Theoretical Computer Science. (Also Technical Report CS-TR-95-1284, Computer Sciences Department, University of Wisconsin- Madison, 1995).]]Google Scholar
- 20.M. Sagiv, T. Reps, and S. Horwitz. Precise interprocedural datafiow analysis with applications to constant propagation, in Proceedings of FASE '95: Colloquium on Formal Approaches in Software Engineering, pages 651-665, 1995.]] Google ScholarDigital Library
- 21.M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis, in S.S. Muchnick and N.D. Jones, editors, Program Flow Analysis : Theory and Applications, pages 189-233. Prentice-Hall, Englewood Cliffs, NJ, 1981.]]Google Scholar
- 22.R.E. Tarjan. Fast algorithms for solving path problems. J. ACM, 28:594-614, 1981.]] Google ScholarDigital Library
- 23.T.A. Wagner, V. Maverick, S.L. Graham, and M.A. Harrison. Accurate static estimators for program optimization, in Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation, pages 85-96, 1994.]] Google ScholarDigital Library
- 24.Y. Wu and J.R. Larus. Static branch frequency and program profile analysis. In Proceedings of the 27th International Symposium on Microarchitecture, pages 1-1 l, 1994.]] Google ScholarDigital Library
Index Terms
- Data flow frequency analysis
Recommendations
Data flow frequency analysis
Conventional dataflow analysis computes information about what facts may or will not hold during the execution of a program. Sometimes it is useful, for program optimization, to know how often or with what probability a fact holds true during program ...
Data-flow analysis of program fragments
Traditional interprocedural data-flow analysis is performed on whole programs; however, such whole-program analysis is not feasible for large or incomplete programs. We propose fragment data-flow analysis as an alternative approach which computes data-...
Comments