diff options
| author | Ajax <commial@gmail.com> | 2015-12-04 18:46:48 +0100 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2015-12-07 11:15:43 +0100 |
| commit | 308a634b7c2c20692e85f5b72178e00d072b7bcd (patch) | |
| tree | 3e091aef76acdf18d6592c2a058345d87489227b /miasm2/analysis/depgraph.py | |
| parent | 42d4998c1646e48fd9cb150d1aa0e9970b5717c8 (diff) | |
| download | miasm-308a634b7c2c20692e85f5b72178e00d072b7bcd.tar.gz miasm-308a634b7c2c20692e85f5b72178e00d072b7bcd.zip | |
IR: replace `.g` with a lazy built `.graph`, avoiding the need of `gen_graph`
Diffstat (limited to 'miasm2/analysis/depgraph.py')
| -rw-r--r-- | miasm2/analysis/depgraph.py | 6 |
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) |