Improving WCET by applying a WC code-positioning optimization
Open Access
- 1 December 2005
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Architecture and Code Optimization
- Vol. 2 (4) , 335-365
- https://doi.org/10.1145/1113841.1113842
Abstract
Applications in embedded systems often need to meet specified timing constraints. It is advantageous to not only calculate the worst-case execution time (WCET) of an application, but to also perform transformation, which reduce the WCET, since an application with a lower WCET will be less likely to violate its timing constraints. Some processors incur a pipeline delay whenever an instruction transfers control to a target that is not the next sequential instruction. Code-positioning optimizations attempt to reduce these delays by positioning the basic blocks to minimize the number of unconditional jumps and taken conditional branches that occur. Traditional code-positioning algorithms use profile data to find the frequently executed edges between basic blocks, then minimize the transfers of control along these edges to reduce the average case execution time (ACET). This paper introduces a WCET code-positioning optimization, driven by the worst-case (WC) path information from a timing analyzer, to reduce the WCET instead of ACET. This WCET optimization changes the layout of the code in memory to reduce the branch penalties along the WC paths. Unlike the frequency of edges in traditional profile-driven code positioning, the WC path may change after code-positioning decisions are made. Thus, WCET code positioning is inherently more challenging than ACET code positioning. The experimental results show that this optimization typically finds the optimal layout of the basic blocks with the minimal WCET. The results show over a 7% reduction in WCET is achieved after code positioning is performed.Keywords
This publication has 9 references indexed in Scilit:
- Modeling complex flows for worst-case execution time analysisPublished by Institute of Electrical and Electronics Engineers (IEEE) ,2002
- Automatic detection and exploitation of branch constraints for timing analysisIEEE Transactions on Software Engineering, 2002
- Timing Analysis for Instruction CachesReal-Time Systems, 2000
- Supporting Timing Analysis by Automatic Bounding of Loop IterationsReal-Time Systems, 2000
- Timing Analysis for Data and Wrap-Around Fill CachesReal-Time Systems, 1999
- Bounding pipeline and instruction cache performanceIEEE Transactions on Computers, 1999
- DSP processors hit the mainstreamComputer, 1998
- A retargetable technique for predicting execution time of code segmentsReal-Time Systems, 1994
- Reasoning about time in higher-level language softwareIEEE Transactions on Software Engineering, 1989