clang 8.0.0

Macros | Enumerations | Functions | Variables
CGBuiltin.cpp File Reference
`#include "CGCXXABI.h"`
`#include "CGObjCRuntime.h"`
`#include "CGOpenCLRuntime.h"`
`#include "CGRecordLayout.h"`
`#include "CodeGenFunction.h"`
`#include "CodeGenModule.h"`
`#include "ConstantEmitter.h"`
`#include "TargetInfo.h"`
`#include "clang/AST/ASTContext.h"`
`#include "clang/AST/Decl.h"`
`#include "clang/AST/OSLog.h"`
`#include "clang/Basic/TargetBuiltins.h"`
`#include "clang/Basic/TargetInfo.h"`
`#include "clang/CodeGen/CGFunctionInfo.h"`
`#include "llvm/ADT/SmallPtrSet.h"`
`#include "llvm/ADT/StringExtras.h"`
`#include "llvm/IR/CallSite.h"`
`#include "llvm/IR/DataLayout.h"`
`#include "llvm/IR/InlineAsm.h"`
`#include "llvm/IR/Intrinsics.h"`
`#include "llvm/IR/MDBuilder.h"`
`#include "llvm/Support/ConvertUTF.h"`
`#include "llvm/Support/ScopedPrinter.h"`
`#include "llvm/Support/TargetParser.h"`
`#include <sstream>`
`#include "llvm/Support/X86TargetParser.def"`
Include dependency graph for CGBuiltin.cpp:

Go to the source code of this file.

## Macros
#define | NEONMAP0(NameBase) { #NameBase, NEON::BI__builtin_neon_ ## NameBase, 0, 0, 0 }
#define | NEONMAP1(NameBase, LLVMIntrinsic, TypeModifier)
#define | NEONMAP2(NameBase, LLVMIntrinsic, AltLLVMIntrinsic, TypeModifier)
#define | X86_VENDOR(ENUM, STRING) .Case(STRING, {0u, static_cast<unsigned>(llvm::X86::ENUM)})
#define | X86_CPU_TYPE_COMPAT_WITH_ALIAS(ARCHNAME, ENUM, STR, ALIAS) .Cases(STR, ALIAS, {1u, static_cast<unsigned>(llvm::X86::ENUM)})
#define | X86_CPU_TYPE_COMPAT(ARCHNAME, ENUM, STR) .Case(STR, {1u, static_cast<unsigned>(llvm::X86::ENUM)})
#define | X86_CPU_SUBTYPE_COMPAT(ARCHNAME, ENUM, STR) .Case(STR, {2u, static_cast<unsigned>(llvm::X86::ENUM)})
#define | X86_FEATURE_COMPAT(VAL, ENUM, STR) .Case(STR, VAL)
#define | INTRINSIC_X86_XSAVE_ID(NAME)
#define | INTRINSIC_WITH_CC(NAME)
#define | MMA_VARIANTS(geom, type)

## Enumerations
enum | MSVCSetJmpKind
enum | MSVCIntrin
enum | { AddRetType = (1 << 0), Add1ArgType = (1 << 1), Add2ArgTypes = (1 << 2), VectorizeRetType = (1 << 3), VectorizeArgTypes = (1 << 4), InventFloatType = (1 << 5), UnsignedAlts = (1 << 6), Use64BitVectors = (1 << 7), Use128BitVectors = (1 << 8), Vectorize1ArgType = Add1ArgType | VectorizeArgTypes, VectorRet = AddRetType | VectorizeRetType, VectorRetGetArgs01, FpCmpzModifiers }

## Functions
static int64_t | clamp (int64_t Value, int64_t Low, int64_t High)
static Value * | EmitToInt (CodeGenFunction &CGF, llvm::Value *V, QualType T, llvm::IntegerType *IntType)
| Emit the conversions required to turn the given value into an integer of the given size. More...
static Value * | EmitFromInt (CodeGenFunction &CGF, llvm::Value *V, QualType T, llvm::Type *ResultType)
static Value * | MakeBinaryAtomicValue (CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E, AtomicOrdering Ordering=AtomicOrdering::SequentiallyConsistent)
| Utility to insert an atomic instruction based on Intrinsic::ID and the expression node. More...
static Value * | EmitNontemporalStore (CodeGenFunction &CGF, const CallExpr *E)
static Value * | EmitNontemporalLoad (CodeGenFunction &CGF, const CallExpr *E)
static RValue | EmitBinaryAtomic (CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E)
static RValue | EmitBinaryAtomicPost (CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E, Instruction::BinaryOps Op, bool Invert=false)
| Utility to insert an atomic instruction based Intrinsic::ID and the expression node, where the return value is the result of the operation. More...
static Value * | MakeAtomicCmpXchgValue (CodeGenFunction &CGF, const CallExpr *E, bool ReturnBool)
| Utility to insert an atomic cmpxchg instruction. More...
static Value * | EmitAtomicCmpXchgForMSIntrin (CodeGenFunction &CGF, const CallExpr *E, AtomicOrdering SuccessOrdering=AtomicOrdering::SequentiallyConsistent)
| This function should be invoked to emit atomic cmpxchg for Microsoft's _InterlockedCompareExchange* intrinsics which have the following signature: T _InterlockedCompareExchange(T volatile *Destination, T Exchange, T Comparand);. More...
static Value * | EmitAtomicIncrementValue (CodeGenFunction &CGF, const CallExpr *E, AtomicOrdering Ordering=AtomicOrdering::SequentiallyConsistent)
static Value * | EmitAtomicDecrementValue (CodeGenFunction &CGF, const CallExpr *E, AtomicOrdering Ordering=AtomicOrdering::SequentiallyConsistent)
static Value * | emitUnaryBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
static Value * | emitBinaryBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
static Value * | emitTernaryBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
static Value * | emitFPIntBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
static Value * | EmitFAbs (CodeGenFunction &CGF, Value *V)
| EmitFAbs - Emit a call to .fabs(). More...
static Value * | EmitSignBit (CodeGenFunction &CGF, Value *V)
| Emit the computation of the sign bit for a floating point value. More...
static RValue | emitLibraryCall (CodeGenFunction &CGF, const FunctionDecl *FD, const CallExpr *E, llvm::Constant *calleeValue)
static llvm::Value * | EmitOverflowIntrinsic (CodeGenFunction &CGF, const llvm::Intrinsic::ID IntrinsicID, llvm::Value *X, llvm::Value *Y, llvm::Value *&Carry)
| Emit a call to llvm. More...
static Value * | emitRangedBuiltin (CodeGenFunction &CGF, unsigned IntrinsicID, int low, int high)
static WidthAndSignedness | getIntegerWidthAndSignedness (const clang::ASTContext &context, const clang::QualType Type)
static struct WidthAndSignedness | EncompassingIntegerType (ArrayRef< struct WidthAndSignedness > Types)
static bool | areBOSTypesCompatible (int From, int To)
| Checks if using the result of __builtin_object_size(p, `From`) in place of __builtin_object_size(p, `To`) is correct. More...
static llvm::Value * | getDefaultBuiltinObjectSizeResult (unsigned Type, llvm::IntegerType *ResType)
static char | bitActionToX86BTCode (BitTest::ActionKind A)
static llvm::Value * | EmitX86BitTestIntrinsic (CodeGenFunction &CGF, BitTest BT, const CallExpr *E, Value *BitBase, Value *BitPos)
static llvm::AtomicOrdering | getBitTestAtomicOrdering (BitTest::InterlockingKind I)
static llvm::Value * | EmitBitTestIntrinsic (CodeGenFunction &CGF, unsigned BuiltinID, const CallExpr *E)
| Emit a _bittest* intrinsic. More...
static RValue | EmitMSVCRTSetJmp (CodeGenFunction &CGF, MSVCSetJmpKind SJKind, const CallExpr *E)
| MSVC handles setjmp a bit differently on different platforms. More...
static CanQualType | getOSLogArgType (ASTContext &C, int Size)
| Get the argument type for arguments to os_log_helper. More...
static bool | isSpecialMixedSignMultiply (unsigned BuiltinID, WidthAndSignedness Op1Info, WidthAndSignedness Op2Info, WidthAndSignedness ResultInfo)
| Determine if a binop is a checked mixed-sign multiply we can specialize. More...
static RValue | EmitCheckedMixedSignMultiply (CodeGenFunction &CGF, const clang::Expr *Op1, WidthAndSignedness Op1Info, const clang::Expr *Op2, WidthAndSignedness Op2Info, const clang::Expr *ResultArg, QualType ResultQTy, WidthAndSignedness ResultInfo)
| Emit a checked mixed-sign multiply. More...
static llvm::Value * | dumpRecord (CodeGenFunction &CGF, QualType RType, Value *&RecordPtr, CharUnits Align, Value *Func, int Lvl)
static bool | TypeRequiresBuiltinLaunderImp (const ASTContext &Ctx, QualType Ty, llvm::SmallPtrSetImpl< const Decl *> &Seen)
static bool | TypeRequiresBuiltinLaunder (CodeGenModule &CGM, QualType Ty)
| Determine if the specified type requires laundering by checking if it is a dynamic class type or contains a subobject which is a dynamic class type. More...
static Value * | EmitTargetArchBuiltinExpr (CodeGenFunction *CGF, unsigned BuiltinID, const CallExpr *E, llvm::Triple::ArchType Arch)
static llvm::VectorType * | GetNeonType (CodeGenFunction *CGF, NeonTypeFlags TypeFlags, bool HasLegalHalfType=true, bool V1Ty=false)
static llvm::VectorType * | GetFloatNeonType (CodeGenFunction *CGF, NeonTypeFlags IntTypeFlags)
static const NeonIntrinsicInfo * | findNeonIntrinsicInMap (ArrayRef< NeonIntrinsicInfo > IntrinsicMap, unsigned BuiltinID, bool &MapProvenSorted)
static Value * | EmitCommonNeonSISDBuiltinExpr (CodeGenFunction &CGF, const NeonIntrinsicInfo &SISDInfo, SmallVectorImpl< Value *> &Ops, const CallExpr *E)
static Value * | packTBLDVectorList (CodeGenFunction &CGF, ArrayRef< Value *> Ops, Value *ExtOp, Value *IndexOp, llvm::Type *ResTy, unsigned IntID, const char *Name)
static Value * | EmitSpecialRegisterBuiltin (CodeGenFunction &CGF, const CallExpr *E, llvm::Type *RegisterType, llvm::Type *ValueType, bool IsRead, StringRef SysReg="")
static bool | HasExtraNeonArgument (unsigned BuiltinID)
| Return true if BuiltinID is an overloaded Neon intrinsic with an extra argument that specifies the vector type. More...
static Value * | EmitAArch64TblBuiltinExpr (CodeGenFunction &CGF, unsigned BuiltinID, const CallExpr *E, SmallVectorImpl< Value *> &Ops, llvm::Triple::ArchType Arch)
static Value * | getMaskVecValue (CodeGenFunction &CGF, Value *Mask, unsigned NumElts)
static Value * | EmitX86MaskedStore (CodeGenFunction &CGF, ArrayRef< Value *> Ops, unsigned Align)
static Value * | EmitX86MaskedLoad (CodeGenFunction &CGF, ArrayRef< Value *> Ops, unsigned Align)
static Value * | EmitX86ExpandLoad (CodeGenFunction &CGF, ArrayRef< Value *> Ops)
static Value * | EmitX86CompressStore (CodeGenFunction &CGF, ArrayRef< Value *> Ops)
static Value * | EmitX86MaskLogic (CodeGenFunction &CGF, Instruction::BinaryOps Opc, ArrayRef< Value *> Ops, bool InvertLHS=false)
static Value * | EmitX86FunnelShift (CodeGenFunction &CGF, Value *Op0, Value *Op1, Value *Amt, bool IsRight)
static Value * | EmitX86Select (CodeGenFunction &CGF, Value *Mask, Value *Op0, Value *Op1)
static Value * | EmitX86ScalarSelect (CodeGenFunction &CGF, Value *Mask, Value *Op0, Value *Op1)
static Value * | EmitX86MaskedCompareResult (CodeGenFunction &CGF, Value *Cmp, unsigned NumElts, Value *MaskIn)
static Value * | EmitX86MaskedCompare (CodeGenFunction &CGF, unsigned CC, bool Signed, ArrayRef< Value *> Ops)
static Value * | EmitX86ConvertToMask (CodeGenFunction &CGF, Value *In)
static Value * | EmitX86Abs (CodeGenFunction &CGF, ArrayRef< Value *> Ops)
static Value * | EmitX86MinMax (CodeGenFunction &CGF, ICmpInst::Predicate Pred, ArrayRef< Value *> Ops)
static Value * | EmitX86FMAExpr (CodeGenFunction &CGF, ArrayRef< Value *> Ops, unsigned BuiltinID, bool IsAddSub)
static Value * | EmitScalarFMAExpr (CodeGenFunction &CGF, MutableArrayRef< Value *> Ops, Value *Upper, bool ZeroMask=false, unsigned PTIdx=0, bool NegAcc=false)
static Value * | EmitX86Muldq (CodeGenFunction &CGF, bool IsSigned, ArrayRef< Value *> Ops)
static Value * | EmitX86Ternlog (CodeGenFunction &CGF, bool ZeroMask, ArrayRef< Value *> Ops)
static Value * | EmitX86SExtMask (CodeGenFunction &CGF, Value *Op, llvm::Type *DstTy)
static Value * | EmitX86AddSubSatExpr (CodeGenFunction &CGF, ArrayRef< Value *> Ops, bool IsSigned, bool IsAddition)
static Value * | EmitSystemZIntrinsicWithCC (CodeGenFunction &CGF, unsigned IntrinsicID, const CallExpr *E)
| Handle a SystemZ function in which the final argument is a pointer to an int that receives the post-instruction CC value. More...

