Understand and categorize dynamically dead instructions for contemporary architectures
Marianne J. Jantz, Prasad A. Kulkarni · 2012
Instructions executed by the processor are dynamically dead if the values they produce are not used by the program. Researchers have discovered that a surprisingly large fraction of executed instructions are dynamically dead. Dynamically dead instructions (DDI) can potentially slow-down program execution and waste power. Unfortunately, although the issue of DDI is well-known, there has not been any comprehensive study to understand and explain the occurrence of DDI, evaluate its performance impact, and resolve the problem for contemporary architectures. The goals of our research are to measure the ratio of DDI and systematically characterize them for existing state-of-the-art compilers and popular architectures, and then develop compiler and/or architectural techniques to avoid their execution at runtime. In this paper, we describe our GCC-based framework to instrument binary programs to generate control-flow and data-flow (registers and memory) traces at runtime. We present the distribution and percentage of DDI in our benchmark programs. We find that for the x86 platform, our embedded systems benchmarks compiled with GCC generally contain significantly fewer DDI than those observed in earlier research for other architectures. We also describe the outcome of our manual study to analyze and categorize the instances of dead instructions in our programs into seven distinct categories. We briefly describe our plan to develop compiler and architecture based techniques to eliminate each category of DDI in future programs. We believe that a close synergy between static code generation and program execution techniques may be the most effective strategy to eliminate DDI.