This is the mail archive of the
mailing list for the GCC project.
Re: [patch, mips] Size savings for MIPS16 switch statements
- From: "Maciej W. Rozycki" <macro at codesourcery dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: Richard Sandiford <rdsandiford at googlemail dot com>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 30 Jul 2013 11:18:43 +0100
- Subject: Re: [patch, mips] Size savings for MIPS16 switch statements
- References: <b1eb2749-d413-4f7f-9bb5-42e33787cd02 at BAMAIL02 dot ba dot imgtec dot org>
On Tue, 23 Jul 2013, Steve Ellcey wrote:
> While doing some space optimization work with mips16 I found that using a
> larger case threshold value could shrink the code. I did testing on some
> libraries like libpng and libjpeg as well as some test cases I wrote and
> came up with 10 as the best value for space savings in mips16 mode. I did
> some testing of mips32 code as well and found that this change did not
> help with that code so I restricted the change to mips16 only.
> Tested on mips-mti-elf target, OK for checkin?
> 2013-07-23 Steve Ellcey <firstname.lastname@example.org>
> * config/mips/mips.c (mips_case_values_threshold): New.
> (TARGET_CASE_VALUES_THRESHOLD): Define.
This change has caused regressions I believe, with the mips-linux-gnu
target and the MIPS32/o32 multilib:
FAIL: gcc.target/mips/code-readable-1.c -Os scan-assembler \tla\t
FAIL: gcc.target/mips/code-readable-1.c -Os scan-assembler \t\\.half\t
FAIL: gcc.target/mips/code-readable-2.c -Os scan-assembler \t\\.word\t[^\n]*L
FAIL: gcc.target/mips/code-readable-3.c -Os scan-assembler %hi\\([^)]*L
FAIL: gcc.target/mips/code-readable-3.c -Os scan-assembler %lo\\([^)]*L
FAIL: gcc.target/mips/code-readable-4.c -Os scan-assembler \t\\.half\t
FAIL: gcc.target/mips/code-readable-4.c -Os scan-assembler \tla\t
-- it may be that the tests have to be disabled at -Os just like e.g.
code-readable-1.c already is at -O0.