## Variables
static const NeonIntrinsicInfo | ARMSIMDIntrinsicMap []
static const NeonIntrinsicInfo | AArch64SIMDIntrinsicMap []
static const NeonIntrinsicInfo | AArch64SISDIntrinsicMap []
static bool | NEONSIMDIntrinsicsProvenSorted = false
static bool | AArch64SIMDIntrinsicsProvenSorted = false
static bool | AArch64SISDIntrinsicsProvenSorted = false

## Macro Definition Documentation

## ◆ INTRINSIC_WITH_CC

#define INTRINSIC_WITH_CC | ( |  | NAME | ) |

Value:
case SystemZ::BI__builtin_##NAME: \
return EmitSystemZIntrinsicWithCC(*this, Intrinsic::NAME, E)
EmitSystemZIntrinsicWithCC
static Value * EmitSystemZIntrinsicWithCC(CodeGenFunction &CGF, unsigned IntrinsicID, const CallExpr *E)
Handle a SystemZ function in which the final argument is a pointer to an int that receives the post-i...
Definition: CGBuiltin.cpp:12155

## ◆ INTRINSIC_X86_XSAVE_ID

#define INTRINSIC_X86_XSAVE_ID | ( |  | NAME | ) |

Value:
case X86::BI__builtin_ia32_##NAME: \
ID = Intrinsic::x86_##NAME; \
break

## ◆ MMA_VARIANTS

#define MMA_VARIANTS | ( |  | geom,
|  |  | type
| ) |  |

Value:
{{ \
Intrinsic::nvvm_wmma_##geom##_mma_row_row_##type, \
Intrinsic::nvvm_wmma_##geom##_mma_row_row_##type##_satfinite, \
Intrinsic::nvvm_wmma_##geom##_mma_row_col_##type, \
Intrinsic::nvvm_wmma_##geom##_mma_row_col_##type##_satfinite, \
Intrinsic::nvvm_wmma_##geom##_mma_col_row_##type, \
Intrinsic::nvvm_wmma_##geom##_mma_col_row_##type##_satfinite, \
Intrinsic::nvvm_wmma_##geom##_mma_col_col_##type, \
Intrinsic::nvvm_wmma_##geom##_mma_col_col_##type##_satfinite \
}}
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:592

## ◆ NEONMAP0

#define NEONMAP0 | ( |  | NameBase | ) | { #NameBase, NEON::BI__builtin_neon_ ## NameBase, 0, 0, 0 }

Definition at line 4232 of file CGBuiltin.cpp.

## ◆ NEONMAP1

#define NEONMAP1 | ( |  | NameBase,
|  |  | LLVMIntrinsic,
|  |  | TypeModifier
| ) |  |

Value:
{ #NameBase, NEON:: BI__builtin_neon_ ## NameBase, \
Intrinsic::LLVMIntrinsic, 0, TypeModifier }

Definition at line 4235 of file CGBuiltin.cpp.

## ◆ NEONMAP2

#define NEONMAP2 | ( |  | NameBase,
|  |  | LLVMIntrinsic,
|  |  | AltLLVMIntrinsic,
|  |  | TypeModifier
| ) |  |

Value:
{ #NameBase, NEON:: BI__builtin_neon_ ## NameBase, \
Intrinsic::LLVMIntrinsic, Intrinsic::AltLLVMIntrinsic, \
TypeModifier }

Definition at line 4239 of file CGBuiltin.cpp.

## ◆ X86_CPU_SUBTYPE_COMPAT

#define X86_CPU_SUBTYPE_COMPAT | ( |  | ARCHNAME,
|  |  | ENUM,
|  |  | STR
| ) |  | .Case(STR, {2u, static_cast<unsigned>(llvm::X86::ENUM)})

## ◆ X86_CPU_TYPE_COMPAT

#define X86_CPU_TYPE_COMPAT | ( |  | ARCHNAME,
|  |  | ENUM,
|  |  | STR
| ) |  | .Case(STR, {1u, static_cast<unsigned>(llvm::X86::ENUM)})

## ◆ X86_CPU_TYPE_COMPAT_WITH_ALIAS

#define X86_CPU_TYPE_COMPAT_WITH_ALIAS | ( |  | ARCHNAME,
|  |  | ENUM,
|  |  | STR,
|  |  | ALIAS
| ) |  | .Cases(STR, ALIAS, {1u, static_cast<unsigned>(llvm::X86::ENUM)})

## ◆ X86_FEATURE_COMPAT

#define X86_FEATURE_COMPAT | ( |  | VAL,
|  |  | ENUM,
|  |  | STR
| ) |  | .Case(STR, VAL)

Referenced by clang::CodeGen::CodeGenFunction::GetX86CpuSupportsMask().

## ◆ X86_VENDOR

#define X86_VENDOR | ( |  | ENUM,
|  |  | STRING
| ) |  | .Case(STRING, {0u, static_cast<unsigned>(llvm::X86::ENUM)})

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
AddRetType |
Add1ArgType |
Add2ArgTypes |
VectorizeRetType |
VectorizeArgTypes |
InventFloatType |
UnsignedAlts |
Use64BitVectors |
Use128BitVectors |
Vectorize1ArgType |
VectorRet |
VectorRetGetArgs01 |
FpCmpzModifiers |

Definition at line 4193 of file CGBuiltin.cpp.

## ◆ MSVCIntrin

enum MSVCIntrin
| strong

Definition at line 810 of file CGBuiltin.cpp.

## ◆ MSVCSetJmpKind

enum MSVCSetJmpKind
| strong

Definition at line 760 of file CGBuiltin.cpp.

## Function Documentation

## ◆ areBOSTypesCompatible()

static bool areBOSTypesCompatible | ( | int | From,
|  | int | To
| ) |  |
| static

Checks if using the result of __builtin_object_size(p, `From`) in place of __builtin_object_size(p, `To`) is correct.

Definition at line 484 of file CGBuiltin.cpp.

Referenced by getDefaultBuiltinObjectSizeResult().

## ◆ bitActionToX86BTCode()

static char bitActionToX86BTCode | ( | BitTest::ActionKind | A | ) |
| static

Definition at line 624 of file CGBuiltin.cpp.

Referenced by EmitX86BitTestIntrinsic().

## ◆ clamp()

static int64_t clamp | ( | int64_t | Value,
|  | int64_t | Low,
|  | int64_t | High
| ) |  |
| static

Definition at line 45 of file CGBuiltin.cpp.

References max(), and min().

## ◆ dumpRecord()

static llvm::Value* dumpRecord | ( | CodeGenFunction & | CGF,
|  | QualType | RType,
|  | Value *& | RecordPtr,
|  | CharUnits | Align,
|  | Value * | Func,
|  | int | Lvl
| ) |  |
| static

Definition at line 1332 of file CGBuiltin.cpp.

References clang::Type::getAs().

## ◆ EmitAArch64TblBuiltinExpr()

static Value* EmitAArch64TblBuiltinExpr | ( | CodeGenFunction & | CGF,
|  | unsigned | BuiltinID,
|  | const CallExpr * | E,
|  | SmallVectorImpl< Value *> & | Ops,
|  | llvm::Triple::ArchType | Arch
| ) |  |
| static

Definition at line 6609 of file CGBuiltin.cpp.

References clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::Expr::isIntegerConstantExpr(), and clang::CodeGen::Type.

## ◆ EmitAtomicCmpXchgForMSIntrin()

static Value* EmitAtomicCmpXchgForMSIntrin | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | AtomicOrdering | SuccessOrdering = `AtomicOrdering::SequentiallyConsistent`
| ) |  |
| static

This function should be invoked to emit atomic cmpxchg for Microsoft's _InterlockedCompareExchange* intrinsics which have the following signature: T _InterlockedCompareExchange(T volatile *Destination, T Exchange, T Comparand);.

Whereas the llvm 'cmpxchg' instruction has the following syntax: cmpxchg *Destination, Comparand, Exchange. So we need to swap Comparand and Exchange when invoking CreateAtomicCmpXchg. That is the reason we could not use the above utility function MakeAtomicCmpXchgValue since it expects the arguments to be already swapped.

Definition at line 251 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ASTContext::hasSameUnqualifiedType(), and clang::Type::isPointerType().

## ◆ EmitAtomicDecrementValue()

static Value* EmitAtomicDecrementValue | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | AtomicOrdering | Ordering = `AtomicOrdering::SequentiallyConsistent`
| ) |  |
| static

Definition at line 290 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::Expr::getType(), and clang::Type::isPointerType().

## ◆ EmitAtomicIncrementValue()

static Value* EmitAtomicIncrementValue | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | AtomicOrdering | Ordering = `AtomicOrdering::SequentiallyConsistent`
| ) |  |
| static

Definition at line 277 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::Expr::getType(), and clang::Type::isPointerType().

## ◆ EmitBinaryAtomic()

static RValue EmitBinaryAtomic | ( | CodeGenFunction & | CGF,
|  | llvm::AtomicRMWInst::BinOp | Kind,
|  | const CallExpr * | E
| ) |  |
| static

Definition at line 149 of file CGBuiltin.cpp.

References clang::CodeGen::RValue::get(), and MakeBinaryAtomicValue().

## ◆ EmitBinaryAtomicPost()

static RValue EmitBinaryAtomicPost | ( | CodeGenFunction & | CGF,
|  | llvm::AtomicRMWInst::BinOp | Kind,
|  | const CallExpr * | E,
|  | Instruction::BinaryOps | Op,
|  | bool | Invert = `false`
| ) |  |
| static

Utility to insert an atomic instruction based Intrinsic::ID and the expression node, where the return value is the result of the operation.

Definition at line 158 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isPointerType(), and clang::CodeGen::Type.

## ◆ emitBinaryBuiltin()

static Value* emitBinaryBuiltin | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | unsigned | IntrinsicID
| ) |  |
| static

Definition at line 315 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().

Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().

## ◆ EmitBitTestIntrinsic()

static llvm::Value* EmitBitTestIntrinsic | ( | CodeGenFunction & | CGF,
|  | unsigned | BuiltinID,
|  | const CallExpr * | E
| ) |  |
| static

Emit a _bittest* intrinsic.

These intrinsics take a pointer to an array of bits and a bit position and read and optionally modify the bit at that position. The position index can be arbitrarily large, i.e. it can be larger than 31 or 63, so we need an indexed load in the general case.

Definition at line 681 of file CGBuiltin.cpp.

References clang::prec::And, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitX86BitTestIntrinsic(), clang::CallExpr::getArg(), getBitTestAtomicOrdering(), clang::CodeGen::CodeGenFunction::getTarget(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, and clang::CharUnits::One().

## ◆ EmitCheckedMixedSignMultiply()

static RValue EmitCheckedMixedSignMultiply | ( | CodeGenFunction & | CGF,
|  | const clang::Expr * | Op1,
|  | WidthAndSignedness | Op1Info,
|  | const clang::Expr * | Op2,
|  | WidthAndSignedness | Op2Info,
|  | const clang::Expr * | ResultArg,
|  | QualType | ResultQTy,
|  | WidthAndSignedness | ResultInfo
| ) |  |
| static

Emit a checked mixed-sign multiply.

This is a cheaper specialization of the generic checked-binop irgen.

Definition at line 1245 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateStore(), EmitOverflowIntrinsic(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getElementType(), clang::Type::getPointeeType(), clang::Expr::getType(), isSpecialMixedSignMultiply(), clang::QualType::isVolatileQualified(), max(), and clang::CodeGen::Type.

## ◆ EmitCommonNeonSISDBuiltinExpr()

static Value* EmitCommonNeonSISDBuiltinExpr | ( | CodeGenFunction & | CGF,
|  | const NeonIntrinsicInfo & | SISDInfo,
|  | SmallVectorImpl< Value *> & | Ops,
|  | const CallExpr * | E
| ) |  |
| static

Definition at line 4973 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenFunction::EmitNeonCall(), clang::CallExpr::getArg(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::LookupNeonLLVMIntrinsic(), Modifier, clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::CodeGen::Type.

## ◆ EmitFAbs()

static Value* EmitFAbs | ( | CodeGenFunction & | CGF,
|  | Value * | V
| ) |  |
| static

EmitFAbs - Emit a call to .fabs().

Definition at line 349 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, fabs, and clang::CodeGen::CodeGenModule::getIntrinsic().

## ◆ emitFPIntBuiltin()

static Value* emitFPIntBuiltin | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | unsigned | IntrinsicID
| ) |  |
| static

Definition at line 338 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().

## ◆ EmitFromInt()

static Value* EmitFromInt | ( | CodeGenFunction & | CGF,
|  | llvm::Value * | V,
|  | QualType | T,
|  | llvm::Type * | ResultType
| ) |  |
| static

Definition at line 86 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, and clang::CodeGen::CodeGenFunction::EmitFromMemory().

Referenced by EmitBinaryAtomicPost(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().

## ◆ emitLibraryCall()

static RValue emitLibraryCall | ( | CodeGenFunction & | CGF,
|  | const FunctionDecl * | FD,
|  | const CallExpr * | E,
|  | llvm::Constant * | calleeValue
| ) |  |
| static

Definition at line 387 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CGCallee::forDirect(), clang::CallExpr::getCallee(), and clang::Expr::getType().

## ◆ EmitMSVCRTSetJmp()

static RValue EmitMSVCRTSetJmp | ( | CodeGenFunction & | CGF,
|  | MSVCSetJmpKind | SJKind,
|  | const CallExpr * | E
| ) |  |
| static

MSVC handles setjmp a bit differently on different platforms.

On every architecture except 32-bit x86, the frame address is passed. On x86, extra parameters can be passed as variadic arguments, but we always pass none.

Definition at line 770 of file CGBuiltin.cpp.

References clang::CodeGen::Type.

## ◆ EmitNontemporalLoad()

static Value* EmitNontemporalLoad | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E
| ) |  |
| static

Definition at line 141 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), and clang::CodeGen::LValue::setNontemporal().

## ◆ EmitNontemporalStore()

static Value* EmitNontemporalStore | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E
| ) |  |
| static

Definition at line 127 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::CodeGenFunction::EmitToMemory(), clang::CallExpr::getArg(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue(), and clang::CodeGen::LValue::setNontemporal().

## ◆ EmitOverflowIntrinsic()

static llvm::Value* EmitOverflowIntrinsic | ( | CodeGenFunction & | CGF,
|  | const llvm::Intrinsic::ID | IntrinsicID,
|  | llvm::Value * | X,
|  | llvm::Value * | Y,
|  | llvm::Value *& | Carry
| ) |  |
| static

Emit a call to llvm.

{sadd,uadd,ssub,usub,smul,umul}.with.overflow.* depending on IntrinsicID.

- CGF The current codegen function.
- IntrinsicID The ID for the Intrinsic we wish to generate.
- X The first argument to the llvm.*.with.overflow.*.
- Y The second argument to the llvm.*.with.overflow.*.
- Carry The carry returned by the llvm.*.with.overflow.*.
  Returns
    The result (i.e. sum/product) returned by the intrinsic.

Definition at line 402 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), and X.

Referenced by EmitCheckedMixedSignMultiply().

## ◆ emitRangedBuiltin()

static Value* emitRangedBuiltin | ( | CodeGenFunction & | CGF,
|  | unsigned | IntrinsicID,
|  | int | low,
|  | int | high
| ) |  |
| static

Definition at line 417 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CodeGen::CodeGenFunction::getLLVMContext().

## ◆ EmitScalarFMAExpr()

static Value* EmitScalarFMAExpr | ( | CodeGenFunction & | CGF,
|  | MutableArrayRef< Value *> | Ops,
|  | Value * | Upper,
|  | bool | ZeroMask = `false`,
|  | unsigned | PTIdx = `0`,
|  | bool | NegAcc = `false`
| ) |  |
| static

Definition at line 9406 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, EmitX86ScalarSelect(), fma, and clang::CodeGen::CodeGenModule::getIntrinsic().

## ◆ EmitSignBit()

static Value* EmitSignBit | ( | CodeGenFunction & | CGF,
|  | Value * | V
| ) |  |
| static

Emit the computation of the sign bit for a floating point value.

Returns the i1 sign bit value.

Definition at line 358 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenFunction::getTarget(), clang::TargetInfo::isBigEndian(), and clang::CodeGen::Type.

## ◆ EmitSpecialRegisterBuiltin()

static Value* EmitSpecialRegisterBuiltin | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | llvm::Type * | RegisterType,
|  | llvm::Type * | ValueType,
|  | bool | IsRead,
|  | StringRef | SysReg = `""`
| ) |  |
| static

Definition at line 5704 of file CGBuiltin.cpp.

## ◆ EmitSystemZIntrinsicWithCC()

static Value* EmitSystemZIntrinsicWithCC | ( | CodeGenFunction & | CGF,
|  | unsigned | IntrinsicID,
|  | const CallExpr * | E
| ) |  |
| static

Handle a SystemZ function in which the final argument is a pointer to an int that receives the post-instruction CC value.

At the LLVM level this is represented as a function that returns a {result, cc} pair.

Definition at line 12155 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CallExpr::getNumArgs().

## ◆ EmitTargetArchBuiltinExpr()

static Value* EmitTargetArchBuiltinExpr | ( | CodeGenFunction * | CGF,
|  | unsigned | BuiltinID,
|  | const CallExpr * | E,
|  | llvm::Triple::ArchType | Arch
| ) |  |
| static

Definition at line 4035 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::EmitAArch64BuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitAMDGPUBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitARMBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitHexagonBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitNVPTXBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitPPCBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitSystemZBuiltinExpr(), clang::CodeGen::CodeGenFunction::EmitWebAssemblyBuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitX86BuiltinExpr().

Referenced by clang::CodeGen::CodeGenFunction::EmitTargetBuiltinExpr().

## ◆ emitTernaryBuiltin()

static Value* emitTernaryBuiltin | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | unsigned | IntrinsicID
| ) |  |
| static

Definition at line 326 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().

Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().

## ◆ EmitToInt()

static Value* EmitToInt | ( | CodeGenFunction & | CGF,
|  | llvm::Value * | V,
|  | QualType | T,
|  | llvm::IntegerType * | IntType
| ) |  |
| static

Emit the conversions required to turn the given value into an integer of the given size.

Definition at line 75 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, and clang::CodeGen::CodeGenFunction::EmitToMemory().

Referenced by EmitBinaryAtomicPost(), MakeAtomicCmpXchgValue(), and MakeBinaryAtomicValue().

## ◆ emitUnaryBuiltin()

static Value* emitUnaryBuiltin | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | unsigned | IntrinsicID
| ) |  |
| static

Definition at line 305 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().

Referenced by clang::CodeGen::CodeGenFunction::EmitBuiltinExpr().

## ◆ EmitX86Abs()

static Value* EmitX86Abs | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops
| ) |  |
| static

Definition at line 9281 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, and clang::CodeGen::Type.

## ◆ EmitX86AddSubSatExpr()

static Value* EmitX86AddSubSatExpr | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops,
|  | bool | IsSigned,
|  | bool | IsAddition
| ) |  |
| static

Definition at line 9511 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CallExpr::getArg(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Expr::IgnoreParenCasts(), and clang::CodeGen::Type.

## ◆ EmitX86BitTestIntrinsic()

static llvm::Value* EmitX86BitTestIntrinsic | ( | CodeGenFunction & | CGF,
|  | BitTest | BT,
|  | const CallExpr * | E,
|  | Value * | BitBase,
|  | Value * | BitPos
| ) |  |
| static

Definition at line 634 of file CGBuiltin.cpp.

References bitActionToX86BTCode(), clang::CodeGen::CodeGenFunction::Builder, clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::CodeGen::CodeGenTypeCache::Int8Ty, and clang::CodeGen::Type.

Referenced by EmitBitTestIntrinsic().

## ◆ EmitX86CompressStore()

static Value* EmitX86CompressStore | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops
| ) |  |
| static

Definition at line 9142 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::getIntrinsic(), getMaskVecValue(), and clang::CodeGen::Type.

## ◆ EmitX86ConvertToMask()

static Value* EmitX86ConvertToMask | ( | CodeGenFunction & | CGF,
|  | Value * | In
| ) |  |
| static

Definition at line 9276 of file CGBuiltin.cpp.

References EmitX86MaskedCompare().

## ◆ EmitX86ExpandLoad()

static Value* EmitX86ExpandLoad | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops
| ) |  |
| static

Definition at line 9125 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::getIntrinsic(), getMaskVecValue(), and clang::CodeGen::Type.

## ◆ EmitX86FMAExpr()

static Value* EmitX86FMAExpr | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops,
|  | unsigned | BuiltinID,
|  | bool | IsAddSub
| ) |  |
| static

Definition at line 9301 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, EmitX86Select(), fma, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CodeGen::Type.

## ◆ EmitX86FunnelShift()

static Value* EmitX86FunnelShift | ( | CodeGenFunction & | CGF,
|  | Value * | Op0,
|  | Value * | Op1,
|  | Value * | Amt,
|  | bool | IsRight
| ) |  |
| static

Definition at line 9173 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CodeGen::Type.

## ◆ EmitX86MaskedCompare()

static Value* EmitX86MaskedCompare | ( | CodeGenFunction & | CGF,
|  | unsigned | CC,
|  | bool | Signed,
|  | ArrayRef< Value *> | Ops
| ) |  |
| static

Definition at line 9242 of file CGBuiltin.cpp.

Referenced by EmitX86ConvertToMask().

## ◆ EmitX86MaskedCompareResult()

static Value* EmitX86MaskedCompareResult | ( | CodeGenFunction & | CGF,
|  | Value * | Cmp,
|  | unsigned | NumElts,
|  | Value * | MaskIn
| ) |  |
| static

Definition at line 9219 of file CGBuiltin.cpp.

## ◆ EmitX86MaskedLoad()

