Skip to content

Commit 1e4ee4e

Browse files
jgarzikclaude
andcommitted
cc: overhaul inliner heuristics with GCC/LLVM-style growth model
Replace flat MAX_CALLER_GROWTH with proportional growth limits (GCC-style), hard caller size cap, and recursive-caller stack estimate (LLVM-style). Fix Bug AL: symaddr-on-Arg during inlining produced pointer-to-pointer for MEMORY-class struct params; convert to copy instead. Update caller_size after each inline for accurate mid-iteration decisions. Remove bugs.md (info in git history/memory). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent aecc388 commit 1e4ee4e

File tree

6 files changed

+179
-145
lines changed

6 files changed

+179
-145
lines changed

bugs.md

Lines changed: 0 additions & 104 deletions
This file was deleted.

cc/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ Key source files:
3434
| `parse/parser.rs` | Recursive descent parser producing AST |
3535
| `parse/ast.rs` | AST node definitions |
3636
| `types.rs` | C type system |
37+
| `strings.rs` | String interning (StringId), pre-interns keywords at startup |
38+
| `kw.rs` | Pre-interned keyword constants and tag-based classification |
3739
| `symbol.rs` | Symbol table with scope management |
3840
| `ir/linearize.rs` | AST → IR conversion, SSA construction |
3941
| `ir/mod.rs` | Intermediate representation definitions |

cc/arch/aarch64/regalloc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,8 @@ impl RegAlloc {
10191019

10201020
// Stack slot reuse uses block-level interference checks
10211021
// (live_in/live_out from dataflow fixpoint) which are correct
1022-
// for all CFG shapes. Addr-taken syms need stable addresses.
1022+
// for all CFG shapes. Addr-taken syms need stable addresses
1023+
// because symaddr-derived pointers may escape to callees.
10231024
let reusable = !self.addr_taken_syms.contains(&interval.pseudo);
10241025

10251026
self.alloc_stack_slot(&interval, aligned_size, alignment, reusable);

cc/arch/x86_64/regalloc.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,8 @@ impl RegAlloc {
10521052

10531053
// Stack slot reuse uses block-level interference checks
10541054
// (live_in/live_out from dataflow fixpoint) which are correct
1055-
// for all CFG shapes. Addr-taken syms need stable addresses.
1055+
// for all CFG shapes. Addr-taken syms need stable addresses
1056+
// because symaddr-derived pointers may escape to callees.
10561057
let reusable = !self.addr_taken_syms.contains(&interval.pseudo);
10571058

10581059
self.alloc_stack_slot(&interval, aligned_size, alignment, reusable);

0 commit comments

Comments
 (0)