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]

Re: [gomp] Use __sync_* builtins for reduction


On Tue, Oct 11, 2005 at 03:09:22PM -0400, Jakub Jelinek wrote:
> Or omp-low.c could just special case a single reduction clause
> and use GOMP_critical_* for 2+ reduction clauses.  Then gimplify.c
> would need no changes, omp-low.c would just gimplify OMP_ATOMIC.
> What do you think?

That would be ok too.

> Also, perhaps it would be better to use GOMP_atomic_* rather
> than GOMP_critical_*

Also fine.

> and let GOMP_atomic_start spin a few dozen/hundred
> times before sleeping, as generally GOMP_atomic_* should surround
> very short critical sections.

Maybe.  We'd need to add a new lock routine to mutex.h, since
we have no visibility into the pthread mutex implementation.
Also, we'd want to add something to the linux implementation
like the cpu_relax kernel macro.


r~


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