Skip to content

Commit

Permalink
improve error message when calling argextype on invalid ir (#49923)
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed May 23, 2023
1 parent 22551a2 commit 1143b8f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/compiler/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ function argextype(
elseif x.head === :copyast
return argextype(x.args[1], src, sptypes, slottypes)
end
@assert false "argextype only works on argument-position values"
Core.println("argextype called on Expr with head ", x.head,
" which is not valid for IR in argument-position.")
@assert false
elseif isa(x, SlotNumber)
return slottypes[x.id]
elseif isa(x, TypedSlot)
Expand Down

2 comments on commit 1143b8f

@aviatesk
Copy link
Member

Choose a reason for hiding this comment

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

@nanosoldier runbenchmarks("inference", vs="@22551a2fba93c6289be1764d7bd640739a7dd582")

@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 - possible performance regressions were detected. A full report can be found here.

Please sign in to comment.