Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-14 Thread Aldy Hernandez
On 07/13/2015 06:56 AM, Jakub Jelinek wrote: On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: Everything addressed except this, which I'll address as a follow-up: If you want to spend time on something still in the FE, it would be nice to resolve the C++ iteration var issue

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-14 Thread Jakub Jelinek
On Tue, Jul 14, 2015 at 07:06:52AM -0700, Aldy Hernandez wrote: On 07/13/2015 06:56 AM, Jakub Jelinek wrote: On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: Everything addressed except this, which I'll address as a follow-up: If you want to spend time on something still in

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-13 Thread Jakub Jelinek
On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: It looks like the C++ bits are quite similar to the C ones. AFAICT, only numbers are allowed for the sink offsets, so no C++ iterators, which would likely complicate matters. If they are eventually allowed, we can implement them

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-13 Thread Aldy Hernandez
On 07/13/2015 06:56 AM, Jakub Jelinek wrote: On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: On the C++ FE side, please also try a testcase in g++.dg/gomp/ where the ordered(n) loop with #pragma omp ordered depend({source,sink}) will be in a template, to make sure pt.c does

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-13 Thread Jakub Jelinek
On Mon, Jul 13, 2015 at 10:11:35AM -0700, Aldy Hernandez wrote: On 07/13/2015 06:56 AM, Jakub Jelinek wrote: On Sat, Jul 11, 2015 at 11:35:36AM -0700, Aldy Hernandez wrote: On the C++ FE side, please also try a testcase in g++.dg/gomp/ where the ordered(n) loop with #pragma omp ordered

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-11 Thread Aldy Hernandez
It looks like the C++ bits are quite similar to the C ones. AFAICT, only numbers are allowed for the sink offsets, so no C++ iterators, which would likely complicate matters. If they are eventually allowed, we can implement them as a follow up. The attached patch addresses all your concerns

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-11 Thread Aldy Hernandez
+ c-iter_vars.safe_push(0); + c-iter_vars.pop(); Whoops. Consider this removed. This was left over from some tests I was doing with the vector. Aldy

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-10 Thread Aldy Hernandez
On 07/09/2015 11:53 AM, Jakub Jelinek wrote: Hi! On Thu, Jul 09, 2015 at 11:24:44AM -0700, Aldy Hernandez wrote: Thanks for working on it. + wide_int offset = wi::neg (addend, overflow); + addend = wide_int_to_tree (TREE_TYPE (addend), offset); + if

Re: [gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-09 Thread Jakub Jelinek
Hi! On Thu, Jul 09, 2015 at 11:24:44AM -0700, Aldy Hernandez wrote: Thanks for working on it. + wide_int offset = wi::neg (addend, overflow); + addend = wide_int_to_tree (TREE_TYPE (addend), offset); + if (overflow) + warning_at (c_parser_peek_token

[gomp4.1] depend(sink) and depend(source) parsing for C

2015-07-09 Thread Aldy Hernandez
The following patch goes along with Jakub's parsing of ordered(n) loops. With it, we can now parse his testcase, along with a variety of other tests with appropriate diagnostics. The lowering to gimple is still not done, as we should agree on what needs to be emitted first. I'll follow up