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] |
> -----Original Message----- > From: Jakub Jelinek [mailto:jakub@redhat.com] > Sent: Tuesday, January 7, 2014 4:29 PM > To: Iyer, Balaji V > Cc: Jason Merrill; 'Jeff Law'; 'Aldy Hernandez'; 'gcc-patches@gcc.gnu.org'; > 'rth@redhat.com' > Subject: Re: [PATCH] _Cilk_for for C and C++ > > On Tue, Jan 07, 2014 at 09:24:21PM +0000, Iyer, Balaji V wrote: > > > -----Original Message----- > > > From: Jason Merrill [mailto:jason@redhat.com] > > > Sent: Tuesday, January 7, 2014 3:41 PM > > > To: Iyer, Balaji V; 'Jeff Law'; 'Aldy Hernandez' > > > Cc: 'gcc-patches@gcc.gnu.org'; 'rth@redhat.com'; 'Jakub Jelinek' > > > Subject: Re: [PATCH] _Cilk_for for C and C++ > > > > > > On 12/17/2013 07:21 PM, Iyer, Balaji V wrote: > > > > The reason why I store it in OMP_FOR_CLAUSE is because OMP clauses > > > cannot occur in _Cilk_for. So adding a new clause seem to be an > > > overkill IMHO. I need a place to store the grain value and so I chose this > spot. > > > > > > But code expects OMP_FOR_CLAUSES to have a certain form, and you > are > > > violating that so that now code needs to check whether we're dealing > > > with a for loop in order to know to parse OMP_FOR_CLAUSES. Doing it > > > your way requires lots of little special cases. Please represent it as a > clause. > > > > Hi Jason, > > In gimplify_omp_for, I remove the information in > OMP_FOR_CLAUSES () > > and then replace it with a NULL_TREE. Till that point, nothing > > steps on it (except in pt.c and that I am handling it). Then the > > grain value is stored in gimple tree for omp_for. > > So, you are abusing OMP_FOR_CLAUSES for shorter time, still, I agree with > Jason that you shouldn't do that. > > If you don't want to add a new clause, just use a similar existing one, if grain > is something like scheduling chunk size, just with a different name for it, then > using OMP_CLAUSE_SCHEDULE with OMP_CLAUSE_SCHEDULE_EXPR being > the grain expression would be certainly cleaner. > But even adding a new artificial clause isn't that hard. > Hi Jason and Jakub, I used a similar existing one (safelen). Attached, please find 2 fixed patches for C and C++ along with their changelogs. Is this OK for trunk? Thanks, Balaji V. Iyer. > Jakub
Attachment:
diff_c++.txt
Description: diff_c++.txt
Attachment:
c-ChangeLog
Description: c-ChangeLog
Attachment:
cp-ChangeLog
Description: cp-ChangeLog
Attachment:
diff_c.txt
Description: diff_c.txt
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |