From a91773b37c894a49e5e0503c2718fb1cc4c04d5d Mon Sep 17 00:00:00 2001 From: Mark Kittisopikul Date: Sun, 14 Apr 2024 02:49:33 -0400 Subject: [PATCH] Fix use of LoweredCodeUtils.add_control_flow! --- Project.toml | 2 +- src/toplevel/virtualprocess.jl | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 2c7dc3b43..f6eadb145 100644 --- a/Project.toml +++ b/Project.toml @@ -22,7 +22,7 @@ InteractiveUtils = "1.10" JuliaInterpreter = "0.9" Libdl = "1.10" Logging = "1.10" -LoweredCodeUtils = "2.2 - 2.3" # TODO update to 2.4 +LoweredCodeUtils = "2.4" MacroTools = "0.5.6" Pkg = "1.10" PrecompileTools = "1" diff --git a/src/toplevel/virtualprocess.jl b/src/toplevel/virtualprocess.jl index ae98bbd67..2ae8810dd 100644 --- a/src/toplevel/virtualprocess.jl +++ b/src/toplevel/virtualprocess.jl @@ -1186,13 +1186,16 @@ function select_dependencies!(concretize, src, edges) end end + domtree = LoweredCodeUtils.construct_domtree(cfg.blocks) + postdomtree = LoweredCodeUtils.construct_postdomtree(cfg.blocks) + changed = true while changed changed = false # track SSA predecessors and control flows of the critical blocks changed |= LoweredCodeUtils.add_ssa_preds!(concretize, src, edges, norequire) - changed |= LoweredCodeUtils.add_control_flow!(concretize, cfg, norequire) + changed |= LoweredCodeUtils.add_control_flow!(concretize, cfg, domtree, postdomtree) end end