The Octave Optimizer implements several optimization on Octave code. The optimizations are implemented as source-to-source transformation, similar to the optimization described in the following paper,
K. Olmos and E. Visser. Strategies for Source-to-Source Constant Propagation. In B. Gramlich and S. Lucas, editors, Workshop on Reduction Strategies (WRS'02), volume 70 of Electronic Notes in Theoretical Computer Science, page 20, Copenhagen, Denmark, July 2002. Elsevier Science Publishers. (entcs,pdf,bib).
The latest sources of the Octave Optimizer can be found at
Besides the previously mentioned optimizations, the Stratego Octave Compiler has some experimental support for loop optimizations. Remko van Beusekom is implementing these optimization as part of his Master thesis project. The loop optimizations are a variant to the optimizations described in the following book,
Ken Kennedy and John R. Allen. Optimizing compilers for modern architectures: a dependence-based approach. 2002. Morgan Kaufmann Publishers Inc. (bib).