clang  6.0.0svn
Macros | Enumerations | Functions | Variables
CGBuiltin.cpp File Reference
#include "CGCXXABI.h"
#include "CGObjCRuntime.h"
#include "CGOpenCLRuntime.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/Analysis/Analyses/OSLog.h"
#include "clang/Basic/TargetBuiltins.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/CodeGen/CGFunctionInfo.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(type)
 

Enumerations

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 ValueEmitToInt (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 ValueEmitFromInt (CodeGenFunction &CGF, llvm::Value *V, QualType T, llvm::Type *ResultType)
 
static ValueMakeBinaryAtomicValue (CodeGenFunction &CGF, llvm::AtomicRMWInst::BinOp Kind, const CallExpr *E)
 Utility to insert an atomic instruction based on Instrinsic::ID and the expression node. More...
 
static ValueEmitNontemporalStore (CodeGenFunction &CGF, const CallExpr *E)
 
static ValueEmitNontemporalLoad (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 Instrinsic::ID and the expression node, where the return value is the result of the operation. More...
 
static ValueMakeAtomicCmpXchgValue (CodeGenFunction &CGF, const CallExpr *E, bool ReturnBool)
 Utility to insert an atomic cmpxchg instruction. More...
 
static ValueemitUnaryBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
 
static ValueemitBinaryBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
 
static ValueemitTernaryBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
 
static ValueemitFPIntBuiltin (CodeGenFunction &CGF, const CallExpr *E, unsigned IntrinsicID)
 
static ValueEmitFAbs (CodeGenFunction &CGF, Value *V)
 EmitFAbs - Emit a call to .fabs(). More...
 
static ValueEmitSignBit (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::ValueEmitOverflowIntrinsic (CodeGenFunction &CGF, const llvm::Intrinsic::ID IntrinsicID, llvm::Value *X, llvm::Value *Y, llvm::Value *&Carry)
 Emit a call to llvm. More...
 
static ValueemitRangedBuiltin (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::ValuegetDefaultBuiltinObjectSizeResult (unsigned Type, llvm::IntegerType *ResType)
 
static CanQualType getOSLogArgType (ASTContext &C, int Size)
 Get the argument type for arguments to os_log_helper. More...
 
static ValueEmitTargetArchBuiltinExpr (CodeGenFunction *CGF, unsigned BuiltinID, const CallExpr *E, llvm::Triple::ArchType Arch)
 
static llvm::VectorType * GetNeonType (CodeGenFunction *CGF, NeonTypeFlags TypeFlags, bool V1Ty=false)
 
static llvm::VectorType * GetFloatNeonType (CodeGenFunction *CGF, NeonTypeFlags IntTypeFlags)
 
static const NeonIntrinsicInfo * findNeonIntrinsicInMap (ArrayRef< NeonIntrinsicInfo > IntrinsicMap, unsigned BuiltinID, bool &MapProvenSorted)
 
static ValueEmitCommonNeonSISDBuiltinExpr (CodeGenFunction &CGF, const NeonIntrinsicInfo &SISDInfo, SmallVectorImpl< Value *> &Ops, const CallExpr *E)
 
static ValuepackTBLDVectorList (CodeGenFunction &CGF, ArrayRef< Value *> Ops, Value *ExtOp, Value *IndexOp, llvm::Type *ResTy, unsigned IntID, const char *Name)
 
static ValueEmitSpecialRegisterBuiltin (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 ValueEmitAArch64TblBuiltinExpr (CodeGenFunction &CGF, unsigned BuiltinID, const CallExpr *E, SmallVectorImpl< Value *> &Ops)
 
static ValuegetMaskVecValue (CodeGenFunction &CGF, Value *Mask, unsigned NumElts)
 
static ValueEmitX86MaskedStore (CodeGenFunction &CGF, SmallVectorImpl< Value *> &Ops, unsigned Align)
 
static ValueEmitX86MaskedLoad (CodeGenFunction &CGF, SmallVectorImpl< Value *> &Ops, unsigned Align)
 
static ValueEmitX86SubVectorBroadcast (CodeGenFunction &CGF, SmallVectorImpl< Value *> &Ops, llvm::Type *DstTy, unsigned SrcSizeInBits, unsigned Align)
 
static ValueEmitX86Select (CodeGenFunction &CGF, Value *Mask, Value *Op0, Value *Op1)
 
static ValueEmitX86MaskedCompare (CodeGenFunction &CGF, unsigned CC, bool Signed, SmallVectorImpl< Value *> &Ops)
 
static ValueEmitX86Abs (CodeGenFunction &CGF, ArrayRef< Value *> Ops)
 
static ValueEmitX86MinMax (CodeGenFunction &CGF, ICmpInst::Predicate Pred, ArrayRef< Value *> Ops)
 
static ValueEmitX86SExtMask (CodeGenFunction &CGF, Value *Op, llvm::Type *DstTy)
 
static ValueEmitSystemZIntrinsicWithCC (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)
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:9078

◆ 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 (   type)
Value:
{{ \
Intrinsic::nvvm_wmma_mma_sync_row_row_##type, \
Intrinsic::nvvm_wmma_mma_sync_row_row_##type##_satfinite, \
Intrinsic::nvvm_wmma_mma_sync_row_col_##type, \
Intrinsic::nvvm_wmma_mma_sync_row_col_##type##_satfinite, \
Intrinsic::nvvm_wmma_mma_sync_col_row_##type, \
Intrinsic::nvvm_wmma_mma_sync_col_row_##type##_satfinite, \
Intrinsic::nvvm_wmma_mma_sync_col_col_##type, \
Intrinsic::nvvm_wmma_mma_sync_col_col_##type##_satfinite \
}}
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.

◆ NEONMAP0

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

Definition at line 3429 of file CGBuiltin.cpp.

◆ NEONMAP1

#define NEONMAP1 (   NameBase,
  LLVMIntrinsic,
  TypeModifier 
)
Value:
{ #NameBase, NEON:: BI__builtin_neon_ ## NameBase, \
Intrinsic::LLVMIntrinsic, 0, TypeModifier }

Definition at line 3432 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 3436 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)

◆ 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 3390 of file CGBuiltin.cpp.

◆ MSVCIntrin

enum MSVCIntrin
strong

Definition at line 488 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 413 of file CGBuiltin.cpp.

◆ clamp()

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

Definition at line 43 of file CGBuiltin.cpp.

References max(), and min().

◆ EmitAArch64TblBuiltinExpr()

static Value* EmitAArch64TblBuiltinExpr ( CodeGenFunction CGF,
unsigned  BuiltinID,
const CallExpr E,
SmallVectorImpl< Value *> &  Ops 
)
static

◆ EmitBinaryAtomic()

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

Definition at line 147 of file CGBuiltin.cpp.

◆ 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 Instrinsic::ID and the expression node, where the return value is the result of the operation.

Definition at line 156 of file CGBuiltin.cpp.

◆ emitBinaryBuiltin()

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

Definition at line 244 of file CGBuiltin.cpp.

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

◆ EmitCommonNeonSISDBuiltinExpr()

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

◆ EmitFAbs()

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

◆ emitFPIntBuiltin()

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

Definition at line 267 of file CGBuiltin.cpp.

◆ EmitFromInt()

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

◆ emitLibraryCall()

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

Definition at line 316 of file CGBuiltin.cpp.

◆ EmitNontemporalLoad()

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

Definition at line 139 of file CGBuiltin.cpp.

◆ EmitNontemporalStore()

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

Definition at line 125 of file CGBuiltin.cpp.

◆ 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 331 of file CGBuiltin.cpp.

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

◆ emitRangedBuiltin()

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

◆ EmitSignBit()

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

◆ EmitSpecialRegisterBuiltin()

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

Definition at line 4624 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 9078 of file CGBuiltin.cpp.

References clang::CallExpr::getNumArgs().

◆ EmitTargetArchBuiltinExpr()

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

◆ emitTernaryBuiltin()

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

Definition at line 255 of file CGBuiltin.cpp.

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 73 of file CGBuiltin.cpp.

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

◆ emitUnaryBuiltin()

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

Definition at line 234 of file CGBuiltin.cpp.

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

◆ EmitX86Abs()

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

◆ EmitX86MaskedCompare()

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

Definition at line 7503 of file CGBuiltin.cpp.

◆ EmitX86MaskedLoad()

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

◆ EmitX86MaskedStore()

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

◆ EmitX86MinMax()

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

Definition at line 7558 of file CGBuiltin.cpp.

◆ EmitX86Select()

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

Definition at line 7490 of file CGBuiltin.cpp.

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

◆ EmitX86SExtMask()

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

◆ EmitX86SubVectorBroadcast()

static Value* EmitX86SubVectorBroadcast ( CodeGenFunction CGF,
SmallVectorImpl< Value *> &  Ops,
llvm::Type *  DstTy,
unsigned  SrcSizeInBits,
unsigned  Align 
)
static

◆ EncompassingIntegerType()

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

Definition at line 377 of file CGBuiltin.cpp.

◆ findNeonIntrinsicInMap()

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

Definition at line 3979 of file CGBuiltin.cpp.

◆ getDefaultBuiltinObjectSizeResult()

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

Definition at line 421 of file CGBuiltin.cpp.

◆ GetFloatNeonType()

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

◆ getIntegerWidthAndSignedness()

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

◆ getMaskVecValue()

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

◆ GetNeonType()

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

◆ getOSLogArgType()

static CanQualType getOSLogArgType ( ASTContext C,
int  Size 
)
static

Get the argument type for arguments to os_log_helper.

Definition at line 669 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 4687 of file CGBuiltin.cpp.

◆ MakeAtomicCmpXchgValue()

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

Utility to insert an atomic cmpxchg instruction.

Parameters
CGFThe current codegen function.
EBuiltin call expression to convert to cmpxchg. arg0 - address to operate on arg1 - value to compare with arg2 - new value
ReturnBoolSpecifies whether to return success flag of cmpxchg result or the old value.
Returns
result of cmpxchg, according to ReturnBool

Definition at line 202 of file CGBuiltin.cpp.

◆ MakeBinaryAtomicValue()

static Value* MakeBinaryAtomicValue ( CodeGenFunction CGF,
llvm::AtomicRMWInst::BinOp  Kind,
const CallExpr E 
)
static

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

Definition at line 97 of file CGBuiltin.cpp.

◆ 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 4548 of file CGBuiltin.cpp.

Variable Documentation

◆ AArch64SIMDIntrinsicMap

const NeonIntrinsicInfo AArch64SIMDIntrinsicMap[]
static

Definition at line 3658 of file CGBuiltin.cpp.

◆ AArch64SIMDIntrinsicsProvenSorted

bool AArch64SIMDIntrinsicsProvenSorted = false
static

Definition at line 3974 of file CGBuiltin.cpp.

◆ AArch64SISDIntrinsicMap

const NeonIntrinsicInfo AArch64SISDIntrinsicMap[]
static

Definition at line 3773 of file CGBuiltin.cpp.

◆ AArch64SISDIntrinsicsProvenSorted

bool AArch64SISDIntrinsicsProvenSorted = false
static

Definition at line 3975 of file CGBuiltin.cpp.

◆ ARMSIMDIntrinsicMap

const NeonIntrinsicInfo ARMSIMDIntrinsicMap[]
static

Definition at line 3441 of file CGBuiltin.cpp.

◆ NEONSIMDIntrinsicsProvenSorted

bool NEONSIMDIntrinsicsProvenSorted = false
static

Definition at line 3972 of file CGBuiltin.cpp.