From df049f3b9cb2df3683655659b1da6545d1d2a9de Mon Sep 17 00:00:00 2001 From: Keno Fischer Date: Thu, 5 Jan 2023 21:37:13 +0000 Subject: [PATCH] ir/passes: Various followups from previous PRs Rolls up individual review comments from #48066, #48144, #48151. --- base/compiler/ssair/ir.jl | 1 - base/compiler/ssair/irinterp.jl | 4 ++-- base/compiler/ssair/passes.jl | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/base/compiler/ssair/ir.jl b/base/compiler/ssair/ir.jl index 5a5d98ac4539c..1dfcc7365ac1e 100644 --- a/base/compiler/ssair/ir.jl +++ b/base/compiler/ssair/ir.jl @@ -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) diff --git a/base/compiler/ssair/irinterp.jl b/base/compiler/ssair/irinterp.jl index 856cd3b9eff14..e5d5c5834301e 100644 --- a/base/compiler/ssair/irinterp.jl +++ b/base/compiler/ssair/irinterp.jl @@ -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 @@ -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 diff --git a/base/compiler/ssair/passes.jl b/base/compiler/ssair/passes.jl index 82ba6ddf062d7..4e93d6364749a 100644 --- a/base/compiler/ssair/passes.jl +++ b/base/compiler/ssair/passes.jl @@ -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