diff options
| author | Tim Blazytko <tim.blazytko@rub.de> | 2015-06-01 22:54:45 +0200 |
|---|---|---|
| committer | Tim Blazytko <tim.blazytko@rub.de> | 2015-06-02 15:04:04 +0200 |
| commit | 7a63b077f44fa37ad2aecf3ce9c7f2379038f76e (patch) | |
| tree | fd5804089cd3d5d87e7d1d153fe405807248d5d1 | |
| parent | 5fc740de493c80731de0d0767c54fb6c9516b617 (diff) | |
| download | miasm-7a63b077f44fa37ad2aecf3ce9c7f2379038f76e.tar.gz miasm-7a63b077f44fa37ad2aecf3ce9c7f2379038f76e.zip | |
DiGraph: compute_immediate_dominators depends now on walk_dominators
| -rw-r--r-- | miasm2/core/graph.py | 9 |
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 |