From patchwork Fri Sep 6 17:22:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Stubbs, Andrew" X-Patchwork-Id: 1159152 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-508529-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mentor.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="rquAf4LC"; 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 46Q4BG4XpCz9s3Z for ; Sat, 7 Sep 2019 03:22:28 +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=au3T9erW3iTnkUNWX8iEIClD+mUnUw1YYl9U0fqcHeuDLZOh7d rAtXmoBVOM/vjn7ucU35VPQnwqVcnm2/3mXabgqaFBtV7JNvByGZoMpkUf01h3aE 2navZGvWrK0z3Kk5asVrzM8yd/dFFRqmouvoqKUQnLT49faszwJGCuGCY= 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=dHjUioc76qvFpbCmFEbRRinzyDI=; b=rquAf4LCsbAFC8EiIpl0 E9fFaryqcJJEamVmy2WbGW9SUSw1NMPiIjqCd3aT37XrBTSmyviTarONNK7cKd3V mL4u3Fk+u1J3mM95maoHFze69Jc+ZROfwuJvvE2pzodMbhCbBp0xDg29e3ycdqNO hTWy6jVFZOtSeUMgGavXWEI= Received: (qmail 488 invoked by alias); 6 Sep 2019 17:22:20 -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 480 invoked by uid 89); 6 Sep 2019 17:22:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=UD:gcn-tree.c, gcn-tree.c, gcntreec X-HELO: esa3.mentor.iphmx.com Received: from esa3.mentor.iphmx.com (HELO esa3.mentor.iphmx.com) (68.232.137.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Sep 2019 17:22:18 +0000 IronPort-SDR: lEXFdCB2Btvwrui8mxT/jPjOlxgjltG9+jgCU7R2N3u4Z8+lU8zl661KOKL3eVFGhUyVOpgCJa umnCjD3aHpWlCRMs2vARwjvWuvUVvfSJA2F/kXtwj4at2e/TLAJCoagfILITGOlhD0KG5Vlf3M nCs/fhhQy8jKbxtnPp3ny+wSkwl6JwPanp+zvoipmGR3DStC4hhaQshgJ7KD4XdV2bZF+FX+m1 sf+wOkvy4zaN9/mHYjm8jHzTyDB+DoAPUD2LnHcMhutt3ujqdtbhOyYRwszYR0G6JJ3w3f+qCi Y/Y= Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 06 Sep 2019 09:22:17 -0800 IronPort-SDR: WI5gerLtMMTHaBt1UqDhUvlbHm1F7Lrb2xScstFhjov+BV1AI7KI5YwuC4Mc9YZSZLomyo0brx SDrC0N+EBiWwd8BC3cauFgjXlQxP0sgypBeHaWEQQjBeDXBWpa3Ne7zHRaaYDXjW5tsJtzraE8 MnRuUeLovi2aUP/xu5JasCZjmOHyRz9JhYiJXokfwb36DkxMU4+l0YwHRAEVicCRN0inwVzBUA 70STjZCmkIf84Z/mpYOFaNSxW1h+GRv7c/7RO1q3dOy2/nHJBBZna2eW5Dk6Oh9ltnkM3+a1ng I1g= To: "gcc-patches@gcc.gnu.org" From: Andrew Stubbs Subject: [OG9, committed] Backport gfx906 patches Message-ID: Date: Fri, 6 Sep 2019 18:22:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 I've just backported these from mainline. They add the Vega 20 gfx906 architecture and multilib. 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