clang 22.0.0git
clang::CodeGen::CodeGenFunction Class Reference

CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CodeGenFunction.h"

Inheritance diagram for clang::CodeGen::CodeGenFunction:
[legend]

Classes

class  AbstractCallee
 An abstract representation of regular/ObjC call/message targets. More...
struct  AllocaTrackerRAII
class  ArrayInitLoopExprScope
 The scope of an ArrayInitLoopExpr. More...
class  AutoVarEmission
struct  AwaitSuspendWrapperInfo
class  CallLifetimeEnd
class  CGAtomicOptionsRAII
class  CGCapturedStmtInfo
 API for captured statement code generation. More...
class  CGCapturedStmtRAII
 RAII for correct setting/restoring of CapturedStmtInfo. More...
struct  CGCoroInfo
class  CGFPOptionsRAII
struct  CleanupDeactivationScope
class  ConditionalEvaluation
 An object to manage conditionally-evaluated expressions. More...
class  ConstantEmission
struct  CXXDefaultArgExprScope
class  CXXDefaultInitExprScope
 The scope of a CXXDefaultInitExpr. More...
struct  DeferredDeactivateCleanup
class  FakeUse
class  FieldConstructionScope
 A scope within which we are constructing the fields of an object which might use a CXXDefaultInitExpr. More...
class  FinallyInfo
 A class controlling the emission of a finally block. More...
struct  FMVResolverOption
class  InlinedInheritingConstructorScope
struct  JumpDest
 A jump destination is an abstract label, branching to which may require a jump out through normal cleanups. More...
class  LexicalScope
struct  LifetimeExtendedCleanupHeader
 Header for data within LifetimeExtendedCleanupStack. More...
struct  OMPBuilderCBHelpers
class  OMPCancelStackRAII
 Controls insertion of cancellation exit blocks in worksharing constructs. More...
class  OMPLocalDeclMapRAII
 Save/restore original map of previously emitted local vars in case when we need to duplicate emission of the same code several times in the same function for OpenMP code. More...
class  OMPMapVars
 The class used to assign some variables some temporarily addresses. More...
class  OMPPrivateScope
 The scope used to remap some variables as private in the OpenMP loop body (or other captured region emitted without outlining), and to restore old vars back on exit. More...
struct  OMPTargetDataInfo
class  OpaqueValueMapping
 An RAII object to set (and then clear) a mapping for an OpaqueValueExpr. More...
class  OpaqueValueMappingData
 A non-RAII class containing all the information about a bound opaque value. More...
class  ParamValue
class  ParentLoopDirectiveForScanRegion
 Manages parent directive for scan directives. More...
class  PeepholeProtection
 An object which temporarily prevents a value from being destroyed by aggressive peephole optimizations that assume that all uses of a value have been realized in the IR. More...
struct  PrototypeWrapper
class  RunCleanupsScope
 Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited. More...
class  SanitizerScope
 RAII object to set/unset CodeGenFunction::IsSanitizerScope. More...
class  StmtExprEvaluation
 An RAII object to record that we're evaluating a statement expression. More...
struct  VlaSizePair
struct  VPtr
 Struct with all information about dynamic [sub]class needed to set vptr. More...

Public Types

enum class  MSVCIntrin {
  _BitScanForward , _BitScanReverse , _InterlockedAnd , _InterlockedCompareExchange ,
  _InterlockedDecrement , _InterlockedExchange , _InterlockedExchangeAdd , _InterlockedExchangeSub ,
  _InterlockedIncrement , _InterlockedOr , _InterlockedXor , _InterlockedExchangeAdd_acq ,
  _InterlockedExchangeAdd_rel , _InterlockedExchangeAdd_nf , _InterlockedExchange_acq , _InterlockedExchange_rel ,
  _InterlockedExchange_nf , _InterlockedCompareExchange_acq , _InterlockedCompareExchange_rel , _InterlockedCompareExchange_nf ,
  _InterlockedCompareExchange128 , _InterlockedCompareExchange128_acq , _InterlockedCompareExchange128_rel , _InterlockedCompareExchange128_nf ,
  _InterlockedOr_acq , _InterlockedOr_rel , _InterlockedOr_nf , _InterlockedXor_acq ,
  _InterlockedXor_rel , _InterlockedXor_nf , _InterlockedAnd_acq , _InterlockedAnd_rel ,
  _InterlockedAnd_nf , _InterlockedIncrement_acq , _InterlockedIncrement_rel , _InterlockedIncrement_nf ,
  _InterlockedDecrement_acq , _InterlockedDecrement_rel , _InterlockedDecrement_nf , __fastfail
}
enum class  VTableAuthMode { Authenticate , MustTrap , UnsafeUbsanStrip }
enum  CFITypeCheckKind {
  CFITCK_VCall , CFITCK_NVCall , CFITCK_DerivedCast , CFITCK_UnrelatedCast ,
  CFITCK_ICall , CFITCK_NVMFCall , CFITCK_VMFCall
}
enum  TypeCheckKind {
  TCK_Load , TCK_Store , TCK_ReferenceBinding , TCK_MemberAccess ,
  TCK_MemberCall , TCK_ConstructorCall , TCK_DowncastPointer , TCK_DowncastReference ,
  TCK_Upcast , TCK_UpcastToVirtualBase , TCK_NonnullAssign , TCK_DynamicOperation
}
 Situations in which we might emit a check for the suitability of a pointer or glvalue. More...
enum  ExprValueKind { EVK_RValue , EVK_NonRValue }
enum class  GuardKind { VariableGuard , TlsGuard }
enum  { NotSubtraction = false , IsSubtraction = true }
 An enumeration which makes it easier to specify whether or not an operation is a subtraction. More...
enum  BuiltinCheckKind { BCK_CTZPassedZero , BCK_CLZPassedZero , BCK_AssumePassedFalse }
 Specifies which type of sanitizer check to apply when handling a particular builtin. More...
enum class  EvaluationOrder { Default , ForceLeftToRight , ForceRightToLeft }
typedef std::pair< llvm::Value *, llvm::Value * > ComplexPairTy
typedef llvm::function_ref< void(CodeGenFunction &, const OMPLoopDirective &, JumpDest)> CodeGenLoopTy
typedef llvm::function_ref< void(CodeGenFunction &, SourceLocation, const unsigned, const bool)> CodeGenOrderedTy
typedef llvm::function_ref< std::pair< LValue, LValue >(CodeGenFunction &, const OMPExecutableDirective &S)> CodeGenLoopBoundsTy
typedef llvm::function_ref< std::pair< llvm::Value *, llvm::Value * >(CodeGenFunction &, const OMPExecutableDirective &S, Address LB, Address UB)> CodeGenDispatchBoundsTy
typedef llvm::DenseMap< const Decl *, AddressDeclMapTy
using SourceLocExprScopeGuard
typedef void Destroyer(CodeGenFunction &CGF, Address addr, QualType ty)
typedef llvm::SmallVector< VPtr, 4 > VPtrsVector
typedef llvm::SmallPtrSet< const CXXRecordDecl *, 4 > VisitedVirtualBasesSetTy
typedef void SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address)
typedef const llvm::function_ref< void(CodeGenFunction &, llvm::Function *, const OMPTaskDataTy &)> TaskGenTy

Public Member Functions

void InsertHelper (llvm::Instruction *I, const llvm::Twine &Name, llvm::BasicBlock::iterator InsertPt) const
 CGBuilder insert helper.
bool isCoroutine () const
bool inSuspendBlock () const
llvm::Function * generateAwaitSuspendWrapper (Twine const &CoroName, Twine const &SuspendPointName, CoroutineSuspendExpr const &S)
bool hasLabelBeenSeenInCurrentScope () const
 Return true if a label was seen in the current scope.
llvm::Instruction * getPostAllocaInsertPoint ()
 Return PostAllocaInsertPt.
bool checkIfFunctionMustProgress ()
 Returns true if a function must make progress, which means the mustprogress attribute can be added.
bool checkIfLoopMustProgress (const Expr *, bool HasEmptyBody)
 Returns true if a loop must make progress, which means the mustprogress attribute can be added.
llvm::BasicBlock * EmitLandingPad ()
 Emits a landing pad for the current EH stack.
llvm::BasicBlock * getInvokeDestImpl ()
template<class T>
DominatingValue< T >::saved_type saveValueInCond (T value)
bool isSEHTryScope () const
 Returns true inside SEH __try blocks.
bool isCleanupPadScope () const
 Returns true while emitting a cleanuppad.
template<class T, class... As>
void pushFullExprCleanup (CleanupKind kind, As... A)
 pushFullExprCleanup - Push a cleanup to be run at the end of the current full-expression.
template<class T, class... As>
void pushCleanupAfterFullExpr (CleanupKind Kind, As... A)
 Queue a cleanup to be pushed after finishing the current full-expression, potentially with an active flag.
template<class T, class... As>
void pushCleanupAfterFullExprWithActiveFlag (CleanupKind Kind, RawAddress ActiveFlag, As... A)
template<class T, class... As>
void pushCleanupAndDeferDeactivation (CleanupKind Kind, As... A)
void initFullExprCleanup ()
 Set up the last cleanup that was pushed as a conditional full-expression cleanup.
void initFullExprCleanupWithFlag (RawAddress ActiveFlag)
RawAddress createCleanupActiveFlag ()
void PushDestructorCleanup (QualType T, Address Addr)
 PushDestructorCleanup - Push a cleanup to call the complete-object destructor of an object of the given type at the given address.
void PushDestructorCleanup (const CXXDestructorDecl *Dtor, QualType T, Address Addr)
 PushDestructorCleanup - Push a cleanup to call the complete-object variant of the given destructor on the object at the given address.
void PopCleanupBlock (bool FallThroughIsBranchThrough=false, bool ForDeactivation=false)
 PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups.
void DeactivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP)
 DeactivateCleanupBlock - Deactivates the given cleanup block.
void ActivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP)
 ActivateCleanupBlock - Activates an initially-inactive cleanup.
void PopCleanupBlocks (EHScopeStack::stable_iterator OldCleanupStackSize, std::initializer_list< llvm::Value ** > ValuesToReload={})
 Takes the old cleanup stack size and emits the cleanup blocks that have been added.
void PopCleanupBlocks (EHScopeStack::stable_iterator OldCleanupStackSize, size_t OldLifetimeExtendedStackSize, std::initializer_list< llvm::Value ** > ValuesToReload={})
 Takes the old cleanup stack size and emits the cleanup blocks that have been added, then adds all lifetime-extended cleanups from the given position to the stack.
void ResolveBranchFixups (llvm::BasicBlock *Target)
JumpDest getJumpDestInCurrentScope (llvm::BasicBlock *Target)
 The given basic block lies in the current EH scope, but may be a target of a potentially scope-crossing jump; get a stable handle to which we can perform this jump later.
JumpDest getJumpDestInCurrentScope (StringRef Name=StringRef())
 The given basic block lies in the current EH scope, but may be a target of a potentially scope-crossing jump; get a stable handle to which we can perform this jump later.
void EmitBranchThroughCleanup (JumpDest Dest)
 EmitBranchThroughCleanup - Emit a branch from the current insert block through the normal cleanup handling code (if any) and then on to.
bool isObviouslyBranchWithoutCleanups (JumpDest Dest) const
 isObviouslyBranchWithoutCleanups - Return true if a branch to the specified destination obviously has no cleanups to run.
void popCatchScope ()
 popCatchScope - Pops the catch scope at the top of the EHScope stack, emitting any required code (other than the catch handlers themselves).
llvm::BasicBlock * getEHResumeBlock (bool isCleanup)
llvm::BasicBlock * getEHDispatchBlock (EHScopeStack::stable_iterator scope)
llvm::BasicBlock * getFuncletEHDispatchBlock (EHScopeStack::stable_iterator scope)
bool isInConditionalBranch () const
 isInConditionalBranch - Return true if we're currently emitting one branch or the other of a conditional expression.
void setBeforeOutermostConditional (llvm::Value *value, Address addr, CodeGenFunction &CGF)
std::pair< bool, boolgetIsCounterPair (const Stmt *S) const
void markStmtAsUsed (bool Skipped, const Stmt *S)
void markStmtMaybeUsed (const Stmt *S)
void incrementProfileCounter (const Stmt *S, llvm::Value *StepV=nullptr)
 Increment the profiler's counter for the given statement by StepV.
bool isMCDCCoverageEnabled () const
void maybeCreateMCDCCondBitmap ()
 Allocate a temp value on the stack that MCDC can use to track condition results.
bool isBinaryLogicalOp (const Expr *E) const
void maybeResetMCDCCondBitmap (const Expr *E)
 Zero-init the MCDC temp value.
void maybeUpdateMCDCTestVectorBitmap (const Expr *E)
 Increment the profiler's counter for the given expression by StepV.
void maybeUpdateMCDCCondBitmap (const Expr *E, llvm::Value *Val)
 Update the MCDC temp value with the condition's evaluated result.
uint64_t getProfileCount (const Stmt *S)
 Get the profiler's count for the given statement.
void setCurrentProfileCount (uint64_t Count)
 Set the profiler's current count.
uint64_t getCurrentProfileCount ()
 Get the profiler's current count.
void addInstToCurrentSourceAtom (llvm::Instruction *KeyInstruction, llvm::Value *Backup)
 See CGDebugInfo::addInstToCurrentSourceAtom.
void addInstToSpecificSourceAtom (llvm::Instruction *KeyInstruction, llvm::Value *Backup, uint64_t Atom)
 See CGDebugInfo::addInstToSpecificSourceAtom.
void addInstToNewSourceAtom (llvm::Instruction *KeyInstruction, llvm::Value *Backup)
 Add KeyInstruction and an optional Backup instruction to a new atom group (See ApplyAtomGroup for more info).
 CodeGenFunction (CodeGenModule &cgm, bool suppressNewContext=false)
 ~CodeGenFunction ()
CodeGenTypesgetTypes () const
ASTContextgetContext () const
CGDebugInfogetDebugInfo ()
void disableDebugInfo ()
void enableDebugInfo ()
bool shouldUseFusedARCCalls ()
const LangOptionsgetLangOpts () const
Address getExceptionSlot ()
 Returns a pointer to the function's exception object and selector slot, which is assigned in every landing pad.
Address getEHSelectorSlot ()
llvm::Value * getExceptionFromSlot ()
 Returns the contents of the function's exception object and selector slots.
llvm::Value * getSelectorFromSlot ()
RawAddress getNormalCleanupDestSlot ()
llvm::BasicBlock * getUnreachableBlock ()
llvm::BasicBlock * getInvokeDest ()
bool currentFunctionUsesSEHTry () const
const TargetInfogetTarget () const
llvm::LLVMContext & getLLVMContext ()
const TargetCodeGenInfogetTargetHooks () const
void pushIrregularPartialArrayCleanup (llvm::Value *arrayBegin, Address arrayEndPointer, QualType elementType, CharUnits elementAlignment, Destroyer *destroyer)
 pushIrregularPartialArrayCleanup - Push a NormalAndEHCleanup to destroy already-constructed elements of the given array.
void pushRegularPartialArrayCleanup (llvm::Value *arrayBegin, llvm::Value *arrayEnd, QualType elementType, CharUnits elementAlignment, Destroyer *destroyer)
 pushRegularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array.
void pushDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type)
 pushDestroy - Push the standard destructor for the given type as at least a normal cleanup.
void pushEHDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type)
 pushEHDestroy - Push the standard destructor for the given type as an EH-only cleanup.
void pushDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
void pushDestroyAndDeferDeactivation (QualType::DestructionKind dtorKind, Address addr, QualType type)
void pushDestroyAndDeferDeactivation (CleanupKind cleanupKind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
void pushLifetimeExtendedDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
void pushLifetimeExtendedDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type)
void pushCallObjectDeleteCleanup (const FunctionDecl *OperatorDelete, llvm::Value *CompletePtr, QualType ElementType)
void pushStackRestore (CleanupKind kind, Address SPMem)
void pushKmpcAllocFree (CleanupKind Kind, std::pair< llvm::Value *, llvm::Value * > AddrSizePair)
void emitDestroy (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray)
 emitDestroy - Immediately perform the destruction of the given object.
llvm::Function * generateDestroyHelper (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray, const VarDecl *VD)
 generateDestroyHelper - Generates a helper function which, when invoked, destroys the given object.
void emitArrayDestroy (llvm::Value *begin, llvm::Value *end, QualType elementType, CharUnits elementAlign, Destroyer *destroyer, bool checkZeroLength, bool useEHCleanup)
 emitArrayDestroy - Destroys all the elements of the given array, beginning from last to first.
DestroyergetDestroyer (QualType::DestructionKind destructionKind)
bool needsEHCleanup (QualType::DestructionKind kind)
 Determines whether an EH cleanup is required to destroy a type with the given destruction kind.
CleanupKind getCleanupKind (QualType::DestructionKind kind)
void GenerateObjCMethod (const ObjCMethodDecl *OMD)
 Generate an Objective-C method.
void StartObjCMethod (const ObjCMethodDecl *MD, const ObjCContainerDecl *CD)
 StartObjCMethod - Begin emission of an ObjCMethod.
void GenerateObjCGetter (ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID)
 GenerateObjCGetter - Synthesize an Objective-C property getter function.
void generateObjCGetterBody (const ObjCImplementationDecl *classImpl, const ObjCPropertyImplDecl *propImpl, const ObjCMethodDecl *GetterMothodDecl, llvm::Constant *AtomicHelperFn)
void GenerateObjCCtorDtorMethod (ObjCImplementationDecl *IMP, ObjCMethodDecl *MD, bool ctor)
void GenerateObjCSetter (ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID)
 GenerateObjCSetter - Synthesize an Objective-C property setter function for the given property.
void generateObjCSetterBody (const ObjCImplementationDecl *classImpl, const ObjCPropertyImplDecl *propImpl, llvm::Constant *AtomicHelperFn)
llvm::Value * EmitBlockLiteral (const BlockExpr *)
 Emit block literal.
llvm::Function * GenerateBlockFunction (GlobalDecl GD, const CGBlockInfo &Info, const DeclMapTy &ldm, bool IsLambdaConversionToBlock, bool BuildGlobalBlock)
llvm::Constant * GenerateCopyHelperFunction (const CGBlockInfo &blockInfo)
 Generate the copy-helper function for a block closure object: static void block_copy_helper(block_t *dst, block_t *src); The runtime will have previously initialized 'dst' by doing a bit-copy of 'src'.
llvm::Constant * GenerateDestroyHelperFunction (const CGBlockInfo &blockInfo)
 Generate the destroy-helper function for a block closure object: static void block_destroy_helper(block_t *theBlock);.
llvm::Constant * GenerateObjCAtomicSetterCopyHelperFunction (const ObjCPropertyImplDecl *PID)
 GenerateObjCAtomicSetterCopyHelperFunction - Given a c++ object type with non-trivial copy assignment function, produce following helper function.
llvm::Constant * GenerateObjCAtomicGetterCopyHelperFunction (const ObjCPropertyImplDecl *PID)
llvm::Value * EmitBlockCopyAndAutorelease (llvm::Value *Block, QualType Ty)
void BuildBlockRelease (llvm::Value *DeclPtr, BlockFieldFlags flags, bool CanThrow)
void emitByrefStructureInit (const AutoVarEmission &emission)
 Initialize the structural components of a __block variable, i.e.
void enterByrefCleanup (CleanupKind Kind, Address Addr, BlockFieldFlags Flags, bool LoadBlockVarAddr, bool CanThrow)
 Enter a cleanup to destroy a __block variable.
void setBlockContextParameter (const ImplicitParamDecl *D, unsigned argNum, llvm::Value *ptr)
Address LoadBlockStruct ()
Address GetAddrOfBlockDecl (const VarDecl *var)
Address emitBlockByrefAddress (Address baseAddr, const VarDecl *V, bool followForward=true)
 BuildBlockByrefAddress - Computes the location of the data in a variable which is declared as __block.
Address emitBlockByrefAddress (Address baseAddr, const BlockByrefInfo &info, bool followForward, const llvm::Twine &name)
const BlockByrefInfogetBlockByrefInfo (const VarDecl *var)
 BuildByrefInfo - This routine changes a __block variable declared as T x into:
QualType BuildFunctionArgList (GlobalDecl GD, FunctionArgList &Args)
void GenerateCode (GlobalDecl GD, llvm::Function *Fn, const CGFunctionInfo &FnInfo)
void markAsIgnoreThreadCheckingAtRuntime (llvm::Function *Fn)
 Annotate the function with an attribute that disables TSan checking at runtime.
void StartFunction (GlobalDecl GD, QualType RetTy, llvm::Function *Fn, const CGFunctionInfo &FnInfo, const FunctionArgList &Args, SourceLocation Loc=SourceLocation(), SourceLocation StartLoc=SourceLocation())
 Emit code for the start of a function.
void EmitConstructorBody (FunctionArgList &Args)
 EmitConstructorBody - Emits the body of the current constructor.
void EmitDestructorBody (FunctionArgList &Args)
 EmitDestructorBody - Emits the body of the current destructor.
void emitImplicitAssignmentOperatorBody (FunctionArgList &Args)
void EmitFunctionBody (const Stmt *Body)
void EmitBlockWithFallThrough (llvm::BasicBlock *BB, const Stmt *S)
 When instrumenting to collect profile data, the counts for some blocks such as switch cases need to not include the fall-through counts, so emit a branch around the instrumentation code.
void EmitForwardingCallToLambda (const CXXMethodDecl *LambdaCallOperator, CallArgList &CallArgs, const CGFunctionInfo *CallOpFnInfo=nullptr, llvm::Constant *CallOpFn=nullptr)
void EmitLambdaBlockInvokeBody ()
void EmitLambdaStaticInvokeBody (const CXXMethodDecl *MD)
void EmitLambdaDelegatingInvokeBody (const CXXMethodDecl *MD, CallArgList &CallArgs)
void EmitLambdaInAllocaImplFn (const CXXMethodDecl *CallOp, const CGFunctionInfo **ImplFnInfo, llvm::Function **ImplFn)
void EmitLambdaInAllocaCallOpBody (const CXXMethodDecl *MD)
void EmitLambdaVLACapture (const VariableArrayType *VAT, LValue LV)
void EmitAsanPrologueOrEpilogue (bool Prologue)
llvm::DebugLoc EmitReturnBlock ()
 Emit the unified return block, trying to avoid its emission when possible.
void FinishFunction (SourceLocation EndLoc=SourceLocation())
 FinishFunction - Complete IR generation of the current function.
void StartThunk (llvm::Function *Fn, GlobalDecl GD, const CGFunctionInfo &FnInfo, bool IsUnprototyped)
void EmitCallAndReturnForThunk (llvm::FunctionCallee Callee, const ThunkInfo *Thunk, bool IsUnprototyped)
void FinishThunk ()
void EmitMustTailThunk (GlobalDecl GD, llvm::Value *AdjustedThisPtr, llvm::FunctionCallee Callee)
 Emit a musttail call for a thunk with a potentially adjusted this pointer.
void generateThunk (llvm::Function *Fn, const CGFunctionInfo &FnInfo, GlobalDecl GD, const ThunkInfo &Thunk, bool IsUnprototyped)
 Generate a thunk for the given method.
llvm::Function * GenerateVarArgsThunk (llvm::Function *Fn, const CGFunctionInfo &FnInfo, GlobalDecl GD, const ThunkInfo &Thunk)
void EmitCtorPrologue (const CXXConstructorDecl *CD, CXXCtorType Type, FunctionArgList &Args)
 EmitCtorPrologue - This routine generates necessary code to initialize base classes and non-static data members belonging to this constructor.
void EmitInitializerForField (FieldDecl *Field, LValue LHS, Expr *Init)
void InitializeVTablePointer (const VPtr &vptr)
 Initialize the vtable pointer of the given subobject.
VPtrsVector getVTablePointers (const CXXRecordDecl *VTableClass)
void getVTablePointers (BaseSubobject Base, const CXXRecordDecl *NearestVBase, CharUnits OffsetFromNearestVBase, bool BaseIsNonVirtualPrimaryBase, const CXXRecordDecl *VTableClass, VisitedVirtualBasesSetTy &VBases, VPtrsVector &vptrs)
void InitializeVTablePointers (const CXXRecordDecl *ClassDecl)
llvm::Value * GetVTablePtr (Address This, llvm::Type *VTableTy, const CXXRecordDecl *VTableClass, VTableAuthMode AuthMode=VTableAuthMode::Authenticate)
 GetVTablePtr - Return the Value of the vtable pointer member pointed to by This.
void EmitVTablePtrCheckForCast (QualType T, Address Derived, bool MayBeNull, CFITypeCheckKind TCK, SourceLocation Loc)
 Derived is the presumed address of an object of type T after a cast.
void EmitVTablePtrCheckForCall (const CXXRecordDecl *RD, llvm::Value *VTable, CFITypeCheckKind TCK, SourceLocation Loc)
 EmitVTablePtrCheckForCall - Virtual method MD is being called via VTable.
void EmitVTablePtrCheck (const CXXRecordDecl *RD, llvm::Value *VTable, CFITypeCheckKind TCK, SourceLocation Loc)
 EmitVTablePtrCheck - Emit a check that VTable is a valid virtual table for RD using llvm.type.test.
void EmitTypeMetadataCodeForVCall (const CXXRecordDecl *RD, llvm::Value *VTable, SourceLocation Loc)
 If whole-program virtual table optimization is enabled, emit an assumption that VTable is a member of RD's type identifier.
bool ShouldEmitVTableTypeCheckedLoad (const CXXRecordDecl *RD)
 Returns whether we should perform a type checked load when loading a virtual function for virtual calls to members of RD.
llvm::Value * EmitVTableTypeCheckedLoad (const CXXRecordDecl *RD, llvm::Value *VTable, llvm::Type *VTableTy, uint64_t VTableByteOffset)
 Emit a type checked load from the given vtable.
void EnterDtorCleanups (const CXXDestructorDecl *Dtor, CXXDtorType Type)
 EnterDtorCleanups - Enter the cleanups necessary to complete the given phase of destruction for a destructor.
bool ShouldInstrumentFunction ()
 ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls.
bool ShouldSkipSanitizerInstrumentation ()
 ShouldSkipSanitizerInstrumentation - Return true if the current function should not be instrumented with sanitizers.
bool ShouldXRayInstrumentFunction () const
 ShouldXRayInstrument - Return true if the current function should be instrumented with XRay nop sleds.
bool AlwaysEmitXRayCustomEvents () const
 AlwaysEmitXRayCustomEvents - Return true if we must unconditionally emit XRay custom event handling calls.
bool AlwaysEmitXRayTypedEvents () const
 AlwaysEmitXRayTypedEvents - Return true if clang must unconditionally emit XRay typed event handling calls.
llvm::ConstantInt * getUBSanFunctionTypeHash (QualType T) const
 Return a type hash constant for a function instrumented by -fsanitize=function.
void EmitFunctionProlog (const CGFunctionInfo &FI, llvm::Function *Fn, const FunctionArgList &Args)
 EmitFunctionProlog - Emit the target specific LLVM code to load the arguments for the given function.
void EmitFunctionEpilog (const CGFunctionInfo &FI, bool EmitRetDbgLoc, SourceLocation EndLoc, uint64_t RetKeyInstructionsSourceAtom)
 EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary.
void EmitReturnValueCheck (llvm::Value *RV)
 Emit a test that checks if the return value RV is nonnull.
void EmitStartEHSpec (const Decl *D)
 EmitStartEHSpec - Emit the start of the exception spec.
void EmitEndEHSpec (const Decl *D)
 EmitEndEHSpec - Emit the end of the exception spec.
llvm::BasicBlock * getTerminateLandingPad ()
 getTerminateLandingPad - Return a landing pad that just calls terminate.
llvm::BasicBlock * getTerminateFunclet ()
 getTerminateLandingPad - Return a cleanup funclet that just calls terminate.
llvm::BasicBlock * getTerminateHandler ()
 getTerminateHandler - Return a handler (not a landing pad, just a catch handler) that just calls terminate.
llvm::Type * ConvertTypeForMem (QualType T)
llvm::Type * ConvertType (QualType T)
llvm::Type * convertTypeForLoadStore (QualType ASTTy, llvm::Type *LLVMTy=nullptr)
llvm::Type * ConvertType (const TypeDecl *T)
llvm::Value * LoadObjCSelf ()
 LoadObjCSelf - Load the value of self.
QualType TypeOfSelfObject ()
 TypeOfSelfObject - Return type of object that this self represents.
llvm::BasicBlock * createBasicBlock (const Twine &name="", llvm::Function *parent=nullptr, llvm::BasicBlock *before=nullptr)
 createBasicBlock - Create an LLVM basic block.
JumpDest getJumpDestForLabel (const LabelDecl *S)
 getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to.
void SimplifyForwardingBlocks (llvm::BasicBlock *BB)
 SimplifyForwardingBlocks - If the given basic block is only a branch to another basic block, simplify it.
void EmitBlock (llvm::BasicBlock *BB, bool IsFinished=false)
 EmitBlock - Emit the given block.
void EmitBlockAfterUses (llvm::BasicBlock *BB)
 EmitBlockAfterUses - Emit the given block somewhere hopefully near its uses, and leave the insertion point in it.
void EmitBranch (llvm::BasicBlock *Block)
 EmitBranch - Emit a branch to the specified basic block from the current insert block, taking care to avoid creation of branches from dummy blocks.
bool HaveInsertPoint () const
 HaveInsertPoint - True if an insertion point is defined.
void EnsureInsertPoint ()
 EnsureInsertPoint - Ensure that an insertion point is defined so that emitted IR has a place to go.
void ErrorUnsupported (const Stmt *S, const char *Type)
 ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet.
Address mergeAddressesInConditionalExpr (Address LHS, Address RHS, llvm::BasicBlock *LHSBlock, llvm::BasicBlock *RHSBlock, llvm::BasicBlock *MergeBlock, QualType MergedType)
Address makeNaturalAddressForPointer (llvm::Value *Ptr, QualType T, CharUnits Alignment=CharUnits::Zero(), bool ForPointeeType=false, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 Construct an address with the natural alignment of T.
LValue MakeAddrLValue (Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type)
LValue MakeAddrLValue (Address Addr, QualType T, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo)
LValue MakeAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, AlignmentSource Source=AlignmentSource::Type)
LValue MakeRawAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, AlignmentSource Source=AlignmentSource::Type)
 Same as MakeAddrLValue above except that the pointer is known to be unsigned.
LValue MakeAddrLValueWithoutTBAA (Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type)
LValue MakeNaturalAlignPointeeAddrLValue (llvm::Value *V, QualType T)
 Given a value of type T* that may not be to a complete object, construct an l-value with the natural pointee alignment of T.
LValue MakeNaturalAlignAddrLValue (llvm::Value *V, QualType T, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
LValue MakeNaturalAlignPointeeRawAddrLValue (llvm::Value *V, QualType T)
 Same as MakeNaturalAlignPointeeAddrLValue except that the pointer is known to be unsigned.
LValue MakeNaturalAlignRawAddrLValue (llvm::Value *V, QualType T)
Address EmitLoadOfReference (LValue RefLVal, LValueBaseInfo *PointeeBaseInfo=nullptr, TBAAAccessInfo *PointeeTBAAInfo=nullptr)
LValue EmitLoadOfReferenceLValue (LValue RefLVal)
LValue EmitLoadOfReferenceLValue (Address RefAddr, QualType RefTy, AlignmentSource Source=AlignmentSource::Type)
Address EmitLoadOfPointer (Address Ptr, const PointerType *PtrTy, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
 Load a pointer with type PtrTy stored at address Ptr.
LValue EmitLoadOfPointerLValue (Address Ptr, const PointerType *PtrTy)
llvm::AllocaInst * CreateTempAlloca (llvm::Type *Ty, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr)
 CreateTempAlloca - This creates an alloca and inserts it into the entry block if ArraySize is nullptr, otherwise inserts it at the current insertion point of the builder.
RawAddress CreateTempAlloca (llvm::Type *Ty, LangAS UseAddrSpace, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr, RawAddress *Alloca=nullptr)
 CreateTempAlloca - This creates a alloca and inserts it into the entry block.
RawAddress CreateTempAlloca (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr, RawAddress *Alloca=nullptr)
 CreateTempAlloca - This creates a alloca and inserts it into the entry block.
RawAddress CreateTempAllocaWithoutCast (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr)
 CreateTempAlloca - This creates a alloca and inserts it into the entry block.
RawAddress CreateDefaultAlignTempAlloca (llvm::Type *Ty, const Twine &Name="tmp")
 CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type.
RawAddress CreateIRTemp (QualType T, const Twine &Name="tmp")
 CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment.
RawAddress CreateMemTemp (QualType T, const Twine &Name="tmp", RawAddress *Alloca=nullptr)
 CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space.
RawAddress CreateMemTemp (QualType T, CharUnits Align, const Twine &Name="tmp", RawAddress *Alloca=nullptr)
RawAddress CreateMemTempWithoutCast (QualType T, const Twine &Name="tmp")
 CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen without casting it to the default address space.
RawAddress CreateMemTempWithoutCast (QualType T, CharUnits Align, const Twine &Name="tmp")
AggValueSlot CreateAggTemp (QualType T, const Twine &Name="tmp", RawAddress *Alloca=nullptr)
 CreateAggTemp - Create a temporary memory object for the given aggregate type.
llvm::Value * EvaluateExprAsBool (const Expr *E)
 EvaluateExprAsBool - Perform the usual unary conversions on the specified expression and compare the result against zero, returning an Int1Ty value.
llvm::Value * EmitWithOriginalRHSBitfieldAssignment (const BinaryOperator *E, llvm::Value **Previous, QualType *SrcType)
 Retrieve the implicit cast expression of the rhs in a binary operator expression by passing pointers to Value and QualType This is used for implicit bitfield conversion checks, which must compare with the value before potential truncation.
void EmitBitfieldConversionCheck (llvm::Value *Src, QualType SrcType, llvm::Value *Dst, QualType DstType, const CGBitFieldInfo &Info, SourceLocation Loc)
 Emit a check that an [implicit] conversion of a bitfield.
void EmitIgnoredExpr (const Expr *E)
 EmitIgnoredExpr - Emit an expression in a context which ignores the result.
RValue EmitAnyExpr (const Expr *E, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
 EmitAnyExpr - Emit code to compute the specified expression which can have any type.
Address EmitVAListRef (const Expr *E)
Address EmitMSVAListRef (const Expr *E)
 Emit a "reference" to a __builtin_ms_va_list; this is always the value of the expression, because a __builtin_ms_va_list is a pointer to a char.
RValue EmitAnyExprToTemp (const Expr *E)
 EmitAnyExprToTemp - Similarly to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.
void EmitAnyExprToMem (const Expr *E, Address Location, Qualifiers Quals, bool IsInitializer)
 EmitAnyExprToMem - Emits the code necessary to evaluate an arbitrary expression into the given memory location.
void EmitAnyExprToExn (const Expr *E, Address Addr)
void EmitInitializationToLValue (const Expr *E, LValue LV, AggValueSlot::IsZeroed_t IsZeroed=AggValueSlot::IsNotZeroed)
 EmitInitializationToLValue - Emit an initializer to an LValue.
void EmitExprAsInit (const Expr *init, const ValueDecl *D, LValue lvalue, bool capturedByInit)
 EmitExprAsInit - Emits the code necessary to initialize a location in memory with the given initializer.
bool hasVolatileMember (QualType T)
 hasVolatileMember - returns true if aggregate type has a volatile member.
AggValueSlot::Overlap_t getOverlapForReturnValue ()
 Determine whether a return value slot may overlap some other object.
AggValueSlot::Overlap_t getOverlapForFieldInit (const FieldDecl *FD)
 Determine whether a field initialization may overlap some other object.
AggValueSlot::Overlap_t getOverlapForBaseInit (const CXXRecordDecl *RD, const CXXRecordDecl *BaseRD, bool IsVirtual)
 Determine whether a base class initialization may overlap some other object.
void EmitAggregateAssign (LValue Dest, LValue Src, QualType EltTy)
 Emit an aggregate assignment.
void EmitAggregateCopyCtor (LValue Dest, LValue Src, AggValueSlot::Overlap_t MayOverlap)
void EmitAggregateCopy (LValue Dest, LValue Src, QualType EltTy, AggValueSlot::Overlap_t MayOverlap, bool isVolatile=false)
 EmitAggregateCopy - Emit an aggregate copy.
Address GetAddrOfLocalVar (const VarDecl *VD)
 GetAddrOfLocalVar - Return the address of a local variable.
LValue getOrCreateOpaqueLValueMapping (const OpaqueValueExpr *e)
 Given an opaque value expression, return its LValue mapping if it exists, otherwise create one.
RValue getOrCreateOpaqueRValueMapping (const OpaqueValueExpr *e)
 Given an opaque value expression, return its RValue mapping if it exists, otherwise create one.
bool isOpaqueValueEmitted (const OpaqueValueExpr *E)
 isOpaqueValueEmitted - Return true if the opaque value expression has already been emitted.
llvm::Value * getArrayInitIndex ()
 Get the index of the current ArrayInitLoopExpr, if any.
llvm::BlockAddress * GetAddrOfLabel (const LabelDecl *L)
llvm::BasicBlock * GetIndirectGotoBlock ()
void EmitNullInitialization (Address DestPtr, QualType Ty)
 EmitNullInitialization - Generate code to set a value of the given type to null, If the type contains data member pointers, they will be initialized to -1 in accordance with the Itanium C++ ABI.
llvm::Value * EmitVAStartEnd (llvm::Value *ArgValue, bool IsStart)
 Emits a call to an LLVM variable-argument intrinsic, either llvm.va_start or llvm.va_end.
RValue EmitVAArg (VAArgExpr *VE, Address &VAListAddr, AggValueSlot Slot=AggValueSlot::ignored())
 Generate code to get an argument from the passed in pointer and update it accordingly.
llvm::Value * emitArrayLength (const ArrayType *arrayType, QualType &baseType, Address &addr)
 emitArrayLength - Compute the length of an array, even if it's a VLA, and drill down to the base element type.
void EmitVariablyModifiedType (QualType Ty)
 EmitVLASize - Capture all the sizes for the VLA expressions in the given variably-modified type and store them in the VLASizeMap.
VlaSizePair getVLAElements1D (const VariableArrayType *vla)
 Return the number of elements for a single dimension for the given array type.
VlaSizePair getVLAElements1D (QualType vla)
VlaSizePair getVLASize (const VariableArrayType *vla)
 Returns an LLVM value that corresponds to the size, in non-variably-sized elements, of a variable length array type, plus that largest non-variably-sized element type.
VlaSizePair getVLASize (QualType vla)
llvm::Value * LoadCXXThis ()
 LoadCXXThis - Load the value of 'this'.
Address LoadCXXThisAddress ()
llvm::Value * LoadCXXVTT ()
 LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.
Address GetAddressOfDirectBaseInCompleteClass (Address Value, const CXXRecordDecl *Derived, const CXXRecordDecl *Base, bool BaseIsVirtual)
 GetAddressOfBaseOfCompleteClass - Convert the given pointer to a complete class to the given direct base.
Address GetAddressOfBaseClass (Address Value, const CXXRecordDecl *Derived, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd, bool NullCheckValue, SourceLocation Loc)
 GetAddressOfBaseClass - This function will add the necessary delta to the load of 'this' and returns address of the base class.
Address GetAddressOfDerivedClass (Address Value, const CXXRecordDecl *Derived, CastExpr::path_const_iterator PathBegin, CastExpr::path_const_iterator PathEnd, bool NullCheckValue)
llvm::Value * GetVTTParameter (GlobalDecl GD, bool ForVirtualBase, bool Delegating)
 GetVTTParameter - Return the VTT parameter that should be passed to a base constructor/destructor with virtual bases.
void EmitDelegateCXXConstructorCall (const CXXConstructorDecl *Ctor, CXXCtorType CtorType, const FunctionArgList &Args, SourceLocation Loc)
void EmitDelegatingCXXConstructorCall (const CXXConstructorDecl *Ctor, const FunctionArgList &Args)
void EmitInlinedInheritingCXXConstructorCall (const CXXConstructorDecl *Ctor, CXXCtorType CtorType, bool ForVirtualBase, bool Delegating, CallArgList &Args)
 Emit a call to an inheriting constructor (that is, one that invokes a constructor inherited from a base class) by inlining its definition.
void EmitInheritedCXXConstructorCall (const CXXConstructorDecl *D, bool ForVirtualBase, Address This, bool InheritedFromVBase, const CXXInheritedCtorInitExpr *E)
 Emit a call to a constructor inherited from a base class, passing the current constructor's arguments along unmodified (without even making a copy).
void EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, AggValueSlot ThisAVS, const CXXConstructExpr *E)
void EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, Address This, CallArgList &Args, AggValueSlot::Overlap_t Overlap, SourceLocation Loc, bool NewPointerIsChecked, llvm::CallBase **CallOrInvoke=nullptr)
void EmitVTableAssumptionLoads (const CXXRecordDecl *ClassDecl, Address This)
 Emit assumption load for all bases.
void EmitVTableAssumptionLoad (const VPtr &vptr, Address This)
 Emit assumption that vptr load == global vtable.
void EmitSynthesizedCXXCopyCtorCall (const CXXConstructorDecl *D, Address This, Address Src, const CXXConstructExpr *E)
void EmitCXXAggrConstructorCall (const CXXConstructorDecl *D, const ArrayType *ArrayTy, Address ArrayPtr, const CXXConstructExpr *E, bool NewPointerIsChecked, bool ZeroInitialization=false)
 EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array.
void EmitCXXAggrConstructorCall (const CXXConstructorDecl *D, llvm::Value *NumElements, Address ArrayPtr, const CXXConstructExpr *E, bool NewPointerIsChecked, bool ZeroInitialization=false)
 EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array.
void EmitCXXDestructorCall (const CXXDestructorDecl *D, CXXDtorType Type, bool ForVirtualBase, bool Delegating, Address This, QualType ThisTy)
void EmitNewArrayInitializer (const CXXNewExpr *E, QualType elementType, llvm::Type *ElementTy, Address NewPtr, llvm::Value *NumElements, llvm::Value *AllocSizeWithoutCookie)
void EmitCXXTemporary (const CXXTemporary *Temporary, QualType TempType, Address Ptr)
 Emits all the code to cause the given temporary to be cleaned up.
void EmitSehCppScopeBegin ()
void EmitSehCppScopeEnd ()
void EmitSehTryScopeBegin ()
void EmitSehTryScopeEnd ()
bool EmitLifetimeStart (llvm::Value *Addr)
 Emit a lifetime.begin marker if some criteria are satisfied.
void EmitLifetimeEnd (llvm::Value *Addr)
llvm::Value * EmitCXXNewExpr (const CXXNewExpr *E)
void EmitCXXDeleteExpr (const CXXDeleteExpr *E)
void EmitDeleteCall (const FunctionDecl *DeleteFD, llvm::Value *Ptr, QualType DeleteTy, llvm::Value *NumElements=nullptr, CharUnits CookieSize=CharUnits())
RValue EmitBuiltinNewDeleteCall (const FunctionProtoType *Type, const CallExpr *TheCallExpr, bool IsDelete)
llvm::Value * EmitCXXTypeidExpr (const CXXTypeidExpr *E)
llvm::Value * EmitDynamicCast (Address V, const CXXDynamicCastExpr *DCE)
Address EmitCXXUuidofExpr (const CXXUuidofExpr *E)
bool sanitizePerformTypeCheck () const
 Whether any type-checking sanitizers are enabled.
void EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, LValue LV, QualType Type, SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr)
void EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, Address Addr, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr)
void EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr)
 Emit a check that V is the address of storage of the appropriate size and alignment for an object of type Type (or if ArraySize is provided, for an array of that bound).
void EmitBoundsCheck (const Expr *E, const Expr *Base, llvm::Value *Index, QualType IndexType, bool Accessed)
 Emit a check that Base points into an array object, which we can access at index Index.
void EmitBoundsCheckImpl (const Expr *E, llvm::Value *Bound, llvm::Value *Index, QualType IndexType, QualType IndexedType, bool Accessed)
llvm::DILocation * SanitizerAnnotateDebugInfo (ArrayRef< SanitizerKind::SanitizerOrdinal > Ordinals, SanitizerHandler Handler)
 Returns debug info, with additional annotation if CGM.getCodeGenOpts().SanitizeAnnotateDebugInfo[Ordinal] is enabled for any of the ordinals.
llvm::Value * GetCountedByFieldExprGEP (const Expr *Base, const FieldDecl *FD, const FieldDecl *CountDecl)
llvm::Value * EmitLoadOfCountedByField (const Expr *Base, const FieldDecl *FD, const FieldDecl *CountDecl)
 Build an expression accessing the "counted_by" field.
void EmitCountedByBoundsChecking (const Expr *E, llvm::Value *Idx, Address Addr, QualType IdxTy, QualType ArrayTy, bool Accessed, bool FlexibleArray)
 EmitCountedByBoundsChecking - If the array being accessed has a "counted_by" attribute, generate bounds checking code.
llvm::Value * EmitScalarPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre)
ComplexPairTy EmitComplexPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre)
llvm::DebugLoc SourceLocToDebugLoc (SourceLocation Location)
 Converts Location to a DebugLoc, if debug information is enabled.
unsigned getDebugInfoFIndex (const RecordDecl *Rec, unsigned FieldIndex)
 Get the record field index as represented in debug info.
void EmitDecl (const Decl &D, bool EvaluateConditionDecl=false)
 EmitDecl - Emit a declaration.
void EmitVarDecl (const VarDecl &D)
 EmitVarDecl - Emit a local variable declaration.
void EmitScalarInit (const Expr *init, const ValueDecl *D, LValue lvalue, bool capturedByInit)
bool isTrivialInitializer (const Expr *Init)
 Determine whether the given initializer is trivial in the sense that it requires no code to be generated.
void EmitAutoVarDecl (const VarDecl &D)
 EmitAutoVarDecl - Emit an auto variable declaration.
AutoVarEmission EmitAutoVarAlloca (const VarDecl &var)
 EmitAutoVarAlloca - Emit the alloca and debug information for a local variable.
void EmitAutoVarInit (const AutoVarEmission &emission)
void EmitAutoVarCleanups (const AutoVarEmission &emission)
void emitAutoVarTypeCleanup (const AutoVarEmission &emission, QualType::DestructionKind dtorKind)
 Enter a destroy cleanup for the given local variable.
void MaybeEmitDeferredVarDeclInit (const VarDecl *var)
void EmitAndRegisterVariableArrayDimensions (CGDebugInfo *DI, const VarDecl &D, bool EmitDebugInfo)
 Emits the alloca and debug information for the size expressions for each dimension of an array.
void EmitStaticVarDecl (const VarDecl &D, llvm::GlobalValue::LinkageTypes Linkage)
void EmitParmDecl (const VarDecl &D, ParamValue Arg, unsigned ArgNo)
 EmitParmDecl - Emit a ParmVarDecl or an ImplicitParamDecl.
PeepholeProtection protectFromPeepholes (RValue rvalue)
 protectFromPeepholes - Protect a value that we're intending to store to the side, but which will probably be used later, from aggressive peepholing optimizations that might delete it.
void unprotectFromPeepholes (PeepholeProtection protection)
void emitAlignmentAssumptionCheck (llvm::Value *Ptr, QualType Ty, SourceLocation Loc, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue, llvm::Value *TheCheck, llvm::Instruction *Assumption)
void emitAlignmentAssumption (llvm::Value *PtrValue, QualType Ty, SourceLocation Loc, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr)
void emitAlignmentAssumption (llvm::Value *PtrValue, const Expr *E, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr)
void EmitStopPoint (const Stmt *S)
 EmitStopPoint - Emit a debug stoppoint if we are emitting debug info.
void EmitStmt (const Stmt *S, ArrayRef< const Attr * > Attrs={})
 EmitStmt - Emit the code for the statement.
bool EmitSimpleStmt (const Stmt *S, ArrayRef< const Attr * > Attrs)
 EmitSimpleStmt - Try to emit a "simple" statement which does not necessarily require an insertion point or debug information; typically because the statement amounts to a jump or a container of other statements.
Address EmitCompoundStmt (const CompoundStmt &S, bool GetLast=false, AggValueSlot AVS=AggValueSlot::ignored())
 EmitCompoundStmt - Emit a compound statement {..} node.
Address EmitCompoundStmtWithoutScope (const CompoundStmt &S, bool GetLast=false, AggValueSlot AVS=AggValueSlot::ignored())
void EmitLabel (const LabelDecl *D)
 EmitLabel - Emit the block for the given label.
void EmitLabelStmt (const LabelStmt &S)
void EmitAttributedStmt (const AttributedStmt &S)
void EmitGotoStmt (const GotoStmt &S)
void EmitIndirectGotoStmt (const IndirectGotoStmt &S)
void EmitIfStmt (const IfStmt &S)
void EmitWhileStmt (const WhileStmt &S, ArrayRef< const Attr * > Attrs={})
void EmitDoStmt (const DoStmt &S, ArrayRef< const Attr * > Attrs={})
void EmitForStmt (const ForStmt &S, ArrayRef< const Attr * > Attrs={})
void EmitReturnStmt (const ReturnStmt &S)
 EmitReturnStmt - Note that due to GCC extensions, this can have an operand if the function returns void, or may be missing one if the function returns non-void.
void EmitDeclStmt (const DeclStmt &S)
void EmitBreakStmt (const BreakStmt &S)
void EmitContinueStmt (const ContinueStmt &S)
void EmitSwitchStmt (const SwitchStmt &S)
void EmitDefaultStmt (const DefaultStmt &S, ArrayRef< const Attr * > Attrs)
void EmitCaseStmt (const CaseStmt &S, ArrayRef< const Attr * > Attrs)
void EmitCaseStmtRange (const CaseStmt &S, ArrayRef< const Attr * > Attrs)
 EmitCaseStmtRange - If case statement range is not too big then add multiple cases to switch instruction, one for each value within the range.
void EmitAsmStmt (const AsmStmt &S)
const BreakContinue * GetDestForLoopControlStmt (const LoopControlStmt &S)
void EmitObjCForCollectionStmt (const ObjCForCollectionStmt &S)
void EmitObjCAtTryStmt (const ObjCAtTryStmt &S)
void EmitObjCAtThrowStmt (const ObjCAtThrowStmt &S)
void EmitObjCAtSynchronizedStmt (const ObjCAtSynchronizedStmt &S)
void EmitObjCAutoreleasePoolStmt (const ObjCAutoreleasePoolStmt &S)
void EmitCoroutineBody (const CoroutineBodyStmt &S)
void EmitCoreturnStmt (const CoreturnStmt &S)
RValue EmitCoawaitExpr (const CoawaitExpr &E, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
LValue EmitCoawaitLValue (const CoawaitExpr *E)
RValue EmitCoyieldExpr (const CoyieldExpr &E, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
LValue EmitCoyieldLValue (const CoyieldExpr *E)
RValue EmitCoroutineIntrinsic (const CallExpr *E, unsigned int IID)
void EnterCXXTryStmt (const CXXTryStmt &S, bool IsFnTryBlock=false)
void ExitCXXTryStmt (const CXXTryStmt &S, bool IsFnTryBlock=false)
void EmitCXXTryStmt (const CXXTryStmt &S)
void EmitSEHTryStmt (const SEHTryStmt &S)
void EmitSEHLeaveStmt (const SEHLeaveStmt &S)
void EnterSEHTryStmt (const SEHTryStmt &S)
void ExitSEHTryStmt (const SEHTryStmt &S)
void VolatilizeTryBlocks (llvm::BasicBlock *BB, llvm::SmallPtrSet< llvm::BasicBlock *, 10 > &V)
void pushSEHCleanup (CleanupKind kind, llvm::Function *FinallyFunc)
void startOutlinedSEHHelper (CodeGenFunction &ParentCGF, bool IsFilter, const Stmt *OutlinedStmt)
 Arrange a function prototype that can be called by Windows exception handling personalities.
llvm::Function * GenerateSEHFilterFunction (CodeGenFunction &ParentCGF, const SEHExceptStmt &Except)
 Create a stub filter function that will ultimately hold the code of the filter expression.
llvm::Function * GenerateSEHFinallyFunction (CodeGenFunction &ParentCGF, const SEHFinallyStmt &Finally)
void EmitSEHExceptionCodeSave (CodeGenFunction &ParentCGF, llvm::Value *ParentFP, llvm::Value *EntryEBP)
llvm::Value * EmitSEHExceptionCode ()
llvm::Value * EmitSEHExceptionInfo ()
llvm::Value * EmitSEHAbnormalTermination ()
void EmitSimpleOMPExecutableDirective (const OMPExecutableDirective &D)
 Emit simple code for OpenMP directives in Simd-only mode.
void EmitCapturedLocals (CodeGenFunction &ParentCGF, const Stmt *OutlinedStmt, bool IsFilter)
 Scan the outlined statement for captures from the parent function.
Address recoverAddrOfEscapedLocal (CodeGenFunction &ParentCGF, Address ParentVar, llvm::Value *ParentFP)
 Recovers the address of a local in a parent function.
void EmitCXXForRangeStmt (const CXXForRangeStmt &S, ArrayRef< const Attr * > Attrs={})
llvm::Value * getTypeSize (QualType Ty)
 Returns calculated size of the specified type.
LValue InitCapturedStruct (const CapturedStmt &S)
llvm::Function * EmitCapturedStmt (const CapturedStmt &S, CapturedRegionKind K)
 Generate an outlined function for the body of a CapturedStmt, store any captured variables into the captured struct, and call the outlined function.
llvm::Function * GenerateCapturedStmtFunction (const CapturedStmt &S)
 Creates the outlined function for a CapturedStmt.
Address GenerateCapturedStmtArgument (const CapturedStmt &S)
llvm::Function * GenerateOpenMPCapturedStmtFunction (const CapturedStmt &S, const OMPExecutableDirective &D)
void GenerateOpenMPCapturedVars (const CapturedStmt &S, SmallVectorImpl< llvm::Value * > &CapturedVars)
void emitOMPSimpleStore (LValue LVal, RValue RVal, QualType RValTy, SourceLocation Loc)
void EmitOMPAggregateAssign (Address DestAddr, Address SrcAddr, QualType OriginalType, const llvm::function_ref< void(Address, Address)> CopyGen)
 Perform element by element copying of arrays with type OriginalType from SrcAddr to DestAddr using copying procedure generated by CopyGen.
void EmitOMPCopy (QualType OriginalType, Address DestAddr, Address SrcAddr, const VarDecl *DestVD, const VarDecl *SrcVD, const Expr *Copy)
 Emit proper copying of data from one variable to another.
std::pair< bool, RValueEmitOMPAtomicSimpleUpdateExpr (LValue X, RValue E, BinaryOperatorKind BO, bool IsXLHSInRHSPart, llvm::AtomicOrdering AO, SourceLocation Loc, const llvm::function_ref< RValue(RValue)> CommonGen)
 Emit atomic update code for constructs: X = X BO E or X = E BO E.
bool EmitOMPFirstprivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
void EmitOMPPrivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
void EmitOMPUseDevicePtrClause (const OMPUseDevicePtrClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, llvm::Value * > CaptureDeviceAddrMap)
void EmitOMPUseDeviceAddrClause (const OMPUseDeviceAddrClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, llvm::Value * > CaptureDeviceAddrMap)
bool EmitOMPCopyinClause (const OMPExecutableDirective &D)
 Emit code for copyin clause in D directive.
bool EmitOMPLastprivateClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope)
 Emit initial code for lastprivate variables.
void EmitOMPLastprivateClauseFinal (const OMPExecutableDirective &D, bool NoFinals, llvm::Value *IsLastIterCond=nullptr)
 Emit final copying of lastprivate values to original variables at the end of the worksharing or simd directive.
void EmitOMPLinearClause (const OMPLoopDirective &D, CodeGenFunction::OMPPrivateScope &PrivateScope)
 Emit initial code for linear clauses.
void EmitOMPLinearClauseFinal (const OMPLoopDirective &D, const llvm::function_ref< llvm::Value *(CodeGenFunction &)> CondGen)
 Emit final code for linear clauses.
void EmitOMPReductionClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope, bool ForInscan=false)
 Emit initial code for reduction variables.
void EmitOMPReductionClauseFinal (const OMPExecutableDirective &D, const OpenMPDirectiveKind ReductionKind)
 Emit final update of reduction values to original variables at the end of the directive.
bool EmitOMPLinearClauseInit (const OMPLoopDirective &D)
 Emit initial code for linear variables.
void EmitOMPTaskBasedDirective (const OMPExecutableDirective &S, const OpenMPDirectiveKind CapturedRegion, const RegionCodeGenTy &BodyGen, const TaskGenTy &TaskGen, OMPTaskDataTy &Data)
void EmitOMPTargetTaskBasedDirective (const OMPExecutableDirective &S, const RegionCodeGenTy &BodyGen, OMPTargetDataInfo &InputInfo)
void processInReduction (const OMPExecutableDirective &S, OMPTaskDataTy &Data, CodeGenFunction &CGF, const CapturedStmt *CS, OMPPrivateScope &Scope)
void EmitOMPMetaDirective (const OMPMetaDirective &S)
void EmitOMPParallelDirective (const OMPParallelDirective &S)
void EmitOMPSimdDirective (const OMPSimdDirective &S)
void EmitOMPTileDirective (const OMPTileDirective &S)
void EmitOMPStripeDirective (const OMPStripeDirective &S)
void EmitOMPUnrollDirective (const OMPUnrollDirective &S)
void EmitOMPReverseDirective (const OMPReverseDirective &S)
void EmitOMPInterchangeDirective (const OMPInterchangeDirective &S)
void EmitOMPForDirective (const OMPForDirective &S)
void EmitOMPForSimdDirective (const OMPForSimdDirective &S)
void EmitOMPScopeDirective (const OMPScopeDirective &S)
void EmitOMPSectionsDirective (const OMPSectionsDirective &S)
void EmitOMPSectionDirective (const OMPSectionDirective &S)
void EmitOMPSingleDirective (const OMPSingleDirective &S)
void EmitOMPMasterDirective (const OMPMasterDirective &S)
void EmitOMPMaskedDirective (const OMPMaskedDirective &S)
void EmitOMPCriticalDirective (const OMPCriticalDirective &S)
void EmitOMPParallelForDirective (const OMPParallelForDirective &S)
void EmitOMPParallelForSimdDirective (const OMPParallelForSimdDirective &S)
void EmitOMPParallelSectionsDirective (const OMPParallelSectionsDirective &S)
void EmitOMPParallelMasterDirective (const OMPParallelMasterDirective &S)
void EmitOMPTaskDirective (const OMPTaskDirective &S)
void EmitOMPTaskyieldDirective (const OMPTaskyieldDirective &S)
void EmitOMPErrorDirective (const OMPErrorDirective &S)
void EmitOMPBarrierDirective (const OMPBarrierDirective &S)
void EmitOMPTaskwaitDirective (const OMPTaskwaitDirective &S)
void EmitOMPTaskgroupDirective (const OMPTaskgroupDirective &S)
void EmitOMPFlushDirective (const OMPFlushDirective &S)
void EmitOMPDepobjDirective (const OMPDepobjDirective &S)
void EmitOMPScanDirective (const OMPScanDirective &S)
void EmitOMPOrderedDirective (const OMPOrderedDirective &S)
void EmitOMPAtomicDirective (const OMPAtomicDirective &S)
void EmitOMPTargetDirective (const OMPTargetDirective &S)
void EmitOMPTargetDataDirective (const OMPTargetDataDirective &S)
void EmitOMPTargetEnterDataDirective (const OMPTargetEnterDataDirective &S)
void EmitOMPTargetExitDataDirective (const OMPTargetExitDataDirective &S)
void EmitOMPTargetUpdateDirective (const OMPTargetUpdateDirective &S)
void EmitOMPTargetParallelDirective (const OMPTargetParallelDirective &S)
void EmitOMPTargetParallelForDirective (const OMPTargetParallelForDirective &S)
void EmitOMPTeamsDirective (const OMPTeamsDirective &S)
void EmitOMPCancellationPointDirective (const OMPCancellationPointDirective &S)
void EmitOMPCancelDirective (const OMPCancelDirective &S)
void EmitOMPTaskLoopBasedDirective (const OMPLoopDirective &S)
void EmitOMPTaskLoopDirective (const OMPTaskLoopDirective &S)
void EmitOMPTaskLoopSimdDirective (const OMPTaskLoopSimdDirective &S)
void EmitOMPMasterTaskLoopDirective (const OMPMasterTaskLoopDirective &S)
void EmitOMPMaskedTaskLoopDirective (const OMPMaskedTaskLoopDirective &S)
void EmitOMPMasterTaskLoopSimdDirective (const OMPMasterTaskLoopSimdDirective &S)
void EmitOMPMaskedTaskLoopSimdDirective (const OMPMaskedTaskLoopSimdDirective &S)
void EmitOMPParallelMasterTaskLoopDirective (const OMPParallelMasterTaskLoopDirective &S)
void EmitOMPParallelMaskedTaskLoopDirective (const OMPParallelMaskedTaskLoopDirective &S)
void EmitOMPParallelMasterTaskLoopSimdDirective (const OMPParallelMasterTaskLoopSimdDirective &S)
void EmitOMPParallelMaskedTaskLoopSimdDirective (const OMPParallelMaskedTaskLoopSimdDirective &S)
void EmitOMPDistributeDirective (const OMPDistributeDirective &S)
void EmitOMPDistributeParallelForDirective (const OMPDistributeParallelForDirective &S)
void EmitOMPDistributeParallelForSimdDirective (const OMPDistributeParallelForSimdDirective &S)
void EmitOMPDistributeSimdDirective (const OMPDistributeSimdDirective &S)
void EmitOMPTargetParallelForSimdDirective (const OMPTargetParallelForSimdDirective &S)
void EmitOMPTargetSimdDirective (const OMPTargetSimdDirective &S)
void EmitOMPTeamsDistributeDirective (const OMPTeamsDistributeDirective &S)
void EmitOMPTeamsDistributeSimdDirective (const OMPTeamsDistributeSimdDirective &S)
void EmitOMPTeamsDistributeParallelForSimdDirective (const OMPTeamsDistributeParallelForSimdDirective &S)
void EmitOMPTeamsDistributeParallelForDirective (const OMPTeamsDistributeParallelForDirective &S)
void EmitOMPTargetTeamsDirective (const OMPTargetTeamsDirective &S)
void EmitOMPTargetTeamsDistributeDirective (const OMPTargetTeamsDistributeDirective &S)
void EmitOMPTargetTeamsDistributeParallelForDirective (const OMPTargetTeamsDistributeParallelForDirective &S)
void EmitOMPTargetTeamsDistributeParallelForSimdDirective (const OMPTargetTeamsDistributeParallelForSimdDirective &S)
void EmitOMPTargetTeamsDistributeSimdDirective (const OMPTargetTeamsDistributeSimdDirective &S)
void EmitOMPGenericLoopDirective (const OMPGenericLoopDirective &S)
void EmitOMPParallelGenericLoopDirective (const OMPLoopDirective &S)
void EmitOMPTargetParallelGenericLoopDirective (const OMPTargetParallelGenericLoopDirective &S)
 Emit combined directive 'target parallel loop' as if its constituent constructs are 'target', 'parallel', and 'for'.
void EmitOMPTargetTeamsGenericLoopDirective (const OMPTargetTeamsGenericLoopDirective &S)
void EmitOMPTeamsGenericLoopDirective (const OMPTeamsGenericLoopDirective &S)
void EmitOMPInteropDirective (const OMPInteropDirective &S)
void EmitOMPParallelMaskedDirective (const OMPParallelMaskedDirective &S)
void EmitOMPAssumeDirective (const OMPAssumeDirective &S)
llvm::CanonicalLoopInfo * EmitOMPCollapsedCanonicalLoopNest (const Stmt *S, int Depth)
 Emit the Stmt S and return its topmost canonical loop, if any.
void EmitOMPCanonicalLoop (const OMPCanonicalLoop *S)
 Emit an OMPCanonicalLoop using the OpenMPIRBuilder.
void EmitOMPInnerLoop (const OMPExecutableDirective &S, bool RequiresCleanup, const Expr *LoopCond, const Expr *IncExpr, const llvm::function_ref< void(CodeGenFunction &)> BodyGen, const llvm::function_ref< void(CodeGenFunction &)> PostIncGen)
 Emit inner loop of the worksharing/simd construct.
JumpDest getOMPCancelDestination (OpenMPDirectiveKind Kind)
void EmitOMPPrivateLoopCounters (const OMPLoopDirective &S, OMPPrivateScope &LoopScope)
 Emit initial code for loop counters of loop-based directives.
void EmitOMPLoopBody (const OMPLoopDirective &D, JumpDest LoopExit)
 Helper for the OpenMP loop directives.
bool EmitOMPWorksharingLoop (const OMPLoopDirective &S, Expr *EUB, const CodeGenLoopBoundsTy &CodeGenLoopBounds, const CodeGenDispatchBoundsTy &CGDispatchBounds)
 Emit code for the worksharing loop-based directive.
void EmitOMPDistributeLoop (const OMPLoopDirective &S, const CodeGenLoopTy &CodeGenLoop, Expr *IncExpr)
 Emit code for the distribute loop-based directive.
void EmitOMPSimdInit (const OMPLoopDirective &D)
 Helpers for the OpenMP loop directives.
void EmitOMPSimdFinal (const OMPLoopDirective &D, const llvm::function_ref< llvm::Value *(CodeGenFunction &)> CondGen)
LValue EmitOMPSharedLValue (const Expr *E)
 Emits the lvalue for the expression with possibly captured variable.
void EmitOpenACCComputeConstruct (const OpenACCComputeConstruct &S)
void EmitOpenACCLoopConstruct (const OpenACCLoopConstruct &S)
void EmitOpenACCCombinedConstruct (const OpenACCCombinedConstruct &S)
void EmitOpenACCDataConstruct (const OpenACCDataConstruct &S)
void EmitOpenACCEnterDataConstruct (const OpenACCEnterDataConstruct &S)
void EmitOpenACCExitDataConstruct (const OpenACCExitDataConstruct &S)
void EmitOpenACCHostDataConstruct (const OpenACCHostDataConstruct &S)
void EmitOpenACCWaitConstruct (const OpenACCWaitConstruct &S)
void EmitOpenACCInitConstruct (const OpenACCInitConstruct &S)
void EmitOpenACCShutdownConstruct (const OpenACCShutdownConstruct &S)
void EmitOpenACCSetConstruct (const OpenACCSetConstruct &S)
void EmitOpenACCUpdateConstruct (const OpenACCUpdateConstruct &S)
void EmitOpenACCAtomicConstruct (const OpenACCAtomicConstruct &S)
void EmitOpenACCCacheConstruct (const OpenACCCacheConstruct &S)
llvm::Value * EmitNonNullRValueCheck (RValue RV, QualType T)
 Create a check that a scalar RValue is non-null.
RValue GetUndefRValue (QualType Ty)
 GetUndefRValue - Get an appropriate 'undef' rvalue for the given type.
RValue EmitUnsupportedRValue (const Expr *E, const char *Name)
 EmitUnsupportedRValue - Emit a dummy r-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
LValue EmitUnsupportedLValue (const Expr *E, const char *Name)
 EmitUnsupportedLValue - Emit a dummy l-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
LValue EmitLValue (const Expr *E, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 EmitLValue - Emit code to compute a designator that specifies the location of the expression.
LValue EmitCheckedLValue (const Expr *E, TypeCheckKind TCK)
 Same as EmitLValue but additionally we generate checking code to guard against undefined behavior.
RValue convertTempToRValue (Address addr, QualType type, SourceLocation Loc)
 Given the address of a temporary variable, produce an r-value of its type.
void EmitAtomicInit (Expr *E, LValue lvalue)
bool LValueIsSuitableForInlineAtomic (LValue Src)
 An LValue is a candidate for having its loads and stores be made atomic if we are operating under /volatile:ms and the LValue itself is volatile and performing such an operation can be performed without a libcall.
RValue EmitAtomicLoad (LValue LV, SourceLocation SL, AggValueSlot Slot=AggValueSlot::ignored())
RValue EmitAtomicLoad (LValue lvalue, SourceLocation loc, llvm::AtomicOrdering AO, bool IsVolatile=false, AggValueSlot slot=AggValueSlot::ignored())
 Emit a load from an l-value of atomic type.
void EmitAtomicStore (RValue rvalue, LValue lvalue, bool isInit)
void EmitAtomicStore (RValue rvalue, LValue lvalue, llvm::AtomicOrdering AO, bool IsVolatile, bool isInit)
 Emit a store to an l-value of atomic type.
std::pair< RValue, llvm::Value * > EmitAtomicCompareExchange (LValue Obj, RValue Expected, RValue Desired, SourceLocation Loc, llvm::AtomicOrdering Success=llvm::AtomicOrdering::SequentiallyConsistent, llvm::AtomicOrdering Failure=llvm::AtomicOrdering::SequentiallyConsistent, bool IsWeak=false, AggValueSlot Slot=AggValueSlot::ignored())
 Emit a compare-and-exchange op for atomic type.
llvm::AtomicRMWInst * emitAtomicRMWInst (llvm::AtomicRMWInst::BinOp Op, Address Addr, llvm::Value *Val, llvm::AtomicOrdering Order=llvm::AtomicOrdering::SequentiallyConsistent, llvm::SyncScope::ID SSID=llvm::SyncScope::System, const AtomicExpr *AE=nullptr)
 Emit an atomicrmw instruction, and applying relevant metadata when applicable.
void EmitAtomicUpdate (LValue LVal, llvm::AtomicOrdering AO, const llvm::function_ref< RValue(RValue)> &UpdateOp, bool IsVolatile)
llvm::Value * EmitToMemory (llvm::Value *Value, QualType Ty)
 EmitToMemory - Change a scalar value from its value representation to its in-memory representation.
llvm::Value * EmitFromMemory (llvm::Value *Value, QualType Ty)
 EmitFromMemory - Change a scalar value from its memory representation to its value representation.
bool EmitScalarRangeCheck (llvm::Value *Value, QualType Ty, SourceLocation Loc)
 Check if the scalar Value is within the valid range for the given type Ty.
llvm::Value * EmitLoadOfScalar (Address Addr, bool Volatile, QualType Ty, SourceLocation Loc, AlignmentSource Source=AlignmentSource::Type, bool isNontemporal=false)
 EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
llvm::Value * EmitLoadOfScalar (Address Addr, bool Volatile, QualType Ty, SourceLocation Loc, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo, bool isNontemporal=false)
llvm::Value * EmitLoadOfScalar (LValue lvalue, SourceLocation Loc)
 EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
void EmitStoreOfScalar (llvm::Value *Value, Address Addr, bool Volatile, QualType Ty, AlignmentSource Source=AlignmentSource::Type, bool isInit=false, bool isNontemporal=false)
 EmitStoreOfScalar - Store a scalar value to an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
void EmitStoreOfScalar (llvm::Value *Value, Address Addr, bool Volatile, QualType Ty, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo, bool isInit=false, bool isNontemporal=false)
void EmitStoreOfScalar (llvm::Value *value, LValue lvalue, bool isInit=false)
 EmitStoreOfScalar - Store a scalar value to an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
RValue EmitLoadOfLValue (LValue V, SourceLocation Loc)
 EmitLoadOfLValue - Given an expression that represents a value lvalue, this method emits the address of the lvalue, then loads the result as an rvalue, returning the rvalue.
RValue EmitLoadOfExtVectorElementLValue (LValue V)
RValue EmitLoadOfBitfieldLValue (LValue LV, SourceLocation Loc)
RValue EmitLoadOfGlobalRegLValue (LValue LV)
 Load of global named registers are always calls to intrinsics.
RValue EmitLoadOfAnyValue (LValue V, AggValueSlot Slot=AggValueSlot::ignored(), SourceLocation Loc={})
 Like EmitLoadOfLValue but also handles complex and aggregate types.
void EmitStoreThroughLValue (RValue Src, LValue Dst, bool isInit=false)
 EmitStoreThroughLValue - Store the specified rvalue into the specified lvalue, where both are guaranteed to the have the same type, and that type is 'Ty'.
void EmitStoreThroughExtVectorComponentLValue (RValue Src, LValue Dst)
void EmitStoreThroughGlobalRegLValue (RValue Src, LValue Dst)
 Store of global named registers are always calls to intrinsics.
void EmitStoreThroughBitfieldLValue (RValue Src, LValue Dst, llvm::Value **Result=nullptr)
 EmitStoreThroughBitfieldLValue - Store Src into Dst with same constraints as EmitStoreThroughLValue.
LValue EmitComplexAssignmentLValue (const BinaryOperator *E)
 Emit an l-value for an assignment (simple or compound) of complex type.
LValue EmitComplexCompoundAssignmentLValue (const CompoundAssignOperator *E)
LValue EmitScalarCompoundAssignWithComplex (const CompoundAssignOperator *E, llvm::Value *&Result)
LValue EmitBinaryOperatorLValue (const BinaryOperator *E)
LValue EmitCompoundAssignmentLValue (const CompoundAssignOperator *E)
LValue EmitCallExprLValue (const CallExpr *E, llvm::CallBase **CallOrInvoke=nullptr)
LValue EmitVAArgExprLValue (const VAArgExpr *E)
LValue EmitDeclRefLValue (const DeclRefExpr *E)
LValue EmitStringLiteralLValue (const StringLiteral *E)
LValue EmitObjCEncodeExprLValue (const ObjCEncodeExpr *E)
LValue EmitPredefinedLValue (const PredefinedExpr *E)
LValue EmitUnaryOpLValue (const UnaryOperator *E)
LValue EmitArraySubscriptExpr (const ArraySubscriptExpr *E, bool Accessed=false)
llvm::Value * EmitMatrixIndexExpr (const Expr *E)
LValue EmitMatrixSubscriptExpr (const MatrixSubscriptExpr *E)
LValue EmitArraySectionExpr (const ArraySectionExpr *E, bool IsLowerBound=true)
LValue EmitExtVectorElementExpr (const ExtVectorElementExpr *E)
LValue EmitMemberExpr (const MemberExpr *E)
LValue EmitObjCIsaExpr (const ObjCIsaExpr *E)
LValue EmitCompoundLiteralLValue (const CompoundLiteralExpr *E)
LValue EmitInitListLValue (const InitListExpr *E)
void EmitIgnoredConditionalOperator (const AbstractConditionalOperator *E)
LValue EmitConditionalOperatorLValue (const AbstractConditionalOperator *E)
LValue EmitCastLValue (const CastExpr *E)
 EmitCastLValue - Casts are never lvalues unless that cast is to a reference type.
LValue EmitMaterializeTemporaryExpr (const MaterializeTemporaryExpr *E)
LValue EmitOpaqueValueLValue (const OpaqueValueExpr *e)
LValue EmitHLSLArrayAssignLValue (const BinaryOperator *E)
std::pair< LValue, LValueEmitHLSLOutArgLValues (const HLSLOutArgExpr *E, QualType Ty)
LValue EmitHLSLOutArgExpr (const HLSLOutArgExpr *E, CallArgList &Args, QualType Ty)
Address EmitExtVectorElementLValue (LValue V)
 Generates lvalue for partial ext_vector access.
RValue EmitRValueForField (LValue LV, const FieldDecl *FD, SourceLocation Loc)
Address EmitArrayToPointerDecay (const Expr *Array, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
ConstantEmission tryEmitAsConstant (const DeclRefExpr *RefExpr)
 Try to emit a reference to the given value without producing it as an l-value.
ConstantEmission tryEmitAsConstant (const MemberExpr *ME)
llvm::Value * emitScalarConstant (const ConstantEmission &Constant, Expr *E)
RValue EmitPseudoObjectRValue (const PseudoObjectExpr *e, AggValueSlot slot=AggValueSlot::ignored())
LValue EmitPseudoObjectLValue (const PseudoObjectExpr *e)
void FlattenAccessAndType (Address Addr, QualType AddrTy, SmallVectorImpl< std::pair< Address, llvm::Value * > > &AccessList, SmallVectorImpl< QualType > &FlatTypes)
llvm::Value * EmitIvarOffset (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar)
llvm::Value * EmitIvarOffsetAsPointerDiff (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar)
LValue EmitLValueForField (LValue Base, const FieldDecl *Field, bool IsInBounds=true)
LValue EmitLValueForLambdaField (const FieldDecl *Field)
LValue EmitLValueForLambdaField (const FieldDecl *Field, llvm::Value *ThisValue)
 Given that we are currently emitting a lambda, emit an l-value for one of its members.
LValue EmitLValueForFieldInitialization (LValue Base, const FieldDecl *Field)
 EmitLValueForFieldInitialization - Like EmitLValueForField, except that if the Field is a reference, this will return the address of the reference and not the address of the value stored in the reference.
LValue EmitLValueForIvar (QualType ObjectTy, llvm::Value *Base, const ObjCIvarDecl *Ivar, unsigned CVRQualifiers)
LValue EmitCXXConstructLValue (const CXXConstructExpr *E)
LValue EmitCXXBindTemporaryLValue (const CXXBindTemporaryExpr *E)
LValue EmitCXXTypeidLValue (const CXXTypeidExpr *E)
LValue EmitCXXUuidofLValue (const CXXUuidofExpr *E)
LValue EmitObjCMessageExprLValue (const ObjCMessageExpr *E)
LValue EmitObjCIvarRefLValue (const ObjCIvarRefExpr *E)
LValue EmitStmtExprLValue (const StmtExpr *E)
LValue EmitPointerToDataMemberBinaryExpr (const BinaryOperator *E)
LValue EmitObjCSelectorLValue (const ObjCSelectorExpr *E)
void EmitDeclRefExprDbgValue (const DeclRefExpr *E, const APValue &Init)
RValue EmitCall (const CGFunctionInfo &CallInfo, const CGCallee &Callee, ReturnValueSlot ReturnValue, const CallArgList &Args, llvm::CallBase **CallOrInvoke, bool IsMustTail, SourceLocation Loc, bool IsVirtualFunctionPointerThunk=false)
 EmitCall - Generate a call of the given function, expecting the given result type, and using the given argument list which specifies both the LLVM arguments and the types they were derived from.
RValue EmitCall (const CGFunctionInfo &CallInfo, const CGCallee &Callee, ReturnValueSlot ReturnValue, const CallArgList &Args, llvm::CallBase **CallOrInvoke=nullptr, bool IsMustTail=false)
RValue EmitCall (QualType FnType, const CGCallee &Callee, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Value *Chain=nullptr, llvm::CallBase **CallOrInvoke=nullptr, CGFunctionInfo const **ResolvedFnInfo=nullptr)
RValue EmitCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue=ReturnValueSlot(), llvm::CallBase **CallOrInvoke=nullptr)
RValue EmitSimpleCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue, llvm::CallBase **CallOrInvoke=nullptr)
 Emit a CallExpr without considering whether it might be a subclass.
CGCallee EmitCallee (const Expr *E)
void checkTargetFeatures (const CallExpr *E, const FunctionDecl *TargetDecl)
void checkTargetFeatures (SourceLocation Loc, const FunctionDecl *TargetDecl)
llvm::CallInst * EmitRuntimeCall (llvm::FunctionCallee callee, const Twine &name="")
llvm::CallInst * EmitRuntimeCall (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="")
llvm::CallInst * EmitNounwindRuntimeCall (llvm::FunctionCallee callee, const Twine &name="")
llvm::CallInst * EmitNounwindRuntimeCall (llvm::FunctionCallee callee, ArrayRef< Address > args, const Twine &name="")
llvm::CallInst * EmitNounwindRuntimeCall (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="")
SmallVector< llvm::OperandBundleDef, 1 > getBundlesForFunclet (llvm::Value *Callee)
llvm::CallBase * EmitCallOrInvoke (llvm::FunctionCallee Callee, ArrayRef< llvm::Value * > Args, const Twine &Name="")
 Emits a call or invoke instruction to the given function, depending on the current state of the EH stack.
llvm::CallBase * EmitRuntimeCallOrInvoke (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="")
 Emits a call or invoke instruction to the given runtime function.
llvm::CallBase * EmitRuntimeCallOrInvoke (llvm::FunctionCallee callee, const Twine &name="")
 Emits a call or invoke instruction to the given nullary runtime function.
void EmitNoreturnRuntimeCallOrInvoke (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args)
 Emits a call or invoke to the given noreturn runtime function.
CGCallee BuildAppleKextVirtualCall (const CXXMethodDecl *MD, NestedNameSpecifier Qual, llvm::Type *Ty)
 BuildAppleKextVirtualCall - This routine is to support gcc's kext ABI making indirect call to virtual functions.
CGCallee BuildAppleKextVirtualDestructorCall (const CXXDestructorDecl *DD, CXXDtorType Type, const CXXRecordDecl *RD)
 BuildVirtualCall - This routine makes indirect vtable call for call to virtual destructors.
bool isPointerKnownNonNull (const Expr *E)
bool isUnderlyingBasePointerConstantNull (const Expr *E)
 Check whether the underlying base pointer is a constant null.
llvm::Value * EmitPointerAuthBlendDiscriminator (llvm::Value *StorageAddress, llvm::Value *Discriminator)
 Create the discriminator from the storage address and the entity hash.
CGPointerAuthInfo EmitPointerAuthInfo (const PointerAuthSchema &Schema, llvm::Value *StorageAddress, GlobalDecl SchemaDecl, QualType SchemaType)
 Emit the concrete pointer authentication informaton for the given authentication schema.
llvm::Value * EmitPointerAuthSign (const CGPointerAuthInfo &Info, llvm::Value *Pointer)
llvm::Value * EmitPointerAuthAuth (const CGPointerAuthInfo &Info, llvm::Value *Pointer)
llvm::Value * emitPointerAuthResign (llvm::Value *Pointer, QualType PointerType, const CGPointerAuthInfo &CurAuthInfo, const CGPointerAuthInfo &NewAuthInfo, bool IsKnownNonNull)
llvm::Value * emitPointerAuthResignCall (llvm::Value *Pointer, const CGPointerAuthInfo &CurInfo, const CGPointerAuthInfo &NewInfo)
void EmitPointerAuthOperandBundle (const CGPointerAuthInfo &Info, SmallVectorImpl< llvm::OperandBundleDef > &Bundles)
CGPointerAuthInfo EmitPointerAuthInfo (PointerAuthQualifier Qualifier, Address StorageAddress)
llvm::Value * EmitPointerAuthQualify (PointerAuthQualifier Qualifier, llvm::Value *Pointer, QualType ValueType, Address StorageAddress, bool IsKnownNonNull)
llvm::Value * EmitPointerAuthQualify (PointerAuthQualifier Qualifier, const Expr *PointerExpr, Address StorageAddress)
llvm::Value * EmitPointerAuthUnqualify (PointerAuthQualifier Qualifier, llvm::Value *Pointer, QualType PointerType, Address StorageAddress, bool IsKnownNonNull)
void EmitPointerAuthCopy (PointerAuthQualifier Qualifier, QualType Type, Address DestField, Address SrcField)
std::pair< llvm::Value *, CGPointerAuthInfoEmitOrigPointerRValue (const Expr *E)
 Retrieve a pointer rvalue and its ptrauth info.
llvm::Value * authPointerToPointerCast (llvm::Value *ResultPtr, QualType SourceType, QualType DestType)
Address authPointerToPointerCast (Address Ptr, QualType SourceType, QualType DestType)
Address getAsNaturalAddressOf (Address Addr, QualType PointeeTy)
llvm::Value * getAsNaturalPointerTo (Address Addr, QualType PointeeType)
void defaultInitNonTrivialCStructVar (LValue Dst)
void callCStructDefaultConstructor (LValue Dst)
void callCStructDestructor (LValue Dst)
void callCStructCopyConstructor (LValue Dst, LValue Src)
void callCStructMoveConstructor (LValue Dst, LValue Src)
void callCStructCopyAssignmentOperator (LValue Dst, LValue Src)
void callCStructMoveAssignmentOperator (LValue Dst, LValue Src)
RValue EmitCXXMemberOrOperatorCall (const CXXMethodDecl *Method, const CGCallee &Callee, ReturnValueSlot ReturnValue, llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E, CallArgList *RtlArgs, llvm::CallBase **CallOrInvoke)
RValue EmitCXXDestructorCall (GlobalDecl Dtor, const CGCallee &Callee, llvm::Value *This, QualType ThisTy, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E, llvm::CallBase **CallOrInvoke=nullptr)
RValue EmitCXXMemberCallExpr (const CXXMemberCallExpr *E, ReturnValueSlot ReturnValue, llvm::CallBase **CallOrInvoke=nullptr)
RValue EmitCXXMemberOrOperatorMemberCallExpr (const CallExpr *CE, const CXXMethodDecl *MD, ReturnValueSlot ReturnValue, bool HasQualifier, NestedNameSpecifier Qualifier, bool IsArrow, const Expr *Base, llvm::CallBase **CallOrInvoke)
Address EmitCXXMemberDataPointerAddress (const Expr *E, Address base, llvm::Value *memberPtr, const MemberPointerType *memberPtrType, bool IsInBounds, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr)
 Emit the address of a field using a member data pointer.
RValue EmitCXXMemberPointerCallExpr (const CXXMemberCallExpr *E, ReturnValueSlot ReturnValue, llvm::CallBase **CallOrInvoke)
RValue EmitCXXOperatorMemberCallExpr (const CXXOperatorCallExpr *E, const CXXMethodDecl *MD, ReturnValueSlot ReturnValue, llvm::CallBase **CallOrInvoke)
RValue EmitCXXPseudoDestructorExpr (const CXXPseudoDestructorExpr *E)
RValue EmitCUDAKernelCallExpr (const CUDAKernelCallExpr *E, ReturnValueSlot ReturnValue, llvm::CallBase **CallOrInvoke)
RValue EmitNVPTXDevicePrintfCallExpr (const CallExpr *E)
RValue EmitAMDGPUDevicePrintfCallExpr (const CallExpr *E)
RValue EmitBuiltinExpr (const GlobalDecl GD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
RValue emitRotate (const CallExpr *E, bool IsRotateRight)
RValue emitBuiltinOSLogFormat (const CallExpr &E)
 Emit IR for __builtin_os_log_format.
RValue EmitBuiltinIsAligned (const CallExpr *E)
 Emit IR for __builtin_is_aligned.
RValue EmitBuiltinAlignTo (const CallExpr *E, bool AlignUp)
 Emit IR for __builtin_align_up/__builtin_align_down.
llvm::Function * generateBuiltinOSLogHelperFunction (const analyze_os_log::OSLogBufferLayout &Layout, CharUnits BufferAlignment)
RValue EmitBlockCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue, llvm::CallBase **CallOrInvoke)
llvm::Value * EmitTargetBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
 EmitTargetBuiltinExpr - Emit the given builtin call.
llvm::Value * EmitAArch64CompareBuiltinExpr (llvm::Value *Op, llvm::Type *Ty, const llvm::CmpInst::Predicate Pred, const llvm::Twine &Name="")
llvm::Value * EmitARMBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch)
llvm::Value * EmitARMMVEBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch)
llvm::Value * EmitARMCDEBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch)
llvm::Value * EmitCMSEClearRecord (llvm::Value *V, llvm::IntegerType *ITy, QualType RTy)
llvm::Value * EmitCMSEClearRecord (llvm::Value *V, llvm::ArrayType *ATy, QualType RTy)
llvm::Value * EmitCommonNeonBuiltinExpr (unsigned BuiltinID, unsigned LLVMIntrinsic, unsigned AltLLVMIntrinsic, const char *NameHint, unsigned Modifier, const CallExpr *E, SmallVectorImpl< llvm::Value * > &Ops, Address PtrOp0, Address PtrOp1, llvm::Triple::ArchType Arch)
llvm::Function * LookupNeonLLVMIntrinsic (unsigned IntrinsicID, unsigned Modifier, llvm::Type *ArgTy, const CallExpr *E)
llvm::Value * EmitNeonCall (llvm::Function *F, SmallVectorImpl< llvm::Value * > &O, const char *name, unsigned shift=0, bool rightshift=false)
llvm::Value * EmitFP8NeonCall (unsigned IID, ArrayRef< llvm::Type * > Tys, SmallVectorImpl< llvm::Value * > &O, const CallExpr *E, const char *name)
llvm::Value * EmitFP8NeonCvtCall (unsigned IID, llvm::Type *Ty0, llvm::Type *Ty1, bool Extract, SmallVectorImpl< llvm::Value * > &Ops, const CallExpr *E, const char *name)
llvm::Value * EmitFP8NeonFDOTCall (unsigned IID, bool ExtendLaneArg, llvm::Type *RetTy, SmallVectorImpl< llvm::Value * > &Ops, const CallExpr *E, const char *name)
llvm::Value * EmitFP8NeonFMLACall (unsigned IID, bool ExtendLaneArg, llvm::Type *RetTy, SmallVectorImpl< llvm::Value * > &Ops, const CallExpr *E, const char *name)
llvm::Value * EmitNeonSplat (llvm::Value *V, llvm::Constant *Idx, const llvm::ElementCount &Count)
llvm::Value * EmitNeonSplat (llvm::Value *V, llvm::Constant *Idx)
llvm::Value * EmitNeonShiftVector (llvm::Value *V, llvm::Type *Ty, bool negateForRightShift)
llvm::Value * EmitNeonRShiftImm (llvm::Value *Vec, llvm::Value *Amt, llvm::Type *Ty, bool usgn, const char *name)
llvm::Value * vectorWrapScalar16 (llvm::Value *Op)
llvm::Type * SVEBuiltinMemEltTy (const SVETypeFlags &TypeFlags)
 SVEBuiltinMemEltTy - Returns the memory element type for this memory access builtin.
SmallVector< llvm::Type *, 2 > getSVEOverloadTypes (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops)
llvm::Type * getEltType (const SVETypeFlags &TypeFlags)
llvm::ScalableVectorType * getSVEType (const SVETypeFlags &TypeFlags)
llvm::ScalableVectorType * getSVEPredType (const SVETypeFlags &TypeFlags)
llvm::Value * EmitSVETupleSetOrGet (const SVETypeFlags &TypeFlags, ArrayRef< llvm::Value * > Ops)
llvm::Value * EmitSVETupleCreate (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops)
llvm::Value * EmitSVEAllTruePred (const SVETypeFlags &TypeFlags)
llvm::Value * EmitSVEDupX (llvm::Value *Scalar)
llvm::Value * EmitSVEDupX (llvm::Value *Scalar, llvm::Type *Ty)
llvm::Value * EmitSVEReinterpret (llvm::Value *Val, llvm::Type *Ty)
llvm::Value * EmitSVEPMull (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID)
llvm::Value * EmitSVEMovl (const SVETypeFlags &TypeFlags, llvm::ArrayRef< llvm::Value * > Ops, unsigned BuiltinID)
llvm::Value * EmitSVEPredicateCast (llvm::Value *Pred, llvm::ScalableVectorType *VTy)
llvm::Value * EmitSVEPredicateTupleCast (llvm::Value *PredTuple, llvm::StructType *Ty)
llvm::Value * EmitSVEGatherLoad (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitSVEScatterStore (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitSVEMaskedLoad (const CallExpr *, llvm::Type *ReturnTy, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID, bool IsZExtReturn)
llvm::Value * EmitSVEMaskedStore (const CallExpr *, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID)
llvm::Value * EmitSVEPrefetchLoad (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID)
llvm::Value * EmitSVEGatherPrefetch (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitSVEStructLoad (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitSVEStructStore (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitAArch64SVEBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitSMELd1St1 (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitSMEReadWrite (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitSMEZero (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
llvm::Value * EmitSMELdrStr (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID)
void GetAArch64SVEProcessedOperands (unsigned BuiltinID, const CallExpr *E, SmallVectorImpl< llvm::Value * > &Ops, SVETypeFlags TypeFlags)
llvm::Value * EmitAArch64SMEBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitAArch64BuiltinExpr (unsigned BuiltinID, const CallExpr *E, llvm::Triple::ArchType Arch)
llvm::Value * EmitBPFBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * BuildVector (ArrayRef< llvm::Value * > Ops)
llvm::Value * EmitX86BuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitPPCBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitAMDGPUBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitHLSLBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
llvm::Function * getSpecConstantFunction (const clang::QualType &SpecConstantType)
llvm::Value * EmitDirectXBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitSPIRVBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitScalarOrConstFoldImmArg (unsigned ICEArguments, unsigned Idx, const CallExpr *E)
llvm::Value * EmitSystemZBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitNVPTXBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitWebAssemblyBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitHexagonBuiltinExpr (unsigned BuiltinID, const CallExpr *E)
llvm::Value * EmitRISCVBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue)
llvm::Value * EmitRISCVCpuSupports (const CallExpr *E)
llvm::Value * EmitRISCVCpuSupports (ArrayRef< StringRef > FeaturesStrs)
llvm::Value * EmitRISCVCpuInit ()
llvm::Value * EmitRISCVCpuIs (const CallExpr *E)
llvm::Value * EmitRISCVCpuIs (StringRef CPUStr)
void AddAMDGPUFenceAddressSpaceMMRA (llvm::Instruction *Inst, const CallExpr *E)
void ProcessOrderScopeAMDGCN (llvm::Value *Order, llvm::Value *Scope, llvm::AtomicOrdering &AO, llvm::SyncScope::ID &SSID)
llvm::Value * EmitMSVCBuiltinExpr (MSVCIntrin BuiltinID, const CallExpr *E)
llvm::Value * EmitBuiltinAvailable (const VersionTuple &Version)
llvm::Value * EmitObjCProtocolExpr (const ObjCProtocolExpr *E)
llvm::Value * EmitObjCStringLiteral (const ObjCStringLiteral *E)
 Emits an instance of NSConstantString representing the object.
llvm::Value * EmitObjCBoxedExpr (const ObjCBoxedExpr *E)
 EmitObjCBoxedExpr - This routine generates code to call the appropriate expression boxing method.
llvm::Value * EmitObjCArrayLiteral (const ObjCArrayLiteral *E)
llvm::Value * EmitObjCDictionaryLiteral (const ObjCDictionaryLiteral *E)
llvm::Value * EmitObjCCollectionLiteral (const Expr *E, const ObjCMethodDecl *MethodWithObjects)
llvm::Value * EmitObjCSelectorExpr (const ObjCSelectorExpr *E)
 Emit a selector.
RValue EmitObjCMessageExpr (const ObjCMessageExpr *E, ReturnValueSlot Return=ReturnValueSlot())
CleanupKind getARCCleanupKind ()
 Retrieves the default cleanup kind for an ARC cleanup.
void EmitARCInitWeak (Address addr, llvm::Value *value)
 i8* @objc_initWeak(i8** addr, i8* value) Returns value.
void EmitARCDestroyWeak (Address addr)
 void @objc_destroyWeak(i8** addr) Essentially objc_storeWeak(addr, nil).
llvm::Value * EmitARCLoadWeak (Address addr)
 i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)).
llvm::Value * EmitARCLoadWeakRetained (Address addr)
 i8* @objc_loadWeakRetained(i8** addr)
llvm::Value * EmitARCStoreWeak (Address addr, llvm::Value *value, bool ignored)
 i8* @objc_storeWeak(i8** addr, i8* value) Returns value.
void emitARCCopyAssignWeak (QualType Ty, Address DstAddr, Address SrcAddr)
void emitARCMoveAssignWeak (QualType Ty, Address DstAddr, Address SrcAddr)
void EmitARCCopyWeak (Address dst, Address src)
 void @objc_copyWeak(i8** dest, i8** src) Disregards the current value in dest.
void EmitARCMoveWeak (Address dst, Address src)
 void @objc_moveWeak(i8** dest, i8** src) Disregards the current value in dest.
llvm::Value * EmitARCRetainAutorelease (QualType type, llvm::Value *value)
 Do a fused retain/autorelease of the given object.
llvm::Value * EmitARCRetainAutoreleaseNonBlock (llvm::Value *value)
 Do a fused retain/autorelease of the given object.
llvm::Value * EmitARCStoreStrong (LValue lvalue, llvm::Value *value, bool resultIgnored)
 Store into a strong object.
llvm::Value * EmitARCStoreStrongCall (Address addr, llvm::Value *value, bool resultIgnored)
 Store into a strong object.
llvm::Value * EmitARCRetain (QualType type, llvm::Value *value)
 Produce the code to do a retain.
llvm::Value * EmitARCRetainNonBlock (llvm::Value *value)
 Retain the given object, with normal retain semantics.
llvm::Value * EmitARCRetainBlock (llvm::Value *value, bool mandatory)
 Retain the given block, with _Block_copy semantics.
void EmitARCDestroyStrong (Address addr, ARCPreciseLifetime_t precise)
 Destroy a __strong variable.
void EmitARCRelease (llvm::Value *value, ARCPreciseLifetime_t precise)
 Release the given object.
llvm::Value * EmitARCAutorelease (llvm::Value *value)
 Autorelease the given object.
llvm::Value * EmitARCAutoreleaseReturnValue (llvm::Value *value)
 Autorelease the given object.
llvm::Value * EmitARCRetainAutoreleaseReturnValue (llvm::Value *value)
 Do a fused retain/autorelease of the given object.
llvm::Value * EmitARCRetainAutoreleasedReturnValue (llvm::Value *value)
 Retain the given object which is the result of a function call.
llvm::Value * EmitARCUnsafeClaimAutoreleasedReturnValue (llvm::Value *value)
 Claim a possibly-autoreleased return value at +0.
llvm::Value * EmitObjCAutorelease (llvm::Value *value, llvm::Type *returnType)
 Autorelease the given object.
llvm::Value * EmitObjCRetainNonBlock (llvm::Value *value, llvm::Type *returnType)
 Retain the given object, with normal retain semantics.
void EmitObjCRelease (llvm::Value *value, ARCPreciseLifetime_t precise)
 Release the given object.
std::pair< LValue, llvm::Value * > EmitARCStoreAutoreleasing (const BinaryOperator *e)
std::pair< LValue, llvm::Value * > EmitARCStoreStrong (const BinaryOperator *e, bool ignored)
std::pair< LValue, llvm::Value * > EmitARCStoreUnsafeUnretained (const BinaryOperator *e, bool ignored)
llvm::Value * EmitObjCAlloc (llvm::Value *value, llvm::Type *returnType)
 Allocate the given objc object.
llvm::Value * EmitObjCAllocWithZone (llvm::Value *value, llvm::Type *returnType)
 Allocate the given objc object.
llvm::Value * EmitObjCAllocInit (llvm::Value *value, llvm::Type *resultType)
llvm::Value * EmitObjCThrowOperand (const Expr *expr)
llvm::Value * EmitObjCConsumeObject (QualType T, llvm::Value *Ptr)
 Produce the code for a CK_ARCConsumeObject.
llvm::Value * EmitObjCExtendObjectLifetime (QualType T, llvm::Value *Ptr)
llvm::Value * EmitARCExtendBlockObject (const Expr *expr)
llvm::Value * EmitARCReclaimReturnedObject (const Expr *e, bool allowUnsafeClaim)
llvm::Value * EmitARCRetainScalarExpr (const Expr *expr)
 EmitARCRetainScalarExpr - Semantically equivalent to EmitARCRetainObject(e->getType(), EmitScalarExpr(e)), but making a best-effort attempt to peephole expressions that naturally produce retained objects.
llvm::Value * EmitARCRetainAutoreleaseScalarExpr (const Expr *expr)
llvm::Value * EmitARCUnsafeUnretainedScalarExpr (const Expr *expr)
 EmitARCUnsafeUnretainedScalarExpr - Semantically equivalent to immediately releasing the resut of EmitARCRetainScalarExpr, but avoiding any spurious retains, including by performing reclaims with objc_unsafeClaimAutoreleasedReturnValue.
void EmitARCIntrinsicUse (ArrayRef< llvm::Value * > values)
 Given a number of pointers, inform the optimizer that they're being intrinsically used up until this point in the program.
void EmitARCNoopIntrinsicUse (ArrayRef< llvm::Value * > values)
 Emit a call to "clang.arc.noop.use", which consumes the result of a call that has operand bundle "clang.arc.attachedcall".
void EmitObjCAutoreleasePoolPop (llvm::Value *Ptr)
 Produce the code to do a primitive release.
llvm::Value * EmitObjCAutoreleasePoolPush ()
 Produce the code to do a objc_autoreleasepool_push.
llvm::Value * EmitObjCMRRAutoreleasePoolPush ()
 Produce the code to do an MRR version objc_autoreleasepool_push.
void EmitObjCAutoreleasePoolCleanup (llvm::Value *Ptr)
void EmitObjCMRRAutoreleasePoolPop (llvm::Value *Ptr)
 Produce the code to do a primitive release.
RValue EmitReferenceBindingToExpr (const Expr *E)
 Emits a reference binding to the passed in expression.
llvm::Value * EmitScalarExpr (const Expr *E, bool IgnoreResultAssign=false)
 EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type, returning the result.
llvm::Value * EmitScalarConversion (llvm::Value *Src, QualType SrcTy, QualType DstTy, SourceLocation Loc)
 Emit a conversion from the specified type to the specified destination type, both of which are LLVM scalar types.
llvm::Value * EmitComplexToScalarConversion (ComplexPairTy Src, QualType SrcTy, QualType DstTy, SourceLocation Loc)
 Emit a conversion from the specified complex type to the specified destination type, where the destination type is an LLVM scalar type.
void EmitAggExpr (const Expr *E, AggValueSlot AS)
 EmitAggExpr - Emit the computation of the specified expression of aggregate type.
LValue EmitAggExprToLValue (const Expr *E)
 EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue.
void EmitAggFinalDestCopy (QualType Type, AggValueSlot Dest, const LValue &Src, ExprValueKind SrcKind)
 EmitAggFinalDestCopy - Emit copy of the specified aggregate into destination address.
void CreateCoercedStore (llvm::Value *Src, Address Dst, llvm::TypeSize DstSize, bool DstIsVolatile)
 Create a store to.
void EmitExtendGCLifetime (llvm::Value *object)
 EmitExtendGCLifetime - Given a pointer to an Objective-C object, make sure it survives garbage collection until this point.
ComplexPairTy EmitComplexExpr (const Expr *E, bool IgnoreReal=false, bool IgnoreImag=false)
 EmitComplexExpr - Emit the computation of the specified expression of complex type, returning the result.
void EmitComplexExprIntoLValue (const Expr *E, LValue dest, bool isInit)
 EmitComplexExprIntoLValue - Emit the given expression of complex type and place its result into the specified l-value.
void EmitStoreOfComplex (ComplexPairTy V, LValue dest, bool isInit)
 EmitStoreOfComplex - Store a complex number into the specified l-value.
ComplexPairTy EmitLoadOfComplex (LValue src, SourceLocation loc)
 EmitLoadOfComplex - Load a complex number from the specified l-value.
ComplexPairTy EmitPromotedComplexExpr (const Expr *E, QualType PromotionType)
llvm::Value * EmitPromotedScalarExpr (const Expr *E, QualType PromotionType)
ComplexPairTy EmitPromotedValue (ComplexPairTy result, QualType PromotionType)
ComplexPairTy EmitUnPromotedValue (ComplexPairTy result, QualType PromotionType)
Address emitAddrOfRealComponent (Address complex, QualType complexType)
Address emitAddrOfImagComponent (Address complex, QualType complexType)
llvm::GlobalVariable * AddInitializerToStaticVarDecl (const VarDecl &D, llvm::GlobalVariable *GV)
 AddInitializerToStaticVarDecl - Add the initializer for 'D' to the global variable that has already been created for it.
void EmitInvariantStart (llvm::Constant *Addr, CharUnits Size)
void EmitCXXGlobalVarDeclInit (const VarDecl &D, llvm::GlobalVariable *GV, bool PerformInit)
 EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage.
llvm::Constant * createAtExitStub (const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr)
 Create a stub function, suitable for being passed to atexit, which passes the given address to the given destructor function.
llvm::Function * createTLSAtExitStub (const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr, llvm::FunctionCallee &AtExit)
 Create a stub function, suitable for being passed to __pt_atexit_np, which passes the given address to the given destructor function.
void registerGlobalDtorWithAtExit (const VarDecl &D, llvm::FunctionCallee fn, llvm::Constant *addr)
 Call atexit() with a function that passes the given argument to the given function.
void registerGlobalDtorWithLLVM (const VarDecl &D, llvm::FunctionCallee fn, llvm::Constant *addr)
 Registers the dtor using 'llvm.global_dtors' for platforms that do not support an 'atexit()' function.
void registerGlobalDtorWithAtExit (llvm::Constant *dtorStub)
 Call atexit() with function dtorStub.
llvm::Value * unregisterGlobalDtorWithUnAtExit (llvm::Constant *dtorStub)
 Call unatexit() with function dtorStub.
void EmitCXXGuardedInit (const VarDecl &D, llvm::GlobalVariable *DeclPtr, bool PerformInit)
 Emit code in this function to perform a guarded variable initialization.
void EmitCXXGuardedInitBranch (llvm::Value *NeedsInit, llvm::BasicBlock *InitBlock, llvm::BasicBlock *NoInitBlock, GuardKind Kind, const VarDecl *D)
 Emit a branch to select whether or not to perform guarded initialization.
void GenerateCXXGlobalInitFunc (llvm::Function *Fn, ArrayRef< llvm::Function * > CXXThreadLocals, ConstantAddress Guard=ConstantAddress::invalid())
 GenerateCXXGlobalInitFunc - Generates code for initializing global variables.
void GenerateCXXGlobalCleanUpFunc (llvm::Function *Fn, ArrayRef< std::tuple< llvm::FunctionType *, llvm::WeakTrackingVH, llvm::Constant * > > DtorsOrStermFinalizers)
 GenerateCXXGlobalCleanUpFunc - Generates code for cleaning up global variables.
void GenerateCXXGlobalVarDeclInitFunc (llvm::Function *Fn, const VarDecl *D, llvm::GlobalVariable *Addr, bool PerformInit)
 Emit the code necessary to initialize the given global variable.
void EmitCXXConstructExpr (const CXXConstructExpr *E, AggValueSlot Dest)
void EmitSynthesizedCXXCopyCtor (Address Dest, Address Src, const Expr *Exp)
void EmitCXXThrowExpr (const CXXThrowExpr *E, bool KeepInsertionPoint=true)
RValue EmitAtomicExpr (AtomicExpr *E)
void EmitFakeUse (Address Addr)
llvm::Value * EmitAnnotationCall (llvm::Function *AnnotationFn, llvm::Value *AnnotatedVal, StringRef AnnotationStr, SourceLocation Location, const AnnotateAttr *Attr)
 Emit an annotation call (intrinsic).
void EmitVarAnnotations (const VarDecl *D, llvm::Value *V)
 Emit local annotations for the local variable V, declared by D.
Address EmitFieldAnnotations (const FieldDecl *D, Address V)
 Emit field annotations for the given field & value.
bool ConstantFoldsToSimpleInteger (const Expr *Cond, bool &Result, bool AllowLabels=false)
 ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.
bool ConstantFoldsToSimpleInteger (const Expr *Cond, llvm::APSInt &Result, bool AllowLabels=false)
 ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.
void EmitBranchToCounterBlock (const Expr *Cond, BinaryOperator::Opcode LOp, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount=0, Stmt::Likelihood LH=Stmt::LH_None, const Expr *CntrIdx=nullptr)
 EmitBranchToCounterBlock - Emit a conditional branch to a new block that increments a profile counter based on the semantics of the given logical operator opcode.
void EmitBranchOnBoolExpr (const Expr *Cond, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount, Stmt::Likelihood LH=Stmt::LH_None, const Expr *ConditionalOp=nullptr, const VarDecl *ConditionalDecl=nullptr)
 EmitBranchOnBoolExpr - Emit a branch on a boolean condition (e.g.
void EmitNullabilityCheck (LValue LHS, llvm::Value *RHS, SourceLocation Loc)
 Given an assignment *LHS = RHS, emit a test that checks if RHS is nonnull, if LHS is marked _Nonnull.
llvm::Value * EmitPointerArithmetic (const BinaryOperator *BO, Expr *pointerOperand, llvm::Value *pointer, Expr *indexOperand, llvm::Value *index, bool isSubtraction)
 Emit pointer + index arithmetic.
llvm::Value * EmitCheckedInBoundsGEP (llvm::Type *ElemTy, llvm::Value *Ptr, ArrayRef< llvm::Value * > IdxList, bool SignedIndices, bool IsSubtraction, SourceLocation Loc, const Twine &Name="")
 Same as IRBuilder::CreateInBoundsGEP, but additionally emits a check to detect undefined behavior when the pointer overflow sanitizer is enabled.
Address EmitCheckedInBoundsGEP (Address Addr, ArrayRef< llvm::Value * > IdxList, llvm::Type *elementType, bool SignedIndices, bool IsSubtraction, SourceLocation Loc, CharUnits Align, const Twine &Name="")
llvm::Value * EmitCheckedArgForBuiltin (const Expr *E, BuiltinCheckKind Kind)
 Emits an argument for a call to a builtin.
llvm::Value * EmitCheckedArgForAssume (const Expr *E)
 Emits an argument for a call to a __builtin_assume.
llvm::Constant * EmitCheckTypeDescriptor (QualType T)
 Emit a description of a type in a format suitable for passing to a runtime sanitizer handler.
llvm::Value * EmitCheckValue (llvm::Value *V)
 Convert a value into a format suitable for passing to a runtime sanitizer handler.
llvm::Constant * EmitCheckSourceLocation (SourceLocation Loc)
 Emit a description of a source location in a format suitable for passing to a runtime sanitizer handler.
void EmitKCFIOperandBundle (const CGCallee &Callee, SmallVectorImpl< llvm::OperandBundleDef > &Bundles)
void EmitCheck (ArrayRef< std::pair< llvm::Value *, SanitizerKind::SanitizerOrdinal > > Checked, SanitizerHandler Check, ArrayRef< llvm::Constant * > StaticArgs, ArrayRef< llvm::Value * > DynamicArgs, const TrapReason *TR=nullptr)
 Create a basic block that will either trap or call a handler function in the UBSan runtime with the provided arguments, and create a conditional branch to it.
void EmitCfiSlowPathCheck (SanitizerKind::SanitizerOrdinal Ordinal, llvm::Value *Cond, llvm::ConstantInt *TypeId, llvm::Value *Ptr, ArrayRef< llvm::Constant * > StaticArgs)
 Emit a slow path cross-DSO CFI check which calls __cfi_slowpath if Cond if false.
void EmitUnreachable (SourceLocation Loc)
 Emit a reached-unreachable diagnostic if Loc is valid and runtime checking is enabled.
void EmitTrapCheck (llvm::Value *Checked, SanitizerHandler CheckHandlerID, bool NoMerge=false, const TrapReason *TR=nullptr)
 Create a basic block that will call the trap intrinsic, and emit a conditional branch to it, for the -ftrapv checks.
llvm::CallInst * EmitTrapCall (llvm::Intrinsic::ID IntrID)
 Emit a call to trap or debugtrap and attach function attribute "trap-func-name" if specified.
void EmitCfiCheckStub ()
 Emit a stub for the cross-DSO CFI check function.
void EmitCfiCheckFail ()
 Emit a cross-DSO CFI failure handling function.
void EmitNonNullArgCheck (RValue RV, QualType ArgType, SourceLocation ArgLoc, AbstractCallee AC, unsigned ParmNum)
 Create a check for a function parameter that may potentially be declared as non-null.
void EmitNonNullArgCheck (Address Addr, QualType ArgType, SourceLocation ArgLoc, AbstractCallee AC, unsigned ParmNum)
void EmitWritebacks (const CallArgList &Args)
 EmitWriteback - Emit callbacks for function.
void EmitCallArg (CallArgList &args, const Expr *E, QualType ArgType)
 EmitCallArg - Emit a single call argument.
void EmitDelegateCallArg (CallArgList &args, const VarDecl *param, SourceLocation loc)
 EmitDelegateCallArg - We are performing a delegate call; that is, the current function is delegating to another one.
void SetFPAccuracy (llvm::Value *Val, float Accuracy)
 SetFPAccuracy - Set the minimum required accuracy of the given floating point operation, expressed as the maximum relative error in ulp.
void SetSqrtFPAccuracy (llvm::Value *Val)
 Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.
void SetDivFPAccuracy (llvm::Value *Val)
 Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.
void SetFastMathFlags (FPOptions FPFeatures)
 Set the codegen fast-math flags.
llvm::Value * emitBoolVecConversion (llvm::Value *SrcVec, unsigned NumElementsDst, const llvm::Twine &Name="")
void maybeAttachRangeForLoad (llvm::LoadInst *Load, QualType Ty, SourceLocation Loc)
void EmitCallArgs (CallArgList &Args, PrototypeWrapper Prototype, llvm::iterator_range< CallExpr::const_arg_iterator > ArgRange, AbstractCallee AC=AbstractCallee(), unsigned ParamsToSkip=0, EvaluationOrder Order=EvaluationOrder::Default)
 EmitCallArgs - Emit call arguments for a function.
Address EmitPointerWithAlignment (const Expr *Addr, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
 EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee.
llvm::Value * LoadPassedObjectSize (const Expr *E, QualType EltTy)
 If E references a parameter with pass_object_size info or a constant array size modifier, emit the object size divided by the size of EltTy.
void EmitSanitizerStatReport (llvm::SanitizerStatKind SSK)
void EmitMultiVersionResolver (llvm::Function *Resolver, ArrayRef< FMVResolverOption > Options)
void EmitX86MultiVersionResolver (llvm::Function *Resolver, ArrayRef< FMVResolverOption > Options)
void EmitAArch64MultiVersionResolver (llvm::Function *Resolver, ArrayRef< FMVResolverOption > Options)
void EmitRISCVMultiVersionResolver (llvm::Function *Resolver, ArrayRef< FMVResolverOption > Options)
Public Member Functions inherited from clang::CodeGen::CodeGenTypeCache
CharUnits getIntSize () const
CharUnits getIntAlign () const
CharUnits getSizeSize () const
CharUnits getSizeAlign () const
CharUnits getPointerSize () const
CharUnits getPointerAlign () const
llvm::CallingConv::ID getRuntimeCC () const
LangAS getASTAllocaAddressSpace () const

Static Public Member Functions

static bool cxxDestructorCanThrow (QualType T)
 Check if T is a C++ class that has a destructor that can throw.
static bool IsConstructorDelegationValid (const CXXConstructorDecl *Ctor)
 Checks whether the given constructor is a valid subject for the complete-to-base constructor delegation optimization, i.e.
static TypeEvaluationKind getEvaluationKind (QualType T)
 getEvaluationKind - Return the TypeEvaluationKind of QualType T.
static bool hasScalarEvaluationKind (QualType T)
static bool hasAggregateEvaluationKind (QualType T)
static unsigned getAccessedFieldNo (unsigned Idx, const llvm::Constant *Elts)
 getAccessedFieldNo - Given an encoded value and a result number, return the input field number being accessed.
static bool IsWrappedCXXThis (const Expr *E)
 Check if E is a C++ "this" pointer wrapped in value-preserving casts.
static bool ShouldNullCheckClassCastValue (const CastExpr *Cast)
static bool isNullPointerAllowed (TypeCheckKind TCK)
 Determine whether the pointer type check TCK permits null pointers.
static bool isVptrCheckRequired (TypeCheckKind TCK, QualType Ty)
 Determine whether the pointer type check TCK requires a vptr check.
static void EmitOMPTargetDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetDirective &S)
 Emit device code for the target directive.
static void EmitOMPTargetParallelDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelDirective &S)
static void EmitOMPTargetParallelForDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelForDirective &S)
 Emit device code for the target parallel for directive.
static void EmitOMPTargetParallelForSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelForSimdDirective &S)
 Emit device code for the target parallel for simd directive.
static void EmitOMPTargetTeamsDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDirective &S)
 Emit device code for the target teams directive.
static void EmitOMPTargetTeamsDistributeDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeDirective &S)
 Emit device code for the target teams distribute directive.
static void EmitOMPTargetTeamsDistributeSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeSimdDirective &S)
 Emit device code for the target teams distribute simd directive.
static void EmitOMPTargetSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetSimdDirective &S)
 Emit device code for the target simd directive.
static void EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForSimdDirective &S)
 Emit device code for the target teams distribute parallel for simd directive.
static void EmitOMPTargetTeamsGenericLoopDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsGenericLoopDirective &S)
 Emit device code for the target teams loop directive.
static void EmitOMPTargetParallelGenericLoopDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelGenericLoopDirective &S)
 Emit device code for the target parallel loop directive.
static void EmitOMPTargetTeamsDistributeParallelForDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForDirective &S)
static std::string getNonTrivialCopyConstructorStr (QualType QT, CharUnits Alignment, bool IsVolatile, ASTContext &Ctx)
static std::string getNonTrivialDestructorStr (QualType QT, CharUnits Alignment, bool IsVolatile, ASTContext &Ctx)
static bool ContainsLabel (const Stmt *S, bool IgnoreCaseStmts=false)
 ContainsLabel - Return true if the statement contains a label in it.
static bool containsBreak (const Stmt *S)
 containsBreak - Return true if the statement contains a break out of it.
static bool mightAddDeclToScope (const Stmt *S)
 Determine if the given statement might introduce a declaration into the current scope, by being a (possibly-labelled) DeclStmt.
static const ExprstripCond (const Expr *C)
 Ignore parentheses and logical-NOT to track conditions consistently.
static bool isInstrumentedCondition (const Expr *C)
 isInstrumentedCondition - Determine whether the given condition is an instrumentable condition (i.e.

Public Attributes

CodeGenModuleCGM
const TargetInfoTarget
CodeGenFunctionParentCGF = nullptr
LoopInfoStack LoopStack
CGBuilderTy Builder
VarBypassDetector Bypasses
SmallVector< llvm::CanonicalLoopInfo *, 4 > OMPLoopNestStack
 List of recently emitted OMPCanonicalLoops.
SmallVector< const BinaryOperator *, 16 > MCDCLogOpStack
 Stack to track the Logical Operator recursion nest for MC/DC.
SmallVector< llvm::ConvergenceControlInst *, 4 > ConvergenceTokenStack
 Stack to track the controlled convergence tokens.
int ExpectedOMPLoopDepth = 0
 Number of nested loop to be consumed by the last surrounding loop-associated directive.
const DeclCurFuncDecl = nullptr
 CurFuncDecl - Holds the Decl for the current outermost non-closure context.
const DeclCurCodeDecl = nullptr
 CurCodeDecl - This is the inner-most code context, which includes blocks.
const CGFunctionInfoCurFnInfo = nullptr
QualType FnRetTy
llvm::Function * CurFn = nullptr
llvm::SmallVector< const ParmVarDecl *, 4 > FnArgs
 Save Parameter Decl for coroutine.
CGCoroInfo CurCoro
AwaitSuspendWrapperInfo CurAwaitSuspendWrapper
GlobalDecl CurGD
 CurGD - The GlobalDecl for the current function being compiled.
EHScopeStack::stable_iterator PrologueCleanupDepth
 PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters.
JumpDest ReturnBlock
 ReturnBlock - Unified return block.
Address ReturnValue = Address::invalid()
 ReturnValue - The temporary alloca to hold the return value.
Address ReturnValuePointer = Address::invalid()
 ReturnValuePointer - The temporary alloca to hold a pointer to sret.
const ExprRetExpr = nullptr
 If a return statement is being visited, this holds the return statment's result expression.
llvm::AssertingVH< llvm::Instruction > AllocaInsertPt
 AllocaInsertPoint - This is an instruction in the entry block before which we prefer to insert allocas.
CGCapturedStmtInfoCapturedStmtInfo = nullptr
SanitizerSet SanOpts
 Sanitizers enabled for this function.
bool IsSanitizerScope = false
 True if CodeGen currently emits code implementing sanitizer checks.
bool CurFuncIsThunk = false
 In C++, whether we are code generating a thunk.
bool AutoreleaseResult = false
 In ARC, whether we should autorelease the return value.
bool SawAsmBlock = false
 Whether we processed a Microsoft-style asm block during CodeGen.
GlobalDecl CurSEHParent
bool IsOutlinedSEHHelper = false
 True if the current function is an outlined SEH helper.
bool IsInPreservedAIRegion = false
 True if CodeGen currently emits code inside presereved access index region.
bool InNoMergeAttributedStmt = false
 True if the current statement has nomerge attribute.
bool InNoInlineAttributedStmt = false
 True if the current statement has noinline attribute.
bool InAlwaysInlineAttributedStmt = false
 True if the current statement has always_inline attribute.
bool InNoConvergentAttributedStmt = false
 True if the current statement has noconvergent attribute.
HLSLControlFlowHintAttr::Spelling HLSLControlFlowAttr
 HLSL Branch attribute.
const CallExprMustTailCall = nullptr
const CodeGen::CGBlockInfoBlockInfo = nullptr
llvm::Value * BlockPointer = nullptr
llvm::DenseMap< const ValueDecl *, FieldDecl * > LambdaCaptureFields
FieldDeclLambdaThisCaptureField = nullptr
llvm::DenseMap< const VarDecl *, llvm::Value * > NRVOFlags
 A mapping from NRVO variables to the flags used to indicate when the NRVO has been applied to this variable.
EHScopeStack EHStack
llvm::SmallVector< char, 256 > LifetimeExtendedCleanupStack
llvm::SmallVector< DeferredDeactivateCleanupDeferredDeactivationCleanupStack
llvm::SmallVector< const JumpDest *, 2 > SEHTryEpilogueStack
llvm::Instruction * CurrentFuncletPad = nullptr
RawAddress NormalCleanupDest = RawAddress::invalid()
 i32s containing the indexes of the cleanup destinations.
unsigned NextCleanupDestIndex = 1
llvm::BasicBlock * EHResumeBlock = nullptr
 EHResumeBlock - Unified block containing a call to llvm.eh.resume.
llvm::Value * ExceptionSlot = nullptr
 The exception slot.
llvm::AllocaInst * EHSelectorSlot = nullptr
 The selector slot.
SmallVector< Address, 1 > SEHCodeSlotStack
 A stack of exception code slots.
llvm::Value * SEHInfo = nullptr
 Value returned by __exception_info intrinsic.
const OMPExecutableDirectiveOMPParentLoopDirectiveForScan = nullptr
 Parent loop-based directive for scan directive.
llvm::BasicBlock * OMPBeforeScanBlock = nullptr
llvm::BasicBlock * OMPAfterScanBlock = nullptr
llvm::BasicBlock * OMPScanExitBlock = nullptr
llvm::BasicBlock * OMPScanDispatch = nullptr
bool OMPFirstScanLoop = false
FPOptions CurFPFeatures
SmallVector< llvm::Value *, 8 > ObjCEHValueStack
 ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows.
EHScopeStack::stable_iterator CurrentCleanupScopeDepth
CurrentSourceLocExprScope CurSourceLocExprScope
 Source location information about the default argument or member initializer expression we're evaluating, if any.
Public Attributes inherited from clang::CodeGen::CodeGenTypeCache
llvm::Type * VoidTy
 void
llvm::IntegerType * Int8Ty
 i8, i16, i32, and i64
llvm::IntegerType * Int16Ty
llvm::IntegerType * Int32Ty
llvm::IntegerType * Int64Ty
llvm::Type * HalfTy
 half, bfloat, float, double
llvm::Type * BFloatTy
llvm::Type * FloatTy
llvm::Type * DoubleTy
llvm::IntegerType * IntTy
 int
llvm::IntegerType * CharTy
 char
union { 
   llvm::IntegerType *   IntPtrTy 
   llvm::IntegerType *   SizeTy 
   llvm::IntegerType *   PtrDiffTy 
}; 
 intptr_t, size_t, and ptrdiff_t, which we assume are the same size.
union { 
   llvm::PointerType *   UnqualPtrTy 
   llvm::PointerType *   VoidPtrTy 
   llvm::PointerType *   Int8PtrTy 
   llvm::PointerType *   VoidPtrPtrTy 
   llvm::PointerType *   Int8PtrPtrTy 
}; 
 void*, void** in the target's default address space (often 0)
union { 
   llvm::PointerType *   AllocaVoidPtrTy 
   llvm::PointerType *   AllocaInt8PtrTy 
}; 
 void* in alloca address space
union { 
   llvm::PointerType *   GlobalsVoidPtrTy 
   llvm::PointerType *   GlobalsInt8PtrTy 
}; 
 void* in default globals address space
llvm::PointerType * ConstGlobalsPtrTy
 void* in the address space for constant globals
union { 
   unsigned char   IntSizeInBytes 
   unsigned char   IntAlignInBytes 
}; 
 The size and alignment of the builtin C type 'int'.
unsigned char PointerWidthInBits
 The width of a pointer into the generic address space.
union { 
   unsigned char   PointerAlignInBytes 
   unsigned char   PointerSizeInBytes 
}; 
 The size and alignment of a pointer into the generic address space.
union { 
   unsigned char   SizeSizeInBytes 
   unsigned char   SizeAlignInBytes 
}; 
 The size and alignment of size_t.
LangAS ASTAllocaAddressSpace
llvm::CallingConv::ID RuntimeCC

Static Public Attributes

static Destroyer destroyCXXObject
static Destroyer destroyARCStrongImprecise
static Destroyer destroyARCStrongPrecise
static Destroyer destroyARCWeak
static Destroyer emitARCIntrinsicUse
static Destroyer destroyNonTrivialCStruct

Friends

class CGCXXABI

Detailed Description

CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code.

Definition at line 247 of file CodeGenFunction.h.

Member Typedef Documentation

◆ CodeGenDispatchBoundsTy

typedef llvm::function_ref<std::pair<llvm::Value *, llvm::Value *>( CodeGenFunction &, const OMPExecutableDirective &S, Address LB, Address UB)> clang::CodeGen::CodeGenFunction::CodeGenDispatchBoundsTy

Definition at line 333 of file CodeGenFunction.h.

◆ CodeGenLoopBoundsTy

Definition at line 327 of file CodeGenFunction.h.

◆ CodeGenLoopTy

Definition at line 319 of file CodeGenFunction.h.

◆ CodeGenOrderedTy

Definition at line 322 of file CodeGenFunction.h.

◆ ComplexPairTy

typedef std::pair<llvm::Value *, llvm::Value *> clang::CodeGen::CodeGenFunction::ComplexPairTy

Definition at line 284 of file CodeGenFunction.h.

◆ DeclMapTy

typedef llvm::DenseMap<const Decl *, Address> clang::CodeGen::CodeGenFunction::DeclMapTy

Definition at line 1120 of file CodeGenFunction.h.

◆ Destroyer

typedef void clang::CodeGen::CodeGenFunction::Destroyer(CodeGenFunction &CGF, Address addr, QualType ty)

Definition at line 2198 of file CodeGenFunction.h.

◆ SourceLocExprScopeGuard

◆ SpecialInitFn

typedef void clang::CodeGen::CodeGenFunction::SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address)

Definition at line 3393 of file CodeGenFunction.h.

◆ TaskGenTy

typedef const llvm::function_ref<void(CodeGenFunction & , llvm::Function * , const OMPTaskDataTy & )> clang::CodeGen::CodeGenFunction::TaskGenTy

Definition at line 3831 of file CodeGenFunction.h.

◆ VisitedVirtualBasesSetTy

◆ VPtrsVector

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

An enumeration which makes it easier to specify whether or not an operation is a subtraction.

Enumerator
NotSubtraction 
IsSubtraction 

Definition at line 5224 of file CodeGenFunction.h.

◆ BuiltinCheckKind

Specifies which type of sanitizer check to apply when handling a particular builtin.

Enumerator
BCK_CTZPassedZero 
BCK_CLZPassedZero 
BCK_AssumePassedFalse 

Definition at line 5250 of file CodeGenFunction.h.

◆ CFITypeCheckKind

Enumerator
CFITCK_VCall 
CFITCK_NVCall 
CFITCK_DerivedCast 
CFITCK_UnrelatedCast 
CFITCK_ICall 
CFITCK_NVMFCall 
CFITCK_VMFCall 

Definition at line 2478 of file CodeGenFunction.h.

◆ EvaluationOrder

Enumerator
Default 

! No language constraints on evaluation order.

ForceLeftToRight 

! Language semantics require left-to-right evaluation.

ForceRightToLeft 

! Language semantics require right-to-left evaluation.

Definition at line 5447 of file CodeGenFunction.h.

◆ ExprValueKind

Enumerator
EVK_RValue 
EVK_NonRValue 

Definition at line 5017 of file CodeGenFunction.h.

◆ GuardKind

Enumerator
VariableGuard 
TlsGuard 

Definition at line 5104 of file CodeGenFunction.h.

◆ MSVCIntrin

Enumerator
_BitScanForward 
_BitScanReverse 
_InterlockedAnd 
_InterlockedCompareExchange 
_InterlockedDecrement 
_InterlockedExchange 
_InterlockedExchangeAdd 
_InterlockedExchangeSub 
_InterlockedIncrement 
_InterlockedOr 
_InterlockedXor 
_InterlockedExchangeAdd_acq 
_InterlockedExchangeAdd_rel 
_InterlockedExchangeAdd_nf 
_InterlockedExchange_acq 
_InterlockedExchange_rel 
_InterlockedExchange_nf 
_InterlockedCompareExchange_acq 
_InterlockedCompareExchange_rel 
_InterlockedCompareExchange_nf 
_InterlockedCompareExchange128 
_InterlockedCompareExchange128_acq 
_InterlockedCompareExchange128_rel 
_InterlockedCompareExchange128_nf 
_InterlockedOr_acq 
_InterlockedOr_rel 
_InterlockedOr_nf 
_InterlockedXor_acq 
_InterlockedXor_rel 
_InterlockedXor_nf 
_InterlockedAnd_acq 
_InterlockedAnd_rel 
_InterlockedAnd_nf 
_InterlockedIncrement_acq 
_InterlockedIncrement_rel 
_InterlockedIncrement_nf 
_InterlockedDecrement_acq 
_InterlockedDecrement_rel 
_InterlockedDecrement_nf 
__fastfail 

Definition at line 16 of file CGBuiltin.h.

◆ TypeCheckKind

Situations in which we might emit a check for the suitability of a pointer or glvalue.

Needs to be kept in sync with ubsan_handlers.cpp in compiler-rt.

Enumerator
TCK_Load 

Checking the operand of a load. Must be suitably sized and aligned.

TCK_Store 

Checking the destination of a store. Must be suitably sized and aligned.

TCK_ReferenceBinding 

Checking the bound value in a reference binding.

Must be suitably sized and aligned, but is not required to refer to an object (until the reference is used), per core issue 453.

TCK_MemberAccess 

Checking the object expression in a non-static data member access.

Must be an object within its lifetime.

TCK_MemberCall 

Checking the 'this' pointer for a call to a non-static member function.

Must be an object within its lifetime.

TCK_ConstructorCall 

Checking the 'this' pointer for a constructor call.

TCK_DowncastPointer 

Checking the operand of a static_cast to a derived pointer type.

Must be null or an object within its lifetime.

TCK_DowncastReference 

Checking the operand of a static_cast to a derived reference type.

Must be an object within its lifetime.

TCK_Upcast 

Checking the operand of a cast to a base object.

Must be suitably sized and aligned.

TCK_UpcastToVirtualBase 

Checking the operand of a cast to a virtual base object.

Must be an object within its lifetime.

TCK_NonnullAssign 

Checking the value assigned to a _Nonnull pointer. Must not be null.

TCK_DynamicOperation 

Checking the operand of a dynamic_cast or a typeid expression.

Must be null or an object within its lifetime.

Definition at line 3262 of file CodeGenFunction.h.

◆ VTableAuthMode

Enumerator
Authenticate 
MustTrap 
UnsafeUbsanStrip 

Definition at line 2466 of file CodeGenFunction.h.

Constructor & Destructor Documentation

◆ CodeGenFunction()

CodeGenFunction::CodeGenFunction ( CodeGenModule & cgm,
bool suppressNewContext = false )

◆ ~CodeGenFunction()

CodeGenFunction::~CodeGenFunction ( )

Member Function Documentation

◆ ActivateCleanupBlock()

void CodeGenFunction::ActivateCleanupBlock ( EHScopeStack::stable_iterator Cleanup,
llvm::Instruction * DominatingIP )

ActivateCleanupBlock - Activates an initially-inactive cleanup.

Activate a cleanup that was created in an inactivated state.

Cannot be used to resurrect a deactivated cleanup.

Parameters
DominatingIP- An instruction which is known to dominate the current IP (if set) and which lies along all paths of execution between the current IP and the the point at which the cleanup comes into scope.

Definition at line 1281 of file CGCleanup.cpp.

References clang::C, clang::cast(), EHStack, ForActivation, and SetupCleanupBlockActivation().

◆ AddAMDGPUFenceAddressSpaceMMRA()

void CodeGenFunction::AddAMDGPUFenceAddressSpaceMMRA ( llvm::Instruction * Inst,
const CallExpr * E )

◆ AddInitializerToStaticVarDecl()

llvm::GlobalVariable * CodeGenFunction::AddInitializerToStaticVarDecl ( const VarDecl & D,
llvm::GlobalVariable * GV )

AddInitializerToStaticVarDecl - Add the initializer for 'D' to the global variable that has already been created for it.

If the initializer has a different type than GV does, this may free GV and return a different one. Otherwise it just returns GV.

Definition at line 352 of file CGDecl.cpp.

References CGM, clang::CPlusPlus, clang::QualType::DK_cxx_destructor, EmitCXXGuardedInit(), clang::CodeGen::ConstantEmitter::finalize(), clang::CharUnits::fromQuantity(), getContext(), clang::VarDecl::getFlexibleArrayInitChars(), clang::VarDecl::getInit(), getLangOpts(), clang::ValueDecl::getType(), clang::VarDecl::hasFlexibleArrayInit(), HaveInsertPoint(), clang::Init, clang::QualType::isConstantStorage(), clang::VarDecl::needsDestruction(), and clang::CodeGen::ConstantEmitter::tryEmitForInitializer().

Referenced by EmitStaticVarDecl().

◆ addInstToCurrentSourceAtom()

◆ addInstToNewSourceAtom()

void CodeGenFunction::addInstToNewSourceAtom ( llvm::Instruction * KeyInstruction,
llvm::Value * Backup )

Add KeyInstruction and an optional Backup instruction to a new atom group (See ApplyAtomGroup for more info).

Definition at line 3382 of file CodeGenFunction.cpp.

References getDebugInfo().

Referenced by EmitBranchOnBoolExpr(), EmitBuiltinExpr(), EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitFunctionEpilog(), EmitSwitchStmt(), EmitWhileStmt(), and UpdateAsmCallInst().

◆ addInstToSpecificSourceAtom()

void CodeGenFunction::addInstToSpecificSourceAtom ( llvm::Instruction * KeyInstruction,
llvm::Value * Backup,
uint64_t Atom )

See CGDebugInfo::addInstToSpecificSourceAtom.

Definition at line 3376 of file CodeGenFunction.cpp.

References getDebugInfo().

Referenced by EmitFunctionEpilog().

◆ AlwaysEmitXRayCustomEvents()

bool CodeGenFunction::AlwaysEmitXRayCustomEvents ( ) const

AlwaysEmitXRayCustomEvents - Return true if we must unconditionally emit XRay custom event handling calls.

AlwaysEmitXRayCustomEvents - Return true if we should emit IR for calls to the __xray_customevent(...) builtin calls, when doing XRay instrumentation.

Definition at line 599 of file CodeGenFunction.cpp.

References CGM, and clang::XRayInstrKind::Custom.

Referenced by EmitBuiltinExpr().

◆ AlwaysEmitXRayTypedEvents()

bool CodeGenFunction::AlwaysEmitXRayTypedEvents ( ) const

AlwaysEmitXRayTypedEvents - Return true if clang must unconditionally emit XRay typed event handling calls.

Definition at line 606 of file CodeGenFunction.cpp.

References CGM, and clang::XRayInstrKind::Typed.

Referenced by EmitBuiltinExpr().

◆ authPointerToPointerCast() [1/2]

◆ authPointerToPointerCast() [2/2]

llvm::Value * CodeGenFunction::authPointerToPointerCast ( llvm::Value * ResultPtr,
QualType SourceType,
QualType DestType )

◆ BuildAppleKextVirtualCall()

CGCallee CodeGenFunction::BuildAppleKextVirtualCall ( const CXXMethodDecl * MD,
NestedNameSpecifier Qual,
llvm::Type * Ty )

BuildAppleKextVirtualCall - This routine is to support gcc's kext ABI making indirect call to virtual functions.

It makes the call through indexing into the vtable.

Definition at line 279 of file CGCXX.cpp.

References BuildAppleKextVirtualDestructorCall(), clang::Dtor_Complete, and clang::NestedNameSpecifier::getAsRecordDecl().

Referenced by EmitCXXMemberOrOperatorMemberCallExpr().

◆ BuildAppleKextVirtualDestructorCall()

CGCallee CodeGenFunction::BuildAppleKextVirtualDestructorCall ( const CXXDestructorDecl * DD,
CXXDtorType Type,
const CXXRecordDecl * RD )

BuildVirtualCall - This routine makes indirect vtable call for call to virtual destructors.

It returns 0 if it could not do it.

Definition at line 293 of file CGCXX.cpp.

References CGM, clang::Dtor_Base, clang::Dtor_Complete, clang::CXXMethodDecl::isVirtual(), and clang::CodeGen::Type.

Referenced by BuildAppleKextVirtualCall().

◆ BuildBlockRelease()

void CodeGenFunction::BuildBlockRelease ( llvm::Value * DeclPtr,
BlockFieldFlags flags,
bool CanThrow )

◆ BuildFunctionArgList()

◆ BuildVector()

llvm::Value * CodeGenFunction::BuildVector ( ArrayRef< llvm::Value * > Ops)

Definition at line 8070 of file ARM.cpp.

References Builder, clang::cast(), getType(), clang::isa(), and clang::Result.

Referenced by EmitAArch64SVEBuiltinExpr().

◆ callCStructCopyAssignmentOperator()

◆ callCStructCopyConstructor()

◆ callCStructDefaultConstructor()

◆ callCStructDestructor()

◆ callCStructMoveAssignmentOperator()

◆ callCStructMoveConstructor()

◆ checkIfFunctionMustProgress()

bool clang::CodeGen::CodeGenFunction::checkIfFunctionMustProgress ( )
inline

Returns true if a function must make progress, which means the mustprogress attribute can be added.

Definition at line 618 of file CodeGenFunction.h.

References CGM, getLangOpts(), and clang::CodeGenOptions::Never.

Referenced by GenerateCode(), and SetSYCLKernelAttributes().

◆ checkIfLoopMustProgress()

bool CodeGenFunction::checkIfLoopMustProgress ( const Expr * ControllingExpression,
bool HasEmptyBody )

Returns true if a loop must make progress, which means the mustprogress attribute can be added.

HasConstantCond indicates whether the branch condition is a known constant.

Definition at line 1012 of file CGStmt.cpp.

References clang::CodeGenOptions::Always, clang::C11, CGM, clang::CPlusPlus11, CurFn, clang::Expr::EvaluateAsInt(), getContext(), getLangOpts(), clang::CodeGenOptions::Never, and clang::Result.

Referenced by EmitDoStmt(), EmitForStmt(), and EmitWhileStmt().

◆ checkTargetFeatures() [1/2]

◆ checkTargetFeatures() [2/2]

◆ ConstantFoldsToSimpleInteger() [1/2]

bool CodeGenFunction::ConstantFoldsToSimpleInteger ( const Expr * Cond,
bool & ResultBool,
bool AllowLabels = false )

ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.

If it constant folds return true and set the boolean result in Result.

Definition at line 1753 of file CodeGenFunction.cpp.

References CGM, clang::Cond, and ConstantFoldsToSimpleInteger().

Referenced by ConstantFoldsToSimpleInteger(), EmitBranchOnBoolExpr(), emitCommonOMPTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), EmitIfStmt(), EmitOMPDistributeLoop(), emitOMPSimdRegion(), EmitOMPTaskBasedDirective(), EmitOMPWorksharingLoop(), and EmitSwitchStmt().

◆ ConstantFoldsToSimpleInteger() [2/2]

bool CodeGenFunction::ConstantFoldsToSimpleInteger ( const Expr * Cond,
llvm::APSInt & ResultInt,
bool AllowLabels = false )

ConstantFoldsToSimpleInteger - If the specified expression does not fold to a constant, or if it does but contains a label, return false.

If it constant folds return true and set the folded value.

Definition at line 1774 of file CodeGenFunction.cpp.

References clang::Cond, ContainsLabel(), getContext(), and clang::Result.

◆ containsBreak()

bool CodeGenFunction::containsBreak ( const Stmt * S)
static

containsBreak - Return true if the statement contains a break out of it.

If the statement (recursively) contains a switch or loop with a break inside of it, this is fine.

Definition at line 1706 of file CodeGenFunction.cpp.

References clang::Stmt::children(), containsBreak(), and clang::isa().

Referenced by CollectStatementsForCase(), and containsBreak().

◆ ContainsLabel()

bool CodeGenFunction::ContainsLabel ( const Stmt * S,
bool IgnoreCaseStmts = false )
static

ContainsLabel - Return true if the statement contains a label in it.

If this statement is not executed normally, it not containing a label means that we can just remove the code.

Definition at line 1674 of file CodeGenFunction.cpp.

References clang::Stmt::children(), ContainsLabel(), and clang::isa().

Referenced by CollectStatementsForCase(), ConstantFoldsToSimpleInteger(), ContainsLabel(), EmitAutoVarInit(), EmitIfStmt(), EmitStmt(), and FindCaseStatementsForValue().

◆ convertTempToRValue()

◆ ConvertType() [1/2]

llvm::Type * clang::CodeGen::CodeGenFunction::ConvertType ( const TypeDecl * T)
inline

Definition at line 2590 of file CodeGenFunction.h.

References ConvertType(), getContext(), and clang::T.

◆ ConvertType() [2/2]

llvm::Type * CodeGenFunction::ConvertType ( QualType T)

Definition at line 245 of file CodeGenFunction.cpp.

References CGM, and clang::T.

Referenced by AdjustObjCObjectType(), ConvertType(), CreateIRTemp(), EmitAArch64BuiltinExpr(), EmitAArch64SVEBuiltinExpr(), EmitAMDGPUBuiltinExpr(), emitArgumentDemotion(), EmitARMBuiltinExpr(), EmitARMMVEBuiltinExpr(), emitArrayLength(), EmitArrayToPointerDecay(), EmitAsmStmt(), EmitAtomicDecrementValue(), EmitAtomicIncrementValue(), EmitBitfieldConversionCheck(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), EmitCall(), EmitCastLValue(), emitCmdValueForGetterSetterBody(), EmitCommonNeonBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), EmitCountedByBoundsChecking(), EmitCXXUuidofExpr(), EmitDeleteCall(), EmitDynamicCastToNull(), emitFrexpBuiltin(), EmitFromMemory(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitHexagonBuiltinExpr(), EmitHLSLBuiltinExpr(), EmitIvarOffsetAsPointerDiff(), EmitLoadOfBitfieldLValue(), EmitLoadOfCountedByField(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfScalar(), emitMaybeConstrainedFPToIntRoundBuiltin(), EmitMSVCBuiltinExpr(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), emitOMPArraySectionBase(), EmitPointerWithAlignment(), EmitPPCBuiltinExpr(), EmitPromotedValue(), EmitRISCVBuiltinExpr(), EmitSPIRVBuiltinExpr(), EmitSystemZBuiltinExpr(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitUnPromotedValue(), EmitUnsupportedLValue(), EmitWebAssemblyBuiltinExpr(), emitWritebackArg(), EmitX86BuiltinExpr(), generateObjCGetterBody(), GenerateSEHFilterFunction(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), GetCountedByFieldExprGEP(), getItaniumDynamicCastFn(), getSpecConstantFunction(), GetUndefRValue(), LookupNeonLLVMIntrinsic(), MakeAtomicCmpXchgValue(), performTypeAdjustment(), StartFunction(), tryEmitSpecializedAllocInit(), and tryGenerateSpecializedMessageSend().

◆ convertTypeForLoadStore()

llvm::Type * CodeGenFunction::convertTypeForLoadStore ( QualType ASTTy,
llvm::Type * LLVMTy = nullptr )

◆ ConvertTypeForMem()

llvm::Type * CodeGenFunction::ConvertTypeForMem ( QualType T)

Definition at line 241 of file CodeGenFunction.cpp.

References CGM, and clang::T.

Referenced by castValueToType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), complexTempStructure(), CreateMemTemp(), CreateMemTempWithoutCast(), createPlaceholderSlot(), emitAddrOfVarFromArray(), EmitAnyExprToExn(), emitArrayDestroy(), emitArrayLength(), emitArraySubscriptGEP(), EmitArrayToPointerDecay(), EmitAsmStmt(), EmitAtomicExpr(), EmitAutoVarAlloca(), EmitCall(), EmitCastLValue(), clang::CodeGen::ReductionCodeGen::emitCleanups(), EmitCXXDeleteExpr(), EmitCXXMemberDataPointerAddress(), EmitCXXNewExpr(), EmitDeclDestroy(), EmitDeclRefLValue(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), EmitFunctionProlog(), EmitHLSLOutArgExpr(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitLValueForFieldInitialization(), EmitMaterializeTemporaryExpr(), EmitNewArrayInitializer(), EmitNVPTXBuiltinExpr(), EmitObjCIsaExpr(), emitOMPArraySectionBase(), EmitOMPReductionClauseInit(), EmitOMPUseDeviceAddrClause(), EmitOMPUseDevicePtrClause(), EmitParmDecl(), emitPartialArrayDestroy(), EmitPointerArithmetic(), emitPointerArithmetic(), EmitPointerWithAlignment(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), emitPrivatesInit(), emitProxyTaskFunction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), EmitStaticVarDecl(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::emitVoidPtrVAArg(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), FlattenAccessAndType(), GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), getBlockByrefInfo(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::CodeGen::getVAListElementType(), InitCatchParam(), loadToBegin(), makeNaturalAddressForPointer(), makeNaturalAlignAddrLValue(), MakeRawAddrLValue(), PerformReturnAdjustment(), and processInReduction().

◆ CreateAggTemp()

◆ createAtExitStub()

llvm::Constant * CodeGenFunction::createAtExitStub ( const VarDecl & VD,
llvm::FunctionCallee Dtor,
llvm::Constant * Addr )

◆ createBasicBlock()

llvm::BasicBlock * clang::CodeGen::CodeGenFunction::createBasicBlock ( const Twine & name = "",
llvm::Function * parent = nullptr,
llvm::BasicBlock * before = nullptr )
inline

createBasicBlock - Create an LLVM basic block.

Definition at line 2613 of file CodeGenFunction.h.

References getLLVMContext().

Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), CreateNormalEntry(), clang::CodeGen::CatchRetScope::Emit(), EmitAArch64MultiVersionResolver(), emitArrayDestroy(), EmitAsmStmt(), emitAtomicCmpXchg(), emitAtomicCmpXchgFailureSet(), EmitAtomicExpr(), EmitAtomicOp(), EmitAtomicOp(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitBuiltinExpr(), EmitCall(), EmitCall(), EmitCallOrInvoke(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), EmitCaseStmt(), EmitCaseStmtRange(), emitCatchDispatchBlock(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCleanup(), EmitCoroutineBody(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDoStmt(), EmitDynamicCast(), emitDynamicTlsInitialization(), emitFilterDispatchBlock(), EmitForStmt(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), EmitIfStmt(), EmitLandingPad(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitMSVCBuiltinExpr(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), EmitOMPCopyinClause(), EmitOMPDistributeLoop(), EmitOMPInnerLoop(), EmitOMPLastprivateClauseFinal(), EmitOMPLinearClauseFinal(), EmitOMPLoopBody(), EmitOMPScanDirective(), EmitOMPSimdFinal(), emitOMPSimdRegion(), EmitOMPWorksharingLoop(), emitPointerAuthResign(), emitPostUpdateForReductionClause(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), EmitReturnValueCheck(), EmitRISCVMultiVersionResolver(), EmitSehScope(), emitSuspendExpression(), EmitSwitchStmt(), EmitTrapCheck(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), EmitVTablePtrCheckForCast(), emitWasmCatchPadBlock(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EmitX86BuiltinExpr(), EmitX86MultiVersionResolver(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), EnterCXXTryStmt(), EnterSEHTryStmt(), ExitCXXTryStmt(), ExitSEHTryStmt(), GenerateCXXGlobalInitFunc(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getEHDispatchBlock(), getEHResumeBlock(), getFuncletEHDispatchBlock(), GetIndirectGotoBlock(), getJumpDestForLabel(), getJumpDestInCurrentScope(), getTerminateFunclet(), getTerminateHandler(), getTerminateLandingPad(), getUnreachableBlock(), handleHlslClip(), PerformReturnAdjustment(), PopCleanupBlock(), and StartFunction().

◆ createCleanupActiveFlag()

◆ CreateCoercedStore()

◆ CreateDefaultAlignTempAlloca()

RawAddress CodeGenFunction::CreateDefaultAlignTempAlloca ( llvm::Type * Ty,
const Twine & Name = "tmp" )

CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type.

CreateDefaultAlignTempAlloca - This creates an alloca with the default alignment of the corresponding LLVM type, which is not guaranteed to be related in any way to the expected alignment of an AST type that might have been lowered to Ty.

IMPORTANT NOTE: This is not generally the right alignment for any given AST type that happens to have been lowered to the given IR type. This should only ever be used for function-local, IR-driven manipulations like saving and restoring a value. Do not hand this address off to arbitrary IRGen routines, and especially do not pass it as an argument to a function that might expect a properly ABI-aligned value.

Definition at line 174 of file CGExpr.cpp.

References CGM, CreateTempAlloca(), and clang::CharUnits::fromQuantity().

Referenced by EmitAndRegisterVariableArrayDimensions(), EmitAutoVarAlloca(), EmitCheckValue(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), getNormalCleanupDestSlot(), PopCleanupBlocks(), and StartFunction().

◆ CreateIRTemp()

RawAddress CodeGenFunction::CreateIRTemp ( QualType T,
const Twine & Name = "tmp" )

CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment.

This routine should only be used when an temporary value needs to be stored into an alloca (for example, to avoid explicit PHI construction), but the type is the IR type, not the type appropriate for storing in memory.

That is, this is exactly equivalent to CreateMemTemp, but calling ConvertType instead of ConvertTypeForMem.

Definition at line 181 of file CGExpr.cpp.

References ConvertType(), CreateTempAlloca(), getContext(), and clang::ASTContext::getTypeAlignInChars().

Referenced by EmitHLSLElementwiseCast(), EmitHLSLOutArgLValues(), EmitInlinedInheritingCXXConstructorCall(), maybeCreateMCDCCondBitmap(), and StartFunction().

◆ CreateMemTemp() [1/2]

RawAddress CodeGenFunction::CreateMemTemp ( QualType T,
CharUnits Align,
const Twine & Name = "tmp",
RawAddress * Alloca = nullptr )

◆ CreateMemTemp() [2/2]

RawAddress CodeGenFunction::CreateMemTemp ( QualType T,
const Twine & Name = "tmp",
RawAddress * Alloca = nullptr )

CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space.

Returns the original alloca instruction by Alloca if it is not nullptr.

Definition at line 186 of file CGExpr.cpp.

References CreateMemTemp(), and getContext().

Referenced by castToBase(), castValueToType(), CreateAggTemp(), CreateMemTemp(), createReferenceTemporary(), createSectionLVal(), EmitAArch64BuiltinExpr(), EmitAggExprToLValue(), EmitARMBuiltinExpr(), EmitAtomicExpr(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), EmitCall(), EmitCompoundLiteralLValue(), EmitCompoundStmtWithoutScope(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), EmitExtVectorElementExpr(), EmitFunctionProlog(), EmitLambdaStaticInvokeBody(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitOMPCanonicalLoop(), EmitOMPPrivateLoopCounters(), EmitParmDecl(), emitPreCond(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), EmitSEHExceptionCodeSave(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::CodeGen::EmitVAArgInstr(), EmitValToTemp(), EmitX86BuiltinExpr(), EnterSEHTryStmt(), GenerateBlockFunction(), GenerateOpenMPCapturedVars(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), clang::CodeGen::CallArg::getRValue(), GetUndefRValue(), InitCapturedStruct(), setBlockContextParameter(), and clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr().

◆ CreateMemTempWithoutCast() [1/2]

RawAddress CodeGenFunction::CreateMemTempWithoutCast ( QualType T,
CharUnits Align,
const Twine & Name = "tmp" )

Definition at line 209 of file CGExpr.cpp.

References ConvertTypeForMem(), and CreateTempAllocaWithoutCast().

◆ CreateMemTempWithoutCast() [2/2]

RawAddress CodeGenFunction::CreateMemTempWithoutCast ( QualType T,
const Twine & Name = "tmp" )

CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen without casting it to the default address space.

Definition at line 215 of file CGExpr.cpp.

References CreateMemTempWithoutCast(), and getContext().

Referenced by CreateMemTempWithoutCast(), and EmitCall().

◆ CreateTempAlloca() [1/3]

RawAddress clang::CodeGen::CodeGenFunction::CreateTempAlloca ( llvm::Type * Ty,
CharUnits align,
const Twine & Name = "tmp",
llvm::Value * ArraySize = nullptr,
RawAddress * Alloca = nullptr )
inline

CreateTempAlloca - This creates a alloca and inserts it into the entry block.

The alloca is casted to default address space if necessary.

FIXME: This version should be removed, and context should provide the context use address space used instead of default.

Definition at line 2858 of file CodeGenFunction.h.

References CreateTempAlloca(), and clang::Default.

◆ CreateTempAlloca() [2/3]

llvm::AllocaInst * CodeGenFunction::CreateTempAlloca ( llvm::Type * Ty,
const Twine & Name = "tmp",
llvm::Value * ArraySize = nullptr )

CreateTempAlloca - This creates an alloca and inserts it into the entry block if ArraySize is nullptr, otherwise inserts it at the current insertion point of the builder.

The caller is responsible for setting an appropriate alignment on the alloca.

ArraySize is the number of array elements to be allocated if it is not nullptr.

LangAS::Default is the address space of pointers to local variables and temporaries, as exposed in the source language. In certain configurations, this is not the same as the alloca address space, and a cast is needed to lift the pointer from the alloca AS into LangAS::Default. This can happen when the target uses a restricted address space for the stack but the source language requires LangAS::Default to be a generic address space. The latter condition is common for most programming languages; OpenCL is an exception in that LangAS::Default is the private address space, which naturally maps to the stack.

Because the address of a temporary is often exposed to the program in various ways, this function will perform the cast. The original alloca instruction is returned through Alloca if it is not nullptr.

The cast is not performaed in CreateTempAllocaWithoutCast. This is more efficient if the caller knows that the address will not be exposed.

Definition at line 151 of file CGExpr.cpp.

References AllocaInsertPt, Builder, CGM, and SanOpts.

Referenced by CreateDefaultAlignTempAlloca(), CreateIRTemp(), CreateMemTemp(), CreateTempAlloca(), CreateTempAllocaForCoercion(), CreateTempAllocaWithoutCast(), EmitAutoVarAlloca(), EmitBlockLiteral(), EmitCall(), EmitDeleteCall(), EmitFunctionProlog(), EmitNewArrayInitializer(), emitSuspendExpression(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), GenerateBlockFunction(), getEHSelectorSlot(), getExceptionSlot(), InitCatchParam(), clang::CodeGen::DominatingLLVMValue::save(), and SetupCleanupBlockActivation().

◆ CreateTempAlloca() [3/3]

RawAddress CodeGenFunction::CreateTempAlloca ( llvm::Type * Ty,
LangAS UseAddrSpace,
CharUnits align,
const Twine & Name = "tmp",
llvm::Value * ArraySize = nullptr,
RawAddress * Alloca = nullptr )

CreateTempAlloca - This creates a alloca and inserts it into the entry block.

The alloca is casted to the address space of UseAddrSpace if necessary.

Definition at line 138 of file CGExpr.cpp.

References CreateTempAllocaWithoutCast().

◆ CreateTempAllocaWithoutCast()

RawAddress CodeGenFunction::CreateTempAllocaWithoutCast ( llvm::Type * Ty,
CharUnits align,
const Twine & Name = "tmp",
llvm::Value * ArraySize = nullptr )

CreateTempAlloca - This creates a alloca and inserts it into the entry block.

Definition at line 103 of file CGExpr.cpp.

References CreateTempAlloca(), clang::CharUnits::getAsAlign(), and clang::CodeGen::KnownNonNull.

Referenced by createCleanupActiveFlag(), CreateMemTempWithoutCast(), and CreateTempAlloca().

◆ createTLSAtExitStub()

llvm::Function * CodeGenFunction::createTLSAtExitStub ( const VarDecl & VD,
llvm::FunctionCallee Dtor,
llvm::Constant * Addr,
llvm::FunctionCallee & AtExit )

◆ currentFunctionUsesSEHTry()

bool clang::CodeGen::CodeGenFunction::currentFunctionUsesSEHTry ( ) const
inline

◆ cxxDestructorCanThrow()

bool CodeGenFunction::cxxDestructorCanThrow ( QualType T)
static

Check if T is a C++ class that has a destructor that can throw.

Definition at line 1724 of file CGBlocks.cpp.

References clang::T.

Referenced by EmitAutoVarCleanups(), getBlockCaptureStr(), and pushCaptureCleanup().

◆ DeactivateCleanupBlock()

void CodeGenFunction::DeactivateCleanupBlock ( EHScopeStack::stable_iterator Cleanup,
llvm::Instruction * DominatingIP )

DeactivateCleanupBlock - Deactivates the given cleanup block.

Deactive a cleanup that was created in an active state.

The block cannot be reactivated. Pops it if it's the top of the stack.

Parameters
DominatingIP- An instruction which is known to dominate the current IP (if set) and which lies along all paths of execution between the current IP and the the point at which the cleanup comes into scope.

Definition at line 1293 of file CGCleanup.cpp.

References clang::C, clang::cast(), CurrentCleanupScopeDepth, EHStack, ForDeactivation, PopCleanupBlock(), and SetupCleanupBlockActivation().

Referenced by deactivateArgCleanupsBeforeCall(), EmitAnyExprToExn(), EmitCXXNewExpr(), and generateObjCSetterBody().

◆ defaultInitNonTrivialCStructVar()

◆ disableDebugInfo()

void clang::CodeGen::CodeGenFunction::disableDebugInfo ( )
inline

Definition at line 2151 of file CodeGenFunction.h.

◆ EmitAArch64BuiltinExpr()

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

Definition at line 4974 of file ARM.cpp.

References AArch64SIMDIntrinsicMap, AArch64SIMDIntrinsicsProvenSorted, AArch64SISDIntrinsicMap, AArch64SISDIntrinsicsProvenSorted, clang::Addr, clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, Arch, clang::CodeGen::CodeGenTypeCache::BFloatTy, Builder, clang::cast(), CGM, CheckAtomicAlignment(), ConvertType(), CreateMemTemp(), clang::Data, clang::CodeGen::CodeGenTypeCache::DoubleTy, EmitAArch64CompareBuiltinExpr(), EmitAArch64SMEBuiltinExpr(), EmitAArch64SVEBuiltinExpr(), EmitAArch64TblBuiltinExpr(), EmitAnyExprToMem(), emitCallMaybeConstrainedFPBuiltin(), EmitCommonNeonBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), EmitFP8NeonCall(), EmitFP8NeonCvtCall(), EmitFP8NeonFDOTCall(), EmitFP8NeonFMLACall(), EmitMSVCBuiltinExpr(), EmitNeonCall(), EmitNeonRShiftImm(), EmitNeonSplat(), EmitNounwindRuntimeCall(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), EmitRuntimeCall(), EmitScalarExpr(), EmitScalarOrConstFoldImmArg(), EmitSpecialRegisterBuiltin(), clang::Error, clang::Expr::EvaluateAsInt(), clang::Expr::EvaluateKnownConstInt(), findARMVectorIntrinsicInMap(), clang::AArch64::FirstSMEBuiltin, clang::AArch64::FirstSVEBuiltin, clang::NeonTypeFlags::Float32, clang::NeonTypeFlags::Float64, clang::CodeGen::CodeGenTypeCache::FloatTy, clang::CharUnits::fromQuantity(), clang::Function, clang::ASTContext::GE_None, clang::CodeGen::Address::getAlignment(), clang::CallExpr::getArg(), clang::ASTContext::GetBuiltinType(), clang::CallExpr::getCallReturnType(), getContext(), clang::CallExpr::getDirectCallee(), GetFloatNeonType(), clang::Expr::getIntegerConstantExpr(), getLLVMContext(), clang::NamedDecl::getName(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::Value::getType(), clang::ValueDecl::getType(), getType(), getTypeSize(), clang::CodeGen::CodeGenTypeCache::HalfTy, clang::CodeGen::CodeGenTypeCache::Int16Ty, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::Address::invalid(), clang::AArch64::LastSMEBuiltin, clang::AArch64::LastSVEBuiltin, NEONEquivalentIntrinsicMap, clang::CharUnits::One(), Pointer, clang::NeonTypeFlags::Poly128, readX18AsPtr(), clang::Result, clang::CodeGen::CodeGenTypeCache::SizeTy, toString(), translateAarch64ToMsvcIntrin(), clang::CodeGen::Type, clang::CodeGen::CodeGenTypeCache::UnqualPtrTy, V, vectorWrapScalar16(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, VolatileRead, clang::CodeGen::Address::withElementType(), and clang::Write.

Referenced by EmitTargetArchBuiltinExpr().

◆ EmitAArch64CompareBuiltinExpr()

Value * CodeGenFunction::EmitAArch64CompareBuiltinExpr ( llvm::Value * Op,
llvm::Type * Ty,
const llvm::CmpInst::Predicate Pred,
const llvm::Twine & Name = "" )

◆ EmitAArch64MultiVersionResolver()

void CodeGenFunction::EmitAArch64MultiVersionResolver ( llvm::Function * Resolver,
ArrayRef< FMVResolverOption > Options )

◆ EmitAArch64SMEBuiltinExpr()

◆ EmitAArch64SVEBuiltinExpr()

Value * CodeGenFunction::EmitAArch64SVEBuiltinExpr ( unsigned BuiltinID,
const CallExpr * E )

Should not happen

Definition at line 4507 of file ARM.cpp.

References AArch64SVEIntrinsicMap, AArch64SVEIntrinsicsProvenSorted, Builder, BuildVector(), clang::Call, clang::cast(), CGM, ConvertType(), EmitScalarExpr(), EmitSVEAllTruePred(), EmitSVEDupX(), EmitSVEGatherLoad(), EmitSVEGatherPrefetch(), EmitSVEMaskedLoad(), EmitSVEMaskedStore(), EmitSVEMovl(), EmitSVEPMull(), EmitSVEPredicateCast(), EmitSVEPredicateTupleCast(), EmitSVEPrefetchLoad(), EmitSVEReinterpret(), EmitSVEScatterStore(), EmitSVEStructLoad(), EmitSVEStructStore(), EmitSVETupleCreate(), EmitSVETupleSetOrGet(), findARMVectorIntrinsicInMap(), clang::Function, GetAArch64SVEProcessedOperands(), clang::CallExpr::getArg(), getLLVMContext(), clang::SVETypeFlags::getMergeType(), clang::SVETypeFlags::getSplatOperand(), getSVEOverloadTypes(), getSVEType(), getSVEVectorForElementType(), clang::Expr::getType(), getType(), clang::SVETypeFlags::hasSplatOperand(), InsertExplicitUndefOperand(), InsertExplicitZeroOperand(), clang::isa(), clang::SVETypeFlags::isAppendSVALL(), clang::SVETypeFlags::isGatherLoad(), clang::SVETypeFlags::isGatherPrefetch(), clang::SVETypeFlags::isInsertOp1SVALL(), clang::SVETypeFlags::isLoad(), clang::SVETypeFlags::isPrefetch(), clang::SVETypeFlags::isReverseCompare(), clang::SVETypeFlags::isReverseMergeAnyAccOp(), clang::SVETypeFlags::isReverseMergeAnyBinOp(), clang::SVETypeFlags::isReverseUSDOT(), clang::SVETypeFlags::isScatterStore(), clang::SVETypeFlags::isStore(), clang::SVETypeFlags::isStructLoad(), clang::SVETypeFlags::isStructStore(), clang::SVETypeFlags::isTupleCreate(), clang::SVETypeFlags::isTupleGet(), clang::SVETypeFlags::isTupleSet(), clang::SVETypeFlags::isUndef(), clang::SVETypeFlags::isZExtReturn(), clang::SVETypeFlags::setsFPMR(), and SVEBitsPerBlock.

Referenced by EmitAArch64BuiltinExpr().

◆ emitAddrOfImagComponent()

Address CodeGenFunction::emitAddrOfImagComponent ( Address complex,
QualType complexType )

◆ emitAddrOfRealComponent()

Address CodeGenFunction::emitAddrOfRealComponent ( Address complex,
QualType complexType )

◆ EmitAggExpr()

void CodeGenFunction::EmitAggExpr ( const Expr * E,
AggValueSlot Slot )

◆ EmitAggExprToLValue()

◆ EmitAggFinalDestCopy()

void CodeGenFunction::EmitAggFinalDestCopy ( QualType Type,
AggValueSlot Dest,
const LValue & Src,
ExprValueKind SrcKind )

EmitAggFinalDestCopy - Emit copy of the specified aggregate into destination address.

Definition at line 2228 of file CGExprAgg.cpp.

References clang::CodeGen::AggValueSlot::isIgnored(), and clang::CodeGen::Type.

Referenced by EmitLoadOfAnyValue().

◆ EmitAggregateAssign()

void clang::CodeGen::CodeGenFunction::EmitAggregateAssign ( LValue Dest,
LValue Src,
QualType EltTy )
inline

◆ EmitAggregateCopy()

◆ EmitAggregateCopyCtor()

void clang::CodeGen::CodeGenFunction::EmitAggregateCopyCtor ( LValue Dest,
LValue Src,
AggValueSlot::Overlap_t MayOverlap )
inline

◆ emitAlignmentAssumption() [1/2]

void CodeGenFunction::emitAlignmentAssumption ( llvm::Value * PtrValue,
const Expr * E,
SourceLocation AssumptionLoc,
llvm::Value * Alignment,
llvm::Value * OffsetValue = nullptr )

◆ emitAlignmentAssumption() [2/2]

void CodeGenFunction::emitAlignmentAssumption ( llvm::Value * PtrValue,
QualType Ty,
SourceLocation Loc,
SourceLocation AssumptionLoc,
llvm::Value * Alignment,
llvm::Value * OffsetValue = nullptr )

◆ emitAlignmentAssumptionCheck()

void CodeGenFunction::emitAlignmentAssumptionCheck ( llvm::Value * Ptr,
QualType Ty,
SourceLocation Loc,
SourceLocation AssumptionLoc,
llvm::Value * Alignment,
llvm::Value * OffsetValue,
llvm::Value * TheCheck,
llvm::Instruction * Assumption )

◆ EmitAMDGPUBuiltinExpr()

◆ EmitAMDGPUDevicePrintfCallExpr()

◆ EmitAndRegisterVariableArrayDimensions()

void CodeGenFunction::EmitAndRegisterVariableArrayDimensions ( CGDebugInfo * DI,
const VarDecl & D,
bool EmitDebugInfo )

Emits the alloca and debug information for the size expressions for each dimension of an array.

It registers the association of its (1-dimensional) QualTypes and size expression's debug node, so that CGDebugInfo can reference this node when creating the DISubrange object to describe the array types.

Definition at line 1388 of file CGDecl.cpp.

References Builder, clang::C, clang::VarDecl::Create(), CreateDefaultAlignTempAlloca(), clang::CodeGen::CGDebugInfo::EmitDeclareOfAutoVariable(), getContext(), clang::Decl::getDeclContext(), clang::ASTContext::getIntTypeForBitwidth(), clang::Decl::getLocation(), clang::IdentifierTable::getOwn(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), getVLAElements1D(), clang::ASTContext::Idents, clang::CodeGen::CGDebugInfo::registerVLASizeExpression(), clang::SC_Auto, and clang::CodeGen::CodeGenTypeCache::SizeTy.

Referenced by EmitAutoVarAlloca().

◆ EmitAnnotationCall()

llvm::Value * CodeGenFunction::EmitAnnotationCall ( llvm::Function * AnnotationFn,
llvm::Value * AnnotatedVal,
StringRef AnnotationStr,
SourceLocation Location,
const AnnotateAttr * Attr )

Emit an annotation call (intrinsic).

Definition at line 2709 of file CodeGenFunction.cpp.

References Builder, and CGM.

Referenced by EmitBuiltinExpr(), EmitFieldAnnotations(), and EmitVarAnnotations().

◆ EmitAnyExpr()

RValue CodeGenFunction::EmitAnyExpr ( const Expr * E,
AggValueSlot aggSlot = AggValueSlot::ignored(),
bool ignoreResult = false )

EmitAnyExpr - Emit code to compute the specified expression which can have any type.

The result is returned as an RValue struct. If this is an aggregate expression, the aggloc/agglocvolatile arguments indicate where the result should be returned.

Parameters
ignoreResultTrue if the resulting value isn't used.

The result is returned as an RValue struct. If this is an aggregate expression, AggSlot indicates where the result should be returned.

Definition at line 264 of file CGExpr.cpp.

References clang::CodeGen::AggValueSlot::asRValue(), CreateAggTemp(), EmitAggExpr(), EmitComplexExpr(), EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), clang::Expr::getType(), clang::CodeGen::AggValueSlot::isIgnored(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitAnyExprToTemp(), EmitBinaryOperatorLValue(), EmitHLSLBuiltinExpr(), EmitIgnoredExpr(), clang::CodeGen::CGHLSLRuntime::emitInitListOpaqueValues(), EmitObjCBoxedExpr(), emitOMPAtomicCaptureExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), emitPseudoObjectExpr(), EmitReturnStmt(), emitSimdlenSafelenClause(), emitSuspendExpression(), GenerateObjCAtomicGetterCopyHelperFunction(), and getOrCreateOpaqueRValueMapping().

◆ EmitAnyExprToExn()

◆ EmitAnyExprToMem()

◆ EmitAnyExprToTemp()

RValue CodeGenFunction::EmitAnyExprToTemp ( const Expr * E)

EmitAnyExprToTemp - Similarly to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.

EmitAnyExprToTemp - Similar to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.

Definition at line 283 of file CGExpr.cpp.

References CreateAggTemp(), EmitAnyExpr(), clang::Expr::getType(), hasAggregateEvaluationKind(), and clang::CodeGen::AggValueSlot::ignored().

Referenced by EmitCallArg(), EmitCXXNewExpr(), and EmitStmtExprLValue().

◆ EmitARCAutorelease()

llvm::Value * CodeGenFunction::EmitARCAutorelease ( llvm::Value * value)

Autorelease the given object.

call i8* @objc_autorelease(i8* value)

Definition at line 2580 of file CGObjC.cpp.

References CGM, and emitARCValueOperation().

Referenced by EmitARCRetainAutorelease(), and EmitARCRetainAutoreleaseScalarExpr().

◆ EmitARCAutoreleaseReturnValue()

llvm::Value * CodeGenFunction::EmitARCAutoreleaseReturnValue ( llvm::Value * value)

Autorelease the given object.

call i8* @objc_autoreleaseReturnValue(i8* value)

Definition at line 2589 of file CGObjC.cpp.

References CGM, and emitARCValueOperation().

Referenced by emitAutoreleaseOfResult().

◆ emitARCCopyAssignWeak()

void CodeGenFunction::emitARCCopyAssignWeak ( QualType Ty,
Address DstAddr,
Address SrcAddr )

◆ EmitARCCopyWeak()

void CodeGenFunction::EmitARCCopyWeak ( Address dst,
Address src )

void @objc_copyWeak(i8** dest, i8** src) Disregards the current value in dest.

Essentially objc_release(objc_initWeak(dest, objc_readWeakRetained(src)))

Definition at line 2701 of file CGObjC.cpp.

References CGM, and emitARCCopyOperation().

Referenced by GenerateCopyHelperFunction(), and tryEmitARCCopyWeakInit().

◆ EmitARCDestroyStrong()

void CodeGenFunction::EmitARCDestroyStrong ( Address addr,
ARCPreciseLifetime_t precise )

Destroy a __strong variable.

At -O0, emit a call to store 'null' into the address; instrumenting tools prefer this because the address is exposed, but it's relatively cumbersome to optimize.

At -O1 and above, just load and call objc_release.

call void @objc_storeStrong(i8** addr, i8* null)

Definition at line 2510 of file CGObjC.cpp.

References Builder, CGM, EmitARCRelease(), EmitARCStoreStrongCall(), and getNullForVariable().

Referenced by EmitObjectDelete().

◆ EmitARCDestroyWeak()

void CodeGenFunction::EmitARCDestroyWeak ( Address addr)

void @objc_destroyWeak(i8** addr) Essentially objc_storeWeak(addr, nil).

Definition at line 2681 of file CGObjC.cpp.

References CGM, EmitNounwindRuntimeCall(), clang::CodeGen::Address::emitRawPointer(), and getARCIntrinsic().

Referenced by emitARCMoveAssignWeak(), EmitCXXPseudoDestructorExpr(), and EmitObjectDelete().

◆ EmitARCExtendBlockObject()

llvm::Value * CodeGenFunction::EmitARCExtendBlockObject ( const Expr * expr)

◆ EmitARCInitWeak()

void CodeGenFunction::EmitARCInitWeak ( Address addr,
llvm::Value * value )

i8* @objc_initWeak(i8** addr, i8* value) Returns value.

addr is known to not have a current weak entry. Essentially equivalent to: *addr = nil; objc_storeWeak(addr, value);

Definition at line 2663 of file CGObjC.cpp.

References Builder, CGM, emitARCStoreOperation(), and clang::isa().

Referenced by clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitParmDecl(), EmitScalarInit(), EmitStoreThroughLValue(), and InitCatchParam().

◆ EmitARCIntrinsicUse()

void CodeGenFunction::EmitARCIntrinsicUse ( ArrayRef< llvm::Value * > values)

Given a number of pointers, inform the optimizer that they're being intrinsically used up until this point in the program.

Definition at line 2167 of file CGObjC.cpp.

References CGM, and EmitNounwindRuntimeCall().

Referenced by EmitObjCCollectionLiteral(), and emitWriteback().

◆ EmitARCLoadWeak()

llvm::Value * CodeGenFunction::EmitARCLoadWeak ( Address addr)

i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)).

Definition at line 2636 of file CGObjC.cpp.

References CGM, and emitARCLoadOperation().

Referenced by EmitLoadOfLValue(), and generateObjCGetterBody().

◆ EmitARCLoadWeakRetained()

llvm::Value * CodeGenFunction::EmitARCLoadWeakRetained ( Address addr)

i8* @objc_loadWeakRetained(i8** addr)

Definition at line 2643 of file CGObjC.cpp.

References CGM, and emitARCLoadOperation().

Referenced by emitARCCopyAssignWeak(), emitARCMoveAssignWeak(), EmitLoadOfLValue(), EmitObjCMessageExpr(), and tryEmitARCRetainLoadOfScalar().

◆ emitARCMoveAssignWeak()

void CodeGenFunction::emitARCMoveAssignWeak ( QualType Ty,
Address DstAddr,
Address SrcAddr )

◆ EmitARCMoveWeak()

void CodeGenFunction::EmitARCMoveWeak ( Address dst,
Address src )

void @objc_moveWeak(i8** dest, i8** src) Disregards the current value in dest.

Leaves src pointing to nothing. Essentially (objc_copyWeak(dest, src), objc_destroyWeak(src)).

Definition at line 2692 of file CGObjC.cpp.

References CGM, and emitARCCopyOperation().

Referenced by tryEmitARCCopyWeakInit().

◆ EmitARCNoopIntrinsicUse()

void CodeGenFunction::EmitARCNoopIntrinsicUse ( ArrayRef< llvm::Value * > values)

Emit a call to "clang.arc.noop.use", which consumes the result of a call that has operand bundle "clang.arc.attachedcall".

Definition at line 2179 of file CGObjC.cpp.

References CGM, and EmitNounwindRuntimeCall().

Referenced by emitOptimizedARCReturnCall().

◆ EmitARCReclaimReturnedObject()

llvm::Value * CodeGenFunction::EmitARCReclaimReturnedObject ( const Expr * e,
bool allowUnsafeClaim )

◆ EmitARCRelease()

◆ EmitARCRetain()

llvm::Value * CodeGenFunction::EmitARCRetain ( QualType type,
llvm::Value * value )

Produce the code to do a retain.

Based on the type, calls one of: call i8* @objc_retain(i8* value) call i8* @objc_retainBlock(i8* value)

Definition at line 2328 of file CGObjC.cpp.

References EmitARCRetainBlock(), EmitARCRetainNonBlock(), and clang::ast_matchers::type.

Referenced by emitARCRetainLoadOfScalar(), EmitARCRetainScalarExpr(), EmitARCStoreStrong(), emitBuiltinOSLogFormat(), and EmitStoreThroughLValue().

◆ EmitARCRetainAutorelease()

llvm::Value * CodeGenFunction::EmitARCRetainAutorelease ( QualType type,
llvm::Value * value )

Do a fused retain/autorelease of the given object.

call i8* @objc_retainAutorelease(i8* value) or retain = call i8* @objc_retainBlock(i8* value) call i8* @objc_autorelease(i8* retain)

Definition at line 2611 of file CGObjC.cpp.

References Builder, EmitARCAutorelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainBlock(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::isa(), and clang::ast_matchers::type.

Referenced by EmitARCRetainAutoreleaseScalarExpr(), EmitObjCExtendObjectLifetime(), and EmitObjCMessageExpr().

◆ EmitARCRetainAutoreleasedReturnValue()

llvm::Value * CodeGenFunction::EmitARCRetainAutoreleasedReturnValue ( llvm::Value * value)

Retain the given object which is the result of a function call.

call i8* @objc_retainAutoreleasedReturnValue(i8* value)

Yes, this function name is one character away from a different call with completely different semantics.

Definition at line 2463 of file CGObjC.cpp.

References emitOptimizedARCReturnCall().

Referenced by emitARCRetainCallResult(), and EmitForwardingCallToLambda().

◆ EmitARCRetainAutoreleaseNonBlock()

llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseNonBlock ( llvm::Value * value)

Do a fused retain/autorelease of the given object.

call i8* @objc_retainAutorelease(i8* value)

Definition at line 2628 of file CGObjC.cpp.

References CGM, and emitARCValueOperation().

Referenced by EmitARCRetainAutorelease().

◆ EmitARCRetainAutoreleaseReturnValue()

llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseReturnValue ( llvm::Value * value)

Do a fused retain/autorelease of the given object.

call i8* @objc_retainAutoreleaseReturnValue(i8* value)

Definition at line 2599 of file CGObjC.cpp.

References CGM, and emitARCValueOperation().

Referenced by tryEmitFusedAutoreleaseOfResult().

◆ EmitARCRetainAutoreleaseScalarExpr()

◆ EmitARCRetainBlock()

llvm::Value * CodeGenFunction::EmitARCRetainBlock ( llvm::Value * value,
bool mandatory )

Retain the given block, with _Block_copy semantics.

call i8* @objc_retainBlock(i8* value)

Parameters
mandatory- If false, emit the call with metadata indicating that it's okay for the optimizer to eliminate this call if it can prove that the block never escapes except down the stack.

Definition at line 2349 of file CGObjC.cpp.

References Builder, clang::cast(), CGM, emitARCValueOperation(), and clang::isa().

Referenced by EmitARCExtendBlockObject(), EmitARCRetain(), EmitARCRetainAutorelease(), and EmitARCStoreStrong().

◆ EmitARCRetainNonBlock()

llvm::Value * CodeGenFunction::EmitARCRetainNonBlock ( llvm::Value * value)

Retain the given object, with normal retain semantics.

call i8* @objc_retain(i8* value)

Definition at line 2337 of file CGObjC.cpp.

References CGM, and emitARCValueOperation().

Referenced by EmitARCRetain(), emitARCRetainCallResult(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitObjCMessageExpr(), EmitParmDecl(), emitWriteback(), GenerateCopyHelperFunction(), and InitCatchParam().

◆ EmitARCRetainScalarExpr()

llvm::Value * CodeGenFunction::EmitARCRetainScalarExpr ( const Expr * expr)

EmitARCRetainScalarExpr - Semantically equivalent to EmitARCRetainObject(e->getType(), EmitScalarExpr(e)), but making a best-effort attempt to peephole expressions that naturally produce retained objects.

Definition at line 3493 of file CGObjC.cpp.

References EmitARCRetain(), EmitARCRetainScalarExpr(), clang::Expr::getType(), and tryEmitARCRetainScalarExpr().

Referenced by EmitARCRetainScalarExpr(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitObjCForCollectionStmt(), and EmitScalarInit().

◆ EmitARCStoreAutoreleasing()

std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreAutoreleasing ( const BinaryOperator * e)

◆ EmitARCStoreStrong() [1/2]

◆ EmitARCStoreStrong() [2/2]

llvm::Value * CodeGenFunction::EmitARCStoreStrong ( LValue dst,
llvm::Value * newValue,
bool ignored )

Store into a strong object.

Sometimes calls this: call void @objc_storeStrong(i8** addr, i8* value) Other times, breaks it down into components.

Definition at line 2545 of file CGObjC.cpp.

References EmitARCRelease(), EmitARCRetain(), EmitARCStoreStrongCall(), EmitLoadOfScalar(), EmitStoreOfScalar(), clang::CharUnits::fromQuantity(), clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, shouldUseFusedARCCalls(), and clang::ast_matchers::type.

Referenced by EmitARCStoreStrong(), EmitBinaryOperatorLValue(), and EmitStoreThroughLValue().

◆ EmitARCStoreStrongCall()

llvm::Value * CodeGenFunction::EmitARCStoreStrongCall ( Address addr,
llvm::Value * value,
bool ignored )

◆ EmitARCStoreUnsafeUnretained()

std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreUnsafeUnretained ( const BinaryOperator * e,
bool ignored )

◆ EmitARCStoreWeak()

llvm::Value * CodeGenFunction::EmitARCStoreWeak ( Address addr,
llvm::Value * value,
bool ignored )

i8* @objc_storeWeak(i8** addr, i8* value) Returns value.

Definition at line 2651 of file CGObjC.cpp.

References CGM, and emitARCStoreOperation().

Referenced by emitARCCopyAssignWeak(), emitARCMoveAssignWeak(), EmitScalarInit(), and EmitStoreThroughLValue().

◆ EmitARCUnsafeClaimAutoreleasedReturnValue()

llvm::Value * CodeGenFunction::EmitARCUnsafeClaimAutoreleasedReturnValue ( llvm::Value * value)

Claim a possibly-autoreleased return value at +0.

This is only valid to do in contexts which do not rely on the retain to keep the object valid for all of its uses; for example, when the value is ignored, or when it is being assigned to an __unsafe_unretained variable.

call i8* @objc_unsafeClaimAutoreleasedReturnValue(i8* value)

Definition at line 2475 of file CGObjC.cpp.

References emitOptimizedARCReturnCall().

Referenced by emitARCUnsafeClaimCallResult().

◆ EmitARCUnsafeUnretainedScalarExpr()

llvm::Value * CodeGenFunction::EmitARCUnsafeUnretainedScalarExpr ( const Expr * expr)

EmitARCUnsafeUnretainedScalarExpr - Semantically equivalent to immediately releasing the resut of EmitARCRetainScalarExpr, but avoiding any spurious retains, including by performing reclaims with objc_unsafeClaimAutoreleasedReturnValue.

Definition at line 3618 of file CGObjC.cpp.

References emitARCUnsafeUnretainedScalarExpr().

Referenced by EmitARCStoreUnsafeUnretained(), and EmitScalarInit().

◆ EmitARMBuiltinExpr()

Value * CodeGenFunction::EmitARMBuiltinExpr ( unsigned BuiltinID,
const CallExpr * E,
ReturnValueSlot ReturnValue,
llvm::Triple::ArchType Arch )

Definition at line 2664 of file ARM.cpp.

References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, Arch, ARMSIMDIntrinsicMap, Builder, clang::cast(), CGM, ConvertType(), CreateMemTemp(), clang::CodeGen::CodeGenTypeCache::DoubleTy, EmitARMCDEBuiltinExpr(), EmitARMMVEBuiltinExpr(), EmitCommonNeonBuiltinExpr(), EmitMSVCBuiltinExpr(), EmitNeonCall(), EmitNeonRShiftImm(), EmitNeonShiftVector(), EmitNounwindRuntimeCall(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), EmitScalarExpr(), EmitScalarOrConstFoldImmArg(), EmitSpecialRegisterBuiltin(), clang::Error, clang::Expr::EvaluateAsInt(), findARMVectorIntrinsicInMap(), clang::CodeGen::CodeGenTypeCache::FloatTy, clang::Function, clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::ASTContext::GetBuiltinType(), getContext(), clang::CallExpr::getDirectCallee(), clang::Expr::getIntegerConstantExpr(), getLLVMContext(), clang::NamedDecl::getName(), GetNeonType(), clang::CallExpr::getNumArgs(), getTarget(), clang::TargetInfo::getTriple(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::Value::getType(), clang::ValueDecl::getType(), getTypeSize(), HasExtraNeonArgument(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::Address::invalid(), NEONEquivalentIntrinsicMap, NEONSIMDIntrinsicsProvenSorted, clang::Result, ReturnValue, translateArmToMsvcIntrin(), clang::CodeGen::Type, clang::CodeGen::CodeGenTypeCache::UnqualPtrTy, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidTy, VolatileRead, clang::CodeGen::Address::withElementType(), and clang::Write.

Referenced by EmitTargetArchBuiltinExpr().

◆ EmitARMCDEBuiltinExpr()

Value * CodeGenFunction::EmitARMCDEBuiltinExpr ( unsigned BuiltinID,
const CallExpr * E,
ReturnValueSlot ReturnValue,
llvm::Triple::ArchType Arch )

Definition at line 3570 of file ARM.cpp.

References Arch, and ReturnValue.

Referenced by EmitARMBuiltinExpr().

◆ EmitARMMVEBuiltinExpr()

◆ emitArrayDestroy()

void CodeGenFunction::emitArrayDestroy ( llvm::Value * begin,
llvm::Value * end,
QualType elementType,
CharUnits elementAlign,
Destroyer * destroyer,
bool checkZeroLength,
bool useEHCleanup )

emitArrayDestroy - Destroys all the elements of the given array, beginning from last to first.

The array cannot be zero-length.

Parameters
begin- a type* denoting the first element of the array
end- a type* denoting one past the end of the array
elementType- the element type of the array
destroyer- the function to call to destroy elements
useEHCleanup- whether to push an EH cleanup to destroy the remaining elements in case the destruction of a single element throws

Definition at line 2435 of file CGDecl.cpp.

References Builder, ConvertTypeForMem(), createBasicBlock(), EmitBlock(), clang::Type::isArrayType(), PopCleanupBlock(), pushRegularPartialArrayCleanup(), and clang::CodeGen::CodeGenTypeCache::SizeTy.

Referenced by EmitArrayDelete(), emitDestroy(), and emitPartialArrayDestroy().

◆ emitArrayLength()

llvm::Value * CodeGenFunction::emitArrayLength ( const ArrayType * arrayType,
QualType & baseType,
Address & addr )

◆ EmitArraySectionExpr()

◆ EmitArraySubscriptExpr()

LValue CodeGenFunction::EmitArraySubscriptExpr ( const ArraySubscriptExpr * E,
bool Accessed = false )

Definition at line 4562 of file CGExpr.cpp.

References clang::Addr, clang::ast_matchers::arrayType, Builder, clang::Type::castAs(), CGM, EmitArraySubscriptExpr(), emitArraySubscriptGEP(), EmitBoundsCheck(), EmitCountedByBoundsChecking(), EmitExtVectorElementLValue(), EmitLValue(), EmitPointerWithAlignment(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), getArrayElementAlign(), clang::Type::getAs(), clang::ArraySubscriptExpr::getBase(), clang::CodeGen::LValue::getBaseInfo(), getContext(), clang::ArraySubscriptExpr::getExprLoc(), clang::ArraySubscriptExpr::getIdx(), getLangOpts(), clang::ArraySubscriptExpr::getLHS(), clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), clang::CharUnits::getQuantity(), clang::ArraySubscriptExpr::getRHS(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), getVLASize(), clang::HLSL, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::Address::invalid(), clang::isa(), clang::Type::isHLSLResourceRecord(), clang::Type::isHLSLResourceRecordArray(), clang::CodeGen::TBAAAccessInfo::isIncomplete(), clang::CodeGen::TBAAAccessInfo::isMayAlias(), clang::Expr::isOBJCGCCandidate(), clang::Type::isSignedIntegerOrEnumerationType(), clang::CodeGen::LValue::isSimple(), isSimpleArrayDecayOperand(), clang::Type::isSubscriptableVectorType(), MakeAddrLValue(), clang::CodeGen::LValue::MakeVectorElt(), clang::LangOptionsBase::NonGC, clang::CodeGen::CodeGenFunction::VlaSizePair::NumElts, clang::ObjC, SanOpts, clang::CodeGen::LValue::setNonGC(), setObjCGCLValueClass(), and clang::CodeGen::TBAAAccessInfo::Size.

Referenced by EmitArraySectionExpr(), EmitArraySubscriptExpr(), and EmitCheckedLValue().

◆ EmitArrayToPointerDecay()

◆ EmitAsanPrologueOrEpilogue()

◆ EmitAsmStmt()

void CodeGenFunction::EmitAsmStmt ( const AsmStmt & S)

Definition at line 2819 of file CGStmt.cpp.

References AddVariableConstraints(), clang::TargetInfo::ConstraintInfo::allowsMemory(), clang::TargetInfo::ConstraintInfo::allowsRegister(), Builder, CGM, ConvertType(), ConvertTypeForMem(), createBasicBlock(), CurFnInfo, clang::TargetInfo::ConstraintInfo::earlyClobber(), EmitAsmStores(), EmitBlock(), EmitBranch(), EmitCallOrInvoke(), EmitHipStdParUnsupportedAsm(), EmitLValue(), clang::CodeGen::Address::emitRawPointer(), FnRetTy, clang::AsmStmt::generateAsmString(), clang::CodeGen::LValue::getAddress(), clang::AsmStmt::getAsmLoc(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), getBundlesForFunclet(), clang::QualType::getCanonicalType(), clang::AsmStmt::getClobber(), clang::TargetInfo::getClobbers(), getContext(), clang::CodeGen::Address::getElementType(), clang::Expr::getExprLoc(), clang::AsmStmt::getInputConstraint(), clang::AsmStmt::getInputExpr(), getJumpDestForLabel(), getLangOpts(), getLLVMContext(), clang::TargetInfo::getNormalizedGCCRegisterName(), clang::AsmStmt::getNumClobbers(), clang::AsmStmt::getNumInputs(), clang::AsmStmt::getNumOutputs(), clang::AsmStmt::getOutputConstraint(), clang::AsmStmt::getOutputExpr(), getTarget(), getTargetHooks(), clang::TargetInfo::ConstraintInfo::getTiedOperand(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), getTypeSize(), hasAggregateEvaluationKind(), clang::TargetInfo::ConstraintInfo::hasMatchingInput(), hasScalarEvaluationKind(), clang::TargetInfo::ConstraintInfo::hasTiedOperand(), clang::CodeGenOptions::IAD_ATT, clang::Expr::IgnoreParenNoopCasts(), InNoConvergentAttributedStmt, InNoMergeAttributedStmt, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::isa(), clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::ABIArgInfo::isExtend(), clang::TargetInfo::ConstraintInfo::isReadWrite(), clang::CodeGen::TargetCodeGenInfo::isScalarizableAsmOperand(), clang::AsmStmt::isVolatile(), MakeAddrLValueWithoutTBAA(), clang::Result, ReturnValue, SawAsmBlock, SimplifyConstraint(), UpdateAsmCallInst(), clang::TargetInfo::validateInputConstraint(), clang::TargetInfo::validateOutputConstraint(), clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::CodeGen::Address::withElementType().

Referenced by EmitStmt().

◆ EmitAtomicCompareExchange()

std::pair< RValue, llvm::Value * > CodeGenFunction::EmitAtomicCompareExchange ( LValue Obj,
RValue Expected,
RValue Desired,
SourceLocation Loc,
llvm::AtomicOrdering Success = llvm::AtomicOrdering::SequentiallyConsistent,
llvm::AtomicOrdering Failure = llvm::AtomicOrdering::SequentiallyConsistent,
bool IsWeak = false,
AggValueSlot Slot = AggValueSlot::ignored() )

◆ EmitAtomicExpr()

RValue CodeGenFunction::EmitAtomicExpr ( AtomicExpr * E)

Definition at line 854 of file CGAtomic.cpp.

References clang::CodeGen::CallArgList::add(), Builder, clang::cast(), CGM, convertTempToRValue(), ConvertTypeForMem(), createBasicBlock(), CreateMemTemp(), CurFn, EmitAtomicInit(), emitAtomicLibcall(), EmitAtomicOp(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), EmitScalarExpr(), EmitStoreOfScalar(), EmitValToTemp(), clang::CodeGen::RValue::get(), clang::QualType::getAddressSpace(), clang::CodeGen::Address::getAlignment(), clang::Type::getAs(), clang::AtomicExpr::getBeginLoc(), getContext(), getDebugInfo(), clang::Expr::getExprLoc(), getLLVMContext(), clang::AtomicExpr::getOp(), clang::AtomicExpr::getOrder(), clang::AtomicExpr::getOrderFail(), clang::Type::getPointeeType(), getPointeeType(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), clang::AtomicExpr::getScope(), clang::AtomicExpr::getScopeModel(), getTarget(), getTargetHooks(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::AtomicExpr::getVal1(), clang::AtomicExpr::getVal2(), clang::AtomicExpr::getWeak(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::Address::invalid(), clang::isa(), clang::AtomicExpr::isCmpXChg(), clang::Type::isFloatingType(), clang::AtomicExpr::isOpenCL(), clang::Type::isPointerType(), clang::CodeGen::Address::isValid(), clang::Type::isVoidType(), MakeAddrLValue(), clang::opencl_generic, clang::DiagnosticsEngine::Report(), clang::CodeGen::CodeGenTypeCache::SizeTy, V, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::Address::withElementType().

◆ EmitAtomicInit()

◆ EmitAtomicLoad() [1/2]

◆ EmitAtomicLoad() [2/2]

RValue CodeGenFunction::EmitAtomicLoad ( LValue src,
SourceLocation loc,
llvm::AtomicOrdering AO,
bool IsVolatile = false,
AggValueSlot resultSlot = AggValueSlot::ignored() )

Emit a load from an l-value of atomic type.

Note that the r-value we produce is an r-value of the atomic value type.

Definition at line 1595 of file CGAtomic.cpp.

◆ emitAtomicRMWInst()

llvm::AtomicRMWInst * CodeGenFunction::emitAtomicRMWInst ( llvm::AtomicRMWInst::BinOp Op,
Address Addr,
llvm::Value * Val,
llvm::AtomicOrdering Order = llvm::AtomicOrdering::SequentiallyConsistent,
llvm::SyncScope::ID SSID = llvm::SyncScope::System,
const AtomicExpr * AE = nullptr )

Emit an atomicrmw instruction, and applying relevant metadata when applicable.

Definition at line 2082 of file CGAtomic.cpp.

References clang::Addr, Builder, and getTargetHooks().

Referenced by EmitAtomicOp(), and emitOMPAtomicRMW().

◆ EmitAtomicStore() [1/2]

◆ EmitAtomicStore() [2/2]

void CodeGenFunction::EmitAtomicStore ( RValue rvalue,
LValue dest,
llvm::AtomicOrdering AO,
bool IsVolatile,
bool isInit )

◆ EmitAtomicUpdate()

void CodeGenFunction::EmitAtomicUpdate ( LValue LVal,
llvm::AtomicOrdering AO,
const llvm::function_ref< RValue(RValue)> & UpdateOp,
bool IsVolatile )

Definition at line 2092 of file CGAtomic.cpp.

Referenced by EmitOMPAtomicSimpleUpdateExpr().

◆ EmitAttributedStmt()

◆ EmitAutoVarAlloca()

CodeGenFunction::AutoVarEmission CodeGenFunction::EmitAutoVarAlloca ( const VarDecl & D)

EmitAutoVarAlloca - Emit the alloca and debug information for a local variable.

Does not emit initialization or destruction.

Definition at line 1483 of file CGDecl.cpp.

References clang::CodeGenOptions::All, clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, Builder, Bypasses, CGM, ConvertTypeForMem(), clang::CPlusPlus, CreateDefaultAlignTempAlloca(), CreateTempAlloca(), CurCodeDecl, clang::CodeGen::Decl, clang::Default, clang::QualType::DK_cxx_destructor, EHStack, EmitAndRegisterVariableArrayDimensions(), EmitLifetimeStart(), clang::CodeGen::Address::emitRawPointer(), EmitStaticVarDecl(), EmitVarAnnotations(), EmitVariablyModifiedType(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::QualType::getAddressSpace(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::Type::getAsRecordDecl(), getBlockByrefInfo(), getContext(), clang::TargetInfo::getCXXABI(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getOriginalAllocatedAddress(), clang::CodeGen::RawAddress::getPointer(), getTarget(), clang::ValueDecl::getType(), getVLASize(), clang::Decl::hasAttr(), hasLabelBeenSeenInCurrentScope(), HaveInsertPoint(), clang::CodeGen::Address::invalid(), clang::CodeGen::RawAddress::invalid(), clang::Type::isArrayType(), clang::Expr::isConstantInitializer(), clang::Type::isConstantSizeType(), clang::QualType::isConstantStorage(), clang::VarDecl::isConstexpr(), clang::VarDecl::isEscapingByref(), clang::VarDecl::isExceptionVariable(), clang::TargetCXXABI::isMicrosoft(), clang::VarDecl::isNRVOVariable(), clang::QualType::isPODType(), clang::Type::isRecordType(), clang::CodeGen::Address::isValid(), clang::Type::isVariablyModifiedType(), MakeAddrLValue(), clang::VarDecl::needsDestruction(), clang::CodeGen::NormalCleanup, clang::CodeGen::NormalEHLifetimeMarker, clang::CodeGen::NormalFakeUse, NRVOFlags, clang::CharUnits::One(), clang::OpenCL, clang::opencl_constant, clang::opencl_private, pushKmpcAllocFree(), pushStackRestore(), ReturnValue, ReturnValuePointer, shouldExtendLifetime(), clang::CodeGen::CodeGenFunction::AutoVarEmission::useLifetimeMarkers(), V, and clang::Zero.

Referenced by EmitAutoVarDecl(), EmitObjCForCollectionStmt(), EmitOMPFirstprivateClause(), EmitOMPLinearClauseInit(), EmitOMPPrivateLoopCounters(), EmitOMPReductionClauseInit(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), getNumThreads(), and clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective().

◆ EmitAutoVarCleanups()

◆ EmitAutoVarDecl()

void CodeGenFunction::EmitAutoVarDecl ( const VarDecl & D)

EmitAutoVarDecl - Emit an auto variable declaration.

EmitAutoVarDecl - Emit code and set up an entry in LocalDeclMap for a variable declaration with auto, register, or no storage class specifier.

This function can be called with a null (unreachable) insert point.

These turn into simple stack objects, or GlobalValues depending on target.

Definition at line 1349 of file CGDecl.cpp.

References EmitAutoVarAlloca(), EmitAutoVarCleanups(), and EmitAutoVarInit().

Referenced by EmitOMPScanDirective(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), and EmitVarDecl().

◆ EmitAutoVarInit()

◆ emitAutoVarTypeCleanup()

◆ EmitBinaryOperatorLValue()

LValue CodeGenFunction::EmitBinaryOperatorLValue ( const BinaryOperator * E)

◆ EmitBitfieldConversionCheck()

void CodeGenFunction::EmitBitfieldConversionCheck ( llvm::Value * Src,
QualType SrcType,
llvm::Value * Dst,
QualType DstType,
const CGBitFieldInfo & Info,
SourceLocation Loc )

◆ EmitBlock()

void CodeGenFunction::EmitBlock ( llvm::BasicBlock * BB,
bool IsFinished = false )

EmitBlock - Emit the given block.

  • BB and set it as the insert point, adding a fall-through branch from the current insert block if necessary. It is legal to call this function even if there is no current insertion point.

IsFinished - If true, indicates that the caller has finished emitting branches to the given block and does not expect to emit code into it. This means the block can be ignored if it is unreachable.

Definition at line 652 of file CGStmt.cpp.

References Builder, CurFn, and EmitBranch().

Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), clang::CodeGen::CatchRetScope::Emit(), emitArrayDestroy(), EmitAsmStmt(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitBuiltinExpr(), EmitCall(), EmitCall(), EmitCallOrInvoke(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), emitCatchDispatchBlock(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCleanup(), EmitCoroutineBody(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCtorPrologue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitDoStmt(), EmitDynamicCast(), emitFilterDispatchBlock(), EmitForStmt(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), EmitIfStmt(), EmitLabel(), EmitLandingPad(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjCForCollectionStmt(), EmitObjectDelete(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), EmitOMPCopyinClause(), EmitOMPDistributeLoop(), EmitOMPInnerLoop(), EmitOMPLastprivateClauseFinal(), EmitOMPLinearClauseFinal(), EmitOMPLoopBody(), EmitOMPScanDirective(), EmitOMPSimdFinal(), emitOMPSimdRegion(), EmitOMPWorksharingLoop(), emitPointerAuthResign(), emitPostUpdateForReductionClause(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), EmitReturnBlock(), EmitReturnValueCheck(), EmitSehScope(), EmitSEHTryStmt(), emitSuspendExpression(), EmitSwitchStmt(), EmitTrapCheck(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), EmitVTablePtrCheckForCast(), emitWasmCatchPadBlock(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), ExitSEHTryStmt(), FinishFunction(), GenerateCXXGlobalInitFunc(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), PerformReturnAdjustment(), and PopCleanupBlock().

◆ EmitBlockAfterUses()

void CodeGenFunction::EmitBlockAfterUses ( llvm::BasicBlock * BB)

EmitBlockAfterUses - Emit the given block somewhere hopefully near its uses, and leave the insertion point in it.

Definition at line 689 of file CGStmt.cpp.

References Builder, and CurFn.

Referenced by emitCatchDispatchBlock(), emitCatchPadBlock(), emitFilterDispatchBlock(), emitWasmCatchPadBlock(), ExitCXXTryStmt(), and ExitSEHTryStmt().

◆ emitBlockByrefAddress() [1/2]

Address CodeGenFunction::emitBlockByrefAddress ( Address baseAddr,
const BlockByrefInfo & info,
bool followForward,
const llvm::Twine & name )

◆ emitBlockByrefAddress() [2/2]

Address CodeGenFunction::emitBlockByrefAddress ( Address baseAddr,
const VarDecl * V,
bool followForward = true )

◆ EmitBlockCallExpr()

◆ EmitBlockCopyAndAutorelease()

◆ EmitBlockLiteral()

llvm::Value * CodeGenFunction::EmitBlockLiteral ( const BlockExpr * blockExpr)

Emit block literal.

Emit a block literal expression in the current function.

Returns
an LLVM value which is a pointer to a struct which contains information about the block, including the block invoke function, the captured variables, etc.

Definition at line 764 of file CGBlocks.cpp.

References clang::Block, clang::CodeGen::CGBlockInfo::BlockAlign, clang::ast_matchers::blockExpr, clang::CodeGen::CGBlockInfo::BlockExpression, clang::CodeGen::CGBlockInfo::CanBeGlobal, CGM, computeBlockInfo(), CreateTempAlloca(), CurFn, EmitBlockLiteral(), clang::CodeGen::CGBlockInfo::LocalAddress, and clang::CodeGen::CGBlockInfo::StructureType.

Referenced by EmitBlockLiteral().

◆ EmitBlockWithFallThrough()

void CodeGenFunction::EmitBlockWithFallThrough ( llvm::BasicBlock * BB,
const Stmt * S )

When instrumenting to collect profile data, the counts for some blocks such as switch cases need to not include the fall-through counts, so emit a branch around the instrumentation code.

When not instrumenting, this just calls EmitBlock().

Definition at line 1385 of file CodeGenFunction.cpp.

References CGM, createBasicBlock(), EmitBlock(), EmitBranch(), llvm::EnableSingleByteCoverage, getCurrentProfileCount(), HaveInsertPoint(), incrementProfileCounter(), and setCurrentProfileCount().

Referenced by EmitCaseStmt(), EmitCaseStmtRange(), EmitDefaultStmt(), and EmitDoStmt().

◆ emitBoolVecConversion()

llvm::Value * CodeGenFunction::emitBoolVecConversion ( llvm::Value * SrcVec,
unsigned NumElementsDst,
const llvm::Twine & Name = "" )

Definition at line 3275 of file CodeGenFunction.cpp.

References Builder, and clang::cast().

Referenced by EmitFromMemory(), EmitLoadOfScalar(), and EmitToMemory().

◆ EmitBoundsCheck()

void CodeGenFunction::EmitBoundsCheck ( const Expr * E,
const Expr * Base,
llvm::Value * Index,
QualType IndexType,
bool Accessed )

Emit a check that Base points into an array object, which we can access at index Index.

Accessed should be false if we this expression is used as an lvalue, for instance in "&Arr[Idx]".

Definition at line 1236 of file CGExpr.cpp.

References EmitBoundsCheckImpl(), getArrayIndexingBound(), getLangOpts(), and SanOpts.

Referenced by EmitArraySubscriptExpr(), and EmitPointerArithmetic().

◆ EmitBoundsCheckImpl()

void CodeGenFunction::EmitBoundsCheckImpl ( const Expr * E,
llvm::Value * Bound,
llvm::Value * Index,
QualType IndexType,
QualType IndexedType,
bool Accessed )

◆ EmitBPFBuiltinExpr()

◆ EmitBranch()

void CodeGenFunction::EmitBranch ( llvm::BasicBlock * Block)

EmitBranch - Emit a branch to the specified basic block from the current insert block, taking care to avoid creation of branches from dummy blocks.

It is legal to call this function even if there is no current insertion point.

This function clears the current insertion point. The caller should follow calls to this function with calls to Emit*Block prior to generation new code.

Definition at line 672 of file CGStmt.cpp.

References Builder, and Target.

Referenced by EmitAsmStmt(), EmitBlock(), EmitBlockWithFallThrough(), EmitBranchToCounterBlock(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXForRangeStmt(), EmitDynamicCast(), EmitForStmt(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), EmitIfStmt(), EmitIndirectGotoStmt(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitOMPDistributeLoop(), EmitOMPInnerLoop(), EmitOMPLoopBody(), EmitOMPScanDirective(), emitOMPSimdRegion(), EmitOMPWorksharingLoop(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), and EmitWhileStmt().

◆ EmitBranchOnBoolExpr()

void CodeGenFunction::EmitBranchOnBoolExpr ( const Expr * Cond,
llvm::BasicBlock * TrueBlock,
llvm::BasicBlock * FalseBlock,
uint64_t TrueCount,
Stmt::Likelihood LH = Stmt::LH_None,
const Expr * ConditionalOp = nullptr,
const VarDecl * ConditionalDecl = nullptr )

EmitBranchOnBoolExpr - Emit a branch on a boolean condition (e.g.

for an if statement) to the specified blocks. Based on the condition, this might try to simplify the codegen of the conditional based on the branch. TrueCount should be the number of times we expect the condition to evaluate to true based on PGO data.

for an if statement) to the specified blocks. Based on the condition, this might try to simplify the codegen of the conditional based on the branch.

Parameters
LHThe value of the likelihood attribute on the True branch.
ConditionalOpUsed by MC/DC code coverage to track the result of the ConditionalOperator (ternary) through a recursive call for the operator's LHS and RHS nodes.

Definition at line 1889 of file CodeGenFunction.cpp.

References addInstToNewSourceAtom(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, clang::Call, CGM, clang::Cond, ConstantFoldsToSimpleInteger(), createBasicBlock(), EmitBlock(), EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EvaluateExprAsBool(), clang::FunctionDecl::getBuiltinID(), getCurrentProfileCount(), getLLVMContext(), getProfileCount(), HLSLControlFlowAttr, incrementProfileCounter(), isInstrumentedCondition(), clang::Stmt::LH_Likely, clang::Stmt::LH_None, clang::Stmt::LH_Unlikely, MaybeEmitDeferredVarDeclInit(), maybeUpdateMCDCCondBitmap(), MCDCLogOpStack, and setCurrentProfileCount().

Referenced by EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), EmitIfStmt(), EmitOMPInnerLoop(), EmitOMPLoopBody(), emitPreCond(), and emitSuspendExpression().

◆ EmitBranchThroughCleanup()

void CodeGenFunction::EmitBranchThroughCleanup ( JumpDest Dest)

EmitBranchThroughCleanup - Emit a branch from the current insert block through the normal cleanup handling code (if any) and then on to.

Terminate the current block by emitting a branch which might leave the current cleanup-protected scope.

  • Dest.

The target scope may not yet be known, in which case this will require a fixup.

As a side-effect, this method clears the insertion point.

Definition at line 1112 of file CGCleanup.cpp.

References addInstToCurrentSourceAtom(), Builder, clang::cast(), CreateNormalEntry(), createStoreInstBefore(), clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, EHStack, clang::CodeGen::EHScopeStack::stable_iterator::encloses(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getDestIndex(), getNormalCleanupDestSlot(), clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth(), HaveInsertPoint(), clang::CodeGen::BranchFixup::InitialBranch, clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CodeGen::BranchFixup::OptimisticBranchBlock, and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().

Referenced by clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBreakStmt(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), EmitContinueStmt(), EmitCoreturnStmt(), EmitCXXForRangeStmt(), EmitForStmt(), EmitForwardingCallToLambda(), EmitGotoStmt(), EmitIndirectGotoStmt(), EmitOMPInnerLoop(), EmitReturnStmt(), EmitSEHLeaveStmt(), emitSuspendExpression(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), EnterDtorCleanups(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), and clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::FinalizeOMPRegion().

◆ EmitBranchToCounterBlock()

void CodeGenFunction::EmitBranchToCounterBlock ( const Expr * Cond,
BinaryOperator::Opcode LOp,
llvm::BasicBlock * TrueBlock,
llvm::BasicBlock * FalseBlock,
uint64_t TrueCount = 0,
Stmt::Likelihood LH = Stmt::LH_None,
const Expr * CntrIdx = nullptr )

EmitBranchToCounterBlock - Emit a conditional branch to a new block that increments a profile counter based on the semantics of the given logical operator opcode.

This is used to instrument branch condition coverage for logical operators.

Definition at line 1813 of file CodeGenFunction.cpp.

References CGM, clang::Cond, createBasicBlock(), EmitBlock(), EmitBranch(), EmitBranchOnBoolExpr(), incrementProfileCounter(), and isInstrumentedCondition().

Referenced by EmitBranchOnBoolExpr().

◆ EmitBreakStmt()

void CodeGenFunction::EmitBreakStmt ( const BreakStmt & S)

◆ EmitBuiltinAlignTo()

RValue CodeGenFunction::EmitBuiltinAlignTo ( const CallExpr * E,
bool AlignUp )

Emit IR for __builtin_align_up/__builtin_align_down.

Generate (x & ~(y-1)) to align down or ((x+(y-1)) & ~(y-1)) to align up.

Note: For pointer types we can avoid ptrtoint/inttoptr pairs by using the llvm.ptrmask intrinsic (with a GEP before in the align_up case).

Definition at line 6626 of file CGBuiltin.cpp.

References Builder, EmitCheckedInBoundsGEP(), clang::CodeGen::RValue::get(), clang::Expr::getExprLoc(), getLangOpts(), clang::CodeGen::CodeGenTypeCache::Int8Ty, and clang::Result.

Referenced by EmitBuiltinExpr().

◆ EmitBuiltinAvailable()

llvm::Value * CodeGenFunction::EmitBuiltinAvailable ( const VersionTuple & Version)

◆ EmitBuiltinExpr()

RValue CodeGenFunction::EmitBuiltinExpr ( const GlobalDecl GD,
unsigned BuiltinID,
const CallExpr * E,
ReturnValueSlot ReturnValue )

Definition at line 2599 of file CGBuiltin.cpp.

References __fastfail, _InterlockedAnd, _InterlockedCompareExchange, _InterlockedCompareExchange_nf, _InterlockedDecrement, _InterlockedExchange, _InterlockedExchangeAdd, _InterlockedExchangeSub, _InterlockedIncrement, _InterlockedOr, _InterlockedXor, clang::CodeGen::CallArgList::add(), addInstToNewSourceAtom(), clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, clang::Allow, AlwaysEmitXRayCustomEvents(), AlwaysEmitXRayTypedEvents(), clang::CallExpr::arguments(), BCK_CLZPassedZero, BCK_CTZPassedZero, clang::Block, Builder, clang::ASTContext::BuiltinInfo, clang::Call, clang::cast(), clang::Type::castAs(), CGM, clang::TargetInfo::checkArithmeticFenceSupported(), CheckAtomicAlignment(), checkTargetFeatures(), clang::SanitizerSet::clear(), clang::Column, ConvertType(), clang::CountAttributedType::CountedBy, clang::AtomicScopeModel::create(), createBasicBlock(), CreateMemTemp(), clang::CodeGen::CGDebugInfo::CreateTrapFailureMessageFor(), CurFn, CurFuncDecl, clang::XRayInstrKind::Custom, clang::Data, clang::CodeGen::Decl, clang::CodeGen::TargetCodeGenInfo::decodeReturnAddress(), EmitAbs(), clang::CodeGen::ConstantEmitter::emitAbstract(), EmitAggExprToLValue(), emitAlignmentAssumption(), EmitAMDGPUDevicePrintfCallExpr(), EmitAnnotationCall(), EmitArrayToPointerDecay(), EmitAtomicCmpXchgForMSIntrin(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), emitBinaryExpMaybeConstrainedFPBuiltin(), emitBinaryMaybeConstrainedFPBuiltin(), EmitBitCountExpr(), EmitBitTestIntrinsic(), EmitBlock(), EmitBuiltinAlignTo(), EmitBuiltinIsAligned(), EmitBuiltinNewDeleteCall(), emitBuiltinOSLogFormat(), emitBuiltinWithOneOverloadedType(), EmitCall(), EmitCallee(), EmitCheckedArgForAssume(), EmitCheckedArgForBuiltin(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), EmitComplexExpr(), EmitCoroutineIntrinsic(), EmitFAbs(), emitFrexpBuiltin(), EmitHipStdParUnsupportedBuiltin(), EmitHLSLBuiltinExpr(), EmitISOVolatileLoad(), EmitISOVolatileStore(), emitLibraryCall(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitLValue(), emitMaybeConstrainedFPToIntRoundBuiltin(), emitModfBuiltin(), EmitMSVAListRef(), EmitMSVCBuiltinExpr(), EmitMSVCRTSetJmp(), EmitNonNullArgCheck(), EmitNontemporalLoad(), EmitNontemporalStore(), EmitNVPTXDevicePrintfCallExpr(), EmitOverflowCheckedAbs(), EmitOverflowIntrinsic(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), emitRotate(), EmitRuntimeCall(), EmitScalarExpr(), EmitScalarOrConstFoldImmArg(), EmitSEHAbnormalTermination(), EmitSEHExceptionCode(), EmitSEHExceptionInfo(), EmitSignBit(), emitSincosBuiltin(), EmitTargetBuiltinExpr(), emitTernaryMaybeConstrainedFPBuiltin(), EmitToMemory(), EmitTrapCall(), EmitTypeCheck(), emitUnaryMaybeConstrainedFPBuiltin(), EmitUnreachable(), EmitVAListRef(), EmitVAStartEnd(), clang::CodeGen::TargetCodeGenInfo::encodeReturnAddress(), EncompassingIntegerType(), clang::Error, ErrorUnsupported(), clang::Expr::EvaluateAsFloat(), clang::Expr::EvaluateAsInt(), clang::Expr::EvaluateAsRValue(), clang::Expr::EvaluateKnownConstInt(), clang::FieldDecl::findCountedByField(), clang::First, clang::CodeGen::CGCallee::forDirect(), clang::Func, clang::Function, clang::ASTContext::GE_None, clang::Generic, clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::QualType::getAddressSpace(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::Address::getAlignment(), clang::CallExpr::getArg(), clang::Type::getAs(), clang::Expr::getAsBuiltinConstantDeclRef(), clang::Decl::getAsFunction(), clang::getAsString(), clang::CodeGen::CodeGenTypeCache::getASTAllocaAddressSpace(), clang::ASTContext::GetBuiltinType(), clang::CallExpr::getCallee(), clang::CodeGen::RValue::getComplex(), clang::ASTContext::getConstantArrayType(), getContext(), GetCountedByFieldExprGEP(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::CallExpr::getDirectCallee(), clang::CodeGen::TargetCodeGenInfo::getDwarfEHStackPointer(), clang::CodeGen::Address::getElementType(), getEvaluationKind(), clang::Expr::getExprLoc(), clang::CallExpr::getFPFeatures(), clang::CodeGen::RValue::getIgnored(), clang::APValue::getInt(), getIntegerWidthAndSignedness(), clang::CountAttributedType::getKind(), getLangOpts(), getLLVMContext(), clang::MemberExpr::getMemberDecl(), clang::Builtin::Context::getName(), clang::NamedDecl::getName(), clang::CallExpr::getNumArgs(), clang::FunctionDecl::getParamDecl(), clang::CodeGen::CGOpenCLRuntime::getPipeElemAlign(), clang::CodeGen::CGOpenCLRuntime::getPipeElemSize(), clang::Type::getPointeeCXXRecordDecl(), clang::Type::getPointeeType(), getPointeeType(), clang::CodeGen::LValue::getPointer(), clang::CharUnits::getQuantity(), clang::TargetInfo::getSuitableAlign(), getTarget(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::ASTContext::getTargetInfo(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::Value::getType(), clang::ValueDecl::getType(), getType(), clang::ASTContext::getTypeAlignInChars(), getTypeSize(), GetUndefRValue(), GetVTablePtr(), clang::Decl::hasAttr(), clang::Expr::HasSideEffects(), clang::CallExpr::hasStoredFPFeatures(), clang::HIP, clang::Expr::IgnoreImpCasts(), clang::Expr::IgnoreParenCasts(), clang::Expr::IgnoreParenImpCasts(), initializeAlloca(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::isa(), clang::Type::isArrayType(), clang::Type::isBlockPointerType(), clang::Builtin::Context::isConst(), clang::Builtin::Context::isConstWithoutErrnoAndExceptions(), clang::Builtin::Context::isConstWithoutExceptions(), IsInPreservedAIRegion, clang::Type::isIntegerType(), clang::Expr::isNullPointerConstant(), clang::Type::isPointerType(), clang::Expr::isPRValue(), clang::Type::isSignedIntegerType(), isSpecialMixedSignMultiply(), isSpecialUnsignedMultiplySignedResult(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), clang::Kernel, MakeAtomicCmpXchgValue(), MustTrap, mutateLongDoubleBuiltin(), Next, clang::Normal, clang::Expr::NPC_ValueDependentIsNotNull, clang::opencl_generic, clang::Result, ReturnValue, SanOpts, clang::SanitizerSet::set(), SetSqrtFPAccuracy(), shouldEmitBuiltinAsIR(), ShouldXRayInstrumentFunction(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::LangOptionsBase::SOB_Defined, clang::LangOptionsBase::SOB_Trapping, clang::LangOptionsBase::SOB_Undefined, Target, TCK_Load, TCK_Store, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::Expr::tryEvaluateString(), tryUseTestFPKind(), clang::CodeGen::Type, clang::XRayInstrKind::Typed, TypeRequiresBuiltinLaunder(), clang::CodeGen::CodeGenTypeCache::UnqualPtrTy, V, clang::Expr::EvalResult::Val, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidTy, clang::CodeGen::Address::withElementType(), X, and clang::Zero.

Referenced by EmitCallExpr().

◆ EmitBuiltinIsAligned()

RValue CodeGenFunction::EmitBuiltinIsAligned ( const CallExpr * E)

Emit IR for __builtin_is_aligned.

Generate (x & (y-1)) == 0.

Definition at line 6612 of file CGBuiltin.cpp.

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

Referenced by EmitBuiltinExpr().

◆ EmitBuiltinNewDeleteCall()

◆ emitBuiltinOSLogFormat()

◆ emitByrefStructureInit()

◆ EmitCall() [1/3]

RValue CodeGenFunction::EmitCall ( const CGFunctionInfo & CallInfo,
const CGCallee & Callee,
ReturnValueSlot ReturnValue,
const CallArgList & Args,
llvm::CallBase ** CallOrInvoke,
bool IsMustTail,
SourceLocation Loc,
bool IsVirtualFunctionPointerThunk = false )

EmitCall - Generate a call of the given function, expecting the given result type, and using the given argument list which specifies both the LLVM arguments and the types they were derived from.

Definition at line 5215 of file CGCall.cpp.

References clang::Addr, clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Builder, clang::Call, clang::cast(), CGM, checkTargetFeatures(), clang::CodeGen::ABIArgInfo::CoerceAndExpand, convertTempToRValue(), ConvertType(), ConvertTypeForMem(), createBasicBlock(), CreateCoercedLoad(), CreateCoercedStore(), CreateMemTemp(), CreateMemTempWithoutCast(), CreateTempAlloca(), CurCodeDecl, CurFn, CurFuncDecl, CurrentCleanupScopeDepth, currentFunctionUsesSEHTry(), deactivateArgCleanupsBeforeCall(), clang::CodeGen::Decl, clang::CodeGen::ABIArgInfo::Direct, clang::QualType::DK_nontrivial_c_struct, EHStack, emitAddressAtOffset(), EmitBlock(), EmitCMSEClearRecord(), EmitKCFIOperandBundle(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitNounwindRuntimeCall(), EmitPointerAuthOperandBundle(), EmitUnreachable(), EmitWritebacks(), EnsureInsertPoint(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::CallArgList::freeArgumentMemory(), clang::CharUnits::fromQuantity(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::RValue::get(), clang::FunctionType::ExtParameterInfo::getABI(), clang::CodeGen::Address::getAddressSpace(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), clang::CharUnits::getAsAlign(), getAsNaturalPointerTo(), clang::CodeGen::Address::getBasePointer(), getBundlesForFunclet(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::CallArgList::getCleanupsToDeactivate(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::RValue::getComplex(), getContext(), getDebugInfo(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::Address::getElementType(), getEvaluationKind(), clang::CodeGen::CGFunctionInfo::getExtParameterInfo(), clang::CodeGen::CGCallee::getFunctionPointer(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaIndirect(), clang::CodeGen::ABIArgInfo::getIndirectAddrSpace(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), getInvokeDest(), clang::CodeGen::ABIArgInfo::getKind(), clang::getLangASFromTargetAS(), getLangOpts(), getLLVMContext(), getMaxVectorWidth(), clang::CodeGen::Address::getName(), clang::CodeGen::CGFunctionInfo::getNumRequiredArgs(), clang::CodeGen::ABIArgInfo::getPaddingType(), clang::Type::getPointeeType(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CGCallee::getPointerAuthInfo(), clang::SourceLocation::getRawEncoding(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CallArgList::getStackBase(), getTarget(), getTargetHooks(), getType(), getTypes(), GetUndefRValue(), clang::CodeGen::ABIArgInfo::getUnpaddedCoerceAndExpandType(), clang::Decl::hasAttr(), hasFeature(), clang::CodeGen::CallArgList::hasWritebacks(), HaveInsertPoint(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, InAlwaysInlineAttributedStmt, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ABIArgInfo::IndirectAliased, clang::CodeGen::CGFunctionInfoArgInfo::info, InNoConvergentAttributedStmt, InNoInlineAttributedStmt, InNoMergeAttributedStmt, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::Address::invalid(), clang::CodeGen::RawAddress::invalid(), clang::isa(), IsArgumentMaybeUndef(), isCleanupPadScope(), clang::CodeGen::CGFunctionInfo::isCmseNSCall(), clang::CodeGen::ABIArgInfo::isCoerceAndExpand(), clang::QualType::isDestructedType(), clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::isEmptyRecord(), clang::CodeGen::ABIArgInfo::isInAlloca(), clang::CodeGen::ABIArgInfo::isIndirect(), clang::CodeGen::ABIArgInfo::isIndirectAliased(), clang::CodeGen::Address::isKnownNonNull(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::CodeGen::RValue::isScalar(), isSEHTryScope(), clang::CodeGen::Address::isValid(), clang::CodeGen::RawAddress::isValid(), clang::Line, makeNaturalAddressForPointer(), MustTailCall, clang::CodeGen::NormalEHLifetimeMarker, clang::nullptr, PopCleanupBlock(), pushDestroy(), pushFullExprCleanup(), ReturnValue, SanOpts, SetSqrtFPAccuracy(), clang::SwiftErrorResult, clang::T, clang::CodeGen::ABIArgInfo::TargetSpecific, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::CodeGen::CGFunctionInfoArgInfo::type, V, clang::CodeGen::Address::withElementType(), and clang::CodeGen::Address::withPointer().

Referenced by emitAtomicLibcall(), EmitBlockCallExpr(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), EmitCall(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallExpr(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXMemberCallExpr(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitForwardingCallToLambda(), emitLibraryCall(), EmitNewDeleteCall(), EmitObjCForCollectionStmt(), EmitSimpleCallExpr(), emitStructGetterCall(), emitStructSetterCall(), GenerateCode(), generateObjCGetterBody(), and generateObjCSetterBody().

◆ EmitCall() [2/3]

RValue clang::CodeGen::CodeGenFunction::EmitCall ( const CGFunctionInfo & CallInfo,
const CGCallee & Callee,
ReturnValueSlot ReturnValue,
const CallArgList & Args,
llvm::CallBase ** CallOrInvoke = nullptr,
bool IsMustTail = false )
inline

Definition at line 4513 of file CodeGenFunction.h.

References EmitCall(), and ReturnValue.

◆ EmitCall() [3/3]

RValue CodeGenFunction::EmitCall ( QualType FnType,
const CGCallee & Callee,
const CallExpr * E,
ReturnValueSlot ReturnValue,
llvm::Value * Chain = nullptr,
llvm::CallBase ** CallOrInvoke = nullptr,
CGFunctionInfo const ** ResolvedFnInfo = nullptr )

◆ EmitCallAndReturnForThunk()

◆ EmitCallArg()

◆ EmitCallArgs()

void CodeGenFunction::EmitCallArgs ( CallArgList & Args,
PrototypeWrapper Prototype,
llvm::iterator_range< CallExpr::const_arg_iterator > ArgRange,
AbstractCallee AC = AbstractCallee(),
unsigned ParamsToSkip = 0,
EvaluationOrder Order = EvaluationOrder::Default )

◆ EmitCallee()

◆ EmitCallExpr()

◆ EmitCallExprLValue()

◆ EmitCallOrInvoke()

llvm::CallBase * CodeGenFunction::EmitCallOrInvoke ( llvm::FunctionCallee Callee,
ArrayRef< llvm::Value * > Args,
const Twine & Name = "" )

Emits a call or invoke instruction to the given function, depending on the current state of the EH stack.

Definition at line 5069 of file CGCall.cpp.

References Builder, CGM, createBasicBlock(), EmitBlock(), getBundlesForFunclet(), and getInvokeDest().

Referenced by EmitAsmStmt(), EmitCapturedStmt(), EmitObjCRelease(), emitObjCValueOperation(), EmitRuntimeCallOrInvoke(), and emitSuspendExpression().

◆ EmitCapturedLocals()

◆ EmitCapturedStmt()

llvm::Function * CodeGenFunction::EmitCapturedStmt ( const CapturedStmt & S,
CapturedRegionKind K )

Generate an outlined function for the body of a CapturedStmt, store any captured variables into the captured struct, and call the outlined function.

Definition at line 3320 of file CGStmt.cpp.

References CapturedStmtInfo, CGM, EmitCallOrInvoke(), GenerateCapturedStmtFunction(), clang::CodeGen::LValue::getPointer(), and InitCapturedStruct().

Referenced by EmitStmt().

◆ EmitCaseStmt()

◆ EmitCaseStmtRange()

void CodeGenFunction::EmitCaseStmtRange ( const CaseStmt & S,
ArrayRef< const Attr * > Attrs )

EmitCaseStmtRange - If case statement range is not too big then add multiple cases to switch instruction, one for each value within the range.

If range is too big then emit "if" condition check.

Definition at line 1778 of file CGStmt.cpp.

References Builder, clang::Cond, createBasicBlock(), CurFn, EmitBlockWithFallThrough(), EmitStmt(), clang::Expr::EvaluateKnownConstInt(), getContext(), clang::CaseStmt::getLHS(), clang::Stmt::getLikelihood(), getProfileCount(), clang::CaseStmt::getRHS(), and clang::CaseStmt::getSubStmt().

Referenced by EmitCaseStmt().

◆ EmitCastLValue()

LValue CodeGenFunction::EmitCastLValue ( const CastExpr * E)

EmitCastLValue - Casts are never lvalues unless that cast is to a reference type.

If the cast is to a reference, we can have the usual lvalue result, otherwise if a cast is needed by the code generator in an lvalue context, then it must mean that we need the address of an aggregate in order to access one of its members. This can happen for all the reasons that casts are permitted with aggregate result, including noop aggregate casts, and cast from scalar to union.

Definition at line 5644 of file CGExpr.cpp.

References clang::cast(), clang::Type::castAsCXXRecordDecl(), CFITCK_DerivedCast, CFITCK_UnrelatedCast, CGM, clang::CastExpr::changesVolatileQualification(), ConvertType(), ConvertTypeForMem(), EmitAggExprToLValue(), EmitDynamicCast(), EmitLValue(), EmitTypeCheck(), EmitUnsupportedLValue(), EmitVTablePtrCheckForCast(), clang::CodeGen::LValue::getAddress(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), clang::QualType::getAddressSpace(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getBaseInfo(), clang::Stmt::getBeginLoc(), clang::CastExpr::getCastKind(), getContext(), clang::Expr::getExprLoc(), getLangOpts(), clang::CodeGen::LValue::getPointer(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::CodeGen::LValue::getQuals(), clang::CastExpr::getSubExpr(), getTargetHooks(), clang::CodeGen::LValue::getTBAAInfo(), clang::Expr::getType(), clang::HLSL, clang::CodeGen::LValue::isSimple(), MakeAddrLValue(), MakeNaturalAlignRawAddrLValue(), clang::CastExpr::path_begin(), clang::CastExpr::path_end(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), sanitizePerformTypeCheck(), SanOpts, clang::CodeGen::LValue::setAddress(), clang::T, TCK_DowncastReference, V, and clang::CodeGen::Address::withElementType().

◆ EmitCfiCheckFail()

◆ EmitCfiCheckStub()

void CodeGenFunction::EmitCfiCheckStub ( )

◆ EmitCfiSlowPathCheck()

void CodeGenFunction::EmitCfiSlowPathCheck ( SanitizerKind::SanitizerOrdinal Ordinal,
llvm::Value * Cond,
llvm::ConstantInt * TypeId,
llvm::Value * Ptr,
ArrayRef< llvm::Constant * > StaticArgs )

Emit a slow path cross-DSO CFI check which calls __cfi_slowpath if Cond if false.

Definition at line 3932 of file CGExpr.cpp.

References Builder, clang::cast(), CGM, clang::Cond, createBasicBlock(), EmitBlock(), getLLVMContext(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by EmitCall(), and EmitVTablePtrCheck().

◆ EmitCheck()

◆ EmitCheckedArgForAssume()

Value * CodeGenFunction::EmitCheckedArgForAssume ( const Expr * E)

Emits an argument for a call to a __builtin_assume.

If the builtin sanitizer is enabled, a runtime check is also emitted.

Definition at line 2055 of file CGBuiltin.cpp.

References BCK_AssumePassedFalse, Builder, EmitCheck(), EmitCheckSourceLocation(), EvaluateExprAsBool(), clang::Expr::getExprLoc(), and SanOpts.

Referenced by EmitAttributedStmt(), and EmitBuiltinExpr().

◆ EmitCheckedArgForBuiltin()

Value * CodeGenFunction::EmitCheckedArgForBuiltin ( const Expr * E,
BuiltinCheckKind Kind )

Emits an argument for a call to a builtin.

If the builtin sanitizer is enabled, a runtime check specified by Kind is also emitted.

Definition at line 2034 of file CGBuiltin.cpp.

References BCK_CLZPassedZero, BCK_CTZPassedZero, Builder, clang::Cond, EmitBitCountExpr(), EmitCheck(), EmitCheckSourceLocation(), clang::Expr::getExprLoc(), clang::Value::getType(), and SanOpts.

Referenced by EmitBuiltinExpr().

◆ EmitCheckedInBoundsGEP() [1/2]

Address clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP ( Address Addr,
ArrayRef< llvm::Value * > IdxList,
llvm::Type * elementType,
bool SignedIndices,
bool IsSubtraction,
SourceLocation Loc,
CharUnits Align,
const Twine & Name = "" )

References clang::Addr, and IsSubtraction.

◆ EmitCheckedInBoundsGEP() [2/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP ( llvm::Type * ElemTy,
llvm::Value * Ptr,
ArrayRef< llvm::Value * > IdxList,
bool SignedIndices,
bool IsSubtraction,
SourceLocation Loc,
const Twine & Name = "" )

Same as IRBuilder::CreateInBoundsGEP, but additionally emits a check to detect undefined behavior when the pointer overflow sanitizer is enabled.

SignedIndices indicates whether any of the GEP indices are signed. IsSubtraction indicates whether the expression used to form the GEP is a subtraction.

References IsSubtraction.

Referenced by emitArraySubscriptGEP(), emitArraySubscriptGEP(), EmitBuiltinAlignTo(), EmitPointerArithmetic(), and clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit().

◆ EmitCheckedLValue()

LValue CodeGenFunction::EmitCheckedLValue ( const Expr * E,
TypeCheckKind TCK )

Same as EmitLValue but additionally we generate checking code to guard against undefined behavior.

This is only suitable when we know that the address will be used to access the object.

Definition at line 1596 of file CGExpr.cpp.

References clang::cast(), EmitArraySubscriptExpr(), EmitLValue(), EmitTypeCheck(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::isa(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isSimple(), IsWrappedCXXThis(), SanOpts, and clang::SanitizerSet::set().

Referenced by EmitBinaryOperatorLValue(), EmitCountedByBoundsChecking(), EmitMemberExpr(), and EmitOrigPointerRValue().

◆ EmitCheckSourceLocation()

llvm::Constant * CodeGenFunction::EmitCheckSourceLocation ( SourceLocation Loc)

◆ EmitCheckTypeDescriptor()

llvm::Constant * CodeGenFunction::EmitCheckTypeDescriptor ( QualType T)

Emit a description of a type in a format suitable for passing to a runtime sanitizer handler.

Emit a type description suitable for use by a runtime sanitizer library.

The format of a type descriptor is

{ i16 TypeKind, i16 TypeInfo }

followed by an array of i8 containing the type name with extra information for BitInt. TypeKind is TK_Integer(0) for an integer, TK_Float(1) for a floating point value, TK_BitInt(2) for BitInt and TK_Unknown(0xFFFF) for anything else.

Definition at line 3538 of file CGExpr.cpp.

References clang::DiagnosticsEngine::ak_qualtype, Builder, clang::C, CGM, getContext(), getLLVMContext(), clang::BitIntType::getNumBits(), getTarget(), clang::ASTContext::getTypeSize(), getTypeSize(), clang::T, TK_BitInt, TK_Float, TK_Integer, and TK_Unknown.

Referenced by emitAlignmentAssumptionCheck(), EmitBitfieldConversionCheck(), EmitBoundsCheckImpl(), EmitCall(), EmitNullabilityCheck(), EmitObjCForCollectionStmt(), EmitOverflowCheckedAbs(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitVariablyModifiedType(), and EmitVTablePtrCheck().

◆ EmitCheckValue()

llvm::Value * CodeGenFunction::EmitCheckValue ( llvm::Value * V)

Convert a value into a format suitable for passing to a runtime sanitizer handler.

Definition at line 3610 of file CGExpr.cpp.

References Builder, CreateDefaultAlignTempAlloca(), getLLVMContext(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, and V.

Referenced by EmitCheck().

◆ EmitCMSEClearRecord() [1/2]

llvm::Value * CodeGenFunction::EmitCMSEClearRecord ( llvm::Value * V,
llvm::ArrayType * ATy,
QualType RTy )

◆ EmitCMSEClearRecord() [2/2]

llvm::Value * CodeGenFunction::EmitCMSEClearRecord ( llvm::Value * V,
llvm::IntegerType * ITy,
QualType RTy )

Definition at line 3921 of file CGCall.cpp.

References Builder, buildMultiCharMask(), clang::Type::castAsCanonical(), CGM, and setUsedBits().

Referenced by EmitCall(), and EmitFunctionEpilog().

◆ EmitCoawaitExpr()

RValue CodeGenFunction::EmitCoawaitExpr ( const CoawaitExpr & E,
AggValueSlot aggSlot = AggValueSlot::ignored(),
bool ignoreResult = false )

Definition at line 375 of file CGCoroutine.cpp.

References CurCoro, and emitSuspendExpression().

◆ EmitCoawaitLValue()

LValue CodeGenFunction::EmitCoawaitLValue ( const CoawaitExpr * E)

◆ EmitCommonNeonBuiltinExpr()

Value * CodeGenFunction::EmitCommonNeonBuiltinExpr ( unsigned BuiltinID,
unsigned LLVMIntrinsic,
unsigned AltLLVMIntrinsic,
const char * NameHint,
unsigned Modifier,
const CallExpr * E,
SmallVectorImpl< llvm::Value * > & Ops,
Address PtrOp0,
Address PtrOp1,
llvm::Triple::ArchType Arch )

◆ EmitComplexAssignmentLValue()

LValue CodeGenFunction::EmitComplexAssignmentLValue ( const BinaryOperator * E)

Emit an l-value for an assignment (simple or compound) of complex type.

Definition at line 1518 of file CGExprComplex.cpp.

References CGM, getLangOpts(), clang::BinaryOperator::getLHS(), and clang::BinaryOperator::getOpcode().

Referenced by EmitBinaryOperatorLValue().

◆ EmitComplexCompoundAssignmentLValue()

LValue CodeGenFunction::EmitComplexCompoundAssignmentLValue ( const CompoundAssignOperator * E)

◆ EmitComplexExpr()

ComplexPairTy CodeGenFunction::EmitComplexExpr ( const Expr * E,
bool IgnoreReal = false,
bool IgnoreImag = false )

EmitComplexExpr - Emit the computation of the specified expression of complex type, returning the result.

EmitComplexExpr - Emit the computation of the specified expression of complex type, ignoring the result.

Definition at line 1488 of file CGExprComplex.cpp.

References getComplexType(), and clang::Expr::getType().

Referenced by EmitAnyExpr(), EmitAtomicInit(), EmitBuiltinExpr(), EmitExprAsInit(), and EvaluateExprAsBool().

◆ EmitComplexExprIntoLValue()

void CodeGenFunction::EmitComplexExprIntoLValue ( const Expr * E,
LValue dest,
bool isInit )

EmitComplexExprIntoLValue - Emit the given expression of complex type and place its result into the specified l-value.

Definition at line 1497 of file CGExprComplex.cpp.

References getComplexType(), and clang::Expr::getType().

Referenced by EmitAnyExprToMem(), EmitDeclInit(), EmitInitializationToLValue(), EmitInitializerForField(), EmitReturnStmt(), and StoreAnyExprIntoOneUnit().

◆ EmitComplexPrePostIncDec()

◆ EmitComplexToScalarConversion()

Value * CodeGenFunction::EmitComplexToScalarConversion ( ComplexPairTy Src,
QualType SrcTy,
QualType DstTy,
SourceLocation Loc )

Emit a conversion from the specified complex type to the specified destination type, where the destination type is an LLVM scalar type.

Definition at line 5893 of file CGExprScalar.cpp.

References hasScalarEvaluationKind(), and clang::Type::isAnyComplexType().

Referenced by convertToScalarValue(), and EvaluateExprAsBool().

◆ EmitCompoundAssignmentLValue()

LValue CodeGenFunction::EmitCompoundAssignmentLValue ( const CompoundAssignOperator * E)

◆ EmitCompoundLiteralLValue()

◆ EmitCompoundStmt()

Address CodeGenFunction::EmitCompoundStmt ( const CompoundStmt & S,
bool GetLast = false,
AggValueSlot AggSlot = AggValueSlot::ignored() )

EmitCompoundStmt - Emit a compound statement {..} node.

If GetLast is true, this captures the expression result of the last sub-statement and returns it (for use by the statement expression extension).

Definition at line 566 of file CGStmt.cpp.

References EmitCompoundStmtWithoutScope(), getContext(), clang::CompoundStmt::getLBracLoc(), and clang::Stmt::getSourceRange().

Referenced by EmitSimpleStmt().

◆ EmitCompoundStmtWithoutScope()

◆ EmitConditionalOperatorLValue()

◆ EmitConstructorBody()

◆ EmitContinueStmt()

void CodeGenFunction::EmitContinueStmt ( const ContinueStmt & S)

◆ EmitCoreturnStmt()

◆ EmitCoroutineBody()

◆ EmitCoroutineIntrinsic()

◆ EmitCountedByBoundsChecking()

void CodeGenFunction::EmitCountedByBoundsChecking ( const Expr * E,
llvm::Value * Idx,
Address Addr,
QualType IdxTy,
QualType ArrayTy,
bool Accessed,
bool FlexibleArray )

EmitCountedByBoundsChecking - If the array being accessed has a "counted_by" attribute, generate bounds checking code.

The "count" field is at the top level of the struct or in an anonymous struct, that's also at the top level. Future expansions may allow the "count" to reside at any place in the struct, but the value of "counted_by" will be a "simple" path to the count, i.e. "a.b.count", so we shouldn't need the full force of EmitLValue or similar to emit the correct GEP.

Definition at line 4515 of file CGExpr.cpp.

References clang::Addr, Builder, clang::cast(), CGM, ConvertType(), EmitBoundsCheckImpl(), EmitCheckedLValue(), clang::FieldDecl::findCountedByField(), clang::CodeGen::LValue::getAddress(), getCharWidth(), getContext(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), getLangOpts(), getOffsetDifferenceInBits(), clang::ValueDecl::getType(), clang::Expr::IgnoreImpCasts(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, and TCK_MemberAccess.

Referenced by EmitArraySubscriptExpr().

◆ EmitCoyieldExpr()

RValue CodeGenFunction::EmitCoyieldExpr ( const CoyieldExpr & E,
AggValueSlot aggSlot = AggValueSlot::ignored(),
bool ignoreResult = false )

Definition at line 382 of file CGCoroutine.cpp.

References CurCoro, and emitSuspendExpression().

◆ EmitCoyieldLValue()

LValue CodeGenFunction::EmitCoyieldLValue ( const CoyieldExpr * E)

◆ EmitCtorPrologue()

◆ EmitCUDAKernelCallExpr()

RValue CodeGenFunction::EmitCUDAKernelCallExpr ( const CUDAKernelCallExpr * E,
ReturnValueSlot ReturnValue,
llvm::CallBase ** CallOrInvoke )

Definition at line 503 of file CGExprCXX.cpp.

References CGM, and ReturnValue.

Referenced by EmitCallExpr().

◆ EmitCXXAggrConstructorCall() [1/2]

void CodeGenFunction::EmitCXXAggrConstructorCall ( const CXXConstructorDecl * ctor,
const ArrayType * arrayType,
Address arrayBegin,
const CXXConstructExpr * E,
bool NewPointerIsChecked,
bool zeroInitialize = false )

EmitCXXAggrConstructorCall - Emit a loop to call a particular constructor for each of several members of an array.

Parameters
ctorthe constructor to call for each element
arrayTypethe type of the array to initialize
arrayBeginan arrayType*
zeroInitializetrue if each element should be zero-initialized before it is constructed

Definition at line 1993 of file CGClass.cpp.

References clang::ast_matchers::arrayType, emitArrayLength(), and EmitCXXAggrConstructorCall().

Referenced by EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), and EmitNewArrayInitializer().

◆ EmitCXXAggrConstructorCall() [2/2]

void CodeGenFunction::EmitCXXAggrConstructorCall ( const CXXConstructorDecl * ctor,
llvm::Value * numElements,
Address arrayBase,
const CXXConstructExpr * E,
bool NewPointerIsChecked,
bool zeroInitialize = false )

◆ EmitCXXBindTemporaryLValue()

◆ EmitCXXConstructExpr()

◆ EmitCXXConstructLValue()

◆ EmitCXXConstructorCall() [1/2]

◆ EmitCXXConstructorCall() [2/2]

void CodeGenFunction::EmitCXXConstructorCall ( const CXXConstructorDecl * D,
CXXCtorType Type,
bool ForVirtualBase,
bool Delegating,
AggValueSlot ThisAVS,
const CXXConstructExpr * E )

Definition at line 2133 of file CGClass.cpp.

References clang::CodeGen::CallArgList::add(), clang::CXXConstructExpr::arguments(), clang::Type::castAs(), Default, clang::Delegating, EmitAggregateCopyCtor(), EmitCallArgs(), EmitCXXConstructorCall(), EmitLValue(), ForceLeftToRight, clang::CodeGen::RValue::get(), clang::CodeGen::AggValueSlot::getAddress(), clang::Qualifiers::getAddressSpace(), clang::QualType::getAddressSpace(), clang::CXXConstructExpr::getArg(), getAsNaturalPointerTo(), clang::ASTContext::getCanonicalTagType(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::Expr::getExprLoc(), clang::CXXMethodDecl::getFunctionObjectParameterType(), getLLVMContext(), clang::CXXConstructExpr::getNumArgs(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::AggValueSlot::getQualifiers(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CXXConstructExpr::isListInitialization(), isMemcpyEquivalentSpecialMember(), clang::CodeGen::AggValueSlot::isSanitizerChecked(), MakeAddrLValue(), clang::CodeGen::AggValueSlot::mayOverlap(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), and clang::CodeGen::Type.

Referenced by EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXConstructorCall(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitDelegateCXXConstructorCall(), EmitInheritedCXXConstructorCall(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), and EmitSynthesizedCXXCopyCtorCall().

◆ EmitCXXDeleteExpr()

◆ EmitCXXDestructorCall() [1/2]

void CodeGenFunction::EmitCXXDestructorCall ( const CXXDestructorDecl * D,
CXXDtorType Type,
bool ForVirtualBase,
bool Delegating,
Address This,
QualType ThisTy )

◆ EmitCXXDestructorCall() [2/2]

◆ EmitCXXForRangeStmt()

◆ EmitCXXGlobalVarDeclInit()

◆ EmitCXXGuardedInit()

void CodeGenFunction::EmitCXXGuardedInit ( const VarDecl & D,
llvm::GlobalVariable * DeclPtr,
bool PerformInit )

Emit code in this function to perform a guarded variable initialization.

Guarded initializations are used when it's not possible to prove that an initialization will be done exactly once, e.g. with a static local variable or a static data member of a class template.

Definition at line 387 of file CGDeclCXX.cpp.

References CGM, and clang::Decl::getLocation().

Referenced by AddInitializerToStaticVarDecl(), and GenerateCXXGlobalVarDeclInitFunc().

◆ EmitCXXGuardedInitBranch()

void CodeGenFunction::EmitCXXGuardedInitBranch ( llvm::Value * NeedsInit,
llvm::BasicBlock * InitBlock,
llvm::BasicBlock * NoInitBlock,
GuardKind Kind,
const VarDecl * D )

Emit a branch to select whether or not to perform guarded initialization.

Definition at line 401 of file CGDeclCXX.cpp.

References Builder, CGM, clang::VarDecl::getTLSKind(), clang::VarDecl::isLocalVarDecl(), TlsGuard, and VariableGuard.

Referenced by GenerateCXXGlobalInitFunc().

◆ EmitCXXMemberCallExpr()

◆ EmitCXXMemberDataPointerAddress()

Address CodeGenFunction::EmitCXXMemberDataPointerAddress ( const Expr * E,
Address base,
llvm::Value * memberPtr,
const MemberPointerType * memberPtrType,
bool IsInBounds,
LValueBaseInfo * BaseInfo = nullptr,
TBAAAccessInfo * TBAAInfo = nullptr )

Emit the address of a field using a member data pointer.

Parameters
EOnly used for emergency diagnostics

Definition at line 150 of file CGClass.cpp.

References CGM, ConvertTypeForMem(), clang::CodeGen::Address::getAlignment(), clang::MemberPointerType::getMostRecentCXXRecordDecl(), and clang::MemberPointerType::getPointeeType().

Referenced by EmitMaterializeTemporaryExpr(), and EmitPointerToDataMemberBinaryExpr().

◆ EmitCXXMemberOrOperatorCall()

RValue CodeGenFunction::EmitCXXMemberOrOperatorCall ( const CXXMethodDecl * Method,
const CGCallee & Callee,
ReturnValueSlot ReturnValue,
llvm::Value * This,
llvm::Value * ImplicitParam,
QualType ImplicitParamTy,
const CallExpr * E,
CallArgList * RtlArgs,
llvm::CallBase ** CallOrInvoke )

◆ EmitCXXMemberOrOperatorMemberCallExpr()

RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr ( const CallExpr * CE,
const CXXMethodDecl * MD,
ReturnValueSlot ReturnValue,
bool HasQualifier,
NestedNameSpecifier Qualifier,
bool IsArrow,
const Expr * Base,
llvm::CallBase ** CallOrInvoke )

Definition at line 217 of file CGExprCXX.cpp.

References clang::CallExpr::arg_begin(), clang::CallExpr::arguments(), BuildAppleKextVirtualCall(), clang::C, clang::cast(), clang::Type::castAs(), CFITCK_NVCall, CGM, commonEmitCXXMemberOrOperatorCall(), clang::Ctor_Complete, clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::Dtor_Complete, EmitAggregateAssign(), EmitCallArgs(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXMemberOrOperatorCall(), EmitLValue(), EmitPointerWithAlignment(), EmitTypeCheck(), EmitVTablePtrCheckForCall(), ForceRightToLeft, clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::CGCallee::forVirtual(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::QualType::getCanonicalType(), getContext(), clang::CXXMethodDecl::getCorrespondingMethodInClass(), getCXXRecord(), clang::CXXMethodDecl::getDevirtualizedMethod(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getReturnType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::isa(), clang::CXXMethodDecl::isCopyAssignmentOperator(), clang::FunctionDecl::isDefaulted(), clang::CXXRecordDecl::isDynamicClass(), clang::CXXMethodDecl::isMoveAssignmentOperator(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CXXMethodDecl::isVirtual(), IsWrappedCXXThis(), MakeAddrLValue(), clang::RecordDecl::mayInsertExtraPadding(), ReturnValue, sanitizePerformTypeCheck(), SanOpts, clang::SanitizerSet::set(), TCK_MemberCall, and clang::CharUnits::Zero().

Referenced by EmitCXXMemberCallExpr(), and EmitCXXOperatorMemberCallExpr().

◆ EmitCXXMemberPointerCallExpr()

◆ EmitCXXNewExpr()

llvm::Value * CodeGenFunction::EmitCXXNewExpr ( const CXXNewExpr * E)

Definition at line 1602 of file CGExprCXX.cpp.

References clang::CodeGen::CallArgList::add(), clang::CodeGen::CGDebugInfo::addHeapAllocSiteMetadata(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CalculateCookiePadding(), clang::cast(), clang::Type::castAs(), clang::Type::castAsEnumDecl(), CGM, ConvertTypeForMem(), createBasicBlock(), DeactivateCleanupBlock(), clang::CodeGen::Decl, EHStack, EmitAnyExprToTemp(), EmitBlock(), EmitCallArgs(), EmitCXXNewAllocSize(), EmitNewDeleteCall(), EmitNewInitializer(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), EmitTypeCheck(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EnterNewDeleteCleanup(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getAlignment(), clang::CXXNewExpr::getAllocatedType(), clang::CXXNewExpr::getAllocatedTypeSourceInfo(), clang::ASTContext::getBaseElementType(), clang::TypeLoc::getBeginLoc(), getContext(), getDebugInfo(), clang::Expr::getExprLoc(), clang::CXXParenListInitExpr::getInitExprs(), clang::CXXNewExpr::getInitializer(), clang::EnumDecl::getIntegerType(), clang::InitListExpr::getNumInits(), clang::FunctionProtoType::getNumParams(), clang::CXXNewExpr::getNumPlacementArgs(), clang::CXXNewExpr::getOperatorDelete(), clang::CXXNewExpr::getOperatorNew(), clang::FunctionProtoType::getParamType(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenTypeCache::getSizeAlign(), clang::ASTContext::getSizeType(), clang::ASTContext::getTypeAlignInChars(), clang::TypeSourceInfo::getTypeLoc(), getTypeSize(), clang::CXXNewExpr::hasInitializer(), clang::CXXNewExpr::implicitAllocationParameters(), clang::Init, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::Address::invalid(), clang::isa(), clang::isAlignedAllocation(), clang::CXXNewExpr::isArray(), clang::QualType::isPODType(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::InitListExpr::isStringLiteralInit(), clang::isTypeAwareAllocation(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CXXNewExpr::passAlignment(), clang::CXXNewExpr::placement_arguments(), sanitizePerformTypeCheck(), clang::SanitizerSet::set(), clang::CodeGen::Address::setAlignment(), clang::CXXNewExpr::shouldNullCheckAllocation(), clang::CodeGen::CodeGenTypeCache::SizeTy, Target, TCK_ConstructorCall, and clang::CodeGen::Address::withElementType().

◆ EmitCXXOperatorMemberCallExpr()

RValue CodeGenFunction::EmitCXXOperatorMemberCallExpr ( const CXXOperatorCallExpr * E,
const CXXMethodDecl * MD,
ReturnValueSlot ReturnValue,
llvm::CallBase ** CallOrInvoke )

◆ EmitCXXPseudoDestructorExpr()

◆ EmitCXXTemporary()

void CodeGenFunction::EmitCXXTemporary ( const CXXTemporary * Temporary,
QualType TempType,
Address Ptr )

Emits all the code to cause the given temporary to be cleaned up.

Definition at line 1322 of file CGCleanup.cpp.

References destroyCXXObject, clang::CodeGen::NormalAndEHCleanup, and pushDestroy().

Referenced by EmitCXXBindTemporaryLValue().

◆ EmitCXXThrowExpr()

void CodeGenFunction::EmitCXXThrowExpr ( const CXXThrowExpr * E,
bool KeepInsertionPoint = true )

◆ EmitCXXTryStmt()

void CodeGenFunction::EmitCXXTryStmt ( const CXXTryStmt & S)

◆ EmitCXXTypeidExpr()

◆ EmitCXXTypeidLValue()

LValue CodeGenFunction::EmitCXXTypeidLValue ( const CXXTypeidExpr * E)

◆ EmitCXXUuidofExpr()

Address CodeGenFunction::EmitCXXUuidofExpr ( const CXXUuidofExpr * E)

◆ EmitCXXUuidofLValue()

LValue CodeGenFunction::EmitCXXUuidofLValue ( const CXXUuidofExpr * E)

◆ EmitDecl()

◆ EmitDeclRefExprDbgValue()

void CodeGenFunction::EmitDeclRefExprDbgValue ( const DeclRefExpr * E,
const APValue & Init )

Definition at line 2622 of file CodeGenFunction.cpp.

References CGM, getDebugInfo(), clang::DeclRefExpr::getDecl(), and clang::Init.

Referenced by tryEmitAsConstant().

◆ EmitDeclRefLValue()

LValue CodeGenFunction::EmitDeclRefLValue ( const DeclRefExpr * E)

Definition at line 3205 of file CGExpr.cpp.

References clang::Addr, clang::CodeGen::ARCImpreciseLifetime, Builder, canEmitSpuriousReferenceToVariable(), CapturedStmtInfo, clang::cast(), CGM, ConvertTypeForMem(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), CurCodeDecl, clang::CodeGen::Decl, clang::CodeGen::ConstantEmitter::emitAbstract(), emitBlockByrefAddress(), EmitCapturedFieldLValue(), EmitFunctionDeclLValue(), EmitGlobalNamedRegister(), EmitGlobalVarDeclLValue(), EmitLoadOfReferenceLValue(), EmitLValue(), clang::CodeGen::Address::emitRawPointer(), EmitThreadPrivateVarDeclLValue(), clang::CodeGen::LValue::getAddress(), GetAddrOfBlockDecl(), clang::CodeGen::Address::getBasePointer(), getContext(), clang::DeclRefExpr::getDecl(), clang::CodeGen::Address::getElementType(), clang::Expr::getExprLoc(), clang::getLangASFromTargetAS(), getLangOpts(), getLLVMContext(), clang::DeclRefExpr::getLocation(), clang::CodeGen::LValue::getQuals(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::Address::getType(), clang::CodeGen::LValue::getType(), clang::Expr::getType(), getTypes(), clang::Decl::hasAttr(), clang::CodeGen::Address::invalid(), clang::isa(), clang::DeclRefExpr::isNonOdrUse(), clang::Decl::isUsed(), clang::SourceLocation::isValid(), LambdaCaptureFields, MakeAddrLValue(), makeNaturalAddressForPointer(), clang::CodeGen::NotKnownNonNull, clang::NOUR_Constant, clang::NOUR_Unevaluated, clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), clang::DeclRefExpr::refersToEnclosingVariableOrCapture(), clang::Qualifiers::removeObjCGCAttr(), clang::SC_Register, clang::CodeGen::LValue::setARCPreciseLifetime(), clang::CodeGen::LValue::setNonGC(), clang::CodeGen::LValue::setNontemporal(), setObjCGCLValueClass(), clang::T, clang::VarDecl::TLS_None, and clang::CodeGen::Address::withPointer().

Referenced by EmitMemberExpr(), and LoadObjCSelf().

◆ EmitDeclStmt()

void CodeGenFunction::EmitDeclStmt ( const DeclStmt & S)

Definition at line 1725 of file CGStmt.cpp.

References clang::DeclStmt::decls(), EmitDecl(), EmitStopPoint(), and HaveInsertPoint().

Referenced by EmitSimpleStmt().

◆ EmitDefaultStmt()

void CodeGenFunction::EmitDefaultStmt ( const DefaultStmt & S,
ArrayRef< const Attr * > Attrs )

◆ EmitDelegateCallArg()

void CodeGenFunction::EmitDelegateCallArg ( CallArgList & args,
const VarDecl * param,
SourceLocation loc )

◆ EmitDelegateCXXConstructorCall()

◆ EmitDelegatingCXXConstructorCall()

◆ EmitDeleteCall()

◆ emitDestroy()

void CodeGenFunction::emitDestroy ( Address addr,
QualType type,
Destroyer * destroyer,
bool useEHCleanupForArray )

emitDestroy - Immediately perform the destruction of the given object.

Parameters
addr- the address of the object; a type*
type- the type of the object; if an array type, all objects are destroyed in reverse order
destroyer- the function to call to destroy individual elements
useEHCleanupForArray- whether an EH cleanup should be used when destroying array elements, in case one of the destructions throws an exception

Definition at line 2395 of file CGDecl.cpp.

References clang::CharUnits::alignmentOfArrayElement(), clang::ast_matchers::arrayType, Builder, emitArrayDestroy(), emitArrayLength(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CodeGen::Address::getElementType(), length(), and clang::ast_matchers::type.

Referenced by clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), and generateDestroyHelper().

◆ EmitDestructorBody()

◆ EmitDirectXBuiltinExpr()

Value * CodeGenFunction::EmitDirectXBuiltinExpr ( unsigned BuiltinID,
const CallExpr * E )

◆ EmitDoStmt()

◆ EmitDynamicCast()

◆ EmitEndEHSpec()

◆ EmitExprAsInit()

void CodeGenFunction::EmitExprAsInit ( const Expr * init,
const ValueDecl * D,
LValue lvalue,
bool capturedByInit )

EmitExprAsInit - Emits the code necessary to initialize a location in memory with the given initializer.

Emit an expression as an initializer for an object (variable, field, etc.) at the given location.

The expression is not necessarily the normal initializer for the object, and the address is not necessarily its normal location.

Parameters
initthe initializing expression
Dthe object to act as if we're initializing
lvaluethe lvalue to initialize
capturedByInittrue if D is a __block variable whose address is potentially changed by the initializer

Definition at line 2093 of file CGDecl.cpp.

References clang::cast(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, drillIntoBlockVariable(), EmitAggExpr(), EmitAtomicInit(), EmitComplexExpr(), EmitReferenceBindingToExpr(), EmitScalarInit(), EmitStoreOfComplex(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forLValue(), getEvaluationKind(), getOverlapForFieldInit(), clang::ValueDecl::getType(), clang::isa(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::MayOverlap, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::ast_matchers::type.

Referenced by EmitAutoVarInit(), EmitInitializerForField(), EmitOMPLinearClauseInit(), and emitPrivatesInit().

◆ EmitExtendGCLifetime()

void CodeGenFunction::EmitExtendGCLifetime ( llvm::Value * object)

EmitExtendGCLifetime - Given a pointer to an Objective-C object, make sure it survives garbage collection until this point.

Definition at line 3716 of file CGObjC.cpp.

References clang::CodeGen::RequiredArgs::All, EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.

◆ EmitExtVectorElementExpr()

◆ EmitExtVectorElementLValue()

Address CodeGenFunction::EmitExtVectorElementLValue ( LValue V)

◆ EmitFakeUse()

void CodeGenFunction::EmitFakeUse ( Address Addr)

◆ EmitFieldAnnotations()

Address CodeGenFunction::EmitFieldAnnotations ( const FieldDecl * D,
Address V )

Emit field annotations for the given field & value.

Returns the annotation result.

Definition at line 2733 of file CodeGenFunction.cpp.

References clang::Addr, Builder, CGM, EmitAnnotationCall(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::Decl::specific_attrs(), and V.

Referenced by EmitLValueForField().

◆ EmitForStmt()

◆ EmitForwardingCallToLambda()

◆ EmitFP8NeonCall()

Value * CodeGenFunction::EmitFP8NeonCall ( unsigned IID,
ArrayRef< llvm::Type * > Tys,
SmallVectorImpl< llvm::Value * > & O,
const CallExpr * E,
const char * name )

◆ EmitFP8NeonCvtCall()

Value * CodeGenFunction::EmitFP8NeonCvtCall ( unsigned IID,
llvm::Type * Ty0,
llvm::Type * Ty1,
bool Extract,
SmallVectorImpl< llvm::Value * > & Ops,
const CallExpr * E,
const char * name )

Definition at line 495 of file ARM.cpp.

References Builder, EmitFP8NeonCall(), and clang::CodeGen::CodeGenTypeCache::Int8Ty.

Referenced by EmitAArch64BuiltinExpr().

◆ EmitFP8NeonFDOTCall()

llvm::Value * CodeGenFunction::EmitFP8NeonFDOTCall ( unsigned IID,
bool ExtendLaneArg,
llvm::Type * RetTy,
SmallVectorImpl< llvm::Value * > & Ops,
const CallExpr * E,
const char * name )

Definition at line 458 of file ARM.cpp.

References Builder, EmitFP8NeonCall(), and clang::CodeGen::CodeGenTypeCache::Int8Ty.

Referenced by EmitAArch64BuiltinExpr().

◆ EmitFP8NeonFMLACall()

llvm::Value * CodeGenFunction::EmitFP8NeonFMLACall ( unsigned IID,
bool ExtendLaneArg,
llvm::Type * RetTy,
SmallVectorImpl< llvm::Value * > & Ops,
const CallExpr * E,
const char * name )

Definition at line 474 of file ARM.cpp.

References Builder, EmitFP8NeonCall(), and clang::CodeGen::CodeGenTypeCache::Int8Ty.

Referenced by EmitAArch64BuiltinExpr().

◆ EmitFromMemory()

llvm::Value * CodeGenFunction::EmitFromMemory ( llvm::Value * Value,
QualType Ty )

EmitFromMemory - Change a scalar value from its memory representation to its value representation.

Converts a scalar value from its load/store type (as returned by convertTypeForLoadStore) to its primary IR type (as returned by ConvertType).

Definition at line 2183 of file CGExpr.cpp.

References Builder, clang::cast(), ConvertType(), emitBoolVecConversion(), clang::Type::getAs(), getContext(), clang::Value::getType(), clang::Type::hasBooleanRepresentation(), clang::Type::isBitIntType(), clang::Type::isExtVectorBoolType(), clang::Type::isPackedVectorBoolType(), and V.

Referenced by EmitFromInt(), EmitLoadOfScalar(), EmitStoreThroughBitfieldLValue(), and GenerateOpenMPCapturedStmtFunction().

◆ EmitFunctionBody()

void CodeGenFunction::EmitFunctionBody ( const Stmt * Body)

◆ EmitFunctionEpilog()

void CodeGenFunction::EmitFunctionEpilog ( const CGFunctionInfo & FI,
bool EmitRetDbgLoc,
SourceLocation EndLoc,
uint64_t RetKeyInstructionsSourceAtom )

EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary.

Specify the source location atom group (Key Instructions debug info feature) for the ret using RetKeyInstructionsSourceAtom. If it's 0, the ret will get added to a new source atom group.

Definition at line 3967 of file CGCall.cpp.

References addInstToNewSourceAtom(), addInstToSpecificSourceAtom(), AutoreleaseResult, BlockInfo, Builder, clang::cast(), CGM, clang::CodeGen::ABIArgInfo::CoerceAndExpand, ConvertType(), CreateCoercedLoad(), CurCodeDecl, CurFn, CurFuncDecl, clang::CodeGen::ABIArgInfo::Direct, emitAddressAtOffset(), emitAutoreleaseOfResult(), EmitCMSEClearRecord(), EmitLoadOfComplex(), EmitLoadOfScalar(), EmitReturnValueCheck(), EmitStoreOfComplex(), EmitStoreOfScalar(), EmitUnreachable(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, findDominatingStoreToReturnValue(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::QualType::getCanonicalType(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), getContext(), clang::CodeGen::ABIArgInfo::getDirectOffset(), getEvaluationKind(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaSRet(), clang::CodeGen::ABIArgInfo::getKind(), getLangOpts(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::ABIArgInfo::getUnpaddedCoerceAndExpandType(), hasAggregateEvaluationKind(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ABIArgInfo::IndirectAliased, clang::isa(), clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::Type::isObjCRetainableType(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::CodeGen::LValue::MakeAddr(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), ReturnValue, clang::CodeGen::ABIArgInfo::TargetSpecific, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and V.

Referenced by FinishFunction().

◆ EmitFunctionProlog()

void CodeGenFunction::EmitFunctionProlog ( const CGFunctionInfo & FI,
llvm::Function * Fn,
const FunctionArgList & Args )

EmitFunctionProlog - Emit the target specific LLVM code to load the arguments for the given function.

This is also responsible for naming the LLVM function arguments.

Definition at line 3080 of file CGCall.cpp.

References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Builder, clang::cast(), CGM, clang::CodeGen::ABIArgInfo::CoerceAndExpand, CoerceScalableToFixed(), ConvertType(), ConvertTypeForMem(), CreateCoercedStore(), CreateMemTemp(), CreateTempAlloca(), CurCodeDecl, clang::CodeGen::ABIArgInfo::Direct, EHStack, emitAddressAtOffset(), emitArgumentDemotion(), EmitLoadOfScalar(), EmitParmDecl(), clang::CodeGen::Address::emitRawPointer(), EmitScalarExpr(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::CodeGenFunction::ParamValue::forDirect(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::FunctionType::ExtParameterInfo::getABI(), clang::QualType::getAddressSpace(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::RawAddress::getAlignment(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), clang::Type::getAs(), clang::CharUnits::getAsAlign(), clang::DeclaratorDecl::getBeginLoc(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), getContext(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CGFunctionInfo::getExtParameterInfo(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaIndirect(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectRealign(), clang::CodeGen::ABIArgInfo::getKind(), getLLVMContext(), clang::NamedDecl::getName(), getNonNullAttr(), clang::Type::getPointeeType(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), getTarget(), clang::ValueDecl::getType(), getTypes(), clang::CodeGen::ABIArgInfo::getUnpaddedCoerceAndExpandType(), hasScalarEvaluationKind(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ABIArgInfo::IndirectAliased, clang::CodeGen::CGFunctionInfoArgInfo::info, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::Address::invalid(), clang::isa(), clang::Type::isConstantSizeType(), clang::CodeGen::ABIArgInfo::isDirect(), clang::Type::isIncompleteType(), clang::CodeGen::ABIArgInfo::isIndirectAliased(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::Type::isPointerType(), clang::QualType::isRestrictQualified(), clang::CodeGen::KnownNonNull, MakeAddrLValue(), makeNaturalAddressForPointer(), clang::CodeGen::NormalCleanup, ReturnValue, SanOpts, clang::Static, clang::SwiftErrorResult, clang::CodeGen::ABIArgInfo::TargetSpecific, clang::CodeGen::CGFunctionInfoArgInfo::type, V, clang::CodeGen::Address::withElementType(), and clang::Zero.

Referenced by StartFunction().

◆ EmitGotoStmt()

void CodeGenFunction::EmitGotoStmt ( const GotoStmt & S)

◆ EmitHexagonBuiltinExpr()

◆ EmitHLSLArrayAssignLValue()

LValue CodeGenFunction::EmitHLSLArrayAssignLValue ( const BinaryOperator * E)

◆ EmitHLSLBuiltinExpr()

◆ EmitHLSLOutArgExpr()

◆ EmitHLSLOutArgLValues()

◆ EmitIfStmt()

◆ EmitIgnoredConditionalOperator()

void CodeGenFunction::EmitIgnoredConditionalOperator ( const AbstractConditionalOperator * E)

◆ EmitIgnoredExpr()

◆ emitImplicitAssignmentOperatorBody()

void CodeGenFunction::emitImplicitAssignmentOperatorBody ( FunctionArgList & Args)

◆ EmitIndirectGotoStmt()

◆ EmitInheritedCXXConstructorCall()

void CodeGenFunction::EmitInheritedCXXConstructorCall ( const CXXConstructorDecl * D,
bool ForVirtualBase,
Address This,
bool InheritedFromVBase,
const CXXInheritedCtorInitExpr * E )

◆ EmitInitializationToLValue()

◆ EmitInitializerForField()

◆ EmitInitListLValue()

LValue CodeGenFunction::EmitInitListLValue ( const InitListExpr * E)

◆ EmitInlinedInheritingCXXConstructorCall()

void CodeGenFunction::EmitInlinedInheritingCXXConstructorCall ( const CXXConstructorDecl * Ctor,
CXXCtorType CtorType,
bool ForVirtualBase,
bool Delegating,
CallArgList & Args )

Emit a call to an inheriting constructor (that is, one that invokes a constructor inherited from a base class) by inlining its definition.

This is necessary if the ABI does not support forwarding the arguments to the base class constructor (because they're variadic or similar).

Definition at line 2330 of file CGClass.cpp.

References BuildFunctionArgList(), CGM, CreateIRTemp(), CurGD, clang::Delegating, EmitCtorPrologue(), EmitParmDecl(), FnRetTy, clang::CodeGen::CodeGenFunction::ParamValue::forDirect(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::RValue::getAggregateAddress(), clang::CodeGen::RValue::getScalarVal(), clang::isa(), clang::CodeGen::RValue::isComplex(), clang::CodeGen::RValue::isScalar(), clang::Type::isVoidType(), and ReturnValue.

Referenced by EmitCXXConstructorCall().

◆ EmitInvariantStart()

void CodeGenFunction::EmitInvariantStart ( llvm::Constant * Addr,
CharUnits Size )

◆ EmitIvarOffset()

llvm::Value * CodeGenFunction::EmitIvarOffset ( const ObjCInterfaceDecl * Interface,
const ObjCIvarDecl * Ivar )

Definition at line 6329 of file CGExpr.cpp.

References CGM, and clang::Interface.

Referenced by EmitIvarOffsetAsPointerDiff().

◆ EmitIvarOffsetAsPointerDiff()

llvm::Value * CodeGenFunction::EmitIvarOffsetAsPointerDiff ( const ObjCInterfaceDecl * Interface,
const ObjCIvarDecl * Ivar )

◆ EmitKCFIOperandBundle()

void CodeGenFunction::EmitKCFIOperandBundle ( const CGCallee & Callee,
SmallVectorImpl< llvm::OperandBundleDef > & Bundles )

◆ EmitLabel()

◆ EmitLabelStmt()

void CodeGenFunction::EmitLabelStmt ( const LabelStmt & S)

◆ EmitLambdaBlockInvokeBody()

◆ EmitLambdaDelegatingInvokeBody()

◆ EmitLambdaInAllocaCallOpBody()

◆ EmitLambdaInAllocaImplFn()

◆ EmitLambdaStaticInvokeBody()

◆ EmitLambdaVLACapture()

void clang::CodeGen::CodeGenFunction::EmitLambdaVLACapture ( const VariableArrayType * VAT,
LValue LV )
inline

◆ EmitLandingPad()

◆ EmitLifetimeEnd()

void CodeGenFunction::EmitLifetimeEnd ( llvm::Value * Addr)

◆ EmitLifetimeStart()

bool CodeGenFunction::EmitLifetimeStart ( llvm::Value * Addr)

Emit a lifetime.begin marker if some criteria are satisfied.

Returns
whether the marker was emitted.

Definition at line 1357 of file CGDecl.cpp.

References clang::Addr, Builder, clang::C, and CGM.

Referenced by EmitAutoVarAlloca(), EmitBuiltinExpr(), EmitCall(), EmitHLSLOutArgExpr(), EmitMaterializeTemporaryExpr(), and clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr().

◆ EmitLoadOfAnyValue()

◆ EmitLoadOfBitfieldLValue()

◆ EmitLoadOfComplex()

ComplexPairTy CodeGenFunction::EmitLoadOfComplex ( LValue src,
SourceLocation loc )

EmitLoadOfComplex - Load a complex number from the specified l-value.

EmitLoadOfComplex - Load a complex number from the specified address.

Definition at line 1513 of file CGExprComplex.cpp.

Referenced by convertTempToRValue(), EmitComplexPrePostIncDec(), EmitFunctionEpilog(), emitInitWithReductionInitializer(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitLoadOfAnyValue(), EmitRValueForField(), generateObjCGetterBody(), and InitCatchParam().

◆ EmitLoadOfCountedByField()

llvm::Value * CodeGenFunction::EmitLoadOfCountedByField ( const Expr * Base,
const FieldDecl * FAMDecl,
const FieldDecl * CountDecl )

Build an expression accessing the "counted_by" field.

This method is typically called in contexts where we can't generate side-effects, like in __builtin_dynamic_object_size.

When finding expressions, only choose those that have either already been emitted or can be loaded without side-effects.

  • FAMDecl: the Decl for the flexible array member. It may not be within the top-level struct.
  • CountDecl: must be within the same non-anonymous struct as FAMDecl.

Definition at line 1228 of file CGExpr.cpp.

References Builder, ConvertType(), GetCountedByFieldExprGEP(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), and clang::ValueDecl::getType().

Referenced by GetCountFieldAndIndex().

◆ EmitLoadOfExtVectorElementLValue()

◆ EmitLoadOfGlobalRegLValue()

RValue CodeGenFunction::EmitLoadOfGlobalRegLValue ( LValue LV)

◆ EmitLoadOfLValue()

RValue CodeGenFunction::EmitLoadOfLValue ( LValue V,
SourceLocation Loc )

EmitLoadOfLValue - Given an expression that represents a value lvalue, this method emits the address of the lvalue, then loads the result as an rvalue, returning the rvalue.

Definition at line 2336 of file CGExpr.cpp.

References Builder, clang::Type::castAs(), CGM, EmitARCLoadWeak(), EmitARCLoadWeakRetained(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), EmitLoadOfMatrixLValue(), EmitLoadOfScalar(), EmitObjCConsumeObject(), EmitPointerAuthUnqualify(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), getLangOpts(), clang::CodeGen::LValue::getMatrixAddress(), clang::CodeGen::LValue::getMatrixIdx(), clang::Qualifiers::getObjCLifetime(), clang::Qualifiers::getPointerAuth(), clang::CodeGen::LValue::getQuals(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddress(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::LValue::isBitField(), clang::Type::isConstantMatrixType(), clang::CodeGen::LValue::isExtVectorElt(), clang::Type::isFunctionType(), clang::CodeGen::LValue::isGlobalReg(), clang::CodeGen::LValue::isMatrixElt(), clang::CodeGen::LValue::isObjCWeak(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::isVolatileQualified(), clang::Qualifiers::OCL_Weak, and clang::Qualifiers::removePointerAuth().

Referenced by EmitAtomicUpdateValue(), EmitCapturedLocals(), emitInitWithReductionInitializer(), EmitLoadOfAnyValue(), EmitLoadOfLValue(), EmitOMPAtomicSimpleUpdateExpr(), EmitRValueForField(), emitScalarConstant(), emitSimpleAtomicLoad(), emitWritebackArg(), GenerateCapturedStmtFunction(), generateObjCGetterBody(), StartFunction(), tryEmitARCRetainLoadOfScalar(), and tryEmitARCRetainLoadOfScalar().

◆ EmitLoadOfPointer()

Address CodeGenFunction::EmitLoadOfPointer ( Address Ptr,
const PointerType * PtrTy,
LValueBaseInfo * BaseInfo = nullptr,
TBAAAccessInfo * TBAAInfo = nullptr )

Load a pointer with type PtrTy stored at address Ptr.

Note that PtrTy is the type of the loaded pointer, not the addresses it is loaded from.

Definition at line 3039 of file CGExpr.cpp.

References clang::Addr, Builder, and makeNaturalAddressForPointer().

Referenced by emitDeclTargetVarDeclLValue(), EmitLoadOfPointerLValue(), EmitOMPUseDeviceAddrClause(), emitOutlinedFunctionPrologue(), emitReduceCombFunction(), emitReduceFiniFunction(), and emitReduceInitFunction().

◆ EmitLoadOfPointerLValue()

◆ EmitLoadOfReference()

◆ EmitLoadOfReferenceLValue() [1/2]

LValue clang::CodeGen::CodeGenFunction::EmitLoadOfReferenceLValue ( Address RefAddr,
QualType RefTy,
AlignmentSource Source = AlignmentSource::Type )
inline

◆ EmitLoadOfReferenceLValue() [2/2]

◆ EmitLoadOfScalar() [1/3]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitLoadOfScalar ( Address Addr,
bool Volatile,
QualType Ty,
SourceLocation Loc,
AlignmentSource Source = AlignmentSource::Type,
bool isNontemporal = false )
inline

EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.

Definition at line 4305 of file CodeGenFunction.h.

References clang::Addr, CGM, EmitLoadOfScalar(), and clang::CodeGen::Type.

Referenced by castValueToType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), convertTempToRValue(), EmitARCStoreStrong(), EmitARCStoreStrong(), EmitCfiCheckFail(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitDistributeParallelForDispatchBounds(), emitDistributeParallelForInnerBounds(), EmitFunctionEpilog(), EmitFunctionProlog(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalFinalUpdate(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitLoadOfLValue(), EmitLoadOfMatrixLValue(), emitLoadOfOrigPointerRValue(), EmitLoadOfScalar(), EmitLoadOfScalar(), EmitNontemporalLoad(), EmitObjCCollectionLiteral(), EmitOMPDistributeLoop(), EmitOMPFirstprivateClause(), EmitOMPTaskLoopBasedDirective(), EmitOMPWorksharingLoop(), emitOutlinedFunctionPrologue(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), EmitRValueForField(), EmitScalarInit(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), emitWriteback(), GenerateOpenMPCapturedStmtFunction(), GenerateOpenMPCapturedVars(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), InitCatchParam(), LoadObjCSelf(), LoadPassedObjectSize(), and processInReduction().

◆ EmitLoadOfScalar() [2/3]

◆ EmitLoadOfScalar() [3/3]

llvm::Value * CodeGenFunction::EmitLoadOfScalar ( LValue lvalue,
SourceLocation Loc )

EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.

The l-value must be a simple l-value.

Definition at line 1977 of file CGExpr.cpp.

References EmitLoadOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isNontemporal(), and clang::CodeGen::LValue::isVolatile().

◆ EmitLValue()

LValue CodeGenFunction::EmitLValue ( const Expr * E,
KnownNonNull_t IsKnownNonNull = NotKnownNonNull )

EmitLValue - Emit code to compute a designator that specifies the location of the expression.

This can return one of two things: a simple address or a bitfield reference. In either case, the LLVM Value* in the LValue structure is guaranteed to be an LLVM pointer type.

If this returns a bitfield reference, nothing about the pointee type of the LLVM value is known: For example, it may not be a pointer to an integer.

If this returns a normal address, and if the lvalue's C type is fixed size, this method guarantees that the returned pointer type will point to an LLVM type of the same size of the lvalue's type. If the lvalue has a variable length type, this is not possible.

Definition at line 1631 of file CGExpr.cpp.

References CGM, clang::Expr::getExprLoc(), clang::CodeGen::LValue::isKnownNonNull(), and clang::CodeGen::LValue::setKnownNonNull().

Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitARCStoreUnsafeUnretained(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitArrayToPointerDecay(), EmitAsmStmt(), EmitBinaryOperatorLValue(), EmitBPFBuiltinExpr(), EmitBuiltinExpr(), EmitCallArg(), EmitCallee(), EmitCastLValue(), EmitCheckedLValue(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXPseudoDestructorExpr(), EmitDeclRefLValue(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitDistributeParallelForDistributeInnerBoundParams(), emitDistributeParallelForInnerBounds(), EmitExtVectorElementExpr(), EmitHLSLArrayAssignLValue(), EmitHLSLOutArgLValues(), EmitIgnoredExpr(), EmitInitListLValue(), clang::CodeGen::CGHLSLRuntime::emitInitListOpaqueValues(), EmitLValueOrThrowExpression(), EmitMatrixSubscriptExpr(), EmitMSVAListRef(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExpr(), emitOMPAtomicCaptureExpr(), emitOMPAtomicCompareExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), EmitOMPCanonicalLoop(), EmitOMPCopyinClause(), EmitOMPDepobjDirective(), EmitOMPFirstprivateClause(), EmitOMPHelperVar(), EmitOMPInteropDirective(), EmitOMPLastprivateClauseInit(), EmitOMPLinearClauseFinal(), EmitOMPPrivateLoopCounters(), EmitOMPScanDirective(), EmitOMPSharedLValue(), EmitOMPSimdFinal(), emitOMPSimdRegion(), EmitOMPWorksharingLoop(), EmitPointerToDataMemberBinaryExpr(), EmitPointerWithAlignment(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), emitPrivatesInit(), emitPseudoObjectExpr(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), EmitReferenceBindingToExpr(), emitScanBasedDirectiveFinals(), EmitSimpleOMPExecutableDirective(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), emitStructSetterCall(), emitSuspendExpression(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), EmitTypeidFromVTable(), EmitUnaryOpLValue(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), EmitVAListRef(), emitWritebackArg(), GenerateOpenMPCapturedVars(), GetCountedByFieldExprGEP(), getOrCreateOpaqueLValueMapping(), getPointerAndSize(), processInReduction(), tryEmitARCCopyWeakInit(), and tryEmitARCRetainLoadOfScalar().

◆ EmitLValueForField()

LValue CodeGenFunction::EmitLValueForField ( LValue Base,
const FieldDecl * Field,
bool IsInBounds = true )

Definition at line 5252 of file CGExpr.cpp.

References clang::CodeGen::TBAAAccessInfo::AccessType, clang::Qualifiers::addCVRQualifiers(), clang::Addr, clang::Qualifiers::addVolatile(), clang::CodeGen::TBAAAccessInfo::BaseType, Builder, CGM, emitAddrOfFieldStorage(), EmitFieldAnnotations(), EmitLoadOfReference(), emitPreserveStructAccess(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::ASTContext::getCharWidth(), getContext(), getDebugInfo(), getDebugInfoFIndex(), clang::CodeGen::Address::getElementType(), clang::CodeGen::getFieldAlignmentSource(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), getLLVMContext(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::Decl::getLocation(), clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCGCAttr(), clang::CodeGen::CGDebugInfo::getOrCreateRecordType(), clang::CodeGen::CGDebugInfo::getOrCreateStandaloneType(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::LValue::getVRQualifiers(), hasAnyVptr(), clang::Decl::hasAttr(), hasBPFPreserveStaticOffset(), isAAPCS(), clang::FieldDecl::isBitField(), IsInPreservedAIRegion, clang::CodeGen::TBAAAccessInfo::isMayAlias(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::Type::isVectorType(), clang::QualType::isVolatileQualified(), MakeAddrLValue(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::TBAAAccessInfo::Offset, clang::Qualifiers::removeObjCGCAttr(), clang::CodeGen::TBAAAccessInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageSize, clang::Qualifiers::Volatile, clang::CodeGen::CGBitFieldInfo::VolatileStorageOffset, clang::CodeGen::CGBitFieldInfo::VolatileStorageSize, clang::Qualifiers::Weak, clang::QualType::withCVRQualifiers(), clang::CodeGen::Address::withElementType(), and wrapWithBPFPreserveStaticOffset().

Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), emitDestructorsFunction(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), EmitLValueForFieldInitialization(), EmitLValueForLambdaField(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), emitPrivatesInit(), emitProxyTaskFunction(), EmitRValueForField(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), GenerateCapturedStmtFunction(), and clang::CodeGen::CGOpenMPRuntime::getDepobjElements().

◆ EmitLValueForFieldInitialization()

LValue CodeGenFunction::EmitLValueForFieldInitialization ( LValue Base,
const FieldDecl * Field )

EmitLValueForFieldInitialization - Like EmitLValueForField, except that if the Field is a reference, this will return the address of the reference and not the address of the value stored in the reference.

Definition at line 5426 of file CGExpr.cpp.

References CGM, ConvertTypeForMem(), emitAddrOfFieldStorage(), EmitLValueForField(), clang::CodeGen::getFieldAlignmentSource(), getLangOpts(), clang::Type::isReferenceType(), MakeAddrLValue(), and V.

Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), EmitLValueForAnyFieldInitialization(), EmitMemberInitializer(), and InitCapturedStruct().

◆ EmitLValueForIvar()

LValue CodeGenFunction::EmitLValueForIvar ( QualType ObjectTy,
llvm::Value * Base,
const ObjCIvarDecl * Ivar,
unsigned CVRQualifiers )

◆ EmitLValueForLambdaField() [1/2]

LValue CodeGenFunction::EmitLValueForLambdaField ( const FieldDecl * Field)

◆ EmitLValueForLambdaField() [2/2]

◆ EmitMaterializeTemporaryExpr()

LValue CodeGenFunction::EmitMaterializeTemporaryExpr ( const MaterializeTemporaryExpr * E)

Definition at line 507 of file CGExpr.cpp.

References clang::Block, Builder, clang::cast(), CGM, ConvertTypeForMem(), createReferenceTemporary(), clang::CodeGen::Decl, clang::SubobjectAdjustment::DerivedToBaseAdjustment, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), EmitAnyExprToMem(), EmitCXXMemberDataPointerAddress(), EmitIgnoredExpr(), EmitLifetimeStart(), EmitLValueForField(), EmitOpaqueValueLValue(), EmitScalarExpr(), EmitScalarInit(), clang::SubobjectAdjustment::FieldAdjustment, clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::LValue::getAddress(), GetAddressOfBaseClass(), getEvaluationKind(), clang::Expr::getExprLoc(), clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::QualType::getObjCLifetime(), clang::CodeGen::RawAddress::getPointer(), clang::QualType::getPointerAuth(), clang::QualType::getQualifiers(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::getStartingBlock(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::MaterializeTemporaryExpr::getSubExpr(), clang::Expr::getType(), inSuspendBlock(), clang::CodeGen::Address::invalid(), clang::isa(), clang::CodeGen::AggValueSlot::IsDestructed, clang::QualType::isDestructedType(), isInConditionalBranch(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::LValue::isSimple(), MakeAddrLValue(), MakeRawAddrLValue(), clang::SubobjectAdjustment::MemberPointerAdjustment, clang::CodeGen::NormalEHLifetimeMarker, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, pushCleanupAfterFullExpr(), pushFullExprCleanup(), pushTemporaryCleanup(), SanOpts, clang::SD_Automatic, clang::SD_FullExpression, clang::Expr::skipRValueSubobjectAdjustments(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Scalar, and clang::QualType::withoutLocalFastQualifiers().

◆ EmitMatrixIndexExpr()

llvm::Value * CodeGenFunction::EmitMatrixIndexExpr ( const Expr * E)

◆ EmitMatrixSubscriptExpr()

◆ EmitMemberExpr()

◆ EmitMSVAListRef()

Address CodeGenFunction::EmitMSVAListRef ( const Expr * E)

Emit a "reference" to a __builtin_ms_va_list; this is always the value of the expression, because a __builtin_ms_va_list is a pointer to a char.

Definition at line 2618 of file CodeGenFunction.cpp.

References EmitLValue(), and clang::CodeGen::LValue::getAddress().

Referenced by EmitBuiltinExpr(), and EmitVAArg().

◆ EmitMSVCBuiltinExpr()

Value * CodeGenFunction::EmitMSVCBuiltinExpr ( MSVCIntrin BuiltinID,
const CallExpr * E )

Definition at line 1843 of file CGBuiltin.cpp.

References __fastfail, _BitScanForward, _BitScanReverse, _InterlockedAnd, _InterlockedAnd_acq, _InterlockedAnd_nf, _InterlockedAnd_rel, _InterlockedCompareExchange, _InterlockedCompareExchange128, _InterlockedCompareExchange128_acq, _InterlockedCompareExchange128_nf, _InterlockedCompareExchange128_rel, _InterlockedCompareExchange_acq, _InterlockedCompareExchange_nf, _InterlockedCompareExchange_rel, _InterlockedDecrement, _InterlockedDecrement_acq, _InterlockedDecrement_nf, _InterlockedDecrement_rel, _InterlockedExchange, _InterlockedExchange_acq, _InterlockedExchange_nf, _InterlockedExchange_rel, _InterlockedExchangeAdd, _InterlockedExchangeAdd_acq, _InterlockedExchangeAdd_nf, _InterlockedExchangeAdd_rel, _InterlockedExchangeSub, _InterlockedIncrement, _InterlockedIncrement_acq, _InterlockedIncrement_nf, _InterlockedIncrement_rel, _InterlockedOr, _InterlockedOr_acq, _InterlockedOr_nf, _InterlockedOr_rel, _InterlockedXor, _InterlockedXor_acq, _InterlockedXor_nf, _InterlockedXor_rel, clang::Asm, Builder, clang::cast(), CGM, ConvertType(), createBasicBlock(), CurFn, EmitAtomicCmpXchg128ForMSIntrin(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), EmitAtomicIncrementValue(), EmitPointerWithAlignment(), EmitScalarExpr(), ErrorUnsupported(), clang::Function, clang::CallExpr::getArg(), clang::CodeGen::Address::getElementType(), getLLVMContext(), getTarget(), clang::TargetInfo::getTriple(), clang::Expr::getType(), clang::Value::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, MakeBinaryAtomicValue(), clang::Result, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by EmitAArch64BuiltinExpr(), EmitARMBuiltinExpr(), EmitBuiltinExpr(), and EmitX86BuiltinExpr().

◆ EmitMultiVersionResolver()

void CodeGenFunction::EmitMultiVersionResolver ( llvm::Function * Resolver,
ArrayRef< FMVResolverOption > Options )

◆ EmitMustTailThunk()

void CodeGenFunction::EmitMustTailThunk ( GlobalDecl GD,
llvm::Value * AdjustedThisPtr,
llvm::FunctionCallee Callee )

◆ EmitNeonCall()

Value * CodeGenFunction::EmitNeonCall ( llvm::Function * F,
SmallVectorImpl< llvm::Value * > & O,
const char * name,
unsigned shift = 0,
bool rightshift = false )

◆ EmitNeonRShiftImm()

Value * CodeGenFunction::EmitNeonRShiftImm ( llvm::Value * Vec,
llvm::Value * Amt,
llvm::Type * Ty,
bool usgn,
const char * name )

◆ EmitNeonShiftVector()

Value * CodeGenFunction::EmitNeonShiftVector ( llvm::Value * V,
llvm::Type * Ty,
bool negateForRightShift )

Definition at line 489 of file ARM.cpp.

References clang::cast(), and V.

Referenced by EmitARMBuiltinExpr(), EmitCommonNeonBuiltinExpr(), EmitNeonCall(), and EmitNeonRShiftImm().

◆ EmitNeonSplat() [1/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitNeonSplat ( llvm::Value * V,
llvm::Constant * Idx )

References V.

◆ EmitNeonSplat() [2/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitNeonSplat ( llvm::Value * V,
llvm::Constant * Idx,
const llvm::ElementCount & Count )

References V.

Referenced by EmitAArch64BuiltinExpr(), and EmitCommonNeonBuiltinExpr().

◆ EmitNewArrayInitializer()

void CodeGenFunction::EmitNewArrayInitializer ( const CXXNewExpr * E,
QualType elementType,
llvm::Type * ElementTy,
Address NewPtr,
llvm::Value * NumElements,
llvm::Value * AllocSizeWithoutCookie )

Definition at line 998 of file CGExprCXX.cpp.

References clang::CharUnits::alignmentAtOffset(), clang::CharUnits::alignmentOfArrayElement(), Builder, clang::cast(), CGM, ConvertTypeForMem(), createBasicBlock(), CreateTempAlloca(), DeferredDeactivationCleanupStack, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EHStack, EmitAggExpr(), EmitBlock(), EmitCXXAggrConstructorCall(), clang::CodeGen::Address::emitRawPointer(), clang::RecordDecl::fields(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::CodeGenFunction::CleanupDeactivationScope::ForceDeactivate(), clang::CodeGen::Address::getAlignment(), clang::CXXNewExpr::getAllocatedType(), clang::CXXParenListInitExpr::getArrayFiller(), clang::InitListExpr::getArrayFiller(), clang::Type::getAsArrayTypeUnsafe(), clang::Type::getAsCanonical(), clang::ASTContext::getConstantArrayElementCount(), getContext(), clang::RecordDecl::getDefinitionOrSelf(), getDestroyer(), clang::CodeGen::Address::getElementType(), clang::InitListExpr::getInit(), clang::CXXParenListInitExpr::getInitExprs(), clang::CXXNewExpr::getInitializer(), clang::InitListExpr::getNumInits(), clang::CXXMethodDecl::getParent(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::QualType::getQualifiers(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CXXNewExpr::hasInitializer(), clang::Init, clang::InitListExpr::inits(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Address::invalid(), clang::isa(), clang::CodeGen::AggValueSlot::IsDestructed, clang::QualType::isDestructedType(), clang::CXXRecordDecl::isEmpty(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked, clang::InitListExpr::isStringLiteralInit(), clang::FunctionDecl::isTrivial(), clang::CodeGen::Address::isValid(), needsEHCleanup(), pushIrregularPartialArrayCleanup(), pushRegularPartialArrayCleanup(), StoreAnyExprIntoOneUnit(), and clang::CodeGen::Address::withElementType().

Referenced by EmitNewInitializer().

◆ EmitNonNullArgCheck() [1/2]

void CodeGenFunction::EmitNonNullArgCheck ( Address Addr,
QualType ArgType,
SourceLocation ArgLoc,
AbstractCallee AC,
unsigned ParmNum )

◆ EmitNonNullArgCheck() [2/2]

◆ EmitNonNullRValueCheck()

llvm::Value * CodeGenFunction::EmitNonNullRValueCheck ( RValue RV,
QualType T )

Create a check that a scalar RValue is non-null.

Definition at line 1525 of file CGExpr.cpp.

References Builder, CGM, clang::CodeGen::RValue::getScalarVal(), clang::T, and V.

Referenced by EmitNonNullArgCheck().

◆ EmitNoreturnRuntimeCallOrInvoke()

void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke ( llvm::FunctionCallee callee,
ArrayRef< llvm::Value * > args )

Emits a call or invoke to the given noreturn runtime function.

Definition at line 5032 of file CGCall.cpp.

References Builder, getBundlesForFunclet(), getInvokeDest(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), and getUnreachableBlock().

Referenced by ExitCXXTryStmt().

◆ EmitNounwindRuntimeCall() [1/3]

llvm::CallInst * clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall ( llvm::FunctionCallee callee,
ArrayRef< Address > args,
const Twine & name = "" )

◆ EmitNounwindRuntimeCall() [2/3]

llvm::CallInst * clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall ( llvm::FunctionCallee callee,
ArrayRef< llvm::Value * > args,
const Twine & name = "" )

◆ EmitNounwindRuntimeCall() [3/3]

◆ EmitNullabilityCheck()

void CodeGenFunction::EmitNullabilityCheck ( LValue LHS,
llvm::Value * RHS,
SourceLocation Loc )

Given an assignment *LHS = RHS, emit a test that checks if RHS is nonnull, if LHS is marked _Nonnull.

Definition at line 764 of file CGDecl.cpp.

References Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), clang::Type::getNullability(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenTypeCache::Int8Ty, IsNotNull, clang::NonNull, SanOpts, and TCK_NonnullAssign.

Referenced by EmitBinaryOperatorLValue(), and EmitScalarInit().

◆ EmitNullInitialization()

◆ EmitNVPTXBuiltinExpr()

◆ EmitNVPTXDevicePrintfCallExpr()

RValue CodeGenFunction::EmitNVPTXDevicePrintfCallExpr ( const CallExpr * E)

Definition at line 152 of file CGGPUBuiltin.cpp.

References CGM, and getTarget().

Referenced by EmitBuiltinExpr().

◆ EmitObjCAlloc()

llvm::Value * CodeGenFunction::EmitObjCAlloc ( llvm::Value * value,
llvm::Type * resultType )

Allocate the given objc object.

call i8* @objc_alloc(i8* value)

Definition at line 2789 of file CGObjC.cpp.

References CGM, and emitObjCValueOperation().

Referenced by tryGenerateSpecializedMessageSend().

◆ EmitObjCAllocInit()

llvm::Value * CodeGenFunction::EmitObjCAllocInit ( llvm::Value * value,
llvm::Type * resultType )

Definition at line 2805 of file CGObjC.cpp.

References CGM, and emitObjCValueOperation().

Referenced by tryEmitSpecializedAllocInit().

◆ EmitObjCAllocWithZone()

llvm::Value * CodeGenFunction::EmitObjCAllocWithZone ( llvm::Value * value,
llvm::Type * resultType )

Allocate the given objc object.

call i8* @objc_allocWithZone(i8* value)

Definition at line 2798 of file CGObjC.cpp.

References CGM, and emitObjCValueOperation().

Referenced by tryGenerateSpecializedMessageSend().

◆ EmitObjCArrayLiteral()

llvm::Value * CodeGenFunction::EmitObjCArrayLiteral ( const ObjCArrayLiteral * E)

◆ EmitObjCAtSynchronizedStmt()

void CodeGenFunction::EmitObjCAtSynchronizedStmt ( const ObjCAtSynchronizedStmt & S)

Definition at line 2133 of file CGObjC.cpp.

References CGM.

Referenced by EmitStmt().

◆ EmitObjCAtThrowStmt()

void CodeGenFunction::EmitObjCAtThrowStmt ( const ObjCAtThrowStmt & S)

Definition at line 2129 of file CGObjC.cpp.

References CGM.

Referenced by EmitStmt().

◆ EmitObjCAtTryStmt()

void CodeGenFunction::EmitObjCAtTryStmt ( const ObjCAtTryStmt & S)

Definition at line 2125 of file CGObjC.cpp.

References CGM.

Referenced by EmitStmt().

◆ EmitObjCAutorelease()

llvm::Value * CodeGenFunction::EmitObjCAutorelease ( llvm::Value * value,
llvm::Type * returnType )

Autorelease the given object.

call i8* @objc_autorelease(i8* value)

Definition at line 2848 of file CGObjC.cpp.

References CGM, and emitObjCValueOperation().

Referenced by tryGenerateSpecializedMessageSend().

◆ EmitObjCAutoreleasePoolCleanup()

void CodeGenFunction::EmitObjCAutoreleasePoolCleanup ( llvm::Value * Ptr)

Definition at line 2916 of file CGObjC.cpp.

References CGM, EHStack, and clang::CodeGen::NormalCleanup.

Referenced by GenerateCXXGlobalInitFunc().

◆ EmitObjCAutoreleasePoolPop()

void CodeGenFunction::EmitObjCAutoreleasePoolPop ( llvm::Value * value)

Produce the code to do a primitive release.

call void @objc_autoreleasePoolPop(i8* ptr)

Definition at line 2734 of file CGObjC.cpp.

References Builder, CGM, EmitRuntimeCall(), EmitRuntimeCallOrInvoke(), getARCIntrinsic(), getInvokeDest(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and setARCRuntimeFunctionLinkage().

◆ EmitObjCAutoreleasePoolPush()

llvm::Value * CodeGenFunction::EmitObjCAutoreleasePoolPush ( )

Produce the code to do a objc_autoreleasepool_push.

call i8* @objc_autoreleasePoolPush(void)

Definition at line 2724 of file CGObjC.cpp.

References CGM, EmitNounwindRuntimeCall(), and getARCIntrinsic().

Referenced by EmitObjCAutoreleasePoolStmt(), and GenerateCXXGlobalInitFunc().

◆ EmitObjCAutoreleasePoolStmt()

◆ EmitObjCBoxedExpr()

◆ EmitObjCCollectionLiteral()

◆ EmitObjCConsumeObject()

llvm::Value * CodeGenFunction::EmitObjCConsumeObject ( QualType type,
llvm::Value * object )

Produce the code for a CK_ARCConsumeObject.

Does a primitive release at the end of the full-expression.

Definition at line 2152 of file CGObjC.cpp.

References getARCCleanupKind(), pushFullExprCleanup(), and clang::ast_matchers::type.

Referenced by emitARCCopyAssignWeak(), EmitARCExtendBlockObject(), emitARCMoveAssignWeak(), EmitARCReclaimReturnedObject(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitLoadOfLValue(), and EmitObjCForCollectionStmt().

◆ EmitObjCDictionaryLiteral()

llvm::Value * CodeGenFunction::EmitObjCDictionaryLiteral ( const ObjCDictionaryLiteral * E)

◆ EmitObjCEncodeExprLValue()

LValue CodeGenFunction::EmitObjCEncodeExprLValue ( const ObjCEncodeExpr * E)

Definition at line 3496 of file CGExpr.cpp.

References CGM, clang::CodeGen::Decl, clang::Expr::getType(), and MakeAddrLValue().

◆ EmitObjCExtendObjectLifetime()

llvm::Value * CodeGenFunction::EmitObjCExtendObjectLifetime ( QualType T,
llvm::Value * Ptr )

Definition at line 2160 of file CGObjC.cpp.

References EmitARCRetainAutorelease(), and clang::ast_matchers::type.

Referenced by EmitStoreThroughLValue().

◆ EmitObjCForCollectionStmt()

void CodeGenFunction::EmitObjCForCollectionStmt ( const ObjCForCollectionStmt & S)

Definition at line 1804 of file CGObjC.cpp.

References clang::CodeGen::CallArgList::add(), Builder, clang::C, clang::cast(), CGM, ConvertType(), createBasicBlock(), CreateMemTemp(), EmitARCRetainScalarExpr(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBlock(), EmitCall(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockEnd(), clang::CodeGen::CGDebugInfo::EmitLexicalBlockStart(), EmitLValue(), EmitNullInitialization(), EmitObjCConsumeObject(), EmitScalarExpr(), EmitStmt(), EmitStoreThroughLValue(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::Type::getAsObjCInterfacePointerType(), clang::SourceRange::getBegin(), clang::ObjCForCollectionStmt::getBeginLoc(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::ObjCForCollectionStmt::getBody(), clang::ObjCForCollectionStmt::getCollection(), clang::ASTContext::getConstantArrayType(), getContext(), getCurrentProfileCount(), getDebugInfo(), clang::ObjCInterfaceType::getDecl(), clang::ObjCForCollectionStmt::getElement(), clang::SourceRange::getEnd(), clang::ObjCObjectPointerType::getInterfaceType(), getJumpDestInCurrentScope(), getLangOpts(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), getProfileCount(), clang::CodeGen::LValue::getQuals(), clang::CodeGen::RValue::getScalarVal(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::GetUnarySelector(), incrementProfileCounter(), clang::CodeGen::CodeGenFunction::AutoVarEmission::invalid(), clang::VarDecl::isARCPseudoStrong(), clang::Normal, clang::Qualifiers::OCL_ExplicitNone, SanOpts, clang::Qualifiers::setObjCLifetime(), V, clang::VK_LValue, and clang::CodeGen::CodeGenTypeCache::VoidTy.

Referenced by EmitStmt().

◆ EmitObjCIsaExpr()

◆ EmitObjCIvarRefLValue()

◆ EmitObjCMessageExpr()

RValue CodeGenFunction::EmitObjCMessageExpr ( const ObjCMessageExpr * E,
ReturnValueSlot Return = ReturnValueSlot() )

Definition at line 573 of file CGObjC.cpp.

References AdjustObjCObjectType(), clang::ObjCMessageExpr::arguments(), Builder, clang::cast(), clang::Type::castAs(), CGM, clang::ObjCMessageExpr::Class, CurCodeDecl, CurFuncDecl, EmitARCLoadWeakRetained(), EmitARCRetainAutorelease(), EmitARCRetainNonBlock(), EmitCallArgs(), EmitLValue(), EmitScalarExpr(), findWeakLValue(), clang::CodeGen::CGObjCRuntime::GenerateMessageSendSuper(), clang::CodeGen::CGObjCRuntime::GeneratePossiblySpecializedMessageSend(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMessageExpr::getClassReceiver(), clang::Decl::getDeclContext(), clang::CodeGen::Address::getElementType(), clang::ObjCMessageExpr::getInstanceReceiver(), getLangOpts(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMethodDecl::getMethodFamily(), getNullForVariable(), clang::ObjCMessageExpr::getReceiverKind(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMessageExpr::getSuperType(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::ObjCMessageExpr::Instance, clang::isa(), clang::ObjCMessageExpr::isDelegateInitCall(), clang::Type::isObjCClassType(), LoadObjCSelf(), clang::OMF_retain, shouldExtendReceiverForInnerPointerMessage(), clang::ObjCMessageExpr::SuperClass, clang::ObjCMessageExpr::SuperInstance, tryEmitARCRetainScalarExpr(), and tryEmitSpecializedAllocInit().

Referenced by EmitObjCMessageExprLValue().

◆ EmitObjCMessageExprLValue()

◆ EmitObjCMRRAutoreleasePoolPop()

void CodeGenFunction::EmitObjCMRRAutoreleasePoolPop ( llvm::Value * Arg)

Produce the code to do a primitive release.

[tmp drain];

Definition at line 2814 of file CGObjC.cpp.

References CGM, getContext(), clang::SelectorTable::getSelector(), clang::ASTContext::Selectors, and clang::CodeGen::CodeGenTypeCache::VoidTy.

◆ EmitObjCMRRAutoreleasePoolPush()

llvm::Value * CodeGenFunction::EmitObjCMRRAutoreleasePoolPush ( )

Produce the code to do an MRR version objc_autoreleasepool_push.

Which is: [[NSAutoreleasePool alloc] init]; Where alloc is declared as: + (id) alloc; in NSAutoreleasePool class. init is declared as: - (id) init; in its NSObject super class.

Definition at line 2764 of file CGObjC.cpp.

References CGM, clang::CodeGen::CGObjCRuntime::EmitNSAutoreleasePoolClassRef(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), getContext(), clang::CodeGen::RValue::getScalarVal(), clang::SelectorTable::getSelector(), and clang::ASTContext::Selectors.

Referenced by EmitObjCAutoreleasePoolStmt().

◆ EmitObjCProtocolExpr()

llvm::Value * CodeGenFunction::EmitObjCProtocolExpr ( const ObjCProtocolExpr * E)

Definition at line 265 of file CGObjC.cpp.

References CGM, and clang::ObjCProtocolExpr::getProtocol().

◆ EmitObjCRelease()

void CodeGenFunction::EmitObjCRelease ( llvm::Value * value,
ARCPreciseLifetime_t precise )

Release the given object.

call void @objc_release(i8* value)

Definition at line 2867 of file CGObjC.cpp.

References clang::CodeGen::ARCImpreciseLifetime, Builder, CGM, EmitCallOrInvoke(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::isa(), and setARCRuntimeFunctionLinkage().

Referenced by tryGenerateSpecializedMessageSend().

◆ EmitObjCRetainNonBlock()

llvm::Value * CodeGenFunction::EmitObjCRetainNonBlock ( llvm::Value * value,
llvm::Type * returnType )

Retain the given object, with normal retain semantics.

call i8* @objc_retain(i8* value)

Definition at line 2858 of file CGObjC.cpp.

References CGM, and emitObjCValueOperation().

Referenced by tryGenerateSpecializedMessageSend().

◆ EmitObjCSelectorExpr()

llvm::Value * CodeGenFunction::EmitObjCSelectorExpr ( const ObjCSelectorExpr * E)

Emit a selector.

Definition at line 257 of file CGObjC.cpp.

References CGM, and clang::ObjCSelectorExpr::getSelector().

◆ EmitObjCSelectorLValue()

LValue CodeGenFunction::EmitObjCSelectorLValue ( const ObjCSelectorExpr * E)

◆ EmitObjCStringLiteral()

llvm::Value * CodeGenFunction::EmitObjCStringLiteral ( const ObjCStringLiteral * E)

Emits an instance of NSConstantString representing the object.

Definition at line 51 of file CGObjC.cpp.

References clang::C, CGM, and clang::ObjCStringLiteral::getString().

◆ EmitObjCThrowOperand()

llvm::Value * CodeGenFunction::EmitObjCThrowOperand ( const Expr * expr)

◆ EmitOMPAggregateAssign()

void CodeGenFunction::EmitOMPAggregateAssign ( Address DestAddr,
Address SrcAddr,
QualType OriginalType,
const llvm::function_ref< void(Address, Address)> CopyGen )

Perform element by element copying of arrays with type OriginalType from SrcAddr to DestAddr using copying procedure generated by CopyGen.

Parameters
DestAddrAddress of the destination array.
SrcAddrAddress of the source array.
OriginalTypeType of destination and source arrays.
CopyGenCopying procedure that copies value of single array element to another single array element.

Definition at line 769 of file CGStmtOpenMP.cpp.

References clang::CharUnits::alignmentOfArrayElement(), Builder, createBasicBlock(), emitArrayLength(), EmitBlock(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::Type::getAsArrayTypeUnsafe(), getContext(), clang::CodeGen::Address::getElementType(), clang::ASTContext::getTypeSizeInChars(), and clang::CodeGen::Address::withElementType().

Referenced by EmitOMPCopy(), EmitOMPFirstprivateClause(), and emitPrivatesInit().

◆ EmitOMPAssumeDirective()

void CodeGenFunction::EmitOMPAssumeDirective ( const OMPAssumeDirective & S)

Definition at line 8547 of file CGStmtOpenMP.cpp.

References EmitStmt().

Referenced by EmitStmt().

◆ EmitOMPAtomicDirective()

void CodeGenFunction::EmitOMPAtomicDirective ( const OMPAtomicDirective & S)

Definition at line 6816 of file CGStmtOpenMP.cpp.

References clang::C, CGM, emitOMPAtomicExpr(), and EmitStopPoint().

Referenced by EmitStmt().

◆ EmitOMPAtomicSimpleUpdateExpr()

std::pair< bool, RValue > CodeGenFunction::EmitOMPAtomicSimpleUpdateExpr ( LValue X,
RValue E,
BinaryOperatorKind BO,
bool IsXLHSInRHSPart,
llvm::AtomicOrdering AO,
SourceLocation Loc,
const llvm::function_ref< RValue(RValue)> CommonGen )

Emit atomic update code for constructs: X = X BO E or X = E BO E.

Parameters
XValue to be updated.
EUpdate value.
BOBinary operation for update operation.
IsXLHSInRHSParttrue if X is LHS in RHS part of the update expression, false otherwise.
AOAtomic ordering of the generated atomic instructions.
CommonGenCode generator for complex expressions that cannot be expressed through atomicrmw instruction.
Returns
<true, OldAtomicValue> if simple 'atomicrmw' instruction was generated, <false, RValue::get(nullptr)> otherwise.

Definition at line 6507 of file CGStmtOpenMP.cpp.

References EmitAtomicUpdate(), EmitLoadOfLValue(), emitOMPAtomicRMW(), EmitStoreThroughLValue(), clang::IsXLHSInRHSPart, and X.

Referenced by emitOMPAtomicCaptureExpr(), and emitOMPAtomicUpdateExpr().

◆ EmitOMPBarrierDirective()

void CodeGenFunction::EmitOMPBarrierDirective ( const OMPBarrierDirective & S)

Definition at line 5577 of file CGStmtOpenMP.cpp.

References CGM.

Referenced by EmitStmt().

◆ EmitOMPCancelDirective()

void CodeGenFunction::EmitOMPCancelDirective ( const OMPCancelDirective & S)

Definition at line 7473 of file CGStmtOpenMP.cpp.

References Builder, clang::C, CGM, EmitScalarExpr(), and OMPCancelDirective::getCancelRegion().

Referenced by EmitStmt().

◆ EmitOMPCancellationPointDirective()

void CodeGenFunction::EmitOMPCancellationPointDirective ( const OMPCancellationPointDirective & S)

Definition at line 7467 of file CGStmtOpenMP.cpp.

References CGM, and OMPCancellationPointDirective::getCancelRegion().

Referenced by EmitStmt().

◆ EmitOMPCanonicalLoop()

◆ EmitOMPCollapsedCanonicalLoopNest()

llvm::CanonicalLoopInfo * CodeGenFunction::EmitOMPCollapsedCanonicalLoopNest ( const Stmt * S,
int Depth )

Emit the Stmt S and return its topmost canonical loop, if any.

TODO: The Depth paramter is not yet implemented and must be 1. In the future it is meant to be the number of loops expected in the loop nests (usually specified by the "collapse" clause) that are collapsed to a single loop by this function.

Definition at line 2074 of file CGStmtOpenMP.cpp.

References EmitStmt(), ExpectedOMPLoopDepth, OMPLoopNestStack, and clang::Result.

Referenced by emitOMPForDirective(), and EmitOMPUnrollDirective().

◆ EmitOMPCopy()

void CodeGenFunction::EmitOMPCopy ( QualType OriginalType,
Address DestAddr,
Address SrcAddr,
const VarDecl * DestVD,
const VarDecl * SrcVD,
const Expr * Copy )

Emit proper copying of data from one variable to another.

Parameters
OriginalTypeOriginal type of the copied variables.
DestAddrDestination address.
SrcAddrSource address.
DestVDDestination variable used in CopyExpr (for arrays, has type of the base array element).
SrcVDSource variable used in CopyExpr (for arrays, has type of the base array element).
CopyActual copygin expression for copying data from SrcVD to DestVD.

Definition at line 834 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::Copy, EmitAggregateAssign(), EmitIgnoredExpr(), EmitOMPAggregateAssign(), clang::Type::isArrayType(), MakeAddrLValue(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().

Referenced by emitCopyprivateCopyFunction(), EmitOMPCopyinClause(), EmitOMPLastprivateClauseFinal(), EmitOMPScanDirective(), and emitScanBasedDirectiveFinals().

◆ EmitOMPCopyinClause()

bool CodeGenFunction::EmitOMPCopyinClause ( const OMPExecutableDirective & D)

Emit code for copyin clause in D directive.

The next code is generated at the start of outlined functions for directives:

threadprivate_var1 = master_threadprivate_var1;
operator=(threadprivate_var2, master_threadprivate_var2);
...
__kmpc_barrier(&loc, global_tid);
Parameters
DOpenMP directive possibly with 'copyin' clause(s).
Returns
true if at least one copyin variable is found, false otherwise.

Definition at line 1040 of file CGStmtOpenMP.cpp.

References Builder, clang::C, CapturedStmtInfo, clang::cast(), CGM, createBasicBlock(), EmitBlock(), EmitLValue(), EmitOMPCopy(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::LValue::getAddress(), clang::VarDecl::getCanonicalDecl(), getContext(), getLangOpts(), clang::ValueDecl::getType(), HaveInsertPoint(), clang::CodeGen::Address::invalid(), clang::VarDecl::isStaticLocal(), clang::CodeGen::Type, and clang::VK_LValue.

Referenced by emitOMPCopyinClause().

◆ EmitOMPCriticalDirective()

void CodeGenFunction::EmitOMPCriticalDirective ( const OMPCriticalDirective & S)

◆ EmitOMPDepobjDirective()

void CodeGenFunction::EmitOMPDepobjDirective ( const OMPDepobjDirective & S)

◆ EmitOMPDistributeDirective()

void CodeGenFunction::EmitOMPDistributeDirective ( const OMPDistributeDirective & S)

Definition at line 6126 of file CGStmtOpenMP.cpp.

References CGM, and emitOMPDistributeDirective().

Referenced by EmitStmt().

◆ EmitOMPDistributeLoop()

void CodeGenFunction::EmitOMPDistributeLoop ( const OMPLoopDirective & S,
const CodeGenLoopTy & CodeGenLoop,
Expr * IncExpr )

Emit code for the distribute loop-based directive.

Definition at line 5885 of file CGStmtOpenMP.cpp.

References Builder, clang::C, clang::cast(), CGM, clang::Cond, ConstantFoldsToSimpleInteger(), createBasicBlock(), emitAlignedClause(), EmitBlock(), EmitBranch(), emitCommonSimdLoop(), clang::CodeGen::CGOpenMPRuntime::emitDistributeStaticInit(), clang::CodeGen::CGOpenMPRuntime::emitForStaticFinish(), EmitIgnoredExpr(), EmitLoadOfScalar(), EmitOMPFirstprivateClause(), EmitOMPHelperVar(), EmitOMPInnerLoop(), EmitOMPLastprivateClauseFinal(), EmitOMPLastprivateClauseInit(), EmitOMPPrivateClause(), EmitOMPPrivateLoopCounters(), EmitOMPReductionClauseFinal(), EmitOMPReductionClauseInit(), EmitOMPSimdFinal(), EmitOMPSimdInit(), emitPostUpdateForReductionClause(), emitPreCond(), EmitScalarConversion(), EmitScalarExpr(), EmitVarDecl(), clang::CodeGen::LValue::getAddress(), getContext(), getJumpDestInCurrentScope(), getProfileCount(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Type::hasSignedIntegerRepresentation(), incrementProfileCounter(), clang::isOpenMPLoopBoundSharingDirective(), clang::isOpenMPParallelDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTargetExecutionDirective(), clang::isOpenMPTeamsDirective(), clang::CodeGen::CGOpenMPRuntime::isStaticChunked(), clang::CodeGen::CGOpenMPRuntime::isStaticNonchunked(), clang::OMPC_DIST_SCHEDULE_unknown, and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().

Referenced by emitOMPDistributeDirective(), EmitOMPDistributeParallelForDirective(), EmitOMPDistributeParallelForSimdDirective(), EmitOMPDistributeSimdDirective(), EmitOMPTeamsDistributeDirective(), EmitOMPTeamsDistributeParallelForDirective(), EmitOMPTeamsDistributeParallelForSimdDirective(), EmitOMPTeamsDistributeSimdDirective(), EmitOMPTeamsGenericLoopDirective(), emitTargetTeamsDistributeParallelForRegion(), emitTargetTeamsDistributeParallelForSimdRegion(), emitTargetTeamsDistributeRegion(), emitTargetTeamsDistributeSimdRegion(), emitTargetTeamsGenericLoopRegionAsDistribute(), and emitTargetTeamsGenericLoopRegionAsParallel().

◆ EmitOMPDistributeParallelForDirective()

void CodeGenFunction::EmitOMPDistributeParallelForDirective ( const OMPDistributeParallelForDirective & S)

Definition at line 3411 of file CGStmtOpenMP.cpp.

References CGM, emitInnerParallelForWhenCombined(), and EmitOMPDistributeLoop().

Referenced by EmitStmt().

◆ EmitOMPDistributeParallelForSimdDirective()

void CodeGenFunction::EmitOMPDistributeParallelForSimdDirective ( const OMPDistributeParallelForSimdDirective & S)

Definition at line 3421 of file CGStmtOpenMP.cpp.

References CGM, emitInnerParallelForWhenCombined(), and EmitOMPDistributeLoop().

Referenced by EmitStmt().

◆ EmitOMPDistributeSimdDirective()

void CodeGenFunction::EmitOMPDistributeSimdDirective ( const OMPDistributeSimdDirective & S)

Definition at line 3431 of file CGStmtOpenMP.cpp.

References CGM, EmitOMPDistributeLoop(), and emitOMPLoopBodyWithStopPoint().

Referenced by EmitStmt().

◆ EmitOMPErrorDirective()

void CodeGenFunction::EmitOMPErrorDirective ( const OMPErrorDirective & S)

◆ EmitOMPFirstprivateClause()

bool CodeGenFunction::EmitOMPFirstprivateClause ( const OMPExecutableDirective & D,
OMPPrivateScope & PrivateScope )

◆ EmitOMPFlushDirective()

void CodeGenFunction::EmitOMPFlushDirective ( const OMPFlushDirective & S)

Definition at line 5644 of file CGStmtOpenMP.cpp.

References CGM.

Referenced by EmitStmt().

◆ EmitOMPForDirective()

void CodeGenFunction::EmitOMPForDirective ( const OMPForDirective & S)

Definition at line 4162 of file CGStmtOpenMP.cpp.

References CGM, and emitOMPForDirective().

Referenced by EmitStmt().

◆ EmitOMPForSimdDirective()

void CodeGenFunction::EmitOMPForSimdDirective ( const OMPForSimdDirective & S)

◆ EmitOMPGenericLoopDirective()

◆ EmitOMPInnerLoop()

void CodeGenFunction::EmitOMPInnerLoop ( const OMPExecutableDirective & S,
bool RequiresCleanup,
const Expr * LoopCond,
const Expr * IncExpr,
const llvm::function_ref< void(CodeGenFunction &)> BodyGen,
const llvm::function_ref< void(CodeGenFunction &)> PostIncGen )

Emit inner loop of the worksharing/simd construct.

Parameters
SDirective, for which the inner loop must be emitted.
RequiresCleanuptrue, if directive has some associated private variables.
LoopCondBollean condition for loop continuation.
IncExprIncrement expression for loop control variable.
BodyGenGenerator for the inner body of the inner loop.
PostIncGenGenrator for post-increment code (required for ordered loop directvies).

Definition at line 2177 of file CGStmtOpenMP.cpp.

References clang::cast(), CGM, createBasicBlock(), EmitBlock(), EmitBranch(), EmitBranchOnBoolExpr(), EmitBranchThroughCleanup(), EmitIgnoredExpr(), clang::AttributedStmt::getAttrs(), clang::SourceRange::getBegin(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CapturedStmt::getCapturedStmt(), clang::SourceRange::getEnd(), getJumpDestInCurrentScope(), getProfileCount(), incrementProfileCounter(), LoopStack, OMPLoopNestStack, and SourceLocToDebugLoc().

Referenced by EmitOMPDistributeLoop(), emitOMPSimdRegion(), EmitOMPTaskLoopBasedDirective(), and EmitOMPWorksharingLoop().

◆ EmitOMPInterchangeDirective()

void CodeGenFunction::EmitOMPInterchangeDirective ( const OMPInterchangeDirective & S)

Definition at line 2940 of file CGStmtOpenMP.cpp.

References EmitStmt(), and OMPInterchangeDirective::getTransformedStmt().

Referenced by EmitStmt().

◆ EmitOMPInteropDirective()

◆ EmitOMPLastprivateClauseFinal()

void CodeGenFunction::EmitOMPLastprivateClauseFinal ( const OMPExecutableDirective & D,
bool NoFinals,
llvm::Value * IsLastIterCond = nullptr )

Emit final copying of lastprivate values to original variables at the end of the worksharing or simd directive.

Parameters
DDirective that has at least one 'lastprivate' directives.
IsLastIterCondBoolean condition that must be set to 'i1 true' if it is the last iteration of the loop code in associated directive, or to 'i1 false' otherwise. If this item is nullptr, no final check is required.

Definition at line 1175 of file CGStmtOpenMP.cpp.

References Builder, clang::C, clang::cast(), CGM, createBasicBlock(), EmitBlock(), EmitIgnoredExpr(), EmitOMPCopy(), GetAddrOfLocalVar(), getLangOpts(), clang::CodeGen::Address::getType(), HaveInsertPoint(), MakeAddrLValue(), and clang::CodeGen::Type.

Referenced by EmitOMPDistributeLoop(), emitOMPSimdRegion(), and EmitOMPWorksharingLoop().

◆ EmitOMPLastprivateClauseInit()

bool CodeGenFunction::EmitOMPLastprivateClauseInit ( const OMPExecutableDirective & D,
OMPPrivateScope & PrivateScope )

Emit initial code for lastprivate variables.

If some variable is not also firstprivate, then the default initialization is used. Otherwise initialization of this variable is performed by EmitOMPFirstprivateClause method.

Parameters
DDirective that may have 'lastprivate' directives.
PrivateScopePrivate scope for capturing lastprivate variables for proper codegen in internal captured statement.
Returns
true if there is at least one lastprivate variable, false otherwise.

Definition at line 1112 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::C, CapturedStmtInfo, clang::cast(), CGM, EmitDecl(), EmitLValue(), GetAddrOfLocalVar(), getCanonicalDecl(), getContext(), getEffectiveDirectiveKind(), getLangOpts(), HaveInsertPoint(), clang::CodeGen::Address::invalid(), clang::isOpenMPSimdDirective(), clang::isOpenMPTaskLoopDirective(), and clang::VK_LValue.

Referenced by EmitOMPDistributeLoop(), emitOMPSimdRegion(), and EmitOMPWorksharingLoop().

◆ EmitOMPLinearClause()

◆ EmitOMPLinearClauseFinal()

void CodeGenFunction::EmitOMPLinearClauseFinal ( const OMPLoopDirective & D,
const llvm::function_ref< llvm::Value *(CodeGenFunction &)> CondGen )

◆ EmitOMPLinearClauseInit()

bool CodeGenFunction::EmitOMPLinearClauseInit ( const OMPLoopDirective & D)

Emit initial code for linear variables.

Creates private copies and initializes them with the values according to OpenMP standard.

Parameters
DDirective (possibly) with the 'linear' clause.
Returns
true if at least one linear variable is found that should be initialized with the value of the original variable, false otherwise.

Definition at line 2238 of file CGStmtOpenMP.cpp.

References clang::C, CapturedStmtInfo, clang::cast(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitExprAsInit(), EmitIgnoredExpr(), EmitVarDecl(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), getContext(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Expr::getType(), clang::ValueDecl::getType(), HaveInsertPoint(), clang::Expr::IgnoreImpCasts(), clang::Init, MakeAddrLValue(), and clang::VK_LValue.

Referenced by emitOMPSimdRegion(), and EmitOMPWorksharingLoop().

◆ EmitOMPLoopBody()

◆ EmitOMPMaskedDirective()

◆ EmitOMPMaskedTaskLoopDirective()

void CodeGenFunction::EmitOMPMaskedTaskLoopDirective ( const OMPMaskedTaskLoopDirective & S)

◆ EmitOMPMaskedTaskLoopSimdDirective()

void CodeGenFunction::EmitOMPMaskedTaskLoopSimdDirective ( const OMPMaskedTaskLoopSimdDirective & S)

◆ EmitOMPMasterDirective()

void CodeGenFunction::EmitOMPMasterDirective ( const OMPMasterDirective & S)

◆ EmitOMPMasterTaskLoopDirective()

void CodeGenFunction::EmitOMPMasterTaskLoopDirective ( const OMPMasterTaskLoopDirective & S)

◆ EmitOMPMasterTaskLoopSimdDirective()

void CodeGenFunction::EmitOMPMasterTaskLoopSimdDirective ( const OMPMasterTaskLoopSimdDirective & S)

◆ EmitOMPMetaDirective()

void CodeGenFunction::EmitOMPMetaDirective ( const OMPMetaDirective & S)

Definition at line 1901 of file CGStmtOpenMP.cpp.

References EmitStmt(), and OMPMetaDirective::getIfStmt().

Referenced by EmitStmt().

◆ EmitOMPOrderedDirective()

◆ EmitOMPParallelDirective()

◆ EmitOMPParallelForDirective()

◆ EmitOMPParallelForSimdDirective()

◆ EmitOMPParallelGenericLoopDirective()

◆ EmitOMPParallelMaskedDirective()

◆ EmitOMPParallelMaskedTaskLoopDirective()

◆ EmitOMPParallelMaskedTaskLoopSimdDirective()

◆ EmitOMPParallelMasterDirective()

◆ EmitOMPParallelMasterTaskLoopDirective()

◆ EmitOMPParallelMasterTaskLoopSimdDirective()

◆ EmitOMPParallelSectionsDirective()

void CodeGenFunction::EmitOMPParallelSectionsDirective ( const OMPParallelSectionsDirective & S)

◆ EmitOMPPrivateClause()

◆ EmitOMPPrivateLoopCounters()

◆ EmitOMPReductionClauseFinal()

◆ EmitOMPReductionClauseInit()

void CodeGenFunction::EmitOMPReductionClauseInit ( const OMPExecutableDirective & D,
CodeGenFunction::OMPPrivateScope & PrivateScope,
bool ForInscan = false )

Emit initial code for reduction variables.

Creates reduction copies and initializes them with the values according to OpenMP standard.

Parameters
DDirective (possibly) with the 'reduction' clause.
PrivateScopePrivate scope for capturing reduction variables for proper codegen in internal captured statement.

Definition at line 1266 of file CGStmtOpenMP.cpp.

References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::C, clang::cast(), CGM, ConvertTypeForMem(), clang::Data, clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::ReductionCodeGen::emitSharedOrigLValue(), EmitStoreOfScalar(), EmitVarDecl(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::ASTContext::getAsArrayType(), clang::CodeGen::ReductionCodeGen::getBaseDecl(), getContext(), getEffectiveDirectiveKind(), clang::CodeGen::ReductionCodeGen::getSharedLValue(), clang::Expr::getType(), HaveInsertPoint(), clang::isa(), clang::isOpenMPWorksharingDirective(), clang::CodeGen::Type, and clang::CodeGen::Address::withElementType().

Referenced by EmitOMPDistributeLoop(), EmitOMPLoopBody(), EmitOMPParallelDirective(), EmitOMPParallelMaskedDirective(), EmitOMPParallelMasterDirective(), EmitOMPScopeDirective(), emitOMPSimdRegion(), EmitOMPTeamsDirective(), EmitOMPTeamsDistributeDirective(), EmitOMPTeamsDistributeParallelForDirective(), EmitOMPTeamsDistributeParallelForSimdDirective(), EmitOMPTeamsDistributeSimdDirective(), EmitOMPTeamsGenericLoopDirective(), EmitOMPWorksharingLoop(), emitTargetParallelRegion(), emitTargetTeamsDistributeParallelForRegion(), emitTargetTeamsDistributeParallelForSimdRegion(), emitTargetTeamsDistributeRegion(), emitTargetTeamsDistributeSimdRegion(), emitTargetTeamsGenericLoopRegionAsDistribute(), emitTargetTeamsGenericLoopRegionAsParallel(), and emitTargetTeamsRegion().

◆ EmitOMPReverseDirective()

void CodeGenFunction::EmitOMPReverseDirective ( const OMPReverseDirective & S)

Definition at line 2934 of file CGStmtOpenMP.cpp.

References EmitStmt(), and OMPReverseDirective::getTransformedStmt().

Referenced by EmitStmt().

◆ EmitOMPScanDirective()

◆ EmitOMPScopeDirective()

◆ EmitOMPSectionDirective()

void CodeGenFunction::EmitOMPSectionDirective ( const OMPSectionDirective & S)

◆ EmitOMPSectionsDirective()

◆ EmitOMPSharedLValue()

LValue CodeGenFunction::EmitOMPSharedLValue ( const Expr * E)

Emits the lvalue for the expression with possibly captured variable.

Definition at line 346 of file CGStmtOpenMP.cpp.

References CapturedStmtInfo, CurCodeDecl, EmitLValue(), getContext(), LambdaCaptureFields, and clang::VK_LValue.

◆ EmitOMPSimdDirective()

void CodeGenFunction::EmitOMPSimdDirective ( const OMPSimdDirective & S)

Definition at line 2918 of file CGStmtOpenMP.cpp.

References CGM, and emitOMPSimdDirective().

Referenced by EmitStmt().

◆ EmitOMPSimdFinal()

◆ EmitOMPSimdInit()

◆ emitOMPSimpleStore()

◆ EmitOMPSingleDirective()

void CodeGenFunction::EmitOMPSingleDirective ( const OMPSingleDirective & S)

◆ EmitOMPStripeDirective()

void CodeGenFunction::EmitOMPStripeDirective ( const OMPStripeDirective & S)

Definition at line 2928 of file CGStmtOpenMP.cpp.

References EmitStmt(), and OMPStripeDirective::getTransformedStmt().

Referenced by EmitStmt().

◆ EmitOMPTargetDataDirective()

◆ EmitOMPTargetDeviceFunction()

void CodeGenFunction::EmitOMPTargetDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetDirective & S )
static

Emit device code for the target directive.

Definition at line 7001 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetDirective()

void CodeGenFunction::EmitOMPTargetDirective ( const OMPTargetDirective & S)

Definition at line 7015 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetEnterDataDirective()

void CodeGenFunction::EmitOMPTargetEnterDataDirective ( const OMPTargetEnterDataDirective & S)

Definition at line 7730 of file CGStmtOpenMP.cpp.

References clang::C, CGM, and clang::Device.

Referenced by EmitStmt().

◆ EmitOMPTargetExitDataDirective()

void CodeGenFunction::EmitOMPTargetExitDataDirective ( const OMPTargetExitDataDirective & S)

Definition at line 7751 of file CGStmtOpenMP.cpp.

References clang::C, CGM, and clang::Device.

Referenced by EmitStmt().

◆ EmitOMPTargetParallelDeviceFunction()

void CodeGenFunction::EmitOMPTargetParallelDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetParallelDirective & S )
static

◆ EmitOMPTargetParallelDirective()

void CodeGenFunction::EmitOMPTargetParallelDirective ( const OMPTargetParallelDirective & S)

Definition at line 7811 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetParallelRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetParallelForDeviceFunction()

void CodeGenFunction::EmitOMPTargetParallelForDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetParallelForDirective & S )
static

Emit device code for the target parallel for directive.

Definition at line 7836 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetParallelForRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetParallelForDirective()

void CodeGenFunction::EmitOMPTargetParallelForDirective ( const OMPTargetParallelForDirective & S)

Definition at line 7851 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetParallelForRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetParallelForSimdDeviceFunction()

void CodeGenFunction::EmitOMPTargetParallelForSimdDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetParallelForSimdDirective & S )
static

Emit device code for the target parallel for simd directive.

Definition at line 7875 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetParallelForSimdRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetParallelForSimdDirective()

void CodeGenFunction::EmitOMPTargetParallelForSimdDirective ( const OMPTargetParallelForSimdDirective & S)

Definition at line 7890 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetParallelForSimdRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetParallelGenericLoopDeviceFunction()

void CodeGenFunction::EmitOMPTargetParallelGenericLoopDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetParallelGenericLoopDirective & S )
static

Emit device code for the target parallel loop directive.

Definition at line 8436 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetParallelGenericLoopRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetParallelGenericLoopDirective()

void CodeGenFunction::EmitOMPTargetParallelGenericLoopDirective ( const OMPTargetParallelGenericLoopDirective & S)

Emit combined directive 'target parallel loop' as if its constituent constructs are 'target', 'parallel', and 'for'.

Definition at line 8453 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetParallelGenericLoopRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetSimdDeviceFunction()

void CodeGenFunction::EmitOMPTargetSimdDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetSimdDirective & S )
static

Emit device code for the target simd directive.

Definition at line 3440 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitOMPSimdRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetSimdDirective()

void CodeGenFunction::EmitOMPTargetSimdDirective ( const OMPTargetSimdDirective & S)

Definition at line 3454 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitOMPSimdRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetTaskBasedDirective()

void CodeGenFunction::EmitOMPTargetTaskBasedDirective ( const OMPExecutableDirective & S,
const RegionCodeGenTy & BodyGen,
OMPTargetDataInfo & InputInfo )

◆ EmitOMPTargetTeamsDeviceFunction()

void CodeGenFunction::EmitOMPTargetTeamsDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetTeamsDirective & S )
static

Emit device code for the target teams directive.

Definition at line 7088 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetTeamsRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetTeamsDirective()

void CodeGenFunction::EmitOMPTargetTeamsDirective ( const OMPTargetTeamsDirective & S)

Definition at line 7102 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetTeamsRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetTeamsDistributeDeviceFunction()

void CodeGenFunction::EmitOMPTargetTeamsDistributeDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetTeamsDistributeDirective & S )
static

Emit device code for the target teams distribute directive.

Definition at line 7134 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetTeamsDistributeRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetTeamsDistributeDirective()

void CodeGenFunction::EmitOMPTargetTeamsDistributeDirective ( const OMPTargetTeamsDistributeDirective & S)

Definition at line 7148 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetTeamsDistributeRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetTeamsDistributeParallelForDeviceFunction()

void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetTeamsDistributeParallelForDirective & S )
static

◆ EmitOMPTargetTeamsDistributeParallelForDirective()

void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective ( const OMPTargetTeamsDistributeParallelForDirective & S)

◆ EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction()

void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetTeamsDistributeParallelForSimdDirective & S )
static

Emit device code for the target teams distribute parallel for simd directive.

Definition at line 7443 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetTeamsDistributeParallelForSimdRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetTeamsDistributeParallelForSimdDirective()

void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDirective ( const OMPTargetTeamsDistributeParallelForSimdDirective & S)

◆ EmitOMPTargetTeamsDistributeSimdDeviceFunction()

void CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetTeamsDistributeSimdDirective & S )
static

Emit device code for the target teams distribute simd directive.

Definition at line 7180 of file CGStmtOpenMP.cpp.

References clang::Addr, CGM, and emitTargetTeamsDistributeSimdRegion().

Referenced by clang::CodeGen::CGOpenMPRuntime::scanForTargetRegionsFunctions().

◆ EmitOMPTargetTeamsDistributeSimdDirective()

void CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDirective ( const OMPTargetTeamsDistributeSimdDirective & S)

Definition at line 7194 of file CGStmtOpenMP.cpp.

References emitCommonOMPTargetDirective(), and emitTargetTeamsDistributeSimdRegion().

Referenced by EmitStmt().

◆ EmitOMPTargetTeamsGenericLoopDeviceFunction()

void CodeGenFunction::EmitOMPTargetTeamsGenericLoopDeviceFunction ( CodeGenModule & CGM,
StringRef ParentName,
const OMPTargetTeamsGenericLoopDirective & S )
static

◆ EmitOMPTargetTeamsGenericLoopDirective()

◆ EmitOMPTargetUpdateDirective()

void CodeGenFunction::EmitOMPTargetUpdateDirective ( const OMPTargetUpdateDirective & S)

Definition at line 8208 of file CGStmtOpenMP.cpp.

References clang::C, CGM, and clang::Device.

Referenced by EmitStmt().

◆ EmitOMPTaskBasedDirective()

void CodeGenFunction::EmitOMPTaskBasedDirective ( const OMPExecutableDirective & S,
const OpenMPDirectiveKind CapturedRegion,
const RegionCodeGenTy & BodyGen,
const TaskGenTy & TaskGen,
OMPTaskDataTy & Data )

◆ EmitOMPTaskDirective()

◆ EmitOMPTaskgroupDirective()

◆ EmitOMPTaskLoopBasedDirective()

◆ EmitOMPTaskLoopDirective()

void CodeGenFunction::EmitOMPTaskLoopDirective ( const OMPTaskLoopDirective & S)

◆ EmitOMPTaskLoopSimdDirective()

void CodeGenFunction::EmitOMPTaskLoopSimdDirective ( const OMPTaskLoopSimdDirective & S)

◆ EmitOMPTaskwaitDirective()

void CodeGenFunction::EmitOMPTaskwaitDirective ( const OMPTaskwaitDirective & S)

Definition at line 5581 of file CGStmtOpenMP.cpp.

References buildDependences(), CGM, and clang::Data.

Referenced by EmitStmt().

◆ EmitOMPTaskyieldDirective()

void CodeGenFunction::EmitOMPTaskyieldDirective ( const OMPTaskyieldDirective & S)

Definition at line 5562 of file CGStmtOpenMP.cpp.

References CGM.

Referenced by EmitStmt().

◆ EmitOMPTeamsDirective()

◆ EmitOMPTeamsDistributeDirective()

◆ EmitOMPTeamsDistributeParallelForDirective()

◆ EmitOMPTeamsDistributeParallelForSimdDirective()

◆ EmitOMPTeamsDistributeSimdDirective()

◆ EmitOMPTeamsGenericLoopDirective()

◆ EmitOMPTileDirective()

void CodeGenFunction::EmitOMPTileDirective ( const OMPTileDirective & S)

Definition at line 2922 of file CGStmtOpenMP.cpp.

References EmitStmt(), and OMPTileDirective::getTransformedStmt().

Referenced by EmitStmt().

◆ EmitOMPUnrollDirective()

◆ EmitOMPUseDeviceAddrClause()

◆ EmitOMPUseDevicePtrClause()

void CodeGenFunction::EmitOMPUseDevicePtrClause ( const OMPUseDevicePtrClause & C,
OMPPrivateScope & PrivateScope,
const llvm::DenseMap< const ValueDecl *, llvm::Value * > CaptureDeviceAddrMap )

◆ EmitOMPWorksharingLoop()

bool CodeGenFunction::EmitOMPWorksharingLoop ( const OMPLoopDirective & S,
Expr * EUB,
const CodeGenLoopBoundsTy & CodeGenLoopBounds,
const CodeGenDispatchBoundsTy & CGDispatchBounds )

Emit code for the worksharing loop-based directive.

Returns
true, if this construct has any lastprivate clause, false - otherwise.

Definition at line 3474 of file CGStmtOpenMP.cpp.

References Builder, clang::C, clang::cast(), CGM, ConstantFoldsToSimpleInteger(), createBasicBlock(), emitAlignedClause(), EmitBlock(), EmitBranch(), emitCommonSimdLoop(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitForStaticFinish(), clang::CodeGen::CGOpenMPRuntime::emitForStaticInit(), EmitIgnoredExpr(), EmitLoadOfScalar(), EmitLValue(), EmitOMPFirstprivateClause(), EmitOMPHelperVar(), EmitOMPInnerLoop(), EmitOMPLastprivateClauseFinal(), EmitOMPLastprivateClauseInit(), EmitOMPLinearClause(), EmitOMPLinearClauseFinal(), EmitOMPLinearClauseInit(), EmitOMPPrivateClause(), EmitOMPPrivateLoopCounters(), EmitOMPReductionClauseFinal(), EmitOMPReductionClauseInit(), EmitOMPSimdFinal(), EmitOMPSimdInit(), emitPostUpdateForReductionClause(), emitPreCond(), EmitScalarConversion(), EmitScalarExpr(), EmitVarDecl(), clang::Expr::EvaluateAsInt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::LValue::getAddress(), getContext(), getEffectiveDirectiveKind(), getJumpDestInCurrentScope(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), getProfileCount(), clang::Expr::getType(), clang::ASTContext::getTypeSize(), clang::Type::hasSignedIntegerRepresentation(), incrementProfileCounter(), clang::isOpenMPLoopBoundSharingDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTargetExecutionDirective(), clang::CodeGen::CGOpenMPRuntime::isStaticChunked(), clang::CodeGen::CGOpenMPRuntime::isStaticNonchunked(), LoopStack, clang::OpenMPScheduleTy::M1, clang::OpenMPScheduleTy::M2, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::restoreMap(), clang::Result, clang::OpenMPScheduleTy::Schedule, and clang::CodeGen::LoopInfoStack::setParallel().

Referenced by emitInnerParallelForWhenCombined(), emitTargetParallelForRegion(), emitTargetParallelForSimdRegion(), emitTargetParallelGenericLoopRegion(), and emitWorksharingDirective().

◆ EmitOpaqueValueLValue()

LValue CodeGenFunction::EmitOpaqueValueLValue ( const OpaqueValueExpr * e)

◆ EmitOpenACCAtomicConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCAtomicConstruct ( const OpenACCAtomicConstruct & S)
inline

Definition at line 4191 of file CodeGenFunction.h.

References EmitStmt(), and OpenACCAtomicConstruct::getAssociatedStmt().

Referenced by EmitStmt().

◆ EmitOpenACCCacheConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCCacheConstruct ( const OpenACCCacheConstruct & S)
inline

Definition at line 4197 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOpenACCCombinedConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCCombinedConstruct ( const OpenACCCombinedConstruct & S)
inline

Definition at line 4135 of file CodeGenFunction.h.

References EmitStmt(), and OpenACCCombinedConstruct::getLoop().

Referenced by EmitStmt().

◆ EmitOpenACCComputeConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCComputeConstruct ( const OpenACCComputeConstruct & S)
inline

Definition at line 4121 of file CodeGenFunction.h.

References EmitStmt(), and clang::OpenACCComputeConstruct().

Referenced by EmitStmt().

◆ EmitOpenACCDataConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCDataConstruct ( const OpenACCDataConstruct & S)
inline

Definition at line 4142 of file CodeGenFunction.h.

References EmitStmt(), and OpenACCDataConstruct::getStructuredBlock().

Referenced by EmitStmt().

◆ EmitOpenACCEnterDataConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCEnterDataConstruct ( const OpenACCEnterDataConstruct & S)
inline

Definition at line 4149 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOpenACCExitDataConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCExitDataConstruct ( const OpenACCExitDataConstruct & S)
inline

Definition at line 4154 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOpenACCHostDataConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCHostDataConstruct ( const OpenACCHostDataConstruct & S)
inline

Definition at line 4159 of file CodeGenFunction.h.

References EmitStmt(), and OpenACCHostDataConstruct::getStructuredBlock().

Referenced by EmitStmt().

◆ EmitOpenACCInitConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCInitConstruct ( const OpenACCInitConstruct & S)
inline

Definition at line 4171 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOpenACCLoopConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCLoopConstruct ( const OpenACCLoopConstruct & S)
inline

Definition at line 4128 of file CodeGenFunction.h.

References EmitStmt(), and OpenACCLoopConstruct::getLoop().

Referenced by EmitStmt().

◆ EmitOpenACCSetConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCSetConstruct ( const OpenACCSetConstruct & S)
inline

Definition at line 4181 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOpenACCShutdownConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCShutdownConstruct ( const OpenACCShutdownConstruct & S)
inline

Definition at line 4176 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOpenACCUpdateConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCUpdateConstruct ( const OpenACCUpdateConstruct & S)
inline

Definition at line 4186 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOpenACCWaitConstruct()

void clang::CodeGen::CodeGenFunction::EmitOpenACCWaitConstruct ( const OpenACCWaitConstruct & S)
inline

Definition at line 4166 of file CodeGenFunction.h.

Referenced by EmitStmt().

◆ EmitOrigPointerRValue()

std::pair< llvm::Value *, CGPointerAuthInfo > CodeGenFunction::EmitOrigPointerRValue ( const Expr * E)

◆ EmitParmDecl()

void CodeGenFunction::EmitParmDecl ( const VarDecl & D,
ParamValue Arg,
unsigned ArgNo )

EmitParmDecl - Emit a ParmVarDecl or an ImplicitParamDecl.

Emit an alloca (or GlobalValue depending on target) for the specified parameter and set up LocalDeclMap.

Definition at line 2654 of file CGDecl.cpp.

References clang::CodeGenOptions::All, clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::ARCPreciseLifetime, BlockInfo, Builder, clang::cast(), clang::Type::castAsRecordDecl(), CGM, ConvertTypeForMem(), CreateMemTemp(), CurCodeDecl, CurFnInfo, CurFuncIsThunk, clang::Default, clang::QualType::DK_cxx_destructor, clang::QualType::DK_nontrivial_c_struct, EHStack, EmitARCInitWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitAutoVarWithLifetime(), clang::CodeGen::Address::emitRawPointer(), EmitStoreOfScalar(), EmitVarAnnotations(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenFunction::ParamValue::getAnyValue(), getARCCleanupKind(), getContext(), getDebugInfo(), clang::CodeGen::CodeGenFunction::ParamValue::getDirectValue(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenFunction::ParamValue::getIndirectAddress(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), getLangOpts(), getLLVMContext(), clang::NamedDecl::getName(), clang::Type::getNullability(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::RawAddress::getPointer(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Qualifiers::hasConst(), hasScalarEvaluationKind(), clang::CodeGen::Address::invalid(), clang::isa(), clang::VarDecl::isARCPseudoStrong(), clang::CodeGen::ABIArgInfo::isIndirect(), clang::CodeGen::CodeGenFunction::ParamValue::isIndirect(), clang::CodeGen::Address::isKnownNonNull(), clang::RecordDecl::isParamDestroyedInCallee(), clang::Type::isRecordType(), clang::CodeGen::Address::isValid(), MakeAddrLValue(), clang::VarDecl::needsDestruction(), clang::NonNull, clang::CodeGen::NormalFakeUse, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::opencl_private, pushDestroy(), setBlockContextParameter(), shouldExtendLifetime(), clang::T, clang::CodeGenOptions::This, clang::ThreadPrivateVar, V, clang::CodeGen::Address::withElementType(), and clang::CodeGen::Address::withPointer().

Referenced by EmitFunctionProlog(), and EmitInlinedInheritingCXXConstructorCall().

◆ EmitPointerArithmetic()

◆ EmitPointerAuthAuth()

llvm::Value * CodeGenFunction::EmitPointerAuthAuth ( const CGPointerAuthInfo & Info,
llvm::Value * Pointer )

◆ EmitPointerAuthBlendDiscriminator()

llvm::Value * CodeGenFunction::EmitPointerAuthBlendDiscriminator ( llvm::Value * StorageAddress,
llvm::Value * Discriminator )

Create the discriminator from the storage address and the entity hash.

Definition at line 94 of file CGPointerAuth.cpp.

References Builder, CGM, and clang::CodeGen::CodeGenTypeCache::IntPtrTy.

Referenced by EmitPointerAuthInfo(), EmitPointerAuthInfo(), and clang::CodeGen::CodeGenModule::getVTablePointerAuthInfo().

◆ EmitPointerAuthCopy()

void CodeGenFunction::EmitPointerAuthCopy ( PointerAuthQualifier Qualifier,
QualType Type,
Address DestField,
Address SrcField )

◆ EmitPointerAuthInfo() [1/2]

◆ EmitPointerAuthInfo() [2/2]

◆ EmitPointerAuthOperandBundle()

void CodeGenFunction::EmitPointerAuthOperandBundle ( const CGPointerAuthInfo & Info,
SmallVectorImpl< llvm::OperandBundleDef > & Bundles )

◆ EmitPointerAuthQualify() [1/2]

llvm::Value * CodeGenFunction::EmitPointerAuthQualify ( PointerAuthQualifier Qualifier,
const Expr * PointerExpr,
Address StorageAddress )

◆ EmitPointerAuthQualify() [2/2]

llvm::Value * CodeGenFunction::EmitPointerAuthQualify ( PointerAuthQualifier Qualifier,
llvm::Value * Pointer,
QualType ValueType,
Address StorageAddress,
bool IsKnownNonNull )

◆ emitPointerAuthResign()

◆ emitPointerAuthResignCall()

◆ EmitPointerAuthSign()

llvm::Value * CodeGenFunction::EmitPointerAuthSign ( const CGPointerAuthInfo & Info,
llvm::Value * Pointer )

◆ EmitPointerAuthUnqualify()

llvm::Value * CodeGenFunction::EmitPointerAuthUnqualify ( PointerAuthQualifier Qualifier,
llvm::Value * Pointer,
QualType PointerType,
Address StorageAddress,
bool IsKnownNonNull )

◆ EmitPointerToDataMemberBinaryExpr()

◆ EmitPointerWithAlignment()

Address CodeGenFunction::EmitPointerWithAlignment ( const Expr * Addr,
LValueBaseInfo * BaseInfo = nullptr,
TBAAAccessInfo * TBAAInfo = nullptr,
KnownNonNull_t IsKnownNonNull = NotKnownNonNull )

EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee.

EmitPointerWithAlignment - Given an expression of pointer type, try to derive a more accurate bound on the alignment of the pointer.

Parameters
BaseInfo- If non-null, this will be initialized with information about the source of the alignment and the may-alias attribute. Note that this function will conservatively fall back on the type when it doesn't recognize the expression and may-alias will be set to false.

One reasonable way to use this information is when there's a language guarantee that the pointer must be aligned to some stricter value, and we're simply trying to ensure that sufficiently obvious uses of under- aligned objects don't get miscompiled; for example, a placement new into the address of a local variable. In such a case, it's quite reasonable to just ignore the returned alignment when it isn't from an explicit source.

Definition at line 1515 of file CGExpr.cpp.

References clang::Addr, and EmitPointerWithAlignment().

Referenced by CheckAtomicAlignment(), EmitAArch64BuiltinExpr(), EmitAMDGPUBuiltinExpr(), EmitARMBuiltinExpr(), EmitArraySubscriptExpr(), EmitAtomicCmpXchg128ForMSIntrin(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), EmitCXXDeleteExpr(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewExpr(), EmitCXXPseudoDestructorExpr(), EmitExtVectorElementExpr(), EmitHexagonBuiltinExpr(), EmitMemberExpr(), EmitMSVCBuiltinExpr(), EmitNontemporalLoad(), EmitNontemporalStore(), EmitNVPTXBuiltinExpr(), emitOMPArraySectionBase(), emitPointerArithmetic(), EmitPointerToDataMemberBinaryExpr(), EmitPointerWithAlignment(), EmitPointerWithAlignment(), EmitPPCBuiltinExpr(), EmitStoreThroughLValue(), EmitSystemZIntrinsicWithCC(), EmitUnaryOpLValue(), EmitVAListRef(), emitWritebackArg(), EmitX86BuiltinExpr(), and GetCountedByFieldExprGEP().

◆ EmitPPCBuiltinExpr()

◆ EmitPredefinedLValue()

◆ EmitPromotedComplexExpr()

ComplexPairTy CodeGenFunction::EmitPromotedComplexExpr ( const Expr * E,
QualType PromotionType )

Definition at line 1173 of file CGExprComplex.cpp.

◆ EmitPromotedScalarExpr()

Value * CodeGenFunction::EmitPromotedScalarExpr ( const Expr * E,
QualType PromotionType )

Definition at line 5905 of file CGExprScalar.cpp.

References clang::QualType::isNull().

◆ EmitPromotedValue()

ComplexPairTy CodeGenFunction::EmitPromotedValue ( ComplexPairTy result,
QualType PromotionType )

◆ EmitPseudoObjectLValue()

LValue CodeGenFunction::EmitPseudoObjectLValue ( const PseudoObjectExpr * e)

Definition at line 6783 of file CGExpr.cpp.

References emitPseudoObjectExpr(), and clang::CodeGen::AggValueSlot::ignored().

◆ EmitPseudoObjectRValue()

RValue CodeGenFunction::EmitPseudoObjectRValue ( const PseudoObjectExpr * e,
AggValueSlot slot = AggValueSlot::ignored() )

Definition at line 6778 of file CGExpr.cpp.

References emitPseudoObjectExpr().

◆ EmitReferenceBindingToExpr()

◆ EmitReturnBlock()

llvm::DebugLoc CodeGenFunction::EmitReturnBlock ( )

Emit the unified return block, trying to avoid its emission when possible.

Returns
The debug location of the user written return statement if the return block is avoided.

Definition at line 313 of file CodeGenFunction.cpp.

References Builder, EmitBlock(), and ReturnBlock.

Referenced by FinishFunction().

◆ EmitReturnStmt()

◆ EmitReturnValueCheck()

void CodeGenFunction::EmitReturnValueCheck ( llvm::Value * RV)

Emit a test that checks if the return value RV is nonnull.

Definition at line 4181 of file CGCall.cpp.

References Builder, clang::Cond, createBasicBlock(), CurCodeDecl, EmitBlock(), EmitCheck(), EmitCheckSourceLocation(), clang::CodeGen::Address::invalid(), ReturnBlock, and SanOpts.

Referenced by EmitFunctionEpilog().

◆ EmitRISCVBuiltinExpr()

◆ EmitRISCVCpuInit()

◆ EmitRISCVCpuIs() [1/2]

Value * CodeGenFunction::EmitRISCVCpuIs ( const CallExpr * E)

◆ EmitRISCVCpuIs() [2/2]

Value * CodeGenFunction::EmitRISCVCpuIs ( StringRef CPUStr)

◆ EmitRISCVCpuSupports() [1/2]

Value * CodeGenFunction::EmitRISCVCpuSupports ( ArrayRef< StringRef > FeaturesStrs)

Definition at line 1000 of file RISCV.cpp.

References Builder, CGM, loadRISCVFeatureBits(), and clang::Result.

◆ EmitRISCVCpuSupports() [2/2]

◆ EmitRISCVMultiVersionResolver()

◆ emitRotate()

RValue CodeGenFunction::emitRotate ( const CallExpr * E,
bool IsRotateRight )

◆ EmitRuntimeCall() [1/2]

llvm::CallInst * clang::CodeGen::CodeGenFunction::EmitRuntimeCall ( llvm::FunctionCallee callee,
ArrayRef< llvm::Value * > args,
const Twine & name = "" )

◆ EmitRuntimeCall() [2/2]

llvm::CallInst * clang::CodeGen::CodeGenFunction::EmitRuntimeCall ( llvm::FunctionCallee callee,
const Twine & name = "" )

Referenced by clang::CodeGen::CodeGenModule::createOpenCLIntToSamplerConversion(), EmitAArch64BuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitBarrierCall(), EmitBuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitCall(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitCaptureStmt(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchDeinit(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), clang::CodeGen::CGOpenMPRuntime::emitForOrderedIterationEnd(), clang::CodeGen::CGOpenMPRuntime::emitForStaticFinish(), emitForStaticInitCall(), EmitHLSLBuiltinExpr(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), EmitObjCAutoreleasePoolPop(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitPointerAuthCommon(), emitPointerAuthResignCall(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), clang::CodeGen::CGOpenMPRuntime::emitProcBindClause(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), EmitStrip(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFini(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntime::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarInit(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), GenerateCXXGlobalInitFunc(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), getEHResumeBlock(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUThreadID(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcFreeShared(), and clang::CodeGen::CGOpenMPRuntime::getTaskReductionItem().

◆ EmitRuntimeCallOrInvoke() [1/2]

llvm::CallBase * CodeGenFunction::EmitRuntimeCallOrInvoke ( llvm::FunctionCallee callee,
ArrayRef< llvm::Value * > args,
const Twine & name = "" )

◆ EmitRuntimeCallOrInvoke() [2/2]

llvm::CallBase * CodeGenFunction::EmitRuntimeCallOrInvoke ( llvm::FunctionCallee callee,
const Twine & name = "" )

Emits a call or invoke instruction to the given nullary runtime function.

Definition at line 5052 of file CGCall.cpp.

References EmitRuntimeCallOrInvoke().

◆ EmitRValueForField()

◆ EmitSanitizerStatReport()

void CodeGenFunction::EmitSanitizerStatReport ( llvm::SanitizerStatKind SSK)

Definition at line 2907 of file CodeGenFunction.cpp.

References Builder, and CGM.

Referenced by EmitCall(), EmitVTablePtrCheck(), and EmitVTableTypeCheckedLoad().

◆ EmitScalarCompoundAssignWithComplex()

LValue CodeGenFunction::EmitScalarCompoundAssignWithComplex ( const CompoundAssignOperator * E,
llvm::Value *& Result )

◆ emitScalarConstant()

◆ EmitScalarConversion()

◆ EmitScalarExpr()

Value * CodeGenFunction::EmitScalarExpr ( const Expr * E,
bool IgnoreResultAssign = false )

EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type, returning the result.

Emit the computation of the specified expression of scalar type, ignoring the result.

Definition at line 5873 of file CGExprScalar.cpp.

References clang::Expr::getType(), and hasScalarEvaluationKind().

Referenced by AddAMDGPUFenceAddressSpaceMMRA(), EmitAArch64BuiltinExpr(), EmitAArch64SVEBuiltinExpr(), emitAlignedClause(), EmitAMDGPUBuiltinExpr(), EmitAnyExpr(), EmitAnyExprToMem(), EmitARCExtendBlockObject(), emitARCRetainCallResult(), EmitARCStoreUnsafeUnretained(), emitARCUnsafeClaimCallResult(), EmitARMBuiltinExpr(), EmitARMMVEBuiltinExpr(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitAtomicCmpXchg128ForMSIntrin(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicExpr(), EmitAtomicInit(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitBinaryAtomicPost(), emitBinaryExpMaybeConstrainedFPBuiltin(), emitBinaryMaybeConstrainedFPBuiltin(), EmitBitCountExpr(), EmitBitTestIntrinsic(), EmitBlockCallExpr(), EmitBPFBuiltinExpr(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), emitBuiltinWithOneOverloadedType(), EmitCallee(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), emitClauseForBareTargetDirective(), emitCommonOMPParallelDirective(), emitCommonOMPTargetDirective(), EmitCoroutineBody(), EmitCoroutineIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitDeclInit(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), emitDeviceID(), EmitDirectXBuiltinExpr(), emitDispatchForLoopBounds(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), emitDynCGGroupMem(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), EmitExtVectorElementExpr(), emitFPIntBuiltin(), emitFrexpBuiltin(), EmitFunctionProlog(), EmitHexagonBuiltinExpr(), EmitHLSLBuiltinExpr(), EmitIndirectGotoStmt(), EmitInitializationToLValue(), EmitInitializerForField(), EmitISOVolatileLoad(), EmitISOVolatileStore(), clang::CodeGen::CGOpenMPRuntime::emitMaskedRegion(), EmitMaterializeTemporaryExpr(), EmitMatrixIndexExpr(), emitMaybeConstrainedFPToIntRoundBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitMessageClause(), emitModfBuiltin(), EmitMSVCBuiltinExpr(), EmitMSVCRTSetJmp(), EmitNontemporalStore(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsForTargetDirective(), EmitNVPTXBuiltinExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), emitOMPAtomicCompareExpr(), EmitOMPCancelDirective(), EmitOMPCriticalDirective(), EmitOMPDistributeLoop(), emitOMPForDirective(), EmitOMPInteropDirective(), EmitOMPMaskedDirective(), EmitOMPParallelDirective(), EmitOMPParallelForDirective(), EmitOMPParallelForSimdDirective(), EmitOMPTaskBasedDirective(), EmitOMPTaskLoopBasedDirective(), EmitOMPWorksharingLoop(), clang::CodeGen::CGOpenCLRuntime::emitOpenCLEnqueuedBlock(), EmitOrigPointerRValue(), EmitOverflowCheckedAbs(), emitPointerArithmetic(), EmitPointerToDataMemberBinaryExpr(), EmitPointerWithAlignment(), EmitPPCBuiltinExpr(), emitPPCLoadReserveIntrinsic(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), emitRestoreIP(), EmitReturnStmt(), emitRotate(), EmitScalarInit(), EmitScalarOrConstFoldImmArg(), emitSincosBuiltin(), EmitSpecialRegisterBuiltin(), EmitSPIRVBuiltinExpr(), EmitSwitchStmt(), EmitSystemZBuiltinExpr(), EmitSystemZIntrinsicWithCC(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitTernaryMaybeConstrainedFPBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), emitUnaryMaybeConstrainedFPBuiltin(), EmitVariablyModifiedType(), EmitWebAssemblyBuiltinExpr(), EmitWithOriginalRHSBitfieldAssignment(), emitWorksharingDirective(), EmitX86BuiltinExpr(), EvaluateExprAsBool(), generateAwaitSuspendWrapper(), GenerateSEHFilterFunction(), GetAArch64SVEProcessedOperands(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), GetAlignedMapping(), getAllocatorVal(), GetCountFieldAndIndex(), getPointerAndSize(), handleAsDoubleBuiltin(), handleHlslClip(), handleHlslSplitdouble(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), tryEmitARCRetainLoadOfScalar(), and tryEmitSpecializedAllocInit().

◆ EmitScalarInit()

◆ EmitScalarOrConstFoldImmArg()

◆ EmitScalarPrePostIncDec()

llvm::Value * CodeGenFunction::EmitScalarPrePostIncDec ( const UnaryOperator * E,
LValue LV,
bool isInc,
bool isPre )

Definition at line 5914 of file CGExprScalar.cpp.

Referenced by EmitUnaryOpLValue().

◆ EmitScalarRangeCheck()

bool CodeGenFunction::EmitScalarRangeCheck ( llvm::Value * Value,
QualType Ty,
SourceLocation Loc )

◆ EmitSEHAbnormalTermination()

llvm::Value * CodeGenFunction::EmitSEHAbnormalTermination ( )

Definition at line 2161 of file CGException.cpp.

References Builder, CurFn, and clang::CodeGen::CodeGenTypeCache::Int32Ty.

Referenced by EmitBuiltinExpr().

◆ EmitSehCppScopeBegin()

void CodeGenFunction::EmitSehCppScopeBegin ( )

Definition at line 1345 of file CGCleanup.cpp.

References CGM, EmitSehScope(), and getLangOpts().

Referenced by EmitLabelStmt().

◆ EmitSehCppScopeEnd()

void CodeGenFunction::EmitSehCppScopeEnd ( )

Definition at line 1356 of file CGCleanup.cpp.

References CGM, EmitSehScope(), and getLangOpts().

Referenced by PopCleanupBlock().

◆ EmitSEHExceptionCode()

llvm::Value * CodeGenFunction::EmitSEHExceptionCode ( )

Definition at line 2156 of file CGException.cpp.

References Builder, and SEHCodeSlotStack.

Referenced by EmitBuiltinExpr().

◆ EmitSEHExceptionCodeSave()

◆ EmitSEHExceptionInfo()

llvm::Value * CodeGenFunction::EmitSEHExceptionInfo ( )

Definition at line 2147 of file CGException.cpp.

References clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and SEHInfo.

Referenced by EmitBuiltinExpr().

◆ EmitSEHLeaveStmt()

void CodeGenFunction::EmitSEHLeaveStmt ( const SEHLeaveStmt & S)

◆ EmitSehTryScopeBegin()

void CodeGenFunction::EmitSehTryScopeBegin ( )

Definition at line 1366 of file CGCleanup.cpp.

References CGM, EmitSehScope(), and getLangOpts().

Referenced by EnterCXXTryStmt().

◆ EmitSehTryScopeEnd()

void CodeGenFunction::EmitSehTryScopeEnd ( )

Definition at line 1376 of file CGCleanup.cpp.

References CGM, EmitSehScope(), and getLangOpts().

Referenced by PopCleanupBlock().

◆ EmitSEHTryStmt()

◆ EmitSimpleCallExpr()

RValue CodeGenFunction::EmitSimpleCallExpr ( const CallExpr * E,
ReturnValueSlot ReturnValue,
llvm::CallBase ** CallOrInvoke = nullptr )

Emit a CallExpr without considering whether it might be a subclass.

Definition at line 5981 of file CGExpr.cpp.

References EmitCall(), EmitCallee(), clang::CallExpr::getCallee(), clang::Expr::getType(), and ReturnValue.

Referenced by clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr().

◆ EmitSimpleOMPExecutableDirective()

◆ EmitSimpleStmt()

bool CodeGenFunction::EmitSimpleStmt ( const Stmt * S,
ArrayRef< const Attr * > Attrs )

EmitSimpleStmt - Try to emit a "simple" statement which does not necessarily require an insertion point or debug information; typically because the statement amounts to a jump or a container of other statements.

Returns
True if the statement was handled.

Definition at line 505 of file CGStmt.cpp.

References clang::cast(), EmitAttributedStmt(), EmitBreakStmt(), EmitCaseStmt(), EmitCompoundStmt(), EmitContinueStmt(), EmitDeclStmt(), EmitDefaultStmt(), EmitGotoStmt(), EmitLabelStmt(), EmitSEHLeaveStmt(), and clang::Stmt::getStmtClass().

Referenced by EmitStmt().

◆ EmitSMELd1St1()

◆ EmitSMELdrStr()

Value * CodeGenFunction::EmitSMELdrStr ( const SVETypeFlags & TypeFlags,
llvm::SmallVectorImpl< llvm::Value * > & Ops,
unsigned IntID )

Definition at line 4349 of file ARM.cpp.

References Builder, CGM, clang::Function, and clang::CodeGen::CodeGenTypeCache::Int32Ty.

Referenced by EmitAArch64SMEBuiltinExpr().

◆ EmitSMEReadWrite()

Value * CodeGenFunction::EmitSMEReadWrite ( const SVETypeFlags & TypeFlags,
llvm::SmallVectorImpl< llvm::Value * > & Ops,
unsigned IntID )

◆ EmitSMEZero()

Value * CodeGenFunction::EmitSMEZero ( const SVETypeFlags & TypeFlags,
llvm::SmallVectorImpl< llvm::Value * > & Ops,
unsigned IntID )

Definition at line 4339 of file ARM.cpp.

References Builder, CGM, clang::Function, and clang::CodeGen::CodeGenTypeCache::Int32Ty.

Referenced by EmitAArch64SMEBuiltinExpr().

◆ EmitSPIRVBuiltinExpr()

◆ EmitStartEHSpec()

◆ EmitStaticVarDecl()

◆ EmitStmt()

void CodeGenFunction::EmitStmt ( const Stmt * S,
ArrayRef< const Attr * > Attrs = {} )

EmitStmt - Emit the code for the statement.

  • S. It is legal to call this function even if there is no current insertion point.

This function may clear the current insertion point; callers should use EnsureInsertPoint if they wish to subsequently generate code without first calling EmitBlock, EmitBranch, or EmitStmt.

Definition at line 61 of file CGStmt.cpp.

References Builder, clang::cast(), CGM, ContainsLabel(), EmitAsmStmt(), EmitCapturedStmt(), EmitCoreturnStmt(), EmitCoroutineBody(), EmitCXXForRangeStmt(), EmitCXXTryStmt(), EmitDoStmt(), EmitForStmt(), EmitIfStmt(), EmitIgnoredExpr(), EmitIndirectGotoStmt(), EmitObjCAtSynchronizedStmt(), EmitObjCAtThrowStmt(), EmitObjCAtTryStmt(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitOMPAssumeDirective(), EmitOMPAtomicDirective(), EmitOMPBarrierDirective(), EmitOMPCancelDirective(), EmitOMPCancellationPointDirective(), EmitOMPCanonicalLoop(), EmitOMPCriticalDirective(), EmitOMPDepobjDirective(), EmitOMPDistributeDirective(), EmitOMPDistributeParallelForDirective(), EmitOMPDistributeParallelForSimdDirective(), EmitOMPDistributeSimdDirective(), EmitOMPErrorDirective(), EmitOMPFlushDirective(), EmitOMPForDirective(), EmitOMPForSimdDirective(), EmitOMPGenericLoopDirective(), EmitOMPInterchangeDirective(), EmitOMPInteropDirective(), EmitOMPMaskedDirective(), EmitOMPMaskedTaskLoopDirective(), EmitOMPMaskedTaskLoopSimdDirective(), EmitOMPMasterDirective(), EmitOMPMasterTaskLoopDirective(), EmitOMPMasterTaskLoopSimdDirective(), EmitOMPMetaDirective(), EmitOMPOrderedDirective(), EmitOMPParallelDirective(), EmitOMPParallelForDirective(), EmitOMPParallelForSimdDirective(), EmitOMPParallelGenericLoopDirective(), EmitOMPParallelMaskedDirective(), EmitOMPParallelMaskedTaskLoopDirective(), EmitOMPParallelMaskedTaskLoopSimdDirective(), EmitOMPParallelMasterDirective(), EmitOMPParallelMasterTaskLoopDirective(), EmitOMPParallelMasterTaskLoopSimdDirective(), EmitOMPParallelSectionsDirective(), EmitOMPReverseDirective(), EmitOMPScanDirective(), EmitOMPScopeDirective(), EmitOMPSectionDirective(), EmitOMPSectionsDirective(), EmitOMPSimdDirective(), EmitOMPSingleDirective(), EmitOMPStripeDirective(), EmitOMPTargetDataDirective(), EmitOMPTargetDirective(), EmitOMPTargetEnterDataDirective(), EmitOMPTargetExitDataDirective(), EmitOMPTargetParallelDirective(), EmitOMPTargetParallelForDirective(), EmitOMPTargetParallelForSimdDirective(), EmitOMPTargetParallelGenericLoopDirective(), EmitOMPTargetSimdDirective(), EmitOMPTargetTeamsDirective(), EmitOMPTargetTeamsDistributeDirective(), EmitOMPTargetTeamsDistributeParallelForDirective(), EmitOMPTargetTeamsDistributeParallelForSimdDirective(), EmitOMPTargetTeamsDistributeSimdDirective(), EmitOMPTargetTeamsGenericLoopDirective(), EmitOMPTargetUpdateDirective(), EmitOMPTaskDirective(), EmitOMPTaskgroupDirective(), EmitOMPTaskLoopDirective(), EmitOMPTaskLoopSimdDirective(), EmitOMPTaskwaitDirective(), EmitOMPTaskyieldDirective(), EmitOMPTeamsDirective(), EmitOMPTeamsDistributeDirective(), EmitOMPTeamsDistributeParallelForDirective(), EmitOMPTeamsDistributeParallelForSimdDirective(), EmitOMPTeamsDistributeSimdDirective(), EmitOMPTeamsGenericLoopDirective(), EmitOMPTileDirective(), EmitOMPUnrollDirective(), EmitOpenACCAtomicConstruct(), EmitOpenACCCacheConstruct(), EmitOpenACCCombinedConstruct(), EmitOpenACCComputeConstruct(), EmitOpenACCDataConstruct(), EmitOpenACCEnterDataConstruct(), EmitOpenACCExitDataConstruct(), EmitOpenACCHostDataConstruct(), EmitOpenACCInitConstruct(), EmitOpenACCLoopConstruct(), EmitOpenACCSetConstruct(), EmitOpenACCShutdownConstruct(), EmitOpenACCUpdateConstruct(), EmitOpenACCWaitConstruct(), EmitReturnStmt(), EmitSEHTryStmt(), EmitSimpleOMPExecutableDirective(), EmitSimpleStmt(), EmitStopPoint(), EmitSwitchStmt(), EmitWhileStmt(), EnsureInsertPoint(), clang::CapturedStmt::getCapturedRegionKind(), getLangOpts(), clang::Stmt::getStmtClass(), HaveInsertPoint(), clang::isa(), and clang::Stmt::NoStmtClass.

Referenced by clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAttributedStmt(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), emitBody(), emitBodyAndFallthrough(), EmitCaseStmt(), EmitCaseStmtRange(), emitCommonOMPTargetDirective(), EmitCompoundStmtWithoutScope(), EmitConstructorBody(), EmitCoreturnStmt(), EmitCoroutineBody(), EmitCXXForRangeStmt(), EmitCXXTryStmt(), EmitDefaultStmt(), EmitDestructorBody(), EmitDoStmt(), EmitForStmt(), EmitFunctionBody(), EmitIfStmt(), EmitLabelStmt(), emitMasked(), emitMaster(), EmitObjCAutoreleasePoolStmt(), EmitObjCForCollectionStmt(), EmitOMPAssumeDirective(), EmitOMPCanonicalLoop(), EmitOMPCollapsedCanonicalLoopNest(), EmitOMPCriticalDirective(), EmitOMPGenericLoopDirective(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitOMPInlinedRegionBody(), EmitOMPInterchangeDirective(), EmitOMPMetaDirective(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitOMPOutlinedRegionBody(), EmitOMPParallelDirective(), EmitOMPReverseDirective(), EmitOMPScopeDirective(), EmitOMPSectionDirective(), EmitOMPSingleDirective(), EmitOMPStripeDirective(), EmitOMPTargetDataDirective(), EmitOMPTaskDirective(), EmitOMPTaskgroupDirective(), EmitOMPTeamsDirective(), EmitOMPTileDirective(), EmitOMPUnrollDirective(), EmitOpenACCAtomicConstruct(), EmitOpenACCCombinedConstruct(), EmitOpenACCComputeConstruct(), EmitOpenACCDataConstruct(), EmitOpenACCHostDataConstruct(), EmitOpenACCLoopConstruct(), EmitSEHTryStmt(), EmitSimpleOMPExecutableDirective(), emitSuspendExpression(), EmitSwitchStmt(), emitTargetParallelRegion(), emitTargetRegion(), emitTargetTeamsRegion(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitWhileStmt(), ExitCXXTryStmt(), ExitSEHTryStmt(), GenerateBlockFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), and GenerateSEHFinallyFunction().

◆ EmitStmtExprLValue()

LValue CodeGenFunction::EmitStmtExprLValue ( const StmtExpr * E)

◆ EmitStopPoint()

◆ EmitStoreOfComplex()

void CodeGenFunction::EmitStoreOfComplex ( ComplexPairTy V,
LValue dest,
bool isInit )

◆ EmitStoreOfScalar() [1/3]

void clang::CodeGen::CodeGenFunction::EmitStoreOfScalar ( llvm::Value * Value,
Address Addr,
bool Volatile,
QualType Ty,
AlignmentSource Source = AlignmentSource::Type,
bool isInit = false,
bool isNontemporal = false )
inline

EmitStoreOfScalar - Store a scalar value to an address, taking care to appropriately convert from the memory representation to the LLVM value representation.

Definition at line 4327 of file CodeGenFunction.h.

References clang::Addr, CGM, EmitStoreOfScalar(), and clang::CodeGen::Type.

Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), castValueToType(), clang::CodeGen::CallArg::copyInto(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitARCStoreStrong(), EmitARCStoreUnsafeUnretained(), emitAtomicCmpXchg(), EmitAtomicExpr(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCXXGlobalVarDeclInit(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitDistributeParallelForInnerBounds(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), emitFrexpBuiltin(), EmitFunctionEpilog(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalFinalUpdate(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitModfBuiltin(), EmitNontemporalStore(), EmitOMPDepobjDirective(), EmitOMPFirstprivateClause(), EmitOMPReductionClauseInit(), EmitOMPTaskgroupDirective(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitParmDecl(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), EmitReturnStmt(), EmitScalarInit(), EmitStoreOfMatrixScalar(), EmitStoreOfScalar(), EmitStoreOfScalar(), EmitStoreThroughLValue(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), emitWriteback(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), InitCatchParam(), and tryEmitARCRetainLoadOfScalar().

◆ EmitStoreOfScalar() [2/3]

◆ EmitStoreOfScalar() [3/3]

void CodeGenFunction::EmitStoreOfScalar ( llvm::Value * value,
LValue lvalue,
bool isInit = false )

EmitStoreOfScalar - Store a scalar value to an address, taking care to appropriately convert from the memory representation to the LLVM value representation.

The l-value must be a simple l-value. The isInit flag indicates whether this is an initialization. If so, atomic qualifiers are ignored and the store is always non-atomic.

Definition at line 2296 of file CGExpr.cpp.

References EmitStoreOfMatrixScalar(), EmitStoreOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::Type::isConstantMatrixType(), clang::CodeGen::LValue::isNontemporal(), and clang::CodeGen::LValue::isVolatile().

◆ EmitStoreThroughBitfieldLValue()

void CodeGenFunction::EmitStoreThroughBitfieldLValue ( RValue Src,
LValue Dst,
llvm::Value ** Result = nullptr )

◆ EmitStoreThroughExtVectorComponentLValue()

◆ EmitStoreThroughGlobalRegLValue()

void CodeGenFunction::EmitStoreThroughGlobalRegLValue ( RValue Src,
LValue Dst )

◆ EmitStoreThroughLValue()

void CodeGenFunction::EmitStoreThroughLValue ( RValue Src,
LValue Dst,
bool isInit = false )

EmitStoreThroughLValue - Store the specified rvalue into the specified lvalue, where both are guaranteed to the have the same type, and that type is 'Ty'.

Definition at line 2533 of file CGExpr.cpp.

References addInstToCurrentSourceAtom(), Builder, clang::Type::castAs(), CGM, EmitARCInitWeak(), EmitARCRetain(), EmitARCStoreStrong(), EmitARCStoreWeak(), EmitObjCExtendObjectLifetime(), EmitPointerAuthQualify(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughGlobalRegLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseIvarExp(), clang::CodeGen::LValue::getMatrixAddress(), clang::CodeGen::LValue::getMatrixIdx(), clang::Qualifiers::getObjCLifetime(), clang::Qualifiers::getPointerAuth(), clang::CodeGen::LValue::getQuals(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddress(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isExtVectorElt(), clang::CodeGen::LValue::isGlobalObjCRef(), clang::CodeGen::LValue::isGlobalReg(), clang::CodeGen::LValue::isMatrixElt(), clang::CodeGen::LValue::isNonGC(), clang::CodeGen::LValue::isObjCIvar(), clang::CodeGen::LValue::isObjCStrong(), clang::CodeGen::LValue::isObjCWeak(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isThreadLocalRef(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::isVolatileQualified(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.

Referenced by createSectionLVal(), EmitAnyExprToMem(), EmitAsmStores(), EmitAtomicUpdateValue(), EmitAtomicUpdateValue(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitExprAsInit(), EmitInitializationToLValue(), EmitInitializerForField(), EmitLambdaVLACapture(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitOMPAtomicSimpleUpdateExpr(), emitOMPSimpleStore(), emitProxyTaskFunction(), EmitScalarInit(), emitWriteback(), and GenerateOpenMPCapturedVars().

◆ EmitStringLiteralLValue()

LValue CodeGenFunction::EmitStringLiteralLValue ( const StringLiteral * E)

Definition at line 3491 of file CGExpr.cpp.

References CGM, clang::CodeGen::Decl, clang::Expr::getType(), and MakeAddrLValue().

◆ EmitSVEAllTruePred()

llvm::Value * CodeGenFunction::EmitSVEAllTruePred ( const SVETypeFlags & TypeFlags)

Definition at line 3862 of file ARM.cpp.

References Builder, CGM, clang::Function, and getSVEPredType().

Referenced by EmitAArch64SVEBuiltinExpr().

◆ EmitSVEDupX() [1/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitSVEDupX ( llvm::Value * Scalar)

◆ EmitSVEDupX() [2/2]

llvm::Value * clang::CodeGen::CodeGenFunction::EmitSVEDupX ( llvm::Value * Scalar,
llvm::Type * Ty )

References Arch, and ReturnValue.

◆ EmitSVEGatherLoad()

◆ EmitSVEGatherPrefetch()

Value * CodeGenFunction::EmitSVEGatherPrefetch ( const SVETypeFlags & TypeFlags,
SmallVectorImpl< llvm::Value * > & Ops,
unsigned IntID )

◆ EmitSVEMaskedLoad()

◆ EmitSVEMaskedStore()

◆ EmitSVEMovl()

Value * CodeGenFunction::EmitSVEMovl ( const SVETypeFlags & TypeFlags,
llvm::ArrayRef< llvm::Value * > Ops,
unsigned BuiltinID )

Definition at line 4153 of file ARM.cpp.

References Builder, CGM, clang::Function, and getSVEType().

Referenced by EmitAArch64SVEBuiltinExpr().

◆ EmitSVEPMull()

Value * CodeGenFunction::EmitSVEPMull ( const SVETypeFlags & TypeFlags,
llvm::SmallVectorImpl< llvm::Value * > & Ops,
unsigned BuiltinID )

◆ EmitSVEPredicateCast()

◆ EmitSVEPredicateTupleCast()

Value * CodeGenFunction::EmitSVEPredicateTupleCast ( llvm::Value * PredTuple,
llvm::StructType * Ty )

Definition at line 3912 of file ARM.cpp.

References Builder, clang::cast(), EmitSVEPredicateCast(), and clang::Value::getType().

Referenced by EmitAArch64SVEBuiltinExpr().

◆ EmitSVEPrefetchLoad()

Value * CodeGenFunction::EmitSVEPrefetchLoad ( const SVETypeFlags & TypeFlags,
SmallVectorImpl< llvm::Value * > & Ops,
unsigned BuiltinID )

◆ EmitSVEReinterpret()

Value * CodeGenFunction::EmitSVEReinterpret ( llvm::Value * Val,
llvm::Type * Ty )

Definition at line 4380 of file ARM.cpp.

References Builder.

Referenced by EmitAArch64SVEBuiltinExpr(), and EmitSVEPMull().

◆ EmitSVEScatterStore()

Value * CodeGenFunction::EmitSVEScatterStore ( const SVETypeFlags & TypeFlags,
llvm::SmallVectorImpl< llvm::Value * > & Ops,
unsigned IntID )

◆ EmitSVEStructLoad()

Value * CodeGenFunction::EmitSVEStructLoad ( const SVETypeFlags & TypeFlags,
SmallVectorImpl< llvm::Value * > & Ops,
unsigned IntID )

Definition at line 4072 of file ARM.cpp.

References Builder, CGM, EmitSVEPredicateCast(), clang::Function, and getSVEType().

Referenced by EmitAArch64SVEBuiltinExpr().

◆ EmitSVEStructStore()

Value * CodeGenFunction::EmitSVEStructStore ( const SVETypeFlags & TypeFlags,
SmallVectorImpl< llvm::Value * > & Ops,
unsigned IntID )

Definition at line 4087 of file ARM.cpp.

References Builder, CGM, EmitSVEPredicateCast(), clang::Function, and getSVEType().

Referenced by EmitAArch64SVEBuiltinExpr().

◆ EmitSVETupleCreate()

Value * CodeGenFunction::EmitSVETupleCreate ( const SVETypeFlags & TypeFlags,
llvm::Type * ReturnType,
ArrayRef< llvm::Value * > Ops )

Definition at line 4452 of file ARM.cpp.

References Builder, and clang::SVETypeFlags::isTupleCreate().

Referenced by EmitAArch64SVEBuiltinExpr().

◆ EmitSVETupleSetOrGet()

Value * CodeGenFunction::EmitSVETupleSetOrGet ( const SVETypeFlags & TypeFlags,
ArrayRef< llvm::Value * > Ops )

◆ EmitSwitchStmt()

◆ EmitSynthesizedCXXCopyCtor()

◆ EmitSynthesizedCXXCopyCtorCall()

◆ EmitSystemZBuiltinExpr()

◆ EmitTargetBuiltinExpr()

Value * CodeGenFunction::EmitTargetBuiltinExpr ( unsigned BuiltinID,
const CallExpr * E,
ReturnValueSlot ReturnValue )

EmitTargetBuiltinExpr - Emit the given builtin call.

Returns 0 if the call is unhandled by the current target.

Definition at line 137 of file CGBuiltin.cpp.

References EmitTargetArchBuiltinExpr(), getContext(), getTarget(), and ReturnValue.

Referenced by EmitBuiltinExpr().

◆ EmitToMemory()

llvm::Value * CodeGenFunction::EmitToMemory ( llvm::Value * Value,
QualType Ty )

EmitToMemory - Change a scalar value from its value representation to its in-memory representation.

Converts a scalar value from its primary IR type (as returned by ConvertType) to its load/store type (as returned by convertTypeForLoadStore).

Definition at line 2153 of file CGExpr.cpp.

References Builder, convertTypeForLoadStore(), emitBoolVecConversion(), clang::Type::getAs(), clang::Value::getType(), clang::Type::hasBooleanRepresentation(), clang::Type::isBitIntType(), clang::Type::isExtVectorBoolType(), clang::Type::isSignedIntegerOrEnumerationType(), and clang::Signed.

Referenced by EmitBuiltinExpr(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), EmitNontemporalStore(), EmitStoreOfScalar(), and EmitToInt().

◆ EmitTrapCall()

llvm::CallInst * CodeGenFunction::EmitTrapCall ( llvm::Intrinsic::ID IntrID)

Emit a call to trap or debugtrap and attach function attribute "trap-func-name" if specified.

Definition at line 4213 of file CGExpr.cpp.

References Builder, CGM, getLLVMContext(), and InNoMergeAttributedStmt.

Referenced by EmitAArch64MultiVersionResolver(), EmitBuiltinExpr(), EmitCXXThrowExpr(), EmitDestructorBody(), EmitRISCVMultiVersionResolver(), EmitX86BuiltinExpr(), EmitX86MultiVersionResolver(), and GenerateCode().

◆ EmitTrapCheck()

void CodeGenFunction::EmitTrapCheck ( llvm::Value * Checked,
SanitizerHandler CheckHandlerID,
bool NoMerge = false,
const TrapReason * TR = nullptr )

◆ EmitTypeCheck() [1/3]

void clang::CodeGen::CodeGenFunction::EmitTypeCheck ( TypeCheckKind TCK,
SourceLocation Loc,
Address Addr,
QualType Type,
CharUnits Alignment = CharUnits::Zero(),
SanitizerSet SkippedChecks = SanitizerSet(),
llvm::Value * ArraySize = nullptr )
inline

◆ EmitTypeCheck() [2/3]

◆ EmitTypeCheck() [3/3]

◆ EmitTypeMetadataCodeForVCall()

void CodeGenFunction::EmitTypeMetadataCodeForVCall ( const CXXRecordDecl * RD,
llvm::Value * VTable,
SourceLocation Loc )

If whole-program virtual table optimization is enabled, emit an assumption that VTable is a member of RD's type identifier.

Or, if vptr CFI is enabled, emit a check that VTable is a member of RD's type identifier.

Definition at line 2769 of file CGClass.cpp.

References Builder, CFITCK_VCall, CGM, EmitVTablePtrCheckForCall(), and SanOpts.

◆ EmitUnaryOpLValue()

◆ EmitUnPromotedValue()

ComplexPairTy CodeGenFunction::EmitUnPromotedValue ( ComplexPairTy result,
QualType PromotionType )

◆ EmitUnreachable()

void CodeGenFunction::EmitUnreachable ( SourceLocation Loc)

Emit a reached-unreachable diagnostic if Loc is valid and runtime checking is enabled.

Otherwise, just emit an unreachable instruction.

Definition at line 4128 of file CGExpr.cpp.

References Builder, EmitCheck(), EmitCheckSourceLocation(), and SanOpts.

Referenced by EmitBuiltinExpr(), EmitCall(), and EmitFunctionEpilog().

◆ EmitUnsupportedLValue()

LValue CodeGenFunction::EmitUnsupportedLValue ( const Expr * E,
const char * Name )

EmitUnsupportedLValue - Emit a dummy l-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).

Definition at line 1564 of file CGExpr.cpp.

References ConvertType(), ErrorUnsupported(), clang::Expr::getType(), MakeAddrLValue(), clang::CharUnits::One(), and clang::CodeGen::CodeGenTypeCache::UnqualPtrTy.

Referenced by EmitCastLValue(), and EmitConditionalOperatorLValue().

◆ EmitUnsupportedRValue()

RValue CodeGenFunction::EmitUnsupportedRValue ( const Expr * E,
const char * Name )

EmitUnsupportedRValue - Emit a dummy r-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).

Definition at line 1558 of file CGExpr.cpp.

References ErrorUnsupported(), clang::Expr::getType(), and GetUndefRValue().

◆ EmitVAArg()

RValue CodeGenFunction::EmitVAArg ( VAArgExpr * VE,
Address & VAListAddr,
AggValueSlot Slot = AggValueSlot::ignored() )

Generate code to get an argument from the passed in pointer and update it accordingly.

Parameters
VEThe VAArgExpr for which to generate code.
VAListAddrReceives a reference to the va_list as emitted by either EmitVAListRef or EmitMSVAListRef.
Returns
A pointer to the argument.

Definition at line 6262 of file CGCall.cpp.

References CGM, EmitMSVAListRef(), EmitVAListRef(), EmitVariablyModifiedType(), and clang::Type::isVariablyModifiedType().

◆ EmitVAArgExprLValue()

LValue CodeGenFunction::EmitVAArgExprLValue ( const VAArgExpr * E)

Definition at line 6272 of file CGExpr.cpp.

References EmitAggExprToLValue().

◆ EmitVAListRef()

Address CodeGenFunction::EmitVAListRef ( const Expr * E)

◆ EmitVarAnnotations()

void CodeGenFunction::EmitVarAnnotations ( const VarDecl * D,
llvm::Value * V )

Emit local annotations for the local variable V, declared by D.

Definition at line 2725 of file CodeGenFunction.cpp.

References CGM, EmitAnnotationCall(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::Decl::specific_attrs(), and V.

Referenced by EmitAutoVarAlloca(), and EmitParmDecl().

◆ EmitVarDecl()

◆ EmitVariablyModifiedType()

◆ EmitVAStartEnd()

Value * CodeGenFunction::EmitVAStartEnd ( llvm::Value * ArgValue,
bool IsStart )

Emits a call to an LLVM variable-argument intrinsic, either llvm.va_start or llvm.va_end.

Parameters
ArgValueA reference to the va_list as emitted by either EmitVAListRef or EmitMSVAListRef.
IsStartIf true, emits a call to llvm.va_start; otherwise, calls llvm.va_end.

Definition at line 900 of file CGBuiltin.cpp.

References Builder, and CGM.

Referenced by EmitBuiltinExpr().

◆ EmitVTableAssumptionLoad()

◆ EmitVTableAssumptionLoads()

void CodeGenFunction::EmitVTableAssumptionLoads ( const CXXRecordDecl * ClassDecl,
Address This )

Emit assumption load for all bases.

Requires to be called only on most-derived class and not under construction of the object.

Definition at line 2396 of file CGClass.cpp.

References CGM, EmitVTableAssumptionLoad(), and getVTablePointers().

Referenced by EmitCXXConstructorCall().

◆ EmitVTablePtrCheck()

◆ EmitVTablePtrCheckForCall()

void CodeGenFunction::EmitVTablePtrCheckForCall ( const CXXRecordDecl * RD,
llvm::Value * VTable,
CFITypeCheckKind TCK,
SourceLocation Loc )

EmitVTablePtrCheckForCall - Virtual method MD is being called via VTable.

If vptr CFI is enabled, emit a check that VTable is valid.

Definition at line 2820 of file CGClass.cpp.

References EmitVTablePtrCheck(), LeastDerivedClassWithSameLayout(), SanitizerInfoFromCFICheckKind(), and SanOpts.

Referenced by EmitCXXMemberOrOperatorMemberCallExpr(), and EmitTypeMetadataCodeForVCall().

◆ EmitVTablePtrCheckForCast()

void CodeGenFunction::EmitVTablePtrCheckForCast ( QualType T,
Address Derived,
bool MayBeNull,
CFITypeCheckKind TCK,
SourceLocation Loc )

Derived is the presumed address of an object of type T after a cast.

If T is a polymorphic class type, emit a check that the virtual table for Derived belongs to a class derived from T.

Definition at line 2834 of file CGClass.cpp.

References Builder, CGM, clang::CPlusPlus, createBasicBlock(), EmitBlock(), clang::CodeGen::Address::emitRawPointer(), EmitVTablePtrCheck(), getLangOpts(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), LeastDerivedClassWithSameLayout(), SanitizerInfoFromCFICheckKind(), SanOpts, and clang::T.

Referenced by EmitCastLValue(), and EmitPointerWithAlignment().

◆ EmitVTableTypeCheckedLoad()

llvm::Value * CodeGenFunction::EmitVTableTypeCheckedLoad ( const CXXRecordDecl * RD,
llvm::Value * VTable,
llvm::Type * VTableTy,
uint64_t VTableByteOffset )

Emit a type checked load from the given vtable.

Definition at line 2951 of file CGClass.cpp.

References Builder, CGM, EmitCheck(), EmitSanitizerStatReport(), getContext(), clang::NamedDecl::getQualifiedNameAsString(), SanOpts, and clang::T.

◆ EmitWebAssemblyBuiltinExpr()

◆ EmitWhileStmt()

◆ EmitWithOriginalRHSBitfieldAssignment()

llvm::Value * CodeGenFunction::EmitWithOriginalRHSBitfieldAssignment ( const BinaryOperator * E,
llvm::Value ** Previous,
QualType * SrcType )

Retrieve the implicit cast expression of the rhs in a binary operator expression by passing pointers to Value and QualType This is used for implicit bitfield conversion checks, which must compare with the value before potential truncation.

Definition at line 5128 of file CGExprScalar.cpp.

References EmitScalarConversion(), EmitScalarExpr(), clang::BinaryOperator::getRHS(), and Previous.

Referenced by EmitBinaryOperatorLValue().

◆ EmitWritebacks()

void CodeGenFunction::EmitWritebacks ( const CallArgList & Args)

EmitWriteback - Emit callbacks for function.

Definition at line 4849 of file CGCall.cpp.

References emitWriteback(), and clang::CodeGen::CallArgList::writebacks().

Referenced by EmitCall(), and handleHlslSplitdouble().

◆ EmitX86BuiltinExpr()

Value * CodeGenFunction::EmitX86BuiltinExpr ( unsigned BuiltinID,
const CallExpr * E )

Definition at line 737 of file X86.cpp.

References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, clang::And, clang::Asm, Builder, clang::C, clang::Call, clang::cast(), CGM, ConvertType(), createBasicBlock(), CreateMemTemp(), CurFn, clang::Data, EmitMSVCBuiltinExpr(), EmitPointerWithAlignment(), EmitScalarExpr(), EmitScalarFMAExpr(), EmitScalarOrConstFoldImmArg(), EmitTrapCall(), EmitX86CompressExpand(), EmitX86CompressStore(), EmitX86ConvertIntToFp(), EmitX86ConvertToMask(), EmitX86CvtF16ToFloatExpr(), EmitX86ExpandLoad(), EmitX86FMAExpr(), EmitX86FunnelShift(), EmitX86MaskedCompare(), EmitX86MaskedCompareResult(), EmitX86MaskedLoad(), EmitX86MaskedStore(), EmitX86MaskLogic(), EmitX86Muldq(), EmitX86ScalarSelect(), EmitX86Select(), EmitX86SExtMask(), EmitX86Ternlog(), EmitX86vpcom(), clang::Error, clang::Function, clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::Type::getAs(), clang::ASTContext::GetBuiltinType(), getContext(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), getLLVMContext(), getMaskVecValue(), clang::CallExpr::getNumArgs(), clang::Type::getPointeeType(), clang::CodeGen::RawAddress::getPointer(), getTarget(), clang::CodeGen::Address::getType(), clang::Expr::getType(), clang::Value::getType(), getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8Ty, INTRINSIC_X86_XSAVE_ID, clang::CodeGen::CodeGenTypeCache::IntTy, clang::Or, clang::Result, translateX86ToMsvcIntrin(), clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::Zero.

Referenced by EmitTargetArchBuiltinExpr().

◆ EmitX86MultiVersionResolver()

void CodeGenFunction::EmitX86MultiVersionResolver ( llvm::Function * Resolver,
ArrayRef< FMVResolverOption > Options )

◆ enableDebugInfo()

void clang::CodeGen::CodeGenFunction::enableDebugInfo ( )
inline

Definition at line 2152 of file CodeGenFunction.h.

◆ EnsureInsertPoint()

void clang::CodeGen::CodeGenFunction::EnsureInsertPoint ( )
inline

EnsureInsertPoint - Ensure that an insertion point is defined so that emitted IR has a place to go.

Note that by definition, if this function creates a block then that block is unreachable; callers may do better to detect when no insertion point is defined and simply skip IR generation.

Definition at line 2660 of file CodeGenFunction.h.

References createBasicBlock(), EmitBlock(), and HaveInsertPoint().

Referenced by EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitCall(), EmitCompoundStmtWithoutScope(), EmitStmt(), emitTargetRegion(), and EmitVariablyModifiedType().

◆ enterByrefCleanup()

void CodeGenFunction::enterByrefCleanup ( CleanupKind Kind,
Address Addr,
BlockFieldFlags Flags,
bool LoadBlockVarAddr,
bool CanThrow )

Enter a cleanup to destroy a __block variable.

Note that this cleanup should be a no-op if the variable hasn't left the stack yet; if a cleanup is required for the variable itself, that needs to be done externally.

Parameters
KindCleanup kind.
AddrWhen LoadBlockVarAddr is false, the address of the __block structure that will be passed to _Block_object_dispose. When LoadBlockVarAddr is true, the address of the field of the block structure that holds the address of the __block structure.
FlagsThe flag that will be passed to _Block_object_dispose.
LoadBlockVarAddrIndicates whether we need to emit a load from Addr to get the address of the __block structure.

Definition at line 2882 of file CGBlocks.cpp.

References clang::Addr, CanThrow(), and EHStack.

Referenced by EmitAutoVarCleanups(), and pushCaptureCleanup().

◆ EnterCXXTryStmt()

◆ EnterDtorCleanups()

void CodeGenFunction::EnterDtorCleanups ( const CXXDestructorDecl * DD,
CXXDtorType DtorType )

EnterDtorCleanups - Enter the cleanups necessary to complete the given phase of destruction for a destructor.

Emit all code that comes at the end of class's destructor.

The end result should call destructors on members and base classes in reverse order of their construction.

This is to call destructors on members and base classes in reverse order of their construction.

For a deleting destructor, this also handles the case where a destroying operator delete completely overrides the definition.

Definition at line 1857 of file CGClass.cpp.

References clang::CXXRecordDecl::bases(), CGM, clang::Dtor_Base, clang::Dtor_Complete, clang::Dtor_Deleting, clang::CodeGen::EHCleanup, EHStack, EmitBranchThroughCleanup(), EmitDeleteCall(), clang::RecordDecl::fields(), getCleanupKind(), getContext(), getDestroyer(), clang::CXXRecordDecl::getNumVBases(), clang::CXXDestructorDecl::getOperatorDelete(), clang::CXXMethodDecl::getParent(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::FunctionDecl::isDestroyingOperatorDelete(), clang::CXXRecordDecl::isEmpty(), clang::CXXRecordDecl::isPolymorphic(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CodeGen::NormalAndEHCleanup, ReturnBlock, SanOpts, clang::ast_matchers::type, and clang::CXXRecordDecl::vbases().

Referenced by EmitDestructorBody().

◆ EnterSEHTryStmt()

◆ ErrorUnsupported()

void CodeGenFunction::ErrorUnsupported ( const Stmt * S,
const char * Type )

ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet.

Definition at line 2166 of file CodeGenFunction.cpp.

References CGM, and clang::CodeGen::Type.

Referenced by EmitBuiltinExpr(), EmitMSVCBuiltinExpr(), EmitUnsupportedLValue(), and EmitUnsupportedRValue().

◆ EvaluateExprAsBool()

◆ ExitCXXTryStmt()

◆ ExitSEHTryStmt()

◆ FinishFunction()

void CodeGenFunction::FinishFunction ( SourceLocation EndLoc = SourceLocation())

FinishFunction - Complete IR generation of the current function.

It is legal to call this function even if there is no current insertion point.

Definition at line 368 of file CodeGenFunction.cpp.

References AllocaInsertPt, Builder, clang::cast(), CGM, ConvergenceTokenStack, clang::CodeGen::ApplyDebugLocation::CreateDefaultArtificial(), CurCodeDecl, CurFn, CurFnInfo, DeferredDeactivationCleanupStack, EHResumeBlock, EHStack, EmitBlock(), EmitEndEHSpec(), EmitFunctionEpilog(), EmitIfUsed(), EmitReturnBlock(), getContext(), getDebugInfo(), clang::CodeGen::Address::invalid(), isCoroutine(), LifetimeExtendedCleanupStack, NormalCleanupDest, PopCleanupBlocks(), PrologueCleanupDepth, ReturnBlock, ReturnValue, and ShouldInstrumentFunction().

Referenced by createAtExitStub(), createTLSAtExitStub(), EmitCfiCheckFail(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitDestructorsFunction(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), FinishThunk(), generateAwaitSuspendWrapper(), GenerateBlockFunction(), generateBuiltinOSLogHelperFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), GenerateObjCSetter(), GenerateOpenMPCapturedStmtFunction(), GenerateSEHFilterFunction(), and GenerateSEHFinallyFunction().

◆ FinishThunk()

void CodeGenFunction::FinishThunk ( )

Definition at line 295 of file CGVTables.cpp.

References CurCodeDecl, CurFuncDecl, and FinishFunction().

Referenced by EmitCallAndReturnForThunk(), and EmitMustTailThunk().

◆ FlattenAccessAndType()

◆ generateAwaitSuspendWrapper()

◆ GenerateBlockFunction()

llvm::Function * CodeGenFunction::GenerateBlockFunction ( GlobalDecl GD,
const CGBlockInfo & Info,
const DeclMapTy & ldm,
bool IsLambdaConversionToBlock,
bool BuildGlobalBlock )

◆ generateBuiltinOSLogHelperFunction()

◆ GenerateCapturedStmtArgument()

Address CodeGenFunction::GenerateCapturedStmtArgument ( const CapturedStmt & S)

◆ GenerateCapturedStmtFunction()

◆ GenerateCode()

void CodeGenFunction::GenerateCode ( GlobalDecl GD,
llvm::Function * Fn,
const CGFunctionInfo & FnInfo )

◆ GenerateCopyHelperFunction()

llvm::Constant * CodeGenFunction::GenerateCopyHelperFunction ( const CGBlockInfo & blockInfo)

Generate the copy-helper function for a block closure object: static void block_copy_helper(block_t *dst, block_t *src); The runtime will have previously initialized 'dst' by doing a bit-copy of 'src'.

Note that this copies an entire block closure object to the heap; it should not be confused with a 'byref copy helper', which moves the contents of an individual __block variable to the heap.

Definition at line 1925 of file CGBlocks.cpp.

References clang::CodeGen::AddressDiscriminatedPointerAuth, clang::CodeGen::ARCStrong, clang::CodeGen::ARCWeak, clang::CodeGen::CGBlockInfo::BlockAlign, clang::CodeGen::BlockObject, Builder, clang::C, callCStructCopyConstructor(), clang::CodeGen::CGBlockInfo::Capture::Cap, clang::CodeGen::CGBlockInfo::CapturesNonExternalType, clang::cast(), CGM, clang::CodeGen::CGBlockInfo::Capture::CopyFlags, clang::CodeGen::CGBlockInfo::Capture::CopyKind, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CXXRecord, EmitARCCopyWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitNounwindRuntimeCall(), EmitPointerAuthCopy(), clang::CodeGen::Address::emitRawPointer(), EmitRuntimeCallOrInvoke(), EmitSynthesizedCXXCopyCtor(), FinishFunction(), clang::Func, GetAddrOfLocalVar(), clang::CodeGen::BlockFieldFlags::getBitMask(), getContext(), getCopyDestroyHelperFuncName(), clang::BlockDecl::Capture::getCopyExpr(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::CodeGen::Address::getPointerIfNotSigned(), clang::ValueDecl::getType(), clang::BlockDecl::Capture::getVariable(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::PointerAuthQualifier::isAddressDiscriminated(), clang::BlockDecl::Capture::isByRef(), clang::CodeGen::CGBlockInfo::Capture::isConstantOrTrivial(), clang::QualType::isDestructedType(), MakeAddrLValue(), needsEHCleanup(), clang::CodeGen::None, clang::CodeGen::NonTrivialCStruct, clang::Other, pushCaptureCleanup(), setBlockHelperAttributesVisibility(), clang::CodeGen::CGBlockInfo::SortedCaptures, StartFunction(), clang::CodeGen::CGBlockInfo::StructureType, and clang::CodeGen::Type.

Referenced by buildCopyHelper().

◆ GenerateCXXGlobalCleanUpFunc()

void CodeGenFunction::GenerateCXXGlobalCleanUpFunc ( llvm::Function * Fn,
ArrayRef< std::tuple< llvm::FunctionType *, llvm::WeakTrackingVH, llvm::Constant * > > DtorsOrStermFinalizers )

◆ GenerateCXXGlobalInitFunc()

◆ GenerateCXXGlobalVarDeclInitFunc()

◆ generateDestroyHelper()

llvm::Function * CodeGenFunction::generateDestroyHelper ( Address addr,
QualType type,
Destroyer * destroyer,
bool useEHCleanupForArray,
const VarDecl * VD )

◆ GenerateDestroyHelperFunction()

◆ GenerateObjCAtomicGetterCopyHelperFunction()

llvm::Constant * CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction ( const ObjCPropertyImplDecl * PID)

Definition at line 3833 of file CGObjC.cpp.

References clang::QualType::addConst(), clang::CXXConstructExpr::arg_begin(), clang::CXXConstructExpr::arg_end(), clang::C, clang::cast(), CGM, ConvertTypeForMem(), clang::CPlusPlus, clang::CXXConstructExpr::Create(), clang::FunctionDecl::Create(), clang::ParmVarDecl::Create(), clang::UnaryOperator::Create(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), EmitAnyExpr(), FinishFunction(), clang::CodeGen::AggValueSlot::forAddr(), clang::CXXConstructExpr::getConstructionKind(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), getLangOpts(), clang::CodeGen::getNonTrivialCStructCopyConstructor(), clang::Type::getPointeeType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CXXConstructExpr::hadMultipleCandidates(), clang::ObjCRuntime::hasAtomicCopyHelper(), hasTrivialGetExpr(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CXXConstructExpr::isElidable(), clang::CXXConstructExpr::isListInitialization(), clang::QualType::isNonTrivialToPrimitiveCopy(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isRecordType(), clang::CXXConstructExpr::isStdInitListInitialization(), clang::QualType::isVolatileQualified(), clang::ObjCPropertyAttribute::kind_atomic, clang::OK_Ordinary, clang::QualType::PCK_Struct, clang::CXXConstructExpr::requiresZeroInitialization(), clang::SC_None, clang::SC_Static, StartFunction(), clang::VK_LValue, and clang::VK_PRValue.

◆ GenerateObjCAtomicSetterCopyHelperFunction()

◆ GenerateObjCCtorDtorMethod()

◆ GenerateObjCGetter()

void CodeGenFunction::GenerateObjCGetter ( ObjCImplementationDecl * IMP,
const ObjCPropertyImplDecl * PID )

GenerateObjCGetter - Synthesize an Objective-C property getter function.

Generate an Objective-C property getter function.

The given Decl must be an ObjCImplementationDecl. @synthesize is illegal within a category.

Definition at line 1049 of file CGObjC.cpp.

References CGM, FinishFunction(), generateObjCGetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getEndLoc(), clang::ObjCPropertyImplDecl::getGetterMethodDecl(), and StartObjCMethod().

◆ generateObjCGetterBody()

void CodeGenFunction::generateObjCGetterBody ( const ObjCImplementationDecl * classImpl,
const ObjCPropertyImplDecl * propImpl,
const ObjCMethodDecl * GetterMothodDecl,
llvm::Constant * AtomicHelperFn )

Definition at line 1135 of file CGObjC.cpp.

References clang::CodeGen::CallArgList::add(), AutoreleaseResult, Builder, callCStructCopyConstructor(), CGM, ConvertType(), clang::ReturnStmt::Create(), EmitAggregateCopy(), EmitARCLoadWeak(), emitARCRetainLoadOfScalar(), EmitCall(), emitCmdValueForGetterSetterBody(), emitCPPObjectAtomicGetterCall(), EmitIvarOffsetAsPointerDiff(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLValueForIvar(), EmitPointerAuthInfo(), emitPointerAuthResign(), clang::CodeGen::Address::emitRawPointer(), EmitReturnStmt(), EmitStoreOfComplex(), emitStructGetterCall(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::ObjCImplDecl::getClassInterface(), getContext(), getEvaluationKind(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), clang::ObjCPropertyImplDecl::getGetterMethodDecl(), getLangOpts(), getLLVMContext(), clang::Qualifiers::getObjCLifetime(), getOverlapForReturnValue(), clang::QualType::getPointerAuth(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::CodeGen::LValue::getQuals(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCPropertyDecl::getType(), clang::ValueDecl::getType(), getTypes(), hasTrivialGetExpr(), clang::QualType::isNonTrivialToPrimitiveCopy(), clang::Type::isReferenceType(), LoadObjCSelf(), MakeAddrLValue(), clang::Qualifiers::OCL_Weak, clang::QualType::PCK_Struct, ReturnValue, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::ASTContext::toBits(), TypeOfSelfObject(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::Address::withElementType().

Referenced by GenerateObjCGetter().

◆ GenerateObjCMethod()

void CodeGenFunction::GenerateObjCMethod ( const ObjCMethodDecl * OMD)

Generate an Objective-C method.

An Objective-C method is a C function with its pointer, name, and types registered in the class structure.

Definition at line 807 of file CGObjC.cpp.

References clang::cast(), CurFn, EmitCompoundStmtWithoutScope(), FinishFunction(), clang::ObjCMethodDecl::getBody(), clang::Decl::getBodyRBrace(), clang::ObjCMethodDecl::getClassInterface(), incrementProfileCounter(), clang::isa(), and StartObjCMethod().

Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().

◆ GenerateObjCSetter()

void CodeGenFunction::GenerateObjCSetter ( ObjCImplementationDecl * IMP,
const ObjCPropertyImplDecl * PID )

GenerateObjCSetter - Synthesize an Objective-C property setter function for the given property.

Generate an Objective-C property setter function.

The given Decl must be an ObjCImplementationDecl. @synthesize is illegal within a category.

Definition at line 1672 of file CGObjC.cpp.

References CGM, FinishFunction(), generateObjCSetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getEndLoc(), clang::ObjCPropertyImplDecl::getSetterMethodDecl(), and StartObjCMethod().

◆ generateObjCSetterBody()

void CodeGenFunction::generateObjCSetterBody ( const ObjCImplementationDecl * classImpl,
const ObjCPropertyImplDecl * propImpl,
llvm::Constant * AtomicHelperFn )

Definition at line 1468 of file CGObjC.cpp.

References clang::CodeGen::CallArgList::add(), AllocaInsertPt, Builder, callCStructMoveAssignmentOperator(), CGM, clang::BinaryOperator::Create(), DeactivateCleanupBlock(), EmitCall(), emitCmdValueForGetterSetterBody(), emitCPPObjectAtomicSetterCall(), EmitIvarOffsetAsPointerDiff(), EmitLValueForIvar(), EmitPointerAuthInfo(), emitPointerAuthResign(), EmitStmt(), emitStructSetterCall(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::ObjCImplDecl::getClassInterface(), getContext(), getLLVMContext(), clang::QualType::getNonReferenceType(), clang::QualType::getPointerAuth(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCPropertyImplDecl::getSetterCXXAssignment(), clang::ObjCPropertyImplDecl::getSetterMethodDecl(), clang::Expr::getType(), clang::ObjCPropertyDecl::getType(), clang::ValueDecl::getType(), getTypes(), clang::QualType::getUnqualifiedType(), hasTrivialSetExpr(), clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::QualType::isNonTrivialToPrimitiveCopy(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), LoadObjCSelf(), MakeAddrLValue(), clang::OK_Ordinary, clang::ImplicitCastExpr::OnStack, clang::ObjCMethodDecl::param_begin(), clang::QualType::PCK_Struct, TypeOfSelfObject(), UseOptimizedSetter(), clang::VK_LValue, clang::VK_PRValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::CodeGen::Address::withElementType().

Referenced by GenerateObjCSetter().

◆ GenerateOpenMPCapturedStmtFunction()

◆ GenerateOpenMPCapturedVars()

◆ GenerateSEHFilterFunction()

llvm::Function * CodeGenFunction::GenerateSEHFilterFunction ( CodeGenFunction & ParentCGF,
const SEHExceptStmt & Except )

Create a stub filter function that will ultimately hold the code of the filter expression.

The EH preparation passes in LLVM will outline the code from the main function body into this stub.

Definition at line 2080 of file CGException.cpp.

References Builder, ConvertType(), CurFn, EmitScalarExpr(), FinishFunction(), getContext(), clang::Stmt::getEndLoc(), clang::SEHExceptStmt::getFilterExpr(), clang::Expr::getType(), clang::Type::isSignedIntegerType(), ParentCGF, ReturnValue, and startOutlinedSEHHelper().

Referenced by EnterSEHTryStmt().

◆ GenerateSEHFinallyFunction()

llvm::Function * CodeGenFunction::GenerateSEHFinallyFunction ( CodeGenFunction & ParentCGF,
const SEHFinallyStmt & Finally )

◆ generateThunk()

void CodeGenFunction::generateThunk ( llvm::Function * Fn,
const CGFunctionInfo & FnInfo,
GlobalDecl GD,
const ThunkInfo & Thunk,
bool IsUnprototyped )

Generate a thunk for the given method.

Definition at line 462 of file CGVTables.cpp.

References CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), EmitCallAndReturnForThunk(), getLLVMContext(), and StartThunk().

◆ GenerateVarArgsThunk()

◆ GetAArch64SVEProcessedOperands()

◆ getAccessedFieldNo()

unsigned CodeGenFunction::getAccessedFieldNo ( unsigned Idx,
const llvm::Constant * Elts )
static

getAccessedFieldNo - Given an encoded value and a result number, return the input field number being accessed.

Definition at line 706 of file CGExpr.cpp.

References clang::cast().

Referenced by EmitExtVectorElementLValue(), EmitLoadOfExtVectorElementLValue(), and EmitStoreThroughExtVectorComponentLValue().

◆ GetAddressOfBaseClass()

◆ GetAddressOfDerivedClass()

◆ GetAddressOfDirectBaseInCompleteClass()

Address CodeGenFunction::GetAddressOfDirectBaseInCompleteClass ( Address This,
const CXXRecordDecl * Derived,
const CXXRecordDecl * Base,
bool BaseIsVirtual )

GetAddressOfBaseOfCompleteClass - Convert the given pointer to a complete class to the given direct base.

Gets the address of a direct base class within a complete object.

This should only be used for (1) non-virtual bases or (2) virtual bases when the type is known to be complete (e.g. in complete destructors).

The object pointed to by 'This' is assumed to be non-null.

Definition at line 216 of file CGClass.cpp.

References Builder, ConvertType(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::CodeGen::CodeGenTypeCache::Int8Ty, and V.

Referenced by EmitBaseInitializer().

◆ GetAddrOfBlockDecl()

◆ GetAddrOfLabel()

llvm::BlockAddress * CodeGenFunction::GetAddrOfLabel ( const LabelDecl * L)

◆ GetAddrOfLocalVar()

Address clang::CodeGen::CodeGenFunction::GetAddrOfLocalVar ( const VarDecl * VD)
inline

GetAddrOfLocalVar - Return the address of a local variable.

Definition at line 3030 of file CodeGenFunction.h.

Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CGObjCRuntime::canMessageReceiverBeNull(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), EmitCfiCheckFail(), emitCmdValueForGetterSetterBody(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), EmitCoroutineBody(), EmitDelegateCallArg(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDestructorsFunction(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitMemberInitializer(), EmitMustTailThunk(), EmitObjCMessageExpr(), EmitOMPAggregateReduction(), EmitOMPFirstprivateClause(), EmitOMPLastprivateClauseFinal(), EmitOMPLastprivateClauseInit(), EmitOMPLinearClause(), EmitOMPPrivateClause(), EmitOMPReductionClauseInit(), EmitOMPTaskgroupDirective(), EmitOMPTaskLoopBasedDirective(), emitOutlinedFunctionPrologue(), emitPrivatesInit(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), generateAwaitSuspendWrapper(), generateBuiltinOSLogHelperFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateDestroyHelperFunction(), generateObjCSetterBody(), GenerateOpenMPCapturedStmtFunction(), clang::CodeGen::CGOpenMPRuntime::getParameterAddress(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), clang::CodeGen::CGCXXABI::loadIncomingCXXThis(), mapParam(), processInReduction(), and tryRemoveRetainOfSelf().

◆ getARCCleanupKind()

CleanupKind clang::CodeGen::CodeGenFunction::getARCCleanupKind ( )
inline

Retrieves the default cleanup kind for an ARC cleanup.

Except under -fobjc-arc-eh, ARC cleanups are normal-only.

Definition at line 4908 of file CodeGenFunction.h.

References CGM, clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.

Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), emitBuiltinOSLogFormat(), EmitObjCConsumeObject(), EmitParmDecl(), pushTemporaryCleanup(), and StartObjCMethod().

◆ getArrayInitIndex()

llvm::Value * clang::CodeGen::CodeGenFunction::getArrayInitIndex ( )
inline

Get the index of the current ArrayInitLoopExpr, if any.

Definition at line 3050 of file CodeGenFunction.h.

◆ getAsNaturalAddressOf()

Address CodeGenFunction::getAsNaturalAddressOf ( Address Addr,
QualType PointeeTy )

◆ getAsNaturalPointerTo()

◆ getBlockByrefInfo()

const BlockByrefInfo & CodeGenFunction::getBlockByrefInfo ( const VarDecl * D)

◆ getBundlesForFunclet()

SmallVector< llvm::OperandBundleDef, 1 > CodeGenFunction::getBundlesForFunclet ( llvm::Value * Callee)

◆ getCleanupKind()

◆ getContext()

ASTContext & clang::CodeGen::CodeGenFunction::getContext ( ) const
inline

Definition at line 2145 of file CodeGenFunction.h.

References CGM.

Referenced by AddInitializerToStaticVarDecl(), authPointerToPointerCast(), authPointerToPointerCast(), BuildFunctionArgList(), clang::CodeGen::CGCXXABI::buildThisParam(), callCStructCopyAssignmentOperator(), callCStructCopyConstructor(), callCStructDefaultConstructor(), callCStructDestructor(), callCStructMoveAssignmentOperator(), callCStructMoveConstructor(), canEmitDelegateCallArgs(), canEmitSpuriousReferenceToVariable(), CanSkipVTablePointerInitialization(), castToBase(), castValueFromUintptr(), castValueToType(), CheckAggExprForMemSetUse(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), CheckAtomicAlignment(), checkIfLoopMustProgress(), CodeGenFunction(), ConstantFoldsToSimpleInteger(), ConvertType(), createAtExitStub(), CreateIRTemp(), CreateMemTemp(), CreateMemTempWithoutCast(), createReferenceTemporary(), createTLSAtExitStub(), defaultInitNonTrivialCStructVar(), EmitAArch64BuiltinExpr(), EmitAArch64MultiVersionResolver(), EmitAArch64TblBuiltinExpr(), emitAddrOfFieldStorage(), emitAddrOfVarFromArray(), emitAddrOfZeroSizeField(), EmitAggregateCopy(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitAlignedClause(), EmitAMDGPUBuiltinExpr(), EmitAndRegisterVariableArrayDimensions(), EmitARMBuiltinExpr(), EmitArrayDelete(), emitArrayLength(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), emitArraySubscriptGEP(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), EmitAsmStores(), EmitAtomicCmpXchg128ForMSIntrin(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicExpr(), EmitAtomicStore(), EmitAttributedStmt(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBinaryAtomicPost(), EmitBlockCallExpr(), EmitBlockCopyAndAutorelease(), emitBody(), EmitBuiltinExpr(), EmitBuiltinNewDeleteCall(), emitBuiltinOSLogFormat(), emitByrefStructureInit(), EmitCall(), EmitCall(), EmitCallArgs(), EmitCallExprLValue(), EmitCapturedLocals(), EmitCaseStmt(), EmitCaseStmtRange(), EmitCastLValue(), EmitCfiCheckFail(), EmitCfiCheckStub(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), emitCmdValueForGetterSetterBody(), EmitCoawaitLValue(), EmitCommonNeonBuiltinExpr(), EmitComplexPrePostIncDec(), EmitCompoundStmt(), EmitCoroutineBody(), EmitCoroutineIntrinsic(), EmitCountedByBoundsChecking(), EmitCoyieldLValue(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXConstructorCall(), EmitCXXConstructorCall(), EmitCXXDeleteExpr(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberCallExpr(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXTypeidExpr(), EmitDecl(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitDeclRefLValue(), emitDeclTargetVarDeclLValue(), EmitDelegateCallArg(), EmitDeleteCall(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitDestroy(), EmitDirectCallee(), emitDispatchForLoopBounds(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), EmitFromMemory(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitGlobalVarDeclLValue(), EmitIgnoredExpr(), EmitInheritedCXXConstructorCall(), clang::CodeGen::ReductionCodeGen::emitInitialization(), EmitISOVolatileLoad(), EmitISOVolatileStore(), EmitIvarOffsetAsPointerDiff(), EmitLambdaBlockInvokeBody(), EmitLambdaInAllocaCallOpBody(), EmitLambdaStaticInvokeBody(), emitLibraryCall(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForLambdaField(), emitMappingInformation(), EmitMemberExpr(), EmitMemberInitializer(), EmitMultiVersionResolver(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitNVPTXBuiltinExpr(), EmitObjCBoxedExpr(), EmitObjCForCollectionStmt(), EmitObjCIvarRefLValue(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPAtomicRMW(), EmitOMPCopyinClause(), EmitOMPDistributeLoop(), EmitOMPFirstprivateClause(), EmitOMPLastprivateClauseInit(), EmitOMPLinearClauseFinal(), EmitOMPLinearClauseInit(), EmitOMPPrivateLoopCounters(), EmitOMPReductionClauseInit(), EmitOMPSharedLValue(), EmitOMPSimdFinal(), EmitOMPTargetTaskBasedDirective(), EmitOMPTaskBasedDirective(), EmitOMPTaskDirective(), EmitOMPTaskLoopBasedDirective(), EmitOMPUnrollDirective(), EmitOMPUseDeviceAddrClause(), EmitOMPUseDevicePtrClause(), EmitOMPWorksharingLoop(), EmitOrigPointerRValue(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitParmDecl(), emitPartialArrayDestroy(), EmitPointerArithmetic(), emitPointerArithmetic(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), emitPrivatesInit(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), EmitReturnStmt(), EmitRISCVBuiltinExpr(), EmitRISCVCpuSupports(), EmitRISCVMultiVersionResolver(), EmitScalarOrConstFoldImmArg(), EmitScalarRangeCheck(), EmitSEHExceptionCodeSave(), EmitStaticVarDecl(), EmitStoreOfScalar(), emitStructGetterCall(), emitStructSetterCall(), emitSuspendExpression(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtor(), EmitSystemZBuiltinExpr(), EmitTargetBuiltinExpr(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), EmitUnaryOpLValue(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::CodeGen::EmitVAArgInstr(), EmitVAListRef(), EmitVariablyModifiedType(), EmitVTablePtrCheck(), EmitVTableTypeCheckedLoad(), EmitWebAssemblyBuiltinExpr(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), EmitX86BuiltinExpr(), EmitX86MultiVersionResolver(), EnterDtorCleanups(), EnterSEHTryStmt(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), EvaluateExprAsBool(), FinishFunction(), FlattenAccessAndType(), generateAwaitSuspendWrapper(), GenerateBlockFunction(), generateBuiltinOSLogHelperFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateOpenMPCapturedVars(), GenerateSEHFilterFunction(), GetAArch64SVEProcessedOperands(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), GetAlignedMapping(), getAllocatorVal(), getArrayIndexingBound(), getBlockByrefInfo(), getCaptureFieldType(), GetCountedByFieldExprGEP(), clang::CodeGen::CGOpenMPRuntimeGPU::getDefaultDistScheduleAndChunk(), clang::CodeGen::CGOpenMPRuntime::getDefaultScheduleAndChunk(), clang::CodeGen::CGOpenMPRuntimeGPU::getDefaultScheduleAndChunk(), getFieldOffsetInBits(), getIdentStringFromSourceLocation(), getItaniumDynamicCastFn(), GetNumNonZeroBytesInInit(), clang::CodeGen::CGOpenMPRuntime::getNumTeamsExprForTargetDirective(), getNumThreads(), clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective(), getOverlapForBaseInit(), getOverlapForFieldInit(), getPointerAndSize(), getRangeForType(), getSpecConstantFunction(), getTypeSize(), getUBSanFunctionTypeHash(), clang::CodeGen::getVAListElementType(), getVLAElements1D(), getVLASize(), getVLASize(), getVTablePointers(), GetVTTParameter(), InitCapturedStruct(), isCheapEnoughToEvaluateUnconditionally(), isPointerKnownNonNull(), isSimpleZero(), isUnderlyingBasePointerConstantNull(), LoadObjCSelf(), LoadPassedObjectSize(), loadToBegin(), LookupNeonLLVMIntrinsic(), LValueIsSuitableForInlineAtomic(), MakeAddrLValue(), MakeAddrLValueWithoutTBAA(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), MakeRawAddrLValue(), maybeCreateMCDCCondBitmap(), performTypeAdjustment(), processInReduction(), setBlockContextParameter(), ShouldEmitVTableTypeCheckedLoad(), StartFunction(), startOutlinedSEHHelper(), tryEmitAsConstant(), tryToConvertMemberExprToDeclRefExpr(), and TypeOfSelfObject().

◆ GetCountedByFieldExprGEP()

◆ getCurrentProfileCount()

uint64_t CodeGenFunction::getCurrentProfileCount ( )

Get the profiler's current count.

This is generally the count for the most recently incremented counter.

Definition at line 1575 of file CodeGenPGO.cpp.

Referenced by EmitBlockWithFallThrough(), EmitBranchOnBoolExpr(), EmitDoStmt(), EmitIfStmt(), and EmitObjCForCollectionStmt().

◆ getDebugInfo()

◆ getDebugInfoFIndex()

unsigned CodeGenFunction::getDebugInfoFIndex ( const RecordDecl * Rec,
unsigned FieldIndex )

Get the record field index as represented in debug info.

Get the field index in the debug info.

The debug info structure/union will ignore the unnamed bitfields.

Definition at line 5170 of file CGExpr.cpp.

References clang::RecordDecl::fields(), and clang::RecordDecl::getDefinition().

Referenced by EmitLValueForField(), and emitPreserveStructAccess().

◆ GetDestForLoopControlStmt()

auto CodeGenFunction::GetDestForLoopControlStmt ( const LoopControlStmt & S)

Definition at line 1735 of file CGStmt.cpp.

Referenced by EmitBreakStmt(), and EmitContinueStmt().

◆ getDestroyer()

◆ getEHDispatchBlock()

◆ getEHResumeBlock()

◆ getEHSelectorSlot()

Address CodeGenFunction::getEHSelectorSlot ( )

◆ getEltType()

llvm::Type * CodeGenFunction::getEltType ( const SVETypeFlags & TypeFlags)

Definition at line 3752 of file ARM.cpp.

References Builder, and clang::SVETypeFlags::getEltType().

Referenced by SVEBuiltinMemEltTy().

◆ getEvaluationKind()

◆ getExceptionFromSlot()

llvm::Value * CodeGenFunction::getExceptionFromSlot ( )

Returns the contents of the function's exception object and selector slots.

Definition at line 438 of file CGException.cpp.

References Builder, and getExceptionSlot().

Referenced by emitFilterDispatchBlock(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), getEHResumeBlock(), getTerminateHandler(), and InitCatchParam().

◆ getExceptionSlot()

Address CodeGenFunction::getExceptionSlot ( )

Returns a pointer to the function's exception object and selector slot, which is assigned in every landing pad.

Definition at line 426 of file CGException.cpp.

References CreateTempAlloca(), ExceptionSlot, clang::CodeGen::CodeGenTypeCache::getPointerAlign(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.

Referenced by EmitLandingPad(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), emitWasmCatchPadBlock(), and getExceptionFromSlot().

◆ getFuncletEHDispatchBlock()

◆ GetIndirectGotoBlock()

llvm::BasicBlock * CodeGenFunction::GetIndirectGotoBlock ( )

◆ getInvokeDest()

llvm::BasicBlock * clang::CodeGen::CodeGenFunction::getInvokeDest ( )
inline

◆ getInvokeDestImpl()

◆ getIsCounterPair()

std::pair< bool, bool > CodeGenFunction::getIsCounterPair ( const Stmt * S) const

Definition at line 1527 of file CodeGenPGO.cpp.

◆ getJumpDestForLabel()

CodeGenFunction::JumpDest CodeGenFunction::getJumpDestForLabel ( const LabelDecl * S)

◆ getJumpDestInCurrentScope() [1/2]

JumpDest clang::CodeGen::CodeGenFunction::getJumpDestInCurrentScope ( llvm::BasicBlock * Target)
inline

◆ getJumpDestInCurrentScope() [2/2]

JumpDest clang::CodeGen::CodeGenFunction::getJumpDestInCurrentScope ( StringRef Name = StringRef())
inline

The given basic block lies in the current EH scope, but may be a target of a potentially scope-crossing jump; get a stable handle to which we can perform this jump later.

Definition at line 1289 of file CodeGenFunction.h.

References createBasicBlock(), and getJumpDestInCurrentScope().

◆ getLangOpts()

const LangOptions & clang::CodeGen::CodeGenFunction::getLangOpts ( ) const
inline

Definition at line 2158 of file CodeGenFunction.h.

References CGM.

Referenced by AddInitializerToStaticVarDecl(), canEmitSpuriousReferenceToVariable(), CheckAggExprForMemSetUse(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), checkForLastprivateConditionalUpdate(), checkIfFunctionMustProgress(), checkIfLoopMustProgress(), checkTargetFeatures(), CodeGenFunction(), EmitAggregateCopy(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitAsmStmt(), EmitAtomicOp(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAttributedStmt(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitBlockCallExpr(), EmitBoundsCheck(), EmitBuiltinAlignTo(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), EmitCall(), EmitCallArg(), EmitCastLValue(), emitCommonSimdLoop(), EmitComplexAssignmentLValue(), EmitComplexPrePostIncDec(), EmitCompoundLiteralLValue(), EmitCountedByBoundsChecking(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitDeclRefLValue(), EmitDelegateCallArg(), EmitDestructorBody(), EmitEndEHSpec(), EmitForwardingCallToLambda(), EmitFunctionEpilog(), EmitGlobalVarDeclLValue(), EmitHLSLBuiltinExpr(), EmitLabelStmt(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalFinalUpdate(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfLValue(), EmitLoadOfScalar(), EmitLValueForFieldInitialization(), EmitMemberExpr(), EmitNullInitialization(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), EmitOMPCanonicalLoop(), EmitOMPCopyinClause(), EmitOMPFirstprivateClause(), EmitOMPLastprivateClauseFinal(), EmitOMPLastprivateClauseInit(), EmitOMPLoopBody(), EmitOMPScanDirective(), EmitOMPSimdInit(), EmitParmDecl(), EmitPointerArithmetic(), EmitPointerToDataMemberBinaryExpr(), EmitReturnStmt(), EmitSehCppScopeBegin(), EmitSehCppScopeEnd(), EmitSehTryScopeBegin(), EmitSehTryScopeEnd(), EmitSEHTryStmt(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitStmt(), EmitStoreOfScalar(), EmitTargetArchBuiltinExpr(), EmitUnaryOpLValue(), EmitVTablePtrCheckForCast(), EnterCXXTryStmt(), ExitSEHTryStmt(), FindFlexibleArrayMemberField(), GenerateBlockFunction(), GenerateCode(), GenerateCXXGlobalInitFunc(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective(), getRangeForType(), getTerminateHandler(), getTerminateLandingPad(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), initializeAlloca(), needsEHCleanup(), PopCleanupBlock(), pushCaptureCleanup(), pushTemporaryCleanup(), setBlockContextParameter(), SetDivFPAccuracy(), SetSqrtFPAccuracy(), StartFunction(), tryEmitARCRetainLoadOfScalar(), tryEmitSpecializedAllocInit(), UpdateAsmCallInst(), and ~CodeGenFunction().

◆ getLLVMContext()

llvm::LLVMContext & clang::CodeGen::CodeGenFunction::getLLVMContext ( )
inline

Definition at line 2189 of file CodeGenFunction.h.

References CGM.

Referenced by createBasicBlock(), clang::CodeGen::TargetCodeGenInfo::createEnqueuedBlockKernel(), createPlaceholderSlot(), createReferenceTemporary(), EmitAArch64BuiltinExpr(), EmitAArch64CompareBuiltinExpr(), EmitAArch64SVEBuiltinExpr(), emitAlignedClause(), EmitAMDGPUBuiltinExpr(), EmitARMBuiltinExpr(), EmitAsmStmt(), EmitAsmStores(), EmitAtomicCmpXchg128ForMSIntrin(), EmitAtomicExpr(), emitAtomicLibcall(), EmitAtomicOp(), emitAutoreleasedReturnValueMarker(), EmitBinaryAtomicPost(), EmitBitCountExpr(), EmitBranchOnBoolExpr(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), EmitCall(), EmitCall(), emitCatchPadBlock(), EmitCfiSlowPathCheck(), EmitCheck(), emitCheckHandlerCall(), EmitCheckTypeDescriptor(), EmitCheckValue(), EmitCommonNeonBuiltinExpr(), EmitComplexPrePostIncDec(), EmitCoroutineIntrinsic(), EmitCXXConstructorCall(), EmitCXXGlobalVarDeclInit(), EmitDeclRefLValue(), EmitExtVectorElementExpr(), EmitFunctionProlog(), emitGlobalDtorWithCXAAtExit(), EmitHLSLBuiltinExpr(), EmitISOVolatileLoad(), EmitLoadOfReference(), EmitLValueForField(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), EmitMSVCBuiltinExpr(), EmitMSVCRTSetJmp(), EmitObjCCollectionLiteral(), EmitParmDecl(), EmitPPCBuiltinExpr(), emitPPCLoadReserveIntrinsic(), EmitRISCVBuiltinExpr(), EmitScalarOrConstFoldImmArg(), EmitScalarRangeCheck(), EmitSEHExceptionCodeSave(), emitSincosBuiltin(), EmitSVEMaskedLoad(), EmitSVEMaskedStore(), EmitSVEPredicateCast(), EmitSwitchStmt(), EmitSystemZBuiltinExpr(), EmitTrapCall(), EmitTrapCheck(), EmitTypeCheck(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::emitVoidPtrVAArg(), EmitVTablePtrCheck(), emitWasmCatchPadBlock(), EmitWebAssemblyBuiltinExpr(), EmitX86BitTestIntrinsic(), EmitX86BuiltinExpr(), EmitX86CvtF16ToFloatExpr(), EmitX86MaskedCompareResult(), FlattenAccessAndType(), GenerateCXXGlobalCleanUpFunc(), generateObjCGetterBody(), generateObjCSetterBody(), generateThunk(), GetAArch64SVEProcessedOperands(), getAsmSrcLocInfo(), getBlockByrefInfo(), getItaniumDynamicCastFn(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), getUnreachableBlock(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), ProcessOrderScopeAMDGCN(), setBlockContextParameter(), SetFPAccuracy(), StartFunction(), and UpdateAsmCallInst().

◆ getNonTrivialCopyConstructorStr()

std::string CodeGenFunction::getNonTrivialCopyConstructorStr ( QualType QT,
CharUnits Alignment,
bool IsVolatile,
ASTContext & Ctx )
static

Definition at line 876 of file CGNonTrivialStruct.cpp.

Referenced by getBlockCaptureStr().

◆ getNonTrivialDestructorStr()

std::string CodeGenFunction::getNonTrivialDestructorStr ( QualType QT,
CharUnits Alignment,
bool IsVolatile,
ASTContext & Ctx )
static

Definition at line 882 of file CGNonTrivialStruct.cpp.

Referenced by getBlockCaptureStr().

◆ getNormalCleanupDestSlot()

RawAddress CodeGenFunction::getNormalCleanupDestSlot ( )

◆ getOMPCancelDestination()

◆ getOrCreateOpaqueLValueMapping()

LValue CodeGenFunction::getOrCreateOpaqueLValueMapping ( const OpaqueValueExpr * e)

Given an opaque value expression, return its LValue mapping if it exists, otherwise create one.

Definition at line 5870 of file CGExpr.cpp.

References EmitLValue(), clang::OpaqueValueExpr::getSourceExpr(), clang::OpaqueValueExpr::isUnique(), and clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().

Referenced by EmitOpaqueValueLValue(), and emitSuspendExpression().

◆ getOrCreateOpaqueRValueMapping()

RValue CodeGenFunction::getOrCreateOpaqueRValueMapping ( const OpaqueValueExpr * e)

Given an opaque value expression, return its RValue mapping if it exists, otherwise create one.

Definition at line 5884 of file CGExpr.cpp.

References EmitAnyExpr(), clang::OpaqueValueExpr::getSourceExpr(), clang::OpaqueValueExpr::isUnique(), and clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().

◆ getOverlapForBaseInit()

AggValueSlot::Overlap_t CodeGenFunction::getOverlapForBaseInit ( const CXXRecordDecl * RD,
const CXXRecordDecl * BaseRD,
bool IsVirtual )

◆ getOverlapForFieldInit()

◆ getOverlapForReturnValue()

AggValueSlot::Overlap_t clang::CodeGen::CodeGenFunction::getOverlapForReturnValue ( )
inline

Determine whether a return value slot may overlap some other object.

Definition at line 2990 of file CodeGenFunction.h.

References clang::CodeGen::AggValueSlot::DoesNotOverlap.

Referenced by EmitReturnStmt(), and generateObjCGetterBody().

◆ getPostAllocaInsertPoint()

llvm::Instruction * clang::CodeGen::CodeGenFunction::getPostAllocaInsertPoint ( )
inline

Return PostAllocaInsertPt.

If it is not yet created, then insert it immediately after AllocaInsertPt.

Definition at line 435 of file CodeGenFunction.h.

References AllocaInsertPt.

◆ getProfileCount()

◆ getSelectorFromSlot()

llvm::Value * CodeGenFunction::getSelectorFromSlot ( )

Definition at line 442 of file CGException.cpp.

References Builder, and getEHSelectorSlot().

Referenced by emitCatchDispatchBlock(), emitFilterDispatchBlock(), and getEHResumeBlock().

◆ getSpecConstantFunction()

llvm::Function * clang::CodeGen::CodeGenFunction::getSpecConstantFunction ( const clang::QualType & SpecConstantType)

◆ getSVEOverloadTypes()

◆ getSVEPredType()

llvm::ScalableVectorType * CodeGenFunction::getSVEPredType ( const SVETypeFlags & TypeFlags)

Definition at line 3790 of file ARM.cpp.

References Builder, and clang::SVETypeFlags::getEltType().

Referenced by EmitSVEAllTruePred(), and getSVEOverloadTypes().

◆ getSVEType()

◆ getTarget()

◆ getTargetHooks()

◆ getTerminateFunclet()

llvm::BasicBlock * CodeGenFunction::getTerminateFunclet ( )

getTerminateLandingPad - Return a cleanup funclet that just calls terminate.

Definition at line 1594 of file CGException.cpp.

References Builder, CGM, createBasicBlock(), CurrentFuncletPad, and clang::CodeGen::EHPersonality::get().

Referenced by getFuncletEHDispatchBlock().

◆ getTerminateHandler()

llvm::BasicBlock * CodeGenFunction::getTerminateHandler ( )

getTerminateHandler - Return a handler (not a landing pad, just a catch handler) that just calls terminate.

This is used when a terminate scope encloses a try.

Definition at line 1570 of file CGException.cpp.

References Builder, CGM, clang::CPlusPlus, createBasicBlock(), getExceptionFromSlot(), and getLangOpts().

Referenced by getEHDispatchBlock().

◆ getTerminateLandingPad()

llvm::BasicBlock * CodeGenFunction::getTerminateLandingPad ( )

◆ getTypes()

◆ getTypeSize()

◆ getUBSanFunctionTypeHash()

llvm::ConstantInt * CodeGenFunction::getUBSanFunctionTypeHash ( QualType T) const

Return a type hash constant for a function instrumented by -fsanitize=function.

Definition at line 614 of file CodeGenFunction.cpp.

References CGM, clang::EST_None, getContext(), clang::ASTContext::getFunctionTypeWithExceptionSpec(), and clang::Type::isFunctionNoProtoType().

Referenced by EmitCall(), and StartFunction().

◆ GetUndefRValue()

◆ getUnreachableBlock()

llvm::BasicBlock * clang::CodeGen::CodeGenFunction::getUnreachableBlock ( )
inline

◆ getVLAElements1D() [1/2]

CodeGenFunction::VlaSizePair CodeGenFunction::getVLAElements1D ( const VariableArrayType * vla)

Return the number of elements for a single dimension for the given array type.

Definition at line 2446 of file CodeGenFunction.cpp.

References clang::ArrayType::getElementType(), clang::VariableArrayType::getSizeExpr(), and clang::CodeGen::CodeGenTypeCache::SizeTy.

Referenced by EmitAndRegisterVariableArrayDimensions(), and getVLAElements1D().

◆ getVLAElements1D() [2/2]

◆ getVLASize() [1/2]

CodeGenFunction::VlaSizePair CodeGenFunction::getVLASize ( const VariableArrayType * vla)

Returns an LLVM value that corresponds to the size, in non-variably-sized elements, of a variable length array type, plus that largest non-variably-sized element type.

Assumes that the type has already been emitted with EmitVariablyModifiedType.

Definition at line 2415 of file CodeGenFunction.cpp.

References Builder, getContext(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::ast_matchers::type.

Referenced by emitArrayLength(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitAutoVarAlloca(), EmitNullInitialization(), EmitPointerArithmetic(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), getArrayIndexingBound(), getTypeSize(), and getVLASize().

◆ getVLASize() [2/2]

◆ getVTablePointers() [1/2]

◆ getVTablePointers() [2/2]

CodeGenFunction::VPtrsVector CodeGenFunction::getVTablePointers ( const CXXRecordDecl * VTableClass)

◆ GetVTablePtr()

llvm::Value * CodeGenFunction::GetVTablePtr ( Address This,
llvm::Type * VTableTy,
const CXXRecordDecl * VTableClass,
VTableAuthMode AuthMode = VTableAuthMode::Authenticate )

◆ GetVTTParameter()

llvm::Value * CodeGenFunction::GetVTTParameter ( GlobalDecl GD,
bool ForVirtualBase,
bool Delegating )

GetVTTParameter - Return the VTT parameter that should be passed to a base constructor/destructor with virtual bases.

FIXME: VTTs are Itanium ABI-specific, so the definition should move to ItaniumCXXABI.cpp together with all the references to VTT.

Definition at line 453 of file CGClass.cpp.

References Builder, clang::cast(), CGM, CurCodeDecl, CurGD, clang::Delegating, clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::GlobalDecl::getDecl(), clang::ASTRecordLayout::getVBaseClassOffset(), LoadCXXVTT(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.

◆ hasAggregateEvaluationKind()

◆ hasLabelBeenSeenInCurrentScope()

bool clang::CodeGen::CodeGenFunction::hasLabelBeenSeenInCurrentScope ( ) const
inline

Return true if a label was seen in the current scope.

Definition at line 411 of file CodeGenFunction.h.

Referenced by EmitAutoVarAlloca().

◆ hasScalarEvaluationKind()

◆ hasVolatileMember()

bool clang::CodeGen::CodeGenFunction::hasVolatileMember ( QualType T)
inline

hasVolatileMember - returns true if aggregate type has a volatile member.

Definition at line 2983 of file CodeGenFunction.h.

References clang::T.

Referenced by EmitAggregateAssign(), and LValueIsSuitableForInlineAtomic().

◆ HaveInsertPoint()

bool clang::CodeGen::CodeGenFunction::HaveInsertPoint ( ) const
inline

HaveInsertPoint - True if an insertion point is defined.

If not, this indicates that the current code being emitted is unreachable.

Definition at line 2654 of file CodeGenFunction.h.

References Builder.

Referenced by AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OMPAllocateCleanupTy::Emit(), emitAlignedClause(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitBarrierCall(), EmitBlockWithFallThrough(), EmitBranchThroughCleanup(), EmitBreakStmt(), EmitCall(), clang::CodeGen::CGOpenMPRuntime::emitCancelCall(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), EmitCleanup(), EmitContinueStmt(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), EmitDeclStmt(), EmitDestructorBody(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchDeinit(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), clang::CodeGen::CGOpenMPRuntime::emitForOrderedIterationEnd(), clang::CodeGen::CGOpenMPRuntime::emitForStaticFinish(), emitForStaticInitCall(), EmitGotoStmt(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CGOpenMPRuntime::emitMaskedRegion(), clang::CodeGen::CGOpenMPRuntime::emitMasterRegion(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), EmitOMPCopyinClause(), EmitOMPFirstprivateClause(), EmitOMPLastprivateClauseFinal(), EmitOMPLastprivateClauseInit(), EmitOMPLinearClause(), EmitOMPLinearClauseFinal(), EmitOMPLinearClauseInit(), EmitOMPPrivateClause(), EmitOMPPrivateLoopCounters(), EmitOMPReductionClauseFinal(), EmitOMPReductionClauseInit(), EmitOMPSimdFinal(), clang::CodeGen::CGOpenMPRuntime::emitOrderedRegion(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), emitPostUpdateForReductionClause(), emitPreCond(), clang::CodeGen::CGOpenMPRuntime::emitProcBindClause(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), EmitSEHLeaveStmt(), emitSimdlenSafelenClause(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), EmitStmt(), clang::CodeGen::CGOpenMPRuntime::emitTargetCall(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskgroupRegion(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntime::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), EnsureInsertPoint(), ExitCXXTryStmt(), ExitSEHTryStmt(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), and protectFromPeepholes().

◆ incrementProfileCounter()

◆ InitCapturedStruct()

◆ initFullExprCleanup()

void clang::CodeGen::CodeGenFunction::initFullExprCleanup ( )
inline

Set up the last cleanup that was pushed as a conditional full-expression cleanup.

Definition at line 975 of file CodeGenFunction.h.

References createCleanupActiveFlag(), and initFullExprCleanupWithFlag().

Referenced by EnterNewDeleteCleanup(), and pushFullExprCleanup().

◆ initFullExprCleanupWithFlag()

void CodeGenFunction::initFullExprCleanupWithFlag ( RawAddress ActiveFlag)

Definition at line 290 of file CGCleanup.cpp.

References clang::cast(), cleanup(), and EHStack.

Referenced by initFullExprCleanup(), PopCleanupBlocks(), and pushLifetimeExtendedDestroy().

◆ InitializeVTablePointer()

◆ InitializeVTablePointers()

void CodeGenFunction::InitializeVTablePointers ( const CXXRecordDecl * ClassDecl)

◆ InsertHelper()

void CodeGenFunction::InsertHelper ( llvm::Instruction * I,
const llvm::Twine & Name,
llvm::BasicBlock::iterator InsertPt ) const

CGBuilder insert helper.

This function is called after an instruction is created using Builder.

Definition at line 2770 of file CodeGenFunction.cpp.

References IsSanitizerScope, and LoopStack.

◆ inSuspendBlock()

bool clang::CodeGen::CodeGenFunction::inSuspendBlock ( ) const
inline

Definition at line 365 of file CodeGenFunction.h.

References CurCoro, and isCoroutine().

Referenced by EmitMaterializeTemporaryExpr().

◆ isBinaryLogicalOp()

bool clang::CodeGen::CodeGenFunction::isBinaryLogicalOp ( const Expr * E) const
inline

◆ isCleanupPadScope()

bool clang::CodeGen::CodeGenFunction::isCleanupPadScope ( ) const
inline

Returns true while emitting a cleanuppad.

Definition at line 896 of file CodeGenFunction.h.

References CurrentFuncletPad, and clang::isa().

Referenced by EmitCall().

◆ IsConstructorDelegationValid()

bool CodeGenFunction::IsConstructorDelegationValid ( const CXXConstructorDecl * Ctor)
static

Checks whether the given constructor is a valid subject for the complete-to-base constructor delegation optimization, i.e.

emitting the complete constructor as a simple call to the base constructor.

Definition at line 720 of file CGClass.cpp.

References clang::Type::castAs(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXConstructorDecl::isDelegatingConstructor(), and clang::FunctionProtoType::isVariadic().

Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters(), and EmitConstructorBody().

◆ isCoroutine()

bool clang::CodeGen::CodeGenFunction::isCoroutine ( ) const
inline

Definition at line 363 of file CodeGenFunction.h.

References CurCoro.

Referenced by FinishFunction(), and inSuspendBlock().

◆ isInConditionalBranch()

bool clang::CodeGen::CodeGenFunction::isInConditionalBranch ( ) const
inline

isInConditionalBranch - Return true if we're currently emitting one branch or the other of a conditional expression.

Definition at line 1340 of file CodeGenFunction.h.

Referenced by EmitMaterializeTemporaryExpr(), EnterNewDeleteCleanup(), pushCleanupAfterFullExpr(), pushFullExprCleanup(), pushLifetimeExtendedDestroy(), setBeforeOutermostConditional(), and SetupCleanupBlockActivation().

◆ isInstrumentedCondition()

bool CodeGenFunction::isInstrumentedCondition ( const Expr * C)
static

isInstrumentedCondition - Determine whether the given condition is an instrumentable condition (i.e.

Determine whether the given condition is an instrumentable condition (i.e.

no "&&" or "||").

Definition at line 1804 of file CodeGenFunction.cpp.

References clang::C, clang::BinaryOperator::isLogicalOp(), and stripCond().

Referenced by EmitBranchOnBoolExpr(), and EmitBranchToCounterBlock().

◆ isMCDCCoverageEnabled()

bool clang::CodeGen::CodeGenFunction::isMCDCCoverageEnabled ( ) const
inline

◆ isNullPointerAllowed()

bool CodeGenFunction::isNullPointerAllowed ( TypeCheckKind TCK)
static

Determine whether the pointer type check TCK permits null pointers.

Definition at line 721 of file CGExpr.cpp.

References TCK_DowncastPointer, TCK_DynamicOperation, TCK_Upcast, and TCK_UpcastToVirtualBase.

Referenced by EmitTypeCheck().

◆ isObviouslyBranchWithoutCleanups()

bool CodeGenFunction::isObviouslyBranchWithoutCleanups ( JumpDest Dest) const

isObviouslyBranchWithoutCleanups - Return true if a branch to the specified destination obviously has no cleanups to run.

'false' is always a conservatively correct answer for this method.

Definition at line 1087 of file CGCleanup.cpp.

References EHStack, clang::CodeGen::EHScopeStack::stable_iterator::encloses(), and clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth().

Referenced by EmitCaseStmt().

◆ isOpaqueValueEmitted()

bool CodeGenFunction::isOpaqueValueEmitted ( const OpaqueValueExpr * E)

isOpaqueValueEmitted - Return true if the opaque value expression has already been emitted.

Definition at line 5897 of file CGExpr.cpp.

References clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().

Referenced by clang::CodeGen::CGHLSLRuntime::emitInitListOpaqueValues().

◆ isPointerKnownNonNull()

◆ isSEHTryScope()

bool clang::CodeGen::CodeGenFunction::isSEHTryScope ( ) const
inline

Returns true inside SEH __try blocks.

Definition at line 893 of file CodeGenFunction.h.

References SEHTryEpilogueStack.

Referenced by EmitCall(), and EmitSEHLeaveStmt().

◆ isTrivialInitializer()

bool CodeGenFunction::isTrivialInitializer ( const Expr * Init)

Determine whether the given initializer is trivial in the sense that it requires no code to be generated.

Definition at line 1808 of file CGDecl.cpp.

References clang::Constructor, and clang::Init.

Referenced by AllTrivialInitializers(), checkInitIsRequired(), EmitAutoVarInit(), emitCombinerOrInitializer(), clang::CodeGen::ReductionCodeGen::emitInitialization(), EmitOMPFirstprivateClause(), and emitPrivatesInit().

◆ isUnderlyingBasePointerConstantNull()

bool CodeGenFunction::isUnderlyingBasePointerConstantNull ( const Expr * E)

Check whether the underlying base pointer is a constant null.

Definition at line 5060 of file CGExpr.cpp.

References getContext(), clang::Expr::IgnoreParens(), and clang::ASTContext::isSentinelNullExpr().

Referenced by EmitMemberExpr(), and EmitPointerToDataMemberBinaryExpr().

◆ isVptrCheckRequired()

bool CodeGenFunction::isVptrCheckRequired ( TypeCheckKind TCK,
QualType Ty )
static

◆ IsWrappedCXXThis()

bool CodeGenFunction::IsWrappedCXXThis ( const Expr * E)
static

Check if E is a C++ "this" pointer wrapped in value-preserving casts.

Definition at line 1573 of file CGExpr.cpp.

References clang::isa().

Referenced by EmitCheckedLValue(), EmitCXXMemberOrOperatorMemberCallExpr(), and EmitMemberExpr().

◆ LoadBlockStruct()

Address CodeGenFunction::LoadBlockStruct ( )

Definition at line 1448 of file CGBlocks.cpp.

References BlockInfo, and BlockPointer.

Referenced by GenerateBlockFunction(), and GetAddrOfBlockDecl().

◆ LoadCXXThis()

llvm::Value * clang::CodeGen::CodeGenFunction::LoadCXXThis ( )
inline

LoadCXXThis - Load the value of 'this'.

This function is only valid while generating code for an C++ member function.

Definition at line 3118 of file CodeGenFunction.h.

Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), EmitAsanPrologueOrEpilogue(), EmitCallAndReturnForThunk(), EmitCtorPrologue(), EmitDestructorBody(), EmitMemberInitializer(), and LoadCXXThisAddress().

◆ LoadCXXThisAddress()

◆ LoadCXXVTT()

llvm::Value * clang::CodeGen::CodeGenFunction::LoadCXXVTT ( )
inline

LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.

Definition at line 3128 of file CodeGenFunction.h.

Referenced by GetVTTParameter().

◆ LoadObjCSelf()

llvm::Value * CodeGenFunction::LoadObjCSelf ( )

◆ LoadPassedObjectSize()

llvm::Value * CodeGenFunction::LoadPassedObjectSize ( const Expr * E,
QualType EltTy )

If E references a parameter with pass_object_size info or a constant array size modifier, emit the object size divided by the size of EltTy.

Otherwise return null.

Definition at line 963 of file CGExpr.cpp.

References Builder, clang::C, EmitLoadOfScalar(), getContext(), clang::Expr::getExprLoc(), and clang::Expr::IgnoreParenImpCasts().

Referenced by getArrayIndexingBound().

◆ LookupNeonLLVMIntrinsic()

◆ LValueIsSuitableForInlineAtomic()

bool CodeGenFunction::LValueIsSuitableForInlineAtomic ( LValue Src)

An LValue is a candidate for having its loads and stores be made atomic if we are operating under /volatile:ms and the LValue itself is volatile and performing such an operation can be performed without a libcall.

Definition at line 1536 of file CGAtomic.cpp.

References CGM, getContext(), clang::CodeGen::LValue::getType(), getTypeSize(), hasVolatileMember(), and clang::CodeGen::LValue::isVolatile().

Referenced by EmitLoadOfScalar(), and EmitStoreOfScalar().

◆ MakeAddrLValue() [1/3]

LValue clang::CodeGen::CodeGenFunction::MakeAddrLValue ( Address Addr,
QualType T,
AlignmentSource Source = AlignmentSource::Type )
inline

Definition at line 2704 of file CodeGenFunction.h.

References clang::Addr, CGM, MakeAddrLValue(), clang::T, and clang::CodeGen::Type.

Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), convertTempToRValue(), clang::CodeGen::CallArg::copyInto(), createSectionLVal(), EmitAggExprToLValue(), EmitAnyExprToMem(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitAsmStores(), emitAtomicCmpXchg(), EmitAtomicExpr(), EmitAtomicUpdateValue(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitCallExprLValue(), EmitCastLValue(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), EmitCXXConstructorCall(), EmitCXXConstructorCall(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXUuidofLValue(), EmitDeclInit(), EmitDeclRefLValue(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitExtVectorElementExpr(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitGlobalVarDeclLValue(), EmitHLSLOutArgLValues(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), EmitLoadOfPointerLValue(), EmitLoadOfReferenceLValue(), EmitLoadOfReferenceLValue(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForLambdaField(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), EmitNontemporalLoad(), EmitNontemporalStore(), EmitObjCCollectionLiteral(), EmitObjCEncodeExprLValue(), EmitObjCIsaExpr(), EmitObjCMessageExprLValue(), EmitObjCSelectorLValue(), EmitOMPCopy(), EmitOMPFirstprivateClause(), EmitOMPLastprivateClauseFinal(), EmitOMPLinearClauseInit(), emitOutlinedFunctionPrologue(), EmitParmDecl(), EmitPointerToDataMemberBinaryExpr(), EmitPPCBuiltinExpr(), EmitPredefinedLValue(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), emitPrivatesInit(), emitProxyTaskFunction(), emitPseudoObjectExpr(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), EmitReturnStmt(), EmitStmtExprLValue(), EmitStringLiteralLValue(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), EmitThreadPrivateVarDeclLValue(), EmitUnaryOpLValue(), EmitUnsupportedLValue(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::CodeGen::DefaultABIInfo::EmitVAArg(), clang::CodeGen::emitVoidPtrVAArg(), emitWritebackArg(), GenerateCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateOpenMPCapturedStmtFunction(), GenerateOpenMPCapturedVars(), GetAddrOfBlockDecl(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::CodeGen::CallArg::getRValue(), InitCapturedStruct(), InitCatchParam(), loadToBegin(), MakeAddrLValue(), MakeAddrLValue(), makeNaturalAlignAddrLValue(), and StoreAnyExprIntoOneUnit().

◆ MakeAddrLValue() [2/3]

LValue clang::CodeGen::CodeGenFunction::MakeAddrLValue ( Address Addr,
QualType T,
LValueBaseInfo BaseInfo,
TBAAAccessInfo TBAAInfo )
inline

◆ MakeAddrLValue() [3/3]

LValue clang::CodeGen::CodeGenFunction::MakeAddrLValue ( llvm::Value * V,
QualType T,
CharUnits Alignment,
AlignmentSource Source = AlignmentSource::Type )
inline

◆ MakeAddrLValueWithoutTBAA()

LValue clang::CodeGen::CodeGenFunction::MakeAddrLValueWithoutTBAA ( Address Addr,
QualType T,
AlignmentSource Source = AlignmentSource::Type )
inline

◆ makeNaturalAddressForPointer()

Address clang::CodeGen::CodeGenFunction::makeNaturalAddressForPointer ( llvm::Value * Ptr,
QualType T,
CharUnits Alignment = CharUnits::Zero(),
bool ForPointeeType = false,
LValueBaseInfo * BaseInfo = nullptr,
TBAAAccessInfo * TBAAInfo = nullptr,
KnownNonNull_t IsKnownNonNull = NotKnownNonNull )
inline

Construct an address with the natural alignment of T.

If a pointer to T is expected to be signed, the pointer passed to this function must have been signed, and the returned Address will have the pointer authentication information needed to authenticate the signed pointer.

Definition at line 2691 of file CodeGenFunction.h.

References CGM, ConvertTypeForMem(), clang::CodeGen::NotKnownNonNull, clang::T, and clang::CharUnits::Zero().

Referenced by EmitCall(), EmitCXXConstructorCall(), EmitDeclRefLValue(), EmitFunctionProlog(), EmitLoadOfPointer(), EmitLoadOfReference(), EmitPointerWithAlignment(), generateBuiltinOSLogHelperFunction(), GenerateVarArgsThunk(), clang::CodeGen::CGCXXABI::getThisAddress(), LoadCXXThisAddress(), MakeAddrLValue(), makeNaturalAlignAddrLValue(), and StartFunction().

◆ MakeNaturalAlignAddrLValue()

◆ MakeNaturalAlignPointeeAddrLValue()

LValue CodeGenFunction::MakeNaturalAlignPointeeAddrLValue ( llvm::Value * V,
QualType T )

Given a value of type T* that may not be to a complete object, construct an l-value with the natural pointee alignment of T.

Definition at line 224 of file CodeGenFunction.cpp.

References clang::T, and V.

Referenced by EmitCallExprLValue(), EmitMemberInitializer(), and EmitObjCMessageExprLValue().

◆ MakeNaturalAlignPointeeRawAddrLValue()

LValue CodeGenFunction::MakeNaturalAlignPointeeRawAddrLValue ( llvm::Value * V,
QualType T )

Same as MakeNaturalAlignPointeeAddrLValue except that the pointer is known to be unsigned.

Definition at line 235 of file CodeGenFunction.cpp.

References clang::T, and V.

◆ MakeNaturalAlignRawAddrLValue()

◆ MakeRawAddrLValue()

LValue clang::CodeGen::CodeGenFunction::MakeRawAddrLValue ( llvm::Value * V,
QualType T,
CharUnits Alignment,
AlignmentSource Source = AlignmentSource::Type )
inline

◆ markAsIgnoreThreadCheckingAtRuntime()

void CodeGenFunction::markAsIgnoreThreadCheckingAtRuntime ( llvm::Function * Fn)

Annotate the function with an attribute that disables TSan checking at runtime.

Definition at line 702 of file CodeGenFunction.cpp.

References SanOpts.

Referenced by GenerateDestroyHelperFunction(), and StartFunction().

◆ markStmtAsUsed()

void CodeGenFunction::markStmtAsUsed ( bool Skipped,
const Stmt * S )

Definition at line 1530 of file CodeGenPGO.cpp.

◆ markStmtMaybeUsed()

void CodeGenFunction::markStmtMaybeUsed ( const Stmt * S)

Definition at line 1533 of file CodeGenPGO.cpp.

◆ maybeAttachRangeForLoad()

void CodeGenFunction::maybeAttachRangeForLoad ( llvm::LoadInst * Load,
QualType Ty,
SourceLocation Loc )

Definition at line 2012 of file CGExpr.cpp.

References CGM, and EmitScalarRangeCheck().

Referenced by EmitAtomicOp(), and EmitLoadOfScalar().

◆ maybeCreateMCDCCondBitmap()

void CodeGenFunction::maybeCreateMCDCCondBitmap ( )

Allocate a temp value on the stack that MCDC can use to track condition results.

Definition at line 1537 of file CodeGenPGO.cpp.

References Builder, CreateIRTemp(), getContext(), and isMCDCCoverageEnabled().

Referenced by EmitConstructorBody(), EmitDestructorBody(), EmitFunctionBody(), and emitImplicitAssignmentOperatorBody().

◆ MaybeEmitDeferredVarDeclInit()

void CodeGenFunction::MaybeEmitDeferredVarDeclInit ( const VarDecl * var)

◆ maybeResetMCDCCondBitmap()

void CodeGenFunction::maybeResetMCDCCondBitmap ( const Expr * E)

Zero-init the MCDC temp value.

Definition at line 1543 of file CodeGenPGO.cpp.

References Builder, isBinaryLogicalOp(), and isMCDCCoverageEnabled().

◆ maybeUpdateMCDCCondBitmap()

void CodeGenFunction::maybeUpdateMCDCCondBitmap ( const Expr * E,
llvm::Value * Val )

Update the MCDC temp value with the condition's evaluated result.

Definition at line 1556 of file CodeGenPGO.cpp.

References Builder, and isMCDCCoverageEnabled().

Referenced by EmitBranchOnBoolExpr().

◆ maybeUpdateMCDCTestVectorBitmap()

void CodeGenFunction::maybeUpdateMCDCTestVectorBitmap ( const Expr * E)

Increment the profiler's counter for the given expression by StepV.

If StepV is null, the default increment is 1.

Definition at line 1549 of file CodeGenPGO.cpp.

References Builder, isBinaryLogicalOp(), and isMCDCCoverageEnabled().

◆ mergeAddressesInConditionalExpr()

Address clang::CodeGen::CodeGenFunction::mergeAddressesInConditionalExpr ( Address LHS,
Address RHS,
llvm::BasicBlock * LHSBlock,
llvm::BasicBlock * RHSBlock,
llvm::BasicBlock * MergeBlock,
QualType MergedType )
inline

◆ mightAddDeclToScope()

bool CodeGenFunction::mightAddDeclToScope ( const Stmt * S)
static

Determine if the given statement might introduce a declaration into the current scope, by being a (possibly-labelled) DeclStmt.

Definition at line 1727 of file CodeGenFunction.cpp.

References clang::Stmt::children(), clang::isa(), and mightAddDeclToScope().

Referenced by CollectStatementsForCase(), and mightAddDeclToScope().

◆ needsEHCleanup()

◆ popCatchScope()

void CodeGenFunction::popCatchScope ( )

popCatchScope - Pops the catch scope at the top of the EHScope stack, emitting any required code (other than the catch handlers themselves).

Definition at line 1206 of file CGException.cpp.

References clang::cast(), EHStack, emitCatchDispatchBlock(), and clang::CodeGen::EHScope::hasEHBranches().

Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().

◆ PopCleanupBlock()

void CodeGenFunction::PopCleanupBlock ( bool FallthroughIsBranchThrough = false,
bool ForDeactivation = false )

PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups.

Pops a cleanup block.

If the block includes a normal cleanup, the current insertion point is threaded through the cleanup, as are any branch fixups on the cleanup.

Definition at line 652 of file CGCleanup.cpp.

References Builder, clang::cast(), CGM, createBasicBlock(), createLoadInstBefore(), CreateNormalEntry(), createStoreInstBefore(), CurrentFuncletPad, currentFunctionUsesSEHTry(), Default, clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::DestinationIndex, destroyOptimisticNormalEntry(), EHStack, EmitBlock(), EmitCleanup(), EmitSehCppScopeEnd(), EmitSehTryScopeEnd(), ForDeactivation, ForwardPrebranchedFallthrough(), clang::CodeGen::EHPersonality::get(), getEHDispatchBlock(), getInvokeDest(), getLangOpts(), getNormalCleanupDestSlot(), getUnreachableBlock(), clang::CodeGen::BranchFixup::InitialBranch, clang::CodeGen::Address::invalid(), clang::CodeGen::RawAddress::invalid(), clang::isa(), clang::CodeGen::EHPersonality::isMSVCPersonality(), clang::CodeGen::EHPersonality::isMSVCXXPersonality(), clang::CodeGen::Address::isValid(), memcpy(), NormalCleanupDest, clang::CodeGen::BranchFixup::OptimisticBranchBlock, ResolveAllBranchFixups(), clang::CodeGen::EHScopeStack::ScopeStackAlignment, SimplifyCleanupEntry(), clang::Switch, and clang::CodeGen::EHPersonality::usesFuncletPads().

Referenced by DeactivateCleanupBlock(), EmitArrayDelete(), emitArrayDestroy(), EmitCall(), EmitObjectDelete(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitSEHTryStmt(), and PopCleanupBlocks().

◆ PopCleanupBlocks() [1/2]

void CodeGenFunction::PopCleanupBlocks ( EHScopeStack::stable_iterator OldCleanupStackSize,
size_t OldLifetimeExtendedStackSize,
std::initializer_list< llvm::Value ** > ValuesToReload = {} )

Takes the old cleanup stack size and emits the cleanup blocks that have been added, then adds all lifetime-extended cleanups from the given position to the stack.

Pops cleanup blocks until the given savepoint is reached, then add the cleanups from the given savepoint in the lifetime-extended cleanups stack.

Definition at line 480 of file CGCleanup.cpp.

References EHStack, clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getKind(), clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getSize(), initFullExprCleanupWithFlag(), clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::isConditional(), LifetimeExtendedCleanupStack, and PopCleanupBlocks().

◆ PopCleanupBlocks() [2/2]

void CodeGenFunction::PopCleanupBlocks ( EHScopeStack::stable_iterator OldCleanupStackSize,
std::initializer_list< llvm::Value ** > ValuesToReload = {} )

Takes the old cleanup stack size and emits the cleanup blocks that have been added.

Pops cleanup blocks until the given savepoint is reached.

Definition at line 424 of file CGCleanup.cpp.

References Builder, clang::cast(), CGM, CreateDefaultAlignTempAlloca(), clang::CodeGen::CGBuilderTy::CreateStore(), EHStack, clang::CodeGen::EHScopeStack::stable_iterator::isValid(), PopCleanupBlock(), and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().

Referenced by FinishFunction(), and PopCleanupBlocks().

◆ processInReduction()

◆ ProcessOrderScopeAMDGCN()

void CodeGenFunction::ProcessOrderScopeAMDGCN ( llvm::Value * Order,
llvm::Value * Scope,
llvm::AtomicOrdering & AO,
llvm::SyncScope::ID & SSID )

Definition at line 201 of file AMDGPU.cpp.

References clang::cast(), and getLLVMContext().

Referenced by EmitAMDGPUBuiltinExpr().

◆ protectFromPeepholes()

CodeGenFunction::PeepholeProtection CodeGenFunction::protectFromPeepholes ( RValue rvalue)

protectFromPeepholes - Protect a value that we're intending to store to the side, but which will probably be used later, from aggressive peepholing optimizations that might delete it.

Pass the result to unprotectFromPeepholes to declare that protection is no longer required.

There's no particular reason why this shouldn't apply to l-values, it's just that no existing peepholes work on pointers.

Definition at line 2631 of file CodeGenFunction.cpp.

References Builder, clang::CodeGen::RValue::getScalarVal(), HaveInsertPoint(), clang::isa(), and clang::CodeGen::RValue::isScalar().

Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind().

◆ pushCallObjectDeleteCleanup()

void CodeGenFunction::pushCallObjectDeleteCleanup ( const FunctionDecl * OperatorDelete,
llvm::Value * CompletePtr,
QualType ElementType )

Definition at line 1928 of file CGExprCXX.cpp.

References EHStack, and clang::CodeGen::NormalAndEHCleanup.

◆ pushCleanupAfterFullExpr()

template<class T, class... As>
void clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExpr ( CleanupKind Kind,
As... A )
inline

Queue a cleanup to be pushed after finishing the current full-expression, potentially with an active flag.

Definition at line 922 of file CodeGenFunction.h.

References createCleanupActiveFlag(), clang::CodeGen::RawAddress::invalid(), isInConditionalBranch(), clang::CodeGen::InvariantValue< T >::needsSaving(), pushCleanupAfterFullExprWithActiveFlag(), saveValueInCond(), and clang::T.

Referenced by emitBuiltinOSLogFormat(), and EmitMaterializeTemporaryExpr().

◆ pushCleanupAfterFullExprWithActiveFlag()

template<class T, class... As>
void clang::CodeGen::CodeGenFunction::pushCleanupAfterFullExprWithActiveFlag ( CleanupKind Kind,
RawAddress ActiveFlag,
As... A )
inline

◆ pushCleanupAndDeferDeactivation()

template<class T, class... As>
void clang::CodeGen::CodeGenFunction::pushCleanupAndDeferDeactivation ( CleanupKind Kind,
As... A )
inline

◆ pushDestroy() [1/2]

void CodeGenFunction::pushDestroy ( CleanupKind kind,
Address addr,
QualType type,
Destroyer * destroyer,
bool useEHCleanupForArray )

Definition at line 2295 of file CGDecl.cpp.

References pushFullExprCleanup(), and clang::ast_matchers::type.

◆ pushDestroy() [2/2]

◆ pushDestroyAndDeferDeactivation() [1/2]

void CodeGenFunction::pushDestroyAndDeferDeactivation ( CleanupKind cleanupKind,
Address addr,
QualType type,
Destroyer * destroyer,
bool useEHCleanupForArray )

◆ pushDestroyAndDeferDeactivation() [2/2]

void CodeGenFunction::pushDestroyAndDeferDeactivation ( QualType::DestructionKind dtorKind,
Address addr,
QualType type )

◆ PushDestructorCleanup() [1/2]

void CodeGenFunction::PushDestructorCleanup ( const CXXDestructorDecl * Dtor,
QualType T,
Address Addr )

PushDestructorCleanup - Push a cleanup to call the complete-object variant of the given destructor on the object at the given address.

Definition at line 2547 of file CGClass.cpp.

References clang::Addr, EHStack, clang::CodeGen::NormalAndEHCleanup, and clang::T.

◆ PushDestructorCleanup() [2/2]

void CodeGenFunction::PushDestructorCleanup ( QualType T,
Address Addr )

PushDestructorCleanup - Push a cleanup to call the complete-object destructor of an object of the given type at the given address.

Does nothing if T is not a C++ class type with a non-trivial destructor.

Definition at line 2552 of file CGClass.cpp.

References clang::Addr, clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::Decl::isUsed(), PushDestructorCleanup(), and clang::T.

Referenced by PushDestructorCleanup().

◆ pushEHDestroy()

void CodeGenFunction::pushEHDestroy ( QualType::DestructionKind dtorKind,
Address addr,
QualType type )

pushEHDestroy - Push the standard destructor for the given type as an EH-only cleanup.

Definition at line 2269 of file CGDecl.cpp.

References clang::CodeGen::EHCleanup, getDestroyer(), needsEHCleanup(), pushDestroy(), and clang::ast_matchers::type.

Referenced by EmitInitializerForField(), and EmitMemberInitializer().

◆ pushFullExprCleanup()

template<class T, class... As>
void clang::CodeGen::CodeGenFunction::pushFullExprCleanup ( CleanupKind kind,
As... A )
inline

pushFullExprCleanup - Push a cleanup to be run at the end of the current full-expression.

Safe against the possibility that we're currently inside a conditionally-evaluated expression.

Definition at line 904 of file CodeGenFunction.h.

References EHStack, initFullExprCleanup(), isInConditionalBranch(), saveValueInCond(), and clang::T.

Referenced by EmitAnyExprToExn(), EmitCall(), EmitCallArg(), EmitMaterializeTemporaryExpr(), EmitObjCConsumeObject(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), pushDestroy(), pushIrregularPartialArrayCleanup(), and pushRegularPartialArrayCleanup().

◆ pushIrregularPartialArrayCleanup()

void CodeGenFunction::pushIrregularPartialArrayCleanup ( llvm::Value * arrayBegin,
Address arrayEndPointer,
QualType elementType,
CharUnits elementAlign,
Destroyer * destroyer )

pushIrregularPartialArrayCleanup - Push a NormalAndEHCleanup to destroy already-constructed elements of the given array.

The cleanup may be popped with DeactivateCleanupBlock or PopCleanupBlock.

Parameters
elementType- the immediate element type of the array; possibly still an array type

Definition at line 2579 of file CGDecl.cpp.

References clang::CodeGen::NormalAndEHCleanup, and pushFullExprCleanup().

Referenced by EmitNewArrayInitializer().

◆ pushKmpcAllocFree()

void CodeGenFunction::pushKmpcAllocFree ( CleanupKind Kind,
std::pair< llvm::Value *, llvm::Value * > AddrSizePair )

Definition at line 2327 of file CGDecl.cpp.

References EHStack.

Referenced by EmitAutoVarAlloca().

◆ pushLifetimeExtendedDestroy() [1/2]

◆ pushLifetimeExtendedDestroy() [2/2]

void CodeGenFunction::pushLifetimeExtendedDestroy ( QualType::DestructionKind dtorKind,
Address addr,
QualType type )

◆ pushRegularPartialArrayCleanup()

void CodeGenFunction::pushRegularPartialArrayCleanup ( llvm::Value * arrayBegin,
llvm::Value * arrayEnd,
QualType elementType,
CharUnits elementAlign,
Destroyer * destroyer )

pushRegularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array.

The cleanup may be popped with DeactivateCleanupBlock or PopCleanupBlock.

Parameters
elementType- the immediate element type of the array; possibly still an array type

Definition at line 2595 of file CGDecl.cpp.

References clang::CodeGen::EHCleanup, and pushFullExprCleanup().

Referenced by emitArrayDestroy(), EmitCXXAggrConstructorCall(), and EmitNewArrayInitializer().

◆ pushSEHCleanup()

void CodeGenFunction::pushSEHCleanup ( CleanupKind kind,
llvm::Function * FinallyFunc )

Definition at line 2168 of file CGException.cpp.

References EHStack.

Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt().

◆ pushStackRestore()

void CodeGenFunction::pushStackRestore ( CleanupKind kind,
Address SPMem )

Definition at line 2323 of file CGDecl.cpp.

References EHStack.

Referenced by EmitAutoVarAlloca().

◆ recoverAddrOfEscapedLocal()

Address CodeGenFunction::recoverAddrOfEscapedLocal ( CodeGenFunction & ParentCGF,
Address ParentVar,
llvm::Value * ParentFP )

Recovers the address of a local in a parent function.

ParentVar is the address of the variable used in the immediate parent function. It can either be an alloca or a call to llvm.localrecover if there are nested outlined functions. ParentFP is the frame pointer of the outermost parent frame.

Definition at line 1836 of file CGException.cpp.

References AllocaInsertPt, Builder, clang::cast(), CGM, clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getBasePointer(), clang::CodeGen::Address::getName(), clang::CodeGen::Address::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::KnownNonNull, ParentCGF, and clang::CodeGen::Address::withPointer().

Referenced by EmitCapturedLocals(), and EmitSEHExceptionCodeSave().

◆ registerGlobalDtorWithAtExit() [1/2]

void CodeGenFunction::registerGlobalDtorWithAtExit ( const VarDecl & D,
llvm::FunctionCallee fn,
llvm::Constant * addr )

Call atexit() with a function that passes the given argument to the given function.

Register a global destructor using the C atexit runtime function.

Definition at line 329 of file CGDeclCXX.cpp.

References createAtExitStub(), and registerGlobalDtorWithAtExit().

Referenced by registerGlobalDtorWithAtExit().

◆ registerGlobalDtorWithAtExit() [2/2]

void CodeGenFunction::registerGlobalDtorWithAtExit ( llvm::Constant * dtorStub)

Call atexit() with function dtorStub.

Definition at line 347 of file CGDeclCXX.cpp.

References CGM, EmitNounwindRuntimeCall(), and clang::CodeGen::CodeGenTypeCache::IntTy.

◆ registerGlobalDtorWithLLVM()

void CodeGenFunction::registerGlobalDtorWithLLVM ( const VarDecl & D,
llvm::FunctionCallee fn,
llvm::Constant * addr )

Registers the dtor using 'llvm.global_dtors' for platforms that do not support an 'atexit()' function.

Register a global destructor using the LLVM 'llvm.global_dtors' global.

Definition at line 338 of file CGDeclCXX.cpp.

References clang::Addr, clang::cast(), CGM, and createAtExitStub().

◆ ResolveBranchFixups()

◆ sanitizePerformTypeCheck()

bool CodeGenFunction::sanitizePerformTypeCheck ( ) const

Whether any type-checking sanitizers are enabled.

If false, calls to EmitTypeCheck can be skipped.

Definition at line 734 of file CGExpr.cpp.

References SanOpts.

Referenced by EmitCastLValue(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXNewExpr(), EmitReferenceBindingToExpr(), EmitTypeCheck(), EmitTypeCheck(), EmitTypeCheck(), and GetAddressOfBaseClass().

◆ SanitizerAnnotateDebugInfo()

llvm::DILocation * CodeGenFunction::SanitizerAnnotateDebugInfo ( ArrayRef< SanitizerKind::SanitizerOrdinal > Ordinals,
SanitizerHandler Handler )

Returns debug info, with additional annotation if CGM.getCodeGenOpts().SanitizeAnnotateDebugInfo[Ordinal] is enabled for any of the ordinals.

Definition at line 6502 of file CGDebugInfo.cpp.

References Builder, CGM, getDebugInfo(), SanitizerHandlerToCheckLabel(), and SanitizerOrdinalToCheckLabel().

◆ saveValueInCond()

template<class T>
DominatingValue< T >::saved_type clang::CodeGen::CodeGenFunction::saveValueInCond ( T value)
inline

◆ setBeforeOutermostConditional()

void clang::CodeGen::CodeGenFunction::setBeforeOutermostConditional ( llvm::Value * value,
Address addr,
CodeGenFunction & CGF )
inline

◆ setBlockContextParameter()

◆ setCurrentProfileCount()

void CodeGenFunction::setCurrentProfileCount ( uint64_t Count)

Set the profiler's current count.

Definition at line 1569 of file CodeGenPGO.cpp.

Referenced by EmitBlockWithFallThrough(), and EmitBranchOnBoolExpr().

◆ SetDivFPAccuracy()

void CodeGenFunction::SetDivFPAccuracy ( llvm::Value * Val)

Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.

Definition at line 6678 of file CGExpr.cpp.

References CGM, getLangOpts(), clang::HIP, clang::OpenCL, and SetFPAccuracy().

◆ SetFastMathFlags()

void CodeGenFunction::SetFastMathFlags ( FPOptions FPFeatures)

Set the codegen fast-math flags.

Definition at line 125 of file CodeGenFunction.cpp.

References clang::FPOptions::allowFPContractAcrossStatement(), and Builder.

Referenced by CodeGenFunction().

◆ SetFPAccuracy()

void CodeGenFunction::SetFPAccuracy ( llvm::Value * Val,
float Accuracy )

SetFPAccuracy - Set the minimum required accuracy of the given floating point operation, expressed as the maximum relative error in ulp.

Definition at line 6646 of file CGExpr.cpp.

References clang::cast(), getLLVMContext(), and clang::isa().

Referenced by SetDivFPAccuracy(), and SetSqrtFPAccuracy().

◆ SetSqrtFPAccuracy()

void CodeGenFunction::SetSqrtFPAccuracy ( llvm::Value * Val)

Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.

Definition at line 6657 of file CGExpr.cpp.

References CGM, getLangOpts(), clang::HIP, clang::OpenCL, and SetFPAccuracy().

Referenced by EmitBuiltinExpr(), and EmitCall().

◆ ShouldEmitVTableTypeCheckedLoad()

bool CodeGenFunction::ShouldEmitVTableTypeCheckedLoad ( const CXXRecordDecl * RD)

Returns whether we should perform a type checked load when loading a virtual function for virtual calls to members of RD.

This is generally true when both vcall CFI and whole-program-vtables are enabled.

Definition at line 2934 of file CGClass.cpp.

References CGM, clang::NoSanitizeList::containsType(), getContext(), clang::ASTContext::getNoSanitizeList(), clang::NamedDecl::getQualifiedNameAsString(), and SanOpts.

◆ ShouldInstrumentFunction()

bool CodeGenFunction::ShouldInstrumentFunction ( )

ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls.

Definition at line 575 of file CodeGenFunction.cpp.

References CGM, and CurFuncDecl.

Referenced by FinishFunction(), and StartFunction().

◆ ShouldNullCheckClassCastValue()

bool CodeGenFunction::ShouldNullCheckClassCastValue ( const CastExpr * Cast)
static

◆ ShouldSkipSanitizerInstrumentation()

bool CodeGenFunction::ShouldSkipSanitizerInstrumentation ( )

ShouldSkipSanitizerInstrumentation - Return true if the current function should not be instrumented with sanitizers.

Definition at line 585 of file CodeGenFunction.cpp.

References CurFuncDecl.

Referenced by StartFunction().

◆ shouldUseFusedARCCalls()

bool clang::CodeGen::CodeGenFunction::shouldUseFusedARCCalls ( )
inline

Definition at line 2154 of file CodeGenFunction.h.

References CGM.

Referenced by EmitARCStoreStrong(), and emitAutoreleaseOfResult().

◆ ShouldXRayInstrumentFunction()

bool CodeGenFunction::ShouldXRayInstrumentFunction ( ) const

ShouldXRayInstrument - Return true if the current function should be instrumented with XRay nop sleds.

Definition at line 593 of file CodeGenFunction.cpp.

References CGM.

Referenced by EmitBuiltinExpr(), and StartFunction().

◆ SimplifyForwardingBlocks()

void CodeGenFunction::SimplifyForwardingBlocks ( llvm::BasicBlock * BB)

SimplifyForwardingBlocks - If the given basic block is only a branch to another basic block, simplify it.

This assumes that no other code could potentially reference the basic block.

Definition at line 630 of file CGStmt.cpp.

References EHStack.

Referenced by EmitDoStmt(), and EmitWhileStmt().

◆ SourceLocToDebugLoc()

llvm::DebugLoc CodeGenFunction::SourceLocToDebugLoc ( SourceLocation Location)

Converts Location to a DebugLoc, if debug information is enabled.

Definition at line 3244 of file CodeGenFunction.cpp.

References getDebugInfo().

Referenced by EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitOMPInnerLoop(), EmitOMPUnrollDirective(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), and EmitWhileStmt().

◆ StartFunction()

void CodeGenFunction::StartFunction ( GlobalDecl GD,
QualType RetTy,
llvm::Function * Fn,
const CGFunctionInfo & FnInfo,
const FunctionArgList & Args,
SourceLocation Loc = SourceLocation(),
SourceLocation StartLoc = SourceLocation() )

Emit code for the start of a function.

Parameters
LocThe location to be associated with the function.
StartLocThe location of the function body.

Definition at line 758 of file CodeGenFunction.cpp.

References clang::Addr, AllocaInsertPt, clang::ProfileList::Allow, AutoreleaseResult, clang::FunctionEffect::Blocking, Builder, clang::cast(), CGM, ConvergenceTokenStack, ConvertType(), clang::CPlusPlus, createBasicBlock(), CreateDefaultAlignTempAlloca(), CreateIRTemp(), clang::CUDA, CurCodeDecl, CurFn, CurFnInfo, CurFuncDecl, CurFuncIsThunk, CurSEHParent, clang::CodeGen::Decl, EHStack, EmitFunctionProlog(), EmitLoadOfLValue(), EmitLValueForLambdaField(), EmitStartEHSpec(), EmitTypeCheck(), EmitVariablyModifiedType(), endsWithReturn(), clang::RecordDecl::fields(), FnRetTy, clang::ProfileList::Forbid, clang::XRayInstrKind::FunctionEntry, clang::XRayInstrKind::FunctionExit, clang::Type::getAs(), clang::Decl::getASTContext(), clang::Decl::getAttr(), clang::FunctionDecl::getBody(), clang::CXXRecordDecl::getCaptureFields(), getContext(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::LangOptions::getDefaultRoundingMode(), clang::FunctionDecl::getFunctionEffects(), clang::ASTContext::getFunctionFeatureMap(), getJumpDestInCurrentScope(), getLangOpts(), getLLVMContext(), clang::Decl::getNonClosureContext(), clang::FunctionDecl::getOverloadedOperator(), clang::CXXMethodDecl::getParent(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), getPrologueSignature(), clang::CodeGen::RValue::getScalarVal(), clang::Stmt::getStmtClass(), getTarget(), clang::ASTContext::getTargetInfo(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), getUBSanFunctionTypeHash(), clang::TargetInfo::getVScaleRange(), clang::ASTContext::hasAnyFunctionEffects(), clang::Decl::hasAttr(), hasScalarEvaluationKind(), clang::HIP, clang::HLSL, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Address::invalid(), clang::isa(), clang::IsArmStreamingFunction(), clang::CXXRecordDecl::isCapturelessLambda(), clang::CXXMethodDecl::isImplicitObjectMemberFunction(), clang::CXXRecordDecl::isLambda(), clang::isLambdaCallOperator(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::Type::isObjCRetainableType(), clang::CXXMethodDecl::isStatic(), clang::IdentifierInfo::isStr(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::CodeGen::KnownNonNull, LambdaCaptureFields, LambdaThisCaptureField, makeNaturalAddressForPointer(), markAsIgnoreThreadCheckingAtRuntime(), matchesStlAllocatorFn(), clang::FunctionEffect::NonBlocking, clang::NonNull, clang::TargetInfo::NotStreaming, clang::OMF_dealloc, clang::OMF_initialize, clang::OpenCL, PrologueCleanupDepth, ReturnBlock, ReturnValue, ReturnValuePointer, SanOpts, clang::SanitizerSet::set(), ShouldInstrumentFunction(), ShouldSkipSanitizerInstrumentation(), ShouldXRayInstrumentFunction(), clang::ProfileList::Skip, clang::FunctionType::SME_PStateSMCompatibleMask, clang::Decl::specific_attrs(), clang::TargetInfo::Streaming, clang::TargetInfo::StreamingCompatible, clang::T, TCK_ConstructorCall, TCK_MemberCall, clang::ToConstrainedExceptMD(), UINT_MAX, clang::FunctionDecl::UsesFPIntrin(), and clang::FunctionDecl::usesSEHTry().

Referenced by createAtExitStub(), createTLSAtExitStub(), EmitCfiCheckFail(), emitCombinerOrInitializer(), emitCopyprivateCopyFunction(), emitDestructorsFunction(), emitOutlinedFunctionPrologue(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), emitTaskDupFunction(), emitTaskPrivateMappingFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), generateAwaitSuspendWrapper(), GenerateBlockFunction(), generateBuiltinOSLogHelperFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), StartObjCMethod(), startOutlinedSEHHelper(), and StartThunk().

◆ StartObjCMethod()

◆ startOutlinedSEHHelper()

void CodeGenFunction::startOutlinedSEHHelper ( CodeGenFunction & ParentCGF,
bool IsFilter,
const Stmt * OutlinedStmt )

◆ StartThunk()

◆ stripCond()

const Expr * CodeGenFunction::stripCond ( const Expr * C)
static

Ignore parentheses and logical-NOT to track conditions consistently.

Strip parentheses and simplistic logical-NOT operators.

Definition at line 1793 of file CodeGenFunction.cpp.

References clang::C.

Referenced by clang::CodeGen::CodeGenPGO::emitMCDCCondBitmapUpdate(), and isInstrumentedCondition().

◆ SVEBuiltinMemEltTy()

llvm::Type * CodeGenFunction::SVEBuiltinMemEltTy ( const SVETypeFlags & TypeFlags)

SVEBuiltinMemEltTy - Returns the memory element type for this memory access builtin.

Only required if it can't be inferred from the base pointer operand.

Definition at line 3736 of file ARM.cpp.

References Builder, getEltType(), and clang::SVETypeFlags::getMemEltType().

Referenced by EmitSMELd1St1(), EmitSVEGatherLoad(), EmitSVEGatherPrefetch(), EmitSVEPrefetchLoad(), and EmitSVEScatterStore().

◆ tryEmitAsConstant() [1/2]

CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant ( const DeclRefExpr * RefExpr)

◆ tryEmitAsConstant() [2/2]

CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant ( const MemberExpr * ME)

Definition at line 1961 of file CGExpr.cpp.

References tryEmitAsConstant(), and tryToConvertMemberExprToDeclRefExpr().

◆ TypeOfSelfObject()

◆ unprotectFromPeepholes()

void CodeGenFunction::unprotectFromPeepholes ( PeepholeProtection protection)

◆ unregisterGlobalDtorWithUnAtExit()

llvm::Value * CodeGenFunction::unregisterGlobalDtorWithUnAtExit ( llvm::Constant * dtorStub)

Call unatexit() with function dtorStub.

Definition at line 365 of file CGDeclCXX.cpp.

References clang::cast(), CGM, EmitNounwindRuntimeCall(), and clang::CodeGen::CodeGenTypeCache::IntTy.

◆ vectorWrapScalar16()

Value * CodeGenFunction::vectorWrapScalar16 ( llvm::Value * Op)

◆ VolatilizeTryBlocks()

void CodeGenFunction::VolatilizeTryBlocks ( llvm::BasicBlock * BB,
llvm::SmallPtrSet< llvm::BasicBlock *, 10 > & V )

Definition at line 1700 of file CGException.cpp.

References Builder, SEHTryEpilogueStack, V, and VolatilizeTryBlocks().

Referenced by EmitSEHTryStmt(), and VolatilizeTryBlocks().

◆ CGCXXABI

friend class CGCXXABI
friend

Definition at line 251 of file CodeGenFunction.h.

References CGCXXABI.

Referenced by CGCXXABI.

Member Data Documentation

◆ AllocaInsertPt

◆ AutoreleaseResult

bool clang::CodeGen::CodeGenFunction::AutoreleaseResult = false

In ARC, whether we should autorelease the return value.

Definition at line 580 of file CodeGenFunction.h.

Referenced by EmitCallAndReturnForThunk(), EmitFunctionEpilog(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and StartFunction().

◆ BlockInfo

◆ BlockPointer

llvm::Value* clang::CodeGen::CodeGenFunction::BlockPointer = nullptr

◆ Builder

CGBuilderTy clang::CodeGen::CodeGenFunction::Builder

Definition at line 286 of file CodeGenFunction.h.

Referenced by AdjustObjCObjectType(), clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CallArgList::allocateArgumentMemory(), ApplyNonVirtualAndVirtualOffset(), BuildAppleKextVirtualCall(), BuildVector(), castToBase(), castValueToType(), CheckAggExprForMemSetUse(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), CodeGenFunction(), CoerceIntOrPtrToIntOrPtr(), CoerceScalableToFixed(), complexTempStructure(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::ConditionalEvaluation(), createAtExitStub(), createCleanupActiveFlag(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::TargetCodeGenInfo::createEnqueuedBlockKernel(), createPlaceholderSlot(), CreateTempAlloca(), createTLSAtExitStub(), clang::CodeGen::CatchRetScope::Emit(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OMPAllocateCleanupTy::Emit(), EmitAArch64BuiltinExpr(), EmitAArch64CompareBuiltinExpr(), EmitAArch64MultiVersionResolver(), EmitAArch64SMEBuiltinExpr(), EmitAArch64SVEBuiltinExpr(), EmitAArch64TblBuiltinExpr(), EmitAbs(), emitAddressAtOffset(), emitAddrOfFieldStorage(), emitAddrOfImagComponent(), emitAddrOfRealComponent(), emitAddrOfVarFromArray(), emitAddrOfZeroSizeField(), EmitAggregateCopy(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitAlignmentAssumption(), emitAlignmentAssumptionCheck(), EmitAMDGCNBallotForExec(), EmitAMDGPUBuiltinExpr(), EmitAMDGPUDevicePrintfCallExpr(), EmitAndRegisterVariableArrayDimensions(), EmitAnnotationCall(), emitARCCopyOperation(), EmitARCDestroyStrong(), EmitARCInitWeak(), emitARCOperationAfterCall(), EmitARCRelease(), EmitARCRetainAutorelease(), EmitARCRetainBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), emitArgumentDemotion(), EmitARMBuiltinExpr(), EmitARMMVEBuiltinExpr(), EmitArrayDelete(), emitArrayDestroy(), emitArrayLength(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), emitArraySubscriptGEP(), emitArraySubscriptGEP(), emitArraySubscriptGEP(), EmitArrayToPointerDecay(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), EmitAsmStores(), emitAtomicCmpXchg(), EmitAtomicCmpXchg128ForMSIntrin(), emitAtomicCmpXchgFailureSet(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), EmitAtomicExpr(), EmitAtomicIncrementValue(), EmitAtomicOp(), EmitAtomicOp(), emitAtomicRMWInst(), EmitAtomicStore(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAttributedStmt(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBinaryAtomicPost(), emitBinaryExpMaybeConstrainedFPBuiltin(), emitBinaryMaybeConstrainedFPBuiltin(), EmitBitCountExpr(), EmitBitfieldConversionCheck(), EmitBitTestIntrinsic(), EmitBlock(), EmitBlockAfterUses(), emitBlockByrefAddress(), EmitBlockCallExpr(), emitBodyAndFallthrough(), emitBoolVecConversion(), EmitBoundsCheckImpl(), EmitBPFBuiltinExpr(), EmitBranch(), EmitBranchOnBoolExpr(), EmitBranchThroughCleanup(), EmitBuiltinAlignTo(), EmitBuiltinAvailable(), EmitBuiltinExpr(), EmitBuiltinIsAligned(), emitBuiltinOSLogFormat(), emitBuiltinWithOneOverloadedType(), emitByrefStructureInit(), EmitCall(), EmitCall(), EmitCallArg(), EmitCallArgs(), emitCallMaybeConstrainedFPBuiltin(), EmitCallOrInvoke(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), EmitCapturedLocals(), emitCapturedStmtCall(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitCaptureStmt(), EmitCaseStmt(), EmitCaseStmtRange(), emitCatchDispatchBlock(), emitCatchPadBlock(), EmitCfiCheckFail(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCheckedArgForAssume(), EmitCheckedArgForBuiltin(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), emitCheckHandlerCall(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCheckValue(), emitClauseForBareTargetDirective(), EmitCleanup(), emitCmdValueForGetterSetterBody(), EmitCMSEClearRecord(), EmitCMSEClearRecord(), EmitCommonNeonBuiltinExpr(), EmitCommonNeonSISDBuiltinExpr(), emitCommonOMPTargetDirective(), EmitComplexPrePostIncDec(), EmitConditionalOperatorLValue(), emitCopyprivateCopyFunction(), EmitCoroutineBody(), EmitCoroutineIntrinsic(), EmitCountedByBoundsChecking(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCtorPrologue(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXForRangeStmt(), EmitCXXGuardedInitBranch(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXPseudoDestructorExpr(), EmitDeclRefLValue(), EmitDelegateCallArg(), EmitDeleteCall(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitDestroy(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), EmitDestructorBody(), emitDeviceID(), EmitDirectXBuiltinExpr(), emitDispatchForLoopBounds(), emitDistributeParallelForDistributeInnerBoundParams(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastToNull(), emitDynamicTlsInitialization(), emitDynamicTlsInitializationCall(), emitDynCGGroupMem(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), EmitExtVectorElementExpr(), EmitExtVectorElementLValue(), EmitFAbs(), EmitFakeUse(), EmitFieldAnnotations(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), emitForStaticInitCall(), EmitForStmt(), EmitFP8NeonCall(), EmitFP8NeonCvtCall(), EmitFP8NeonFDOTCall(), EmitFP8NeonFMLACall(), emitFPIntBuiltin(), emitFrexpBuiltin(), EmitFromInt(), EmitFromMemory(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitGlobalVarDeclLValue(), EmitHexagonBuiltinExpr(), EmitHipStdParUnsupportedAsm(), EmitHipStdParUnsupportedBuiltin(), EmitHLSLAggregateSplatCast(), EmitHLSLBuiltinExpr(), EmitHLSLElementwiseCast(), EmitHLSLElementwiseCast(), EmitHLSLScalarFlatCast(), EmitIfStmt(), EmitIndirectGotoStmt(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitInvariantStart(), EmitISOVolatileLoad(), EmitISOVolatileStore(), emitIsPlatformVersionAtLeast(), EmitIvarOffsetAsPointerDiff(), EmitLabel(), EmitLandingPad(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitLibraryCall(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitllvmFAbs(), EmitLoadOfBitfieldLValue(), EmitLoadOfCountedByField(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), EmitLoadOfPointer(), EmitLoadOfReference(), EmitLoadOfScalar(), EmitLValueForField(), EmitMaterializeTemporaryExpr(), EmitMatrixIndexExpr(), EmitMatrixSubscriptExpr(), emitMaybeConstrainedFPToIntRoundBuiltin(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitMemberPointerComparison(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), clang::CodeGen::emitMergePHI(), emitModfBuiltin(), EmitMSVCBuiltinExpr(), EmitMSVCRTSetJmp(), EmitMustTailThunk(), EmitNeonCall(), EmitNeonRShiftImm(), EmitNewArrayInitializer(), EmitNonNullRValueCheck(), emitNonZeroVLAInit(), EmitNoreturnRuntimeCallOrInvoke(), EmitNullabilityCheck(), EmitNullBaseClassInitialization(), EmitNullInitialization(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsForTargetDirective(), EmitNVPTXBuiltinExpr(), EmitObjCAutoreleasePoolPop(), EmitObjCAutoreleasePoolStmt(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCForCollectionStmt(), EmitObjCMessageExpr(), EmitObjCRelease(), emitObjCValueOperation(), emitOffloadingArraysAndArgs(), EmitOMPAggregateAssign(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPArraySectionBase(), emitOMPAtomicCompareExpr(), emitOMPAtomicRMW(), EmitOMPCancelDirective(), EmitOMPCanonicalLoop(), EmitOMPCopyinClause(), EmitOMPCriticalDirective(), EmitOMPDistributeLoop(), emitOMPForDirective(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitOMPInlinedRegionBody(), EmitOMPInteropDirective(), EmitOMPLastprivateClauseFinal(), EmitOMPLinearClauseFinal(), EmitOMPMaskedDirective(), EmitOMPMasterDirective(), EmitOMPOrderedDirective(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitOMPOutlinedRegionBody(), EmitOMPParallelDirective(), EmitOMPSectionDirective(), EmitOMPSectionsDirective(), EmitOMPSimdFinal(), EmitOMPTaskgroupDirective(), EmitOMPTaskLoopBasedDirective(), EmitOMPWorksharingLoop(), clang::CodeGen::CGOpenMPRuntimeGPU::emitOutlinedFunctionCall(), EmitOverflowCheckedAbs(), EmitOverflowIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitParmDecl(), emitPartialArrayDestroy(), EmitPointerArithmetic(), EmitPointerAuthBlendDiscriminator(), EmitPointerAuthCommon(), EmitPointerAuthCopy(), EmitPointerAuthInfo(), EmitPointerAuthInfo(), EmitPointerAuthOperandBundle(), emitPointerAuthResign(), emitPointerAuthResignCall(), EmitPointerWithAlignment(), EmitPositiveResultOrZero(), emitPostUpdateForReductionClause(), EmitPPCBuiltinExpr(), emitPPCLoadReserveIntrinsic(), emitPreserveStructAccess(), clang::CodeGen::CGOpenMPRuntime::emitPrivateReduction(), emitPrivatesInit(), EmitPromotedValue(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceInitFunction(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), clang::CodeGen::CGOpenMPRuntime::emitReductionFunction(), clang::CodeGen::CGHLSLRuntime::emitResourceArraySubscriptExpr(), emitRestoreIP(), EmitReturnBlock(), EmitReturnStmt(), EmitReturnValueCheck(), EmitRISCVBuiltinExpr(), EmitRISCVCpuInit(), EmitRISCVCpuIs(), EmitRISCVCpuSupports(), EmitRISCVCpuSupports(), EmitRISCVMultiVersionResolver(), emitRotate(), clang::CodeGen::emitRoundPointerUpToAlignment(), emitRVVAveragingBuiltin(), emitRVVCreateBuiltin(), emitRVVFloatingConvBuiltin(), emitRVVFloatingPointBuiltin(), emitRVVFloatingReductionBuiltin(), emitRVVFloatingUnaryBuiltin(), emitRVVFMABuiltin(), emitRVVGetBuiltin(), emitRVVIndexedSegLoadTupleBuiltin(), emitRVVIndexedSegStoreTupleBuiltin(), emitRVVIndexedStoreBuiltin(), emitRVVNarrowingClipBuiltin(), emitRVVPseudoMaskBuiltin(), emitRVVPseudoUnaryBuiltin(), emitRVVPseudoVFUnaryBuiltin(), emitRVVPseudoVNCVTBuiltin(), emitRVVPseudoVNotBuiltin(), emitRVVPseudoVWCVTBuiltin(), emitRVVReinterpretBuiltin(), emitRVVSetBuiltin(), emitRVVStridedSegLoadTupleBuiltin(), emitRVVStridedSegStoreTupleBuiltin(), emitRVVUnitStridedSegLoadFFTupleBuiltin(), emitRVVUnitStridedSegLoadTupleBuiltin(), emitRVVUnitStridedSegStoreTupleBuiltin(), emitRVVVLEFFBuiltin(), emitRVVVlenbBuiltin(), emitRVVVSEMaskBuiltin(), emitRVVVsetvliBuiltin(), emitRVVVSSEBuiltin(), emitRVVWideningFloatingPointBuiltin(), emitRVVWideningFMABuiltin(), EmitSanitizerStatReport(), EmitScalarFMAExpr(), EmitScalarRangeCheck(), emitScanBasedDirective(), emitScanBasedDirectiveDecls(), emitScanBasedDirectiveFinals(), EmitSEHAbnormalTermination(), EmitSEHExceptionCode(), EmitSEHExceptionCodeSave(), EmitSEHLeaveStmt(), EmitSehScope(), EmitSEHTryStmt(), EmitSignBit(), emitSincosBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), EmitSMELd1St1(), EmitSMELdrStr(), EmitSMEReadWrite(), EmitSMEZero(), EmitSpecialRegisterBuiltin(), EmitSPIRVBuiltinExpr(), EmitStmt(), EmitStopPoint(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughGlobalRegLValue(), EmitStoreThroughLValue(), EmitStrip(), emitStructGetterCall(), emitStructSetterCall(), emitSuspendExpression(), EmitSVEAllTruePred(), EmitSVEGatherLoad(), EmitSVEGatherPrefetch(), EmitSVEMaskedLoad(), EmitSVEMaskedStore(), EmitSVEMovl(), EmitSVEPMull(), EmitSVEPredicateCast(), EmitSVEPredicateTupleCast(), EmitSVEPrefetchLoad(), EmitSVEReinterpret(), EmitSVEScatterStore(), EmitSVEStructLoad(), EmitSVEStructStore(), EmitSVETupleCreate(), EmitSVETupleSetOrGet(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtorCall(), EmitSystemZBuiltinExpr(), EmitSystemZIntrinsicWithCC(), emitTargetCallFallback(), emitTargetCallKernelLaunch(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFini(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFixups(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntime::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), emitTernaryMaybeConstrainedFPBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarInit(), emitTlsGuardCheck(), EmitToInt(), EmitToMemory(), EmitTrapCall(), EmitTrapCheck(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitTypeMetadataCodeForVCall(), emitUnaryMaybeConstrainedFPBuiltin(), EmitUnPromotedValue(), EmitUnreachable(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsFini(), clang::CodeGen::CGOpenMPRuntime::emitUsesAllocatorsInit(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVariablyModifiedType(), EmitVAStartEnd(), clang::CodeGen::emitVoidPtrDirectVAArg(), clang::CodeGen::emitVoidPtrVAArg(), EmitVTableAssumptionLoad(), EmitVTablePtrCheck(), EmitVTablePtrCheckForCast(), EmitVTableTypeCheckedLoad(), emitWasmCatchPadBlock(), EmitWebAssemblyBuiltinExpr(), EmitWhileStmt(), emitWriteback(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), EmitX86BuiltinExpr(), EmitX86CompressExpand(), EmitX86CompressStore(), EmitX86ConvertIntToFp(), EmitX86CvtF16ToFloatExpr(), EmitX86ExpandLoad(), EmitX86FMAExpr(), EmitX86FunnelShift(), EmitX86MaskedCompare(), EmitX86MaskedCompareResult(), EmitX86MaskedLoad(), EmitX86MaskedStore(), EmitX86MaskLogic(), EmitX86Muldq(), EmitX86MultiVersionResolver(), EmitX86ScalarSelect(), EmitX86Select(), EmitX86SExtMask(), EmitX86Ternlog(), EmitX86vpcom(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), ExitSEHTryStmt(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::FinalizeOMPRegion(), findDominatingStoreToReturnValue(), FinishFunction(), FlattenAccessAndType(), forConstantArrayExpansion(), clang::CodeGen::CallArgList::freeArgumentMemory(), generateAwaitSuspendWrapper(), GenerateBlockFunction(), generateBuiltinOSLogHelperFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateDestroyHelperFunction(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateSEHFilterFunction(), GenerateVarArgsThunk(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), genMapInfoForCaptures(), GetAArch64SVEProcessedOperands(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntime::getAddrOfArtificialThreadPrivate(), GetAddrOfBlockDecl(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), GetAlignedMapping(), getArrayIndexingBound(), GetCountedByFieldExprGEP(), GetCountFieldAndIndex(), clang::CodeGen::getCXXDestructorImplicitParam(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), getEHResumeBlock(), getEltType(), getExceptionFromSlot(), getFuncletEHDispatchBlock(), getGEPIndicesToField(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUNumThreads(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), getMaskVecValue(), getNormalCleanupDestSlot(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), getPointerAndSize(), getSelectorFromSlot(), getSVEPredType(), getSVEType(), clang::CodeGen::CGOpenMPRuntime::getTaskReductionItem(), getTerminateFunclet(), getTerminateHandler(), getTerminateLandingPad(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), getTypeSize(), getVLASize(), clang::CodeGen::CodeGenModule::getVTablePointerAuthInfo(), GetVTablePtr(), GetVTTParameter(), handleAsDoubleBuiltin(), handleHlslClip(), handleHlslSplitdouble(), HaveInsertPoint(), incrementProfileCounter(), InitCatchParam(), initializeAlloca(), InitializeVTablePointer(), clang::CodeGen::CGCXXABI::loadIncomingCXXThis(), LoadPassedObjectSize(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), maybeCreateMCDCCondBitmap(), maybeResetMCDCCondBitmap(), maybeUpdateMCDCCondBitmap(), maybeUpdateMCDCTestVectorBitmap(), mergeAddressesInConditionalExpr(), packTBLDVectorList(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), PerformReturnAdjustment(), performTypeAdjustment(), PopCleanupBlock(), PopCleanupBlocks(), PPC_initDwarfEHRegSizeTable(), processInReduction(), protectFromPeepholes(), pushCleanupAndDeferDeactivation(), pushDestroyAndDeferDeactivation(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), readX18AsPtr(), recoverAddrOfEscapedLocal(), ResolveAllBranchFixups(), ResolveBranchFixups(), clang::CodeGen::DominatingLLVMValue::restore(), SanitizerAnnotateDebugInfo(), clang::CodeGen::DominatingLLVMValue::save(), setBlockContextParameter(), SetFastMathFlags(), clang::CodeGen::CGOpenMPRuntime::setLocThreadIdInsertPt(), SetupCleanupBlockActivation(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), SimplifyCleanupEntry(), StartFunction(), SVEBuiltinMemEltTy(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), tryUseTestFPKind(), UpdateAsmCallInst(), vectorWrapScalar16(), VolatilizeTryBlocks(), and wrapWithBPFPreserveStaticOffset().

◆ Bypasses

VarBypassDetector clang::CodeGen::CodeGenFunction::Bypasses

Definition at line 290 of file CodeGenFunction.h.

Referenced by EmitAutoVarAlloca(), and GenerateCode().

◆ CapturedStmtInfo

◆ CGM

CodeGenModule& clang::CodeGen::CodeGenFunction::CGM

Definition at line 278 of file CodeGenFunction.h.

Referenced by AddAMDGPUFenceAddressSpaceMMRA(), AddInitializerToStaticVarDecl(), AddVariableConstraints(), AlwaysEmitXRayCustomEvents(), AlwaysEmitXRayTypedEvents(), ApplyNonVirtualAndVirtualOffset(), ARMMVEVectorReinterpret(), authPointerToPointerCast(), authPointerToPointerCast(), BuildAppleKextVirtualCall(), BuildAppleKextVirtualDestructorCall(), BuildBlockRelease(), buildFMulAdd(), BuildFunctionArgList(), CalculateCookiePadding(), CallBeginCatch(), callSpecialFunction(), canEmitDelegateCallArgs(), canEmitSpuriousReferenceToVariable(), CheckAtomicAlignment(), checkForLastprivateConditionalUpdate(), checkIfFunctionMustProgress(), checkIfLoopMustProgress(), checkTargetFeatures(), checkTargetFeatures(), CodeGenFunction(), CoerceIntOrPtrToIntOrPtr(), commonEmitCXXMemberOrOperatorCall(), complexTempStructure(), ConstantFoldsToSimpleInteger(), ConvertType(), convertTypeForLoadStore(), ConvertTypeForMem(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), createCoroData(), CreateDefaultAlignTempAlloca(), clang::CodeGen::TargetCodeGenInfo::createEnqueuedBlockKernel(), createReferenceTemporary(), CreateTempAlloca(), CreateTempAllocaForCoercion(), createTLSAtExitStub(), defaultInitNonTrivialCStructVar(), EmitAArch64BuiltinExpr(), EmitAArch64MultiVersionResolver(), EmitAArch64SMEBuiltinExpr(), EmitAArch64SVEBuiltinExpr(), EmitAArch64TblBuiltinExpr(), emitAddrOfFieldStorage(), EmitAggregateCopy(), emitAlignmentAssumption(), EmitAMDGCNBallotForExec(), EmitAMDGPUBuiltinExpr(), EmitAMDGPUDevicePrintfCallExpr(), EmitAnnotationCall(), EmitARCAutorelease(), EmitARCAutoreleaseReturnValue(), emitARCCopyOperation(), EmitARCCopyWeak(), EmitARCDestroyStrong(), EmitARCDestroyWeak(), EmitARCInitWeak(), EmitARCIntrinsicUse(), emitARCLoadOperation(), EmitARCLoadWeak(), EmitARCLoadWeakRetained(), EmitARCMoveWeak(), EmitARCNoopIntrinsicUse(), EmitARCReclaimReturnedObject(), EmitARCRelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainAutoreleaseReturnValue(), EmitARCRetainBlock(), EmitARCRetainNonBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), EmitARCStoreWeak(), emitARCValueOperation(), EmitARMBuiltinExpr(), EmitARMMVEBuiltinExpr(), EmitArrayDelete(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitArrayToPointerDecay(), EmitAsanPrologueOrEpilogue(), EmitAsmStmt(), EmitAsmStores(), EmitAtomicExpr(), emitAtomicLibcall(), EmitAtomicOp(), EmitAtomicStore(), EmitAttributedStmt(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBaseInitializer(), emitBinaryExpMaybeConstrainedFPBuiltin(), emitBinaryMaybeConstrainedFPBuiltin(), EmitBinaryOperatorLValue(), EmitBlockCallExpr(), EmitBlockCopyAndAutorelease(), EmitBlockLiteral(), EmitBlockWithFallThrough(), EmitBPFBuiltinExpr(), EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitBuiltinAvailable(), EmitBuiltinExpr(), emitBuiltinOSLogFormat(), emitBuiltinWithOneOverloadedType(), emitByrefStructureInit(), EmitCall(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallArgs(), EmitCallee(), emitCallMaybeConstrainedFPBuiltin(), EmitCallOrInvoke(), EmitCapturedLocals(), EmitCapturedStmt(), emitCapturedStmtFunc(), EmitCaseStmt(), EmitCastLValue(), emitCatchDispatchBlock(), EmitCfiCheckFail(), EmitCfiCheckStub(), EmitCfiSlowPathCheck(), EmitCheck(), emitCheckHandlerCall(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCMSEClearRecord(), EmitCMSEClearRecord(), EmitCommonNeonBuiltinExpr(), emitCommonOMPParallelDirective(), emitCommonOMPTargetDirective(), emitCommonOMPTeamsDirective(), emitCommonSimdLoop(), EmitCompare(), EmitComplexAssignmentLValue(), EmitComplexPrePostIncDec(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), EmitConstructorBody(), EmitCoroutineBody(), EmitCoroutineIntrinsic(), EmitCountedByBoundsChecking(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCtorPrologue(), EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXDestructorCall(), EmitCXXForRangeStmt(), EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), EmitCXXGuardedInitBranch(), EmitCXXMemberCallExpr(), EmitCXXMemberDataPointerAddress(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitCXXTryStmt(), EmitCXXTypeidExpr(), EmitCXXUuidofExpr(), EmitDecl(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclRefExprDbgValue(), EmitDeclRefLValue(), emitDeclTargetVarDeclLValue(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDeleteCall(), emitDependData(), EmitDestroyingObjectDelete(), EmitDestructorBody(), EmitDirectCallee(), EmitDoStmt(), EmitDynamicCast(), EmitDynamicCastToNull(), emitDynamicTlsInitialization(), emitDynamicTlsInitializationCall(), EmitEndEHSpec(), EmitExtVectorElementLValue(), EmitFAbs(), EmitFakeUse(), EmitFieldAnnotations(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), emitForStaticInitCall(), EmitForStmt(), EmitForwardingCallToLambda(), EmitFP8NeonCall(), emitFPIntBuiltin(), emitFrexpBuiltin(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), EmitGlobalVarDeclLValue(), EmitHexagonBuiltinExpr(), EmitHipStdParUnsupportedAsm(), EmitHipStdParUnsupportedBuiltin(), EmitHLSLBuiltinExpr(), EmitIfStmt(), EmitInheritedCXXConstructorCall(), emitInitWithReductionInitializer(), EmitInlinedInheritingCXXConstructorCall(), EmitInvariantStart(), emitIsPlatformVersionAtLeast(), EmitIvarOffset(), EmitKCFIOperandBundle(), EmitLabel(), EmitLambdaBlockInvokeBody(), EmitLambdaInAllocaCallOpBody(), EmitLambdaInAllocaImplFn(), EmitLambdaStaticInvokeBody(), EmitLandingPad(), emitLibraryCall(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitllvmFAbs(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), emitLoadOfOrigPointerRValue(), EmitLoadOfReference(), EmitLoadOfReferenceLValue(), EmitLoadOfScalar(), EmitLoadOfScalar(), EmitLValue(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForIvar(), emitMasked(), emitMaster(), EmitMaterializeTemporaryExpr(), emitMaybeConstrainedFPToIntRoundBuiltin(), EmitMemberExpr(), EmitMemberInitializer(), EmitMSVCBuiltinExpr(), EmitMSVCRTSetJmp(), EmitMustTailThunk(), EmitNewArrayInitializer(), EmitNewDeleteCall(), EmitNonNullRValueCheck(), EmitNullBaseClassInitialization(), EmitNullInitialization(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), EmitNVPTXBuiltinExpr(), EmitNVPTXDevicePrintfCallExpr(), EmitObjCAlloc(), EmitObjCAllocInit(), EmitObjCAllocWithZone(), EmitObjCAtSynchronizedStmt(), EmitObjCAtThrowStmt(), EmitObjCAtTryStmt(), EmitObjCAutorelease(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolPop(), EmitObjCAutoreleasePoolPush(), EmitObjCAutoreleasePoolStmt(), EmitObjCBoxedExpr(), EmitObjCCollectionLiteral(), EmitObjCEncodeExprLValue(), EmitObjCForCollectionStmt(), EmitObjCMessageExpr(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), EmitObjCProtocolExpr(), EmitObjCRelease(), EmitObjCRetainNonBlock(), EmitObjCSelectorExpr(), EmitObjCSelectorLValue(), EmitObjCStringLiteral(), emitObjCValueOperation(), EmitObjectDelete(), emitOffloadingArraysAndArgs(), emitOMPArraySectionBase(), emitOMPAtomicCaptureExpr(), emitOMPAtomicCompareExpr(), EmitOMPAtomicDirective(), emitOMPAtomicReadExpr(), emitOMPAtomicRMW(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), EmitOMPBarrierDirective(), EmitOMPCancelDirective(), EmitOMPCancellationPointDirective(), EmitOMPCanonicalLoop(), EmitOMPCopyinClause(), emitOMPCopyinClause(), EmitOMPCriticalDirective(), EmitOMPDepobjDirective(), EmitOMPDistributeDirective(), emitOMPDistributeDirective(), EmitOMPDistributeLoop(), EmitOMPDistributeParallelForDirective(), EmitOMPDistributeParallelForSimdDirective(), EmitOMPDistributeSimdDirective(), EmitOMPErrorDirective(), EmitOMPFirstprivateClause(), EmitOMPFlushDirective(), EmitOMPForDirective(), emitOMPForDirective(), EmitOMPForSimdDirective(), EmitOMPGenericLoopDirective(), EmitOMPInnerLoop(), EmitOMPInteropDirective(), EmitOMPLastprivateClauseFinal(), EmitOMPLastprivateClauseInit(), EmitOMPMaskedDirective(), EmitOMPMaskedTaskLoopDirective(), EmitOMPMaskedTaskLoopSimdDirective(), EmitOMPMasterDirective(), EmitOMPMasterTaskLoopDirective(), EmitOMPMasterTaskLoopSimdDirective(), EmitOMPOrderedDirective(), EmitOMPParallelDirective(), EmitOMPParallelMaskedTaskLoopDirective(), EmitOMPParallelMaskedTaskLoopSimdDirective(), EmitOMPParallelMasterTaskLoopDirective(), EmitOMPParallelMasterTaskLoopSimdDirective(), EmitOMPReductionClauseFinal(), EmitOMPReductionClauseInit(), EmitOMPScanDirective(), EmitOMPScopeDirective(), EmitOMPSectionDirective(), EmitOMPSectionsDirective(), EmitOMPSimdDirective(), emitOMPSimdDirective(), emitOMPSimdRegion(), EmitOMPSingleDirective(), EmitOMPTargetDataDirective(), EmitOMPTargetDeviceFunction(), EmitOMPTargetEnterDataDirective(), EmitOMPTargetExitDataDirective(), EmitOMPTargetParallelDeviceFunction(), EmitOMPTargetParallelForDeviceFunction(), EmitOMPTargetParallelForSimdDeviceFunction(), EmitOMPTargetParallelGenericLoopDeviceFunction(), EmitOMPTargetSimdDeviceFunction(), EmitOMPTargetTaskBasedDirective(), EmitOMPTargetTeamsDeviceFunction(), EmitOMPTargetTeamsDistributeDeviceFunction(), EmitOMPTargetTeamsDistributeParallelForDeviceFunction(), EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction(), EmitOMPTargetTeamsDistributeSimdDeviceFunction(), EmitOMPTargetTeamsGenericLoopDeviceFunction(), EmitOMPTargetUpdateDirective(), EmitOMPTaskBasedDirective(), EmitOMPTaskDirective(), EmitOMPTaskgroupDirective(), EmitOMPTaskLoopBasedDirective(), EmitOMPTaskwaitDirective(), EmitOMPTaskyieldDirective(), EmitOMPTeamsDistributeDirective(), EmitOMPTeamsDistributeParallelForDirective(), EmitOMPTeamsDistributeParallelForSimdDirective(), EmitOMPTeamsDistributeSimdDirective(), EmitOMPTeamsGenericLoopDirective(), EmitOMPUnrollDirective(), EmitOMPWorksharingLoop(), emitOptimizedARCReturnCall(), EmitOrigPointerRValue(), emitOutlinedFunctionPrologue(), emitOutlinedOrderedFunction(), EmitOverflowIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), EmitParmDecl(), EmitPointerArithmetic(), emitPointerArithmetic(), EmitPointerAuthBlendDiscriminator(), EmitPointerAuthCommon(), EmitPointerAuthInfo(), EmitPointerAuthQualify(), emitPointerAuthResign(), emitPointerAuthResignCall(), EmitPointerAuthUnqualify(), EmitPointerWithAlignment(), EmitPPCBuiltinExpr(), EmitPredefinedLValue(), emitPreserveStructAccess(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), emitReductionCombiner(), emitRestoreIP(), EmitReturnStmt(), EmitRISCVBuiltinExpr(), EmitRISCVCpuInit(), EmitRISCVCpuIs(), EmitRISCVCpuSupports(), EmitRISCVMultiVersionResolver(), emitRotate(), emitRTtypeidCall(), emitRVVAveragingBuiltin(), emitRVVFloatingConvBuiltin(), emitRVVFloatingPointBuiltin(), emitRVVFloatingReductionBuiltin(), emitRVVFloatingUnaryBuiltin(), emitRVVFMABuiltin(), emitRVVIndexedSegLoadTupleBuiltin(), emitRVVIndexedSegStoreTupleBuiltin(), emitRVVIndexedStoreBuiltin(), emitRVVNarrowingClipBuiltin(), emitRVVPseudoMaskBuiltin(), emitRVVPseudoUnaryBuiltin(), emitRVVPseudoVFUnaryBuiltin(), emitRVVPseudoVNCVTBuiltin(), emitRVVPseudoVNotBuiltin(), emitRVVPseudoVWCVTBuiltin(), emitRVVReinterpretBuiltin(), emitRVVStridedSegLoadTupleBuiltin(), emitRVVStridedSegStoreTupleBuiltin(), emitRVVUnitStridedSegLoadFFTupleBuiltin(), emitRVVUnitStridedSegLoadTupleBuiltin(), emitRVVUnitStridedSegStoreTupleBuiltin(), emitRVVVLEFFBuiltin(), emitRVVVlenbBuiltin(), emitRVVVSEMaskBuiltin(), emitRVVVsetvliBuiltin(), emitRVVVSSEBuiltin(), emitRVVWideningFloatingPointBuiltin(), emitRVVWideningFMABuiltin(), EmitSanitizerStatReport(), EmitScalarFMAExpr(), EmitScalarInit(), EmitScalarRangeCheck(), EmitSehCppScopeBegin(), EmitSehCppScopeEnd(), EmitSEHExceptionCodeSave(), EmitSehTryScopeBegin(), EmitSehTryScopeEnd(), EmitSEHTryStmt(), EmitSignBit(), EmitSimpleOMPExecutableDirective(), emitSincosBuiltin(), EmitSMELd1St1(), EmitSMELdrStr(), EmitSMEReadWrite(), EmitSMEZero(), EmitSpecialRegisterBuiltin(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitStmt(), EmitStoreOfScalar(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughGlobalRegLValue(), EmitStoreThroughLValue(), EmitStringLiteralLValue(), EmitStrip(), emitStructGetterCall(), emitStructSetterCall(), emitSuspendExpression(), EmitSVEAllTruePred(), EmitSVEGatherLoad(), EmitSVEGatherPrefetch(), EmitSVEMaskedLoad(), EmitSVEMaskedStore(), EmitSVEMovl(), EmitSVEPMull(), EmitSVEPredicateCast(), EmitSVEPrefetchLoad(), EmitSVEScatterStore(), EmitSVEStructLoad(), EmitSVEStructStore(), EmitSwitchStmt(), EmitSynthesizedCXXCopyCtorCall(), EmitSystemZBuiltinExpr(), EmitSystemZIntrinsicWithCC(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), emitTargetParallelRegion(), emitTargetRegion(), emitTargetTeamsDistributeParallelForRegion(), emitTargetTeamsDistributeParallelForSimdRegion(), emitTargetTeamsDistributeRegion(), emitTargetTeamsDistributeSimdRegion(), emitTargetTeamsGenericLoopRegionAsDistribute(), emitTargetTeamsGenericLoopRegionAsParallel(), emitTargetTeamsLoopCodegenStatus(), emitTargetTeamsRegion(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction(), clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), emitTernaryMaybeConstrainedFPBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), EmitThreadPrivateVarDeclLValue(), EmitTrapCall(), EmitTrapCheck(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitTypeMetadataCodeForVCall(), emitUnaryMaybeConstrainedFPBuiltin(), EmitUnaryOpLValue(), EmitVAArg(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVarDecl(), EmitVAStartEnd(), clang::CodeGen::emitVoidPtrDirectVAArg(), clang::CodeGen::emitVoidPtrVAArg(), EmitVTableAssumptionLoad(), EmitVTableAssumptionLoads(), EmitVTablePtrCheck(), EmitVTablePtrCheckForCast(), EmitVTableTypeCheckedLoad(), emitWasmCatchPadBlock(), EmitWebAssemblyBuiltinExpr(), EmitWhileStmt(), emitWorksharingDirective(), emitWritebackArg(), EmitX86BuiltinExpr(), EmitX86CompressExpand(), EmitX86CompressStore(), EmitX86ConvertIntToFp(), EmitX86CvtF16ToFloatExpr(), EmitX86ExpandLoad(), EmitX86FMAExpr(), EmitX86FunnelShift(), EmitX86MultiVersionResolver(), EmitX86Ternlog(), EnterCXXTryStmt(), EnterDtorCleanups(), EnterSEHTryStmt(), EnterStructPointerForCoercedAccess(), ErrorUnsupported(), clang::CodeGen::CGCXXABI::ErrorUnsupportedABI(), EvaluateExprAsBool(), ExitCXXTryStmt(), ExitSEHTryStmt(), FinishFunction(), generateAwaitSuspendWrapper(), GenerateBlockFunction(), generateBuiltinOSLogHelperFunction(), generateByrefCopyHelper(), generateByrefDisposeHelper(), GenerateCapturedStmtFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), generateObjCGetterBody(), GenerateObjCSetter(), generateObjCSetterBody(), GenerateOpenMPCapturedStmtFunction(), generateThunk(), GenerateVarArgsThunk(), genMapInfo(), clang::CodeGen::EHPersonality::get(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), getAllocatorVal(), getARCCleanupKind(), getAsmSrcLocInfo(), getAsNaturalAddressOf(), getBadCastFn(), getBadTypeidFn(), getBlockByrefInfo(), getContext(), GetCountedByFieldExprGEP(), clang::CodeGen::CGOpenMPRuntimeGPU::getDefaultDistScheduleAndChunk(), getEHResumeBlock(), getGEPIndicesToField(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUNumThreads(), getInvokeDestImpl(), getItaniumDynamicCastFn(), getLangOpts(), getLLVMContext(), getPrologueSignature(), getSpecConstantFunction(), getTargetHooks(), getTerminateFunclet(), getTerminateHandler(), getTerminateLandingPad(), getTypes(), getTypeSize(), getUBSanFunctionTypeHash(), GetVTablePtr(), GetVTTParameter(), handleAsDoubleBuiltin(), handleHlslClip(), handleHlslSplitdouble(), incrementProfileCounter(), InitCatchParam(), initializeAlloca(), InitializeVTablePointer(), InitializeVTablePointers(), isMCDCCoverageEnabled(), isProvablyNonNull(), LoadCXXThisAddress(), loadToBegin(), LookupNeonLLVMIntrinsic(), LValueIsSuitableForInlineAtomic(), MakeAddrLValue(), MakeAddrLValue(), makeNaturalAddressForPointer(), makeNaturalAlignAddrLValue(), MakeRawAddrLValue(), maybeAttachRangeForLoad(), needsEHCleanup(), packTBLDVectorList(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), PerformReturnAdjustment(), performTypeAdjustment(), PopCleanupBlock(), PopCleanupBlocks(), clang::CodeGen::CGCallee::prepareConcreteCallee(), processInReduction(), pushTemporaryCleanup(), readX18AsPtr(), recoverAddrOfEscapedLocal(), registerGlobalDtorWithAtExit(), registerGlobalDtorWithLLVM(), SanitizerAnnotateDebugInfo(), clang::CodeGen::DominatingLLVMValue::save(), setBlockContextParameter(), SetDivFPAccuracy(), SetSqrtFPAccuracy(), shouldEmitBuiltinAsIR(), ShouldEmitVTableTypeCheckedLoad(), ShouldInstrumentFunction(), shouldUseFusedARCCalls(), ShouldXRayInstrumentFunction(), StartFunction(), StartObjCMethod(), startOutlinedSEHHelper(), StartThunk(), tryEmitAsConstant(), tryEmitFusedAutoreleaseOfResult(), tryEmitSpecializedAllocInit(), tryGenerateSpecializedMessageSend(), tryRemoveRetainOfSelf(), tryUseTestFPKind(), unregisterGlobalDtorWithUnAtExit(), wrapWithBPFPreserveStaticOffset(), and ~CodeGenFunction().

◆ ConvergenceTokenStack

SmallVector<llvm::ConvergenceControlInst *, 4> clang::CodeGen::CodeGenFunction::ConvergenceTokenStack

Stack to track the controlled convergence tokens.

Definition at line 310 of file CodeGenFunction.h.

Referenced by EmitCXXAggrConstructorCall(), EmitCXXForRangeStmt(), EmitDoStmt(), EmitForStmt(), EmitWhileStmt(), FinishFunction(), and StartFunction().

◆ CurAwaitSuspendWrapper

AwaitSuspendWrapperInfo clang::CodeGen::CodeGenFunction::CurAwaitSuspendWrapper

Definition at line 375 of file CodeGenFunction.h.

Referenced by EmitCoroutineIntrinsic(), and generateAwaitSuspendWrapper().

◆ CurCodeDecl

◆ CurCoro

◆ CurFn

llvm::Function* clang::CodeGen::CodeGenFunction::CurFn = nullptr

Definition at line 347 of file CodeGenFunction.h.

Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), checkIfLoopMustProgress(), clang::CodeGen::CGOpenMPRuntime::clearLocThreadIdInsertPt(), emitAtomicCmpXchg(), emitAtomicCmpXchgFailureSet(), EmitAtomicExpr(), EmitAtomicOp(), EmitAtomicOp(), EmitBlock(), EmitBlockAfterUses(), EmitBlockLiteral(), EmitBuiltinExpr(), EmitCall(), EmitCapturedLocals(), EmitCaseStmtRange(), EmitCoroutineBody(), EmitDestructorBody(), EmitDirectCallee(), emitDynamicTlsInitialization(), EmitFunctionEpilog(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), EmitIfUsed(), EmitLambdaInAllocaCallOpBody(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), EmitMSVCBuiltinExpr(), EmitMustTailThunk(), EmitPredefinedLValue(), clang::CodeGen::CGOpenMPRuntime::emitReduction(), clang::CodeGen::CGOpenMPRuntimeGPU::emitReduction(), EmitSEHAbnormalTermination(), EmitSEHExceptionCodeSave(), emitSuspendExpression(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedMapper(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedReduction(), EmitX86BuiltinExpr(), FinishFunction(), clang::CodeGen::CGOpenMPRuntime::functionFinished(), clang::CodeGen::CGOpenMPRuntimeGPU::functionFinished(), GenerateCode(), GenerateObjCMethod(), GenerateSEHFilterFunction(), GenerateSEHFinallyFunction(), GenerateVarArgsThunk(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), GetAddrOfLabel(), clang::CodeGen::getCXXDestructorImplicitParam(), getInvokeDestImpl(), clang::CodeGen::CGOpenMPRuntime::getOutlinedHelperName(), getTerminateLandingPad(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), handleHlslClip(), incrementProfileCounter(), clang::CodeGen::CGOpenMPRuntimeGPU::isDelayedVariableLengthDecl(), clang::CodeGen::CGOpenMPRuntime::isLocalVarInUntiedTask(), isMCDCCoverageEnabled(), clang::CodeGen::CGOpenMPRuntime::setLocThreadIdInsertPt(), StartFunction(), startOutlinedSEHHelper(), clang::CodeGen::CGOpenMPRuntime::UntiedTaskLocalDeclsRAII::UntiedTaskLocalDeclsRAII(), and ~CodeGenFunction().

◆ CurFnInfo

const CGFunctionInfo* clang::CodeGen::CodeGenFunction::CurFnInfo = nullptr

◆ CurFPFeatures

FPOptions clang::CodeGen::CodeGenFunction::CurFPFeatures

Definition at line 817 of file CodeGenFunction.h.

Referenced by CodeGenFunction(), and shouldEmitBuiltinAsIR().

◆ CurFuncDecl

◆ CurFuncIsThunk

bool clang::CodeGen::CodeGenFunction::CurFuncIsThunk = false

In C++, whether we are code generating a thunk.

This controls whether we should emit cleanups.

Definition at line 577 of file CodeGenFunction.h.

Referenced by EmitDelegateCallArg(), EmitParmDecl(), StartFunction(), and StartThunk().

◆ CurGD

◆ CurrentCleanupScopeDepth

EHScopeStack::stable_iterator clang::CodeGen::CodeGenFunction::CurrentCleanupScopeDepth
Initial value:
=
static stable_iterator stable_end()
Create a stable reference to the bottom of the EH stack.

Definition at line 1081 of file CodeGenFunction.h.

Referenced by DeactivateCleanupBlock(), and EmitCall().

◆ CurrentFuncletPad

◆ CurSEHParent

◆ CurSourceLocExprScope

CurrentSourceLocExprScope clang::CodeGen::CodeGenFunction::CurSourceLocExprScope

Source location information about the default argument or member initializer expression we're evaluating, if any.

Definition at line 1756 of file CodeGenFunction.h.

Referenced by clang::CodeGen::CodeGenFunction::CXXDefaultArgExprScope::CXXDefaultArgExprScope(), and clang::CodeGen::CodeGenFunction::CXXDefaultInitExprScope::CXXDefaultInitExprScope().

◆ DeferredDeactivationCleanupStack

◆ destroyARCStrongImprecise

void CodeGenFunction::destroyARCStrongImprecise
static

◆ destroyARCStrongPrecise

void CodeGenFunction::destroyARCStrongPrecise
static

◆ destroyARCWeak

void CodeGenFunction::destroyARCWeak
static

Definition at line 4974 of file CodeGenFunction.h.

Referenced by EmitAutoVarWithLifetime(), getDestroyer(), and pushTemporaryCleanup().

◆ destroyCXXObject

◆ destroyNonTrivialCStruct

void CodeGenFunction::destroyNonTrivialCStruct
static

◆ EHResumeBlock

llvm::BasicBlock* clang::CodeGen::CodeGenFunction::EHResumeBlock = nullptr

EHResumeBlock - Unified block containing a call to llvm.eh.resume.

Definition at line 749 of file CodeGenFunction.h.

Referenced by FinishFunction(), and getEHResumeBlock().

◆ EHSelectorSlot

llvm::AllocaInst* clang::CodeGen::CodeGenFunction::EHSelectorSlot = nullptr

The selector slot.

Under the MandatoryCleanup model, all landing pads write the current selector value into this alloca.

Definition at line 757 of file CodeGenFunction.h.

Referenced by getEHSelectorSlot().

◆ EHStack

EHScopeStack clang::CodeGen::CodeGenFunction::EHStack

Definition at line 649 of file CodeGenFunction.h.

Referenced by ActivateCleanupBlock(), CallBeginCatch(), CodeGenFunction(), DeactivateCleanupBlock(), EmitAnyExprToExn(), EmitArrayDelete(), clang::CodeGen::CGObjCRuntime::EmitAtSynchronizedStmt(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), emitAutoVarTypeCleanup(), EmitBaseInitializer(), EmitBranchThroughCleanup(), EmitCall(), EmitCallArg(), EmitCoroutineBody(), emitCXXDestructMethod(), EmitCXXNewExpr(), EmitDelegatingCXXConstructorCall(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitEndEHSpec(), EmitFunctionProlog(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), EmitLabel(), EmitLandingPad(), EmitNewArrayInitializer(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolStmt(), EmitObjectDelete(), EmitParmDecl(), EmitStartEHSpec(), clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterByrefCleanup(), EnterCXXTryStmt(), EnterDtorCleanups(), EnterNewDeleteCleanup(), EnterSEHTryStmt(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), ExitCXXTryStmt(), ExitSEHTryStmt(), FinishFunction(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), getEHDispatchBlock(), getFuncletEHDispatchBlock(), getInvokeDest(), getInvokeDestImpl(), getJumpDestInCurrentScope(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), InitCatchParam(), initFullExprCleanupWithFlag(), isObviouslyBranchWithoutCleanups(), clang::CodeGen::RegionCodeGenTy::operator()(), popCatchScope(), PopCleanupBlock(), PopCleanupBlocks(), PopCleanupBlocks(), pushCallObjectDeleteCleanup(), pushCleanupAndDeferDeactivation(), pushDestroyAndDeferDeactivation(), PushDestructorCleanup(), pushFullExprCleanup(), pushKmpcAllocFree(), pushLifetimeExtendedDestroy(), pushSEHCleanup(), pushStackRestore(), ResolveAllBranchFixups(), ResolveBranchFixups(), SetupCleanupBlockActivation(), SimplifyForwardingBlocks(), StartFunction(), and StartObjCMethod().

◆ emitARCIntrinsicUse

void CodeGenFunction::emitARCIntrinsicUse
static

Definition at line 4975 of file CodeGenFunction.h.

◆ ExceptionSlot

llvm::Value* clang::CodeGen::CodeGenFunction::ExceptionSlot = nullptr

The exception slot.

All landing pads write the current exception pointer into this alloca.

Definition at line 753 of file CodeGenFunction.h.

Referenced by getExceptionSlot().

◆ ExpectedOMPLoopDepth

int clang::CodeGen::CodeGenFunction::ExpectedOMPLoopDepth = 0

Number of nested loop to be consumed by the last surrounding loop-associated directive.

Definition at line 314 of file CodeGenFunction.h.

Referenced by EmitOMPCollapsedCanonicalLoopNest(), and EmitOMPUnrollDirective().

◆ FnArgs

llvm::SmallVector<const ParmVarDecl *, 4> clang::CodeGen::CodeGenFunction::FnArgs

Save Parameter Decl for coroutine.

Definition at line 350 of file CodeGenFunction.h.

Referenced by EmitCfiCheckStub(), EmitCoroutineBody(), and GenerateCode().

◆ FnRetTy

◆ HLSLControlFlowAttr

HLSLControlFlowHintAttr::Spelling clang::CodeGen::CodeGenFunction::HLSLControlFlowAttr
Initial value:
=
HLSLControlFlowHintAttr::SpellingNotCalculated

HLSL Branch attribute.

Definition at line 609 of file CodeGenFunction.h.

Referenced by EmitAttributedStmt(), EmitBranchOnBoolExpr(), and EmitSwitchStmt().

◆ InAlwaysInlineAttributedStmt

bool clang::CodeGen::CodeGenFunction::InAlwaysInlineAttributedStmt = false

True if the current statement has always_inline attribute.

Definition at line 603 of file CodeGenFunction.h.

Referenced by EmitAttributedStmt(), and EmitCall().

◆ InNoConvergentAttributedStmt

bool clang::CodeGen::CodeGenFunction::InNoConvergentAttributedStmt = false

True if the current statement has noconvergent attribute.

Definition at line 606 of file CodeGenFunction.h.

Referenced by EmitAsmStmt(), EmitAttributedStmt(), and EmitCall().

◆ InNoInlineAttributedStmt

bool clang::CodeGen::CodeGenFunction::InNoInlineAttributedStmt = false

True if the current statement has noinline attribute.

Definition at line 600 of file CodeGenFunction.h.

Referenced by EmitAttributedStmt(), and EmitCall().

◆ InNoMergeAttributedStmt

bool clang::CodeGen::CodeGenFunction::InNoMergeAttributedStmt = false

True if the current statement has nomerge attribute.

Definition at line 597 of file CodeGenFunction.h.

Referenced by EmitAsmStmt(), EmitAttributedStmt(), EmitCall(), and EmitTrapCall().

◆ IsInPreservedAIRegion

bool clang::CodeGen::CodeGenFunction::IsInPreservedAIRegion = false

True if CodeGen currently emits code inside presereved access index region.

Definition at line 594 of file CodeGenFunction.h.

Referenced by emitArraySubscriptGEP(), EmitBPFBuiltinExpr(), EmitBuiltinExpr(), and EmitLValueForField().

◆ IsOutlinedSEHHelper

bool clang::CodeGen::CodeGenFunction::IsOutlinedSEHHelper = false

True if the current function is an outlined SEH helper.

This can be a finally block or filter expression.

Definition at line 590 of file CodeGenFunction.h.

Referenced by EmitReturnStmt(), and startOutlinedSEHHelper().

◆ IsSanitizerScope

bool clang::CodeGen::CodeGenFunction::IsSanitizerScope = false

True if CodeGen currently emits code implementing sanitizer checks.

Definition at line 564 of file CodeGenFunction.h.

Referenced by EmitCheck(), EmitVTablePtrCheck(), and InsertHelper().

◆ LambdaCaptureFields

llvm::DenseMap<const ValueDecl *, FieldDecl *> clang::CodeGen::CodeGenFunction::LambdaCaptureFields

◆ LambdaThisCaptureField

FieldDecl* clang::CodeGen::CodeGenFunction::LambdaThisCaptureField = nullptr

Definition at line 643 of file CodeGenFunction.h.

Referenced by EmitCapturedLocals(), and StartFunction().

◆ LifetimeExtendedCleanupStack

llvm::SmallVector<char, 256> clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupStack

◆ LoopStack

◆ MCDCLogOpStack

SmallVector<const BinaryOperator *, 16> clang::CodeGen::CodeGenFunction::MCDCLogOpStack

Stack to track the Logical Operator recursion nest for MC/DC.

Definition at line 307 of file CodeGenFunction.h.

Referenced by EmitBranchOnBoolExpr().

◆ MustTailCall

const CallExpr* clang::CodeGen::CodeGenFunction::MustTailCall = nullptr

◆ NextCleanupDestIndex

unsigned clang::CodeGen::CodeGenFunction::NextCleanupDestIndex = 1

Definition at line 746 of file CodeGenFunction.h.

Referenced by getJumpDestForLabel(), and getJumpDestInCurrentScope().

◆ NormalCleanupDest

RawAddress clang::CodeGen::CodeGenFunction::NormalCleanupDest = RawAddress::invalid()

i32s containing the indexes of the cleanup destinations.

Definition at line 744 of file CodeGenFunction.h.

Referenced by destroyOptimisticNormalEntry(), FinishFunction(), getNormalCleanupDestSlot(), and PopCleanupBlock().

◆ NRVOFlags

llvm::DenseMap<const VarDecl *, llvm::Value *> clang::CodeGen::CodeGenFunction::NRVOFlags

A mapping from NRVO variables to the flags used to indicate when the NRVO has been applied to this variable.

Definition at line 647 of file CodeGenFunction.h.

Referenced by EmitAutoVarAlloca(), and EmitReturnStmt().

◆ ObjCEHValueStack

SmallVector<llvm::Value *, 8> clang::CodeGen::CodeGenFunction::ObjCEHValueStack

ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows.

Definition at line 867 of file CodeGenFunction.h.

Referenced by clang::CodeGen::CGObjCRuntime::EmitTryCatchStmt().

◆ OMPAfterScanBlock

llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPAfterScanBlock = nullptr

Definition at line 775 of file CodeGenFunction.h.

Referenced by EmitOMPLoopBody(), and EmitOMPScanDirective().

◆ OMPBeforeScanBlock

llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPBeforeScanBlock = nullptr

Definition at line 774 of file CodeGenFunction.h.

Referenced by EmitOMPLoopBody(), and EmitOMPScanDirective().

◆ OMPFirstScanLoop

bool clang::CodeGen::CodeGenFunction::OMPFirstScanLoop = false

Definition at line 778 of file CodeGenFunction.h.

Referenced by emitOMPSimdDirective(), and emitScanBasedDirective().

◆ OMPLoopNestStack

SmallVector<llvm::CanonicalLoopInfo *, 4> clang::CodeGen::CodeGenFunction::OMPLoopNestStack

List of recently emitted OMPCanonicalLoops.

Since OMPCanonicalLoops are nested inside other statements (in particular CapturedStmt generated by OMPExecutableDirective and non-perfectly nested loops), we cannot directly call OMPEmitOMPCanonicalLoop and receive its llvm::CanonicalLoopInfo. Instead, we call EmitStmt and any OMPEmitOMPCanonicalLoop called by it will add its CanonicalLoopInfo to this stack when done. Entering a new loop requires clearing this list; it either means we start parsing a new loop nest (in which case the previous loop nest goes out of scope) or a second loop in the same level in which case it would be ambiguous into which of the two (or more) loops the loop nest would extend.

Definition at line 304 of file CodeGenFunction.h.

Referenced by EmitOMPCanonicalLoop(), EmitOMPCollapsedCanonicalLoopNest(), EmitOMPInnerLoop(), and EmitOMPUnrollDirective().

◆ OMPParentLoopDirectiveForScan

const OMPExecutableDirective* clang::CodeGen::CodeGenFunction::OMPParentLoopDirectiveForScan = nullptr

Parent loop-based directive for scan directive.

Definition at line 773 of file CodeGenFunction.h.

Referenced by EmitOMPScanDirective(), and clang::CodeGen::CodeGenFunction::ParentLoopDirectiveForScanRegion::ParentLoopDirectiveForScanRegion().

◆ OMPScanDispatch

llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPScanDispatch = nullptr

Definition at line 777 of file CodeGenFunction.h.

Referenced by EmitOMPLoopBody(), and EmitOMPScanDirective().

◆ OMPScanExitBlock

llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPScanExitBlock = nullptr

Definition at line 776 of file CodeGenFunction.h.

Referenced by EmitOMPLoopBody(), and EmitOMPScanDirective().

◆ ParentCGF

◆ PrologueCleanupDepth

EHScopeStack::stable_iterator clang::CodeGen::CodeGenFunction::PrologueCleanupDepth

PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters.

Definition at line 393 of file CodeGenFunction.h.

Referenced by FinishFunction(), and StartFunction().

◆ RetExpr

const Expr* clang::CodeGen::CodeGenFunction::RetExpr = nullptr

If a return statement is being visited, this holds the return statment's result expression.

Definition at line 408 of file CodeGenFunction.h.

◆ ReturnBlock

JumpDest clang::CodeGen::CodeGenFunction::ReturnBlock

◆ ReturnValue

◆ ReturnValuePointer

Address clang::CodeGen::CodeGenFunction::ReturnValuePointer = Address::invalid()

ReturnValuePointer - The temporary alloca to hold a pointer to sret.

This is invalid if sret is not in use.

Definition at line 404 of file CodeGenFunction.h.

Referenced by EmitAutoVarAlloca(), and StartFunction().

◆ SanOpts

◆ SawAsmBlock

bool clang::CodeGen::CodeGenFunction::SawAsmBlock = false

Whether we processed a Microsoft-style asm block during CodeGen.

These can potentially set the return value.

Definition at line 584 of file CodeGenFunction.h.

Referenced by EmitAsmStmt(), and GenerateCode().

◆ SEHCodeSlotStack

SmallVector<Address, 1> clang::CodeGen::CodeGenFunction::SEHCodeSlotStack

A stack of exception code slots.

Entering an __except block pushes a slot on the stack and leaving pops one. The __exception_code() intrinsic loads a value from the top of the stack.

Definition at line 762 of file CodeGenFunction.h.

Referenced by EmitCapturedLocals(), EmitSEHExceptionCode(), EmitSEHExceptionCodeSave(), EnterSEHTryStmt(), and ExitSEHTryStmt().

◆ SEHInfo

llvm::Value* clang::CodeGen::CodeGenFunction::SEHInfo = nullptr

Value returned by __exception_info intrinsic.

Definition at line 765 of file CodeGenFunction.h.

Referenced by EmitSEHExceptionCodeSave(), and EmitSEHExceptionInfo().

◆ SEHTryEpilogueStack

llvm::SmallVector<const JumpDest *, 2> clang::CodeGen::CodeGenFunction::SEHTryEpilogueStack

◆ Target


The documentation for this class was generated from the following files: