Displaying 5 results from an estimated 5 matches for "compareandswap".
2016 Apr 16
2
[TSAN] LLVM statistics and pass initialization trigger race detection
...tics somehow? Alternatively, is there a fix someone can suggest?
2) Pass initialization. This macro does not please TSAN (even though it seems written with TSAN in mind):
#define CALL_ONCE_INITIALIZATION(function) \
static volatile sys::cas_flag initialized = 0; \
sys::cas_flag old_val = sys::CompareAndSwap(&initialized, 1, 0); \
if (old_val == 0) { \
function(Registry); \
sys::MemoryFence(); \
TsanIgnoreWritesBegin(); \
TsanHappensBefore(&initialized); \
initialized = 2; \
TsanIgnoreWritesEnd(); \
} else { \
sys::cas_flag tmp = initialized; \
sys::MemoryFen...
2019 Jul 15
1
Questions on Maxwell 2nd Gen Compute Kernels/Shaders
...ated SSBO.
For fragment, geometry and vertex shaders I got no problems with this
directions. For compute shaders the directions seem to be invalid, I
imagine there's a base adress that's added to this directions. Where can I
obtain that base adress?
3rd SUATOM instraction CAS is similar to CompareAndSwap except it may add 1
or 2 to the data register on store. How do I know when it adds 1 or 2?
Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20190715/966b74f4/attachment.html>
2015 Feb 24
2
[LLVMdev] Removing contention in PassRegistry accesses to speed up compiles
.../PassSupport.h
+++ b/llvm/llvm.svnrev.170375/include/llvm/PassSupport.h
@@ -130,25 +130,14 @@ private:
PassInfo(const PassInfo &) LLVM_DELETED_FUNCTION;
};
+
+
#define CALL_ONCE_INITIALIZATION(function) \
- static volatile sys::cas_flag initialized = 0; \
- sys::cas_flag old_val = sys::CompareAndSwap(&initialized, 1, 0); \
- if (old_val == 0) { \
+ static __thread int initialized = 0; \
+ if (initialized == 0) { \
function(Registry); \
- sys::MemoryFence(); \
- TsanIgnoreWritesBegin(); \
- TsanHappensBefore(&initialized); \
- initialized = 2; \
- TsanIgnoreWritesE...
2016 Jun 24
6
RFC: Strong GC References in LLVM
...ould be true
If %v0 was "reported to the GC" in <<safepoint>> then it would have
been updated in place to 0x600, and %cmp would evaluate to true, as
expected.
[1]:
In reality, this is handled by _not_ putting safepoints in problematic
locations. For instance, if lowering a CompareAndSwap in some weird
architecture would involve doing:
// CAS(From, To, Location)
Location ^= << Constant >>
// The GC cannot parse the state at this location "L", since we've
// done some arbitrary arithmetic on Location.
... Do some magic with Location, To, From
t...
2016 Jul 12
2
RFC: Strong GC References in LLVM
...seem
a little hacky. Maybe there is an efficient way to remap types
(without deleting and re-creating every instruction def'ing and using
GCREFs)?
>> [1]:
>> In reality, this is handled by _not_ putting safepoints in problematic
>> locations. For instance, if lowering a CompareAndSwap in some weird
>> architecture would involve doing:
>>
>> // CAS(From, To, Location)
>> Location ^=<< Constant>>
>>
>> // The GC cannot parse the state at this location "L", since we've
>> // done some arbitrary arit...