Skip to content

Commit 10cef62

Browse files
authored
use IR_FLAG_REFINED rather than extra_reprocess to rerun inference (#163)
1 parent 6eac9b2 commit 10cef62

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/codegen/forward_demand.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,18 +328,19 @@ function forward_diff!(interp::ADInterpreter, ir::IRCode, src::CodeInfo, mi::Met
328328

329329
ir = compact!(ir)
330330

331-
extra_reprocess = CC.BitSet()
332331
for i = 1:length(ir.stmts)
333332
if ir[SSAValue(i)][:type] == Any
334-
CC.push!(extra_reprocess, i)
333+
# TODO: this flag should actually be being set at the insert site
334+
# and we should be filtering on if it is present rather than [:type]=Any
335+
ir[SSAValue(i)][:flag] |= CC.IR_FLAG_REFINED
335336
end
336337
end
337338

338339
method_info = CC.MethodInfo(src)
339340
argtypes = ir.argtypes[1:mi.def.nargs]
340341
world = CC.get_world_counter(interp)
341342
irsv = IRInterpretationState(interp, method_info, ir, mi, argtypes, world, src.min_world, src.max_world)
342-
rt = CC._ir_abstract_constant_propagation(interp, irsv; extra_reprocess)
343+
rt = CC._ir_abstract_constant_propagation(interp, irsv)
343344

344345
ir = compact!(ir)
345346

0 commit comments

Comments
 (0)