Impl/topic10 - #63
Impl/topic10#63FeelTheBeats wants to merge 6 commits into
Conversation
🤖 AI Code Review
📁
|
…kkeeping - skip PARTIAL_EPILOGUE with r>1 when the body contains forward/self references (true loop-carried values); the single renamed remainder copy would read stale values on the second iteration (review F1) - count each skip reason once per loop object per run, so rescans after an applied loop no longer inflate stats (review F4) - mark the generated remainder loop with attrs[unrolled] so repeated run() calls stay idempotent (review F5) - snapshot/restore instruction operands as well, so a mid-rewrite failure rolls back completely (review F6)
…compile Unrolling raises live-value counts and triggers the pre-existing greedy allocator defect (spill without reload), silently miscompiling programs that the default pipeline compiled correctly (review F2). Keep the pass available but disabled by default: - CompilerConfig.loop_unroll defaults to False - add --loop-unroll as the explicit opt-in; --no-loop-unroll still wins when given last
- true carried values (dest == operand): FULL, PARTIAL_EXACT and r=1 epilogue simulations through the emulator - r>=2 epilogue carried/forward-reference shapes must stay untouched and report skipped[carried_value] - default flags keep unrolling off and compile a 3-instruction/N=12 loop correctly; --loop-unroll opts in and reduces dynamic instructions - byte-level golden comparison for 013/014/019 with --no-loop-unroll and with default flags - 36 unroll tests total (was 23); docs updated for the opt-in default, carried_value guard, idempotent remainder loop and full rollback
No description provided.