Loading…
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
Friday, March 18 • 15:50 - 16:30
Building a binary optimizer with LLVM

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

Large-scale applications in data centers are built with the highest level of compiler optimizations and typically use a carefully tuned set of compiler options as every single percent of performance could result in vast savings of power and CPU time. However, code and code-layout optimizations don't stop at compiler level, as further improvements are possible at link-time and beyond that.

At Facebook we use a linker script for an optimal placement of functions in HHVM binary to eliminate instruction-cache misses. Recently, we've developed a binary optimization technology that allows us to further cut instruction cache misses and branch mis-predictions resulting in even greater performance wins.

In this talk we would like to share technical details of how we've used LLVM's MC infrastructure and ORC layered approach to code generation to build in a short time a system that is being deployed to one of the world's biggest data centers. The static binary optimization technology we've developed, uses profile data generated in multi-threaded production environment, and is applicable to any binary compiled from well-formed C/C++ and even assembly. At the moment we use it on a 140MB of X86 binary code compiled from C/C++. The input binary has to be un-stripped and does not have any special requirements for compiler or compiler options. In our current implementation we were able to improve I-cache misses by 7% on top of a linker script for HHVM binary. Branch mis-predictions were improved by 5%.


Speakers

Friday March 18, 2016 15:50 - 16:30
Tarragona+Girona

Attendees (17)