-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Refactor Inlining. NFC. #31306
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
Refactor Inlining. NFC. #31306
Conversation
895daef
to
849a371
Compare
Note: better viewed with ignore whitespace turned on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just glanced though it so far, but seems to be generally reasonable
base/compiler/ssair/inlining.jl
Outdated
f = isdefined(ft, :instance) ? ft.instance : nothing | ||
return svec(f, ft, atypes, argexprs, invoke_data) | ||
f = singleton_type(ft) | ||
return svec(Signature(f, ft, atypes), invoke_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can just return a tuple now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure
if late_inline_special_case!(ir, sig, idx, stmt) || is_return_type(sig.f) | ||
return nothing | ||
end | ||
return (sig, invoke_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps should be an svec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same signature as the other one above. I'll just leave it as a tuple.
I'm working on some problems that require some slightly different characteristics than our default inliner. While working on that, I got frustrated by some of the accumulated cruft and structuring of the inliner, so I decided to spend some time to clean it. This doesn't change any behavior, but moves some of the code around, drops now-unused arguments and properties and introduces a `Signature` struct to encapsulate the (f, ft, atypes, atype) tuple we passed around everywhere.
849a371
to
cfb4dfc
Compare
I'm working on some problems that require some slightly different
characteristics than our default inliner. While working on that,
I got frustrated by some of the accumulated cruft and structuring
of the inliner, so I decided to spend some time to clean it. This
doesn't change any behavior, but moves some of the code around,
drops now-unused arguments and properties and introduces a
Signature
struct to encapsulate the (f, ft, atypes, atype) tuple we passed around
everywhere.