ABSTRACT
In the domain of the worst-case execution time (WCET) analysis, loops are an inherent source of unpredictability and loss of precision since the determination of tight and safe information on the number of loop iterations is a difficult task. In particular, data-dependent loops whose iteration counts depend on function parameters can not be precisely handled by a timing analysis. Procedure Cloning can be exploited to make these loops explicit within the source code allowing a highly precise WCET analysis.
In this paper we extend the standard Procedure Cloning optimization by WCET-aware concepts with the objective to improve the tightness of the WCET estimation. Our novel approach is driven by WCET information which successively eliminates code structures leading to overestimated timing results, thus making the code more suitable for the analysis. In addition, the code size increase during the optimization is monitored and large increases are avoided.
The effectiveness of our optimization is shown by tests on real-world benchmarks. After performing our optimization, the estimated WCET is reduced by up to 64.2% while the employed code transformations yield an additional code size increase of 22.6% on average. In contrast, the average-case performance being the original objective of Procedure Cloning showed a slight decrease.
- AbsInt Angewandte Informatik GmbH. CRL Version 2. http://www.absint.com/artist2/doc/crl2, 2007.Google Scholar
- AbsInt Angewandte Informatik GmbH. Worst-Case Execution Time Analyzer aiT for TriCore. 2007.Google Scholar
- D. F. Bacon, S. L. Graham, and O. J. Sharp. Compiler transformations for high-performance computing. ACM Comput. Surv., 26(4):345--420, 1994. Google ScholarDigital Library
- K. D. Cooper, M. W. Hall, and K. Kennedy. A Methodology for Procedure Cloning. Computer Languages, 19(2):105--117, 1993.Google ScholarDigital Library
- H. Falk, P. Lokuciejewski, and H. Theiling. Design of a WCET-Aware C Compiler. In 4th IEEE Workshop on Embedded Systems for Real-Time Multimedia, October 2006. Google ScholarDigital Library
- H. Falk and P. Marwedel. Control Flow driven Splitting of Loop Nests at the Source Code Level. In DATE '03: Proceedings of the conference on Design, Automation and Test in Europe, page 10410, Munich, 2003. Google ScholarDigital Library
- H. Falk and M. Schwarzer. Loop Nest Splitting for WCET-Optimization and Predictability Improvement. In 4th IEEE Workshop on Embedded Systems for Real-Time Multimedia, October 2006. Google ScholarDigital Library
- J. Gustafsson, A. Ermedahl, C. Sandberg, and B. Lisper. Automatic derivation of loop bounds and infeasible paths for wcet analysis using abstract execution. In RTSS '06: Proceedings of the 27th IEEE International Real-Time Systems Symposium, pages 57--66, Washington, DC, USA, 2006. Google ScholarDigital Library
- M. Guthaus, J. Ringenberg, D. Ernst, T. Austin, T. Mudge, and T. Brown. Mibench: A free, commercially representative embedded benchmark suite. In WWC '01: Proceedings of the Workload Characterization, 2001. WWC-4. 2001 IEEE International Workshop on, pages 3--14, Washington, DC, USA, 2001. Google ScholarDigital Library
- Informatik Centrum Dortmund. ICD-C Compiler framework. http://www.icd.de/es/icd-c, 2007.Google Scholar
- ICD Low Level Intermediate Representation backend infrastructure (LLIR) -- Developer Manual. Informatik Centrum Dortmund, 2007.Google Scholar
- S. Lee, J. Lee, C. Y. Park, and S. L. Min. A Flexible Tradeoff between Code Size and WCET using a Dual Instruction Set Processor. In SCOPES '04: Proceedings of the 8th International Workshop on Software and Compilers for Embedded Systems, pages 244--258, Amsterdam, 2004.Google ScholarCross Ref
- P. Lokuciejewski. A WCET-Aware Compiler. Design, Concepts and Realization. Vdm Verlag Dr. Müller, 2007. Google ScholarDigital Library
- P. Lokuciejewski, H. Falk, M. Schwarzer, P. Marwedel, and H. Theiling. Influence of procedure cloning on wcet prediction. In CODES+ISSS '07: Proceedings of the 5th IEEE/ACM international conference on Hardware/software codesign and system synthesis, pages 137--142, New York, NY, USA, 2007. Google ScholarDigital Library
- G. Memik, W. H. Mangione-Smith, and W. Hu. Netbench: a benchmarking suite for network processors. In ICCAD '01: Proceedings of the 2001 IEEE/ACM international conference on Computer-aided design, pages 39--42, Piscataway, NJ, USA, 2001. Google ScholarDigital Library
- S. S. Muchnick. Advanced Compiler Design and Implementation. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 1997. Google ScholarDigital Library
- A. D. Samples and P. N. Hilfinger. Code reorganization for instruction caches. Technical Report UCB/CSD-88-447, EECS Department, University of California, Berkeley, Oct 1988. Google ScholarDigital Library
- D. Schulte. Modeling and transformation of flow facts within a wcet optimizing compiler (in german). Master's thesis, Technical University of Dortmund, Dortmund, Germany, May 2007.Google Scholar
- S. Thesing. Safe and Precise WCET Determinations by Abstract Interpretation of Pipeline Models. PhD thesis, Saarland University, 2004.Google Scholar
- H. Tomiyama and H. Yasuura. Code placement techniques for cache miss rate reduction. ACM Trans. Des. Autom. Electron. Syst., 2(4):410--429, 1997. Google ScholarDigital Library
- W. Zhao, P. Kulkarni, D. Whalley, et al. Tuning the WCET of Embedded Applications. In RTAS '04: Proceedings of the 10th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'04), page 472, Washington, DC, USA, 2004. Google ScholarDigital Library
- W. Zhao, D. Whalley, C. Healy, et al. Improving WCET by Applying a WC Code-Positioning Optimization. ACM Transactions on Architecture and Code Optimization, 2(4):335--365, Dec 2005. Google ScholarDigital Library
Index Terms
- WCET-driven, code-size critical procedure cloning
Recommendations
Influence of procedure cloning on WCET prediction
CODES+ISSS '07: Proceedings of the 5th IEEE/ACM international conference on Hardware/software codesign and system synthesisFor the worst-case execution time (WCET) analysis, especially loops are an inherent source of unpredictability and loss of precision. This is caused by the difficulty to obtain safe and tight information on the number of iterations executed by a loop in ...
Timing optimization via nest-loop pipelining considering code size
Embedded systems have strict timing and code size requirements. Software pipelining is one of the most important optimization techniques to improve the execution time of loops by increasing the parallelism among successive loop iterations. However, ...
WCET squeezing: on-demand feasibility refinement for proven precise WCET-bounds
RTNS '13: Proceedings of the 21st International conference on Real-Time Networks and SystemsThe Worst-Case Execution Time (WCET) computed by a WCET analyzer is usually not tight, leaving a gap between the actual and the computed WCET of a program. In this article we present a novel on-demand WCET feasibility refinement technique, called WCET ...
Comments