Symbolic Debugging of Globally Optimized Code: Data Value Problems and Their Solutions

A. Adl-Tabatabai and T. Gross, "Symbolic Debugging of Globally Optimized Code: Data Value Problems and Their Solutions", Technical Report CMU-CS-94-105, School of Computer Science, Carnegie Mellon University, January, 1994.

Abstract

Symbolic debuggers are program development tools that allow a user to interact with an executing process at the source level. In response to a user query, the debugger must be able to retrieve and display the value of a source variable in a manner consistent with what the user expects with respect to the source statement where execution has halted. However, when a program has been compiled with optimizations, values of variables may either be inaccessible in the run-time state or inconsistent with what the user expects. Such problems that pertain to the retrieval of source values are called data value problems. In this paper we address the data value problems caused by global scalar optimizations. We describe in detail how global optimizations cause data value problems and the information a symbolic debugger can provide a user when data value problems occur. We provide a data flow algorithm that detects the impact of two global transformations: code hoisting and dead code elimination . These two transformations capture the effects of global optimizations that cause data value problems. Common optimizations such as dead store elimination, common subexpression elimination, loop invariant code motion, partial redundancy elimination, or non-speculative global instruction scheduling can be expressed in terms of these transformations.

Postscript

ali@cs.cmu.edu