|
clang 24.0.0git
|
#include "CodeGenFunction.h"Go to the source code of this file.
Functions | |
| template<unsigned N> | |
| llvm::Value * | emitBuiltinWithOneOverloadedType (clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E, unsigned IntrinsicID, llvm::StringRef Name="") |
| void | appendDefaultIntrinsicArgs (llvm::SmallVectorImpl< llvm::Value * > &Args, llvm::Function *F) |
| llvm::Value * | emitUnaryMaybeConstrainedFPBuiltin (clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E, unsigned IntrinsicID, unsigned ConstrainedIntrinsicID) |
| 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. | |
| llvm::Value * | EmitFromInt (clang::CodeGen::CodeGenFunction &CGF, llvm::Value *V, clang::QualType T, llvm::Type *ResultType) |
| clang::CodeGen::Address | CheckAtomicAlignment (clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E) |
| llvm::Value * | MakeBinaryAtomicValue (clang::CodeGen::CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const clang::CallExpr *E, llvm::AtomicOrdering Ordering=llvm::AtomicOrdering::SequentiallyConsistent, llvm::SyncScope::ID SSID=llvm::SyncScope::System) |
| llvm::Value * | EmitOverflowIntrinsic (clang::CodeGen::CodeGenFunction &CGF, const llvm::Intrinsic::ID IntrinsicID, llvm::Value *X, llvm::Value *Y, llvm::Value *&Carry) |
| llvm::Value * | MakeAtomicCmpXchgValue (clang::CodeGen::CodeGenFunction &CGF, const clang::CallExpr *E, bool ReturnBool, llvm::AtomicOrdering SuccessOrdering, llvm::AtomicOrdering FailureOrdering, llvm::SyncScope::ID SSID=llvm::SyncScope::System) |
| Utility to insert an atomic cmpxchg instruction. | |
| void appendDefaultIntrinsicArgs | ( | llvm::SmallVectorImpl< llvm::Value * > & | Args, |
| llvm::Function * | F ) |
Definition at line 211 of file CGBuiltin.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().
| clang::CodeGen::Address CheckAtomicAlignment | ( | clang::CodeGen::CodeGenFunction & | CGF, |
| const clang::CallExpr * | E ) |
Definition at line 256 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CharUnits::fromQuantity(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenModule::getDiags(), clang::CharUnits::getQuantity(), clang::ASTContext::getTypeSizeInChars(), clang::DiagnosticsEngine::Report(), and clang::ASTContext::VoidPtrTy.
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 18 of file CGBuiltin.h.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getIntrinsic(), and getType().
Referenced by clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().
| llvm::Value * EmitFromInt | ( | clang::CodeGen::CodeGenFunction & | CGF, |
| llvm::Value * | V, | ||
| clang::QualType | T, | ||
| llvm::Type * | ResultType ) |
Definition at line 245 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 ) |
References X.
| 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 234 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 578 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), and clang::CodeGen::CodeGenModule::getIntrinsic().
| llvm::Value * MakeAtomicCmpXchgValue | ( | CodeGenFunction & | CGF, |
| const CallExpr * | E, | ||
| bool | ReturnBool, | ||
| llvm::AtomicOrdering | SuccessOrdering, | ||
| llvm::AtomicOrdering | FailureOrdering, | ||
| llvm::SyncScope::ID | SSID ) |
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 376 of file CGBuiltin.cpp.
References clang::CodeGen::CodeGenFunction::Builder, CheckAtomicAlignment(), Cmp, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateAtomicCmpXchg(), EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::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, | ||
| llvm::SyncScope::ID | SSID = llvm::SyncScope::System ) |