From patchwork Thu Jun 6 15:15:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Stubbs X-Patchwork-Id: 1111195 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-502495-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com 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 45KTkp0ZhLz9sNf for ; Fri, 7 Jun 2019 01:15:59 +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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=TsE7KAVOE2gUjgbrUm+j0i1TbZ42JJLyU4ZUwpPKxN1Mlhn9JY VuFsdnfqWF8jKj9SumSIkhmcf5d1bnvxVAI4BxXq5IS2oxtWsmPtYgFLReCZ0uiP 40E2cZxzponkjvNmlEgrxc/jd0Z8cMB7LazrsylekFwm+McF0GbRHgAvg= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=y9wW7o4ety2MbQM97s69oy/O12Y=; b=OMQicvPrUg0q6FJSMuCJ mKhWoBwFvx+lzdUzssrxfsDHTefnjA3sBLLxpkJXBTupVxcL42B/WTR8d4+7M896 6llU8oGOTPC9XNYb6T9zPJwmEDNBDTqCA37U1X/6qGB8FUeqvG9kNAmiMX7UX4HI u1mUQXPO0OaDaof8uD/oHIo= Received: (qmail 127093 invoked by alias); 6 Jun 2019 15:15:41 -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 127059 invoked by uid 89); 6 Jun 2019 15:15:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-17.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=H*RU:!127.0.0.1!, HX-Spam-Relays-External:!127.0.0.1!, HX-Languages-Length:2038 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Jun 2019 15:15:38 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1hYu74-0005yp-CB from Andrew_Stubbs@mentor.com for gcc-patches@gcc.gnu.org; Thu, 06 Jun 2019 08:15:34 -0700 Received: from [127.0.0.1] (137.202.0.90) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Thu, 6 Jun 2019 16:15:30 +0100 To: "gcc-patches@gcc.gnu.org" From: Andrew Stubbs Subject: [committed, amdgcn] Add -march=gfx906 for Vega20 Message-ID: <158ce436-124a-f4a6-d46a-b44e09eef400@codesourcery.com> Date: Thu, 6 Jun 2019 16:15:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 This patch adds a new -march=gfx906 option, and a new multilib to go with it. gfx906 is ISA compatible with gfx900 (at least as far as the compiler support goes), but unfortunately the metadata in the object files is not compatible, so we need a whole extra multilib (booo!). Or, at least that's the easiest solution to use for now. Andrew Add -march=gfx906 for AMD GCN. 2019-06-06 Andrew Stubbs gcc/ * config.gcc (amdgcn-*-*): Allow --with-arch=gfx906. * config/gcn/gcn.opt (gpu_type): Add gfx906. * config/gcn/t-gcn-hsa (MULTILIB_OPTIONS): Add gfx906 multilib. (MULTILIB_DIRNAMES): Rename gcn5 to gfx900. Add gfx906. diff --git a/gcc/config.gcc b/gcc/config.gcc index 67c3c2c7a42..6b00c387247 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4127,7 +4127,7 @@ case "${target}" in for which in arch tune; do eval "val=\$with_$which" case ${val} in - "" | carrizo | fiji | gfx900 ) + "" | carrizo | fiji | gfx900 | gfx906 ) # OK ;; *) diff --git a/gcc/config/gcn/gcn.opt b/gcc/config/gcn/gcn.opt index 2fd3996edba..bdc878f35ad 100644 --- a/gcc/config/gcn/gcn.opt +++ b/gcc/config/gcn/gcn.opt @@ -34,6 +34,9 @@ Enum(gpu_type) String(fiji) Value(PROCESSOR_FIJI) EnumValue Enum(gpu_type) String(gfx900) Value(PROCESSOR_VEGA) +EnumValue +Enum(gpu_type) String(gfx906) Value(PROCESSOR_VEGA) + march= Target RejectNegative Joined ToLower Enum(gpu_type) Var(gcn_arch) Init(PROCESSOR_CARRIZO) Specify the name of the target GPU. diff --git a/gcc/config/gcn/t-gcn-hsa b/gcc/config/gcn/t-gcn-hsa index 085ba429c9d..1600a586ac4 100644 --- a/gcc/config/gcn/t-gcn-hsa +++ b/gcc/config/gcn/t-gcn-hsa @@ -42,8 +42,8 @@ ALL_HOST_OBJS += gcn-run.o gcn-run$(exeext): gcn-run.o +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $< -ldl -MULTILIB_OPTIONS = march=gfx900 -MULTILIB_DIRNAMES = gcn5 +MULTILIB_OPTIONS = march=gfx900 march=gfx906 +MULTILIB_DIRNAMES = gfx900 gfx906 PASSES_EXTRA += $(srcdir)/config/gcn/gcn-passes.def gcn-tree.o: $(srcdir)/config/gcn/gcn-tree.c