Commits

Tero Koskinen committed a0f166c

Add a note that constant propagation is not safe atm.

Comments (0)

Files changed (1)

src/ir/optimize.clj

       (let [stmt (first statements-to-process)]
         (print-stmt stmt)
         (if (is-assign? stmt)
+
+          ; TODO: This algorithm does take aliasing/pointers
+          ; into account. If pointer assignments are used,
+          ; this optimization produces incorrect code.
           (cond
             ; A := CONSTANT_SYMBOL; or A := 55;
             (and (is-constant-assign? stmt symbols)