This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][CilkPlus] Merge libcilkrts from upstream
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>, Christophe Lyon <christophe dot lyon at linaro dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 11 May 2016 18:59:14 +0300
- Subject: Re: [PATCH][CilkPlus] Merge libcilkrts from upstream
- Authentication-results: sourceware.org; auth=none
- References: <6a243979-c9c9-ba5d-d41b-e0c57917e82d at redhat dot com> <CAKdteOZNVbWxkw=VcBbgDPznP06saHFth_mNpSWhMKQ6oLv1cQ at mail dot gmail dot com> <d67a7f33-9eff-65e7-9404-922f9f46cedd at redhat dot com> <CAKdteOankELyBJkxNOWSxG3NLFyRwHgreb6ba9As4o0qz3fZjg at mail dot gmail dot com> <CAKdteOaeWFKw+XfyCshS+9iMm1dQMVmfKfRU66wgN+KwX6JUAA at mail dot gmail dot com> <CAJA7tRaxcWKjn=9yFfrxPSY4VDFjuQtG=U7vO-nc6Ow+9tpTaQ at mail dot gmail dot com> <20160510171848 dot GC47195 at msticlxl57 dot ims dot intel dot com> <CAKdteObEy-ZUxKa9cKfg7=oN10EnfE5z3GS9aRQLCVMT266mtg at mail dot gmail dot com> <CAKdteOagguSw_YsSmpQzdH-MZ4xcWtQ_uAHO+BSQ15WiG_iK7A at mail dot gmail dot com> <5732FFC5 dot 9050402 at foss dot arm dot com>
On Wed, May 11, 2016 at 10:47:49 +0100, Ramana Radhakrishnan wrote:
>
> > I've looked at the generated code in more details, and for armv6 this generates
> > mcr p15, 0, r0, c7, c10, 5
> > which is not what __cilkrts_fence uses currently (CP15DSB vs CP15DMB)
>
> Wow I hadn't noticed that it was a DSB - DSB is way too heavy weight. Userland shouldn't need to use this by default IMNSHO. It's needed if you are working on non-cacheable memory or performing cache maintenance operations but I can't imagine cilkplus wanting to do that !
>
> http://infocenter.arm.com/help/topic/com.arm.doc.genc007826/Barrier_Litmus_Tests_and_Cookbook_A08.pdf
>
> It's almost like the default definitions need to be in terms of the atomic extensions rather than having these written in this form. Folks usually get this wrong !
>
> > Looking at arm/sync.md it seems that there is no way to generate CP15DSB.
>
> No - there is no way of generating DSB, DMB's should be sufficient for this purpose. Would anyone know what the semantics of __cilkrts_fence are that require this to be a DSB ?
__cilkrts_fence semantics is identical to __sync_synchronize, so DMB look OK.
Maybe we should just define:
#define __cilkrts_fence() __sync_synchronize()
?
-- Ilya
> Ramana
>
> >
> >> Christophe
> >>
> >>> Thanks,
> >>> -- Ilya