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: 814014 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-462190-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="MRPoxaG+"; 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 3xtd8q24Zkz9t2V for ; Fri, 15 Sep 2017 11:28: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 :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=ZbgiFLrkCs/Ly2i5DkwzG0AaQzDKxoFVODymj3f4XHx768 qwHWSJ8Wm0QcuEGtOBUnWS2qdbVDjQsByClgieva4yMZp9CnCXjWls59Lv84Od+B hrWFzJcKXU6O7HdEMB/z4rO46WMfUIU+NqvZWb17/Y7xKRzYGfBgR2Ye4EUEI= 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=MRPoxaG+KdpG62XffBLk oSCy41w4FJfixtYUOh84LqV+smmRmaeF3ITYhXzEp+Co+lWAPBO9BYj7h9QtGrZH UQ2gnm9kTR9gHyUJGTp6gO1LEZsmNc9r9PUHYPUOBaeZcldyPb4UkQ++AbDDa7zj JUJlhGcjeaymozOi0ZEoWSc= 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