From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74705 invoked by alias); 26 Apr 2015 07:18:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 74689 invoked by uid 89); 26 Apr 2015 07:18:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 26 Apr 2015 07:18:37 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YmGpk-0004RB-0v from Tom_deVries@mentor.com ; Sun, 26 Apr 2015 00:18:32 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Sun, 26 Apr 2015 08:18:29 +0100 Message-ID: <553C9143.4000200@mentor.com> Date: Sun, 26 Apr 2015 07:18:00 -0000 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Richard Biener , Jan Hubicka CC: GCC Patches Subject: Re: [PATCH][PR65802] Mark ifn_va_arg with ECF_NOTHROW References: <5535F7EF.1000305@mentor.com> <20150421074853.GA9659@atrey.karlin.mff.cuni.cz> In-Reply-To: Content-Type: multipart/mixed; boundary="------------010605030503070604020903" X-SW-Source: 2015-04/txt/msg01555.txt.bz2 --------------010605030503070604020903 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 606 On 21-04-15 09:50, Richard Biener wrote: > On Tue, 21 Apr 2015, Jan Hubicka wrote: > >>> Mark ifn_va_arg with ECF_NOTHROW >> >> You can definitely make it ECF_LEAF too. I wonder if we can make it ECF_CONST or at leat PURE >> this would help to keep variadic functions const/pure that may be moderately interesting >> in practice. > > Yes to ECF_LEAF but it isn't const or pure as it modifies the valist > argument so you can't for example DCE va_arg (...) if the result isn't > needed. > I've committed this patch that marks ifn_va_arg as ECF_LEAF. Bootstrapped and reg-tested on x86_64. Thanks, - Tom --------------010605030503070604020903 Content-Type: text/x-patch; name="0001-Mark-ifn_va_arg-as-ECF_LEAF.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Mark-ifn_va_arg-as-ECF_LEAF.patch" Content-length: 720 Mark ifn_va_arg as ECF_LEAF 2015-04-26 Tom de Vries PR tree-optimization/65826 * internal-fn.def: Mark VA_ARG with ECF_LEAF. diff --git a/gcc/internal-fn.def b/gcc/internal-fn.def index 7e19313..ba5c2c1 100644 --- a/gcc/internal-fn.def +++ b/gcc/internal-fn.def @@ -62,4 +62,4 @@ DEF_INTERNAL_FN (ADD_OVERFLOW, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL) DEF_INTERNAL_FN (SUB_OVERFLOW, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL) DEF_INTERNAL_FN (MUL_OVERFLOW, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL) DEF_INTERNAL_FN (TSAN_FUNC_EXIT, ECF_NOVOPS | ECF_LEAF | ECF_NOTHROW, NULL) -DEF_INTERNAL_FN (VA_ARG, ECF_NOTHROW, NULL) +DEF_INTERNAL_FN (VA_ARG, ECF_NOTHROW | ECF_LEAF, NULL) -- 1.9.1 --------------010605030503070604020903--