@@ -1213,7 +1213,7 @@ end
12131213# a more careful implementation is required for this aspect.
12141214#
12151215# [Wei84]: M. Weiser, "Program Slicing," IEEE Transactions on Software Engineering, 10, pages 352-357, July 1984.
1216- function add_control_flow! (concretize:: BitVector , src:: CodeInfo , cfg:: CFG , domtree, postdomtree)
1216+ function add_control_flow! (concretize:: BitVector , src:: CodeInfo , cfg:: CFG , postdomtree)
12171217 local changed:: Bool = false
12181218 function mark_concretize! (idx:: Int )
12191219 if ! concretize[idx]
@@ -1262,8 +1262,8 @@ end
12621262function visit_𝑰𝑵𝑭𝑳_blocks (func, bb:: BasicBlock , cfg:: CFG , postdomtree)
12631263 succ1, succ2 = bb. succs
12641264 postdominator = nearest_common_dominator (postdomtree, succ1, succ2)
1265- inflblks = reachable_blocks (cfg, succ1, postdominator) ∪ reachable_blocks (cfg, succ2, postdominator)
1266- return func (postdominator, inflblks )
1265+ 𝑰𝑵𝑭𝑳 = reachable_blocks (cfg, succ1, postdominator) ∪ reachable_blocks (cfg, succ2, postdominator)
1266+ return func (postdominator, 𝑰𝑵𝑭𝑳 )
12671267end
12681268
12691269function reachable_blocks (cfg:: CFG , from_bb:: Int , to_bb:: Int )
@@ -1325,7 +1325,6 @@ end
13251325function select_dependencies! (concretize:: BitVector , src:: CodeInfo , edges, cl)
13261326 typedefs = LoweredCodeUtils. find_typedefs (src)
13271327 cfg = compute_basic_blocks (src. code)
1328- domtree = construct_domtree (cfg. blocks)
13291328 postdomtree = construct_postdomtree (cfg. blocks)
13301329
13311330 while true
@@ -1350,7 +1349,7 @@ function select_dependencies!(concretize::BitVector, src::CodeInfo, edges, cl)
13501349 changed |= add_ssa_preds! (concretize, src, edges, ())
13511350
13521351 # Mark necessary control flows.
1353- changed |= add_control_flow! (concretize, src, cfg, domtree, postdomtree)
1352+ changed |= add_control_flow! (concretize, src, cfg, postdomtree)
13541353 changed |= add_ssa_preds! (concretize, src, edges, ())
13551354
13561355 changed || break
@@ -1390,17 +1389,17 @@ function compute_dead_blocks(concretize::BitVector, src::CodeInfo, cfg::CFG, pos
13901389 termidx = bb. stmts[end ]
13911390 @assert is_conditional_terminator (src. code[termidx]) " invalid IR"
13921391 visit_𝑰𝑵𝑭𝑳_blocks (bb, cfg, postdomtree) do postdominator:: Int , 𝑰𝑵𝑭𝑳:: BitSet
1393- is_active_inflblks = false
1392+ is_𝑰𝑵𝑭𝑳_active = false
13941393 for blk in 𝑰𝑵𝑭𝑳
13951394 if blk == postdominator
13961395 continue # skip the post-dominator block and continue to a next infl block
13971396 end
13981397 if any (@view concretize[cfg. blocks[blk]. stmts])
1399- is_active_inflblks |= true
1398+ is_𝑰𝑵𝑭𝑳_active |= true
14001399 break
14011400 end
14021401 end
1403- if ! is_active_inflblks
1402+ if ! is_𝑰𝑵𝑭𝑳_active
14041403 union! (dead_blocks, delete! (𝑰𝑵𝑭𝑳, postdominator))
14051404 end
14061405 end
0 commit comments