Skip to content

Commit

Permalink
Backport bug fix to v1.1: don't Const-prop unitialized structs
Browse files Browse the repository at this point in the history
Fixes bug introduced in `v1.1.0` causing some LLVM optimizations to run
for hours.

Fixes JuliaLang#31418
  • Loading branch information
NHDaly committed Apr 12, 2019
1 parent 80516ca commit fa692c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ function abstract_eval(@nospecialize(e), vtypes::VarTable, sv::InferenceState)
isconst = false
end
end
if isconst
if isconst && fieldcount(t) == length(e.args) - 1
t = Const(ccall(:jl_new_structv, Any, (Any, Ptr{Cvoid}, UInt32), t, args, length(args)))
end
end
Expand Down

0 comments on commit fa692c1

Please sign in to comment.