From patchwork Thu Aug 1 19:47:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 1140718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-506022-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="wZD9uHVN"; dkim-atps=neutral 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 46017D5hYxz9sBF for ; Fri, 2 Aug 2019 05:48:23 +1000 (AEST) 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:subject:mime-version:content-type:message-id; q=dns; s= default; b=mMLm0VTlmnO8yZD3sRvl3jxQnt7f6gsIYrRKKKjY4iLDm6kBbeYlT TXpoTtpxdCQPAn/VPHihDbyGpcpaDutR6IeR0k9PuxI9/AQLL84KV/pIi/d1edDk 2YHBSER/4Vkd1tywhsgeE0DAA5+v02mhbA/2iHtrExMXHHnZ67paNU= 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:subject:mime-version:content-type:message-id; s= default; bh=JCrVoyFWCpbFxJ1mHb65HhJuGNY=; b=wZD9uHVNZDgQcJrFSDUc kvlccSHuKXKGFhH1TAm3GA5oEB63igmwuj9jogM6Wd2xiyzOk3qQQ/TbQwinlxqF UYfyV0uwYm9fVsTONd+je5mniwlBIt8QoIzueldQANno7o9URFOrMmvJzrrXt1Wt Pg9ElrCshKy+LRWYT5tEIEo= Received: (qmail 64396 invoked by alias); 1 Aug 2019 19:48:15 -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 64291 invoked by uid 89); 1 Aug 2019 19:48:06 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=POWER X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 01 Aug 2019 19:48:05 +0000 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x71JlE0J109327 for ; Thu, 1 Aug 2019 15:48:02 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2u45u81mp8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 01 Aug 2019 15:48:02 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 1 Aug 2019 20:48:01 +0100 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 1 Aug 2019 20:48:00 +0100 Received: from b03ledav002.gho.boulder.ibm.com (b03ledav002.gho.boulder.ibm.com [9.17.130.233]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x71Jlxme60555626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Aug 2019 19:47:59 GMT Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0192913604F; Thu, 1 Aug 2019 19:47:59 +0000 (GMT) Received: from b03ledav002.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 82F54136055; Thu, 1 Aug 2019 19:47:58 +0000 (GMT) Received: from ibm-toto.the-meissners.org (unknown [9.32.77.177]) by b03ledav002.gho.boulder.ibm.com (Postfix) with ESMTPS; Thu, 1 Aug 2019 19:47:58 +0000 (GMT) Date: Thu, 1 Aug 2019 15:47:56 -0400 From: Michael Meissner To: gcc-patches@gcc.gnu.org, segher@kernel.crashing.org, dje.gcc@gmail.com, meissner@linux.ibm.com Subject: [PATCH], Add future cost placeholder to PowerPC Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, segher@kernel.crashing.org, dje.gcc@gmail.com MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) x-cbid: 19080119-0016-0000-0000-000009D7522D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011535; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000287; SDB=6.01240677; UDB=6.00654260; IPR=6.01022102; MB=3.00027998; MTD=3.00000008; XFM=3.00000015; UTC=2019-08-01 19:48:01 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19080119-0017-0000-0000-000044421BB4 Message-Id: <20190801194756.GA11962@ibm-toto.the-meissners.org> Add future_cost placeholder. Currently, the -mcpu=future uses the power9 costs. This patch separates out the cost to a separate structure so that in the future we can tweak the costs as needed. I have bootstraped versions of this patch multiple times on a power8 little endian system. Can I check this into the FSF trunk? 2019-08-01 Michael Meissner * config/rs6000/rs6000.c (future_cost): Add separate cost structure for a 'future' machine. (rs6000_option_override_internal): If -mcpu=future, use the future costs instead of power9. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 273954) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -1079,6 +1079,27 @@ struct processor_costs power9_cost = { COSTS_N_INSNS (3), /* SF->DF convert */ }; +/* Instruction costs on FUTURE processors. At present, this is a place holder, + until more accurate information can be provided. */ +static const +struct processor_costs future_cost = { + COSTS_N_INSNS (3), /* mulsi */ + COSTS_N_INSNS (3), /* mulsi_const */ + COSTS_N_INSNS (3), /* mulsi_const9 */ + COSTS_N_INSNS (3), /* muldi */ + COSTS_N_INSNS (8), /* divsi */ + COSTS_N_INSNS (12), /* divdi */ + COSTS_N_INSNS (3), /* fp */ + COSTS_N_INSNS (3), /* dmul */ + COSTS_N_INSNS (13), /* sdiv */ + COSTS_N_INSNS (18), /* ddiv */ + 128, /* cache line size */ + 32, /* l1 cache */ + 512, /* l2 cache */ + 8, /* prefetch streams */ + COSTS_N_INSNS (3), /* SF->DF convert */ +}; + /* Instruction costs on POWER A2 processors. */ static const struct processor_costs ppca2_cost = { @@ -4487,10 +4508,13 @@ rs6000_option_override_internal (bool gl break; case PROCESSOR_POWER9: - case PROCESSOR_FUTURE: rs6000_cost = &power9_cost; break; + case PROCESSOR_FUTURE: + rs6000_cost = &future_cost; + break; + case PROCESSOR_PPCA2: rs6000_cost = &ppca2_cost; break;