Files
hakorune/src/mir/optimizer_passes/reorder.rs
Selfhosting Dev 2720884a20 bridge/json_v0: split expr lowering; add Ternary/Peek lowering + AST; selfhost Peek JSON emit; add selfhost Peek smoke; warning cleanup in lowering/optimizer/verification
- Split expr lowering into ; route calls from stmt lowering
- Implement ternary/peek lowering (MIR13 PHI-off=Copy, PHI-on=Phi)
- Extend JSON v0 AST (ExprV0::{Ternary,Peek}, PeekArmV0)
- Selfhost parser_box: emit Peek JSON; add Stage-2 'Peek basic' smoke
- Reduce warnings: remove unused imports/vars in several modules
- current_task: update plan for legacy VM/Interpreter offboarding
2025-09-17 11:45:57 +09:00

23 lines
732 B
Rust

use crate::mir::optimizer::MirOptimizer;
use crate::mir::optimizer_stats::OptimizationStats;
use crate::mir::MirModule;
/// Reorder pure instructions for better locality (scaffolding)
pub fn reorder_pure_instructions(
opt: &mut MirOptimizer,
module: &mut MirModule,
) -> OptimizationStats {
let stats = OptimizationStats::new();
for (func_name, _function) in &mut module.functions {
if opt.debug_enabled() {
println!(
" 🔀 Pure instruction reordering in function: {}",
func_name
);
}
// Placeholder: keep behavior identical (no reordering yet)
// When implemented, set stats.reorderings += N per function.
}
stats
}