about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--miasm2/core/graph.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/miasm2/core/graph.py b/miasm2/core/graph.py
index 00c30d62..2565f3d1 100644
--- a/miasm2/core/graph.py
+++ b/miasm2/core/graph.py
@@ -304,17 +304,12 @@ shape = "box"
                                             self.successors_iter)
 
     def compute_immediate_dominators(self, head):
-        """
-        Compute the immediate dominators of the graph
-
-        Depends on the implementation characteristics of reachable_parents.
-        Modifications could break this algorithm.
-        """
+        """Compute the immediate dominators of the graph"""
         dominators = self.compute_dominators(head)
         idoms = {}
 
         for node in dominators:
-            for predecessor in self.reachable_parents(node):
+            for predecessor in self.walk_dominators(node, dominators):
                 if predecessor in dominators[node] and node != predecessor:
                     idoms[node] = predecessor
                     break