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

inference: fix some of the edges, being created from the wrong signature #49404

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

vtjnash
Copy link
Member

@vtjnash vtjnash commented Apr 18, 2023

Inference should have already made this edge from this item, so we do not want to add another wider edge. Even if this target object contains some invalid code later, inference already showed that does not affect our code-paths, so we don't need or want that wide edge.

On OmniPackage load, this seems to be slightly faster (21s -> 17s, roughly estimated), and should also decrease the number of unnecessary invalidations.

Inference should have already made this edge from this item, so we do
not want to add another wider edge. Even if this target object contains
some invalid code later, inference already showed that does not affect
our code-paths, so we don't need or want that wide edge.
vtjnash added a commit to vtjnash/Cthulhu.jl that referenced this pull request Apr 18, 2023
The code doesn't seem to care about `:compilesig`, and it not meaningful to inference either, as it turns out (JuliaLang/julia#49404)
base/compiler/ssair/inlining.jl Outdated Show resolved Hide resolved
base/compiler/ssair/inlining.jl Show resolved Hide resolved
base/compiler/ssair/inlining.jl Outdated Show resolved Hide resolved
base/compiler/ssair/inlining.jl Outdated Show resolved Hide resolved
Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Apr 20, 2023
aviatesk pushed a commit to JuliaDebug/Cthulhu.jl that referenced this pull request Apr 20, 2023
The code doesn't seem to care about `:compilesig`, and it not meaningful to inference either, as it turns out (JuliaLang/julia#49404)
@vtjnash vtjnash merged commit 499647e into master Apr 20, 2023
@vtjnash vtjnash deleted the jn/compilable-edges branch April 20, 2023 15:53
@oscardssmith oscardssmith added performance Must go faster compiler:inference Type inference and removed merge me PR is reviewed. Merge when all tests are passing labels Apr 20, 2023
aviatesk added a commit that referenced this pull request Apr 27, 2023
aviatesk added a commit that referenced this pull request Apr 27, 2023
vtjnash added a commit that referenced this pull request Aug 26, 2023
We need 2 edges: one for the lookup (which uses the call signature) and
one for the invoke (which uses the invoke signature). It is hard to make
a small example for this, but the test case demonstrated this issue,
particularly if inspected by `SnoopCompile.@snoopr`.

Additionally, we can do some easy optimizations on the invoke
invalidation, since in most cases we know from subtyping transativity
that it is only invalid if the method callee target is actually deleted,
and otherwise it cannot ever be partially replaced.

Fixes: #50091
Likely introduced by #49404, so marking for v1.10 backport only
KristofferC pushed a commit that referenced this pull request Sep 15, 2023
We need 2 edges: one for the lookup (which uses the call signature) and
one for the invoke (which uses the invoke signature). It is hard to make
a small example for this, but the test case demonstrated this issue,
particularly if inspected by `SnoopCompile.@snoopr`.

Additionally, we can do some easy optimizations on the invoke
invalidation, since in most cases we know from subtyping transativity
that it is only invalid if the method callee target is actually deleted,
and otherwise it cannot ever be partially replaced.

Fixes: #50091
Likely introduced by #49404, so marking for v1.10 backport only

(cherry picked from commit 6097140)
nalimilan pushed a commit that referenced this pull request Nov 5, 2023
We need 2 edges: one for the lookup (which uses the call signature) and
one for the invoke (which uses the invoke signature). It is hard to make
a small example for this, but the test case demonstrated this issue,
particularly if inspected by `SnoopCompile.@snoopr`.

Additionally, we can do some easy optimizations on the invoke
invalidation, since in most cases we know from subtyping transativity
that it is only invalid if the method callee target is actually deleted,
and otherwise it cannot ever be partially replaced.

Fixes: #50091
Likely introduced by #49404, so marking for v1.10 backport only

(cherry picked from commit 6097140)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:inference Type inference performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants