Optimizing Stack Cache Usage Through Local Variable Promotion
Real-time systems require high confidence in execution times. Static analysis techniques provide this confidence by accounting for the specific execution platform and code being executed to provide an upper bound on the worst-case execution time. To make analysis easier and more accurate, it is imperative to design the platform to be predictable. One such design is the Patmos processor's split caches: The traditional data cache is split into a stack cache and a data cache. The stack cache stores data from the program stack. This data is highly predictable and easy to reason about for a static analyzer. The current implementation of the Patmos compiler does not use the stack cache optimally; caching only spilled registers as part of register allocation. This paper presents the local variable promotion optimization, which enables the Patmos compiler to store function-local variables on the stack cache. Our results show that this optimization is critical for any platform using a stack cache. While not all benchmark programs see a significant performance benefit, those that did saw increases mostly between 50% and 60%.
Authors
- Emad Jacob Maroun (ORCID: https://orcid.org/0000-0002-3675-3376)
- Daniel Seifert
- Johannes Gernedl
Institutions
- TU Wien (AT)
- Technical University of Denmark (DK)
Publication Details
- Published
- 2025-05-26
- DOI
- https://doi.org/10.1109/isorc65339.2025.00046
- Primary Topic
- Distributed and Parallel Computing Systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00