summaryrefslogtreecommitdiff
path: root/backend/Linearizeaux.ml
diff options
context:
space:
mode:
authorGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-08-12 13:09:20 +0000
committerGravatar xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e>2013-08-12 13:09:20 +0000
commiteafbaf41e528cc9825a503c66739a66a92ca65a8 (patch)
tree631be83d097b863cfce0482e143cf1d45f7263e8 /backend/Linearizeaux.ml
parentf7d64b71170e0694c5c4fb38ab7d1a23a4bd4c2a (diff)
Change interface of Kildall solvers to avoid precomputing the map pc -> list of successors.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2305 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'backend/Linearizeaux.ml')
-rw-r--r--backend/Linearizeaux.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/backend/Linearizeaux.ml b/backend/Linearizeaux.ml
index 5bb5838..ef26856 100644
--- a/backend/Linearizeaux.ml
+++ b/backend/Linearizeaux.ml
@@ -37,7 +37,6 @@ module IntSet = Set.Make(struct type t = int let compare = compare end)
(* Determine join points: reachable nodes that have > 1 predecessor *)
let join_points f =
- let succs = LTL.successors f in
let reached = ref IntSet.empty in
let reached_twice = ref IntSet.empty in
let rec traverse pc =
@@ -47,7 +46,9 @@ let join_points f =
reached_twice := IntSet.add npc !reached_twice
end else begin
reached := IntSet.add npc !reached;
- traverse_succs (Kildall.successors_list succs pc)
+ match PTree.get pc f.fn_code with
+ | None -> ()
+ | Some b -> traverse_succs (successors_block b)
end
and traverse_succs = function
| [] -> ()