clang
3.7.0
|
#include "CodeGenFunction.h"
#include "CGCall.h"
#include "CGRecordLayout.h"
#include "CodeGenModule.h"
#include "clang/AST/ASTContext.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Operator.h"
Go to the source code of this file.
Functions | |
static RValue | emitAtomicLibcall (CodeGenFunction &CGF, StringRef fnName, QualType resultType, CallArgList &args) |
static bool | isFullSizeType (CodeGenModule &CGM, llvm::Type *type, uint64_t expectedSize) |
Does a store of the given IR type modify the full expected width? More... | |
static void | emitAtomicCmpXchg (CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, llvm::Value *Dest, llvm::Value *Ptr, llvm::Value *Val1, llvm::Value *Val2, uint64_t Size, unsigned Align, llvm::AtomicOrdering SuccessOrder, llvm::AtomicOrdering FailureOrder) |
static void | emitAtomicCmpXchgFailureSet (CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, llvm::Value *Dest, llvm::Value *Ptr, llvm::Value *Val1, llvm::Value *Val2, llvm::Value *FailureOrderVal, uint64_t Size, unsigned Align, llvm::AtomicOrdering SuccessOrder) |
static void | EmitAtomicOp (CodeGenFunction &CGF, AtomicExpr *E, llvm::Value *Dest, llvm::Value *Ptr, llvm::Value *Val1, llvm::Value *Val2, llvm::Value *IsWeak, llvm::Value *FailureOrder, uint64_t Size, unsigned Align, llvm::AtomicOrdering Order) |
static llvm::Value * | EmitValToTemp (CodeGenFunction &CGF, Expr *E) |
static void | AddDirectArgument (CodeGenFunction &CGF, CallArgList &Args, bool UseOptimizedLibcall, llvm::Value *Val, QualType ValTy, SourceLocation Loc, CharUnits SizeInChars) |
static void | EmitAtomicUpdateValue (CodeGenFunction &CGF, AtomicInfo &Atomics, RValue OldRVal, const llvm::function_ref< RValue(RValue)> &UpdateOp, llvm::Value *DesiredAddr) |
static void | EmitAtomicUpdateValue (CodeGenFunction &CGF, AtomicInfo &Atomics, RValue UpdateRVal, llvm::Value *DesiredAddr) |
|
static |
Definition at line 650 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitCastToVoidPtr(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::ASTContext::getPointerType(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::toBits(), and clang::ASTContext::VoidPtrTy.
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().
|
static |
Definition at line 365 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CurFn, clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::Expr::getType(), clang::AtomicExpr::isVolatile(), and clang::CodeGen::CodeGenFunction::MakeAddrLValue().
Referenced by emitAtomicCmpXchgFailureSet().
|
static |
Given an ordering required on success, emit all possible cmpxchg instructions to cope with the provided (but possibly only dynamically known) FailureOrder.
Definition at line 417 of file CGAtomic.cpp.
References clang::AtomicExpr::AO_ABI_memory_order_acquire, clang::AtomicExpr::AO_ABI_memory_order_consume, clang::AtomicExpr::AO_ABI_memory_order_seq_cst, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CurFn, and emitAtomicCmpXchg().
Referenced by EmitAtomicOp().
|
static |
Definition at line 310 of file CGAtomic.cpp.
References clang::CodeGen::RequiredArgs::All, clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenTypes::GetFunctionType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), and clang::CodeGen::CodeGenFunction::EmitAtomicStore().
|
static |
Definition at line 493 of file CGAtomic.cpp.
References clang::prec::And, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CurFn, emitAtomicCmpXchgFailureSet(), clang::AtomicExpr::getOp(), clang::AtomicExpr::isVolatile(), and clang::Result.
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().
|
static |
Definition at line 1420 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitStoreOfComplex(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::RValue::getComplexVal(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::RValue::isComplex(), clang::CodeGen::LValue::isExtVectorElt(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::MakeAddr(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeVectorElt(), and clang::CodeGen::LValue::setTBAAInfo().
|
static |
Definition at line 1538 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isExtVectorElt(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeVectorElt(), and clang::CodeGen::LValue::setTBAAInfo().
|
static |
Definition at line 642 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::CreateMemTemp(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::QualType::getQualifiers(), and clang::Expr::getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicExpr().
|
static |
Does a store of the given IR type modify the full expected width?
Definition at line 323 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenModule::getDataLayout().