BDBComp
Parceria:
SBC
The Design and Implementation of a Non-Iterative Range Analysis Algorithm on a Production Compiler

Douglas do Couto TeixeiraFernando Magno Quintão Pereira

This paper presents the first implementation of a non-iterative range analysis algorithm in a production compiler. Discrete range analyses try to discover the intervals of values that may be bound to the integer variables during program execution. This information enables compiler optimizations such as dead code elimination and the detection of bugs such as buffer overflow vulnerabilities. So far, non-iterative range analysis algorithms have been constrained to theoretical works - actual implementations never reaching the boundaries of industrial strength compilers. In this paper we fix this omission by implementing in the LLVM compiler the constraint system that Su and Wagner designed in 2005. In the effort to implement this method in an actual compiler we had to modify Su's algorithm in many ways. In particular, we use Gawlitza's algorithm to handle program loops, and Bodik's Extended Static Single Assignment form to add flow sensitiveness to our analysis. We have tested this analysis with a compiler optimization that converts 32-bit variables to either 8-bit or 16-bit variables whenever possible. Our implementation of range analysis has been able to process over 4 million assembly instructions in 223 seconds, yielding results on par with previous works. For instance, we have reduced by 39.4% on average the bit size of the integer variables in the bitwise benchmark suite.

http://www.lbd.dcc.ufmg.br/colecoes/sblp/2011/0010.pdf

Caso o link acima esteja inválido, faça uma busca pelo texto completo na Web: Buscar na Web

Biblioteca Digital Brasileira de Computação - Contato: bdbcomp@lbd.dcc.ufmg.br
     Mantida por:
LBD