From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20911 invoked by alias); 21 Oct 2014 03:16:51 -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 20898 invoked by uid 89); 21 Oct 2014 03:16:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f53.google.com Received: from mail-pa0-f53.google.com (HELO mail-pa0-f53.google.com) (209.85.220.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 21 Oct 2014 03:16:49 +0000 Received: by mail-pa0-f53.google.com with SMTP id kq14so420752pab.12 for ; Mon, 20 Oct 2014 20:16:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-type:subject:date:message-id:cc:to :mime-version; bh=l8d0iT5Q3Cyu1K+Y0Bdmlg7Wgnz6t9C3CXtNZGR2zP4=; b=GsPjPPAStKQi2S06GgLGB20ckMxZN6e8crbSApRd7Q/Mo1KN9qr+lbgaw9FOpHeRFD QZaf/TTM/hny/YyhUsBygmcBhMufylEhJnB5E1ZyHAwZ+gwsixg49Ys0JpWQHDAnzu5Z VaXAanfoOzI1Gy4TyZLKqFqvNPRobCoV+kZ4RihsZdEruGi6QV+um1hRmN6QGeUBDXE8 I31Nggi7un3U3prfGwO1MEZc16f4zTQHIw+ITblJFVx73buOnvwVIRhI0uDhdk7j6xP8 s0zhjZXYhossr6GAkiX9emAp79WDt0TcrNcnf23NL00gI3OUxt7upQA+9EgQWKW9M/Mz kWtg== X-Gm-Message-State: ALoCoQnmq2MHfIENcCRhrqZ+4jVN1PdHcqexV0bsYrmTmytqzZFAKSOchk7ionysktwV1tTZVxNH X-Received: by 10.70.103.15 with SMTP id fs15mr7733082pdb.129.1413861407453; Mon, 20 Oct 2014 20:16:47 -0700 (PDT) Received: from [192.168.0.122] (121-99-179-86.bng1.nct.orcon.net.nz. [121.99.179.86]) by mx.google.com with ESMTPSA id xf1sm10386473pbb.18.2014.10.20.20.16.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Oct 2014 20:16:46 -0700 (PDT) From: Maxim Kuvyrkov Content-Type: multipart/mixed; boundary="Apple-Mail=_890F5E68-07EB-4EDC-A210-2BF109CADE79" Subject: [PATCH 3/8] Remove cached_first_cycle_multipass_dfa_lookahead and cached_issue_rate Date: Tue, 21 Oct 2014 03:21:00 -0000 Message-Id: Cc: Vladimir Makarov , Jeff Law To: GCC Patches Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) X-SW-Source: 2014-10/txt/msg01998.txt.bz2 --Apple-Mail=_890F5E68-07EB-4EDC-A210-2BF109CADE79 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Content-length: 588 Hi, This patch cleans up (removes) cached_first_cycle_multipass_dfa_lookahead a= nd cached_issue_rate. These seem to be an artifact from the scheduler refactoring 10+ years ago. = They assume that dfa_lookahead and issue_rate can change mid-way through s= cheduling, which is never the case. All backends currently treat dfa_looka= head and issue_rate as constants for the duration of scheduling passes. Bootstrapped on x86_64-linux-gnu. Regression testing is in progress. OK t= o commit if no regressions? [ChangeLog is part of the git patch] -- Maxim Kuvyrkov www.linaro.org --Apple-Mail=_890F5E68-07EB-4EDC-A210-2BF109CADE79 Content-Disposition: attachment; filename=0003-Remove-cached_first_cycle_multipass_dfa_lookahead-an.patch Content-Type: application/octet-stream; name="0003-Remove-cached_first_cycle_multipass_dfa_lookahead-an.patch" Content-Transfer-Encoding: quoted-printable Content-length: 3626 >From 3c26ff02a08d7b107a558b2033787f810ca900c9 Mon Sep 17 00:00:00 2001=0A= From: Maxim Kuvyrkov =0A= Date: Mon, 20 Oct 2014 23:30:12 +0100=0A= Subject: [PATCH 3/8] Remove cached_first_cycle_multipass_dfa_lookahead and= =0A= cached_issue_rate=0A= =0A= * haifa-sched.c (cached_first_cycle_multipass_dfa_lookahead,)=0A= (cached_issue_rate): Remove. Use dfa_lookahead and issue_rate instead.=0A= (max_issue, choose_ready, sched_init): Update.=0A= ---=0A= gcc/haifa-sched.c | 30 +++++-------------------------=0A= 1 file changed, 5 insertions(+), 25 deletions(-)=0A= =0A= diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c=0A= index f8549a0..4f9648c 100644=0A= --- a/gcc/haifa-sched.c=0A= +++ b/gcc/haifa-sched.c=0A= @@ -5471,15 +5471,6 @@ int dfa_lookahead;=0A= could achieve DFA_LOOKAHEAD ** N , where N is the queue length. */=0A= static int max_lookahead_tries;=0A= =20=0A= -/* The following value is value of hook=0A= - `first_cycle_multipass_dfa_lookahead' at the last call of=0A= - `max_issue'. */=0A= -static int cached_first_cycle_multipass_dfa_lookahead =3D 0;=0A= -=0A= -/* The following value is value of `issue_rate' at the last call of=0A= - `sched_init'. */=0A= -static int cached_issue_rate =3D 0;=0A= -=0A= /* The following function returns maximal (or close to maximal) number=0A= of insns which can be issued on the same cycle and one of which=0A= insns is insns with the best rank (the first insn in READY). To=0A= @@ -5508,9 +5499,8 @@ max_issue (struct ready_list *ready, int privileged_n= , state_t state,=0A= && privileged_n <=3D n_ready);=0A= =20=0A= /* Init MAX_LOOKAHEAD_TRIES. */=0A= - if (cached_first_cycle_multipass_dfa_lookahead !=3D dfa_lookahead)=0A= + if (max_lookahead_tries =3D=3D 0)=0A= {=0A= - cached_first_cycle_multipass_dfa_lookahead =3D dfa_lookahead;=0A= max_lookahead_tries =3D 100;=0A= for (i =3D 0; i < issue_rate; i++)=0A= max_lookahead_tries *=3D dfa_lookahead;=0A= @@ -5673,8 +5663,6 @@ static int=0A= choose_ready (struct ready_list *ready, bool first_cycle_insn_p,=0A= rtx_insn **insn_ptr)=0A= {=0A= - int lookahead;=0A= -=0A= if (dbg_cnt (sched_insn) =3D=3D false)=0A= {=0A= if (nonscheduled_insns_begin =3D=3D NULL_RTX)=0A= @@ -5695,11 +5683,7 @@ choose_ready (struct ready_list *ready, bool first_c= ycle_insn_p,=0A= return -1;=0A= }=0A= =20=0A= - lookahead =3D 0;=0A= -=0A= - if (targetm.sched.first_cycle_multipass_dfa_lookahead)=0A= - lookahead =3D targetm.sched.first_cycle_multipass_dfa_lookahead ();=0A= - if (lookahead <=3D 0 || SCHED_GROUP_P (ready_element (ready, 0))=0A= + if (dfa_lookahead <=3D 0 || SCHED_GROUP_P (ready_element (ready, 0))=0A= || DEBUG_INSN_P (ready_element (ready, 0)))=0A= {=0A= if (targetm.sched.dispatch (NULL, IS_DISPATCH_ON))=0A= @@ -6883,18 +6867,14 @@ sched_init (void)=0A= else=0A= issue_rate =3D 1;=0A= =20=0A= - if (cached_issue_rate !=3D issue_rate)=0A= - {=0A= - cached_issue_rate =3D issue_rate;=0A= - /* To invalidate max_lookahead_tries: */=0A= - cached_first_cycle_multipass_dfa_lookahead =3D 0;=0A= - }=0A= -=0A= if (targetm.sched.first_cycle_multipass_dfa_lookahead)=0A= dfa_lookahead =3D targetm.sched.first_cycle_multipass_dfa_lookahead ()= ;=0A= else=0A= dfa_lookahead =3D 0;=0A= =20=0A= + /* Set to "0" so that we recalculate. */=0A= + max_lookahead_tries =3D 0;=0A= +=0A= if (targetm.sched.init_dfa_pre_cycle_insn)=0A= targetm.sched.init_dfa_pre_cycle_insn ();=0A= =20=0A= --=20=0A= 1.7.9.5=0A= =0A= --Apple-Mail=_890F5E68-07EB-4EDC-A210-2BF109CADE79--