Skip to content

Commit

Permalink
Fixed incorrect removal of incompletely inlined functions
Browse files Browse the repository at this point in the history
  • Loading branch information
totalspectrum committed Jan 22, 2024
1 parent 5f2b1a4 commit 5cdd425
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Version 6.9.0
- Added new optimization to merge duplicate functions (only at -O2, and so far only works for small functions)
- Fixed some nucode compilation problems with the C test suite
- Fixed failure to allocate memory for local variables in some cases
- Fixed incorrect removal of some functions that were not completely inlined

Version 6.8.1
- Fixed using new keywords like `bytes` in parameters with default values
Expand Down
2 changes: 2 additions & 0 deletions Test/Expect/stest184.pasm
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ __system___gc_docollect_ptr
res 1
__system___gc_docollect_startheap
res 1
__system___gc_markcog_ptr
res 1
__system___gc_tryalloc__cse__0002
res 1
__system___gc_tryalloc_availsize
Expand Down
3 changes: 3 additions & 0 deletions backends/asm/optimize_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -5537,6 +5537,9 @@ ExpandInlines(IRList *irl)
change = 1;
} else {
non_inline_calls++;
if (f && FuncData(f)->actual_callsites == 0) {
FuncData(f)->actual_callsites = 1;
}
}
}
ir = ir_next;
Expand Down

0 comments on commit 5cdd425

Please sign in to comment.