From patchwork Mon Feb 12 23:56:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 128178 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3701339ljc; Mon, 12 Feb 2018 15:57:47 -0800 (PST) X-Google-Smtp-Source: AH8x227cIfbvEmjKqtDx35GFpMF/pX5qruj63aMk9u87qkMHnQvLs2E9j9zR3WVUINDdTcebi6aq X-Received: by 2002:a17:902:781:: with SMTP id 1-v6mr11972324plj.411.1518479867248; Mon, 12 Feb 2018 15:57:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518479867; cv=none; d=google.com; s=arc-20160816; b=dHZZmgiHMjwtETHrPMOCgHqFTjdTQqeU/yFX9Zt3WQ/rM2fe4rOJ/7c46S7gD3s3R2 C8TxY6sH1MMIaK6hIsnOCIe/O4i9JSwEL538sQW5v9H12yThgaWbhJNpp6NUsoiffIp2 YghLeC5IMNzbtkEVJGHZUP55UiRy04Oe1BIILg6QG6e4wWgcBX0vxgm9fNRPk7qTsdYh Eszj1nF9Yi4nj0VMmDpWfMkwkxjiHmusfe5+MUAkEjBRUrnWaxtSkwb2SKBonx4LYgld rPvpiFDhOIAZ407so+XSHoFvnrXWq3XcucpBqj8J9MDS4w2k9wg6ar7gyjRuKPKzX2Os XOoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:delivered-to:sender :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=mL12N8jkHHT2nQuGPX6nQavywVBlKbtUUJaIPaS85WI=; b=v4ORa+jq7RrFA25O0wINs/xjmf3pSqgSNNiZTvl6FABZ7CE8RD+ZzNrUWYhJq8p8DX mQaFjKyF2r95MmXqhPw37+tW8hLS6VOPiqbZIHVEk8m2Mvl9F0UoGLTH/nJjO7ck3N56 OuJFlWrLC5kXQPVqT2AvKV0SJFpV6ti0XB+IJSUBIKy9ZKJbgcs5jRj67ODzJvAZ+WWW qdZU4isMPdrhaj1klhstf7qrn9ATQQLb/jO3rLMIFjaupCnwQ0VWl9k0nkrO0NWC5J+z LDGpLX7/Gqns8ccB4XggyIAXfUKIbKj58WQsiXBJkXBNjG8XM8BsP5reiSuA3Ys9GMGg oB6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yk0RoSAv; spf=pass (google.com: domain of gcc-patches-return-473127-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-473127-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 4-v6si385327plc.92.2018.02.12.15.57.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Feb 2018 15:57:47 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-473127-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=yk0RoSAv; spf=pass (google.com: domain of gcc-patches-return-473127-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-473127-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=UxVhOduTOewLeGeUiTe4kif4o5z/FYRGkJKKfreaVB/CXd glLVlNsZLs0ijMvYDKY6th5wJGcgM52IxvNNPQyVJBqzj0GMhpNUZRvDSU5YYPxJ ibEECZhbRDV0+fGNclcsiMu745bMgxi6tNK1qpWxJ1ivaFT2QDZNa0073C248= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=f8N7UDy58yDX9lqOGmEuqNPyUNs=; b=yk0RoSAvADK4Vwlg80wf qRmqxNwZvWq/WQNanfhoHuTiymBUgLXIFGOLRzYvmj6zVhbY2lOur9wktaGH6ncp rwcPbhzL+dVmNJxshVG6JD9URqRGRc0LG63CcLej8aP+/+fqoYvCgVTbrFj0nYeN M8vV1cOcXAUsXw/o+pIqDVQ= Received: (qmail 19445 invoked by alias); 12 Feb 2018 23:57:35 -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 19434 invoked by uid 89); 12 Feb 2018 23:57:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=5578 X-HELO: mail-qt0-f172.google.com Received: from mail-qt0-f172.google.com (HELO mail-qt0-f172.google.com) (209.85.216.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 12 Feb 2018 23:57:33 +0000 Received: by mail-qt0-f172.google.com with SMTP id d14so1722377qtg.1 for ; Mon, 12 Feb 2018 15:57:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=P19l+PGwPqAdPk4hCIidQDPpBk1R43Dr9YxJjvcsRMk=; b=m9lrNjEmr17tdbwgCHK6u0RRd9FM204TK2vy2vshlCJhR/WWBHf++yAWCAaIWcXLEv OpAlcJVjyl6JkNcdgqWbAXJvceTTZSD6TBPX7inDAvI/LSS1JTdq74ar/tZcVdL31uNo OrdYyfJG7xBFvEXldFWfEsSvnfMuWY4Bl2qodpxcHgHvTzOboliooEwqasf44nCM/gky zPNtAXEnZUHC2+6IYU27AAYMWlXriBankfkL3JM2Em7BcAUI4sacsxIMVvlUVEQwEeAX 4ooiGpid/3m6rRu7EWbbqdeH0AkLTUjpxvuJZ5o7XYc+J82uZr6eIIeVCyB7/ffRwafW utqw== X-Gm-Message-State: APf1xPD1oqASKFFJdSM8C0hrCzwmORxhpPsStW6WGMhPcrn9P4Bjc254 vXQySH6HgrKleA9ks93oiuG5yWchnGM3hyTFf3FIfm98gLo= X-Received: by 10.200.50.75 with SMTP id y11mr10130833qta.153.1518479851659; Mon, 12 Feb 2018 15:57:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.200.36.185 with HTTP; Mon, 12 Feb 2018 15:56:51 -0800 (PST) From: Kugan Vivekanandarajah Date: Tue, 13 Feb 2018 10:56:51 +1100 Message-ID: Subject: [RFC][AARCH64] Implements target hook To: GCC Patches X-IsSubscribed: yes Implements target hook TARGET_HW_MAX_MEM_READ_STREAMS for aarch64 gcc/ChangeLog: 2018-02-12 Kugan Vivekanandarajah * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune): Add new entry hw_prefetchers_avail. * config/aarch64/aarch64.c (aarch64_hw_max_mem_read_streams): Implement new target hook. (TARGET_HW_MAX_MEM_READ_STREAMS): Likewise. >From 3529cf5b85d7282b1829d53652f03d0945359ad6 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Mon, 12 Feb 2018 10:44:26 +1100 Subject: [PATCH 3/4] add-prefetchers-availabl Change-Id: I68af62d7be56255574a9c3f636b2d338f918b4e1 --- gcc/config/aarch64/aarch64-protos.h | 1 + gcc/config/aarch64/aarch64.c | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 2d705d2..2e3b2a1 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -231,6 +231,7 @@ struct cpu_prefetch_tune const int l1_cache_line_size; const int l2_cache_size; const int default_opt_level; + const int hw_prefetchers_avail; }; struct tune_params diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 2e70f3a..1ce2a0c 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -547,7 +547,8 @@ static const cpu_prefetch_tune generic_prefetch_tune = -1, /* l1_cache_size */ -1, /* l1_cache_line_size */ -1, /* l2_cache_size */ - -1 /* default_opt_level */ + -1, /* default_opt_level */ + -1 /* default hw_prefetchers_avail */ }; static const cpu_prefetch_tune exynosm1_prefetch_tune = @@ -556,7 +557,8 @@ static const cpu_prefetch_tune exynosm1_prefetch_tune = -1, /* l1_cache_size */ 64, /* l1_cache_line_size */ -1, /* l2_cache_size */ - -1 /* default_opt_level */ + -1, /* default_opt_level */ + -1 /* default hw_prefetchers_avail */ }; static const cpu_prefetch_tune qdf24xx_prefetch_tune = @@ -565,7 +567,8 @@ static const cpu_prefetch_tune qdf24xx_prefetch_tune = 32, /* l1_cache_size */ 64, /* l1_cache_line_size */ 1024, /* l2_cache_size */ - -1 /* default_opt_level */ + -1, /* default_opt_level */ + 7 /* hw_prefetchers_avail */ }; static const cpu_prefetch_tune thunderxt88_prefetch_tune = @@ -574,7 +577,8 @@ static const cpu_prefetch_tune thunderxt88_prefetch_tune = 32, /* l1_cache_size */ 128, /* l1_cache_line_size */ 16*1024, /* l2_cache_size */ - 3 /* default_opt_level */ + 3, /* default_opt_level */ + -1 /* default hw_prefetchers_avail */ }; static const cpu_prefetch_tune thunderx_prefetch_tune = @@ -583,7 +587,8 @@ static const cpu_prefetch_tune thunderx_prefetch_tune = 32, /* l1_cache_size */ 128, /* l1_cache_line_size */ -1, /* l2_cache_size */ - -1 /* default_opt_level */ + -1, /* default_opt_level */ + -1 /* default hw_prefetchers_avail */ }; static const cpu_prefetch_tune thunderx2t99_prefetch_tune = @@ -592,7 +597,8 @@ static const cpu_prefetch_tune thunderx2t99_prefetch_tune = 32, /* l1_cache_size */ 64, /* l1_cache_line_size */ 256, /* l2_cache_size */ - -1 /* default_opt_level */ + -1, /* default_opt_level */ + -1 /* default hw_prefetchers_avail */ }; static const struct tune_params generic_tunings = @@ -17143,6 +17149,11 @@ aarch64_sched_can_speculate_insn (rtx_insn *insn) return true; } } +static int +aarch64_hw_max_mem_read_streams () +{ + return aarch64_tune_params.prefetch->hw_prefetchers_avail; +} /* Implement TARGET_COMPUTE_PRESSURE_CLASSES. */ @@ -17661,6 +17672,9 @@ aarch64_libgcc_floating_mode_supported_p #undef TARGET_SELECT_EARLY_REMAT_MODES #define TARGET_SELECT_EARLY_REMAT_MODES aarch64_select_early_remat_modes +#undef TARGET_HW_MAX_MEM_READ_STREAMS +#define TARGET_HW_MAX_MEM_READ_STREAMS aarch64_hw_max_mem_read_streams + #if CHECKING_P #undef TARGET_RUN_TARGET_SELFTESTS #define TARGET_RUN_TARGET_SELFTESTS selftest::aarch64_run_selftests -- 2.7.4