about summary refs log tree commit diff stats
path: root/miasm2/analysis/depgraph.py
diff options
context:
space:
mode:
authorserpilliere <serpilliere@users.noreply.github.com>2015-12-12 14:35:24 +0100
committerserpilliere <serpilliere@users.noreply.github.com>2015-12-12 14:35:24 +0100
commitb32eb145fce7dd09bef025a9f82b2507bd4e02ee (patch)
tree2c65f005adb7830853664451aed3f2cd05a9be73 /miasm2/analysis/depgraph.py
parent635f372fa846b28252ab86b344a2565f51e2302c (diff)
parentd95af9858230c41449d6fd487a93bdc337780ea7 (diff)
downloadmiasm-b32eb145fce7dd09bef025a9f82b2507bd4e02ee.tar.gz
miasm-b32eb145fce7dd09bef025a9f82b2507bd4e02ee.zip
Merge pull request #290 from commial/refactor-ira
Refactor ira
Diffstat (limited to 'miasm2/analysis/depgraph.py')
-rw-r--r--miasm2/analysis/depgraph.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/miasm2/analysis/depgraph.py b/miasm2/analysis/depgraph.py
index 838183bf..0a5d38aa 100644
--- a/miasm2/analysis/depgraph.py
+++ b/miasm2/analysis/depgraph.py
@@ -686,7 +686,6 @@ class DependencyGraph(object):
     def __init__(self, ira, implicit=False, apply_simp=True, follow_mem=True,
                  follow_call=True):
         """Create a DependencyGraph linked to @ira
-        The IRA graph must have been computed
 
         @ira: IRAnalysis instance
         @implicit: (optional) Imply implicit dependencies
@@ -702,9 +701,6 @@ class DependencyGraph(object):
         self._step_counter = itertools.count()
         self._current_step = next(self._step_counter)
 
-        # The IRA graph must be computed
-        assert hasattr(self._ira, 'g')
-
         # Create callback filters. The order is relevant.
         self._cb_follow = []
         if apply_simp:
@@ -892,7 +888,7 @@ class DependencyGraph(object):
     def _get_previousblocks(self, label):
         """Return an iterator on predecessors blocks of @label, with their
         lengths"""
-        preds = self._ira.g.predecessors_iter(label)
+        preds = self._ira.graph.predecessors_iter(label)
         for pred_label in preds:
             length = len(self._get_irs(pred_label))
             yield (pred_label, length)