[ was: Re: [Committed] Mark *.omp_data_i as non-trapping ]
On 13/07/15 11:49, Tom de Vries wrote:
[ was: Re: [gomp4, committed] Handle nested loops in kernels regions ]
On 13/07/15 10:36, Jakub Jelinek wrote:
On Mon, Jul 13, 2015 at 10:19:56AM +0200, Thomas Schwinge wrote:
We rely on pass_lim to move the *.omp_data_i loads out of the loop
nest.
For the test-case, pass_lim was managing to move the load out of the
inner loop, but not the outer loop, because the load was classified as
'MOVE_PRESERVE_EXECUTION'. By marking the *.omp_data_i load
non-trapping, it's now classified as 'MOVE_POSSIBLE', and moved out of
the loop nest.
This follow-up patch also marks the 'by_ref' mem_ref in
build_receiver_ref as non-trapping.
Bootstrapped and reg-tested on x86_64.
OK for stage3 (because it's needed for the oacc kernels support)?
Thanks,
- Tom
Mark by_ref mem_ref in build_receiver_ref as non-trapping
2015-11-21 Tom de Vries <t...@codesourcery.com>
* omp-low.c (build_receiver_ref): Mark by_ref mem_ref as non-trapping.
---
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;
}