diff python/ir/module.py @ 177:460db5669efa

Added clean pass for IR
author Windel Bouwman
date Mon, 22 Apr 2013 23:54:54 +0200
parents 3eb06f5fb987
children d77cb5962cc5
line wrap: on
line diff
--- a/python/ir/module.py	Sat Apr 20 12:00:51 2013 +0200
+++ b/python/ir/module.py	Mon Apr 22 23:54:54 2013 +0200
@@ -45,6 +45,11 @@
             outf.write('{0} [shape=note label="{1}"];\n'.format(id(bb), contents))
             for successor in bb.Successors:
                outf.write('"{0}" -> "{1}"\n'.format(id(bb), id(successor)))
+            # Draw dags if any:
+            if hasattr(bb, 'dag'):
+               outf.write('{0} -> {1}\n'.format(id(bb), id(bb.dag)))
+               bb.dag.dumpgv(outf)
+
          outf.write('"{0}" -> "{1}" [label="entry"]\n'.format(id(f), id(f.entry)))
       outf.write('}\n')