public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom de Vries <Tom_deVries@mentor.com>
To: Richard Biener <rguenther@suse.de>, Jan Hubicka <hubicka@ucw.cz>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH][PR65802] Mark ifn_va_arg with ECF_NOTHROW
Date: Sun, 26 Apr 2015 07:18:00 -0000	[thread overview]
Message-ID: <553C9143.4000200@mentor.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1504210949350.20496@zhemvz.fhfr.qr>

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

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


[-- Attachment #2: 0001-Mark-ifn_va_arg-as-ECF_LEAF.patch --]
[-- Type: text/x-patch, Size: 720 bytes --]

Mark ifn_va_arg as ECF_LEAF

2015-04-26  Tom de Vries  <tom@codesourcery.com>

	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


  reply	other threads:[~2015-04-26  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  7:10 Tom de Vries
2015-04-21  7:28 ` Richard Biener
2015-04-21  7:48 ` Jan Hubicka
2015-04-21  7:50   ` Richard Biener
2015-04-26  7:18     ` Tom de Vries [this message]
2015-04-24  3:25 ` Bin.Cheng
2015-04-24 14:27   ` Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=553C9143.4000200@mentor.com \
    --to=tom_devries@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).