Commit d6c51e39 authored by Jayke Meijer's avatar Jayke Meijer

Removed useless print statement.

parent 123579f1
......@@ -36,7 +36,6 @@ class BasicBlock(Block):
for s in reversed(self):
for reg in s.get_def():
if reg not in self_defs:
print 'Found def:', s
self_defs[reg] = s.sid
self.gen_set.add(s.sid)
......
......@@ -124,17 +124,17 @@ class TestDataflow(unittest.TestCase):
'$4': set([s4.sid])
})
#def test_defs(self):
# s1 = S('command', 'add', '$3', '$1', '$2')
# s2 = S('command', 'move', '$1', '$3')
# s3 = S('command', 'move', '$3', '$2')
# s4 = S('command', 'li', '$4', '0x00000001')
# block = B([s1, s2, s3, s4])
# self.assertEqual(defs([block]), {
# '$3': set([s1.sid, s3.sid]),
# '$1': set([s2.sid]),
# '$4': set([s4.sid])
# })
def test_defs(self):
s1 = S('command', 'add', '$3', '$1', '$2')
s2 = S('command', 'move', '$1', '$3')
s3 = S('command', 'move', '$3', '$2')
s4 = S('command', 'li', '$4', '0x00000001')
block = B([s1, s2, s3, s4])
self.assertEqual(defs([block]), {
'$3': set([s1.sid, s3.sid]),
'$1': set([s2.sid]),
'$4': set([s4.sid])
})
def test_create_gen_kill_gen(self):
s1 = S('command', 'addu', '$3', '$1', '$2')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment