Skip to content

Commit

Permalink
ir/passes: Various followups from previous PRs
Browse files Browse the repository at this point in the history
Rolls up individual review comments from #48066, #48144, #48151.
  • Loading branch information
Keno committed Jan 6, 2023
1 parent b76fdcc commit df049f3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion base/compiler/ssair/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,6 @@ function process_node!(compact::IncrementalCompact, result_idx::Int, inst::Instr
ssa_rename[idx] = stmt
else
result[result_idx][:inst] = stmt
result[result_idx][:flag] = flag
result_idx += 1
end
elseif isa(stmt, GotoNode)
Expand Down
4 changes: 2 additions & 2 deletions base/compiler/ssair/irinterp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function reprocess_instruction!(interp::AbstractInterpreter,
(; rt, effects) = abstract_eval_statement_expr(interp, inst, nothing, ir, irsv.mi)
# All other effects already guaranteed effect free by construction
if is_nothrow(effects)
ir.stmts[idx][:flag] |= IR_FLAG_EFFECT_FREE | IR_FLAG_NOTHROW
ir.stmts[idx][:flag] |= IR_FLAG_NOTHROW
if isa(rt, Const) && is_inlineable_constant(rt.val)
ir.stmts[idx][:inst] = quoted(rt.val)
end
Expand All @@ -242,7 +242,7 @@ function reprocess_instruction!(interp::AbstractInterpreter,
if mi′ !== irsv.mi # prevent infinite loop
rt, nothrow = concrete_eval_invoke(interp, inst, mi′, irsv)
if nothrow
ir.stmts[idx][:flag] |= IR_FLAG_EFFECT_FREE | IR_FLAG_NOTHROW
ir.stmts[idx][:flag] |= IR_FLAG_NOTHROW
if isa(rt, Const) && is_inlineable_constant(rt.val)
ir.stmts[idx][:inst] = quoted(rt.val)
end
Expand Down
1 change: 0 additions & 1 deletion base/compiler/ssair/passes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,6 @@ end
isa(rarg, SSAValue) || return nothing
argdef = compact[rarg][:inst]
else
isa(arg, DataType) || return nothing
isType(arg) || return nothing
arg = arg.parameters[1]
end
Expand Down

0 comments on commit df049f3

Please sign in to comment.