clang
7.0.0
|
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code. More...
#include "/work/llvm-www-releases/7.0.0/docsbuild/llvm.src/tools/clang/lib/CodeGen/CodeGenFunction.h"
Classes | |
class | AbstractCallee |
An abstract representation of regular/ObjC call/message targets. More... | |
class | ArrayInitLoopExprScope |
The scope of an ArrayInitLoopExpr. More... | |
class | AutoVarEmission |
class | CallLifetimeEnd |
class | CGCapturedStmtInfo |
API for captured statement code generation. More... | |
class | CGCapturedStmtRAII |
RAII for correct setting/restoring of CapturedStmtInfo. More... | |
struct | CGCoroInfo |
class | ConditionalEvaluation |
An object to manage conditionally-evaluated expressions. More... | |
class | ConstantEmission |
struct | CPUDispatchMultiVersionResolverOption |
class | CXXDefaultInitExprScope |
The scope of a CXXDefaultInitExpr. More... | |
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... | |
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... | |
class | OMPCancelStackRAII |
Controls insertion of cancellation exit blocks in worksharing constructs. 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 | 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... | |
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 | TargetMultiVersionResolverOption |
struct | VlaSizePair |
struct | VPtr |
Struct with all information about dynamic [sub]class needed to set vptr. More... | |
Public Member Functions | |
void | InsertHelper (llvm::Instruction *I, const llvm::Twine &Name, llvm::BasicBlock *BB, llvm::BasicBlock::iterator InsertPt) const |
CGBuilder insert helper. More... | |
bool | isCoroutine () const |
bool | hasLabelBeenSeenInCurrentScope () const |
Return true if a label was seen in the current scope. More... | |
llvm::BasicBlock * | EmitLandingPad () |
Emits a landing pad for the current EH stack. More... | |
llvm::BasicBlock * | getInvokeDestImpl () |
template<class T > | |
DominatingValue< T >::saved_type | saveValueInCond (T value) |
bool | isSEHTryScope () const |
Returns true inside SEH __try blocks. More... | |
bool | isCleanupPadScope () const |
Returns true while emitting a cleanuppad. More... | |
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. More... | |
template<class T , class... As> | |
void | pushCleanupAfterFullExpr (CleanupKind Kind, As... A) |
Queue a cleanup to be pushed after finishing the current full-expression. More... | |
template<class T , class... As> | |
void | pushCleanupAfterFullExprImpl (CleanupKind Kind, Address ActiveFlag, As... A) |
void | initFullExprCleanup () |
Set up the last cleanup that was pushed as a conditional full-expression cleanup. More... | |
void | initFullExprCleanupWithFlag (Address ActiveFlag) |
Address | 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. More... | |
void | PushDestructorCleanup (const CXXDestructorDecl *Dtor, Address Addr) |
PushDestructorCleanup - Push a cleanup to call the complete-object variant of the given destructor on the object at the given address. More... | |
void | PopCleanupBlock (bool FallThroughIsBranchThrough=false) |
PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups. More... | |
void | DeactivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP) |
DeactivateCleanupBlock - Deactivates the given cleanup block. More... | |
void | ActivateCleanupBlock (EHScopeStack::stable_iterator Cleanup, llvm::Instruction *DominatingIP) |
ActivateCleanupBlock - Activates an initially-inactive cleanup. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | isObviouslyBranchWithoutCleanups (JumpDest Dest) const |
isObviouslyBranchWithoutCleanups - Return true if a branch to the specified destination obviously has no cleanups to run. More... | |
void | popCatchScope () |
popCatchScope - Pops the catch scope at the top of the EHScope stack, emitting any required code (other than the catch handlers themselves). More... | |
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. More... | |
void | setBeforeOutermostConditional (llvm::Value *value, Address addr) |
void | incrementProfileCounter (const Stmt *S, llvm::Value *StepV=nullptr) |
Increment the profiler's counter for the given statement by StepV . More... | |
uint64_t | getProfileCount (const Stmt *S) |
Get the profiler's count for the given statement. More... | |
void | setCurrentProfileCount (uint64_t Count) |
Set the profiler's current count. More... | |
uint64_t | getCurrentProfileCount () |
Get the profiler's current count. More... | |
CodeGenFunction (CodeGenModule &cgm, bool suppressNewContext=false) | |
~CodeGenFunction () | |
CodeGenTypes & | getTypes () const |
ASTContext & | getContext () const |
CGDebugInfo * | getDebugInfo () |
void | disableDebugInfo () |
void | enableDebugInfo () |
bool | shouldUseFusedARCCalls () |
const LangOptions & | getLangOpts () const |
Address | getExceptionSlot () |
Returns a pointer to the function's exception object and selector slot, which is assigned in every landing pad. More... | |
Address | getEHSelectorSlot () |
llvm::Value * | getExceptionFromSlot () |
Returns the contents of the function's exception object and selector slots. More... | |
llvm::Value * | getSelectorFromSlot () |
Address | getNormalCleanupDestSlot () |
llvm::BasicBlock * | getUnreachableBlock () |
llvm::BasicBlock * | getInvokeDest () |
bool | currentFunctionUsesSEHTry () const |
const TargetInfo & | getTarget () const |
llvm::LLVMContext & | getLLVMContext () |
const TargetCodeGenInfo & | getTargetHooks () const |
void | pushIrregularPartialArrayCleanup (llvm::Value *arrayBegin, Address arrayEndPointer, QualType elementType, CharUnits elementAlignment, Destroyer *destroyer) |
pushIrregularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array. More... | |
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. More... | |
void | pushDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type) |
pushDestroy - Push the standard destructor for the given type as at least a normal cleanup. More... | |
void | pushEHDestroy (QualType::DestructionKind dtorKind, Address addr, QualType type) |
pushEHDestroy - Push the standard destructor for the given type as an EH-only cleanup. More... | |
void | pushDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray) |
void | pushLifetimeExtendedDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray) |
void | pushCallObjectDeleteCleanup (const FunctionDecl *OperatorDelete, llvm::Value *CompletePtr, QualType ElementType) |
void | pushStackRestore (CleanupKind kind, Address SPMem) |
void | emitDestroy (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray) |
emitDestroy - Immediately perform the destruction of the given object. More... | |
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. More... | |
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. More... | |
Destroyer * | getDestroyer (QualType::DestructionKind destructionKind) |
bool | needsEHCleanup (QualType::DestructionKind kind) |
Determines whether an EH cleanup is required to destroy a type with the given destruction kind. More... | |
CleanupKind | getCleanupKind (QualType::DestructionKind kind) |
void | GenerateObjCMethod (const ObjCMethodDecl *OMD) |
Generate an Objective-C method. More... | |
void | StartObjCMethod (const ObjCMethodDecl *MD, const ObjCContainerDecl *CD) |
StartObjCMethod - Begin emission of an ObjCMethod. More... | |
void | GenerateObjCGetter (ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID) |
GenerateObjCGetter - Synthesize an Objective-C property getter function. More... | |
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. More... | |
void | generateObjCSetterBody (const ObjCImplementationDecl *classImpl, const ObjCPropertyImplDecl *propImpl, llvm::Constant *AtomicHelperFn) |
llvm::Value * | EmitBlockLiteral (const BlockExpr *) |
Emit block literal. More... | |
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'. More... | |
llvm::Constant * | GenerateDestroyHelperFunction (const CGBlockInfo &blockInfo) |
Generate the destroy-helper function for a block closure object: static void block_destroy_helper(block_t *theBlock);. More... | |
llvm::Constant * | GenerateObjCAtomicSetterCopyHelperFunction (const ObjCPropertyImplDecl *PID) |
GenerateObjCAtomicSetterCopyHelperFunction - Given a c++ object type with non-trivial copy assignment function, produce following helper function. More... | |
llvm::Constant * | GenerateObjCAtomicGetterCopyHelperFunction (const ObjCPropertyImplDecl *PID) |
llvm::Value * | EmitBlockCopyAndAutorelease (llvm::Value *Block, QualType Ty) |
void | BuildBlockRelease (llvm::Value *DeclPtr, BlockFieldFlags flags) |
void | emitByrefStructureInit (const AutoVarEmission &emission) |
Initialize the structural components of a __block variable, i.e. More... | |
void | enterByrefCleanup (CleanupKind Kind, Address Addr, BlockFieldFlags Flags, bool LoadBlockVarAddr) |
Enter a cleanup to destroy a __block variable. More... | |
void | setBlockContextParameter (const ImplicitParamDecl *D, unsigned argNum, llvm::Value *ptr) |
Address | LoadBlockStruct () |
Address | GetAddrOfBlockDecl (const VarDecl *var, bool ByRef) |
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. More... | |
Address | emitBlockByrefAddress (Address baseAddr, const BlockByrefInfo &info, bool followForward, const llvm::Twine &name) |
const BlockByrefInfo & | getBlockByrefInfo (const VarDecl *var) |
BuildByrefInfo - This routine changes a __block variable declared as T x into: More... | |
QualType | BuildFunctionArgList (GlobalDecl GD, FunctionArgList &Args) |
void | GenerateCode (GlobalDecl GD, llvm::Function *Fn, const CGFunctionInfo &FnInfo) |
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. More... | |
void | EmitConstructorBody (FunctionArgList &Args) |
EmitConstructorBody - Emits the body of the current constructor. More... | |
void | EmitDestructorBody (FunctionArgList &Args) |
EmitDestructorBody - Emits the body of the current destructor. More... | |
void | emitImplicitAssignmentOperatorBody (FunctionArgList &Args) |
void | EmitFunctionBody (FunctionArgList &Args, 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. More... | |
void | EmitForwardingCallToLambda (const CXXMethodDecl *LambdaCallOperator, CallArgList &CallArgs) |
void | EmitLambdaBlockInvokeBody () |
void | EmitLambdaDelegatingInvokeBody (const CXXMethodDecl *MD) |
void | EmitLambdaStaticInvokeBody (const CXXMethodDecl *MD) |
void | EmitAsanPrologueOrEpilogue (bool Prologue) |
llvm::DebugLoc | EmitReturnBlock () |
Emit the unified return block, trying to avoid its emission when possible. More... | |
void | FinishFunction (SourceLocation EndLoc=SourceLocation()) |
FinishFunction - Complete IR generation of the current function. More... | |
void | StartThunk (llvm::Function *Fn, GlobalDecl GD, const CGFunctionInfo &FnInfo, bool IsUnprototyped) |
void | EmitCallAndReturnForThunk (llvm::Constant *Callee, const ThunkInfo *Thunk, bool IsUnprototyped) |
void | FinishThunk () |
void | EmitMustTailThunk (const CXXMethodDecl *MD, llvm::Value *AdjustedThisPtr, llvm::Value *Callee) |
Emit a musttail call for a thunk with a potentially adjusted this pointer. More... | |
void | generateThunk (llvm::Function *Fn, const CGFunctionInfo &FnInfo, GlobalDecl GD, const ThunkInfo &Thunk, bool IsUnprototyped) |
Generate a thunk for the given method. More... | |
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. More... | |
void | EmitInitializerForField (FieldDecl *Field, LValue LHS, Expr *Init) |
void | InitializeVTablePointer (const VPtr &vptr) |
Initialize the vtable pointer of the given subobject. More... | |
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) |
GetVTablePtr - Return the Value of the vtable pointer member pointed to by This. More... | |
void | EmitVTablePtrCheckForCast (QualType T, llvm::Value *Derived, bool MayBeNull, CFITypeCheckKind TCK, SourceLocation Loc) |
Derived is the presumed address of an object of type T after a cast. More... | |
void | EmitVTablePtrCheckForCall (const CXXRecordDecl *RD, llvm::Value *VTable, CFITypeCheckKind TCK, SourceLocation Loc) |
EmitVTablePtrCheckForCall - Virtual method MD is being called via VTable. More... | |
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. More... | |
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. More... | |
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. More... | |
llvm::Value * | EmitVTableTypeCheckedLoad (const CXXRecordDecl *RD, llvm::Value *VTable, uint64_t VTableByteOffset) |
Emit a type checked load from the given vtable. More... | |
void | EnterDtorCleanups (const CXXDestructorDecl *Dtor, CXXDtorType Type) |
EnterDtorCleanups - Enter the cleanups necessary to complete the given phase of destruction for a destructor. More... | |
bool | ShouldInstrumentFunction () |
ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls. More... | |
bool | ShouldXRayInstrumentFunction () const |
ShouldXRayInstrument - Return true if the current function should be instrumented with XRay nop sleds. More... | |
bool | AlwaysEmitXRayCustomEvents () const |
AlwaysEmitXRayCustomEvents - Return true if we must unconditionally emit XRay custom event handling calls. More... | |
bool | AlwaysEmitXRayTypedEvents () const |
AlwaysEmitXRayTypedEvents - Return true if clang must unconditionally emit XRay typed event handling calls. More... | |
llvm::Constant * | EncodeAddrForUseInPrologue (llvm::Function *F, llvm::Constant *Addr) |
Encode an address into a form suitable for use in a function prologue. More... | |
llvm::Value * | DecodeAddrUsedInPrologue (llvm::Value *F, llvm::Value *EncodedAddr) |
Decode an address used in a function prologue, encoded by EncodeAddrForUseInPrologue . More... | |
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. More... | |
void | EmitFunctionEpilog (const CGFunctionInfo &FI, bool EmitRetDbgLoc, SourceLocation EndLoc) |
EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary. More... | |
void | EmitReturnValueCheck (llvm::Value *RV) |
Emit a test that checks if the return value RV is nonnull. More... | |
void | EmitStartEHSpec (const Decl *D) |
EmitStartEHSpec - Emit the start of the exception spec. More... | |
void | EmitEndEHSpec (const Decl *D) |
EmitEndEHSpec - Emit the end of the exception spec. More... | |
llvm::BasicBlock * | getTerminateLandingPad () |
getTerminateLandingPad - Return a landing pad that just calls terminate. More... | |
llvm::BasicBlock * | getTerminateFunclet () |
getTerminateLandingPad - Return a cleanup funclet that just calls terminate. More... | |
llvm::BasicBlock * | getTerminateHandler () |
getTerminateHandler - Return a handler (not a landing pad, just a catch handler) that just calls terminate. More... | |
llvm::Type * | ConvertTypeForMem (QualType T) |
llvm::Type * | ConvertType (QualType T) |
llvm::Type * | ConvertType (const TypeDecl *T) |
llvm::Value * | LoadObjCSelf () |
LoadObjCSelf - Load the value of self. More... | |
QualType | TypeOfSelfObject () |
TypeOfSelfObject - Return type of object that this self represents. More... | |
llvm::BasicBlock * | createBasicBlock (const Twine &name="", llvm::Function *parent=nullptr, llvm::BasicBlock *before=nullptr) |
createBasicBlock - Create an LLVM basic block. More... | |
JumpDest | getJumpDestForLabel (const LabelDecl *S) |
getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to. More... | |
void | SimplifyForwardingBlocks (llvm::BasicBlock *BB) |
SimplifyForwardingBlocks - If the given basic block is only a branch to another basic block, simplify it. More... | |
void | EmitBlock (llvm::BasicBlock *BB, bool IsFinished=false) |
EmitBlock - Emit the given block. More... | |
void | EmitBlockAfterUses (llvm::BasicBlock *BB) |
EmitBlockAfterUses - Emit the given block somewhere hopefully near its uses, and leave the insertion point in it. More... | |
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. More... | |
bool | HaveInsertPoint () const |
HaveInsertPoint - True if an insertion point is defined. More... | |
void | EnsureInsertPoint () |
EnsureInsertPoint - Ensure that an insertion point is defined so that emitted IR has a place to go. More... | |
void | ErrorUnsupported (const Stmt *S, const char *Type) |
ErrorUnsupported - Print out an error that codegen doesn't support the specified stmt yet. More... | |
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 | MakeAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, LValueBaseInfo BaseInfo, TBAAAccessInfo TBAAInfo) |
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. More... | |
LValue | MakeNaturalAlignAddrLValue (llvm::Value *V, QualType T) |
CharUnits | getNaturalTypeAlignment (QualType T, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, bool forPointeeType=false) |
CharUnits | getNaturalPointeeTypeAlignment (QualType T, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr) |
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) |
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. More... | |
Address | CreateTempAlloca (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr, Address *Alloca=nullptr) |
CreateTempAlloca - This creates a alloca and inserts it into the entry block. More... | |
Address | 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. More... | |
Address | CreateDefaultAlignTempAlloca (llvm::Type *Ty, const Twine &Name="tmp") |
CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type. More... | |
void | InitTempAlloca (Address Alloca, llvm::Value *Value) |
InitTempAlloca - Provide an initial value for the given alloca which will be observable at all locations in the function. More... | |
Address | CreateIRTemp (QualType T, const Twine &Name="tmp") |
CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment. More... | |
Address | CreateMemTemp (QualType T, const Twine &Name="tmp", Address *Alloca=nullptr) |
CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space. More... | |
Address | CreateMemTemp (QualType T, CharUnits Align, const Twine &Name="tmp", Address *Alloca=nullptr) |
Address | 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. More... | |
Address | CreateMemTempWithoutCast (QualType T, CharUnits Align, const Twine &Name="tmp") |
AggValueSlot | CreateAggTemp (QualType T, const Twine &Name="tmp") |
CreateAggTemp - Create a temporary memory object for the given aggregate type. More... | |
llvm::Value * | EmitCastToVoidPtr (llvm::Value *value) |
Emit a cast to void* in the appropriate address space. More... | |
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. More... | |
void | EmitIgnoredExpr (const Expr *E) |
EmitIgnoredExpr - Emit an expression in a context which ignores the result. More... | |
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. More... | |
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. More... | |
RValue | EmitAnyExprToTemp (const Expr *E) |
EmitAnyExprToTemp - Similarly to EmitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided. More... | |
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. More... | |
void | EmitAnyExprToExn (const Expr *E, Address Addr) |
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. More... | |
bool | hasVolatileMember (QualType T) |
hasVolatileMember - returns true if aggregate type has a volatile member. More... | |
AggValueSlot::Overlap_t | overlapForReturnValue () |
Determine whether a return value slot may overlap some other object. More... | |
AggValueSlot::Overlap_t | overlapForFieldInit (const FieldDecl *FD) |
Determine whether a field initialization may overlap some other object. More... | |
AggValueSlot::Overlap_t | overlapForBaseInit (const CXXRecordDecl *RD, const CXXRecordDecl *BaseRD, bool IsVirtual) |
Determine whether a base class initialization may overlap some other object. More... | |
void | EmitAggregateAssign (LValue Dest, LValue Src, QualType EltTy) |
Emit an aggregate assignment. More... | |
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. More... | |
Address | GetAddrOfLocalVar (const VarDecl *VD) |
GetAddrOfLocalVar - Return the address of a local variable. More... | |
LValue | getOrCreateOpaqueLValueMapping (const OpaqueValueExpr *e) |
Given an opaque value expression, return its LValue mapping if it exists, otherwise create one. More... | |
RValue | getOrCreateOpaqueRValueMapping (const OpaqueValueExpr *e) |
Given an opaque value expression, return its RValue mapping if it exists, otherwise create one. More... | |
llvm::Value * | getArrayInitIndex () |
Get the index of the current ArrayInitLoopExpr, if any. More... | |
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. More... | |
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 . More... | |
Address | EmitVAArg (VAArgExpr *VE, Address &VAListAddr) |
Generate code to get an argument from the passed in pointer and update it accordingly. More... | |
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. More... | |
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. More... | |
VlaSizePair | getVLAElements1D (const VariableArrayType *vla) |
Return the number of elements for a single dimension for the given array type. More... | |
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. More... | |
VlaSizePair | getVLASize (QualType vla) |
llvm::Value * | LoadCXXThis () |
LoadCXXThis - Load the value of 'this'. More... | |
Address | LoadCXXThisAddress () |
llvm::Value * | LoadCXXVTT () |
LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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). More... | |
void | EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, Address This, const CXXConstructExpr *E, AggValueSlot::Overlap_t Overlap, bool NewPointerIsChecked) |
void | EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, Address This, CallArgList &Args, AggValueSlot::Overlap_t Overlap, SourceLocation Loc, bool NewPointerIsChecked) |
void | EmitVTableAssumptionLoads (const CXXRecordDecl *ClassDecl, Address This) |
Emit assumption load for all bases. More... | |
void | EmitVTableAssumptionLoad (const VPtr &vptr, Address This) |
Emit assumption that vptr load == global vtable. More... | |
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. More... | |
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. More... | |
void | EmitCXXDestructorCall (const CXXDestructorDecl *D, CXXDtorType Type, bool ForVirtualBase, bool Delegating, Address This) |
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. More... | |
llvm::Value * | EmitLifetimeStart (uint64_t Size, llvm::Value *Addr) |
Emit a lifetime.begin marker if some criteria are satisfied. More... | |
void | EmitLifetimeEnd (llvm::Value *Size, 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. More... | |
void | EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet()) |
Emit a check that V is the address of storage of the appropriate size and alignment for an object of type Type . More... | |
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 . More... | |
llvm::Value * | EmitScalarPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre) |
ComplexPairTy | EmitComplexPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre) |
void | EmitAlignmentAssumption (llvm::Value *PtrValue, unsigned Alignment, llvm::Value *OffsetValue=nullptr) |
llvm::DebugLoc | SourceLocToDebugLoc (SourceLocation Location) |
Converts Location to a DebugLoc, if debug information is enabled. More... | |
void | EmitDecl (const Decl &D) |
EmitDecl - Emit a declaration. More... | |
void | EmitVarDecl (const VarDecl &D) |
EmitVarDecl - Emit a local variable declaration. More... | |
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. More... | |
void | EmitAutoVarDecl (const VarDecl &D) |
EmitAutoVarDecl - Emit an auto variable declaration. More... | |
AutoVarEmission | EmitAutoVarAlloca (const VarDecl &var) |
EmitAutoVarAlloca - Emit the alloca and debug information for a local variable. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | unprotectFromPeepholes (PeepholeProtection protection) |
void | EmitAlignmentAssumption (llvm::Value *PtrValue, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr) |
void | EmitStopPoint (const Stmt *S) |
EmitStopPoint - Emit a debug stoppoint if we are emitting debug info. More... | |
void | EmitStmt (const Stmt *S, ArrayRef< const Attr *> Attrs=None) |
EmitStmt - Emit the code for the statement. More... | |
bool | EmitSimpleStmt (const Stmt *S) |
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. More... | |
Address | EmitCompoundStmt (const CompoundStmt &S, bool GetLast=false, AggValueSlot AVS=AggValueSlot::ignored()) |
EmitCompoundStmt - Emit a compound statement {..} node. More... | |
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. More... | |
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=None) |
void | EmitDoStmt (const DoStmt &S, ArrayRef< const Attr *> Attrs=None) |
void | EmitForStmt (const ForStmt &S, ArrayRef< const Attr *> Attrs=None) |
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. More... | |
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) |
void | EmitCaseStmt (const CaseStmt &S) |
void | EmitCaseStmtRange (const CaseStmt &S) |
EmitCaseStmtRange - If case statement range is not too big then add multiple cases to switch instruction, one for each value within the range. More... | |
void | EmitAsmStmt (const AsmStmt &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 | 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. More... | |
llvm::Function * | GenerateSEHFilterFunction (CodeGenFunction &ParentCGF, const SEHExceptStmt &Except) |
Create a stub filter function that will ultimately hold the code of the filter expression. More... | |
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. More... | |
void | EmitCapturedLocals (CodeGenFunction &ParentCGF, const Stmt *OutlinedStmt, bool IsFilter) |
Scan the outlined statement for captures from the parent function. More... | |
Address | recoverAddrOfEscapedLocal (CodeGenFunction &ParentCGF, Address ParentVar, llvm::Value *ParentFP) |
Recovers the address of a local in a parent function. More... | |
void | EmitCXXForRangeStmt (const CXXForRangeStmt &S, ArrayRef< const Attr *> Attrs=None) |
llvm::Value * | getTypeSize (QualType Ty) |
Returns calculated size of the specified type. More... | |
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. More... | |
llvm::Function * | GenerateCapturedStmtFunction (const CapturedStmt &S) |
Creates the outlined function for a CapturedStmt. More... | |
Address | GenerateCapturedStmtArgument (const CapturedStmt &S) |
llvm::Function * | GenerateOpenMPCapturedStmtFunction (const CapturedStmt &S) |
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. More... | |
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. More... | |
std::pair< bool, RValue > | 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. More... | |
bool | EmitOMPFirstprivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope) |
void | EmitOMPPrivateClause (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope) |
void | EmitOMPUseDevicePtrClause (const OMPClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, Address > &CaptureDeviceAddrMap) |
bool | EmitOMPCopyinClause (const OMPExecutableDirective &D) |
Emit code for copyin clause in D directive. More... | |
bool | EmitOMPLastprivateClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope) |
Emit initial code for lastprivate variables. More... | |
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. More... | |
void | EmitOMPLinearClause (const OMPLoopDirective &D, CodeGenFunction::OMPPrivateScope &PrivateScope) |
Emit initial code for linear clauses. More... | |
void | EmitOMPLinearClauseFinal (const OMPLoopDirective &D, const llvm::function_ref< llvm::Value *(CodeGenFunction &)> CondGen) |
Emit final code for linear clauses. More... | |
void | EmitOMPReductionClauseInit (const OMPExecutableDirective &D, OMPPrivateScope &PrivateScope) |
Emit initial code for reduction variables. More... | |
void | EmitOMPReductionClauseFinal (const OMPExecutableDirective &D, const OpenMPDirectiveKind ReductionKind) |
Emit final update of reduction values to original variables at the end of the directive. More... | |
bool | EmitOMPLinearClauseInit (const OMPLoopDirective &D) |
Emit initial code for linear variables. More... | |
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 | EmitOMPParallelDirective (const OMPParallelDirective &S) |
void | EmitOMPSimdDirective (const OMPSimdDirective &S) |
void | EmitOMPForDirective (const OMPForDirective &S) |
void | EmitOMPForSimdDirective (const OMPForSimdDirective &S) |
void | EmitOMPSectionsDirective (const OMPSectionsDirective &S) |
void | EmitOMPSectionDirective (const OMPSectionDirective &S) |
void | EmitOMPSingleDirective (const OMPSingleDirective &S) |
void | EmitOMPMasterDirective (const OMPMasterDirective &S) |
void | EmitOMPCriticalDirective (const OMPCriticalDirective &S) |
void | EmitOMPParallelForDirective (const OMPParallelForDirective &S) |
void | EmitOMPParallelForSimdDirective (const OMPParallelForSimdDirective &S) |
void | EmitOMPParallelSectionsDirective (const OMPParallelSectionsDirective &S) |
void | EmitOMPTaskDirective (const OMPTaskDirective &S) |
void | EmitOMPTaskyieldDirective (const OMPTaskyieldDirective &S) |
void | EmitOMPBarrierDirective (const OMPBarrierDirective &S) |
void | EmitOMPTaskwaitDirective (const OMPTaskwaitDirective &S) |
void | EmitOMPTaskgroupDirective (const OMPTaskgroupDirective &S) |
void | EmitOMPFlushDirective (const OMPFlushDirective &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 | 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 | EmitOMPInnerLoop (const Stmt &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. More... | |
JumpDest | getOMPCancelDestination (OpenMPDirectiveKind Kind) |
void | EmitOMPPrivateLoopCounters (const OMPLoopDirective &S, OMPPrivateScope &LoopScope) |
Emit initial code for loop counters of loop-based directives. More... | |
void | EmitOMPLoopBody (const OMPLoopDirective &D, JumpDest LoopExit) |
Helper for the OpenMP loop directives. More... | |
bool | EmitOMPWorksharingLoop (const OMPLoopDirective &S, Expr *EUB, const CodeGenLoopBoundsTy &CodeGenLoopBounds, const CodeGenDispatchBoundsTy &CGDispatchBounds) |
Emit code for the worksharing loop-based directive. More... | |
void | EmitOMPDistributeLoop (const OMPLoopDirective &S, const CodeGenLoopTy &CodeGenLoop, Expr *IncExpr) |
Emit code for the distribute loop-based directive. More... | |
void | EmitOMPSimdInit (const OMPLoopDirective &D, bool IsMonotonic=false) |
Helpers for the OpenMP loop directives. More... | |
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. More... | |
RValue | GetUndefRValue (QualType Ty) |
GetUndefRValue - Get an appropriate 'undef' rvalue for the given type. More... | |
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). More... | |
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). More... | |
LValue | EmitLValue (const Expr *E) |
EmitLValue - Emit code to compute a designator that specifies the location of the expression. More... | |
LValue | EmitCheckedLValue (const Expr *E, TypeCheckKind TCK) |
Same as EmitLValue but additionally we generate checking code to guard against undefined behavior. More... | |
RValue | convertTempToRValue (Address addr, QualType type, SourceLocation Loc) |
Given the address of a temporary variable, produce an r-value of its type. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
llvm::Value * | EmitFromMemory (llvm::Value *Value, QualType Ty) |
EmitFromMemory - Change a scalar value from its memory representation to its value representation. More... | |
bool | EmitScalarRangeCheck (llvm::Value *Value, QualType Ty, SourceLocation Loc) |
Check if the scalar Value is within the valid range for the given type Ty . More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
RValue | EmitLoadOfExtVectorElementLValue (LValue V) |
RValue | EmitLoadOfBitfieldLValue (LValue LV, SourceLocation Loc) |
RValue | EmitLoadOfGlobalRegLValue (LValue LV) |
Load of global gamed gegisters are always calls to intrinsics. More... | |
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'. More... | |
void | EmitStoreThroughExtVectorComponentLValue (RValue Src, LValue Dst) |
void | EmitStoreThroughGlobalRegLValue (RValue Src, LValue Dst) |
Store of global named registers are always calls to intrinsics. More... | |
void | EmitStoreThroughBitfieldLValue (RValue Src, LValue Dst, llvm::Value **Result=nullptr) |
EmitStoreThroughBitfieldLValue - Store Src into Dst with same constraints as EmitStoreThroughLValue. More... | |
LValue | EmitComplexAssignmentLValue (const BinaryOperator *E) |
Emit an l-value for an assignment (simple or compound) of complex type. More... | |
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) |
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) |
LValue | EmitOMPArraySectionExpr (const OMPArraySectionExpr *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) |
LValue | EmitConditionalOperatorLValue (const AbstractConditionalOperator *E) |
LValue | EmitCastLValue (const CastExpr *E) |
EmitCastLValue - Casts are never lvalues unless that cast is to a reference type. More... | |
LValue | EmitMaterializeTemporaryExpr (const MaterializeTemporaryExpr *E) |
LValue | EmitOpaqueValueLValue (const OpaqueValueExpr *e) |
Address | EmitExtVectorElementLValue (LValue V) |
Generates lvalue for partial ext_vector access. More... | |
RValue | EmitRValueForField (LValue LV, const FieldDecl *FD, SourceLocation Loc) |
Address | EmitArrayToPointerDecay (const Expr *Array, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr) |
ConstantEmission | tryEmitAsConstant (DeclRefExpr *refExpr) |
Try to emit a reference to the given value without producing it as an l-value. More... | |
ConstantEmission | tryEmitAsConstant (const MemberExpr *ME) |
RValue | EmitPseudoObjectRValue (const PseudoObjectExpr *e, AggValueSlot slot=AggValueSlot::ignored()) |
LValue | EmitPseudoObjectLValue (const PseudoObjectExpr *e) |
llvm::Value * | EmitIvarOffset (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar) |
LValue | EmitLValueForField (LValue Base, const FieldDecl *Field) |
LValue | EmitLValueForLambdaField (const FieldDecl *Field) |
Given that we are currently emitting a lambda, emit an l-value for one of its members. More... | |
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. More... | |
LValue | EmitLValueForIvar (QualType ObjectTy, llvm::Value *Base, const ObjCIvarDecl *Ivar, unsigned CVRQualifiers) |
LValue | EmitCXXConstructLValue (const CXXConstructExpr *E) |
LValue | EmitCXXBindTemporaryLValue (const CXXBindTemporaryExpr *E) |
LValue | EmitLambdaLValue (const LambdaExpr *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::Instruction **callOrInvoke, SourceLocation Loc) |
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. More... | |
RValue | EmitCall (const CGFunctionInfo &CallInfo, const CGCallee &Callee, ReturnValueSlot ReturnValue, const CallArgList &Args, llvm::Instruction **callOrInvoke=nullptr) |
RValue | EmitCall (QualType FnType, const CGCallee &Callee, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Value *Chain=nullptr) |
RValue | EmitCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue=ReturnValueSlot()) |
RValue | EmitSimpleCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue) |
Emit a CallExpr without considering whether it might be a subclass. More... | |
CGCallee | EmitCallee (const Expr *E) |
void | checkTargetFeatures (const CallExpr *E, const FunctionDecl *TargetDecl) |
llvm::CallInst * | EmitRuntimeCall (llvm::Value *callee, const Twine &name="") |
llvm::CallInst * | EmitRuntimeCall (llvm::Value *callee, ArrayRef< llvm::Value *> args, const Twine &name="") |
llvm::CallInst * | EmitNounwindRuntimeCall (llvm::Value *callee, const Twine &name="") |
llvm::CallInst * | EmitNounwindRuntimeCall (llvm::Value *callee, ArrayRef< llvm::Value *> args, const Twine &name="") |
SmallVector< llvm::OperandBundleDef, 1 > | getBundlesForFunclet (llvm::Value *Callee) |
llvm::CallSite | EmitCallOrInvoke (llvm::Value *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. More... | |
llvm::CallSite | EmitRuntimeCallOrInvoke (llvm::Value *callee, ArrayRef< llvm::Value *> args, const Twine &name="") |
Emits a call or invoke instruction to the given runtime function. More... | |
llvm::CallSite | EmitRuntimeCallOrInvoke (llvm::Value *callee, const Twine &name="") |
Emits a call or invoke instruction to the given nullary runtime function. More... | |
void | EmitNoreturnRuntimeCallOrInvoke (llvm::Value *callee, ArrayRef< llvm::Value *> args) |
Emits a call or invoke to the given noreturn runtime function. More... | |
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. More... | |
CGCallee | BuildAppleKextVirtualDestructorCall (const CXXDestructorDecl *DD, CXXDtorType Type, const CXXRecordDecl *RD) |
BuildVirtualCall - This routine makes indirect vtable call for call to virtual destructors. More... | |
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) |
RValue | EmitCXXDestructorCall (const CXXDestructorDecl *DD, const CGCallee &Callee, llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E, StructorType Type) |
RValue | EmitCXXMemberCallExpr (const CXXMemberCallExpr *E, ReturnValueSlot ReturnValue) |
RValue | EmitCXXMemberOrOperatorMemberCallExpr (const CallExpr *CE, const CXXMethodDecl *MD, ReturnValueSlot ReturnValue, bool HasQualifier, NestedNameSpecifier *Qualifier, bool IsArrow, const Expr *Base) |
Address | EmitCXXMemberDataPointerAddress (const Expr *E, Address base, llvm::Value *memberPtr, const MemberPointerType *memberPtrType, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr) |
Emit the address of a field using a member data pointer. More... | |
RValue | EmitCXXMemberPointerCallExpr (const CXXMemberCallExpr *E, ReturnValueSlot ReturnValue) |
RValue | EmitCXXOperatorMemberCallExpr (const CXXOperatorCallExpr *E, const CXXMethodDecl *MD, ReturnValueSlot ReturnValue) |
RValue | EmitCXXPseudoDestructorExpr (const CXXPseudoDestructorExpr *E) |
RValue | EmitCUDAKernelCallExpr (const CUDAKernelCallExpr *E, ReturnValueSlot ReturnValue) |
RValue | EmitNVPTXDevicePrintfCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue) |
RValue | EmitBuiltinExpr (const FunctionDecl *FD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue) |
RValue | emitBuiltinOSLogFormat (const CallExpr &E) |
Emit IR for __builtin_os_log_format. More... | |
llvm::Function * | generateBuiltinOSLogHelperFunction (const analyze_os_log::OSLogBufferLayout &Layout, CharUnits BufferAlignment) |
RValue | EmitBlockCallExpr (const CallExpr *E, ReturnValueSlot ReturnValue) |
llvm::Value * | EmitTargetBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
EmitTargetBuiltinExpr - Emit the given builtin call. More... | |
llvm::Value * | EmitAArch64CompareBuiltinExpr (llvm::Value *Op, llvm::Type *Ty, const llvm::CmpInst::Predicate Fp, const llvm::CmpInst::Predicate Ip, const llvm::Twine &Name="") |
llvm::Value * | EmitARMBuiltinExpr (unsigned BuiltinID, const CallExpr *E, llvm::Triple::ArchType Arch) |
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::Value * | EmitISOVolatileLoad (const CallExpr *E) |
llvm::Value * | EmitISOVolatileStore (const CallExpr *E) |
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 * | 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::Value * | EmitAArch64BuiltinExpr (unsigned BuiltinID, const CallExpr *E, llvm::Triple::ArchType Arch) |
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 * | 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 * | EmitMSVCBuiltinExpr (MSVCIntrin BuiltinID, const CallExpr *E) |
llvm::Value * | EmitBuiltinAvailable (ArrayRef< llvm::Value *> Args) |
llvm::Value * | EmitObjCProtocolExpr (const ObjCProtocolExpr *E) |
llvm::Value * | EmitObjCStringLiteral (const ObjCStringLiteral *E) |
Emits an instance of NSConstantString representing the object. More... | |
llvm::Value * | EmitObjCBoxedExpr (const ObjCBoxedExpr *E) |
EmitObjCBoxedExpr - This routine generates code to call the appropriate expression boxing method. More... | |
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. More... | |
RValue | EmitObjCMessageExpr (const ObjCMessageExpr *E, ReturnValueSlot Return=ReturnValueSlot()) |
CleanupKind | getARCCleanupKind () |
Retrieves the default cleanup kind for an ARC cleanup. More... | |
void | EmitARCInitWeak (Address addr, llvm::Value *value) |
i8* @objc_initWeak(i8** addr, i8* value) Returns value. More... | |
void | EmitARCDestroyWeak (Address addr) |
void @objc_destroyWeak(i8** addr) Essentially objc_storeWeak(addr, nil). More... | |
llvm::Value * | EmitARCLoadWeak (Address addr) |
i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)). More... | |
llvm::Value * | EmitARCLoadWeakRetained (Address addr) |
i8* @objc_loadWeakRetained(i8** addr) More... | |
llvm::Value * | EmitARCStoreWeak (Address addr, llvm::Value *value, bool ignored) |
i8* @objc_storeWeak(i8** addr, i8* value) Returns value. More... | |
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. More... | |
void | EmitARCMoveWeak (Address dst, Address src) |
void @objc_moveWeak(i8** dest, i8** src) Disregards the current value in dest. More... | |
llvm::Value * | EmitARCRetainAutorelease (QualType type, llvm::Value *value) |
Do a fused retain/autorelease of the given object. More... | |
llvm::Value * | EmitARCRetainAutoreleaseNonBlock (llvm::Value *value) |
Do a fused retain/autorelease of the given object. More... | |
llvm::Value * | EmitARCStoreStrong (LValue lvalue, llvm::Value *value, bool resultIgnored) |
Store into a strong object. More... | |
llvm::Value * | EmitARCStoreStrongCall (Address addr, llvm::Value *value, bool resultIgnored) |
Store into a strong object. More... | |
llvm::Value * | EmitARCRetain (QualType type, llvm::Value *value) |
Produce the code to do a retain. More... | |
llvm::Value * | EmitARCRetainNonBlock (llvm::Value *value) |
Retain the given object, with normal retain semantics. More... | |
llvm::Value * | EmitARCRetainBlock (llvm::Value *value, bool mandatory) |
Retain the given block, with _Block_copy semantics. More... | |
void | EmitARCDestroyStrong (Address addr, ARCPreciseLifetime_t precise) |
Destroy a __strong variable. More... | |
void | EmitARCRelease (llvm::Value *value, ARCPreciseLifetime_t precise) |
Release the given object. More... | |
llvm::Value * | EmitARCAutorelease (llvm::Value *value) |
Autorelease the given object. More... | |
llvm::Value * | EmitARCAutoreleaseReturnValue (llvm::Value *value) |
Autorelease the given object. More... | |
llvm::Value * | EmitARCRetainAutoreleaseReturnValue (llvm::Value *value) |
Do a fused retain/autorelease of the given object. More... | |
llvm::Value * | EmitARCRetainAutoreleasedReturnValue (llvm::Value *value) |
Retain the given object which is the result of a function call. More... | |
llvm::Value * | EmitARCUnsafeClaimAutoreleasedReturnValue (llvm::Value *value) |
Claim a possibly-autoreleased return value at +0. More... | |
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 * | EmitObjCThrowOperand (const Expr *expr) |
llvm::Value * | EmitObjCConsumeObject (QualType T, llvm::Value *Ptr) |
Produce the code for a CK_ARCConsumeObject. More... | |
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. More... | |
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. More... | |
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. More... | |
void | EmitObjCAutoreleasePoolPop (llvm::Value *Ptr) |
Produce the code to do a primitive release. More... | |
llvm::Value * | EmitObjCAutoreleasePoolPush () |
Produce the code to do a objc_autoreleasepool_push. More... | |
llvm::Value * | EmitObjCMRRAutoreleasePoolPush () |
Produce the code to do an MRR version objc_autoreleasepool_push. More... | |
void | EmitObjCAutoreleasePoolCleanup (llvm::Value *Ptr) |
void | EmitObjCMRRAutoreleasePoolPop (llvm::Value *Ptr) |
Produce the code to do a primitive release. More... | |
RValue | EmitReferenceBindingToExpr (const Expr *E) |
Emits a reference binding to the passed in expression. More... | |
llvm::Value * | EmitScalarExpr (const Expr *E, bool IgnoreResultAssign=false) |
EmitScalarExpr - Emit the computation of the specified expression of LLVM scalar type, returning the result. More... | |
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. More... | |
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. More... | |
void | EmitAggExpr (const Expr *E, AggValueSlot AS) |
EmitAggExpr - Emit the computation of the specified expression of aggregate type. More... | |
LValue | EmitAggExprToLValue (const Expr *E) |
EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue. More... | |
void | EmitExtendGCLifetime (llvm::Value *object) |
EmitExtendGCLifetime - Given a pointer to an Objective-C object, make sure it survives garbage collection until this point. More... | |
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. More... | |
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. More... | |
void | EmitStoreOfComplex (ComplexPairTy V, LValue dest, bool isInit) |
EmitStoreOfComplex - Store a complex number into the specified l-value. More... | |
ComplexPairTy | EmitLoadOfComplex (LValue src, SourceLocation loc) |
EmitLoadOfComplex - Load a complex number from the specified l-value. More... | |
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. More... | |
void | EmitCXXGlobalVarDeclInit (const VarDecl &D, llvm::Constant *DeclPtr, bool PerformInit) |
EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage. More... | |
llvm::Constant * | createAtExitStub (const VarDecl &VD, llvm::Constant *Dtor, llvm::Constant *Addr) |
Create a stub function, suitable for being passed to atexit, which passes the given address to the given destructor function. More... | |
void | registerGlobalDtorWithAtExit (const VarDecl &D, llvm::Constant *fn, llvm::Constant *addr) |
Call atexit() with a function that passes the given argument to the given function. More... | |
void | registerGlobalDtorWithAtExit (llvm::Constant *dtorStub) |
Call atexit() with function dtorStub. More... | |
void | EmitCXXGuardedInit (const VarDecl &D, llvm::GlobalVariable *DeclPtr, bool PerformInit) |
Emit code in this function to perform a guarded variable initialization. More... | |
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. More... | |
void | GenerateCXXGlobalInitFunc (llvm::Function *Fn, ArrayRef< llvm::Function *> CXXThreadLocals, Address Guard=Address::invalid()) |
GenerateCXXGlobalInitFunc - Generates code for initializing global variables. More... | |
void | GenerateCXXGlobalDtorsFunc (llvm::Function *Fn, const std::vector< std::pair< llvm::WeakTrackingVH, llvm::Constant *>> &DtorsAndObjects) |
GenerateCXXGlobalDtorsFunc - Generates code for destroying global variables. More... | |
void | GenerateCXXGlobalVarDeclInitFunc (llvm::Function *Fn, const VarDecl *D, llvm::GlobalVariable *Addr, bool PerformInit) |
Emit the code necessary to initialize the given global variable. More... | |
void | EmitCXXConstructExpr (const CXXConstructExpr *E, AggValueSlot Dest) |
void | EmitSynthesizedCXXCopyCtor (Address Dest, Address Src, const Expr *Exp) |
void | enterFullExpression (const ExprWithCleanups *E) |
void | enterNonTrivialFullExpression (const ExprWithCleanups *E) |
Enter a full-expression with a non-trivial number of objects to clean up. More... | |
void | EmitCXXThrowExpr (const CXXThrowExpr *E, bool KeepInsertionPoint=true) |
void | EmitLambdaExpr (const LambdaExpr *E, AggValueSlot Dest) |
RValue | EmitAtomicExpr (AtomicExpr *E) |
llvm::Value * | EmitAnnotationCall (llvm::Value *AnnotationFn, llvm::Value *AnnotatedVal, StringRef AnnotationStr, SourceLocation Location) |
Emit an annotation call (intrinsic or builtin). More... | |
void | EmitVarAnnotations (const VarDecl *D, llvm::Value *V) |
Emit local annotations for the local variable V, declared by D. More... | |
Address | EmitFieldAnnotations (const FieldDecl *D, Address V) |
Emit field annotations for the given field & value. More... | |
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. More... | |
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. More... | |
void | EmitBranchOnBoolExpr (const Expr *Cond, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount) |
EmitBranchOnBoolExpr - Emit a branch on a boolean condition (e.g. More... | |
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. More... | |
llvm::Value * | EmitCheckedInBoundsGEP (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. More... | |
llvm::Value * | EmitCheckedArgForBuiltin (const Expr *E, BuiltinCheckKind Kind) |
Emits an argument for a call to a builtin. More... | |
llvm::Constant * | EmitCheckTypeDescriptor (QualType T) |
Emit a description of a type in a format suitable for passing to a runtime sanitizer handler. More... | |
llvm::Value * | EmitCheckValue (llvm::Value *V) |
Convert a value into a format suitable for passing to a runtime sanitizer handler. More... | |
llvm::Constant * | EmitCheckSourceLocation (SourceLocation Loc) |
Emit a description of a source location in a format suitable for passing to a runtime sanitizer handler. More... | |
void | EmitCheck (ArrayRef< std::pair< llvm::Value *, SanitizerMask >> Checked, SanitizerHandler Check, ArrayRef< llvm::Constant *> StaticArgs, ArrayRef< llvm::Value *> DynamicArgs) |
Create a basic block that will call a handler function in a sanitizer runtime with the provided arguments, and create a conditional branch to it. More... | |
void | EmitCfiSlowPathCheck (SanitizerMask Kind, 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. More... | |
void | EmitUnreachable (SourceLocation Loc) |
Emit a reached-unreachable diagnostic if Loc is valid and runtime checking is enabled. More... | |
void | EmitTrapCheck (llvm::Value *Checked) |
Create a basic block that will call the trap intrinsic, and emit a conditional branch to it, for the -ftrapv checks. More... | |
llvm::CallInst * | EmitTrapCall (llvm::Intrinsic::ID IntrID) |
Emit a call to trap or debugtrap and attach function attribute "trap-func-name" if specified. More... | |
void | EmitCfiCheckStub () |
Emit a stub for the cross-DSO CFI check function. More... | |
void | EmitCfiCheckFail () |
Emit a cross-DSO CFI failure handling function. More... | |
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. More... | |
void | EmitCallArg (CallArgList &args, const Expr *E, QualType ArgType) |
EmitCallArg - Emit a single call argument. More... | |
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. More... | |
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. More... | |
template<typename T > | |
void | EmitCallArgs (CallArgList &Args, const T *CallArgTypeInfo, 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. More... | |
void | EmitCallArgs (CallArgList &Args, ArrayRef< QualType > ArgTypes, llvm::iterator_range< CallExpr::const_arg_iterator > ArgRange, AbstractCallee AC=AbstractCallee(), unsigned ParamsToSkip=0, EvaluationOrder Order=EvaluationOrder::Default) |
Address | EmitPointerWithAlignment (const Expr *Addr, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr) |
EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee. More... | |
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 . More... | |
void | EmitSanitizerStatReport (llvm::SanitizerStatKind SSK) |
void | EmitTargetMultiVersionResolver (llvm::Function *Resolver, ArrayRef< TargetMultiVersionResolverOption > Options) |
void | EmitCPUDispatchMultiVersionResolver (llvm::Function *Resolver, ArrayRef< CPUDispatchMultiVersionResolverOption > Options) |
![]() | |
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 void | destroyBlockInfos (CGBlockInfo *info) |
Destroy a chain of block layouts. More... | |
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. More... | |
static TypeEvaluationKind | getEvaluationKind (QualType T) |
getEvaluationKind - Return the TypeEvaluationKind of QualType T . More... | |
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. More... | |
static bool | IsWrappedCXXThis (const Expr *E) |
Check if E is a C++ "this" pointer wrapped in value-preserving casts. More... | |
static bool | ShouldNullCheckClassCastValue (const CastExpr *Cast) |
static bool | isNullPointerAllowed (TypeCheckKind TCK) |
Determine whether the pointer type check TCK permits null pointers. More... | |
static bool | isVptrCheckRequired (TypeCheckKind TCK, QualType Ty) |
Determine whether the pointer type check TCK requires a vptr check. More... | |
static void | EmitOMPTargetDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetDirective &S) |
Emit device code for the target directive. More... | |
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. More... | |
static void | EmitOMPTargetParallelForSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelForSimdDirective &S) |
Emit device code for the target parallel for simd directive. More... | |
static void | EmitOMPTargetTeamsDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDirective &S) |
Emit device code for the target teams directive. More... | |
static void | EmitOMPTargetTeamsDistributeDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeDirective &S) |
Emit device code for the target teams distribute directive. More... | |
static void | EmitOMPTargetTeamsDistributeSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeSimdDirective &S) |
Emit device code for the target teams distribute simd directive. More... | |
static void | EmitOMPTargetSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetSimdDirective &S) |
Emit device code for the target simd directive. More... | |
static void | EmitOMPTargetTeamsDistributeParallelForSimdDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForSimdDirective &S) |
Emit device code for the target teams distribute parallel for simd directive. More... | |
static void | EmitOMPTargetTeamsDistributeParallelForDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForDirective &S) |
static bool | ContainsLabel (const Stmt *S, bool IgnoreCaseStmts=false) |
ContainsLabel - Return true if the statement contains a label in it. More... | |
static bool | containsBreak (const Stmt *S) |
containsBreak - Return true if the statement contains a break out of it. More... | |
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. More... | |
static bool | isObjCMethodWithTypeParams (const ObjCMethodDecl *method) |
template<typename T > | |
static bool | isObjCMethodWithTypeParams (const T *) |
static uint32_t | GetX86CpuSupportsMask (ArrayRef< StringRef > FeatureStrs) |
Public Attributes | |
CodeGenModule & | CGM |
const TargetInfo & | Target |
LoopInfoStack | LoopStack |
CGBuilderTy | Builder |
VarBypassDetector | Bypasses |
const Decl * | CurFuncDecl |
CurFuncDecl - Holds the Decl for the current outermost non-closure context. More... | |
const Decl * | CurCodeDecl |
CurCodeDecl - This is the inner-most code context, which includes blocks. More... | |
const CGFunctionInfo * | CurFnInfo |
QualType | FnRetTy |
llvm::Function * | CurFn = nullptr |
CGCoroInfo | CurCoro |
GlobalDecl | CurGD |
CurGD - The GlobalDecl for the current function being compiled. More... | |
EHScopeStack::stable_iterator | PrologueCleanupDepth |
PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters. More... | |
JumpDest | ReturnBlock |
ReturnBlock - Unified return block. More... | |
Address | ReturnValue = Address::invalid() |
ReturnValue - The temporary alloca to hold the return value. More... | |
llvm::AssertingVH< llvm::Instruction > | AllocaInsertPt |
AllocaInsertPoint - This is an instruction in the entry block before which we prefer to insert allocas. More... | |
CGCapturedStmtInfo * | CapturedStmtInfo = nullptr |
SanitizerSet | SanOpts |
Sanitizers enabled for this function. More... | |
bool | IsSanitizerScope = false |
True if CodeGen currently emits code implementing sanitizer checks. More... | |
bool | CurFuncIsThunk = false |
In C++, whether we are code generating a thunk. More... | |
bool | AutoreleaseResult = false |
In ARC, whether we should autorelease the return value. More... | |
bool | SawAsmBlock = false |
Whether we processed a Microsoft-style asm block during CodeGen. More... | |
const NamedDecl * | CurSEHParent = nullptr |
bool | IsOutlinedSEHHelper = false |
True if the current function is an outlined SEH helper. More... | |
const CodeGen::CGBlockInfo * | BlockInfo = nullptr |
llvm::Value * | BlockPointer = nullptr |
llvm::DenseMap< const VarDecl *, FieldDecl * > | LambdaCaptureFields |
FieldDecl * | LambdaThisCaptureField = 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. More... | |
EHScopeStack | EHStack |
llvm::SmallVector< char, 256 > | LifetimeExtendedCleanupStack |
llvm::SmallVector< const JumpDest *, 2 > | SEHTryEpilogueStack |
llvm::Instruction * | CurrentFuncletPad = nullptr |
Address | NormalCleanupDest = Address::invalid() |
i32s containing the indexes of the cleanup destinations. More... | |
unsigned | NextCleanupDestIndex = 1 |
CGBlockInfo * | FirstBlockInfo = nullptr |
FirstBlockInfo - The head of a singly-linked-list of block layouts. More... | |
llvm::BasicBlock * | EHResumeBlock = nullptr |
EHResumeBlock - Unified block containing a call to llvm.eh.resume. More... | |
llvm::Value * | ExceptionSlot = nullptr |
The exception slot. More... | |
llvm::AllocaInst * | EHSelectorSlot = nullptr |
The selector slot. More... | |
SmallVector< Address, 1 > | SEHCodeSlotStack |
A stack of exception code slots. More... | |
llvm::Value * | SEHInfo = nullptr |
Value returned by __exception_info intrinsic. More... | |
SmallVector< llvm::Value *, 8 > | ObjCEHValueStack |
ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows. More... | |
EHScopeStack::stable_iterator | CurrentCleanupScopeDepth |
![]() | |
llvm::Type * | VoidTy |
void More... | |
llvm::IntegerType * | Int8Ty |
i8, i16, i32, and i64 More... | |
llvm::IntegerType * | Int16Ty |
llvm::IntegerType * | Int32Ty |
llvm::IntegerType * | Int64Ty |
llvm::Type * | HalfTy |
float, double More... | |
llvm::Type * | FloatTy |
llvm::Type * | DoubleTy |
llvm::IntegerType * | IntTy |
int More... | |
union { | |
llvm::IntegerType * IntPtrTy | |
llvm::IntegerType * SizeTy | |
llvm::IntegerType * PtrDiffTy | |
}; | |
intptr_t, size_t, and ptrdiff_t, which we assume are the same size. More... | |
union { | |
llvm::PointerType * VoidPtrTy | |
llvm::PointerType * Int8PtrTy | |
}; | |
void* in address space 0 More... | |
union { | |
llvm::PointerType * VoidPtrPtrTy | |
llvm::PointerType * Int8PtrPtrTy | |
}; | |
void** in address space 0 More... | |
union { | |
llvm::PointerType * AllocaVoidPtrTy | |
llvm::PointerType * AllocaInt8PtrTy | |
}; | |
void* in alloca address space More... | |
union { | |
unsigned char IntSizeInBytes | |
unsigned char IntAlignInBytes | |
}; | |
The size and alignment of the builtin C type 'int'. More... | |
unsigned char | PointerWidthInBits |
The width of a pointer into the generic address space. More... | |
union { | |
unsigned char PointerAlignInBytes | |
unsigned char PointerSizeInBytes | |
}; | |
The size and alignment of a pointer into the generic address space. More... | |
union { | |
unsigned char SizeSizeInBytes | |
unsigned char SizeAlignInBytes | |
}; | |
The size and alignment of size_t. More... | |
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 |
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code.
Definition at line 226 of file CodeGenFunction.h.
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 285 of file CodeGenFunction.h.
typedef llvm::function_ref<std::pair<LValue, LValue> CodeGenFunction &, const OMPExecutableDirective &S)> clang::CodeGen::CodeGenFunction::CodeGenLoopBoundsTy |
Definition at line 279 of file CodeGenFunction.h.
typedef llvm::function_ref<void(CodeGenFunction &, const OMPLoopDirective &, JumpDest)> clang::CodeGen::CodeGenFunction::CodeGenLoopTy |
Definition at line 271 of file CodeGenFunction.h.
typedef llvm::function_ref<void(CodeGenFunction &, SourceLocation, const unsigned, const bool)> clang::CodeGen::CodeGenFunction::CodeGenOrderedTy |
Definition at line 274 of file CodeGenFunction.h.
typedef std::pair<llvm::Value *, llvm::Value *> clang::CodeGen::CodeGenFunction::ComplexPairTy |
Definition at line 260 of file CodeGenFunction.h.
typedef llvm::DenseMap<const Decl *, Address> clang::CodeGen::CodeGenFunction::DeclMapTy |
Definition at line 811 of file CodeGenFunction.h.
typedef void clang::CodeGen::CodeGenFunction::Destroyer(CodeGenFunction &CGF, Address addr, QualType ty) |
Definition at line 1645 of file CodeGenFunction.h.
typedef void clang::CodeGen::CodeGenFunction::SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address) |
Definition at line 2652 of file CodeGenFunction.h.
typedef const llvm::function_ref<void(CodeGenFunction & , llvm::Value * , const OMPTaskDataTy & )> clang::CodeGen::CodeGenFunction::TaskGenTy |
Definition at line 3066 of file CodeGenFunction.h.
typedef llvm::SmallPtrSet<const CXXRecordDecl *, 4> clang::CodeGen::CodeGenFunction::VisitedVirtualBasesSetTy |
Definition at line 1878 of file CodeGenFunction.h.
Definition at line 1876 of file CodeGenFunction.h.
anonymous enum |
An enumeration which makes it easier to specify whether or not an operation is a subtraction.
Enumerator | |
---|---|
NotSubtraction | |
IsSubtraction |
Definition at line 3998 of file CodeGenFunction.h.
Specifies which type of sanitizer check to apply when handling a particular builtin.
Enumerator | |
---|---|
BCK_CTZPassedZero | |
BCK_CLZPassedZero |
Definition at line 4014 of file CodeGenFunction.h.
Enumerator | |
---|---|
CFITCK_VCall | |
CFITCK_NVCall | |
CFITCK_DerivedCast | |
CFITCK_UnrelatedCast | |
CFITCK_ICall | |
CFITCK_NVMFCall | |
CFITCK_VMFCall |
Definition at line 1894 of file CodeGenFunction.h.
|
strong |
Definition at line 4158 of file CodeGenFunction.h.
|
strong |
Enumerator | |
---|---|
VariableGuard | |
TlsGuard |
Definition at line 3895 of file CodeGenFunction.h.
Situations in which we might emit a check for the suitability of a pointer or glvalue.
Definition at line 2562 of file CodeGenFunction.h.
CodeGenFunction::CodeGenFunction | ( | CodeGenModule & | cgm, |
bool | suppressNewContext = false |
||
) |
Definition at line 64 of file CodeGenFunction.cpp.
CodeGenFunction::~CodeGenFunction | ( | ) |
Definition at line 96 of file CodeGenFunction.cpp.
References CGM, CurFn, destroyBlockInfos(), FirstBlockInfo, getLangOpts(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and LifetimeExtendedCleanupStack.
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.
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 1234 of file CGCleanup.cpp.
References ForActivation, and SetupCleanupBlockActivation().
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 312 of file CGDecl.cpp.
References CGM, clang::frontend::CPlusPlus, EmitCXXGuardedInit(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::ConstantEmitter::finalize(), clang::CodeGen::CodeGenModule::getContext(), clang::VarDecl::getInit(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), hasNontrivialDestruction(), HaveInsertPoint(), clang::CodeGen::CodeGenModule::isTypeConstant(), and clang::CodeGen::ConstantEmitter::tryEmitForInitializer().
Referenced by EmitStaticVarDecl().
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 459 of file CodeGenFunction.cpp.
References CGM, clang::XRayInstrKind::Custom, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::XRayInstrSet::Mask, and clang::CodeGenOptions::XRayInstrumentationBundle.
bool CodeGenFunction::AlwaysEmitXRayTypedEvents | ( | ) | const |
AlwaysEmitXRayTypedEvents - Return true if clang must unconditionally emit XRay typed event handling calls.
Definition at line 466 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::XRayInstrSet::Mask, clang::XRayInstrKind::Typed, and clang::CodeGenOptions::XRayInstrumentationBundle.
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 287 of file CGCXX.cpp.
References BuildAppleKextVirtualCall(), clang::Dtor_Complete, clang::Type::getAs(), clang::NestedNameSpecifier::getAsType(), clang::RecordType::getDecl(), clang::NestedNameSpecifier::getKind(), and clang::NestedNameSpecifier::TypeSpec.
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 308 of file CGCXX.cpp.
References BuildAppleKextVirtualCall(), clang::CodeGen::Complete, clang::Dtor_Base, clang::CXXMethodDecl::isVirtual(), and clang::CodeGen::Type.
void CodeGenFunction::BuildBlockRelease | ( | llvm::Value * | DeclPtr, |
BlockFieldFlags | flags | ||
) |
Definition at line 2594 of file CGBlocks.cpp.
References clang::CodeGen::CodeGenModule::getBlockObjectDispose().
Referenced by findBlockCapturedManagedEntities().
QualType CodeGenFunction::BuildFunctionArgList | ( | GlobalDecl | GD, |
FunctionArgList & | Args | ||
) |
Definition at line 1233 of file CodeGenFunction.cpp.
References clang::CodeGen::CGCXXABI::addImplicitStructorParams(), clang::CodeGen::CGCXXABI::buildThisParam(), CGM, clang::ImplicitParamDecl::Create(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::GlobalDecl::getCtorType(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::FunctionDecl::getReturnType(), clang::ASTContext::getSizeType(), clang::CXXMethodDecl::getThisType(), getTypes(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CodeGen::CodeGenTypes::inheritingCtorHasParams(), clang::CXXMethodDecl::isInstance(), clang::ImplicitParamDecl::Other, clang::FunctionDecl::parameters(), and clang::ASTContext::VoidPtrTy.
Referenced by GenerateCode().
llvm::Value * CodeGenFunction::BuildVector | ( | ArrayRef< llvm::Value *> | Ops | ) |
Definition at line 8421 of file CGBuiltin.cpp.
Definition at line 849 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Definition at line 837 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
void CodeGenFunction::callCStructDefaultConstructor | ( | LValue | Dst | ) |
Definition at line 817 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
void CodeGenFunction::callCStructDestructor | ( | LValue | Dst | ) |
Definition at line 827 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Definition at line 874 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Definition at line 862 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
void CodeGenFunction::checkTargetFeatures | ( | const CallExpr * | E, |
const FunctionDecl * | TargetDecl | ||
) |
Definition at line 2296 of file CodeGenFunction.cpp.
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 1477 of file CodeGenFunction.cpp.
Referenced by EmitBranchOnBoolExpr(), emitCommonOMPTargetDirective(), EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), emitOMPSimdRegion(), GetIntrinsic(), and isCheapEnoughToEvaluateUnconditionally().
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 1491 of file CodeGenFunction.cpp.
References ContainsLabel(), clang::Expr::EvaluateAsInt(), and getContext().
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 1430 of file CodeGenFunction.cpp.
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 1398 of file CodeGenFunction.cpp.
Referenced by ConstantFoldsToSimpleInteger(), EmitAutoVarInit(), EmitConditionalOperatorLValue(), GetIntrinsic(), and isCheapEnoughToEvaluateUnconditionally().
RValue CodeGenFunction::convertTempToRValue | ( | Address | addr, |
QualType | type, | ||
SourceLocation | loc | ||
) |
Given the address of a temporary variable, produce an r-value of its type.
Definition at line 4768 of file CGExpr.cpp.
References clang::CodeGen::LValue::asAggregateRValue(), clang::CodeGen::Decl, EmitLoadOfComplex(), EmitLoadOfScalar(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), MakeAddrLValue(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
llvm::Type * CodeGenFunction::ConvertType | ( | QualType | T | ) |
Definition at line 188 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by AddVariableConstraints(), AdjustObjCObjectType(), emitArgumentDemotion(), emitArrayLength(), EmitCommonNeonSISDBuiltinExpr(), EmitDynamicCastToNull(), EmitLoadOfBitfieldLValue(), emitOMPArraySectionBase(), emitRTtypeidCall(), emitWritebackArg(), generateObjCGetterBody(), getBadTypeidFn(), GetGCAttrTypeForType(), getItaniumDynamicCastFn(), getThrowFn(), GetUndefRValue(), isCheapEnoughToEvaluateUnconditionally(), and performTypeAdjustment().
|
inline |
Definition at line 2002 of file CodeGenFunction.h.
llvm::Type * CodeGenFunction::ConvertTypeForMem | ( | QualType | T | ) |
Definition at line 184 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by castValueToType(), createPlaceholderSlot(), EmitAutoVarAlloca(), clang::CodeGen::ReductionCodeGen::emitCleanups(), emitCopyToScratchpad(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitInterWarpCopyFunction(), EmitLValueForFieldInitialization(), emitOMPArraySectionBase(), EmitParmDecl(), emitPrivatesInit(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceScratchpadFunction(), emitReductionListCopy(), emitShuffleAndReduceFunction(), EmitStoreThroughBitfieldLValue(), EmitToMemory(), emitVoidPtrVAArg(), EmitX86_64VAArgFromMemory(), getRangeForType(), getTypeString(), InitCatchParam(), loadToBegin(), ShouldNullCheckClassCastValue(), and shuffleAndStore().
|
inline |
CreateAggTemp - Create a temporary memory object for the given aggregate type.
Definition at line 2221 of file CodeGenFunction.h.
llvm::Constant * CodeGenFunction::createAtExitStub | ( | const VarDecl & | VD, |
llvm::Constant * | dtor, | ||
llvm::Constant * | addr | ||
) |
Create a stub function, suitable for being passed to atexit, which passes the given address to the given destructor function.
Definition at line 201 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeNullaryFunction(), Builder, CGM, clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), FinishFunction(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Decl::getLocation(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenModule::getTypes(), clang::MangleContext::mangleDynamicAtExitDestructor(), StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::ASTContext::VoidTy.
Referenced by emitGlobalDtorWithTLRegDtor(), and registerGlobalDtorWithAtExit().
|
inline |
createBasicBlock - Create an LLVM basic block.
Definition at line 2025 of file CodeGenFunction.h.
References clang::Create().
Referenced by CreateNormalEntry(), clang::CodeGen::CatchRetScope::Emit(), emitArrayDestroy(), EmitAtomicUpdateValue(), EmitBranchOnBoolExpr(), emitCatchDispatchBlock(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCleanup(), EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), EmitDynamicCastToNull(), emitFilterDispatchBlock(), emitInterWarpCopyFunction(), emitNonZeroVLAInit(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), emitOMPSimdRegion(), emitPostUpdateForReductionClause(), emitReduceScratchpadFunction(), emitShuffleAndReduceFunction(), EmitStaticVarDecl(), EmitTrapCheck(), EmitTypeCheck(), emitWasmCatchPadBlock(), emitWriteback(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), GenerateCXXGlobalInitFunc(), getBadTypeidFn(), getBundlesForCoroEnd(), getCancellationKind(), clang::CodeGen::getCriticalRegionLock(), GetIndirectGotoBlock(), GetIntrinsic(), getJumpDestForLabel(), isBlockVarRef(), isCheapEnoughToEvaluateUnconditionally(), isDeletingDtor(), isTrivialFiller(), PerformReturnAdjustment(), shuffleAndStore(), StartFunction(), supportsSPMDExecutionMode(), and tryEmitFMulAdd().
Address CodeGenFunction::createCleanupActiveFlag | ( | ) |
Definition at line 284 of file CGCleanup.cpp.
Address 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 119 of file CGExpr.cpp.
Referenced by EmitAndRegisterVariableArrayDimensions(), EmitCheckValue(), and StartFunction().
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 134 of file CGExpr.cpp.
Referenced by StartFunction().
Address CodeGenFunction::CreateMemTemp | ( | QualType | T, |
const Twine & | Name = "tmp" , |
||
Address * | 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 139 of file CGExpr.cpp.
Referenced by castToBase(), castValueToType(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), emitCXXDestructor(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), EmitParmDecl(), emitReduceFiniFunction(), emitReduceScratchpadFunction(), emitReductionListCopy(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), clang::CodeGen::CallArg::getRValue(), GetUndefRValue(), and clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr().
Address CodeGenFunction::CreateMemTemp | ( | QualType | T, |
CharUnits | Align, | ||
const Twine & | Name = "tmp" , |
||
Address * | Alloca = nullptr |
||
) |
Definition at line 145 of file CGExpr.cpp.
CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen without casting it to the default address space.
Definition at line 156 of file CGExpr.cpp.
Address CodeGenFunction::CreateMemTempWithoutCast | ( | QualType | T, |
CharUnits | Align, | ||
const Twine & | Name = "tmp" |
||
) |
Definition at line 151 of file CGExpr.cpp.
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 106 of file CGExpr.cpp.
Referenced by CreateTempAllocaForCoercion(), EmitAutoVarAlloca(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), InitCatchParam(), isTrivialFiller(), clang::CodeGen::DominatingLLVMValue::save(), and SetupCleanupBlockActivation().
Address CodeGenFunction::CreateTempAlloca | ( | llvm::Type * | Ty, |
CharUnits | Align, | ||
const Twine & | Name = "tmp" , |
||
llvm::Value * | ArraySize = nullptr , |
||
Address * | AllocaAddr = nullptr |
||
) |
CreateTempAlloca - This creates a alloca and inserts it into the entry block.
The alloca is casted to default address space if necessary.
Definition at line 75 of file CGExpr.cpp.
Address 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 64 of file CGExpr.cpp.
|
inline |
Definition at line 1633 of file CodeGenFunction.h.
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.
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 1246 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().
Referenced by isTrivialFiller().
llvm::Value * CodeGenFunction::DecodeAddrUsedInPrologue | ( | llvm::Value * | F, |
llvm::Value * | EncodedAddr | ||
) |
Decode an address used in a function prologue, encoded by EncodeAddrForUseInPrologue
.
Definition at line 497 of file CodeGenFunction.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
void CodeGenFunction::defaultInitNonTrivialCStructVar | ( | LValue | Dst | ) |
Definition at line 797 of file CGNonTrivialStruct.cpp.
Referenced by EmitAutoVarInit().
|
static |
Destroy a chain of block layouts.
Definition at line 726 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::NextBlockInfo.
Referenced by ~CodeGenFunction().
|
inline |
Definition at line 1599 of file CodeGenFunction.h.
Value * CodeGenFunction::EmitAArch64BuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
llvm::Triple::ArchType | Arch | ||
) |
Definition at line 6320 of file CGBuiltin.cpp.
Referenced by EmitTargetArchBuiltinExpr().
Value * CodeGenFunction::EmitAArch64CompareBuiltinExpr | ( | llvm::Value * | Op, |
llvm::Type * | Ty, | ||
const llvm::CmpInst::Predicate | Fp, | ||
const llvm::CmpInst::Predicate | Ip, | ||
const llvm::Twine & | Name = "" |
||
) |
Definition at line 5276 of file CGBuiltin.cpp.
Definition at line 332 of file CGExprComplex.cpp.
References clang::Type::castAs().
Definition at line 326 of file CGExprComplex.cpp.
References clang::CharUnits::Zero().
void CodeGenFunction::EmitAggExpr | ( | const Expr * | E, |
AggValueSlot | Slot | ||
) |
EmitAggExpr - Emit the computation of the specified expression of aggregate type.
The result is computed into the given slot, which may be null to indicate that the value is not needed.
The result is computed into DestPtr. Note that if DestPtr is null, the value of the aggregate expression is not needed. If VolatileDest is true, DestPtr cannot be 0.
Definition at line 1772 of file CGExprAgg.cpp.
References CheckAggExprForMemSetUse(), clang::CodeGen::AggValueSlot::getAddress(), clang::Expr::getType(), clang::CodeGen::AggValueSlot::isIgnored(), and clang::CodeGen::Address::isValid().
Referenced by EmitBaseInitializer(), EmitDeclInit(), EmitExprAsInit(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), InitCatchParam(), isBlockVarRef(), isTrivialFiller(), and StoreAnyExprIntoOneUnit().
EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue.
Definition at line 1784 of file CGExprAgg.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::CodeGen::AggValueSlot::forLValue(), clang::Expr::getType(), clang::CodeGen::AggValueSlot::IsNotAliased, and clang::CodeGen::AggValueSlot::IsNotDestructed.
Referenced by EmitConditionalOperatorLValue().
|
inline |
Emit an aggregate assignment.
Definition at line 2310 of file CodeGenFunction.h.
Referenced by emitPrivatesInit().
void CodeGenFunction::EmitAggregateCopy | ( | LValue | Dest, |
LValue | Src, | ||
QualType | EltTy, | ||
AggValueSlot::Overlap_t | MayOverlap, | ||
bool | isVolatile = false |
||
) |
EmitAggregateCopy - Emit an aggregate copy.
isVolatile | true iff either the source or the destination is volatile. |
MayOverlap | Whether the tail padding of the destination might be occupied by some other object. More efficient code can often be generated if not. |
Definition at line 1818 of file CGExprAgg.cpp.
References clang::frontend::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::LValue::getAddress(), clang::Type::getAs(), clang::RecordType::getDecl(), clang::CodeGen::LValue::getTBAAInfo(), clang::RecordDecl::hasObjectMember(), clang::CXXRecordDecl::hasTrivialCopyAssignment(), clang::CXXRecordDecl::hasTrivialCopyConstructor(), clang::CXXRecordDecl::hasTrivialMoveAssignment(), clang::CXXRecordDecl::hasTrivialMoveConstructor(), clang::Type::isAnyComplexType(), clang::Type::isArrayType(), clang::CXXRecordDecl::isEmpty(), clang::TagDecl::isUnion(), and clang::LangOptions::NonGC.
Referenced by clang::CodeGen::CallArg::copyInto(), EmitAtomicLoad(), emitInterWarpCopyFunction(), EmitMemberInitializer(), emitReductionListCopy(), generateObjCGetterBody(), clang::CodeGen::CallArg::getRValue(), and InitCatchParam().
|
inline |
Definition at line 2315 of file CodeGenFunction.h.
References clang::CodeGen::LValue::getType().
|
inline |
Definition at line 2625 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getDataLayout().
|
inline |
Definition at line 2793 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getDataLayout().
Definition at line 10928 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), and X.
Referenced by EmitTargetArchBuiltinExpr().
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 1096 of file CGDecl.cpp.
References Builder, clang::VarDecl::Create(), CreateDefaultAlignTempAlloca(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::ASTContext::CreateTypeSourceInfo(), 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::Decl::setImplicit().
llvm::Value * CodeGenFunction::EmitAnnotationCall | ( | llvm::Value * | AnnotationFn, |
llvm::Value * | AnnotatedVal, | ||
StringRef | AnnotationStr, | ||
SourceLocation | Location | ||
) |
Emit an annotation call (intrinsic or builtin).
Definition at line 2192 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationString(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
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.
ignoreResult | True 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 194 of file CGExpr.cpp.
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), emitOMPAtomicCaptureExpr(), emitOMPAtomicUpdateExpr(), emitSimdlenSafelenClause(), GenerateObjCAtomicGetterCopyHelperFunction(), and getOrCreateOpaqueRValueMapping().
Definition at line 376 of file CGException.cpp.
References clang::format::cleanup(), clang::CodeGen::EHCleanup, clang::CodeGen::Address::getPointer(), clang::Expr::getType(), and clang::CodeGen::Type.
Referenced by getThrowFn().
void CodeGenFunction::EmitAnyExprToMem | ( | const Expr * | E, |
Address | Location, | ||
Qualifiers | Quals, | ||
bool | IsInit | ||
) |
EmitAnyExprToMem - Emits the code necessary to evaluate an arbitrary expression into the given memory location.
EmitAnyExprToMem - Evaluate an expression into a given memory location.
Definition at line 223 of file CGExpr.cpp.
Referenced by emitCXXDestructor(), clang::CodeGen::ReductionCodeGen::emitInitialization(), and EmitOMPAggregateInit().
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 213 of file CGExpr.cpp.
llvm::Value * CodeGenFunction::EmitARCAutorelease | ( | llvm::Value * | value | ) |
Autorelease the given object.
call i8* @objc_autorelease(i8* value)
Definition at line 2179 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_autorelease.
Referenced by EmitARCRetainAutorelease(), and EmitARCRetainAutoreleaseScalarExpr().
llvm::Value * CodeGenFunction::EmitARCAutoreleaseReturnValue | ( | llvm::Value * | value | ) |
Autorelease the given object.
call i8* @objc_autoreleaseReturnValue(i8* value)
Definition at line 2188 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_autoreleaseReturnValue.
Referenced by emitAutoreleaseOfResult().
Definition at line 2312 of file CGObjC.cpp.
References EmitARCLoadWeakRetained(), EmitARCStoreWeak(), and EmitObjCConsumeObject().
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 2306 of file CGObjC.cpp.
References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_copyWeak.
Referenced by tryEmitARCCopyWeakInit().
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 2104 of file CGObjC.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), EmitARCRelease(), EmitARCStoreStrongCall(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), and getNullForVariable().
Referenced by EmitObjCMRRAutoreleasePoolPop(), and EmitObjectDelete().
void CodeGenFunction::EmitARCDestroyWeak | ( | Address | addr | ) |
void @objc_destroyWeak(i8** addr) Essentially objc_storeWeak(addr, nil).
Definition at line 2280 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, and clang::CodeGen::ObjCEntrypoints::objc_destroyWeak.
Referenced by emitARCMoveAssignWeak(), EmitObjCMRRAutoreleasePoolPop(), and EmitObjectDelete().
llvm::Value * CodeGenFunction::EmitARCExtendBlockObject | ( | const Expr * | expr | ) |
Definition at line 2999 of file CGObjC.cpp.
References EmitARCRetainBlock(), EmitObjCConsumeObject(), EmitScalarExpr(), clang::Expr::getType(), shouldEmitSeparateBlockRetain(), and tryEmitARCRetainScalarExpr().
Referenced by EmitObjCThrowOperand(), and ShouldNullCheckClassCastValue().
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 2262 of file CGObjC.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateStore(), emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_initWeak.
Referenced by clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitParmDecl(), EmitScalarInit(), EmitStoreThroughLValue(), and InitCatchParam().
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 1806 of file CGObjC.cpp.
References clang::CodeGen::ObjCEntrypoints::clang_arc_use, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitObjCMRRAutoreleasePoolPop(), and emitWriteback().
llvm::Value * CodeGenFunction::EmitARCLoadWeak | ( | Address | addr | ) |
i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)).
Definition at line 2235 of file CGObjC.cpp.
References emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_loadWeak.
Referenced by EmitLoadOfLValue(), and generateObjCGetterBody().
llvm::Value * CodeGenFunction::EmitARCLoadWeakRetained | ( | Address | addr | ) |
i8* @objc_loadWeakRetained(i8** addr)
Definition at line 2242 of file CGObjC.cpp.
References emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_loadWeakRetained.
Referenced by emitARCCopyAssignWeak(), emitARCMoveAssignWeak(), EmitLoadOfLValue(), and tryEmitARCRetainLoadOfScalar().
Definition at line 2319 of file CGObjC.cpp.
References EmitARCDestroyWeak(), EmitARCLoadWeakRetained(), EmitARCStoreWeak(), and EmitObjCConsumeObject().
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 2297 of file CGObjC.cpp.
References emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_moveWeak.
Referenced by tryEmitARCCopyWeakInit().
llvm::Value * CodeGenFunction::EmitARCReclaimReturnedObject | ( | const Expr * | e, |
bool | allowUnsafeClaim | ||
) |
Definition at line 2580 of file CGObjC.cpp.
Referenced by EmitObjCThrowOperand(), and ShouldNullCheckClassCastValue().
void CodeGenFunction::EmitARCRelease | ( | llvm::Value * | value, |
ARCPreciseLifetime_t | precise | ||
) |
Release the given object.
call void @objc_release(i8* value)
Definition at line 2072 of file CGObjC.cpp.
References clang::CodeGen::ARCImpreciseLifetime, Builder, createARCRuntimeFunction(), clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ObjCEntrypoints::objc_release.
Referenced by EmitARCDestroyStrong(), EmitARCStoreStrong(), EmitScalarInit(), emitWriteback(), and clang::CodeGen::CodeGenModule::getLLVMLifetimeEndFn().
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 1956 of file CGObjC.cpp.
References EmitARCRetainBlock(), EmitARCRetainNonBlock(), and clang::Type::isBlockPointerType().
Referenced by emitARCRetainLoadOfScalar(), EmitARCRetainScalarExpr(), EmitARCStoreStrong(), and EmitStoreThroughLValue().
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 2210 of file CGObjC.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitARCAutorelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainBlock(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Type::isBlockPointerType(), and clang::CodeGen::Type.
Referenced by EmitARCRetainAutoreleaseScalarExpr(), and EmitObjCExtendObjectLifetime().
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 2048 of file CGObjC.cpp.
References emitARCValueOperation(), emitAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainAutoreleasedReturnValue.
Referenced by emitARCRetainCallResult().
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 2227 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainAutorelease.
Referenced by EmitARCRetainAutorelease().
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 2198 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainAutoreleaseReturnValue.
llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr | ( | const Expr * | expr | ) |
Definition at line 2982 of file CGObjC.cpp.
References EmitARCAutorelease(), EmitARCRetainAutorelease(), enterFullExpression(), clang::Expr::getType(), and tryEmitARCRetainScalarExpr().
Referenced by EmitARCStoreAutoreleasing(), EmitObjCThrowOperand(), and EmitScalarInit().
llvm::Value * CodeGenFunction::EmitARCRetainBlock | ( | llvm::Value * | value, |
bool | mandatory | ||
) |
Retain the given block, with _Block_copy semantics.
call i8* @objc_retainBlock(i8* value)
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 1977 of file CGObjC.cpp.
References Builder, emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainBlock.
Referenced by EmitARCExtendBlockObject(), EmitARCRetain(), EmitARCRetainAutorelease(), and EmitARCStoreStrong().
llvm::Value * CodeGenFunction::EmitARCRetainNonBlock | ( | llvm::Value * | value | ) |
Retain the given object, with normal retain semantics.
call i8* @objc_retain(i8* value)
Definition at line 1965 of file CGObjC.cpp.
References emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retain.
Referenced by EmitARCRetain(), emitARCRetainCallResult(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitParmDecl(), emitWriteback(), and InitCatchParam().
llvm::Value * CodeGenFunction::EmitARCRetainScalarExpr | ( | const Expr * | e | ) |
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 2966 of file CGObjC.cpp.
References EmitARCRetain(), enterFullExpression(), clang::Expr::getType(), and tryEmitARCRetainScalarExpr().
Referenced by EmitScalarInit(), and ShouldNullCheckClassCastValue().
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreAutoreleasing | ( | const BinaryOperator * | e | ) |
Definition at line 3155 of file CGObjC.cpp.
References EmitARCRetainAutoreleaseScalarExpr(), EmitLValue(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), and clang::BinaryOperator::getRHS().
Referenced by GetIntrinsic().
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 2144 of file CGObjC.cpp.
References EmitARCRelease(), EmitARCRetain(), EmitARCStoreStrongCall(), EmitLoadOfScalar(), EmitStoreOfScalar(), clang::CharUnits::fromQuantity(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isARCPreciseLifetime(), clang::Type::isBlockPointerType(), clang::CharUnits::isZero(), clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, and shouldUseFusedARCCalls().
Referenced by EmitARCStoreStrong(), EmitStoreThroughLValue(), and GetIntrinsic().
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreStrong | ( | const BinaryOperator * | e, |
bool | ignored | ||
) |
Definition at line 3124 of file CGObjC.cpp.
References EmitARCRelease(), EmitARCRetainBlock(), EmitARCStoreStrong(), EmitLoadOfScalar(), EmitLValue(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::CodeGen::LValue::isARCPreciseLifetime(), clang::Type::isBlockPointerType(), and tryEmitARCRetainScalarExpr().
llvm::Value * CodeGenFunction::EmitARCStoreStrongCall | ( | Address | addr, |
llvm::Value * | value, | ||
bool | ignored | ||
) |
Store into a strong object.
Always calls this: call void @objc_storeStrong(i8** addr, i8* value)
Definition at line 2118 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitNounwindRuntimeCall(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::ObjCEntrypoints::objc_storeStrong, and clang::CodeGen::Type.
Referenced by destroyARCStrongWithStore(), EmitARCDestroyStrong(), EmitARCStoreStrong(), and EmitParmDecl().
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreUnsafeUnretained | ( | const BinaryOperator * | e, |
bool | ignored | ||
) |
Definition at line 3105 of file CGObjC.cpp.
References EmitARCUnsafeUnretainedScalarExpr(), EmitLValue(), EmitScalarExpr(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), and clang::BinaryOperator::getRHS().
Referenced by GetIntrinsic().
llvm::Value * CodeGenFunction::EmitARCStoreWeak | ( | Address | addr, |
llvm::Value * | value, | ||
bool | ignored | ||
) |
i8* @objc_storeWeak(i8** addr, i8* value) Returns value.
Definition at line 2250 of file CGObjC.cpp.
References emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_storeWeak.
Referenced by emitARCCopyAssignWeak(), emitARCMoveAssignWeak(), EmitScalarInit(), EmitStoreThroughLValue(), and GetIntrinsic().
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 2063 of file CGObjC.cpp.
References emitARCValueOperation(), emitAutoreleasedReturnValueMarker(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_unsafeClaimAutoreleasedReturnValue.
Referenced by emitARCUnsafeClaimCallResult().
llvm::Value * CodeGenFunction::EmitARCUnsafeUnretainedScalarExpr | ( | const Expr * | e | ) |
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 3093 of file CGObjC.cpp.
References emitARCUnsafeUnretainedScalarExpr(), and enterFullExpression().
Referenced by EmitARCStoreUnsafeUnretained(), and EmitScalarInit().
Value * CodeGenFunction::EmitARMBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
llvm::Triple::ArchType | Arch | ||
) |
Definition at line 5498 of file CGBuiltin.cpp.
References clang::Expr::EvaluateAsInt(), and clang::CallExpr::getArg().
Referenced by EmitTargetArchBuiltinExpr().
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.
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 1839 of file CGDecl.cpp.
References Builder, createBasicBlock(), EmitBlock(), clang::Type::isArrayType(), PopCleanupBlock(), pushRegularPartialArrayCleanup(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by emitDestroy(), and emitPartialArrayDestroy().
llvm::Value * CodeGenFunction::emitArrayLength | ( | const ArrayType * | origArrayType, |
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.
Computes the length of an array in elements, as well as the base element type and a properly-typed first element pointer.
Definition at line 1867 of file CodeGenFunction.cpp.
References clang::ast_matchers::arrayType, Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CodeGen::Address::getElementType(), clang::ArrayType::getElementType(), clang::CodeGen::Address::getPointer(), getVLASize(), clang::CodeGen::CodeGenFunction::VlaSizePair::NumElts, clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::CodeGen::Type.
Referenced by emitDestroy(), EmitOMPAggregateInit(), and EmitOMPAggregateReduction().
LValue CodeGenFunction::EmitArraySubscriptExpr | ( | const ArraySubscriptExpr * | E, |
bool | Accessed = false |
||
) |
Definition at line 3304 of file CGExpr.cpp.
Address CodeGenFunction::EmitArrayToPointerDecay | ( | const Expr * | Array, |
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr |
||
) |
Definition at line 3185 of file CGExpr.cpp.
Referenced by ShouldNullCheckClassCastValue().
void CodeGenFunction::EmitAsanPrologueOrEpilogue | ( | bool | Prologue | ) |
Definition at line 756 of file CGClass.cpp.
References clang::RecordDecl::fields(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTRecordLayout::getFieldCount(), clang::ASTRecordLayout::getFieldOffset(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), clang::ASTContext::getTypeInfoInChars(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::FieldDecl::isBitField(), clang::RecordDecl::mayInsertExtraPadding(), clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::Type.
void CodeGenFunction::EmitAsmStmt | ( | const AsmStmt & | S | ) |
Definition at line 1873 of file CGStmt.cpp.
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() |
||
) |
Emit a compare-and-exchange op for atomic type.
Definition at line 1969 of file CGAtomic.cpp.
References clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregateAddress(), clang::CodeGen::Address::getElementType(), and clang::CodeGen::RValue::isAggregate().
RValue CodeGenFunction::EmitAtomicExpr | ( | AtomicExpr * | E | ) |
Definition at line 745 of file CGAtomic.cpp.
Definition at line 1994 of file CGAtomic.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), clang::Expr::getType(), clang::Type::isAtomicType(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsZeroed, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitExprAsInit().
RValue CodeGenFunction::EmitAtomicLoad | ( | LValue | LV, |
SourceLocation | SL, | ||
AggValueSlot | Slot = AggValueSlot::ignored() |
||
) |
Definition at line 1461 of file CGAtomic.cpp.
References clang::CodeGen::AggValueSlot::getAddress(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::Address::getPointer(), clang::CodeGen::LValue::getType(), clang::CodeGen::Address::invalid(), clang::Type::isAtomicType(), clang::CodeGen::AggValueSlot::isIgnored(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVolatileQualified(), and clang::CodeGen::TEK_Aggregate.
Referenced by EmitLoadOfScalar(), and emitOMPAtomicReadExpr().
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 1507 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), clang::ASTContext::BoolTy, Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggregateCopy(), emitAtomicLibcall(), EmitCastToVoidPtr(), EmitStoreOfComplex(), EmitStoreOfScalar(), EmitToMemory(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregateAddress(), clang::CodeGen::RValue::getComplexVal(), getContext(), getLLVMContext(), clang::CodeGen::Address::getPointer(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getSizeType(), clang::CodeGen::AggValueSlot::ignored(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::ASTContext::IntTy, clang::CodeGen::RValue::isAggregate(), clang::CodeGen::RValue::isScalar(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::RValue::isVolatileQualified(), clang::CodeGen::LValue::isVolatileQualified(), MakeAddrLValue(), and clang::ASTContext::VoidPtrTy.
Definition at line 1885 of file CGAtomic.cpp.
References clang::CodeGen::LValue::getType(), clang::Type::isAtomicType(), and clang::CodeGen::LValue::isVolatileQualified().
Referenced by emitSimpleAtomicStore(), EmitStoreOfScalar(), and isBlockVarRef().
void CodeGenFunction::EmitAtomicStore | ( | RValue | rvalue, |
LValue | dest, | ||
llvm::AtomicOrdering | AO, | ||
bool | IsVolatile, | ||
bool | isInit | ||
) |
Emit a store to an l-value of atomic type.
Note that the r-value is expected to be an r-value of the atomic type; this means that for aggregate r-values, it should include storage for any padding that was necessary.
Definition at line 1903 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), emitAtomicLibcall(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregateAddress(), clang::CodeGen::Address::getElementType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::RValue::isAggregate(), and clang::CodeGen::LValue::isSimple().
void CodeGenFunction::EmitAtomicUpdate | ( | LValue | LVal, |
llvm::AtomicOrdering | AO, | ||
const llvm::function_ref< RValue(RValue)> & | UpdateOp, | ||
bool | IsVolatile | ||
) |
Definition at line 1987 of file CGAtomic.cpp.
void CodeGenFunction::EmitAttributedStmt | ( | const AttributedStmt & | S | ) |
Definition at line 566 of file CGStmt.cpp.
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 1152 of file CGDecl.cpp.
References Builder, Bypasses, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateStore(), CreateTempAlloca(), clang::Default, EmitLifetimeStart(), EmitStaticVarDecl(), EmitVariablyModifiedType(), EnsureInsertPoint(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getBlockByrefInfo(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), getLangOpts(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::Address::getPointer(), getTarget(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), hasLabelBeenSeenInCurrentScope(), HaveInsertPoint(), clang::InternalLinkage, clang::CodeGen::Address::invalid(), clang::Type::isArrayType(), clang::CodeGen::VarBypassDetector::IsBypassed(), clang::Expr::isConstantInitializer(), clang::Type::isConstantSizeType(), clang::VarDecl::isConstexpr(), clang::VarDecl::isExceptionVariable(), clang::TargetCXXABI::isMicrosoft(), clang::VarDecl::isNRVOVariable(), clang::Type::isObjCObjectPointerType(), clang::QualType::isPODType(), clang::Type::isRecordType(), clang::CodeGen::CodeGenModule::isTypeConstant(), clang::CodeGen::Address::isValid(), clang::Type::isVariablyModifiedType(), clang::codegenoptions::LimitedDebugInfo, NRVOFlags, clang::CharUnits::One(), clang::opencl_constant, clang::opencl_private, ReturnValue, clang::CodeGen::Type, and clang::CodeGen::CodeGenFunction::AutoVarEmission::useLifetimeMarkers().
Referenced by EmitAutoVarDecl().
void CodeGenFunction::EmitAutoVarCleanups | ( | const AutoVarEmission & | emission | ) |
Definition at line 1679 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), clang::CodeGen::BLOCK_FIELD_IS_BYREF, clang::CodeGen::BLOCK_FIELD_IS_WEAK, CGM, EHStack, emitAutoVarTypeCleanup(), enterByrefCleanup(), clang::LangOptions::GCOnly, clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getLangOpts(), getLangOpts(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), HaveInsertPoint(), clang::QualType::isDestructedType(), clang::QualType::isObjCGCWeak(), clang::LangOptions::NonGC, clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by 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 1061 of file CGDecl.cpp.
References EmitAutoVarAlloca(), EmitAutoVarCleanups(), and EmitAutoVarInit().
Referenced by EmitVarDecl().
void CodeGenFunction::EmitAutoVarInit | ( | const AutoVarEmission & | emission | ) |
Definition at line 1432 of file CGDecl.cpp.
References Builder, CGM, ContainsLabel(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::ApplyDebugLocation::CreateDefaultArtificial(), clang::CodeGen::CGBuilderTy::CreateMemSet(), defaultInitNonTrivialCStructVar(), drillIntoBlockVariable(), emitByrefStructureInit(), EmitExprAsInit(), emitStoresForInitAfterBZero(), EmitStoreThroughLValue(), EnsureInsertPoint(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getAddressSpace(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::CodeGen::Address::getType(), clang::ValueDecl::getType(), BytePattern::getValue(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, BytePattern::isAny(), isCapturedBy(), clang::VarDecl::isConstexpr(), BytePattern::isNone(), isTrivialInitializer(), MakeAddrLValue(), clang::QualType::PDIK_Struct, clang::CodeGen::LValue::setNonGC(), shouldUseBZeroPlusStoresToInitialize(), shouldUseMemSetToInitialize(), clang::CodeGen::ConstantEmitter::tryEmitAbstractForInitializer(), clang::CodeGen::Type, and clang::ast_matchers::type.
Referenced by EmitAutoVarDecl(), and EmitOMPReductionClauseInit().
void CodeGenFunction::emitAutoVarTypeCleanup | ( | const AutoVarEmission & | emission, |
QualType::DestructionKind | dtorKind | ||
) |
Enter a destroy cleanup for the given local variable.
Definition at line 1612 of file CGDecl.cpp.
References destroyARCStrongImprecise, destroyNonTrivialCStruct, clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_nontrivial_c_struct, clang::QualType::DK_objc_strong_lifetime, clang::QualType::DK_objc_weak_lifetime, clang::CodeGen::EHCleanup, EHStack, getARCCleanupKind(), clang::Type::getAsCXXRecordDecl(), getDestroyer(), clang::CXXRecordDecl::getDestructor(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::VarDecl::isARCPseudoStrong(), clang::Type::isArrayType(), clang::CodeGen::NormalAndEHCleanup, and clang::ast_matchers::type.
Referenced by EmitAutoVarCleanups().
LValue CodeGenFunction::EmitBinaryOperatorLValue | ( | const BinaryOperator * | E | ) |
Definition at line 4387 of file CGExpr.cpp.
EmitBlock - Emit the given block.
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 445 of file CGStmt.cpp.
References Builder, CurFn, and EmitBranch().
Referenced by clang::CodeGen::CatchRetScope::Emit(), emitArrayDestroy(), EmitAtomicUpdateValue(), EmitBranchOnBoolExpr(), emitCatchDispatchBlock(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCleanup(), EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), EmitDynamicCastToNull(), emitFilterDispatchBlock(), emitInterWarpCopyFunction(), EmitLabel(), emitNonZeroVLAInit(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), emitOMPSimdRegion(), emitPostUpdateForReductionClause(), emitReduceScratchpadFunction(), EmitReturnBlock(), emitShuffleAndReduceFunction(), EmitStaticVarDecl(), EmitTrapCheck(), EmitTypeCheck(), emitWriteback(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), FinishFunction(), GenerateCXXGlobalInitFunc(), getBadTypeidFn(), getBundlesForCoroEnd(), clang::CodeGen::getCriticalRegionLock(), GetIntrinsic(), isBlockVarRef(), isCheapEnoughToEvaluateUnconditionally(), isDeletingDtor(), isTrivialFiller(), PerformReturnAdjustment(), shuffleAndStore(), supportsSPMDExecutionMode(), and tryEmitFMulAdd().
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 482 of file CGStmt.cpp.
References Builder, and CurFn.
Referenced by emitCatchDispatchBlock(), emitCatchPadBlock(), emitFilterDispatchBlock(), and emitWasmCatchPadBlock().
Address CodeGenFunction::emitBlockByrefAddress | ( | Address | baseAddr, |
const VarDecl * | V, | ||
bool | followForward = true |
||
) |
BuildBlockByrefAddress - Computes the location of the data in a variable which is declared as __block.
Definition at line 2362 of file CGBlocks.cpp.
References clang::NamedDecl::getName().
Referenced by drillIntoBlockVariable(), EmitScalarInit(), and clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress().
Address CodeGenFunction::emitBlockByrefAddress | ( | Address | baseAddr, |
const BlockByrefInfo & | info, | ||
bool | followForward, | ||
const llvm::Twine & | name | ||
) |
Definition at line 2369 of file CGBlocks.cpp.
RValue CodeGenFunction::EmitBlockCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 1073 of file CGBlocks.cpp.
llvm::Value * CodeGenFunction::EmitBlockCopyAndAutorelease | ( | llvm::Value * | Block, |
QualType | Ty | ||
) |
Definition at line 3396 of file CGObjC.cpp.
References clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), getContext(), clang::SelectorTable::getNullarySelector(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::Idents, and clang::ASTContext::Selectors.
Referenced by ShouldNullCheckClassCastValue().
llvm::Value * CodeGenFunction::EmitBlockLiteral | ( | const BlockExpr * | blockExpr | ) |
Emit block literal.
Emit a block literal expression in the current function.
Definition at line 736 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::Block, clang::CodeGen::BLOCK_HAS_COPY_DISPOSE, clang::CodeGen::BLOCK_HAS_CXX_OBJ, clang::CodeGen::BLOCK_HAS_EXTENDED_LAYOUT, clang::CodeGen::BLOCK_HAS_SIGNATURE, clang::CodeGen::BLOCK_IS_GLOBAL, clang::CodeGen::BLOCK_IS_NOESCAPE, clang::CodeGen::BLOCK_USE_STRET, clang::CodeGen::CGBlockInfo::BlockExpression, buildBlockDescriptor(), clang::CodeGen::CGBlockInfo::CanBeGlobal, computeBlockInfo(), clang::BlockDecl::doesNotEscape(), findAndRemoveBlockInfo(), clang::CodeGen::CodeGenModule::getAddrOfGlobalBlockIfEmitted(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::BlockExpr::getBlockDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getLangOpts(), clang::CodeGen::CodeGenModule::getNSConcreteGlobalBlock(), clang::CodeGen::CodeGenModule::getNSConcreteStackBlock(), clang::CodeGen::CGBlockInfo::HasCapturedVariableLayout, clang::BlockDecl::hasCaptures(), clang::CodeGen::CGBlockInfo::HasCXXObject, clang::isa(), clang::BlockDecl::isConversionFromLambda(), clang::CodeGen::Address::isValid(), clang::CodeGen::CGBlockInfo::LocalAddress, clang::CodeGen::CGBlockInfo::needsCopyDisposeHelpers(), and clang::CodeGen::CGBlockInfo::UsesStret.
Referenced by isCheapEnoughToEvaluateUnconditionally().
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 1199 of file CodeGenFunction.cpp.
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 915 of file CGExpr.cpp.
Referenced by emitPointerArithmetic().
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 465 of file CGStmt.cpp.
References Builder.
Referenced by EmitBlock(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), EmitX86_64VAArgFromMemory(), clang::CodeGen::getCriticalRegionLock(), shuffleAndStore(), and supportsSPMDExecutionMode().
void CodeGenFunction::EmitBranchOnBoolExpr | ( | const Expr * | Cond, |
llvm::BasicBlock * | TrueBlock, | ||
llvm::BasicBlock * | FalseBlock, | ||
uint64_t | TrueCount | ||
) |
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.
Definition at line 1513 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CGM, ConstantFoldsToSimpleInteger(), createBasicBlock(), EmitBlock(), EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EvaluateExprAsBool(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getCurrentProfileCount(), getLLVMContext(), getProfileCount(), clang::Expr::IgnoreParens(), incrementProfileCounter(), max(), and setCurrentProfileCount().
Referenced by EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), GetIntrinsic(), isBlockVarRef(), and isCheapEnoughToEvaluateUnconditionally().
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.
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 1050 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::stable_iterator::encloses(), and clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth().
Referenced by clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
void CodeGenFunction::EmitBreakStmt | ( | const BreakStmt & | S | ) |
Definition at line 1116 of file CGStmt.cpp.
llvm::Value * CodeGenFunction::EmitBuiltinAvailable | ( | ArrayRef< llvm::Value *> | Args | ) |
Definition at line 3421 of file CGObjC.cpp.
References Builder, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenModule::IsOSVersionAtLeastFn, and Target.
RValue CodeGenFunction::EmitBuiltinExpr | ( | const FunctionDecl * | FD, |
unsigned | BuiltinID, | ||
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 1255 of file CGBuiltin.cpp.
References ceil, copysign, cos, emitBinaryBuiltin(), emitTernaryBuiltin(), emitUnaryBuiltin(), clang::Expr::EvaluateAsRValue(), exp, exp2, fabs, floor, fma, clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::Decl::hasAttr(), clang::Expr::EvalStatus::hasSideEffects(), clang::APValue::isFloat(), clang::APValue::isInt(), and clang::Expr::EvalResult::Val.
RValue CodeGenFunction::EmitBuiltinNewDeleteCall | ( | const FunctionProtoType * | Type, |
const CallExpr * | TheCallExpr, | ||
bool | IsDelete | ||
) |
Definition at line 1324 of file CGExprCXX.cpp.
References clang::CallExpr::arguments(), and clang::FunctionProtoType::getParamTypes().
Emit IR for __builtin_os_log_format.
Definition at line 1007 of file CGBuiltin.cpp.
References clang::CodeGen::CallArgList::add(), clang::analyze_os_log::computeOSLogBufferLayout(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::CodeGen::Address::getPointer(), clang::analyze_os_log::OSLogBufferLayout::Items, and clang::CodeGen::TEK_Scalar.
void CodeGenFunction::emitByrefStructureInit | ( | const AutoVarEmission & | emission | ) |
Initialize the structural components of a __block variable, i.e.
everything but the actual object.
Definition at line 2487 of file CGBlocks.cpp.
References clang::CodeGen::Address::getPointer().
Referenced by EmitAutoVarInit().
RValue CodeGenFunction::EmitCall | ( | const CGFunctionInfo & | CallInfo, |
const CGCallee & | Callee, | ||
ReturnValueSlot | ReturnValue, | ||
const CallArgList & | Args, | ||
llvm::Instruction ** | callOrInvoke, | ||
SourceLocation | Loc | ||
) |
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 3782 of file CGCall.cpp.
References clang::CharUnits::fromQuantity(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), clang::CodeGen::CGCallee::getFunctionType(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::CallArgList::getStackBase(), clang::CodeGen::Address::invalid(), clang::CodeGen::CGCallee::isOrdinary(), and clang::CodeGen::CGCallee::isVirtual().
Referenced by emitAtomicLibcall(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitCXXDestructor(), EmitNewDeleteCall(), emitStructSetterCall(), generateObjCGetterBody(), generateObjCSetterBody(), and isWeakLinkedClass().
|
inline |
Definition at line 3560 of file CodeGenFunction.h.
References BuildAppleKextVirtualCall(), and Modifier.
RValue CodeGenFunction::EmitCall | ( | QualType | FnType, |
const CGCallee & | Callee, | ||
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Value * | Chain = nullptr |
||
) |
Definition at line 4559 of file CGExpr.cpp.
void CodeGenFunction::EmitCallAndReturnForThunk | ( | llvm::Constant * | Callee, |
const ThunkInfo * | Thunk, | ||
bool | IsUnprototyped | ||
) |
Definition at line 282 of file CGVTables.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CGCXXABI::adjustCallArgsForDestructorThunk(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), clang::CodeGen::CGCXXABI::EmitReturnFromThunk(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::RValue::get(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::FunctionType::getReturnType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CodeGen::ABIArgInfo::Indirect, clang::ReturnAdjustment::isEmpty(), clang::CodeGen::ReturnValueSlot::isNull(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), clang::FunctionDecl::parameters(), PerformReturnAdjustment(), clang::CodeGen::CGCXXABI::performThisAdjustment(), clang::ThunkInfo::Return, similar(), clang::ThunkInfo::This, and clang::ASTContext::VoidPtrTy.
void CodeGenFunction::EmitCallArg | ( | CallArgList & | args, |
const Expr * | E, | ||
QualType | ArgType | ||
) |
EmitCallArg - Emit a single call argument.
Definition at line 3557 of file CGCall.cpp.
|
inline |
EmitCallArgs - Emit call arguments for a function.
Definition at line 4169 of file CodeGenFunction.h.
Referenced by commonEmitCXXMemberOrOperatorCall(), and emitCXXDestructor().
void CodeGenFunction::EmitCallArgs | ( | CallArgList & | Args, |
ArrayRef< QualType > | ArgTypes, | ||
llvm::iterator_range< CallExpr::const_arg_iterator > | ArgRange, | ||
AbstractCallee | AC = AbstractCallee() , |
||
unsigned | ParamsToSkip = 0 , |
||
EvaluationOrder | Order = EvaluationOrder::Default |
||
) |
Definition at line 3404 of file CGCall.cpp.
Definition at line 4340 of file CGExpr.cpp.
RValue CodeGenFunction::EmitCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue = ReturnValueSlot() |
||
) |
Definition at line 4293 of file CGExpr.cpp.
Definition at line 4437 of file CGExpr.cpp.
llvm::CallSite CodeGenFunction::EmitCallOrInvoke | ( | llvm::Value * | 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 3752 of file CGCall.cpp.
void CodeGenFunction::EmitCapturedLocals | ( | CodeGenFunction & | ParentCGF, |
const Stmt * | OutlinedStmt, | ||
bool | IsFilter | ||
) |
Scan the outlined statement for captures from the parent function.
For each capture, mark the capture as escaped and emit a call to llvm.localrecover. Insert the localrecover result into the LocalDeclMap.
Definition at line 1742 of file CGException.cpp.
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 2248 of file CGStmt.cpp.
void CodeGenFunction::EmitCaseStmt | ( | const CaseStmt & | S | ) |
Definition at line 1221 of file CGStmt.cpp.
void CodeGenFunction::EmitCaseStmtRange | ( | const CaseStmt & | S | ) |
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 1143 of file CGStmt.cpp.
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 4086 of file CGExpr.cpp.
llvm::Value * CodeGenFunction::EmitCastToVoidPtr | ( | llvm::Value * | value | ) |
Emit a cast to void* in the appropriate address space.
Definition at line 50 of file CGExpr.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), getLLVMContext(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by AddDirectArgument(), EmitAtomicLoad(), EmitNullBaseClassInitialization(), emitReduceFiniFunction(), and getBadTypeidFn().
void CodeGenFunction::EmitCfiCheckFail | ( | ) |
Emit a cross-DSO CFI failure handling function.
Definition at line 3058 of file CGExpr.cpp.
References clang::CodeGen::CodeGenModule::addUsedGlobal(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), Builder, CFITCK_DerivedCast, CFITCK_ICall, CFITCK_NVCall, CFITCK_UnrelatedCast, CFITCK_VCall, CGM, clang::Create(), clang::CodeGen::CGBuilderTy::CreateLoad(), EmitCheck(), EmitLoadOfScalar(), EmitTrapCheck(), FinishFunction(), GetAddrOfLocalVar(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTypes(), clang::SanitizerSet::has(), clang::HiddenVisibility, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::ImplicitParamDecl::Other, clang::LangOptions::Sanitize, SanOpts, StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::ASTContext::VoidTy.
Referenced by clang::CodeGen::CodeGenModule::Release().
void CodeGenFunction::EmitCfiCheckStub | ( | ) |
Emit a stub for the cross-DSO CFI check function.
Definition at line 3034 of file CGExpr.cpp.
References CGM, clang::Create(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenModule::setDSOLocal(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by clang::CodeGen::CodeGenModule::Release().
void CodeGenFunction::EmitCfiSlowPathCheck | ( | SanitizerMask | Kind, |
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 2987 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), EmitBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, Node, clang::CodeGenOptions::SanitizeTrap, clang::CodeGen::CodeGenModule::setDSOLocal(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::EmitCheck | ( | ArrayRef< std::pair< llvm::Value *, SanitizerMask >> | Checked, |
SanitizerHandler | Check, | ||
ArrayRef< llvm::Constant *> | StaticArgs, | ||
ArrayRef< llvm::Value *> | DynamicArgs | ||
) |
Create a basic block that will call a handler function in a sanitizer runtime with the provided arguments, and create a conditional branch to it.
Definition at line 2877 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), EmitBlock(), emitCheckHandlerCall(), EmitCheckValue(), EmitTrapCheck(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), getRecoverableKind(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntPtrTy, IsSanitizerScope, Node, clang::CodeGenOptions::SanitizeRecover, clang::CodeGenOptions::SanitizeTrap, SanOpts, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitCfiCheckFail(), EmitNullabilityCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitUnreachable(), EmitVariablyModifiedType(), and GenerateCode().
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 880 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitCheckedInBoundsGEP | ( | 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.
Return the result of the given binary operation.
Definition at line 4070 of file CGExprScalar.cpp.
Referenced by emitArraySubscriptGEP(), emitPointerArithmetic(), and emitReduceFiniFunction().
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 1163 of file CGExpr.cpp.
Referenced by findPeephole(), and isBlockVarRef().
llvm::Constant * CodeGenFunction::EmitCheckSourceLocation | ( | SourceLocation | Loc | ) |
Emit a description of a source location in a format suitable for passing to a runtime sanitizer handler.
Emit a representation of a SourceLocation for passing to a handler in a sanitizer runtime library.
The format for this data is:
For an invalid SourceLocation, the Filename pointer is null.
Definition at line 2746 of file CGExpr.cpp.
References CGM, Filename, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::PresumedLoc::getFilename(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), INT_MIN, clang::PresumedLoc::isValid(), and Line.
Referenced by EmitNullabilityCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitUnreachable(), EmitVariablyModifiedType(), and GenerateCode().
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
followed by an array of i8 containing the type name. TypeKind is 0 for an integer, 1 for a floating point value, and -1 for anything else.
Definition at line 2665 of file CGExpr.cpp.
References CGM, getContext(), clang::CodeGen::CodeGenModule::getTypeDescriptorFromMap(), clang::ASTContext::getTypeSize(), getTypeSize(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), and clang::Type::isSignedIntegerType().
Referenced by EmitNullabilityCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), and EmitVariablyModifiedType().
llvm::Value * CodeGenFunction::EmitCheckValue | ( | llvm::Value * | V | ) |
Convert a value into a format suitable for passing to a runtime sanitizer handler.
Definition at line 2708 of file CGExpr.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), CreateDefaultAlignTempAlloca(), clang::CodeGen::CGBuilderTy::CreateStore(), getLLVMContext(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, and clang::CodeGen::Type.
Referenced by EmitCheck(), and EmitScalarRangeCheck().
RValue CodeGenFunction::EmitCoawaitExpr | ( | const CoawaitExpr & | E, |
AggValueSlot | aggSlot = AggValueSlot::ignored() , |
||
bool | ignoreResult = false |
||
) |
Definition at line 263 of file CGCoroutine.cpp.
LValue CodeGenFunction::EmitCoawaitLValue | ( | const CoawaitExpr * | E | ) |
Definition at line 303 of file CGCoroutine.cpp.
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 | ||
) |
Definition at line 4733 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), GetNeonType(), clang::CallExpr::getNumArgs(), clang::Expr::isIntegerConstantExpr(), and clang::CodeGen::Type.
LValue CodeGenFunction::EmitComplexAssignmentLValue | ( | const BinaryOperator * | E | ) |
Emit an l-value for an assignment (simple or compound) of complex type.
Definition at line 1119 of file CGExprComplex.cpp.
References clang::BinaryOperator::getOpcode().
LValue CodeGenFunction::EmitComplexCompoundAssignmentLValue | ( | const CompoundAssignOperator * | E | ) |
Definition at line 1140 of file CGExprComplex.cpp.
References EmitScalarCompoundAssignWithComplex(), getComplexOp(), and clang::BinaryOperator::getOpcode().
Referenced by getComplexOp().
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 1089 of file CGExprComplex.cpp.
References getComplexType(), and clang::Expr::getType().
Referenced by EmitExprAsInit(), GetIntrinsic(), and ShouldNullCheckClassCastValue().
EmitComplexExprIntoLValue - Emit the given expression of complex type and place its result into the specified l-value.
Definition at line 1098 of file CGExprComplex.cpp.
References getComplexType(), and clang::Expr::getType().
Referenced by EmitDeclInit(), and StoreAnyExprIntoOneUnit().
CodeGenFunction::ComplexPairTy CodeGenFunction::EmitComplexPrePostIncDec | ( | const UnaryOperator * | E, |
LValue | LV, | ||
bool | isInc, | ||
bool | isPre | ||
) |
Definition at line 944 of file CGExpr.cpp.
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 3985 of file CGExprScalar.cpp.
References EmitScalarPrePostIncDec(), and clang::Type::isAnyComplexType().
Referenced by convertToScalarValue().
LValue CodeGenFunction::EmitCompoundAssignmentLValue | ( | const CompoundAssignOperator * | E | ) |
Definition at line 4020 of file CGExprScalar.cpp.
References clang::prec::And, COMPOUND_OP, and clang::BinaryOperator::getOpcode().
LValue CodeGenFunction::EmitCompoundLiteralLValue | ( | const CompoundLiteralExpr * | E | ) |
Definition at line 3958 of file CGExpr.cpp.
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 372 of file CGStmt.cpp.
Referenced by ShouldNullCheckClassCastValue().
Address CodeGenFunction::EmitCompoundStmtWithoutScope | ( | const CompoundStmt & | S, |
bool | GetLast = false , |
||
AggValueSlot | AVS = AggValueSlot::ignored() |
||
) |
Definition at line 384 of file CGStmt.cpp.
Referenced by GenerateObjCMethod().
LValue CodeGenFunction::EmitConditionalOperatorLValue | ( | const AbstractConditionalOperator * | E | ) |
Definition at line 4001 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CGM, ConstantFoldsToSimpleInteger(), ContainsLabel(), createBasicBlock(), EmitAggExprToLValue(), EmitBlock(), EmitBranchOnBoolExpr(), EmitLValue(), EmitLValueOrThrowExpression(), EmitUnsupportedLValue(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), clang::AbstractConditionalOperator::getCond(), clang::AbstractConditionalOperator::getFalseExpr(), getProfileCount(), clang::AbstractConditionalOperator::getTrueExpr(), clang::Expr::getType(), hasAggregateEvaluationKind(), incrementProfileCounter(), clang::Expr::isGLValue(), MakeAddrLValue(), max(), clang::CodeGen::CodeGenModule::mergeTBAAInfoForConditionalOperator(), and min().
Referenced by EmitLValueOrThrowExpression().
void CodeGenFunction::EmitConstructorBody | ( | FunctionArgList & | Args | ) |
EmitConstructorBody - Emits the body of the current constructor.
Definition at line 819 of file CGClass.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::Ctor_Base, clang::Ctor_Complete, EmitLValueForAnyFieldInitialization(), EmitLValueForFieldInitialization(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::CXXCtorInitializer::getAnyMember(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::LValue::getBitFieldAddress(), clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::ASTContext::getCharWidth(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::FieldDecl::getFieldIndex(), clang::CXXCtorInitializer::getInit(), clang::ASTContext::getLangOpts(), getLangOpts(), getLLVMContext(), clang::Decl::getLocEnd(), clang::CXXCtorInitializer::getMember(), clang::CXXMethodDecl::getParent(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::CodeGen::CGCXXABI::getSrcArgforCopyCtor(), clang::CodeGen::Address::getType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::getTypeInfoDataSizeInChars(), getTypes(), clang::Qualifiers::hasObjCLifetime(), clang::Qualifiers::hasVolatile(), clang::CodeGen::LValue::isBitField(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), clang::FunctionDecl::isDefaulted(), clang::QualType::isDestructedType(), isMemcpyEquivalentSpecialMember(), clang::Type::isReferenceType(), clang::QualType::isTriviallyCopyableType(), LoadCXXThisAddress(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), needsEHCleanup(), clang::LangOptions::NonGC, pushEHDestroy(), SanOpts, clang::SanitizerSet::set(), clang::CodeGen::CGBitFieldInfo::StorageOffset, clang::ASTContext::toBits(), clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::Type.
Referenced by GenerateCode().
void CodeGenFunction::EmitContinueStmt | ( | const ContinueStmt & | S | ) |
Definition at line 1128 of file CGStmt.cpp.
void CodeGenFunction::EmitCoreturnStmt | ( | const CoreturnStmt & | S | ) |
Definition at line 277 of file CGCoroutine.cpp.
void CodeGenFunction::EmitCoroutineBody | ( | const CoroutineBodyStmt & | S | ) |
Definition at line 545 of file CGCoroutine.cpp.
Definition at line 698 of file CGCoroutine.cpp.
RValue CodeGenFunction::EmitCoyieldExpr | ( | const CoyieldExpr & | E, |
AggValueSlot | aggSlot = AggValueSlot::ignored() , |
||
bool | ignoreResult = false |
||
) |
Definition at line 270 of file CGCoroutine.cpp.
LValue CodeGenFunction::EmitCoyieldLValue | ( | const CoyieldExpr * | E | ) |
Definition at line 313 of file CGCoroutine.cpp.
void CodeGenFunction::EmitCPUDispatchMultiVersionResolver | ( | llvm::Function * | Resolver, |
ArrayRef< CPUDispatchMultiVersionResolverOption > | Options | ||
) |
Definition at line 2417 of file CodeGenFunction.cpp.
void CodeGenFunction::EmitCtorPrologue | ( | const CXXConstructorDecl * | CD, |
CXXCtorType | CtorType, | ||
FunctionArgList & | Args | ||
) |
EmitCtorPrologue - This routine generates necessary code to initialize base classes and non-static data members belonging to this constructor.
Definition at line 1255 of file CGClass.cpp.
References clang::CXXMethodDecl::getParent(), clang::CXXConstructorDecl::init_begin(), and clang::CXXConstructorDecl::isDelegatingConstructor().
RValue CodeGenFunction::EmitCUDAKernelCallExpr | ( | const CUDAKernelCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 476 of file CGExprCXX.cpp.
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.
ctor | the constructor to call for each element |
arrayType | the type of the array to initialize |
arrayBegin | an arrayType* |
zeroInitialize | true if each element should be zero-initialized before it is constructed |
Definition at line 1873 of file CGClass.cpp.
void CodeGenFunction::EmitCXXAggrConstructorCall | ( | const CXXConstructorDecl * | ctor, |
llvm::Value * | numElements, | ||
Address | arrayBase, | ||
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.
ctor | the constructor to call for each element |
numElements | the number of elements in the array; may be zero |
arrayBase | a T*, where T is the type constructed by ctor |
zeroInitialize | true if each element should be zero-initialized before it is constructed |
Definition at line 1894 of file CGClass.cpp.
LValue CodeGenFunction::EmitCXXBindTemporaryLValue | ( | const CXXBindTemporaryExpr * | E | ) |
Definition at line 4480 of file CGExpr.cpp.
void CodeGenFunction::EmitCXXConstructExpr | ( | const CXXConstructExpr * | E, |
AggValueSlot | Dest | ||
) |
Definition at line 569 of file CGExprCXX.cpp.
Referenced by isBlockVarRef().
LValue CodeGenFunction::EmitCXXConstructLValue | ( | const CXXConstructExpr * | E | ) |
Definition at line 4456 of file CGExpr.cpp.
void CodeGenFunction::EmitCXXConstructorCall | ( | const CXXConstructorDecl * | D, |
CXXCtorType | Type, | ||
bool | ForVirtualBase, | ||
bool | Delegating, | ||
Address | This, | ||
const CXXConstructExpr * | E, | ||
AggValueSlot::Overlap_t | Overlap, | ||
bool | NewPointerIsChecked | ||
) |
Definition at line 2006 of file CGClass.cpp.
void CodeGenFunction::EmitCXXConstructorCall | ( | const CXXConstructorDecl * | D, |
CXXCtorType | Type, | ||
bool | ForVirtualBase, | ||
bool | Delegating, | ||
Address | This, | ||
CallArgList & | Args, | ||
AggValueSlot::Overlap_t | Overlap, | ||
SourceLocation | Loc, | ||
bool | NewPointerIsChecked | ||
) |
Definition at line 2068 of file CGClass.cpp.
References canEmitDelegateCallArgs(), clang::Ctor_Base, clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::getFromCtorType(), clang::CXXConstructorDecl::getInheritedConstructor(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getRecordType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypes::inheritingCtorHasParams(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::CXXRecordDecl::isDynamicClass(), isMemcpyEquivalentSpecialMember(), clang::FunctionDecl::isTrivial(), clang::CodeGen::CGCXXABI::AddedStructorArgs::Prefix, clang::CodeGen::CGCXXABI::AddedStructorArgs::Suffix, TCK_ConstructorCall, and clang::CharUnits::Zero().
void CodeGenFunction::EmitCXXDeleteExpr | ( | const CXXDeleteExpr * | E | ) |
Definition at line 1995 of file CGExprCXX.cpp.
void CodeGenFunction::EmitCXXDestructorCall | ( | const CXXDestructorDecl * | D, |
CXXDtorType | Type, | ||
bool | ForVirtualBase, | ||
bool | Delegating, | ||
Address | This | ||
) |
Definition at line 2376 of file CGClass.cpp.
References clang::Dtor_Complete, and EmitCXXDestructorCall().
Referenced by EmitCXXDestructorCall(), EmitObjectDelete(), and EmitStaticVarDecl().
RValue CodeGenFunction::EmitCXXDestructorCall | ( | const CXXDestructorDecl * | DD, |
const CGCallee & | Callee, | ||
llvm::Value * | This, | ||
llvm::Value * | ImplicitParam, | ||
QualType | ImplicitParamTy, | ||
const CallExpr * | E, | ||
StructorType | Type | ||
) |
Definition at line 96 of file CGExprCXX.cpp.
References commonEmitCXXMemberOrOperatorCall().
void CodeGenFunction::EmitCXXForRangeStmt | ( | const CXXForRangeStmt & | S, |
ArrayRef< const Attr *> | Attrs = None |
||
) |
Definition at line 928 of file CGStmt.cpp.
void CodeGenFunction::EmitCXXGlobalVarDeclInit | ( | const VarDecl & | D, |
llvm::Constant * | DeclPtr, | ||
bool | PerformInit | ||
) |
EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage.
Definition at line 145 of file CGDeclCXX.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitReferenceBindingToExpr(), EmitStoreOfScalar(), clang::Decl::getAttr(), getContext(), getDeclAlign(), clang::VarDecl::getInit(), getLangOpts(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getTargetAddressSpace(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), clang::Type::isReferenceType(), clang::CodeGen::CodeGenModule::isTypeConstant(), and clang::CodeGen::Type.
Referenced by GenerateCXXGlobalVarDeclInitFunc().
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 256 of file CGDeclCXX.cpp.
References CGM, clang::CodeGen::CGCXXABI::EmitGuardedInit(), clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getCXXABI(), and clang::Decl::getLocation().
Referenced by AddInitializerToStaticVarDecl(), and GenerateCXXGlobalVarDeclInitFunc().
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 270 of file CGDeclCXX.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getLLVMContext(), clang::VarDecl::getTLSKind(), clang::VarDecl::isLocalVarDecl(), TlsGuard, and VariableGuard.
Referenced by GenerateCXXGlobalInitFunc().
RValue CodeGenFunction::EmitCXXMemberCallExpr | ( | const CXXMemberCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 168 of file CGExprCXX.cpp.
References clang::CodeGen::CGCallee::forDirect(), clang::MemberExpr::getBase(), clang::CallExpr::getCallee(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getQualifier(), clang::MemberExpr::hasQualifier(), clang::Expr::IgnoreParens(), and clang::MemberExpr::isArrow().
Address CodeGenFunction::EmitCXXMemberDataPointerAddress | ( | const Expr * | E, |
Address | base, | ||
llvm::Value * | memberPtr, | ||
const MemberPointerType * | memberPtrType, | ||
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr |
||
) |
Emit the address of a field using a member data pointer.
E | Only used for emergency diagnostics |
Definition at line 129 of file CGClass.cpp.
RValue CodeGenFunction::EmitCXXMemberOrOperatorCall | ( | const CXXMethodDecl * | Method, |
const CGCallee & | Callee, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Value * | This, | ||
llvm::Value * | ImplicitParam, | ||
QualType | ImplicitParamTy, | ||
const CallExpr * | E, | ||
CallArgList * | RtlArgs | ||
) |
Definition at line 81 of file CGExprCXX.cpp.
References clang::Type::castAs(), commonEmitCXXMemberOrOperatorCall(), clang::Expr::getExprLoc(), and clang::ValueDecl::getType().
RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr | ( | const CallExpr * | CE, |
const CXXMethodDecl * | MD, | ||
ReturnValueSlot | ReturnValue, | ||
bool | HasQualifier, | ||
NestedNameSpecifier * | Qualifier, | ||
bool | IsArrow, | ||
const Expr * | Base | ||
) |
RValue CodeGenFunction::EmitCXXMemberPointerCallExpr | ( | const CXXMemberCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 413 of file CGExprCXX.cpp.
llvm::Value * CodeGenFunction::EmitCXXNewExpr | ( | const CXXNewExpr * | E | ) |
Definition at line 1546 of file CGExprCXX.cpp.
RValue CodeGenFunction::EmitCXXOperatorMemberCallExpr | ( | const CXXOperatorCallExpr * | E, |
const CXXMethodDecl * | MD, | ||
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 466 of file CGExprCXX.cpp.
RValue CodeGenFunction::EmitCXXPseudoDestructorExpr | ( | const CXXPseudoDestructorExpr * | E | ) |
Definition at line 107 of file CGExprCXX.cpp.
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 1278 of file CGCleanup.cpp.
References clang::CodeGen::NormalAndEHCleanup.
Referenced by isBlockVarRef().
void CodeGenFunction::EmitCXXThrowExpr | ( | const CXXThrowExpr * | E, |
bool | KeepInsertionPoint = true |
||
) |
Definition at line 422 of file CGException.cpp.
Referenced by EmitBranchOnBoolExpr(), and EmitLValueOrThrowExpression().
void CodeGenFunction::EmitCXXTryStmt | ( | const CXXTryStmt & | S | ) |
Definition at line 551 of file CGException.cpp.
llvm::Value * CodeGenFunction::EmitCXXTypeidExpr | ( | const CXXTypeidExpr * | E | ) |
Definition at line 2124 of file CGExprCXX.cpp.
LValue CodeGenFunction::EmitCXXTypeidLValue | ( | const CXXTypeidExpr * | E | ) |
Definition at line 4465 of file CGExpr.cpp.
Address CodeGenFunction::EmitCXXUuidofExpr | ( | const CXXUuidofExpr * | E | ) |
Definition at line 4469 of file CGExpr.cpp.
LValue CodeGenFunction::EmitCXXUuidofLValue | ( | const CXXUuidofExpr * | E | ) |
Definition at line 4474 of file CGExpr.cpp.
void CodeGenFunction::EmitDecl | ( | const Decl & | D | ) |
EmitDecl - Emit a declaration.
This function can be called with a null (unreachable) insert point.
Definition at line 41 of file CGDecl.cpp.
References CGM, clang::CodeGen::CodeGenModule::EmitOMPDeclareReduction(), EmitVarDecl(), EmitVariablyModifiedType(), clang::XRayInstrKind::Function, getDebugInfo(), clang::Decl::getKind(), clang::TypedefNameDecl::getUnderlyingType(), clang::VarDecl::isLocalVarDecl(), and Label.
void CodeGenFunction::EmitDeclRefExprDbgValue | ( | const DeclRefExpr * | E, |
const APValue & | Init | ||
) |
Definition at line 2157 of file CodeGenFunction.cpp.
Referenced by tryEmitAsConstant().
LValue CodeGenFunction::EmitDeclRefLValue | ( | const DeclRefExpr * | E | ) |
Definition at line 2398 of file CGExpr.cpp.
Referenced by LoadObjCSelf().
void CodeGenFunction::EmitDeclStmt | ( | const DeclStmt & | S | ) |
Definition at line 1106 of file CGStmt.cpp.
void CodeGenFunction::EmitDefaultStmt | ( | const DefaultStmt & | S | ) |
Definition at line 1304 of file CGStmt.cpp.
void CodeGenFunction::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.
Produce a r-value suitable for passing the given parameter.
Definition at line 3056 of file CGCall.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::RValue::get(), clang::ValueDecl::getType(), isInAllocaArgument(), clang::Type::isReferenceType(), and clang::ast_matchers::type.
void CodeGenFunction::EmitDelegateCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
CXXCtorType | CtorType, | ||
const FunctionArgList & | Args, | ||
SourceLocation | Loc | ||
) |
Definition at line 2293 of file CGClass.cpp.
void CodeGenFunction::EmitDelegatingCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
const FunctionArgList & | Args | ||
) |
Definition at line 2347 of file CGClass.cpp.
References clang::Ctor_Complete, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::Dtor_Base, clang::Dtor_Complete, clang::CodeGen::EHCleanup, clang::CodeGen::AggValueSlot::forAddr(), clang::CXXCtorInitializer::getInit(), clang::CXXMethodDecl::getParent(), clang::CXXConstructorDecl::init_begin(), clang::CXXConstructorDecl::isDelegatingConstructor(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked, clang::CodeGen::AggValueSlot::MayOverlap, and clang::CodeGen::Type.
void CodeGenFunction::EmitDeleteCall | ( | const FunctionDecl * | DeleteFD, |
llvm::Value * | Ptr, | ||
QualType | DeleteTy, | ||
llvm::Value * | NumElements = nullptr , |
||
CharUnits | CookieSize = CharUnits() |
||
) |
Definition at line 1756 of file CGExprCXX.cpp.
References clang::Type::getAs(), clang::FunctionDecl::getOverloadedOperator(), clang::ValueDecl::getType(), getUsualDeleteParams(), and clang::CharUnits::isZero().
Referenced by EmitDestroyingObjectDelete(), and EmitObjectDelete().
void CodeGenFunction::emitDestroy | ( | Address | addr, |
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
emitDestroy - Immediately perform the destruction of the given object.
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 1800 of file CGDecl.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::ast_matchers::arrayType, Builder, emitArrayDestroy(), emitArrayLength(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CodeGen::Address::getPointer(), and length().
Referenced by EmitStaticVarDecl(), generateDestroyHelper(), and GenerateObjCSetter().
void CodeGenFunction::EmitDestructorBody | ( | FunctionArgList & | Args | ) |
EmitDestructorBody - Emits the body of the current destructor.
Definition at line 1405 of file CGClass.cpp.
References clang::Dtor_Base, clang::CXXMethodDecl::getParent(), and clang::CXXRecordDecl::isAbstract().
Referenced by GenerateCode().
Definition at line 767 of file CGStmt.cpp.
llvm::Value * CodeGenFunction::EmitDynamicCast | ( | Address | V, |
const CXXDynamicCastExpr * | DCE | ||
) |
Definition at line 2163 of file CGExprCXX.cpp.
References clang::Type::castAs(), EmitDynamicCastToNull(), clang::Type::getAs(), clang::Expr::getExprLoc(), clang::PointerType::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::Type::isPointerType(), clang::Type::isRecordType(), and clang::Type::isVoidType().
Referenced by findPeephole(), and ShouldNullCheckClassCastValue().
void CodeGenFunction::EmitEndEHSpec | ( | const Decl * | D | ) |
EmitEndEHSpec - Emit the end of the exception spec.
Definition at line 520 of file CGException.cpp.
References clang::FunctionProtoType::canThrow(), clang::CT_Cannot, emitFilterDispatchBlock(), clang::EST_Dynamic, clang::EST_DynamicNone, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::FunctionProtoType::getExceptionSpecType(), clang::CodeGen::CodeGenModule::getTarget(), clang::ValueDecl::getType(), and clang::isNoexceptExceptionSpec().
Referenced by FinishFunction().
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.
init | the initializing expression |
D | the object to act as if we're initializing |
loc | the address to initialize; its type is a pointer to the LLVM mapping of the object's type |
alignment | the alignment of the address |
capturedByInit | true if D is a __block variable whose address is potentially changed by the initializer |
Definition at line 1568 of file CGDecl.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, drillIntoBlockVariable(), EmitAggExpr(), EmitAtomicInit(), EmitComplexExpr(), EmitReferenceBindingToExpr(), EmitScalarInit(), EmitStoreOfComplex(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forLValue(), getEvaluationKind(), clang::ValueDecl::getType(), clang::Type::isAtomicType(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isReferenceType(), clang::CodeGen::AggValueSlot::MayOverlap, overlapForFieldInit(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitAutoVarInit(), and emitPrivatesInit().
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 3192 of file CGObjC.cpp.
References clang::CodeGen::RequiredArgs::All, Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
LValue CodeGenFunction::EmitExtVectorElementExpr | ( | const ExtVectorElementExpr * | E | ) |
Definition at line 3654 of file CGExpr.cpp.
Generates lvalue for partial ext_vector access.
Definition at line 1818 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), getAccessedFieldNo(), clang::Type::getAs(), getContext(), clang::VectorType::getElementType(), clang::CodeGen::LValue::getExtVectorAddress(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::CodeGen::Type.
Emit field annotations for the given field & value.
Returns the annotation result.
Definition at line 2215 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::Address::getPointer(), clang::Decl::hasAttr(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::Type.
Referenced by EmitLValueForField().
Definition at line 829 of file CGStmt.cpp.
void CodeGenFunction::EmitForwardingCallToLambda | ( | const CXXMethodDecl * | LambdaCallOperator, |
CallArgList & | CallArgs | ||
) |
Definition at line 2786 of file CGClass.cpp.
References clang::Type::castAs(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::FunctionType::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::CodeGen::ABIArgInfo::Indirect, and clang::CodeGen::ReturnValueSlot::isNull().
llvm::Value * CodeGenFunction::EmitFromMemory | ( | llvm::Value * | Value, |
QualType | Ty | ||
) |
EmitFromMemory - Change a scalar value from its memory representation to its value representation.
Definition at line 1642 of file CGExpr.cpp.
References Builder, getContext(), getTypeSize(), and hasBooleanRepresentation().
Referenced by EmitFromInt(), EmitLoadOfScalar(), and EmitStoreThroughBitfieldLValue().
void CodeGenFunction::EmitFunctionBody | ( | FunctionArgList & | Args, |
const Stmt * | Body | ||
) |
Definition at line 1186 of file CodeGenFunction.cpp.
References incrementProfileCounter().
Referenced by GenerateCode().
void CodeGenFunction::EmitFunctionEpilog | ( | const CGFunctionInfo & | FI, |
bool | EmitRetDbgLoc, | ||
SourceLocation | EndLoc | ||
) |
EmitFunctionEpilog - Emit the target specific LLVM code to return the given temporary.
Definition at line 2785 of file CGCall.cpp.
References clang::CodeGen::CGFunctionInfo::isNoReturn().
Referenced by FinishFunction().
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 2209 of file CGCall.cpp.
References clang::CodeGen::Type.
Referenced by StartFunction().
void CodeGenFunction::EmitGotoStmt | ( | const GotoStmt & | S | ) |
Definition at line 570 of file CGStmt.cpp.
Definition at line 12111 of file CGBuiltin.cpp.
References clang::CallExpr::getArg().
Referenced by EmitTargetArchBuiltinExpr().
void CodeGenFunction::EmitIfStmt | ( | const IfStmt & | S | ) |
Definition at line 602 of file CGStmt.cpp.
void CodeGenFunction::EmitIgnoredExpr | ( | const Expr * | E | ) |
EmitIgnoredExpr - Emit an expression in a context which ignores the result.
EmitIgnoredExpr - Emit code to compute the specified expression, ignoring the result.
Definition at line 182 of file CGExpr.cpp.
Referenced by emitInitWithReductionInitializer(), emitOMPSimdRegion(), emitPostUpdateForReductionClause(), emitReductionCombiner(), EmitVariablyModifiedType(), GetIntrinsic(), and ShouldNullCheckClassCastValue().
void CodeGenFunction::emitImplicitAssignmentOperatorBody | ( | FunctionArgList & | Args | ) |
Definition at line 1515 of file CGClass.cpp.
References clang::FunctionDecl::getBody(), and clang::Stmt::getSourceRange().
Referenced by GenerateCode().
void CodeGenFunction::EmitIndirectGotoStmt | ( | const IndirectGotoStmt & | S | ) |
Definition at line 581 of file CGStmt.cpp.
void CodeGenFunction::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).
Definition at line 2146 of file CGClass.cpp.
Referenced by isBlockVarRef().
Definition at line 666 of file CGClass.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::ValueDecl::getType(), clang::CodeGen::AggValueSlot::IsDestructed, clang::QualType::isDestructedType(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked, clang::CodeGen::LValue::isSimple(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitMemberInitializer().
LValue CodeGenFunction::EmitInitListLValue | ( | const InitListExpr * | E | ) |
Definition at line 3977 of file CGExpr.cpp.
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 2193 of file CGClass.cpp.
Definition at line 5470 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::Expr::getType(), and clang::CodeGen::Type.
Definition at line 5483 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), clang::Type::getPointeeType(), clang::CharUnits::getQuantity(), clang::Expr::getType(), and clang::CodeGen::Type.
llvm::Value * CodeGenFunction::EmitIvarOffset | ( | const ObjCInterfaceDecl * | Interface, |
const ObjCIvarDecl * | Ivar | ||
) |
Definition at line 4515 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::EmitIvarOffset(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by generateObjCGetterBody(), and generateObjCSetterBody().
void CodeGenFunction::EmitLabel | ( | const LabelDecl * | D | ) |
EmitLabel - Emit the block for the given label.
It is legal to call this function even if there is no current insertion point.
Definition at line 511 of file CGStmt.cpp.
References clang::CodeGen::CodeGenFunction::LexicalScope::addLabel(), EHStack, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), getJumpDestInCurrentScope(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth(), clang::LabelDecl::getStmt(), clang::CodeGen::EHScopeStack::hasNormalCleanups(), incrementProfileCounter(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), ResolveBranchFixups(), clang::CodeGen::CodeGenFunction::JumpDest::setScopeDepth(), and clang::CodeGen::EHScopeStack::stable_begin().
void CodeGenFunction::EmitLabelStmt | ( | const LabelStmt & | S | ) |
Definition at line 561 of file CGStmt.cpp.
void CodeGenFunction::EmitLambdaBlockInvokeBody | ( | ) |
Definition at line 2824 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), clang::BlockDecl::capture_begin(), clang::CodeGen::RValue::get(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getContext(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getPointerType(), getRecordType(), clang::ValueDecl::getType(), clang::CXXRecordDecl::isGenericLambda(), clang::FunctionDecl::isVariadic(), and clang::BlockDecl::parameters().
void CodeGenFunction::EmitLambdaDelegatingInvokeBody | ( | const CXXMethodDecl * | MD | ) |
Definition at line 2854 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), clang::FunctionTemplateDecl::findSpecialization(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getContext(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), getRecordType(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::CodeGen::CodeGenModule::getTypes(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::CXXRecordDecl::isGenericLambda(), and clang::FunctionDecl::parameters().
void CodeGenFunction::EmitLambdaExpr | ( | const LambdaExpr * | E, |
AggValueSlot | Dest | ||
) |
Definition at line 2254 of file CGExprCXX.cpp.
LValue CodeGenFunction::EmitLambdaLValue | ( | const LambdaExpr * | E | ) |
Definition at line 4489 of file CGExpr.cpp.
void CodeGenFunction::EmitLambdaStaticInvokeBody | ( | const CXXMethodDecl * | MD | ) |
Definition at line 2884 of file CGClass.cpp.
References clang::FunctionDecl::isVariadic().
Referenced by GenerateCode().
llvm::BasicBlock * CodeGenFunction::EmitLandingPad | ( | ) |
Emits a landing pad for the current EH stack.
Definition at line 750 of file CGException.cpp.
References clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScope::PadEnd, and clang::CodeGen::EHScope::Terminate.
void CodeGenFunction::EmitLifetimeEnd | ( | llvm::Value * | Size, |
llvm::Value * | Addr | ||
) |
Definition at line 1086 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, Builder, CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::getDataLayout(), and clang::CodeGen::CodeGenModule::getLLVMLifetimeEndFn().
Referenced by clang::CodeGen::CodeGenFunction::CallLifetimeEnd::Emit().
llvm::Value * CodeGenFunction::EmitLifetimeStart | ( | uint64_t | Size, |
llvm::Value * | Addr | ||
) |
Emit a lifetime.begin marker if some criteria are satisfied.
Definition at line 1070 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypeCache::AllocaInt8PtrTy, Builder, CGM, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenModule::getLLVMLifetimeStartFn(), and clang::CodeGen::CodeGenTypeCache::Int64Ty.
Referenced by EmitAutoVarAlloca().
RValue CodeGenFunction::EmitLoadOfBitfieldLValue | ( | LValue | LV, |
SourceLocation | Loc | ||
) |
Definition at line 1757 of file CGExpr.cpp.
References Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateLoad(), EmitScalarRangeCheck(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getBitFieldAddress(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::CGBitFieldInfo::IsSigned, clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CGBitFieldInfo::Offset, clang::CodeGen::CGBitFieldInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageSize, and clang::CodeGen::Type.
Referenced by EmitLoadOfLValue().
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 1114 of file CGExprComplex.cpp.
Referenced by convertTempToRValue(), EmitRValueForField(), generateObjCGetterBody(), and InitCatchParam().
Definition at line 1789 of file CGExpr.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::RValue::get(), getAccessedFieldNo(), clang::Type::getAs(), clang::CodeGen::LValue::getExtVectorAddress(), clang::CodeGen::LValue::getExtVectorElts(), clang::VectorType::getNumElements(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isVolatileQualified(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitLoadOfLValue().
Load of global gamed gegisters are always calls to intrinsics.
Definition at line 1840 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenTypes::getDataLayout(), clang::CodeGen::LValue::getGlobalReg(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Type::isIntegerType(), clang::Type::isPointerType(), and clang::CodeGen::Type.
Referenced by EmitLoadOfLValue().
RValue CodeGenFunction::EmitLoadOfLValue | ( | LValue | LV, |
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 1711 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), EmitARCLoadWeak(), EmitARCLoadWeakRetained(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfScalar(), EmitObjCConsumeObject(), clang::CodeGen::CGObjCRuntime::EmitObjCWeakRead(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), getLangOpts(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::LValue::getQuals(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddress(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isExtVectorElt(), clang::Type::isFunctionType(), clang::CodeGen::LValue::isGlobalReg(), clang::CodeGen::LValue::isObjCWeak(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::isVolatileQualified(), and clang::Qualifiers::OCL_Weak.
Referenced by AddVariableConstraints(), EmitAtomicUpdateValue(), emitOMPAtomicReadExpr(), EmitRValueForField(), emitWritebackArg(), generateObjCGetterBody(), StartFunction(), and tryEmitARCRetainLoadOfScalar().
Address CodeGenFunction::EmitLoadOfPointer | ( | Address | Ptr, |
const PointerType * | PtrTy, | ||
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr |
||
) |
Definition at line 2277 of file CGExpr.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), getNaturalTypeAlignment(), and clang::PointerType::getPointeeType().
Referenced by emitDeclTargetLinkVarDeclLValue(), EmitLoadOfPointerLValue(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), and emitReductionListCopy().
LValue CodeGenFunction::EmitLoadOfPointerLValue | ( | Address | Ptr, |
const PointerType * | PtrTy | ||
) |
Definition at line 2287 of file CGExpr.cpp.
References EmitLoadOfPointer(), clang::PointerType::getPointeeType(), and MakeAddrLValue().
Referenced by emitDestructorsFunction(), emitProxyTaskFunction(), emitTaskDupFunction(), loadToBegin(), and clang::CodeGen::ReductionCodeGen::usesReductionInitializer().
Address CodeGenFunction::EmitLoadOfReference | ( | LValue | RefLVal, |
LValueBaseInfo * | PointeeBaseInfo = nullptr , |
||
TBAAAccessInfo * | PointeeTBAAInfo = nullptr |
||
) |
Definition at line 2255 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), clang::CodeGen::LValue::getAddress(), getNaturalTypeAlignment(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Referenced by EmitLoadOfReferenceLValue(), and EmitLValueForField().
Definition at line 2268 of file CGExpr.cpp.
References EmitLoadOfReference(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getType(), and MakeAddrLValue().
Referenced by loadToBegin().
|
inline |
Definition at line 2124 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getTBAAAccessInfo().
|
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 3379 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getTBAAAccessInfo().
Referenced by AddDirectArgument(), castValueToType(), convertTempToRValue(), EmitARCStoreStrong(), EmitCfiCheckFail(), emitCopyToScratchpad(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), emitInterWarpCopyFunction(), EmitLoadOfLValue(), EmitLoadOfScalar(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitReductionListCopy(), EmitScalarInit(), emitShuffleAndReduceFunction(), emitTaskDupFunction(), emitWriteback(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), InitCatchParam(), LoadObjCSelf(), ShouldNullCheckClassCastValue(), and shuffleAndStore().
llvm::Value * CodeGenFunction::EmitLoadOfScalar | ( | Address | Addr, |
bool | Volatile, | ||
QualType | Ty, | ||
SourceLocation | Loc, | ||
LValueBaseInfo | BaseInfo, | ||
TBAAAccessInfo | TBAAInfo, | ||
bool | isNontemporal = false |
||
) |
Definition at line 1571 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), EmitAtomicLoad(), EmitFromMemory(), EmitScalarRangeCheck(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::RValue::getScalarVal(), clang::Type::isAtomicType(), clang::Type::isVectorType(), LValueIsSuitableForInlineAtomic(), clang::CodeGen::LValue::MakeAddr(), Node, and clang::CodeGen::Type.
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 1461 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 - 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 1199 of file CGExpr.cpp.
Referenced by AddVariableConstraints(), clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitARCStoreUnsafeUnretained(), EmitConditionalOperatorLValue(), emitCPPObjectAtomicSetterCall(), EmitLValueOrThrowExpression(), emitOMPAtomicCaptureExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), EmitOMPHelperVar(), emitStructSetterCall(), emitWritebackArg(), getOrCreateOpaqueLValueMapping(), isBlockVarRef(), tryEmitARCCopyWeakInit(), and tryEmitARCRetainLoadOfScalar().
Definition at line 3807 of file CGExpr.cpp.
References clang::CodeGen::TBAAAccessInfo::AccessType, clang::Qualifiers::addCVRQualifiers(), clang::CodeGen::TBAAAccessInfo::BaseType, Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), emitAddrOfFieldStorage(), EmitFieldAnnotations(), EmitLoadOfReference(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValueBaseInfo::getAlignmentSource(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::CGRecordLayout::getBitFieldInfo(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::ASTContext::getCharWidth(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::getFieldAlignmentSource(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), getLLVMContext(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCGCAttr(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getTBAABaseTypeInfo(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenModule::getTBAATypeInfo(), clang::CodeGen::LValue::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::LValue::getVRQualifiers(), hasAnyVptr(), clang::Decl::hasAttr(), clang::FieldDecl::isBitField(), clang::CodeGen::TBAAAccessInfo::isMayAlias(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::Type::isVectorType(), MakeAddrLValue(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::TBAAAccessInfo::Offset, clang::Qualifiers::removeObjCGCAttr(), clang::Qualifiers::setVolatile(), clang::CodeGen::TBAAAccessInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageOffset, clang::CodeGen::CGBitFieldInfo::StorageSize, clang::CodeGen::Type, clang::Qualifiers::Volatile, clang::Qualifiers::Weak, and clang::QualType::withCVRQualifiers().
Referenced by EmitCapturedFieldLValue(), emitDestructorsFunction(), EmitLValueForFieldInitialization(), EmitLValueForLambdaField(), emitPrivatesInit(), emitProxyTaskFunction(), emitReduceFiniFunction(), EmitRValueForField(), and emitTaskDupFunction().
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 3935 of file CGExpr.cpp.
References Builder, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), emitAddrOfFieldStorage(), EmitLValueForField(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValueBaseInfo::getAlignmentSource(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::getFieldAlignmentSource(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::ValueDecl::getType(), clang::Type::isReferenceType(), MakeAddrLValue(), and clang::CodeGen::Type.
Referenced by EmitConstructorBody(), and EmitMemberInitializer().
LValue CodeGenFunction::EmitLValueForIvar | ( | QualType | ObjectTy, |
llvm::Value * | Base, | ||
const ObjCIvarDecl * | Ivar, | ||
unsigned | CVRQualifiers | ||
) |
Definition at line 4520 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::EmitObjCValueForIvar(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), GenerateObjCSetter(), and generateObjCSetterBody().
Given that we are currently emitting a lambda, emit an l-value for one of its members.
Definition at line 3752 of file CGExpr.cpp.
References CurCodeDecl, EmitLValueForField(), getContext(), clang::FieldDecl::getParent(), clang::ASTContext::getTagDeclType(), and MakeNaturalAlignAddrLValue().
Referenced by StartFunction().
LValue CodeGenFunction::EmitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | E | ) |
Definition at line 419 of file CGExpr.cpp.
LValue CodeGenFunction::EmitMemberExpr | ( | const MemberExpr * | E | ) |
Definition at line 3711 of file CGExpr.cpp.
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 2153 of file CodeGenFunction.cpp.
Value * CodeGenFunction::EmitMSVCBuiltinExpr | ( | MSVCIntrin | BuiltinID, |
const CallExpr * | E | ||
) |
Definition at line 751 of file CGBuiltin.cpp.
References Begin, clang::CallExpr::getArg(), clang::Expr::getType(), and clang::CodeGen::Type.
void CodeGenFunction::EmitMustTailThunk | ( | const CXXMethodDecl * | MD, |
llvm::Value * | AdjustedThisPtr, | ||
llvm::Value * | Callee | ||
) |
Emit a musttail call for a thunk with a potentially adjusted this pointer.
Definition at line 378 of file CGVTables.cpp.
References clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::ABIArgInfo::isIndirect(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), and clang::CodeGen::Type.
Value * CodeGenFunction::EmitNeonCall | ( | llvm::Function * | F, |
SmallVectorImpl< llvm::Value *> & | O, | ||
const char * | name, | ||
unsigned | shift = 0 , |
||
bool | rightshift = false |
||
) |
Definition at line 3846 of file CGBuiltin.cpp.
Referenced by EmitCommonNeonSISDBuiltinExpr().
Value * CodeGenFunction::EmitNeonRShiftImm | ( | llvm::Value * | Vec, |
llvm::Value * | Amt, | ||
llvm::Type * | Ty, | ||
bool | usgn, | ||
const char * | name | ||
) |
Definition at line 3867 of file CGBuiltin.cpp.
References clang::prec::Shift.
Value * CodeGenFunction::EmitNeonShiftVector | ( | llvm::Value * | V, |
llvm::Type * | Ty, | ||
bool | negateForRightShift | ||
) |
Definition at line 3860 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitNeonSplat | ( | llvm::Value * | V, |
llvm::Constant * | Idx | ||
) |
Definition at line 3840 of file CGBuiltin.cpp.
void CodeGenFunction::EmitNewArrayInitializer | ( | const CXXNewExpr * | E, |
QualType | elementType, | ||
llvm::Type * | ElementTy, | ||
Address | NewPtr, | ||
llvm::Value * | NumElements, | ||
llvm::Value * | AllocSizeWithoutCookie | ||
) |
Definition at line 968 of file CGExprCXX.cpp.
void CodeGenFunction::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.
Definition at line 3351 of file CGCall.cpp.
References clang::CodeGen::CodeGenTypes::getContext(), clang::CodeGen::CodeGenFunction::AbstractCallee::getDecl(), clang::ParmVarDecl::getFunctionScopeIndex(), getNonNullAttr(), clang::CodeGen::CodeGenFunction::AbstractCallee::getNumParams(), clang::CodeGen::CodeGenFunction::AbstractCallee::getParamDecl(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::RValue::isScalar(), and clang::NonNull.
void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke | ( | llvm::Value * | callee, |
ArrayRef< llvm::Value *> | args | ||
) |
Emits a call or invoke to the given noreturn runtime function.
Definition at line 3710 of file CGCall.cpp.
Referenced by emitCXXDestructor(), and getThrowFn().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall | ( | llvm::Value * | callee, |
const Twine & | name = "" |
||
) |
Referenced by CallBeginCatch(), emitARCCopyOperation(), EmitARCDestroyWeak(), EmitARCIntrinsicUse(), emitARCLoadOperation(), EmitARCRelease(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), EmitBuiltinAvailable(), clang::CodeGen::CGOpenMPRuntime::emitCall(), emitCheckHandlerCall(), EmitExtendGCLifetime(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitObjCAutoreleasePoolPush(), clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), getBadTypeidFn(), getCatchAllValue(), getClangCallTerminateFn(), getGetExceptionPtrFn(), getGuardAbortFn(), getThrowFn(), InitCatchParam(), and registerGlobalDtorWithAtExit().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall | ( | llvm::Value * | callee, |
ArrayRef< llvm::Value *> | args, | ||
const Twine & | name = "" |
||
) |
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 717 of file CGDecl.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), getContext(), clang::Type::getNullability(), clang::CodeGen::LValue::getType(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::NonNull, SanOpts, and TCK_NonnullAssign.
Referenced by EmitScalarInit(), and GetIntrinsic().
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.
Definition at line 1766 of file CodeGenFunction.cpp.
References Builder, CGM, clang::frontend::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemSet(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::Address::getAlignment(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), getContext(), clang::CodeGen::Address::getElementType(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getSize(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), getVLASize(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CharUnits::isOne(), clang::CharUnits::isZero(), and clang::CodeGen::CodeGenTypes::isZeroInitializable().
Referenced by emitReduceFiniFunction().
Definition at line 11469 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), and clang::Expr::getType().
Referenced by EmitTargetArchBuiltinExpr().
RValue CodeGenFunction::EmitNVPTXDevicePrintfCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 70 of file CGGPUBuiltin.cpp.
llvm::Value * CodeGenFunction::EmitObjCArrayLiteral | ( | const ObjCArrayLiteral * | E | ) |
Definition at line 239 of file CGObjC.cpp.
void CodeGenFunction::EmitObjCAtSynchronizedStmt | ( | const ObjCAtSynchronizedStmt & | S | ) |
Definition at line 1772 of file CGObjC.cpp.
void CodeGenFunction::EmitObjCAtThrowStmt | ( | const ObjCAtThrowStmt & | S | ) |
Definition at line 1768 of file CGObjC.cpp.
void CodeGenFunction::EmitObjCAtTryStmt | ( | const ObjCAtTryStmt & | S | ) |
Definition at line 1764 of file CGObjC.cpp.
void CodeGenFunction::EmitObjCAutoreleasePoolCleanup | ( | llvm::Value * | Ptr | ) |
Definition at line 2442 of file CGObjC.cpp.
References EHStack, clang::CodeGen::CodeGenModule::getLangOpts(), and clang::CodeGen::NormalCleanup.
Referenced by GenerateCXXGlobalInitFunc().
void CodeGenFunction::EmitObjCAutoreleasePoolPop | ( | llvm::Value * | value | ) |
Produce the code to do a primitive release.
call void @objc_autoreleasePoolPop(i8* ptr)
Definition at line 2342 of file CGObjC.cpp.
References Builder, createARCRuntimeFunction(), EmitRuntimeCallOrInvoke(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ObjCEntrypoints::objc_autoreleasePoolPop.
llvm::Value * CodeGenFunction::EmitObjCAutoreleasePoolPush | ( | ) |
Produce the code to do a objc_autoreleasepool_push.
call i8* @objc_autoreleasePoolPush(void)
Definition at line 2329 of file CGObjC.cpp.
References createARCRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ObjCEntrypoints::objc_autoreleasePoolPush.
Referenced by GenerateCXXGlobalInitFunc().
void CodeGenFunction::EmitObjCAutoreleasePoolStmt | ( | const ObjCAutoreleasePoolStmt & | S | ) |
Definition at line 3164 of file CGObjC.cpp.
References clang::ObjCAutoreleasePoolStmt::getSubStmt().
llvm::Value * CodeGenFunction::EmitObjCBoxedExpr | ( | const ObjCBoxedExpr * | E | ) |
EmitObjCBoxedExpr - This routine generates code to call the appropriate expression boxing method.
This will either be one of +[NSNumber numberWith<Type>:], or +[NSString stringWithUTF8String:], or [NSValue valueWithBytes:objCType:].
Definition at line 60 of file CGObjC.cpp.
llvm::Value * CodeGenFunction::EmitObjCCollectionLiteral | ( | const Expr * | E, |
const ObjCMethodDecl * | MethodWithObjects | ||
) |
Definition at line 113 of file CGObjC.cpp.
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 1791 of file CGObjC.cpp.
References getARCCleanupKind().
Referenced by emitARCCopyAssignWeak(), EmitARCExtendBlockObject(), emitARCMoveAssignWeak(), EmitLoadOfLValue(), EmitObjCThrowOperand(), and ShouldNullCheckClassCastValue().
llvm::Value * CodeGenFunction::EmitObjCDictionaryLiteral | ( | const ObjCDictionaryLiteral * | E | ) |
Definition at line 243 of file CGObjC.cpp.
LValue CodeGenFunction::EmitObjCEncodeExprLValue | ( | const ObjCEncodeExpr * | E | ) |
Definition at line 2624 of file CGExpr.cpp.
llvm::Value * CodeGenFunction::EmitObjCExtendObjectLifetime | ( | QualType | T, |
llvm::Value * | Ptr | ||
) |
Definition at line 1799 of file CGObjC.cpp.
References EmitARCRetainAutorelease().
Referenced by EmitStoreThroughLValue().
void CodeGenFunction::EmitObjCForCollectionStmt | ( | const ObjCForCollectionStmt & | S | ) |
Definition at line 1475 of file CGObjC.cpp.
LValue CodeGenFunction::EmitObjCIsaExpr | ( | const ObjCIsaExpr * | E | ) |
Definition at line 4002 of file CGExprScalar.cpp.
References clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::ObjCIsaExpr::getBase(), clang::Expr::getType(), clang::CodeGen::Address::invalid(), and clang::Expr::isRValue().
LValue CodeGenFunction::EmitObjCIvarRefLValue | ( | const ObjCIvarRefExpr * | E | ) |
Definition at line 4528 of file CGExpr.cpp.
RValue CodeGenFunction::EmitObjCMessageExpr | ( | const ObjCMessageExpr * | E, |
ReturnValueSlot | Return = ReturnValueSlot() |
||
) |
Definition at line 355 of file CGObjC.cpp.
LValue CodeGenFunction::EmitObjCMessageExprLValue | ( | const ObjCMessageExpr * | E | ) |
Definition at line 4495 of file CGExpr.cpp.
void CodeGenFunction::EmitObjCMRRAutoreleasePoolPop | ( | llvm::Value * | Arg | ) |
Produce the code to do a primitive release.
[tmp drain];
Definition at line 2389 of file CGObjC.cpp.
References clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::ARCPreciseLifetime, Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), destroyARCStrongImprecise, destroyARCStrongPrecise, destroyARCWeak, EmitARCDestroyStrong(), EmitARCDestroyWeak(), EmitARCIntrinsicUse(), emitARCIntrinsicUse, clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::SelectorTable::getSelector(), clang::ASTContext::Idents, clang::ASTContext::Selectors, and clang::CodeGen::CodeGenTypeCache::VoidTy.
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 2364 of file CGObjC.cpp.
References clang::CodeGen::CGObjCRuntime::EmitNSAutoreleasePoolClassRef(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::SelectorTable::getSelector(), clang::ASTContext::Idents, and clang::ASTContext::Selectors.
llvm::Value * CodeGenFunction::EmitObjCProtocolExpr | ( | const ObjCProtocolExpr * | E | ) |
Definition at line 257 of file CGObjC.cpp.
llvm::Value * CodeGenFunction::EmitObjCSelectorExpr | ( | const ObjCSelectorExpr * | E | ) |
Emit a selector.
Definition at line 249 of file CGObjC.cpp.
LValue CodeGenFunction::EmitObjCSelectorLValue | ( | const ObjCSelectorExpr * | E | ) |
Definition at line 4509 of file CGExpr.cpp.
llvm::Value * CodeGenFunction::EmitObjCStringLiteral | ( | const ObjCStringLiteral * | E | ) |
Emits an instance of NSConstantString representing the object.
Definition at line 46 of file CGObjC.cpp.
llvm::Value * CodeGenFunction::EmitObjCThrowOperand | ( | const Expr * | expr | ) |
Definition at line 3017 of file CGObjC.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), EmitARCExtendBlockObject(), EmitARCReclaimReturnedObject(), EmitARCRetainAutoreleaseScalarExpr(), EmitObjCConsumeObject(), EmitScalarExpr(), getLangOpts(), clang::Expr::getType(), and clang::CodeGen::Type.
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.
DestAddr | Address of the destination array. |
SrcAddr | Address of the source array. |
OriginalType | Type of destination and source arrays. |
CopyGen | Copying procedure that copies value of single array element to another single array element. |
Definition at line 628 of file CGStmtOpenMP.cpp.
References clang::Type::getAsArrayTypeUnsafe().
Referenced by emitPrivatesInit().
LValue CodeGenFunction::EmitOMPArraySectionExpr | ( | const OMPArraySectionExpr * | E, |
bool | IsLowerBound = true |
||
) |
Definition at line 3500 of file CGExpr.cpp.
Referenced by emitOMPArraySectionBase().
void CodeGenFunction::EmitOMPAtomicDirective | ( | const OMPAtomicDirective & | S | ) |
Definition at line 3911 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::clauses(), clang::OMPExecutableDirective::getInnermostCapturedStmt(), clang::OMPExecutableDirective::getSingleClause(), clang::Stmt::IgnoreContainers(), and clang::OMPC_unknown.
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.
X | Value to be updated. |
E | Update value. |
BO | Binary operation for update operation. |
IsXLHSInRHSPart | true if X is LHS in RHS part of the update expression, false otherwise. |
AO | Atomic ordering of the generated atomic instructions. |
CommonGen | Code generator for complex expressions that cannot be expressed through atomicrmw instruction. |
Definition at line 3680 of file CGStmtOpenMP.cpp.
Referenced by emitOMPAtomicCaptureExpr(), and emitOMPAtomicUpdateExpr().
void CodeGenFunction::EmitOMPBarrierDirective | ( | const OMPBarrierDirective & | S | ) |
Definition at line 3181 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getLocStart().
void CodeGenFunction::EmitOMPCancelDirective | ( | const OMPCancelDirective & | S | ) |
Definition at line 4418 of file CGStmtOpenMP.cpp.
References clang::OMPCancelDirective::getCancelRegion(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getLocStart(), and clang::OMPD_unknown.
void CodeGenFunction::EmitOMPCancellationPointDirective | ( | const OMPCancellationPointDirective & | S | ) |
Definition at line 4412 of file CGStmtOpenMP.cpp.
References clang::OMPCancellationPointDirective::getCancelRegion(), and clang::OMPExecutableDirective::getLocStart().
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.
OriginalType | Original type of the copied variables. |
DestAddr | Destination address. |
SrcAddr | Source address. |
DestVD | Destination variable used in CopyExpr (for arrays, has type of the base array element). |
SrcVD | Source variable used in CopyExpr (for arrays, has type of the base array element). |
Copy | Actual copygin expression for copying data from SrcVD to DestVD. |
Definition at line 689 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::Type::isArrayType(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
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:
D | OpenMP directive possibly with 'copyin' clause(s). |
Definition at line 856 of file CGStmtOpenMP.cpp.
References clang::VarDecl::getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::ValueDecl::getType(), clang::CodeGen::Address::invalid(), clang::VarDecl::isStaticLocal(), and clang::VK_LValue.
void CodeGenFunction::EmitOMPCriticalDirective | ( | const OMPCriticalDirective & | S | ) |
Definition at line 2694 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeDirective | ( | const OMPDistributeDirective & | S | ) |
Definition at line 3433 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeLoop | ( | const OMPLoopDirective & | S, |
const CodeGenLoopTy & | CodeGenLoop, | ||
Expr * | IncExpr | ||
) |
Emit code for the distribute loop-based directive.
Definition at line 3240 of file CGStmtOpenMP.cpp.
References emitAlignedClause(), EmitOMPHelperVar(), emitPreCond(), clang::CodeGen::LValue::getAddress(), clang::OMPLoopDirective::getCalcLastIteration(), clang::OMPLoopDirective::getCombinedCond(), clang::OMPLoopDirective::getCombinedEnsureUpperBound(), clang::OMPLoopDirective::getCombinedInit(), clang::OMPLoopDirective::getCombinedLowerBoundVariable(), clang::OMPLoopDirective::getCombinedUpperBoundVariable(), clang::OMPLoopDirective::getCond(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPLoopDirective::getEnsureUpperBound(), clang::OMPLoopDirective::getInit(), clang::OMPLoopDirective::getIsLastIterVariable(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getLastIteration(), clang::OMPExecutableDirective::getLocStart(), clang::OMPLoopDirective::getLowerBoundVariable(), clang::OMPLoopDirective::getPreCond(), clang::OMPExecutableDirective::getSingleClause(), clang::OMPLoopDirective::getStrideVariable(), clang::Expr::getType(), clang::OMPLoopDirective::getUpperBoundVariable(), clang::isOpenMPLoopBoundSharingDirective(), clang::isOpenMPParallelDirective(), clang::isOpenMPSimdDirective(), clang::isOpenMPTeamsDirective(), clang::OMPC_DIST_SCHEDULE_unknown, clang::OMPD_unknown, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups().
void CodeGenFunction::EmitOMPDistributeParallelForDirective | ( | const OMPDistributeParallelForDirective & | S | ) |
Definition at line 2156 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeParallelForSimdDirective | ( | const OMPDistributeParallelForSimdDirective & | S | ) |
Definition at line 2166 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeSimdDirective | ( | const OMPDistributeSimdDirective & | S | ) |
Definition at line 2176 of file CGStmtOpenMP.cpp.
bool CodeGenFunction::EmitOMPFirstprivateClause | ( | const OMPExecutableDirective & | D, |
OMPPrivateScope & | PrivateScope | ||
) |
Definition at line 726 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::VarDecl::getInit(), clang::getOpenMPCaptureRegions(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Type::isArrayType(), clang::Type::isReferenceType(), clang::OMPD_unknown, clang::CodeGen::Type, and clang::VK_LValue.
Referenced by emitTargetRegion().
void CodeGenFunction::EmitOMPFlushDirective | ( | const OMPFlushDirective & | S | ) |
Definition at line 3228 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getLocStart(), clang::OMPExecutableDirective::getSingleClause(), and clang::None.
void CodeGenFunction::EmitOMPForDirective | ( | const OMPForDirective & | S | ) |
Definition at line 2435 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPForSimdDirective | ( | const OMPForSimdDirective & | S | ) |
Definition at line 2455 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPInnerLoop | ( | const Stmt & | 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.
S | Directive, for which the inner loop must be emitted. |
RequiresCleanup | true, if directive has some associated private variables. |
LoopCond | Bollean condition for loop continuation. |
IncExpr | Increment expression for loop control variable. |
BodyGen | Generator for the inner body of the inner loop. |
PostIncGen | Genrator for post-increment code (required for ordered loop directvies). |
Definition at line 1325 of file CGStmtOpenMP.cpp.
References clang::SourceRange::getBegin(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::SourceRange::getEnd(), and clang::Stmt::getSourceRange().
Referenced by emitOMPSimdRegion().
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.
D | Directive that has at least one 'lastprivate' directives. |
IsLastIterCond | Boolean 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 985 of file CGStmtOpenMP.cpp.
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.
D | Directive that may have 'lastprivate' directives. |
PrivateScope | Private scope for capturing lastprivate variables for proper codegen in internal captured statement. |
Definition at line 925 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::isOpenMPSimdDirective(), clang::isOpenMPTaskLoopDirective(), and clang::VK_LValue.
Referenced by emitOMPSimdRegion().
void CodeGenFunction::EmitOMPLinearClause | ( | const OMPLoopDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope | ||
) |
Emit initial code for linear clauses.
Definition at line 1549 of file CGStmtOpenMP.cpp.
References getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPSimdDirective().
Referenced by emitOMPSimdRegion().
void CodeGenFunction::EmitOMPLinearClauseFinal | ( | const OMPLoopDirective & | D, |
const llvm::function_ref< llvm::Value *(CodeGenFunction &)> | CondGen | ||
) |
Emit final code for linear clauses.
CondGen | Optional conditional code for final part of codegen for linear clause. |
Definition at line 1411 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getClausesOfKind().
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.
D | Directive (possibly) with the 'linear' clause. |
Definition at line 1374 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::OMPExecutableDirective::getClausesOfKind(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::IgnoreImpCasts(), and clang::VK_LValue.
Referenced by emitOMPSimdRegion().
void CodeGenFunction::EmitOMPLoopBody | ( | const OMPLoopDirective & | D, |
JumpDest | LoopExit | ||
) |
Helper for the OpenMP loop directives.
Definition at line 1299 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::OMPLoopDirective::getBody(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::isOpenMPDistributeDirective(), and clang::OMPLoopDirective::updates().
Referenced by emitOMPLoopBodyWithStopPoint().
void CodeGenFunction::EmitOMPMasterDirective | ( | const OMPMasterDirective & | S | ) |
Definition at line 2685 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPOrderedDirective | ( | const OMPOrderedDirective & | S | ) |
void CodeGenFunction::EmitOMPParallelDirective | ( | const OMPParallelDirective & | S | ) |
Definition at line 1272 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelForDirective | ( | const OMPParallelForDirective & | S | ) |
Definition at line 2708 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelForSimdDirective | ( | const OMPParallelForSimdDirective & | S | ) |
Definition at line 2722 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelSectionsDirective | ( | const OMPParallelSectionsDirective & | S | ) |
Definition at line 2735 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPPrivateClause | ( | const OMPExecutableDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope | ||
) |
Definition at line 830 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), and clang::OMPExecutableDirective::getClausesOfKind().
Referenced by emitOMPSimdRegion(), and emitTargetRegion().
void CodeGenFunction::EmitOMPPrivateLoopCounters | ( | const OMPLoopDirective & | S, |
CodeGenFunction::OMPPrivateScope & | LoopScope | ||
) |
Emit initial code for loop counters of loop-based directives.
Definition at line 1482 of file CGStmtOpenMP.cpp.
Referenced by emitOMPSimdRegion(), and emitPreCond().
void CodeGenFunction::EmitOMPReductionClauseFinal | ( | const OMPExecutableDirective & | D, |
const OpenMPDirectiveKind | ReductionKind | ||
) |
Emit final update of reduction values to original variables at the end of the directive.
D | Directive that has at least one 'reduction' directives. |
ReductionKind | The kind of reduction to perform. |
Definition at line 1162 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getLocEnd(), clang::OMPExecutableDirective::getSingleClause(), clang::isOpenMPParallelDirective(), and Privates.
void CodeGenFunction::EmitOMPReductionClauseInit | ( | const OMPExecutableDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope | ||
) |
Emit initial code for reduction variables.
Creates reduction copies and initializes them with the values according to OpenMP standard.
D | Directive (possibly) with the 'reduction' clause. |
PrivateScope | Private scope for capturing reduction variables for proper codegen in internal captured statement. |
Definition at line 1058 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitAutoVarInit(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::CodeGen::ReductionCodeGen::getBaseDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::CodeGen::ReductionCodeGen::getSharedLValue(), and Privates.
Referenced by emitOMPSimdRegion().
void CodeGenFunction::EmitOMPSectionDirective | ( | const OMPSectionDirective & | S | ) |
Definition at line 2635 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPSectionsDirective | ( | const OMPSectionsDirective & | S | ) |
Definition at line 2623 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getLocStart(), clang::OMPExecutableDirective::getSingleClause(), and clang::OMPD_unknown.
Emits the lvalue for the expression with possibly captured variable.
Definition at line 217 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPSimdDirective | ( | const OMPSimdDirective & | S | ) |
Definition at line 1764 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPSimdFinal | ( | const OMPLoopDirective & | D, |
const llvm::function_ref< llvm::Value *(CodeGenFunction &)> | CondGen | ||
) |
Definition at line 1619 of file CGStmtOpenMP.cpp.
References clang::OMPLoopDirective::counters(), clang::OMPLoopDirective::finals(), and clang::OMPLoopDirective::private_counters().
void CodeGenFunction::EmitOMPSimdInit | ( | const OMPLoopDirective & | D, |
bool | IsMonotonic = false |
||
) |
Helpers for the OpenMP loop directives.
Definition at line 1611 of file CGStmtOpenMP.cpp.
References emitSimdlenSafelenClause().
Referenced by emitOMPSimdRegion().
void CodeGenFunction::emitOMPSimpleStore | ( | LValue | LVal, |
RValue | RVal, | ||
QualType | RValTy, | ||
SourceLocation | Loc | ||
) |
Definition at line 3530 of file CGStmtOpenMP.cpp.
References convertToComplexValue(), convertToScalarValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getType(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by emitOMPAtomicCaptureExpr(), and emitOMPAtomicReadExpr().
void CodeGenFunction::EmitOMPSingleDirective | ( | const OMPSingleDirective & | S | ) |
Definition at line 2644 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getClausesOfKind().
void CodeGenFunction::EmitOMPTargetDataDirective | ( | const OMPTargetDataDirective & | S | ) |
Definition at line 4510 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target directive.
Definition at line 4020 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetDirective | ( | const OMPTargetDirective & | S | ) |
Definition at line 4034 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetEnterDataDirective | ( | const OMPTargetEnterDataDirective & | S | ) |
Definition at line 4599 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getSingleClause().
void CodeGenFunction::EmitOMPTargetExitDataDirective | ( | const OMPTargetExitDataDirective & | S | ) |
Definition at line 4620 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getSingleClause().
|
static |
Definition at line 4664 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetParallelDirective | ( | const OMPTargetParallelDirective & | S | ) |
Definition at line 4678 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target parallel for directive.
Definition at line 4703 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetParallelForDirective | ( | const OMPTargetParallelForDirective & | S | ) |
Definition at line 4718 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target parallel for simd directive.
Definition at line 4742 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetParallelForSimdDirective | ( | const OMPTargetParallelForSimdDirective & | S | ) |
Definition at line 4757 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target simd directive.
Definition at line 2185 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetSimdDirective | ( | const OMPTargetSimdDirective & | S | ) |
Definition at line 2199 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTaskBasedDirective | ( | const OMPExecutableDirective & | S, |
const RegionCodeGenTy & | BodyGen, | ||
OMPTargetDataInfo & | InputInfo | ||
) |
Definition at line 3032 of file CGStmtOpenMP.cpp.
References clang::CapturedStmt::getCapturedRecordDecl(), and clang::OMPExecutableDirective::getCapturedStmt().
|
static |
Emit device code for the target teams directive.
Definition at line 4104 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDirective | ( | const OMPTargetTeamsDirective & | S | ) |
Definition at line 4118 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target teams distribute directive.
Definition at line 4150 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeDirective | ( | const OMPTargetTeamsDistributeDirective & | S | ) |
Definition at line 4164 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 4336 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective | ( | const OMPTargetTeamsDistributeParallelForDirective & | S | ) |
Definition at line 4352 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target teams distribute parallel for simd directive.
Definition at line 4388 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDirective | ( | const OMPTargetTeamsDistributeParallelForSimdDirective & | S | ) |
Definition at line 4404 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target teams distribute simd directive.
Definition at line 4196 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDirective | ( | const OMPTargetTeamsDistributeSimdDirective & | S | ) |
Definition at line 4210 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetUpdateDirective | ( | const OMPTargetUpdateDirective & | S | ) |
Definition at line 4925 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getSingleClause().
void CodeGenFunction::EmitOMPTaskBasedDirective | ( | const OMPExecutableDirective & | S, |
const OpenMPDirectiveKind | CapturedRegion, | ||
const RegionCodeGenTy & | BodyGen, | ||
const TaskGenTy & | TaskGen, | ||
OMPTaskDataTy & | Data | ||
) |
Definition at line 2747 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getCapturedStmt().
void CodeGenFunction::EmitOMPTaskDirective | ( | const OMPTaskDirective & | S | ) |
Definition at line 3146 of file CGStmtOpenMP.cpp.
References EmitStmt(), clang::CapturedStmt::getCapturedRecordDecl(), clang::OMPExecutableDirective::getCapturedStmt(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getSingleClause(), clang::OMPD_unknown, and clang::CodeGen::OMPTaskDataTy::Tied.
void CodeGenFunction::EmitOMPTaskgroupDirective | ( | const OMPTaskgroupDirective & | S | ) |
Definition at line 3189 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskLoopBasedDirective | ( | const OMPLoopDirective & | S | ) |
Definition at line 4774 of file CGStmtOpenMP.cpp.
References clang::CapturedStmt::getCapturedRecordDecl(), clang::OMPExecutableDirective::getCapturedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getSingleClause(), clang::isOpenMPTaskLoopDirective(), clang::CodeGen::OMPTaskDataTy::Nogroup, clang::OMPD_unknown, clang::CodeGen::OMPTaskDataTy::Schedule, and clang::CodeGen::OMPTaskDataTy::Tied.
void CodeGenFunction::EmitOMPTaskLoopDirective | ( | const OMPTaskLoopDirective & | S | ) |
Definition at line 4915 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskLoopSimdDirective | ( | const OMPTaskLoopSimdDirective & | S | ) |
Definition at line 4919 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskwaitDirective | ( | const OMPTaskwaitDirective & | S | ) |
Definition at line 3185 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getLocStart().
void CodeGenFunction::EmitOMPTaskyieldDirective | ( | const OMPTaskyieldDirective & | S | ) |
Definition at line 3176 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getLocStart().
void CodeGenFunction::EmitOMPTeamsDirective | ( | const OMPTeamsDirective & | S | ) |
Definition at line 4067 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeDirective | ( | const OMPTeamsDistributeDirective & | S | ) |
Definition at line 4218 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeParallelForDirective | ( | const OMPTeamsDistributeParallelForDirective & | S | ) |
Definition at line 4263 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeParallelForSimdDirective | ( | const OMPTeamsDistributeParallelForSimdDirective & | S | ) |
Definition at line 4286 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeSimdDirective | ( | const OMPTeamsDistributeSimdDirective & | S | ) |
Definition at line 4241 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPUseDevicePtrClause | ( | const OMPClause & | C, |
OMPPrivateScope & | PrivateScope, | ||
const llvm::DenseMap< const ValueDecl *, Address > & | CaptureDeviceAddrMap | ||
) |
Definition at line 4445 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), and clang::CodeGen::Type.
bool CodeGenFunction::EmitOMPWorksharingLoop | ( | const OMPLoopDirective & | S, |
Expr * | EUB, | ||
const CodeGenLoopBoundsTy & | CodeGenLoopBounds, | ||
const CodeGenDispatchBoundsTy & | CGDispatchBounds | ||
) |
Emit code for the worksharing loop-based directive.
Definition at line 2219 of file CGStmtOpenMP.cpp.
References emitAlignedClause(), EmitOMPHelperVar(), emitPreCond(), clang::CodeGen::LValue::getAddress(), clang::OMPLoopDirective::getCalcLastIteration(), clang::OMPLoopDirective::getCond(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPLoopDirective::getEnsureUpperBound(), clang::OMPLoopDirective::getInc(), clang::OMPLoopDirective::getInit(), clang::OMPLoopDirective::getIsLastIterVariable(), clang::OMPLoopDirective::getIterationVariable(), clang::OMPLoopDirective::getLastIteration(), clang::OMPExecutableDirective::getLocStart(), clang::OMPLoopDirective::getPreCond(), clang::OMPExecutableDirective::getSingleClause(), clang::OMPLoopDirective::getStrideVariable(), clang::Expr::getType(), clang::isOpenMPSimdDirective(), clang::OpenMPScheduleTy::M1, clang::OpenMPScheduleTy::M2, clang::OMPD_unknown, clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), and clang::OpenMPScheduleTy::Schedule.
LValue CodeGenFunction::EmitOpaqueValueLValue | ( | const OpaqueValueExpr * | e | ) |
Definition at line 4236 of file CGExpr.cpp.
References getOrCreateOpaqueLValueMapping(), and clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue().
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 2044 of file CGDecl.cpp.
References clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::ARCPreciseLifetime, BlockInfo, Builder, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), CreateMemTemp(), CurCodeDecl, CurFuncIsThunk, clang::Default, clang::QualType::DK_cxx_destructor, clang::QualType::DK_nontrivial_c_struct, EHStack, EmitARCInitWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitAutoVarWithLifetime(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EmitStoreOfScalar(), EmitVarAnnotations(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenFunction::ParamValue::getAnyValue(), getARCCleanupKind(), clang::Type::getAs(), clang::CodeGen::CodeGenTypeCache::getASTAllocaAddressSpace(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getDebugInfo(), getDeclAlign(), clang::CodeGen::CodeGenFunction::ParamValue::getDirectValue(), clang::CodeGen::CodeGenFunction::ParamValue::getIndirectAddress(), getLangOpts(), clang::ObjCMethodDecl::getMethodFamily(), clang::NamedDecl::getName(), clang::Type::getNullability(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::Address::getPointer(), clang::QualType::getQualifiers(), clang::ObjCMethodDecl::getSelfDecl(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::CodeGen::Address::getType(), clang::ValueDecl::getType(), hasAggregateEvaluationKind(), clang::Decl::hasAttr(), clang::Qualifiers::hasConst(), hasScalarEvaluationKind(), clang::CodeGen::Address::invalid(), clang::VarDecl::isARCPseudoStrong(), clang::QualType::isDestructedType(), clang::CodeGen::CodeGenFunction::ParamValue::isIndirect(), clang::CodeGen::Address::isValid(), clang::codegenoptions::LimitedDebugInfo, MakeAddrLValue(), clang::NonNull, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::OMF_init, clang::opencl_private, pushDestroy(), setBlockContextParameter(), clang::CodeGen::EHScopeStack::stable_begin(), and clang::CodeGen::Type.
LValue CodeGenFunction::EmitPointerToDataMemberBinaryExpr | ( | const BinaryOperator * | E | ) |
Definition at line 4744 of file CGExpr.cpp.
Address CodeGenFunction::EmitPointerWithAlignment | ( | const Expr * | E, |
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr |
||
) |
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.
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 992 of file CGExpr.cpp.
Referenced by EmitCheckedMixedSignMultiply(), emitOMPArraySectionBase(), EmitStoreThroughLValue(), emitWritebackArg(), and ShouldNullCheckClassCastValue().
Definition at line 10506 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), and clang::CallExpr::getNumArgs().
Referenced by EmitTargetArchBuiltinExpr().
LValue CodeGenFunction::EmitPredefinedLValue | ( | const PredefinedExpr * | E | ) |
Definition at line 2629 of file CGExpr.cpp.
LValue CodeGenFunction::EmitPseudoObjectLValue | ( | const PseudoObjectExpr * | e | ) |
Definition at line 4878 of file CGExpr.cpp.
RValue CodeGenFunction::EmitPseudoObjectRValue | ( | const PseudoObjectExpr * | e, |
AggValueSlot | slot = AggValueSlot::ignored() |
||
) |
Definition at line 4873 of file CGExpr.cpp.
Emits a reference binding to the passed in expression.
Definition at line 556 of file CGExpr.cpp.
Referenced by EmitCXXGlobalVarDeclInit(), and EmitExprAsInit().
llvm::DebugLoc CodeGenFunction::EmitReturnBlock | ( | ) |
Emit the unified return block, trying to avoid its emission when possible.
Definition at line 246 of file CodeGenFunction.cpp.
References Builder, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), and ReturnBlock.
Referenced by FinishFunction().
void CodeGenFunction::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.
Fun stuff :).
Definition at line 1021 of file CGStmt.cpp.
Referenced by generateObjCGetterBody().
void CodeGenFunction::EmitReturnValueCheck | ( | llvm::Value * | RV | ) |
Emit a test that checks if the return value RV
is nonnull.
Definition at line 2971 of file CGCall.cpp.
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitRuntimeCall | ( | llvm::Value * | callee, |
const Twine & | name = "" |
||
) |
Referenced by addMonoNonMonoModifier(), createRuntimeShuffleFunction(), clang::CodeGen::CGOpenMPRuntime::emitCall(), emitFilterDispatchBlock(), emitForStaticInitCall(), emitReduceFiniFunction(), emitRTtypeidCall(), clang::CodeGen::emitThreadPrivateVarInit(), GenerateCXXGlobalInitFunc(), getBundlesForFunclet(), getCancellationKind(), clang::CodeGen::getCriticalRegionLock(), getNVPTXBarrier(), getNVPTXCTABarrier(), getNVPTXNumThreads(), getNVPTXThreadID(), getNVPTXWarpSize(), clang::CodeGen::getOrCreateThreadPrivateCache(), clang::CodeGen::markAsGlobalTarget(), and supportsSPMDExecutionMode().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitRuntimeCall | ( | llvm::Value * | callee, |
ArrayRef< llvm::Value *> | args, | ||
const Twine & | name = "" |
||
) |
llvm::CallSite CodeGenFunction::EmitRuntimeCallOrInvoke | ( | llvm::Value * | callee, |
ArrayRef< llvm::Value *> | args, | ||
const Twine & | name = "" |
||
) |
Emits a call or invoke instruction to the given runtime function.
Definition at line 3741 of file CGCall.cpp.
Referenced by EmitObjCAutoreleasePoolPop(), emitRTtypeidCall(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), getBadTypeidFn(), and getGetExceptionPtrFn().
llvm::CallSite CodeGenFunction::EmitRuntimeCallOrInvoke | ( | llvm::Value * | callee, |
const Twine & | name = "" |
||
) |
Emits a call or invoke instruction to the given nullary runtime function.
Definition at line 3734 of file CGCall.cpp.
RValue CodeGenFunction::EmitRValueForField | ( | LValue | LV, |
const FieldDecl * | FD, | ||
SourceLocation | Loc | ||
) |
Definition at line 4269 of file CGExpr.cpp.
References clang::CodeGen::LValue::asAggregateRValue(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLValueForField(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), clang::CodeGen::LValue::getPointer(), clang::ValueDecl::getType(), clang::Type::isReferenceType(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
void CodeGenFunction::EmitSanitizerStatReport | ( | llvm::SanitizerStatKind | SSK | ) |
Definition at line 2353 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getSanStats(), and clang::CodeGen::CodeGenFunction::TargetMultiVersionResolverOption::ParsedAttribute.
LValue CodeGenFunction::EmitScalarCompoundAssignWithComplex | ( | const CompoundAssignOperator * | E, |
llvm::Value *& | Result | ||
) |
Definition at line 1147 of file CGExprComplex.cpp.
References getComplexOp(), and clang::BinaryOperator::getOpcode().
Referenced by EmitComplexCompoundAssignmentLValue().
Value * CodeGenFunction::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.
Definition at line 3975 of file CGExprScalar.cpp.
Referenced by convertToComplexValue(), convertToScalarValue(), and emitForStaticInitCall().
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 3965 of file CGExprScalar.cpp.
References clang::Expr::getType().
Referenced by AddVariableConstraints(), emitAlignedClause(), EmitARCExtendBlockObject(), emitARCRetainCallResult(), EmitARCStoreUnsafeUnretained(), emitARCUnsafeClaimCallResult(), EmitBitTestIntrinsic(), EmitCheckedMixedSignMultiply(), emitCommonOMPParallelDirective(), EmitCXXNewAllocSize(), EmitDeclInit(), emitNumTeamsForTargetDirective(), emitNumThreadsForTargetDirective(), EmitObjCThrowOperand(), EmitScalarInit(), EmitVariablyModifiedType(), clang::CodeGen::getCriticalRegionLock(), GetIntrinsic(), isCheapEnoughToEvaluateUnconditionally(), clang::CodeGen::markAsGlobalTarget(), and tryEmitARCRetainLoadOfScalar().
void CodeGenFunction::EmitScalarInit | ( | const Expr * | init, |
const ValueDecl * | D, | ||
LValue | lvalue, | ||
bool | capturedByInit | ||
) |
Definition at line 738 of file CGDecl.cpp.
References clang::CodeGen::ARCImpreciseLifetime, CGM, drillIntoBlockVariable(), EmitARCInitWeak(), EmitARCRelease(), EmitARCRetainAutoreleaseScalarExpr(), EmitARCRetainScalarExpr(), EmitARCStoreWeak(), EmitARCUnsafeUnretainedScalarExpr(), emitBlockByrefAddress(), EmitLoadOfScalar(), EmitNullabilityCheck(), EmitScalarExpr(), EmitStoreOfScalar(), EmitStoreThroughLValue(), enterFullExpression(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getElementType(), clang::Expr::getExprLoc(), clang::CodeGen::CodeGenModule::getNullPointer(), clang::CodeGen::LValue::getObjCLifetime(), clang::CodeGen::LValue::getType(), isAccessedBy(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::CodeGen::LValue::setAddress(), and tryEmitARCCopyWeakInit().
Referenced by EmitDeclInit(), EmitExprAsInit(), and StoreAnyExprIntoOneUnit().
llvm::Value * CodeGenFunction::EmitScalarPrePostIncDec | ( | const UnaryOperator * | E, |
LValue | LV, | ||
bool | isInc, | ||
bool | isPre | ||
) |
Definition at line 3997 of file CGExprScalar.cpp.
Referenced by EmitComplexToScalarConversion().
bool CodeGenFunction::EmitScalarRangeCheck | ( | llvm::Value * | Value, |
QualType | Ty, | ||
SourceLocation | Loc | ||
) |
Check if the scalar Value
is within the valid range for the given type Ty
.
Returns true if a check is needed (even if the range is unknown).
Definition at line 1524 of file CGExpr.cpp.
References Builder, CGM, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCheckValue(), End, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), getLLVMContext(), getRangeForType(), clang::SanitizerSet::has(), hasBooleanRepresentation(), and SanOpts.
Referenced by EmitLoadOfBitfieldLValue(), and EmitLoadOfScalar().
llvm::Value * CodeGenFunction::EmitSEHAbnormalTermination | ( | ) |
Definition at line 1968 of file CGException.cpp.
llvm::Value * CodeGenFunction::EmitSEHExceptionCode | ( | ) |
Definition at line 1963 of file CGException.cpp.
void CodeGenFunction::EmitSEHExceptionCodeSave | ( | CodeGenFunction & | ParentCGF, |
llvm::Value * | ParentFP, | ||
llvm::Value * | EntryEBP | ||
) |
Definition at line 1915 of file CGException.cpp.
References clang::CodeGen::CodeGenModule::getContext(), and clang::CodeGen::CodeGenTypeCache::IntTy.
llvm::Value * CodeGenFunction::EmitSEHExceptionInfo | ( | ) |
Definition at line 1954 of file CGException.cpp.
References clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
void CodeGenFunction::EmitSEHLeaveStmt | ( | const SEHLeaveStmt & | S | ) |
Definition at line 2086 of file CGException.cpp.
void CodeGenFunction::EmitSEHTryStmt | ( | const SEHTryStmt & | S | ) |
Definition at line 1595 of file CGException.cpp.
RValue CodeGenFunction::EmitSimpleCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Emit a CallExpr without considering whether it might be a subclass.
Definition at line 4325 of file CGExpr.cpp.
void CodeGenFunction::EmitSimpleOMPExecutableDirective | ( | const OMPExecutableDirective & | D | ) |
Emit simple code for OpenMP directives in Simd-only mode.
Definition at line 4946 of file CGStmtOpenMP.cpp.
References emitOMPSimdRegion(), EmitVarDecl(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::hasAssociatedStmt(), and clang::isOpenMPSimdDirective().
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.
Definition at line 349 of file CGStmt.cpp.
void CodeGenFunction::EmitStartEHSpec | ( | const Decl * | D | ) |
EmitStartEHSpec - Emit the start of the exception spec.
Definition at line 443 of file CGException.cpp.
References clang::FunctionProtoType::canThrow(), clang::CT_Cannot, clang::EST_Dynamic, clang::EST_DynamicNone, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getNumExceptions(), clang::CodeGen::CodeGenModule::getTarget(), clang::ValueDecl::getType(), and clang::isNoexceptExceptionSpec().
Referenced by StartFunction().
void CodeGenFunction::EmitStaticVarDecl | ( | const VarDecl & | D, |
llvm::GlobalValue::LinkageTypes | Linkage | ||
) |
Definition at line 376 of file CGDecl.cpp.
References clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenModule::addUsedGlobal(), Builder, CGM, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateFlagLoad(), destroyNonTrivialCStruct, clang::Dtor_Complete, EmitBlock(), EmitCXXDestructorCall(), emitDestroy(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), EmitVariablyModifiedType(), clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Type::isVariablyModifiedType(), clang::codegenoptions::LimitedDebugInfo, clang::CodeGen::SanitizerMetadata::reportGlobalToASan(), clang::CodeGen::CGDebugInfo::setLocation(), clang::CodeGen::CodeGenModule::setStaticLocalDeclAddress(), clang::CodeGen::Type, and clang::ast_matchers::type.
Referenced by EmitAutoVarAlloca(), EmitVarDecl(), and clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl().
EmitStmt - Emit the code for the statement.
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 48 of file CGStmt.cpp.
Referenced by clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), emitCommonOMPTargetDirective(), EmitOMPTaskDirective(), emitTargetRegion(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), and getBundlesForCoroEnd().
Definition at line 4552 of file CGExpr.cpp.
void CodeGenFunction::EmitStopPoint | ( | const Stmt * | S | ) |
EmitStopPoint - Emit a debug stoppoint if we are emitting debug info.
Definition at line 38 of file CGStmt.cpp.
Referenced by emitOMPLoopBodyWithStopPoint().
void CodeGenFunction::EmitStoreOfComplex | ( | ComplexPairTy | V, |
LValue | dest, | ||
bool | isInit | ||
) |
EmitStoreOfComplex - Store a complex number into the specified l-value.
Definition at line 1108 of file CGExprComplex.cpp.
Referenced by clang::CodeGen::CallArg::copyInto(), EmitAtomicLoad(), EmitAtomicUpdateValue(), EmitExprAsInit(), generateObjCGetterBody(), and InitCatchParam().
|
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 3401 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getTBAAAccessInfo().
Referenced by castValueToType(), clang::CodeGen::CallArg::copyInto(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitARCStoreUnsafeUnretained(), EmitAtomicLoad(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), EmitCXXGlobalVarDeclInit(), emitInterWarpCopyFunction(), EmitParmDecl(), emitReduceFiniFunction(), emitReductionListCopy(), EmitScalarInit(), EmitStoreOfScalar(), EmitStoreThroughLValue(), emitTaskDupFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), emitWriteback(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), InitCatchParam(), shuffleAndStore(), and tryEmitARCRetainLoadOfScalar().
void CodeGenFunction::EmitStoreOfScalar | ( | llvm::Value * | Value, |
Address | Addr, | ||
bool | Volatile, | ||
QualType | Ty, | ||
LValueBaseInfo | BaseInfo, | ||
TBAAAccessInfo | TBAAInfo, | ||
bool | isInit = false , |
||
bool | isNontemporal = false |
||
) |
Definition at line 1653 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), EmitAtomicStore(), EmitToMemory(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getModule(), clang::Type::isAtomicType(), clang::Type::isVectorType(), LValueIsSuitableForInlineAtomic(), clang::CodeGen::LValue::MakeAddr(), Node, and clang::CodeGen::Type.
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 1701 of file CGExpr.cpp.
References EmitStoreOfScalar(), 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().
void CodeGenFunction::EmitStoreThroughBitfieldLValue | ( | RValue | Src, |
LValue | Dst, | ||
llvm::Value ** | Result = nullptr |
||
) |
EmitStoreThroughBitfieldLValue - Store Src into Dst with same constraints as EmitStoreThroughLValue.
Result | [out] - If non-null, this will be set to a Value* for the bit-field contents after the store, appropriate for use as the result of an assignment to the bit-field. |
Definition at line 1962 of file CGExpr.cpp.
References Builder, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitFromMemory(), clang::CodeGen::LValue::getBitFieldAddress(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), hasBooleanRepresentation(), clang::CodeGen::CGBitFieldInfo::IsSigned, clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CGBitFieldInfo::Offset, clang::CodeGen::CGBitFieldInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageSize, and clang::CodeGen::Type.
Referenced by EmitStoreThroughLValue(), and GetIntrinsic().
Definition at line 2029 of file CGExpr.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), getAccessedFieldNo(), clang::Type::getAs(), clang::CodeGen::LValue::getExtVectorAddress(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::LValue::isVolatileQualified(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitStoreThroughLValue().
Store of global named registers are always calls to intrinsics.
Definition at line 2100 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::getDataLayout(), clang::CodeGen::LValue::getGlobalReg(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Type::isIntegerType(), clang::Type::isPointerType(), and clang::CodeGen::Type.
Referenced by emitSimpleAtomicStore(), and EmitStoreThroughLValue().
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 1865 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitARCInitWeak(), EmitARCRetain(), EmitARCStoreStrong(), EmitARCStoreWeak(), EmitObjCExtendObjectLifetime(), clang::CodeGen::CGObjCRuntime::EmitObjCGlobalAssign(), clang::CodeGen::CGObjCRuntime::EmitObjCIvarAssign(), clang::CodeGen::CGObjCRuntime::EmitObjCStrongCastAssign(), clang::CodeGen::CGObjCRuntime::EmitObjCWeakAssign(), EmitPointerWithAlignment(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughGlobalRegLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseIvarExp(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::Address::getPointer(), 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::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, clang::Qualifiers::OCL_Weak, and clang::CodeGen::Type.
Referenced by EmitAtomicUpdateValue(), EmitAutoVarInit(), EmitExprAsInit(), emitProxyTaskFunction(), EmitScalarInit(), emitWriteback(), and GetIntrinsic().
LValue CodeGenFunction::EmitStringLiteralLValue | ( | const StringLiteral * | E | ) |
Definition at line 2619 of file CGExpr.cpp.
void CodeGenFunction::EmitSwitchStmt | ( | const SwitchStmt & | S | ) |
Definition at line 1554 of file CGStmt.cpp.
Definition at line 643 of file CGExprCXX.cpp.
void CodeGenFunction::EmitSynthesizedCXXCopyCtorCall | ( | const CXXConstructorDecl * | D, |
Address | This, | ||
Address | Src, | ||
const CXXConstructExpr * | E | ||
) |
Definition at line 2266 of file CGClass.cpp.
Definition at line 11148 of file CGBuiltin.cpp.
References clang::CallExpr::getArg().
Referenced by EmitTargetArchBuiltinExpr().
EmitTargetBuiltinExpr - Emit the given builtin call.
Returns 0 if the call is unhandled by the current target.
Definition at line 3777 of file CGBuiltin.cpp.
References BuiltinInfo, and EmitTargetArchBuiltinExpr().
void CodeGenFunction::EmitTargetMultiVersionResolver | ( | llvm::Function * | Resolver, |
ArrayRef< TargetMultiVersionResolverOption > | Options | ||
) |
Definition at line 2381 of file CodeGenFunction.cpp.
llvm::Value * CodeGenFunction::EmitToMemory | ( | llvm::Value * | Value, |
QualType | Ty | ||
) |
EmitToMemory - Change a scalar value from its value representation to its in-memory representation.
Definition at line 1628 of file CGExpr.cpp.
References Builder, ConvertTypeForMem(), getContext(), getTypeSize(), and hasBooleanRepresentation().
Referenced by EmitAtomicLoad(), EmitCheckedMixedSignMultiply(), EmitStoreOfScalar(), and EmitToInt().
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 3173 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), and clang::CodeGenOptions::TrapFuncName.
Referenced by EmitTrapCheck(), and GenerateCode().
void CodeGenFunction::EmitTrapCheck | ( | llvm::Value * | Checked | ) |
Create a basic block that will call the trap intrinsic, and emit a conditional branch to it, for the -ftrapv checks.
Definition at line 3153 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), EmitBlock(), EmitTrapCall(), and clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by EmitCfiCheckFail(), and EmitCheck().
void CodeGenFunction::EmitTypeCheck | ( | TypeCheckKind | TCK, |
SourceLocation | Loc, | ||
llvm::Value * | V, | ||
QualType | Type, | ||
CharUnits | Alignment = CharUnits::Zero() , |
||
SanitizerSet | SkippedChecks = SanitizerSet() |
||
) |
Emit a check that V
is the address of storage of the appropriate size and alignment for an object of type Type
.
Definition at line 616 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), EmitBlock(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), emitHash16Bytes(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CharUnits::getQuantity(), clang::ASTContext::getSanitizerBlacklist(), clang::ASTContext::getTypeAlignInChars(), clang::ASTContext::getTypeSizeInChars(), clang::QualType::getUnqualifiedType(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::SanitizerBlacklist::isBlacklistedType(), clang::Type::isIncompleteType(), isNullPointerAllowed(), clang::QualType::isVolatileQualified(), isVptrCheckRequired(), clang::MangleContext::mangleCXXRTTI(), sanitizePerformTypeCheck(), SanOpts, and clang::CodeGen::Type.
Referenced by EmitObjectDelete(), ShouldNullCheckClassCastValue(), and StartFunction().
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 2599 of file CGClass.cpp.
References CFITCK_VCall, and clang::TypeDecl::getTypeForDecl().
LValue CodeGenFunction::EmitUnaryOpLValue | ( | const UnaryOperator * | E | ) |
Definition at line 2552 of file CGExpr.cpp.
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 3142 of file CGExpr.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), clang::SanitizerSet::has(), and SanOpts.
EmitUnsupportedLValue - Emit a dummy l-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
Definition at line 1132 of file CGExpr.cpp.
Referenced by EmitConditionalOperatorLValue().
EmitUnsupportedRValue - Emit a dummy r-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
Definition at line 1126 of file CGExpr.cpp.
Generate code to get an argument from the passed in pointer and update it accordingly.
VE | The VAArgExpr for which to generate code. |
VAListAddr | Receives a reference to the va_list as emitted by either EmitVAListRef or EmitMSVAListRef . |
Definition at line 4514 of file CGCall.cpp.
References clang::VAArgExpr::getSubExpr(), clang::Expr::getType(), and clang::VAArgExpr::isMicrosoftABI().
Referenced by isBlockVarRef(), and isCheapEnoughToEvaluateUnconditionally().
Definition at line 4451 of file CGExpr.cpp.
Definition at line 2147 of file CodeGenFunction.cpp.
void CodeGenFunction::EmitVarAnnotations | ( | const VarDecl * | D, |
llvm::Value * | V | ||
) |
Emit local annotations for the local variable V, declared by D.
Definition at line 2205 of file CodeGenFunction.cpp.
References clang::Decl::hasAttr().
Referenced by EmitParmDecl().
void CodeGenFunction::EmitVarDecl | ( | const VarDecl & | D | ) |
EmitVarDecl - Emit a local variable declaration.
EmitVarDecl - This method handles emission of any variable declaration inside a function, including static vars etc.
This function can be called with a null (unreachable) insert point.
Definition at line 156 of file CGDecl.cpp.
References CGM, EmitAutoVarDecl(), EmitStaticVarDecl(), clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl(), clang::QualType::getAddressSpace(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::VarDecl::getStorageDuration(), clang::ValueDecl::getType(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), clang::Type::isSamplerT(), clang::opencl_local, and clang::SD_Automatic.
Referenced by EmitDecl(), EmitOMPHelperVar(), emitOMPSimdRegion(), and EmitSimpleOMPExecutableDirective().
void CodeGenFunction::EmitVariablyModifiedType | ( | QualType | Ty | ) |
EmitVLASize - Capture all the sizes for the VLA expressions in the given variably-modified type and store them in the VLASizeMap.
This function can be called with a null (unreachable) insert point.
Definition at line 2002 of file CodeGenFunction.cpp.
References clang::Auto, Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitIgnoredExpr(), EmitScalarExpr(), EnsureInsertPoint(), getContext(), clang::ArrayType::getElementType(), clang::QualType::getSingleStepDesugaredType(), clang::VariableArrayType::getSizeExpr(), clang::QualType::getTypePtr(), clang::SanitizerSet::has(), clang::Type::isVariablyModifiedType(), Paren, SanOpts, and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitAutoVarAlloca(), EmitDecl(), EmitStaticVarDecl(), isCheapEnoughToEvaluateUnconditionally(), and StartFunction().
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
.
ArgValue | A reference to the va_list as emitted by either EmitVAListRef or EmitMSVAListRef . |
IsStart | If true , emits a call to llvm.va_start ; otherwise, calls llvm.va_end . |
Definition at line 402 of file CGBuiltin.cpp.
References clang::CodeGen::Type.
Emit assumption that vptr load == global vtable.
Definition at line 2237 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CodeGenFunction::VPtr::Base, clang::BaseSubobject::getBaseOffset(), clang::CodeGen::Address::getType(), clang::CharUnits::isZero(), clang::CodeGen::CodeGenFunction::VPtr::NearestVBase, and clang::CodeGen::CodeGenFunction::VPtr::VTableClass.
void CodeGenFunction::EmitVTableAssumptionLoads | ( | const CXXRecordDecl * | ClassDecl, |
Address | This | ||
) |
Emit assumption load for all bases.
Requires to be be called only on most-derived class and not under construction of the object.
Definition at line 2258 of file CGClass.cpp.
void CodeGenFunction::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.
Definition at line 2675 of file CGClass.cpp.
References clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::NamedDecl::getQualifiedNameAsString(), and clang::TypeDecl::getTypeForDecl().
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 2619 of file CGClass.cpp.
References LeastDerivedClassWithSameLayout().
void CodeGenFunction::EmitVTablePtrCheckForCast | ( | QualType | T, |
llvm::Value * | 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 2629 of file CGClass.cpp.
References clang::frontend::CPlusPlus, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), and LeastDerivedClassWithSameLayout().
Referenced by ShouldNullCheckClassCastValue().
llvm::Value * CodeGenFunction::EmitVTableTypeCheckedLoad | ( | const CXXRecordDecl * | RD, |
llvm::Value * | VTable, | ||
uint64_t | VTableByteOffset | ||
) |
Emit a type checked load from the given vtable.
Definition at line 2761 of file CGClass.cpp.
References clang::TypeDecl::getTypeForDecl().
Definition at line 12052 of file CGBuiltin.cpp.
References clang::Expr::getType(), and clang::CodeGen::Type.
Referenced by EmitTargetArchBuiltinExpr().
Definition at line 679 of file CGStmt.cpp.
Definition at line 8967 of file CGBuiltin.cpp.
References clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), and clang::Expr::isIntegerConstantExpr().
Referenced by EmitTargetArchBuiltinExpr().
|
inline |
Definition at line 1600 of file CodeGenFunction.h.
llvm::Constant * CodeGenFunction::EncodeAddrForUseInPrologue | ( | llvm::Function * | F, |
llvm::Constant * | Addr | ||
) |
Encode an address into a form suitable for use in a function prologue.
Definition at line 474 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CodeGenTypeCache::IntPtrTy.
Referenced by StartFunction().
|
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 2074 of file CodeGenFunction.h.
Referenced by EmitAutoVarAlloca(), EmitAutoVarInit(), EmitVariablyModifiedType(), GetIntrinsic(), and clang::CodeGen::CodeGenFunction::StmtExprEvaluation::~StmtExprEvaluation().
void CodeGenFunction::enterByrefCleanup | ( | CleanupKind | Kind, |
Address | Addr, | ||
BlockFieldFlags | Flags, | ||
bool | LoadBlockVarAddr | ||
) |
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.
Kind | Cleanup kind. |
Addr | When 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. |
Flags | The flag that will be passed to _Block_object_dispose. |
LoadBlockVarAddr | Indicates whether we need to emit a load from Addr to get the address of the __block structure. |
Definition at line 2603 of file CGBlocks.cpp.
Referenced by EmitAutoVarCleanups(), and pushCaptureCleanup().
void CodeGenFunction::EnterCXXTryStmt | ( | const CXXTryStmt & | S, |
bool | IsFnTryBlock = false |
||
) |
Definition at line 557 of file CGException.cpp.
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 1751 of file CGClass.cpp.
References clang::CXXRecordDecl::bases(), clang::Dtor_Base, clang::Dtor_Complete, clang::Dtor_Deleting, clang::CodeGen::EHCleanup, clang::RecordDecl::fields(), clang::Type::getAsUnionType(), clang::CodeGen::CodeGenModule::getContext(), clang::RecordType::getDecl(), clang::CXXRecordDecl::getNumVBases(), clang::CXXDestructorDecl::getOperatorDelete(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::FunctionDecl::isDestroyingOperatorDelete(), clang::QualType::isDestructedType(), clang::CXXRecordDecl::isPolymorphic(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CodeGen::NormalAndEHCleanup, and clang::CXXRecordDecl::vbases().
|
inline |
Definition at line 3925 of file CodeGenFunction.h.
References clang::ExprWithCleanups::getNumObjects().
Referenced by EmitARCRetainAutoreleaseScalarExpr(), EmitARCRetainScalarExpr(), EmitARCUnsafeUnretainedScalarExpr(), EmitScalarInit(), and ShouldNullCheckClassCastValue().
void CodeGenFunction::enterNonTrivialFullExpression | ( | const ExprWithCleanups * | E | ) |
Enter a full-expression with a non-trivial number of objects to clean up.
This is in this file because, at the moment, the only kind of cleanup object is a BlockDecl*.
Definition at line 702 of file CGBlocks.cpp.
void CodeGenFunction::EnterSEHTryStmt | ( | const SEHTryStmt & | S | ) |
Definition at line 1980 of file CGException.cpp.
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 1710 of file CodeGenFunction.cpp.
Referenced by getAsInt32(), isBlockVarRef(), and isCheapEnoughToEvaluateUnconditionally().
llvm::Value * CodeGenFunction::EvaluateExprAsBool | ( | const Expr * | E | ) |
EvaluateExprAsBool - Perform the usual unary conversions on the specified expression and compare the result against zero, returning an Int1Ty value.
Definition at line 164 of file CGExpr.cpp.
Referenced by EmitBranchOnBoolExpr(), GetIntrinsic(), and isCheapEnoughToEvaluateUnconditionally().
void CodeGenFunction::ExitCXXTryStmt | ( | const CXXTryStmt & | S, |
bool | IsFnTryBlock = false |
||
) |
Definition at line 1133 of file CGException.cpp.
void CodeGenFunction::ExitSEHTryStmt | ( | const SEHTryStmt & | S | ) |
Definition at line 2020 of file CGException.cpp.
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 297 of file CodeGenFunction.cpp.
References AllocaInsertPt, Builder, CGM, clang::CodeGen::EHScopeStack::containsOnlyLifetimeMarkers(), CurCodeDecl, CurFn, CurFnInfo, EHResumeBlock, EHStack, EmitBlock(), EmitEndEHSpec(), EmitFunctionEpilog(), EmitIfUsed(), EmitReturnBlock(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), clang::CodeGen::CodeGenModule::getModule(), PopCleanupBlocks(), PrologueCleanupDepth, ReturnBlock, ShouldInstrumentFunction(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by createAtExitStub(), EmitCfiCheckFail(), emitCopyToScratchpad(), emitCXXDestructor(), emitDestructorsFunction(), emitInterWarpCopyFunction(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitShuffleAndReduceFunction(), emitTaskDupFunction(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), and GenerateObjCSetter().
void CodeGenFunction::FinishThunk | ( | ) |
Definition at line 273 of file CGVTables.cpp.
llvm::Function * CodeGenFunction::GenerateBlockFunction | ( | GlobalDecl | GD, |
const CGBlockInfo & | Info, | ||
const DeclMapTy & | ldm, | ||
bool | IsLambdaConversionToBlock, | ||
bool | BuildGlobalBlock | ||
) |
Definition at line 1332 of file CGBlocks.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBlockFunctionDeclaration(), clang::ast_matchers::blockDecl, buildGlobalBlock(), clang::Create(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::IdentifierTable::get(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::CodeGen::CodeGenModule::getBlockMangledName(), clang::BlockExpr::getBody(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::BlockExpr::getFunctionType(), clang::CodeGen::CGOpenCLRuntime::getGenericVoidPointerType(), clang::Decl::getLocation(), clang::BlockExpr::getLocEnd(), clang::Stmt::getLocStart(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::FunctionType::getReturnType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::Idents, clang::InternalLinkage, clang::ImplicitParamDecl::ObjCSelf, clang::opencl_generic, clang::BlockDecl::param_begin(), clang::BlockDecl::param_end(), clang::CodeGen::CodeGenModule::ReturnSlotInterferesWithArgs(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CGBlockInfo::UsesStret.
Referenced by clang::CodeGen::CodeGenModule::GetAddrOfGlobalBlock().
llvm::Function * CodeGenFunction::generateBuiltinOSLogHelperFunction | ( | const analyze_os_log::OSLogBufferLayout & | Layout, |
CharUnits | BufferAlignment | ||
) |
Definition at line 906 of file CGBuiltin.cpp.
Address CodeGenFunction::GenerateCapturedStmtArgument | ( | const CapturedStmt & | S | ) |
Definition at line 2263 of file CGStmt.cpp.
llvm::Function * CodeGenFunction::GenerateCapturedStmtFunction | ( | const CapturedStmt & | S | ) |
Creates the outlined function for a CapturedStmt.
Definition at line 2270 of file CGStmt.cpp.
void CodeGenFunction::GenerateCode | ( | GlobalDecl | GD, |
llvm::Function * | Fn, | ||
const CGFunctionInfo & | FnInfo | ||
) |
Definition at line 1289 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenPGO::assignRegionCounters(), Builder, BuildFunctionArgList(), Bypasses, CGM, clang::frontend::CPlusPlus, CurFn, CurGD, EmitCheck(), EmitCheckSourceLocation(), EmitConstructorBody(), EmitDestructorBody(), clang::CodeGen::CGCUDARuntime::emitDeviceStub(), EmitFunctionBody(), emitImplicitAssignmentOperatorBody(), EmitLambdaStaticInvokeBody(), EmitTrapCall(), FinishFunction(), clang::SourceRange::getBegin(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCUDARuntime(), clang::GlobalDecl::getDecl(), clang::SourceRange::getEnd(), getLangOpts(), clang::Decl::getLocation(), clang::FunctionDecl::getReturnType(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), clang::FunctionDecl::hasImplicitReturnZero(), clang::CodeGen::VarBypassDetector::Init(), clang::FunctionDecl::isDefaulted(), clang::Type::isVoidType(), SanOpts, SawAsmBlock, shouldUseUndefinedBehaviorReturnOptimization(), StartFunction(), and TryMarkNoThrow().
Referenced by clang::CodeGen::CodeGenModule::codegenCXXStructor(), and clang::CodeGen::CodeGenModule::HandleCXXStaticMemberVarInstantiation().
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 1679 of file CGBlocks.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::FunctionDecl::Create(), clang::Create(), clang::IdentifierTable::get(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::BlockExpr::getLocStart(), clang::CodeGen::CodeGenModule::getModule(), clang::ASTContext::getTranslationUnitDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::Idents, clang::InternalLinkage, clang::ImplicitParamDecl::Other, clang::SC_Static, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CGBlockInfo::StructureType, clang::CodeGen::Type, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by buildCopyHelper().
void CodeGenFunction::GenerateCXXGlobalDtorsFunc | ( | llvm::Function * | Fn, |
const std::vector< std::pair< llvm::WeakTrackingVH, llvm::Constant *>> & | DtorsAndObjects | ||
) |
GenerateCXXGlobalDtorsFunc - Generates code for destroying global variables.
Definition at line 640 of file CGDeclCXX.cpp.
References Builder, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), FinishFunction(), getContext(), getTypes(), StartFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::GenerateCXXGlobalInitFunc | ( | llvm::Function * | Fn, |
ArrayRef< llvm::Function *> | CXXThreadLocals, | ||
Address | Guard = Address::invalid() |
||
) |
GenerateCXXGlobalInitFunc - Generates code for initializing global variables.
Definition at line 588 of file CGDeclCXX.cpp.
References Builder, clang::frontend::CPlusPlus, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), createBasicBlock(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitBlock(), EmitCXXGuardedInitBranch(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolPush(), EmitRuntimeCall(), FinishFunction(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), getContext(), getLangOpts(), getTypes(), clang::CodeGen::Address::isValid(), StartFunction(), TlsGuard, and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::GenerateCXXGlobalVarDeclInitFunc | ( | llvm::Function * | Fn, |
const VarDecl * | D, | ||
llvm::GlobalVariable * | Addr, | ||
bool | PerformInit | ||
) |
Emit the code necessary to initialize the given global variable.
Definition at line 560 of file CGDeclCXX.cpp.
References EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), FinishFunction(), getContext(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), getTypes(), clang::Decl::hasAttr(), StartFunction(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
llvm::Function * CodeGenFunction::generateDestroyHelper | ( | Address | addr, |
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray, | ||
const VarDecl * | VD | ||
) |
generateDestroyHelper - Generates a helper function which, when invoked, destroys the given object.
The address of the object should be in global memory.
Definition at line 668 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), CGM, clang::CodeGen::CodeGenModule::CreateGlobalInitOrDestructFunction(), emitDestroy(), FinishFunction(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::Decl::getLocation(), clang::DeclaratorDecl::getLocStart(), clang::CodeGen::CodeGenModule::getTypes(), clang::ImplicitParamDecl::Other, StartFunction(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitDeclDestroy().
llvm::Constant * CodeGenFunction::GenerateDestroyHelperFunction | ( | const CGBlockInfo & | blockInfo | ) |
Generate the destroy-helper function for a block closure object: static void block_destroy_helper(block_t *theBlock);.
Note that this destroys a heap-allocated block closure object; it should not be confused with a 'byref destroy helper', which destroys the heap-allocated contents of an individual __block variable.
Definition at line 1870 of file CGBlocks.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::FunctionDecl::Create(), clang::Create(), clang::IdentifierTable::get(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::BlockExpr::getLocStart(), clang::CodeGen::CodeGenModule::getModule(), clang::ASTContext::getTranslationUnitDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::Idents, clang::InternalLinkage, clang::ImplicitParamDecl::Other, clang::SC_Static, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CGBlockInfo::StructureType, clang::CodeGen::Type, clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by buildDisposeHelper().
llvm::Constant * CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction | ( | const ObjCPropertyImplDecl * | PID | ) |
Definition at line 3292 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::frontend::CPlusPlus, clang::CXXConstructExpr::Create(), clang::FunctionDecl::Create(), clang::Create(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), EmitAnyExpr(), FinishFunction(), clang::CodeGen::AggValueSlot::forAddr(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getAtomicGetterHelperFnMap(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::CodeGen::RValue::getScalarVal(), clang::ASTContext::getTranslationUnitDecl(), clang::Expr::getType(), clang::ObjCPropertyDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCRuntime::hasAtomicCopyHelper(), hasTrivialGetExpr(), clang::ASTContext::Idents, clang::InternalLinkage, clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isRecordType(), clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::OK_Ordinary, clang::ImplicitParamDecl::Other, clang::SC_Static, clang::CodeGen::CodeGenModule::setAtomicGetterHelperFnMap(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::VK_LValue, clang::VK_RValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by GenerateObjCGetter().
llvm::Constant * CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction | ( | const ObjCPropertyImplDecl * | PID | ) |
GenerateObjCAtomicSetterCopyHelperFunction - Given a c++ object type with non-trivial copy assignment function, produce following helper function.
static void copyHelper(Ty *dest, const Ty *source) { *dest = *source; }
Definition at line 3211 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::frontend::CPlusPlus, clang::FunctionDecl::Create(), clang::Create(), EmitStmt(), FinishFunction(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getAtomicSetterHelperFnMap(), clang::CallExpr::getCallee(), clang::CodeGen::CodeGenModule::getContext(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::Type::getPointeeType(), clang::ASTContext::getPointerType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCPropertyImplDecl::getSetterCXXAssignment(), clang::ASTContext::getTranslationUnitDecl(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCRuntime::hasAtomicCopyHelper(), hasTrivialSetExpr(), clang::ASTContext::Idents, clang::InternalLinkage, clang::Type::isRecordType(), clang::ObjCPropertyDecl::OBJC_PR_atomic, clang::OK_Ordinary, clang::ImplicitParamDecl::Other, clang::SC_Static, clang::CodeGen::CodeGenModule::setAtomicSetterHelperFnMap(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::VK_LValue, clang::VK_RValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by GenerateObjCSetter().
void CodeGenFunction::GenerateObjCCtorDtorMethod | ( | ObjCImplementationDecl * | IMP, |
ObjCMethodDecl * | MD, | ||
bool | ctor | ||
) |
Definition at line 1424 of file CGObjC.cpp.
References AutoreleaseResult, Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::ObjCMethodDecl::createImplicitParams(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), emitCXXDestructMethod(), EmitLValueForIvar(), FinishFunction(), clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::RValue::get(), clang::ObjCImplDecl::getClassInterface(), clang::CodeGen::CodeGenModule::getContext(), clang::ASTContext::getObjCIdType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCImplementationDecl::inits(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, LoadObjCSelf(), StartObjCMethod(), and TypeOfSelfObject().
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 810 of file CGObjC.cpp.
References FinishFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), generateObjCGetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCPropertyDecl::getGetterMethodDecl(), clang::ObjCPropertyImplDecl::getPropertyDecl(), and StartObjCMethod().
void CodeGenFunction::generateObjCGetterBody | ( | const ObjCImplementationDecl * | classImpl, |
const ObjCPropertyImplDecl * | propImpl, | ||
const ObjCMethodDecl * | GetterMothodDecl, | ||
llvm::Constant * | AtomicHelperFn | ||
) |
Definition at line 879 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), AutoreleaseResult, clang::ASTContext::BoolTy, Builder, clang::CodeGen::CodeGenTypes::ConvertType(), ConvertType(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitAggregateCopy(), EmitARCLoadWeak(), emitARCRetainLoadOfScalar(), EmitCall(), emitCPPObjectAtomicGetterCall(), EmitIvarOffset(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLValueForIvar(), EmitReturnStmt(), EmitStoreOfComplex(), emitStructGetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getEvaluationKind(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), clang::ObjCPropertyDecl::getGetterMethodDecl(), getLangOpts(), getLLVMContext(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::Address::getPointer(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::CodeGen::CGObjCRuntime::GetPropertyGetFunction(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::CodeGen::LValue::getQuals(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::ObjCPropertyDecl::getType(), getTypes(), hasTrivialGetExpr(), clang::Type::isReferenceType(), LoadObjCSelf(), MakeAddrLValue(), clang::Qualifiers::OCL_Weak, overlapForReturnValue(), ReturnValue, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::ASTContext::toBits(), clang::CodeGen::Type, TypeOfSelfObject(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by GenerateObjCGetter().
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 struture.
Definition at line 572 of file CGObjC.cpp.
References CurFn, EmitCompoundStmtWithoutScope(), FinishFunction(), clang::ObjCMethodDecl::getBody(), clang::Decl::getBodyRBrace(), clang::ObjCMethodDecl::getClassInterface(), incrementProfileCounter(), and StartObjCMethod().
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 1343 of file CGObjC.cpp.
References emitDestroy(), EmitLValueForIvar(), FinishFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), clang::CodeGen::LValue::getAddress(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyDecl::getSetterMethodDecl(), clang::CodeGen::Address::getType(), StartObjCMethod(), and TypeOfSelfObject().
void CodeGenFunction::generateObjCSetterBody | ( | const ObjCImplementationDecl * | classImpl, |
const ObjCPropertyImplDecl * | propImpl, | ||
llvm::Constant * | AtomicHelperFn | ||
) |
Definition at line 1165 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), clang::ASTContext::BoolTy, Builder, clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitCall(), emitCPPObjectAtomicSetterCall(), EmitIvarOffset(), EmitLValueForIvar(), EmitStmt(), emitStructSetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), GetAddrOfLocalVar(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getCmdDecl(), getContext(), getLLVMContext(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CGObjCRuntime::GetOptimizedPropertySetFunction(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::CodeGen::CGObjCRuntime::GetPropertySetFunction(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCPropertyImplDecl::getSetterCXXAssignment(), clang::ObjCPropertyDecl::getSetterMethodDecl(), clang::Expr::getType(), clang::ValueDecl::getType(), getTypes(), clang::QualType::getUnqualifiedType(), clang::ASTContext::hasSameUnqualifiedType(), hasTrivialSetExpr(), LoadObjCSelf(), clang::OK_Ordinary, clang::ImplicitCastExpr::OnStack, clang::ObjCMethodDecl::param_begin(), clang::CodeGen::Type, TypeOfSelfObject(), UseOptimizedSetter(), clang::VK_LValue, clang::VK_RValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by GenerateObjCSetter().
llvm::Function * CodeGenFunction::GenerateOpenMPCapturedStmtFunction | ( | const CapturedStmt & | S | ) |
Definition at line 550 of file CGStmtOpenMP.cpp.
References clang::CapturedStmt::getCapturedDecl(), and clang::codegenoptions::LimitedDebugInfo.
Referenced by emitOutlinedOrderedFunction(), and clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper().
void CodeGenFunction::GenerateOpenMPCapturedVars | ( | const CapturedStmt & | S, |
SmallVectorImpl< llvm::Value *> & | CapturedVars | ||
) |
Definition at line 253 of file CGStmtOpenMP.cpp.
References clang::CapturedStmt::captures(), clang::RecordDecl::field_begin(), and clang::CapturedStmt::getCapturedRecordDecl().
Referenced by emitCommonOMPParallelDirective(), and emitCommonOMPTeamsDirective().
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 1885 of file CGException.cpp.
References clang::SEHExceptStmt::getFilterExpr().
llvm::Function * CodeGenFunction::GenerateSEHFinallyFunction | ( | CodeGenFunction & | ParentCGF, |
const SEHFinallyStmt & | Finally | ||
) |
Definition at line 1902 of file CGException.cpp.
References clang::SEHFinallyStmt::getBlock(), and clang::Stmt::getLocEnd().
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 431 of file CGVTables.cpp.
References clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::CodeGen::Type.
llvm::Function * CodeGenFunction::GenerateVarArgsThunk | ( | llvm::Function * | Fn, |
const CGFunctionInfo & | FnInfo, | ||
GlobalDecl | GD, | ||
const ThunkInfo & | Thunk | ||
) |
Definition at line 157 of file CGVTables.cpp.
References clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CGFunctionInfo::isVariadic(), resolveTopLevelMetadata(), clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet(), and clang::CodeGen::Type.
|
static |
getAccessedFieldNo - Given an encoded value and a result number, return the input field number being accessed.
Definition at line 578 of file CGExpr.cpp.
Referenced by EmitExtVectorElementLValue(), EmitLoadOfExtVectorElementLValue(), and EmitStoreThroughExtVectorComponentLValue().
Address CodeGenFunction::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.
Definition at line 267 of file CGClass.cpp.
References clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getRecordType(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::Decl::hasAttr(), clang::CharUnits::isZero(), clang::SanitizerSet::set(), and clang::CodeGen::Type.
Address CodeGenFunction::GetAddressOfDerivedClass | ( | Address | Value, |
const CXXRecordDecl * | Derived, | ||
CastExpr::path_const_iterator | PathBegin, | ||
CastExpr::path_const_iterator | PathEnd, | ||
bool | NullCheckValue | ||
) |
Definition at line 374 of file CGClass.cpp.
References clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenModule::getContext(), and clang::CodeGen::Type.
Referenced by ShouldNullCheckClassCastValue().
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 199 of file CGClass.cpp.
References clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::Address::getElementType(), and clang::ASTRecordLayout::getVBaseClassOffset().
Referenced by EmitBaseInitializer().
Definition at line 1139 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::Capture::isConstant().
llvm::BlockAddress * CodeGenFunction::GetAddrOfLabel | ( | const LabelDecl * | L | ) |
Definition at line 1838 of file CodeGenFunction.cpp.
References CurFn, clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), GetIndirectGotoBlock(), and getJumpDestForLabel().
GetAddrOfLocalVar - Return the address of a local variable.
Definition at line 2332 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitCall(), EmitCfiCheckFail(), EmitConstructorBody(), emitCopyToScratchpad(), emitCXXDestructor(), emitDestructorsFunction(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), emitInterWarpCopyFunction(), EmitMemberInitializer(), EmitOMPAggregateReduction(), emitPrivatesInit(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitShuffleAndReduceFunction(), emitTaskDupFunction(), generateObjCGetterBody(), generateObjCSetterBody(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), isWeakLinkedClass(), clang::CodeGen::CGCXXABI::loadIncomingCXXThis(), mapParam(), tryRemoveRetainOfSelf(), and clang::CodeGen::ReductionCodeGen::usesReductionInitializer().
|
inline |
Retrieves the default cleanup kind for an ARC cleanup.
Except under -fobjc-arc-eh, ARC cleanups are normal-only.
Definition at line 3742 of file CodeGenFunction.h.
References clang::ast_matchers::expr, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), EmitObjCConsumeObject(), EmitParmDecl(), and StartObjCMethod().
|
inline |
Get the index of the current ArrayInitLoopExpr, if any.
Definition at line 2348 of file CodeGenFunction.h.
References clang::ast_matchers::arrayType.
const BlockByrefInfo & CodeGenFunction::getBlockByrefInfo | ( | const VarDecl * | D | ) |
BuildByrefInfo - This routine changes a __block variable declared as T x into:
struct { void *__isa; void *__forwarding; int32_t __flags; int32_t __size; void *__copy_helper; // only if needed void *__destroy_helper; // only if needed void *__byref_variable_layout;// only if needed char padding[X]; // only if needed T x; } x
void *__copy_helper;
void *__destroy_helper;
void *__byref_variable_layout;
Definition at line 2399 of file CGBlocks.cpp.
References clang::CharUnits::alignTo(), clang::CodeGen::BlockByrefInfo::ByrefAlignment, clang::serialized_diags::create(), clang::CodeGen::BlockByrefInfo::FieldIndex, clang::CodeGen::BlockByrefInfo::FieldOffset, clang::CharUnits::fromQuantity(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::NamedDecl::getNameAsString(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), max(), clang::CodeGen::Type, and clang::CodeGen::BlockByrefInfo::Type.
Referenced by EmitAutoVarAlloca().
SmallVector< llvm::OperandBundleDef, 1 > CodeGenFunction::getBundlesForFunclet | ( | llvm::Value * | Callee | ) |
Definition at line 3682 of file CGCall.cpp.
References EmitRuntimeCall().
Referenced by emitAutoreleasedReturnValueMarker().
|
inline |
Definition at line 1701 of file CodeGenFunction.h.
References clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by emitCXXDestructMethod(), pushCaptureCleanup(), and pushDestroy().
|
inline |
Definition at line 1593 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getContext().
Referenced by AddDirectArgument(), AddVariableConstraints(), BuildFunctionArgList(), clang::CodeGen::CGCXXABI::buildThisParam(), CanSkipVTablePointerInitialization(), castToBase(), castValueToType(), CheckAggExprForMemSetUse(), commonEmitCXXMemberOrOperatorCall(), ConstantFoldsToSimpleInteger(), createRuntimeShuffleFunction(), EmitAArch64TblBuiltinExpr(), emitAddrOfFieldStorage(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitAndRegisterVariableArrayDimensions(), emitArrayLength(), emitArraySubscriptGEP(), EmitAtomicLoad(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBlockCopyAndAutorelease(), EmitCapturedFieldLValue(), EmitCfiCheckFail(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), EmitCXXGlobalVarDeclInit(), EmitCXXNewAllocSize(), EmitDeclInvariant(), emitDeclTargetLinkVarDeclLValue(), emitDestroy(), EmitExtVectorElementLValue(), emitForStaticInitCall(), EmitFromMemory(), clang::CodeGen::ReductionCodeGen::emitInitialization(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForLambdaField(), EmitMemberInitializer(), emitNonZeroVLAInit(), EmitNullabilityCheck(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), emitOffloadingArrays(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), emitPrivatesInit(), EmitStaticVarDecl(), EmitStoreOfScalar(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), EmitToMemory(), EmitTypeCheck(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVariablyModifiedType(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), forConstantArrayExpansion(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), getBadTypeidFn(), GetIntrinsic(), getItaniumDynamicCastFn(), getNaturalTypeAlignment(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), getRangeForType(), getVLAElements1D(), getVLASize(), isBlockVarRef(), isCheapEnoughToEvaluateUnconditionally(), isFullSizeType(), isTrivialFiller(), isWeakLinkedClass(), loadToBegin(), MakeNaturalAlignAddrLValue(), performTypeAdjustment(), rewriteInputConstraintReferences(), ShouldNullCheckClassCastValue(), shuffleAndStore(), StartFunction(), tryEmitAsConstant(), tryEmitFMulAdd(), tryToConvertMemberExprToDeclRefExpr(), and TypeOfSelfObject().
|
inline |
Get the profiler's current count.
This is generally the count for the most recently incremented counter.
Definition at line 1352 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenPGO::getCurrentRegionCount().
Referenced by EmitBranchOnBoolExpr(), and GetIntrinsic().
|
inline |
Definition at line 1594 of file CodeGenFunction.h.
Referenced by clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), clang::CodeGen::ApplyInlineDebugLocation::ApplyInlineDebugLocation(), EmitAutoVarAlloca(), EmitDecl(), EmitParmDecl(), EmitStaticVarDecl(), FinishFunction(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), SourceLocToDebugLoc(), StartFunction(), clang::CodeGen::ApplyInlineDebugLocation::~ApplyInlineDebugLocation(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
CodeGenFunction::Destroyer * CodeGenFunction::getDestroyer | ( | QualType::DestructionKind | destructionKind | ) |
Definition at line 1725 of file CGDecl.cpp.
References destroyARCStrongPrecise, destroyARCWeak, destroyCXXObject, destroyNonTrivialCStruct, clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_nontrivial_c_struct, clang::QualType::DK_objc_strong_lifetime, and clang::QualType::DK_objc_weak_lifetime.
Referenced by emitAutoVarTypeCleanup(), emitCXXDestructMethod(), EmitDeclDestroy(), enterBlockScope(), isTrivialFiller(), pushCaptureCleanup(), pushDestroy(), and pushEHDestroy().
llvm::BasicBlock * CodeGenFunction::getEHDispatchBlock | ( | EHScopeStack::stable_iterator | scope | ) |
Definition at line 591 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::Handler::Block, clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, clang::CodeGen::EHScope::Filter, clang::CodeGen::EHPersonality::get(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::EHScope::getKind(), clang::CodeGen::EHCatchScope::getNumHandlers(), clang::CodeGen::EHCatchScope::Handler::isCatchAll(), clang::CodeGen::EHScope::PadEnd, clang::CodeGen::EHScope::setCachedEHDispatchBlock(), clang::CodeGen::EHScope::Terminate, and clang::CodeGen::EHPersonality::usesFuncletPads().
Referenced by emitCatchDispatchBlock(), emitCatchPadBlock(), and emitWasmCatchPadBlock().
llvm::BasicBlock * CodeGenFunction::getEHResumeBlock | ( | bool | isCleanup | ) |
Definition at line 1559 of file CGException.cpp.
Referenced by emitFilterDispatchBlock(), and getBundlesForCoroEnd().
Address CodeGenFunction::getEHSelectorSlot | ( | ) |
Definition at line 408 of file CGException.cpp.
References clang::CharUnits::fromQuantity(), and clang::CodeGen::CodeGenTypeCache::Int32Ty.
|
static |
getEvaluationKind - Return the TypeEvaluationKind of QualType T
.
Definition at line 192 of file CodeGenFunction.cpp.
References clang::Auto, clang::QualType::getCanonicalType(), clang::Type::getTypeClass(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::ast_matchers::type.
Referenced by convertTempToRValue(), convertToComplexValue(), convertToType(), EmitDeclInit(), EmitExprAsInit(), EmitRValueForField(), generateObjCGetterBody(), GetUndefRValue(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
llvm::Value * CodeGenFunction::getExceptionFromSlot | ( | ) |
Returns the contents of the function's exception object and selector slots.
Definition at line 414 of file CGException.cpp.
Referenced by emitFilterDispatchBlock(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), and InitCatchParam().
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 402 of file CGException.cpp.
References clang::CodeGen::CodeGenTypeCache::getPointerAlign(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
llvm::BasicBlock * CodeGenFunction::getFuncletEHDispatchBlock | ( | EHScopeStack::stable_iterator | scope | ) |
Definition at line 641 of file CGException.cpp.
References clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::EHScope::getKind(), and clang::CodeGen::EHScope::Terminate.
llvm::BasicBlock * CodeGenFunction::GetIndirectGotoBlock | ( | ) |
Definition at line 1850 of file CodeGenFunction.cpp.
References createBasicBlock(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by GetAddrOfLabel().
|
inline |
Definition at line 1628 of file CodeGenFunction.h.
References clang::CodeGen::EHScopeStack::requiresLandingPad().
llvm::BasicBlock * CodeGenFunction::getInvokeDestImpl | ( | ) |
Definition at line 700 of file CGException.cpp.
References clang::CodeGen::EHPersonality::get(), getOpaquePersonalityFn(), isNonEHScope(), and clang::CodeGen::EHPersonality::usesFuncletPads().
CodeGenFunction::JumpDest CodeGenFunction::getJumpDestForLabel | ( | const LabelDecl * | S | ) |
getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to.
Definition at line 500 of file CGStmt.cpp.
References createBasicBlock(), clang::NamedDecl::getName(), clang::CodeGen::EHScopeStack::stable_iterator::invalid(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), and NextCleanupDestIndex.
Referenced by GetAddrOfLabel().
|
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 960 of file CodeGenFunction.h.
References clang::CodeGen::EHScopeStack::getInnermostNormalCleanup().
Referenced by EmitLabel(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), and StartFunction().
|
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 969 of file CodeGenFunction.h.
|
inline |
Definition at line 1606 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getLangOpts().
Referenced by AddInitializerToStaticVarDecl(), CheckAggExprForMemSetUse(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitConstructorBody(), EmitCXXGlobalVarDeclInit(), EmitLoadOfLValue(), EmitNullInitialization(), emitNumTeamsForTargetDirective(), emitNumThreadsForTargetDirective(), EmitObjCThrowOperand(), EmitParmDecl(), emitPointerArithmetic(), EmitStaticVarDecl(), GenerateCode(), GenerateCXXGlobalInitFunc(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), GetIntrinsic(), getNaturalTypeAlignment(), getRangeForType(), isCheapEnoughToEvaluateUnconditionally(), pushCaptureCleanup(), StartFunction(), tryEmitARCRetainLoadOfScalar(), tryEmitFMulAdd(), and ~CodeGenFunction().
|
inline |
Definition at line 1636 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getLLVMContext().
Referenced by AddDirectArgument(), AddVariableConstraints(), clang::CodeGen::TargetCodeGenInfo::createEnqueuedBlockKernel(), EmitAtomicLoad(), emitAutoreleasedReturnValueMarker(), EmitBranchOnBoolExpr(), EmitCastToVoidPtr(), emitCatchPadBlock(), EmitCfiSlowPathCheck(), EmitCheck(), emitCheckHandlerCall(), EmitCheckValue(), EmitConstructorBody(), EmitLValueForField(), emitRangedBuiltin(), EmitScalarRangeCheck(), EmitTrapCall(), EmitTypeCheck(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), emitWasmCatchPadBlock(), EmitX86BitTestIntrinsic(), generateObjCGetterBody(), generateObjCSetterBody(), getAsmSrcLocInfo(), getItaniumDynamicCastFn(), getRangeForType(), rewriteInputConstraintReferences(), SetFPAccuracy(), and StartFunction().
CharUnits CodeGenFunction::getNaturalPointeeTypeAlignment | ( | QualType | T, |
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr |
||
) |
Definition at line 109 of file CodeGenFunction.cpp.
References getNaturalTypeAlignment(), and clang::Type::getPointeeType().
CharUnits CodeGenFunction::getNaturalTypeAlignment | ( | QualType | T, |
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr , |
||
bool | forPointeeType = false |
||
) |
Definition at line 116 of file CodeGenFunction.cpp.
References clang::CodeGen::AttributedType, CGM, clang::CharUnits::fromQuantity(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getContext(), getLangOpts(), clang::QualType::getQualifiers(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), clang::ASTContext::getTypeAlignInChars(), clang::Qualifiers::hasUnaligned(), clang::ASTContext::isAlignmentRequired(), clang::Type::isIncompleteType(), clang::CharUnits::One(), clang::ASTContext::toCharUnitsFromBits(), and clang::CodeGen::Type.
Referenced by EmitLoadOfPointer(), EmitLoadOfReference(), emitOMPArraySectionBase(), emitTaskDupFunction(), getNaturalPointeeTypeAlignment(), MakeNaturalAlignAddrLValue(), MakeNaturalAlignPointeeAddrLValue(), and StartFunction().
Address CodeGenFunction::getNormalCleanupDestSlot | ( | ) |
Definition at line 1270 of file CGCleanup.cpp.
Referenced by TransitionToCleanupSwitch().
CodeGenFunction::JumpDest CodeGenFunction::getOMPCancelDestination | ( | OpenMPDirectiveKind | Kind | ) |
Definition at line 4432 of file CGStmtOpenMP.cpp.
LValue CodeGenFunction::getOrCreateOpaqueLValueMapping | ( | const OpaqueValueExpr * | e | ) |
Given an opaque value expression, return its LValue mapping if it exists, otherwise create one.
Definition at line 4242 of file CGExpr.cpp.
References EmitLValue(), clang::OpaqueValueExpr::getSourceExpr(), clang::OpaqueValueExpr::isUnique(), and clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().
Referenced by EmitOpaqueValueLValue(), and isTrivialFiller().
RValue CodeGenFunction::getOrCreateOpaqueRValueMapping | ( | const OpaqueValueExpr * | e | ) |
Given an opaque value expression, return its RValue mapping if it exists, otherwise create one.
Definition at line 4256 of file CGExpr.cpp.
References EmitAnyExpr(), clang::OpaqueValueExpr::getSourceExpr(), clang::OpaqueValueExpr::isUnique(), and clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().
|
inline |
Get the profiler's count for the given statement.
Definition at line 1338 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenPGO::getStmtCount().
Referenced by EmitBranchOnBoolExpr(), EmitConditionalOperatorLValue(), emitOMPSimdRegion(), GetIntrinsic(), isBlockVarRef(), and isCheapEnoughToEvaluateUnconditionally().
llvm::Value * CodeGenFunction::getSelectorFromSlot | ( | ) |
Definition at line 418 of file CGException.cpp.
Referenced by emitCatchDispatchBlock(), and emitFilterDispatchBlock().
|
inline |
Definition at line 1635 of file CodeGenFunction.h.
References MultiVersioning::Target.
Referenced by canEmitDelegateCallArgs(), EmitAutoVarAlloca(), EmitBitTestIntrinsic(), emitGlobalDtorWithCXAAtExit(), EmitSignBit(), getAsmSrcLocInfo(), getClangCallTerminateFn(), and StartFunction().
|
inline |
Definition at line 1637 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getTargetCodeGenInfo().
Referenced by EmitAtomicOp(), and EmitParmDecl().
llvm::BasicBlock * CodeGenFunction::getTerminateFunclet | ( | ) |
getTerminateLandingPad - Return a cleanup funclet that just calls terminate.
Definition at line 1514 of file CGException.cpp.
References clang::CodeGen::EHPersonality::get(), and clang::CodeGen::EHPersonality::usesFuncletPads().
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 1490 of file CGException.cpp.
llvm::BasicBlock * CodeGenFunction::getTerminateLandingPad | ( | ) |
getTerminateLandingPad - Return a landing pad that just calls terminate.
Definition at line 1456 of file CGException.cpp.
|
inline |
Definition at line 1592 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getTypes().
Referenced by BuildFunctionArgList(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitDeclDestroy(), emitStructSetterCall(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateObjCGetterBody(), generateObjCSetterBody(), isSimpleZero(), and isTrivialFiller().
llvm::Value * CodeGenFunction::getTypeSize | ( | QualType | Ty | ) |
Returns calculated size of the specified type.
Definition at line 233 of file CGStmtOpenMP.cpp.
References clang::ASTContext::getAsVariableArrayType(), clang::ASTContext::getTypeSizeInChars(), and clang::CodeGen::CodeGenFunction::VlaSizePair::Type.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitCheckTypeDescriptor(), EmitFromMemory(), emitReductionListCopy(), and EmitToMemory().
GetUndefRValue - Get an appropriate 'undef' rvalue for the given type.
Definition at line 1100 of file CGExpr.cpp.
References clang::Type::castAs(), ConvertType(), CreateMemTemp(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::RValue::getComplex(), clang::ComplexType::getElementType(), getEvaluationKind(), clang::Type::isVoidType(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::CodeGen::Type.
|
inline |
Definition at line 1620 of file CodeGenFunction.h.
Referenced by destroyOptimisticNormalEntry(), and clang::CodeGen::CodeGenFunction::FinallyInfo::enter().
CodeGenFunction::VlaSizePair CodeGenFunction::getVLAElements1D | ( | const VariableArrayType * | vla | ) |
Return the number of elements for a single dimension for the given array type.
Definition at line 1995 of file CodeGenFunction.cpp.
References clang::ArrayType::getElementType(), clang::VariableArrayType::getSizeExpr(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitAndRegisterVariableArrayDimensions(), and getVLAElements1D().
CodeGenFunction::VlaSizePair CodeGenFunction::getVLAElements1D | ( | QualType | vla | ) |
Definition at line 1988 of file CodeGenFunction.cpp.
References clang::ASTContext::getAsVariableArrayType(), getContext(), and getVLAElements1D().
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 1964 of file CodeGenFunction.cpp.
References Builder, getContext(), clang::ArrayType::getElementType(), clang::VariableArrayType::getSizeExpr(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by emitArrayLength(), EmitNullInitialization(), emitPointerArithmetic(), getArrayIndexingBound(), getVLASize(), and tryEmitFMulAdd().
CodeGenFunction::VlaSizePair CodeGenFunction::getVLASize | ( | QualType | vla | ) |
Definition at line 1957 of file CodeGenFunction.cpp.
References clang::ASTContext::getAsVariableArrayType(), getContext(), and getVLASize().
CodeGenFunction::VPtrsVector CodeGenFunction::getVTablePointers | ( | const CXXRecordDecl * | VTableClass | ) |
Definition at line 2467 of file CGClass.cpp.
References clang::CharUnits::Zero().
void CodeGenFunction::getVTablePointers | ( | BaseSubobject | Base, |
const CXXRecordDecl * | NearestVBase, | ||
CharUnits | OffsetFromNearestVBase, | ||
bool | BaseIsNonVirtualPrimaryBase, | ||
const CXXRecordDecl * | VTableClass, | ||
VisitedVirtualBasesSetTy & | VBases, | ||
VPtrsVector & | vptrs | ||
) |
Definition at line 2478 of file CGClass.cpp.
References clang::CodeGen::Base, and clang::BaseSubobject::getBase().
llvm::Value * CodeGenFunction::GetVTablePtr | ( | Address | This, |
llvm::Type * | VTableTy, | ||
const CXXRecordDecl * | VTableClass | ||
) |
GetVTablePtr - Return the Value of the vtable pointer member pointed to by This.
Definition at line 2549 of file CGClass.cpp.
Referenced by emitCXXDestructor(), getBadTypeidFn(), and getClangCallTerminateFn().
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 431 of file CGClass.cpp.
References clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), clang::CodeGen::CodeGenModule::getContext(), clang::GlobalDecl::getDecl(), and clang::ASTRecordLayout::getVBaseClassOffset().
|
static |
Definition at line 8915 of file CGBuiltin.cpp.
References clang::CodeGen::Type, and X86_FEATURE_COMPAT.
Definition at line 2020 of file CodeGenFunction.h.
References clang::CodeGen::TEK_Aggregate.
Referenced by EmitConditionalOperatorLValue(), and EmitParmDecl().
|
inline |
Return true if a label was seen in the current scope.
Definition at line 331 of file CodeGenFunction.h.
Referenced by EmitAutoVarAlloca().
Definition at line 2016 of file CodeGenFunction.h.
References clang::CodeGen::TEK_Scalar.
Referenced by AddVariableConstraints(), convertToScalarValue(), EmitParmDecl(), isAggregateTypeForABI(), and StartFunction().
hasVolatileMember - returns true if aggregate type has a volatile member.
Definition at line 2277 of file CodeGenFunction.h.
References clang::Type::getAs(), and clang::RecordDecl::hasVolatileMember().
Referenced by isBlockVarRef().
|
inline |
HaveInsertPoint - True if an insertion point is defined.
If not, this indicates that the current code being emitted is unreachable.
Definition at line 2066 of file CodeGenFunction.h.
Referenced by AddInitializerToStaticVarDecl(), addMonoNonMonoModifier(), CleanupTy::Emit(), emitAlignedClause(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitCleanup(), emitForStaticInitCall(), clang::CodeGen::emitInlinedDirective(), emitOffloadingArraysArgument(), clang::CodeGen::CGOpenMPRuntime::emitOMPIfClause(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), emitPostUpdateForReductionClause(), emitPreCond(), emitReduceFiniFunction(), emitSimdlenSafelenClause(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), enterBlockScope(), getCancellationKind(), clang::CodeGen::getCriticalRegionLock(), isBlockVarRef(), clang::CodeGen::markAsGlobalTarget(), protectFromPeepholes(), supportsSPMDExecutionMode(), and clang::CodeGen::ReductionCodeGen::usesReductionInitializer().
|
inline |
Increment the profiler's counter for the given statement by StepV
.
If StepV
is null, the default increment is 1.
Definition at line 1331 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenPGO::emitCounterIncrement(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGenOptions::hasProfileClangInstr(), and clang::CodeGen::CodeGenPGO::setCurrentStmt().
Referenced by clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::EmitBody(), EmitBranchOnBoolExpr(), EmitConditionalOperatorLValue(), EmitFunctionBody(), EmitLabel(), emitOMPSimdRegion(), GenerateObjCMethod(), GetIntrinsic(), isBlockVarRef(), and isCheapEnoughToEvaluateUnconditionally().
LValue CodeGenFunction::InitCapturedStruct | ( | const CapturedStmt & | S | ) |
Definition at line 2221 of file CGStmt.cpp.
|
inline |
Set up the last cleanup that was pushed as a conditional full-expression cleanup.
Definition at line 654 of file CodeGenFunction.h.
void CodeGenFunction::initFullExprCleanupWithFlag | ( | Address | ActiveFlag | ) |
Definition at line 299 of file CGCleanup.cpp.
References clang::format::cleanup(), clang::CodeGen::EHCleanupScope::hasActiveFlag(), clang::CodeGen::EHCleanupScope::isEHCleanup(), clang::CodeGen::EHCleanupScope::isNormalCleanup(), clang::CodeGen::EHCleanupScope::setActiveFlag(), clang::CodeGen::EHCleanupScope::setTestFlagInEHCleanup(), and clang::CodeGen::EHCleanupScope::setTestFlagInNormalCleanup().
void CodeGenFunction::InitializeVTablePointer | ( | const VPtr & | vptr | ) |
Initialize the vtable pointer of the given subobject.
Definition at line 2416 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CodeGenFunction::VPtr::Base, clang::BaseSubobject::getBaseOffset(), clang::CharUnits::isZero(), clang::CodeGen::CodeGenFunction::VPtr::NearestVBase, clang::CodeGen::CodeGenFunction::VPtr::OffsetFromNearestVBase, clang::CodeGen::Type, clang::CodeGen::CodeGenFunction::VPtr::VTableClass, and clang::CharUnits::Zero().
void CodeGenFunction::InitializeVTablePointers | ( | const CXXRecordDecl * | ClassDecl | ) |
Definition at line 2535 of file CGClass.cpp.
References clang::CXXRecordDecl::getNumVBases(), and clang::CXXRecordDecl::isDynamicClass().
Referenced by EmitBaseInitializer().
void CodeGenFunction::InitTempAlloca | ( | Address | Alloca, |
llvm::Value * | Value | ||
) |
InitTempAlloca - Provide an initial value for the given alloca which will be observable at all locations in the function.
The address should be something that was returned from one of the CreateTempAlloca or CreateMemTemp routines, and the initializer must be valid in the entry block (i.e. it must either be a constant or an argument value).
Definition at line 126 of file CGExpr.cpp.
References AllocaInsertPt, clang::CodeGen::Address::getAlignment(), clang::CodeGen::Address::getPointer(), and clang::CharUnits::getQuantity().
Referenced by clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), and StartFunction().
void CodeGenFunction::InsertHelper | ( | llvm::Instruction * | I, |
const llvm::Twine & | Name, | ||
llvm::BasicBlock * | BB, | ||
llvm::BasicBlock::iterator | InsertPt | ||
) | const |
CGBuilder insert helper.
This function is called after an instruction is created using Builder.
Definition at line 2248 of file CodeGenFunction.cpp.
|
inline |
Returns true while emitting a cleanuppad.
Definition at line 591 of file CodeGenFunction.h.
|
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 708 of file CGClass.cpp.
References clang::Type::getAs(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), and clang::CXXConstructorDecl::isDelegatingConstructor().
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters().
|
inline |
Definition at line 312 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenFunction::CGCoroInfo::Data.
|
inline |
isInConditionalBranch - Return true if we're currently emitting one branch or the other of a conditional expression.
Definition at line 1022 of file CodeGenFunction.h.
Referenced by SetupCleanupBlockActivation().
|
static |
Determine whether the pointer type check TCK
permits null pointers.
Definition at line 596 of file CGExpr.cpp.
References TCK_DowncastPointer, TCK_DynamicOperation, TCK_Upcast, and TCK_UpcastToVirtualBase.
Referenced by EmitTypeCheck().
|
inlinestatic |
Definition at line 4141 of file CodeGenFunction.h.
References clang::Decl::getDeclContext().
|
inlinestatic |
Definition at line 4155 of file CodeGenFunction.h.
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 1025 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::stable_iterator::encloses(), and clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth().
|
inline |
Returns true inside SEH __try blocks.
Definition at line 588 of file CodeGenFunction.h.
Determine whether the given initializer is trivial in the sense that it requires no code to be generated.
Definition at line 1418 of file CGDecl.cpp.
Referenced by checkInitIsRequired(), EmitAutoVarInit(), clang::CodeGen::ReductionCodeGen::emitInitialization(), and emitPrivatesInit().
|
static |
Determine whether the pointer type check TCK
requires a vptr check.
Definition at line 601 of file CGExpr.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::hasDefinition(), clang::CXXRecordDecl::isDynamicClass(), TCK_DowncastPointer, TCK_DowncastReference, TCK_DynamicOperation, TCK_MemberAccess, TCK_MemberCall, and TCK_UpcastToVirtualBase.
Referenced by EmitTypeCheck().
Check if E
is a C++ "this" pointer wrapped in value-preserving casts.
Definition at line 1140 of file CGExpr.cpp.
Address CodeGenFunction::LoadBlockStruct | ( | ) |
Definition at line 1325 of file CGBlocks.cpp.
|
inline |
LoadCXXThis - Load the value of 'this'.
This function is only valid while generating code for an C++ member function.
Definition at line 2416 of file CodeGenFunction.h.
Referenced by EmitMemberInitializer().
Address CodeGenFunction::LoadCXXThisAddress | ( | ) |
Definition at line 109 of file CGClass.cpp.
Referenced by EmitBaseInitializer(), and EmitConstructorBody().
|
inline |
LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.
Definition at line 2426 of file CodeGenFunction.h.
llvm::Value * CodeGenFunction::LoadObjCSelf | ( | ) |
LoadObjCSelf - Load the value of self.
This function is only valid while generating code for an Objective-C method.
Definition at line 1460 of file CGObjC.cpp.
References CurCodeDecl, CurFuncDecl, EmitDeclRefLValue(), EmitLoadOfScalar(), clang::ValueDecl::getType(), and clang::VK_LValue.
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitCXXDestructMethod(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
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 842 of file CGExpr.cpp.
Referenced by getArrayIndexingBound().
Function * CodeGenFunction::LookupNeonLLVMIntrinsic | ( | unsigned | IntrinsicID, |
unsigned | Modifier, | ||
llvm::Type * | ArgTy, | ||
const CallExpr * | E | ||
) |
Definition at line 4631 of file CGBuiltin.cpp.
References Add1ArgType, Add2ArgTypes, AddRetType, clang::CallExpr::getCallReturnType(), InventFloatType, clang::CodeGen::Type, Use128BitVectors, Use64BitVectors, VectorizeArgTypes, and VectorizeRetType.
Referenced by EmitCommonNeonSISDBuiltinExpr().
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 1448 of file CGAtomic.cpp.
References clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Referenced by EmitLoadOfScalar(), EmitStoreOfScalar(), and isBlockVarRef().
|
inline |
Definition at line 2087 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getTBAAAccessInfo().
Referenced by convertTempToRValue(), clang::CodeGen::CallArg::copyInto(), EmitAtomicLoad(), EmitAtomicUpdateValue(), EmitAutoVarInit(), EmitConditionalOperatorLValue(), EmitConstructorBody(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), EmitDeclInit(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitInterWarpCopyFunction(), EmitLoadOfPointerLValue(), EmitLoadOfReferenceLValue(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitParmDecl(), emitPrivatesInit(), emitProxyTaskFunction(), emitReduceInitFunction(), emitReductionListCopy(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), EmitThreadPrivateVarDeclLValue(), emitWritebackArg(), generateObjCGetterBody(), clang::CodeGen::CallArg::getRValue(), InitCatchParam(), isBlockVarRef(), isTrivialFiller(), loadToBegin(), MakeNaturalAlignPointeeAddrLValue(), ShouldNullCheckClassCastValue(), StoreAnyExprIntoOneUnit(), and clang::CodeGen::ReductionCodeGen::usesReductionInitializer().
|
inline |
Definition at line 2093 of file CodeGenFunction.h.
|
inline |
Definition at line 2098 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getTBAAAccessInfo().
|
inline |
Definition at line 2104 of file CodeGenFunction.h.
LValue CodeGenFunction::MakeNaturalAlignAddrLValue | ( | llvm::Value * | V, |
QualType | T | ||
) |
Definition at line 164 of file CodeGenFunction.cpp.
References getContext(), getNaturalTypeAlignment(), and clang::CodeGen::LValue::MakeAddr().
Referenced by EmitCapturedFieldLValue(), EmitConstructorBody(), EmitLValueForLambdaField(), EmitMemberInitializer(), emitReduceFiniFunction(), emitReduceInitFunction(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), and InitCatchParam().
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 175 of file CodeGenFunction.cpp.
References getNaturalTypeAlignment(), and MakeAddrLValue().
Referenced by EmitMemberInitializer().
Determine if the given statement might introduce a declaration into the current scope, by being a (possibly-labelled) DeclStmt.
Definition at line 1451 of file CodeGenFunction.cpp.
|
inline |
Determines whether an EH cleanup is required to destroy a type with the given destruction kind.
Definition at line 1686 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by EmitConstructorBody(), EmitDeclDestroy(), EmitMemberInitializer(), enterBlockScope(), isTrivialFiller(), pushCaptureCleanup(), and pushEHDestroy().
AggValueSlot::Overlap_t CodeGenFunction::overlapForBaseInit | ( | const CXXRecordDecl * | RD, |
const CXXRecordDecl * | BaseRD, | ||
bool | IsVirtual | ||
) |
Determine whether a base class initialization may overlap some other object.
Definition at line 1795 of file CGExprAgg.cpp.
References clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::ASTRecordLayout::getBaseClassOffset(), clang::ASTRecordLayout::getNonVirtualSize(), and clang::CodeGen::AggValueSlot::MayOverlap.
Referenced by EmitBaseInitializer().
|
inline |
Determine whether a field initialization may overlap some other object.
Definition at line 2294 of file CodeGenFunction.h.
Referenced by EmitExprAsInit(), and EmitMemberInitializer().
|
inline |
Determine whether a return value slot may overlap some other object.
Definition at line 2286 of file CodeGenFunction.h.
Referenced by generateObjCGetterBody().
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 1126 of file CGException.cpp.
References emitCatchDispatchBlock(), and clang::CodeGen::EHScope::hasEHBranches().
Referenced by clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
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 651 of file CGCleanup.cpp.
References clang::CodeGen::EHCleanupScope::getActiveFlag(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::EHScope::getEnclosingEHScope(), clang::CodeGen::EHCleanupScope::getFixupDepth(), clang::CodeGen::EHCleanupScope::hasBranches(), clang::CodeGen::EHScope::hasEHBranches(), clang::CodeGen::Address::invalid(), clang::CodeGen::EHCleanupScope::isActive(), clang::CodeGen::EHCleanupScope::shouldTestFlagInEHCleanup(), and clang::CodeGen::EHCleanupScope::shouldTestFlagInNormalCleanup().
Referenced by emitArrayDestroy(), EmitObjectDelete(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
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 clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::EHCleanupScope::getEnclosingNormalCleanup(), clang::CodeGen::EHCleanupScope::hasBranches(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().
Referenced by FinishFunction(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup().
void CodeGenFunction::PopCleanupBlocks | ( | EHScopeStack::stable_iterator | Old, |
size_t | OldLifetimeExtendedSize, | ||
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.
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 2166 of file CodeGenFunction.cpp.
References Builder, clang::CodeGen::RValue::getScalarVal(), HaveInsertPoint(), and clang::CodeGen::RValue::isScalar().
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind().
void CodeGenFunction::pushCallObjectDeleteCleanup | ( | const FunctionDecl * | OperatorDelete, |
llvm::Value * | CompletePtr, | ||
QualType | ElementType | ||
) |
Definition at line 1839 of file CGExprCXX.cpp.
References clang::CodeGen::NormalAndEHCleanup.
|
inline |
Queue a cleanup to be pushed after finishing the current full-expression.
Definition at line 617 of file CodeGenFunction.h.
|
inline |
Definition at line 633 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::IsConditional, clang::CodeGen::Address::isValid(), and clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::Size.
void CodeGenFunction::pushDestroy | ( | QualType::DestructionKind | dtorKind, |
Address | addr, | ||
QualType | type | ||
) |
pushDestroy - Push the standard destructor for the given type as at least a normal cleanup.
Definition at line 1752 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getCleanupKind(), and getDestroyer().
Referenced by EmitAutoVarWithLifetime(), clang::CodeGen::ReductionCodeGen::emitCleanups(), emitDestructorsFunction(), EmitParmDecl(), enterBlockScope(), pushCaptureCleanup(), and pushEHDestroy().
void CodeGenFunction::pushDestroy | ( | CleanupKind | kind, |
Address | addr, | ||
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
Definition at line 1761 of file CGDecl.cpp.
References clang::ast_matchers::type.
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 2406 of file CGClass.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::hasTrivialDestructor(), and clang::Decl::isUsed().
void CodeGenFunction::PushDestructorCleanup | ( | const CXXDestructorDecl * | Dtor, |
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 2401 of file CGClass.cpp.
References clang::CodeGen::NormalAndEHCleanup.
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 1742 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getDestroyer(), needsEHCleanup(), and pushDestroy().
Referenced by EmitConstructorBody(), and EmitMemberInitializer().
|
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 599 of file CodeGenFunction.h.
References clang::CodeGen::EHScopeStack::pushCleanupTuple().
void CodeGenFunction::pushIrregularPartialArrayCleanup | ( | llvm::Value * | arrayBegin, |
Address | arrayEndPointer, | ||
QualType | elementType, | ||
CharUnits | elementAlign, | ||
Destroyer * | destroyer | ||
) |
pushIrregularPartialArrayCleanup - Push an EH cleanup to destroy already-constructed elements of the given array.
The cleanup may be popped with DeactivateCleanupBlock or PopCleanupBlock.
elementType | - the immediate element type of the array; possibly still an array type |
Definition at line 1977 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup.
Referenced by isTrivialFiller().
void CodeGenFunction::pushLifetimeExtendedDestroy | ( | CleanupKind | kind, |
Address | addr, | ||
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
Definition at line 1772 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, EHStack, clang::CodeGen::NormalCleanup, and clang::ast_matchers::type.
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.
elementType | - the immediate element type of the array; possibly still an array type |
Definition at line 1994 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup.
Referenced by emitArrayDestroy().
void CodeGenFunction::pushSEHCleanup | ( | CleanupKind | kind, |
llvm::Function * | FinallyFunc | ||
) |
Definition at line 1975 of file CGException.cpp.
void CodeGenFunction::pushStackRestore | ( | CleanupKind | kind, |
Address | SPMem | ||
) |
Definition at line 1768 of file CGDecl.cpp.
References EHStack.
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 1702 of file CGException.cpp.
void CodeGenFunction::registerGlobalDtorWithAtExit | ( | const VarDecl & | D, |
llvm::Constant * | 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 234 of file CGDeclCXX.cpp.
References createAtExitStub().
Referenced by emitGlobalDtorWithTLRegDtor().
void CodeGenFunction::registerGlobalDtorWithAtExit | ( | llvm::Constant * | dtorStub | ) |
Call atexit() with function dtorStub.
Definition at line 242 of file CGDeclCXX.cpp.
References CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), and clang::CodeGen::CodeGenTypeCache::IntTy.
void CodeGenFunction::ResolveBranchFixups | ( | llvm::BasicBlock * | Target | ) |
Definition at line 385 of file CGCleanup.cpp.
Referenced by EmitLabel().
bool CodeGenFunction::sanitizePerformTypeCheck | ( | ) | const |
Whether any type-checking sanitizers are enabled.
If false
, calls to EmitTypeCheck can be skipped.
Definition at line 609 of file CGExpr.cpp.
References clang::SanitizerSet::has(), and SanOpts.
Referenced by EmitTypeCheck(), and ShouldNullCheckClassCastValue().
|
inline |
Definition at line 555 of file CodeGenFunction.h.
|
inline |
Definition at line 1024 of file CodeGenFunction.h.
References clang::CodeGen::Address::getAlignment(), clang::CodeGen::Address::getPointer(), and clang::CharUnits::getQuantity().
Referenced by SetupCleanupBlockActivation().
void CodeGenFunction::setBlockContextParameter | ( | const ImplicitParamDecl * | D, |
unsigned | argNum, | ||
llvm::Value * | ptr | ||
) |
Definition at line 1292 of file CGBlocks.cpp.
References clang::NamedDecl::getName(), and clang::ValueDecl::getType().
Referenced by EmitParmDecl().
|
inline |
Set the profiler's current count.
Definition at line 1346 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenPGO::setCurrentRegionCount().
Referenced by EmitBranchOnBoolExpr().
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 4783 of file CGExpr.cpp.
References getLLVMContext(), and Node.
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 2749 of file CGClass.cpp.
References clang::CodeGen::CodeGenModule::getContext(), clang::NamedDecl::getQualifiedNameAsString(), clang::ASTContext::getSanitizerBlacklist(), and clang::SanitizerBlacklist::isBlacklistedType().
bool CodeGenFunction::ShouldInstrumentFunction | ( | ) |
ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls.
Definition at line 441 of file CodeGenFunction.cpp.
References CGM, CurFuncDecl, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::Decl::hasAttr().
Referenced by FinishFunction(), and StartFunction().
Definition at line 1618 of file CGExprScalar.cpp.
References CFITCK_DerivedCast, CFITCK_UnrelatedCast, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateBitCast(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CodeGenModule::createOpenCLIntToSamplerConversion(), EmitARCExtendBlockObject(), EmitARCReclaimReturnedObject(), EmitARCRetainScalarExpr(), EmitArrayToPointerDecay(), EmitBlockCopyAndAutorelease(), EmitComplexExpr(), EmitCompoundStmt(), EmitDynamicCast(), EmitIgnoredExpr(), EmitLoadOfScalar(), clang::CodeGen::CGCXXABI::EmitMemberPointerConversion(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), clang::CodeGen::CGCXXABI::EmitNullMemberPointer(), EmitObjCConsumeObject(), EmitPointerWithAlignment(), EmitTypeCheck(), EmitVTablePtrCheckForCast(), enterFullExpression(), clang::Expr::EvaluateAsRValue(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), GetAddressOfDerivedClass(), clang::QualType::getAddressSpace(), clang::Type::getAs(), clang::CastExpr::getCastKind(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::Expr::getExprLoc(), clang::Stmt::getLocStart(), clang::CodeGen::CodeGenModule::getNullPointer(), clang::Type::getPointeeCXXRecordDecl(), clang::Type::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::CastExpr::getSubExpr(), clang::ExprWithCleanups::getSubExpr(), clang::StmtExpr::getSubStmt(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::Expr::getType(), clang::SanitizerSet::has(), clang::ASTContext::hasSameUnqualifiedType(), clang::Expr::EvalStatus::HasSideEffects, clang::Expr::IgnoreParens(), clang::Type::isBooleanType(), clang::Type::isEventT(), clang::Expr::isGLValue(), clang::APValue::isNullPointer(), clang::Type::isQueueT(), clang::Type::isSignedIntegerOrEnumerationType(), clang::CodeGen::Address::isValid(), clang::Type::isVoidType(), MakeAddrLValue(), clang::QualType::mayBeDynamicClass(), clang::QualType::mayBeNotDynamicClass(), clang::CastExpr::path_begin(), clang::CastExpr::path_end(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), sanitizePerformTypeCheck(), SanOpts, ShouldNullCheckClassCastValue(), TCK_DowncastPointer, clang::CodeGen::Type, clang::Expr::EvalResult::Val, and clang::VK_RValue.
Referenced by ShouldNullCheckClassCastValue().
|
inline |
Definition at line 1602 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by EmitARCStoreStrong(), and emitAutoreleaseOfResult().
bool CodeGenFunction::ShouldXRayInstrumentFunction | ( | ) | const |
ShouldXRayInstrument - Return true if the current function should be instrumented with XRay nop sleds.
Definition at line 453 of file CodeGenFunction.cpp.
References CGM, and clang::CodeGen::CodeGenModule::getCodeGenOpts().
Referenced by StartFunction().
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 423 of file CGStmt.cpp.
References EHStack, and clang::CodeGen::EHScopeStack::empty().
llvm::DebugLoc CodeGenFunction::SourceLocToDebugLoc | ( | SourceLocation | Location | ) |
Converts Location to a DebugLoc, if debug information is enabled.
Definition at line 2455 of file CodeGenFunction.cpp.
References getDebugInfo().
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.
Loc | The location to be associated with the function. |
StartLoc | The location of the function body. |
Definition at line 809 of file CodeGenFunction.cpp.
References AllocaInsertPt, AutoreleaseResult, Builder, clang::CC_C, CGM, clang::frontend::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), createBasicBlock(), CreateDefaultAlignTempAlloca(), CreateIRTemp(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CurCodeDecl, CurFn, CurFnInfo, CurFuncDecl, CurFuncIsThunk, CurSEHParent, EHStack, EmitFunctionProlog(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), EmitLoadOfLValue(), EmitLValueForLambdaField(), EmitStartEHSpec(), EmitTypeCheck(), EmitVariablyModifiedType(), EncodeAddrForUseInPrologue(), endsWithReturn(), clang::EST_None, clang::RecordDecl::fields(), FnRetTy, clang::XRayInstrKind::Function, clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::Type::getAs(), clang::Decl::getAttr(), clang::CXXRecordDecl::getCaptureFields(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::ASTContext::getFunctionType(), clang::ASTContext::getFunctionTypeWithExceptionSpec(), clang::NamedDecl::getIdentifier(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), getJumpDestInCurrentScope(), clang::CodeGen::ABIArgInfo::getKind(), clang::CXXRecordDecl::getLambdaCaptureDefault(), getLangOpts(), getLLVMContext(), getNaturalTypeAlignment(), clang::Decl::getNonClosureContext(), clang::Type::getNullability(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::FunctionDecl::getOverloadedOperator(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::Address::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), getPrologueSignature(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), getTarget(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::XRayInstrSet::has(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), clang::SanitizerSet::hasOneOf(), hasScalarEvaluationKind(), clang::CodeGen::CodeGenModule::imbueXRayAttrs(), clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, InitTempAlloca(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Address::invalid(), clang::CXXRecordDecl::isLambda(), clang::isLambdaCallOperator(), clang::FunctionDecl::isMain(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::IdentifierInfo::isStr(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), LambdaCaptureFields, LambdaThisCaptureField, clang::LCD_None, markAsIgnoreThreadCheckingAtRuntime(), clang::SanitizerSet::Mask, matchesStlAllocatorFn(), clang::NonNull, clang::OMF_dealloc, clang::OMF_initialize, PrologueCleanupDepth, ReturnBlock, ReturnValue, SanOpts, clang::SanitizerSet::set(), ShouldInstrumentFunction(), ShouldXRayInstrumentFunction(), clang::Decl::specific_attrs(), clang::CodeGen::EHScopeStack::stable_begin(), TCK_ConstructorCall, TCK_MemberCall, clang::FunctionDecl::usesSEHTry(), and clang::CodeGenOptions::XRayInstrumentationBundle.
Referenced by createAtExitStub(), EmitCfiCheckFail(), emitCopyToScratchpad(), emitCXXDestructor(), emitDestructorsFunction(), emitInterWarpCopyFunction(), emitProxyTaskFunction(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceInitFunction(), emitReduceScratchpadFunction(), emitShuffleAndReduceFunction(), emitTaskDupFunction(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), and StartObjCMethod().
void CodeGenFunction::StartObjCMethod | ( | const ObjCMethodDecl * | OMD, |
const ObjCContainerDecl * | CD | ||
) |
StartObjCMethod - Begin emission of an ObjCMethod.
This generates the LLVM function and sets the other context used by CodeGenFunction.
Definition at line 532 of file CGObjC.cpp.
References clang::CodeGen::CodeGenTypes::arrangeObjCMethodDeclaration(), CGM, CurGD, EHStack, emitARCRetainLoadOfScalar(), clang::CodeGen::CGObjCRuntime::GenerateMethod(), getARCCleanupKind(), clang::ObjCMethodDecl::getCmdDecl(), clang::Selector::getIdentifierInfoForSlot(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Decl::getLocation(), clang::ObjCMethodDecl::getLocEnd(), clang::ObjCMethodDecl::getLocStart(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), clang::ObjCMethodDecl::isInstanceMethod(), clang::IdentifierInfo::isStr(), clang::Selector::isUnarySelector(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and StartFunction().
Referenced by GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), GenerateObjCMethod(), and GenerateObjCSetter().
void CodeGenFunction::startOutlinedSEHHelper | ( | CodeGenFunction & | ParentCGF, |
bool | IsFilter, | ||
const Stmt * | OutlinedStmt | ||
) |
Arrange a function prototype that can be called by Windows exception handling personalities.
On Win64, the prototype looks like: RetTy func(void *EHPtrs, void *ParentFP);
Definition at line 1823 of file CGException.cpp.
References clang::Stmt::getLocStart().
void CodeGenFunction::StartThunk | ( | llvm::Function * | Fn, |
GlobalDecl | GD, | ||
const CGFunctionInfo & | FnInfo, | ||
bool | IsUnprototyped | ||
) |
Definition at line 225 of file CGVTables.cpp.
References clang::CodeGen::CGCXXABI::addImplicitStructorParams(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::Decl::getLocation(), clang::FunctionType::getReturnType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant | ( | DeclRefExpr * | refExpr | ) |
Try to emit a reference to the given value without producing it as an l-value.
This is actually more than an optimization: we can't produce an l-value for variables that we never actually captured in a block or lambda, which means const int variables or constexpr literals or similar.
Definition at line 1380 of file CGExpr.cpp.
References CEK_AsReferenceOnly, CEK_AsValueOnly, CEK_None, checkVarTypeForConstantEmission(), clang::ASTContext::DeclMustBeEmitted(), clang::CodeGen::ConstantEmitter::emitAbstract(), EmitDeclRefExprDbgValue(), clang::Expr::EvaluateAsLValue(), clang::Expr::EvaluateAsRValue(), clang::CodeGen::CodeGenFunction::ConstantEmission::forReference(), clang::CodeGen::CodeGenFunction::ConstantEmission::forValue(), getContext(), clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getLocation(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::Expr::EvalStatus::HasSideEffects, and clang::Expr::EvalResult::Val.
Referenced by tryEmitAsConstant().
CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant | ( | const MemberExpr * | ME | ) |
Definition at line 1455 of file CGExpr.cpp.
References tryEmitAsConstant(), and tryToConvertMemberExprToDeclRefExpr().
QualType CodeGenFunction::TypeOfSelfObject | ( | ) |
TypeOfSelfObject - Return type of object that this self represents.
Definition at line 1467 of file CGObjC.cpp.
References CurFuncDecl, clang::ASTContext::getCanonicalType(), getContext(), clang::ObjCObjectPointerType::getPointeeType(), and clang::ObjCMethodDecl::getSelfDecl().
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), GenerateObjCSetter(), and generateObjCSetterBody().
void CodeGenFunction::unprotectFromPeepholes | ( | PeepholeProtection | protection | ) |
Definition at line 2185 of file CodeGenFunction.cpp.
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::unbind().
Value * CodeGenFunction::vectorWrapScalar16 | ( | llvm::Value * | Op | ) |
Definition at line 6311 of file CGBuiltin.cpp.
References clang::CodeGen::Type.
|
friend |
Definition at line 230 of file CodeGenFunction.h.
llvm::AssertingVH<llvm::Instruction> clang::CodeGen::CodeGenFunction::AllocaInsertPt |
AllocaInsertPoint - This is an instruction in the entry block before which we prefer to insert allocas.
Definition at line 339 of file CodeGenFunction.h.
Referenced by FinishFunction(), InitTempAlloca(), and StartFunction().
In ARC, whether we should autorelease the return value.
Definition at line 467 of file CodeGenFunction.h.
Referenced by GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and StartFunction().
const CodeGen::CGBlockInfo* clang::CodeGen::CodeGenFunction::BlockInfo = nullptr |
Definition at line 479 of file CodeGenFunction.h.
Referenced by EmitParmDecl(), and getCaptureFieldType().
llvm::Value* clang::CodeGen::CodeGenFunction::BlockPointer = nullptr |
Definition at line 480 of file CodeGenFunction.h.
CGBuilderTy clang::CodeGen::CodeGenFunction::Builder |
Definition at line 262 of file CodeGenFunction.h.
Referenced by AddDirectArgument(), addMonoNonMonoModifier(), AddVariableConstraints(), AdjustObjCObjectType(), clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CallArgList::allocateArgumentMemory(), clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), clang::CodeGen::ApplyInlineDebugLocation::ApplyInlineDebugLocation(), ApplyNonVirtualAndVirtualOffset(), BuildAggStore(), BuildAppleKextVirtualCall(), castToBase(), castValueToType(), CheckAggExprForMemSetUse(), CoerceIntOrPtrToIntOrPtr(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), createPlaceholderSlot(), createRuntimeShuffleFunction(), DecodeAddrUsedInPrologue(), clang::CodeGen::CatchRetScope::Emit(), emitAddressAtOffset(), emitAddrOfFieldStorage(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitAndRegisterVariableArrayDimensions(), EmitAnnotationCall(), emitARCCopyOperation(), EmitARCDestroyStrong(), EmitARCDestroyWeak(), EmitARCInitWeak(), emitARCLoadOperation(), emitARCOperationAfterCall(), EmitARCRelease(), EmitARCRetainAutorelease(), EmitARCRetainBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), emitArgumentDemotion(), emitArrayDestroy(), emitArrayLength(), emitArraySubscriptGEP(), EmitAtomicLoad(), EmitAtomicUpdateValue(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBitTestIntrinsic(), EmitBlock(), EmitBlockAfterUses(), EmitBranch(), EmitBranchOnBoolExpr(), EmitBuiltinAvailable(), EmitCastToVoidPtr(), emitCatchDispatchBlock(), emitCatchPadBlock(), EmitCfiCheckFail(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCheckedMixedSignMultiply(), emitCheckHandlerCall(), EmitCheckValue(), EmitCleanup(), clang::CodeGen::ReductionCodeGen::emitCleanups(), EmitCommonNeonSISDBuiltinExpr(), EmitConditionalOperatorLValue(), EmitConstructorBody(), emitCopyToScratchpad(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitCriticalRegion(), emitCXXDestructor(), EmitCXXGuardedInitBranch(), EmitCXXNewAllocSize(), EmitDeclInvariant(), emitDestroy(), EmitExtendGCLifetime(), EmitExtVectorElementLValue(), EmitFAbs(), emitFilterDispatchBlock(), emitForStaticInitCall(), EmitFromInt(), EmitFromMemory(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), emitInterWarpCopyFunction(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), EmitLoadOfPointer(), EmitLoadOfReference(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitMemberPointerComparison(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), emitNonZeroVLAInit(), EmitNullabilityCheck(), EmitNullBaseClassInitialization(), EmitNullInitialization(), emitNumTeamsForTargetDirective(), emitNumThreadsForTargetDirective(), EmitObjCAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCThrowOperand(), emitOffloadingArraysArgument(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPArraySectionBase(), EmitOverflowIntrinsic(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitParallelCall(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), emitPostUpdateForReductionClause(), emitPrivatesInit(), emitProxyTaskFunction(), emitRangedBuiltin(), emitReduceCombFunction(), emitReduceFiniFunction(), emitReduceScratchpadFunction(), emitReductionListCopy(), EmitReturnBlock(), emitRoundPointerUpToAlignment(), emitRTtypeidCall(), EmitSanitizerStatReport(), EmitScalarFMAExpr(), EmitScalarRangeCheck(), emitShuffleAndReduceFunction(), EmitSignBit(), EmitStaticVarDecl(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughGlobalRegLValue(), EmitStoreThroughLValue(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), EmitThreadPrivateVarDeclLValue(), clang::CodeGen::emitThreadPrivateVarInit(), EmitToInt(), EmitToMemory(), EmitTrapCall(), EmitTrapCheck(), EmitTypeCheck(), EmitUnreachable(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVariablyModifiedType(), emitVoidPtrDirectVAArg(), emitVoidPtrVAArg(), emitWasmCatchPadBlock(), emitWriteback(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), EmitX86Abs(), EmitX86BitTestIntrinsic(), EmitX86CompressStore(), EmitX86ExpandLoad(), EmitX86FMAExpr(), EmitX86MaskedLoad(), EmitX86MaskedStore(), EmitX86MaskLogic(), EmitX86Muldq(), EmitX86ScalarSelect(), EmitX86Select(), EmitX86SExtMask(), EmitX86Ternlog(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), findBlockCapturedManagedEntities(), findDominatingStoreToReturnValue(), FindIvarInterface(), FinishFunction(), forConstantArrayExpansion(), clang::CodeGen::CallArgList::freeArgumentMemory(), GenerateCode(), GenerateCXXGlobalDtorsFunc(), GenerateCXXGlobalInitFunc(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), generateObjCSetterBody(), getArrayIndexingBound(), getBadTypeidFn(), getBundlesForCoroEnd(), getCancellationKind(), clang::CodeGen::getCriticalRegionLock(), GetGCAttrTypeForType(), getMaskVecValue(), getMasterThreadID(), getNonNullAttr(), getNVPTXBarrier(), getNVPTXLaneID(), getNVPTXWarpID(), clang::CodeGen::getOrCreateThreadPrivateCache(), clang::CodeGen::CGOpenMPRuntimeNVPTX::getParameterAddress(), getThreadLimit(), getTypeString(), getVLASize(), hasDefaultCXXMethodCC(), InitCatchParam(), isBlockVarRef(), isDeletingDtor(), isFullSizeType(), isWeakLinkedClass(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), clang::CodeGen::CGCXXABI::loadIncomingCXXThis(), loadToBegin(), clang::CodeGen::markAsGlobalTarget(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), PerformReturnAdjustment(), performTypeAdjustment(), protectFromPeepholes(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), clang::CodeGen::DominatingLLVMValue::restore(), rewriteInputConstraintReferences(), clang::CodeGen::DominatingLLVMValue::save(), SetupCleanupBlockActivation(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), shuffleAndStore(), SimplifyCleanupEntry(), StartFunction(), supportsSPMDExecutionMode(), tryEmitARCCopyWeakInit(), tryEmitFMulAdd(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), clang::CodeGen::ApplyDebugLocation::~ApplyDebugLocation(), clang::CodeGen::ApplyInlineDebugLocation::~ApplyInlineDebugLocation(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
VarBypassDetector clang::CodeGen::CodeGenFunction::Bypasses |
Definition at line 266 of file CodeGenFunction.h.
Referenced by EmitAutoVarAlloca(), and GenerateCode().
CGCapturedStmtInfo* clang::CodeGen::CodeGenFunction::CapturedStmtInfo = nullptr |
Definition at line 407 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CodeGenFunction::CGCapturedStmtRAII::CGCapturedStmtRAII(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitFunctionProlog(), clang::CodeGen::emitInlinedDirective(), emitOutlinedOrderedFunction(), emitReduceFiniFunction(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), getCancellationKind(), clang::CodeGen::getCriticalRegionLock(), and clang::CodeGen::CodeGenFunction::CGCapturedStmtRAII::~CGCapturedStmtRAII().
CodeGenModule& clang::CodeGen::CodeGenFunction::CGM |
Definition at line 257 of file CodeGenFunction.h.
Referenced by AddInitializerToStaticVarDecl(), AddVariableConstraints(), clang::CodeGen::CallArgList::allocateArgumentMemory(), AlwaysEmitXRayCustomEvents(), AlwaysEmitXRayTypedEvents(), ApplyNonVirtualAndVirtualOffset(), BuildAggStore(), BuildAppleKextVirtualCall(), buildFMulAdd(), BuildFunctionArgList(), CallBeginCatch(), canEmitDelegateCallArgs(), CoerceIntOrPtrToIntOrPtr(), commonEmitCXXMemberOrOperatorCall(), ConvertType(), ConvertTypeForMem(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), createCoroData(), createRuntimeShuffleFunction(), CreateTempAllocaForCoercion(), emitAddrOfFieldStorage(), EmitAnnotationCall(), emitARCCopyOperation(), emitARCLoadOperation(), emitARCStoreOperation(), emitARCValueOperation(), emitAtomicLibcall(), EmitAtomicOp(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBranchOnBoolExpr(), emitCatchDispatchBlock(), EmitCfiCheckFail(), EmitCfiCheckStub(), EmitCfiSlowPathCheck(), EmitCheck(), emitCheckHandlerCall(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), emitCommonOMPParallelDirective(), emitCommonOMPTargetDirective(), emitCommonOMPTeamsDirective(), EmitCompare(), EmitConditionalOperatorLValue(), EmitConstructorBody(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), EmitCXXGuardedInitBranch(), EmitCXXNewAllocSize(), EmitDecl(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), emitDeclTargetLinkVarDeclLValue(), EmitDestroyingObjectDelete(), EmitDirectCallee(), EmitDynamicCastToNull(), EmitExtVectorElementLValue(), EmitFAbs(), EmitFieldAnnotations(), emitFilterDispatchBlock(), emitGlobalDtorWithCXAAtExit(), emitGlobalDtorWithTLRegDtor(), clang::CodeGen::ReductionCodeGen::emitInitialization(), emitInitWithReductionInitializer(), EmitIvarOffset(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), EmitLoadOfReference(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForIvar(), EmitMemberInitializer(), EmitNewDeleteCall(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjectDelete(), emitOffloadingArrays(), emitOffloadingArraysArgument(), emitOMPArraySectionBase(), emitOMPAtomicCaptureExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), emitOutlinedFunctionPrologue(), EmitOverflowIntrinsic(), EmitParmDecl(), emitPointerArithmetic(), emitRangedBuiltin(), emitReductionCombiner(), emitReductionListCopy(), emitRTtypeidCall(), EmitSanitizerStatReport(), EmitScalarFMAExpr(), EmitScalarInit(), EmitScalarRangeCheck(), EmitSignBit(), EmitStaticVarDecl(), EmitStoreOfScalar(), EmitStoreThroughGlobalRegLValue(), EmitStoreThroughLValue(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitTeamsOutlinedFunction(), clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), EmitThreadPrivateVarDeclLValue(), EmitTrapCall(), EmitTrapCheck(), EmitTypeCheck(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarDecl(), emitVoidPtrDirectVAArg(), emitWriteback(), emitWritebackArg(), EmitX86CompressStore(), EmitX86ExpandLoad(), EmitX86FMAExpr(), EmitX86Ternlog(), EncodeAddrForUseInPrologue(), enterBlockScope(), EnterStructPointerForCoercedAccess(), FindIvarInterface(), findPeephole(), FinishFunction(), clang::CodeGen::CallArgList::freeArgumentMemory(), GenerateCode(), generateDestroyHelper(), clang::CodeGen::EHPersonality::get(), getAsmSrcLocInfo(), getBadCastFn(), getBadTypeidFn(), getBundlesForCoroEnd(), getCatchAllValue(), getClangCallTerminateFn(), GetGCAttrTypeForType(), getGetExceptionPtrFn(), getGuardAbortFn(), GetIntrinsic(), getItaniumDynamicCastFn(), getMaxAtomicAccessSize(), getNaturalTypeAlignment(), getNVPTXBarrier(), getNVPTXCTABarrier(), getNVPTXNumThreads(), getNVPTXThreadID(), getNVPTXWarpSize(), getRangeForType(), InitCatchParam(), isFullSizeType(), isTrivialFiller(), loadToBegin(), clang::CodeGen::markAsGlobalTarget(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), PerformReturnAdjustment(), clang::CodeGen::CGCallee::prepareConcreteCallee(), registerGlobalDtorWithAtExit(), clang::CodeGen::DominatingLLVMValue::save(), ShouldInstrumentFunction(), ShouldNullCheckClassCastValue(), ShouldXRayInstrumentFunction(), StartFunction(), StartObjCMethod(), supportsSPMDExecutionMode(), tryEmitFMulAdd(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), and ~CodeGenFunction().
const Decl* clang::CodeGen::CodeGenFunction::CurCodeDecl |
CurCodeDecl - This is the inner-most code context, which includes blocks.
Definition at line 297 of file CodeGenFunction.h.
Referenced by EmitLValueForLambdaField(), EmitParmDecl(), FinishFunction(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), isWeakLinkedClass(), LoadObjCSelf(), StartFunction(), tryRemoveRetainOfSelf(), and clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::~InlinedInheritingConstructorScope().
CGCoroInfo clang::CodeGen::CodeGenFunction::CurCoro |
Definition at line 310 of file CodeGenFunction.h.
Referenced by getBundlesForCoroEnd().
llvm::Function* clang::CodeGen::CodeGenFunction::CurFn = nullptr |
Definition at line 300 of file CodeGenFunction.h.
Referenced by addIfPresent(), EmitBlock(), EmitBlockAfterUses(), clang::CodeGen::CGOpenMPRuntimeNVPTX::emitFunctionProlog(), EmitIfUsed(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::emitUserDefinedReduction(), enterBlockScope(), FinishFunction(), clang::CodeGen::CGOpenMPRuntimeNVPTX::functionFinished(), GenerateCode(), GenerateObjCMethod(), GetAddrOfLabel(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), StartFunction(), and ~CodeGenFunction().
const CGFunctionInfo* clang::CodeGen::CodeGenFunction::CurFnInfo |
Definition at line 298 of file CodeGenFunction.h.
Referenced by FinishFunction(), and StartFunction().
const Decl* clang::CodeGen::CodeGenFunction::CurFuncDecl |
CurFuncDecl - Holds the Decl for the current outermost non-closure context.
Definition at line 295 of file CodeGenFunction.h.
Referenced by computeBlockInfo(), emitCommonOMPTargetDirective(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), LoadObjCSelf(), ShouldInstrumentFunction(), StartFunction(), TypeOfSelfObject(), and clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::~InlinedInheritingConstructorScope().
In C++, whether we are code generating a thunk.
This controls whether we should emit cleanups.
Definition at line 464 of file CodeGenFunction.h.
Referenced by EmitParmDecl(), and StartFunction().
GlobalDecl clang::CodeGen::CodeGenFunction::CurGD |
CurGD - The GlobalDecl for the current function being compiled.
Definition at line 317 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGCXXABI::buildThisParam(), emitCXXDestructor(), EmitMemberInitializer(), GenerateCode(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), performTypeAdjustment(), StartObjCMethod(), and clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::~InlinedInheritingConstructorScope().
EHScopeStack::stable_iterator clang::CodeGen::CodeGenFunction::CurrentCleanupScopeDepth |
Definition at line 755 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope().
llvm::Instruction* clang::CodeGen::CodeGenFunction::CurrentFuncletPad = nullptr |
Definition at line 493 of file CodeGenFunction.h.
Referenced by emitCatchPadBlock(), emitWasmCatchPadBlock(), getBundlesForCoroEnd(), and getClangCallTerminateFn().
const NamedDecl* clang::CodeGen::CodeGenFunction::CurSEHParent = nullptr |
Definition at line 473 of file CodeGenFunction.h.
Referenced by clang::CodeGen::EHPersonality::get(), and StartFunction().
|
static |
Definition at line 3794 of file CodeGenFunction.h.
Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), EmitObjCMRRAutoreleasePoolPop(), enterBlockScope(), and pushCaptureCleanup().
|
static |
Definition at line 3795 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), EmitObjCMRRAutoreleasePoolPop(), and getDestroyer().
|
static |
Definition at line 3796 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), EmitObjCMRRAutoreleasePoolPop(), and getDestroyer().
|
static |
Definition at line 2529 of file CodeGenFunction.h.
Referenced by getDestroyer().
|
static |
Definition at line 3798 of file CodeGenFunction.h.
Referenced by emitAutoVarTypeCleanup(), EmitStaticVarDecl(), and getDestroyer().
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::EHResumeBlock = nullptr |
EHResumeBlock - Unified block containing a call to llvm.eh.resume.
Definition at line 531 of file CodeGenFunction.h.
Referenced by FinishFunction().
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 539 of file CodeGenFunction.h.
EHScopeStack clang::CodeGen::CodeGenFunction::EHStack |
Definition at line 489 of file CodeGenFunction.h.
Referenced by CallBeginCatch(), EmitAutoVarCleanups(), emitAutoVarTypeCleanup(), EmitBaseInitializer(), emitCXXDestructMethod(), EmitLabel(), EmitObjCAutoreleasePoolCleanup(), EmitObjectDelete(), EmitParmDecl(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterBlockScope(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), FinishFunction(), getClangCallTerminateFn(), InitCatchParam(), isTrivialFiller(), clang::CodeGen::RegionCodeGenTy::operator()(), pushLifetimeExtendedDestroy(), pushStackRestore(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope(), SetupCleanupBlockActivation(), SimplifyForwardingBlocks(), StartFunction(), StartObjCMethod(), and clang::CodeGen::ReductionCodeGen::usesReductionInitializer().
|
static |
Definition at line 3797 of file CodeGenFunction.h.
Referenced by EmitObjCMRRAutoreleasePoolPop(), and enterBlockScope().
llvm::Value* clang::CodeGen::CodeGenFunction::ExceptionSlot = nullptr |
The exception slot.
All landing pads write the current exception pointer into this alloca.
Definition at line 535 of file CodeGenFunction.h.
CGBlockInfo* clang::CodeGen::CodeGenFunction::FirstBlockInfo = nullptr |
FirstBlockInfo - The head of a singly-linked-list of block layouts.
Definition at line 528 of file CodeGenFunction.h.
Referenced by enterBlockScope(), and ~CodeGenFunction().
QualType clang::CodeGen::CodeGenFunction::FnRetTy |
True if the current function is an outlined SEH helper.
This can be a finally block or filter expression.
Definition at line 477 of file CodeGenFunction.h.
True if CodeGen currently emits code implementing sanitizer checks.
Definition at line 452 of file CodeGenFunction.h.
Referenced by EmitCheck(), clang::CodeGen::CodeGenFunction::SanitizerScope::SanitizerScope(), and clang::CodeGen::CodeGenFunction::SanitizerScope::~SanitizerScope().
Definition at line 482 of file CodeGenFunction.h.
Referenced by getCaptureFieldType(), and StartFunction().
FieldDecl* clang::CodeGen::CodeGenFunction::LambdaThisCaptureField = nullptr |
Definition at line 483 of file CodeGenFunction.h.
Referenced by StartFunction().
llvm::SmallVector<char, 256> clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupStack |
Definition at line 490 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope(), and ~CodeGenFunction().
LoopInfoStack clang::CodeGen::CodeGenFunction::LoopStack |
Definition at line 261 of file CodeGenFunction.h.
Referenced by emitSimdlenSafelenClause().
unsigned clang::CodeGen::CodeGenFunction::NextCleanupDestIndex = 1 |
Definition at line 525 of file CodeGenFunction.h.
Referenced by getJumpDestForLabel().
Address clang::CodeGen::CodeGenFunction::NormalCleanupDest = Address::invalid() |
i32s containing the indexes of the cleanup destinations.
Definition at line 523 of file CodeGenFunction.h.
Referenced by addIfPresent(), and destroyOptimisticNormalEntry().
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 487 of file CodeGenFunction.h.
Referenced by EmitAutoVarAlloca().
SmallVector<llvm::Value*, 8> clang::CodeGen::CodeGenFunction::ObjCEHValueStack |
ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows.
Definition at line 562 of file CodeGenFunction.h.
EHScopeStack::stable_iterator clang::CodeGen::CodeGenFunction::PrologueCleanupDepth |
PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters.
Definition at line 321 of file CodeGenFunction.h.
Referenced by FinishFunction(), and StartFunction().
JumpDest clang::CodeGen::CodeGenFunction::ReturnBlock |
ReturnBlock - Unified return block.
Definition at line 324 of file CodeGenFunction.h.
Referenced by EmitReturnBlock(), FinishFunction(), and StartFunction().
Address clang::CodeGen::CodeGenFunction::ReturnValue = Address::invalid() |
ReturnValue - The temporary alloca to hold the return value.
This is invalid iff the function has no return value.
Definition at line 328 of file CodeGenFunction.h.
Referenced by addIfPresent(), EmitAutoVarAlloca(), emitProxyTaskFunction(), findDominatingStoreToReturnValue(), generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), performTypeAdjustment(), StartFunction(), and clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::~InlinedInheritingConstructorScope().
SanitizerSet clang::CodeGen::CodeGenFunction::SanOpts |
Sanitizers enabled for this function.
Definition at line 449 of file CodeGenFunction.h.
Referenced by EmitCfiCheckFail(), EmitCheck(), EmitConstructorBody(), EmitNullabilityCheck(), emitPointerArithmetic(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitUnreachable(), EmitVariablyModifiedType(), GenerateCode(), sanitizePerformTypeCheck(), ShouldNullCheckClassCastValue(), StartFunction(), and tryEmitFMulAdd().
Whether we processed a Microsoft-style asm block during CodeGen.
These can potentially set the return value.
Definition at line 471 of file CodeGenFunction.h.
Referenced by GenerateCode().
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 544 of file CodeGenFunction.h.
llvm::Value* clang::CodeGen::CodeGenFunction::SEHInfo = nullptr |
Value returned by __exception_info intrinsic.
Definition at line 547 of file CodeGenFunction.h.
llvm::SmallVector<const JumpDest *, 2> clang::CodeGen::CodeGenFunction::SEHTryEpilogueStack |
Definition at line 491 of file CodeGenFunction.h.
const TargetInfo& clang::CodeGen::CodeGenFunction::Target |
Definition at line 258 of file CodeGenFunction.h.
Referenced by EmitBuiltinAvailable().