Skip to content

Commit

Permalink
Backport bug fix to v1.1: don't Const-prop unitialized structs (#31699)
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 #31418
  • Loading branch information
Nathan Daly authored and KristofferC committed Apr 15, 2019
1 parent 349e59e commit f04b2db
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 f04b2db

Please sign in to comment.