Skip to content

Commit

Permalink
remove usage of mark_parallel region
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Jul 6, 2019
1 parent 5543fb2 commit 9e630e7
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions base/compiler/ssair/driver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,9 @@ function just_construct_ssa(ci::CodeInfo, code::Vector{Any}, nargs::Int, sv::Opt
idx = 1
oldidx = 1
changemap = fill(0, length(code))
pregionmap = mark_parallel_regions(code)
while idx <= length(code)
if code[idx] isa Expr && ci.ssavaluetypes[idx] === Union{}
if pregionmap[oldidx] > -1
# We are in a parallel region and can't place a return statement.
# Potentially we could say that a task that throws an error
# could be removed entirely, but we would need to prove that
# nobody waits upon this task, e.g. that for the token there is
# no sync or the sync is dead.
elseif !(idx < length(code) && isexpr(code[idx+1], :unreachable))
if !(idx < length(code) && isexpr(code[idx+1], :unreachable))
insert!(code, idx + 1, ReturnNode())
insert!(ci.codelocs, idx + 1, ci.codelocs[idx])
insert!(ci.ssavaluetypes, idx + 1, Union{})
Expand Down

0 comments on commit 9e630e7

Please sign in to comment.