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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Optimizing Stack Cache Usage Through Local Variable Promotion

Emad Jacob Maroun, Daniel Seifert, Johannes Gernedl
Distributed and Parallel Computing Systems
article

Optimizing Stack Cache Usage Through Local Variable Promotion

Emad Jacob Maroun, Daniel Seifert, Johannes Gernedl
article en

Abstract

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%.

TU Wien (AT), Technical University of Denmark (DK)
Openalex Percentile: Top 69%
Distributed and Parallel Computing Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.