static Value* EmitX86MaskedLoad | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops,
|  | unsigned | Align
| ) |  |
| static

Definition at line 9113 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), and getMaskVecValue().

## ◆ EmitX86MaskedStore()

static Value* EmitX86MaskedStore | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops,
|  | unsigned | Align
| ) |  |
| static

Definition at line 9100 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), and getMaskVecValue().

## ◆ EmitX86MaskLogic()

static Value* EmitX86MaskLogic | ( | CodeGenFunction & | CGF,
|  | Instruction::BinaryOps | Opc,
|  | ArrayRef< Value *> | Ops,
|  | bool | InvertLHS = `false`
| ) |  |
| static

Definition at line 9159 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), and getMaskVecValue().

## ◆ EmitX86MinMax()

static Value* EmitX86MinMax | ( | CodeGenFunction & | CGF,
|  | ICmpInst::Predicate | Pred,
|  | ArrayRef< Value *> | Ops
| ) |  |
| static

Definition at line 9291 of file CGBuiltin.cpp.

## ◆ EmitX86Muldq()

static Value* EmitX86Muldq | ( | CodeGenFunction & | CGF,
|  | bool | IsSigned,
|  | ArrayRef< Value *> | Ops
| ) |  |
| static

Definition at line 9446 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenTypeCache::Int64Ty, and clang::CodeGen::Type.

## ◆ EmitX86ScalarSelect()

static Value* EmitX86ScalarSelect | ( | CodeGenFunction & | CGF,
|  | Value * | Mask,
|  | Value * | Op0,
|  | Value * | Op1
| ) |  |
| static

Definition at line 9204 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, and clang::CodeGen::CGBuilderTy::CreateBitCast().

Referenced by EmitScalarFMAExpr().

## ◆ EmitX86Select()

static Value* EmitX86Select | ( | CodeGenFunction & | CGF,
|  | Value * | Mask,
|  | Value * | Op0,
|  | Value * | Op1
| ) |  |
| static

Definition at line 9191 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, and getMaskVecValue().

Referenced by EmitX86FMAExpr(), and EmitX86Ternlog().

## ◆ EmitX86SExtMask()

static Value* EmitX86SExtMask | ( | CodeGenFunction & | CGF,
|  | Value * | Op,
|  | llvm::Type * | DstTy
| ) |  |
| static

Definition at line 9503 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, and getMaskVecValue().

## ◆ EmitX86Ternlog()

static Value* EmitX86Ternlog | ( | CodeGenFunction & | CGF,
|  | bool | ZeroMask,
|  | ArrayRef< Value *> | Ops
| ) |  |
| static

Definition at line 9475 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, EmitX86Select(), clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CodeGen::Type.

## ◆ EncompassingIntegerType()

static struct WidthAndSignedness EncompassingIntegerType | ( | ArrayRef< struct WidthAndSignedness > | Types | ) |
| static

Definition at line 448 of file CGBuiltin.cpp.

## ◆ findNeonIntrinsicInMap()

static const NeonIntrinsicInfo* findNeonIntrinsicInMap | ( | ArrayRef< NeonIntrinsicInfo > | IntrinsicMap,
|  | unsigned | BuiltinID,
|  | bool & | MapProvenSorted
| ) |  |
| static

Definition at line 4915 of file CGBuiltin.cpp.

## ◆ getBitTestAtomicOrdering()

static llvm::AtomicOrdering getBitTestAtomicOrdering | ( | BitTest::InterlockingKind | I | ) |
| static

Definition at line 666 of file CGBuiltin.cpp.

Referenced by EmitBitTestIntrinsic().

## ◆ getDefaultBuiltinObjectSizeResult()

static llvm::Value* getDefaultBuiltinObjectSizeResult | ( | unsigned | Type,
|  | llvm::IntegerType * | ResType
| ) |  |
| static

Definition at line 492 of file CGBuiltin.cpp.

References areBOSTypesCompatible(), clang::Decl::getAttr(), clang::Stmt::getBeginLoc(), clang::Expr::HasSideEffects(), clang::Expr::IgnoreParenImpCasts(), clang::Expr::tryEvaluateObjectSize(), and clang::CodeGen::Type.

## ◆ GetFloatNeonType()

static llvm::VectorType* GetFloatNeonType | ( | CodeGenFunction * | CGF,
|  | NeonTypeFlags | IntTypeFlags
| ) |  |
| static

Definition at line 4120 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenTypeCache::DoubleTy, clang::CodeGen::CodeGenTypeCache::FloatTy, clang::NeonTypeFlags::getEltType(), clang::CodeGen::CodeGenTypeCache::HalfTy, clang::NeonTypeFlags::Int16, clang::NeonTypeFlags::Int32, clang::NeonTypeFlags::Int64, and clang::NeonTypeFlags::isQuad().

## ◆ getIntegerWidthAndSignedness()

static WidthAndSignedness getIntegerWidthAndSignedness | ( | const clang::ASTContext & | context,
|  | const clang::QualType | Type
| ) |  |
| static

Definition at line 436 of file CGBuiltin.cpp.

References clang::ASTContext::getTypeInfo(), clang::Type::isBooleanType(), clang::Type::isIntegerType(), clang::Type::isSignedIntegerType(), and clang::TypeInfo::Width.

## ◆ getMaskVecValue()

static Value* getMaskVecValue | ( | CodeGenFunction & | CGF,
|  | Value * | Mask,
|  | unsigned | NumElts
| ) |  |
| static

Definition at line 9080 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, and clang::CodeGen::CGBuilderTy::CreateBitCast().

Referenced by EmitX86CompressStore(), EmitX86ExpandLoad(), EmitX86MaskedLoad(), EmitX86MaskedStore(), EmitX86MaskLogic(), EmitX86Select(), and EmitX86SExtMask().

## ◆ GetNeonType()

static llvm::VectorType* GetNeonType | ( | CodeGenFunction * | CGF,
|  | NeonTypeFlags | TypeFlags,
|  | bool | HasLegalHalfType = `true`,
|  | bool | V1Ty = `false`
| ) |  |
| static

