Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "6f1fad26-d15e-5dc8-ae53-837a1d7b8c9f"
license = "MIT"
desc = "Tape based task copying in Turing"
repo = "https://github.com/TuringLang/Libtask.jl.git"
version = "0.9.3"
version = "0.9.4"

[deps]
MistyClosures = "dbe65cb8-6be2-42dd-bbc5-4196aaced4f4"
Expand All @@ -14,7 +14,7 @@ Aqua = "0.8.11"
JuliaFormatter = "1.0.62"
MistyClosures = "2.0.0"
Test = "1"
julia = "1.10.8"
julia = "~1.10.8, 1.11.6"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
6 changes: 6 additions & 0 deletions src/bbcode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ function _control_flow_graph(blks::Vector{BBlock})::Core.Compiler.CFG
preds = map(id -> sort(map(p -> id_to_num[p], preds_ids[id])), block_ids)
succs = map(id -> sort(map(s -> id_to_num[s], succs_ids[id])), block_ids)

# Predecessor of entry block is `0`. This needs to be added in manually.
@static if VERSION >= v"1.11"
push!(preds[1], 0)
end

# Compute the statement numbers associated to each basic block.
index = vcat(0, cumsum(map(length, blks))) .+ 1
basic_blocks = map(eachindex(blks)) do n
stmt_range = Core.Compiler.StmtRange(index[n], index[n + 1] - 1)
Expand Down
Loading