From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102809 invoked by alias); 8 Sep 2015 12:19:37 -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 102794 invoked by uid 89); 8 Sep 2015 12:19:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 08 Sep 2015 12:19:32 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-2-cfD-VZfPT7mP_Vthus6Eaw-1; Tue, 08 Sep 2015 13:19:27 +0100 Received: from e104437-lin ([10.1.2.79]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 8 Sep 2015 13:19:26 +0100 From: Jiong Wang To: gcc-patches List Subject: [PATCH] Fix seq_cost prototype to use signed int Date: Tue, 08 Sep 2015 12:26:00 -0000 Message-ID: MIME-Version: 1.0 X-MC-Unique: cfD-VZfPT7mP_Vthus6Eaw-1 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2015-09/txt/msg00495.txt.bz2 --=-=-= Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-length: 341 All other cost helper functions are using signed int to hold cost while seq_cost is using unsigned int. This fix this. bootstrap OK on x86. OK for trunk? 2015-09-08 Jiong Wang gcc/ * rtl.h (seq_cost): Change return type from "unsigned" to "int". * rtlanal.c (seq_cost): Likewise. =20=20 --=20 Regards, Jiong --=-=-= Content-Type: text/x-diff; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename=seq_cost.patch Content-length: 926 diff --git a/gcc/rtl.h b/gcc/rtl.h index ac56133..ded054c 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -3050,7 +3050,7 @@ extern rtx_insn *find_first_parameter_load (rtx_insn = *, rtx_insn *); extern bool keep_with_call_p (const rtx_insn *); extern bool label_is_jump_target_p (const_rtx, const rtx_insn *); extern int insn_rtx_cost (rtx, bool); -extern unsigned seq_cost (const rtx_insn *, bool); +extern int seq_cost (const rtx_insn *, bool); /* Given an insn and condition, return a canonical description of the test being made. */ diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index ef98f4b..2f14b93 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -5160,10 +5160,10 @@ insn_rtx_cost (rtx pat, bool speed) /* Returns estimate on cost of computing SEQ. */ -unsigned +int seq_cost (const rtx_insn *seq, bool speed) { - unsigned cost =3D 0; + int cost =3D 0; rtx set; for (; seq; seq =3D NEXT_INSN (seq)) --=-=-=--