Commit 8e9c42fb authored by Jayke Meijer's avatar Jayke Meijer

Removed debugging commented code.

parent 19a948a4
......@@ -66,21 +66,22 @@ class Program(Block):
if not hasattr(self, 'statements'):
self.statements = self.get_statements()
return remove_redundant_jumps(self)
# | remove_redundant_branch_jumps(self)
return remove_redundant_jumps(self) \
| remove_redundant_branch_jumps(self)
return False
def optimize_blocks(self):
"""Optimize on block level. Keep executing all optimizations until no
more changes occur."""
changed = False
# for block in self.blocks:
# if remove_redundancies(block) \
# | eliminate_common_subexpressions(block) \
# | fold_constants(block) \
# | copy_propagation(block) \
# | eliminate_dead_code(block):
# changed = True
for block in self.blocks:
if remove_redundancies(block) \
| eliminate_common_subexpressions(block) \
| fold_constants(block) \
| copy_propagation(block) \
| eliminate_dead_code(block):
changed = True
return changed
......
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