ABSTRACT
We implement strength reduction and loop-invariant code motion by specializing instrumented interpreters; we define a novel program transformation that uses bisimulation to identify and remove code duplication in residual programs; and we discover that some simple classical optimizations, notably constant-propagation, seemingly do not lend themselves to implementation by specialization of instrumented interpreters.
- N. Benton. Simple relational correctness proofs for static analyses and program transformations. In Proceedings of the 31st ACM Symposium On Principles of Programming Languages (POPL04), 2004. Google ScholarDigital Library
- R. M. Burstall and J. Darlington. A transformation system for developing recursive programs. Journal of the ACM, 24(1):44--67, 1977. Google ScholarDigital Library
- P. J. Downey, R. Sethi, and R. E. Tarjan. Variations on the common subexpression problem. Journal of the ACM, 27(4):758--771, 1980. Google ScholarDigital Library
- R. Glück and J. Jørgensen. Generating optimizing specializers. In IEEE International Conference On Computer Languages, pages 183--194. IEEE Computer Society Press, 1994.Google ScholarCross Ref
- R. Glück and J. Jørgensen. Generating transformers for deforestation and supercompilation. In B. Le Charlier, editor, Static Analysis, volume 864 of Lecture Notes in Computer Science, pages 432--448. Springer-Verlag, 1994.Google Scholar
- C. K. Gomard and N. D. Jones. Compiler generation by partial evaluation: a case study. Structured Programming, 12:123--144, 1991.Google Scholar
- N. D. Jones. Transformation by interpreter specialisation. Science of Computer Programming, pages 1--40, 2004. accepted for publication. Google ScholarDigital Library
- N. D. Jones, C. K. Gomard, and P. Sestoft. Partial Evaluation and Automatic Program Generation. Prentice Hall International, 1993. Google ScholarDigital Library
- D. Lacey, N. D. Jones, E. Van Wyk, and C. C. Frederiksen. Proving correctness of compiler optimizations by temporal logic. In Proceedings of the 29Th Annual ACM Symposium On Principles of Programming Languages (POPL02), pages 283--294. ACM Press, 2002. Google ScholarDigital Library
- S. Lerner, T. Millstein, and C. Chambers. Automatically proving the correctness of compiler optimizations. In ACM SIGPLAN Conference On Programming Language Design and Implementation (PLDI 2003), pages 220--231. ACM Press, 2003. Google ScholarDigital Library
- R. Milner. A Calculus of Communicating Systems, volume~92 of Lecture Notes in Computer Science. Springer Verlag, 1980. Google ScholarDigital Library
- S. S. Muchnick. Advanced Compiler Design & Implementation. Morgan Kaufmann Publishers, 1997. Google ScholarDigital Library
- R. Paige and R. E. Tarjan. Three partition refinement algorithms. SIAM Journal On Computing, 16(6):973--989, Dec. 1987. Google ScholarDigital Library
- M. Sperber and P. Thiemann. Realistic compilation by partial evaluation. In ACM SIGPLAN '96 Conference On Programming Language Design and Implementation, Philadelphia, Pennsylvania, May 1996 (SIGPLAN Notices, Vol. 31, No. 5), pages 206--214. New York: ACM, 1996. Google ScholarDigital Library
- S. Thibault, C. Consel, J. L. Lawall, R. Marlet, and G. Muller. Static and dynamic program compilation by interpreter specialization. Higher-Order and Symbolic Computation, 13(3):161--178, 2000. Google ScholarDigital Library
Index Terms
- Imperative program optimization by partial evaluation
Recommendations
Dominance-based duplication simulation (DBDS): code duplication to enable compiler optimizations
CGO 2018: Proceedings of the 2018 International Symposium on Code Generation and OptimizationCompilers perform a variety of advanced optimizations to improve the quality of the generated machine code. However, optimizations that depend on the data flow of a program are often limited by control-flow merges. Code duplication can solve this ...
Imperative-program transformation by instrumented-interpreter specialization
We describe how to implement strength reduction, loop-invariant code motion and loop quasi-invariant code motion by specializing instrumented interpreters. To curb code duplication intrinsic to such specialization, we introduce a new program ...
CP-Miner: Finding Copy-Paste and Related Bugs in Large-Scale Software Code
Recent studies have shown that large software suites contain significant amounts of replicated code. It is assumed that some of this replication is due to copy-and-paste activity and that a significant proportion of bugs in operating systems are due to ...
Comments