From patchwork Sun Sep 17 12:23:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chung-Ju Wu X-Patchwork-Id: 814645 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-462326-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="quDwPRN8"; 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 3xw7bP1bnMz9sDB for ; Sun, 17 Sep 2017 22:23:43 +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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=tiDjxLZaTmCnOR4+qH3WjCt+lu3KbAT2qW1iVsgSrxIYNG6Nu2 OZrfRoCnDudAMFo8LSc0wkxrz3jI6yrAxjGQkWmQeDiBveySyjGVi7h/+aKTxsDw N3XORm+MShuuS5fWA0yVul30zbdnOJXfoLViVdHnNEcGdkTJK/KQowLqc= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=C2lJ6/GbXpXdIWVWQ9ou6y0txPI=; b=quDwPRN86pcT95mKonlx hvZTErSx5+R/CWMHt65t46mueO4rYPH+078+lcS87rSaMUQuRsvdjjpWQVulA6Rh viuwU7U81azhvHzI3guxS34DSS/L0iV6ML0VbG2HYjBtIelm3wOi5Fdt6XjNt+tN X7QTQ9jTqo+LGbmv0Kjsc/M= Received: (qmail 130335 invoked by alias); 17 Sep 2017 12:23:36 -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 130323 invoked by uid 89); 17 Sep 2017 12:23:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.3 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1618 X-HELO: mail-pf0-f179.google.com Received: from mail-pf0-f179.google.com (HELO mail-pf0-f179.google.com) (209.85.192.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 17 Sep 2017 12:23:34 +0000 Received: by mail-pf0-f179.google.com with SMTP id e1so3536744pfk.1 for ; Sun, 17 Sep 2017 05:23:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=mvLeYW6U3KlU6ybSsJG2KJISAAuAfF0eNDTVSt2fsPg=; b=Xt7oO2SrIYp4+6lZ+E74shc9zZxDcJ4tP10qi7RSo4+yaJypnKiqqgIjA3Ic6IfckA APg0qR5eQ1V9ioWHTft0ChTi8/uRzkpN/8SEThonmktk5pTMJTnqDkh2VKe+Ty0i4rQu KfUexy5/bpIvJCwiVm9kAqrYYdAcCRm2uVyTcfYoIKXg5W8LX1/fBcHq5mAwDJd3QTAP Q5kRC5yFCn098s+3YgsOU2AC5YOBEMT8N6kvHX9iqIGetoIlNIZvG+eF6+F4o2fD1rR9 b70qiKwx+nhWrWZxWUAYfwnv9EvxYCYRkpRVThojqer8a6JWotWPpnsFvERM3z/DnpXF WH4A== X-Gm-Message-State: AHPjjUiV3ypBBjM8pTgGzv3G6ymqaRPLR+8AbMTFHnvoOrrDIcPyMfyA Sq3pFB+5E84/Jw== X-Google-Smtp-Source: ADKCNb7oIKlsp2VrSE+HtNjlLbtzz2uyNfYBkoCvHZb4ZtNQR8uNDNn2xuj6v6eA5fqe7BTGUP4FvQ== X-Received: by 10.84.236.75 with SMTP id h11mr32954018pln.450.1505651013012; Sun, 17 Sep 2017 05:23:33 -0700 (PDT) Received: from jasonwucj-macbook.local (220-137-81-147.dynamic-ip.hinet.net. [220.137.81.147]) by smtp.gmail.com with ESMTPSA id i3sm9711368pgs.23.2017.09.17.05.23.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Sep 2017 05:23:31 -0700 (PDT) To: gcc-patches@gcc.gnu.org, shiva0217@gmail.com From: Chung-Ju Wu Subject: [PATCH, nds32] Add OPT_fsched_pressure and OPT_fomit_frame_pointer in optimization table. Message-ID: <435762c3-e13f-5d32-22f2-93819e2b7e06@gmail.com> Date: Sun, 17 Sep 2017 20:23:29 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, all, In the nds32 port, most of time we prefer reducing code size. So we modify the nds32_option_optimization_table[] to apply -fsched-pressure and -fomit-frame-pointer for specific optimization level. Committed as Rev.252876: https://gcc.gnu.org/r252876 gcc/ * common/config/nds32/nds32-common.c (nds32_option_optimization_table): Refine formatting. (nds32_option_optimization_table): Use -fsched-pressure and -fomit-frame-pointer for specific optimization level. Best regards, jasonwucj --- sandbox/src/gcc.svn/gcc/common/config/nds32/nds32-common.c 2017-09-06 00:37:02.684366502 +0800 +++ gcc.710release.orig/gcc/common/config/nds32/nds32-common.c 2017-09-15 22:11:41.441875438 +0800 @@ -74,12 +74,14 @@ /* Implement TARGET_OPTION_OPTIMIZATION_TABLE. */ static const struct default_options nds32_option_optimization_table[] = { - /* Enable -fomit-frame-pointer by default at -O1 or higher. */ - { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, + /* Enable -fsched-pressure by default at -O1 and above. */ + { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 }, + /* Enable -fomit-frame-pointer by default at all optimization levels. */ + { OPT_LEVELS_ALL, OPT_fomit_frame_pointer, NULL, 1 }, /* Enable -mv3push by default at -Os, but it is useless under V2 ISA. */ - { OPT_LEVELS_SIZE, OPT_mv3push, NULL, 1 }, + { OPT_LEVELS_SIZE, OPT_mv3push, NULL, 1 }, - { OPT_LEVELS_NONE, 0, NULL, 0 } + { OPT_LEVELS_NONE, 0, NULL, 0 } }; /* ------------------------------------------------------------------------ */