Code Versioning as an Evolution of Constant Propagation Optimization
https://doi.org/10.15514/ISPRAS-2026-38(1)-5
Abstract
This paper examines the principles and structure of the Constant Propagation optimization, which plays a significant role in many modern optimizing compilers. The technique of code versioning has been studied, and an algorithm has been proposed to improve Constant Propagation. The algorithm was implemented in the GCC compiler. The results, confirming the importance and relevance of this work, were obtained through performance measurements of computationally heavy applications from the CPUBench benchmark suite.
About the Authors
Ivan Aleksandrovich ZININRussian Federation
MIPT student. Research interests: compiler technologies, optimizations, heterogeneous computing systems.
Viacheslav Viktorovich CHERNONOG
Russian Federation
Cand. Sci. (Tech.), Assistant at the Department of Advanced Computing Technologies at MIPT. Research interests: compiler technologies, optimizing compilers, performance analysis of high-load systems.
References
1. GCC official website. Available at: https://gcc.gnu.org/, accessed 01.11.2025.
2. Wegman, Mark N., Zadeck F. K. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems (TOPLAS), 1991, vol. 13, no. 2, pp. 181-210.
3. Callahan D., Cooper K. D., Kennedy K., Torczon L. Interprocedural constant propagation. ACM SIGPLAN Notices, 1986, vol. 21, no. 7, pp. 152-161.
4. Harrison W. H. Compiler analysis of the value ranges for variables. IEEE Transactions on software engineering, 1977, no. 3, pp. 243-250.
5. Huang J. C., Leng T. Generalized loop-unrolling: a method for program speedup. Proceedings 1999 IEEE Symposium on Application-Specific Systems and Software Engineering and Technology. ASSET'99 (Cat. No. PR00122), IEEE, 1999, pp. 244-248.
6. Liang X., Humos A. A., Pei T. Vectorization and parallelization of loops in C/C++ code, Proceedings of the International Conference on Frontiers in Education: Computer Science and Computer Engineering (FECS). The Steering Committee of The World Congress in Computer Science, Computer, 2017,
7. pp. 203-206.
8. Glek T., Hubicka J. Optimizing real world applications with GCC link time optimization. arXiv preprint. Available at: https://arxiv.org/abs/1010.2196, 2010, accessed 03.02.2026.
9. Khedker U. GCC Translation Sequence and Gimple IR. GCC Resource Center, Department of Computer Science and Engineering. Indian Institute of Technology, Bombay, 2010.
10. Исходный код в openEuler/gcc. Available at: https://gitee.com/openeuler/gcc/pulls/256/commits, accessed 03.02.2026.
11. Cytron R., Ferrante J., Rosen B. K. et al. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems (TOPLAS), 1991, vol. 13, no. 4, pp. 451-490.
12. Lu H., Ren X., Zhong W. et al. CPUBench: An open general computing CPU performance benchmark tool. Microelectronics & Computer, 2023, vol. 40, no. 5, pp. 75-83.
Review
For citations:
ZININ I.A., CHERNONOG V.V. Code Versioning as an Evolution of Constant Propagation Optimization. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2026;38(1):61-70. (In Russ.) https://doi.org/10.15514/ISPRAS-2026-38(1)-5






