3 ms·
GCC does this too fwiw. Whether or not it is considered a bug, it doesn't have one particular root cause. Several common optimization passes assume small functi
by lopsidedBrain 7y ago
GCC does this too fwiw. Whether or not it is considered a bug, it doesn't have one particular root cause. Several common optimization passes assume small function body. Since functions are typically small, many optimizations use this as a window for heavyweight passes.
In other words, intraprocedural optimisation has always been more aggressive than interprocedural optimisation. If you try inlining every function ever into one giant function, you'll be forced to scale back optimization levels.
- viraptor 7y agoThere seems to be space for middle ground available then... if IR_count > ... warn "Can't run optimiser ... pass on {func} (too large)" else run_pass
- lopsidedBrain 7y agoI can't speak for the toolchain maintainers. But with appropriate flags to force or skip those passes, yes I can see something like this being merged in.