From: Richard Biener <richard.guenther@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Tom de Vries <Tom_deVries@mentor.com>,
Thomas Schwinge <thomas@codesourcery.com>,
"gcc-patches@gnu.org" <gcc-patches@gnu.org>
Subject: Re: [PATCH] Mark by_ref mem_ref in build_receiver_ref as non-trapping
Date: Mon, 23 Nov 2015 10:40:00 -0000 [thread overview]
Message-ID: <CAFiYyc2d55dWMpYAzhro23h_LFRdGHhiDjqBGuCKvqDzeU-A-w@mail.gmail.com> (raw)
In-Reply-To: <20151123084544.GV5675@tucnak.redhat.com>
On Mon, Nov 23, 2015 at 9:45 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Sat, Nov 21, 2015 at 07:34:02PM +0100, Tom de Vries wrote:
>> Mark by_ref mem_ref in build_receiver_ref as non-trapping
>>
>> 2015-11-21 Tom de Vries <tom@codesourcery.com>
>>
>> * omp-low.c (build_receiver_ref): Mark by_ref mem_ref as non-trapping.
>
> This is ok.
Are you sure this is properly re-set by inlining via
/* We cannot propagate the TREE_THIS_NOTRAP flag if we have
remapped a parameter as the property might be valid only
for the parameter itself. */
if (TREE_THIS_NOTRAP (old)
&& (!is_parm (TREE_OPERAND (old, 0))
|| (!id->transform_parameter && is_parm (ptr))))
TREE_THIS_NOTRAP (*tp) = 1;
? Or is this never hoistable to a place where TREE_THIS_NOTRAP is not true
even after inlining? (I presume this is not directly a load via the
static chain pointer?)
>>
>> ---
>> gcc/omp-low.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/gcc/omp-low.c b/gcc/omp-low.c
>> index 830db75..78f2853 100644
>> --- a/gcc/omp-low.c
>> +++ b/gcc/omp-low.c
>> @@ -1249,7 +1249,10 @@ build_receiver_ref (tree var, bool by_ref, omp_context *ctx)
>> TREE_THIS_NOTRAP (x) = 1;
>> x = omp_build_component_ref (x, field);
>> if (by_ref)
>> - x = build_simple_mem_ref (x);
>> + {
>> + x = build_simple_mem_ref (x);
>> + TREE_THIS_NOTRAP (x) = 1;
>> + }
>>
>> return x;
>> }
>
>
> Jakub
next prev parent reply other threads:[~2015-11-23 10:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-12 12:46 [gomp4, committed] Handle nested loops in kernels regions Tom de Vries
2015-07-13 8:20 ` Thomas Schwinge
2015-07-13 8:36 ` Jakub Jelinek
2015-07-13 9:49 ` [Committed] Mark *.omp_data_i as non-trapping Tom de Vries
2015-11-21 18:49 ` [PATCH] Mark by_ref mem_ref in build_receiver_ref " Tom de Vries
2015-11-23 9:10 ` Jakub Jelinek
2015-11-23 10:40 ` Richard Biener [this message]
2015-11-23 11:02 ` Jakub Jelinek
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=CAFiYyc2d55dWMpYAzhro23h_LFRdGHhiDjqBGuCKvqDzeU-A-w@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=Tom_deVries@mentor.com \
--cc=gcc-patches@gnu.org \
--cc=jakub@redhat.com \
--cc=thomas@codesourcery.com \
/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).