Supporting Timing Analysis by Automatic Bounding of LoopIterations

  • Authors:
  • Christopher Healy;Mikael Sjödin;Viresh Rustagi;David Whalley;Robert Van Engelen

  • Affiliations:
  • Computer Science Department, Florida State University, FL, USA;Department of Computer Systems, Uppsala University, Sweden;Silicon Spice, Mountain View, CA, USA;Silicon Spice, Mountain View, CA, USA;Computer Science Department, Florida State University, FL, USA

  • Venue:
  • Real-Time Systems - Special issue on worst-case execution-time analysis
  • Year:
  • 2000

Quantified Score

Hi-index 0.02

Visualization

Abstract

Static timing analyzers, which are usedto analyze real-time systems, need to know the minimum and maximumnumber of iterations associated with each loop in a real-timeprogram so accurate timing predictions can be obtained. Thispaper describes three complementary methods to support timinganalysis by bounding the number of loop iterations. First, analgorithm is presented that determines the minimum and maximumnumber of iterations of loops with multiple exits. Even whenthe number of iterations cannot be exactly determined, it isdesirable to know the lower and upper iteration bounds. Second,when the number of iterations is dependent on unknown valuesof variables, the user is asked to provide bounds for these variables.These bounds are used to determine the minimum and maximum numberof iterations. Specifying the values of variables is less errorprone than specifying the number of loop iterations directly.Finally, a method is given to tightly predict the execution timeof inner loops whose number of iterations is dependent on countervariables of outer level loops. This is accomplished by formulatingthe total number of iterations of a loop in terms of summationsand solving the resulting equation. These three methods havebeen successfully integrated in an existing timing analyzer thatpredicts the performance for optimized code on a machine thatexploits caching and pipelining. The result is tighter timinganalysis predictions and less work for the user.