To optimize code effectively, compilers must deal with memory dependencies. However, the state-of-the-art heuristics available in the literature to track memory dependencies are inherently imprecise and computationally expensive. Consequently, the most advanced code transformations that compilers have today are ineffective when applied on real-world programs. The goal of this paper is to solve this conundrum through dynamic disambiguation of pointers. We provide different ways to determine at runtime when two memory locations can overlap. We then produce two versions of a code region: one that is aliasing-free - hence, easy to optimize - and another that is not. Our checks let us safely branch to the optimizable region. We have applied these ideas on Polly-LLVM, a loop optimizer built on top of the LLVM compilation infrastructure. Our experiments indicate that our method is precise, effective and useful: we can disambiguate every pair of pointer in the loop intensive Polybench benchmark suite. The result of this precision is code quality: the binaries we generate are 10% faster than those that Polly-LLVM produces without our optimization, at the -O3 optimization level of LLVM.
%0 Conference Paper
%1 Alves:2015:RPD
%A Alves, Péricles
%A Gruber, Fabian
%A Doerfert, Johannes
%A Lamprineas, Alexandros
%A Grosser, Tobias
%A Rastello, Fabrice
%A Pereira, Fernando Magno Quint\ ao
%B Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
%D 2015
%I ACM
%K CC++ Compiler LLVM Optimization
%P 589--606
%R 10.1145/2814270.2814285
%T Runtime Pointer Disambiguation
%X To optimize code effectively, compilers must deal with memory dependencies. However, the state-of-the-art heuristics available in the literature to track memory dependencies are inherently imprecise and computationally expensive. Consequently, the most advanced code transformations that compilers have today are ineffective when applied on real-world programs. The goal of this paper is to solve this conundrum through dynamic disambiguation of pointers. We provide different ways to determine at runtime when two memory locations can overlap. We then produce two versions of a code region: one that is aliasing-free - hence, easy to optimize - and another that is not. Our checks let us safely branch to the optimizable region. We have applied these ideas on Polly-LLVM, a loop optimizer built on top of the LLVM compilation infrastructure. Our experiments indicate that our method is precise, effective and useful: we can disambiguate every pair of pointer in the loop intensive Polybench benchmark suite. The result of this precision is code quality: the binaries we generate are 10% faster than those that Polly-LLVM produces without our optimization, at the -O3 optimization level of LLVM.
%@ 978-1-4503-3689-5
@inproceedings{Alves:2015:RPD,
abstract = {To optimize code effectively, compilers must deal with memory dependencies. However, the state-of-the-art heuristics available in the literature to track memory dependencies are inherently imprecise and computationally expensive. Consequently, the most advanced code transformations that compilers have today are ineffective when applied on real-world programs. The goal of this paper is to solve this conundrum through dynamic disambiguation of pointers. We provide different ways to determine at runtime when two memory locations can overlap. We then produce two versions of a code region: one that is aliasing-free - hence, easy to optimize - and another that is not. Our checks let us safely branch to the optimizable region. We have applied these ideas on Polly-LLVM, a loop optimizer built on top of the LLVM compilation infrastructure. Our experiments indicate that our method is precise, effective and useful: we can disambiguate every pair of pointer in the loop intensive Polybench benchmark suite. The result of this precision is code quality: the binaries we generate are 10% faster than those that Polly-LLVM produces without our optimization, at the -O3 optimization level of LLVM.},
acmid = {2814285},
added-at = {2015-11-13T16:51:13.000+0100},
author = {Alves, P{\'e}ricles and Gruber, Fabian and Doerfert, Johannes and Lamprineas, Alexandros and Grosser, Tobias and Rastello, Fabrice and Pereira, Fernando Magno Quint\ {a}o},
biburl = {https://www.bibsonomy.org/bibtex/2dce31ea5e2b32b33bc00d9563048e63e/gron},
booktitle = {Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications},
description = {Runtime pointer disambiguation},
doi = {10.1145/2814270.2814285},
interhash = {00ddf985265173647d7e3c3d198401a7},
intrahash = {dce31ea5e2b32b33bc00d9563048e63e},
isbn = {978-1-4503-3689-5},
keywords = {CC++ Compiler LLVM Optimization},
location = {Pittsburgh, PA, USA},
numpages = {18},
pages = {589--606},
publisher = {ACM},
series = {OOPSLA 2015},
timestamp = {2015-11-13T16:51:13.000+0100},
title = {{Runtime Pointer Disambiguation}},
year = 2015
}