Преглед изворни кода

Made copy propagation work with proper mult structure.

Jayke Meijer пре 14 година
родитељ
комит
2473f61769
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      src/optimize/advanced.py

+ 3 - 2
src/optimize/advanced.py

@@ -211,8 +211,9 @@ def copy_propagation(block):
                 if moves_to[i] == s[0]:
                     moves_from[i] = s[1]
                     break
-        elif len(s) == 3 and (s[0] in moves_to or s[0] in moves_from):
-            # One of the registers getss overwritten, so remove the data from
+        elif (len(s) == 3 or s.is_command('mlfo') or s.is_load()) \
+                and (s[0] in moves_to or s[0] in moves_from):
+            # One of the registers gets overwritten, so remove the data from
             # the list.
             i = 0
             while i  < len(moves_to):