A dynamic tool for finding redundant computations in native code

  • Authors:
  • Kyungwoo Lee;Zino Benaissa;Juan Rodriguez

  • Affiliations:
  • Software and Solutions Group, Intel Corporation;Software and Solutions Group, Intel Corporation;Software and Solutions Group, Intel Corporation

  • Venue:
  • WODA '08 Proceedings of the 2008 international workshop on dynamic analysis: held in conjunction with the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2008)
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Compilers perform optimizations to improve application runtime performance, but they often fail to generate optimal code due to complicated interactions between optimizations and unforeseen interactions of optimizations with the target architecture. Although there exist performance monitoring tools that can collect CPU performance information via hardware event counters, compiler developers or performance analysts need to comprehensively interpret the information to infer deficiencies in compiler optimizations. This paper presents a tool that can identify potentially redundant computations relevant to specific compiler optimizations. In particular, our current implementation can identify redundant computations that match three patterns occurring in compiler generated native code: 1. redundant sign/zero extension, 2. redundant constant-spill, and 3. missing copy/constant propagation. Our tool adapts the Pin dynamic instrumentation framework to analyze program execution contexts at runtime and identify the redundant computations described above. We use this tool to report both locations and execution frequencies of redundant computations within the SPEC®CPU2006 benchmarks generated by two GCC compiler versions targeting IA-32 and Intel® 64 architectures. By effectively removing instrumentation that has become unnecessary, our tools runs at 19x the average execution time of these benchmarks. From this study, we are able to address how redundant computations are affected by different architectural features such as a number of registers and memory address size, and different compiler versions.