This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Automatic Detection and Exploitation of Branch Constraints for Timing Analysis
August 2002 (vol. 28 no. 8)
pp. 763-781

Abstract—Predicting the worst-case execution time (WCET) and best-case execution time (BCET) of a real-time program is a challenging task. Though much progress has been made in obtaining tighter timing predictions by using techniques that model the architectural features of a machine, significant overestimations of WCET and underestimations of BCET can still occur. Even with perfect architectural modeling, dependencies on data values can constrain the outcome of conditional branches and the corresponding set of paths that can be taken in a program. While branch constraint information has been used in the past by some timing analyzers, it has typically been specified manually, which is both tedious and error prone. This paper describes efficient techniques for automatically detecting branch constraints by a compiler and automatically exploiting these constraints within a timing analyzer. The result is significantly tighter timing analysis predictions without requiring additional interaction with a user.

[1] Y.S. Li, S. Malik, and A. Wolfe, “Efficient Microarchitecture Modeling and Path Analysis for Real-Time Software,” Proc. 16th IEEE Real-Time Systems Symp., pp. 298-307, Dec. 1995.
[2] G. Ottosson and M. Sjödin, “Worst Case Execution Time Analysis for Modern Hardware Architectures,” ACM SIGPLAN Workshop Language, Compiler, and Tools for Real-Time Systems, pp. 47-55, June 1997.
[3] A. Ermedahl and J. Gustafsson, “Deriving Annotations for Tight Calculation of Execution Time,” Proc. European Conf. Parallel Processing, pp. 1298-1307, Aug. 1997.
[4] T. Lundqvist and P. Stenström, “Integrating Path and Timing Analysis Using Instruction-Level Simulation Techniques,” ACM SIGPLAN Workshop Languages, Compilers, and Tools for Embedded Systems, pp. 1-15, June 1998.
[5] C.A. Healy, M. Sjödin, V. Rustagi, and D.B. Whalley, “Bounding Loop Iterations for Timing Analysis,” Proc. IEEE Real-Time Technology and Applications Symp., pp. 12-21, June 1998.
[6] C.A. Healy, R. van Engelen, and D.B. Whalley, “A General Approach for Tight Timing Predictions of Non-Rectangular Loops,” WIP Proc. IEEE Real-Time Technology and Applications Symp., pp. 11-14, June 1999.
[7] F. Mueller and D.B. Whalley, “Avoiding Conditional Branches by Code Replication,” Proc. SIGPLAN '95 Conf. Programming Language Design and Implementation, pp. 56-66, June 1995.
[8] J. Patterson, “Accurate Static Branch Prediction by Value Range Propagation,” Proc. SIGPLAN '95 Conf. Programming Language Design and Implementation, pp. 67-78, June 1995.
[9] C.A. Healy, M. Sjödin, V. Rustagi, and D.B. Whalley, “Supporting Timing Analysis by Automatic Bounding of Loop Iterations,” Real-Time Systems, pp. 121-148, May 2000.
[10] A.V. Aho, R. Sethi, and J.D. Ullman, Compilers: Principles, Techniques, and Tools. Reading, Mass.: Addison-Wesley, 1986.
[11] C.A. Healy, D.B. Whalley, and M.G. Harmon, “Integrating the Timing Analysis of Pipelining and Instruction Caching,” Proc. 16th IEEE Real-Time Systems Symp., pp. 288-297, Dec. 1995.
[12] Y. Hur, Y.H. Bae, S.S. Lim, S.K. Kim, B.D. Rhee, S.L. Min, C.Y. Park, H. Shin, and C.S. Kim, “Worst Case Timing Analysis of RISC Processors: R3000/R3010 Case Study,” Proc. 16th IEEE Real-Time Systems Symp., pp. 308-321, Dec. 1995.
[13] L. Ko, N. Al-Yaqoubi, C. Healy, E. Ratliff, R. Arnold, D. Whalley, and M. Harmon, “Timing Constraint Specification and Analysis,” Software Practice and Experience, pp. 77-98, Jan. 1999.
[14] M.E. Benitez and J.W. Davidson, “A Portable Global Obtimizer and Linker,” Proc. SIGPLAN '88 Symp. Programming Language Design and Implementation, pp. 329-338, June 1988.
[15] F. Mueller, “Static Cache Simulation and Its Applications,” PhD dissertation, Florida State Univ., Tallahassee, Fla., Aug. 1994.
[16] R. Arnold, F. Mueller, D. Whalley, and M. Harmon, “Bounding Worst-Case Instruction Cache Performance,” Proc. 15th IEEE Real-Time Systems Symp., pp. 172-181, Dec. 1994.
[17] C. Healy, R. Arnold, F. Mueller, D. Whalley, and M. Harmon, “Bounding Pipeline and Instruction Cache Performance,” IEEE Trans. Computers, vol. 48, no. 1, pp. 53-70, Jan. 1999.
[18] L. Ko, C. Healy, E. Ratliff, R. Arnold, D. Whalley, and M. Harmon, “Supporting the Specification and Analysis of Timing Constraints,” Proc. IEEE Real-Time Technology and Applications Symp., pp. 170-178, June 1996.
[19] N.M. Al-Yaqoubi, “Reducing Timing Analysis Complexity by Partioning Control Flow,” masters project, Florida State Univ., Tallahassee, Fla., 1997.
[20] W.H. Press, S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery, Numerical Recipes in C: The Art of Scientific Computing. New York: Cambridge Univ. Press, 1988.
[21] W.H. Press, S.A. Teukolsky, W.T. Vetterling, and B.P. Flannery, Numerical Recipes in C: The Art of Scientific Computing, second ed. New York: Cambridge University Press, 1992.
[22] J.W. Davidson and D.B. Whalley, “A Design Environment for Addressing Architecture and Compiler Interactions,” Microprocessors and Microsystems vol. 15, no. 9, pp. 459-472, Nov. 1991.
[23] C.A. Healy, “Predicting Pipeline and Instruction Cache Performance,” masters thesis, Florida State Univ., Tallahassee, Fla., 1995.
[24] C.A. Healy and D.B. Whalley, “Tighter Timing Predictions by Automatic Detection and Exploitation of Value-Dependent Constraints,” Proc. IEEE Real-Time Technology and Applications Symp., pp. 79-88, June 1999.
[25] R. Bodik, R. Gupta, and M. Soffa, “Interprocedural Conditional Branch Elimination,” Proc. SIGPLAN '97 Conf. Programming Language Design and Implementation, pp. 146-158, June 1997.

Index Terms:
Real-time systems, worst-case execution time, best-case execution time, timing analysis, infeasible paths, branch constraints.
Citation:
Christopher A. Healy, David B. Whalley, "Automatic Detection and Exploitation of Branch Constraints for Timing Analysis," IEEE Transactions on Software Engineering, vol. 28, no. 8, pp. 763-781, Aug. 2002, doi:10.1109/TSE.2002.1027799
Usage of this product signifies your acceptance of the Terms of Use.