OneInstrPerNode: fix preds

Summary:
Rely on the underlying CFG preds:
- perf: no need to append lists
- correctness: the underlying CFG may be removing duplicates

Reviewed By: ngorogiannis

Differential Revision: D8185638

fbshipit-source-id: 3b6f70a
master
Mehdi Bouaziz 7 years ago committed by Facebook Github Bot
parent eaf4490670
commit 0f8111d0d0

@ -324,7 +324,9 @@ struct
if index >= 1 then [] else List.map ~f:last_of_node (Base.exceptional_preds cfg node) if index >= 1 then [] else List.map ~f:last_of_node (Base.exceptional_preds cfg node)
let preds cfg t = List.rev_append (exceptional_preds cfg t) (normal_preds cfg t) let preds cfg (node, index) =
if index >= 1 then [(node, index - 1)] else List.map ~f:last_of_node (Base.preds cfg node)
let start_node cfg = first_of_node (Base.start_node cfg) let start_node cfg = first_of_node (Base.start_node cfg)

Loading…
Cancel
Save