-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make SROA pass more aggressive + make SSA use counting more accurate #44557
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -371,7 +371,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] = | ||
|
@@ -428,13 +427,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 | ||
Comment on lines
-431
to
-437
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here, if |
||
if length(pn.edges) == 1 | ||
return_value = pn.values[1] | ||
else | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline_compact[idx′] = val
callscount_added_node!
, which incrementsinline_compact.used_ssas
, which=== compact.used_ssas
, so incrementing here is incorrect