This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gomp4, committed] Remove shadowing declaration in oacc_entry_exit_ok_1


[ was: Re: [committed, gomp4, 2/3] Handle sequential code in kernels region ]

On 12/10/15 19:26, Tom de Vries wrote:
On 12/10/15 19:12, Tom de Vries wrote:
Hi,

I've committed the following patch series.

      1    Add get_bbs_in_oacc_kernels_region
      2    Handle sequential code in kernels region
      3    Handle sequential code in kernels region - Testcases

The patch series adds detection of whether sequential code (that is,
code in the oacc kernels region before and after the loop that is to be
parallelized), is safe to execute in parallel.

Bootstrapped and reg-tested on x86_64.

I'll post the patches individually, in reply to this email.

This patch checks in parloops, for each non-loop stmt in the oacc
kernels region, that it's not a load aliasing with a store anywhere in
the region, and vice versa.

An exception are loads and stores for reductions, which are later-on
transformed into an atomic update.


I ran into an ICE in oacc kernels testcases when doing a non-bootstrap build and test. The ICE was caused by an uninitialized variable, which was uninitialized because the intended initialization was absorbed by a shadowing variable declaration.

This patch removes the shadowing declaration.

Committed to gomp-4_0-branch.

Thanks,
- Tom
Remove shadowing declaration in oacc_entry_exit_ok_1

2015-11-03  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c (oacc_entry_exit_ok_1): Remove shadowing declaration
	of ref.
---
 gcc/tree-parloops.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index a144f2d..f14cf8a 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2976,7 +2976,6 @@ oacc_entry_exit_ok_1 (bitmap in_loop_bbs, vec<basic_block> region_bbs,
 	    }
 	  else if (gimple_store_p (stmt))
 	    {
-	      ao_ref ref;
 	      ao_ref_init (&ref, gimple_assign_lhs (stmt));
 	      ref_is_store = true;
 	    }
-- 
1.9.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]