Skip to Main content Skip to Navigation

Runtime Optimization of Binary Through Vectorization Transformations

Nabil Hallou 1
1 PACAP - Pushing Architecture and Compilation for Application Performance
Inria Rennes – Bretagne Atlantique , IRISA-D3 - ARCHITECTURE
Abstract : In many cases, applications are not optimized for the hardware on which they run. This is due to backward compatibility of ISA that guarantees the functionality but not the best exploitation of the hardware. Many reasons contribute to this unsatisfying situation such as legacy code, commercial code distributed in binary form, or deployment on compute farms. Our work focuses on maximizing the CPU efficiency for the SIMD extensions. The first contribution is a lightweight binary translation mechanism that does not include a vectorizer, but instead leverages what a static vectorizer previously did. We show that many loops compiled for x86 SSE can be dynamically converted to the more recent and more powerful AVX; as well as, how correctness is maintained with regards to challenges such as data dependencies and reductions. We obtain speedups in line with those of a native compiler targeting AVX. The second contribution is a runtime auto-vectorization of scalar loops. For this purpose, we use open source frameworks that we have tuned and integrated to (1) dynamically lift the x86 binary into the Intermediate Representation form of the LLVM compiler, (2) abstract hot loops in the polyhedral model, (3) use the power of this mathematical framework to vectorize them, and (4) finally compile them back into executable form using the LLVM Just-In-Time compiler. In most cases, the obtained speedups are close to the number of elements that can be simultaneously processed by the SIMD unit. The re-vectorizer and autovectorizer are implemented inside a dynamic optimization platform; it is completely transparent to the user, does not require any rewriting of the binaries, and operates during program execution.
Document type :
Complete list of metadatas

Cited literature [71 references]  Display  Hide  Download
Contributor : Erven Rohou <>
Submitted on : Saturday, December 23, 2017 - 5:51:43 PM
Last modification on : Thursday, January 7, 2021 - 4:34:31 PM


Files produced by the author(s)


  • HAL Id : tel-01672263, version 1


Nabil Hallou. Runtime Optimization of Binary Through Vectorization Transformations. Other [cs.OH]. Université de Rennes 1 [UR1], 2017. English. ⟨tel-01672263⟩



Record views


Files downloads