Hello,

There is code in stmt.c since the initial checkin, that tries to
balance a switch tree according to some ascii heuristics. I see a
couple of problems with this code:

1. It doesn't seem to help much. With the attached patch to remove the
code, I see no compile time changes to e.g. compile GCC itself.

2. It isn't clear what the heuristic is based on (no reference to any
testing done, or a reference to a book or paper).

3. The heuristic is applied for case values in the range <-1,127>
(inclusive) even if the type of the switch expression isn't char or
int but e.g. an enum. This results in funny application of this
heuristic in GCC itself to e.g. some cases of enum rtx_code and enum
tree_code.


The attached patch removes the heuristic.

Bootstrapped and tested on powerpc-unknown-linux-gnu. OK for trunk?

Ciao!
Steven

Attachment: stmt_c_cleanup_1.diff
Description: Binary data

Reply via email to