The formidable increase in the number of smaller and smarter embedded devices has compelled programmers to develop more and more specialized application programs for these systems. These resource intensive programs that have to be executed on limited memory systems make a strong case for compiler optimizations that reduce the executable size of programs. Standard compilers (like LLVM) offer an out-of-the-box -Oz optimization option—just a series of compiler optimization passes—that is specifically targeted for the reduction of the generated executable size. In this paper, we aim to analyze the effects of optimizations of LLVM compiler on the reduction of executable size. Specifically, we take the size of the executable as a metric and attempt to divide the -Oz series into logical groups and study their individual effects; while also study the effect of their combinations. Our preliminary study over SPEC CPU 2017 benchmarks gives us an insight into the comparative effect of the groups of passes on the executable size. Our work has potential to enable the user to tailor a custom series of passes so as to obtain the desired executable size.
This is a preview of subscription content, log in to check access.
Buy single article
Instant access to the full article PDF.
Price includes VAT for USA
Subscribe to journal
Immediate online access to all issues from 2019. Subscription will auto renew annually.
This is the net price. Taxes to be calculated in checkout.
Lattner C, Adve V (2004) LLVM: a compilation framework for lifelong program analysis and transformation. In: Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization (CGO ’04). IEEE Computer Society, Washington, p 75
Dangeti TK, Bora U, Das S, Grosser T, Upadrasta R (2017) Improved loop distribution in LLVM using polyhedral dependences. In: The fourth workshop on the LLVM compiler infrastructure in HPC. https://llvm-hpc4-workshop.github.io/
Jain S, Kumar K, Purini S, Das D, Upadrasta R (2017) An LLVM based loop profiler. US LLVM Developers’ meeting. https://llvm.org/devmtg/2017-10/
Bora U, Grosser T, Upadrasta R (2016) PolyhedralInfo: polly as an analysis pass in LLVM. Google Summer of Code 2016 and Poster+Lightning Talk, US LLVM Developers’ meeting
Bhatu Pratik (2015) Compile-time optimizations in polly. Google Summer of Code. https://www.googlemelange.com/archive/gsoc/2015/orgs/llvm/projects/bhatuzdaname.html
This work has been partially supported by the Project under The Visvesvaraya Ph.D. Scheme of Ministry of Electronics & Information Technology, Government of India, being implemented by Digital India Corporation (formerly Media Lab Asia). The work was also enabled by travels funded by The LLVM Foundation. The fellowship has helped in publishing research contributions in [3,4,5,6].
Funding was provided by Department of Electronics and Information Technology, Ministry of Communications and Information Technology.
An earlier version of this work was peer reviewed and selected for presentation at EuroLLVM 2018.
About this article
Cite this article
Jain, S., Bora, U., Kumar, P. et al. An analysis of executable size reduction by LLVM passes. CSIT 7, 105–110 (2019). https://doi.org/10.1007/s40012-019-00248-5
- Compiler optimizations
- Code size optimizations