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 /example/expression/asm_to_ir.py | |
| parent | 42d4998c1646e48fd9cb150d1aa0e9970b5717c8 (diff) | |
| download | focaccia-miasm-308a634b7c2c20692e85f5b72178e00d072b7bcd.tar.gz focaccia-miasm-308a634b7c2c20692e85f5b72178e00d072b7bcd.zip | |
IR: replace `.g` with a lazy built `.graph`, avoiding the need of `gen_graph`
Diffstat (limited to 'example/expression/asm_to_ir.py')
| -rw-r--r-- | example/expression/asm_to_ir.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/example/expression/asm_to_ir.py b/example/expression/asm_to_ir.py index 3ed59ffe..2f8999a4 100644 --- a/example/expression/asm_to_ir.py +++ b/example/expression/asm_to_ir.py @@ -45,13 +45,10 @@ for lbl, b in ir_arch.blocs.items(): print b # Dead propagation -ir_arch.gen_graph() -out = ir_arch.graph() -open('graph.dot', 'w').write(out) +open('graph.dot', 'w').write(ir_arch.graph.dot()) print '*' * 80 ir_arch.dead_simp() -out2 = ir_arch.graph() -open('graph2.dot', 'w').write(out2) +open('graph2.dot', 'w').write(ir_arch.graph.dot()) # Display new IR print 'new ir blocs' |