From patchwork Fri Sep 15 01:24:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 112665 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp67167qgf; Thu, 14 Sep 2017 18:24:53 -0700 (PDT) X-Received: by 10.159.245.146 with SMTP id a18mr25450085pls.26.1505438693582; Thu, 14 Sep 2017 18:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505438693; cv=none; d=google.com; s=arc-20160816; b=mJ4T4Ko9ntPHWwgNslocTGq2Ul7AylMc70WouxpFaa+uCpMrPxWXhd9uQAoX6U+hHM 4E+WebNmcCPJt39r4j6X0nm7D46oDPZnwhQRezKBjfPUUE7CFcht0xmI5X4CMh/Z/8tB Ang8jZx81JkiqwcBn8TU2ggQ+oceiutPZbjm74XZMgJfRdXy4Xcd70ysLX7858509KF0 vuwAeZP9L8d28JWxlpXNuHtyCC+IZEqEgZJPZTPMoPv8MU5aHeIfjn3dxu3GhPTKDJ4G ikQgrREUawZdxQ+x/S4mw2QqAa7YLNd2CmKBLoufabazA00AQk0H8d5FGx/7WH+Y3jDx t+1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding: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=nXEb6SMchVQ2I3Avqw0Z3vWF1Dw4/cTqy6Vgy4PF9gs=; b=JuMigSPYSZu4uX28CCFUR7tYFC/lxtTMu+I6hg5/YqrGOcT50TY6GEhCQRZ9syBHXT yrA/6UZYIJkD7AilhPwpizhp3nV5TYFdP7HMxrrSybFO6iBdSLurz8ppNshcWcWHoMT9 sNzsJe48usDuaw/Ua/GsbC1haIKhQsKLT9YNO2XrPHrJghkhOKyAsRrG2meBiLPh5sM6 f46op2rpY0OFyCZ1avR2SHicUuEttVxFc8V2tl1OhhxkbiNfWO82mGSt6YKRevYl5ZCh 0a7PA4ojpIUN9VpfcdWJWlQykJVhqvuTSArhCeSYhw7Wai4NFzR9jhdtoZ4Q9DRvc4b4 j7HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=FE1+QPGS; spf=pass (google.com: domain of gcc-patches-return-462188-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462188-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 o3si4114305pld.64.2017.09.14.18.24.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 18:24:53 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-462188-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=FE1+QPGS; spf=pass (google.com: domain of gcc-patches-return-462188-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-462188-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 :content-transfer-encoding; q=dns; s=default; b=Ps1hOQveYN+utznd STcsLZodmX12hf+OyATDxXbjFTbBO/q8XIcGdmw24+OoJHmkb4tIfHbQDC5dg5D8 rBy/A1CydlTmjG+j3QPNgto5ziiYUpURUuBz/pOzNnzJourbzS0NrbYifbi3GhDQ Xo3TXtklUWqDRhAnk0Y5+RQX7+k= 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 :content-transfer-encoding; s=default; bh=9bU9vFsBC9+htNomkimbZD wnZFw=; b=FE1+QPGSHRXSE4aYhbJQku8tUqXJDNGSRn6dG29r0COIoDJ7yVv6WJ 1yOX27GRCR8OE1ZUP0SHLCSpw/NtxqHxPcbQxPttyjgr6qY+RD8PZBLv38uGFdhs /D5TDVGgF7wB9Idm6mwXB2e23Mq8si9Nz6JBPLoL1AMyFAhT/agYw= Received: (qmail 100833 invoked by alias); 15 Sep 2017 01:24: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 100823 invoked by uid 89); 15 Sep 2017 01:24:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy= 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; Fri, 15 Sep 2017 01:24:39 +0000 Received: by mail-qt0-f172.google.com with SMTP id 47so975528qts.10 for ; Thu, 14 Sep 2017 18:24:39 -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 :content-transfer-encoding; bh=nUeQaMqf6CSiEU5OOCWAlPCSylhv+t6UOELQSoazEx8=; b=d2SKvm95FS+Yz/C+kwrkL3pdgzrASIvn56lUEBnCNfX3GTlXC+lbyIfwiQ5jHYUfG3 T53AnH+bjWyl+4OQc7XyxAR6x/imwUwCORARZKSX93w94dsYtTRTj1ELfDjQoJ+ZaUIP MXapkUmtv+/Zwt8liB3Z6xQmw4N+NPV4JU6V6IDTZIfXoKJoxkzf4hvMSrQqZ+RYuAOx qCBOKWqNcLaHBD99CqvF1vr60GVaddeWal7KNIfwsFISi96rJaWZAB099x/lqEwkIaTx tVcwCwAwfxxaiN+SYwGsRYx1aaZd0C8/qUMINRZq8C6DedCZV/cl2tR86YP86NSWbiHW sqcg== X-Gm-Message-State: AHPjjUj4L+ga2fYoEVLkI+MDz1PYbA1ZBonzIf2BWWm2lg+j0qTuxiqy 99fGWOpG+sJ2pcRqOl7YTIH1T2LcdMBKQOLybESZEfVYx6Q= X-Google-Smtp-Source: AOwi7QCdRPx1D2tg17Rw0vQuT66Q8Hj2oHwmKL4yXUTxJdy1XzYFS4Y4OTIX9J6JXaAkTZjLpU4b+EdsrVR1Wc03ufw= X-Received: by 10.200.56.124 with SMTP id r57mr35230332qtb.172.1505438677405; Thu, 14 Sep 2017 18:24:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.37.211 with HTTP; Thu, 14 Sep 2017 18:24:36 -0700 (PDT) From: Kugan Vivekanandarajah Date: Fri, 15 Sep 2017 11:24:36 +1000 Message-ID: Subject: [RFC][PATCH 0/5] Loop unrolling and memory load streams To: "gcc-patches@gcc.gnu.org" X-IsSubscribed: yes While loop unrolling helps to keep the pipeline busy in modern processors, it also can increase the memory streams resulting in collisions for the hardware prefetcher that can impact performance. This patch series tries to detect this and limit the loop unrolling. Patch 1 : Add separate parms for rtl unroller: Patch2: Add number of hw prefetchers available to cpu_prefetch_tune so it can be used in loop unrolling decisions: Patch3: Prevent tree unroller from completely unrolling inner loops if that results in excessive strided-loads in outer loop: Patch4: Change iv_analyze_result to take const_rtx. This is just to make the next patch compile. No functional changes: Patch5: add aarch64_loop_unroll_adjust to limit partial unrolling in rtl based on strided-loads in loop: Bootstrapped and tested on aarch64-linux-gnu (with –funroll-all-loops). Testing on x86_64-linux-gnu ongoing. Thanks, Kugan