
On Fri, Dec 5, 2008 at 4:59 PM, Mathias Gaunard <mathias.gaunard@ens-lyon.org> wrote:
Emil Dotchevski wrote:
I don't see how const-propagation is relevant here, but regardless -- const-propagation rarely (if ever) leads to optimization possibilities.
It is certainly one of the most (if not the most) important optimization in a compiler. http://en.wikipedia.org/wiki/Constant_folding
sparse conditional constant propagation is probably quite necessary for good propagation across branches.
Ah I misunderstood your point, but even so, this is tricky stuff. For example, floating point constant expressions are sometimes evaluated at run-time. But in this particular case, the compiler can't always see the "constness" of the if. You can argue that "whole program optimization" kind of stuff can help, but the thing is, it can help even if by definition the move semantics are not destructive. :) Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode