From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27222 invoked by alias); 13 Apr 2011 17:09:17 -0000 Received: (qmail 27214 invoked by uid 22791); 13 Apr 2011 17:09:16 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Apr 2011 17:09:08 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3DH98hh000580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Apr 2011 13:09:08 -0400 Received: from toll.yyz.redhat.com (toll.yyz.redhat.com [10.15.16.165]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p3DH97br021333 for ; Wed, 13 Apr 2011 13:09:08 -0400 Message-ID: <4DA5D8B3.2080003@redhat.com> Date: Wed, 13 Apr 2011 17:09:00 -0000 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: gcc-patches Subject: RFA: patch for PR48455 Content-Type: multipart/mixed; boundary="------------040804040409010905000800" X-IsSubscribed: yes 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 X-SW-Source: 2011-04/txt/msg01016.txt.bz2 This is a multi-part message in MIME format. --------------040804040409010905000800 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 453 The following patch should improve code size which degradation for arm is reported on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48455 Is it ok to commit? The patch was successfully bootstrapped on x86-64 and i686 with H.J.'s autotester options. 2011-04-13 Vladimir Makarov PR rtl-optimization/48455 * ira-costs.c (find_costs_and_classes): Use i_mem_cost instead of `temp_costs->mem_cost'. --------------040804040409010905000800 Content-Type: text/plain; name="pr48455.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr48455.patch" Content-length: 1643 Index: ira-costs.c =================================================================== --- ira-costs.c (revision 172376) +++ ira-costs.c (working copy) @@ -1646,44 +1646,44 @@ for (k = cost_classes_ptr->num - 1; k >= 0; k--) { add_cost = a_costs[k]; if (add_cost > 0 && INT_MAX - add_cost < i_costs[k]) i_costs[k] = INT_MAX; else i_costs[k] += add_cost; } add_cost = COSTS (costs, a_num)->mem_cost; if (add_cost > 0 && INT_MAX - add_cost < i_mem_cost) i_mem_cost = INT_MAX; else i_mem_cost += add_cost; #ifdef FORBIDDEN_INC_DEC_CLASSES if (in_inc_dec[a_num]) inc_dec_p = true; #endif } } if (equiv_savings < 0) - temp_costs->mem_cost = -equiv_savings; + i_mem_cost = -equiv_savings; else if (equiv_savings > 0) { - temp_costs->mem_cost = 0; + i_mem_cost = 0; for (k = cost_classes_ptr->num - 1; k >= 0; k--) i_costs[k] += equiv_savings; } best_cost = (1 << (HOST_BITS_PER_INT - 2)) - 1; best = ALL_REGS; alt_class = NO_REGS; /* Find best common class for all allocnos with the same regno. */ for (k = 0; k < cost_classes_ptr->num; k++) { rclass = cost_classes[k]; /* Ignore classes that are too small for this operand or invalid for an operand that was auto-incremented. */ if (! contains_reg_of_mode[rclass][PSEUDO_REGNO_MODE (i)] #ifdef FORBIDDEN_INC_DEC_CLASSES || (inc_dec_p && forbidden_inc_dec_class[rclass]) #endif #ifdef CANNOT_CHANGE_MODE_CLASS || invalid_mode_change_p (i, (enum reg_class) rclass) --------------040804040409010905000800--