search for: nosynch

Displaying 5 results from an estimated 5 matches for "nosynch".

2016 Aug 23
5
Memory scope proposal
> Since the scope is “opaque” and target specific, can you elaborate what kind of generic optimization can be performed? Some optimizations that are related to a single thread could be done without needing to know the actual memory scope. For example, an atomic acquire can restrict reordering memory operations after it, but allow reordering of memory operations (except another atomic acquire)
2018 Jul 11
8
[RFC] A nofree (and nosynch) function attribute: Mixing dereferenceable and delete
...might communicate (synchronize) with another thread causing that other thread to delete the memory. For this reason, to use dereferenceable as we currently do, we also need to know that the function does not synchronize with any other threads. To solve this problem, like nofree, I propose to add a nosynch attribute (to indicate that a function does not use (non-relaxed) atomics or otherwise synchronize with any other threads (e.g., perform I/O or, as a practical matter, use volatile accesses). I've posted a patch for the nofree attribute (https://reviews.llvm.org/D49165). nosynch's implemen...
2018 Jul 11
3
[RFC] A nofree (and nosynch) function attribute: Mixing dereferenceable and delete
[+Richard] On 07/11/2018 08:29 AM, Sanjoy Das wrote: > I'm not sure if nosynch is sufficient. What if we had: > > void f(int& x) { > if (false) { > int r0 = x; > } > } > > // other thread > free(<pointer to x>); > > The source program is race free, but LLVM may speculate the read from > x (seeing that it is dereferenceabl...
2016 Aug 31
2
Memory scope proposal
...ayingwithpointers.com> wrote: > > Hi, > > [Sorry for chiming in so late.] > > I understand why a straightforward metadata scheme won't work here, > but have you considered an alternate scheme that works in the > following way: > > - We add a MD node called !nosynch that lists a set of "domains" a > certain memory operation does *not* synchronize with. > > - Memory operations with !nosynch synchronize with memory operations > without any !nosynch metadata (so dropping !nosynch is safe). I’m not sure, but isn’t the synchscope id (...
2018 Jul 12
2
[RFC] A nofree (and nosynch) function attribute: Mixing dereferenceable and delete
...06:43 PM, Richard Smith wrote: > On Wed, 11 Jul 2018 at 16:13, Hal Finkel via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > [+Richard] > > > On 07/11/2018 08:29 AM, Sanjoy Das wrote: > > I'm not sure if nosynch is sufficient.  What if we had: > > > > void f(int& x) { > >   if (false) { > >     int r0 = x; > >   } > > } > > > > // other thread > > free(<pointer to x>); > > > > The source...