-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
revisit #47137: avoid round-trip of locally-cached inferred source #51960
base: master
Are you sure you want to change the base?
Conversation
Your job failed. |
3b0918c
to
a79443e
Compare
@nanosoldier |
Your job failed. |
FWIW, you are running into an optimizer bug it seems
|
512deed
to
d54aea5
Compare
5f71c22
to
5152327
Compare
…sult (#51934) Currently the inlining algorithm is allowed to use inferred source of const-prop'ed call that is always locally available (since const-prop' result isn't cached globally). For non const-prop'ed and globally cached calls, however, it undergoes a more expensive process, making a round-trip through serialized inferred source. We can improve efficiency by bypassing the serialization round-trip for newly-inferred and globally-cached frames. As these frames are never cached locally, they can be viewed as volatile. This means we can use their source destructively while inline-expanding them. The benchmark results show that this optimization achieves 2-4% allocation reduction and about 5% speed up in the real-world-ish compilation targets (`allinference`). Note that it would be more efficient to propagate `IRCode` object directly and skip inflation from `CodeInfo` to `IRCode` as experimented in #47137, but currently the round-trip through `CodeInfo`-representation is necessary because it often leads to better CFG simplification while `cfg_simplify!` being expensive (xref: #51960).
a79443e
to
f1817e9
Compare
1b97766
to
5af6b22
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
5af6b22
to
ef9e687
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
a77dd0c
to
7050b4e
Compare
@nanosoldier |
Your job failed. |
7050b4e
to
178b9ab
Compare
178b9ab
to
a6f2b7f
Compare
@nanosoldier |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. |
Built on top of #51958, with the improved performance of
cfg_simplify!
, let's give another try on #47137. Tha aim is to retain locally cached inferred source asIRCode
, eliminating the need for the inlining algorithm to round-trip it throughCodeInfo
representation.@nanosoldier
runbenchmarks("inference", vs=":master")