diff --git a/base/compiler/abstractinterpretation.jl b/base/compiler/abstractinterpretation.jl index 9595a49fa518f..f3e55e0a9ec53 100644 --- a/base/compiler/abstractinterpretation.jl +++ b/base/compiler/abstractinterpretation.jl @@ -218,19 +218,11 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), if seen != napplicable # there may be unanalyzed effects within unseen dispatch candidate, # but we can still ignore nonoverlayed effect here since we already accounted for it -<<<<<<< HEAD all_effects = tristate_merge(all_effects, EFFECTS_UNKNOWN) elseif isa(matches, MethodMatches) ? (!matches.fullmatch || any_ambig(matches)) : (!all(matches.fullmatches) || any_ambig(matches)) # Account for the fact that we may encounter a MethodError with a non-covered or ambiguous signature. all_effects = Effects(all_effects; nothrow=ALWAYS_FALSE) -======= - all_effects = EFFECTS_UNKNOWN - elseif isa(matches, MethodMatches) ? (!matches.fullmatch || any_ambig(matches)) : - (!_all(b->b, matches.fullmatches) || any_ambig(matches)) - # Account for the fact that we may encounter a MethodError with a non-covered or ambiguous signature. - all_effects = Effects(all_effects, nothrow=TRISTATE_UNKNOWN) ->>>>>>> 983f70db2c (Handle foreigncall in irinterp, fix abstract_invoke inf loop) end rettype = from_interprocedural!(rettype, sv, arginfo, conditionals) @@ -252,11 +244,7 @@ function abstract_call_gf_by_type(interp::AbstractInterpreter, @nospecialize(f), delete!(sv.pclimitations, caller) end end -<<<<<<< HEAD return CallMeta(rettype, all_effects, info) -======= - return CallMeta(rettype, info, all_effects) ->>>>>>> 983f70db2c (Handle foreigncall in irinterp, fix abstract_invoke inf loop) end struct FailedMethodMatch @@ -836,11 +824,7 @@ function concrete_eval_call(interp::AbstractInterpreter, Core._call_in_world_total(world, f, args...) catch # The evaulation threw. By :consistent-cy, we're guaranteed this would have happened at runtime -<<<<<<< HEAD return ConstCallResults(Union{}, ConcreteResult(result.edge::MethodInstance, result.effects), result.effects) -======= - return ConstCallResults(Union{}, ConcreteResult(result.edge, result.edge_effects), result.edge_effects) ->>>>>>> 983f70db2c (Handle foreigncall in irinterp, fix abstract_invoke inf loop) end if is_inlineable_constant(value) || call_result_unused(sv) # If the constant is not inlineable, still do the const-prop, since the diff --git a/base/compiler/ssair/irinterp.jl b/base/compiler/ssair/irinterp.jl index 753f9b6335841..02ac609d4ac60 100644 --- a/base/compiler/ssair/irinterp.jl +++ b/base/compiler/ssair/irinterp.jl @@ -141,7 +141,7 @@ function reprocess_instruction!(interp::AbstractInterpreter, ir::IRCode, mi::Met mi_cache, sv::InferenceState, tpdum::TwoPhaseDefUseMap, idx::Int, bb::Union{Int, Nothing}, @nospecialize(inst), @nospecialize(typ), - phi_revisit, mi::MethodInstance) + phi_revisit) function update_phi!(from, to) if length(ir.cfg.blocks[to].preds) == 0 return @@ -315,13 +315,8 @@ function _ir_abstract_constant_propagation(interp::AbstractInterpreter, mi_cache any_refined = true delete!(ssa_refined, idx) end -<<<<<<< HEAD if any_refined && reprocess_instruction!(interp, ir, mi, mi_cache, frame, tpdum, idx, bb, inst, typ, ssa_refined) -======= - if any_refined && reprocess_instruction!(interp, ir, mi_cache, - frame, tpdum, idx, bb, inst, typ, ssa_refined, mi) ->>>>>>> 983f70db2c (Handle foreigncall in irinterp, fix abstract_invoke inf loop) push!(ssa_refined, idx) end if idx == lstmt && process_terminator!(ip, bb, idx) @@ -343,7 +338,6 @@ function _ir_abstract_constant_propagation(interp::AbstractInterpreter, mi_cache lstmt = last(stmts) for idx = stmts inst = ir.stmts[idx][:inst] - typ = ir.stmts[idx][:type] for ur in userefs(inst) val = ur[] if isa(val, Argument) @@ -367,7 +361,6 @@ function _ir_abstract_constant_propagation(interp::AbstractInterpreter, mi_cache lstmt = last(stmts) for idx = stmts inst = ir.stmts[idx][:inst] - typ = ir.stmts[idx][:type] for ur in userefs(inst) val = ur[] if isa(val, SSAValue) @@ -389,13 +382,8 @@ function _ir_abstract_constant_propagation(interp::AbstractInterpreter, mi_cache idx = popfirst!(stmt_ip) inst = ir.stmts[idx][:inst] typ = ir.stmts[idx][:type] -<<<<<<< HEAD if reprocess_instruction!(interp, ir, mi, mi_cache, frame, tpdum, idx, nothing, inst, typ, ssa_refined) -======= - if reprocess_instruction!(interp, ir, mi_cache, frame, - tpdum, idx, nothing, inst, typ, ssa_refined, mi) ->>>>>>> 983f70db2c (Handle foreigncall in irinterp, fix abstract_invoke inf loop) append!(stmt_ip, tpdum[idx]) end end @@ -409,7 +397,8 @@ function _ir_abstract_constant_propagation(interp::AbstractInterpreter, mi_cache continue end inst = ir.stmts[idx][:inst] - ultimate_rt = tmerge(ultimate_rt, argextype(inst.val, ir)) + rt = argextype(inst.val, ir) + ultimate_rt = tmerge(ultimate_rt, rt) end return ultimate_rt end @@ -423,6 +412,7 @@ function ir_abstract_constant_propagation(interp::AbstractInterpreter, mi_cache, Timings.exit_current_timer(inf_frame) return v else - return _ir_abstract_constant_propagation(interp, mi_cache, frame, mi, ir, argtypes) + T = _ir_abstract_constant_propagation(interp, mi_cache, frame, mi, ir, argtypes) + return T end end diff --git a/base/compiler/stmtinfo.jl b/base/compiler/stmtinfo.jl index a2b3b113a3481..d61926fedd885 100644 --- a/base/compiler/stmtinfo.jl +++ b/base/compiler/stmtinfo.jl @@ -65,11 +65,6 @@ struct SemiConcreteResult ir::IRCode effects::Effects end -<<<<<<< HEAD -======= - -const ConstResult = Union{ConstPropResult,ConcreteResult, SemiConcreteResult} ->>>>>>> 983f70db2c (Handle foreigncall in irinterp, fix abstract_invoke inf loop) const ConstResult = Union{ConstPropResult,ConcreteResult, SemiConcreteResult} """