Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler: remove viral #force(_no)_inline #4570

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

laytan
Copy link
Collaborator

@laytan laytan commented Dec 9, 2024

If a procedure was marked #force_no_inline, any procedure calls within it would also implicitly be. This is not expected for multiple reasons:

  1. #force(_no)_inline on a call expr works differently than on a procedure literal.
  2. Adding the attribute on it and every called proc blows up the amount of work for the inliner pass and may increase the time it takes.
  3. Putting #force_no_inline on a procedure to keep executable size down (like we do for some map procedures), benchmark it, or find it in asm/ir has the added effect of slowing those procedures down significantly and not representing truth.

If a procedure was marked `#force_no_inline`, any procedure calls within
it would also implicitly be. This is not expected for multiple reasons:

1. `#force(_no)_inline` on a call expr works differently than on a procedure literal.
2. Adding the attribute on it and every called proc blows up the amount
   of work for the inliner pass and may increase the time it takes.
3. Putting `#force_no_inline` on a procedure to keep executable size
   down (like we do for some map procedures), benchmark it, or find it in
   asm/ir has the added effect of slowing those procedures down significantly
   and not representing truth.
@gingerBill gingerBill merged commit 954adef into odin-lang:master Dec 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants