3 ms·
This approach would increase compile times by an outrageous amount, since you now need to compile each function N times. Optimizing compilers can also produce
by UncleMeat 2y ago
This approach would increase compile times by an outrageous amount, since you now need to compile each function N times.
Optimizing compilers can also produce different output but with identical semantics depending on a lot of heuristics. What happens when deleting a line of code produces different inlining or specialization decisions? What is a rigorous definition of "identical"?
"Deleting a line" is also not the only way that unexpected and perhaps unwanted behavior from UB reasoning appears. Unexpected code motion is absolutely a thing that people have complained about. I don't think you can so quickly insist that things like hoisting are out of scope here.