Skip to main content

Module stack_depth

Module stack_depth 

Source
Expand description

RQ-71-STACKDEPTH (#1341) types: the per-function stack profile and the settled per-export answer.

These live in synth-core for the same reason WcetIntermediate does — CompiledFunction carries one, and synth-core cannot depend on the backend. The ANALYSIS (which needs ArmInstruction and the tripwired may_move_sp enumeration) stays in synth_backend::stack_depth.

The composition rule is a MAX over the call tree, not a trip-weighted sum: a callee invoked 1000 times in a loop costs 1000x the cycles and ONCE the stack. See the backend module’s docs for why that distinction is what makes this a sibling of the WCET pass rather than a field on it.

Structs§

StackEntry
One export’s settled answer, flattened for the sidecar.
StackFrame
One function’s own stack behaviour, before composition.
StackReport
The synth-stack-v1 sidecar: one entry per compiled function, each either a bounded maximum native stack depth or a NAMED decline.

Enums§

StackDecline
Why no finite stack bound exists. Deliberately NOT WcetDecline: the two sets differ (see the module docs), and sharing the enum would silently tie a stack refusal to a cycle-counting one.
StackResult
The settled answer for one function.