[NewOptimizer] Port #26826 to new optimizer#26981
Conversation
base/compiler/ssair/inlining2.jl
Outdated
| for tuparg in ir[def].args[2:end] | ||
| push!(new_atypes, exprtype(tuparg, ir, ir.mod)) | ||
| end | ||
| elseif (isa(def, Argument) && def === stmt.args[end] && !isempty(sv.result_vargs)) |
There was a problem hiding this comment.
@Keno I don't think we need a new field in IRCode for this, since !isempty(sv.result_vargs)) will only be true if it's a varargs method AND it has cached varargs type info (IIUC).
There was a problem hiding this comment.
Oh, I forgot to check def.n. Let me do that...
base/compiler/ssair/inlining2.jl
Outdated
| end | ||
|
|
||
| # Handle vararg functions | ||
| prevararg_rewritten_atypes = atypes |
There was a problem hiding this comment.
If this is what's used for the cache, is the below atypes actually used anywhere?
There was a problem hiding this comment.
Oh neat, you're right - the modified atypes was used elsewhere in the old inlining code, but not here. I guess I can just remove that code then.
Ah, good point. |
Keno
left a comment
There was a problem hiding this comment.
LGTM if tests pass with this and the new optimizer enabled.
| end | ||
|
|
||
| # Handle vararg functions | ||
| isva = na > 0 && method.isva |
Keno
left a comment
There was a problem hiding this comment.
A bunch of thing seems to go of the rails when I run the tests with this PR.
Just started a local build + tests with the new optimizer enabled, anything I should watch out for? Do all tests on master pass with the new optimizer enabled (besides the ones from #26826, which should require this port)? |
|
Yes, tests pass on master. |
|
Okay, I ran tests locally, and it seems there's only one thing that's failing: This is the broken sparse arrays broadcast test that #26826 allowed us to mark as unbroken. I guess it's still broken with the new optimizer. We could investigate why, and in the meantime just mark it |
|
Is that with this PR merged? That's what I saw before I merged this PR. |
|
That's from running I could run it on the merge commit as well, did that change things (i.e. have changes to master since 429a885 broken other tests w.r.t. the new optimizer when combined with this PR)? A summary for anybody following along (cc @vchuravy, since you asked about the relevant test in #26989): #26826 added some compiler tests that should've failed under the new optimizer before this PR, and this PR allows those tests to pass w/ the new optimizer enabled. Furthermore, #26826 fixed the aforementioned |
|
Seems like I may have had other thing locally mess up my test results. Merging. |
No description provided.