3 ms·
It turns out that many of the standard optimizations just don't work without a lot of extra work. For example, loop optimization algorithms don't take into acco
by WalterBright 4y ago
It turns out that many of the standard optimizations just don't work without a lot of extra work. For example, loop optimization algorithms don't take into account things like the loop induction variable changes may result in overflows.
It just takes a while to figure out how to account for signed/unsigned, integral promotions, overflows, etc.
Some optimizations also defeat other optimizations. For example, on the x86, various arithmetic operations can be combined into a single instruction. But common subexpression elimination can subvert it. It isn't always better to do common subexpression elimination.