Lines Matching full:atomic
1 //===--- CGAtomic.cpp - Emit LLVM IR for atomic operations ----------------===//
9 // This file contains the code for emitting atomic operations.
167 /// Is the atomic size larger than the underlying value type?
169 /// Note that the absence of padding does not mean that atomic
170 /// objects are completely interchangeable with non-atomic
184 /// Cast the given pointer to an integer pointer suitable for atomic
188 /// If Addr is compatible with the iN that will be used for an atomic
193 /// Turn an atomic-layout object into an r-value.
206 /// Copy an atomic r-value into atomic-layout memory.
220 /// Emits atomic load.
226 /// Emits atomic compare-and-exchange sequence.
229 /// \param Success Atomic ordering for success operation.
230 /// \param Failure Atomic ordering for failed operation.
231 /// \param IsWeak true if atomic operation is weak, false otherwise.
242 /// Emits atomic update.
243 /// \param AO Atomic ordering.
248 /// Emits atomic update.
249 /// \param AO Atomic ordering.
253 /// Materialize an atomic r-value in atomic-layout memory.
256 /// Creates temp alloca for intermediate operations on atomic value.
262 /// Emits atomic load as a libcall.
265 /// Emits atomic load as LLVM instruction.
268 /// Emits atomic compare-and-exchange op as a libcall.
275 /// Emits atomic compare-and-exchange op as LLVM instruction.
283 /// Emit atomic update as libcalls.
288 /// Emit atomic update as LLVM instructions.
292 /// Emit atomic update as libcalls.
295 /// Emit atomic update as LLVM instructions.
306 "atomic-temp");
340 /// Does the atomic type require memsetting to zero before initialization?
344 // If the atomic type has size padding, we definitely need a memset.
468 auto *ContBB = CGF.createBasicBlock("atomic.continue", CGF.CurFn);
501 /// Duplicate the atomic min/max operation in conventional IR for the builtin
766 // LLVM atomic instructions always have synch scope. If clang atomic
792 CGF.createBasicBlock("atomic.scope.continue", CGF.CurFn);
1036 // See: https://llvm.org/docs/Atomics.html#libcalls-atomic
1043 // The atomic address is the second parameter.
1044 // The OpenCL atomic library functions only accept pointer arguments to
1192 llvm_unreachable("Integral atomic operations always become atomicrmw!");
1199 // By default, assume we return a value of the atomic type.
1295 llvm::BasicBlock *ContBB = createBasicBlock("atomic.continue", CurFn);
1388 // Get RValue from temp memory as atomic for non-simple lvalues
1405 /// around the atomic memory operation. If \param CmpXchg is true, then the
1442 // atomic integer.
1479 llvm::LoadInst *Load = CGF.Builder.CreateLoad(Addr, "atomic-load");
1489 /// An LValue is a candidate for having its loads and stores be made atomic if
1496 // An atomic is inline if we don't need to use a libcall.
1532 // Okay, turn that back into the original value or whole atomic (for
1544 // Okay, turn that back into the original value or atomic (for non-simple
1549 /// Emit a load from an l-value of atomic type. Note that the r-value
1550 /// we produce is an r-value of the atomic *value* type.
1559 /// Copy an r-value into memory as part of storing to an atomic type.
1560 /// This needs to create a bit-pattern suitable for atomic operations.
1563 // If we have an r-value, the rvalue should be of the atomic type,
1595 /// to an atomic type.
1598 // requires them to be values of the atomic type.
1633 // Cast the temporary to the atomic int type and pull a value out.
1641 // Do the atomic store.
1798 // Do the atomic load.
1885 // Do the atomic load.
1942 /// Emit a store to an l-value of atomic type.
1944 /// Note that the r-value is expected to be an r-value *of the atomic
1988 // Do the atomic store.
2002 // Initializations don't need to be atomic.
2013 // Emit simple atomic update operation.
2017 /// Emit a compare-and-exchange op for atomic type.
2062 // of atomic type.