Definition at line 4085 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenTypeCache::DoubleTy, clang::NeonTypeFlags::Float16, clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, clang::CodeGen::CodeGenTypeCache::FloatTy, clang::NeonTypeFlags::getEltType(), clang::CodeGen::CodeGenTypeCache::HalfTy, clang::NeonTypeFlags::Int16, clang::CodeGen::CodeGenTypeCache::Int16Ty, clang::NeonTypeFlags::Int32, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::NeonTypeFlags::Int64, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::NeonTypeFlags::Int8, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::NeonTypeFlags::isQuad(), clang::NeonTypeFlags::Poly128, clang::NeonTypeFlags::Poly16, clang::NeonTypeFlags::Poly64, and clang::NeonTypeFlags::Poly8.

Referenced by EmitAArch64TblBuiltinExpr(), and clang::CodeGen::CodeGenFunction::EmitCommonNeonBuiltinExpr().

## ◆ getOSLogArgType()

static CanQualType getOSLogArgType | ( | ASTContext & | C,
|  | int | Size
| ) |  |
| static

Get the argument type for arguments to os_log_helper.

Definition at line 1047 of file CGBuiltin.cpp.

References clang::ASTContext::getCanonicalType(), and clang::ASTContext::getIntTypeForBitwidth().

## ◆ HasExtraNeonArgument()

static bool HasExtraNeonArgument | ( | unsigned | BuiltinID | ) |
| static

Return true if BuiltinID is an overloaded Neon intrinsic with an extra argument that specifies the vector type.

Definition at line 5767 of file CGBuiltin.cpp.

## ◆ isSpecialMixedSignMultiply()

static bool isSpecialMixedSignMultiply | ( | unsigned | BuiltinID,
|  | WidthAndSignedness | Op1Info,
|  | WidthAndSignedness | Op2Info,
|  | WidthAndSignedness | ResultInfo
| ) |  |
| static

Determine if a binop is a checked mixed-sign multiply we can specialize.

Definition at line 1233 of file CGBuiltin.cpp.

References max().

Referenced by EmitCheckedMixedSignMultiply().

## ◆ MakeAtomicCmpXchgValue()

static Value* MakeAtomicCmpXchgValue | ( | CodeGenFunction & | CGF,
|  | const CallExpr * | E,
|  | bool | ReturnBool
| ) |  |
| static

Utility to insert an atomic cmpxchg instruction.

Parameters

  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.

Returns
  result of cmpxchg, according to ReturnBool

Note: In order to lower Microsoft's _InterlockedCompareExchange* intrinsics invoke the function EmitAtomicCmpXchgForMSIntrin.

Definition at line 207 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), and clang::CodeGen::Type.

## ◆ MakeBinaryAtomicValue()

static Value* MakeBinaryAtomicValue | ( | CodeGenFunction & | CGF,
|  | llvm::AtomicRMWInst::BinOp | Kind,
|  | const CallExpr * | E,
|  | AtomicOrdering | Ordering = `AtomicOrdering::SequentiallyConsistent`
| ) |  |
| static

Utility to insert an atomic instruction based on Intrinsic::ID and the expression node.

Definition at line 99 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitFromInt(), clang::CodeGen::CodeGenFunction::EmitScalarExpr(), EmitToInt(), clang::CallExpr::getArg(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getLLVMContext(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::ASTContext::hasSameUnqualifiedType(), clang::Type::isPointerType(), and clang::CodeGen::Type.

Referenced by EmitBinaryAtomic().

## ◆ packTBLDVectorList()

static Value* packTBLDVectorList | ( | CodeGenFunction & | CGF,
|  | ArrayRef< Value *> | Ops,
|  | Value * | ExtOp,
|  | Value * | IndexOp,
|  | llvm::Type * | ResTy,
|  | unsigned | IntID,
|  | const char * | Name
| ) |  |
| static

Definition at line 5628 of file CGBuiltin.cpp.

## ◆ TypeRequiresBuiltinLaunder()

static bool TypeRequiresBuiltinLaunder | ( | CodeGenModule & | CGM,
|  | QualType | Ty
| ) |  |
| static

Determine if the specified type requires laundering by checking if it is a dynamic class type or contains a subobject which is a dynamic class type.

Definition at line 1451 of file CGBuiltin.cpp.

References clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), and TypeRequiresBuiltinLaunderImp().

## ◆ TypeRequiresBuiltinLaunderImp()

static bool TypeRequiresBuiltinLaunderImp | ( | const ASTContext & | Ctx,
|  | QualType | Ty,
|  | llvm::SmallPtrSetImpl< const Decl *> & | Seen
| ) |  |
| static

Definition at line 1423 of file CGBuiltin.cpp.

References clang::ASTContext::getAsArrayType(), clang::Type::getAsCXXRecordDecl(), and clang::ASTContext::getBaseElementType().

Referenced by TypeRequiresBuiltinLaunder().

## Variable Documentation

## ◆ AArch64SIMDIntrinsicMap

const NeonIntrinsicInfo AArch64SIMDIntrinsicMap[]
| static

Definition at line 4521 of file CGBuiltin.cpp.

## ◆ AArch64SIMDIntrinsicsProvenSorted

bool AArch64SIMDIntrinsicsProvenSorted = false
| static

Definition at line 4910 of file CGBuiltin.cpp.

## ◆ AArch64SISDIntrinsicMap

const NeonIntrinsicInfo AArch64SISDIntrinsicMap[]
| static

Definition at line 4678 of file CGBuiltin.cpp.

## ◆ AArch64SISDIntrinsicsProvenSorted

bool AArch64SISDIntrinsicsProvenSorted = false
| static

Definition at line 4911 of file CGBuiltin.cpp.

## ◆ ARMSIMDIntrinsicMap

const NeonIntrinsicInfo ARMSIMDIntrinsicMap[]
| static

Definition at line 4244 of file CGBuiltin.cpp.

## ◆ NEONSIMDIntrinsicsProvenSorted

bool NEONSIMDIntrinsicsProvenSorted = false
| static

Definition at line 4908 of file CGBuiltin.cpp.