From patchwork Thu Oct 27 12:33:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 122142 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3B5B2B6F72 for ; Thu, 27 Oct 2011 23:34:35 +1100 (EST) Received: (qmail 10632 invoked by alias); 27 Oct 2011 12:34:32 -0000 Received: (qmail 10299 invoked by uid 22791); 27 Oct 2011 12:34:31 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL, BAYES_00, FROM_12LTRDOM X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Oct 2011 12:33:52 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RJP9b-00009d-OZ from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Thu, 27 Oct 2011 05:33:51 -0700 Received: from [127.0.0.1] ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 27 Oct 2011 13:33:49 +0100 Message-ID: <4EA94FA3.7020002@codesourcery.com> Date: Thu, 27 Oct 2011 14:33:39 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.20) Gecko/20110920 Lightning/1.0b3pre Thunderbird/3.1.12 MIME-Version: 1.0 To: GCC Patches Subject: c6x.c warning fixes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This fixes a few warnings when building c6x.c. Committed. Bernd Index: gcc/ChangeLog =================================================================== --- gcc/ChangeLog (revision 180564) +++ gcc/ChangeLog (working copy) @@ -1,3 +1,10 @@ +2011-10-24 Bernd Schmidt + + * config/c6x/c6x.c (unit_req_imbalance, res_mii): Cast the first arg + to unit_req_factor to the right enum type. + (get_unit_operand_masks, reshuffle_units, try_rename_operands, + hwloop_optimize): Remove unused variables. + 2010-10-27 Richard Guenther PR middle-end/50731 Index: gcc/config/c6x/c6x.c =================================================================== --- gcc/config/c6x/c6x.c (revision 180314) +++ gcc/config/c6x/c6x.c (working copy) @@ -3325,7 +3325,7 @@ unit_req_imbalance (unit_req_table reqs) for (i = 0; i < UNIT_REQ_MAX; i++) { - int factor = unit_req_factor (i); + int factor = unit_req_factor ((enum unitreqs) i); int diff = abs (reqs[0][i] - reqs[1][i]); val += (diff + factor - 1) / factor / 2; } @@ -3343,7 +3343,7 @@ res_mii (unit_req_table reqs) for (side = 0; side < 2; side++) for (req = 0; req < UNIT_REQ_MAX; req++) { - int factor = unit_req_factor (req); + int factor = unit_req_factor ((enum unitreqs) req); worst = MAX ((reqs[side][UNIT_REQ_D] + factor - 1) / factor, worst); } @@ -3357,8 +3357,6 @@ res_mii (unit_req_table reqs) static bool get_unit_operand_masks (rtx insn, unsigned int *pmask1, unsigned int *pmask2) { - enum attr_units units; - enum attr_type type; enum attr_op_pattern op_pat; if (recog_memoized (insn) < 0) @@ -3417,7 +3415,6 @@ try_rename_operands (rtx head, rtx tail, { enum reg_class super_class = orig_side == 0 ? B_REGS : A_REGS; HARD_REG_SET unavailable; - unit_req_table new_unit_reqs; du_head_p this_head; struct du_chain *chain; int i; @@ -3520,11 +3517,9 @@ reshuffle_units (basic_block loop) rtx head = BB_HEAD (loop); rtx tail = BB_END (loop); rtx insn; - int side; unit_req_table reqs; edge e; edge_iterator ei; - basic_block first = NULL; bitmap_head bbs; count_unit_reqs (reqs, head, PREV_INSN (tail)); @@ -3535,17 +3530,14 @@ reshuffle_units (basic_block loop) bitmap_initialize (&bbs, &bitmap_default_obstack); FOR_EACH_EDGE (e, ei, loop->preds) - { - bitmap_set_bit (&bbs, e->src->index); - first = e->src; - } + bitmap_set_bit (&bbs, e->src->index); + bitmap_set_bit (&bbs, loop->index); regrename_analyze (&bbs); for (insn = head; insn != NEXT_INSN (tail); insn = NEXT_INSN (insn)) { enum attr_units units; - enum attr_cross cross; int count, side1, side2, req1, req2; unsigned int mask1, mask2; insn_rr_info *info; @@ -5507,7 +5499,7 @@ hwloop_optimize (hwloop_info loop) basic_block entry_bb, bb; rtx seq, insn, prev, entry_after, end_packet; rtx head_insn, tail_insn, new_insns, last_insn; - int loop_earliest, entry_earliest, entry_end_cycle; + int loop_earliest; int n_execute_packets; edge entry_edge; unsigned ix;