https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81540

--- Comment #4 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #3)
> Estimating the size for non-switch converted switches is going to be really
> hard.

The point is that with -fno-tree-switch-conversion there is no switch at all. 
As the switch is sparse, just a few comparisons or conditional loads can handle
it.

> Anyway, isn't -Os about code size (which is shorter when switch converted)
> rather than total size of all sections?

Well, .rodata is something that has to be allocated just like .text.  It's not
executable, but it consumes target memory.

If you'd replace computation of sin() by an insanely big lookup-table and
advertise it as "code size shrunk", users still won't like it ;-)

Reply via email to