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"); in CreateTempAlloca()
340 /// Does the atomic type require memsetting to zero before initialization?
344 // If the atomic type has size padding, we definitely need a memset. in requiresMemSetZero()
468 auto *ContBB = CGF.createBasicBlock("atomic.continue", CGF.CurFn); in emitAtomicCmpXchgFailureSet()
501 /// Duplicate the atomic min/max operation in conventional IR for the builtin
766 // LLVM atomic instructions always have synch scope. If clang atomic in EmitAtomicOp()
792 CGF.createBasicBlock("atomic.scope.continue", CGF.CurFn); in EmitAtomicOp()
1036 // See: https://llvm.org/docs/Atomics.html#libcalls-atomic in EmitAtomicExpr()
1043 // The atomic address is the second parameter. in EmitAtomicExpr()
1044 // The OpenCL atomic library functions only accept pointer arguments to in EmitAtomicExpr()
1192 llvm_unreachable("Integral atomic operations always become atomicrmw!"); in EmitAtomicExpr()
1199 // By default, assume we return a value of the atomic type. in EmitAtomicExpr()
1295 llvm::BasicBlock *ContBB = createBasicBlock("atomic.continue", CurFn); in EmitAtomicExpr()
1388 // Get RValue from temp memory as atomic for non-simple lvalues in convertAtomicTempToRValue()
1405 /// around the atomic memory operation. If \param CmpXchg is true, then the
1442 // atomic integer. in ConvertToValueOrAtomic()
1479 llvm::LoadInst *Load = CGF.Builder.CreateLoad(Addr, "atomic-load"); in EmitAtomicLoadOp()
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. in LValueIsSuitableForInlineAtomic()
1532 // Okay, turn that back into the original value or whole atomic (for in EmitAtomicLoad()
1544 // Okay, turn that back into the original value or atomic (for non-simple in EmitAtomicLoad()
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, in emitCopyIntoMemory()
1595 /// to an atomic type.
1598 // requires them to be values of the atomic type. in materializeRValue()
1633 // Cast the temporary to the atomic int type and pull a value out. in convertRValueToInt()
1641 // Do the atomic store. in EmitAtomicCompareExchangeOp()
1798 // Do the atomic load. in EmitAtomicUpdateOp()
1885 // Do the atomic load. in EmitAtomicUpdateOp()
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. in EmitAtomicStore()
2002 // Initializations don't need to be atomic. in EmitAtomicStore()
2013 // Emit simple atomic update operation. in EmitAtomicStore()
2017 /// Emit a compare-and-exchange op for atomic type.
2062 // of atomic type. in EmitAtomicInit()