2009 · 17 citations · 24 references
ComputingComputer ScienceEmbedded SystemsLow-power DesignProgramming LanguagesMemory ManagementMicrocontroller ProgrammingSystem CallsEliminationProgramming Model DesignRuntime System ArchitectureScopeScope MappingStack ManagementStack Usage
Most programming languages support a call stack in the programming model and also in the runtime system.We show that for applications targeting low-power embedded microcontrollers (MCUs), RAM usage can be significantly decreased by partially or completely eliminating the runtime callstack. We present flattening, a transformation that absorbs a function into its caller, replacing function invocations and returns with jumps. Unlike inlining, flattening does not duplicate the bodies of functions that have multiple callsites. Applied aggressively, flattening results in stack elimination. Flattening is most useful in conjunction with a lifting transformation that moves global variables into a local scope.
24
David Gay, Philip Levis, Robert von Behren et al. · ACM SIGPLAN Notices · 2014 · 1.7K citations
Martı́n Abadi, Mihai Budiu, Úlfar Erlingsson et al. · 2005 · 1K citations
David Gay, Philip Levis, Robert von Behren et al. · 2003 · 860 citations
Cache-conscious structure definition
Trishul Chilimbi, Bob Davidson, James R. Larus · 1999 · 236 citations · Full text