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] |
Hi Jakub, Did you get a chance to look at this patch? Is it Ok to install? Thanks, Balaji V. Iyer. > -----Original Message----- > From: Iyer, Balaji V > Sent: Tuesday, November 19, 2013 5:09 PM > To: Jakub Jelinek > Cc: Joseph S. Myers; gcc-patches@gcc.gnu.org; Aldy Hernandez > (aldyh@redhat.com); Jeff Law > Subject: RE: [GOMP4] [PATCH] SIMD-Enabled Functions (formerly Elemental > functions) for C > > > > > -----Original Message----- > > From: Jakub Jelinek [mailto:jakub@redhat.com] > > Sent: Tuesday, November 19, 2013 12:00 PM > > To: Iyer, Balaji V > > Cc: Joseph S. Myers; gcc-patches@gcc.gnu.org; Aldy Hernandez > > (aldyh@redhat.com); Jeff Law > > Subject: Re: [GOMP4] [PATCH] SIMD-Enabled Functions (formerly > > Elemental > > functions) for C > > > > On Tue, Nov 19, 2013 at 04:54:29PM +0000, Iyer, Balaji V wrote: > > > I just need a clarification, so I am sorry if I am making you repeat: > > > > > > Right now, the array of tokens (vec<c_token> elem_fn_tokens) is > > > passed in as a parameter and then passed back to the > > > c_parser_declaration_or_fndef function. > > > > > > Instead of that, you would like this information to be stored in > > > parser->specs (using the c_parser_declspecs function) and then have > > > parser->my own > > > > No, somewhere in *parser, it can be a new field with vector of the > > vec<c_token, va_gc> vectors or similar and store something that can be > > used to find that out into vector attribute argument. Then at the > > spot where the #pragma omp declare simd tokens are parsed right now > > (when arguments are finally available) you could look up the vector > > attribute and parse the corresponding tokens. > > Hi Jakub, > Thanks for all your help and advice on this. I have made the changes as you > suggested. I added a new field to parser to hold the tokens for elemental > functions. Also removed the call for c_parser_attributes that I added in > c_parser_declaration_or_fndef and then let c_parser_declspec handle the > token collection. Also, I added a check for usage of #pragma omp declare > simd and __attribute__((vector...)) and flag them as error, also added a test > to catch this. > > Also, fixed the spelling mistake in a comment and the mis-comment I made > about OpenMP requiring two CPP_EOF. Is this Patch OK to install? > > Here is the Fixed ChangeLog entry: > gcc/c/ChangeLog > 2013-11-19 Balaji V. Iyer <balaji.v.iyer@intel.com> > > * c-parser.c (struct c_parser::elem_fn_tokens): Added new field. > (c_parser_declaration_or_fndef): Added a check if elem_fn_tokens > field in parser is not empty. If not-empty, call the function > c_parser_finish_omp_declare_simd. > (c_parser_elem_fn_vectorlength): New function. > (c_parser_elem_fn_expr_list): Likewise. > (c_finish_elem_fn_tokens): Likewise. > (c_parser_attributes): Added a elem_fn_tokens parameter. Added a > check for vector attribute and if so call c_parser_elem_fn_expr_list. > Also, called c_finish_elem_fn_tokens when Cilk Plus is enabled. > (c_finish_omp_declare_simd): Added a check if elem_fn_tokens in > parser field is non-empty. If so, parse them as you would parse > the omp declare simd pragma. > > gcc/testsuite/ChangeLog > 2013-11-19 Balaji V. Iyer <balaji.v.iyer@intel.com> > > * c-c++-common/cilk-plus/EF/ef_test.c: New test. > * c-c++-common/cilk-plus/EF/ef_test2.c: Likewise. > * c-c++-common/cilk-plus/EF/vlength_errors.c: Likewise. > * c-c++-common/cilk-plus/EF/ef_error.c: Likewise. > * gcc.dg/cilk-plus/cilk-plus.exp: Added calls for the above tests. > > Thanks, > > Balaji V. Iyer. > > > > > Jakub
Attachment:
diff.txt
Description: diff.txt
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |