]> git.ipfire.org Git - thirdparty/gcc.git/commit
AVR: Disable tree-switch-conversion per default.
authorGeorg-Johann Lay <avr@gjlay.de>
Sat, 6 Sep 2025 11:38:48 +0000 (13:38 +0200)
committerGeorg-Johann Lay <avr@gjlay.de>
Wed, 10 Sep 2025 19:09:24 +0000 (21:09 +0200)
commit912159d2b5429c3126756b56723dd4f32dd56bdd
treee30a5bf8fbfdbbc47940295879bf8544f2915e06
parent220e4d2df797c634e8975cb0a8e4598268f7bbe9
AVR: Disable tree-switch-conversion per default.

There are at least two cases where tree-switch-conversion leads
to unpleasant resource allocation:

PR49857
    The lookup table lives in RAM.  This is the case for all
    devices that locate .rodata in RAM, which is for almost
    all AVR devices.

PR81540
    Code is bloated for 64-bit inputs.

As far as PR49857 is concerned, a target hook that may add an
address-space qualifier to the lookup table is the obvious
solution, though a respective patch has always been rejected by
global maintainers for non-technical reasons.

gcc/
PR target/81540
PR target/49857
* common/config/avr/avr-common.cc: Disable -ftree-switch-conversion.
gcc/common/config/avr/avr-common.cc