Symbolic Range Analysis of Pointers

Abstract

International audienceAlias analysis is one of the most fundamental techniques thatcompilers use to optimize languages with pointers.However, in spite of all the attention that this topic has received, the currentstate-of-the-art approaches inside compilers still face challenges regardingprecision and speed.In particular, pointer arithmetic, a key feature in C and C++, is yet to behandled satisfactorily.This paper presents a new alias analysis algorithm to solve this problem.The key insight of our approach is to combine alias analysis with symbolicrange analysis.This combination lets us disambiguate fields within arrays and structs,effectively achieving more precision than traditional algorithms.To validate our technique, we have implemented it on top of the LLVM compiler.Tests on a vast suite of benchmarks show that we can disambiguate severalkinds of C idioms that current state-of-the-art analyses cannot deal with.In particular, we can disambiguate 1.35x more queries than the alias analysiscurrently available in LLVM.Furthermore, our analysis is very fast: we can go over one million assemblyinstructions in 10 seconds

    Similar works