This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/81540] tree-switch-conversion leads to code bloat


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 ;-)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]