From patchwork Tue Feb 24 18:16:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Monakov X-Patchwork-Id: 443102 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3B540140146 for ; Wed, 25 Feb 2015 05:25:15 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; q=dns; s=default; b=sKVyW1TmIALnwXeV SMHX/ruHgYMFwyFKC1++2HZvbemtI0MWUL6pi8hgiNGS8tkZt1vc/qqzSOxCXgQQ V5ttkkfVm1146zpShXmpDVQo0c7p44HvpWa36DUdd5UFNbpeXxUBQ4dpScN9wOCl E2eZlR/DmGR1udLS8Fszfw3BJLU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:in-reply-to:message-id:references :mime-version:content-type; s=default; bh=dpPK8OoUXFKVPnwIadVmPc XiecQ=; b=Po4ruM0HIDT1rjaALQmgtydwrXEiSZvleVCb0HUgu98eifSlwpqA7M gtYM+HtxAkDVJBcy8WOrIe8YFL3iTR7qCpWdZZvNipKxBiqtEPlVGnFK28wQUDdQ RznDoSPaKW/nkzOFAPZaJGEpBuNbZhggnWtpkCGlUJQOhqBUWjlT8= Received: (qmail 57427 invoked by alias); 24 Feb 2015 18:18:49 -0000 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 Received: (qmail 54989 invoked by uid 89); 24 Feb 2015 18:18:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_20 autolearn=ham version=3.3.2 X-HELO: smtp.ispras.ru Received: from Unknown (HELO smtp.ispras.ru) (83.149.199.79) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Feb 2015 18:17:17 +0000 Received: from [10.10.3.121] (unknown [83.149.199.91]) by smtp.ispras.ru (Postfix) with ESMTP id 0C619214EA; Tue, 24 Feb 2015 21:16:27 +0300 (MSK) Date: Tue, 24 Feb 2015 21:16:26 +0300 (MSK) From: Alexander Monakov To: Yuri Rumyantsev cc: gcc-patches , Uros Bizjak , Igor Zamyatin , Andrey Belevantsev Subject: Re: [PATCH PR65161] In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LNX 23 2013-08-11) MIME-Version: 1.0 On Tue, 24 Feb 2015, Yuri Rumyantsev wrote: > Hi All! > > Here is a simple patch to not perform instruction reordering for > selective scheduling since it uses interface of list scheduling > defined in "sched-int.h". As I see, the exact problem is that swap_top_of_ready_list accesses HID, so please use the more specialized patch below instead. Thanks. Alexander diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7f5796a..6eccd54 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -26615,6 +26615,12 @@ swap_top_of_ready_list (rtx_insn **ready, int n_ready) dep_t dep; int clock1 = -1; int clock2 = -1; + + /* The following heuristic inspects h_i_d, but it is not extended for insns + created when doing selective scheduling. */ + if (sel_sched_p()) + return false; + #define INSN_TICK(INSN) (HID (INSN)->tick) if (!TARGET_SILVERMONT && !TARGET_INTEL)