You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Strlen was jumping to strlen as part of -ftree-loop-distribute-patterns.
Seems this sort of issue can be common and generally fixed with
-fno-builtin. However, some of those optimizations may be useful and I
don't think our semantics for the functions are wildly different than
the standard, so I'm fixing this surgically with
-ftree-loop-distribute-patterns to just util.c. That may be the wrong
call, so if this bites us again, let's go more aggressive. Fixes#660.
Below are some filesizes for stm32f105/prod/floppy/target.bin with
different compilers/branches that I trialed to get an idea of the impact
of these optimizations.
stable-v3:
GCC 11: 83180 baseline
GCC 11: 83180 util.c no-tree-loop-distribute-pattern
GCC 11: 83180 util.c no-builtin
GCC 11: 83200 all no-tree-loop-distribute-pattern
GCC 11: 83336 all no-builtin
GCC 12: 83500 baseline (broken)
GCC 12: 83512 util.c no-tree-loop-distribute-pattern
GCC 12: 83512 util.c no-builtin
GCC 12: 83524 all no-tree-loop-distribute-pattern
GCC 12: 83544 all no-builtin
master:
GCC 12: 89996 baseline (broken)
GCC 12: 90008 util.c no-tree-loop-distribute-pattern
GCC 12: 90020 util.c no-builtin
GCC 12: 90020 all no-tree-loop-distribute-patterns
GCC 12: 90064 all no-builtin
0 commit comments