Improving data-flow analysis with path profiles

Data-flow analysis computes its solutions over the paths in a control-flow graph. These paths---whether feasible or infeasible, heavily or rarely executed---contribute equally to a solution. However, programs execute only a small fraction of their potential paths and, moreover, programs' execution time and cost is concentrated in a far smaller subset of hot paths.This paper describes a new approach to analyzing and optimizing programs, which improves the precision of data flow analysis along hot paths. Our technique identifies and duplicates hot paths, creating a hot path graph in which these paths are isolated. After flow analysis, the graph is reduced to eliminate unnecessary duplicates of unprofitable paths. In experiments on SPEC95 benchmarks, path qualification identified 2--112 times more non-local constants (weighted dynamically) than the Wegman-Zadek conditional constant algorithm, which translated into 1--7% more dynamic instructions with constant results.

[1]  Rajiv Gupta,et al.  Complete removal of redundant expressions , 1998, PLDI 1998.

[2]  Barry K. Rosen,et al.  Qualified Data Flow Problems , 1981, IEEE Trans. Software Eng..

[3]  Joseph A. Fisher,et al.  Trace Scheduling: A Technique for Global Microcode Compaction , 1981, IEEE Transactions on Computers.

[4]  G. Ramalingam Data flow frequency analysis , 1996, PLDI '96.

[5]  Allen Goldberg,et al.  Applications of feasible path analysis to program testing , 1994, ISSTA '94.

[6]  Rastislav Bodík,et al.  Path-sensitive value-flow analysis , 1998, POPL '98.

[7]  Steven W. K. Tjiang,et al.  An overview of the suif compiler system , 1990 .

[8]  Alfred V. Aho,et al.  Algorithms for Finding Patterns in Strings , 1991, Handbook of Theoretical Computer Science, Volume A: Algorithms and Complexity.

[9]  James R. Larus,et al.  Exploiting hardware performance counters with flow and context sensitive profiling , 1997, PLDI '97.

[10]  Barry K. Rosen,et al.  Qualified Data Flow Problems , 1980, IEEE Transactions on Software Engineering.

[11]  Rajiv Gupta,et al.  Interprocedural conditional branch elimination , 1997, PLDI '97.

[12]  James R. Larus,et al.  Efficient path profiling , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[13]  David B. Whalley,et al.  Avoiding conditional branches by code replication , 1995, PLDI '95.

[14]  J. Larus Whole program paths , 1999, PLDI '99.

[15]  Mary Lou Soffa,et al.  Complete Removal of Redundant Computations , 1998, ACM-SIGPLAN Symposium on Programming Language Design and Implementation.

[16]  Mark N. Wegman,et al.  Constant propagation with conditional branches , 1985, POPL.

[17]  Rajiv Gupta,et al.  Refining data flow information using infeasible paths , 1997, ESEC '97/FSE-5.