3 ms·
Every optimization changes the observable behavior of a program in some way. How is the compiler supposed to know which changes you deem acceptable? Eliminatin
by umanwizard 5y ago
Every optimization changes the observable behavior of a program in some way. How is the compiler supposed to know which changes you deem acceptable?
Eliminating dead stores (including calls to memcpy whose result is never read) seems like one of the most basic and least objectionable optimizations I can imagine. So, if you’re against eliminating dead stores, what optimizations _are_ you okay with?
- overgard 5y ago> How is the compiler supposed to know which changes you deem acceptable? It has no idea! Which is why it should settle down.
- umanwizard 5y agoThere's a flag for that: -O0. What you seem to want is "do all the optimizations, except the ones that contradict what I 'obviously' mean", which is just not possible with current technology.