RFC: Avoid over-pessimization in apply_type_tfunc#27150
Conversation
|
Hm, LibGit2/libgit2 segfaults on 32bit Circle and Travis and hangs on FreeBSD, so likely related. Presumable, I now produce a |
Works locally with a 32bit build. Any ideas? |
base/compiler/tfuncs.jl
Outdated
| else | ||
| if !isType(ai) | ||
| return Any | ||
| if !isa(ai, Type) || ai <: Type || Type <: ai |
There was a problem hiding this comment.
typeintersect(ai, Type) != Union{}
| if !isa(ai.val, Type) | ||
| return Union{} | ||
| end | ||
| else |
There was a problem hiding this comment.
Checking explicitly for if isa TypeVar might be necessary (And PartialTypeVar)
There was a problem hiding this comment.
You mean ai.val could be a TypeVar and we shouldn't return Union{} then?
There was a problem hiding this comment.
yes. or ai could be a PartialTypeVar
There was a problem hiding this comment.
ai being a PartialTypeVar should be handled below. Do you mean ai.val?
Though slightly different, LibGit2 failures recently popped up in #26997 as well. Best! |
2c5e9c1 to
a3f4331
Compare
base/compiler/tfuncs.jl
Outdated
| if isa(ai, Const) | ||
| if !isa(ai.val, Type) | ||
| if isa(ai.val, TypeVar) || isa(ai.val, PartialTypeVar) | ||
| return hasnonType = true |
There was a problem hiding this comment.
Bump. I'm still not sure you meant this. A Const PartialTypeVar looks a bit funny here to me.
There was a problem hiding this comment.
isa(ai.val, PartialTypeVar) can return Union{}. But ai itself can be a PartialTypeVar
There was a problem hiding this comment.
Alright, then I've apparently misinterpreted your earlier remark. The isa(ai, PartialTypeVar) case is already handled below (in the !isType(ai) and !isa(ai, Type) branch).
|
AV 32bit got far but timed out, 64bit failed for a reason I don't really understand. Why did FreeBSD not run? Anyway, the LibGit2/libgit2 segfaults did not happen again. |
50a3a3e to
e6ef253
Compare
|
Oh man, CI really doesn't like this one. AV timed out, an occasional libgit2 failure, and the rest or |
e6ef253 to
52b0368
Compare
|
Oh, rebasing this led to an all-green CI! As a consequence, I'm unsure whether I'll ever dare touching this again. So...good to go? |
|
I would give one of @JeffBezanson, @Keno or @vtjnash 24 hours to comment and then merge |
|
Ooo! Requesting a review from @nanosoldier, fancy. |
|
Fancy indeed. But apparently, doesn't trigger him, so @nanosoldier |
|
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
|
I'm inclined to declare regressions as well as improvements there noise and will merge soonish unless anyone objects. |
Ref. #25861 (comment).