[Bug tree-optimization/85585] switch to select a string based on an enum can profitably optimize away the table of pointers/offsets into fixed-length char[] blocks. Or use byte offsets into a string table
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue May 1 15:04:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85585
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Tue, 1 May 2018, peter at cordes dot ca wrote:
> The current strings + pointer-table implementation doesn't merge string
> literals where one string is a suffix of another; this is another a
The linker does that, as well as merging identical strings in different
translation units, via strings going in specially marked string sections
(".section .rodata.str1.1,"aMS",@progbits,1"). These proposed
optimizations would interfere with such linker optimizations, so they
might not be a code size win.
More information about the Gcc-bugs
mailing list