A Fast and Precise Static Loop Analysis Based on Abstract Interpretation, Program Slicing and Polytope Models
- 1 March 2009
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
- p. 136-146
- https://doi.org/10.1109/cgo.2009.17
Abstract
A static loop analysis is a program analysis computing loop iteration counts. This information is crucial for different fields of applications. In the domain of compilers, the knowledge about loop iterations can be exploited for aggressive loop optimizations like Loop Unrolling. A loop analyzer also provides static information about code execution frequencies which can assist feedback-directed optimizations. Another prominent application is the static worst-case execution time (WCET) analysis which relies on a safe approximation of loop iteration counts. In this paper, we propose a framework for a static loop analysis based on Abstract Interpretation, a theory of a sound approximation of program semantics. To accelerate the analysis, we preprocess the analyzed code using Program Slicing, a technique that removes statements irrelevant for the loop analysis. In addition, we introduce a novel polytope-based loop evaluation that further significantly reduces the analysis time. The efficiency of our loop analyzer is evaluated on a large number of benchmarks. Results show that 99% of the considered loops could be successfully analyzed in an acceptable amount of time. This study points out that our methodology is best suited for real-world problems.Keywords
This publication has 21 references indexed in Scilit:
- Design of a WCET-Aware C CompilerPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2006
- Faster WCET flow analysis by program slicingPublished by Association for Computing Machinery (ACM) ,2006
- The octagon abstract domainHigher-Order and Symbolic Computation, 2006
- Comparing the Galois connection and widening/narrowing approaches to abstract interpretationPublished by Springer Nature ,2005
- Precise interprocedural choppingPublished by Association for Computing Machinery (ACM) ,1995
- Incremental program testing using program dependence graphsPublished by Association for Computing Machinery (ACM) ,1993
- Static analysis of arithmetical congruencesInternational Journal of Computer Mathematics, 1989
- The program dependence graph and its use in optimizationACM Transactions on Programming Languages and Systems, 1987
- The program dependence graph in a software development environmentACM SIGSOFT Software Engineering Notes, 1984
- Automatic discovery of linear restraints among variables of a programPublished by Association for Computing Machinery (ACM) ,1978