clang
9.0.0
|
#include "CGCall.h"
#include "CGRecordLayout.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "TargetInfo.h"
#include "clang/AST/ASTContext.h"
#include "clang/CodeGen/CGFunctionInfo.h"
#include "clang/Frontend/FrontendDiagnostic.h"
#include "llvm/ADT/DenseMap.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, Address Dest, Address Ptr, Address Val1, Address Val2, uint64_t Size, llvm::AtomicOrdering SuccessOrder, llvm::AtomicOrdering FailureOrder, llvm::SyncScope::ID Scope) |
static void | emitAtomicCmpXchgFailureSet (CodeGenFunction &CGF, AtomicExpr *E, bool IsWeak, Address Dest, Address Ptr, Address Val1, Address Val2, llvm::Value *FailureOrderVal, uint64_t Size, llvm::AtomicOrdering SuccessOrder, llvm::SyncScope::ID Scope) |
Given an ordering required on success, emit all possible cmpxchg instructions to cope with the provided (but possibly only dynamically known) FailureOrder. More... | |
static void | EmitAtomicOp (CodeGenFunction &CGF, AtomicExpr *E, Address Dest, Address Ptr, Address Val1, Address Val2, llvm::Value *IsWeak, llvm::Value *FailureOrder, uint64_t Size, llvm::AtomicOrdering Order, llvm::SyncScope::ID Scope) |
static Address | EmitValToTemp (CodeGenFunction &CGF, Expr *E) |
static void | EmitAtomicOp (CodeGenFunction &CGF, AtomicExpr *Expr, Address Dest, Address Ptr, Address Val1, Address Val2, llvm::Value *IsWeak, llvm::Value *FailureOrder, uint64_t Size, llvm::AtomicOrdering Order, llvm::Value *Scope) |
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, Address DesiredAddr) |
static void | EmitAtomicUpdateValue (CodeGenFunction &CGF, AtomicInfo &Atomics, RValue UpdateRVal, Address DesiredAddr) |
|
static |
Definition at line 721 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), 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::ASTContext::getTypeAlignInChars(), clang::ASTContext::toBits(), clang::CodeGen::Type, and clang::ASTContext::VoidPtrTy.
|
static |
Definition at line 356 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::Address::getPointer(), and clang::AtomicExpr::isVolatile().
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 406 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::CurFn, and emitAtomicCmpXchg().
Referenced by EmitAtomicOp().
|
static |
Definition at line 301 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionCall(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::CodeGenTypes::GetFunctionType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenFunction::EmitAtomicLoad(), and clang::CodeGen::CodeGenFunction::EmitAtomicStore().
|
static |
Definition at line 490 of file CGAtomic.cpp.
References clang::prec::And, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::CurFn, emitAtomicCmpXchgFailureSet(), clang::AtomicExpr::getOp(), clang::CodeGen::Address::getPointer(), clang::AtomicExpr::getValueType(), clang::Type::isSignedIntegerType(), and clang::AtomicExpr::isVolatile().
Referenced by EmitAtomicOp().
|
static |
Definition at line 662 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::CGM, EmitAtomicOp(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::TargetCodeGenInfo::getLLVMSyncScopeID(), clang::AtomicExpr::getScopeModel(), and clang::CodeGen::CodeGenFunction::getTargetHooks().
|
static |
Definition at line 1681 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), clang::CodeGen::CodeGenFunction::EmitStoreOfComplex(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::RValue::getComplexVal(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::Address::getPointer(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::AggValueSlot::ignored(), 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::CodeGenFunction::MakeAddrLValue(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::CodeGen::LValue::MakeVectorElt(), and clang::CodeGen::CGBitFieldInfo::Size.
Referenced by EmitAtomicUpdateValue().
|
static |
Definition at line 1796 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitAtomicUpdateValue(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::Address::getPointer(), 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::CGBitFieldInfo::Size.
|
static |
Definition at line 655 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 314 of file CGAtomic.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::LValue::getPointer(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::LValue::isSimple(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::Type.