Skip to content

Commit 4250b35

Browse files
Kenopull[bot]
authored andcommitted
Fix TODO in IncrementalCompact's already_inserted (JuliaLang#49380)
The `already_inserted` query on `IncrementalCompact` had a missing case for being called on incremental compact whose underlying IR had new nodes to be inserted. This does not happen in the base pipeline, because `already_inserted` is only used in the sroa passes, but can happen in some non-Base pipelines that run multiple rounds of sroa.
1 parent 8cc2047 commit 4250b35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/compiler/ssair/passes.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ function already_inserted(compact::IncrementalCompact, old::OldSSAValue)
326326
end
327327
id -= length(compact.ir.stmts)
328328
if id < length(compact.ir.new_nodes)
329-
error("")
329+
return already_inserted(compact, OldSSAValue(compact.ir.new_nodes.info[id].pos))
330330
end
331331
id -= length(compact.ir.new_nodes)
332332
@assert id <= length(compact.pending_nodes)

0 commit comments

Comments
 (0)