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

distinguish "inlineable" from "declared as inline" #48250

Merged
merged 1 commit into from
Jan 13, 2023
Merged

Conversation

aviatesk
Copy link
Member

This commit addresses the current asymmetry in handling @inline/@noinline declarations by storing the information in src::CodeInfo. src now has the inlining field that indicates the inlining declaration as follows:

  • src.inlining == 0: no declaration
  • src.inlining == 1: declared as @inline
  • src.inlining == 2: declared as @noinline

This change is a preparation for an upcoming refactor that will allow for judging inlineability at callsites of is_inlineable, while leaving the inline_cost function to simply compute the inlining cost without judging inlineability.

Replaces #41922.

@nanosoldier runbenchmarks("inference", vs=":master")

@aviatesk aviatesk requested a review from vtjnash January 12, 2023 12:57
@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk
Copy link
Member Author

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

This commit addresses the current asymmetry in handling
`@inline/@noinline` declarations by storing the information in
`src::CodeInfo`. `src` now has the `inlining` field that indicates
the inlining declaration as follows:

- `src.inlining == 0`: no declaration
- `src.inlining == 1`: declared as `@inline`
- `src.inlining == 2`: declared as `@noinline`

This change is a preparation for an upcoming refactor that will allow
for judging inlineability at callsites of `is_inlineable`, while leaving
the `inline_cost` function to simply compute the inlining cost without
judging inlineability.
@aviatesk
Copy link
Member Author

@nanosoldier runbenchmarks("inference", vs=":master")

@nanosoldier
Copy link
Collaborator

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here.

@aviatesk aviatesk merged commit 206fd5a into master Jan 13, 2023
@aviatesk aviatesk deleted the avi/inline-decl branch January 13, 2023 03:58
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