Support stack allocations as memory-placement candidates

Develop support for treating stack allocations as candidate variables whose placement between volatile memory and non-volatile memory can be selected by Bao's mixed-integer linear programming formulation.

Background

Bao partitions program variables into candidates whose allocation site can be selected by the solver and fixed variables that always reside in volatile memory. In the prototype, stack allocations are excluded from the candidate set because redirecting their accesses to non-volatile memory requires additional implementation support. Extending candidate-based memory allocation to stack objects is therefore left unresolved.

References

Stack allocations do not have static addresses, so redirecting their accesses to an NVM location requires additional work; we leave supporting them as candidates to future work.

— Bao: Automatic Region Placement and Memory Allocation for Intermittent Computing  (2610.02624 - Kang et al., 2 Oct 2026) in Section 3, subsection “Problem Setup”