This is the mail archive of the 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]

Re: [gomp4] Add tables generation

On 04/17/2014 08:33 PM, Ilya Verbin wrote:
Could you please take a look at this patch?  It fixes the ordering issue in the
tables stated above, and passes all the tests that I have.  But I'm not sure
about its correctness from the architectural point of view.

I'm still skeptical relying on ordering is going to work in the long run, but in the meantime this looks better than what we have at the moment. So I think this should probably go in for now, but first it needs a few small changes:

--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -82,6 +82,8 @@ enum LTO_symtab_tags

+extern vec<tree, va_gc> *offload_funcs, *offload_vars;

Declarations go into header files.

+output_offload_tables (void)

All functions should have a comment.

+  /* Collect all omp-target global variables to offload_vars, if they have not
+     been gathered earlier by input_offload_tables.  */
+  if (vec_safe_is_empty (offload_vars))

What if a variable was entered into the table by something other than input_offload_tables? We'll skip this code entirely, which doesn't seem right. Can we even get here after input_offload_tables has been called, and if so, maybe this step of collecting variables belongs elsewhere?

Also, the previous code did the same for functions, and I can't find anything corresponding to that after the patch. Is this intentional?


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