Recompute energy costs after instrumentation

Develop a post-instrumentation recompilation and energy-estimation procedure that derives costs from the final assembly and re-solves Bao's mixed-integer linear program whenever instrumentation causes a region to exceed the energy budget.

Background

Bao estimates LLVM IR basic-block energy by mapping assembly instructions from a separate compilation back to IR blocks. Inserting region-boundary instrumentation can perturb backend code generation, potentially invalidating those estimates. The paper identifies recompiling the instrumented program, re-deriving final-assembly costs, and re-solving the optimization when necessary as an unresolved implementation direction.

References

This can be mitigated by recompiling and re-deriving costs from the final assembly after instrumentation, and re-solving MILP if any region exceeds the budget. We leave this to future work.

— Bao: Automatic Region Placement and Memory Allocation for Intermittent Computing  (2610.02624 - Kang et al., 2 Oct 2026) in Section 5.2, “IR-Level Energy Estimation”