![]()
Certificate: View Certificate
Published Paper PDF: PDF
Govind Kumar
Independent Researcher
India
Abstract
This manuscript presents a comprehensive evaluation of compiler optimization techniques for C programs as known up to 2014. We compare common optimizations—constant folding, dead code elimination, loop unrolling, function inlining, and register allocation—in terms of execution time, code size, and compilation overhead. Through controlled experiments on benchmark suites (e.g., SPEC CINT2000), we collect statistical data to quantify performance gains. Our methodology includes instrumented builds with GCC and LLVM compilers, statistical analysis via ANOVA to assess significance, and qualitative assessment of code maintainability. Results indicate that loop unrolling and function inlining yield the highest performance improvements on compute-bound kernels, while register allocation offers balanced gains across diverse workloads. We identify research gaps in adaptive, profile-guided optimizations specific to embedded C applications. This study serves as a reference baseline for compiler researchers and practitioners focusing on C optimization as of 2014.
Keywords
Compiler optimization, C programming, loop unrolling, inlining, register allocation, dead code elimination.
References
Allen, F. E., & Cocke, J. (1970). A program data flow analysis procedure. Communications of the ACM, 19(3), 137–147.
Aho, A. V., Sethi, R., & Ullman, J. D. (1986). Compilers: Principles, Techniques, and Tools. Addison-Wesley.
Agakov, F., Bonilla, E., Cavazos, J., Fursin, G., O’Boyle, M. F., Thomson, J., & Trancoso, P. (2006). Using machine learning to focus iterative optimization. Proceedings of the International Symposium on Code Generation and Optimization, 295–305.
Calder, B., Krueger, J., Jones, M., Newell, D., Nankervis, M., & Zilles, C. (1997). Fast, effective code generation using multiple optimization versions. Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 158–167.
Cooper, K. D., & Torczon, L. (2004). Engineering a Compiler (2nd ed.). Morgan Kaufmann.
Knoop, J., Rüthing, C., & Steffen, B. (1992). Lazy code motion. Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, 224–234.
Muchnick, S. S. (1997). Advanced Compiler Design and Implementation. Morgan Kaufmann.
O’Boyle, M. F., Knijnenburg, P. M., & Allen, R. (2001). Profile‐guided automatic data layout for cache‐based architectures. Proceedings of the International Symposium on High-Performance Computer Architecture, 162–169.
Wilson, R., Lam, M. S., & Pfister, G. (1994). Modifying a compiler to support source-level debugging and profiling. Software—Practice and Experience, 24(7), 655–675.
Zhao, Q., & Abdelrahman, T. (2003). Compiler support for memory hierarchy customization. Proceedings of the International Conference on Supercomputing, 323–332.