Memory Analyzer Concurrency Investigation — ALTO Compiler
The ALTO compiler's memory analyzer (memory_analyzer/) models execution as a single sequential timeline — it traverses TIR top-to-bottom, generating a flat OrderedEventSet of ENTER/EXIT events. This was correct for single-core, single-unit execution, but the new multicore + unit-sync infrastructure introduces two levels of concurrency that the analyzer cannot represent. The result: incorrect memory usage numbers, misleading visualization, and suboptimal decisions in downstream passes.
This document characterizes the problems, analyzes root causes and downstream impact, and explores the design space for solutions. Detailed solution design is deferred to a follow-up document.