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] small oacc cleanup


A  small patch committed to gomp4.

1) extract_oacc_routine_gwv does more work than necessary, we just nee to check if there are oacc function attributes.

2) We still want to run the oacc_device_lower pass, even if errors were detected.
  (a) we still need to process the loop  markers etc
(b) I'm going to shortly be emitting diagnostics from the device compiler, and we don't want to only deliver ones from the first offloaded function.

nathan
2015-10-16  Nathan Sidwell  <nathan@codesourcery.com>

	* omp-low.c (build_outer_var_ref): Just check for openacc function
	attrib.
	(pass_oacc_device_lower::execute): Don't inhibit if errors have
	happened.

Index: gcc/omp-low.c
===================================================================
--- gcc/omp-low.c	(revision 228858)
+++ gcc/omp-low.c	(working copy)
@@ -1283,7 +1283,7 @@ build_outer_var_ref (tree var, omp_conte
 	x = lookup_decl (var, ctx->outer);
     }
   else if (is_reference (var)
-	   || extract_oacc_routine_gwv (current_function_decl) != 0)
+	   || get_oacc_fn_attrib (current_function_decl))
     /* This can happen with orphaned constructs.  If var is reference, it is
        possible it is shared and as such valid.  */
     x = var;
@@ -16533,7 +16533,7 @@ public:
   /* opt_pass methods: */
   virtual unsigned int execute (function *)
     {
-      bool gate = (flag_openacc != 0 && !seen_error ());
+      bool gate = (flag_openacc != 0);
 
       if (!gate)
 	return 0;

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