Skip to content

Commit fb5896d

Browse files
committed
remove add_loops!
1 parent 1a398ab commit fb5896d

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/codeedges.jl

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,6 @@ function lines_required!(isrequired::AbstractVector{Bool}, objs, src::CodeInfo,
649649
changed |= add_named_dependencies!(isrequired, edges, objs, norequire)
650650

651651
# Add control-flow
652-
changed |= add_loops!(isrequired, cfg)
653652
changed |= add_control_flow!(isrequired, src, cfg, postdomtree)
654653

655654
# So far, everything is generic graph traversal. Now we add some domain-specific information
@@ -731,30 +730,6 @@ end
731730

732731
## Add control-flow
733732

734-
# Mark loops that contain evaluated statements
735-
function add_loops!(isrequired, cfg)
736-
changed = false
737-
for (ibb, bb) in enumerate(cfg.blocks)
738-
needed = false
739-
for ibbp in bb.preds
740-
# Is there a backwards-pointing predecessor, and if so are there any required statements between the two?
741-
ibbp > ibb || continue # not a loop-block predecessor
742-
r, rp = rng(bb), rng(cfg.blocks[ibbp])
743-
r = first(r):first(rp)-1
744-
needed |= any(view(isrequired, r))
745-
end
746-
if needed
747-
# Mark the final statement of all predecessors
748-
for ibbp in bb.preds
749-
rp = rng(cfg.blocks[ibbp])
750-
changed |= !isrequired[last(rp)]
751-
isrequired[last(rp)] = true
752-
end
753-
end
754-
end
755-
return changed
756-
end
757-
758733
using Core: CodeInfo
759734
using Core.Compiler: CFG, BasicBlock, compute_basic_blocks
760735

0 commit comments

Comments
 (0)