Interprocedural induction variable analysis based on interprocedural SSA form IR

Silvian Calman, Jianwen Zhu · 2010

The induction variable analysis is a fundamental component of loop optimizations in compilers. Algorithms in literature and implementations in free-source compilers such as GCC and LLVM rely on SSA form IR. However, only the uses of scalar stack variables whose address is not taken are replaced with a single definition in the SSA form IR. In this paper, we describe how Interprocedural SSA (ISSA) form IR can be leveraged to extend the induction variable analysis interprocedurally to: globals, singleton heap variables, record elements, and files. We implemented our induction variable analysis and compared it against the LLVM infrastructure for a set of MediaBench and SPEC2K benchmarks. We observed an average increase of 8.1% and 58.4% in the number of polynomial and monotonic induction variables, respectively. Furthermore, due to ISSA form IR and our induction variable analysis we computed 1.02 times more constant tripcounts and 2.06 times more loop invariant tripcounts.

Read the paper · More papers on PaperTik