This event has ended. View the official site or create your own event → Check it out
This event has ended. Create your own
View analytic
Thursday, March 17 • 16:00 - 16:40
Improving LLVM Generated Code Size for X86 Processors

Sign up or log in to save this to your schedule and see who's attending!

Minimizing the size of compiler generated code often takes a back seat to other optimization objectives such as maximizing the runtime performance. For some applications, however, code size is of paramount importance, and this is an area where LLVM has lagged gcc when targeting x86 processors. Code size is of particular concern in the microcontroller segment where programs are often constrained by a relatively small and fixed amount of memory. In this presentation, we will detail the work we did to improve the generated code size for the SPEC CPU2000 C/C++ benchmarks by 10%, bringing clang/LLVM to within 2% of gcc. While the quoted numbers were measured targeting Intel® Quark™ microcontroller D2000, most of the individual improvements apply to all X86 targets. The code size improvement was achieved via new optimizations, tuning of existing optimizations, and fixing existing inefficiencies. We will describe our analysis methodology, explain the impact and LLVM compiler fix for each improvement opportunity, and describe some opportunities for future code size improvements with an eye toward pushing LLVM ahead of gcc on code size.

avatar for Zia Ansari

Zia Ansari

Principal Engineer, Intel
avatar for David Kreitzer

David Kreitzer

Principal Engineer, Intel
I have spent the majority of my adult life getting the Intel compiler to generate superb code for x86 processors. I developed many major pieces of functionality in the Intel compiler's back end including its register allocator. My current focus is to draw on that experience to help improve LLVM's generated code for x86.

Thursday March 17, 2016 16:00 - 16:40

Attendees (18)