From patchwork Fri Sep 15 01:28:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 112667 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp69804qgf; Thu, 14 Sep 2017 18:29:07 -0700 (PDT) X-Received: by 10.84.136.34 with SMTP id 31mr26626097plk.174.1505438947012; Thu, 14 Sep 2017 18:29:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505438947; cv=none; d=google.com; s=arc-20160816; b=FMgIMhIsrtI4rqBEGAgi3L9vqJnnVpqBk5UQkBVdofxngkgLU7WKhBe19Zcfc9mGqx ud1l1lQVt3J9F065YONOoj331mpKI3vYlwGJpMUT/UozssaRamXQ6tMRfN4nfNyRsp7x ZjGG3AliCTmghrTEBJfQ7qPpCJZ2T2algHoPuW7A1gzgBC05ehKQSlYFH4UnijlOmh7n 8BF9uui1sH75UVETqj1lKtjXN95SqNQQ1LkgIoDd/ggE9A50P/jbmeVIC+0jH1ppIEk0 eL3oSdjm52WnSmc5yVJPQKa1qx27PPEOXoubmMdCXJ+24QdhpC8g0foH/bgxfUjG0JhU H09w== 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=1qln/hu8wBXQptxNO2+ANzwwAlSHlHFCAslWUKGftfY=; b=tFQcx+pWGcSTZsKeXlOlz2XYqo4mxXaCQ1VmTRyJcSmzPwHCsOqbclr0LP4GexmSvl VAOejQLc4cEZ95f5YD7XztOAKRLabFrv6qloC9Nfjzbf2kpS6w3j+mB58GR89c6E8fYg 5Aeihr4cK4Ivmahspx08l8/oBKoS2yQo9dKF7p5v5rx3h0hmo195oyRoge9rkBu4pWhG jatwT6X9nW66NGBIydODz+vE+XcPjvBb/S9TwmeHlo9n7phGlvfk/Q7r2nWjvOl9OYuu YyrNFfzl5Mob2j5c2EYxMdZwCq4U9dqBDEwpbNwDwFw5uxzRNSIkbf6JvjAEoTgjdYVK eedw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=TH9lbsVB; spf=pass (google.com: domain of gcc-patches-return-462190-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462190-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 d5si2913277pfg.34.2017.09.14.18.29.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 18:29:07 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-462190-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=TH9lbsVB; spf=pass (google.com: domain of gcc-patches-return-462190-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462190-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=UbEbMsPf9ff1gBjGuZFTjTfSKAmxtUoccdmWk1BS0jrRpT a/6PqdbKz72E1FvVUrdgH97E1yNzPjeLEcVWPj+xLZNvy3vV/HFy3F4xGSeHVUf+ iQc5BT18a+dKbPOL0sXE/77AF8GbUvJfGvlH43uCbGHJin35Nesw8Y0gugHyw= 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=oTOLq5chnGuF+Q3ZK9HnAP9oi9A=; b=TH9lbsVBCbkzhxqfUB3m D1VEikMpGRGRWUCsh7EiGsS9uVCCAk1nZsKuhzzmR/+VdcMxZyV6Ujp/vSXEPz/J 8l4ZB9vcw+8VZtk94vi1LIDIKL6oWVT4Vbu//NOlUBFx3c1XfhAZWWcYBZD0DdMc LrNz3MmQtRwSVv3vCVFGgwA= Received: (qmail 106511 invoked by alias); 15 Sep 2017 01:28:51 -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 106499 invoked by uid 89); 15 Sep 2017 01:28:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=5427 X-HELO: mail-qk0-f177.google.com Received: from mail-qk0-f177.google.com (HELO mail-qk0-f177.google.com) (209.85.220.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Sep 2017 01:28:49 +0000 Received: by mail-qk0-f177.google.com with SMTP id u7so930887qku.13 for ; Thu, 14 Sep 2017 18:28:49 -0700 (PDT) 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=EI8CoFG15kcvi9I332ljBuADU17C5rTcQZMFIC5DFpA=; b=p/V6ouzTMykhvwgBaSUh0ZMfMvYBQxveFJO30i1ihoHBvPEu9yiwXKOeLME0/inDeh a0ph8yaA1PypIZoAJFEc3EFI0EPizukeOs1KmQ4ftTeWZ9NFgWs+tIz5orxlmqE5Kzul CT1bCDrXum36rMMgn9oQYQW9IdUTeT5PBMOgBgi/ZOmH9zosK13Ugc2j9EyHIHiNDxKq g4yWga4tQZd+GZbuhmIfSw/KnoNjwc7cVfTVg7XK/QMeECTQvunpbqrTfpiBXoKc/haD G/bjuqoZJWyhvKaOwHbzkrGV9UJFnDSPepko19+OZfChki7HcUo6nmwpj6IcprjAf9/G aFMw== X-Gm-Message-State: AHPjjUiNVnE9BW7sdoEa6wFTrA7O1dr+WUPTmD3VuJMlycBHuJ7Q4bFQ 2xTfWr9HGHiB9B1yGXcgbwJ9RDagRyiB4QQoCMlZIBvQZQw= X-Google-Smtp-Source: AOwi7QCtmwPlCj9hBfRuoVIr0Fd2TzNtEub4PWsPN+Iodo2lsZHfGnQO5TzxuvfFpveCm2n5wk5OJ2UQwPERs7HWCPs= X-Received: by 10.55.170.216 with SMTP id t207mr5150857qke.232.1505438927988; Thu, 14 Sep 2017 18:28:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.37.211 with HTTP; Thu, 14 Sep 2017 18:28:47 -0700 (PDT) From: Kugan Vivekanandarajah Date: Fri, 15 Sep 2017 11:28:47 +1000 Message-ID: Subject: [RFC][AARCH64][PATCH 2/5]: Add number of hw prefetchers available to cpu_prefetch_tune To: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes This patch adds number of hw prefetchers available to cpu_prefetch_tune so it can be used in loop unrolling decisions. Thanks, Kugan gcc/ChangeLog: 2017-09-12 Kugan Vivekanandarajah * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune): Add new field hw_prefetchers_avail. * config/aarch64/aarch64.c: Add values for hw_prefetchers_avail. >From 07de7988c4c36a8eb262d53c259dc17d20d3b770 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Fri, 25 Aug 2017 10:02:45 +1000 Subject: [PATCH 2/5] Add hw prefetchers to cpu_prefetch_tune --- gcc/config/aarch64/aarch64-protos.h | 1 + gcc/config/aarch64/aarch64.c | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index e397ff4..a182105 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -211,6 +211,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 d753666..7d1ee70 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -533,7 +533,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 = @@ -542,7 +543,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 = @@ -551,7 +553,8 @@ static const cpu_prefetch_tune qdf24xx_prefetch_tune = 32, /* l1_cache_size */ 64, /* l1_cache_line_size */ 1024, /* l2_cache_size */ - 3 /* default_opt_level */ + 3, /* default_opt_level */ + 7 /* hw_prefetchers_avail */ }; static const cpu_prefetch_tune thunderxt88_prefetch_tune = @@ -560,7 +563,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 = @@ -569,7 +573,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 = @@ -578,7 +583,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 = -- 2.7.4