Explorar o código

Started work on copy propagation.

Jayke Meijer %!s(int64=14) %!d(string=hai) anos
pai
achega
7b0de9af0d
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      src/optimize/advanced.py

+ 7 - 0
src/optimize/advanced.py

@@ -54,3 +54,10 @@ def fold_constants(block):
     Constant folding:
     """
     return False
+    
+def copy_propagtion(block):
+    """
+    Rename values that were copied to there original, so the copy statement
+    might be useless, allowing it to be removed by dead code elimination.
+    """
+    return false