3 ms·
Recently I learned that it is Gcc policy to reject fixes for optimization regressions anywhere but in trunk releases. So, a regression seen in Gcc 9 and 10, wh
by ncmncm 6y ago
Recently I learned that it is Gcc policy to reject fixes for optimization regressions anywhere but in trunk releases.
So, a regression seen in Gcc 9 and 10, where a switch statement is no longer converted, where possible, to a single instruction, was fixed in Gcc 11 before its release, but is permanently enshrined in Gcc 9.x and 10.x, for all x for all time. The person who had introduced the regression argued against fixing it.
I don't know what optimizer regressions are permanently enshrined in Gcc 11. I also don't know Clang's policy.
- simcop2387 6y agoThis likely isn't a policy out of malice or anything like that, it's entirely going to be because it's,otherwise difficult or impossible to keep any kind if stability and testing with a given branch of the compiler. They're just way too cimplicated to be able to easily tell and test what a set of changes might cause, and because it's udually hard to prove that the change you're making isn;t going to have some kind of butterfly effect on other changes and optimizations that were made. So in the end it's better for stability to fix regressions like that in the next release rather than to keep tweaking things in minor releases where you're otherwise only commiting to changes for correctness and compiler crashes.