@@ -389,7 +389,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
389
389
# face of rename_arguments! mutating in place - should figure out
390
390
# something better eventually.
391
391
inline_compact[idx′] = nothing
392
- stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, item . mi . sparam_vals, linetable_offset, boundscheck, inline_compact)
392
+ stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, linetable_offset, boundscheck, inline_compact)
393
393
if isa (stmt′, ReturnNode)
394
394
val = stmt′. val
395
395
return_value = SSAValue (idx′)
@@ -414,7 +414,7 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
414
414
inline_compact = IncrementalCompact (compact, spec. ir, compact. result_idx)
415
415
for ((_, idx′), stmt′) in inline_compact
416
416
inline_compact[idx′] = nothing
417
- stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, item . mi . sparam_vals, linetable_offset, boundscheck, inline_compact)
417
+ stmt′ = ssa_substitute! (idx′, stmt′, argexprs, sig, sparam_vals, linetable_offset, boundscheck, inline_compact)
418
418
if isa (stmt′, ReturnNode)
419
419
if isdefined (stmt′, :val )
420
420
val = stmt′. val
@@ -1590,15 +1590,15 @@ function late_inline_special_case!(
1590
1590
end
1591
1591
1592
1592
function ssa_substitute! (idx:: Int , @nospecialize (val), arg_replacements:: Vector{Any} ,
1593
- @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} , concrete_spvals :: SimpleVector ,
1593
+ @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} ,
1594
1594
linetable_offset:: Int32 , boundscheck:: Symbol , compact:: IncrementalCompact )
1595
1595
compact. result[idx][:flag ] &= ~ IR_FLAG_INBOUNDS
1596
1596
compact. result[idx][:line ] += linetable_offset
1597
- return ssa_substitute_op! (val, arg_replacements, spsig, spvals, concrete_spvals, boundscheck, compact, idx)
1597
+ return ssa_substitute_op! (val, arg_replacements, spsig, spvals, boundscheck, compact, idx)
1598
1598
end
1599
1599
1600
1600
function ssa_substitute_op! (@nospecialize (val), arg_replacements:: Vector{Any} ,
1601
- @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} , concrete_spvals :: SimpleVector ,
1601
+ @nospecialize (spsig), spvals:: Union{SimpleVector, SSAValue} ,
1602
1602
boundscheck:: Symbol , compact:: IncrementalCompact , idx:: Int )
1603
1603
if isa (val, Argument)
1604
1604
return arg_replacements[val. n]
@@ -1614,20 +1614,20 @@ function ssa_substitute_op!(@nospecialize(val), arg_replacements::Vector{Any},
1614
1614
effect_free (NewInstruction (Expr (:call , Core. _svec_ref, false , spvals, e. args[1 ]), Any)))
1615
1615
return ret
1616
1616
end
1617
- elseif head === :cfunction
1618
- @assert ! isa (spsig, UnionAll) || ! isempty (concrete_spvals )
1619
- e. args[3 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[3 ], spsig, concrete_spvals )
1617
+ elseif head === :cfunction && isa (spvals, SimpleVector)
1618
+ @assert ! isa (spsig, UnionAll) || ! isempty (spvals )
1619
+ e. args[3 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[3 ], spsig, spvals )
1620
1620
e. args[4 ] = svec (Any[
1621
- ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, concrete_spvals )
1621
+ ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, spvals )
1622
1622
for argt in e. args[4 ]:: SimpleVector ]. .. )
1623
- elseif head === :foreigncall
1624
- @assert ! isa (spsig, UnionAll) || ! isempty (concrete_spvals )
1623
+ elseif head === :foreigncall isa (spvals, SimpleVector)
1624
+ @assert ! isa (spsig, UnionAll) || ! isempty (spvals )
1625
1625
for i = 1 : length (e. args)
1626
1626
if i == 2
1627
- e. args[2 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[2 ], spsig, concrete_spvals )
1627
+ e. args[2 ] = ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), e. args[2 ], spsig, spvals )
1628
1628
elseif i == 3
1629
1629
e. args[3 ] = svec (Any[
1630
- ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, concrete_spvals )
1630
+ ccall (:jl_instantiate_type_in_env , Any, (Any, Any, Ptr{Any}), argt, spsig, spvals )
1631
1631
for argt in e. args[3 ]:: SimpleVector ]. .. )
1632
1632
end
1633
1633
end
@@ -1643,7 +1643,7 @@ function ssa_substitute_op!(@nospecialize(val), arg_replacements::Vector{Any},
1643
1643
end
1644
1644
urs = userefs (val)
1645
1645
for op in urs
1646
- op[] = ssa_substitute_op! (op[], arg_replacements, spsig, spvals, concrete_spvals, boundscheck, compact, idx)
1646
+ op[] = ssa_substitute_op! (op[], arg_replacements, spsig, spvals, boundscheck, compact, idx)
1647
1647
end
1648
1648
return urs[]
1649
1649
end
0 commit comments