Skip to content

Commit

Permalink
bugfix: place_pi_functions now raises error when graph contains loop
Browse files Browse the repository at this point in the history
  • Loading branch information
lexbailey committed Nov 25, 2024
1 parent e88a5f0 commit dfc733c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/jib_ssa.ml
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ let place_pi_functions ~start ~finish ~post_idom ~post_df graph =
if not (IntSet.mem n !visited) then (
match graph.nodes.(n) with
| Some ((ssa, cfnode), preds, succs) ->
visited := IntSet.add n !visited;
let disj =
List.map
(fun post_frontier ->
Expand Down Expand Up @@ -740,7 +741,6 @@ let place_pi_functions ~start ~finish ~post_idom ~post_df graph =
| [conj] -> Pi conj
| conjs -> Pi [mk_disj (List.map (fun conj -> mk_conj conj) conjs)]
in
visited := IntSet.add n !visited;
graph.nodes.(n) <- Some ((mk_pi disj :: ssa, cfnode), preds, succs)
| None -> ()
)
Expand Down

0 comments on commit dfc733c

Please sign in to comment.