Mercurial > lcfOS
diff python/ir/module.py @ 174:3eb06f5fb987
Added memory alloc for locals
author | Windel Bouwman |
---|---|
date | Fri, 19 Apr 2013 19:22:52 +0200 |
parents | c1d2b6b9f9a7 |
children | 460db5669efa |
line wrap: on
line diff
--- a/python/ir/module.py Fri Apr 19 12:42:21 2013 +0200 +++ b/python/ir/module.py Fri Apr 19 19:22:52 2013 +0200 @@ -38,11 +38,11 @@ def dumpgv(self, outf): outf.write('digraph G \n{\n') for f in self.Functions: - outf.write('{0} [label="{1}"]\n'.format(id(f), f)) + outf.write('{0} [label="{1}" shape=box3d]\n'.format(id(f), f)) for bb in f.BasicBlocks: contents = str(bb) + '\n' contents += '\n'.join([str(i) for i in bb.Instructions]) - outf.write('{0} [label="{1}"];\n'.format(id(bb), contents)) + 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))) outf.write('"{0}" -> "{1}" [label="entry"]\n'.format(id(f), id(f.entry))) @@ -55,5 +55,5 @@ for t in i.defs: assert type(t) is Value, "def must be Value, not {0}".format(type(t)) for t in i.uses: - assert type(t) is Value, "use must be Value, not {0}".format(type(t)) + assert type(t) is Use, "use must be Value, not {0}".format(type(t))