Skip to content

Commit

Permalink
rm unnecessary widenconst_bestguess call (#38871)
Browse files Browse the repository at this point in the history
the equivalent widening logic is imposed within `typeinf_local`,
and so as far as I understand we don't this need `widenconst_bestguess`
in `typeinf_edge`
  • Loading branch information
aviatesk authored Dec 16, 2020
1 parent 1df2c11 commit 341d6c9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions base/compiler/typeinfer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -759,20 +759,15 @@ function typeinf_edge(interp::AbstractInterpreter, method::Method, @nospecialize
end
typeinf(interp, frame)
update_valid_age!(frame, caller)
return widenconst_bestguess(frame.bestguess), frame.inferred ? mi : nothing
return frame.bestguess, frame.inferred ? mi : nothing
elseif frame === true
# unresolvable cycle
return Any, nothing
end
# return the current knowledge about this cycle
frame = frame::InferenceState
update_valid_age!(frame, caller)
return widenconst_bestguess(frame.bestguess), nothing
end

function widenconst_bestguess(bestguess)
!isa(bestguess, Const) && !isa(bestguess, PartialStruct) && !isa(bestguess, Type) && return widenconst(bestguess)
return bestguess
return frame.bestguess, nothing
end

#### entry points for inferring a MethodInstance given a type signature ####
Expand Down

4 comments on commit 341d6c9

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily package evaluation, I will reply here when finished:

@nanosoldier runtests(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - successfully executed benchmarks. A full report can be found here. cc @christopher-dG

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your package evaluation job has completed - possible new issues were detected. A full report can be found here. cc @maleadt

Please sign in to comment.