Skip to content

Commit

Permalink
More aggressive SROA considering uses of new_new_nodes (#44557)
Browse files Browse the repository at this point in the history
Co-authored-by: Keno Fischer <[email protected]>
  • Loading branch information
Ian Atol and Keno authored Mar 21, 2022
1 parent c92ab5e commit 7f29b70
Show file tree
Hide file tree
Showing 4 changed files with 279 additions and 115 deletions.
8 changes: 0 additions & 8 deletions base/compiler/ssair/inlining.jl
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
stmt′ = ssa_substitute!(idx′, stmt′, argexprs, sig, sparam_vals, linetable_offset, boundscheck, compact)
if isa(stmt′, ReturnNode)
val = stmt′.val
isa(val, SSAValue) && (compact.used_ssas[val.id] += 1)
return_value = SSAValue(idx′)
inline_compact[idx′] = val
inline_compact.result[idx′][:type] =
Expand Down Expand Up @@ -433,13 +432,6 @@ function ir_inline_item!(compact::IncrementalCompact, idx::Int, argexprs::Vector
just_fixup!(inline_compact)
compact.result_idx = inline_compact.result_idx
compact.active_result_bb = inline_compact.active_result_bb
for i = 1:length(pn.values)
isassigned(pn.values, i) || continue
v = pn.values[i]
if isa(v, SSAValue)
compact.used_ssas[v.id] += 1
end
end
if length(pn.edges) == 1
return_value = pn.values[1]
else
Expand Down
Loading

0 comments on commit 7f29b70

Please sign in to comment.