Mercurial > lcfOS
diff python/dag.py @ 254:bd26dc13f270
Added logger
author | Windel Bouwman |
---|---|
date | Wed, 31 Jul 2013 21:20:58 +0200 |
parents | 6b2bec5653f1 |
children |
line wrap: on
line diff
--- a/python/dag.py Wed Jul 31 17:57:03 2013 +0200 +++ b/python/dag.py Wed Jul 31 21:20:58 2013 +0200 @@ -15,6 +15,7 @@ def __init__(self, bb): self.mapping = {} self.buildFromBB(bb) + def buildFromBB(self, bb): for ins in bb.Instructions: if type(ins) is ir.BinaryOperator: @@ -39,6 +40,7 @@ self.mapping[ins.result] = N else: pass + def dumpgv(self, outf): outf.write('subgraph {0} {{\n'.format(id(self))) for node in self.mapping.values():