Commit 21ff6f23 authored by Taddeus Kroes's avatar Taddeus Kroes

Fixed syntax errors.

parent 08c545ce
...@@ -31,9 +31,9 @@ def optimize_block(block): ...@@ -31,9 +31,9 @@ def optimize_block(block):
while remove_redundancies(block) \ while remove_redundancies(block) \
| eliminate_common_subexpressions(block) \ | eliminate_common_subexpressions(block) \
| fold_constants(block) \ | fold_constants(block) \
| copy_propagation(block)\ | copy_propagation(block) \
#| algebraic_transformations(block) \
| eliminate_dead_code(block): | eliminate_dead_code(block):
#| algebraic_transformations(block) \
pass pass
......
...@@ -228,7 +228,7 @@ def fold_constants(block): ...@@ -228,7 +228,7 @@ def fold_constants(block):
block.replace(1, [S('command', 'move', rd, s[1])]) block.replace(1, [S('command', 'move', rd, s[1])])
else: else:
for reg in s.get_def(): for reg in s.get_def():
if reg in register if reg in register:
# Known register is overwritten, remove its value # Known register is overwritten, remove its value
del register[reg] del register[reg]
......
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