@@ -1213,7 +1213,7 @@ end
1213
1213
# a more careful implementation is required for this aspect.
1214
1214
#
1215
1215
# [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)
1217
1217
local changed:: Bool = false
1218
1218
function mark_concretize! (idx:: Int )
1219
1219
if ! concretize[idx]
@@ -1262,8 +1262,8 @@ end
1262
1262
function visit_𝑰𝑵𝑭𝑳_blocks (func, bb:: BasicBlock , cfg:: CFG , postdomtree)
1263
1263
succ1, succ2 = bb. succs
1264
1264
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, 𝑰𝑵𝑭𝑳 )
1267
1267
end
1268
1268
1269
1269
function reachable_blocks (cfg:: CFG , from_bb:: Int , to_bb:: Int )
@@ -1325,7 +1325,6 @@ end
1325
1325
function select_dependencies! (concretize:: BitVector , src:: CodeInfo , edges, cl)
1326
1326
typedefs = LoweredCodeUtils. find_typedefs (src)
1327
1327
cfg = compute_basic_blocks (src. code)
1328
- domtree = construct_domtree (cfg. blocks)
1329
1328
postdomtree = construct_postdomtree (cfg. blocks)
1330
1329
1331
1330
while true
@@ -1350,7 +1349,7 @@ function select_dependencies!(concretize::BitVector, src::CodeInfo, edges, cl)
1350
1349
changed |= add_ssa_preds! (concretize, src, edges, ())
1351
1350
1352
1351
# Mark necessary control flows.
1353
- changed |= add_control_flow! (concretize, src, cfg, domtree, postdomtree)
1352
+ changed |= add_control_flow! (concretize, src, cfg, postdomtree)
1354
1353
changed |= add_ssa_preds! (concretize, src, edges, ())
1355
1354
1356
1355
changed || break
@@ -1390,17 +1389,17 @@ function compute_dead_blocks(concretize::BitVector, src::CodeInfo, cfg::CFG, pos
1390
1389
termidx = bb. stmts[end ]
1391
1390
@assert is_conditional_terminator (src. code[termidx]) " invalid IR"
1392
1391
visit_𝑰𝑵𝑭𝑳_blocks (bb, cfg, postdomtree) do postdominator:: Int , 𝑰𝑵𝑭𝑳:: BitSet
1393
- is_active_inflblks = false
1392
+ is_𝑰𝑵𝑭𝑳_active = false
1394
1393
for blk in 𝑰𝑵𝑭𝑳
1395
1394
if blk == postdominator
1396
1395
continue # skip the post-dominator block and continue to a next infl block
1397
1396
end
1398
1397
if any (@view concretize[cfg. blocks[blk]. stmts])
1399
- is_active_inflblks |= true
1398
+ is_𝑰𝑵𝑭𝑳_active |= true
1400
1399
break
1401
1400
end
1402
1401
end
1403
- if ! is_active_inflblks
1402
+ if ! is_𝑰𝑵𝑭𝑳_active
1404
1403
union! (dead_blocks, delete! (𝑰𝑵𝑭𝑳, postdominator))
1405
1404
end
1406
1405
end
0 commit comments