clang 22.0.0git
|
#include "CodeGenFunction.h"
Go to the source code of this file.
clang::CodeGen::Address CheckAtomicAlignment | ( | clang::CodeGen::CodeGenFunction & | CGF, |
const clang::CallExpr * | E | ||
) |
Definition at line 274 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CharUnits::fromQuantity(), clang::CodeGen::Address::getAlignment(), clang::Stmt::getBeginLoc(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenModule::getDiags(), clang::CodeGen::Address::getElementType(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::DiagnosticsEngine::Report(), clang::ASTContext::VoidPtrTy, and clang::CodeGen::Address::withAlignment().
Referenced by clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), EmitAtomicIncrementValue(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().
llvm::Value * emitBuiltinWithOneOverloadedType | ( | clang::CodeGen::CodeGenFunction & | CGF, |
const clang::CallExpr * | E, | ||
unsigned | IntrinsicID, | ||
llvm::StringRef | Name = "" |
||
) |
Definition at line 63 of file CGBuiltin.h.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), and clang::CodeGen::CodeGenModule::getIntrinsic().
llvm::Value * EmitFromInt | ( | clang::CodeGen::CodeGenFunction & | CGF, |
llvm::Value * | V, | ||
clang::QualType | T, | ||
llvm::Type * | ResultType | ||
) |
Definition at line 263 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitFromMemory(), clang::T, and V.
Referenced by EmitBinaryAtomicPost(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().
llvm::Value * EmitOverflowIntrinsic | ( | clang::CodeGen::CodeGenFunction & | CGF, |
const llvm::Intrinsic::ID | IntrinsicID, | ||
llvm::Value * | X, | ||
llvm::Value * | Y, | ||
llvm::Value *& | Carry | ||
) |
llvm::Value * EmitToInt | ( | clang::CodeGen::CodeGenFunction & | CGF, |
llvm::Value * | V, | ||
clang::QualType | T, | ||
llvm::IntegerType * | IntType | ||
) |
Emit the conversions required to turn the given value into an integer of the given size.
Definition at line 252 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::T, and V.
Referenced by EmitBinaryAtomicPost(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().
llvm::Value * emitUnaryMaybeConstrainedFPBuiltin | ( | clang::CodeGen::CodeGenFunction & | CGF, |
const clang::CallExpr * | E, | ||
unsigned | IntrinsicID, | ||
unsigned | ConstrainedIntrinsicID | ||
) |
Definition at line 588 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, E, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::Function, and clang::CodeGen::CodeGenModule::getIntrinsic().
llvm::Value * MakeAtomicCmpXchgValue | ( | CodeGenFunction & | CGF, |
const CallExpr * | E, | ||
bool | ReturnBool | ||
) |
Utility to insert an atomic cmpxchg instruction.
CGF | The current codegen function. |
E | Builtin call expression to convert to cmpxchg. arg0 - address to operate on arg1 - value to compare with arg2 - new value |
ReturnBool | Specifies whether to return success flag of cmpxchg result or the old value. |
Note: In order to lower Microsoft's _InterlockedCompareExchange* intrinsics invoke the function EmitAtomicCmpXchgForMSIntrin.
Definition at line 390 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), E, EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), New, and clang::T.
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr().
llvm::Value * MakeBinaryAtomicValue | ( | clang::CodeGen::CodeGenFunction & | CGF, |
llvm::AtomicRMWInst::BinOp | Kind, | ||
const clang::CallExpr * | E, | ||
llvm::AtomicOrdering | Ordering = llvm::AtomicOrdering::SequentiallyConsistent |
||
) |