This is the mail archive of the gcc-patches@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]

Re: [patch, mips] Size savings for MIPS16 switch statements


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  <sellcey@mips.com>
> 
> 	* 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.

  Maciej


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