From patchwork Sun Jul 9 18:24:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juvenal Silva X-Patchwork-Id: 107240 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp2532707qge; Sun, 9 Jul 2017 11:24:58 -0700 (PDT) X-Received: by 10.84.232.3 with SMTP id h3mr14141866plk.42.1499624698766; Sun, 09 Jul 2017 11:24:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1499624698; cv=none; d=google.com; s=arc-20160816; b=BqHoW4wwlHE3KFrusTs9anXZo/FW+2xObH1JbFr8wx8mvRTAkR3xjqt1RPEGQkbv0o A+Es70vnnV+DU01lRe1V6pJUkp6iHIy8IxzKI0519EF38jW8DiTCHuO1lfe0VDh/9AdL n3rET2KQt0CWP12GPaYdv4rXdqjdJUuIzLeTORG07B6M6zdLFYm5M/Biw4qCs7W8sXJO QKreCUNV6jEz3U+XN/eGGWq3Mi2WtIKMEdmJd7oLF7kIELm6sI7ss65BwzFncD26Mb1E MzcMfSm7JAfFOM7z0zUQeGtST2LNk5O2DGWvrpKyBEtZ0PCcT8tvEygQB8lUK//Yhivy 1oyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=D/bkcxYGG3uRV+ibKFzEhyzm7vE1nus4DHylnJ+z8yI=; b=LF+DysQucmehWW+g2AadvReiHOGEM2zI4K9bautVpEIZIOHLN7kEmzfpnGsO3CrZ4E mqX/V7iem1Q8Bc5YI2HC81ClHG0GCrvBHkye25PWt801nm7ncS3jRrvkQGRMIz1vrpoq b539jX2sPZZdUtbLUhti+dqkc0kGmXSECe9VCS0zEgy2e8HEFgkVPILyrLLUWhlIrl6k EKw8RZa1x7D7H4fnvIBndmpHlJPRKgfmfyrGkS2xVCjl4WAX8ZEh8YdaTQ2CPLRTeToO AAy818cIQWqOUqZyJ8P6nNPAKttkkYkFpRlY/pbg/8HuIdEboW2DGyXq9bVButdXJG1N A7+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.b=seOty8QL; spf=pass (google.com: domain of libc-alpha-return-81909-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-81909-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id g9si2096292pgc.100.2017.07.09.11.24.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 09 Jul 2017 11:24:58 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-81909-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.b=seOty8QL; spf=pass (google.com: domain of libc-alpha-return-81909-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-81909-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=T/zfJi4SH0AheHTSC7I+xMJvsCHPW/LspGcyV/GTlv7akerbNL9gH GYylZNUi7giyc4LHSmtjukYYLv63Fy7fTrImqUg5OjAfM5h+asb8Jz1YTuRrdpPv 5T4DoN08eHK0t2HUntSzNZL93Psw3FXqIUX536lb51QlI0e2gJ79R4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=Q1RLnWGY53hrUv8OjbHtLXVhbMg=; b=seOty8QLlPOU5tbMALdOhAmg+PAP cvXNzzEsEiB+I+RH49J1OdWF/g183it5Pe1H5rhZDAUgxlrvjYYwQJr3ggpEdFvX T7GnFop5+3px3f7Maw58DfHCAAjPzk+sIrlnNc1t/Ogg/koLn5Q7chd8lFftbsgM ushnFBMkxgtWtv0= Received: (qmail 65456 invoked by alias); 9 Jul 2017 18:24:50 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 65439 invoked by uid 89); 9 Jul 2017 18:24:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:209.85.216.196, Hx-spam-relays-external:209.85.216.196, technique, unfold X-HELO: mail-qt0-f196.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=D/bkcxYGG3uRV+ibKFzEhyzm7vE1nus4DHylnJ+z8yI=; b=VOdZQsF8SEzcYyCyt+cLz62Gq6EfRArWOM24INqWkS11qnnkP2ieeyGTRoJroaniAN 21laCHb5Iz4L/4HTZxDxN1wkR775bYyQRWr6OYX/0nmez8AkHTn89mRszwK5L83r/a16 BGgqZPefdUxUx7A8uQqzEJnzdOzjAInoTkXjHQuvwscei0o2HqwgkzZKFQdPzqM3fVjz kReyhe9ClIyEewhL/tMQr1fZqMq+2UAo+R/VJlcF/fEVe6y0NxOdmnEOoK8jZz8W2+tZ J4D0H4tk7p9ALvd3I7HZnDDhejeelB/Zdblvkre9tRad0LUg7wMqh3JJHSDAQ1KyjJhq yPqA== X-Gm-Message-State: AIVw111ppABNIIdkBMkcBPAWO1Sllcw1RHG6/uajIf62RupD05VVagRk kHBSYgYPe+Y1LILINw0= X-Received: by 10.237.44.225 with SMTP id g88mr195039qtd.150.1499624685884; Sun, 09 Jul 2017 11:24:45 -0700 (PDT) From: "Juvenal A. Silva Jr" To: libc-alpha@sourceware.org Cc: "Juvenal A. Silva Jr" , tuliom@linux.vnet.ibm.com Subject: [PATCH 0/1] Add IFUNC POWER optimization for e_pow and e_exp Date: Sun, 9 Jul 2017 15:24:29 -0300 Message-Id: <20170709182430.91459-1-juvenal.silva.jr@gmail.com> This patch applies an optimization scheme used on other architectures to POWER as a base speedup process. It uses GCC to generate multiple optimized code versions, and the IFUNC technique to select the best one at runtime. I did some crude measures on a POWER8 VM, using GCC 6.3.1 and I was able to achieve an average 15%-20% speedup for those two double functions (exp and pow). I'd like to run better measures, but I only have access to a virtual POWER machine, so if any of you have access to POWER bare metal or even VMs on a more controlled environment, I'd love to hear how good your measurements unfold. I'd be glad to hear your comments and opinions... Juvenal A. Silva Jr (1): Add IFUNC POWER optimization for e_pow and e_exp sysdeps/ieee754/dbl-64/e_pow.c | 2 +- sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile | 18 ++++++++++- .../powerpc/powerpc64/fpu/multiarch/e_exp-power7.c | 28 ++++++++++++++++ .../powerpc/powerpc64/fpu/multiarch/e_exp-power8.c | 28 ++++++++++++++++ .../powerpc/powerpc64/fpu/multiarch/e_exp-power9.c | 28 ++++++++++++++++ .../powerpc/powerpc64/fpu/multiarch/e_exp-ppc64.c | 26 +++++++++++++++ sysdeps/powerpc/powerpc64/fpu/multiarch/e_exp.c | 37 ++++++++++++++++++++++ .../powerpc/powerpc64/fpu/multiarch/e_pow-power7.c | 28 ++++++++++++++++ .../powerpc/powerpc64/fpu/multiarch/e_pow-power8.c | 28 ++++++++++++++++ .../powerpc/powerpc64/fpu/multiarch/e_pow-power9.c | 28 ++++++++++++++++ .../powerpc/powerpc64/fpu/multiarch/e_pow-ppc64.c | 26 +++++++++++++++ sysdeps/powerpc/powerpc64/fpu/multiarch/e_pow.c | 37 ++++++++++++++++++++++ .../powerpc64/fpu/multiarch/slowexp-power7.c | 26 +++++++++++++++ .../powerpc64/fpu/multiarch/slowexp-power8.c | 26 +++++++++++++++ .../powerpc64/fpu/multiarch/slowexp-power9.c | 26 +++++++++++++++ .../powerpc64/fpu/multiarch/slowexp-ppc64.c | 24 ++++++++++++++ .../powerpc64/fpu/multiarch/slowpow-power7.c | 26 +++++++++++++++ .../powerpc64/fpu/multiarch/slowpow-power8.c | 26 +++++++++++++++ .../powerpc64/fpu/multiarch/slowpow-power9.c | 26 +++++++++++++++ .../powerpc64/fpu/multiarch/slowpow-ppc64.c | 24 ++++++++++++++ 20 files changed, 516 insertions(+), 2 deletions(-) create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_exp-power7.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_exp-power8.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_exp-power9.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_exp-ppc64.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_exp.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_pow-power7.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_pow-power8.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_pow-power9.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_pow-ppc64.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/e_pow.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowexp-power7.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowexp-power8.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowexp-power9.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowexp-ppc64.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowpow-power7.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowpow-power8.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowpow-power9.c create mode 100644 sysdeps/powerpc/powerpc64/fpu/multiarch/slowpow-ppc64.c -- 2.13.2