From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14354 invoked by alias); 23 Jul 2013 18:44:03 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 14328 invoked by uid 89); 23 Jul 2013 18:44:02 -0000 X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,RDNS_NONE,SPF_PASS,TW_BJ,TW_BP,TW_IB autolearn=no version=3.3.1 Received: from Unknown (HELO mail-we0-f176.google.com) (74.125.82.176) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 23 Jul 2013 18:44:02 +0000 Received: by mail-we0-f176.google.com with SMTP id q56so1232141wes.7 for ; Tue, 23 Jul 2013 11:43:53 -0700 (PDT) X-Received: by 10.194.109.10 with SMTP id ho10mr23731254wjb.72.1374605033802; Tue, 23 Jul 2013 11:43:53 -0700 (PDT) Received: from localhost ([2.26.203.233]) by mx.google.com with ESMTPSA id f8sm5539696wiv.0.2013.07.23.11.43.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 23 Jul 2013 11:43:53 -0700 (PDT) From: Richard Sandiford To: "Steve Ellcey " Mail-Followup-To: "Steve Ellcey " ,, rdsandiford@googlemail.com Cc: Subject: Re: [patch, mips] Size savings for MIPS16 switch statements References: Date: Tue, 23 Jul 2013 19:48:00 -0000 In-Reply-To: (Steve Ellcey's message of "Tue, 23 Jul 2013 10:25:51 -0700") Message-ID: <871u6pce1q.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-07/txt/msg01041.txt.bz2 "Steve Ellcey " writes: > 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. Thanks for doing this. casesi certainly isn't small, so I can believe a larger threshold makes sense. OK with a minor change: > +/* Implement `CASE_VALUES_THRESHOLD'. */ > +/* Supply the default for --param case-values-threshold=0 */ > + > +unsigned int Please just use: /* Implement TARGET_CASE_VALUES_THRESHOLD. */ instead of these two comments. I was worried whether this would work for mips16 attributes, but it looks like the function is called on demand rather than cached, so there should be no problem there. Thanks, Richard