From 28261b6b1b55184ce7084eb14cdcb42edc7f8480 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 16 Mar 2026 18:15:37 +0100 Subject: regalloc: improve spilling and cleanup Instead of spilling current interval when running out of registers, spill the longest-lived active interval with a lower spill cost than current. Spill costs are estimated based on multiplicative loop depth. Also cleanup regalloc.c somewhat. Update todo.txt too. --- todo.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'todo.txt') diff --git a/todo.txt b/todo.txt index 48deffe..d0618a7 100644 --- a/todo.txt +++ b/todo.txt @@ -4,10 +4,10 @@ - DWARF debug information - implement GNU extensions: __attribute__, __builtin_*, ... - compiler optimizations: - - dead store/load optimization, - - inlining - - loop inversion + - dead store/load optimization, forwarding + - all kinds of loop optimizations + - switch statements (bsearch, maybe jumptables?) - instruction scheduling - - better regalloc spilling heuristics + - use of memory operands in arith instrs in x86 -- testing on real world codebases +- more testing on real world codebases -- cgit v1.2.3