clang
19.0.0git
|
CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code. More...
#include "/home/runner/work/llvm/llvm/repo/clang/lib/CodeGen/CodeGenFunction.h"
Classes | |
class | AbstractCallee |
An abstract representation of regular/ObjC call/message targets. More... | |
struct | AllocaTrackerRAII |
class | ArrayInitLoopExprScope |
The scope of an ArrayInitLoopExpr. More... | |
class | AutoVarEmission |
struct | AwaitSuspendWrapperInfo |
class | CallLifetimeEnd |
class | CGCapturedStmtInfo |
API for captured statement code generation. More... | |
class | CGCapturedStmtRAII |
RAII for correct setting/restoring of CapturedStmtInfo. More... | |
struct | CGCoroInfo |
class | CGFPOptionsRAII |
struct | CleanupDeactivationScope |
class | ConditionalEvaluation |
An object to manage conditionally-evaluated expressions. More... | |
class | ConstantEmission |
class | CurrentBuiltinIDRAII |
Class to manage the BuiltinID for the current builtin expression during processing in EmitBuiltinExpr. More... | |
struct | CXXDefaultArgExprScope |
class | CXXDefaultInitExprScope |
The scope of a CXXDefaultInitExpr. More... | |
struct | DeferredDeactivateCleanup |
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... | |
struct | MultiVersionResolverOption |
struct | OMPBuilderCBHelpers |
class | OMPCancelStackRAII |
Controls insertion of cancellation exit blocks in worksharing constructs. More... | |
class | OMPLocalDeclMapRAII |
Save/restore original map of previously emitted local vars in case when we need to duplicate emission of the same code several times in the same function for OpenMP code. More... | |
class | OMPMapVars |
The class used to assign some variables some temporarily addresses. More... | |
class | OMPPrivateScope |
The scope used to remap some variables as private in the OpenMP loop body (or other captured region emitted without outlining), and to restore old vars back on exit. More... | |
struct | OMPTargetDataInfo |
class | OpaqueValueMapping |
An RAII object to set (and then clear) a mapping for an OpaqueValueExpr. More... | |
class | OpaqueValueMappingData |
A non-RAII class containing all the information about a bound opaque value. More... | |
class | ParamValue |
class | ParentLoopDirectiveForScanRegion |
Manages parent directive for scan directives. More... | |
class | PeepholeProtection |
An object which temporarily prevents a value from being destroyed by aggressive peephole optimizations that assume that all uses of a value have been realized in the IR. More... | |
struct | PrototypeWrapper |
class | RunCleanupsScope |
Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited. More... | |
class | SanitizerScope |
RAII object to set/unset CodeGenFunction::IsSanitizerScope. More... | |
class | StmtExprEvaluation |
An RAII object to record that we're evaluating a statement expression. More... | |
struct | VlaSizePair |
struct | VPtr |
Struct with all information about dynamic [sub]class needed to set vptr. More... | |
Public 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 | inSuspendBlock () const |
llvm::Function * | generateAwaitSuspendWrapper (Twine const &CoroName, Twine const &SuspendPointName, CoroutineSuspendExpr const &S) |
bool | hasLabelBeenSeenInCurrentScope () const |
Return true if a label was seen in the current scope. More... | |
llvm::Instruction * | getPostAllocaInsertPoint () |
Return PostAllocaInsertPt. More... | |
bool | checkIfFunctionMustProgress () |
Returns true if a function must make progress, which means the mustprogress attribute can be added. More... | |
bool | checkIfLoopMustProgress (const Expr *, bool HasEmptyBody) |
Returns true if a loop must make progress, which means the mustprogress attribute can be added. 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, potentially with an active flag. More... | |
template<class T , class... As> | |
void | pushCleanupAfterFullExprWithActiveFlag (CleanupKind Kind, RawAddress ActiveFlag, As... A) |
template<class T , class... As> | |
void | pushCleanupAndDeferDeactivation (CleanupKind Kind, As... A) |
void | initFullExprCleanup () |
Set up the last cleanup that was pushed as a conditional full-expression cleanup. More... | |
void | initFullExprCleanupWithFlag (RawAddress ActiveFlag) |
RawAddress | createCleanupActiveFlag () |
void | PushDestructorCleanup (QualType T, Address Addr) |
PushDestructorCleanup - Push a cleanup to call the complete-object destructor of an object of the given type at the given address. More... | |
void | PushDestructorCleanup (const CXXDestructorDecl *Dtor, QualType T, Address Addr) |
PushDestructorCleanup - Push a cleanup to call the complete-object variant of the given destructor on the object at the given address. More... | |
void | PopCleanupBlock (bool FallThroughIsBranchThrough=false, bool ForDeactivation=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, CodeGenFunction &CGF) |
void | incrementProfileCounter (const Stmt *S, llvm::Value *StepV=nullptr) |
Increment the profiler's counter for the given statement by StepV . More... | |
bool | isMCDCCoverageEnabled () const |
void | maybeCreateMCDCCondBitmap () |
Allocate a temp value on the stack that MCDC can use to track condition results. More... | |
bool | isBinaryLogicalOp (const Expr *E) const |
void | maybeResetMCDCCondBitmap (const Expr *E) |
Zero-init the MCDC temp value. More... | |
void | maybeUpdateMCDCTestVectorBitmap (const Expr *E) |
Increment the profiler's counter for the given expression by StepV . More... | |
void | maybeUpdateMCDCCondBitmap (const Expr *E, llvm::Value *Val) |
Update the MCDC temp value with the condition's evaluated result. 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... | |
unsigned | getCurrentBuiltinID () const |
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 () |
RawAddress | 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 a NormalAndEHCleanup 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 | pushDestroyAndDeferDeactivation (QualType::DestructionKind dtorKind, Address addr, QualType type) |
void | pushDestroyAndDeferDeactivation (CleanupKind cleanupKind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray) |
void | pushLifetimeExtendedDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray) |
void | pushCallObjectDeleteCleanup (const FunctionDecl *OperatorDelete, llvm::Value *CompletePtr, QualType ElementType) |
void | pushStackRestore (CleanupKind kind, Address SPMem) |
void | pushKmpcAllocFree (CleanupKind Kind, std::pair< llvm::Value *, llvm::Value * > AddrSizePair) |
void | emitDestroy (Address addr, QualType type, Destroyer *destroyer, bool useEHCleanupForArray) |
emitDestroy - Immediately perform the destruction of the given object. 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, bool CanThrow) |
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, bool CanThrow) |
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) |
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 | markAsIgnoreThreadCheckingAtRuntime (llvm::Function *Fn) |
Annotate the function with an attribute that disables TSan checking at runtime. More... | |
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 (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, const CGFunctionInfo *CallOpFnInfo=nullptr, llvm::Constant *CallOpFn=nullptr) |
void | EmitLambdaBlockInvokeBody () |
void | EmitLambdaStaticInvokeBody (const CXXMethodDecl *MD) |
void | EmitLambdaDelegatingInvokeBody (const CXXMethodDecl *MD, CallArgList &CallArgs) |
void | EmitLambdaInAllocaImplFn (const CXXMethodDecl *CallOp, const CGFunctionInfo **ImplFnInfo, llvm::Function **ImplFn) |
void | EmitLambdaInAllocaCallOpBody (const CXXMethodDecl *MD) |
void | EmitLambdaVLACapture (const VariableArrayType *VAT, LValue LV) |
void | EmitAsanPrologueOrEpilogue (bool Prologue) |
llvm::DebugLoc | EmitReturnBlock () |
Emit the unified return block, trying to avoid its emission when possible. 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::FunctionCallee Callee, const ThunkInfo *Thunk, bool IsUnprototyped) |
void | FinishThunk () |
void | EmitMustTailThunk (GlobalDecl GD, llvm::Value *AdjustedThisPtr, llvm::FunctionCallee Callee) |
Emit a musttail call for a thunk with a potentially adjusted this pointer. 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, Address 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, llvm::Type *VTableTy, 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 | ShouldSkipSanitizerInstrumentation () |
ShouldSkipSanitizerInstrumentation - Return true if the current function should not be instrumented with sanitizers. 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::ConstantInt * | getUBSanFunctionTypeHash (QualType T) const |
Return a type hash constant for a function instrumented by -fsanitize=function. 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... | |
Address | mergeAddressesInConditionalExpr (Address LHS, Address RHS, llvm::BasicBlock *LHSBlock, llvm::BasicBlock *RHSBlock, llvm::BasicBlock *MergeBlock, QualType MergedType) |
Address | makeNaturalAddressForPointer (llvm::Value *Ptr, QualType T, CharUnits Alignment=CharUnits::Zero(), bool ForPointeeType=false, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, KnownNonNull_t IsKnownNonNull=NotKnownNonNull) |
Construct an address with the natural alignment of T. 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 | MakeRawAddrLValue (llvm::Value *V, QualType T, CharUnits Alignment, AlignmentSource Source=AlignmentSource::Type) |
Same as MakeAddrLValue above except that the pointer is known to be unsigned. More... | |
LValue | MakeAddrLValueWithoutTBAA (Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type) |
LValue | MakeNaturalAlignPointeeAddrLValue (llvm::Value *V, QualType T) |
Given a value of type T* that may not be to a complete object, construct an l-value with the natural pointee alignment of T. More... | |
LValue | MakeNaturalAlignAddrLValue (llvm::Value *V, QualType T) |
LValue | MakeNaturalAlignPointeeRawAddrLValue (llvm::Value *V, QualType T) |
Same as MakeNaturalAlignPointeeAddrLValue except that the pointer is known to be unsigned. More... | |
LValue | MakeNaturalAlignRawAddrLValue (llvm::Value *V, QualType T) |
Address | EmitLoadOfReference (LValue RefLVal, LValueBaseInfo *PointeeBaseInfo=nullptr, TBAAAccessInfo *PointeeTBAAInfo=nullptr) |
LValue | EmitLoadOfReferenceLValue (LValue RefLVal) |
LValue | EmitLoadOfReferenceLValue (Address RefAddr, QualType RefTy, AlignmentSource Source=AlignmentSource::Type) |
Address | EmitLoadOfPointer (Address Ptr, const PointerType *PtrTy, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr) |
Load a pointer with type PtrTy stored at address Ptr . More... | |
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... | |
RawAddress | CreateTempAlloca (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr, RawAddress *Alloca=nullptr) |
CreateTempAlloca - This creates a alloca and inserts it into the entry block. More... | |
RawAddress | CreateTempAllocaWithoutCast (llvm::Type *Ty, CharUnits align, const Twine &Name="tmp", llvm::Value *ArraySize=nullptr) |
CreateTempAlloca - This creates a alloca and inserts it into the entry block. More... | |
RawAddress | CreateDefaultAlignTempAlloca (llvm::Type *Ty, const Twine &Name="tmp") |
CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type. More... | |
RawAddress | CreateIRTemp (QualType T, const Twine &Name="tmp") |
CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment. More... | |
RawAddress | CreateMemTemp (QualType T, const Twine &Name="tmp", RawAddress *Alloca=nullptr) |
CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space. More... | |
RawAddress | CreateMemTemp (QualType T, CharUnits Align, const Twine &Name="tmp", RawAddress *Alloca=nullptr) |
RawAddress | CreateMemTempWithoutCast (QualType T, const Twine &Name="tmp") |
CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen without casting it to the default address space. More... | |
RawAddress | CreateMemTempWithoutCast (QualType T, CharUnits Align, const Twine &Name="tmp") |
AggValueSlot | CreateAggTemp (QualType T, const Twine &Name="tmp", RawAddress *Alloca=nullptr) |
CreateAggTemp - Create a temporary memory object for the given aggregate type. 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... | |
llvm::Value * | EmitWithOriginalRHSBitfieldAssignment (const BinaryOperator *E, llvm::Value **Previous, QualType *SrcType) |
Retrieve the implicit cast expression of the rhs in a binary operator expression by passing pointers to Value and QualType This is used for implicit bitfield conversion checks, which must compare with the value before potential truncation. More... | |
void | EmitBitfieldConversionCheck (llvm::Value *Src, QualType SrcType, llvm::Value *Dst, QualType DstType, const CGBitFieldInfo &Info, SourceLocation Loc) |
Emit a check that an [implicit] conversion of a bitfield. 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 | getOverlapForReturnValue () |
Determine whether a return value slot may overlap some other object. More... | |
AggValueSlot::Overlap_t | getOverlapForFieldInit (const FieldDecl *FD) |
Determine whether a field initialization may overlap some other object. More... | |
AggValueSlot::Overlap_t | getOverlapForBaseInit (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, AggValueSlot ThisAVS, const CXXConstructExpr *E) |
void | EmitCXXConstructorCall (const CXXConstructorDecl *D, CXXCtorType Type, bool ForVirtualBase, bool Delegating, Address This, CallArgList &Args, AggValueSlot::Overlap_t Overlap, SourceLocation Loc, bool NewPointerIsChecked) |
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, QualType ThisTy) |
void | EmitNewArrayInitializer (const CXXNewExpr *E, QualType elementType, llvm::Type *ElementTy, Address NewPtr, llvm::Value *NumElements, llvm::Value *AllocSizeWithoutCookie) |
void | EmitCXXTemporary (const CXXTemporary *Temporary, QualType TempType, Address Ptr) |
Emits all the code to cause the given temporary to be cleaned up. More... | |
void | EmitSehCppScopeBegin () |
void | EmitSehCppScopeEnd () |
void | EmitSehTryScopeBegin () |
void | EmitSehTryScopeEnd () |
llvm::Value * | EmitLifetimeStart (llvm::TypeSize 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, LValue LV, QualType Type, SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr) |
void | EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, Address Addr, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr) |
void | EmitTypeCheck (TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V, QualType Type, CharUnits Alignment=CharUnits::Zero(), SanitizerSet SkippedChecks=SanitizerSet(), llvm::Value *ArraySize=nullptr) |
Emit a check that V is the address of storage of the appropriate size and alignment for an object of type Type (or if ArraySize is provided, for an array of that bound). 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... | |
void | EmitBoundsCheckImpl (const Expr *E, llvm::Value *Bound, llvm::Value *Index, QualType IndexType, QualType IndexedType, bool Accessed) |
const FieldDecl * | FindFlexibleArrayMemberFieldAndOffset (ASTContext &Ctx, const RecordDecl *RD, const FieldDecl *FAMDecl, uint64_t &Offset) |
const FieldDecl * | FindCountedByField (const FieldDecl *FD) |
Find the FieldDecl specified in a FAM's "counted_by" attribute. More... | |
llvm::Value * | EmitCountedByFieldExpr (const Expr *Base, const FieldDecl *FAMDecl, const FieldDecl *CountDecl) |
Build an expression accessing the "counted_by" field. More... | |
llvm::Value * | EmitScalarPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre) |
ComplexPairTy | EmitComplexPrePostIncDec (const UnaryOperator *E, LValue LV, bool isInc, bool isPre) |
llvm::DebugLoc | SourceLocToDebugLoc (SourceLocation Location) |
Converts Location to a DebugLoc, if debug information is enabled. More... | |
unsigned | getDebugInfoFIndex (const RecordDecl *Rec, unsigned FieldIndex) |
Get the record field index as represented in debug info. 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 | emitAlignmentAssumptionCheck (llvm::Value *Ptr, QualType Ty, SourceLocation Loc, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue, llvm::Value *TheCheck, llvm::Instruction *Assumption) |
void | emitAlignmentAssumption (llvm::Value *PtrValue, QualType Ty, SourceLocation Loc, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr) |
void | emitAlignmentAssumption (llvm::Value *PtrValue, const Expr *E, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue=nullptr) |
void | EmitStopPoint (const Stmt *S) |
EmitStopPoint - Emit a debug stoppoint if we are emitting debug info. More... | |
void | EmitStmt (const Stmt *S, ArrayRef< const Attr * > Attrs=std::nullopt) |
EmitStmt - Emit the code for the statement. More... | |
bool | EmitSimpleStmt (const Stmt *S, ArrayRef< const Attr * > Attrs) |
EmitSimpleStmt - Try to emit a "simple" statement which does not necessarily require an insertion point or debug information; typically because the statement amounts to a jump or a container of other statements. 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=std::nullopt) |
void | EmitDoStmt (const DoStmt &S, ArrayRef< const Attr * > Attrs=std::nullopt) |
void | EmitForStmt (const ForStmt &S, ArrayRef< const Attr * > Attrs=std::nullopt) |
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, ArrayRef< const Attr * > Attrs) |
void | EmitCaseStmt (const CaseStmt &S, ArrayRef< const Attr * > Attrs) |
void | EmitCaseStmtRange (const CaseStmt &S, ArrayRef< const Attr * > Attrs) |
EmitCaseStmtRange - If case statement range is not too big then add multiple cases to switch instruction, one for each value within the range. 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 | VolatilizeTryBlocks (llvm::BasicBlock *BB, llvm::SmallPtrSet< llvm::BasicBlock *, 10 > &V) |
void | pushSEHCleanup (CleanupKind kind, llvm::Function *FinallyFunc) |
void | startOutlinedSEHHelper (CodeGenFunction &ParentCGF, bool IsFilter, const Stmt *OutlinedStmt) |
Arrange a function prototype that can be called by Windows exception handling personalities. 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=std::nullopt) |
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, SourceLocation Loc) |
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 OMPUseDevicePtrClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, llvm::Value * > CaptureDeviceAddrMap) |
void | EmitOMPUseDeviceAddrClause (const OMPUseDeviceAddrClause &C, OMPPrivateScope &PrivateScope, const llvm::DenseMap< const ValueDecl *, llvm::Value * > CaptureDeviceAddrMap) |
bool | EmitOMPCopyinClause (const OMPExecutableDirective &D) |
Emit code for copyin clause in D directive. 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, bool ForInscan=false) |
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 | processInReduction (const OMPExecutableDirective &S, OMPTaskDataTy &Data, CodeGenFunction &CGF, const CapturedStmt *CS, OMPPrivateScope &Scope) |
void | EmitOMPMetaDirective (const OMPMetaDirective &S) |
void | EmitOMPParallelDirective (const OMPParallelDirective &S) |
void | EmitOMPSimdDirective (const OMPSimdDirective &S) |
void | EmitOMPTileDirective (const OMPTileDirective &S) |
void | EmitOMPUnrollDirective (const OMPUnrollDirective &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 | EmitOMPMaskedDirective (const OMPMaskedDirective &S) |
void | EmitOMPCriticalDirective (const OMPCriticalDirective &S) |
void | EmitOMPParallelForDirective (const OMPParallelForDirective &S) |
void | EmitOMPParallelForSimdDirective (const OMPParallelForSimdDirective &S) |
void | EmitOMPParallelSectionsDirective (const OMPParallelSectionsDirective &S) |
void | EmitOMPParallelMasterDirective (const OMPParallelMasterDirective &S) |
void | EmitOMPTaskDirective (const OMPTaskDirective &S) |
void | EmitOMPTaskyieldDirective (const OMPTaskyieldDirective &S) |
void | EmitOMPErrorDirective (const OMPErrorDirective &S) |
void | EmitOMPBarrierDirective (const OMPBarrierDirective &S) |
void | EmitOMPTaskwaitDirective (const OMPTaskwaitDirective &S) |
void | EmitOMPTaskgroupDirective (const OMPTaskgroupDirective &S) |
void | EmitOMPFlushDirective (const OMPFlushDirective &S) |
void | EmitOMPDepobjDirective (const OMPDepobjDirective &S) |
void | EmitOMPScanDirective (const OMPScanDirective &S) |
void | EmitOMPOrderedDirective (const OMPOrderedDirective &S) |
void | EmitOMPAtomicDirective (const OMPAtomicDirective &S) |
void | EmitOMPTargetDirective (const OMPTargetDirective &S) |
void | EmitOMPTargetDataDirective (const OMPTargetDataDirective &S) |
void | EmitOMPTargetEnterDataDirective (const OMPTargetEnterDataDirective &S) |
void | EmitOMPTargetExitDataDirective (const OMPTargetExitDataDirective &S) |
void | EmitOMPTargetUpdateDirective (const OMPTargetUpdateDirective &S) |
void | EmitOMPTargetParallelDirective (const OMPTargetParallelDirective &S) |
void | EmitOMPTargetParallelForDirective (const OMPTargetParallelForDirective &S) |
void | EmitOMPTeamsDirective (const OMPTeamsDirective &S) |
void | EmitOMPCancellationPointDirective (const OMPCancellationPointDirective &S) |
void | EmitOMPCancelDirective (const OMPCancelDirective &S) |
void | EmitOMPTaskLoopBasedDirective (const OMPLoopDirective &S) |
void | EmitOMPTaskLoopDirective (const OMPTaskLoopDirective &S) |
void | EmitOMPTaskLoopSimdDirective (const OMPTaskLoopSimdDirective &S) |
void | EmitOMPMasterTaskLoopDirective (const OMPMasterTaskLoopDirective &S) |
void | EmitOMPMasterTaskLoopSimdDirective (const OMPMasterTaskLoopSimdDirective &S) |
void | EmitOMPParallelMasterTaskLoopDirective (const OMPParallelMasterTaskLoopDirective &S) |
void | EmitOMPParallelMasterTaskLoopSimdDirective (const OMPParallelMasterTaskLoopSimdDirective &S) |
void | EmitOMPDistributeDirective (const OMPDistributeDirective &S) |
void | EmitOMPDistributeParallelForDirective (const OMPDistributeParallelForDirective &S) |
void | EmitOMPDistributeParallelForSimdDirective (const OMPDistributeParallelForSimdDirective &S) |
void | EmitOMPDistributeSimdDirective (const OMPDistributeSimdDirective &S) |
void | EmitOMPTargetParallelForSimdDirective (const OMPTargetParallelForSimdDirective &S) |
void | EmitOMPTargetSimdDirective (const OMPTargetSimdDirective &S) |
void | EmitOMPTeamsDistributeDirective (const OMPTeamsDistributeDirective &S) |
void | EmitOMPTeamsDistributeSimdDirective (const OMPTeamsDistributeSimdDirective &S) |
void | EmitOMPTeamsDistributeParallelForSimdDirective (const OMPTeamsDistributeParallelForSimdDirective &S) |
void | EmitOMPTeamsDistributeParallelForDirective (const OMPTeamsDistributeParallelForDirective &S) |
void | EmitOMPTargetTeamsDirective (const OMPTargetTeamsDirective &S) |
void | EmitOMPTargetTeamsDistributeDirective (const OMPTargetTeamsDistributeDirective &S) |
void | EmitOMPTargetTeamsDistributeParallelForDirective (const OMPTargetTeamsDistributeParallelForDirective &S) |
void | EmitOMPTargetTeamsDistributeParallelForSimdDirective (const OMPTargetTeamsDistributeParallelForSimdDirective &S) |
void | EmitOMPTargetTeamsDistributeSimdDirective (const OMPTargetTeamsDistributeSimdDirective &S) |
void | EmitOMPGenericLoopDirective (const OMPGenericLoopDirective &S) |
void | EmitOMPParallelGenericLoopDirective (const OMPLoopDirective &S) |
void | EmitOMPTargetParallelGenericLoopDirective (const OMPTargetParallelGenericLoopDirective &S) |
Emit combined directive 'target parallel loop' as if its constituent constructs are 'target', 'parallel', and 'for'. More... | |
void | EmitOMPTargetTeamsGenericLoopDirective (const OMPTargetTeamsGenericLoopDirective &S) |
void | EmitOMPTeamsGenericLoopDirective (const OMPTeamsGenericLoopDirective &S) |
void | EmitOMPInteropDirective (const OMPInteropDirective &S) |
void | EmitOMPParallelMaskedDirective (const OMPParallelMaskedDirective &S) |
llvm::CanonicalLoopInfo * | EmitOMPCollapsedCanonicalLoopNest (const Stmt *S, int Depth) |
Emit the Stmt S and return its topmost canonical loop, if any. More... | |
void | EmitOMPCanonicalLoop (const OMPCanonicalLoop *S) |
Emit an OMPCanonicalLoop using the OpenMPIRBuilder. More... | |
void | EmitOMPInnerLoop (const OMPExecutableDirective &S, bool RequiresCleanup, const Expr *LoopCond, const Expr *IncExpr, const llvm::function_ref< void(CodeGenFunction &)> BodyGen, const llvm::function_ref< void(CodeGenFunction &)> PostIncGen) |
Emit inner loop of the worksharing/simd construct. 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) |
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... | |
void | EmitOpenACCComputeConstruct (const OpenACCComputeConstruct &S) |
llvm::Value * | EmitNonNullRValueCheck (RValue RV, QualType T) |
Create a check that a scalar RValue is non-null. 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, KnownNonNull_t IsKnownNonNull=NotKnownNonNull) |
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 | EmitMatrixSubscriptExpr (const MatrixSubscriptExpr *E) |
LValue | EmitArraySectionExpr (const ArraySectionExpr *E, bool IsLowerBound=true) |
LValue | EmitExtVectorElementExpr (const ExtVectorElementExpr *E) |
LValue | EmitMemberExpr (const MemberExpr *E) |
LValue | EmitObjCIsaExpr (const ObjCIsaExpr *E) |
LValue | EmitCompoundLiteralLValue (const CompoundLiteralExpr *E) |
LValue | EmitInitListLValue (const InitListExpr *E) |
void | EmitIgnoredConditionalOperator (const AbstractConditionalOperator *E) |
LValue | EmitConditionalOperatorLValue (const AbstractConditionalOperator *E) |
LValue | EmitCastLValue (const CastExpr *E) |
EmitCastLValue - Casts are never lvalues unless that cast is to a reference type. 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) |
llvm::Value * | emitScalarConstant (const ConstantEmission &Constant, Expr *E) |
RValue | EmitPseudoObjectRValue (const PseudoObjectExpr *e, AggValueSlot slot=AggValueSlot::ignored()) |
LValue | EmitPseudoObjectLValue (const PseudoObjectExpr *e) |
llvm::Value * | EmitIvarOffset (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar) |
llvm::Value * | EmitIvarOffsetAsPointerDiff (const ObjCInterfaceDecl *Interface, const ObjCIvarDecl *Ivar) |
LValue | EmitLValueForField (LValue Base, const FieldDecl *Field) |
LValue | EmitLValueForLambdaField (const FieldDecl *Field) |
LValue | EmitLValueForLambdaField (const FieldDecl *Field, llvm::Value *ThisValue) |
Given that we are currently emitting a lambda, emit an l-value for one of its members. 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 | EmitCXXTypeidLValue (const CXXTypeidExpr *E) |
LValue | EmitCXXUuidofLValue (const CXXUuidofExpr *E) |
LValue | EmitObjCMessageExprLValue (const ObjCMessageExpr *E) |
LValue | EmitObjCIvarRefLValue (const ObjCIvarRefExpr *E) |
LValue | EmitStmtExprLValue (const StmtExpr *E) |
LValue | EmitPointerToDataMemberBinaryExpr (const BinaryOperator *E) |
LValue | EmitObjCSelectorLValue (const ObjCSelectorExpr *E) |
void | EmitDeclRefExprDbgValue (const DeclRefExpr *E, const APValue &Init) |
RValue | EmitCall (const CGFunctionInfo &CallInfo, const CGCallee &Callee, ReturnValueSlot ReturnValue, const CallArgList &Args, llvm::CallBase **callOrInvoke, bool IsMustTail, SourceLocation Loc) |
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::CallBase **callOrInvoke=nullptr, bool IsMustTail=false) |
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) |
void | checkTargetFeatures (SourceLocation Loc, const FunctionDecl *TargetDecl) |
llvm::CallInst * | EmitRuntimeCall (llvm::FunctionCallee callee, const Twine &name="") |
llvm::CallInst * | EmitRuntimeCall (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="") |
llvm::CallInst * | EmitNounwindRuntimeCall (llvm::FunctionCallee callee, const Twine &name="") |
llvm::CallInst * | EmitNounwindRuntimeCall (llvm::FunctionCallee callee, ArrayRef< Address > args, const Twine &name="") |
llvm::CallInst * | EmitNounwindRuntimeCall (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="") |
SmallVector< llvm::OperandBundleDef, 1 > | getBundlesForFunclet (llvm::Value *Callee) |
llvm::CallBase * | EmitCallOrInvoke (llvm::FunctionCallee Callee, ArrayRef< llvm::Value * > Args, const Twine &Name="") |
Emits a call or invoke instruction to the given function, depending on the current state of the EH stack. More... | |
llvm::CallBase * | EmitRuntimeCallOrInvoke (llvm::FunctionCallee callee, ArrayRef< llvm::Value * > args, const Twine &name="") |
Emits a call or invoke instruction to the given runtime function. More... | |
llvm::CallBase * | EmitRuntimeCallOrInvoke (llvm::FunctionCallee callee, const Twine &name="") |
Emits a call or invoke instruction to the given nullary runtime function. More... | |
void | EmitNoreturnRuntimeCallOrInvoke (llvm::FunctionCallee 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... | |
llvm::Value * | getAsNaturalPointerTo (Address Addr, QualType PointeeType) |
bool | isPointerKnownNonNull (const Expr *E) |
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 (GlobalDecl Dtor, const CGCallee &Callee, llvm::Value *This, QualType ThisTy, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E) |
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) |
RValue | EmitAMDGPUDevicePrintfCallExpr (const CallExpr *E) |
RValue | EmitOpenMPDevicePrintfCallExpr (const CallExpr *E) |
RValue | EmitBuiltinExpr (const GlobalDecl GD, unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue) |
RValue | emitRotate (const CallExpr *E, bool IsRotateRight) |
RValue | emitBuiltinOSLogFormat (const CallExpr &E) |
Emit IR for __builtin_os_log_format. More... | |
RValue | EmitBuiltinIsAligned (const CallExpr *E) |
Emit IR for __builtin_is_aligned. More... | |
RValue | EmitBuiltinAlignTo (const CallExpr *E, bool AlignUp) |
Emit IR for __builtin_align_up/__builtin_align_down. 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, ReturnValueSlot ReturnValue) |
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, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch) |
llvm::Value * | EmitARMMVEBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch) |
llvm::Value * | EmitARMCDEBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue, llvm::Triple::ArchType Arch) |
llvm::Value * | EmitCMSEClearRecord (llvm::Value *V, llvm::IntegerType *ITy, QualType RTy) |
llvm::Value * | EmitCMSEClearRecord (llvm::Value *V, llvm::ArrayType *ATy, QualType RTy) |
llvm::Value * | EmitCommonNeonBuiltinExpr (unsigned BuiltinID, unsigned LLVMIntrinsic, unsigned AltLLVMIntrinsic, const char *NameHint, unsigned Modifier, const CallExpr *E, SmallVectorImpl< llvm::Value * > &Ops, Address PtrOp0, Address PtrOp1, llvm::Triple::ArchType Arch) |
llvm::Function * | LookupNeonLLVMIntrinsic (unsigned IntrinsicID, unsigned Modifier, llvm::Type *ArgTy, const CallExpr *E) |
llvm::Value * | EmitNeonCall (llvm::Function *F, SmallVectorImpl< llvm::Value * > &O, const char *name, unsigned shift=0, bool rightshift=false) |
llvm::Value * | EmitNeonSplat (llvm::Value *V, llvm::Constant *Idx, const llvm::ElementCount &Count) |
llvm::Value * | EmitNeonSplat (llvm::Value *V, llvm::Constant *Idx) |
llvm::Value * | EmitNeonShiftVector (llvm::Value *V, llvm::Type *Ty, bool negateForRightShift) |
llvm::Value * | EmitNeonRShiftImm (llvm::Value *Vec, llvm::Value *Amt, llvm::Type *Ty, bool usgn, const char *name) |
llvm::Value * | vectorWrapScalar16 (llvm::Value *Op) |
llvm::Type * | SVEBuiltinMemEltTy (const SVETypeFlags &TypeFlags) |
SVEBuiltinMemEltTy - Returns the memory element type for this memory access builtin. More... | |
SmallVector< llvm::Type *, 2 > | getSVEOverloadTypes (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops) |
llvm::Type * | getEltType (const SVETypeFlags &TypeFlags) |
llvm::ScalableVectorType * | getSVEType (const SVETypeFlags &TypeFlags) |
llvm::ScalableVectorType * | getSVEPredType (const SVETypeFlags &TypeFlags) |
llvm::Value * | EmitSVETupleSetOrGet (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops) |
llvm::Value * | EmitSVETupleCreate (const SVETypeFlags &TypeFlags, llvm::Type *ReturnType, ArrayRef< llvm::Value * > Ops) |
llvm::Value * | EmitSVEAllTruePred (const SVETypeFlags &TypeFlags) |
llvm::Value * | EmitSVEDupX (llvm::Value *Scalar) |
llvm::Value * | EmitSVEDupX (llvm::Value *Scalar, llvm::Type *Ty) |
llvm::Value * | EmitSVEReinterpret (llvm::Value *Val, llvm::Type *Ty) |
llvm::Value * | EmitSVEPMull (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID) |
llvm::Value * | EmitSVEMovl (const SVETypeFlags &TypeFlags, llvm::ArrayRef< llvm::Value * > Ops, unsigned BuiltinID) |
llvm::Value * | EmitSVEPredicateCast (llvm::Value *Pred, llvm::ScalableVectorType *VTy) |
llvm::Value * | EmitSVEGatherLoad (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | EmitSVEScatterStore (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | EmitSVEMaskedLoad (const CallExpr *, llvm::Type *ReturnTy, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID, bool IsZExtReturn) |
llvm::Value * | EmitSVEMaskedStore (const CallExpr *, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID) |
llvm::Value * | EmitSVEPrefetchLoad (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned BuiltinID) |
llvm::Value * | EmitSVEGatherPrefetch (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | EmitSVEStructLoad (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | EmitSVEStructStore (const SVETypeFlags &TypeFlags, SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | FormSVEBuiltinResult (llvm::Value *Call) |
FormSVEBuiltinResult - Returns the struct of scalable vectors as a wider vector. More... | |
llvm::Value * | EmitAArch64SVEBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitSMELd1St1 (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | EmitSMEReadWrite (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | EmitSMEZero (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
llvm::Value * | EmitSMELdrStr (const SVETypeFlags &TypeFlags, llvm::SmallVectorImpl< llvm::Value * > &Ops, unsigned IntID) |
void | GetAArch64SVEProcessedOperands (unsigned BuiltinID, const CallExpr *E, SmallVectorImpl< llvm::Value * > &Ops, SVETypeFlags TypeFlags) |
llvm::Value * | EmitAArch64SMEBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitAArch64BuiltinExpr (unsigned BuiltinID, const CallExpr *E, llvm::Triple::ArchType Arch) |
llvm::Value * | EmitBPFBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | BuildVector (ArrayRef< llvm::Value * > Ops) |
llvm::Value * | EmitX86BuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitPPCBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitAMDGPUBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitHLSLBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitScalarOrConstFoldImmArg (unsigned ICEArguments, unsigned Idx, const CallExpr *E) |
llvm::Value * | EmitSystemZBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitNVPTXBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitWebAssemblyBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitHexagonBuiltinExpr (unsigned BuiltinID, const CallExpr *E) |
llvm::Value * | EmitRISCVBuiltinExpr (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue) |
void | AddAMDGPUFenceAddressSpaceMMRA (llvm::Instruction *Inst, const CallExpr *E) |
void | ProcessOrderScopeAMDGCN (llvm::Value *Order, llvm::Value *Scope, llvm::AtomicOrdering &AO, llvm::SyncScope::ID &SSID) |
RValue | EmitIntelFPGARegBuiltin (const CallExpr *E, ReturnValueSlot ReturnValue) |
RValue | EmitIntelFPGAMemBuiltin (const CallExpr *E) |
RValue | EmitIntelSYCLPtrAnnotationBuiltin (const CallExpr *E) |
RValue | EmitIntelSYCLAllocaBuiltin (unsigned BuiltinID, const CallExpr *E, ReturnValueSlot ReturnValue) |
llvm::CallInst * | MaybeEmitFPBuiltinofFD (llvm::FunctionType *IRFuncTy, const SmallVectorImpl< llvm::Value * > &IRArgs, llvm::Value *FnPtr, StringRef Name, unsigned FDBuiltinID) |
llvm::Value * | EmitMSVCBuiltinExpr (MSVCIntrin BuiltinID, const CallExpr *E) |
llvm::Value * | EmitBuiltinAvailable (const VersionTuple &Version) |
llvm::Value * | EmitObjCProtocolExpr (const ObjCProtocolExpr *E) |
llvm::Value * | EmitObjCStringLiteral (const ObjCStringLiteral *E) |
Emits an instance of NSConstantString representing the object. 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... | |
llvm::Value * | EmitObjCAutorelease (llvm::Value *value, llvm::Type *returnType) |
Autorelease the given object. More... | |
llvm::Value * | EmitObjCRetainNonBlock (llvm::Value *value, llvm::Type *returnType) |
Retain the given object, with normal retain semantics. More... | |
void | EmitObjCRelease (llvm::Value *value, ARCPreciseLifetime_t precise) |
Release the given object. 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 * | EmitObjCAlloc (llvm::Value *value, llvm::Type *returnType) |
Allocate the given objc object. More... | |
llvm::Value * | EmitObjCAllocWithZone (llvm::Value *value, llvm::Type *returnType) |
Allocate the given objc object. More... | |
llvm::Value * | EmitObjCAllocInit (llvm::Value *value, llvm::Type *resultType) |
llvm::Value * | EmitObjCThrowOperand (const Expr *expr) |
llvm::Value * | EmitObjCConsumeObject (QualType T, llvm::Value *Ptr) |
Produce the code for a CK_ARCConsumeObject. 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 | EmitARCNoopIntrinsicUse (ArrayRef< llvm::Value * > values) |
Emit a call to "clang.arc.noop.use", which consumes the result of a call that has operand bundle "clang.arc.attachedcall". 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 | EmitAggregateStore (llvm::Value *Val, Address Dest, bool DestIsVolatile) |
Build all the stores needed to initialize an aggregate at Dest with the value Val. 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... | |
ComplexPairTy | EmitPromotedComplexExpr (const Expr *E, QualType PromotionType) |
llvm::Value * | EmitPromotedScalarExpr (const Expr *E, QualType PromotionType) |
ComplexPairTy | EmitPromotedValue (ComplexPairTy result, QualType PromotionType) |
ComplexPairTy | EmitUnPromotedValue (ComplexPairTy result, QualType PromotionType) |
Address | emitAddrOfRealComponent (Address complex, QualType complexType) |
Address | emitAddrOfImagComponent (Address complex, QualType complexType) |
llvm::GlobalVariable * | AddInitializerToStaticVarDecl (const VarDecl &D, llvm::GlobalVariable *GV) |
AddInitializerToStaticVarDecl - Add the initializer for 'D' to the global variable that has already been created for it. More... | |
void | EmitInvariantStart (llvm::Constant *Addr, CharUnits Size) |
void | EmitCXXGlobalVarDeclInit (const VarDecl &D, llvm::GlobalVariable *GV, bool PerformInit) |
EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage. More... | |
llvm::Function * | createAtExitStub (const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr) |
Create a stub function, suitable for being passed to atexit, which passes the given address to the given destructor function. More... | |
llvm::Function * | createTLSAtExitStub (const VarDecl &VD, llvm::FunctionCallee Dtor, llvm::Constant *Addr, llvm::FunctionCallee &AtExit) |
Create a stub function, suitable for being passed to __pt_atexit_np, which passes the given address to the given destructor function. More... | |
void | registerGlobalDtorWithAtExit (const VarDecl &D, llvm::FunctionCallee fn, llvm::Constant *addr) |
Call atexit() with a function that passes the given argument to the given function. More... | |
void | registerGlobalDtorWithLLVM (const VarDecl &D, llvm::FunctionCallee fn, llvm::Constant *addr) |
Registers the dtor using 'llvm.global_dtors' for platforms that do not support an 'atexit()' function. More... | |
void | registerGlobalDtorWithAtExit (llvm::Constant *dtorStub) |
Call atexit() with function dtorStub. More... | |
llvm::Value * | unregisterGlobalDtorWithUnAtExit (llvm::Constant *dtorStub) |
Call unatexit() 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, ConstantAddress Guard=ConstantAddress::invalid()) |
GenerateCXXGlobalInitFunc - Generates code for initializing global variables. More... | |
void | GenerateCXXGlobalCleanUpFunc (llvm::Function *Fn, ArrayRef< std::tuple< llvm::FunctionType *, llvm::WeakTrackingVH, llvm::Constant * >> DtorsOrStermFinalizers) |
GenerateCXXGlobalCleanUpFunc - Generates code for cleaning up 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 | EmitCXXThrowExpr (const CXXThrowExpr *E, bool KeepInsertionPoint=true) |
RValue | EmitAtomicExpr (AtomicExpr *E) |
llvm::Value * | EmitAnnotationCall (llvm::Function *AnnotationFn, llvm::Value *AnnotatedVal, StringRef AnnotationStr, SourceLocation Location, const AnnotateAttr *Attr=nullptr) |
Emit an annotation call (intrinsic). 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... | |
llvm::Value * | EmitSYCLAnnotationCall (llvm::Function *AnnotationFn, llvm::Value *AnnotatedVal, SourceLocation Location, const SYCLAddIRAnnotationsMemberAttr *Attr) |
Emit a "sycl-properties" annotation call (intrinsic). More... | |
llvm::Value * | EmitSYCLAnnotationCall (llvm::Function *AnnotationFn, llvm::Value *AnnotatedVal, SourceLocation Location, llvm::SmallVectorImpl< std::pair< std::string, std::string >> &Pair) |
Address | EmitFieldSYCLAnnotations (const FieldDecl *D, Address V) |
Emit sycl field annotations for given field & value. More... | |
Address | EmitIntelFPGAFieldAnnotations (const FieldDecl *D, Address V, StringRef AnnotStr) |
Emit Intel FPGA field annotations for the given field and value. More... | |
Address | EmitIntelFPGAFieldAnnotations (SourceLocation Location, Address V, StringRef AnnotStr) |
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 | EmitBranchToCounterBlock (const Expr *Cond, BinaryOperator::Opcode LOp, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount=0, Stmt::Likelihood LH=Stmt::LH_None, const Expr *CntrIdx=nullptr) |
EmitBranchToCounterBlock - Emit a conditional branch to a new block that increments a profile counter based on the semantics of the given logical operator opcode. More... | |
void | EmitBranchOnBoolExpr (const Expr *Cond, llvm::BasicBlock *TrueBlock, llvm::BasicBlock *FalseBlock, uint64_t TrueCount, Stmt::Likelihood LH=Stmt::LH_None, const Expr *ConditionalOp=nullptr) |
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::Type *ElemTy, llvm::Value *Ptr, ArrayRef< llvm::Value * > IdxList, bool SignedIndices, bool IsSubtraction, SourceLocation Loc, const Twine &Name="") |
Same as IRBuilder::CreateInBoundsGEP, but additionally emits a check to detect undefined behavior when the pointer overflow sanitizer is enabled. More... | |
Address | EmitCheckedInBoundsGEP (Address Addr, ArrayRef< llvm::Value * > IdxList, llvm::Type *elementType, bool SignedIndices, bool IsSubtraction, SourceLocation Loc, CharUnits Align, const Twine &Name="") |
llvm::Value * | EmitCheckedArgForBuiltin (const Expr *E, BuiltinCheckKind Kind) |
Emits an argument for a call to a builtin. 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 | EmitKCFIOperandBundle (const CGCallee &Callee, SmallVectorImpl< llvm::OperandBundleDef > &Bundles) |
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 either trap or call a handler function in the UBSan 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, SanitizerHandler CheckHandlerID) |
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 | EmitNonNullArgCheck (Address Addr, QualType ArgType, SourceLocation ArgLoc, AbstractCallee AC, unsigned ParmNum) |
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... | |
void | SetSqrtFPAccuracy (llvm::Value *Val) |
Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts. More... | |
void | SetDivFPAccuracy (llvm::Value *Val) |
Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts. More... | |
void | SetFastMathFlags (FPOptions FPFeatures) |
Set the codegen fast-math flags. More... | |
llvm::Value * | emitBoolVecConversion (llvm::Value *SrcVec, unsigned NumElementsDst, const llvm::Twine &Name="") |
template<typename CallType > | |
CallType * | addControlledConvergenceToken (CallType *Input) |
void | EmitCallArgs (CallArgList &Args, PrototypeWrapper Prototype, llvm::iterator_range< CallExpr::const_arg_iterator > ArgRange, AbstractCallee AC=AbstractCallee(), unsigned ParamsToSkip=0, EvaluationOrder Order=EvaluationOrder::Default) |
EmitCallArgs - Emit call arguments for a function. More... | |
Address | EmitPointerWithAlignment (const Expr *Addr, LValueBaseInfo *BaseInfo=nullptr, TBAAAccessInfo *TBAAInfo=nullptr, KnownNonNull_t IsKnownNonNull=NotKnownNonNull) |
EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee. 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 | EmitMultiVersionResolver (llvm::Function *Resolver, ArrayRef< MultiVersionResolverOption > Options) |
void | EmitX86MultiVersionResolver (llvm::Function *Resolver, ArrayRef< MultiVersionResolverOption > Options) |
void | EmitAArch64MultiVersionResolver (llvm::Function *Resolver, ArrayRef< MultiVersionResolverOption > Options) |
Public Member Functions inherited from clang::CodeGen::CodeGenTypeCache | |
CharUnits | getIntSize () const |
CharUnits | getIntAlign () const |
CharUnits | getSizeSize () const |
CharUnits | getSizeAlign () const |
CharUnits | getPointerSize () const |
CharUnits | getPointerAlign () const |
llvm::CallingConv::ID | getRuntimeCC () const |
LangAS | getASTAllocaAddressSpace () const |
Static Public Member Functions | |
static bool | cxxDestructorCanThrow (QualType T) |
Check if T is a C++ class that has a destructor that can throw. 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 | EmitOMPTargetTeamsGenericLoopDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsGenericLoopDirective &S) |
Emit device code for the target teams loop directive. More... | |
static void | EmitOMPTargetParallelGenericLoopDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetParallelGenericLoopDirective &S) |
Emit device code for the target parallel loop directive. More... | |
static void | EmitOMPTargetTeamsDistributeParallelForDeviceFunction (CodeGenModule &CGM, StringRef ParentName, const OMPTargetTeamsDistributeParallelForDirective &S) |
static std::string | getNonTrivialCopyConstructorStr (QualType QT, CharUnits Alignment, bool IsVolatile, ASTContext &Ctx) |
static std::string | getNonTrivialDestructorStr (QualType QT, CharUnits Alignment, bool IsVolatile, ASTContext &Ctx) |
static bool | ContainsLabel (const Stmt *S, bool IgnoreCaseStmts=false) |
ContainsLabel - Return true if the statement contains a label in it. 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 const Expr * | stripCond (const Expr *C) |
Ignore parentheses and logical-NOT to track conditions consistently. More... | |
static bool | isInstrumentedCondition (const Expr *C) |
isInstrumentedCondition - Determine whether the given condition is an instrumentable condition (i.e. More... | |
Public Attributes | |
CodeGenModule & | CGM |
const TargetInfo & | Target |
CodeGenFunction * | ParentCGF = nullptr |
LoopInfoStack | LoopStack |
CGBuilderTy | Builder |
VarBypassDetector | Bypasses |
SmallVector< llvm::CanonicalLoopInfo *, 4 > | OMPLoopNestStack |
List of recently emitted OMPCanonicalLoops. More... | |
SmallVector< const BinaryOperator *, 16 > | MCDCLogOpStack |
Stack to track the Logical Operator recursion nest for MC/DC. More... | |
SmallVector< llvm::IntrinsicInst *, 4 > | ConvergenceTokenStack |
Stack to track the controlled convergence tokens. More... | |
int | ExpectedOMPLoopDepth = 0 |
Number of nested loop to be consumed by the last surrounding loop-associated directive. More... | |
const Decl * | CurFuncDecl = nullptr |
CurFuncDecl - Holds the Decl for the current outermost non-closure context. More... | |
const Decl * | CurCodeDecl = nullptr |
CurCodeDecl - This is the inner-most code context, which includes blocks. More... | |
const CGFunctionInfo * | CurFnInfo = nullptr |
QualType | FnRetTy |
llvm::Function * | CurFn = nullptr |
llvm::SmallVector< const ParmVarDecl *, 4 > | FnArgs |
Save Parameter Decl for coroutine. More... | |
CGCoroInfo | CurCoro |
AwaitSuspendWrapperInfo | CurAwaitSuspendWrapper |
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... | |
Address | ReturnValuePointer = Address::invalid() |
ReturnValuePointer - The temporary alloca to hold a pointer to sret. More... | |
const Expr * | RetExpr = nullptr |
If a return statement is being visited, this holds the return statment's result expression. 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... | |
GlobalDecl | CurSEHParent |
bool | IsOutlinedSEHHelper = false |
True if the current function is an outlined SEH helper. More... | |
bool | IsInPreservedAIRegion = false |
True if CodeGen currently emits code inside presereved access index region. More... | |
bool | InNoMergeAttributedStmt = false |
True if the current statement has nomerge attribute. More... | |
bool | InNoInlineAttributedStmt = false |
True if the current statement has noinline attribute. More... | |
bool | InAlwaysInlineAttributedStmt = false |
True if the current statement has always_inline attribute. More... | |
const CallExpr * | MustTailCall = nullptr |
const CodeGen::CGBlockInfo * | BlockInfo = nullptr |
llvm::Value * | BlockPointer = nullptr |
llvm::DenseMap< const ValueDecl *, 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< DeferredDeactivateCleanup > | DeferredDeactivationCleanupStack |
llvm::SmallVector< const JumpDest *, 2 > | SEHTryEpilogueStack |
llvm::Instruction * | CurrentFuncletPad = nullptr |
RawAddress | NormalCleanupDest = RawAddress::invalid() |
i32s containing the indexes of the cleanup destinations. More... | |
unsigned | NextCleanupDestIndex = 1 |
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... | |
const OMPExecutableDirective * | OMPParentLoopDirectiveForScan = nullptr |
Parent loop-based directive for scan directive. More... | |
llvm::BasicBlock * | OMPBeforeScanBlock = nullptr |
llvm::BasicBlock * | OMPAfterScanBlock = nullptr |
llvm::BasicBlock * | OMPScanExitBlock = nullptr |
llvm::BasicBlock * | OMPScanDispatch = nullptr |
bool | OMPFirstScanLoop = false |
FPOptions | CurFPFeatures |
SmallVector< llvm::Value *, 8 > | ObjCEHValueStack |
ObjCEHValueStack - Stack of Objective-C exception values, used for rethrows. More... | |
EHScopeStack::stable_iterator | CurrentCleanupScopeDepth |
CurrentSourceLocExprScope | CurSourceLocExprScope |
Source location information about the default argument or member initializer expression we're evaluating, if any. More... | |
Public Attributes inherited from clang::CodeGen::CodeGenTypeCache | |
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 |
half, bfloat, float, double More... | |
llvm::Type * | BFloatTy |
llvm::Type * | FloatTy |
llvm::Type * | DoubleTy |
llvm::IntegerType * | IntTy |
int More... | |
llvm::IntegerType * | CharTy |
char 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 * UnqualPtrTy | |
llvm::PointerType * VoidPtrTy | |
llvm::PointerType * Int8PtrTy | |
llvm::PointerType * VoidPtrPtrTy | |
llvm::PointerType * Int8PtrPtrTy | |
}; | |
void*, void** in the target's default address space (often 0) More... | |
union { | |
llvm::PointerType * AllocaVoidPtrTy | |
llvm::PointerType * AllocaInt8PtrTy | |
}; | |
void* in alloca address space More... | |
llvm::PointerType * | DefaultInt8PtrTy |
void* in target address space More... | |
llvm::PointerType * | RuntimeGlobalsInt8PtrTy |
void* used for virtual table globals. More... | |
union { | |
llvm::PointerType * GlobalsVoidPtrTy | |
llvm::PointerType * GlobalsInt8PtrTy | |
}; | |
void* in default globals address space More... | |
llvm::PointerType * | ConstGlobalsPtrTy |
void* in the address space for constant globals 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 258 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 343 of file CodeGenFunction.h.
typedef llvm::function_ref<std::pair<LValue, LValue> CodeGenFunction &, const OMPExecutableDirective &S)> clang::CodeGen::CodeGenFunction::CodeGenLoopBoundsTy |
Definition at line 337 of file CodeGenFunction.h.
typedef llvm::function_ref<void(CodeGenFunction &, const OMPLoopDirective &, JumpDest)> clang::CodeGen::CodeGenFunction::CodeGenLoopTy |
Definition at line 329 of file CodeGenFunction.h.
typedef llvm::function_ref<void(CodeGenFunction &, SourceLocation, const unsigned, const bool)> clang::CodeGen::CodeGenFunction::CodeGenOrderedTy |
Definition at line 332 of file CodeGenFunction.h.
typedef std::pair<llvm::Value *, llvm::Value *> clang::CodeGen::CodeGenFunction::ComplexPairTy |
Definition at line 294 of file CodeGenFunction.h.
typedef llvm::DenseMap<const Decl *, Address> clang::CodeGen::CodeGenFunction::DeclMapTy |
Definition at line 1082 of file CodeGenFunction.h.
typedef void clang::CodeGen::CodeGenFunction::Destroyer(CodeGenFunction &CGF, Address addr, QualType ty) |
Definition at line 2212 of file CodeGenFunction.h.
using clang::CodeGen::CodeGenFunction::SourceLocExprScopeGuard = CurrentSourceLocExprScope::SourceLocExprScopeGuard |
Definition at line 1770 of file CodeGenFunction.h.
typedef void clang::CodeGen::CodeGenFunction::SpecialInitFn(CodeGenFunction &Init, const VarDecl &D, llvm::Value *Address) |
Definition at line 3352 of file CodeGenFunction.h.
typedef const llvm::function_ref<void(CodeGenFunction & , llvm::Function * , const OMPTaskDataTy & )> clang::CodeGen::CodeGenFunction::TaskGenTy |
Definition at line 3800 of file CodeGenFunction.h.
typedef llvm::SmallPtrSet<const CXXRecordDecl *, 4> clang::CodeGen::CodeGenFunction::VisitedVirtualBasesSetTy |
Definition at line 2470 of file CodeGenFunction.h.
Definition at line 2468 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 5029 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 5050 of file CodeGenFunction.h.
Enumerator | |
---|---|
CFITCK_VCall | |
CFITCK_NVCall | |
CFITCK_DerivedCast | |
CFITCK_UnrelatedCast | |
CFITCK_ICall | |
CFITCK_NVMFCall | |
CFITCK_VMFCall |
Definition at line 2486 of file CodeGenFunction.h.
|
strong |
Definition at line 5229 of file CodeGenFunction.h.
|
strong |
Enumerator | |
---|---|
VariableGuard | |
TlsGuard |
Definition at line 4889 of file CodeGenFunction.h.
Situations in which we might emit a check for the suitability of a pointer or glvalue.
Needs to be kept in sync with ubsan_handlers.cpp in compiler-rt.
Definition at line 3225 of file CodeGenFunction.h.
CodeGenFunction::CodeGenFunction | ( | CodeGenModule & | cgm, |
bool | suppressNewContext = false |
||
) |
Definition at line 79 of file CodeGenFunction.cpp.
CodeGenFunction::~CodeGenFunction | ( | ) |
Definition at line 94 of file CodeGenFunction.cpp.
References CGM, CurFn, DeferredDeactivationCleanupStack, clang::CodeGen::CGOpenMPRuntime::functionFinished(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CGOpenMPRuntime::getOMPBuilder(), 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 1263 of file CGCleanup.cpp.
References ForActivation, and SetupCleanupBlockActivation().
void CodeGenFunction::AddAMDGPUFenceAddressSpaceMMRA | ( | llvm::Instruction * | Inst, |
const CallExpr * | E | ||
) |
Definition at line 18432 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), clang::Expr::getExprLoc(), clang::CallExpr::getNumArgs(), and V.
|
inline |
Definition at line 5145 of file CodeGenFunction.h.
References ConvergenceTokenStack.
Referenced by EmitCall().
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 351 of file CGDecl.cpp.
References CGM, clang::CPlusPlus, clang::QualType::DK_cxx_destructor, EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::ConstantEmitter::finalize(), clang::CharUnits::fromQuantity(), clang::Decl::getAttr(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::VarDecl::getFlexibleArrayInitChars(), clang::VarDecl::getInit(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::ValueDecl::getType(), clang::ASTContext::getTypeSizeInChars(), clang::VarDecl::hasFlexibleArrayInit(), HaveInsertPoint(), clang::QualType::isConstantStorage(), clang::VarDecl::needsDestruction(), 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 587 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 594 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 281 of file CGCXX.cpp.
References BuildAppleKextVirtualCall(), BuildAppleKextVirtualDestructorCall(), clang::Dtor_Complete, clang::Type::getAs(), clang::NestedNameSpecifier::getAsType(), clang::RecordType::getDecl(), clang::NestedNameSpecifier::getKind(), clang::T, 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 302 of file CGCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), BuildAppleKextVirtualCall(), CGM, clang::Dtor_Base, clang::Dtor_Complete, clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::CXXMethodDecl::isVirtual().
Referenced by BuildAppleKextVirtualCall().
void CodeGenFunction::BuildBlockRelease | ( | llvm::Value * | DeclPtr, |
BlockFieldFlags | flags, | ||
bool | CanThrow | ||
) |
Definition at line 2770 of file CGBlocks.cpp.
References CanThrow(), CGM, EmitNounwindRuntimeCall(), EmitRuntimeCallOrInvoke(), clang::CodeGen::BlockFieldFlags::getBitMask(), clang::CodeGen::CodeGenModule::getBlockObjectDispose(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and V.
QualType CodeGenFunction::BuildFunctionArgList | ( | GlobalDecl | GD, |
FunctionArgList & | Args | ||
) |
Definition at line 1601 of file CodeGenFunction.cpp.
References clang::CodeGen::CGCXXABI::addImplicitStructorParams(), clang::CodeGen::CGCXXABI::buildThisParam(), CGM, clang::ImplicitParamDecl::Create(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::GlobalDecl::getCtorType(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::FunctionDecl::getReturnType(), clang::CXXMethodDecl::getThisType(), getTypes(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CodeGen::CodeGenTypes::inheritingCtorHasParams(), clang::CXXMethodDecl::isImplicitObjectMemberFunction(), clang::Other, clang::FunctionDecl::parameters(), and clang::ASTContext::VoidPtrTy.
Referenced by EmitCall(), EmitInlinedInheritingCXXConstructorCall(), and GenerateCode().
llvm::Value * CodeGenFunction::BuildVector | ( | ArrayRef< llvm::Value * > | Ops | ) |
Definition at line 13554 of file CGBuiltin.cpp.
Definition at line 890 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), getContext(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Definition at line 878 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), getContext(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Referenced by GenerateCopyHelperFunction(), and generateObjCGetterBody().
void CodeGenFunction::callCStructDefaultConstructor | ( | LValue | Dst | ) |
Definition at line 843 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), getContext(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
void CodeGenFunction::callCStructDestructor | ( | LValue | Dst | ) |
Definition at line 867 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), getContext(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Definition at line 915 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), getContext(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
Referenced by generateObjCSetterBody().
Definition at line 903 of file CGNonTrivialStruct.cpp.
References callSpecialFunction(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), getContext(), clang::CodeGen::LValue::getType(), and clang::CodeGen::LValue::isVolatile().
|
inline |
Returns true if a function must make progress, which means the mustprogress attribute can be added.
Definition at line 624 of file CodeGenFunction.h.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and getLangOpts().
Referenced by GenerateCode().
bool CodeGenFunction::checkIfLoopMustProgress | ( | const Expr * | ControllingExpression, |
bool | HasEmptyBody | ||
) |
Returns true if a loop must make progress, which means the mustprogress attribute can be added.
HasConstantCond
indicates whether the branch condition is a known constant.
Definition at line 911 of file CGStmt.cpp.
References CGM, CurFn, clang::Expr::EvaluateAsInt(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), and getLangOpts().
void CodeGenFunction::checkTargetFeatures | ( | const CallExpr * | E, |
const FunctionDecl * | TargetDecl | ||
) |
Definition at line 3044 of file CodeGenFunction.cpp.
References CGM, CurCodeDecl, clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenModule::getContext(), clang::NamedDecl::getDeclName(), clang::CodeGen::CodeGenModule::getDiags(), clang::ASTContext::getFunctionFeatureMap(), clang::Expr::getIntegerConstantExpr(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getTriple(), and clang::DiagnosticsEngine::Report().
Referenced by EmitCall().
void CodeGenFunction::checkTargetFeatures | ( | SourceLocation | Loc, |
const FunctionDecl * | TargetDecl | ||
) |
Definition at line 3069 of file CodeGenFunction.cpp.
References clang::ASTContext::BuiltinInfo, CGM, CurCodeDecl, clang::Builtin::evaluateRequiredTargetFeatures(), clang::ASTContext::filterFunctionTargetAttrs(), clang::Decl::getAttr(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenModule::getContext(), clang::NamedDecl::getDeclName(), clang::CodeGen::CodeGenModule::getDiags(), clang::ASTContext::getFunctionFeatureMap(), getLangOpts(), clang::Builtin::Context::getRequiredFeatures(), clang::Decl::hasAttr(), clang::FunctionDecl::isMultiVersion(), Loc, and clang::DiagnosticsEngine::Report().
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 1943 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::hasProfileClangInstr().
Referenced by EmitBranchOnBoolExpr(), and clang::CodeGen::CGOpenMPRuntime::emitIfClause().
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 1964 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 1896 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 1864 of file CodeGenFunction.cpp.
Referenced by ConstantFoldsToSimpleInteger(), and EmitAutoVarInit().
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 6100 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, clang::CodeGen::TEK_Scalar, and clang::ast_matchers::type.
Referenced by EmitCall(), and EmitDelegateCallArg().
|
inline |
Definition at line 2594 of file CodeGenFunction.h.
References ConvertType(), getContext(), and clang::T.
llvm::Type * CodeGenFunction::ConvertType | ( | QualType | T | ) |
Definition at line 234 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::T.
Referenced by AdjustObjCObjectType(), ConvertType(), emitArgumentDemotion(), emitArrayLength(), EmitArraySubscriptExpr(), EmitArrayToPointerDecay(), EmitAtomicDecrementValue(), EmitAtomicIncrementValue(), EmitBitfieldConversionCheck(), EmitCall(), EmitCastLValue(), emitCmdValueForGetterSetterBody(), EmitCommonNeonSISDBuiltinExpr(), EmitCountedByFieldExpr(), EmitCXXUuidofExpr(), EmitDeleteCall(), EmitDynamicCastToNull(), emitFrexpBuiltin(), EmitFromMemory(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitIvarOffsetAsPointerDiff(), EmitLoadOfBitfieldLValue(), EmitLoadOfScalar(), emitMaybeConstrainedFPToIntRoundBuiltin(), EmitObjCBoxedExpr(), EmitObjCIsaExpr(), emitOMPArraySectionBase(), EmitPointerWithAlignment(), EmitPromotedValue(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), EmitUnPromotedValue(), emitWritebackArg(), generateObjCGetterBody(), GenerateSEHFilterFunction(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getItaniumDynamicCastFn(), GetUndefRValue(), performTypeAdjustment(), StartFunction(), tryEmitSpecializedAllocInit(), and tryGenerateSpecializedMessageSend().
llvm::Type * CodeGenFunction::ConvertTypeForMem | ( | QualType | T | ) |
Definition at line 230 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CodeGenModule::getTypes(), and clang::T.
Referenced by castValueToType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), complexTempStructure(), createPlaceholderSlot(), EmitAnyExprToExn(), emitArrayDestroy(), emitArrayLength(), emitArraySubscriptGEP(), EmitArrayToPointerDecay(), EmitAutoVarAlloca(), EmitCall(), EmitCastLValue(), clang::CodeGen::ReductionCodeGen::emitCleanups(), EmitCXXDeleteExpr(), EmitCXXMemberDataPointerAddress(), EmitCXXNewExpr(), EmitDeclDestroy(), EmitDeclRefLValue(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), EmitFunctionProlog(), emitGlobalToListCopyFunction(), emitInterWarpCopyFunction(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitListToGlobalCopyFunction(), EmitLValueForFieldInitialization(), EmitMaterializeTemporaryExpr(), EmitNewArrayInitializer(), EmitObjCIsaExpr(), emitOMPArraySectionBase(), EmitOMPUseDeviceAddrClause(), EmitOMPUseDevicePtrClause(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), EmitPointerWithAlignment(), emitPrivatesInit(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), EmitStaticVarDecl(), EmitStoreThroughBitfieldLValue(), EmitToMemory(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::emitVoidPtrVAArg(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), getBlockByrefInfo(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::CodeGen::getVAListElementType(), InitCatchParam(), loadToBegin(), makeNaturalAddressForPointer(), MakeNaturalAlignAddrLValue(), MakeRawAddrLValue(), PerformReturnAdjustment(), and shuffleAndStore().
|
inline |
CreateAggTemp - Create a temporary memory object for the given aggregate type.
Definition at line 2877 of file CodeGenFunction.h.
Referenced by EmitAnyExpr(), EmitAnyExprToTemp(), EmitCallArg(), EmitCXXBindTemporaryLValue(), and EmitCXXConstructLValue().
llvm::Function * CodeGenFunction::createAtExitStub | ( | const VarDecl & | VD, |
llvm::FunctionCallee | Dtor, | ||
llvm::Constant * | Addr | ||
) |
Create a stub function, suitable for being passed to atexit, which passes the given address to the given destructor function.
Definition at line 238 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeNullaryFunction(), clang::AtExit, Builder, CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrCleanUpFunction(), FinishFunction(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenModule::getTypes(), clang::MangleContext::mangleDynamicAtExitDestructor(), StartFunction(), clang::ASTContext::VoidTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by emitGlobalDtorWithTLRegDtor(), registerGlobalDtorWithAtExit(), and registerGlobalDtorWithLLVM().
|
inline |
createBasicBlock - Create an LLVM basic block.
Definition at line 2617 of file CodeGenFunction.h.
References clang::transformer::before(), getLLVMContext(), and clang::transformer::name().
Referenced by CreateNormalEntry(), clang::CodeGen::CatchRetScope::Emit(), emitArrayDestroy(), emitAtomicCmpXchgFailureSet(), EmitAtomicOp(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitCall(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), emitCatchDispatchBlock(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCleanup(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXNewExpr(), EmitDynamicCast(), emitDynamicTlsInitialization(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), emitInterWarpCopyFunction(), EmitLandingPad(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitPostUpdateForReductionClause(), EmitReturnValueCheck(), EmitSehScope(), emitShuffleAndReduceFunction(), EmitTrapCheck(), EmitTypeCheck(), EmitTypeidFromVTable(), clang::CodeGen::CGOpenMPRuntime::emitUDMapperArrayInitOrDel(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), EmitVTablePtrCheckForCast(), emitWasmCatchPadBlock(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), GenerateCXXGlobalInitFunc(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), getEHDispatchBlock(), getEHResumeBlock(), getFuncletEHDispatchBlock(), GetIndirectGotoBlock(), getJumpDestForLabel(), getTerminateFunclet(), getTerminateHandler(), getTerminateLandingPad(), getUnreachableBlock(), PerformReturnAdjustment(), shuffleAndStore(), and StartFunction().
RawAddress CodeGenFunction::createCleanupActiveFlag | ( | ) |
Definition at line 268 of file CGCleanup.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateStore(), CreateTempAllocaWithoutCast(), clang::CharUnits::One(), and setBeforeOutermostConditional().
Referenced by initFullExprCleanup(), pushCleanupAfterFullExpr(), and pushLifetimeExtendedDestroy().
RawAddress CodeGenFunction::CreateDefaultAlignTempAlloca | ( | llvm::Type * | Ty, |
const Twine & | Name = "tmp" |
||
) |
CreateDefaultAlignedTempAlloca - This creates an alloca with the default ABI alignment of the given LLVM type.
CreateDefaultAlignTempAlloca - This creates an alloca with the default alignment of the corresponding LLVM type, which is not guaranteed to be related in any way to the expected alignment of an AST type that might have been lowered to Ty.
IMPORTANT NOTE: This is not generally the right alignment for any given AST type that happens to have been lowered to the given IR type. This should only ever be used for function-local, IR-driven manipulations like saving and restoring a value. Do not hand this address off to arbitrary IRGen routines, and especially do not pass it as an argument to a function that might expect a properly ABI-aligned value.
Definition at line 135 of file CGExpr.cpp.
Referenced by EmitCheckValue(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), and StartFunction().
RawAddress CodeGenFunction::CreateIRTemp | ( | QualType | T, |
const Twine & | Name = "tmp" |
||
) |
CreateIRTemp - Create a temporary IR object of the given type, with appropriate alignment.
This routine should only be used when an temporary value needs to be stored into an alloca (for example, to avoid explicit PHI construction), but the type is the IR type, not the type appropriate for storing in memory.
That is, this is exactly equivalent to CreateMemTemp, but calling ConvertType instead of ConvertTypeForMem.
Definition at line 142 of file CGExpr.cpp.
Referenced by EmitInlinedInheritingCXXConstructorCall(), maybeCreateMCDCCondBitmap(), and StartFunction().
RawAddress CodeGenFunction::CreateMemTemp | ( | QualType | T, |
CharUnits | Align, | ||
const Twine & | Name = "tmp" , |
||
RawAddress * | Alloca = nullptr |
||
) |
Definition at line 153 of file CGExpr.cpp.
RawAddress CodeGenFunction::CreateMemTemp | ( | QualType | T, |
const Twine & | Name = "tmp" , |
||
RawAddress * | Alloca = nullptr |
||
) |
CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space.
Returns the original alloca instruction by Alloca
if it is not nullptr.
Definition at line 147 of file CGExpr.cpp.
Referenced by castToBase(), castValueToType(), complexTempStructure(), EmitAggExprToLValue(), EmitAtomicExpr(), EmitCall(), EmitCompoundLiteralLValue(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), EmitExtVectorElementExpr(), EmitFunctionProlog(), emitGlobalToListReduceFunction(), emitInterWarpCopyFunction(), EmitLambdaStaticInvokeBody(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), emitListToGlobalReduceFunction(), EmitObjCBoxedExpr(), EmitParmDecl(), EmitSEHExceptionCodeSave(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::CodeGen::EmitVAArgInstr(), EmitValToTemp(), GenerateBlockFunction(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), clang::CodeGen::CallArg::getRValue(), GetUndefRValue(), setBlockContextParameter(), and clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr().
RawAddress CodeGenFunction::CreateMemTempWithoutCast | ( | QualType | T, |
CharUnits | Align, | ||
const Twine & | Name = "tmp" |
||
) |
Definition at line 170 of file CGExpr.cpp.
RawAddress CodeGenFunction::CreateMemTempWithoutCast | ( | QualType | T, |
const Twine & | Name = "tmp" |
||
) |
CreateMemTemp - Create a temporary memory object of the given type, with appropriate alignmen without casting it to the default address space.
Definition at line 176 of file CGExpr.cpp.
Referenced by EmitCall().
RawAddress CodeGenFunction::CreateTempAlloca | ( | llvm::Type * | Ty, |
CharUnits | Align, | ||
const Twine & | Name = "tmp" , |
||
llvm::Value * | ArraySize = nullptr , |
||
RawAddress * | 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 85 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 116 of file CGExpr.cpp.
Referenced by EmitAutoVarAlloca(), EmitBlockLiteral(), EmitCall(), EmitDeleteCall(), EmitFunctionProlog(), EmitNewArrayInitializer(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), GenerateBlockFunction(), getEHSelectorSlot(), getExceptionSlot(), InitCatchParam(), clang::CodeGen::DominatingLLVMValue::save(), and SetupCleanupBlockActivation().
RawAddress CodeGenFunction::CreateTempAllocaWithoutCast | ( | llvm::Type * | Ty, |
CharUnits | align, | ||
const Twine & | Name = "tmp" , |
||
llvm::Value * | ArraySize = nullptr |
||
) |
CreateTempAlloca - This creates a alloca and inserts it into the entry block.
Definition at line 75 of file CGExpr.cpp.
Referenced by createCleanupActiveFlag().
llvm::Function * CodeGenFunction::createTLSAtExitStub | ( | const VarDecl & | VD, |
llvm::FunctionCallee | Dtor, | ||
llvm::Constant * | Addr, | ||
llvm::FunctionCallee & | AtExit | ||
) |
Create a stub function, suitable for being passed to __pt_atexit_np, which passes the given address to the given destructor function.
Definition at line 275 of file CGDeclCXX.cpp.
References clang::CodeGen::RequiredArgs::All, clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), clang::AtExit, Builder, CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrCleanUpFunction(), clang::CodeGen::CGBuilderTy::CreateStore(), FinishFunction(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::IntTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::MangleContext::mangleDynamicAtExitDestructor(), clang::CodeGen::None, clang::Other, ReturnValue, and StartFunction().
|
inline |
Definition at line 2200 of file CodeGenFunction.h.
References CurSEHParent.
Referenced by EmitCall(), findDominatingStoreToReturnValue(), and getInvokeDestImpl().
Check if T
is a C++ class that has a destructor that can throw.
Definition at line 1676 of file CGBlocks.cpp.
References clang::Type::getAsCXXRecordDecl(), and clang::T.
Referenced by EmitAutoVarCleanups(), getBlockCaptureStr(), and pushCaptureCleanup().
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 1275 of file CGCleanup.cpp.
References ForDeactivation, and SetupCleanupBlockActivation().
Referenced by deactivateArgCleanupsBeforeCall(), EmitAnyExprToExn(), EmitCXXNewExpr(), and generateObjCSetterBody().
void CodeGenFunction::defaultInitNonTrivialCStructVar | ( | LValue | Dst | ) |
Definition at line 811 of file CGNonTrivialStruct.cpp.
References CGM, clang::CodeGen::LValue::getAddress(), getContext(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::LValue::isVolatile(), clang::CodeGen::Address::withElementType(), clang::QualType::withVolatile(), and clang::CharUnits::Zero().
Referenced by EmitAutoVarInit().
|
inline |
Definition at line 2166 of file CodeGenFunction.h.
Value * CodeGenFunction::EmitAArch64BuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
llvm::Triple::ArchType | Arch | ||
) |
Definition at line 10859 of file CGBuiltin.cpp.
References clang::AArch64::FirstSMEBuiltin, clang::AArch64::FirstSVEBuiltin, clang::Function, clang::AArch64::LastSMEBuiltin, and clang::AArch64::LastSVEBuiltin.
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 8319 of file CGBuiltin.cpp.
void CodeGenFunction::EmitAArch64MultiVersionResolver | ( | llvm::Function * | Resolver, |
ArrayRef< MultiVersionResolverOption > | Options | ||
) |
Definition at line 3246 of file CodeGenFunction.cpp.
Definition at line 10815 of file CGBuiltin.cpp.
References AArch64SMEIntrinsicMap, AArch64SMEIntrinsicsProvenSorted, findARMVectorIntrinsicInMap(), clang::Function, clang::SVETypeFlags::isLoad(), clang::SVETypeFlags::isOverloadNone(), clang::SVETypeFlags::isReadZA(), clang::SVETypeFlags::isStore(), clang::SVETypeFlags::isWriteZA(), and swapCommutativeSMEOperands().
Should not happen
Definition at line 10430 of file CGBuiltin.cpp.
References AArch64SVEIntrinsicMap, AArch64SVEIntrinsicsProvenSorted, findARMVectorIntrinsicInMap(), clang::CallExpr::getArg(), clang::SVETypeFlags::getMergeType(), clang::Expr::getType(), InsertExplicitZeroOperand(), clang::SVETypeFlags::isGatherLoad(), clang::SVETypeFlags::isGatherPrefetch(), clang::SVETypeFlags::isLoad(), clang::SVETypeFlags::isPrefetch(), clang::SVETypeFlags::isScatterStore(), clang::SVETypeFlags::isStore(), clang::SVETypeFlags::isStructLoad(), clang::SVETypeFlags::isStructStore(), clang::SVETypeFlags::isTupleCreate(), clang::SVETypeFlags::isTupleGet(), clang::SVETypeFlags::isTupleSet(), clang::SVETypeFlags::isUndef(), and clang::SVETypeFlags::isZExtReturn().
Definition at line 424 of file CGExprComplex.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateStructGEP(), and clang::CodeGen::Address::getName().
Referenced by EmitUnaryOpLValue().
Definition at line 419 of file CGExprComplex.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateStructGEP(), and clang::CodeGen::Address::getName().
Referenced by EmitUnaryOpLValue().
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 2030 of file CGExprAgg.cpp.
References CheckAggExprForMemSetUse(), clang::CodeGen::AggValueSlot::getAddress(), clang::Expr::getType(), hasAggregateEvaluationKind(), clang::CodeGen::AggValueSlot::isIgnored(), and clang::CodeGen::Address::isValid().
Referenced by EmitAggExprToLValue(), EmitAnyExpr(), EmitAnyExprToMem(), EmitAtomicInit(), EmitBaseInitializer(), EmitCallArg(), EmitCXXBindTemporaryLValue(), EmitCXXConstructExpr(), EmitDeclInit(), EmitDelegatingCXXConstructorCall(), EmitExprAsInit(), EmitInitializerForField(), EmitMaterializeTemporaryExpr(), EmitNewArrayInitializer(), emitPseudoObjectExpr(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
EmitAggExprToLValue - Emit the computation of the specified expression of aggregate type into a temporary LValue.
Definition at line 2042 of file CGExprAgg.cpp.
References CreateMemTemp(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), clang::CodeGen::AggValueSlot::forLValue(), clang::Expr::getType(), hasAggregateEvaluationKind(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotDestructed, and MakeAddrLValue().
Referenced by EmitBinaryOperatorLValue(), EmitCastLValue(), EmitConditionalOperatorLValue(), EmitIgnoredConditionalOperator(), EmitInitListLValue(), and EmitVAArgExprLValue().
|
inline |
Emit an aggregate assignment.
Definition at line 2970 of file CodeGenFunction.h.
References EmitAggregateCopy(), hasVolatileMember(), and clang::CodeGen::AggValueSlot::MayOverlap.
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 2093 of file CGExprAgg.cpp.
References Builder, CGM, clang::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), emitArrayLength(), clang::CodeGen::CGObjCRuntime::EmitGCMemmoveCollectable(), clang::CodeGen::LValue::getAddress(), clang::Type::getAs(), clang::ASTContext::getBaseElementType(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::RecordType::getDecl(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getObjCRuntime(), getTargetHooks(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenModule::getTBAAStructInfo(), clang::ASTContext::getTypeInfoDataSizeInChars(), clang::ASTContext::getTypeInfoInChars(), clang::RecordDecl::hasObjectMember(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::Type::isAnyComplexType(), clang::Type::isArrayType(), clang::Type::isCUDADeviceBuiltinSurfaceType(), clang::Type::isCUDADeviceBuiltinTextureType(), clang::CodeGen::CodeGenModule::mergeTBAAInfoForMemoryTransfer(), clang::LangOptionsBase::NonGC, clang::CodeGen::CodeGenTypeCache::SizeTy, clang::TypeInfo::Width, and clang::CodeGen::Address::withElementType().
Referenced by clang::CodeGen::CallArg::copyInto(), EmitAggregateAssign(), EmitAggregateCopyCtor(), emitGlobalToListCopyFunction(), emitListToGlobalCopyFunction(), EmitMemberInitializer(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), generateObjCGetterBody(), clang::CodeGen::CallArg::getRValue(), and InitCatchParam().
|
inline |
Definition at line 2975 of file CodeGenFunction.h.
References EmitAggregateCopy(), and clang::CodeGen::LValue::getType().
Referenced by EmitCXXConstructorCall().
Build all the stores needed to initialize an aggregate at Dest with the value Val.
Definition at line 1352 of file CGCall.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateStore(), and clang::CodeGen::CGBuilderTy::CreateStructGEP().
Referenced by CreateCoercedStore(), and EmitCall().
void CodeGenFunction::emitAlignmentAssumption | ( | llvm::Value * | PtrValue, |
const Expr * | E, | ||
SourceLocation | AssumptionLoc, | ||
llvm::Value * | Alignment, | ||
llvm::Value * | OffsetValue = nullptr |
||
) |
Definition at line 2858 of file CodeGenFunction.cpp.
References emitAlignmentAssumption(), clang::Expr::getExprLoc(), clang::Expr::getType(), and Loc.
void CodeGenFunction::emitAlignmentAssumption | ( | llvm::Value * | PtrValue, |
QualType | Ty, | ||
SourceLocation | Loc, | ||
SourceLocation | AssumptionLoc, | ||
llvm::Value * | Alignment, | ||
llvm::Value * | OffsetValue = nullptr |
||
) |
Definition at line 2818 of file CodeGenFunction.cpp.
References Builder, CGM, emitAlignmentAssumptionCheck(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, Loc, and SanOpts.
Referenced by emitAlignedClause(), and emitAlignmentAssumption().
void CodeGenFunction::emitAlignmentAssumptionCheck | ( | llvm::Value * | Ptr, |
QualType | Ty, | ||
SourceLocation | Loc, | ||
SourceLocation | AssumptionLoc, | ||
llvm::Value * | Alignment, | ||
llvm::Value * | OffsetValue, | ||
llvm::Value * | TheCheck, | ||
llvm::Instruction * | Assumption | ||
) |
Definition at line 3338 of file CodeGenFunction.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCheckValue(), clang::Type::getPointeeType(), clang::SanitizerSet::has(), clang::QualType::isVolatileQualified(), Loc, and SanOpts.
Referenced by emitAlignmentAssumption().
Definition at line 18455 of file CGBuiltin.cpp.
References EmitPointerWithAlignment(), clang::CallExpr::getArg(), ID, and X.
Referenced by EmitTargetArchBuiltinExpr().
Definition at line 189 of file CGGPUBuiltin.cpp.
References clang::TargetOptions::AMDGPUPrintfKindVal, clang::CallExpr::arguments(), clang::TargetOptions::Buffered, Builder, CGM, EmitCallArgs(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), clang::Type::getAs(), clang::CallExpr::getBuiltinCallee(), clang::CallExpr::getDirectCallee(), clang::CallExpr::getNumArgs(), getTarget(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTargetOpts(), clang::ValueDecl::getType(), and clang::CodeGen::CodeGenTypeCache::IntTy.
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 1417 of file CGDecl.cpp.
References getContext(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), and getVLAElements1D().
llvm::Value * CodeGenFunction::EmitAnnotationCall | ( | llvm::Function * | AnnotationFn, |
llvm::Value * | AnnotatedVal, | ||
StringRef | AnnotationStr, | ||
SourceLocation | Location, | ||
const AnnotateAttr * | Attr = nullptr |
||
) |
Emit an annotation call (intrinsic).
Definition at line 2870 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypeCache::ConstGlobalsPtrTy, clang::CodeGen::CodeGenModule::EmitAnnotationArgs(), clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationString(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), and ID.
Referenced by EmitFieldAnnotations(), EmitIntelFPGAFieldAnnotations(), and EmitVarAnnotations().
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 225 of file CGExpr.cpp.
References clang::CodeGen::AggValueSlot::asRValue(), CreateAggTemp(), EmitAggExpr(), EmitComplexExpr(), EmitScalarExpr(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), clang::Expr::getType(), clang::CodeGen::AggValueSlot::isIgnored(), clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), EmitAnyExprToTemp(), EmitBinaryOperatorLValue(), EmitIgnoredExpr(), EmitObjCBoxedExpr(), emitOMPAtomicCaptureExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), emitPseudoObjectExpr(), emitSimdlenSafelenClause(), GenerateObjCAtomicGetterCopyHelperFunction(), and getOrCreateOpaqueRValueMapping().
Definition at line 397 of file CGException.cpp.
References clang::format::cleanup(), ConvertTypeForMem(), DeactivateCleanupBlock(), clang::CodeGen::EHCleanup, EHStack, EmitAnyExprToMem(), clang::CodeGen::Address::emitRawPointer(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::CodeGen::EHScopeStack::stable_begin(), and clang::CodeGen::Address::withElementType().
void CodeGenFunction::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.
EmitAnyExprToMem - Evaluate an expression into a given memory location.
Definition at line 254 of file CGExpr.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitComplexExprIntoLValue(), EmitScalarExpr(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::RValue::get(), getEvaluationKind(), clang::Expr::getType(), MakeAddrLValue(), clang::CodeGen::AggValueSlot::MayOverlap, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
Referenced by EmitAnyExprToExn(), EmitCompoundLiteralLValue(), clang::CodeGen::ReductionCodeGen::emitInitialization(), EmitMaterializeTemporaryExpr(), EmitObjCBoxedExpr(), EmitOMPAggregateInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), and EmitValToTemp().
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 244 of file CGExpr.cpp.
References CreateAggTemp(), EmitAnyExpr(), clang::Expr::getType(), hasAggregateEvaluationKind(), and clang::CodeGen::AggValueSlot::ignored().
Referenced by EmitCallArg(), and EmitStmtExprLValue().
llvm::Value * CodeGenFunction::EmitARCAutorelease | ( | llvm::Value * | value | ) |
Autorelease the given object.
call i8* @objc_autorelease(i8* value)
Definition at line 2535 of file CGObjC.cpp.
References CGM, 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 2544 of file CGObjC.cpp.
References CGM, emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_autoreleaseReturnValue.
Referenced by emitAutoreleaseOfResult().
Definition at line 2662 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 2656 of file CGObjC.cpp.
References CGM, emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_copyWeak.
Referenced by GenerateCopyHelperFunction(), and 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 2465 of file CGObjC.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), EmitARCRelease(), EmitARCStoreStrongCall(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), and getNullForVariable().
Referenced by EmitObjectDelete().
void CodeGenFunction::EmitARCDestroyWeak | ( | Address | addr | ) |
void @objc_destroyWeak(i8** addr) Essentially objc_storeWeak(addr, nil).
Definition at line 2636 of file CGObjC.cpp.
References CGM, EmitNounwindRuntimeCall(), clang::CodeGen::Address::emitRawPointer(), getARCIntrinsic(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_destroyWeak.
Referenced by emitARCMoveAssignWeak(), EmitCXXPseudoDestructorExpr(), and EmitObjectDelete().
llvm::Value * CodeGenFunction::EmitARCExtendBlockObject | ( | const Expr * | expr | ) |
Definition at line 3479 of file CGObjC.cpp.
References EmitARCRetainBlock(), EmitObjCConsumeObject(), EmitScalarExpr(), clang::Expr::getType(), shouldEmitSeparateBlockRetain(), and tryEmitARCRetainScalarExpr().
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 2618 of file CGObjC.cpp.
References Builder, CGM, 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(), 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 2123 of file CGObjC.cpp.
References CGM, clang::CodeGen::ObjCEntrypoints::clang_arc_use, EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CodeGen::CodeGenModule::getObjCEntrypoints().
Referenced by emitWriteback().
llvm::Value * CodeGenFunction::EmitARCLoadWeak | ( | Address | addr | ) |
i8* @objc_loadWeak(i8** addr) Essentially objc_autorelease(objc_loadWeakRetained(addr)).
Definition at line 2591 of file CGObjC.cpp.
References CGM, 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 2598 of file CGObjC.cpp.
References CGM, emitARCLoadOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_loadWeakRetained.
Referenced by emitARCCopyAssignWeak(), emitARCMoveAssignWeak(), EmitLoadOfLValue(), EmitObjCMessageExpr(), and tryEmitARCRetainLoadOfScalar().
Definition at line 2669 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 2647 of file CGObjC.cpp.
References CGM, emitARCCopyOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_moveWeak.
Referenced by tryEmitARCCopyWeakInit().
void CodeGenFunction::EmitARCNoopIntrinsicUse | ( | ArrayRef< llvm::Value * > | values | ) |
Emit a call to "clang.arc.noop.use", which consumes the result of a call that has operand bundle "clang.arc.attachedcall".
Definition at line 2135 of file CGObjC.cpp.
References CGM, clang::CodeGen::ObjCEntrypoints::clang_arc_noop_use, EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), and clang::CodeGen::CodeGenModule::getObjCEntrypoints().
Referenced by emitOptimizedARCReturnCall().
llvm::Value * CodeGenFunction::EmitARCReclaimReturnedObject | ( | const Expr * | e, |
bool | allowUnsafeClaim | ||
) |
Definition at line 3044 of file CGObjC.cpp.
References CGM, emitARCRetainCallResult(), emitARCUnsafeClaimCallResult(), EmitObjCConsumeObject(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Expr::getType(), clang::ObjCRuntime::hasARCUnsafeClaimAutoreleasedReturnValue(), and clang::LangOptions::ObjCRuntime.
void CodeGenFunction::EmitARCRelease | ( | llvm::Value * | value, |
ARCPreciseLifetime_t | precise | ||
) |
Release the given object.
call void @objc_release(i8* value)
Definition at line 2436 of file CGObjC.cpp.
References clang::CodeGen::ARCImpreciseLifetime, Builder, CGM, EmitNounwindRuntimeCall(), getARCIntrinsic(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ObjCEntrypoints::objc_release.
Referenced by clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), EmitARCDestroyStrong(), EmitARCStoreStrong(), EmitCXXPseudoDestructorExpr(), EmitScalarInit(), and emitWriteback().
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 2284 of file CGObjC.cpp.
References EmitARCRetainBlock(), EmitARCRetainNonBlock(), and clang::ast_matchers::type.
Referenced by emitARCRetainLoadOfScalar(), EmitARCRetainScalarExpr(), and EmitARCStoreStrong().
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 2566 of file CGObjC.cpp.
References Builder, EmitARCAutorelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainBlock(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::ast_matchers::type.
Referenced by EmitARCRetainAutoreleaseScalarExpr(), EmitObjCExtendObjectLifetime(), and EmitObjCMessageExpr().
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 2418 of file CGObjC.cpp.
References emitOptimizedARCReturnCall().
Referenced by emitARCRetainCallResult(), and EmitForwardingCallToLambda().
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 2583 of file CGObjC.cpp.
References CGM, 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 2554 of file CGObjC.cpp.
References CGM, emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainAutoreleaseReturnValue.
Referenced by tryEmitFusedAutoreleaseOfResult().
llvm::Value * CodeGenFunction::EmitARCRetainAutoreleaseScalarExpr | ( | const Expr * | expr | ) |
Definition at line 3463 of file CGObjC.cpp.
References EmitARCAutorelease(), EmitARCRetainAutorelease(), 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 2305 of file CGObjC.cpp.
References Builder, CGM, 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 2293 of file CGObjC.cpp.
References CGM, emitARCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retain.
Referenced by EmitARCRetain(), emitARCRetainCallResult(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitObjCMessageExpr(), EmitParmDecl(), emitWriteback(), GenerateCopyHelperFunction(), and InitCatchParam().
llvm::Value * CodeGenFunction::EmitARCRetainScalarExpr | ( | const Expr * | expr | ) |
EmitARCRetainScalarExpr - Semantically equivalent to EmitARCRetainObject(e->getType(), EmitScalarExpr(e)), but making a best-effort attempt to peephole expressions that naturally produce retained objects.
Definition at line 3448 of file CGObjC.cpp.
References EmitARCRetain(), clang::Expr::getType(), and tryEmitARCRetainScalarExpr().
Referenced by EmitScalarInit().
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreAutoreleasing | ( | const BinaryOperator * | e | ) |
Definition at line 3634 of file CGObjC.cpp.
References EmitARCRetainAutoreleaseScalarExpr(), EmitLValue(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), and clang::BinaryOperator::getRHS().
Referenced by EmitBinaryOperatorLValue().
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreStrong | ( | const BinaryOperator * | e, |
bool | ignored | ||
) |
Definition at line 3603 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::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 2500 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::CharUnits::isZero(), clang::CodeGen::CodeGenTypeCache::PointerAlignInBytes, shouldUseFusedARCCalls(), and clang::ast_matchers::type.
Referenced by EmitARCStoreStrong(), and EmitBinaryOperatorLValue().
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 2479 of file CGObjC.cpp.
References Builder, CGM, EmitNounwindRuntimeCall(), clang::CodeGen::Address::emitRawPointer(), getARCIntrinsic(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrPtrTy, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and clang::CodeGen::ObjCEntrypoints::objc_storeStrong.
Referenced by destroyARCStrongWithStore(), EmitARCDestroyStrong(), EmitARCStoreStrong(), EmitParmDecl(), and GenerateCopyHelperFunction().
std::pair< LValue, llvm::Value * > CodeGenFunction::EmitARCStoreUnsafeUnretained | ( | const BinaryOperator * | e, |
bool | ignored | ||
) |
Definition at line 3584 of file CGObjC.cpp.
References EmitARCUnsafeUnretainedScalarExpr(), EmitLValue(), EmitScalarExpr(), EmitStoreOfScalar(), clang::BinaryOperator::getLHS(), and clang::BinaryOperator::getRHS().
i8* @objc_storeWeak(i8** addr, i8* value) Returns value.
Definition at line 2606 of file CGObjC.cpp.
References CGM, emitARCStoreOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_storeWeak.
Referenced by emitARCCopyAssignWeak(), emitARCMoveAssignWeak(), and EmitScalarInit().
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 2430 of file CGObjC.cpp.
References emitOptimizedARCReturnCall().
Referenced by emitARCUnsafeClaimCallResult().
llvm::Value * CodeGenFunction::EmitARCUnsafeUnretainedScalarExpr | ( | const Expr * | expr | ) |
EmitARCUnsafeUnretainedScalarExpr - Semantically equivalent to immediately releasing the resut of EmitARCRetainScalarExpr, but avoiding any spurious retains, including by performing reclaims with objc_unsafeClaimAutoreleasedReturnValue.
Definition at line 3573 of file CGObjC.cpp.
References emitARCUnsafeUnretainedScalarExpr().
Referenced by EmitARCStoreUnsafeUnretained(), and EmitScalarInit().
Value * CodeGenFunction::EmitARMBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Triple::ArchType | Arch | ||
) |
Definition at line 8554 of file CGBuiltin.cpp.
References clang::Expr::EvaluateAsInt(), and clang::CallExpr::getArg().
Referenced by EmitTargetArchBuiltinExpr().
Value * CodeGenFunction::EmitARMCDEBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Triple::ArchType | Arch | ||
) |
Definition at line 9461 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitARMMVEBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Triple::ArchType | Arch | ||
) |
Definition at line 9360 of file CGBuiltin.cpp.
References clang::Function, clang::CallExpr::getArg(), clang::Expr::getType(), and ID.
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 2391 of file CGDecl.cpp.
References Builder, ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), EmitBlock(), clang::Type::isArrayType(), PopCleanupBlock(), pushRegularPartialArrayCleanup(), and clang::CodeGen::CodeGenTypeCache::SizeTy.
Referenced by EmitArrayDelete(), emitDestroy(), and emitPartialArrayDestroy().
llvm::Value * CodeGenFunction::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.
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 2480 of file CodeGenFunction.cpp.
References clang::ast_matchers::arrayType, Builder, ConvertType(), ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CodeGen::Address::getElementType(), getVLASize(), clang::CodeGen::CodeGenFunction::VlaSizePair::NumElts, clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::CodeGen::Address::withElementType().
Referenced by EmitAggregateCopy(), EmitCXXAggrConstructorCall(), emitDestroy(), EmitOMPAggregateInit(), and EmitOMPAggregateReduction().
LValue CodeGenFunction::EmitArraySectionExpr | ( | const ArraySectionExpr * | E, |
bool | IsLowerBound = true |
||
) |
Definition at line 4440 of file CGExpr.cpp.
References Array, Builder, CGM, EmitArraySubscriptExpr(), emitArraySubscriptGEP(), EmitLValue(), emitOMPArraySectionBase(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::ArraySectionExpr::getBase(), clang::CodeGen::LValue::getBaseInfo(), clang::ArraySectionExpr::getBaseOriginalType(), clang::ArraySectionExpr::getColonLocFirst(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::ArraySectionExpr::getExprLoc(), getLangOpts(), clang::ArraySectionExpr::getLength(), clang::ArraySectionExpr::getLowerBound(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::Expr::getType(), getVLASize(), clang::Expr::IgnoreParenImpCasts(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::Address::invalid(), clang::SourceLocation::isInvalid(), clang::ArraySectionExpr::isOpenACCArraySection(), clang::Type::isPointerType(), isSimpleArrayDecayOperand(), MakeAddrLValue(), clang::CodeGen::CodeGenFunction::VlaSizePair::NumElts, and clang::CodeGen::CodeGenTypeCache::PointerWidthInBits.
Referenced by emitOMPArraySectionBase(), and getPointerAndSize().
LValue CodeGenFunction::EmitArraySubscriptExpr | ( | const ArraySubscriptExpr * | E, |
bool | Accessed = false |
||
) |
Definition at line 4173 of file CGExpr.cpp.
References Array, clang::ast_matchers::arrayType, Builder, clang::Type::castAs(), CGM, ConvertType(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), emitArraySubscriptGEP(), EmitBoundsCheck(), EmitBoundsCheckImpl(), EmitExtVectorElementLValue(), EmitLValue(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), EmitScalarExpr(), FindCountedByField(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::Address::getAlignment(), getArrayElementAlign(), clang::Type::getAs(), clang::ArraySubscriptExpr::getBase(), clang::CodeGen::LValue::getBaseInfo(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::Address::getElementType(), clang::ArraySubscriptExpr::getExprLoc(), clang::ArraySubscriptExpr::getIdx(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), getLangOpts(), clang::ArraySubscriptExpr::getLHS(), getOffsetDifferenceInBits(), clang::CharUnits::getQuantity(), clang::ArraySubscriptExpr::getRHS(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::Expr::getType(), clang::CodeGen::LValue::getType(), clang::ASTContext::getTypeSizeInChars(), getVLASize(), clang::SanitizerSet::has(), clang::Expr::IgnoreParenCasts(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::Address::invalid(), clang::Expr::isOBJCGCCandidate(), clang::Type::isSignedIntegerOrEnumerationType(), clang::CodeGen::LValue::isSimple(), isSimpleArrayDecayOperand(), clang::Type::isSubscriptableVectorType(), MakeAddrLValue(), clang::CodeGen::LValue::MakeVectorElt(), clang::LangOptionsBase::NonGC, clang::CodeGen::CodeGenFunction::VlaSizePair::NumElts, SanOpts, clang::CodeGen::LValue::setNonGC(), setObjCGCLValueClass(), and clang::ASTContext::toCharUnitsFromBits().
Referenced by EmitArraySectionExpr(), and EmitCheckedLValue().
Address CodeGenFunction::EmitArrayToPointerDecay | ( | const Expr * | Array, |
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr |
||
) |
Definition at line 3886 of file CGExpr.cpp.
References Builder, clang::Type::castAsArrayTypeUnsafe(), CGM, ConvertType(), ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), EmitLValue(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseInfo(), clang::ArrayType::getElementType(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), clang::Expr::getType(), clang::Type::isArrayType(), clang::Type::isVariableArrayType(), and clang::CodeGen::Address::withElementType().
Referenced by EmitPointerWithAlignment().
void CodeGenFunction::EmitAsanPrologueOrEpilogue | ( | bool | Prologue | ) |
Definition at line 778 of file CGClass.cpp.
Referenced by EmitConstructorBody(), and EmitDestructorBody().
void CodeGenFunction::EmitAsmStmt | ( | const AsmStmt & | S | ) |
Definition at line 2614 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 2020 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 818 of file CGAtomic.cpp.
References Builder, CGM, CreateMemTemp(), EmitAtomicInit(), EmitPointerWithAlignment(), EmitScalarExpr(), EmitStoreOfScalar(), EmitValToTemp(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getAlignment(), clang::Type::getAs(), clang::AtomicExpr::getBeginLoc(), getContext(), clang::CodeGen::CodeGenModule::getDiags(), clang::TargetInfo::getMaxAtomicInlineWidth(), clang::AtomicExpr::getOp(), clang::AtomicExpr::getOrder(), clang::AtomicExpr::getOrderFail(), clang::Type::getPointeeType(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), clang::AtomicExpr::getScope(), clang::AtomicExpr::getScopeModel(), clang::CodeGen::CodeGenModule::getSize(), getTarget(), clang::Expr::getType(), clang::ASTContext::getTypeInfoInChars(), clang::ASTContext::getTypeSizeInChars(), clang::QualType::getUnqualifiedType(), clang::AtomicExpr::getVal1(), clang::AtomicExpr::getVal2(), clang::AtomicExpr::getWeak(), int, clang::CodeGen::Address::invalid(), clang::Type::isFloatingType(), clang::Type::isPointerType(), MakeAddrLValue(), clang::DiagnosticsEngine::Report(), clang::ASTContext::toBits(), and clang::ASTContext::toCharUnitsFromBits().
Definition at line 2045 of file CGAtomic.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), EmitComplexExpr(), EmitScalarExpr(), 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 EmitAtomicExpr(), and EmitExprAsInit().
RValue CodeGenFunction::EmitAtomicLoad | ( | LValue | LV, |
SourceLocation | SL, | ||
AggValueSlot | Slot = AggValueSlot::ignored() |
||
) |
Definition at line 1506 of file CGAtomic.cpp.
References clang::CodeGen::LValue::getType(), clang::Type::isAtomicType(), and clang::CodeGen::LValue::isVolatileQualified().
Referenced by EmitLoadOfScalar(), and emitSimpleAtomicLoad().
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 1552 of file CGAtomic.cpp.
Definition at line 1930 of file CGAtomic.cpp.
References clang::CodeGen::LValue::getType(), clang::Type::isAtomicType(), and clang::CodeGen::LValue::isVolatileQualified().
Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), emitSimpleAtomicStore(), and EmitStoreOfScalar().
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 1948 of file CGAtomic.cpp.
References clang::CodeGen::CallArgList::add(), Builder, CGM, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), emitAtomicLibcall(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::RValue::getAggregateAddress(), getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::LValue::getTBAAInfo(), clang::Value::getType(), clang::CodeGen::CodeGenTypeCache::IntTy, clang::CodeGen::RValue::isAggregate(), clang::CodeGen::LValue::isSimple(), shouldCastToInt(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::EmitAtomicUpdate | ( | LValue | LVal, |
llvm::AtomicOrdering | AO, | ||
const llvm::function_ref< RValue(RValue)> & | UpdateOp, | ||
bool | IsVolatile | ||
) |
Definition at line 2038 of file CGAtomic.cpp.
Referenced by EmitOMPAtomicSimpleUpdateExpr().
void CodeGenFunction::EmitAttributedStmt | ( | const AttributedStmt & | S | ) |
Definition at line 712 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 1479 of file CGDecl.cpp.
References Builder, Bypasses, CGM, ConvertTypeForMem(), clang::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateStore(), CreateTempAlloca(), clang::CodeGen::Decl, clang::Default, clang::QualType::DK_cxx_destructor, EmitLifetimeStart(), clang::CodeGen::Address::emitRawPointer(), EmitStaticVarDecl(), EmitVariablyModifiedType(), EnsureInsertPoint(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::QualType::getAddressSpace(), clang::CodeGen::Address::getAlignment(), clang::Type::getAs(), getBlockByrefInfo(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::CodeGen::Address::getElementType(), clang::VarDecl::getInit(), clang::CodeGen::CGOpenMPRuntime::getKmpcAllocShared(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::RawAddress::getPointer(), getTarget(), clang::ValueDecl::getType(), hasLabelBeenSeenInCurrentScope(), clang::CodeGenOptions::hasReducedDebugInfo(), HaveInsertPoint(), clang::CodeGen::RawAddress::invalid(), clang::CodeGen::Address::invalid(), clang::Type::isArrayType(), clang::CodeGen::VarBypassDetector::IsBypassed(), clang::Expr::isConstantInitializer(), clang::Type::isConstantSizeType(), clang::QualType::isConstantStorage(), clang::VarDecl::isConstexpr(), clang::VarDecl::isEscapingByref(), clang::VarDecl::isExceptionVariable(), clang::TargetCXXABI::isMicrosoft(), clang::VarDecl::isNRVOVariable(), clang::QualType::isPODType(), clang::Type::isRecordType(), clang::CodeGen::Address::isValid(), clang::Type::isVariablyModifiedType(), MakeAddrLValue(), clang::VarDecl::needsDestruction(), clang::CodeGen::NormalCleanup, NRVOFlags, clang::CharUnits::One(), clang::OpenCL, clang::opencl_constant, clang::opencl_private, pushKmpcAllocFree(), ReturnValue, and clang::CodeGen::CodeGenFunction::AutoVarEmission::useLifetimeMarkers().
Referenced by EmitAutoVarDecl(), getNumThreads(), and clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective().
void CodeGenFunction::EmitAutoVarCleanups | ( | const AutoVarEmission & | emission | ) |
Definition at line 2167 of file CGDecl.cpp.
References clang::CodeGen::CodeGenTypes::arrangeFunctionDeclaration(), clang::CodeGen::BLOCK_FIELD_IS_BYREF, clang::CodeGen::BLOCK_FIELD_IS_WEAK, CGM, cxxDestructorCanThrow(), EHStack, emitAutoVarTypeCleanup(), enterByrefCleanup(), clang::LangOptionsBase::GCOnly, clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::Decl::getAttr(), getContext(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), HaveInsertPoint(), clang::QualType::isObjCGCWeak(), clang::VarDecl::needsDestruction(), clang::LangOptionsBase::NonGC, clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by EmitAutoVarDecl(), getNumThreads(), and clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective().
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 1379 of file CGDecl.cpp.
References clang::CodeGen::CGSYCLRuntime::actOnAutoVarEmit(), CGM, EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getOriginalAllocatedAddress(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::CodeGenModule::getSYCLRuntime(), and clang::VarDecl::isNRVOVariable().
Referenced by EmitVarDecl().
void CodeGenFunction::EmitAutoVarInit | ( | const AutoVarEmission & | emission | ) |
Definition at line 1935 of file CGDecl.cpp.
References Builder, CGM, constWithPadding(), ContainsLabel(), clang::CodeGen::ApplyDebugLocation::CreateDefaultArtificial(), defaultInitNonTrivialCStructVar(), drillIntoBlockVariable(), emitBlockByrefAddress(), emitByrefStructureInit(), EmitExprAsInit(), emitStoresForConstant(), EmitStoreThroughLValue(), EnsureInsertPoint(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::Decl::getAttr(), getContext(), clang::VarDecl::getInit(), clang::ASTContext::getLangOpts(), clang::Decl::getLocation(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::ValueDecl::getType(), HaveInsertPoint(), clang::CodeGen::CodeGenTypeCache::Int8Ty, isCapturedBy(), clang::VarDecl::isConstexpr(), isTrivialInitializer(), Loc, MakeAddrLValue(), clang::VarDecl::mightBeUsableInConstantExpressions(), No, clang::LangOptionsBase::Pattern, clang::QualType::PDIK_Struct, replaceUndef(), clang::CodeGen::LValue::setNonGC(), clang::CodeGen::ConstantEmitter::tryEmitAbstractForInitializer(), clang::ast_matchers::type, clang::LangOptionsBase::Uninitialized, and Yes.
Referenced by EmitAutoVarDecl().
void CodeGenFunction::emitAutoVarTypeCleanup | ( | const AutoVarEmission & | emission, |
QualType::DestructionKind | dtorKind | ||
) |
Enter a destroy cleanup for the given local variable.
Definition at line 2100 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(), getDestroyer(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress(), clang::CodeGen::NormalAndEHCleanup, clang::ast_matchers::type, and clang::dataflow::var().
Referenced by EmitAutoVarCleanups().
LValue CodeGenFunction::EmitBinaryOperatorLValue | ( | const BinaryOperator * | E | ) |
Definition at line 5635 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), EmitAggExprToLValue(), EmitAnyExpr(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitBitfieldConversionCheck(), EmitCheckedLValue(), EmitComplexAssignmentLValue(), EmitIgnoredExpr(), EmitLValue(), EmitNullabilityCheck(), EmitPointerToDataMemberBinaryExpr(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughLValue(), EmitWithOriginalRHSBitfieldAssignment(), EnsureInsertPoint(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getBitFieldInfo(), getEvaluationKind(), clang::BinaryOperator::getExprLoc(), getLangOpts(), clang::BinaryOperator::getLHS(), clang::QualType::getObjCLifetime(), clang::BinaryOperator::getOpcode(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::BinaryOperator::getRHS(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::SanitizerSet::has(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::RValue::isScalar(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, Previous, clang::Expr::refersToBitField(), SanOpts, TCK_Store, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
void CodeGenFunction::EmitBitfieldConversionCheck | ( | llvm::Value * | Src, |
QualType | SrcType, | ||
llvm::Value * | Dst, | ||
QualType | DstType, | ||
const CGBitFieldInfo & | Info, | ||
SourceLocation | Loc | ||
) |
Emit a check that an [implicit] conversion of a bitfield.
It is not UB, so we use the value after conversion.
Definition at line 1311 of file CGExprScalar.cpp.
References Builder, ConvertType(), EmitBitfieldSignChangeCheckHelper(), EmitBitfieldTruncationCheckHelper(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), clang::Value::getType(), clang::SanitizerSet::has(), clang::Type::isBooleanType(), clang::Type::isSignedIntegerOrEnumerationType(), Loc, PromotionIsPotentiallyEligibleForImplicitIntegerConversionCheck(), SanOpts, and clang::CodeGen::CGBitFieldInfo::Size.
Referenced by EmitBinaryOperatorLValue().
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 578 of file CGStmt.cpp.
References Builder, CurFn, and EmitBranch().
Referenced by clang::CodeGen::CatchRetScope::Emit(), emitArrayDestroy(), EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitCall(), emitCatchDispatchBlock(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCleanup(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCtorPrologue(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXNewExpr(), EmitDynamicCast(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), emitInterWarpCopyFunction(), EmitLabel(), EmitLandingPad(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitMustTailThunk(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitObjectDelete(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitPostUpdateForReductionClause(), EmitReturnBlock(), EmitReturnValueCheck(), EmitSehScope(), emitShuffleAndReduceFunction(), EmitTrapCheck(), EmitTypeCheck(), EmitTypeidFromVTable(), clang::CodeGen::CGOpenMPRuntime::emitUDMapperArrayInitOrDel(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), EmitVTablePtrCheckForCast(), emitWasmCatchPadBlock(), emitWriteback(), emitWritebackArg(), EnsureInsertPoint(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), FinishFunction(), GenerateCXXGlobalInitFunc(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), PerformReturnAdjustment(), and shuffleAndStore().
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 615 of file CGStmt.cpp.
References Builder, and CurFn.
Referenced by emitCatchDispatchBlock(), emitCatchPadBlock(), emitFilterDispatchBlock(), and emitWasmCatchPadBlock().
Address CodeGenFunction::emitBlockByrefAddress | ( | Address | baseAddr, |
const BlockByrefInfo & | info, | ||
bool | followForward, | ||
const llvm::Twine & | name | ||
) |
Definition at line 2547 of file CGBlocks.cpp.
References Builder, clang::CodeGen::BlockByrefInfo::ByrefAlignment, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::BlockByrefInfo::FieldIndex, clang::transformer::name(), and clang::CodeGen::BlockByrefInfo::Type.
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 2540 of file CGBlocks.cpp.
References getBlockByrefInfo(), and clang::dataflow::var().
Referenced by drillIntoBlockVariable(), EmitAutoVarInit(), EmitDeclRefLValue(), EmitScalarInit(), GetAddrOfBlockDecl(), and clang::CodeGen::CodeGenFunction::AutoVarEmission::getObjectAddress().
RValue CodeGenFunction::EmitBlockCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 1156 of file CGBlocks.cpp.
References clang::CodeGen::CallArgList::add(), clang::CallExpr::arguments(), clang::CodeGen::CodeGenTypes::arrangeBlockFunctionCall(), Builder, clang::Type::castAs(), CGM, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), EmitCall(), EmitCallArgs(), EmitScalarExpr(), clang::Func, clang::CodeGen::RValue::get(), clang::ASTContext::getAddrSpaceQualType(), clang::Type::getAs(), clang::CallExpr::getCallee(), clang::CallExpr::getCalleeDecl(), getContext(), clang::CodeGen::CodeGenModule::getGenericBlockLiteralType(), clang::CodeGen::CGOpenCLRuntime::getGenericVoidPointerType(), clang::CodeGen::CGOpenCLRuntime::getInvokeFunction(), getLangOpts(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::ASTContext::getPointerType(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::OpenCL, clang::opencl_generic, ReturnValue, clang::CodeGen::CodeGenTypeCache::UnqualPtrTy, clang::ASTContext::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by EmitCallExpr().
llvm::Value * CodeGenFunction::EmitBlockCopyAndAutorelease | ( | llvm::Value * | Block, |
QualType | Ty | ||
) |
Definition at line 3908 of file CGObjC.cpp.
References Block, CGM, clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), getContext(), clang::SelectorTable::getNullarySelector(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ASTContext::Idents, and clang::ASTContext::Selectors.
llvm::Value * CodeGenFunction::EmitBlockLiteral | ( | const BlockExpr * | blockExpr | ) |
Emit block literal.
Emit a block literal expression in the current function.
Definition at line 759 of file CGBlocks.cpp.
References Block, clang::CodeGen::CGBlockInfo::BlockAlign, clang::ast_matchers::blockExpr, clang::CodeGen::CGBlockInfo::BlockExpression, clang::CodeGen::CGBlockInfo::CanBeGlobal, CGM, computeBlockInfo(), CreateTempAlloca(), CurFn, clang::CodeGen::CodeGenModule::getAddrOfGlobalBlockIfEmitted(), clang::CodeGen::CGBlockInfo::LocalAddress, and clang::CodeGen::CGBlockInfo::StructureType.
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 1564 of file CodeGenFunction.cpp.
llvm::Value * CodeGenFunction::emitBoolVecConversion | ( | llvm::Value * | SrcVec, |
unsigned | NumElementsDst, | ||
const llvm::Twine & | Name = "" |
||
) |
Definition at line 3418 of file CodeGenFunction.cpp.
Referenced by EmitFromMemory(), EmitLoadOfScalar(), and EmitStoreOfScalar().
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 1168 of file CGExpr.cpp.
Referenced by EmitArraySubscriptExpr(), and emitPointerArithmetic().
void CodeGenFunction::EmitBoundsCheckImpl | ( | const Expr * | E, |
llvm::Value * | Bound, | ||
llvm::Value * | Index, | ||
QualType | IndexType, | ||
QualType | IndexedType, | ||
bool | Accessed | ||
) |
Definition at line 1182 of file CGExpr.cpp.
Referenced by EmitArraySubscriptExpr().
Definition at line 13446 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), clang::Expr::getExprLoc(), clang::Expr::getObjectKind(), clang::Expr::IgnoreParens(), and clang::OK_BitField.
Referenced by EmitTargetArchBuiltinExpr().
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 598 of file CGStmt.cpp.
References Builder.
Referenced by EmitBlock(), EmitBranchToCounterBlock(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), EmitDynamicCast(), clang::CodeGen::CGOpenMPRuntime::emitIfClause(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), and shuffleAndStore().
void CodeGenFunction::EmitBranchOnBoolExpr | ( | const Expr * | Cond, |
llvm::BasicBlock * | TrueBlock, | ||
llvm::BasicBlock * | FalseBlock, | ||
uint64_t | TrueCount, | ||
Stmt::Likelihood | LH = Stmt::LH_None , |
||
const Expr * | ConditionalOp = nullptr |
||
) |
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.
LH | The value of the likelihood attribute on the True branch. |
ConditionalOp | Used by MC/DC code coverage to track the result of the ConditionalOperator (ternary) through a recursive call for the operator's LHS and RHS nodes. |
Definition at line 2076 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CGM, ConstantFoldsToSimpleInteger(), createBasicBlock(), double, EmitBlock(), EmitBranchToCounterBlock(), EmitCXXThrowExpr(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EvaluateExprAsBool(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getCurrentProfileCount(), getLLVMContext(), getProfileCount(), clang::CodeGenOptions::hasProfileClangInstr(), clang::Expr::IgnoreImpCasts(), clang::Expr::IgnoreParens(), incrementProfileCounter(), isInstrumentedCondition(), clang::Stmt::LH_Likely, clang::Stmt::LH_None, clang::Stmt::LH_Unlikely, max(), maybeUpdateMCDCCondBitmap(), MCDCLogOpStack, and setCurrentProfileCount().
Referenced by EmitBranchToCounterBlock(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), and clang::CodeGen::CGOpenMPRuntime::emitIfClause().
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 1096 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::stable_iterator::encloses(), and clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth().
Referenced by EmitForwardingCallToLambda(), EnterDtorCleanups(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), and clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::FinalizeOMPRegion().
void CodeGenFunction::EmitBranchToCounterBlock | ( | const Expr * | Cond, |
BinaryOperator::Opcode | LOp, | ||
llvm::BasicBlock * | TrueBlock, | ||
llvm::BasicBlock * | FalseBlock, | ||
uint64_t | TrueCount = 0 , |
||
Stmt::Likelihood | LH = Stmt::LH_None , |
||
const Expr * | CntrIdx = nullptr |
||
) |
EmitBranchToCounterBlock - Emit a conditional branch to a new block that increments a profile counter based on the semantics of the given logical operator opcode.
This is used to instrument branch condition coverage for logical operators.
Definition at line 2002 of file CodeGenFunction.cpp.
References CGM, createBasicBlock(), EmitBlock(), EmitBranch(), EmitBranchOnBoolExpr(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGenOptions::hasProfileClangInstr(), incrementProfileCounter(), and isInstrumentedCondition().
Referenced by EmitBranchOnBoolExpr().
void CodeGenFunction::EmitBreakStmt | ( | const BreakStmt & | S | ) |
Definition at line 1572 of file CGStmt.cpp.
Emit IR for __builtin_align_up/__builtin_align_down.
Generate (x & ~(y-1)) to align down or ((x+(y-1)) & ~(y-1)) to align up.
Note: For pointer types we can avoid ptrtoint/inttoptr pairs by using the llvm.ptrmask intrinsic (with a GEP before in the align_up case).
Definition at line 22770 of file CGBuiltin.cpp.
llvm::Value * CodeGenFunction::EmitBuiltinAvailable | ( | const VersionTuple & | Version | ) |
Definition at line 3988 of file CGObjC.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), emitIsPlatformVersionAtLeast(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenModule::IsOSVersionAtLeastFn, and clang::Min.
RValue CodeGenFunction::EmitBuiltinExpr | ( | const GlobalDecl | GD, |
unsigned | BuiltinID, | ||
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 2619 of file CGBuiltin.cpp.
References ceil, copysign, cos, emitBinaryBuiltin(), emitUnaryMaybeConstrainedFPBuiltin(), clang::Expr::EvaluateAsRValue(), exp, exp2, clang::CodeGen::RValue::get(), clang::Decl::getAsFunction(), clang::GlobalDecl::getDecl(), clang::CallExpr::getFPFeatures(), clang::Decl::hasAttr(), clang::CallExpr::hasStoredFPFeatures(), clang::Expr::isPRValue(), and mutateLongDoubleBuiltin().
Referenced by EmitCallExpr().
Emit IR for __builtin_is_aligned.
Generate (x & (y-1)) == 0.
Definition at line 22756 of file CGBuiltin.cpp.
RValue CodeGenFunction::EmitBuiltinNewDeleteCall | ( | const FunctionProtoType * | Type, |
const CallExpr * | TheCallExpr, | ||
bool | IsDelete | ||
) |
Definition at line 1357 of file CGExprCXX.cpp.
References clang::CallExpr::arguments(), EmitCallArgs(), and getContext().
Emit IR for __builtin_os_log_format.
Definition at line 2243 of file CGBuiltin.cpp.
References clang::CodeGen::CallArgList::add(), clang::analyze_os_log::computeOSLogBufferLayout(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::Expr::IgnoreParenCasts(), clang::CodeGen::RawAddress::invalid(), clang::analyze_os_log::OSLogBufferLayout::Items, clang::analyze_os_log::OSLogBufferItem::MaskKind, clang::CodeGen::TEK_Scalar, and clang::ASTContext::VoidPtrTy.
void CodeGenFunction::emitByrefStructureInit | ( | const AutoVarEmission & | emission | ) |
Initialize the structural components of a __block variable, i.e.
everything but the actual object.
Definition at line 2664 of file CGBlocks.cpp.
References clang::CodeGen::BLOCK_BYREF_HAS_COPY_DISPOSE, clang::CodeGen::BLOCK_BYREF_LAYOUT_EXTENDED, clang::CodeGen::BLOCK_BYREF_LAYOUT_MASK, clang::CodeGen::BLOCK_BYREF_LAYOUT_NON_OBJECT, clang::CodeGen::BLOCK_BYREF_LAYOUT_STRONG, clang::CodeGen::BLOCK_BYREF_LAYOUT_UNRETAINED, clang::CodeGen::BLOCK_BYREF_LAYOUT_WEAK, clang::CodeGen::CGObjCRuntime::BuildByrefLayout(), Builder, CGM, clang::CodeGen::BlockByrefHelpers::CopyHelper, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::BlockByrefHelpers::DisposeHelper, clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::BlockFlags::getBitMask(), clang::ASTContext::getByrefLifetime(), getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenTypeCache::getIntSize(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::GetTargetTypeStoreSize(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::IntTy, clang::isa(), clang::transformer::name(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, printf(), clang::ast_matchers::type, and V.
Referenced by EmitAutoVarInit().
RValue CodeGenFunction::EmitCall | ( | const CGFunctionInfo & | CallInfo, |
const CGCallee & | Callee, | ||
ReturnValueSlot | ReturnValue, | ||
const CallArgList & | Args, | ||
llvm::CallBase ** | callOrInvoke, | ||
bool | IsMustTail, | ||
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 5108 of file CGCall.cpp.
References addControlledConvergenceToken(), clang::CodeGen::CGDebugInfo::addHeapAllocSiteMetadata(), clang::CodeGen::CodeGenModule::AdjustMemoryAttribute(), clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Builder, CGM, clang::CodeGen::TargetCodeGenInfo::checkFunctionCallABI(), checkTargetFeatures(), clang::CodeGen::ABIArgInfo::CoerceAndExpand, clang::CodeGen::CodeGenModule::ConstructAttributeList(), convertTempToRValue(), ConvertType(), ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateAddrSpaceCast(), createBasicBlock(), CreateCoercedLoad(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), CreateMemTemp(), CreateMemTempWithoutCast(), clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CreateTempAlloca(), CurCodeDecl, CurFuncDecl, CurrentCleanupScopeDepth, currentFunctionUsesSEHTry(), deactivateArgCleanupsBeforeCall(), clang::Default, clang::CodeGen::ABIArgInfo::Direct, clang::QualType::DK_nontrivial_c_struct, EHStack, emitAddressAtOffset(), EmitAggregateStore(), EmitBlock(), EmitCMSEClearRecord(), EmitKCFIOperandBundle(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitNounwindRuntimeCall(), clang::CodeGen::Address::emitRawPointer(), EmitUnreachable(), emitWritebacks(), clang::CodeGen::EHScopeStack::end(), EnsureInsertPoint(), clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::EHScopeStack::find(), clang::CodeGen::CallArgList::freeArgumentMemory(), clang::CharUnits::fromQuantity(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::RValue::get(), clang::FunctionType::ExtParameterInfo::getABI(), clang::CodeGen::LValue::getAddressSpace(), clang::CodeGen::RValue::getAggregate(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getAlignment(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), clang::CharUnits::getAsAlign(), getAsNaturalPointerTo(), clang::CodeGen::CodeGenTypeCache::getASTAllocaAddressSpace(), getBundlesForFunclet(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::EHCleanupScope::getCleanup(), clang::CodeGen::CallArgList::getCleanupsToDeactivate(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), clang::CodeGen::RValue::getComplex(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getDebugInfo(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::RawAddress::getElementType(), clang::CodeGen::Address::getElementType(), getEvaluationKind(), clang::CodeGen::CGFunctionInfo::getExtParameterInfo(), clang::CodeGen::CGCallee::getFunctionPointer(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaIndirect(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), getInvokeDest(), clang::CodeGen::ABIArgInfo::getKind(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), getMaxVectorWidth(), clang::CodeGen::Address::getName(), clang::CodeGen::CGFunctionInfo::getNumRequiredArgs(), clang::CodeGen::ABIArgInfo::getPaddingType(), getParamType(), clang::Type::getPointeeType(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::SourceLocation::getRawEncoding(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CallArgList::getStackBase(), getTarget(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), getTargetHooks(), clang::CodeGen::Address::getType(), getTypes(), GetUndefRValue(), clang::CodeGen::ABIArgInfo::getUnpaddedCoerceAndExpandType(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), clang::SanitizerSet::hasOneOf(), clang::CodeGen::CallArgList::hasWritebacks(), HaveInsertPoint(), ID, clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, InAlwaysInlineAttributedStmt, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ABIArgInfo::IndirectAliased, clang::CodeGen::CGFunctionInfoArgInfo::info, InNoInlineAttributedStmt, InNoMergeAttributedStmt, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::RawAddress::invalid(), clang::CodeGen::Address::invalid(), IsArgumentMaybeUndef(), isCleanupPadScope(), clang::CodeGen::CGFunctionInfo::isCmseNSCall(), clang::CodeGen::ABIArgInfo::isCoerceAndExpand(), clang::QualType::isDestructedType(), clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::isEmptyRecord(), clang::CodeGen::ABIArgInfo::isInAlloca(), clang::CodeGen::ABIArgInfo::isIndirect(), clang::CodeGen::ABIArgInfo::isIndirectAliased(), clang::CodeGen::EHPersonality::isMSVCXXPersonality(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::CodeGen::EHScopeStack::Cleanup::isRedundantBeforeReturn(), clang::CodeGen::RValue::isScalar(), isSEHTryScope(), clang::CodeGen::RawAddress::isValid(), clang::CodeGen::Address::isValid(), clang::interp::Load(), Loc, makeNaturalAddressForPointer(), max(), MaybeEmitFPBuiltinofFD(), MustTailCall, clang::CodeGen::NormalEHLifetimeMarker, clang::OpenCL, clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), PopCleanupBlock(), pushDestroy(), clang::interp::Ret(), ReturnValue, SanOpts, SetSqrtFPAccuracy(), clang::CodeGen::CodeGenModule::shouldEmitConvergenceTokens(), clang::SwiftErrorResult, clang::T, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::CodeGen::CGFunctionInfoArgInfo::type, V, clang::CodeGen::CodeGenPGO::valueProfile(), clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::CodeGen::Address::withElementType().
Referenced by emitAtomicLibcall(), EmitBlockCallExpr(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallExpr(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXMemberCallExpr(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitForwardingCallToLambda(), emitLibraryCall(), EmitNewDeleteCall(), EmitSimpleCallExpr(), emitStructSetterCall(), generateObjCGetterBody(), and generateObjCSetterBody().
|
inline |
Definition at line 4373 of file CodeGenFunction.h.
References EmitCall(), and ReturnValue.
RValue CodeGenFunction::EmitCall | ( | QualType | FnType, |
const CGCallee & | Callee, | ||
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue, | ||
llvm::Value * | Chain = nullptr |
||
) |
Definition at line 5845 of file CGExpr.cpp.
References clang::CodeGen::CallArgList::add(), clang::CallExpr::arguments(), clang::CodeGen::CodeGenTypes::arrangeFreeFunctionCall(), Builder, BuildFunctionArgList(), CFITCK_ICall, CGM, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateConstGEP2_32(), clang::CodeGen::CodeGenModule::CreateCrossDsoCfiTypeId(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::CreateMetadataIdentifierForType(), clang::CodeGen::CodeGenModule::CreateMetadataIdentifierGeneralized(), Default, EmitBlock(), EmitCall(), EmitCallArgs(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitIgnoredExpr(), EmitSanitizerStatReport(), ForceLeftToRight, ForceRightToLeft, clang::CodeGen::RValue::get(), clang::CodeGen::CGCallee::getAbstractInfo(), clang::CallExpr::getArg(), clang::CallExpr::getBeginLoc(), clang::CodeGen::CGCalleeInfo::getCalleeDecl(), clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getContext(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLangOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::CodeGen::CodeGenModule::getTriple(), clang::CodeGen::CodeGenModule::getTypes(), getTypes(), clang::CodeGen::TargetCodeGenInfo::getUBSanFunctionSignature(), getUBSanFunctionTypeHash(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::Type::isFunctionPointerType(), MustTailCall, ReturnValue, SanOpts, clang::Stub, and clang::ASTContext::VoidPtrTy.
void CodeGenFunction::EmitCallAndReturnForThunk | ( | llvm::FunctionCallee | Callee, |
const ThunkInfo * | Thunk, | ||
bool | IsUnprototyped | ||
) |
Definition at line 302 of file CGVTables.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CGCXXABI::adjustCallArgsForDestructorThunk(), clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), AutoreleaseResult, clang::Type::castAs(), CGM, CurFnInfo, CurGD, EmitCall(), EmitDelegateCallArg(), EmitMustTailThunk(), clang::CodeGen::CGCXXABI::EmitReturnFromThunk(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), FinishThunk(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::RValue::get(), clang::CodeGen::CGFunctionInfo::getCallingConvention(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CodeGen::ABIArgInfo::getKind(), clang::CodeGen::CGFunctionInfo::getRegParm(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::FunctionType::getReturnType(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), hasAggregateEvaluationKind(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CGFunctionInfoArgInfo::info, clang::ReturnAdjustment::isEmpty(), clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::CodeGen::ReturnValueSlot::isNull(), clang::CodeGen::CGFunctionInfo::isVariadic(), clang::Type::isVoidType(), clang::QualType::isVolatileQualified(), LoadCXXThis(), LoadCXXThisAddress(), clang::FunctionDecl::parameters(), PerformReturnAdjustment(), clang::CodeGen::CGCXXABI::performThisAdjustment(), clang::ThunkInfo::Return, ReturnValue, similar(), clang::ThunkInfo::This, clang::CodeGen::CGFunctionInfoArgInfo::type, clang::CodeGen::CGFunctionInfo::usesInAlloca(), and clang::ASTContext::VoidPtrTy.
Referenced by generateThunk().
void CodeGenFunction::EmitCallArg | ( | CallArgList & | args, |
const Expr * | E, | ||
QualType | ArgType | ||
) |
EmitCallArg - Emit a single call argument.
Definition at line 4753 of file CGCall.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CallArgList::addArgCleanupDeactivation(), clang::CodeGen::CallArgList::addUncopiedAggregate(), clang::CodeGen::AggValueSlot::asRValue(), Builder, CreateAggTemp(), clang::CodeGen::CGBuilderTy::CreateFlagLoad(), createPlaceholderSlot(), EHStack, EmitAggExpr(), EmitAnyExprToTemp(), EmitLValue(), EmitReferenceBindingToExpr(), emitWritebackArg(), clang::CodeGen::AggValueSlot::getAddress(), clang::RecordType::getDecl(), getLangOpts(), clang::Expr::getObjectKind(), hasAggregateEvaluationKind(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Expr::isGLValue(), clang::RecordDecl::isParamDestroyedInCallee(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::CallArgList::isUsingInAlloca(), clang::CodeGen::NormalAndEHCleanup, clang::OK_Ordinary, clang::CodeGen::AggValueSlot::setExternallyDestructed(), clang::CodeGen::EHScopeStack::stable_begin(), and clang::ast_matchers::type.
void CodeGenFunction::EmitCallArgs | ( | CallArgList & | Args, |
PrototypeWrapper | Prototype, | ||
llvm::iterator_range< CallExpr::const_arg_iterator > | ArgRange, | ||
AbstractCallee | AC = AbstractCallee() , |
||
unsigned | ParamsToSkip = 0 , |
||
EvaluationOrder | Order = EvaluationOrder::Default |
||
) |
EmitCallArgs - Emit call arguments for a function.
Definition at line 4547 of file CGCall.cpp.
Referenced by commonEmitCXXMemberOrOperatorCall(), EmitAMDGPUDevicePrintfCallExpr(), EmitBlockCallExpr(), EmitBuiltinNewDeleteCall(), EmitCall(), EmitCXXConstructorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXNewExpr(), EmitObjCMessageExpr(), and EmitSynthesizedCXXCopyCtorCall().
Definition at line 5583 of file CGExpr.cpp.
References EmitDirectCallee(), EmitIgnoredExpr(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::CGCallee::forPseudoDestructor(), clang::ast_matchers::functionType, clang::Type::getAs(), clang::CodeGen::LValue::getPointer(), clang::Expr::getReferencedDeclOfCallee(), clang::Expr::getType(), clang::Expr::IgnoreParens(), and clang::CodeGen::KnownNonNull.
Referenced by EmitCallExpr(), and EmitSimpleCallExpr().
RValue CodeGenFunction::EmitCallExpr | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue = ReturnValueSlot() |
||
) |
Definition at line 5480 of file CGExpr.cpp.
References EmitBlockCallExpr(), EmitBuiltinExpr(), EmitCall(), EmitCallee(), EmitCUDAKernelCallExpr(), EmitCXXMemberCallExpr(), EmitCXXOperatorMemberCallExpr(), EmitCXXPseudoDestructorExpr(), clang::CodeGen::CGCallee::getBuiltinDecl(), clang::CodeGen::CGCallee::getBuiltinID(), clang::CallExpr::getCallee(), clang::CodeGen::CGCallee::getPseudoDestructorExpr(), clang::Expr::getType(), clang::Type::isBlockPointerType(), clang::CodeGen::CGCallee::isBuiltin(), clang::CodeGen::CGCallee::isPseudoDestructor(), and ReturnValue.
Referenced by EmitCallExprLValue().
Definition at line 5721 of file CGExpr.cpp.
References clang::CodeGen::Decl, EmitCallExpr(), clang::CodeGen::RValue::getAggregateAddress(), clang::CallExpr::getCallReturnType(), getContext(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::CodeGen::RValue::isScalar(), MakeAddrLValue(), and MakeNaturalAlignPointeeAddrLValue().
llvm::CallBase * CodeGenFunction::EmitCallOrInvoke | ( | llvm::FunctionCallee | Callee, |
ArrayRef< llvm::Value * > | Args, | ||
const Twine & | Name = "" |
||
) |
Emits a call or invoke instruction to the given function, depending on the current state of the EH stack.
Definition at line 4962 of file CGCall.cpp.
Referenced by EmitObjCRelease(), emitObjCValueOperation(), and EmitRuntimeCallOrInvoke().
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 1872 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 3109 of file CGStmt.cpp.
Definition at line 1684 of file CGStmt.cpp.
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 1599 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 5229 of file CGExpr.cpp.
References clang::Type::castAs(), CFITCK_DerivedCast, CFITCK_UnrelatedCast, CGM, clang::CastExpr::changesVolatileQualification(), ConvertType(), ConvertTypeForMem(), EmitAggExprToLValue(), EmitDynamicCast(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), EmitLValue(), EmitTypeCheck(), EmitUnsupportedLValue(), EmitVTablePtrCheckForCast(), clang::CodeGen::LValue::getAddress(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), clang::QualType::getAddressSpace(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValue::getBaseInfo(), clang::Stmt::getBeginLoc(), clang::CastExpr::getCastKind(), getContext(), clang::Expr::getExprLoc(), getLangOpts(), clang::CodeGen::LValue::getPointer(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::CodeGen::LValue::getQuals(), clang::CastExpr::getSubExpr(), getTargetHooks(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::Expr::getType(), clang::SanitizerSet::has(), clang::HLSL, clang::CodeGen::LValue::isSimple(), MakeAddrLValue(), MakeNaturalAlignRawAddrLValue(), clang::CastExpr::path_begin(), clang::CastExpr::path_end(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), sanitizePerformTypeCheck(), SanOpts, clang::CodeGen::LValue::setAddress(), clang::T, TCK_DowncastReference, clang::interp::This(), V, and clang::CodeGen::Address::withElementType().
void CodeGenFunction::EmitCfiCheckFail | ( | ) |
Emit a cross-DSO CFI failure handling function.
Definition at line 3730 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::CodeGen::CGBuilderTy::CreateConstGEP2_32(), clang::CodeGen::CGBuilderTy::CreateLoad(), Data, EmitCheck(), EmitLoadOfScalar(), EmitTrapCheck(), FinishFunction(), GetAddrOfLocalVar(), getContext(), clang::CodeGen::CodeGenModule::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::Other, clang::LangOptions::Sanitize, SanOpts, clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), StartFunction(), V, clang::ASTContext::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::ASTContext::VoidTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by clang::CodeGen::CodeGenModule::Release().
void CodeGenFunction::EmitCfiCheckStub | ( | ) |
Emit a stub for the cross-DSO CFI check function.
Definition at line 3691 of file CGExpr.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), CGM, FnArgs, getContext(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::Other, clang::CodeGen::CodeGenModule::setDSOLocal(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, 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 3644 of file CGExpr.cpp.
References Builder, CGM, createBasicBlock(), 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.
Referenced by EmitCall(), and EmitVTablePtrCheck().
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 either trap or call a handler function in the UBSan runtime with the provided arguments, and create a conditional branch to it.
Definition at line 3521 of file CGExpr.cpp.
References Builder, CGM, ClSanitizeGuardChecks(), createBasicBlock(), clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), EmitBlock(), emitCheckHandlerCall(), EmitCheckValue(), EmitTrapCheck(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), clang::CodeGen::CodeGenModule::getModule(), getRecoverableKind(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, IsSanitizerScope, Node, clang::CodeGenOptions::SanitizeRecover, SanitizerHandlers, clang::CodeGenOptions::SanitizeTrap, SanOpts, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by emitAlignmentAssumptionCheck(), EmitBitfieldConversionCheck(), EmitCall(), EmitCfiCheckFail(), EmitNullabilityCheck(), EmitOverflowCheckedAbs(), EmitReturnValueCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitUnreachable(), EmitVariablyModifiedType(), EmitVTablePtrCheck(), EmitVTableTypeCheckedLoad(), 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 2078 of file CGBuiltin.cpp.
Address clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP | ( | Address | Addr, |
ArrayRef< llvm::Value * > | IdxList, | ||
llvm::Type * | elementType, | ||
bool | SignedIndices, | ||
bool | IsSubtraction, | ||
SourceLocation | Loc, | ||
CharUnits | Align, | ||
const Twine & | Name = "" |
||
) |
llvm::Value* clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP | ( | llvm::Type * | ElemTy, |
llvm::Value * | Ptr, | ||
ArrayRef< llvm::Value * > | IdxList, | ||
bool | SignedIndices, | ||
bool | IsSubtraction, | ||
SourceLocation | Loc, | ||
const Twine & | Name = "" |
||
) |
Same as IRBuilder::CreateInBoundsGEP, but additionally emits a check to detect undefined behavior when the pointer overflow sanitizer is enabled.
SignedIndices
indicates whether any of the GEP indices are signed. IsSubtraction
indicates whether the expression used to form the GEP is a subtraction.
Referenced by emitArraySubscriptGEP(), emitPointerArithmetic(), and clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit().
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 1468 of file CGExpr.cpp.
References EmitArraySubscriptExpr(), EmitLValue(), EmitTypeCheck(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::SanitizerSet::has(), clang::CodeGen::LValue::isBitField(), clang::CodeGen::LValue::isSimple(), IsWrappedCXXThis(), SanOpts, and clang::SanitizerSet::set().
Referenced by EmitBinaryOperatorLValue(), and EmitMemberExpr().
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 3386 of file CGExpr.cpp.
References Builder, CGM, clang::Column, Data, clang::CodeGen::SanitizerMetadata::disableSanitizerForGlobal(), Filename, clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::PresumedLoc::getColumn(), getContext(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::ASTContext::getSourceManager(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, INT_MIN, clang::PresumedLoc::isValid(), and Loc.
Referenced by emitAlignmentAssumptionCheck(), EmitBitfieldConversionCheck(), EmitCall(), EmitNullabilityCheck(), EmitOverflowCheckedAbs(), EmitReturnValueCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitUnreachable(), EmitVariablyModifiedType(), EmitVTablePtrCheck(), 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 3306 of file CGExpr.cpp.
References clang::DiagnosticsEngine::ak_qualtype, CGM, clang::DiagnosticsEngine::ConvertArgToString(), getContext(), clang::CodeGen::CodeGenModule::getDiags(), clang::CodeGen::CodeGenModule::getTypeDescriptorFromMap(), clang::ASTContext::getTypeSize(), getTypeSize(), clang::Type::isFloatingType(), clang::Type::isIntegerType(), clang::Type::isSignedIntegerType(), and clang::T.
Referenced by emitAlignmentAssumptionCheck(), EmitBitfieldConversionCheck(), EmitCall(), EmitNullabilityCheck(), EmitOverflowCheckedAbs(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitVariablyModifiedType(), and EmitVTablePtrCheck().
llvm::Value * CodeGenFunction::EmitCheckValue | ( | llvm::Value * | V | ) |
Convert a value into a format suitable for passing to a runtime sanitizer handler.
Definition at line 3348 of file CGExpr.cpp.
References Builder, CreateDefaultAlignTempAlloca(), clang::CodeGen::CGBuilderTy::CreateStore(), getLLVMContext(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::CodeGenTypeCache::IntPtrTy, and V.
Referenced by emitAlignmentAssumptionCheck(), EmitCheck(), and EmitScalarRangeCheck().
llvm::Value * CodeGenFunction::EmitCMSEClearRecord | ( | llvm::Value * | V, |
llvm::ArrayType * | ATy, | ||
QualType | RTy | ||
) |
Definition at line 3850 of file CGCall.cpp.
References Builder, buildMultiCharMask(), clang::Type::castAs(), CGM, clang::ASTContext::getCharWidth(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), and setUsedBits().
llvm::Value * CodeGenFunction::EmitCMSEClearRecord | ( | llvm::Value * | V, |
llvm::IntegerType * | ITy, | ||
QualType | RTy | ||
) |
Definition at line 3830 of file CGCall.cpp.
References Builder, buildMultiCharMask(), clang::Type::castAs(), CGM, clang::ASTContext::getCharWidth(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), and setUsedBits().
Referenced by EmitCall(), and EmitFunctionEpilog().
RValue CodeGenFunction::EmitCoawaitExpr | ( | const CoawaitExpr & | E, |
AggValueSlot | aggSlot = AggValueSlot::ignored() , |
||
bool | ignoreResult = false |
||
) |
Definition at line 374 of file CGCoroutine.cpp.
References CurCoro, clang::CodeGen::CodeGenFunction::CGCoroInfo::Data, and emitSuspendExpression().
LValue CodeGenFunction::EmitCoawaitLValue | ( | const CoawaitExpr * | E | ) |
Definition at line 475 of file CGCoroutine.cpp.
References CurCoro, clang::CodeGen::CodeGenFunction::CGCoroInfo::Data, emitSuspendExpression(), getContext(), getCoroutineSuspendExprReturnType(), and clang::CodeGen::AggValueSlot::ignored().
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 7623 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), clang::Expr::getIntegerConstantExpr(), GetNeonType(), and clang::CallExpr::getNumArgs().
LValue CodeGenFunction::EmitComplexAssignmentLValue | ( | const BinaryOperator * | E | ) |
Emit an l-value for an assignment (simple or compound) of complex type.
Definition at line 1502 of file CGExprComplex.cpp.
References CGM, clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), getLangOpts(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), and clang::CodeGen::CodeGenModule::getOpenMPRuntime().
Referenced by EmitBinaryOperatorLValue().
LValue CodeGenFunction::EmitComplexCompoundAssignmentLValue | ( | const CompoundAssignOperator * | E | ) |
Definition at line 1526 of file CGExprComplex.cpp.
References getComplexOp(), and clang::BinaryOperator::getOpcode().
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 1472 of file CGExprComplex.cpp.
References getComplexType(), and clang::Expr::getType().
Referenced by EmitAnyExpr(), EmitAtomicInit(), EmitExprAsInit(), and EvaluateExprAsBool().
EmitComplexExprIntoLValue - Emit the given expression of complex type and place its result into the specified l-value.
Definition at line 1481 of file CGExprComplex.cpp.
References getComplexType(), and clang::Expr::getType().
Referenced by EmitAnyExprToMem(), EmitDeclInit(), EmitInitializerForField(), and StoreAnyExprIntoOneUnit().
CodeGenFunction::ComplexPairTy CodeGenFunction::EmitComplexPrePostIncDec | ( | const UnaryOperator * | E, |
LValue | LV, | ||
bool | isInc, | ||
bool | isPre | ||
) |
Definition at line 1206 of file CGExpr.cpp.
References Builder, clang::Type::castAs(), CGM, clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), EmitLoadOfComplex(), EmitStoreOfComplex(), getContext(), clang::UnaryOperator::getExprLoc(), getLangOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::UnaryOperator::getSubExpr(), and clang::Expr::getType().
Referenced by EmitUnaryOpLValue().
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 5525 of file CGExprScalar.cpp.
References hasScalarEvaluationKind(), clang::Type::isAnyComplexType(), and Loc.
Referenced by convertToScalarValue(), and EvaluateExprAsBool().
LValue CodeGenFunction::EmitCompoundAssignmentLValue | ( | const CompoundAssignOperator * | E | ) |
Definition at line 5572 of file CGExprScalar.cpp.
References COMPOUND_OP, clang::interp::Div(), clang::BinaryOperator::getOpcode(), clang::interp::Mul(), clang::Or, clang::interp::Rem(), clang::interp::Shl(), and clang::interp::Shr().
LValue CodeGenFunction::EmitCompoundLiteralLValue | ( | const CompoundLiteralExpr * | E | ) |
Definition at line 5037 of file CGExpr.cpp.
References CGM, clang::CPlusPlus, CreateMemTemp(), clang::CodeGen::Decl, clang::CodeGen::EHCleanup, EmitAnyExprToMem(), EmitVariablyModifiedType(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCompoundLiteral(), getCleanupKind(), getDestroyer(), clang::CompoundLiteralExpr::getInitializer(), getLangOpts(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::QualType::isDestructedType(), clang::CompoundLiteralExpr::isFileScope(), clang::Type::isVariablyModifiedType(), MakeAddrLValue(), and pushLifetimeExtendedDestroy().
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 492 of file CGStmt.cpp.
Address CodeGenFunction::EmitCompoundStmtWithoutScope | ( | const CompoundStmt & | S, |
bool | GetLast = false , |
||
AggValueSlot | AVS = AggValueSlot::ignored() |
||
) |
Definition at line 504 of file CGStmt.cpp.
Referenced by GenerateObjCMethod().
LValue CodeGenFunction::EmitConditionalOperatorLValue | ( | const AbstractConditionalOperator * | E | ) |
Definition at line 5179 of file CGExpr.cpp.
References Builder, CGM, EmitAggExprToLValue(), EmitLValueOrThrowExpression(), EmitUnsupportedLValue(), clang::ast_matchers::expr, hasAggregateEvaluationKind(), MakeAddrLValue(), max(), mergeAddressesInConditionalExpr(), and clang::CodeGen::CodeGenModule::mergeTBAAInfoForConditionalOperator().
void CodeGenFunction::EmitConstructorBody | ( | FunctionArgList & | Args | ) |
EmitConstructorBody - Emits the body of the current constructor.
Definition at line 840 of file CGClass.cpp.
References CGM, clang::Ctor_Base, clang::Ctor_Complete, CurGD, EmitAsanPrologueOrEpilogue(), EmitCtorPrologue(), EmitDelegateCXXConstructorCall(), EmitStmt(), EnterCXXTryStmt(), ExitCXXTryStmt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::FunctionDecl::getBody(), clang::GlobalDecl::getCtorType(), clang::TargetInfo::getCXXABI(), clang::GlobalDecl::getDecl(), clang::Decl::getEndLoc(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetCXXABI::hasConstructorVariants(), incrementProfileCounter(), IsConstructorDelegationValid(), and maybeCreateMCDCCondBitmap().
Referenced by GenerateCode().
void CodeGenFunction::EmitContinueStmt | ( | const ContinueStmt & | S | ) |
Definition at line 1584 of file CGStmt.cpp.
void CodeGenFunction::EmitCoreturnStmt | ( | const CoreturnStmt & | S | ) |
Definition at line 388 of file CGCoroutine.cpp.
void CodeGenFunction::EmitCoroutineBody | ( | const CoroutineBodyStmt & | S | ) |
Definition at line 776 of file CGCoroutine.cpp.
Definition at line 958 of file CGCoroutine.cpp.
References Builder, CGM, CurAwaitSuspendWrapper, CurCoro, clang::CodeGen::CodeGenFunction::CGCoroInfo::Data, clang::CodeGen::CodeGenModule::Error(), clang::CodeGen::CodeGenFunction::AwaitSuspendWrapperInfo::FramePtr, clang::CodeGen::RValue::get(), and clang::CallExpr::getBeginLoc().
llvm::Value * CodeGenFunction::EmitCountedByFieldExpr | ( | const Expr * | Base, |
const FieldDecl * | FAMDecl, | ||
const FieldDecl * | CountDecl | ||
) |
Build an expression accessing the "counted_by" field.
This method is typically called in contexts where we can't generate side-effects, like in __builtin_dynamic_object_size.
When finding expressions, only choose those that have either already been emitted or can be loaded without side-effects.
FAMDecl:
the Decl
for the flexible array member. It may not be within the top-level struct.CountDecl:
must be within the same non-anonymous struct as FAMDecl
. Definition at line 1111 of file CGExpr.cpp.
References Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), EmitDeclRefLValue(), EmitMemberExpr(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::LValue::getAddress(), getContext(), getGEPIndicesToField(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), clang::DeclContext::getOuterLexicalRecordContext(), clang::FieldDecl::getParent(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Expr::HasSideEffects(), and clang::Type::isPointerType().
RValue CodeGenFunction::EmitCoyieldExpr | ( | const CoyieldExpr & | E, |
AggValueSlot | aggSlot = AggValueSlot::ignored() , |
||
bool | ignoreResult = false |
||
) |
Definition at line 381 of file CGCoroutine.cpp.
References CurCoro, clang::CodeGen::CodeGenFunction::CGCoroInfo::Data, and emitSuspendExpression().
LValue CodeGenFunction::EmitCoyieldLValue | ( | const CoyieldExpr * | E | ) |
Definition at line 485 of file CGCoroutine.cpp.
References CurCoro, clang::CodeGen::CodeGenFunction::CGCoroInfo::Data, emitSuspendExpression(), getContext(), getCoroutineSuspendExprReturnType(), and clang::CodeGen::AggValueSlot::ignored().
void CodeGenFunction::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.
Definition at line 1272 of file CGClass.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup(), clang::Ctor_Base, EmitBaseInitializer(), EmitBlock(), clang::CodeGen::CGCXXABI::EmitCtorCompleteObjectHandler(), EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetCXXABI::hasConstructorVariants(), clang::CXXConstructorDecl::init_begin(), clang::CXXConstructorDecl::init_end(), InitializeVTablePointers(), clang::CXXRecordDecl::isAbstract(), clang::CXXConstructorDecl::isDelegatingConstructor(), isInitializerOfDynamicClass(), LoadCXXThis(), LoadCXXThisAddress(), and clang::Member.
Referenced by EmitConstructorBody(), and EmitInlinedInheritingCXXConstructorCall().
RValue CodeGenFunction::EmitCUDAKernelCallExpr | ( | const CUDAKernelCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 502 of file CGExprCXX.cpp.
References CGM, clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), clang::CodeGen::CodeGenModule::getCUDARuntime(), and ReturnValue.
Referenced by EmitCallExpr().
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 1983 of file CGClass.cpp.
References clang::ast_matchers::arrayType, and emitArrayLength().
Referenced by EmitCXXConstructExpr(), and EmitNewArrayInitializer().
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 2004 of file CGClass.cpp.
References clang::CharUnits::alignmentOfArrayElement(), Builder, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateIsNull(), clang::Ctor_Complete, destroyCXXObject, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitBlock(), EmitCXXConstructorCall(), EmitNullInitialization(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::Address::getAlignment(), getContext(), clang::CodeGen::Address::getElementType(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getTypeDeclType(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotSanitizerChecked, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked, pushRegularPartialArrayCleanup(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::ast_matchers::type.
LValue CodeGenFunction::EmitCXXBindTemporaryLValue | ( | const CXXBindTemporaryExpr * | E | ) |
Definition at line 5764 of file CGExpr.cpp.
References CreateAggTemp(), clang::CodeGen::Decl, EmitAggExpr(), EmitCXXTemporary(), clang::CodeGen::AggValueSlot::getAddress(), clang::CXXBindTemporaryExpr::getSubExpr(), clang::CXXBindTemporaryExpr::getTemporary(), clang::Expr::getType(), MakeAddrLValue(), and clang::CodeGen::AggValueSlot::setExternallyDestructed().
void CodeGenFunction::EmitCXXConstructExpr | ( | const CXXConstructExpr * | E, |
AggValueSlot | Dest | ||
) |
Definition at line 595 of file CGExprCXX.cpp.
References clang::ast_matchers::arrayType, clang::Complete, clang::Ctor_Base, clang::Ctor_Complete, CurGD, clang::Delegating, EmitAggExpr(), EmitCXXAggrConstructorCall(), EmitCXXConstructorCall(), EmitNullBaseClassInitialization(), EmitNullInitialization(), clang::CodeGen::AggValueSlot::getAddress(), clang::CXXConstructExpr::getArg(), clang::CXXConstructExpr::getConstructionKind(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::GlobalDecl::getCtorType(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::Expr::getType(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::CXXConstructExpr::isElidable(), clang::CodeGen::AggValueSlot::isIgnored(), clang::CodeGen::AggValueSlot::isSanitizerChecked(), clang::Expr::isTemporaryObject(), clang::FunctionDecl::isTrivial(), clang::CodeGen::AggValueSlot::isZeroed(), clang::NonVirtualBase, clang::CXXConstructExpr::requiresZeroInitialization(), and clang::VirtualBase.
Referenced by EmitCXXConstructLValue().
LValue CodeGenFunction::EmitCXXConstructLValue | ( | const CXXConstructExpr * | E | ) |
Definition at line 5740 of file CGExpr.cpp.
References CreateAggTemp(), clang::CodeGen::Decl, EmitCXXConstructExpr(), clang::CodeGen::AggValueSlot::getAddress(), clang::Type::getAsCXXRecordDecl(), clang::Expr::getType(), clang::CXXRecordDecl::hasTrivialDestructor(), and MakeAddrLValue().
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 2195 of file CGClass.cpp.
References clang::CodeGen::CGCXXABI::addImplicitConstructorArgs(), clang::CodeGen::CodeGenTypes::arrangeCXXConstructorCall(), canEmitDelegateCallArgs(), clang::CodeGen::CGCXXABI::canSpeculativelyEmitVTable(), CGM, clang::Ctor_Base, clang::Delegating, EmitAggregateCopyCtor(), EmitCall(), EmitInlinedInheritingCXXConstructorCall(), EmitTypeCheck(), EmitVTableAssumptionLoads(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::CodeGenModule::getAddrOfCXXStructor(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXConstructorDecl::getInheritedConstructor(), clang::QualType::getNonReferenceType(), clang::FunctionDecl::getParamDecl(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::CodeGen::CodeGenModule::getTypes(), getTypes(), clang::CodeGen::CodeGenTypes::inheritingCtorHasParams(), clang::CXXConstructorDecl::isDefaultConstructor(), clang::CXXRecordDecl::isDynamicClass(), isMemcpyEquivalentSpecialMember(), clang::FunctionDecl::isTrivial(), Loc, MakeAddrLValue(), makeNaturalAddressForPointer(), clang::CodeGen::CGCXXABI::AddedStructorArgCounts::Prefix, clang::CodeGen::CGCXXABI::AddedStructorArgCounts::Suffix, TCK_ConstructorCall, clang::interp::This(), and clang::CharUnits::Zero().
void CodeGenFunction::EmitCXXConstructorCall | ( | const CXXConstructorDecl * | D, |
CXXCtorType | Type, | ||
bool | ForVirtualBase, | ||
bool | Delegating, | ||
AggValueSlot | ThisAVS, | ||
const CXXConstructExpr * | E | ||
) |
Definition at line 2120 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), clang::CXXConstructExpr::arguments(), clang::Type::castAs(), Default, clang::Delegating, EmitAggregateCopyCtor(), EmitCallArgs(), EmitLValue(), ForceLeftToRight, clang::CodeGen::RValue::get(), clang::CodeGen::AggValueSlot::getAddress(), clang::Qualifiers::getAddressSpace(), clang::QualType::getAddressSpace(), clang::CXXConstructExpr::getArg(), getAsNaturalPointerTo(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::Expr::getExprLoc(), clang::CXXMethodDecl::getFunctionObjectParameterType(), getLLVMContext(), clang::CXXConstructExpr::getNumArgs(), clang::CXXMethodDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::AggValueSlot::getQualifiers(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::CXXConstructExpr::isListInitialization(), isMemcpyEquivalentSpecialMember(), clang::CodeGen::AggValueSlot::isSanitizerChecked(), MakeAddrLValue(), clang::CodeGen::AggValueSlot::mayOverlap(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), and clang::interp::This().
Referenced by EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitDelegateCXXConstructorCall(), EmitInheritedCXXConstructorCall(), and EmitSynthesizedCXXCopyCtorCall().
void CodeGenFunction::EmitCXXDeleteExpr | ( | const CXXDeleteExpr * | E | ) |
Definition at line 2082 of file CGExprCXX.cpp.
References Builder, ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateIsNull(), EmitArrayDelete(), EmitBlock(), EmitDestroyingObjectDelete(), EmitObjectDelete(), EmitPointerWithAlignment(), clang::CodeGen::Address::getAlignment(), clang::CXXDeleteExpr::getArgument(), getContext(), clang::CXXDeleteExpr::getDestroyedType(), clang::CodeGen::Address::getElementType(), clang::CXXDeleteExpr::getOperatorDelete(), clang::CXXDeleteExpr::isArrayForm(), clang::Type::isConstantArrayType(), clang::FunctionDecl::isDestroyingOperatorDelete(), IsNull, and clang::CodeGen::Address::setKnownNonNull().
void CodeGenFunction::EmitCXXDestructorCall | ( | const CXXDestructorDecl * | D, |
CXXDtorType | Type, | ||
bool | ForVirtualBase, | ||
bool | Delegating, | ||
Address | This, | ||
QualType | ThisTy | ||
) |
Definition at line 2511 of file CGClass.cpp.
References CGM, clang::Delegating, clang::CodeGen::CGCXXABI::EmitDestructorCall(), clang::CodeGen::CodeGenModule::getCXXABI(), and clang::interp::This().
Referenced by EmitDestructorBody(), and EmitObjectDelete().
RValue CodeGenFunction::EmitCXXDestructorCall | ( | GlobalDecl | Dtor, |
const CGCallee & | Callee, | ||
llvm::Value * | This, | ||
QualType | ThisTy, | ||
llvm::Value * | ImplicitParam, | ||
QualType | ImplicitParamTy, | ||
const CallExpr * | E | ||
) |
Definition at line 101 of file CGExprCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), CGM, commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenTypes::ConvertType(), EmitCall(), clang::Qualifiers::getAddressSpace(), clang::QualType::getAddressSpace(), clang::Type::getAsCXXRecordDecl(), clang::GlobalDecl::getDecl(), clang::Expr::getExprLoc(), clang::CXXMethodDecl::getMethodQualifiers(), clang::CXXMethodDecl::getParent(), getTargetHooks(), clang::CXXMethodDecl::getThisType(), clang::CodeGen::CodeGenModule::getTypes(), clang::QualType::isNull(), MustTailCall, clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), and clang::interp::This().
void CodeGenFunction::EmitCXXForRangeStmt | ( | const CXXForRangeStmt & | S, |
ArrayRef< const Attr * > | Attrs = std::nullopt |
||
) |
Definition at line 1307 of file CGStmt.cpp.
void CodeGenFunction::EmitCXXGlobalVarDeclInit | ( | const VarDecl & | D, |
llvm::GlobalVariable * | GV, | ||
bool | PerformInit | ||
) |
EmitCXXGlobalVarDeclInit - Create the initializer for a C++ variable with global storage.
Definition at line 178 of file CGDeclCXX.cpp.
References CGM, clang::QualType::DK_cxx_destructor, EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitReferenceBindingToExpr(), EmitStoreOfScalar(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarDefinition(), clang::Decl::getAttr(), getContext(), clang::VarDecl::getInit(), getLangOpts(), getLLVMContext(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenTypes::getTargetAddressSpace(), clang::ValueDecl::getType(), getTypes(), clang::Decl::hasAttr(), clang::QualType::isConstantStorage(), clang::Type::isReferenceType(), clang::VarDecl::needsDestruction(), and clang::T.
Referenced by AddInitializerToStaticVarDecl(), and 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 389 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 403 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 188 of file CGExprCXX.cpp.
References CGM, EmitCall(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitCXXMemberPointerCallExpr(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::MemberExpr::getBase(), clang::CallExpr::getCallee(), getContext(), clang::MemberExpr::getMemberDecl(), clang::MemberExpr::getQualifier(), clang::ValueDecl::getType(), clang::MemberExpr::hasQualifier(), clang::Expr::IgnoreParens(), clang::MemberExpr::isArrow(), clang::CXXMethodDecl::isStatic(), and ReturnValue.
Referenced by EmitCallExpr().
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 151 of file CGClass.cpp.
References CGM, ConvertTypeForMem(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), clang::CodeGen::Address::getAlignment(), clang::Type::getAsCXXRecordDecl(), clang::MemberPointerType::getClass(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getDynamicOffsetAlignment(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), and clang::MemberPointerType::getPointeeType().
Referenced by EmitMaterializeTemporaryExpr(), and EmitPointerToDataMemberBinaryExpr().
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 85 of file CGExprCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), clang::Type::castAs(), CGM, commonEmitCXXMemberOrOperatorCall(), EmitCall(), clang::Expr::getExprLoc(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), MustTailCall, ReturnValue, and clang::interp::This().
RValue CodeGenFunction::EmitCXXMemberOrOperatorMemberCallExpr | ( | const CallExpr * | CE, |
const CXXMethodDecl * | MD, | ||
ReturnValueSlot | ReturnValue, | ||
bool | HasQualifier, | ||
NestedNameSpecifier * | Qualifier, | ||
bool | IsArrow, | ||
const Expr * | Base | ||
) |
Definition at line 215 of file CGExprCXX.cpp.
References clang::CXXMethodDecl::getCorrespondingMethodInClass(), clang::CXXMethodDecl::getDevirtualizedMethod(), getLangOpts(), clang::CXXMethodDecl::getParent(), and clang::CXXMethodDecl::isVirtual().
Referenced by EmitCXXMemberCallExpr(), and EmitCXXOperatorMemberCallExpr().
RValue CodeGenFunction::EmitCXXMemberPointerCallExpr | ( | const CXXMemberCallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 442 of file CGExprCXX.cpp.
References clang::CodeGen::CallArgList::add(), clang::CallExpr::arguments(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodCall(), clang::Type::castAs(), CGM, EmitCall(), EmitCallArgs(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), EmitLValue(), EmitPointerWithAlignment(), EmitScalarExpr(), EmitTypeCheck(), clang::CodeGen::RequiredArgs::forPrototypePlus(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CallExpr::getCallee(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::RecordType::getDecl(), clang::CXXMemberCallExpr::getExprLoc(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::MemberPointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Expr::IgnoreParens(), clang::CodeGen::Address::invalid(), clang::CodeGen::KnownNonNull, MustTailCall, ReturnValue, TCK_MemberCall, and clang::interp::This().
Referenced by EmitCXXMemberCallExpr().
llvm::Value * CodeGenFunction::EmitCXXNewExpr | ( | const CXXNewExpr * | E | ) |
Definition at line 1574 of file CGExprCXX.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CGDebugInfo::addHeapAllocSiteMetadata(), std::arg(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::begin(), Builder, CalculateCookiePadding(), clang::Type::castAs(), CGM, ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateIsNull(), clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup(), DeactivateCleanupBlock(), clang::CodeGen::Decl, EHStack, EmitBlock(), EmitCallArgs(), EmitCXXNewAllocSize(), EmitNewDeleteCall(), EmitNewInitializer(), EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), EmitTypeCheck(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::end(), EnterNewDeleteCleanup(), clang::CodeGen::RValue::get(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::LValueBaseInfo::getAlignmentSource(), clang::CXXNewExpr::getAllocatedType(), clang::CXXNewExpr::getAllocatedTypeSourceInfo(), clang::ASTContext::getBaseElementType(), clang::TypeLoc::getBeginLoc(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getDebugInfo(), clang::EnumType::getDecl(), clang::Expr::getExprLoc(), clang::CXXParenListInitExpr::getInitExprs(), clang::CXXNewExpr::getInitializer(), clang::EnumDecl::getIntegerType(), clang::InitListExpr::getNumInits(), clang::FunctionProtoType::getNumParams(), clang::CXXNewExpr::getNumPlacementArgs(), clang::CXXNewExpr::getOperatorDelete(), clang::CXXNewExpr::getOperatorNew(), clang::FunctionProtoType::getParamType(), clang::CharUnits::getQuantity(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenTypeCache::getSizeAlign(), clang::ASTContext::getSizeType(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::TypeSourceInfo::getTypeLoc(), getTypeSize(), clang::CXXNewExpr::hasInitializer(), clang::CodeGen::CGCXXABI::InitializeArrayCookie(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::Address::invalid(), clang::CXXNewExpr::isArray(), clang::QualType::isPODType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::InitListExpr::isStringLiteralInit(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), clang::FunctionDecl::isVariadic(), max(), clang::CXXNewExpr::passAlignment(), clang::CXXNewExpr::placement_arguments(), sanitizePerformTypeCheck(), clang::SanitizerSet::set(), clang::CodeGen::Address::setAlignment(), clang::CXXNewExpr::shouldNullCheckAllocation(), clang::CodeGen::CodeGenTypeCache::SizeTy, clang::CodeGen::EHScopeStack::stable_begin(), TCK_ConstructorCall, and clang::CodeGen::Address::withElementType().
RValue CodeGenFunction::EmitCXXOperatorMemberCallExpr | ( | const CXXOperatorCallExpr * | E, |
const CXXMethodDecl * | MD, | ||
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 492 of file CGExprCXX.cpp.
References EmitCXXMemberOrOperatorMemberCallExpr(), clang::CallExpr::getArg(), clang::CXXMethodDecl::isImplicitObjectMemberFunction(), and ReturnValue.
Referenced by EmitCallExpr().
RValue CodeGenFunction::EmitCXXPseudoDestructorExpr | ( | const CXXPseudoDestructorExpr * | E | ) |
Definition at line 127 of file CGExprCXX.cpp.
References clang::CodeGen::ARCPreciseLifetime, Builder, clang::Type::castAs(), clang::CodeGen::CGBuilderTy::CreateLoad(), EmitARCDestroyWeak(), EmitARCRelease(), EmitIgnoredExpr(), EmitLValue(), EmitPointerWithAlignment(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CXXPseudoDestructorExpr::getBase(), clang::CXXPseudoDestructorExpr::getDestroyedType(), clang::QualType::getObjCLifetime(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::QualType::hasStrongOrWeakObjCLifetime(), clang::CodeGen::Address::invalid(), clang::CXXPseudoDestructorExpr::isArrow(), clang::QualType::isVolatileQualified(), clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, and clang::Qualifiers::OCL_Weak.
Referenced by EmitCallExpr().
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 1304 of file CGCleanup.cpp.
References clang::CodeGen::NormalAndEHCleanup.
Referenced by EmitCXXBindTemporaryLValue().
void CodeGenFunction::EmitCXXThrowExpr | ( | const CXXThrowExpr * | E, |
bool | KeepInsertionPoint = true |
||
) |
Definition at line 443 of file CGException.cpp.
References CGM, EmitTrapCall(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CXXThrowExpr::getSubExpr(), clang::Type::isObjCObjectPointerType(), and clang::T.
Referenced by EmitBranchOnBoolExpr(), and EmitLValueOrThrowExpression().
void CodeGenFunction::EmitCXXTryStmt | ( | const CXXTryStmt & | S | ) |
Definition at line 622 of file CGException.cpp.
llvm::Value * CodeGenFunction::EmitCXXTypeidExpr | ( | const CXXTypeidExpr * | E | ) |
Definition at line 2218 of file CGExprCXX.cpp.
References CGM, clang::Default, EmitTypeidFromVTable(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), getContext(), clang::CXXTypeidExpr::getExprOperand(), clang::CodeGen::CodeGenModule::GetGlobalVarAddressSpace(), getTargetHooks(), clang::Expr::getType(), clang::CXXTypeidExpr::getTypeOperand(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CXXTypeidExpr::isMostDerived(), clang::CXXTypeidExpr::isPotentiallyEvaluated(), clang::CXXTypeidExpr::isTypeOperand(), and clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast().
Referenced by EmitCXXTypeidLValue().
LValue CodeGenFunction::EmitCXXTypeidLValue | ( | const CXXTypeidExpr * | E | ) |
Definition at line 5749 of file CGExpr.cpp.
References EmitCXXTypeidExpr(), clang::Expr::getType(), and MakeNaturalAlignRawAddrLValue().
Address CodeGenFunction::EmitCXXUuidofExpr | ( | const CXXUuidofExpr * | E | ) |
Definition at line 5753 of file CGExpr.cpp.
References CGM, ConvertType(), clang::CodeGen::CodeGenModule::GetAddrOfMSGuidDecl(), clang::CXXUuidofExpr::getGuidDecl(), clang::Expr::getType(), and clang::CodeGen::ConstantAddress::withElementType().
Referenced by EmitCXXUuidofLValue().
LValue CodeGenFunction::EmitCXXUuidofLValue | ( | const CXXUuidofExpr * | E | ) |
Definition at line 5758 of file CGExpr.cpp.
References clang::CodeGen::Decl, EmitCXXUuidofExpr(), clang::Expr::getType(), and MakeAddrLValue().
void CodeGenFunction::EmitDecl | ( | const Decl & | D | ) |
EmitDecl - Emit a declaration.
This function can be called with a null (unreachable) insert point.
Definition at line 51 of file CGDecl.cpp.
References Block, CGM, clang::CodeGen::CodeGenModule::EmitOMPDeclareMapper(), clang::CodeGen::CodeGenModule::EmitOMPDeclareReduction(), EmitVarDecl(), EmitVariablyModifiedType(), getContext(), getDebugInfo(), getDefinition(), clang::Decl::getKind(), clang::VarDecl::isLocalVarDecl(), clang::Type::isVariablyModifiedType(), and Label.
void CodeGenFunction::EmitDeclRefExprDbgValue | ( | const DeclRefExpr * | E, |
const APValue & | Init | ||
) |
Definition at line 2783 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), clang::DeclRefExpr::getDecl(), and clang::CodeGenOptions::hasReducedDebugInfo().
Referenced by tryEmitAsConstant().
LValue CodeGenFunction::EmitDeclRefLValue | ( | const DeclRefExpr * | E | ) |
Definition at line 2959 of file CGExpr.cpp.
References clang::CodeGen::ARCImpreciseLifetime, Builder, canEmitSpuriousReferenceToVariable(), CapturedStmtInfo, CGM, ConvertTypeForMem(), clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreatePointerBitCastOrAddrSpaceCast(), clang::CodeGen::CodeGenModule::createUnnamedGlobalFrom(), CurCodeDecl, clang::CodeGen::Decl, clang::CodeGen::ConstantEmitter::emitAbstract(), emitBlockByrefAddress(), EmitCapturedFieldLValue(), EmitFunctionDeclLValue(), EmitGlobalNamedRegister(), EmitGlobalVarDeclLValue(), EmitLoadOfReferenceLValue(), EmitLValue(), clang::CodeGen::Address::emitRawPointer(), EmitStaticVarDecl(), EmitThreadPrivateVarDeclLValue(), clang::CodeGen::LValue::getAddress(), GetAddrOfBlockDecl(), clang::CodeGen::CodeGenModule::GetAddrOfMSGuidDecl(), clang::CodeGen::CodeGenModule::GetAddrOfTemplateParamObject(), clang::CodeGen::Address::getBasePointer(), getContext(), clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::getContextValue(), clang::DeclRefExpr::getDecl(), clang::CodeGen::Address::getElementType(), clang::Expr::getExprLoc(), clang::getLangASFromTargetAS(), getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::DeclRefExpr::getLocation(), clang::CodeGen::CodeGenModule::getModuleDebugInfo(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::LValue::getQuals(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::CodeGen::LValue::getTBAAInfo(), clang::Expr::getType(), clang::CodeGen::Address::getType(), clang::CodeGen::LValue::getType(), getTypes(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::Decl::hasAttr(), clang::CodeGen::Address::invalid(), clang::DeclRefExpr::isNonOdrUse(), clang::CodeGen::CGOpenMPRuntime::isNontemporalDecl(), clang::Type::isReferenceType(), clang::Decl::isUsed(), clang::SourceLocation::isValid(), LambdaCaptureFields, clang::CodeGen::CodeGenFunction::CGCapturedStmtInfo::lookup(), MakeAddrLValue(), makeNaturalAddressForPointer(), clang::CodeGen::NotKnownNonNull, clang::NOUR_Constant, clang::NOUR_Unevaluated, clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), clang::DeclRefExpr::refersToEnclosingVariableOrCapture(), clang::Qualifiers::removeObjCGCAttr(), clang::SC_Register, clang::CodeGen::LValue::setARCPreciseLifetime(), clang::CodeGen::LValue::setNonGC(), clang::CodeGen::LValue::setNontemporal(), setObjCGCLValueClass(), clang::T, clang::VarDecl::TLS_None, clang::dataflow::var(), and clang::CodeGen::Address::withPointer().
Referenced by EmitCountedByFieldExpr(), EmitMemberExpr(), and LoadObjCSelf().
void CodeGenFunction::EmitDeclStmt | ( | const DeclStmt & | S | ) |
Definition at line 1562 of file CGStmt.cpp.
void CodeGenFunction::EmitDefaultStmt | ( | const DefaultStmt & | S, |
ArrayRef< const Attr * > | Attrs | ||
) |
Definition at line 1799 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 4159 of file CGCall.cpp.
References clang::CodeGen::CallArgList::add(), clang::CodeGen::CallArgList::addArgCleanupDeactivation(), Builder, clang::format::cleanup(), convertTempToRValue(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), CurFuncIsThunk, clang::CodeGen::RValue::get(), GetAddrOfLocalVar(), getContext(), clang::RecordType::getDecl(), getLangOpts(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::RecordDecl::isParamDestroyedInCallee(), local, clang::VarDecl::needsDestruction(), and clang::ast_matchers::type.
Referenced by EmitCallAndReturnForThunk(), EmitDelegateCXXConstructorCall(), EmitInheritedCXXConstructorCall(), EmitLambdaBlockInvokeBody(), and EmitLambdaDelegatingInvokeBody().
void CodeGenFunction::EmitDelegateCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
CXXCtorType | CtorType, | ||
const FunctionArgList & | Args, | ||
SourceLocation | Loc | ||
) |
Definition at line 2423 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), CGM, CurGD, EmitCXXConstructorCall(), EmitDelegateCallArg(), clang::CodeGen::RValue::get(), getAsNaturalPointerTo(), clang::CodeGen::CodeGenModule::getCXXABI(), LoadCXXThisAddress(), Loc, clang::CodeGen::AggValueSlot::MayOverlap, clang::CodeGen::CGCXXABI::NeedsVTTParameter(), and clang::interp::This().
Referenced by EmitConstructorBody().
void CodeGenFunction::EmitDelegatingCXXConstructorCall | ( | const CXXConstructorDecl * | Ctor, |
const FunctionArgList & | Args | ||
) |
Definition at line 2482 of file CGClass.cpp.
References CGM, clang::Ctor_Complete, CurGD, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::Dtor_Base, clang::Dtor_Complete, clang::CodeGen::EHCleanup, EHStack, EmitAggExpr(), clang::CodeGen::AggValueSlot::forAddr(), clang::GlobalDecl::getCtorType(), clang::CXXRecordDecl::getDestructor(), clang::CXXCtorInitializer::getInit(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CXXMethodDecl::getParent(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXConstructorDecl::init_begin(), clang::CXXConstructorDecl::isDelegatingConstructor(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked, LoadCXXThisAddress(), and clang::CodeGen::AggValueSlot::MayOverlap.
Referenced by EmitCtorPrologue().
void CodeGenFunction::EmitDeleteCall | ( | const FunctionDecl * | DeleteFD, |
llvm::Value * | Ptr, | ||
QualType | DeleteTy, | ||
llvm::Value * | NumElements = nullptr , |
||
CharUnits | CookieSize = CharUnits() |
||
) |
Definition at line 1801 of file CGExprCXX.cpp.
References Builder, clang::Type::castAs(), CGM, ConvertType(), clang::CodeGen::CodeGenTypes::ConvertType(), CreateTempAlloca(), EmitNewDeleteCall(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getAggregate(), clang::CharUnits::getAsAlign(), getContext(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::FunctionDecl::getOverloadedOperator(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), getTypes(), clang::ASTContext::getTypeSizeInChars(), getUsualDeleteParams(), clang::CharUnits::isZero(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::ASTContext::toCharUnitsFromBits().
Referenced by EmitDestroyingObjectDelete(), and EnterDtorCleanups().
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 2351 of file CGDecl.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::ast_matchers::arrayType, Builder, clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), emitArrayDestroy(), emitArrayLength(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CodeGen::Address::getElementType(), length(), and clang::ast_matchers::type.
Referenced by generateDestroyHelper().
void CodeGenFunction::EmitDestructorBody | ( | FunctionArgList & | Args | ) |
EmitDestructorBody - Emits the body of the current destructor.
Definition at line 1438 of file CGClass.cpp.
References Builder, CanSkipVTablePointerInitialization(), CGM, clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup(), CurFn, CurGD, clang::Dtor_Base, clang::Dtor_Comdat, clang::Dtor_Complete, clang::Dtor_Deleting, EmitAsanPrologueOrEpilogue(), EmitCXXDestructorCall(), EmitStmt(), EmitTrapCall(), EnterCXXTryStmt(), EnterDtorCleanups(), ExitCXXTryStmt(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CXXMethodDecl::getFunctionObjectParameterType(), getLangOpts(), clang::CXXMethodDecl::getParent(), getTarget(), HaveInsertPoint(), incrementProfileCounter(), InitializeVTablePointers(), clang::CXXRecordDecl::isAbstract(), clang::Decl::isImplicit(), LoadCXXThis(), LoadCXXThisAddress(), and maybeCreateMCDCCondBitmap().
Referenced by GenerateCode().
void CodeGenFunction::EmitDoStmt | ( | const DoStmt & | S, |
ArrayRef< const Attr * > | Attrs = std::nullopt |
||
) |
Definition at line 1091 of file CGStmt.cpp.
llvm::Value * CodeGenFunction::EmitDynamicCast | ( | Address | V, |
const CXXDynamicCastExpr * | DCE | ||
) |
Definition at line 2268 of file CGExprCXX.cpp.
References Builder, clang::Type::castAs(), CGM, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateIsNull(), EmitBlock(), EmitBranch(), clang::CodeGen::CGCXXABI::emitDynamicCastCall(), EmitDynamicCastToNull(), clang::CodeGen::CGCXXABI::emitDynamicCastToVoid(), clang::CodeGen::CGCXXABI::emitExactDynamicCast(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), EmitTypeCheck(), clang::Type::getAs(), clang::Type::getAsCXXRecordDecl(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Expr::getExprLoc(), clang::Type::getPointeeType(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::Value::getType(), clang::ExplicitCastExpr::getTypeAsWritten(), clang::CXXDynamicCastExpr::isAlwaysNull(), clang::CXXRecordDecl::isEffectivelyFinal(), IsNull, clang::Type::isPointerType(), clang::Type::isRecordType(), clang::Type::isVoidPointerType(), clang::CodeGen::CGCXXABI::shouldDynamicCastCallBeNullChecked(), clang::CodeGen::CGCXXABI::shouldEmitExactDynamicCast(), clang::T, and TCK_DynamicOperation.
Referenced by EmitCastLValue().
void CodeGenFunction::EmitEndEHSpec | ( | const Decl * | D | ) |
EmitEndEHSpec - Emit the end of the exception spec.
Definition at line 580 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), clang::FunctionProtoType::canThrow(), CGM, clang::CPlusPlus17, clang::CT_Cannot, EHStack, emitFilterDispatchBlock(), clang::CodeGen::EHScopeStack::empty(), clang::EST_Dynamic, clang::EST_DynamicNone, clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::FunctionProtoType::getExceptionSpecType(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), getTarget(), clang::ValueDecl::getType(), clang::LangOptions::hasWasmExceptions(), clang::TargetCXXABI::isMicrosoft(), clang::CodeGen::EHScopeStack::popFilter(), and clang::CodeGen::EHScopeStack::popTerminate().
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 |
lvalue | the lvalue to initialize |
capturedByInit | true if D is a __block variable whose address is potentially changed by the initializer |
Definition at line 2057 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(), getOverlapForFieldInit(), clang::ValueDecl::getType(), clang::CodeGen::AggValueSlot::IsDestructed, clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::MayOverlap, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::ast_matchers::type.
Referenced by EmitAutoVarInit(), EmitInitializerForField(), 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 3671 of file CGObjC.cpp.
References clang::CodeGen::RequiredArgs::All, EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
LValue CodeGenFunction::EmitExtVectorElementExpr | ( | const ExtVectorElementExpr * | E | ) |
Definition at line 4603 of file CGExpr.cpp.
References Builder, clang::Type::castAs(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::Decl, EmitLValue(), EmitPointerWithAlignment(), EmitScalarExpr(), clang::ExtVectorElementExpr::getBase(), clang::ExtVectorElementExpr::getEncodedElementAccess(), getLLVMContext(), clang::Expr::getType(), clang::ExtVectorElementExpr::isArrow(), clang::Expr::isGLValue(), clang::Type::isVectorType(), MakeAddrLValue(), clang::CodeGen::LValue::MakeExtVectorElt(), clang::ast_matchers::type, and clang::QualType::withCVRQualifiers().
Generates lvalue for partial ext_vector access.
Definition at line 2302 of file CGExpr.cpp.
References Builder, clang::Type::castAs(), CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), getAccessedFieldNo(), clang::CodeGen::LValue::getExtVectorAddress(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::CodeGen::Address::withElementType().
Referenced by EmitArraySubscriptExpr().
Emit field annotations for the given field & value.
Returns the annotation result.
Definition at line 2901 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypeCache::ConstGlobalsPtrTy, EmitAnnotationCall(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::Decl::specific_attrs(), and V.
Referenced by EmitLValueForField().
Emit sycl field annotations for given field & value.
Returns the annotation result.
Definition at line 2959 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypeCache::ConstGlobalsPtrTy, clang::CodeGen::Address::emitRawPointer(), EmitSYCLAnnotationCall(), clang::CodeGen::Address::getAlignment(), clang::Decl::getAttr(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Decl::getLocation(), and V.
Referenced by EmitLValueForField().
void CodeGenFunction::EmitForStmt | ( | const ForStmt & | S, |
ArrayRef< const Attr * > | Attrs = std::nullopt |
||
) |
Definition at line 1171 of file CGStmt.cpp.
void CodeGenFunction::EmitForwardingCallToLambda | ( | const CXXMethodDecl * | LambdaCallOperator, |
CallArgList & | CallArgs, | ||
const CGFunctionInfo * | CallOpFnInfo = nullptr , |
||
llvm::Constant * | CallOpFn = nullptr |
||
) |
Definition at line 2937 of file CGClass.cpp.
References clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::transformer::callArgs(), clang::Type::castAs(), CGM, EmitARCRetainAutoreleasedReturnValue(), EmitBranchThroughCleanup(), EmitCall(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::ABIArgInfo::getKind(), getLangOpts(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::FunctionType::getReturnType(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), hasScalarEvaluationKind(), clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ReturnValueSlot::isNull(), ReturnBlock, and ReturnValue.
Referenced by EmitLambdaBlockInvokeBody(), and EmitLambdaDelegatingInvokeBody().
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 2029 of file CGExpr.cpp.
References Builder, ConvertType(), emitBoolVecConversion(), getContext(), clang::Value::getType(), getTypeSize(), hasBooleanRepresentation(), clang::Type::isExtVectorBoolType(), and V.
Referenced by EmitFromInt(), EmitLoadOfScalar(), and EmitStoreThroughBitfieldLValue().
void CodeGenFunction::EmitFunctionBody | ( | const Stmt * | Body | ) |
Definition at line 1551 of file CodeGenFunction.cpp.
References incrementProfileCounter(), and maybeCreateMCDCCondBitmap().
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 3876 of file CGCall.cpp.
References AutoreleaseResult, clang::CodeGen::CGBlockInfo::BlockExpression, BlockInfo, Builder, CGM, clang::CodeGen::ABIArgInfo::CoerceAndExpand, ConvertType(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), CreateCoercedLoad(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CurCodeDecl, CurFn, CurFuncDecl, clang::CodeGen::ABIArgInfo::Direct, emitAddressAtOffset(), emitAutoreleaseOfResult(), EmitCMSEClearRecord(), EmitLoadOfComplex(), EmitReturnValueCheck(), EmitStoreOfComplex(), EmitStoreOfScalar(), EmitUnreachable(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, findDominatingStoreToReturnValue(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::QualType::getCanonicalType(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), getContext(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::Address::getElementType(), getEvaluationKind(), clang::BlockExpr::getFunctionType(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaSRet(), clang::CodeGen::ABIArgInfo::getKind(), getLangOpts(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::FunctionType::getReturnType(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::ABIArgInfo::getUnpaddedCoerceAndExpandType(), hasAggregateEvaluationKind(), clang::Decl::hasAttr(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ABIArgInfo::IndirectAliased, clang::CodeGen::CGFunctionInfo::isNoReturn(), clang::Type::isObjCRetainableType(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::CodeGen::Address::isValid(), clang::CodeGen::LValue::MakeAddr(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), clang::interp::Ret(), ReturnValue, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, V, and clang::CodeGen::Address::withElementType().
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 3004 of file CGCall.cpp.
References std::arg(), clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_size(), Builder, CGM, clang::CodeGen::ABIArgInfo::CoerceAndExpand, ConvertType(), clang::CodeGen::CodeGenTypes::ConvertType(), ConvertTypeForMem(), CreateCoercedStore(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateMemCpy(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CreateTempAlloca(), CurCodeDecl, clang::CodeGen::ABIArgInfo::Direct, EHStack, emitAddressAtOffset(), emitArgumentDemotion(), EmitLoadOfScalar(), EmitParmDecl(), clang::CodeGen::Address::emitRawPointer(), EmitScalarExpr(), clang::CodeGen::ABIArgInfo::Expand, clang::CodeGen::ABIArgInfo::Extend, clang::CodeGen::CodeGenFunction::ParamValue::forDirect(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::FunctionType::ExtParameterInfo::getABI(), clang::QualType::getAddressSpace(), clang::CodeGen::RawAddress::getAlignment(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::CodeGen::CGFunctionInfo::getArgStructAlignment(), clang::Type::getAs(), clang::CharUnits::getAsAlign(), clang::Decl::getAttr(), clang::DeclaratorDecl::getBeginLoc(), clang::CodeGen::ABIArgInfo::getCanBeFlattened(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::ABIArgInfo::getCoerceAndExpandType(), clang::CodeGen::ABIArgInfo::getCoerceToType(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::ABIArgInfo::getDirectOffset(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CGFunctionInfo::getExtParameterInfo(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getInAllocaIndirect(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectRealign(), clang::CodeGen::ABIArgInfo::getKind(), getLLVMContext(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), getNonNullAttr(), clang::Type::getPointeeType(), clang::CodeGen::RawAddress::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), getTarget(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), hasScalarEvaluationKind(), clang::CodeGen::ABIArgInfo::Ignore, clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::ABIArgInfo::IndirectAliased, clang::CodeGen::CGFunctionInfoArgInfo::info, clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::CodeGen::Address::invalid(), clang::Type::isConstantSizeType(), clang::CodeGen::ABIArgInfo::isDirect(), clang::Type::isIncompleteType(), clang::CodeGen::ABIArgInfo::isIndirectAliased(), clang::CodeGen::ABIArgInfo::isPaddingForCoerceAndExpand(), clang::Type::isPointerType(), clang::QualType::isRestrictQualified(), clang::CodeGen::KnownNonNull, MakeAddrLValue(), makeNaturalAddressForPointer(), clang::CodeGen::NormalCleanup, ReturnValue, SanOpts, clang::Static, clang::SwiftErrorResult, clang::CodeGen::CGFunctionInfoArgInfo::type, V, and clang::CodeGen::Address::withElementType().
Referenced by StartFunction().
void CodeGenFunction::EmitGotoStmt | ( | const GotoStmt & | S | ) |
Definition at line 753 of file CGStmt.cpp.
Definition at line 23516 of file CGBuiltin.cpp.
References EmitPointerWithAlignment(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::CallExpr::getArg(), getIntrinsicForHexagonNonClangBuiltin(), and ID.
Referenced by EmitTargetArchBuiltinExpr().
Definition at line 18269 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), and clang::HLSL.
void CodeGenFunction::EmitIfStmt | ( | const IfStmt & | S | ) |
Definition at line 785 of file CGStmt.cpp.
void CodeGenFunction::EmitIgnoredConditionalOperator | ( | const AbstractConditionalOperator * | E | ) |
Definition at line 5161 of file CGExpr.cpp.
References EmitAggExprToLValue(), EmitIgnoredExpr(), clang::Expr::getType(), hasAggregateEvaluationKind(), and clang::Expr::isGLValue().
Referenced by EmitIgnoredExpr().
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 203 of file CGExpr.cpp.
References EmitAnyExpr(), EmitIgnoredConditionalOperator(), EmitLValue(), getContext(), clang::CodeGen::AggValueSlot::ignored(), clang::Expr::IgnoreParenNoopCasts(), clang::Expr::isPRValue(), and clang::OK_BitField.
Referenced by EmitBinaryOperatorLValue(), EmitCall(), EmitCallee(), EmitCXXPseudoDestructorExpr(), EmitIgnoredConditionalOperator(), emitInitWithReductionInitializer(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), emitPostUpdateForReductionClause(), emitPseudoObjectExpr(), emitReductionCombiner(), and EmitVariablyModifiedType().
void CodeGenFunction::emitImplicitAssignmentOperatorBody | ( | FunctionArgList & | Args | ) |
Definition at line 1553 of file CGClass.cpp.
References clang::CompoundStmt::body(), CurGD, clang::FunctionDecl::getBody(), clang::GlobalDecl::getDecl(), clang::Stmt::getSourceRange(), incrementProfileCounter(), and maybeCreateMCDCCondBitmap().
Referenced by GenerateCode().
void CodeGenFunction::EmitIndirectGotoStmt | ( | const IndirectGotoStmt & | S | ) |
Definition at line 764 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 2271 of file CGClass.cpp.
References CGM, clang::Ctor_Base, CurCodeDecl, EmitCXXConstructorCall(), EmitDelegateCallArg(), clang::CodeGen::RValue::get(), getAsNaturalPointerTo(), getContext(), clang::TargetInfo::getCXXABI(), clang::CXXInheritedCtorInitExpr::getLocation(), clang::FunctionDecl::getNumParams(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenModule::getTarget(), clang::CXXMethodDecl::getThisType(), clang::TargetCXXABI::hasConstructorVariants(), clang::CodeGen::AggValueSlot::MayOverlap, and clang::interp::This().
Definition at line 692 of file CGClass.cpp.
References clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, EmitAggExpr(), EmitComplexExprIntoLValue(), EmitExprAsInit(), EmitScalarExpr(), EmitStoreThroughLValue(), clang::CodeGen::AggValueSlot::forLValue(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), getEvaluationKind(), getOverlapForFieldInit(), clang::CodeGen::AggValueSlot::IsDestructed, clang::QualType::isDestructedType(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked, clang::CodeGen::LValue::isSimple(), needsEHCleanup(), pushEHDestroy(), 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 5064 of file CGExpr.cpp.
References EmitAggExprToLValue(), EmitLValue(), clang::InitListExpr::getInit(), clang::Expr::isGLValue(), and clang::InitListExpr::isTransparent().
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 2320 of file CGClass.cpp.
References clang::CodeGen::CGCXXABI::addImplicitConstructorArgs(), BuildFunctionArgList(), CGM, CreateIRTemp(), CurGD, clang::Delegating, EmitCtorPrologue(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), EmitParmDecl(), FnRetTy, clang::CodeGen::CodeGenFunction::ParamValue::forDirect(), clang::CodeGen::CodeGenFunction::ParamValue::forIndirect(), clang::CodeGen::RValue::getAggregateAddress(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::RValue::isComplex(), clang::CodeGen::RValue::isScalar(), clang::Type::isVoidType(), and ReturnValue.
Referenced by EmitCXXConstructorCall().
Address CodeGenFunction::EmitIntelFPGAFieldAnnotations | ( | const FieldDecl * | D, |
Address | V, | ||
StringRef | AnnotStr | ||
) |
Emit Intel FPGA field annotations for the given field and value.
Returns the annotation result.
Definition at line 2981 of file CodeGenFunction.cpp.
References clang::Decl::getLocation().
Referenced by EmitLValueForField().
Address CodeGenFunction::EmitIntelFPGAFieldAnnotations | ( | SourceLocation | Location, |
Address | V, | ||
StringRef | AnnotStr | ||
) |
Definition at line 2987 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypeCache::ConstGlobalsPtrTy, EmitAnnotationCall(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), and V.
Definition at line 23740 of file CGBuiltin.cpp.
References clang::Function, clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::Expr::getIntegerConstantExpr(), clang::CallExpr::getNumArgs(), clang::Value::getType(), INT_MIN, and clang::threadSafety::sx::toString().
RValue CodeGenFunction::EmitIntelFPGARegBuiltin | ( | const CallExpr * | E, |
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 23704 of file CGBuiltin.cpp.
References clang::CodeGen::RValue::getAggregate(), clang::CallExpr::getArg(), clang::Expr::getExprLoc(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::Type::isRecordType(), and V.
RValue CodeGenFunction::EmitIntelSYCLAllocaBuiltin | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 23950 of file CGBuiltin.cpp.
References clang::DeclRefExpr::Create(), clang::SYCLUniqueStableIdExpr::Create(), clang::TemplateArgumentList::get(), clang::TemplateArgument::getAsDecl(), clang::TemplateArgument::getAsType(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::ValueDecl::getType(), clang::CodeGen::KnownNonNull, Loc, and clang::VK_LValue.
Definition at line 23913 of file CGBuiltin.cpp.
References clang::Expr::EvaluateAsRValue(), clang::Function, clang::CodeGen::RValue::get(), clang::CallExpr::getArg(), clang::Expr::getExprLoc(), clang::Expr::getIntegerConstantExpr(), clang::CallExpr::getNumArgs(), clang::StringLiteral::getString(), clang::Value::getType(), clang::Expr::IgnoreParenCasts(), and clang::threadSafety::sx::toString().
void CodeGenFunction::EmitInvariantStart | ( | llvm::Constant * | Addr, |
CharUnits | Size | ||
) |
Definition at line 159 of file CGDeclCXX.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), ID, and clang::CodeGen::CodeGenTypeCache::Int64Ty.
Referenced by EmitDeclInvariant(), and GenerateCXXGlobalInitFunc().
llvm::Value * CodeGenFunction::EmitIvarOffset | ( | const ObjCInterfaceDecl * | Interface, |
const ObjCIvarDecl * | Ivar | ||
) |
Definition at line 5792 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::EmitIvarOffset(), clang::CodeGen::CodeGenModule::getObjCRuntime(), and clang::Interface.
Referenced by EmitIvarOffsetAsPointerDiff().
llvm::Value * CodeGenFunction::EmitIvarOffsetAsPointerDiff | ( | const ObjCInterfaceDecl * | Interface, |
const ObjCIvarDecl * | Ivar | ||
) |
Definition at line 5798 of file CGExpr.cpp.
References Builder, ConvertType(), EmitIvarOffset(), getContext(), clang::ASTContext::getPointerDiffType(), getTypes(), and clang::Interface.
Referenced by generateObjCGetterBody(), and generateObjCSetterBody().
void CodeGenFunction::EmitKCFIOperandBundle | ( | const CGCallee & | Callee, |
SmallVectorImpl< llvm::OperandBundleDef > & | Bundles | ||
) |
Definition at line 3155 of file CodeGenFunction.cpp.
References CGM, clang::CodeGen::CodeGenModule::CreateKCFITypeId(), and clang::FunctionProtoType::desugar().
Referenced by EmitCall().
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 643 of file CGStmt.cpp.
References clang::CodeGen::CodeGenFunction::LexicalScope::addLabel(), Builder, CGM, EHStack, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getDebugInfo(), getJumpDestInCurrentScope(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::CodeGen::CodeGenFunction::JumpDest::getScopeDepth(), clang::LabelDecl::getStmt(), clang::CodeGen::EHScopeStack::hasNormalCleanups(), clang::CodeGenOptions::hasReducedDebugInfo(), incrementProfileCounter(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), ResolveBranchFixups(), clang::CodeGen::CodeGenFunction::JumpDest::setScopeDepth(), and clang::CodeGen::EHScopeStack::stable_begin().
void CodeGenFunction::EmitLabelStmt | ( | const LabelStmt & | S | ) |
Definition at line 702 of file CGStmt.cpp.
void CodeGenFunction::EmitLambdaBlockInvokeBody | ( | ) |
Definition at line 2979 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), BlockInfo, clang::BlockDecl::capture_begin(), CGM, CurCodeDecl, EmitDelegateCallArg(), EmitForwardingCallToLambda(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), GetAddrOfBlockDecl(), clang::Type::getAsCXXRecordDecl(), getAsNaturalPointerTo(), clang::CodeGen::CGBlockInfo::getBlockDecl(), getContext(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::CXXRecordDecl::isGenericLambda(), clang::FunctionDecl::isVariadic(), and clang::BlockDecl::parameters().
Referenced by GenerateBlockFunction().
void CodeGenFunction::EmitLambdaDelegatingInvokeBody | ( | const CXXMethodDecl * | MD, |
CallArgList & | CallArgs | ||
) |
Definition at line 3031 of file CGClass.cpp.
References clang::TemplateArgumentList::asArray(), EmitDelegateCallArg(), EmitForwardingCallToLambda(), EmitLambdaInAllocaImplFn(), clang::FunctionTemplateDecl::findSpecialization(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::CXXRecordDecl::getLambdaCallOperator(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getTemplateSpecializationArgs(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::CXXRecordDecl::isGenericLambda(), and clang::FunctionDecl::parameters().
Referenced by EmitLambdaInAllocaCallOpBody(), and EmitLambdaStaticInvokeBody().
void CodeGenFunction::EmitLambdaInAllocaCallOpBody | ( | const CXXMethodDecl * | MD | ) |
Definition at line 3065 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), CGM, CurFn, EmitLambdaDelegatingInvokeBody(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), getContext(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), clang::ASTContext::getRecordType(), and clang::FunctionDecl::isVariadic().
Referenced by GenerateCode().
void CodeGenFunction::EmitLambdaInAllocaImplFn | ( | const CXXMethodDecl * | CallOp, |
const CGFunctionInfo ** | ImplFnInfo, | ||
llvm::Function ** | ImplFn | ||
) |
Definition at line 3083 of file CGClass.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), clang::CodeGen::CGFunctionInfo::arg_end(), clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::CodeGen::CodeGenTypes::arrangeLLVMFunctionInfo(), CGM, GenerateCode(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::GlobalDecl::getDecl(), clang::CodeGen::CGFunctionInfo::getExtInfo(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CGFunctionInfo::getRequiredArgs(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::IsDelegateCall, clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), and clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition().
Referenced by EmitLambdaDelegatingInvokeBody().
void CodeGenFunction::EmitLambdaStaticInvokeBody | ( | const CXXMethodDecl * | MD | ) |
Definition at line 3009 of file CGClass.cpp.
References clang::CodeGen::CallArgList::add(), CGM, CreateMemTemp(), EmitLambdaDelegatingInvokeBody(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), getContext(), clang::CXXMethodDecl::getParent(), clang::ASTContext::getPointerType(), clang::ASTContext::getRecordType(), and clang::FunctionDecl::isVariadic().
Referenced by GenerateCode().
|
inline |
Definition at line 2416 of file CodeGenFunction.h.
References EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), and clang::VariableArrayType::getSizeExpr().
llvm::BasicBlock * CodeGenFunction::EmitLandingPad | ( | ) |
Emits a landing pad for the current EH stack.
Definition at line 825 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), Builder, clang::CodeGen::EHScope::Catch, CGM, clang::CodeGen::EHScope::Cleanup, createBasicBlock(), clang::CodeGen::ApplyDebugLocation::CreateDefaultArtificial(), clang::CodeGen::CGBuilderTy::CreateStore(), EHStack, EmitBlock(), clang::CodeGen::EHScopeStack::end(), clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScopeStack::find(), clang::CodeGen::CatchTypeInfo::Flags, clang::CodeGen::EHScope::getCachedLandingPad(), getCatchAllValue(), getEHDispatchBlock(), getEHSelectorSlot(), getExceptionSlot(), clang::CodeGen::EHFilterScope::getFilter(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::EHScopeStack::getInnermostEHScope(), clang::CodeGen::EHScope::getKind(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::EHFilterScope::getNumFilters(), clang::CodeGen::EHCatchScope::getNumHandlers(), getTerminateLandingPad(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::EHScopeStack::requiresLandingPad(), clang::CodeGen::CatchTypeInfo::RTTI, clang::CodeGen::EHScope::Terminate, and clang::CodeGen::EHCatchScope::Handler::Type.
Referenced by getInvokeDestImpl().
void CodeGenFunction::EmitLifetimeEnd | ( | llvm::Value * | Size, |
llvm::Value * | Addr | ||
) |
Definition at line 1408 of file CGDecl.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getDataLayout(), and clang::CodeGen::CodeGenModule::getLLVMLifetimeEndFn().
Referenced by clang::CodeGen::CodeGenFunction::CallLifetimeEnd::Emit(), and EmitCall().
llvm::Value * CodeGenFunction::EmitLifetimeStart | ( | llvm::TypeSize | Size, |
llvm::Value * | Addr | ||
) |
Emit a lifetime.begin marker if some criteria are satisfied.
Definition at line 1392 of file CGDecl.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenModule::getLLVMLifetimeStartFn(), and clang::CodeGen::CodeGenTypeCache::Int64Ty.
Referenced by EmitAutoVarAlloca(), EmitCall(), and EmitMaterializeTemporaryExpr().
RValue CodeGenFunction::EmitLoadOfBitfieldLValue | ( | LValue | LV, |
SourceLocation | Loc | ||
) |
Definition at line 2230 of file CGExpr.cpp.
References Builder, CGM, ConvertType(), clang::CodeGen::CGBuilderTy::CreateLoad(), EmitScalarRangeCheck(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getBitFieldAddress(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::CodeGenModule::getTarget(), clang::CodeGen::LValue::getType(), isAAPCS(), clang::CodeGen::CGBitFieldInfo::IsSigned, clang::CodeGen::LValue::isVolatileQualified(), Loc, clang::CodeGen::CGBitFieldInfo::Offset, Offset, clang::CodeGen::CGBitFieldInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageSize, clang::CodeGen::CGBitFieldInfo::VolatileOffset, and clang::CodeGen::CGBitFieldInfo::VolatileStorageSize.
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 1497 of file CGExprComplex.cpp.
Referenced by convertTempToRValue(), EmitComplexPrePostIncDec(), EmitFunctionEpilog(), emitGlobalToListCopyFunction(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitListToGlobalCopyFunction(), EmitRValueForField(), generateObjCGetterBody(), and InitCatchParam().
Definition at line 2267 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::RValue::get(), getAccessedFieldNo(), clang::Type::getAs(), clang::CodeGen::LValue::getExtVectorAddress(), clang::CodeGen::LValue::getExtVectorElts(), getLangOpts(), clang::VectorType::getNumElements(), clang::CodeGen::LValue::getType(), clang::HLSL, clang::CodeGen::CodeGenTypeCache::Int64Ty, 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 2320 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::getDataLayout(), clang::CodeGen::LValue::getGlobalReg(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Type::isIntegerType(), and clang::Type::isPointerType().
Referenced by EmitLoadOfLValue().
RValue CodeGenFunction::EmitLoadOfLValue | ( | LValue | V, |
SourceLocation | Loc | ||
) |
EmitLoadOfLValue - Given an expression that represents a value lvalue, this method emits the address of the lvalue, then loads the result as an rvalue, returning the rvalue.
Definition at line 2168 of file CGExpr.cpp.
References Builder, clang::Type::castAs(), CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), EmitARCLoadWeak(), EmitARCLoadWeakRetained(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfMatrixLValue(), EmitLoadOfScalar(), EmitObjCConsumeObject(), clang::CodeGen::CGObjCRuntime::EmitObjCWeakRead(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLangOpts(), clang::CodeGen::LValue::getMatrixIdx(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::LValue::getQuals(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddress(), clang::CodeGen::LValue::getVectorIdx(), clang::Type::isConstantMatrixType(), clang::CodeGen::LValue::isExtVectorElt(), clang::Type::isFunctionType(), clang::CodeGen::LValue::isGlobalReg(), clang::CodeGen::LValue::isMatrixElt(), clang::CodeGen::LValue::isObjCWeak(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVectorElt(), clang::CodeGen::LValue::isVolatileQualified(), clang::interp::Load(), Loc, and clang::Qualifiers::OCL_Weak.
Referenced by EmitOMPAtomicSimpleUpdateExpr(), EmitRValueForField(), emitScalarConstant(), emitSimpleAtomicLoad(), emitWritebackArg(), generateObjCGetterBody(), StartFunction(), and tryEmitARCRetainLoadOfScalar().
Address CodeGenFunction::EmitLoadOfPointer | ( | Address | Ptr, |
const PointerType * | PtrTy, | ||
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr |
||
) |
Load a pointer with type PtrTy
stored at address Ptr
.
Note that PtrTy
is the type of the loaded pointer, not the addresses it is loaded from.
Definition at line 2797 of file CGExpr.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::PointerType::getPointeeType(), and makeNaturalAddressForPointer().
Referenced by emitDeclTargetVarDeclLValue(), EmitLoadOfPointerLValue(), EmitOMPUseDeviceAddrClause(), and emitOutlinedFunctionPrologue().
LValue CodeGenFunction::EmitLoadOfPointerLValue | ( | Address | Ptr, |
const PointerType * | PtrTy | ||
) |
Definition at line 2807 of file CGExpr.cpp.
References EmitLoadOfPointer(), clang::PointerType::getPointeeType(), and MakeAddrLValue().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), and loadToBegin().
Address CodeGenFunction::EmitLoadOfReference | ( | LValue | RefLVal, |
LValueBaseInfo * | PointeeBaseInfo = nullptr , |
||
TBAAAccessInfo * | PointeeTBAAInfo = nullptr |
||
) |
Definition at line 2777 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), clang::CodeGen::LValue::getAddress(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isVolatile(), clang::interp::Load(), and makeNaturalAddressForPointer().
Referenced by EmitLoadOfReferenceLValue(), EmitLValueForField(), emitOutlinedFunctionPrologue(), and GetAddrOfBlockDecl().
|
inline |
Definition at line 2758 of file CodeGenFunction.h.
References CGM, EmitLoadOfReferenceLValue(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), and MakeAddrLValue().
Definition at line 2788 of file CGExpr.cpp.
References EmitLoadOfReference(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getType(), and MakeAddrLValue().
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), EmitDeclRefLValue(), EmitGlobalVarDeclLValue(), EmitLoadOfReferenceLValue(), EmitLValueForLambdaField(), and loadToBegin().
|
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 4185 of file CodeGenFunction.h.
References CGM, clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), and Loc.
Referenced by castValueToType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), convertTempToRValue(), EmitARCStoreStrong(), EmitCfiCheckFail(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), EmitFunctionProlog(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitInterWarpCopyFunction(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalFinalUpdate(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), EmitLoadOfLValue(), EmitLoadOfMatrixLValue(), EmitLoadOfScalar(), EmitNontemporalLoad(), emitOutlinedFunctionPrologue(), EmitRValueForField(), EmitScalarInit(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), emitWriteback(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), InitCatchParam(), LoadObjCSelf(), LoadPassedObjectSize(), and shuffleAndStore().
llvm::Value * CodeGenFunction::EmitLoadOfScalar | ( | Address | Addr, |
bool | Volatile, | ||
QualType | Ty, | ||
SourceLocation | Loc, | ||
LValueBaseInfo | BaseInfo, | ||
TBAAAccessInfo | TBAAInfo, | ||
bool | isNontemporal = false |
||
) |
Definition at line 1937 of file CGExpr.cpp.
References Builder, clang::interp::Cast(), CGM, ConvertType(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), EmitAtomicLoad(), emitBoolVecConversion(), EmitFromMemory(), EmitScalarRangeCheck(), clang::Type::getAs(), clang::CodeGen::Address::getBasePointer(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::Address::getElementType(), getLLVMContext(), clang::CodeGen::RValue::getScalarVal(), clang::Type::isAtomicType(), clang::interp::Load(), Loc, LValueIsSuitableForInlineAtomic(), clang::CodeGen::LValue::MakeAddr(), Node, clang::CodeGen::NotKnownNonNull, V, clang::CodeGen::Address::withElementType(), and clang::CodeGen::Address::withPointer().
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 1841 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(), clang::CodeGen::LValue::isVolatile(), and Loc.
LValue CodeGenFunction::EmitLValue | ( | const Expr * | E, |
KnownNonNull_t | IsKnownNonNull = NotKnownNonNull |
||
) |
EmitLValue - Emit code to compute a designator that specifies the location of the expression.
This can return one of two things: a simple address or a bitfield reference. In either case, the LLVM Value* in the LValue structure is guaranteed to be an LLVM pointer type.
If this returns a bitfield reference, nothing about the pointee type of the LLVM value is known: For example, it may not be a pointer to an integer.
If this returns a normal address, and if the lvalue's C type is fixed size, this method guarantees that the returned pointer type will point to an LLVM type of the same size of the lvalue's type. If the lvalue has a variable length type, this is not possible.
Definition at line 1503 of file CGExpr.cpp.
References clang::CodeGen::LValue::isKnownNonNull(), and clang::CodeGen::LValue::setKnownNonNull().
Referenced by clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::bind(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitARCStoreUnsafeUnretained(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitArrayToPointerDecay(), EmitBinaryOperatorLValue(), EmitCallArg(), EmitCallee(), EmitCastLValue(), EmitCheckedLValue(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXPseudoDestructorExpr(), EmitDeclRefLValue(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), EmitExtVectorElementExpr(), EmitIgnoredExpr(), EmitInitListLValue(), EmitLValueOrThrowExpression(), EmitMatrixSubscriptExpr(), EmitMSVAListRef(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExpr(), emitOMPAtomicCaptureExpr(), emitOMPAtomicCompareExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), EmitOMPHelperVar(), EmitPointerToDataMemberBinaryExpr(), EmitPointerWithAlignment(), emitPrivatesInit(), emitPseudoObjectExpr(), EmitReferenceBindingToExpr(), EmitSimpleOMPExecutableDirective(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), emitStructSetterCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), EmitTypeidFromVTable(), EmitUnaryOpLValue(), EmitVAListRef(), emitWritebackArg(), getOrCreateOpaqueLValueMapping(), getPointerAndSize(), tryEmitARCCopyWeakInit(), and tryEmitARCRetainLoadOfScalar().
Definition at line 4833 of file CGExpr.cpp.
References clang::CodeGen::TBAAAccessInfo::AccessType, clang::Qualifiers::addCVRQualifiers(), clang::Qualifiers::addVolatile(), clang::CodeGen::TBAAAccessInfo::BaseType, Builder, CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateLaunderInvariantGroup(), clang::CodeGen::CGBuilderTy::CreatePreserveStructAccessIndex(), clang::CodeGen::CGBuilderTy::CreatePreserveUnionAccessIndex(), clang::CodeGen::CGBuilderTy::CreateStripInvariantGroup(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), emitAddrOfFieldStorage(), EmitFieldAnnotations(), EmitFieldSYCLAnnotations(), EmitIntelFPGAFieldAnnotations(), EmitLoadOfReference(), emitPreserveStructAccess(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CodeGenModule::generateIntelFPGAAnnotation(), 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(), getDebugInfo(), getDebugInfoFIndex(), clang::CodeGen::Address::getElementType(), clang::CodeGen::getFieldAlignmentSource(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), getLangOpts(), getLLVMContext(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::Decl::getLocation(), clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCGCAttr(), clang::CodeGen::CGDebugInfo::getOrCreateRecordType(), clang::CodeGen::CGDebugInfo::getOrCreateStandaloneType(), clang::FieldDecl::getParent(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getQuals(), clang::CharUnits::getQuantity(), clang::CodeGen::CodeGenModule::getTarget(), clang::CodeGen::CodeGenModule::getTBAABaseTypeInfo(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::CodeGenModule::getTBAATypeInfo(), clang::ValueDecl::getType(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::LValue::getVRQualifiers(), hasAnyVptr(), clang::Decl::hasAttr(), hasBPFPreserveStaticOffset(), isAAPCS(), clang::FieldDecl::isBitField(), IsInPreservedAIRegion, clang::CodeGen::TBAAAccessInfo::isMayAlias(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), clang::Type::isVectorType(), clang::QualType::isVolatileQualified(), MakeAddrLValue(), clang::CodeGen::LValue::MakeBitfield(), clang::CodeGen::TBAAAccessInfo::Offset, clang::Qualifiers::removeObjCGCAttr(), clang::CodeGen::TBAAAccessInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageSize, clang::Qualifiers::Volatile, clang::CodeGen::CGBitFieldInfo::VolatileStorageOffset, clang::CodeGen::CGBitFieldInfo::VolatileStorageSize, clang::Qualifiers::Weak, clang::QualType::withCVRQualifiers(), clang::CodeGen::Address::withElementType(), and wrapWithBPFPreserveStaticOffset().
Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), EmitLValueForFieldInitialization(), EmitLValueForLambdaField(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), emitPrivatesInit(), EmitRValueForField(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), and clang::CodeGen::CGOpenMPRuntime::getDepobjElements().
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 5014 of file CGExpr.cpp.
References CGM, ConvertTypeForMem(), emitAddrOfFieldStorage(), EmitLValueForField(), clang::CodeGen::LValueBaseInfo::getAlignmentSource(), clang::CodeGen::getFieldAlignmentSource(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::Type::isReferenceType(), MakeAddrLValue(), and V.
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), EmitLValueForAnyFieldInitialization(), and EmitMemberInitializer().
LValue CodeGenFunction::EmitLValueForIvar | ( | QualType | ObjectTy, |
llvm::Value * | Base, | ||
const ObjCIvarDecl * | Ivar, | ||
unsigned | CVRQualifiers | ||
) |
Definition at line 5806 of file CGExpr.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::EmitObjCValueForIvar(), and clang::CodeGen::CodeGenModule::getObjCRuntime().
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitObjCIvarRefLValue(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
Definition at line 4751 of file CGExpr.cpp.
Referenced by EmitCapturedFieldLValue(), and StartFunction().
LValue CodeGenFunction::EmitLValueForLambdaField | ( | const FieldDecl * | Field, |
llvm::Value * | ThisValue | ||
) |
Given that we are currently emitting a lambda, emit an l-value for one of its members.
Definition at line 4712 of file CGExpr.cpp.
References CurCodeDecl, clang::CodeGen::Decl, EmitLoadOfReferenceLValue(), EmitLValueForField(), clang::CodeGen::LValue::getAddress(), GetAddressOfBaseClass(), clang::Type::getAsCXXRecordDecl(), getContext(), clang::QualType::getNonReferenceType(), clang::ASTContext::getTagDeclType(), clang::ValueDecl::getType(), clang::Type::isReferenceType(), clang::ASTContext::LambdaCastPaths, MakeAddrLValue(), and MakeNaturalAlignAddrLValue().
LValue CodeGenFunction::EmitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | E | ) |
Definition at line 452 of file CGExpr.cpp.
References clang::CFGBlock::back(), Block, Builder, CGM, ConvertTypeForMem(), createReferenceTemporary(), clang::CodeGen::Decl, clang::SubobjectAdjustment::DerivedToBaseAdjustment, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), EmitAnyExprToMem(), EmitCXXMemberDataPointerAddress(), EmitIgnoredExpr(), EmitLifetimeStart(), EmitLValueForField(), clang::CodeGen::CodeGenModule::EmitNullConstant(), EmitOpaqueValueLValue(), EmitScalarExpr(), EmitScalarInit(), clang::SubobjectAdjustment::FieldAdjustment, clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::LValue::getAddress(), GetAddressOfBaseClass(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::RawAddress::getElementType(), getEvaluationKind(), clang::Expr::getExprLoc(), clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::QualType::getObjCLifetime(), clang::CodeGen::RawAddress::getPointer(), clang::QualType::getQualifiers(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::getStartingBlock(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::MaterializeTemporaryExpr::getSubExpr(), clang::Expr::getType(), clang::SanitizerSet::has(), inSuspendBlock(), clang::CodeGen::Address::invalid(), clang::CodeGen::AggValueSlot::IsDestructed, clang::QualType::isDestructedType(), isInConditionalBranch(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::LValue::isSimple(), MakeAddrLValue(), clang::SubobjectAdjustment::MemberPointerAdjustment, clang::CodeGen::NormalEHLifetimeMarker, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, pushTemporaryCleanup(), SanOpts, clang::SD_Automatic, clang::SD_FullExpression, clang::Expr::skipRValueSubobjectAdjustments(), clang::CodeGen::TEK_Aggregate, and clang::CodeGen::TEK_Scalar.
LValue CodeGenFunction::EmitMatrixSubscriptExpr | ( | const MatrixSubscriptExpr * | E | ) |
Definition at line 4384 of file CGExpr.cpp.
References Builder, clang::Type::castAs(), EmitLValue(), EmitScalarExpr(), clang::MatrixSubscriptExpr::getBase(), clang::MatrixSubscriptExpr::getColumnIdx(), clang::ConstantMatrixType::getNumRows(), clang::MatrixSubscriptExpr::getRowIdx(), clang::Expr::getType(), clang::MatrixSubscriptExpr::isIncomplete(), clang::CodeGen::LValue::MakeMatrixElt(), and MaybeConvertMatrixAddress().
LValue CodeGenFunction::EmitMemberExpr | ( | const MemberExpr * | E | ) |
Definition at line 4661 of file CGExpr.cpp.
References CGM, EmitCheckedLValue(), EmitDeclRefLValue(), EmitFunctionDeclLValue(), EmitIgnoredExpr(), EmitLValueForField(), EmitPointerWithAlignment(), EmitTypeCheck(), clang::MemberExpr::getBase(), getContext(), clang::MemberExpr::getExprLoc(), getLangOpts(), clang::MemberExpr::getMemberDecl(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::Type::getPointeeType(), clang::Expr::getType(), clang::MemberExpr::isArrow(), clang::CodeGen::LValue::isNontemporal(), clang::CodeGen::CGOpenMPRuntime::isNontemporalDecl(), IsWrappedCXXThis(), MakeAddrLValue(), clang::SanitizerSet::set(), clang::CodeGen::LValue::setNontemporal(), setObjCGCLValueClass(), TCK_MemberAccess, tryToConvertMemberExprToDeclRefExpr(), and clang::CharUnits::Zero().
Referenced by EmitCountedByFieldExpr().
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 2779 of file CodeGenFunction.cpp.
References EmitLValue(), and clang::CodeGen::LValue::getAddress().
Referenced by EmitVAArg().
Value * CodeGenFunction::EmitMSVCBuiltinExpr | ( | MSVCIntrin | BuiltinID, |
const CallExpr * | E | ||
) |
Definition at line 1889 of file CGBuiltin.cpp.
References Begin, EmitPointerWithAlignment(), clang::CallExpr::getArg(), clang::CodeGen::Address::getElementType(), clang::Expr::getType(), and clang::Value::getType().
void CodeGenFunction::EmitMultiVersionResolver | ( | llvm::Function * | Resolver, |
ArrayRef< MultiVersionResolverOption > | Options | ||
) |
Definition at line 3226 of file CodeGenFunction.cpp.
void CodeGenFunction::EmitMustTailThunk | ( | GlobalDecl | GD, |
llvm::Value * | AdjustedThisPtr, | ||
llvm::FunctionCallee | Callee | ||
) |
Emit a musttail call for a thunk with a potentially adjusted this pointer.
Definition at line 402 of file CGVTables.cpp.
References clang::CodeGen::CGFunctionInfo::arg_begin(), Builder, CGM, clang::CodeGen::CodeGenModule::ConstructAttributeList(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateStore(), CurFn, CurFnInfo, EmitBlock(), FinishThunk(), GetAddrOfLocalVar(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), ID, clang::CodeGen::CGFunctionInfoArgInfo::info, clang::CodeGen::ABIArgInfo::isDirect(), clang::CodeGen::ABIArgInfo::isInAlloca(), clang::CodeGen::ABIArgInfo::isIndirect(), and clang::CodeGen::ABIArgInfo::isSRetAfterThis().
Referenced by EmitCallAndReturnForThunk().
Value * CodeGenFunction::EmitNeonCall | ( | llvm::Function * | F, |
SmallVectorImpl< llvm::Value * > & | O, | ||
const char * | name, | ||
unsigned | shift = 0 , |
||
bool | rightshift = false |
||
) |
Definition at line 6366 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 6394 of file CGBuiltin.cpp.
References clang::prec::Shift.
Value * CodeGenFunction::EmitNeonShiftVector | ( | llvm::Value * | V, |
llvm::Type * | Ty, | ||
bool | negateForRightShift | ||
) |
Definition at line 6387 of file CGBuiltin.cpp.
References V.
llvm::Value* clang::CodeGen::CodeGenFunction::EmitNeonSplat | ( | llvm::Value * | V, |
llvm::Constant * | Idx | ||
) |
llvm::Value* clang::CodeGen::CodeGenFunction::EmitNeonSplat | ( | llvm::Value * | V, |
llvm::Constant * | Idx, | ||
const llvm::ElementCount & | Count | ||
) |
void CodeGenFunction::EmitNewArrayInitializer | ( | const CXXNewExpr * | E, |
QualType | elementType, | ||
llvm::Type * | ElementTy, | ||
Address | NewPtr, | ||
llvm::Value * | NumElements, | ||
llvm::Value * | AllocSizeWithoutCookie | ||
) |
Definition at line 995 of file CGExprCXX.cpp.
References clang::CharUnits::alignmentAtOffset(), clang::CharUnits::alignmentOfArrayElement(), Builder, CGM, ConvertTypeForMem(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateFlagLoad(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateMemSet(), clang::CodeGen::CGBuilderTy::CreateStore(), CreateTempAlloca(), DeferredDeactivationCleanupStack, clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EHStack, EmitAggExpr(), EmitBlock(), EmitCXXAggrConstructorCall(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::EHScopeStack::find(), clang::CodeGen::AggValueSlot::forAddr(), clang::CodeGen::CodeGenFunction::CleanupDeactivationScope::ForceDeactivate(), clang::CodeGen::Address::getAlignment(), clang::CXXNewExpr::getAllocatedType(), clang::InitListExpr::getArrayFiller(), clang::CXXParenListInitExpr::getArrayFiller(), clang::Type::getAs(), clang::Type::getAsArrayTypeUnsafe(), clang::ASTContext::getConstantArrayElementCount(), getContext(), getDestroyer(), clang::CodeGen::Address::getElementType(), clang::InitListExpr::getInit(), clang::CXXParenListInitExpr::getInitExprs(), clang::CXXNewExpr::getInitializer(), clang::InitListExpr::getNumInits(), clang::CXXMethodDecl::getParent(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::QualType::getQualifiers(), clang::CodeGen::CGBuilderTy::getSize(), clang::Expr::getType(), clang::CodeGen::Address::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::CXXNewExpr::hasInitializer(), clang::InitListExpr::inits(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Address::invalid(), clang::CodeGen::AggValueSlot::IsDestructed, clang::QualType::isDestructedType(), clang::CXXRecordDecl::isEmpty(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::CodeGen::AggValueSlot::IsNotZeroed, clang::CodeGen::AggValueSlot::IsSanitizerChecked, clang::InitListExpr::isStringLiteralInit(), clang::FunctionDecl::isTrivial(), clang::CodeGen::Address::isValid(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), needsEHCleanup(), pushIrregularPartialArrayCleanup(), pushRegularPartialArrayCleanup(), clang::CodeGen::EHScopeStack::stable_begin(), StoreAnyExprIntoOneUnit(), clang::CodeGen::CodeGenFunction::AllocaTrackerRAII::Take(), and clang::CodeGen::Address::withElementType().
Referenced by EmitNewInitializer().
void CodeGenFunction::EmitNonNullArgCheck | ( | Address | Addr, |
QualType | ArgType, | ||
SourceLocation | ArgLoc, | ||
AbstractCallee | AC, | ||
unsigned | ParmNum | ||
) |
Definition at line 4501 of file CGCall.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 4450 of file CGCall.cpp.
Create a check that a scalar RValue is non-null.
Definition at line 1397 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::RValue::getScalarVal(), clang::T, and V.
void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke | ( | llvm::FunctionCallee | callee, |
ArrayRef< llvm::Value * > | args | ||
) |
Emits a call or invoke to the given noreturn runtime function.
Definition at line 4921 of file CGCall.cpp.
References Builder, getBundlesForFunclet(), getInvokeDest(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), and getUnreachableBlock().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall | ( | llvm::FunctionCallee | callee, |
ArrayRef< Address > | args, | ||
const Twine & | name = "" |
||
) |
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall | ( | llvm::FunctionCallee | callee, |
ArrayRef< llvm::Value * > | args, | ||
const Twine & | name = "" |
||
) |
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall | ( | llvm::FunctionCallee | callee, |
const Twine & | name = "" |
||
) |
Referenced by BuildBlockRelease(), CallBeginCatch(), emitARCCopyOperation(), EmitARCDestroyWeak(), EmitARCIntrinsicUse(), emitARCLoadOperation(), EmitARCNoopIntrinsicUse(), EmitARCRelease(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), EmitBuiltinAvailable(), clang::CodeGen::CGOpenMPRuntime::emitCall(), EmitCall(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitCaptureStmt(), emitCheckHandlerCall(), EmitExtendGCLifetime(), emitGlobalDtorWithTLRegDtor(), emitIsPlatformVersionAtLeast(), EmitObjCAutoreleasePoolPush(), clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), GenerateCopyHelperFunction(), InitCatchParam(), registerGlobalDtorWithAtExit(), and unregisterGlobalDtorWithUnAtExit().
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 804 of file CGDecl.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), clang::Type::getNullability(), clang::CodeGen::LValue::getType(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenTypeCache::Int8Ty, IsNotNull, Loc, clang::NonNull, SanOpts, and TCK_NonnullAssign.
Referenced by EmitBinaryOperatorLValue(), and EmitScalarInit().
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 2381 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateMemCpy(), clang::CodeGen::CGBuilderTy::CreateMemSet(), emitNonZeroVLAInit(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::Address::getAlignment(), clang::Type::getAs(), clang::CharUnits::getAsAlign(), 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(), clang::CodeGen::CodeGenTypes::isZeroInitializable(), and clang::CodeGen::Address::withElementType().
Referenced by EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitSynthesizedCXXCopyCtor(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), and clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit().
Definition at line 19973 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), clang::Type::getPointeeType(), and clang::Expr::getType().
Referenced by EmitTargetArchBuiltinExpr().
Definition at line 183 of file CGGPUBuiltin.cpp.
References CGM, clang::CodeGen::CodeGenModule::getModule(), and getTarget().
llvm::Value * CodeGenFunction::EmitObjCAlloc | ( | llvm::Value * | value, |
llvm::Type * | resultType | ||
) |
Allocate the given objc object.
call i8* @objc_alloc(i8* value)
Definition at line 2744 of file CGObjC.cpp.
References CGM, emitObjCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_alloc.
Referenced by tryGenerateSpecializedMessageSend().
llvm::Value * CodeGenFunction::EmitObjCAllocInit | ( | llvm::Value * | value, |
llvm::Type * | resultType | ||
) |
Definition at line 2760 of file CGObjC.cpp.
References CGM, emitObjCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_alloc_init.
Referenced by tryEmitSpecializedAllocInit().
llvm::Value * CodeGenFunction::EmitObjCAllocWithZone | ( | llvm::Value * | value, |
llvm::Type * | resultType | ||
) |
Allocate the given objc object.
call i8* @objc_allocWithZone(i8* value)
Definition at line 2753 of file CGObjC.cpp.
References CGM, emitObjCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_allocWithZone.
Referenced by tryGenerateSpecializedMessageSend().
llvm::Value * CodeGenFunction::EmitObjCArrayLiteral | ( | const ObjCArrayLiteral * | E | ) |
Definition at line 247 of file CGObjC.cpp.
References EmitObjCCollectionLiteral(), and clang::ObjCArrayLiteral::getArrayWithObjectsMethod().
void CodeGenFunction::EmitObjCAtSynchronizedStmt | ( | const ObjCAtSynchronizedStmt & | S | ) |
Definition at line 2089 of file CGObjC.cpp.
void CodeGenFunction::EmitObjCAtThrowStmt | ( | const ObjCAtThrowStmt & | S | ) |
Definition at line 2085 of file CGObjC.cpp.
void CodeGenFunction::EmitObjCAtTryStmt | ( | const ObjCAtTryStmt & | S | ) |
Definition at line 2081 of file CGObjC.cpp.
llvm::Value * CodeGenFunction::EmitObjCAutorelease | ( | llvm::Value * | value, |
llvm::Type * | returnType | ||
) |
Autorelease the given object.
call i8* @objc_autorelease(i8* value)
Definition at line 2803 of file CGObjC.cpp.
References CGM, emitObjCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_autoreleaseRuntimeFunction.
Referenced by tryGenerateSpecializedMessageSend().
void CodeGenFunction::EmitObjCAutoreleasePoolCleanup | ( | llvm::Value * | Ptr | ) |
Definition at line 2871 of file CGObjC.cpp.
References CGM, 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 2689 of file CGObjC.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitRuntimeCall(), EmitRuntimeCallOrInvoke(), getARCIntrinsic(), getInvokeDest(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::ObjCEntrypoints::objc_autoreleasePoolPop, clang::CodeGen::ObjCEntrypoints::objc_autoreleasePoolPopInvoke, and setARCRuntimeFunctionLinkage().
llvm::Value * CodeGenFunction::EmitObjCAutoreleasePoolPush | ( | ) |
Produce the code to do a objc_autoreleasepool_push.
call i8* @objc_autoreleasePoolPush(void)
Definition at line 2679 of file CGObjC.cpp.
References CGM, EmitNounwindRuntimeCall(), getARCIntrinsic(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_autoreleasePoolPush.
Referenced by GenerateCXXGlobalInitFunc().
void CodeGenFunction::EmitObjCAutoreleasePoolStmt | ( | const ObjCAutoreleasePoolStmt & | S | ) |
Definition at line 3643 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 64 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), Builder, clang::interp::Cast(), CGM, ConvertType(), CreateMemTemp(), EmitAnyExpr(), EmitAnyExprToMem(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfConstantCString(), clang::ObjCBoxedExpr::getBoxingMethod(), clang::QualType::getCanonicalType(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ObjCMethodDecl::getClassInterface(), getContext(), clang::ASTContext::getObjCEncodingForType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::ConstantAddress::getPointer(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCMethodDecl::getSelector(), clang::ObjCBoxedExpr::getSubExpr(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::ObjCMethodDecl::isClassMethod(), clang::ObjCBoxedExpr::isExpressibleAsConstantInitializer(), clang::Type::isObjCBoxableRecordType(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::parameters(), and clang::CodeGen::ConstantEmitter::tryEmitAbstract().
llvm::Value * CodeGenFunction::EmitObjCCollectionLiteral | ( | const Expr * | E, |
const ObjCMethodDecl * | MethodWithObjects | ||
) |
Definition at line 123 of file CGObjC.cpp.
Referenced by EmitObjCArrayLiteral(), and EmitObjCDictionaryLiteral().
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 2108 of file CGObjC.cpp.
References getARCCleanupKind().
Referenced by emitARCCopyAssignWeak(), EmitARCExtendBlockObject(), emitARCMoveAssignWeak(), EmitARCReclaimReturnedObject(), and EmitLoadOfLValue().
llvm::Value * CodeGenFunction::EmitObjCDictionaryLiteral | ( | const ObjCDictionaryLiteral * | E | ) |
Definition at line 251 of file CGObjC.cpp.
References EmitObjCCollectionLiteral(), and clang::ObjCDictionaryLiteral::getDictWithObjectsMethod().
LValue CodeGenFunction::EmitObjCEncodeExprLValue | ( | const ObjCEncodeExpr * | E | ) |
Definition at line 3264 of file CGExpr.cpp.
References CGM, clang::CodeGen::Decl, clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromObjCEncode(), clang::Expr::getType(), and MakeAddrLValue().
llvm::Value * CodeGenFunction::EmitObjCExtendObjectLifetime | ( | QualType | T, |
llvm::Value * | Ptr | ||
) |
Definition at line 2116 of file CGObjC.cpp.
References EmitARCRetainAutorelease(), and clang::ast_matchers::type.
void CodeGenFunction::EmitObjCForCollectionStmt | ( | const ObjCForCollectionStmt & | S | ) |
Definition at line 1761 of file CGObjC.cpp.
LValue CodeGenFunction::EmitObjCIsaExpr | ( | const ObjCIsaExpr * | E | ) |
Definition at line 5552 of file CGExprScalar.cpp.
References ConvertType(), ConvertTypeForMem(), EmitLValue(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::ObjCIsaExpr::getBase(), clang::Type::getPointeeType(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::Expr::getType(), clang::CodeGen::Address::invalid(), clang::Expr::isPRValue(), MakeAddrLValue(), and clang::CodeGen::Address::withElementType().
LValue CodeGenFunction::EmitObjCIvarRefLValue | ( | const ObjCIvarRefExpr * | E | ) |
Definition at line 5814 of file CGExpr.cpp.
References EmitLValue(), EmitLValueForIvar(), EmitScalarExpr(), clang::ObjCIvarRefExpr::getBase(), getContext(), clang::Qualifiers::getCVRQualifiers(), clang::ObjCIvarRefExpr::getDecl(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getPointer(), clang::QualType::getQualifiers(), clang::Expr::getType(), clang::ObjCIvarRefExpr::isArrow(), and setObjCGCLValueClass().
RValue CodeGenFunction::EmitObjCMessageExpr | ( | const ObjCMessageExpr * | E, |
ReturnValueSlot | Return = ReturnValueSlot() |
||
) |
Definition at line 573 of file CGObjC.cpp.
References AdjustObjCObjectType(), clang::ObjCMessageExpr::arguments(), Builder, clang::Type::castAs(), CGM, clang::ObjCMessageExpr::Class, clang::CodeGen::CGBuilderTy::CreateStore(), CurCodeDecl, CurFuncDecl, EmitARCLoadWeakRetained(), EmitARCRetainAutorelease(), EmitARCRetainNonBlock(), EmitCallArgs(), EmitLValue(), EmitScalarExpr(), findWeakLValue(), clang::CodeGen::CGObjCRuntime::GenerateMessageSendSuper(), clang::CodeGen::CGObjCRuntime::GeneratePossiblySpecializedMessageSend(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::CodeGen::CGObjCRuntime::GetClass(), clang::ObjCMethodDecl::getClassInterface(), clang::ObjCMessageExpr::getClassReceiver(), clang::Decl::getDeclContext(), clang::CodeGen::Address::getElementType(), clang::ObjCMessageExpr::getInstanceReceiver(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMethodDecl::getMethodFamily(), getNullForVariable(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMessageExpr::getReceiverKind(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCMessageExpr::getSelector(), clang::ObjCMessageExpr::getSuperType(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::ObjCMessageExpr::Instance, clang::ObjCMessageExpr::isDelegateInitCall(), clang::Type::isObjCClassType(), LoadObjCSelf(), clang::OMF_retain, shouldExtendReceiverForInnerPointerMessage(), clang::ObjCMessageExpr::SuperClass, clang::ObjCMessageExpr::SuperInstance, tryEmitARCRetainScalarExpr(), and tryEmitSpecializedAllocInit().
Referenced by EmitObjCMessageExprLValue().
LValue CodeGenFunction::EmitObjCMessageExprLValue | ( | const ObjCMessageExpr * | E | ) |
Definition at line 5772 of file CGExpr.cpp.
References clang::CodeGen::Decl, EmitObjCMessageExpr(), clang::CodeGen::RValue::getAggregateAddress(), clang::ObjCMessageExpr::getMethodDecl(), clang::ObjCMethodDecl::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::Expr::getType(), clang::Type::isReferenceType(), clang::CodeGen::RValue::isScalar(), MakeAddrLValue(), and MakeNaturalAlignPointeeAddrLValue().
void CodeGenFunction::EmitObjCMRRAutoreleasePoolPop | ( | llvm::Value * | Arg | ) |
Produce the code to do a primitive release.
[tmp drain];
Definition at line 2769 of file CGObjC.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), getContext(), clang::CodeGen::CodeGenModule::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 2719 of file CGObjC.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::EmitNSAutoreleasePoolClassRef(), clang::CodeGen::CGObjCRuntime::GenerateMessageSend(), clang::IdentifierTable::get(), getContext(), clang::CodeGen::CodeGenModule::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 265 of file CGObjC.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::GenerateProtocolRef(), clang::CodeGen::CodeGenModule::getObjCRuntime(), and clang::ObjCProtocolExpr::getProtocol().
void CodeGenFunction::EmitObjCRelease | ( | llvm::Value * | value, |
ARCPreciseLifetime_t | precise | ||
) |
Release the given object.
call void @objc_release(i8* value)
Definition at line 2822 of file CGObjC.cpp.
References clang::CodeGen::ARCImpreciseLifetime, Builder, CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitCallOrInvoke(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::ObjCEntrypoints::objc_releaseRuntimeFunction, and setARCRuntimeFunctionLinkage().
Referenced by tryGenerateSpecializedMessageSend().
llvm::Value * CodeGenFunction::EmitObjCRetainNonBlock | ( | llvm::Value * | value, |
llvm::Type * | returnType | ||
) |
Retain the given object, with normal retain semantics.
call i8* @objc_retain(i8* value)
Definition at line 2813 of file CGObjC.cpp.
References CGM, emitObjCValueOperation(), clang::CodeGen::CodeGenModule::getObjCEntrypoints(), and clang::CodeGen::ObjCEntrypoints::objc_retainRuntimeFunction.
Referenced by tryGenerateSpecializedMessageSend().
llvm::Value * CodeGenFunction::EmitObjCSelectorExpr | ( | const ObjCSelectorExpr * | E | ) |
Emit a selector.
Definition at line 257 of file CGObjC.cpp.
References CGM, clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCSelectorExpr::getSelector(), and clang::CodeGen::CGObjCRuntime::GetSelector().
LValue CodeGenFunction::EmitObjCSelectorLValue | ( | const ObjCSelectorExpr * | E | ) |
Definition at line 5786 of file CGExpr.cpp.
References CGM, clang::CodeGen::Decl, clang::CodeGen::CGObjCRuntime::GetAddrOfSelector(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCSelectorExpr::getSelector(), clang::Expr::getType(), MakeAddrLValue(), and V.
llvm::Value * CodeGenFunction::EmitObjCStringLiteral | ( | const ObjCStringLiteral * | E | ) |
Emits an instance of NSConstantString representing the object.
Definition at line 51 of file CGObjC.cpp.
References CGM, clang::CodeGen::CGObjCRuntime::GenerateConstantString(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::ConstantAddress::getPointer(), and clang::ObjCStringLiteral::getString().
llvm::Value * CodeGenFunction::EmitObjCThrowOperand | ( | const Expr * | expr | ) |
Definition at line 3497 of file CGObjC.cpp.
References EmitARCRetainAutoreleaseScalarExpr(), EmitScalarExpr(), clang::ast_matchers::expr, and getLangOpts().
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 717 of file CGStmtOpenMP.cpp.
References clang::CodeGen::Address::emitRawPointer(), clang::Type::getAsArrayTypeUnsafe(), clang::CodeGen::Address::getElementType(), and clang::CodeGen::Address::withElementType().
Referenced by emitPrivatesInit().
void CodeGenFunction::EmitOMPAtomicDirective | ( | const OMPAtomicDirective & | S | ) |
Definition at line 6552 of file CGStmtOpenMP.cpp.
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 6243 of file CGStmtOpenMP.cpp.
References EmitAtomicUpdate(), EmitLoadOfLValue(), emitOMPAtomicRMW(), EmitStoreThroughLValue(), Loc, and X.
Referenced by emitOMPAtomicCaptureExpr(), and emitOMPAtomicUpdateExpr().
void CodeGenFunction::EmitOMPBarrierDirective | ( | const OMPBarrierDirective & | S | ) |
Definition at line 5328 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPCancelDirective | ( | const OMPCancelDirective & | S | ) |
Definition at line 7209 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPCancellationPointDirective | ( | const OMPCancellationPointDirective & | S | ) |
Definition at line 7203 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPCanonicalLoop | ( | const OMPCanonicalLoop * | S | ) |
Emit an OMPCanonicalLoop using the OpenMPIRBuilder.
Definition at line 2028 of file CGStmtOpenMP.cpp.
llvm::CanonicalLoopInfo * CodeGenFunction::EmitOMPCollapsedCanonicalLoopNest | ( | const Stmt * | S, |
int | Depth | ||
) |
Emit the Stmt S
and return its topmost canonical loop, if any.
TODO: The Depth
paramter is not yet implemented and must be 1. In the future it is meant to be the number of loops expected in the loop nests (usually specified by the "collapse" clause) that are collapsed to a single loop by this function.
Definition at line 2002 of file CGStmtOpenMP.cpp.
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 782 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::Copy, 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 988 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 4368 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDepobjDirective | ( | const OMPDepobjDirective & | S | ) |
Definition at line 5407 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeDirective | ( | const OMPDistributeDirective & | S | ) |
Definition at line 5859 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 5630 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeParallelForDirective | ( | const OMPDistributeParallelForDirective & | S | ) |
Definition at line 3222 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeParallelForSimdDirective | ( | const OMPDistributeParallelForSimdDirective & | S | ) |
Definition at line 3232 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPDistributeSimdDirective | ( | const OMPDistributeSimdDirective & | S | ) |
Definition at line 3242 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPErrorDirective | ( | const OMPErrorDirective & | S | ) |
Definition at line 5318 of file CGStmtOpenMP.cpp.
bool CodeGenFunction::EmitOMPFirstprivateClause | ( | const OMPExecutableDirective & | D, |
OMPPrivateScope & | PrivateScope | ||
) |
Definition at line 819 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::Decl, clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::VarDecl::getInit(), clang::getOpenMPCaptureRegions(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), clang::ValueDecl::getType(), clang::CodeGen::Address::getType(), clang::Decl::hasAttr(), clang::Type::isArrayType(), clang::isOpenMPTargetExecutionDirective(), clang::CodeGen::CodeGenFunction::ConstantEmission::isReference(), clang::Type::isReferenceType(), V, and clang::VK_LValue.
void CodeGenFunction::EmitOMPFlushDirective | ( | const OMPFlushDirective & | S | ) |
Definition at line 5392 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPForDirective | ( | const OMPForDirective & | S | ) |
Definition at line 3914 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPForSimdDirective | ( | const OMPForSimdDirective & | S | ) |
Definition at line 3969 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPGenericLoopDirective | ( | const OMPGenericLoopDirective & | S | ) |
Definition at line 7899 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPInnerLoop | ( | const OMPExecutableDirective & | S, |
bool | RequiresCleanup, | ||
const Expr * | LoopCond, | ||
const Expr * | IncExpr, | ||
const llvm::function_ref< void(CodeGenFunction &)> | BodyGen, | ||
const llvm::function_ref< void(CodeGenFunction &)> | PostIncGen | ||
) |
Emit inner loop of the worksharing/simd construct.
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 2103 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPInteropDirective | ( | const OMPInteropDirective & | S | ) |
Definition at line 7030 of file CGStmtOpenMP.cpp.
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 1123 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getBeginLoc(), and clang::OMPExecutableDirective::getClausesOfKind().
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 1060 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::ValueDecl::getType(), clang::CodeGen::Address::invalid(), clang::isOpenMPSimdDirective(), clang::isOpenMPTaskLoopDirective(), and clang::VK_LValue.
void CodeGenFunction::EmitOMPLinearClause | ( | const OMPLoopDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope | ||
) |
Emit initial code for linear clauses.
Definition at line 2355 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::VarDecl::getCanonicalDecl(), getCanonicalDecl(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), and clang::isOpenMPSimdDirective().
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 2202 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 2164 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::OMPExecutableDirective::getClausesOfKind(), clang::Expr::getExprLoc(), clang::VarDecl::getInit(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Expr::IgnoreImpCasts(), and clang::VK_LValue.
void CodeGenFunction::EmitOMPLoopBody | ( | const OMPLoopDirective & | D, |
JumpDest | LoopExit | ||
) |
Helper for the OpenMP loop directives.
Definition at line 1904 of file CGStmtOpenMP.cpp.
References emitBody(), clang::OMPLoopDirective::finals_conditions(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::OMPLoopDirective::getBody(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getInnermostCapturedStmt(), clang::OMPLoopBasedDirective::getLoopsNumber(), clang::Stmt::IgnoreContainers(), clang::isOpenMPDistributeDirective(), clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize(), clang::OMPLoopBasedDirective::tryToFindNextInnerLoop(), and clang::OMPLoopDirective::updates().
void CodeGenFunction::EmitOMPMaskedDirective | ( | const OMPMaskedDirective & | S | ) |
Definition at line 4333 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPMasterDirective | ( | const OMPMasterDirective & | S | ) |
Definition at line 4293 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPMasterTaskLoopDirective | ( | const OMPMasterTaskLoopDirective & | S | ) |
Definition at line 7817 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPMasterTaskLoopSimdDirective | ( | const OMPMasterTaskLoopSimdDirective & | S | ) |
Definition at line 7829 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPMetaDirective | ( | const OMPMetaDirective & | S | ) |
Definition at line 1831 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPOrderedDirective | ( | const OMPOrderedDirective & | S | ) |
Definition at line 5903 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelDirective | ( | const OMPParallelDirective & | S | ) |
Definition at line 1749 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelForDirective | ( | const OMPParallelForDirective & | S | ) |
Definition at line 4419 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelForSimdDirective | ( | const OMPParallelForSimdDirective & | S | ) |
Definition at line 4453 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelGenericLoopDirective | ( | const OMPLoopDirective & | S | ) |
Definition at line 7921 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelMaskedDirective | ( | const OMPParallelMaskedDirective & | S | ) |
Definition at line 4514 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelMasterDirective | ( | const OMPParallelMasterDirective & | S | ) |
Definition at line 4487 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelMasterTaskLoopDirective | ( | const OMPParallelMasterTaskLoopDirective & | S | ) |
Definition at line 7841 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelMasterTaskLoopSimdDirective | ( | const OMPParallelMasterTaskLoopSimdDirective & | S | ) |
Definition at line 7859 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPParallelSectionsDirective | ( | const OMPParallelSectionsDirective & | S | ) |
Definition at line 4541 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPPrivateClause | ( | const OMPExecutableDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope | ||
) |
Definition at line 963 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), and clang::OMPExecutableDirective::getClausesOfKind().
void CodeGenFunction::EmitOMPPrivateLoopCounters | ( | const OMPLoopDirective & | S, |
CodeGenFunction::OMPPrivateScope & | LoopScope | ||
) |
Emit initial code for loop counters of loop-based directives.
Definition at line 2275 of file CGStmtOpenMP.cpp.
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 1424 of file CGStmtOpenMP.cpp.
References clang::OMPExecutableDirective::getBeginLoc(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getEndLoc(), clang::OMPExecutableDirective::getSingleClause(), clang::isOpenMPParallelDirective(), and clang::isOpenMPWorksharingDirective().
void CodeGenFunction::EmitOMPReductionClauseInit | ( | const OMPExecutableDirective & | D, |
CodeGenFunction::OMPPrivateScope & | PrivateScope, | ||
bool | ForInscan = false |
||
) |
Emit initial code for reduction variables.
Creates reduction copies and initializes them with the values according to OpenMP standard.
D | Directive (possibly) with the 'reduction' clause. |
PrivateScope | Private scope for capturing reduction variables for proper codegen in internal captured statement. |
Definition at line 1214 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), Data, clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::ReductionCodeGen::emitInitialization(), clang::CodeGen::ReductionCodeGen::emitSharedOrigLValue(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CodeGenFunction::AutoVarEmission::getAllocatedAddress(), clang::CodeGen::ReductionCodeGen::getBaseDecl(), clang::OMPExecutableDirective::getBeginLoc(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::CodeGen::ReductionCodeGen::getSharedLValue(), clang::Expr::getType(), clang::isOpenMPWorksharingDirective(), clang::Type::isScalarType(), clang::Type::isVariablyModifiedType(), and clang::CodeGen::Address::withElementType().
void CodeGenFunction::EmitOMPScanDirective | ( | const OMPScanDirective & | S | ) |
Definition at line 5430 of file CGStmtOpenMP.cpp.
Referenced by EmitSimpleOMPExecutableDirective().
void CodeGenFunction::EmitOMPSectionDirective | ( | const OMPSectionDirective & | S | ) |
Definition at line 4213 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPSectionsDirective | ( | const OMPSectionsDirective & | S | ) |
Definition at line 4144 of file CGStmtOpenMP.cpp.
Emits the lvalue for the expression with possibly captured variable.
Definition at line 311 of file CGStmtOpenMP.cpp.
References clang::ValueDecl::getType(), and clang::VK_LValue.
void CodeGenFunction::EmitOMPSimdDirective | ( | const OMPSimdDirective & | S | ) |
Definition at line 2687 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPSimdFinal | ( | const OMPLoopDirective & | D, |
const llvm::function_ref< llvm::Value *(CodeGenFunction &)> | CondGen | ||
) |
Definition at line 2433 of file CGStmtOpenMP.cpp.
References clang::OMPLoopDirective::counters(), clang::OMPLoopDirective::finals(), and clang::OMPLoopDirective::private_counters().
void CodeGenFunction::EmitOMPSimdInit | ( | const OMPLoopDirective & | D | ) |
Helpers for the OpenMP loop directives.
Definition at line 2414 of file CGStmtOpenMP.cpp.
References emitSimdlenSafelenClause(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getSingleClause(), and clang::isOpenMPSimdDirective().
void CodeGenFunction::emitOMPSimpleStore | ( | LValue | LVal, |
RValue | RVal, | ||
QualType | RValTy, | ||
SourceLocation | Loc | ||
) |
Definition at line 6049 of file CGStmtOpenMP.cpp.
References convertToComplexValue(), convertToScalarValue(), EmitStoreOfComplex(), EmitStoreThroughLValue(), clang::CodeGen::RValue::get(), getEvaluationKind(), clang::CodeGen::LValue::getType(), Loc, 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 4240 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetDataDirective | ( | const OMPTargetDataDirective & | S | ) |
Definition at line 7353 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target directive.
Definition at line 6737 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetDirective | ( | const OMPTargetDirective & | S | ) |
Definition at line 6751 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetEnterDataDirective | ( | const OMPTargetEnterDataDirective & | S | ) |
Definition at line 7465 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetExitDataDirective | ( | const OMPTargetExitDataDirective & | S | ) |
Definition at line 7486 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 7532 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetParallelDirective | ( | const OMPTargetParallelDirective & | S | ) |
Definition at line 7546 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target parallel for directive.
Definition at line 7571 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetParallelForDirective | ( | const OMPTargetParallelForDirective & | S | ) |
Definition at line 7586 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target parallel for simd directive.
Definition at line 7610 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetParallelForSimdDirective | ( | const OMPTargetParallelForSimdDirective & | S | ) |
Definition at line 7625 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target parallel loop directive.
Definition at line 8088 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetParallelGenericLoopDirective | ( | const OMPTargetParallelGenericLoopDirective & | S | ) |
Emit combined directive 'target parallel loop' as if its constituent constructs are 'target', 'parallel', and 'for'.
Definition at line 8105 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target simd directive.
Definition at line 3251 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetSimdDirective | ( | const OMPTargetSimdDirective & | S | ) |
Definition at line 3265 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTaskBasedDirective | ( | const OMPExecutableDirective & | S, |
const RegionCodeGenTy & | BodyGen, | ||
OMPTargetDataInfo & | InputInfo | ||
) |
Definition at line 5047 of file CGStmtOpenMP.cpp.
Referenced by emitTargetCallElse(), emitTargetCallKernelLaunch(), and clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall().
|
static |
Emit device code for the target teams directive.
Definition at line 6824 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDirective | ( | const OMPTargetTeamsDirective & | S | ) |
Definition at line 6838 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target teams distribute directive.
Definition at line 6870 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeDirective | ( | const OMPTargetTeamsDistributeDirective & | S | ) |
Definition at line 6884 of file CGStmtOpenMP.cpp.
|
static |
Definition at line 7127 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForDirective | ( | const OMPTargetTeamsDistributeParallelForDirective & | S | ) |
Definition at line 7143 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target teams distribute parallel for simd directive.
Definition at line 7179 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeParallelForSimdDirective | ( | const OMPTargetTeamsDistributeParallelForSimdDirective & | S | ) |
Definition at line 7195 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target teams distribute simd directive.
Definition at line 6916 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsDistributeSimdDirective | ( | const OMPTargetTeamsDistributeSimdDirective & | S | ) |
Definition at line 6930 of file CGStmtOpenMP.cpp.
|
static |
Emit device code for the target teams loop directive.
Definition at line 8053 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetTeamsGenericLoopDirective | ( | const OMPTargetTeamsGenericLoopDirective & | S | ) |
Definition at line 8042 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTargetUpdateDirective | ( | const OMPTargetUpdateDirective & | S | ) |
Definition at line 7878 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskBasedDirective | ( | const OMPExecutableDirective & | S, |
const OpenMPDirectiveKind | CapturedRegion, | ||
const RegionCodeGenTy & | BodyGen, | ||
const TaskGenTy & | TaskGen, | ||
OMPTaskDataTy & | Data | ||
) |
Definition at line 4630 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskDirective | ( | const OMPTaskDirective & | S | ) |
Definition at line 5281 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskgroupDirective | ( | const OMPTaskgroupDirective & | S | ) |
Definition at line 5344 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskLoopBasedDirective | ( | const OMPLoopDirective & | S | ) |
Definition at line 7641 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskLoopDirective | ( | const OMPTaskLoopDirective & | S | ) |
Definition at line 7803 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskLoopSimdDirective | ( | const OMPTaskLoopSimdDirective & | S | ) |
Definition at line 7809 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskwaitDirective | ( | const OMPTaskwaitDirective & | S | ) |
Definition at line 5332 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTaskyieldDirective | ( | const OMPTaskyieldDirective & | S | ) |
Definition at line 5313 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDirective | ( | const OMPTeamsDirective & | S | ) |
Definition at line 6785 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeDirective | ( | const OMPTeamsDistributeDirective & | S | ) |
Definition at line 6938 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeParallelForDirective | ( | const OMPTeamsDistributeParallelForDirective & | S | ) |
Definition at line 6983 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeParallelForSimdDirective | ( | const OMPTeamsDistributeParallelForSimdDirective & | S | ) |
Definition at line 7006 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsDistributeSimdDirective | ( | const OMPTeamsDistributeSimdDirective & | S | ) |
Definition at line 6961 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTeamsGenericLoopDirective | ( | const OMPTeamsGenericLoopDirective & | S | ) |
Definition at line 7940 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPTileDirective | ( | const OMPTileDirective & | S | ) |
Definition at line 2759 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPUnrollDirective | ( | const OMPUnrollDirective & | S | ) |
Definition at line 2765 of file CGStmtOpenMP.cpp.
void CodeGenFunction::EmitOMPUseDeviceAddrClause | ( | const OMPUseDeviceAddrClause & | C, |
OMPPrivateScope & | PrivateScope, | ||
const llvm::DenseMap< const ValueDecl *, llvm::Value * > | CaptureDeviceAddrMap | ||
) |
Definition at line 7304 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), clang::Type::castAs(), ConvertTypeForMem(), EmitLoadOfPointer(), getBaseDecl(), getContext(), clang::QualType::getNonReferenceType(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::Type::isArrayType(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::Address::withElementType().
void CodeGenFunction::EmitOMPUseDevicePtrClause | ( | const OMPUseDevicePtrClause & | C, |
OMPPrivateScope & | PrivateScope, | ||
const llvm::DenseMap< const ValueDecl *, llvm::Value * > | CaptureDeviceAddrMap | ||
) |
Definition at line 7253 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), ConvertTypeForMem(), getContext(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
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 3285 of file CGStmtOpenMP.cpp.
LValue CodeGenFunction::EmitOpaqueValueLValue | ( | const OpaqueValueExpr * | e | ) |
Definition at line 5419 of file CGExpr.cpp.
References getOrCreateOpaqueLValueMapping(), and clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue().
Referenced by EmitMaterializeTemporaryExpr().
|
inline |
Definition at line 4080 of file CodeGenFunction.h.
Definition at line 223 of file CGGPUBuiltin.cpp.
References CGM, and getTarget().
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 2601 of file CGDecl.cpp.
References clang::CodeGen::ARCImpreciseLifetime, clang::CodeGen::ARCPreciseLifetime, clang::CodeGen::CGFunctionInfo::arguments(), BlockInfo, Builder, clang::Type::castAs(), CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateLoad(), CreateMemTemp(), CurFnInfo, CurFuncIsThunk, clang::Default, clang::QualType::DK_cxx_destructor, clang::QualType::DK_nontrivial_c_struct, EHStack, EmitARCInitWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitAutoVarWithLifetime(), clang::CodeGen::CodeGenModule::EmitNullConstant(), clang::CodeGen::Address::emitRawPointer(), EmitStoreOfScalar(), EmitVarAnnotations(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenFunction::ParamValue::getAnyValue(), getARCCleanupKind(), clang::CodeGen::CodeGenTypeCache::getASTAllocaAddressSpace(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getDebugInfo(), clang::RecordType::getDecl(), clang::CodeGen::CodeGenFunction::ParamValue::getDirectValue(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenFunction::ParamValue::getIndirectAddress(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), getLangOpts(), getLLVMContext(), clang::NamedDecl::getName(), clang::Type::getNullability(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::CodeGen::RawAddress::getPointer(), clang::ASTContext::getPointerType(), clang::QualType::getQualifiers(), clang::ASTContext::getTargetAddressSpace(), getTargetHooks(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::Qualifiers::hasConst(), clang::CodeGenOptions::hasReducedDebugInfo(), hasScalarEvaluationKind(), clang::CodeGen::Address::invalid(), clang::VarDecl::isARCPseudoStrong(), clang::CodeGen::ABIArgInfo::isIndirect(), clang::CodeGen::CodeGenFunction::ParamValue::isIndirect(), clang::CodeGen::Address::isKnownNonNull(), clang::RecordDecl::isParamDestroyedInCallee(), clang::Type::isRecordType(), clang::CodeGen::Address::isValid(), MakeAddrLValue(), clang::VarDecl::needsDestruction(), clang::NonNull, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::opencl_private, pushDestroy(), setBlockContextParameter(), clang::CodeGen::EHScopeStack::stable_begin(), clang::T, clang::ThreadPrivateVar, V, clang::CodeGen::Address::withElementType(), and clang::CodeGen::Address::withPointer().
Referenced by EmitFunctionProlog(), and EmitInlinedInheritingCXXConstructorCall().
LValue CodeGenFunction::EmitPointerToDataMemberBinaryExpr | ( | const BinaryOperator * | E | ) |
Definition at line 6077 of file CGExpr.cpp.
References clang::Type::castAs(), EmitCXXMemberDataPointerAddress(), EmitLValue(), EmitPointerWithAlignment(), EmitScalarExpr(), clang::CodeGen::LValue::getAddress(), clang::BinaryOperator::getLHS(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Expr::getType(), clang::CodeGen::Address::invalid(), and MakeAddrLValue().
Referenced by EmitBinaryOperatorLValue().
Address CodeGenFunction::EmitPointerWithAlignment | ( | const Expr * | Addr, |
LValueBaseInfo * | BaseInfo = nullptr , |
||
TBAAAccessInfo * | TBAAInfo = nullptr , |
||
KnownNonNull_t | IsKnownNonNull = NotKnownNonNull |
||
) |
EmitPointerWithAlignment - Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee.
EmitPointerWithAlignment - Given an expression of pointer type, try to derive a more accurate bound on the alignment of the pointer.
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 1387 of file CGExpr.cpp.
References clang::CodeGen::Address::isKnownNonNull(), and clang::CodeGen::Address::setKnownNonNull().
Referenced by CheckAtomicAlignment(), EmitArraySubscriptExpr(), EmitAtomicCmpXchg128ForMSIntrin(), EmitAtomicExpr(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), EmitCountedByFieldExpr(), EmitCXXDeleteExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewExpr(), EmitCXXPseudoDestructorExpr(), EmitExtVectorElementExpr(), EmitMemberExpr(), EmitNontemporalLoad(), EmitNontemporalStore(), emitOMPArraySectionBase(), EmitPointerToDataMemberBinaryExpr(), EmitPointerWithAlignment(), EmitSystemZIntrinsicWithCC(), EmitUnaryOpLValue(), EmitVAListRef(), and emitWritebackArg().
Definition at line 16789 of file CGBuiltin.cpp.
References clang::Expr::getType(), and ID.
Referenced by EmitTargetArchBuiltinExpr().
LValue CodeGenFunction::EmitPredefinedLValue | ( | const PredefinedExpr * | E | ) |
Definition at line 3269 of file CGExpr.cpp.
References CurCodeDecl, CurFn, clang::PredefinedExpr::getFunctionName(), clang::PredefinedExpr::getIdentKind(), and clang::PredefinedExpr::getIdentKindName().
ComplexPairTy CodeGenFunction::EmitPromotedComplexExpr | ( | const Expr * | E, |
QualType | PromotionType | ||
) |
Definition at line 1166 of file CGExprComplex.cpp.
Definition at line 5537 of file CGExprScalar.cpp.
References clang::QualType::isNull().
ComplexPairTy CodeGenFunction::EmitPromotedValue | ( | ComplexPairTy | result, |
QualType | PromotionType | ||
) |
Definition at line 1121 of file CGExprComplex.cpp.
References Builder, clang::Type::castAs(), ConvertType(), and clang::ComplexType::getElementType().
LValue CodeGenFunction::EmitPseudoObjectLValue | ( | const PseudoObjectExpr * | e | ) |
Definition at line 6252 of file CGExpr.cpp.
References emitPseudoObjectExpr(), and clang::CodeGen::AggValueSlot::ignored().
RValue CodeGenFunction::EmitPseudoObjectRValue | ( | const PseudoObjectExpr * | e, |
AggValueSlot | slot = AggValueSlot::ignored() |
||
) |
Definition at line 6247 of file CGExpr.cpp.
References emitPseudoObjectExpr().
Emits a reference binding to the passed in expression.
Definition at line 626 of file CGExpr.cpp.
References EmitLValue(), EmitTypeCheck(), clang::CodeGen::RValue::get(), clang::Expr::getExprLoc(), clang::CodeGen::LValue::getPointer(), clang::Expr::getType(), clang::Type::isFunctionType(), clang::CodeGen::LValue::isSimple(), sanitizePerformTypeCheck(), and TCK_ReferenceBinding.
Referenced by EmitCallArg(), EmitCXXGlobalVarDeclInit(), and EmitExprAsInit().
llvm::DebugLoc CodeGenFunction::EmitReturnBlock | ( | ) |
Emit the unified return block, trying to avoid its emission when possible.
Definition at line 295 of file CodeGenFunction.cpp.
References Builder, EmitBlock(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), Loc, 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 1457 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 4069 of file CGCall.cpp.
References Builder, createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateLoad(), CurCodeDecl, EmitBlock(), EmitCheck(), EmitCheckSourceLocation(), clang::Decl::getAttr(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::SanitizerSet::has(), clang::CodeGen::Address::invalid(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), ReturnBlock, and SanOpts.
Referenced by EmitFunctionEpilog().
Value * CodeGenFunction::EmitRISCVBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue | ||
) |
Definition at line 24039 of file CGBuiltin.cpp.
References clang::RISCV::FirstRVVBuiltin, clang::ASTContext::GE_Missing_type, clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::CallExpr::getNumArgs(), clang::Expr::getType(), and clang::RISCV::LastRVVBuiltin.
Referenced by EmitTargetArchBuiltinExpr().
Definition at line 2508 of file CGBuiltin.cpp.
References clang::CallExpr::getArg().
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitRuntimeCall | ( | llvm::FunctionCallee | callee, |
ArrayRef< llvm::Value * > | args, | ||
const Twine & | name = "" |
||
) |
llvm::CallInst* clang::CodeGen::CodeGenFunction::EmitRuntimeCall | ( | llvm::FunctionCallee | callee, |
const Twine & | name = "" |
||
) |
Referenced by clang::CodeGen::CodeGenModule::createOpenCLIntToSamplerConversion(), createRuntimeShuffleFunction(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntime::emitCall(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitCaptureStmt(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), clang::CodeGen::CGOpenMPRuntime::emitForOrderedIterationEnd(), clang::CodeGen::CGOpenMPRuntime::emitForStaticFinish(), emitForStaticInitCall(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), EmitObjCAutoreleasePoolPop(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), clang::CodeGen::CGOpenMPRuntime::emitProcBindClause(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFini(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntime::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarInit(), clang::CodeGen::CGOpenMPRuntime::emitUDMapperArrayInitOrDel(), GenerateCXXGlobalInitFunc(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), getEHResumeBlock(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUThreadID(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUWarpSize(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcFreeShared(), and clang::CodeGen::CGOpenMPRuntime::getTaskReductionItem().
llvm::CallBase * CodeGenFunction::EmitRuntimeCallOrInvoke | ( | llvm::FunctionCallee | callee, |
ArrayRef< llvm::Value * > | args, | ||
const Twine & | name = "" |
||
) |
Emits a call or invoke instruction to the given runtime function.
Definition at line 4952 of file CGCall.cpp.
References EmitCallOrInvoke(), clang::CodeGen::CodeGenTypeCache::getRuntimeCC(), and clang::transformer::name().
Referenced by BuildBlockRelease(), EmitObjCAutoreleasePoolPop(), emitRTtypeidCall(), EmitRuntimeCallOrInvoke(), and GenerateCopyHelperFunction().
llvm::CallBase * CodeGenFunction::EmitRuntimeCallOrInvoke | ( | llvm::FunctionCallee | callee, |
const Twine & | name = "" |
||
) |
Emits a call or invoke instruction to the given nullary runtime function.
Definition at line 4945 of file CGCall.cpp.
References EmitRuntimeCallOrInvoke(), and clang::transformer::name().
RValue CodeGenFunction::EmitRValueForField | ( | LValue | LV, |
const FieldDecl * | FD, | ||
SourceLocation | Loc | ||
) |
Definition at line 5452 of file CGExpr.cpp.
References clang::CodeGen::LValue::asAggregateRValue(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLoadOfScalar(), EmitLValueForField(), clang::CodeGen::RValue::get(), clang::CodeGen::RValue::getComplex(), getEvaluationKind(), clang::CodeGen::LValue::getPointer(), clang::ValueDecl::getType(), clang::CodeGen::LValue::isBitField(), clang::Type::isReferenceType(), Loc, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, and clang::CodeGen::TEK_Scalar.
void CodeGenFunction::EmitSanitizerStatReport | ( | llvm::SanitizerStatKind | SSK | ) |
Definition at line 3146 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGen::CodeGenModule::getSanStats().
Referenced by EmitCall(), EmitVTablePtrCheck(), and EmitVTableTypeCheckedLoad().
LValue CodeGenFunction::EmitScalarCompoundAssignWithComplex | ( | const CompoundAssignOperator * | E, |
llvm::Value *& | Result | ||
) |
Definition at line 1533 of file CGExprComplex.cpp.
References getComplexOp(), clang::BinaryOperator::getOpcode(), clang::CodeGen::RValue::getScalarVal(), and clang::interp::Ret().
llvm::Value * CodeGenFunction::emitScalarConstant | ( | const ConstantEmission & | Constant, |
Expr * | E | ||
) |
Definition at line 1831 of file CGExpr.cpp.
References EmitLoadOfLValue(), clang::Expr::getExprLoc(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenFunction::ConstantEmission::getValue(), and clang::CodeGen::CodeGenFunction::ConstantEmission::isReference().
Referenced by tryEmitARCRetainLoadOfScalar().
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 5515 of file CGExprScalar.cpp.
References hasScalarEvaluationKind(), and Loc.
Referenced by convertToComplexValue(), convertToScalarValue(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), emitOMPAtomicCompareExpr(), emitRestoreIP(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), EmitWithOriginalRHSBitfieldAssignment(), EvaluateExprAsBool(), and getPointerAndSize().
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 5505 of file CGExprScalar.cpp.
References clang::Expr::getType(), and hasScalarEvaluationKind().
Referenced by emitAlignedClause(), EmitAnyExpr(), EmitAnyExprToMem(), EmitARCExtendBlockObject(), emitARCRetainCallResult(), EmitARCStoreUnsafeUnretained(), emitARCUnsafeClaimCallResult(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitAtomicCmpXchg128ForMSIntrin(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicExpr(), EmitAtomicInit(), EmitBinaryAtomicPost(), emitBinaryBuiltin(), emitBinaryExpMaybeConstrainedFPBuiltin(), emitBinaryMaybeConstrainedFPBuiltin(), EmitBitTestIntrinsic(), EmitBlockCallExpr(), EmitCallee(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitDeclInit(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), emitDeviceID(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), emitDynCGGroupMem(), EmitExtVectorElementExpr(), emitFPIntBuiltin(), emitFrexpBuiltin(), EmitFunctionProlog(), EmitInitializerForField(), EmitISOVolatileLoad(), EmitISOVolatileStore(), clang::CodeGen::CGOpenMPRuntime::emitMaskedRegion(), EmitMaterializeTemporaryExpr(), EmitMatrixSubscriptExpr(), emitMaybeConstrainedFPToIntRoundBuiltin(), EmitNontemporalStore(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsForTargetDirective(), EmitObjCIsaExpr(), EmitObjCIvarRefLValue(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), emitOMPAtomicCompareExpr(), clang::CodeGen::CGOpenCLRuntime::emitOpenCLEnqueuedBlock(), EmitOverflowCheckedAbs(), EmitPointerToDataMemberBinaryExpr(), EmitPointerWithAlignment(), emitPPCLoadReserveIntrinsic(), emitRestoreIP(), EmitScalarInit(), EmitSystemZIntrinsicWithCC(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitTernaryBuiltin(), emitTernaryMaybeConstrainedFPBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), emitUnaryMaybeConstrainedFPBuiltin(), EmitVariablyModifiedType(), EmitWithOriginalRHSBitfieldAssignment(), EvaluateExprAsBool(), GenerateSEHFilterFunction(), getPointerAndSize(), MakeBinaryAtomicValue(), tryEmitARCRetainLoadOfScalar(), and tryEmitSpecializedAllocInit().
void CodeGenFunction::EmitScalarInit | ( | const Expr * | init, |
const ValueDecl * | D, | ||
LValue | lvalue, | ||
bool | capturedByInit | ||
) |
Definition at line 825 of file CGDecl.cpp.
References clang::CodeGen::ARCImpreciseLifetime, CGM, drillIntoBlockVariable(), EmitARCInitWeak(), EmitARCRelease(), EmitARCRetainAutoreleaseScalarExpr(), EmitARCRetainScalarExpr(), EmitARCStoreWeak(), EmitARCUnsafeUnretainedScalarExpr(), emitBlockByrefAddress(), EmitLoadOfScalar(), EmitNullabilityCheck(), EmitScalarExpr(), EmitStoreOfScalar(), EmitStoreThroughLValue(), 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(), EmitMaterializeTemporaryExpr(), and StoreAnyExprIntoOneUnit().
llvm::Value * CodeGenFunction::EmitScalarOrConstFoldImmArg | ( | unsigned | ICEArguments, |
unsigned | Idx, | ||
const CallExpr * | E | ||
) |
Definition at line 18234 of file CGBuiltin.cpp.
References clang::CallExpr::getArg(), and clang::Expr::getIntegerConstantExpr().
llvm::Value * CodeGenFunction::EmitScalarPrePostIncDec | ( | const UnaryOperator * | E, |
LValue | LV, | ||
bool | isInc, | ||
bool | isPre | ||
) |
Definition at line 5546 of file CGExprScalar.cpp.
Referenced by EmitUnaryOpLValue().
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 1890 of file CGExpr.cpp.
References Builder, CGM, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCheckValue(), End, clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), getLLVMContext(), getRangeForType(), clang::Value::getType(), clang::SanitizerSet::has(), hasBooleanRepresentation(), clang::NSAPI::isObjCBOOLType(), Loc, clang::Min, and SanOpts.
Referenced by EmitLoadOfBitfieldLValue(), and EmitLoadOfScalar().
llvm::Value * CodeGenFunction::EmitSEHAbnormalTermination | ( | ) |
Definition at line 2158 of file CGException.cpp.
References Builder, CurFn, and clang::CodeGen::CodeGenTypeCache::Int32Ty.
void CodeGenFunction::EmitSehCppScopeBegin | ( | ) |
Definition at line 1328 of file CGCleanup.cpp.
References EmitSehScope().
void CodeGenFunction::EmitSehCppScopeEnd | ( | ) |
Definition at line 1339 of file CGCleanup.cpp.
References EmitSehScope().
llvm::Value * CodeGenFunction::EmitSEHExceptionCode | ( | ) |
Definition at line 2153 of file CGException.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), and SEHCodeSlotStack.
void CodeGenFunction::EmitSEHExceptionCodeSave | ( | CodeGenFunction & | ParentCGF, |
llvm::Value * | ParentFP, | ||
llvm::Value * | EntryEBP | ||
) |
Definition at line 2107 of file CGException.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CurFn, getContext(), clang::CodeGen::CodeGenTypeCache::getIntAlign(), getLLVMContext(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntTy, ParentCGF, recoverAddrOfEscapedLocal(), SEHCodeSlotStack, SEHInfo, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
llvm::Value * CodeGenFunction::EmitSEHExceptionInfo | ( | ) |
Definition at line 2144 of file CGException.cpp.
References clang::CodeGen::CodeGenTypeCache::Int8PtrTy, and SEHInfo.
void CodeGenFunction::EmitSEHLeaveStmt | ( | const SEHLeaveStmt & | S | ) |
Definition at line 2281 of file CGException.cpp.
void CodeGenFunction::EmitSehTryScopeBegin | ( | ) |
Definition at line 1349 of file CGCleanup.cpp.
References EmitSehScope().
void CodeGenFunction::EmitSehTryScopeEnd | ( | ) |
Definition at line 1359 of file CGCleanup.cpp.
References EmitSehScope().
void CodeGenFunction::EmitSEHTryStmt | ( | const SEHTryStmt & | S | ) |
Definition at line 1662 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 5515 of file CGExpr.cpp.
References EmitCall(), EmitCallee(), clang::CallExpr::getCallee(), clang::Expr::getType(), and ReturnValue.
Referenced by clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr().
void CodeGenFunction::EmitSimpleOMPExecutableDirective | ( | const OMPExecutableDirective & | D | ) |
Emit simple code for OpenMP directives in Simd-only mode.
Definition at line 8113 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::OMPPrivateScope::addPrivate(), CGM, checkForLastprivateConditionalUpdate(), clang::CodeGen::CGOpenMPRuntime::LastprivateConditionalRAII::disable(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), EmitLValue(), EmitOMPScanDirective(), emitOMPSimdRegion(), EmitStmt(), EmitVarDecl(), clang::CodeGen::LValue::getAddress(), clang::OMPExecutableDirective::getAssociatedStmt(), clang::CapturedStmt::getCapturedStmt(), clang::OMPExecutableDirective::getClausesOfKind(), clang::OMPExecutableDirective::getDirectiveKind(), clang::OMPExecutableDirective::getInnermostCapturedStmt(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::OMPExecutableDirective::hasAssociatedStmt(), clang::VarDecl::hasLocalStorage(), clang::isOpenMPSimdDirective(), clang::isOpenMPTaskingDirective(), and clang::CodeGen::CodeGenFunction::OMPPrivateScope::Privatize().
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 448 of file CGStmt.cpp.
Value * CodeGenFunction::EmitSMELd1St1 | ( | const SVETypeFlags & | TypeFlags, |
llvm::SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 10184 of file CGBuiltin.cpp.
References clang::Function, and getSVEVectorForElementType().
Value * CodeGenFunction::EmitSMELdrStr | ( | const SVETypeFlags & | TypeFlags, |
llvm::SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 10236 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitSMEReadWrite | ( | const SVETypeFlags & | TypeFlags, |
llvm::SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 10214 of file CGBuiltin.cpp.
References clang::Function, clang::SVETypeFlags::isReadZA(), and clang::SVETypeFlags::isWriteZA().
Value * CodeGenFunction::EmitSMEZero | ( | const SVETypeFlags & | TypeFlags, |
llvm::SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 10226 of file CGBuiltin.cpp.
References clang::Function.
void CodeGenFunction::EmitStartEHSpec | ( | const Decl * | D | ) |
EmitStartEHSpec - Emit the start of the exception spec.
Definition at line 473 of file CGException.cpp.
References clang::FunctionProtoType::canThrow(), CGM, clang::CPlusPlus17, clang::CT_Cannot, EHStack, clang::EST_Dynamic, clang::EST_DynamicNone, clang::tooling::Filter, clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::Type::getAs(), clang::TargetInfo::getCXXABI(), clang::CodeGen::CodeGenModule::getDiags(), clang::FunctionDecl::getExceptionSpecSourceRange(), clang::FunctionProtoType::getExceptionSpecType(), clang::FunctionProtoType::getExceptionType(), getLangOpts(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Decl::getLocation(), clang::QualType::getNonReferenceType(), clang::FunctionProtoType::getNumExceptions(), getTarget(), clang::ValueDecl::getType(), clang::QualType::getUnqualifiedType(), clang::LangOptions::hasWasmExceptions(), clang::TargetCXXABI::isMicrosoft(), clang::LangOptionsBase::None, clang::CodeGen::EHScopeStack::pushFilter(), clang::CodeGen::EHScopeStack::pushTerminate(), and clang::DiagnosticsEngine::Report().
Referenced by StartFunction().
void CodeGenFunction::EmitStaticVarDecl | ( | const VarDecl & | D, |
llvm::GlobalValue::LinkageTypes | Linkage | ||
) |
Definition at line 445 of file CGDecl.cpp.
References clang::CodeGen::CodeGenModule::AddGlobalAnnotations(), clang::CodeGen::CodeGenModule::addGlobalIntelFPGAAnnotation(), AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenModule::addUsedGlobal(), clang::CodeGen::CodeGenModule::addUsedOrCompilerUsedGlobal(), CGM, ConvertTypeForMem(), clang::CodeGen::CGDebugInfo::EmitGlobalVariable(), EmitVariablyModifiedType(), clang::CharUnits::getAsAlign(), clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), getLangOpts(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(), clang::CodeGen::CodeGenModule::getSanitizerMetadata(), clang::ValueDecl::getType(), clang::Decl::hasAttr(), clang::CodeGenOptions::hasReducedDebugInfo(), clang::Type::isVariablyModifiedType(), clang::CodeGen::SanitizerMetadata::reportGlobal(), clang::CodeGen::CGDebugInfo::setLocation(), clang::CodeGen::CodeGenModule::setStaticLocalDeclAddress(), and clang::dataflow::var().
Referenced by EmitAutoVarAlloca(), EmitDeclRefLValue(), EmitVarDecl(), clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl(), and clang::CodeGen::CGSYCLRuntime::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 60 of file CGStmt.cpp.
Referenced by EmitConstructorBody(), EmitDestructorBody(), EmitSimpleOMPExecutableDirective(), GenerateBlockFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), and GenerateSEHFinallyFunction().
Definition at line 5838 of file CGExpr.cpp.
References clang::CodeGen::Decl, EmitAnyExprToTemp(), clang::CodeGen::RValue::getAggregateAddress(), clang::Expr::getType(), and MakeAddrLValue().
void CodeGenFunction::EmitStopPoint | ( | const Stmt * | S | ) |
EmitStopPoint - Emit a debug stoppoint if we are emitting debug info.
Definition at line 50 of file CGStmt.cpp.
void CodeGenFunction::EmitStoreOfComplex | ( | ComplexPairTy | V, |
LValue | dest, | ||
bool | isInit | ||
) |
EmitStoreOfComplex - Store a complex number into the specified l-value.
Definition at line 1491 of file CGExprComplex.cpp.
References V.
Referenced by complexTempStructure(), clang::CodeGen::CallArg::copyInto(), EmitComplexPrePostIncDec(), EmitExprAsInit(), EmitFunctionEpilog(), emitGlobalToListCopyFunction(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitListToGlobalCopyFunction(), emitOMPSimpleStore(), 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 4207 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getTBAAAccessInfo().
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), castValueToType(), clang::CodeGen::CallArg::copyInto(), EmitARCStoreAutoreleasing(), EmitARCStoreStrong(), EmitARCStoreUnsafeUnretained(), EmitAtomicExpr(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCXXGlobalVarDeclInit(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), emitFrexpBuiltin(), EmitFunctionEpilog(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitInterWarpCopyFunction(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalFinalUpdate(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), EmitNontemporalStore(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitParmDecl(), EmitScalarInit(), EmitStoreOfMatrixScalar(), EmitStoreOfScalar(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), emitWriteback(), clang::CodeGen::CGOpenMPRuntimeGPU::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 2087 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), EmitAtomicStore(), emitBoolVecConversion(), EmitToMemory(), clang::CodeGen::RValue::get(), clang::Type::getAs(), clang::CodeGen::Address::getBasePointer(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::Address::getElementType(), clang::Value::getType(), clang::Type::isAtomicType(), LValueIsSuitableForInlineAtomic(), clang::CodeGen::LValue::MakeAddr(), Node, clang::CodeGen::NotKnownNonNull, clang::CodeGen::Address::withElementType(), and clang::CodeGen::Address::withPointer().
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 2143 of file CGExpr.cpp.
References EmitStoreOfMatrixScalar(), EmitStoreOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::Type::isConstantMatrixType(), clang::CodeGen::LValue::isNontemporal(), and clang::CodeGen::LValue::isVolatile().
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 2466 of file CGExpr.cpp.
References Builder, CGM, ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitFromMemory(), clang::CodeGen::LValue::getBitFieldAddress(), clang::CodeGen::LValue::getBitFieldInfo(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::Address::getElementType(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::CodeGenModule::getTarget(), clang::CodeGen::LValue::getType(), hasBooleanRepresentation(), isAAPCS(), clang::CodeGen::CGBitFieldInfo::IsSigned, clang::CodeGen::LValue::isVolatileQualified(), clang::CodeGen::CGBitFieldInfo::Offset, Offset, clang::CodeGen::CGBitFieldInfo::Size, clang::CodeGen::CGBitFieldInfo::StorageSize, clang::CodeGen::CGBitFieldInfo::VolatileOffset, and clang::CodeGen::CGBitFieldInfo::VolatileStorageSize.
Referenced by EmitBinaryOperatorLValue().
Definition at line 2544 of file CGExpr.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), getAccessedFieldNo(), clang::Type::getAs(), clang::CodeGen::Address::getElementType(), clang::CodeGen::LValue::getExtVectorAddress(), clang::CodeGen::LValue::getExtVectorElts(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::Type::isVectorType(), 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 2619 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenTypes::getDataLayout(), clang::CodeGen::LValue::getGlobalReg(), clang::CodeGen::LValue::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::Type::isIntegerType(), and clang::Type::isPointerType().
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 2344 of file CGExpr.cpp.
References Builder, clang::Type::castAs(), CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughGlobalRegLValue(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::LValue::getMatrixIdx(), clang::CodeGen::RValue::getScalarVal(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::getVectorAddress(), clang::CodeGen::LValue::getVectorIdx(), clang::CodeGen::LValue::isExtVectorElt(), clang::CodeGen::LValue::isGlobalReg(), clang::CodeGen::LValue::isMatrixElt(), clang::CodeGen::LValue::isSimple(), clang::CodeGen::LValue::isVectorElt(), and clang::CodeGen::LValue::isVolatileQualified().
Referenced by EmitAnyExprToMem(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitExprAsInit(), EmitInitializerForField(), EmitLambdaVLACapture(), EmitOMPAtomicSimpleUpdateExpr(), emitOMPSimpleStore(), EmitScalarInit(), and emitWriteback().
LValue CodeGenFunction::EmitStringLiteralLValue | ( | const StringLiteral * | E | ) |
Definition at line 3259 of file CGExpr.cpp.
References CGM, clang::CodeGen::Decl, clang::CodeGen::CodeGenModule::GetAddrOfConstantStringFromLiteral(), clang::Expr::getType(), and MakeAddrLValue().
Referenced by clang::CodeGen::CGOpenMPRuntime::emitErrorCall().
llvm::Value * CodeGenFunction::EmitSVEAllTruePred | ( | const SVETypeFlags & | TypeFlags | ) |
Definition at line 9750 of file CGBuiltin.cpp.
References clang::Function.
llvm::Value* clang::CodeGen::CodeGenFunction::EmitSVEDupX | ( | llvm::Value * | Scalar | ) |
llvm::Value* clang::CodeGen::CodeGenFunction::EmitSVEDupX | ( | llvm::Value * | Scalar, |
llvm::Type * | Ty | ||
) |
Value * CodeGenFunction::EmitSVEGatherLoad | ( | const SVETypeFlags & | TypeFlags, |
llvm::SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 9800 of file CGBuiltin.cpp.
References clang::Function, and clang::SVETypeFlags::isByteIndexed().
Value * CodeGenFunction::EmitSVEGatherPrefetch | ( | const SVETypeFlags & | TypeFlags, |
SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 9911 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitSVEMaskedLoad | ( | const CallExpr * | , |
llvm::Type * | ReturnTy, | ||
SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | BuiltinID, | ||
bool | IsZExtReturn | ||
) |
Definition at line 10086 of file CGBuiltin.cpp.
References clang::Type::castAs(), clang::CallExpr::getArg(), clang::PointerType::getPointeeType(), and clang::Expr::getType().
Value * CodeGenFunction::EmitSVEMaskedStore | ( | const CallExpr * | , |
SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | BuiltinID | ||
) |
Definition at line 10136 of file CGBuiltin.cpp.
References clang::Type::castAs(), clang::CallExpr::getArg(), clang::PointerType::getPointeeType(), and clang::Expr::getType().
Value * CodeGenFunction::EmitSVEMovl | ( | const SVETypeFlags & | TypeFlags, |
llvm::ArrayRef< llvm::Value * > | Ops, | ||
unsigned | BuiltinID | ||
) |
Definition at line 10058 of file CGBuiltin.cpp.
References clang::Function.
Value * CodeGenFunction::EmitSVEPMull | ( | const SVETypeFlags & | TypeFlags, |
llvm::SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | BuiltinID | ||
) |
Definition at line 10040 of file CGBuiltin.cpp.
References clang::Function, clang::SVETypeFlags::getSplatOperand(), and clang::SVETypeFlags::hasSplatOperand().
Value * CodeGenFunction::EmitSVEPredicateCast | ( | llvm::Value * | Pred, |
llvm::ScalableVectorType * | VTy | ||
) |
Definition at line 9765 of file CGBuiltin.cpp.
References clang::Function, and clang::Value::getType().
Value * CodeGenFunction::EmitSVEPrefetchLoad | ( | const SVETypeFlags & | TypeFlags, |
SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | BuiltinID | ||
) |
Definition at line 10065 of file CGBuiltin.cpp.
References getSVEVectorForElementType().
Value * CodeGenFunction::EmitSVEReinterpret | ( | llvm::Value * | Val, |
llvm::Type * | Ty | ||
) |
Definition at line 10258 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitSVEScatterStore | ( | const SVETypeFlags & | TypeFlags, |
llvm::SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 9854 of file CGBuiltin.cpp.
References clang::Function.
Value * CodeGenFunction::EmitSVEStructLoad | ( | const SVETypeFlags & | TypeFlags, |
SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 9944 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitSVEStructStore | ( | const SVETypeFlags & | TypeFlags, |
SmallVectorImpl< llvm::Value * > & | Ops, | ||
unsigned | IntID | ||
) |
Definition at line 9992 of file CGBuiltin.cpp.
Value * CodeGenFunction::EmitSVETupleCreate | ( | const SVETypeFlags & | TypeFlags, |
llvm::Type * | ReturnType, | ||
ArrayRef< llvm::Value * > | Ops | ||
) |
Definition at line 10323 of file CGBuiltin.cpp.
References clang::SVETypeFlags::isTupleCreate().
Value * CodeGenFunction::EmitSVETupleSetOrGet | ( | const SVETypeFlags & | TypeFlags, |
llvm::Type * | ReturnType, | ||
ArrayRef< llvm::Value * > | Ops | ||
) |
Definition at line 10306 of file CGBuiltin.cpp.
References clang::SVETypeFlags::isTupleGet(), and clang::SVETypeFlags::isTupleSet().
void CodeGenFunction::EmitSwitchStmt | ( | const SwitchStmt & | S | ) |
Definition at line 2109 of file CGStmt.cpp.
llvm::Value * CodeGenFunction::EmitSYCLAnnotationCall | ( | llvm::Function * | AnnotationFn, |
llvm::Value * | AnnotatedVal, | ||
SourceLocation | Location, | ||
const SYCLAddIRAnnotationsMemberAttr * | Attr | ||
) |
Emit a "sycl-properties" annotation call (intrinsic).
Definition at line 2934 of file CodeGenFunction.cpp.
References getContext().
Referenced by EmitFieldSYCLAnnotations().
llvm::Value * CodeGenFunction::EmitSYCLAnnotationCall | ( | llvm::Function * | AnnotationFn, |
llvm::Value * | AnnotatedVal, | ||
SourceLocation | Location, | ||
llvm::SmallVectorImpl< std::pair< std::string, std::string >> & | Pair | ||
) |
Definition at line 2945 of file CodeGenFunction.cpp.
References Builder, CGM, clang::CodeGen::CodeGenTypeCache::ConstGlobalsPtrTy, clang::CodeGen::CodeGenModule::EmitAnnotationLineNo(), clang::CodeGen::CodeGenModule::EmitAnnotationString(), clang::CodeGen::CodeGenModule::EmitAnnotationUnit(), and clang::CodeGen::CodeGenModule::EmitSYCLAnnotationArgs().
Definition at line 670 of file CGExprCXX.cpp.
References EmitNullInitialization(), EmitSynthesizedCXXCopyCtorCall(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::Expr::getType(), and clang::CXXConstructExpr::requiresZeroInitialization().
Referenced by GenerateCopyHelperFunction().
void CodeGenFunction::EmitSynthesizedCXXCopyCtorCall | ( | const CXXConstructorDecl * | D, |
Address | This, | ||
Address | Src, | ||
const CXXConstructExpr * | E | ||
) |
Definition at line 2394 of file CGClass.cpp.
References clang::CXXConstructExpr::arguments(), Builder, clang::Type::castAs(), CGM, clang::CodeGen::CodeGenTypes::ConvertType(), clang::Ctor_Complete, EmitCallArgs(), EmitCXXConstructorCall(), clang::CodeGen::RValue::get(), getAsNaturalPointerTo(), clang::CXXConstructExpr::getConstructor(), clang::Expr::getExprLoc(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::AggValueSlot::MayOverlap, clang::FunctionProtoType::param_type_begin(), and clang::interp::This().
Referenced by EmitSynthesizedCXXCopyCtor().
Definition at line 19194 of file CGBuiltin.cpp.
References clang::Function, and clang::CallExpr::getArg().
Referenced by EmitTargetArchBuiltinExpr().
Value * CodeGenFunction::EmitTargetBuiltinExpr | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
ReturnValueSlot | ReturnValue | ||
) |
EmitTargetBuiltinExpr - Emit the given builtin call.
Returns 0 if the call is unhandled by the current target.
Definition at line 6285 of file CGBuiltin.cpp.
References BuiltinInfo, and EmitTargetArchBuiltinExpr().
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 2015 of file CGExpr.cpp.
References Builder, ConvertTypeForMem(), getContext(), clang::Value::getType(), getTypeSize(), and hasBooleanRepresentation().
Referenced by EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), EmitNontemporalStore(), 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 3873 of file CGExpr.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), and clang::CodeGenOptions::TrapFuncName.
Referenced by EmitCXXThrowExpr(), EmitDestructorBody(), and GenerateCode().
void CodeGenFunction::EmitTrapCheck | ( | llvm::Value * | Checked, |
SanitizerHandler | CheckHandlerID | ||
) |
Create a basic block that will call the trap intrinsic, and emit a conditional branch to it, for the -ftrapv checks.
Definition at line 3829 of file CGExpr.cpp.
References Builder, CGM, ClSanitizeDebugDeoptimization(), createBasicBlock(), CurCodeDecl, EmitBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), clang::Decl::hasAttr(), clang::CodeGen::CodeGenTypeCache::Int8Ty, and clang::CodeGenOptions::TrapFuncName.
Referenced by EmitCfiCheckFail(), EmitCheck(), EmitOverflowCheckedAbs(), and EmitVTablePtrCheck().
|
inline |
Definition at line 3280 of file CodeGenFunction.h.
References clang::CodeGen::Address::emitRawPointer(), EmitTypeCheck(), Loc, and sanitizePerformTypeCheck().
void CodeGenFunction::EmitTypeCheck | ( | TypeCheckKind | TCK, |
SourceLocation | Loc, | ||
llvm::Value * | V, | ||
QualType | Type, | ||
CharUnits | Alignment = CharUnits::Zero() , |
||
SanitizerSet | SkippedChecks = SanitizerSet() , |
||
llvm::Value * | ArraySize = nullptr |
||
) |
Emit a check that V
is the address of storage of the appropriate size and alignment for an object of type Type
(or if ArraySize is provided, for an array of that bound).
Definition at line 686 of file CGExpr.cpp.
References Builder, CGM, clang::NoSanitizeList::containsType(), clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::CreateRuntimeVariable(), EmitBlock(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), emitHash16Bytes(), clang::CodeGen::CodeGenModule::GetAddrOfRTTIDescriptor(), clang::CharUnits::getAsMaybeAlign(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenModule::getMinimumObjectSize(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::ASTContext::getNoSanitizeList(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CharUnits::getQuantity(), clang::QualType::getUnqualifiedType(), clang::SanitizerSet::has(), clang::hash_value(), clang::CodeGen::CodeGenTypeCache::Int64Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, clang::Type::isIncompleteType(), isNullPointerAllowed(), clang::QualType::isVolatileQualified(), isVptrCheckRequired(), Loc, clang::MangleContext::mangleCXXRTTI(), clang::Min, sanitizePerformTypeCheck(), and SanOpts.
|
inline |
Definition at line 3271 of file CodeGenFunction.h.
References clang::CodeGen::LValue::emitRawPointer(), clang::CodeGen::LValue::getAlignment(), Loc, and sanitizePerformTypeCheck().
Referenced by EmitCastLValue(), EmitCheckedLValue(), EmitCXXConstructorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXNewExpr(), EmitDynamicCast(), EmitMemberExpr(), EmitObjectDelete(), EmitReferenceBindingToExpr(), EmitTypeCheck(), EmitTypeidFromVTable(), GetAddressOfBaseClass(), 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 2737 of file CGClass.cpp.
References clang::CodeGen::CodeGenModule::AlwaysHasLTOVisibilityPublic(), Builder, CFITCK_VCall, CGM, clang::CodeGen::CodeGenModule::CreateMetadataIdentifierForType(), EmitVTablePtrCheckForCall(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::TypeDecl::getTypeForDecl(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenModule::HasHiddenLTOVisibility(), ID, Loc, and SanOpts.
LValue CodeGenFunction::EmitUnaryOpLValue | ( | const UnaryOperator * | E | ) |
Definition at line 3192 of file CGExpr.cpp.
References clang::Qualifiers::addQualifiers(), clang::Type::castAs(), CGM, emitAddrOfImagComponent(), emitAddrOfRealComponent(), EmitComplexPrePostIncDec(), EmitLValue(), EmitPointerWithAlignment(), EmitScalarPrePostIncDec(), clang::CodeGen::LValue::getAddress(), clang::QualType::getAddressSpace(), clang::CodeGen::LValue::getBaseInfo(), clang::ASTContext::getCanonicalType(), getContext(), clang::CodeGen::Address::getElementType(), getLangOpts(), clang::UnaryOperator::getOpcode(), clang::Type::getPointeeType(), clang::CodeGen::LValue::getQuals(), clang::UnaryOperator::getSubExpr(), clang::CodeGen::CodeGenModule::getTBAAInfoForSubobject(), clang::Expr::getType(), clang::CodeGen::LValue::getType(), clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::Expr::isOBJCGCCandidate(), clang::CodeGen::LValue::isObjCWeak(), clang::CodeGen::LValue::isSimple(), MakeAddrLValue(), clang::LangOptionsBase::NonGC, clang::Qualifiers::setAddressSpace(), clang::CodeGen::LValue::setNonGC(), and clang::T.
ComplexPairTy CodeGenFunction::EmitUnPromotedValue | ( | ComplexPairTy | result, |
QualType | PromotionType | ||
) |
Definition at line 1108 of file CGExprComplex.cpp.
References Builder, clang::Type::castAs(), ConvertType(), and clang::ComplexType::getElementType().
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 3818 of file CGExpr.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), clang::SanitizerSet::has(), Loc, and SanOpts.
Referenced by EmitCall(), and EmitFunctionEpilog().
EmitUnsupportedLValue - Emit a dummy l-value using the type of E and issue an ErrorUnsupported style diagnostic (using the provided Name).
Definition at line 1436 of file CGExpr.cpp.
Referenced by EmitCastLValue(), and 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 1430 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 6098 of file CGCall.cpp.
References CGM, clang::CodeGen::ABIInfo::EmitMSVAArg(), EmitMSVAListRef(), clang::CodeGen::ABIInfo::EmitVAArg(), EmitVAListRef(), clang::CodeGen::CodeGenTypes::getABIInfo(), clang::VAArgExpr::getSubExpr(), clang::Expr::getType(), clang::CodeGen::CodeGenModule::getTypes(), and clang::VAArgExpr::isMicrosoftABI().
Definition at line 5735 of file CGExpr.cpp.
References EmitAggExprToLValue().
Definition at line 2773 of file CodeGenFunction.cpp.
References EmitLValue(), EmitPointerWithAlignment(), clang::CodeGen::LValue::getAddress(), and getContext().
Referenced by EmitVAArg().
void CodeGenFunction::EmitVarAnnotations | ( | const VarDecl * | D, |
llvm::Value * | V | ||
) |
Emit local annotations for the local variable V, declared by D.
Definition at line 2894 of file CodeGenFunction.cpp.
References CGM, EmitAnnotationCall(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::Decl::specific_attrs(), and V.
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 193 of file CGDecl.cpp.
References CGM, EmitAutoVarDecl(), EmitStaticVarDecl(), clang::CodeGen::CGOpenCLRuntime::EmitWorkGroupLocalVarDecl(), clang::CodeGen::CGSYCLRuntime::emitWorkGroupLocalVarDecl(), clang::QualType::getAddressSpace(), clang::Decl::getAttr(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::VarDecl::getStorageDuration(), clang::CodeGen::CodeGenModule::getSYCLRuntime(), clang::ValueDecl::getType(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), clang::Type::isSamplerT(), clang::opencl_local, and clang::SD_Automatic.
Referenced by EmitDecl(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), EmitOMPHelperVar(), EmitSimpleOMPExecutableDirective(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), getNumThreads(), and clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective().
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 2615 of file CodeGenFunction.cpp.
References Builder, EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitIgnoredExpr(), EmitScalarExpr(), EnsureInsertPoint(), getContext(), clang::ArrayType::getElementType(), clang::VariableArrayType::getSizeExpr(), clang::Type::getTypeClass(), clang::SanitizerSet::has(), clang::Type::isSignedIntegerType(), Paren, SanOpts, clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::ast_matchers::type.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitAutoVarAlloca(), EmitCompoundLiteralLValue(), EmitDecl(), clang::CodeGen::CodeGenModule::EmitExplicitCastExprType(), EmitStaticVarDecl(), and StartFunction().
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 874 of file CGBuiltin.cpp.
References ID.
Emit assumption that vptr load == global vtable.
Definition at line 2365 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CodeGenFunction::VPtr::Base, CGM, clang::BaseSubobject::getBaseOffset(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CGCXXABI::getVTableAddressPoint(), GetVTablePtr(), clang::CharUnits::isZero(), clang::CodeGen::CodeGenFunction::VPtr::NearestVBase, clang::interp::This(), and clang::CodeGen::CodeGenFunction::VPtr::VTableClass.
Referenced by EmitVTableAssumptionLoads().
void CodeGenFunction::EmitVTableAssumptionLoads | ( | const CXXRecordDecl * | ClassDecl, |
Address | This | ||
) |
Emit assumption load for all bases.
Requires to be called only on most-derived class and not under construction of the object.
Definition at line 2386 of file CGClass.cpp.
References CGM, clang::CodeGen::CGCXXABI::doStructorsInitializeVPtrs(), EmitVTableAssumptionLoad(), clang::CodeGen::CodeGenModule::getCXXABI(), getVTablePointers(), and clang::interp::This().
Referenced by EmitCXXConstructorCall().
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 2819 of file CGClass.cpp.
References Builder, CFITCK_DerivedCast, CFITCK_ICall, CFITCK_NVCall, CFITCK_NVMFCall, CFITCK_UnrelatedCast, CFITCK_VCall, CFITCK_VMFCall, CGM, clang::CodeGen::CodeGenModule::CreateCrossDsoCfiTypeId(), clang::CodeGen::CodeGenModule::CreateMetadataIdentifierForType(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitSanitizerStatReport(), EmitTrapCheck(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getIntrinsic(), getLLVMContext(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::NamedDecl::getQualifiedNameAsString(), clang::TypeDecl::getTypeForDecl(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenModule::HasHiddenLTOVisibility(), clang::CodeGen::CodeGenTypeCache::Int8Ty, Loc, clang::CodeGenOptions::SanitizeTrap, and clang::TypeName.
Referenced by EmitVTablePtrCheckForCall(), and EmitVTablePtrCheckForCast().
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 2764 of file CGClass.cpp.
References EmitVTablePtrCheck(), clang::SanitizerSet::has(), LeastDerivedClassWithSameLayout(), Loc, and SanOpts.
Referenced by EmitTypeMetadataCodeForVCall().
void CodeGenFunction::EmitVTablePtrCheckForCast | ( | QualType | T, |
Address | Derived, | ||
bool | MayBeNull, | ||
CFITypeCheckKind | TCK, | ||
SourceLocation | Loc | ||
) |
Derived is the presumed address of an object of type T after a cast.
If T is a polymorphic class type, emit a check that the virtual table for Derived belongs to a class derived from T.
Definition at line 2774 of file CGClass.cpp.
References Builder, CGM, clang::CPlusPlus, createBasicBlock(), EmitBlock(), clang::CodeGen::Address::emitRawPointer(), EmitVTablePtrCheck(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getCXXABI(), getLangOpts(), clang::SanitizerSet::has(), clang::TagDecl::isCompleteDefinition(), clang::CXXRecordDecl::isDynamicClass(), LeastDerivedClassWithSameLayout(), clang::CodeGen::CGCXXABI::LoadVTablePtr(), Loc, SanOpts, and clang::T.
Referenced by EmitCastLValue(), and EmitPointerWithAlignment().
llvm::Value * CodeGenFunction::EmitVTableTypeCheckedLoad | ( | const CXXRecordDecl * | RD, |
llvm::Value * | VTable, | ||
llvm::Type * | VTableTy, | ||
uint64_t | VTableByteOffset | ||
) |
Emit a type checked load from the given vtable.
Definition at line 2909 of file CGClass.cpp.
References Builder, CGM, clang::CodeGen::CodeGenModule::CreateMetadataIdentifierForType(), EmitCheck(), EmitSanitizerStatReport(), getContext(), clang::CodeGen::CodeGenModule::getIntrinsic(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::NamedDecl::getQualifiedNameAsString(), clang::TypeDecl::getTypeForDecl(), clang::SanitizerSet::has(), SanOpts, and clang::TypeName.
Definition at line 22805 of file CGBuiltin.cpp.
References clang::Function, clang::CallExpr::getArg(), and clang::Expr::getType().
Referenced by EmitTargetArchBuiltinExpr().
void CodeGenFunction::EmitWhileStmt | ( | const WhileStmt & | S, |
ArrayRef< const Attr * > | Attrs = std::nullopt |
||
) |
Definition at line 974 of file CGStmt.cpp.
llvm::Value * CodeGenFunction::EmitWithOriginalRHSBitfieldAssignment | ( | const BinaryOperator * | E, |
llvm::Value ** | Previous, | ||
QualType * | SrcType | ||
) |
Retrieve the implicit cast expression of the rhs in a binary operator expression by passing pointers to Value and QualType This is used for implicit bitfield conversion checks, which must compare with the value before potential truncation.
Definition at line 4771 of file CGExprScalar.cpp.
References EmitScalarConversion(), EmitScalarExpr(), clang::BinaryOperator::getRHS(), and Previous.
Referenced by EmitBinaryOperatorLValue().
Definition at line 14314 of file CGBuiltin.cpp.
References clang::ASTContext::GE_None, clang::CallExpr::getNumArgs(), ID, and translateX86ToMsvcIntrin().
Referenced by EmitTargetArchBuiltinExpr().
void CodeGenFunction::EmitX86MultiVersionResolver | ( | llvm::Function * | Resolver, |
ArrayRef< MultiVersionResolverOption > | Options | ||
) |
Definition at line 3292 of file CodeGenFunction.cpp.
|
inline |
Definition at line 2167 of file CodeGenFunction.h.
|
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 2666 of file CodeGenFunction.h.
References createBasicBlock(), EmitBlock(), and HaveInsertPoint().
Referenced by EmitAutoVarAlloca(), EmitAutoVarInit(), EmitBinaryOperatorLValue(), EmitCall(), EmitVariablyModifiedType(), and clang::CodeGen::CodeGenFunction::StmtExprEvaluation::~StmtExprEvaluation().
void CodeGenFunction::enterByrefCleanup | ( | CleanupKind | Kind, |
Address | Addr, | ||
BlockFieldFlags | Flags, | ||
bool | LoadBlockVarAddr, | ||
bool | CanThrow | ||
) |
Enter a cleanup to destroy a __block variable.
Note that this cleanup should be a no-op if the variable hasn't left the stack yet; if a cleanup is required for the variable itself, that needs to be done externally.
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 2782 of file CGBlocks.cpp.
References CanThrow(), and EHStack.
Referenced by EmitAutoVarCleanups(), and pushCaptureCleanup().
void CodeGenFunction::EnterCXXTryStmt | ( | const CXXTryStmt & | S, |
bool | IsFnTryBlock = false |
||
) |
Definition at line 635 of file CGException.cpp.
Referenced by EmitConstructorBody(), and EmitDestructorBody().
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 1845 of file CGClass.cpp.
References clang::CXXRecordDecl::bases(), CGM, clang::Dtor_Base, clang::Dtor_Complete, clang::Dtor_Deleting, clang::CodeGen::EHCleanup, EHStack, EmitBranchThroughCleanup(), EmitDeleteCall(), clang::RecordDecl::fields(), getCleanupKind(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::RecordType::getDecl(), getDestroyer(), clang::CXXRecordDecl::getNumVBases(), clang::CXXDestructorDecl::getOperatorDelete(), clang::CXXMethodDecl::getParent(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::RecordDecl::isAnonymousStructOrUnion(), clang::FunctionDecl::isDestroyingOperatorDelete(), clang::CXXRecordDecl::isEmpty(), clang::CXXRecordDecl::isPolymorphic(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CodeGen::NormalAndEHCleanup, ReturnBlock, SanOpts, clang::ast_matchers::type, and clang::CXXRecordDecl::vbases().
Referenced by EmitDestructorBody().
void CodeGenFunction::EnterSEHTryStmt | ( | const SEHTryStmt & | S | ) |
Definition at line 2170 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 2325 of file CodeGenFunction.cpp.
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 184 of file CGExpr.cpp.
References clang::ASTContext::BoolTy, CGM, EmitComplexExpr(), EmitComplexToScalarConversion(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), EmitScalarConversion(), EmitScalarExpr(), clang::Type::getAs(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::Expr::getExprLoc(), clang::Expr::getType(), clang::Type::isAnyComplexType(), Loc, and clang::CodeGen::CodeGenPGO::setCurrentStmt().
Referenced by EmitBranchOnBoolExpr(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), getNumThreads(), and clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective().
void CodeGenFunction::ExitCXXTryStmt | ( | const CXXTryStmt & | S, |
bool | IsFnTryBlock = false |
||
) |
Definition at line 1211 of file CGException.cpp.
Referenced by EmitConstructorBody(), and EmitDestructorBody().
void CodeGenFunction::ExitSEHTryStmt | ( | const SEHTryStmt & | S | ) |
Definition at line 2209 of file CGException.cpp.
Find the FieldDecl specified in a FAM's "counted_by" attribute.
Returns nullptr
if either the attribute or the field doesn't exist.
Definition at line 1152 of file CGExpr.cpp.
References clang::Type::getAs(), and clang::ValueDecl::getType().
Referenced by EmitArraySubscriptExpr().
const FieldDecl * CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset | ( | ASTContext & | Ctx, |
const RecordDecl * | RD, | ||
const FieldDecl * | FAMDecl, | ||
uint64_t & | Offset | ||
) |
Definition at line 905 of file CGBuiltin.cpp.
References clang::RecordDecl::fields(), clang::Type::getAsRecordDecl(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getFieldOffset(), clang::Decl::isFlexibleArrayMemberLike(), clang::Decl::isImplicit(), clang::Type::isRecordType(), clang::TagDecl::isUnion(), and Offset.
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 350 of file CodeGenFunction.cpp.
References AllocaInsertPt, Builder, CGM, clang::CodeGen::EHScopeStack::containsOnlyLifetimeMarkers(), ConvergenceTokenStack, clang::CodeGen::ApplyDebugLocation::CreateDefaultArtificial(), CurCodeDecl, CurFn, CurFnInfo, DeferredDeactivationCleanupStack, EHResumeBlock, EHStack, EmitBlock(), EmitEndEHSpec(), EmitFunctionEpilog(), EmitIfUsed(), clang::CodeGen::Address::emitRawPointer(), EmitReturnBlock(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::CodeGenFunction::JumpDest::getBlock(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), getLangOpts(), getLLVMContext(), clang::CodeGen::CGFunctionInfo::getMaxVectorWidth(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::RawAddress::getPointer(), clang::ASTContext::getTargetInfo(), clang::TargetInfo::getVScaleRange(), clang::CodeGen::Address::invalid(), isCoroutine(), clang::CodeGen::RawAddress::isValid(), clang::CodeGen::Address::isValid(), clang::CodeGen::CodeGenFunction::JumpDest::isValid(), LifetimeExtendedCleanupStack, Loc, max(), NormalCleanupDest, PopCleanupBlocks(), PrologueCleanupDepth, ReturnBlock, ReturnValue, clang::CodeGen::CodeGenModule::shouldEmitConvergenceTokens(), ShouldInstrumentFunction(), and clang::CodeGen::EHScopeStack::stable_begin().
Referenced by createAtExitStub(), createTLSAtExitStub(), EmitCfiCheckFail(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), emitShuffleAndReduceFunction(), FinishThunk(), GenerateBlockFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCGetter(), GenerateObjCMethod(), GenerateObjCSetter(), GenerateSEHFilterFunction(), and GenerateSEHFinallyFunction().
void CodeGenFunction::FinishThunk | ( | ) |
Definition at line 293 of file CGVTables.cpp.
References CurCodeDecl, CurFuncDecl, and FinishFunction().
Referenced by EmitCallAndReturnForThunk(), and EmitMustTailThunk().
Value * CodeGenFunction::FormSVEBuiltinResult | ( | llvm::Value * | Call | ) |
FormSVEBuiltinResult - Returns the struct of scalable vectors as a wider vector.
It extracts the scalable vector from the struct and inserts into the wider vector. This avoids the error when allocating space in llvm for struct of scalable vectors if a function returns struct.
Definition at line 10339 of file CGBuiltin.cpp.
References clang::interp::Ret().
llvm::Function * CodeGenFunction::generateAwaitSuspendWrapper | ( | Twine const & | CoroName, |
Twine const & | SuspendPointName, | ||
CoroutineSuspendExpr const & | S | ||
) |
Definition at line 414 of file CGCoroutine.cpp.
llvm::Function * CodeGenFunction::GenerateBlockFunction | ( | GlobalDecl | GD, |
const CGBlockInfo & | Info, | ||
const DeclMapTy & | ldm, | ||
bool | IsLambdaConversionToBlock, | ||
bool | BuildGlobalBlock | ||
) |
Definition at line 1414 of file CGBlocks.cpp.
References clang::interp::align(), clang::CodeGen::CodeGenTypes::arrangeBlockFunctionDeclaration(), clang::CodeGen::CodeGenPGO::assignRegionCounters(), clang::ast_matchers::blockDecl, BlockInfo, BlockPointer, Builder, buildGlobalBlock(), CGM, clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGBuilderTy::CreateLoad(), CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), CreateTempAlloca(), CurGD, clang::CodeGen::CGBlockInfo::CXXThisIndex, EmitLambdaBlockInvokeBody(), clang::CodeGen::Address::emitRawPointer(), EmitStmt(), FinishFunction(), clang::IdentifierTable::get(), clang::Stmt::getBeginLoc(), clang::CodeGen::CGBlockInfo::getBlockDecl(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::CodeGen::CodeGenModule::getBlockMangledName(), clang::BlockExpr::getBody(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CGBlockInfo::Capture::getConstant(), getContext(), clang::CodeGen::CodeGenModule::getContext(), getDebugInfo(), clang::ASTContext::getDeclAlign(), clang::BlockExpr::getEndLoc(), clang::BlockExpr::getFunctionType(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CGOpenCLRuntime::getGenericVoidPointerType(), clang::ASTContext::getLangOpts(), getLangOpts(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::CodeGenModule::getOpenCLRuntime(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::ASTContext::getPointerType(), clang::FunctionType::getReturnType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGenOptions::hasReducedDebugInfo(), clang::ASTContext::Idents, incrementProfileCounter(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), LoadBlockStruct(), clang::transformer::name(), clang::ObjCSelf, clang::OpenCL, clang::opencl_generic, clang::CodeGen::CodeGenModule::ReturnSlotInterferesWithArgs(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::CodeGen::CGBlockInfo::UsesStret, clang::dataflow::var(), clang::ASTContext::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
llvm::Function * CodeGenFunction::generateBuiltinOSLogHelperFunction | ( | const analyze_os_log::OSLogBufferLayout & | Layout, |
CharUnits | BufferAlignment | ||
) |
Definition at line 2143 of file CGBuiltin.cpp.
Address CodeGenFunction::GenerateCapturedStmtArgument | ( | const CapturedStmt & | S | ) |
Definition at line 3124 of file CGStmt.cpp.
llvm::Function * CodeGenFunction::GenerateCapturedStmtFunction | ( | const CapturedStmt & | S | ) |
Creates the outlined function for a CapturedStmt.
Definition at line 3131 of file CGStmt.cpp.
void CodeGenFunction::GenerateCode | ( | GlobalDecl | GD, |
llvm::Function * | Fn, | ||
const CGFunctionInfo & | FnInfo | ||
) |
Definition at line 1644 of file CodeGenFunction.cpp.
References clang::CodeGen::CodeGenPGO::assignRegionCounters(), Builder, BuildFunctionArgList(), Bypasses, CGM, clang::CodeGen::TargetCodeGenInfo::checkFunctionABI(), checkIfFunctionMustProgress(), clang::CPlusPlus, clang::CUDA, CurFn, CurGD, EmitCheck(), EmitCheckSourceLocation(), EmitConstructorBody(), EmitDestructorBody(), clang::CodeGen::CGCUDARuntime::emitDeviceStub(), EmitFunctionBody(), emitImplicitAssignmentOperatorBody(), EmitLambdaInAllocaCallOpBody(), EmitLambdaStaticInvokeBody(), EmitTrapCall(), FinishFunction(), FnArgs, clang::Decl::getASTContext(), clang::SourceRange::getBegin(), clang::FunctionDecl::getBody(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getCUDARuntime(), clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenModule::getDiags(), clang::SourceRange::getEnd(), clang::SyclOptReportHandler::GetInfo(), getLangOpts(), clang::Decl::getLocation(), clang::Redeclarable< decl_type >::getPreviousDecl(), clang::FunctionDecl::getReturnType(), clang::DiagnosticsEngine::getSYCLOptReport(), clang::CodeGen::CodeGenModule::getTargetCodeGenInfo(), clang::FunctionDecl::getTemplateInstantiationPattern(), clang::SanitizerSet::has(), clang::Decl::hasAttr(), clang::FunctionDecl::hasImplicitReturnZero(), clang::SyclOptReportHandler::HasOptReportInfo(), clang::CodeGen::VarBypassDetector::Init(), clang::FunctionDecl::isDefaulted(), clang::CodeGen::CGFunctionInfo::isDelegateCall(), clang::FunctionDecl::isInlineBuiltinDeclaration(), clang::isLambdaCallOperator(), clang::Type::isVoidType(), Loc, clang::CodeGen::CodeGenModule::MayDropFunctionReturn(), clang::CodeGen::noSystemDebugInfo(), clang::FunctionDecl::parameters(), SanOpts, SawAsmBlock, SourceLocToDebugLoc(), StartFunction(), and TryMarkNoThrow().
Referenced by clang::CodeGen::CodeGenModule::codegenCXXStructor(), and EmitLambdaInAllocaImplFn().
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 1869 of file CGBlocks.cpp.
References clang::CodeGen::ARCStrong, clang::CodeGen::ARCWeak, clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CGBlockInfo::BlockAlign, clang::CodeGen::BlockObject, Builder, callCStructCopyConstructor(), clang::CodeGen::CGBlockInfo::Capture::Cap, clang::CodeGen::CGBlockInfo::CapturesNonExternalType, CGM, clang::CodeGen::CGBlockInfo::Capture::CopyFlags, clang::CodeGen::CGBlockInfo::Capture::CopyKind, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CXXRecord, EmitARCCopyWeak(), EmitARCRetainNonBlock(), EmitARCStoreStrongCall(), EmitNounwindRuntimeCall(), clang::CodeGen::Address::emitRawPointer(), EmitRuntimeCallOrInvoke(), EmitSynthesizedCXXCopyCtor(), FinishFunction(), clang::Func, GetAddrOfLocalVar(), clang::CodeGen::Address::getBasePointer(), clang::CodeGen::BlockFieldFlags::getBitMask(), clang::CodeGen::CodeGenModule::getBlockObjectAssign(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getCopyDestroyHelperFuncName(), clang::BlockDecl::Capture::getCopyExpr(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::CodeGen::CodeGenModule::getModule(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::BlockDecl::Capture::getVariable(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::BlockDecl::Capture::isByRef(), clang::CodeGen::CGBlockInfo::Capture::isConstantOrTrivial(), clang::QualType::isDestructedType(), MakeAddrLValue(), needsEHCleanup(), clang::CodeGen::None, clang::CodeGen::NonTrivialCStruct, clang::Other, pushCaptureCleanup(), setBlockHelperAttributesVisibility(), clang::CodeGen::CGBlockInfo::SortedCaptures, StartFunction(), clang::CodeGen::CGBlockInfo::StructureType, and clang::CodeGen::CodeGenModule::supportsCOMDAT().
Referenced by buildCopyHelper().
void CodeGenFunction::GenerateCXXGlobalCleanUpFunc | ( | llvm::Function * | Fn, |
ArrayRef< std::tuple< llvm::FunctionType *, llvm::WeakTrackingVH, llvm::Constant * >> | DtorsOrStermFinalizers | ||
) |
GenerateCXXGlobalCleanUpFunc - Generates code for cleaning up global variables.
Definition at line 1105 of file CGDeclCXX.cpp.
References Builder, CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), FinishFunction(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getTypes(), StartFunction(), clang::CodeGen::CGCXXABI::useSinitAndSterm(), and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::GenerateCXXGlobalInitFunc | ( | llvm::Function * | Fn, |
ArrayRef< llvm::Function * > | CXXThreadLocals, | ||
ConstantAddress | Guard = ConstantAddress::invalid() |
||
) |
GenerateCXXGlobalInitFunc - Generates code for initializing global variables.
Definition at line 1047 of file CGDeclCXX.cpp.
References Builder, CGM, clang::CPlusPlus, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), createBasicBlock(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), clang::CodeGen::CGBuilderTy::CreateIsNull(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitBlock(), EmitCXXGuardedInitBranch(), EmitInvariantStart(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolPush(), EmitRuntimeCall(), FinishFunction(), clang::CharUnits::fromQuantity(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getLangOpts(), clang::CodeGen::ConstantAddress::getPointer(), getTypes(), clang::CodeGen::RawAddress::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 1009 of file CGDeclCXX.cpp.
References clang::CodeGen::CGHLSLRuntime::annotateHLSLResource(), CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), FinishFunction(), clang::DeclaratorDecl::getBeginLoc(), getContext(), clang::CodeGen::CodeGenModule::getHLSLRuntime(), getLangOpts(), clang::VarDecl::getTemplateSpecializationKind(), clang::VarDecl::getTLSKind(), getTypes(), clang::Decl::hasAttr(), clang::HLSL, clang::Initializer, clang::isTemplateInstantiation(), clang::CodeGen::noSystemDebugInfo(), StartFunction(), clang::VarDecl::TLS_Dynamic, 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 1145 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CodeGenModule::CreateGlobalInitOrCleanUpFunction(), emitDestroy(), FinishFunction(), clang::DeclaratorDecl::getBeginLoc(), getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getTypes(), clang::GlobalArrayDestructor, clang::Other, StartFunction(), clang::ast_matchers::type, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Referenced by EmitDeclDestroy(), and pushTemporaryCleanup().
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 2058 of file CGBlocks.cpp.
References clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), clang::CodeGen::CGBlockInfo::BlockAlign, Builder, clang::CodeGen::CGBlockInfo::Capture::Cap, clang::CodeGen::CGBlockInfo::CapturesNonExternalType, CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CodeGen::CGBlockInfo::Capture::DisposeFlags, clang::CodeGen::CGBlockInfo::Capture::DisposeKind, FinishFunction(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::ForceCleanup(), clang::Func, GetAddrOfLocalVar(), getContext(), getCopyDestroyHelperFuncName(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::CodeGen::CodeGenModule::getModule(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::BlockDecl::Capture::getVariable(), clang::CodeGen::CGBlockInfo::Capture::isConstantOrTrivial(), markAsIgnoreThreadCheckingAtRuntime(), clang::Other, pushCaptureCleanup(), setBlockHelperAttributesVisibility(), clang::CodeGen::CGBlockInfo::SortedCaptures, StartFunction(), clang::CodeGen::CGBlockInfo::StructureType, and clang::CodeGen::CodeGenModule::supportsCOMDAT().
Referenced by buildDisposeHelper().
llvm::Constant * CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction | ( | const ObjCPropertyImplDecl * | PID | ) |
Definition at line 3788 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CXXConstructExpr::arg_begin(), clang::CXXConstructExpr::arg_end(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), CGM, ConvertTypeForMem(), clang::CPlusPlus, clang::ParmVarDecl::Create(), clang::FunctionDecl::Create(), clang::UnaryOperator::Create(), clang::CXXConstructExpr::Create(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), EmitAnyExpr(), FinishFunction(), clang::CodeGen::AggValueSlot::forAddr(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getAtomicGetterHelperFnMap(), clang::CXXConstructExpr::getConstructionKind(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::getNonTrivialCStructCopyConstructor(), clang::Type::getPointeeType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::CodeGen::RValue::getScalarVal(), clang::ObjCPropertyDecl::getType(), clang::Expr::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CodeGen::CodeGenModule::getTypes(), clang::CXXConstructExpr::hadMultipleCandidates(), clang::ObjCRuntime::hasAtomicCopyHelper(), hasTrivialGetExpr(), clang::ASTContext::Idents, clang::CodeGen::AggValueSlot::IsDestructed, clang::CXXConstructExpr::isElidable(), clang::CXXConstructExpr::isListInitialization(), clang::QualType::isNonTrivialToPrimitiveCopy(), clang::CodeGen::AggValueSlot::IsNotAliased, clang::Type::isRecordType(), clang::CXXConstructExpr::isStdInitListInitialization(), clang::QualType::isVolatileQualified(), clang::ObjCPropertyAttribute::kind_atomic, clang::OK_Ordinary, clang::QualType::PCK_Struct, clang::CXXConstructExpr::requiresZeroInitialization(), clang::SC_None, clang::SC_Static, clang::CodeGen::CodeGenModule::setAtomicGetterHelperFnMap(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::VK_LValue, and clang::VK_PRValue.
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 3688 of file CGObjC.cpp.
References clang::QualType::addConst(), clang::CodeGen::CodeGenTypes::arrangeBuiltinFunctionDeclaration(), CGM, clang::CPlusPlus, clang::ParmVarDecl::Create(), clang::FunctionDecl::Create(), clang::UnaryOperator::Create(), clang::CXXOperatorCallExpr::Create(), EmitStmt(), FinishFunction(), clang::IdentifierTable::get(), clang::CodeGen::CodeGenModule::getAtomicSetterHelperFnMap(), clang::CallExpr::getCallee(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLangOpts(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::getNonTrivialCStructMoveAssignmentOperator(), clang::Type::getPointeeType(), clang::ObjCPropertyDecl::getPropertyAttributes(), clang::ObjCPropertyImplDecl::getPropertyDecl(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::ObjCPropertyImplDecl::getSetterCXXAssignment(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::ObjCRuntime::hasAtomicCopyHelper(), hasTrivialSetExpr(), clang::ASTContext::Idents, clang::QualType::isNonTrivialToPrimitiveCopy(), clang::Type::isRecordType(), clang::QualType::isVolatileQualified(), clang::ObjCPropertyAttribute::kind_atomic, clang::OK_Ordinary, clang::QualType::PCK_Struct, clang::SC_None, clang::SC_Static, clang::CodeGen::CodeGenModule::setAtomicSetterHelperFnMap(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), StartFunction(), clang::VK_LValue, and clang::VK_PRValue.
Referenced by GenerateObjCSetter().
void CodeGenFunction::GenerateObjCCtorDtorMethod | ( | ObjCImplementationDecl * | IMP, |
ObjCMethodDecl * | MD, | ||
bool | ctor | ||
) |
Definition at line 1709 of file CGObjC.cpp.
References AutoreleaseResult, CGM, clang::ObjCMethodDecl::createImplicitParams(), clang::CodeGen::AggValueSlot::DoesNotNeedGCBarriers, clang::CodeGen::AggValueSlot::DoesNotOverlap, EmitAggExpr(), EmitLValueForIvar(), clang::CodeGen::AggValueSlot::forLValue(), clang::ObjCImplDecl::getClassInterface(), clang::CodeGen::CodeGenModule::getContext(), 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 1050 of file CGObjC.cpp.
References CGM, FinishFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), generateObjCGetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getEndLoc(), clang::ObjCPropertyImplDecl::getGetterMethodDecl(), and StartObjCMethod().
void CodeGenFunction::generateObjCGetterBody | ( | const ObjCImplementationDecl * | classImpl, |
const ObjCPropertyImplDecl * | propImpl, | ||
const ObjCMethodDecl * | GetterMothodDecl, | ||
llvm::Constant * | AtomicHelperFn | ||
) |
Definition at line 1136 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), AutoreleaseResult, Builder, callCStructCopyConstructor(), CGM, ConvertType(), clang::ReturnStmt::Create(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), EmitAggregateCopy(), EmitARCLoadWeak(), emitARCRetainLoadOfScalar(), EmitCall(), emitCmdValueForGetterSetterBody(), emitCPPObjectAtomicGetterCall(), EmitIvarOffsetAsPointerDiff(), EmitLoadOfComplex(), EmitLoadOfLValue(), EmitLValueForIvar(), clang::CodeGen::Address::emitRawPointer(), EmitReturnStmt(), EmitStoreOfComplex(), emitStructGetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::ObjCImplDecl::getClassInterface(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), getEvaluationKind(), clang::ObjCPropertyImplDecl::getGetterCXXConstructor(), clang::ObjCPropertyImplDecl::getGetterMethodDecl(), getLangOpts(), getLLVMContext(), clang::Qualifiers::getObjCLifetime(), clang::CodeGen::CodeGenModule::getObjCRuntime(), getOverlapForReturnValue(), 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::QualType::isNonTrivialToPrimitiveCopy(), clang::Type::isReferenceType(), LoadObjCSelf(), MakeAddrLValue(), clang::Qualifiers::OCL_Weak, clang::QualType::PCK_Struct, ReturnValue, clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, clang::ASTContext::toBits(), TypeOfSelfObject(), clang::CodeGen::CodeGenTypeCache::VoidPtrTy, and clang::CodeGen::Address::withElementType().
Referenced by GenerateObjCGetter().
void CodeGenFunction::GenerateObjCMethod | ( | const ObjCMethodDecl * | OMD | ) |
Generate an Objective-C method.
An Objective-C method is a C function with its pointer, name, and types registered in the class structure.
Definition at line 808 of file CGObjC.cpp.
References clang::CodeGen::CodeGenPGO::assignRegionCounters(), CurFn, EmitCompoundStmtWithoutScope(), FinishFunction(), clang::ObjCMethodDecl::getBody(), clang::Decl::getBodyRBrace(), clang::ObjCMethodDecl::getClassInterface(), incrementProfileCounter(), and StartObjCMethod().
Referenced by clang::CodeGen::CodeGenModule::EmitTopLevelDecl().
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 1629 of file CGObjC.cpp.
References CGM, FinishFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCSetterBody(), clang::ObjCImplDecl::getClassInterface(), clang::ObjCMethodDecl::getEndLoc(), clang::ObjCPropertyImplDecl::getSetterMethodDecl(), and StartObjCMethod().
void CodeGenFunction::generateObjCSetterBody | ( | const ObjCImplementationDecl * | classImpl, |
const ObjCPropertyImplDecl * | propImpl, | ||
llvm::Constant * | AtomicHelperFn | ||
) |
Definition at line 1433 of file CGObjC.cpp.
References clang::CodeGen::CallArgList::add(), AllocaInsertPt, std::arg(), Builder, callCStructMoveAssignmentOperator(), CGM, clang::BinaryOperator::Create(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStore(), DeactivateCleanupBlock(), EmitCall(), emitCmdValueForGetterSetterBody(), emitCPPObjectAtomicSetterCall(), EmitIvarOffsetAsPointerDiff(), EmitLValueForIvar(), EmitStmt(), emitStructSetterCall(), clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::CGCallee::forDirect(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), GetAddrOfLocalVar(), clang::ObjCImplDecl::getClassInterface(), getContext(), getLLVMContext(), clang::QualType::getNonReferenceType(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::CodeGen::CGObjCRuntime::GetOptimizedPropertySetFunction(), clang::ObjCPropertyImplDecl::getPropertyIvarDecl(), clang::CodeGen::CGObjCRuntime::GetPropertySetFunction(), clang::ObjCMethodDecl::getSelfDecl(), clang::ObjCPropertyImplDecl::getSetterCXXAssignment(), clang::ObjCPropertyImplDecl::getSetterMethodDecl(), clang::ValueDecl::getType(), clang::Expr::getType(), getTypes(), clang::QualType::getUnqualifiedType(), hasTrivialSetExpr(), clang::Type::isAtomicType(), clang::Type::isBlockPointerType(), clang::QualType::isNonTrivialToPrimitiveCopy(), clang::Type::isObjCObjectPointerType(), clang::Type::isPointerType(), LoadObjCSelf(), MakeAddrLValue(), clang::OK_Ordinary, clang::ImplicitCastExpr::OnStack, clang::ObjCMethodDecl::param_begin(), clang::QualType::PCK_Struct, TypeOfSelfObject(), UseOptimizedSetter(), clang::VK_LValue, clang::VK_PRValue, clang::CodeGen::CodeGenTypeCache::VoidPtrTy, clang::CodeGen::CodeGenTypeCache::VoidTy, and clang::CodeGen::Address::withElementType().
Referenced by GenerateObjCSetter().
llvm::Function * CodeGenFunction::GenerateOpenMPCapturedStmtFunction | ( | const CapturedStmt & | S, |
SourceLocation | Loc | ||
) |
Definition at line 633 of file CGStmtOpenMP.cpp.
Referenced by emitParallelOrTeamsOutlinedFunction(), and clang::CodeGen::CGOpenMPRuntime::emitTargetOutlinedFunctionHelper().
void CodeGenFunction::GenerateOpenMPCapturedVars | ( | const CapturedStmt & | S, |
SmallVectorImpl< llvm::Value * > & | CapturedVars | ||
) |
Definition at line 347 of file CGStmtOpenMP.cpp.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitTargetCall(), and emitTargetCallFallback().
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 2077 of file CGException.cpp.
References Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateStore(), CurFn, EmitScalarExpr(), FinishFunction(), getContext(), clang::Stmt::getEndLoc(), clang::SEHExceptStmt::getFilterExpr(), clang::Expr::getType(), clang::Type::isSignedIntegerType(), ParentCGF, ReturnValue, and startOutlinedSEHHelper().
llvm::Function * CodeGenFunction::GenerateSEHFinallyFunction | ( | CodeGenFunction & | ParentCGF, |
const SEHFinallyStmt & | Finally | ||
) |
Definition at line 2094 of file CGException.cpp.
References CurFn, EmitStmt(), FinishFunction(), clang::SEHFinallyStmt::getBlock(), clang::Stmt::getEndLoc(), ParentCGF, and startOutlinedSEHHelper().
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 455 of file CGVTables.cpp.
References CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenTypes::GetFunctionType(), getLLVMContext(), clang::CodeGen::CodeGenModule::getTypes(), and StartThunk().
llvm::Function * CodeGenFunction::GenerateVarArgsThunk | ( | llvm::Function * | Fn, |
const CGFunctionInfo & | FnInfo, | ||
GlobalDecl | GD, | ||
const ThunkInfo & | Thunk | ||
) |
Definition at line 166 of file CGVTables.cpp.
References Builder, clang::Type::castAs(), CGM, CurFn, clang::CodeGen::CodeGenModule::ErrorUnsupported(), clang::CodeGen::RValue::get(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CXXMethodDecl::getFunctionObjectParameterType(), clang::CodeGen::CodeGenTypes::GetFunctionType(), clang::CXXMethodDecl::getParent(), clang::FunctionType::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::FunctionDecl::isDefined(), clang::ReturnAdjustment::isEmpty(), clang::CodeGen::CGFunctionInfo::isVariadic(), makeNaturalAddressForPointer(), PerformReturnAdjustment(), clang::CodeGen::CGCXXABI::performThisAdjustment(), resolveTopLevelMetadata(), clang::ThunkInfo::Return, clang::CodeGen::CodeGenModule::ReturnTypeUsesSRet(), clang::T, and clang::ThunkInfo::This.
void CodeGenFunction::GetAArch64SVEProcessedOperands | ( | unsigned | BuiltinID, |
const CallExpr * | E, | ||
SmallVectorImpl< llvm::Value * > & | Ops, | ||
SVETypeFlags | TypeFlags | ||
) |
Definition at line 10374 of file CGBuiltin.cpp.
References clang::ASTContext::GE_None, clang::CallExpr::getArg(), clang::Expr::getIntegerConstantExpr(), clang::CallExpr::getNumArgs(), clang::SVETypeFlags::isTupleGet(), and clang::SVETypeFlags::isTupleSet().
getAccessedFieldNo - Given an encoded value and a result number, return the input field number being accessed.
Definition at line 648 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 293 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), Builder, CGM, clang::CodeGen::CodeGenModule::computeNonVirtualBaseClassOffset(), ConvertType(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateIsNull(), EmitBlock(), EmitTypeCheck(), clang::ASTContext::getASTRecordLayout(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::RecordType::getDecl(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::ASTContext::getRecordType(), clang::Value::getType(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::CodeGen::CGCXXABI::GetVirtualBaseClassOffset(), clang::Decl::hasAttr(), clang::CharUnits::isZero(), Loc, clang::CodeGen::NotKnownNonNull, sanitizePerformTypeCheck(), clang::SanitizerSet::set(), TCK_Upcast, and TCK_UpcastToVirtualBase.
Referenced by EmitCastLValue(), EmitLValueForLambdaField(), EmitMaterializeTemporaryExpr(), and EmitPointerWithAlignment().
Address CodeGenFunction::GetAddressOfDerivedClass | ( | Address | Value, |
const CXXRecordDecl * | Derived, | ||
CastExpr::path_const_iterator | PathBegin, | ||
CastExpr::path_const_iterator | PathEnd, | ||
bool | NullCheckValue | ||
) |
Definition at line 402 of file CGClass.cpp.
References Builder, CGM, ConvertType(), createBasicBlock(), clang::CodeGen::CGBuilderTy::CreateInBoundsGEP(), clang::CodeGen::CGBuilderTy::CreateIsNull(), EmitBlock(), clang::CodeGen::Address::emitRawPointer(), clang::ASTContext::getCanonicalType(), clang::CodeGen::CodeGenModule::getClassPointerAlignment(), getContext(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::GetNonVirtualBaseClassOffset(), clang::Value::getType(), clang::CodeGen::CodeGenTypeCache::Int8Ty, IsNull, and clang::CodeGen::Address::withElementType().
Referenced by EmitCastLValue().
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 222 of file CGClass.cpp.
References Builder, ConvertType(), clang::CodeGen::CGBuilderTy::CreateConstInBoundsByteGEP(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::CodeGen::CodeGenTypeCache::Int8Ty, Offset, clang::interp::This(), and V.
Referenced by EmitBaseInitializer().
Definition at line 1217 of file CGBlocks.cpp.
References BlockInfo, Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), emitBlockByrefAddress(), EmitLoadOfReference(), clang::CodeGen::CGBlockInfo::Capture::fieldType(), getBlockByrefInfo(), clang::CodeGen::CGBlockInfo::getCapture(), clang::CodeGen::CGBlockInfo::Capture::getIndex(), clang::NamedDecl::getName(), clang::CodeGen::CGBlockInfo::Capture::isConstant(), clang::VarDecl::isEscapingByref(), clang::VarDecl::isNonEscapingByref(), clang::Type::isReferenceType(), LoadBlockStruct(), and MakeAddrLValue().
Referenced by EmitDeclRefLValue(), and EmitLambdaBlockInvokeBody().
llvm::BlockAddress * CodeGenFunction::GetAddrOfLabel | ( | const LabelDecl * | L | ) |
Definition at line 2451 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 2992 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CGObjCRuntime::canMessageReceiverBeNull(), EmitCfiCheckFail(), emitCmdValueForGetterSetterBody(), EmitDelegateCallArg(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), emitInterWarpCopyFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), EmitMemberInitializer(), EmitMustTailThunk(), EmitObjCMessageExpr(), EmitOMPAggregateReduction(), emitOutlinedFunctionPrologue(), emitPrivatesInit(), emitShuffleAndReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), GenerateCopyHelperFunction(), GenerateDestroyHelperFunction(), generateObjCSetterBody(), clang::CodeGen::CGOpenMPRuntime::getParameterAddress(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), clang::CodeGen::CGCXXABI::loadIncomingCXXThis(), mapParam(), and tryRemoveRetainOfSelf().
|
inline |
Retrieves the default cleanup kind for an ARC cleanup.
Except under -fobjc-arc-eh, ARC cleanups are normal-only.
Definition at line 4699 of file CodeGenFunction.h.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), EmitObjCConsumeObject(), EmitParmDecl(), pushTemporaryCleanup(), and StartObjCMethod().
|
inline |
Get the index of the current ArrayInitLoopExpr, if any.
Definition at line 3008 of file CodeGenFunction.h.
|
inline |
Definition at line 4426 of file CodeGenFunction.h.
References clang::CodeGen::Address::getBasePointer().
Referenced by EmitCall(), EmitCXXConstructorCall(), EmitDelegateCXXConstructorCall(), EmitInheritedCXXConstructorCall(), EmitLambdaBlockInvokeBody(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), and EmitSynthesizedCXXCopyCtorCall().
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 2576 of file CGBlocks.cpp.
References clang::CharUnits::alignTo(), clang::ASTContext::BlockRequiresCopying(), clang::CodeGen::BlockByrefInfo::ByrefAlignment, CGM, ConvertTypeForMem(), clang::serialized_diags::create(), clang::CodeGen::BlockByrefInfo::FieldIndex, clang::CodeGen::BlockByrefInfo::FieldOffset, clang::CharUnits::fromQuantity(), getContext(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::ASTContext::getDeclAlign(), getLLVMContext(), clang::NamedDecl::getNameAsString(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), clang::CodeGen::CodeGenTypeCache::getPointerSize(), clang::CharUnits::getQuantity(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8Ty, max(), clang::Qualifiers::OCL_None, clang::CodeGen::CodeGenTypeCache::PointerSizeInBytes, clang::CodeGen::BlockByrefInfo::Type, and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Referenced by EmitAutoVarAlloca(), emitBlockByrefAddress(), and GetAddrOfBlockDecl().
SmallVector< llvm::OperandBundleDef, 1 > CodeGenFunction::getBundlesForFunclet | ( | llvm::Value * | Callee | ) |
Definition at line 4886 of file CGCall.cpp.
References CurrentFuncletPad.
Referenced by emitAutoreleasedReturnValueMarker(), EmitCall(), EmitNoreturnRuntimeCallOrInvoke(), and EmitSehScope().
|
inline |
Definition at line 2275 of file CodeGenFunction.h.
References needsEHCleanup(), clang::CodeGen::NormalAndEHCleanup, and clang::CodeGen::NormalCleanup.
Referenced by EmitCompoundLiteralLValue(), emitCXXDestructMethod(), EnterDtorCleanups(), pushCaptureCleanup(), pushDestroy(), and pushDestroyAndDeferDeactivation().
|
inline |
Definition at line 2160 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getContext().
Referenced by AddInitializerToStaticVarDecl(), BuildFunctionArgList(), clang::CodeGen::CGCXXABI::buildThisParam(), callCStructCopyAssignmentOperator(), callCStructCopyConstructor(), callCStructDefaultConstructor(), callCStructDestructor(), callCStructMoveAssignmentOperator(), callCStructMoveConstructor(), canEmitDelegateCallArgs(), canEmitSpuriousReferenceToVariable(), CanSkipVTablePointerInitialization(), castToBase(), castValueToType(), CheckAggExprForMemSetUse(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), CheckAtomicAlignment(), checkIfLoopMustProgress(), ConstantFoldsToSimpleInteger(), ConvertType(), createRuntimeShuffleFunction(), createTLSAtExitStub(), defaultInitNonTrivialCStructVar(), EmitAArch64TblBuiltinExpr(), emitAddrOfFieldStorage(), emitAddrOfZeroSizeField(), EmitAggregateCopy(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitAlignedClause(), EmitAndRegisterVariableArrayDimensions(), EmitArrayDelete(), emitArrayLength(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), emitArraySubscriptGEP(), EmitAtomicCmpXchg128ForMSIntrin(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicExpr(), EmitAtomicStore(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), EmitBaseInitializer(), EmitBinaryAtomicPost(), EmitBlockCallExpr(), EmitBlockCopyAndAutorelease(), EmitBuiltinNewDeleteCall(), emitByrefStructureInit(), EmitCall(), EmitCallExprLValue(), EmitCastLValue(), EmitCfiCheckFail(), EmitCfiCheckStub(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), emitCmdValueForGetterSetterBody(), EmitCoawaitLValue(), EmitComplexPrePostIncDec(), EmitCountedByFieldExpr(), EmitCoyieldLValue(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXConstructorCall(), EmitCXXDeleteExpr(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberCallExpr(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXTypeidExpr(), EmitDecl(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclInvariant(), EmitDeclRefLValue(), emitDeclTargetVarDeclLValue(), EmitDelegateCallArg(), EmitDeleteCall(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitDestroy(), EmitDirectCallee(), clang::CodeGen::CGOpenMPRuntime::emitForNext(), EmitFromMemory(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), emitGlobalToListReduceFunction(), EmitGlobalVarDeclLValue(), EmitIgnoredExpr(), EmitInheritedCXXConstructorCall(), clang::CodeGen::ReductionCodeGen::emitInitialization(), EmitISOVolatileLoad(), EmitISOVolatileStore(), EmitIvarOffsetAsPointerDiff(), EmitLambdaBlockInvokeBody(), EmitLambdaInAllocaCallOpBody(), EmitLambdaStaticInvokeBody(), emitListToGlobalReduceFunction(), clang::CodeGen::CGCXXABI::EmitLoadOfMemberFunctionPointer(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForLambdaField(), emitMappingInformation(), EmitMemberExpr(), EmitMemberInitializer(), EmitNewArrayInitializer(), emitNonZeroVLAInit(), EmitNullBaseClassInitialization(), EmitNullInitialization(), EmitObjCBoxedExpr(), EmitObjCIvarRefLValue(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), EmitOMPUseDeviceAddrClause(), EmitOMPUseDevicePtrClause(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), emitPrivatesInit(), EmitSEHExceptionCodeSave(), EmitStaticVarDecl(), EmitStoreOfScalar(), emitStructSetterCall(), EmitSYCLAnnotationCall(), EmitSynthesizedCXXCopyCtor(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), EmitToMemory(), EmitUnaryOpLValue(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), clang::CodeGen::EmitVAArgInstr(), EmitVAListRef(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVariablyModifiedType(), EmitVTablePtrCheck(), EmitVTableTypeCheckedLoad(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), EnterDtorCleanups(), EvaluateExprAsBool(), FinishFunction(), GenerateBlockFunction(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateSEHFilterFunction(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), getArrayIndexingBound(), getBlockByrefInfo(), getCaptureFieldType(), getFieldOffsetInBits(), getIdentStringFromSourceLocation(), getItaniumDynamicCastFn(), GetNumNonZeroBytesInInit(), clang::CodeGen::CGOpenMPRuntime::getNumTeamsExprForTargetDirective(), getNumThreads(), clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective(), getOverlapForBaseInit(), getOverlapForFieldInit(), getPointerAndSize(), getRangeForType(), getUBSanFunctionTypeHash(), clang::CodeGen::getVAListElementType(), getVLAElements1D(), getVLASize(), getVTablePointers(), GetVTTParameter(), isCheapEnoughToEvaluateUnconditionally(), isSimpleZero(), LoadObjCSelf(), LoadPassedObjectSize(), loadToBegin(), LValueIsSuitableForInlineAtomic(), MakeAddrLValue(), MakeAddrLValueWithoutTBAA(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), MakeRawAddrLValue(), maybeCreateMCDCCondBitmap(), performTypeAdjustment(), setBlockContextParameter(), ShouldEmitVTableTypeCheckedLoad(), shuffleAndStore(), StartFunction(), tryEmitAsConstant(), tryToConvertMemberExprToDeclRefExpr(), and TypeOfSelfObject().
|
inline |
Definition at line 1763 of file CodeGenFunction.h.
|
inline |
Get the profiler's current count.
This is generally the count for the most recently incremented counter.
Definition at line 1699 of file CodeGenFunction.h.
Referenced by EmitBranchOnBoolExpr().
|
inline |
Definition at line 2161 of file CodeGenFunction.h.
Referenced by clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), clang::CodeGen::ApplyInlineDebugLocation::ApplyInlineDebugLocation(), emitArraySubscriptGEP(), EmitAutoVarAlloca(), EmitCall(), EmitCXXNewExpr(), EmitDecl(), EmitDeclRefExprDbgValue(), EmitLabel(), EmitLValueForField(), EmitParmDecl(), emitPreserveStructAccess(), EmitStaticVarDecl(), FinishFunction(), GenerateBlockFunction(), IsPreserveAIArrayBase(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), setBlockContextParameter(), SourceLocToDebugLoc(), StartFunction(), clang::CodeGen::ApplyInlineDebugLocation::~ApplyInlineDebugLocation(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
unsigned CodeGenFunction::getDebugInfoFIndex | ( | const RecordDecl * | Rec, |
unsigned | FieldIndex | ||
) |
Get the record field index as represented in debug info.
Get the field index in the debug info.
The debug info structure/union will ignore the unnamed bitfields.
Definition at line 4757 of file CGExpr.cpp.
References clang::RecordDecl::fields(), and clang::RecordDecl::getDefinition().
Referenced by EmitLValueForField(), and emitPreserveStructAccess().
CodeGenFunction::Destroyer * CodeGenFunction::getDestroyer | ( | QualType::DestructionKind | destructionKind | ) |
Definition at line 2215 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 EmitArrayDelete(), emitAutoVarTypeCleanup(), EmitCompoundLiteralLValue(), emitCXXDestructMethod(), EmitDeclDestroy(), EmitNewArrayInitializer(), EnterDtorCleanups(), pushCaptureCleanup(), pushDestroy(), pushDestroyAndDeferDeactivation(), and pushEHDestroy().
llvm::BasicBlock * CodeGenFunction::getEHDispatchBlock | ( | EHScopeStack::stable_iterator | scope | ) |
Definition at line 673 of file CGException.cpp.
References clang::CodeGen::EHCatchScope::Handler::Block, clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, createBasicBlock(), EHStack, clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScopeStack::find(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), getEHResumeBlock(), getFuncletEHDispatchBlock(), clang::CodeGen::EHCatchScope::getHandler(), clang::CodeGen::EHScope::getKind(), clang::CodeGen::EHCatchScope::getNumHandlers(), getTerminateHandler(), clang::CodeGen::EHCatchScope::Handler::isCatchAll(), clang::CodeGen::EHScope::setCachedEHDispatchBlock(), clang::CodeGen::EHScopeStack::stable_end(), clang::CodeGen::EHScope::Terminate, and clang::CodeGen::EHPersonality::usesFuncletPads().
Referenced by emitCatchDispatchBlock(), emitCatchPadBlock(), EmitLandingPad(), emitWasmCatchPadBlock(), and getInvokeDestImpl().
llvm::BasicBlock * CodeGenFunction::getEHResumeBlock | ( | bool | isCleanup | ) |
Definition at line 1626 of file CGException.cpp.
References Builder, clang::CodeGen::EHPersonality::CatchallRethrowFn, CGM, createBasicBlock(), EHResumeBlock, EmitRuntimeCall(), clang::CodeGen::EHPersonality::get(), getCatchallRethrowFn(), getExceptionFromSlot(), and getSelectorFromSlot().
Referenced by emitFilterDispatchBlock(), and getEHDispatchBlock().
Address CodeGenFunction::getEHSelectorSlot | ( | ) |
Definition at line 429 of file CGException.cpp.
References CreateTempAlloca(), EHSelectorSlot, clang::CharUnits::fromQuantity(), and clang::CodeGen::CodeGenTypeCache::Int32Ty.
Referenced by EmitLandingPad(), and getSelectorFromSlot().
llvm::Type * CodeGenFunction::getEltType | ( | const SVETypeFlags & | TypeFlags | ) |
Definition at line 9643 of file CGBuiltin.cpp.
References clang::SVETypeFlags::getEltType().
|
static |
getEvaluationKind - Return the TypeEvaluationKind of QualType T
.
Definition at line 238 of file CodeGenFunction.cpp.
References clang::CodeGen::TEK_Aggregate, clang::CodeGen::TEK_Complex, clang::CodeGen::TEK_Scalar, and clang::ast_matchers::type.
Referenced by convertTempToRValue(), convertToComplexValue(), convertToType(), EmitAnyExpr(), EmitAnyExprToMem(), EmitBinaryOperatorLValue(), EmitCall(), EmitDeclInit(), EmitExprAsInit(), EmitFunctionEpilog(), emitGlobalToListCopyFunction(), EmitInitializerForField(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitListToGlobalCopyFunction(), EmitMaterializeTemporaryExpr(), emitOMPSimpleStore(), EmitRValueForField(), generateObjCGetterBody(), GetUndefRValue(), hasAggregateEvaluationKind(), hasScalarEvaluationKind(), InitCatchParam(), and StoreAnyExprIntoOneUnit().
llvm::Value * CodeGenFunction::getExceptionFromSlot | ( | ) |
Returns the contents of the function's exception object and selector slots.
Definition at line 435 of file CGException.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), and getExceptionSlot().
Referenced by emitFilterDispatchBlock(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), getEHResumeBlock(), getTerminateHandler(), 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 423 of file CGException.cpp.
References CreateTempAlloca(), ExceptionSlot, clang::CodeGen::CodeGenTypeCache::getPointerAlign(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitLandingPad(), emitWasmCatchPadBlock(), and getExceptionFromSlot().
llvm::BasicBlock * CodeGenFunction::getFuncletEHDispatchBlock | ( | EHScopeStack::stable_iterator | scope | ) |
Definition at line 720 of file CGException.cpp.
References Builder, clang::CodeGen::EHScope::Catch, clang::CodeGen::EHScope::Cleanup, createBasicBlock(), EHStack, clang::CodeGen::EHScope::Filter, clang::CodeGen::EHScopeStack::find(), clang::CodeGen::EHScope::getCachedEHDispatchBlock(), clang::CodeGen::EHScope::getKind(), getTerminateFunclet(), clang::CodeGen::EHScope::setCachedEHDispatchBlock(), clang::CodeGen::EHScopeStack::stable_end(), and clang::CodeGen::EHScope::Terminate.
Referenced by getEHDispatchBlock().
llvm::BasicBlock * CodeGenFunction::GetIndirectGotoBlock | ( | ) |
Definition at line 2463 of file CodeGenFunction.cpp.
References createBasicBlock(), and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by GetAddrOfLabel().
|
inline |
Definition at line 2195 of file CodeGenFunction.h.
References EHStack, getInvokeDestImpl(), and clang::CodeGen::EHScopeStack::requiresLandingPad().
Referenced by EmitCall(), EmitNoreturnRuntimeCallOrInvoke(), EmitObjCAutoreleasePoolPop(), and EmitSehScope().
llvm::BasicBlock * CodeGenFunction::getInvokeDestImpl | ( | ) |
Definition at line 775 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), CGM, CurFn, currentFunctionUsesSEHTry(), EHStack, EmitLandingPad(), clang::CodeGen::EHScopeStack::empty(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::EHScope::getCachedLandingPad(), getEHDispatchBlock(), clang::CodeGen::EHScopeStack::getInnermostEHScope(), clang::CodeGen::CodeGenModule::getLangOpts(), getOpaquePersonalityFn(), isNonEHScope(), clang::CodeGen::EHScopeStack::requiresLandingPad(), and clang::CodeGen::EHPersonality::usesFuncletPads().
Referenced by getInvokeDest().
CodeGenFunction::JumpDest CodeGenFunction::getJumpDestForLabel | ( | const LabelDecl * | S | ) |
getBasicBlockForLabel - Return the LLVM basicblock that the specified label maps to.
Definition at line 632 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 1248 of file CodeGenFunction.h.
References EHStack, clang::CodeGen::EHScopeStack::getInnermostNormalCleanup(), and NextCleanupDestIndex.
Referenced by EmitLabel(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::FinalizeOMPRegion(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::InlinedRegionBodyRAII::InlinedRegionBodyRAII(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OutlinedRegionBodyRAII::OutlinedRegionBodyRAII(), 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 1257 of file CodeGenFunction.h.
|
inline |
Definition at line 2173 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getLangOpts().
Referenced by AddInitializerToStaticVarDecl(), canEmitSpuriousReferenceToVariable(), clang::CodeGen::CodeGenFunction::CGFPOptionsRAII::CGFPOptionsRAII(), CheckAggExprForMemSetUse(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), checkIfFunctionMustProgress(), checkIfLoopMustProgress(), checkTargetFeatures(), EmitAggregateCopy(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitBinaryOperatorLValue(), EmitBlockCallExpr(), EmitCall(), EmitCallArg(), EmitCastLValue(), EmitComplexAssignmentLValue(), EmitComplexPrePostIncDec(), EmitCompoundLiteralLValue(), EmitCXXAggrConstructorCall(), EmitCXXConstructExpr(), EmitCXXGlobalVarDeclInit(), EmitCXXMemberOrOperatorMemberCallExpr(), EmitDeclRefLValue(), EmitDelegateCallArg(), EmitDestructorBody(), EmitEndEHSpec(), EmitForwardingCallToLambda(), EmitFunctionEpilog(), EmitGlobalVarDeclLValue(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalFinalUpdate(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfLValue(), EmitLValueForField(), EmitMemberExpr(), EmitNullInitialization(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), EmitObjCMessageExpr(), EmitObjCThrowOperand(), EmitParmDecl(), emitPointerArithmetic(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitTargetArchBuiltinExpr(), EmitUnaryOpLValue(), EmitVTablePtrCheckForCast(), FinishFunction(), GenerateBlockFunction(), GenerateCode(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), generateObjCGetterBody(), clang::CodeGen::CGOpenMPRuntime::getNumThreadsExprForTargetDirective(), getRangeForType(), getTerminateHandler(), getTerminateLandingPad(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), initializeAlloca(), needsEHCleanup(), pushCaptureCleanup(), pushTemporaryCleanup(), setBlockContextParameter(), SetDivFPAccuracy(), SetSqrtFPAccuracy(), StartFunction(), tryEmitARCRetainLoadOfScalar(), tryEmitSpecializedAllocInit(), and ~CodeGenFunction().
|
inline |
Definition at line 2203 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getLLVMContext().
Referenced by createBasicBlock(), clang::CodeGen::TargetCodeGenInfo::createEnqueuedBlockKernel(), createPlaceholderSlot(), emitAlignedClause(), EmitAtomicCmpXchg128ForMSIntrin(), emitAtomicLibcall(), emitAutoreleasedReturnValueMarker(), EmitBinaryAtomicPost(), EmitBranchOnBoolExpr(), EmitCall(), emitCatchPadBlock(), EmitCfiSlowPathCheck(), EmitCheck(), emitCheckHandlerCall(), EmitCheckValue(), EmitComplexPrePostIncDec(), EmitCXXConstructorCall(), EmitCXXGlobalVarDeclInit(), EmitExtVectorElementExpr(), EmitFunctionProlog(), EmitISOVolatileLoad(), EmitLoadOfScalar(), EmitLValueForField(), clang::CodeGen::CGCXXABI::EmitMemberDataPointerAddress(), EmitParmDecl(), emitPPCLoadReserveIntrinsic(), emitRangedBuiltin(), EmitScalarRangeCheck(), EmitSEHExceptionCodeSave(), EmitTrapCall(), EmitTrapCheck(), EmitTypeCheck(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), clang::CodeGen::emitVoidPtrVAArg(), EmitVTablePtrCheck(), emitWasmCatchPadBlock(), EmitX86BitTestIntrinsic(), EmitX86CvtF16ToFloatExpr(), FinishFunction(), generateObjCGetterBody(), generateObjCSetterBody(), generateThunk(), getBlockByrefInfo(), getItaniumDynamicCastFn(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), getUnreachableBlock(), InitCatchParam(), MakeAtomicCmpXchgValue(), MakeBinaryAtomicValue(), setBlockContextParameter(), SetFPAccuracy(), and StartFunction().
|
static |
Definition at line 853 of file CGNonTrivialStruct.cpp.
Referenced by getBlockCaptureStr().
|
static |
Definition at line 859 of file CGNonTrivialStruct.cpp.
Referenced by getBlockCaptureStr().
RawAddress CodeGenFunction::getNormalCleanupDestSlot | ( | ) |
Definition at line 1296 of file CGCleanup.cpp.
Referenced by ResolveAllBranchFixups(), and TransitionToCleanupSwitch().
CodeGenFunction::JumpDest CodeGenFunction::getOMPCancelDestination | ( | OpenMPDirectiveKind | Kind | ) |
Definition at line 7239 of file CGStmtOpenMP.cpp.
References ReturnBlock.
LValue CodeGenFunction::getOrCreateOpaqueLValueMapping | ( | const OpaqueValueExpr * | e | ) |
Given an opaque value expression, return its LValue mapping if it exists, otherwise create one.
Definition at line 5425 of file CGExpr.cpp.
References EmitLValue(), clang::OpaqueValueExpr::getSourceExpr(), clang::OpaqueValueExpr::isUnique(), and clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().
Referenced by EmitOpaqueValueLValue().
RValue CodeGenFunction::getOrCreateOpaqueRValueMapping | ( | const OpaqueValueExpr * | e | ) |
Given an opaque value expression, return its RValue mapping if it exists, otherwise create one.
Definition at line 5439 of file CGExpr.cpp.
References EmitAnyExpr(), clang::OpaqueValueExpr::getSourceExpr(), clang::OpaqueValueExpr::isUnique(), and clang::CodeGen::CodeGenFunction::OpaqueValueMapping::shouldBindAsLValue().
AggValueSlot::Overlap_t CodeGenFunction::getOverlapForBaseInit | ( | const CXXRecordDecl * | RD, |
const CXXRecordDecl * | BaseRD, | ||
bool | IsVirtual | ||
) |
Determine whether a base class initialization may overlap some other object.
Definition at line 2072 of file CGExprAgg.cpp.
References clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::ASTRecordLayout::getNonVirtualSize(), and clang::CodeGen::AggValueSlot::MayOverlap.
Referenced by EmitBaseInitializer().
AggValueSlot::Overlap_t CodeGenFunction::getOverlapForFieldInit | ( | const FieldDecl * | FD | ) |
Determine whether a field initialization may overlap some other object.
Definition at line 2054 of file CGExprAgg.cpp.
References clang::CodeGen::AggValueSlot::DoesNotOverlap, clang::ASTContext::getASTRecordLayout(), getContext(), clang::FieldDecl::getFieldIndex(), clang::ASTRecordLayout::getFieldOffset(), clang::ASTRecordLayout::getNonVirtualSize(), clang::FieldDecl::getParent(), clang::ValueDecl::getType(), getTypeSize(), clang::Decl::hasAttr(), clang::Type::isRecordType(), and clang::CodeGen::AggValueSlot::MayOverlap.
Referenced by EmitExprAsInit(), EmitInitializerForField(), and EmitMemberInitializer().
|
inline |
Determine whether a return value slot may overlap some other object.
Definition at line 2953 of file CodeGenFunction.h.
References clang::CodeGen::AggValueSlot::DoesNotOverlap.
Referenced by generateObjCGetterBody().
|
inline |
Return PostAllocaInsertPt.
If it is not yet created, then insert it immediately after AllocaInsertPt.
Definition at line 448 of file CodeGenFunction.h.
References AllocaInsertPt.
|
inline |
Get the profiler's count for the given statement.
Definition at line 1688 of file CodeGenFunction.h.
Referenced by EmitBranchOnBoolExpr().
llvm::Value * CodeGenFunction::getSelectorFromSlot | ( | ) |
Definition at line 439 of file CGException.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateLoad(), and getEHSelectorSlot().
Referenced by emitCatchDispatchBlock(), emitFilterDispatchBlock(), and getEHResumeBlock().
SmallVector< llvm::Type *, 2 > CodeGenFunction::getSVEOverloadTypes | ( | const SVETypeFlags & | TypeFlags, |
llvm::Type * | ReturnType, | ||
ArrayRef< llvm::Value * > | Ops | ||
) |
Definition at line 10281 of file CGBuiltin.cpp.
References clang::SVETypeFlags::isOverloadCvt(), clang::SVETypeFlags::isOverloadDefault(), clang::SVETypeFlags::isOverloadNone(), clang::SVETypeFlags::isOverloadWhileOrMultiVecCvt(), clang::SVETypeFlags::isOverloadWhileRW(), and clang::SVETypeFlags::isReductionQV().
llvm::ScalableVectorType * CodeGenFunction::getSVEPredType | ( | const SVETypeFlags & | TypeFlags | ) |
Definition at line 9680 of file CGBuiltin.cpp.
References clang::SVETypeFlags::getEltType().
llvm::ScalableVectorType * CodeGenFunction::getSVEType | ( | const SVETypeFlags & | TypeFlags | ) |
Definition at line 9715 of file CGBuiltin.cpp.
References clang::SVETypeFlags::getEltType().
|
inline |
Definition at line 2202 of file CodeGenFunction.h.
References Target.
Referenced by canEmitDelegateCallArgs(), EmitAMDGPUDevicePrintfCallExpr(), EmitAtomicExpr(), EmitAutoVarAlloca(), EmitBitTestIntrinsic(), EmitCall(), EmitDestructorBody(), EmitEndEHSpec(), EmitFunctionProlog(), emitGlobalDtorWithCXAAtExit(), emitInterWarpCopyFunction(), EmitNVPTXDevicePrintfCallExpr(), EmitOpenMPDevicePrintfCallExpr(), emitPPCLoadReserveIntrinsic(), EmitSignBit(), EmitStartEHSpec(), EmitTargetArchBuiltinExpr(), EmitX86BitTestIntrinsic(), GetNumNonZeroBytesInInit(), getNVPTXLaneID(), getNVPTXWarpID(), StartFunction(), and wrapWithBPFPreserveStaticOffset().
|
inline |
Definition at line 2204 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getTargetCodeGenInfo().
Referenced by EmitAggregateCopy(), EmitAtomicOp(), EmitCall(), EmitCastLValue(), emitCatchDispatchBlock(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXTypeidExpr(), EmitDeclRefLValue(), clang::CodeGen::CGOpenCLRuntime::emitOpenCLEnqueuedBlock(), EmitParmDecl(), and tryUseTestFPKind().
llvm::BasicBlock * CodeGenFunction::getTerminateFunclet | ( | ) |
getTerminateLandingPad - Return a cleanup funclet that just calls terminate.
Definition at line 1591 of file CGException.cpp.
References Builder, CGM, createBasicBlock(), CurrentFuncletPad, clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getLLVMContext(), and clang::CodeGen::EHPersonality::usesFuncletPads().
Referenced by getFuncletEHDispatchBlock().
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 1567 of file CGException.cpp.
References Builder, CGM, clang::CPlusPlus, createBasicBlock(), clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), clang::CodeGen::CodeGenModule::getCXXABI(), getExceptionFromSlot(), and getLangOpts().
Referenced by getEHDispatchBlock().
llvm::BasicBlock * CodeGenFunction::getTerminateLandingPad | ( | ) |
getTerminateLandingPad - Return a landing pad that just calls terminate.
Definition at line 1533 of file CGException.cpp.
References Builder, CGM, clang::CPlusPlus, createBasicBlock(), CurFn, clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), clang::CodeGen::EHPersonality::get(), getCatchAllValue(), clang::CodeGen::CodeGenModule::getCXXABI(), getLangOpts(), getOpaquePersonalityFn(), clang::CodeGen::CodeGenTypeCache::Int32Ty, and clang::CodeGen::CodeGenTypeCache::Int8PtrTy.
Referenced by EmitLandingPad().
|
inline |
Definition at line 2159 of file CodeGenFunction.h.
References CGM, and clang::CodeGen::CodeGenModule::getTypes().
Referenced by BuildFunctionArgList(), commonEmitCXXMemberOrOperatorCall(), EmitCall(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), EmitCXXConstructorCall(), EmitCXXGlobalVarDeclInit(), EmitDeclRefLValue(), EmitDeleteCall(), EmitFunctionProlog(), emitGlobalDtorWithCXAAtExit(), EmitGlobalVarDeclLValue(), EmitIvarOffsetAsPointerDiff(), emitStructSetterCall(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateObjCGetterBody(), generateObjCSetterBody(), GetNumNonZeroBytesInInit(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), and isSimpleZero().
llvm::Value * CodeGenFunction::getTypeSize | ( | QualType | Ty | ) |
Returns calculated size of the specified type.
Definition at line 327 of file CGStmtOpenMP.cpp.
References clang::CodeGen::CodeGenFunction::VlaSizePair::Type.
Referenced by clang::CodeGen::ReductionCodeGen::emitAggregateType(), EmitCheckTypeDescriptor(), EmitCXXNewExpr(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), EmitFromMemory(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), emitTargetCallKernelLaunch(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), EmitToMemory(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), getOverlapForFieldInit(), getPointerAndSize(), and LValueIsSuitableForInlineAtomic().
llvm::ConstantInt * CodeGenFunction::getUBSanFunctionTypeHash | ( | QualType | T | ) | const |
Return a type hash constant for a function instrumented by -fsanitize=function.
Definition at line 602 of file CodeGenFunction.cpp.
References CGM, clang::EST_None, getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::ASTContext::getFunctionTypeWithExceptionSpec(), clang::CodeGen::CGCXXABI::getMangleContext(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::Type::isFunctionNoProtoType(), and clang::MangleContext::mangleCanonicalTypeName().
Referenced by EmitCall(), and StartFunction().
GetUndefRValue - Get an appropriate 'undef' rvalue for the given type.
Definition at line 1404 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, and clang::CodeGen::TEK_Scalar.
Referenced by EmitCall().
|
inline |
Definition at line 2187 of file CodeGenFunction.h.
References createBasicBlock(), and getLLVMContext().
Referenced by destroyOptimisticNormalEntry(), EmitNoreturnRuntimeCallOrInvoke(), 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 2608 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 2601 of file CodeGenFunction.cpp.
References clang::ASTContext::getAsVariableArrayType(), getContext(), getVLAElements1D(), and clang::ast_matchers::type.
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 2577 of file CodeGenFunction.cpp.
References Builder, getContext(), clang::CodeGen::CodeGenTypeCache::SizeTy, and clang::ast_matchers::type.
Referenced by emitArrayLength(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), emitGlobalToListReduceFunction(), emitListToGlobalReduceFunction(), EmitNullInitialization(), emitPointerArithmetic(), getArrayIndexingBound(), and getVLASize().
CodeGenFunction::VlaSizePair CodeGenFunction::getVLASize | ( | QualType | vla | ) |
Definition at line 2570 of file CodeGenFunction.cpp.
References clang::ASTContext::getAsVariableArrayType(), getContext(), getVLASize(), and clang::ast_matchers::type.
void CodeGenFunction::getVTablePointers | ( | BaseSubobject | Base, |
const CXXRecordDecl * | NearestVBase, | ||
CharUnits | OffsetFromNearestVBase, | ||
bool | BaseIsNonVirtualPrimaryBase, | ||
const CXXRecordDecl * | VTableClass, | ||
VisitedVirtualBasesSetTy & | VBases, | ||
VPtrsVector & | vptrs | ||
) |
Definition at line 2617 of file CGClass.cpp.
References clang::CXXRecordDecl::bases(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::RecordType::getDecl(), clang::ASTRecordLayout::getPrimaryBase(), clang::ASTRecordLayout::getVBaseClassOffset(), getVTablePointers(), and clang::CharUnits::Zero().
CodeGenFunction::VPtrsVector CodeGenFunction::getVTablePointers | ( | const CXXRecordDecl * | VTableClass | ) |
Definition at line 2606 of file CGClass.cpp.
References clang::CharUnits::Zero().
Referenced by EmitVTableAssumptionLoads(), getVTablePointers(), and InitializeVTablePointers().
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 2688 of file CGClass.cpp.
References Builder, CGM, clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenModule::DecorateInstructionWithInvariantGroup(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getTBAAVTablePtrAccessInfo(), and clang::interp::This().
Referenced by EmitVTableAssumptionLoad().
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 462 of file CGClass.cpp.
References Builder, CGM, CurCodeDecl, CurGD, clang::Delegating, clang::CodeGen::CodeGenVTables::GetAddrOfVTT(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::DeclContext::getParent(), clang::CodeGen::CodeGenVTables::getSubVTTIndex(), clang::ASTRecordLayout::getVBaseClassOffset(), clang::CodeGen::CodeGenModule::getVTables(), LoadCXXVTT(), clang::CodeGen::CGCXXABI::NeedsVTTParameter(), and clang::CodeGen::CodeGenTypeCache::VoidPtrTy.
Definition at line 2612 of file CodeGenFunction.h.
References getEvaluationKind(), clang::T, and clang::CodeGen::TEK_Aggregate.
Referenced by EmitAggExpr(), EmitAggExprToLValue(), EmitAnyExprToTemp(), EmitCallAndReturnForThunk(), EmitCallArg(), EmitConditionalOperatorLValue(), EmitFunctionEpilog(), EmitIgnoredConditionalOperator(), emitPseudoObjectExpr(), clang::CodeGen::CGCXXABI::EmitReturnFromThunk(), and clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::shouldBindAsLValue().
|
inline |
Return true if a label was seen in the current scope.
Definition at line 424 of file CodeGenFunction.h.
References clang::CodeGen::CodeGenFunction::LexicalScope::hasLabels().
Referenced by EmitAutoVarAlloca().
Definition at line 2608 of file CodeGenFunction.h.
References getEvaluationKind(), clang::T, and clang::CodeGen::TEK_Scalar.
Referenced by convertToScalarValue(), EmitComplexToScalarConversion(), EmitForwardingCallToLambda(), EmitFunctionProlog(), EmitParmDecl(), EmitScalarConversion(), EmitScalarExpr(), clang::CodeGen::isAggregateTypeForABI(), and StartFunction().
hasVolatileMember - returns true if aggregate type has a volatile member.
Definition at line 2944 of file CodeGenFunction.h.
References clang::Type::getAs(), clang::RecordDecl::hasVolatileMember(), and clang::T.
Referenced by EmitAggregateAssign(), and LValueIsSuitableForInlineAtomic().
|
inline |
HaveInsertPoint - True if an insertion point is defined.
If not, this indicates that the current code being emitted is unreachable.
Definition at line 2658 of file CodeGenFunction.h.
References Builder.
Referenced by AddInitializerToStaticVarDecl(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OMPAllocateCleanupTy::Emit(), emitAlignedClause(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarInit(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitBarrierCall(), EmitCall(), clang::CodeGen::CGOpenMPRuntime::emitCancelCall(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), EmitCleanup(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), EmitDestructorBody(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), clang::CodeGen::CGOpenMPRuntime::emitForOrderedIterationEnd(), clang::CodeGen::CGOpenMPRuntime::emitForStaticFinish(), emitForStaticInitCall(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CGOpenMPRuntime::emitMaskedRegion(), clang::CodeGen::CGOpenMPRuntime::emitMasterRegion(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), clang::CodeGen::CGOpenMPRuntime::emitOrderedRegion(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), emitPostUpdateForReductionClause(), clang::CodeGen::CGOpenMPRuntime::emitProcBindClause(), emitSimdlenSafelenClause(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), clang::CodeGen::CGOpenMPRuntime::emitTargetCall(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskgroupRegion(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntime::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), EnsureInsertPoint(), and protectFromPeepholes().
|
inline |
Increment the profiler's counter for the given statement by StepV
.
If StepV
is null, the default increment is 1.
Definition at line 1631 of file CodeGenFunction.h.
Referenced by EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitConstructorBody(), EmitDestructorBody(), EmitFunctionBody(), emitImplicitAssignmentOperatorBody(), EmitLabel(), GenerateBlockFunction(), and GenerateObjCMethod().
LValue CodeGenFunction::InitCapturedStruct | ( | const CapturedStmt & | S | ) |
Definition at line 3083 of file CGStmt.cpp.
|
inline |
Set up the last cleanup that was pushed as a conditional full-expression cleanup.
Definition at line 922 of file CodeGenFunction.h.
References createCleanupActiveFlag(), and initFullExprCleanupWithFlag().
Referenced by EnterNewDeleteCleanup(), and pushFullExprCleanup().
void CodeGenFunction::initFullExprCleanupWithFlag | ( | RawAddress | ActiveFlag | ) |
Definition at line 283 of file CGCleanup.cpp.
References clang::CodeGen::EHScopeStack::begin(), clang::format::cleanup(), and EHStack.
Referenced by initFullExprCleanup(), and pushLifetimeExtendedDestroy().
void CodeGenFunction::InitializeVTablePointer | ( | const VPtr & | vptr | ) |
Initialize the vtable pointer of the given subobject.
Definition at line 2552 of file CGClass.cpp.
References ApplyNonVirtualAndVirtualOffset(), clang::CodeGen::CodeGenFunction::VPtr::Base, Builder, CGM, clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CodeGenModule::DecorateInstructionWithInvariantGroup(), clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(), clang::BaseSubobject::getBaseOffset(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CodeGen::CodeGenModule::getDataLayout(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::CodeGen::CodeGenModule::getTBAAVTablePtrAccessInfo(), clang::CodeGen::CGCXXABI::GetVirtualBaseClassOffset(), clang::CodeGen::CGCXXABI::getVTableAddressPointInStructor(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CGCXXABI::isVirtualOffsetNeededForVTableField(), clang::CharUnits::isZero(), LoadCXXThisAddress(), clang::CodeGen::CodeGenFunction::VPtr::NearestVBase, clang::CodeGen::CodeGenFunction::VPtr::OffsetFromNearestVBase, clang::CodeGen::CodeGenFunction::VPtr::VTableClass, clang::CodeGen::Address::withElementType(), and clang::CharUnits::Zero().
Referenced by InitializeVTablePointers().
void CodeGenFunction::InitializeVTablePointers | ( | const CXXRecordDecl * | ClassDecl | ) |
Definition at line 2674 of file CGClass.cpp.
References CGM, clang::CodeGen::CGCXXABI::doStructorsInitializeVPtrs(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::CXXRecordDecl::getNumVBases(), getVTablePointers(), clang::CodeGen::CGCXXABI::initializeHiddenVirtualInheritanceMembers(), InitializeVTablePointer(), and clang::CXXRecordDecl::isDynamicClass().
Referenced by EmitBaseInitializer(), EmitCtorPrologue(), and EmitDestructorBody().
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 3025 of file CodeGenFunction.cpp.
|
inline |
Definition at line 378 of file CodeGenFunction.h.
References CurCoro, clang::CodeGen::CodeGenFunction::CGCoroInfo::InSuspendBlock, and isCoroutine().
Referenced by EmitMaterializeTemporaryExpr().
Definition at line 1657 of file CodeGenFunction.h.
References clang::Expr::IgnoreParens(), and clang::BinaryOperator::isLogicalOp().
Referenced by maybeResetMCDCCondBitmap(), and maybeUpdateMCDCTestVectorBitmap().
|
inline |
Returns true while emitting a cleanuppad.
Definition at line 845 of file CodeGenFunction.h.
References CurrentFuncletPad.
Referenced by EmitCall().
|
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 730 of file CGClass.cpp.
References clang::Type::castAs(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXConstructorDecl::isDelegatingConstructor(), and clang::FunctionProtoType::isVariadic().
Referenced by clang::CodeGen::CodeGenPGO::assignRegionCounters(), and EmitConstructorBody().
|
inline |
Definition at line 374 of file CodeGenFunction.h.
References CurCoro, and clang::CodeGen::CodeGenFunction::CGCoroInfo::Data.
Referenced by FinishFunction(), and inSuspendBlock().
|
inline |
isInConditionalBranch - Return true if we're currently emitting one branch or the other of a conditional expression.
Definition at line 1310 of file CodeGenFunction.h.
Referenced by EmitMaterializeTemporaryExpr(), EnterNewDeleteCleanup(), pushCleanupAfterFullExpr(), pushFullExprCleanup(), pushLifetimeExtendedDestroy(), setBeforeOutermostConditional(), and SetupCleanupBlockActivation().
isInstrumentedCondition - Determine whether the given condition is an instrumentable condition (i.e.
Determine whether the given condition is an instrumentable condition (i.e.
no "&&" or "||").
Definition at line 1993 of file CodeGenFunction.cpp.
References clang::BinaryOperator::isLogicalOp(), and stripCond().
Referenced by EmitBranchOnBoolExpr(), and EmitBranchToCounterBlock().
|
inline |
Definition at line 1641 of file CodeGenFunction.h.
References CGM, CurFn, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::hasProfileClangInstr().
Referenced by maybeCreateMCDCCondBitmap(), maybeResetMCDCCondBitmap(), maybeUpdateMCDCCondBitmap(), and maybeUpdateMCDCTestVectorBitmap().
|
static |
Determine whether the pointer type check TCK
permits null pointers.
Definition at line 666 of file CGExpr.cpp.
References TCK_DowncastPointer, TCK_DynamicOperation, TCK_Upcast, and TCK_UpcastToVirtualBase.
Referenced by EmitTypeCheck().
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 1071 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 842 of file CodeGenFunction.h.
References SEHTryEpilogueStack.
Referenced by EmitCall().
Determine whether the given initializer is trivial in the sense that it requires no code to be generated.
Definition at line 1813 of file CGDecl.cpp.
Referenced by AllTrivialInitializers(), checkInitIsRequired(), EmitAutoVarInit(), clang::CodeGen::ReductionCodeGen::emitInitialization(), and emitPrivatesInit().
|
static |
Determine whether the pointer type check TCK
requires a vptr check.
Definition at line 671 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 1445 of file CGExpr.cpp.
Referenced by EmitCheckedLValue(), and EmitMemberExpr().
Address CodeGenFunction::LoadBlockStruct | ( | ) |
Definition at line 1408 of file CGBlocks.cpp.
References clang::CodeGen::CGBlockInfo::BlockAlign, BlockInfo, BlockPointer, and clang::CodeGen::CGBlockInfo::StructureType.
Referenced by GenerateBlockFunction(), and GetAddrOfBlockDecl().
|
inline |
LoadCXXThis - Load the value of 'this'.
This function is only valid while generating code for an C++ member function.
Definition at line 3076 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), EmitCallAndReturnForThunk(), EmitCtorPrologue(), EmitDestructorBody(), EmitMemberInitializer(), and LoadCXXThisAddress().
Address CodeGenFunction::LoadCXXThisAddress | ( | ) |
Definition at line 130 of file CGClass.cpp.
References CGM, CurFuncDecl, clang::CodeGen::CodeGenModule::getClassPointerAlignment(), clang::CharUnits::isZero(), clang::CodeGen::KnownNonNull, LoadCXXThis(), and makeNaturalAddressForPointer().
Referenced by EmitBaseInitializer(), EmitCallAndReturnForThunk(), EmitCtorPrologue(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDestructorBody(), and InitializeVTablePointer().
|
inline |
LoadCXXVTT - Load the VTT parameter to base constructors/destructors have virtual bases.
Definition at line 3086 of file CodeGenFunction.h.
Referenced by GetVTTParameter().
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 1745 of file CGObjC.cpp.
References CurCodeDecl, CurFuncDecl, EmitDeclRefLValue(), EmitLoadOfScalar(), getContext(), and clang::VK_LValue.
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitCXXDestructMethod(), EmitObjCMessageExpr(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
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 886 of file CGExpr.cpp.
References Builder, EmitLoadOfScalar(), getContext(), clang::Expr::getExprLoc(), and clang::Expr::IgnoreParenImpCasts().
Referenced by getArrayIndexingBound().
Function * CodeGenFunction::LookupNeonLLVMIntrinsic | ( | unsigned | IntrinsicID, |
unsigned | Modifier, | ||
llvm::Type * | ArgTy, | ||
const CallExpr * | E | ||
) |
Definition at line 7522 of file CGBuiltin.cpp.
References Add1ArgType, Add2ArgTypes, AddRetType, clang::Function, clang::CallExpr::getCallReturnType(), InventFloatType, 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 1493 of file CGAtomic.cpp.
References CGM, getContext(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::LValue::getType(), getTypeSize(), hasVolatileMember(), and clang::CodeGen::LValue::isVolatile().
Referenced by EmitLoadOfScalar(), and EmitStoreOfScalar().
|
inline |
Definition at line 2709 of file CodeGenFunction.h.
References CGM, clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), and clang::T.
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), complexTempStructure(), convertTempToRValue(), clang::CodeGen::CallArg::copyInto(), EmitAggExprToLValue(), EmitAnyExprToMem(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitAtomicExpr(), EmitAutoVarAlloca(), EmitAutoVarInit(), EmitCallExprLValue(), EmitCastLValue(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCXXBindTemporaryLValue(), EmitCXXConstructLValue(), EmitCXXConstructorCall(), EmitCXXUuidofLValue(), EmitDeclInit(), EmitDeclRefLValue(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitExtVectorElementExpr(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), emitGlobalToListCopyFunction(), EmitGlobalVarDeclLValue(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), emitListToGlobalCopyFunction(), EmitLoadOfPointerLValue(), EmitLoadOfReferenceLValue(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForLambdaField(), EmitMaterializeTemporaryExpr(), EmitMemberExpr(), EmitNontemporalLoad(), EmitNontemporalStore(), EmitObjCEncodeExprLValue(), EmitObjCIsaExpr(), EmitObjCMessageExprLValue(), EmitObjCSelectorLValue(), emitOutlinedFunctionPrologue(), EmitParmDecl(), EmitPointerToDataMemberBinaryExpr(), emitPrivatesInit(), emitPseudoObjectExpr(), EmitStmtExprLValue(), EmitStringLiteralLValue(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), EmitThreadPrivateVarDeclLValue(), EmitUnaryOpLValue(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), emitWritebackArg(), GenerateCopyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GetAddrOfBlockDecl(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), clang::CodeGen::CallArg::getRValue(), InitCatchParam(), loadToBegin(), MakeAddrLValue(), MakeNaturalAlignAddrLValue(), and StoreAnyExprIntoOneUnit().
|
inline |
Definition at line 2715 of file CodeGenFunction.h.
References getContext(), clang::CodeGen::LValue::MakeAddr(), and clang::T.
|
inline |
Definition at line 2720 of file CodeGenFunction.h.
References CGM, clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), MakeAddrLValue(), makeNaturalAddressForPointer(), clang::T, and V.
|
inline |
Definition at line 2736 of file CodeGenFunction.h.
References getContext(), clang::CodeGen::LValue::MakeAddr(), and clang::T.
|
inline |
Construct an address with the natural alignment of T.
If a pointer to T is expected to be signed, the pointer passed to this function must have been signed, and the returned Address will have the pointer authentication information needed to authenticate the signed pointer.
Definition at line 2697 of file CodeGenFunction.h.
References CGM, ConvertTypeForMem(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), and clang::T.
Referenced by EmitCall(), EmitCXXConstructorCall(), EmitDeclRefLValue(), EmitFunctionProlog(), EmitLoadOfPointer(), EmitLoadOfReference(), EmitPointerWithAlignment(), GenerateVarArgsThunk(), clang::CodeGen::CGCXXABI::getThisAddress(), LoadCXXThisAddress(), MakeAddrLValue(), and StartFunction().
Definition at line 211 of file CodeGenFunction.cpp.
References MakeNaturalAlignAddrLValue(), clang::T, and V.
Referenced by emitFrexpBuiltin(), EmitFunctionEpilog(), EmitLValueForLambdaField(), EmitMemberInitializer(), clang::CodeGen::CodeGenFunction::ConstantEmission::getReferenceLValue(), and InitCatchParam().
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 216 of file CodeGenFunction.cpp.
References MakeNaturalAlignAddrLValue(), clang::T, and V.
Referenced by EmitCallExprLValue(), EmitMemberInitializer(), and EmitObjCMessageExprLValue().
Same as MakeNaturalAlignPointeeAddrLValue except that the pointer is known to be unsigned.
Definition at line 225 of file CodeGenFunction.cpp.
References MakeNaturalAlignAddrLValue(), clang::T, and V.
Definition at line 220 of file CodeGenFunction.cpp.
References MakeNaturalAlignAddrLValue(), clang::T, and V.
Referenced by EmitCastLValue(), EmitCXXTypeidLValue(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), and clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset().
|
inline |
Same as MakeAddrLValue above except that the pointer is known to be unsigned.
Definition at line 2728 of file CodeGenFunction.h.
References CGM, ConvertTypeForMem(), getContext(), clang::CodeGen::CodeGenModule::getTBAAAccessInfo(), clang::CodeGen::LValue::MakeAddr(), clang::T, and V.
Referenced by clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalFinalUpdate(), and clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate().
void CodeGenFunction::markAsIgnoreThreadCheckingAtRuntime | ( | llvm::Function * | Fn | ) |
Annotate the function with an attribute that disables TSan checking at runtime.
Definition at line 884 of file CodeGenFunction.cpp.
References clang::SanitizerSet::has(), and SanOpts.
Referenced by GenerateDestroyHelperFunction(), and StartFunction().
|
inline |
Allocate a temp value on the stack that MCDC can use to track condition results.
Definition at line 1649 of file CodeGenFunction.h.
References Builder, CreateIRTemp(), getContext(), and isMCDCCoverageEnabled().
Referenced by EmitConstructorBody(), EmitDestructorBody(), EmitFunctionBody(), and emitImplicitAssignmentOperatorBody().
llvm::CallInst * CodeGenFunction::MaybeEmitFPBuiltinofFD | ( | llvm::FunctionType * | IRFuncTy, |
const SmallVectorImpl< llvm::Value * > & | IRArgs, | ||
llvm::Value * | FnPtr, | ||
StringRef | Name, | ||
unsigned | FDBuiltinID | ||
) |
Definition at line 23788 of file CGBuiltin.cpp.
Referenced by EmitCall().
|
inline |
Zero-init the MCDC temp value.
Definition at line 1663 of file CodeGenFunction.h.
References Builder, isBinaryLogicalOp(), and isMCDCCoverageEnabled().
|
inline |
Update the MCDC temp value with the condition's evaluated result.
Definition at line 1680 of file CodeGenFunction.h.
References Builder, and isMCDCCoverageEnabled().
Referenced by EmitBranchOnBoolExpr().
|
inline |
Increment the profiler's counter for the given expression by StepV
.
If StepV
is null, the default increment is 1.
Definition at line 1672 of file CodeGenFunction.h.
References Builder, isBinaryLogicalOp(), and isMCDCCoverageEnabled().
|
inline |
Definition at line 2679 of file CodeGenFunction.h.
References Builder, clang::CodeGen::Address::getAlignment(), clang::CodeGen::Address::getBasePointer(), clang::CodeGen::Address::getType(), min(), clang::CodeGen::Address::replaceBasePointer(), and clang::CodeGen::Address::setAlignment().
Referenced by EmitConditionalOperatorLValue().
Determine if the given statement might introduce a declaration into the current scope, by being a (possibly-labelled) DeclStmt.
Definition at line 1917 of file CodeGenFunction.cpp.
|
inline |
Determines whether an EH cleanup is required to destroy a type with the given destruction kind.
Definition at line 2260 of file CodeGenFunction.h.
References CGM, 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::CodeGenModule::getCodeGenOpts(), and getLangOpts().
Referenced by EmitArrayDelete(), EmitDeclDestroy(), EmitInitializerForField(), EmitMemberInitializer(), EmitNewArrayInitializer(), GenerateCopyHelperFunction(), getCleanupKind(), pushCaptureCleanup(), and pushEHDestroy().
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 1204 of file CGException.cpp.
References clang::CodeGen::EHScopeStack::begin(), EHStack, emitCatchDispatchBlock(), clang::CodeGen::EHScope::hasEHBranches(), and clang::CodeGen::EHScopeStack::popCatch().
Referenced by clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
void CodeGenFunction::PopCleanupBlock | ( | bool | FallthroughIsBranchThrough = false , |
bool | ForDeactivation = false |
||
) |
PopCleanupBlock - Will pop the cleanup entry on the stack and process all branch fixups.
Pops a cleanup block.
If the block includes a normal cleanup, the current insertion point is threaded through the cleanup, as are any branch fixups on the cleanup.
Definition at line 637 of file CGCleanup.cpp.
References ForDeactivation.
Referenced by EmitArrayDelete(), emitArrayDestroy(), EmitCall(), EmitObjectDelete(), and clang::CodeGen::CodeGenFunction::FinallyInfo::exit().
void CodeGenFunction::PopCleanupBlocks | ( | EHScopeStack::stable_iterator | OldCleanupStackSize, |
size_t | OldLifetimeExtendedStackSize, | ||
std::initializer_list< llvm::Value ** > | ValuesToReload = {} |
||
) |
Takes the old cleanup stack size and emits the cleanup blocks that have been added, then adds all lifetime-extended cleanups from the given position to the stack.
Pops cleanup blocks until the given savepoint is reached, then add the cleanups from the given savepoint in the lifetime-extended cleanups stack.
Definition at line 466 of file CGCleanup.cpp.
References clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getKind(), clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::getSize(), and clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupHeader::isConditional().
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 410 of file CGCleanup.cpp.
References clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::EHScopeStack::stable_iterator::isValid(), and clang::CodeGen::EHScopeStack::stable_iterator::strictlyEncloses().
Referenced by FinishFunction().
void CodeGenFunction::processInReduction | ( | const OMPExecutableDirective & | S, |
OMPTaskDataTy & | Data, | ||
CodeGenFunction & | CGF, | ||
const CapturedStmt * | CS, | ||
OMPPrivateScope & | Scope | ||
) |
Definition at line 5194 of file CGStmtOpenMP.cpp.
void CodeGenFunction::ProcessOrderScopeAMDGCN | ( | llvm::Value * | Order, |
llvm::Value * | Scope, | ||
llvm::AtomicOrdering & | AO, | ||
llvm::SyncScope::ID & | SSID | ||
) |
Definition at line 18203 of file CGBuiltin.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 2792 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 1892 of file CGExprCXX.cpp.
References EHStack, and clang::CodeGen::NormalAndEHCleanup.
|
inline |
Queue a cleanup to be pushed after finishing the current full-expression, potentially with an active flag.
Definition at line 871 of file CodeGenFunction.h.
References createCleanupActiveFlag(), clang::CodeGen::RawAddress::invalid(), isInConditionalBranch(), saveValueInCond(), and clang::T.
|
inline |
|
inline |
Definition at line 911 of file CodeGenFunction.h.
References Builder, clang::CodeGen::CGBuilderTy::CreateFlagLoad(), DeferredDeactivationCleanupStack, EHStack, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::EHScopeStack::stable_begin(), and clang::T.
void CodeGenFunction::pushDestroy | ( | CleanupKind | kind, |
Address | addr, | ||
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
Definition at line 2251 of file CGDecl.cpp.
References clang::ast_matchers::type.
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 2242 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getCleanupKind(), getDestroyer(), and clang::ast_matchers::type.
Referenced by EmitAutoVarWithLifetime(), EmitCall(), clang::CodeGen::ReductionCodeGen::emitCleanups(), EmitParmDecl(), pushCaptureCleanup(), pushDestroyAndDeferDeactivation(), pushEHDestroy(), and pushTemporaryCleanup().
void CodeGenFunction::pushDestroyAndDeferDeactivation | ( | CleanupKind | cleanupKind, |
Address | addr, | ||
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
Definition at line 2269 of file CGDecl.cpp.
References Builder, clang::CodeGen::CGBuilderTy::CreateFlagLoad(), DeferredDeactivationCleanupStack, EHStack, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, pushDestroy(), clang::CodeGen::EHScopeStack::stable_begin(), and clang::ast_matchers::type.
void CodeGenFunction::pushDestroyAndDeferDeactivation | ( | QualType::DestructionKind | dtorKind, |
Address | addr, | ||
QualType | type | ||
) |
Definition at line 2260 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getCleanupKind(), getDestroyer(), and clang::ast_matchers::type.
Referenced by pushLifetimeExtendedDestroy().
void CodeGenFunction::PushDestructorCleanup | ( | const CXXDestructorDecl * | Dtor, |
QualType | T, | ||
Address | Addr | ||
) |
PushDestructorCleanup - Push a cleanup to call the complete-object variant of the given destructor on the object at the given address.
Definition at line 2537 of file CGClass.cpp.
References EHStack, clang::CodeGen::NormalAndEHCleanup, and clang::T.
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 2542 of file CGClass.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::CXXRecordDecl::getDestructor(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::Decl::isUsed(), and clang::T.
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 2232 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup, getDestroyer(), needsEHCleanup(), pushDestroy(), and clang::ast_matchers::type.
Referenced by EmitInitializerForField(), 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 853 of file CodeGenFunction.h.
References EHStack, initFullExprCleanup(), isInConditionalBranch(), clang::CodeGen::EHScopeStack::pushCleanupTuple(), saveValueInCond(), and clang::T.
void CodeGenFunction::pushIrregularPartialArrayCleanup | ( | llvm::Value * | arrayBegin, |
Address | arrayEndPointer, | ||
QualType | elementType, | ||
CharUnits | elementAlign, | ||
Destroyer * | destroyer | ||
) |
pushIrregularPartialArrayCleanup - Push a NormalAndEHCleanup to destroy already-constructed elements of the given array.
The cleanup may be popped with DeactivateCleanupBlock or PopCleanupBlock.
elementType | - the immediate element type of the array; possibly still an array type |
Definition at line 2535 of file CGDecl.cpp.
References clang::CodeGen::NormalAndEHCleanup.
Referenced by EmitNewArrayInitializer().
void CodeGenFunction::pushKmpcAllocFree | ( | CleanupKind | Kind, |
std::pair< llvm::Value *, llvm::Value * > | AddrSizePair | ||
) |
void CodeGenFunction::pushLifetimeExtendedDestroy | ( | CleanupKind | kind, |
Address | addr, | ||
QualType | type, | ||
Destroyer * | destroyer, | ||
bool | useEHCleanupForArray | ||
) |
Definition at line 2288 of file CGDecl.cpp.
References clang::CodeGen::EHScopeStack::begin(), clang::format::cleanup(), createCleanupActiveFlag(), EHStack, initFullExprCleanupWithFlag(), clang::CodeGen::Address::invalid(), isInConditionalBranch(), pushDestroyAndDeferDeactivation(), saveValueInCond(), and clang::ast_matchers::type.
Referenced by EmitCompoundLiteralLValue(), and pushTemporaryCleanup().
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 2551 of file CGDecl.cpp.
References clang::CodeGen::EHCleanup.
Referenced by emitArrayDestroy(), EmitCXXAggrConstructorCall(), and EmitNewArrayInitializer().
void CodeGenFunction::pushSEHCleanup | ( | CleanupKind | kind, |
llvm::Function * | FinallyFunc | ||
) |
Definition at line 2165 of file CGException.cpp.
References EHStack.
void CodeGenFunction::pushStackRestore | ( | CleanupKind | kind, |
Address | SPMem | ||
) |
Definition at line 2279 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 1833 of file CGException.cpp.
References AllocaInsertPt, Builder, CGM, CurFn, clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getBasePointer(), clang::CodeGen::CodeGenModule::getModule(), clang::CodeGen::Address::getName(), clang::CodeGen::Address::getType(), clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::KnownNonNull, ParentCGF, and clang::CodeGen::Address::withPointer().
Referenced by EmitSEHExceptionCodeSave().
void CodeGenFunction::registerGlobalDtorWithAtExit | ( | const VarDecl & | D, |
llvm::FunctionCallee | fn, | ||
llvm::Constant * | addr | ||
) |
Call atexit() with a function that passes the given argument to the given function.
Register a global destructor using the C atexit runtime function.
Definition at line 326 of file CGDeclCXX.cpp.
References createAtExitStub().
void CodeGenFunction::registerGlobalDtorWithAtExit | ( | llvm::Constant * | dtorStub | ) |
Call atexit() with function dtorStub.
Definition at line 343 of file CGDeclCXX.cpp.
References CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenTypeCache::IntTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
void CodeGenFunction::registerGlobalDtorWithLLVM | ( | const VarDecl & | D, |
llvm::FunctionCallee | fn, | ||
llvm::Constant * | addr | ||
) |
Registers the dtor using 'llvm.global_dtors' for platforms that do not support an 'atexit()' function.
Register a global destructor using the LLVM 'llvm.global_dtors' global.
Definition at line 335 of file CGDeclCXX.cpp.
References clang::CodeGen::CodeGenModule::AddGlobalDtor(), CGM, and createAtExitStub().
void CodeGenFunction::ResolveBranchFixups | ( | llvm::BasicBlock * | Target | ) |
Definition at line 371 of file CGCleanup.cpp.
References Block, clang::CodeGen::BranchFixup::Destination, clang::CodeGen::BranchFixup::OptimisticBranchBlock, clang::Switch, and TransitionToCleanupSwitch().
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 679 of file CGExpr.cpp.
References clang::SanitizerSet::has(), and SanOpts.
Referenced by EmitCastLValue(), EmitCXXNewExpr(), EmitReferenceBindingToExpr(), EmitTypeCheck(), and GetAddressOfBaseClass().
|
inline |
Definition at line 793 of file CodeGenFunction.h.
References clang::CodeGen::InvariantValue< T >::save().
Referenced by pushCleanupAfterFullExpr(), pushFullExprCleanup(), and pushLifetimeExtendedDestroy().
|
inline |
Definition at line 1312 of file CodeGenFunction.h.
References clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::CharUnits::getAsAlign(), clang::CodeGen::CodeGenFunction::ConditionalEvaluation::getStartingBlock(), and isInConditionalBranch().
Referenced by createCleanupActiveFlag(), and SetupCleanupBlockActivation().
void CodeGenFunction::setBlockContextParameter | ( | const ImplicitParamDecl * | D, |
unsigned | argNum, | ||
llvm::Value * | ptr | ||
) |
Definition at line 1375 of file CGBlocks.cpp.
References std::arg(), BlockInfo, BlockPointer, Builder, CGM, CreateMemTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::Stmt::getBeginLoc(), clang::CodeGen::CGBlockInfo::getBlockExpr(), clang::BlockExpr::getBody(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), getDebugInfo(), getLangOpts(), getLLVMContext(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::CodeGen::RawAddress::getPointer(), clang::ValueDecl::getType(), clang::CodeGenOptions::hasReducedDebugInfo(), clang::OpenCL, and clang::opencl_generic.
Referenced by EmitParmDecl().
|
inline |
Set the profiler's current count.
Definition at line 1693 of file CodeGenFunction.h.
Referenced by EmitBranchOnBoolExpr().
void CodeGenFunction::SetDivFPAccuracy | ( | llvm::Value * | Val | ) |
Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.
Definition at line 6147 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLangOpts(), clang::HIP, clang::OpenCL, and SetFPAccuracy().
void CodeGenFunction::SetFastMathFlags | ( | FPOptions | FPFeatures | ) |
Set the codegen fast-math flags.
Definition at line 125 of file CodeGenFunction.cpp.
References clang::FPOptions::allowFPContractAcrossStatement(), and Builder.
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 6115 of file CGExpr.cpp.
References getLLVMContext(), and Node.
Referenced by SetDivFPAccuracy(), and SetSqrtFPAccuracy().
void CodeGenFunction::SetSqrtFPAccuracy | ( | llvm::Value * | Val | ) |
Set the minimum required accuracy of the given sqrt operation based on CodeGenOpts.
Definition at line 6126 of file CGExpr.cpp.
References CGM, clang::CodeGen::CodeGenModule::getCodeGenOpts(), getLangOpts(), clang::HIP, clang::OpenCL, and SetFPAccuracy().
Referenced by EmitCall().
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 2892 of file CGClass.cpp.
References CGM, clang::NoSanitizeList::containsType(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::ASTContext::getNoSanitizeList(), clang::NamedDecl::getQualifiedNameAsString(), clang::SanitizerSet::has(), clang::CodeGen::CodeGenModule::HasHiddenLTOVisibility(), clang::CodeGenOptions::SanitizeTrap, SanOpts, and clang::TypeName.
bool CodeGenFunction::ShouldInstrumentFunction | ( | ) |
ShouldInstrumentFunction - Return true if the current function should be instrumented with __cyg_profile_func_* calls.
Definition at line 563 of file CodeGenFunction.cpp.
References CGM, CurFuncDecl, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::Decl::hasAttr().
Referenced by FinishFunction(), and StartFunction().
Definition at line 2192 of file CGExprScalar.cpp.
References clang::CastExpr::getCastKind(), clang::CastExpr::getSubExpr(), and clang::Expr::IgnoreParens().
Referenced by EmitPointerWithAlignment().
bool CodeGenFunction::ShouldSkipSanitizerInstrumentation | ( | ) |
ShouldSkipSanitizerInstrumentation - Return true if the current function should not be instrumented with sanitizers.
Definition at line 573 of file CodeGenFunction.cpp.
References CurFuncDecl, and clang::Decl::hasAttr().
Referenced by StartFunction().
|
inline |
Definition at line 2169 of file CodeGenFunction.h.
References CGM, and 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 581 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 556 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 3387 of file CodeGenFunction.cpp.
References getDebugInfo().
Referenced by GenerateCode().
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 940 of file CodeGenFunction.cpp.
References clang::CodeGen::CGSYCLRuntime::actOnFunctionStart(), AllocaInsertPt, clang::ProfileList::Allow, AutoreleaseResult, Builder, CGM, ConvergenceTokenStack, ConvertType(), clang::CPlusPlus, clang::CodeGen::CGBuilderTy::CreateAlignedLoad(), createBasicBlock(), CreateDefaultAlignTempAlloca(), CreateIRTemp(), clang::CodeGen::CGBuilderTy::CreateStore(), clang::CodeGen::CGBuilderTy::CreateStructGEP(), clang::CUDA, CurCodeDecl, CurFn, CurFnInfo, CurFuncDecl, CurFuncIsThunk, CurSEHParent, EHStack, clang::CodeGen::CGHLSLRuntime::emitEntryFunction(), clang::CodeGen::CGOpenMPRuntime::emitFunctionProlog(), EmitFunctionProlog(), clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), EmitLoadOfLValue(), EmitLValueForLambdaField(), clang::CodeGen::Address::emitRawPointer(), EmitStartEHSpec(), EmitTypeCheck(), EmitVariablyModifiedType(), endsWithReturn(), clang::RecordDecl::fields(), FnRetTy, clang::ProfileList::Forbid, clang::XRayInstrKind::FunctionEntry, clang::XRayInstrKind::FunctionExit, clang::CodeGen::CGFunctionInfo::getArgStruct(), clang::Decl::getAttr(), clang::FunctionDecl::getBody(), clang::CXXRecordDecl::getCaptureFields(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), getContext(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), getDebugInfo(), clang::GlobalDecl::getDecl(), clang::LangOptions::getDefaultRoundingMode(), clang::CodeGen::CodeGenModule::getDiags(), clang::CodeGen::CodeGenModule::getHLSLRuntime(), clang::CodeGen::ABIArgInfo::getInAllocaFieldIndex(), clang::CodeGen::ABIArgInfo::getIndirectAlign(), clang::CodeGen::ABIArgInfo::getIndirectByVal(), getJumpDestInCurrentScope(), clang::CodeGen::ABIArgInfo::getKind(), getLangOpts(), getLLVMContext(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::Decl::getNonClosureContext(), clang::Type::getNullability(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::FunctionDecl::getOverloadedOperator(), clang::CXXMethodDecl::getParent(), clang::CodeGen::LValue::getPointer(), clang::CodeGen::CodeGenTypeCache::getPointerAlign(), getPrologueSignature(), clang::SourceLocation::getRawEncoding(), clang::CodeGen::CGFunctionInfo::getReturnInfo(), clang::CodeGen::CGFunctionInfo::getReturnType(), clang::CodeGen::RValue::getScalarVal(), clang::Stmt::getStmtClass(), clang::CodeGen::CodeGenModule::getSYCLRuntime(), getTarget(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::Address::getType(), getUBSanFunctionTypeHash(), clang::SanitizerSet::has(), clang::XRayInstrSet::has(), clang::Decl::hasAttr(), clang::SanitizerSet::hasOneOf(), clang::CodeGenOptions::hasSanitizeBinaryMetadata(), clang::CodeGenOptions::hasSanitizeCoverage(), hasScalarEvaluationKind(), clang::HIP, clang::CodeGen::CodeGenModule::imbueXRayAttrs(), clang::CodeGen::ABIArgInfo::InAlloca, clang::CodeGen::ABIArgInfo::Indirect, clang::CodeGen::CodeGenTypeCache::Int32Ty, clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::CodeGen::Address::invalid(), clang::CXXRecordDecl::isCapturelessLambda(), clang::CodeGen::CodeGenModule::isFunctionBlockedFromProfileInstr(), clang::DiagnosticsEngine::isIgnored(), clang::CXXMethodDecl::isImplicitObjectMemberFunction(), clang::CXXRecordDecl::isLambda(), clang::isLambdaCallOperator(), clang::FunctionDecl::isMain(), clang::FunctionDecl::isMSVCRTEntryPoint(), clang::Type::isObjCRetainableType(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::CodeGen::CGFunctionInfo::isReturnsRetained(), clang::CodeGen::ABIArgInfo::isSRetAfterThis(), clang::CXXMethodDecl::isStatic(), clang::IdentifierInfo::isStr(), clang::Type::isVariablyModifiedType(), clang::Type::isVoidType(), clang::CodeGen::KnownNonNull, LambdaCaptureFields, LambdaThisCaptureField, Loc, makeNaturalAddressForPointer(), markAsIgnoreThreadCheckingAtRuntime(), clang::SanitizerSet::Mask, matchesStlAllocatorFn(), clang::NonNull, Offset, clang::OMF_dealloc, clang::OMF_initialize, clang::OpenCL, clang::CodeGenOptions::ProfileNone, PrologueCleanupDepth, clang::DiagnosticsEngine::Report(), ReturnBlock, ReturnValue, ReturnValuePointer, clang::CodeGenOptions::SampleProfileFile, SanOpts, clang::SanitizerSet::set(), clang::CodeGen::CodeGenModule::shouldEmitConvergenceTokens(), ShouldInstrumentFunction(), ShouldSkipSanitizerInstrumentation(), ShouldXRayInstrumentFunction(), clang::ProfileList::Skip, clang::Decl::specific_attrs(), clang::CodeGen::EHScopeStack::stable_begin(), TCK_ConstructorCall, TCK_MemberCall, clang::ToConstrainedExceptMD(), UINT_MAX, clang::FunctionDecl::UsesFPIntrin(), clang::FunctionDecl::usesSEHTry(), and clang::CodeGenOptions::XRayInstrumentationBundle.
Referenced by createAtExitStub(), createTLSAtExitStub(), EmitCfiCheckFail(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), emitInterWarpCopyFunction(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), emitOutlinedFunctionPrologue(), emitShuffleAndReduceFunction(), GenerateBlockFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), StartObjCMethod(), and StartThunk().
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 752 of file CGObjC.cpp.
References clang::CodeGen::CodeGenTypes::arrangeObjCMethodDeclaration(), CGM, CurGD, EHStack, clang::CodeGen::CGObjCRuntime::GenerateDirectMethodPrologue(), clang::CodeGen::CGObjCRuntime::GenerateMethod(), getARCCleanupKind(), clang::ObjCMethodDecl::getBeginLoc(), clang::ObjCMethodDecl::getCmdDecl(), clang::ObjCMethodDecl::getEndLoc(), clang::Selector::getIdentifierInfoForSlot(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Decl::getLocation(), clang::CodeGen::CodeGenModule::getObjCRuntime(), clang::ObjCMethodDecl::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCMethodDecl::getSelfDecl(), clang::CodeGen::CodeGenModule::getTypes(), clang::Decl::hasAttr(), clang::HiddenVisibility, clang::ObjCMethodDecl::isDirectMethod(), clang::ObjCMethodDecl::isInstanceMethod(), clang::IdentifierInfo::isStr(), clang::Selector::isUnarySelector(), clang::CodeGen::noSystemDebugInfo(), clang::ObjCMethodDecl::param_begin(), clang::ObjCMethodDecl::param_end(), clang::CodeGen::CodeGenModule::SetInternalFunctionAttributes(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributes(), clang::CodeGen::CodeGenModule::SetLLVMFunctionAttributesForDefinition(), 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 2015 of file CGException.cpp.
References clang::Stmt::getBeginLoc().
Referenced by GenerateSEHFilterFunction(), and GenerateSEHFinallyFunction().
void CodeGenFunction::StartThunk | ( | llvm::Function * | Fn, |
GlobalDecl | GD, | ||
const CGFunctionInfo & | FnInfo, | ||
bool | IsUnprototyped | ||
) |
Definition at line 246 of file CGVTables.cpp.
References clang::CodeGen::CGCXXABI::addImplicitStructorParams(), clang::CodeGen::CGCXXABI::buildThisParam(), clang::Type::castAs(), CGM, clang::CodeGen::ApplyDebugLocation::CreateArtificial(), clang::CodeGen::ApplyDebugLocation::CreateEmpty(), CurCodeDecl, CurFuncDecl, CurFuncIsThunk, CurGD, clang::CodeGen::CGCXXABI::EmitInstanceFunctionProlog(), clang::CodeGen::CodeGenModule::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::Decl::getLocation(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), clang::CodeGen::CGCXXABI::hasMostDerivedReturn(), clang::CodeGen::CGCXXABI::HasThisReturn(), clang::FunctionDecl::param_begin(), clang::FunctionDecl::param_end(), StartFunction(), clang::ASTContext::VoidPtrTy, and clang::ASTContext::VoidTy.
Referenced by generateThunk().
Ignore parentheses and logical-NOT to track conditions consistently.
Strip parentheses and simplistic logical-NOT operators.
Definition at line 1982 of file CodeGenFunction.cpp.
Referenced by isInstrumentedCondition().
llvm::Type * CodeGenFunction::SVEBuiltinMemEltTy | ( | const SVETypeFlags & | TypeFlags | ) |
SVEBuiltinMemEltTy - Returns the memory element type for this memory access builtin.
Only required if it can't be inferred from the base pointer operand.
Definition at line 9627 of file CGBuiltin.cpp.
References clang::SVETypeFlags::getMemEltType().
CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant | ( | const MemberExpr * | ME | ) |
Definition at line 1825 of file CGExpr.cpp.
References tryEmitAsConstant(), and tryToConvertMemberExprToDeclRefExpr().
CodeGenFunction::ConstantEmission CodeGenFunction::tryEmitAsConstant | ( | DeclRefExpr * | refExpr | ) |
Try to emit a reference to the given value without producing it as an l-value.
This is just an optimization, but it avoids us needing to emit global copies of variables if they're named without triggering a formal use in a context where we can't emit a direct reference to them, for instance if a block or lambda or a member of a local class uses a const int variable or constexpr variable from an enclosing function.
Definition at line 1727 of file CGExpr.cpp.
References CEK_AsReferenceOnly, CEK_AsValueOnly, CEK_None, CGM, checkVarTypeForConstantEmission(), CurCodeDecl, clang::APValue::LValueBase::dyn_cast(), 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::CodeGen::CodeGenModule::getLangOpts(), clang::DeclRefExpr::getLocation(), clang::APValue::getLValueBase(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::Expr::EvalStatus::HasSideEffects, clang::APValue::isLValue(), clang::DeclRefExpr::refersToEnclosingVariableOrCapture(), clang::Expr::EvalResult::Val, and clang::dataflow::var().
Referenced by tryEmitARCRetainLoadOfScalar(), and tryEmitAsConstant().
QualType CodeGenFunction::TypeOfSelfObject | ( | ) |
TypeOfSelfObject - Return type of object that this self represents.
Definition at line 1753 of file CGObjC.cpp.
References CurFuncDecl, getContext(), clang::ObjCObjectPointerType::getPointeeType(), clang::ObjCMethodDecl::getSelfDecl(), and clang::ValueDecl::getType().
Referenced by emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), emitStructSetterCall(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and generateObjCSetterBody().
void CodeGenFunction::unprotectFromPeepholes | ( | PeepholeProtection | protection | ) |
Definition at line 2811 of file CodeGenFunction.cpp.
Referenced by clang::CodeGen::CodeGenFunction::OpaqueValueMappingData::unbind().
llvm::Value * CodeGenFunction::unregisterGlobalDtorWithUnAtExit | ( | llvm::Constant * | dtorStub | ) |
Call unatexit() with function dtorStub.
Definition at line 364 of file CGDeclCXX.cpp.
References CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenTypeCache::IntTy, and clang::CodeGen::CodeGenTypeCache::VoidTy.
Value * CodeGenFunction::vectorWrapScalar16 | ( | llvm::Value * | Op | ) |
Definition at line 9615 of file CGBuiltin.cpp.
void CodeGenFunction::VolatilizeTryBlocks | ( | llvm::BasicBlock * | BB, |
llvm::SmallPtrSet< llvm::BasicBlock *, 10 > & | V | ||
) |
Definition at line 1697 of file CGException.cpp.
References Builder, SEHTryEpilogueStack, and V.
|
friend |
Definition at line 262 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 432 of file CodeGenFunction.h.
Referenced by emitOffloadingArrays(), emitTargetCallKernelLaunch(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), FinishFunction(), generateObjCSetterBody(), getPostAllocaInsertPoint(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::InlinedRegionBodyRAII::InlinedRegionBodyRAII(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OutlinedRegionBodyRAII::OutlinedRegionBodyRAII(), recoverAddrOfEscapedLocal(), clang::CodeGen::CGOpenMPRuntime::setLocThreadIdInsertPt(), StartFunction(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::InlinedRegionBodyRAII::~InlinedRegionBodyRAII(), and clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OutlinedRegionBodyRAII::~OutlinedRegionBodyRAII().
In ARC, whether we should autorelease the return value.
Definition at line 593 of file CodeGenFunction.h.
Referenced by EmitCallAndReturnForThunk(), EmitFunctionEpilog(), GenerateObjCCtorDtorMethod(), generateObjCGetterBody(), and StartFunction().
const CodeGen::CGBlockInfo* clang::CodeGen::CodeGenFunction::BlockInfo = nullptr |
Definition at line 645 of file CodeGenFunction.h.
Referenced by EmitFunctionEpilog(), EmitLambdaBlockInvokeBody(), EmitParmDecl(), GenerateBlockFunction(), GetAddrOfBlockDecl(), getCaptureFieldType(), LoadBlockStruct(), and setBlockContextParameter().
llvm::Value* clang::CodeGen::CodeGenFunction::BlockPointer = nullptr |
Definition at line 646 of file CodeGenFunction.h.
Referenced by GenerateBlockFunction(), LoadBlockStruct(), and setBlockContextParameter().
CGBuilderTy clang::CodeGen::CodeGenFunction::Builder |
Definition at line 296 of file CodeGenFunction.h.
Referenced by AdjustObjCObjectType(), clang::CodeGen::ReductionCodeGen::adjustPrivateAddress(), clang::CodeGen::CallArgList::allocateArgumentMemory(), clang::CodeGen::ApplyDebugLocation::ApplyDebugLocation(), clang::CodeGen::ApplyInlineDebugLocation::ApplyInlineDebugLocation(), ApplyNonVirtualAndVirtualOffset(), BuildAppleKextVirtualCall(), castToBase(), castValueToType(), CheckAggExprForMemSetUse(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), CoerceIntOrPtrToIntOrPtr(), complexTempStructure(), createAtExitStub(), createCleanupActiveFlag(), CreateCoercedLoad(), CreateCoercedStore(), CreateMultiVersionResolverReturn(), createPlaceholderSlot(), createRuntimeShuffleFunction(), createTLSAtExitStub(), clang::CodeGen::CatchRetScope::Emit(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OMPAllocateCleanupTy::Emit(), EmitAbs(), emitAddressAtOffset(), emitAddrOfFieldStorage(), emitAddrOfImagComponent(), emitAddrOfRealComponent(), emitAddrOfZeroSizeField(), EmitAggregateCopy(), EmitAggregateStore(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), emitAlignmentAssumption(), emitAlignmentAssumptionCheck(), EmitAMDGPUDevicePrintfCallExpr(), EmitAnnotationCall(), emitARCCopyOperation(), EmitARCDestroyStrong(), EmitARCInitWeak(), emitARCOperationAfterCall(), EmitARCRelease(), EmitARCRetainAutorelease(), EmitARCRetainBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), emitARCValueOperation(), emitArgumentDemotion(), EmitArrayDelete(), emitArrayDestroy(), emitArrayLength(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), emitArraySubscriptGEP(), EmitArrayToPointerDecay(), emitAtomicCmpXchg(), EmitAtomicCmpXchg128ForMSIntrin(), emitAtomicCmpXchgFailureSet(), EmitAtomicCmpXchgForMSIntrin(), EmitAtomicDecrementValue(), EmitAtomicExpr(), EmitAtomicIncrementValue(), EmitAtomicOp(), EmitAtomicStore(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), EmitAutoVarInit(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBinaryAtomicPost(), emitBinaryBuiltin(), emitBinaryExpMaybeConstrainedFPBuiltin(), EmitBitfieldConversionCheck(), EmitBitTestIntrinsic(), EmitBlock(), EmitBlockAfterUses(), emitBlockByrefAddress(), EmitBlockCallExpr(), EmitBranch(), EmitBranchOnBoolExpr(), EmitBuiltinAvailable(), emitByrefStructureInit(), EmitCall(), EmitCallArg(), emitCallMaybeConstrainedFPBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), emitCapturedStmtCall(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::EmitCaptureStmt(), emitCatchDispatchBlock(), emitCatchPadBlock(), EmitCfiCheckFail(), EmitCfiSlowPathCheck(), EmitCheck(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), emitCheckHandlerCall(), EmitCheckSourceLocation(), EmitCheckValue(), EmitCleanup(), emitCmdValueForGetterSetterBody(), EmitCMSEClearRecord(), EmitCommonNeonSISDBuiltinExpr(), EmitComplexPrePostIncDec(), EmitConditionalOperatorLValue(), EmitCoroutineIntrinsic(), EmitCountedByFieldExpr(), clang::CodeGen::CGOpenMPRuntime::emitCriticalRegion(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCtorPrologue(), EmitCXXAggrConstructorCall(), EmitCXXDeleteExpr(), EmitCXXGuardedInitBranch(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXPseudoDestructorExpr(), EmitDeclRefLValue(), EmitDelegateCallArg(), EmitDeleteCall(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), emitDependData(), clang::CodeGen::CGOpenMPRuntime::emitDepobjDependClause(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElements(), clang::CodeGen::CGOpenMPRuntime::emitDepobjElementsSizes(), emitDestroy(), clang::CodeGen::CGOpenMPRuntime::emitDestroyClause(), EmitDestructorBody(), emitDeviceID(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitDoacrossOrdered(), EmitDynamicCast(), EmitDynamicCastToNull(), emitDynamicTlsInitialization(), emitDynamicTlsInitializationCall(), emitDynCGGroupMem(), clang::CodeGen::CGOpenMPRuntime::emitErrorCall(), EmitExtVectorElementExpr(), EmitExtVectorElementLValue(), EmitFAbs(), EmitFieldAnnotations(), EmitFieldSYCLAnnotations(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), clang::CodeGen::CGOpenMPRuntime::emitForDispatchInit(), emitForStaticInitCall(), emitFPIntBuiltin(), emitFrexpBuiltin(), EmitFromInt(), EmitFromMemory(), EmitFunctionEpilog(), EmitFunctionProlog(), emitGlobalToListCopyFunction(), emitGlobalToListReduceFunction(), EmitGlobalVarDeclLValue(), clang::CodeGen::CGObjCRuntime::EmitInitOfCatchParam(), EmitIntelFPGAFieldAnnotations(), emitInterWarpCopyFunction(), EmitInvariantStart(), EmitISOVolatileLoad(), EmitISOVolatileStore(), emitIsPlatformVersionAtLeast(), EmitIvarOffsetAsPointerDiff(), EmitLabel(), EmitLandingPad(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalUpdate(), EmitLifetimeEnd(), EmitLifetimeStart(), emitListToGlobalCopyFunction(), emitListToGlobalReduceFunction(), EmitllvmFAbs(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfLValue(), EmitLoadOfPointer(), EmitLoadOfReference(), EmitLoadOfScalar(), EmitLValueForField(), EmitMaterializeTemporaryExpr(), EmitMatrixSubscriptExpr(), emitMaybeConstrainedFPToIntRoundBuiltin(), EmitMemberInitializer(), clang::CodeGen::CGCXXABI::EmitMemberPointerComparison(), clang::CodeGen::CGCXXABI::EmitMemberPointerIsNotNull(), EmitMustTailThunk(), EmitNewArrayInitializer(), EmitNonNullRValueCheck(), emitNonZeroVLAInit(), EmitNoreturnRuntimeCallOrInvoke(), EmitNullabilityCheck(), EmitNullBaseClassInitialization(), EmitNullInitialization(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsForTargetDirective(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsClause(), clang::CodeGen::CGOpenMPRuntime::emitNumThreadsForTargetDirective(), EmitObjCAutoreleasePoolPop(), EmitObjCBoxedExpr(), EmitObjCMessageExpr(), EmitObjCRelease(), emitObjCValueOperation(), emitOffloadingArrays(), EmitOMPAggregateInit(), EmitOMPAggregateReduction(), emitOMPArraySectionBase(), emitOMPAtomicCompareExpr(), clang::CodeGen::CGOpenMPRuntimeGPU::emitOutlinedFunctionCall(), EmitOverflowCheckedAbs(), EmitOverflowIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitParallelCall(), EmitParmDecl(), emitPartialArrayDestroy(), emitPointerArithmetic(), EmitPointerWithAlignment(), emitPostUpdateForReductionClause(), emitPPCLoadReserveIntrinsic(), emitPreserveStructAccess(), emitPrivatesInit(), EmitPromotedValue(), emitRangedBuiltin(), emitRestoreIP(), EmitReturnBlock(), EmitReturnValueCheck(), clang::CodeGen::emitRoundPointerUpToAlignment(), EmitSanitizerStatReport(), EmitScalarFMAExpr(), EmitScalarRangeCheck(), EmitSEHAbnormalTermination(), EmitSEHExceptionCode(), EmitSEHExceptionCodeSave(), EmitSehScope(), emitShuffleAndReduceFunction(), EmitSignBit(), clang::CodeGen::CGOpenMPRuntime::emitSingleRegion(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughExtVectorComponentLValue(), EmitStoreThroughLValue(), emitStructSetterCall(), EmitSYCLAnnotationCall(), EmitSynthesizedCXXCopyCtorCall(), EmitSystemZIntrinsicWithCC(), emitTargetCallFallback(), emitTargetCallKernelLaunch(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskLoopCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFini(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionFixups(), clang::CodeGen::CGOpenMPRuntime::emitTaskReductionInit(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntime::emitTeamsCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsCall(), emitTernaryBuiltin(), emitTernaryMaybeConstrainedFPBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), clang::CodeGen::CGOpenMPRuntime::emitThreadPrivateVarInit(), emitTlsGuardCheck(), EmitToInt(), EmitToMemory(), EmitTrapCall(), EmitTrapCheck(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitTypeMetadataCodeForVCall(), clang::CodeGen::CGOpenMPRuntime::emitUDMapperArrayInitOrDel(), EmitUnPromotedValue(), EmitUnreachable(), clang::CodeGen::CGOpenMPRuntime::emitUpdateClause(), clang::CodeGen::EmitVAArgInstr(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVariablyModifiedType(), clang::CodeGen::emitVoidPtrDirectVAArg(), clang::CodeGen::emitVoidPtrVAArg(), EmitVTablePtrCheck(), EmitVTablePtrCheckForCast(), EmitVTableTypeCheckedLoad(), emitWasmCatchPadBlock(), emitWriteback(), emitWritebackArg(), EmitX86_64VAArgFromMemory(), EmitX86BitTestIntrinsic(), EmitX86CompressExpand(), EmitX86CompressStore(), EmitX86ConvertIntToFp(), EmitX86CvtF16ToFloatExpr(), EmitX86ExpandLoad(), EmitX86FMAExpr(), EmitX86FunnelShift(), EmitX86MaskedLoad(), EmitX86MaskedStore(), EmitX86MaskLogic(), EmitX86Muldq(), EmitX86ScalarSelect(), EmitX86Select(), EmitX86SExtMask(), EmitX86Ternlog(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), EnterStructPointerForCoercedAccess(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::FinalizeOMPRegion(), findDominatingStoreToReturnValue(), FinishFunction(), forConstantArrayExpansion(), clang::CodeGen::CallArgList::freeArgumentMemory(), GenerateBlockFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateDestroyHelperFunction(), generateObjCGetterBody(), generateObjCSetterBody(), GenerateSEHFilterFunction(), GenerateVarArgsThunk(), clang::CodeGen::CodeGenModule::GenKernelArgMetadata(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), GetAddressOfDirectBaseInCompleteClass(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), GetAddrOfBlockDecl(), clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), getArrayIndexingBound(), clang::CodeGen::getCXXDestructorImplicitParam(), clang::CodeGen::CGOpenMPRuntime::getDepobjElements(), getEHResumeBlock(), getExceptionFromSlot(), getFuncletEHDispatchBlock(), getGEPIndicesToField(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUNumThreads(), clang::CodeGen::CGOpenMPRuntimeGPU::getKmpcAllocShared(), getMaskVecValue(), getNVPTXLaneID(), getNVPTXWarpID(), clang::CodeGen::CGOpenMPRuntimeGPU::getParameterAddress(), getPointerAndSize(), getSelectorFromSlot(), clang::CodeGen::CGOpenMPRuntime::getTaskReductionItem(), getTerminateFunclet(), getTerminateHandler(), getTerminateLandingPad(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), getVLASize(), GetVTablePtr(), GetVTTParameter(), HaveInsertPoint(), InitCatchParam(), initializeAlloca(), InitializeVTablePointer(), clang::CodeGen::CodeGenFunction::LexicalScope::LexicalScope(), clang::CodeGen::CGCXXABI::loadIncomingCXXThis(), LoadPassedObjectSize(), MakeBinaryAtomicValue(), maybeCreateMCDCCondBitmap(), maybeResetMCDCCondBitmap(), maybeUpdateMCDCCondBitmap(), maybeUpdateMCDCTestVectorBitmap(), mergeAddressesInConditionalExpr(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), PerformReturnAdjustment(), performTypeAdjustment(), protectFromPeepholes(), pushCleanupAndDeferDeactivation(), pushDestroyAndDeferDeactivation(), clang::CodeGen::CGCXXABI::ReadArrayCookie(), recoverAddrOfEscapedLocal(), ResolveAllBranchFixups(), clang::CodeGen::DominatingLLVMValue::restore(), clang::CodeGen::DominatingLLVMValue::save(), setBlockContextParameter(), SetFastMathFlags(), clang::CodeGen::CGOpenMPRuntime::setLocThreadIdInsertPt(), SetupCleanupBlockActivation(), clang::CodeGen::CodeGenFunction::OMPMapVars::setVarAddr(), shuffleAndStore(), SimplifyCleanupEntry(), StartFunction(), tryEmitFusedAutoreleaseOfResult(), tryRemoveRetainOfSelf(), tryUseTestFPKind(), VolatilizeTryBlocks(), wrapWithBPFPreserveStaticOffset(), clang::CodeGen::ApplyDebugLocation::~ApplyDebugLocation(), clang::CodeGen::ApplyInlineDebugLocation::~ApplyInlineDebugLocation(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().
VarBypassDetector clang::CodeGen::CodeGenFunction::Bypasses |
Definition at line 300 of file CodeGenFunction.h.
Referenced by EmitAutoVarAlloca(), and GenerateCode().
CGCapturedStmtInfo* clang::CodeGen::CodeGenFunction::CapturedStmtInfo = nullptr |
Definition at line 533 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGOpenMPRuntimeGPU::adjustTargetSpecificDataForLambdas(), clang::CodeGen::CodeGenFunction::CGCapturedStmtRAII::CGCapturedStmtRAII(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), clang::CodeGen::CGOpenMPRuntime::emitCancelCall(), clang::CodeGen::CGOpenMPRuntime::emitCancellationPointCall(), EmitDeclRefLValue(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), clang::CodeGen::CGOpenMPRuntime::emitInlinedDirective(), clang::CodeGen::CGOpenMPRuntime::emitTaskCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntime::emitThreadIDAddress(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), and clang::CodeGen::CodeGenFunction::CGCapturedStmtRAII::~CGCapturedStmtRAII().
CodeGenModule& clang::CodeGen::CodeGenFunction::CGM |
Definition at line 288 of file CodeGenFunction.h.
Referenced by AddInitializerToStaticVarDecl(), AddVariableConstraints(), AlwaysEmitXRayCustomEvents(), AlwaysEmitXRayTypedEvents(), ApplyNonVirtualAndVirtualOffset(), BuildAppleKextVirtualCall(), BuildAppleKextVirtualDestructorCall(), BuildBlockRelease(), BuildFunctionArgList(), CalculateCookiePadding(), CallBeginCatch(), callSpecialFunction(), canEmitDelegateCallArgs(), canEmitSpuriousReferenceToVariable(), CheckAtomicAlignment(), checkIfFunctionMustProgress(), checkIfLoopMustProgress(), checkTargetFeatures(), CoerceIntOrPtrToIntOrPtr(), commonEmitCXXMemberOrOperatorCall(), complexTempStructure(), ConstantFoldsToSimpleInteger(), ConvertType(), ConvertTypeForMem(), createAtExitStub(), CreateCoercedLoad(), CreateCoercedStore(), createCoroData(), createRuntimeShuffleFunction(), createTLSAtExitStub(), defaultInitNonTrivialCStructVar(), emitAddrOfFieldStorage(), EmitAggregateCopy(), emitAlignmentAssumption(), EmitAMDGPUDevicePrintfCallExpr(), EmitAnnotationCall(), EmitARCAutorelease(), EmitARCAutoreleaseReturnValue(), emitARCCopyOperation(), EmitARCCopyWeak(), EmitARCDestroyStrong(), EmitARCDestroyWeak(), EmitARCInitWeak(), EmitARCIntrinsicUse(), emitARCLoadOperation(), EmitARCLoadWeak(), EmitARCLoadWeakRetained(), EmitARCMoveWeak(), EmitARCNoopIntrinsicUse(), EmitARCReclaimReturnedObject(), EmitARCRelease(), EmitARCRetainAutoreleaseNonBlock(), EmitARCRetainAutoreleaseReturnValue(), EmitARCRetainBlock(), EmitARCRetainNonBlock(), emitARCStoreOperation(), EmitARCStoreStrongCall(), EmitARCStoreWeak(), emitARCValueOperation(), EmitArrayDelete(), EmitArraySectionExpr(), EmitArraySubscriptExpr(), EmitArrayToPointerDecay(), EmitAtomicExpr(), emitAtomicLibcall(), EmitAtomicOp(), EmitAtomicStore(), emitAutoreleasedReturnValueMarker(), EmitAutoVarAlloca(), EmitAutoVarCleanups(), EmitAutoVarDecl(), EmitAutoVarInit(), clang::CodeGen::CGOpenMPRuntime::emitBarrierCall(), EmitBaseInitializer(), emitBinaryBuiltin(), emitBinaryExpMaybeConstrainedFPBuiltin(), EmitBinaryOperatorLValue(), EmitBlockCallExpr(), EmitBlockCopyAndAutorelease(), EmitBlockLiteral(), EmitBranchOnBoolExpr(), EmitBranchToCounterBlock(), EmitBuiltinAvailable(), emitByrefStructureInit(), EmitCall(), EmitCallAndReturnForThunk(), emitCallMaybeConstrainedFPBuiltin(), EmitCastLValue(), emitCatchDispatchBlock(), EmitCfiCheckFail(), EmitCfiCheckStub(), EmitCfiSlowPathCheck(), EmitCheck(), emitCheckHandlerCall(), EmitCheckSourceLocation(), EmitCheckTypeDescriptor(), EmitCMSEClearRecord(), EmitComplexAssignmentLValue(), EmitComplexPrePostIncDec(), EmitCompoundLiteralLValue(), EmitConditionalOperatorLValue(), EmitConstructorBody(), EmitCoroutineIntrinsic(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitCriticalRegion(), EmitCtorPrologue(), EmitCUDAKernelCallExpr(), EmitCXXConstructorCall(), EmitCXXDestructorCall(), EmitCXXGlobalVarDeclInit(), EmitCXXGuardedInit(), EmitCXXGuardedInitBranch(), EmitCXXMemberCallExpr(), EmitCXXMemberDataPointerAddress(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXNewAllocSize(), EmitCXXNewExpr(), EmitCXXThrowExpr(), EmitCXXTypeidExpr(), EmitCXXUuidofExpr(), EmitDecl(), EmitDeclDestroy(), EmitDeclInit(), EmitDeclRefExprDbgValue(), EmitDeclRefLValue(), emitDeclTargetVarDeclLValue(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDeleteCall(), emitDependData(), EmitDestroyingObjectDelete(), EmitDestructorBody(), EmitDirectCallee(), EmitDynamicCast(), EmitDynamicCastToNull(), emitDynamicTlsInitialization(), emitDynamicTlsInitializationCall(), EmitEndEHSpec(), EmitExtVectorElementLValue(), EmitFAbs(), EmitFieldAnnotations(), EmitFieldSYCLAnnotations(), emitFilterDispatchBlock(), clang::CodeGen::CGOpenMPRuntime::emitFlush(), emitForStaticInitCall(), EmitForwardingCallToLambda(), emitFPIntBuiltin(), emitFrexpBuiltin(), EmitFunctionDeclLValue(), EmitFunctionEpilog(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), EmitFunctionProlog(), emitGlobalDtorWithTLRegDtor(), EmitGlobalVarDeclLValue(), EmitInheritedCXXConstructorCall(), emitInitWithReductionInitializer(), EmitInlinedInheritingCXXConstructorCall(), EmitIntelFPGAFieldAnnotations(), emitInterWarpCopyFunction(), EmitInvariantStart(), emitIsPlatformVersionAtLeast(), EmitIvarOffset(), EmitKCFIOperandBundle(), EmitLabel(), EmitLambdaBlockInvokeBody(), EmitLambdaInAllocaCallOpBody(), EmitLambdaInAllocaImplFn(), EmitLambdaStaticInvokeBody(), EmitLandingPad(), EmitLifetimeEnd(), EmitLifetimeStart(), EmitllvmFAbs(), EmitLoadOfBitfieldLValue(), EmitLoadOfExtVectorElementLValue(), EmitLoadOfGlobalRegLValue(), EmitLoadOfLValue(), EmitLoadOfReference(), EmitLoadOfReferenceLValue(), EmitLoadOfScalar(), EmitLValueForField(), EmitLValueForFieldInitialization(), EmitLValueForIvar(), EmitMaterializeTemporaryExpr(), emitMaybeConstrainedFPToIntRoundBuiltin(), EmitMemberExpr(), EmitMemberInitializer(), EmitMustTailThunk(), EmitNewArrayInitializer(), EmitNewDeleteCall(), EmitNonNullRValueCheck(), EmitNullBaseClassInitialization(), EmitNullInitialization(), clang::CodeGen::CGOpenMPRuntime::emitNumTeamsClause(), EmitNVPTXDevicePrintfCallExpr(), EmitObjCAlloc(), EmitObjCAllocInit(), EmitObjCAllocWithZone(), EmitObjCAutorelease(), EmitObjCAutoreleasePoolCleanup(), EmitObjCAutoreleasePoolPop(), EmitObjCAutoreleasePoolPush(), EmitObjCBoxedExpr(), EmitObjCEncodeExprLValue(), EmitObjCMessageExpr(), EmitObjCMRRAutoreleasePoolPop(), EmitObjCMRRAutoreleasePoolPush(), EmitObjCProtocolExpr(), EmitObjCRelease(), EmitObjCRetainNonBlock(), EmitObjCSelectorExpr(), EmitObjCSelectorLValue(), EmitObjCStringLiteral(), emitObjCValueOperation(), EmitObjectDelete(), emitOffloadingArrays(), emitOMPArraySectionBase(), emitOMPAtomicCaptureExpr(), emitOMPAtomicCompareExpr(), emitOMPAtomicReadExpr(), emitOMPAtomicUpdateExpr(), emitOMPAtomicWriteExpr(), EmitOpenMPDevicePrintfCallExpr(), emitOptimizedARCReturnCall(), emitOutlinedFunctionPrologue(), EmitOverflowIntrinsic(), clang::CodeGen::CGOpenMPRuntime::emitParallelCall(), EmitParmDecl(), emitPointerArithmetic(), EmitPointerWithAlignment(), emitPreserveStructAccess(), emitRangedBuiltin(), emitReductionCombiner(), emitRestoreIP(), emitRTtypeidCall(), EmitSanitizerStatReport(), EmitScalarFMAExpr(), EmitScalarInit(), EmitScalarRangeCheck(), EmitSEHExceptionCodeSave(), EmitSignBit(), EmitSimpleOMPExecutableDirective(), EmitStartEHSpec(), EmitStaticVarDecl(), EmitStoreOfScalar(), EmitStoreThroughBitfieldLValue(), EmitStoreThroughGlobalRegLValue(), EmitStoreThroughLValue(), EmitStringLiteralLValue(), emitStructSetterCall(), EmitSYCLAnnotationCall(), EmitSynthesizedCXXCopyCtorCall(), EmitSystemZIntrinsicWithCC(), emitTargetCallKernelLaunch(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataCalls(), clang::CodeGen::CGOpenMPRuntime::emitTargetDataStandAloneCall(), emitTargetTeamsLoopCodegenStatus(), clang::CodeGen::CGOpenMPRuntime::emitTaskwaitCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskyieldCall(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction(), clang::CodeGen::CGCXXABI::emitTerminateForUnexpectedException(), emitTernaryBuiltin(), emitTernaryMaybeConstrainedFPBuiltin(), clang::CodeGen::CGOpenMPRuntime::emitThreadLimitClause(), EmitThreadPrivateVarDeclLValue(), EmitTrapCall(), EmitTrapCheck(), EmitTypeCheck(), EmitTypeidFromVTable(), EmitTypeMetadataCodeForVCall(), EmitUnaryOpLValue(), EmitVAArg(), clang::CodeGen::CGObjCRuntime::EmitValueForIvarAtOffset(), EmitVarAnnotations(), EmitVarDecl(), clang::CodeGen::emitVoidPtrDirectVAArg(), clang::CodeGen::emitVoidPtrVAArg(), EmitVTableAssumptionLoad(), EmitVTableAssumptionLoads(), EmitVTablePtrCheck(), EmitVTablePtrCheckForCast(), EmitVTableTypeCheckedLoad(), emitWasmCatchPadBlock(), emitWritebackArg(), EmitX86CompressExpand(), EmitX86CompressStore(), EmitX86ConvertIntToFp(), EmitX86CvtF16ToFloatExpr(), EmitX86ExpandLoad(), EmitX86FMAExpr(), EmitX86FunnelShift(), EmitX86Ternlog(), EnterDtorCleanups(), EnterStructPointerForCoercedAccess(), EvaluateExprAsBool(), FinishFunction(), GenerateBlockFunction(), GenerateCode(), GenerateCopyHelperFunction(), GenerateCXXGlobalCleanUpFunc(), GenerateCXXGlobalInitFunc(), GenerateCXXGlobalVarDeclInitFunc(), generateDestroyHelper(), GenerateDestroyHelperFunction(), GenerateObjCAtomicGetterCopyHelperFunction(), GenerateObjCAtomicSetterCopyHelperFunction(), GenerateObjCCtorDtorMethod(), GenerateObjCGetter(), generateObjCGetterBody(), GenerateObjCSetter(), generateObjCSetterBody(), generateThunk(), GenerateVarArgsThunk(), clang::CodeGen::EHPersonality::get(), GetAddressOfBaseClass(), GetAddressOfDerivedClass(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddressOfLocalVariable(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), getARCCleanupKind(), getAsmSrcLocInfo(), getBadCastFn(), getBadTypeidFn(), getBlockByrefInfo(), getContext(), getEHResumeBlock(), getGEPIndicesToField(), clang::CodeGen::CGOpenMPRuntimeGPU::getGPUNumThreads(), getIntrinsic(), getInvokeDestImpl(), getItaniumDynamicCastFn(), getLangOpts(), getLLVMContext(), getNVPTXLaneID(), getNVPTXWarpID(), getPrologueSignature(), getTargetHooks(), getTerminateFunclet(), getTerminateHandler(), getTerminateLandingPad(), getTypes(), getUBSanFunctionTypeHash(), GetVTablePtr(), GetVTTParameter(), InitCatchParam(), initializeAlloca(), InitializeVTablePointer(), InitializeVTablePointers(), isMCDCCoverageEnabled(), isProvablyNonNull(), LoadCXXThisAddress(), loadToBegin(), LValueIsSuitableForInlineAtomic(), MakeAddrLValue(), makeNaturalAddressForPointer(), MakeNaturalAlignAddrLValue(), MakeRawAddrLValue(), needsEHCleanup(), clang::CodeGen::TargetCodeGenInfo::performAddrSpaceCast(), PerformReturnAdjustment(), performTypeAdjustment(), clang::CodeGen::CGCallee::prepareConcreteCallee(), pushTemporaryCleanup(), recoverAddrOfEscapedLocal(), registerGlobalDtorWithAtExit(), registerGlobalDtorWithLLVM(), clang::CodeGen::DominatingLLVMValue::save(), setBlockContextParameter(), SetDivFPAccuracy(), SetSqrtFPAccuracy(), ShouldEmitVTableTypeCheckedLoad(), ShouldInstrumentFunction(), shouldUseFusedARCCalls(), ShouldXRayInstrumentFunction(), StartFunction(), StartObjCMethod(), StartThunk(), tryEmitAsConstant(), tryEmitFusedAutoreleaseOfResult(), tryEmitSpecializedAllocInit(), tryGenerateSpecializedMessageSend(), tryRemoveRetainOfSelf(), tryUseTestFPKind(), unregisterGlobalDtorWithUnAtExit(), wrapWithBPFPreserveStaticOffset(), and ~CodeGenFunction().
SmallVector<llvm::IntrinsicInst *, 4> clang::CodeGen::CodeGenFunction::ConvergenceTokenStack |
Stack to track the controlled convergence tokens.
Definition at line 320 of file CodeGenFunction.h.
Referenced by addControlledConvergenceToken(), FinishFunction(), and StartFunction().
AwaitSuspendWrapperInfo clang::CodeGen::CodeGenFunction::CurAwaitSuspendWrapper |
Definition at line 388 of file CodeGenFunction.h.
Referenced by EmitCoroutineIntrinsic().
const Decl* clang::CodeGen::CodeGenFunction::CurCodeDecl = nullptr |
CurCodeDecl - This is the inner-most code context, which includes blocks.
Definition at line 355 of file CodeGenFunction.h.
Referenced by canEmitSpuriousReferenceToVariable(), clang::CodeGen::CGObjCRuntime::canMessageReceiverBeNull(), checkTargetFeatures(), EmitCall(), EmitDeclRefLValue(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitInheritedCXXConstructorCall(), EmitLambdaBlockInvokeBody(), EmitLValueForLambdaField(), EmitObjCMessageExpr(), EmitPredefinedLValue(), emitPrivatesInit(), EmitReturnValueCheck(), EmitTrapCheck(), FinishFunction(), FinishThunk(), clang::CodeGen::EHPersonality::get(), clang::CodeGen::getCXXDestructorImplicitParam(), GetVTTParameter(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), LoadObjCSelf(), StartFunction(), StartThunk(), tryEmitAsConstant(), and tryRemoveRetainOfSelf().
CGCoroInfo clang::CodeGen::CodeGenFunction::CurCoro |
Definition at line 372 of file CodeGenFunction.h.
Referenced by createCoroData(), EmitCoawaitExpr(), EmitCoawaitLValue(), EmitCoroutineIntrinsic(), EmitCoyieldExpr(), EmitCoyieldLValue(), inSuspendBlock(), and isCoroutine().
llvm::Function* clang::CodeGen::CodeGenFunction::CurFn = nullptr |
Definition at line 358 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitSharedLastprivateConditional(), checkIfLoopMustProgress(), clang::CodeGen::CGOpenMPRuntime::clearLocThreadIdInsertPt(), emitAtomicCmpXchgFailureSet(), EmitAtomicOp(), EmitBlock(), EmitBlockAfterUses(), EmitBlockLiteral(), EmitDestructorBody(), EmitDirectCallee(), emitDynamicTlsInitialization(), EmitFunctionEpilog(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), EmitIfUsed(), EmitLambdaInAllocaCallOpBody(), clang::CodeGen::CGOpenMPRuntime::emitLastprivateConditionalInit(), EmitMustTailThunk(), EmitPredefinedLValue(), EmitSEHAbnormalTermination(), EmitSEHExceptionCodeSave(), clang::CodeGen::CGOpenMPRuntimeGPU::emitTeamsOutlinedFunction(), clang::CodeGen::CGOpenMPRuntime::emitUserDefinedReduction(), FinishFunction(), clang::CodeGen::CGOpenMPRuntime::functionFinished(), clang::CodeGen::CGOpenMPRuntimeGPU::functionFinished(), GenerateCode(), GenerateObjCMethod(), GenerateSEHFilterFunction(), GenerateSEHFinallyFunction(), GenerateVarArgsThunk(), clang::CodeGen::CGOpenMPRuntime::getAddressOfLocalVariable(), clang::CodeGen::CGOpenMPRuntimeGPU::getAddressOfLocalVariable(), GetAddrOfLabel(), clang::CodeGen::getCXXDestructorImplicitParam(), getInvokeDestImpl(), clang::CodeGen::CGOpenMPRuntime::getOutlinedHelperName(), getTerminateLandingPad(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), clang::CodeGen::CGOpenMPRuntimeGPU::isDelayedVariableLengthDecl(), clang::CodeGen::CGOpenMPRuntime::isLocalVarInUntiedTask(), isMCDCCoverageEnabled(), recoverAddrOfEscapedLocal(), clang::CodeGen::CGOpenMPRuntime::setLocThreadIdInsertPt(), StartFunction(), clang::CodeGen::CGOpenMPRuntime::UntiedTaskLocalDeclsRAII::UntiedTaskLocalDeclsRAII(), and ~CodeGenFunction().
const CGFunctionInfo* clang::CodeGen::CodeGenFunction::CurFnInfo = nullptr |
Definition at line 356 of file CodeGenFunction.h.
Referenced by EmitCallAndReturnForThunk(), EmitMustTailThunk(), EmitParmDecl(), FinishFunction(), and StartFunction().
FPOptions clang::CodeGen::CodeGenFunction::CurFPFeatures |
Definition at line 811 of file CodeGenFunction.h.
const Decl* clang::CodeGen::CodeGenFunction::CurFuncDecl = nullptr |
CurFuncDecl - Holds the Decl for the current outermost non-closure context.
Definition at line 353 of file CodeGenFunction.h.
Referenced by computeBlockInfo(), EmitCall(), EmitFunctionEpilog(), EmitObjCMessageExpr(), clang::CodeGen::CGOpenMPRuntime::emitUpdateLocation(), FinishThunk(), clang::CodeGen::getCXXDestructorImplicitParam(), getIdentStringFromSourceLocation(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), LoadCXXThisAddress(), LoadObjCSelf(), ShouldInstrumentFunction(), ShouldSkipSanitizerInstrumentation(), StartFunction(), StartThunk(), and TypeOfSelfObject().
In C++, whether we are code generating a thunk.
This controls whether we should emit cleanups.
Definition at line 590 of file CodeGenFunction.h.
Referenced by EmitDelegateCallArg(), EmitParmDecl(), StartFunction(), and StartThunk().
GlobalDecl clang::CodeGen::CodeGenFunction::CurGD |
CurGD - The GlobalDecl for the current function being compiled.
Definition at line 402 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGCXXABI::buildThisParam(), EmitCallAndReturnForThunk(), EmitConstructorBody(), EmitCXXConstructExpr(), EmitDelegateCXXConstructorCall(), EmitDelegatingCXXConstructorCall(), EmitDestructorBody(), emitImplicitAssignmentOperatorBody(), EmitInlinedInheritingCXXConstructorCall(), EmitMemberInitializer(), GenerateBlockFunction(), GenerateCode(), GetVTTParameter(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), StartObjCMethod(), and StartThunk().
EHScopeStack::stable_iterator clang::CodeGen::CodeGenFunction::CurrentCleanupScopeDepth |
Definition at line 1026 of file CodeGenFunction.h.
Referenced by EmitCall(), and clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope().
llvm::Instruction* clang::CodeGen::CodeGenFunction::CurrentFuncletPad = nullptr |
Definition at line 704 of file CodeGenFunction.h.
Referenced by emitCatchPadBlock(), EmitSehScope(), emitWasmCatchPadBlock(), getBundlesForCoroEnd(), getBundlesForFunclet(), getTerminateFunclet(), and isCleanupPadScope().
GlobalDecl clang::CodeGen::CodeGenFunction::CurSEHParent |
Definition at line 599 of file CodeGenFunction.h.
Referenced by currentFunctionUsesSEHTry(), clang::CodeGen::EHPersonality::get(), and StartFunction().
CurrentSourceLocExprScope clang::CodeGen::CodeGenFunction::CurSourceLocExprScope |
Source location information about the default argument or member initializer expression we're evaluating, if any.
Definition at line 1769 of file CodeGenFunction.h.
llvm::SmallVector<DeferredDeactivateCleanup> clang::CodeGen::CodeGenFunction::DeferredDeactivationCleanupStack |
Definition at line 670 of file CodeGenFunction.h.
Referenced by EmitNewArrayInitializer(), FinishFunction(), pushCleanupAndDeferDeactivation(), pushDestroyAndDeferDeactivation(), and ~CodeGenFunction().
|
static |
Definition at line 4764 of file CodeGenFunction.h.
Referenced by emitAutoVarTypeCleanup(), EmitAutoVarWithLifetime(), pushCaptureCleanup(), and pushTemporaryCleanup().
|
static |
Definition at line 4765 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), getDestroyer(), and pushTemporaryCleanup().
|
static |
Definition at line 4766 of file CodeGenFunction.h.
Referenced by EmitAutoVarWithLifetime(), getDestroyer(), and pushTemporaryCleanup().
|
static |
Definition at line 3186 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), EmitCXXAggrConstructorCall(), getDestroyer(), and pushTemporaryCleanup().
|
static |
Definition at line 4768 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), emitAutoVarTypeCleanup(), and getDestroyer().
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::EHResumeBlock = nullptr |
EHResumeBlock - Unified block containing a call to llvm.eh.resume.
Definition at line 743 of file CodeGenFunction.h.
Referenced by FinishFunction(), and getEHResumeBlock().
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 751 of file CodeGenFunction.h.
Referenced by getEHSelectorSlot().
EHScopeStack clang::CodeGen::CodeGenFunction::EHStack |
Definition at line 655 of file CodeGenFunction.h.
Referenced by CallBeginCatch(), EmitAnyExprToExn(), EmitArrayDelete(), EmitAutoVarCleanups(), emitAutoVarTypeCleanup(), EmitBaseInitializer(), EmitCall(), EmitCallArg(), emitCXXDestructMethod(), EmitCXXNewExpr(), EmitDelegatingCXXConstructorCall(), clang::CodeGen::CGOpenMPRuntime::emitDoacrossInit(), EmitEndEHSpec(), clang::CodeGen::CGOpenMPRuntimeGPU::emitFunctionProlog(), EmitFunctionProlog(), EmitLabel(), EmitLandingPad(), EmitNewArrayInitializer(), EmitObjCAutoreleasePoolCleanup(), EmitObjectDelete(), EmitParmDecl(), EmitStartEHSpec(), clang::CodeGen::CodeGenFunction::FinallyInfo::enter(), enterByrefCleanup(), EnterDtorCleanups(), EnterNewDeleteCleanup(), clang::CodeGen::CodeGenFunction::FinallyInfo::exit(), FinishFunction(), getEHDispatchBlock(), getFuncletEHDispatchBlock(), getInvokeDest(), getInvokeDestImpl(), getJumpDestInCurrentScope(), clang::CodeGen::CGOpenMPRuntime::getThreadID(), InitCatchParam(), initFullExprCleanupWithFlag(), clang::CodeGen::RegionCodeGenTy::operator()(), popCatchScope(), pushCallObjectDeleteCleanup(), pushCleanupAndDeferDeactivation(), pushDestroyAndDeferDeactivation(), PushDestructorCleanup(), pushFullExprCleanup(), pushKmpcAllocFree(), pushLifetimeExtendedDestroy(), pushSEHCleanup(), pushStackRestore(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::requiresCleanups(), clang::CodeGen::CodeGenFunction::LexicalScope::rescopeLabels(), ResolveAllBranchFixups(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope(), SetupCleanupBlockActivation(), SimplifyForwardingBlocks(), StartFunction(), and StartObjCMethod().
|
static |
Definition at line 4767 of file CodeGenFunction.h.
llvm::Value* clang::CodeGen::CodeGenFunction::ExceptionSlot = nullptr |
The exception slot.
All landing pads write the current exception pointer into this alloca.
Definition at line 747 of file CodeGenFunction.h.
Referenced by getExceptionSlot().
int clang::CodeGen::CodeGenFunction::ExpectedOMPLoopDepth = 0 |
Number of nested loop to be consumed by the last surrounding loop-associated directive.
Definition at line 324 of file CodeGenFunction.h.
llvm::SmallVector<const ParmVarDecl *, 4> clang::CodeGen::CodeGenFunction::FnArgs |
Save Parameter Decl for coroutine.
Definition at line 361 of file CodeGenFunction.h.
Referenced by EmitCfiCheckStub(), and GenerateCode().
QualType clang::CodeGen::CodeGenFunction::FnRetTy |
Definition at line 357 of file CodeGenFunction.h.
Referenced by EmitInlinedInheritingCXXConstructorCall(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), and StartFunction().
True if the current statement has always_inline attribute.
Definition at line 616 of file CodeGenFunction.h.
Referenced by EmitCall().
True if the current statement has noinline attribute.
Definition at line 613 of file CodeGenFunction.h.
Referenced by EmitCall().
True if the current statement has nomerge attribute.
Definition at line 610 of file CodeGenFunction.h.
Referenced by EmitCall().
True if CodeGen currently emits code inside presereved access index region.
Definition at line 607 of file CodeGenFunction.h.
Referenced by emitArraySubscriptGEP(), and EmitLValueForField().
True if the current function is an outlined SEH helper.
This can be a finally block or filter expression.
Definition at line 603 of file CodeGenFunction.h.
True if CodeGen currently emits code implementing sanitizer checks.
Definition at line 578 of file CodeGenFunction.h.
Referenced by EmitCheck(), and clang::CodeGen::CodeGenFunction::SanitizerScope::SanitizerScope().
Definition at line 648 of file CodeGenFunction.h.
Referenced by EmitDeclRefLValue(), emitPrivatesInit(), getCaptureFieldType(), and StartFunction().
FieldDecl* clang::CodeGen::CodeGenFunction::LambdaThisCaptureField = nullptr |
Definition at line 649 of file CodeGenFunction.h.
Referenced by StartFunction().
llvm::SmallVector<char, 256> clang::CodeGen::CodeGenFunction::LifetimeExtendedCleanupStack |
Definition at line 656 of file CodeGenFunction.h.
Referenced by FinishFunction(), pushCleanupAfterFullExprWithActiveFlag(), clang::CodeGen::CodeGenFunction::RunCleanupsScope::RunCleanupsScope(), and ~CodeGenFunction().
LoopInfoStack clang::CodeGen::CodeGenFunction::LoopStack |
Definition at line 295 of file CodeGenFunction.h.
Referenced by AddIVDepMetadata(), and emitSimdlenSafelenClause().
SmallVector<const BinaryOperator *, 16> clang::CodeGen::CodeGenFunction::MCDCLogOpStack |
Stack to track the Logical Operator recursion nest for MC/DC.
Definition at line 317 of file CodeGenFunction.h.
Referenced by EmitBranchOnBoolExpr().
const CallExpr* clang::CodeGen::CodeGenFunction::MustTailCall = nullptr |
Definition at line 620 of file CodeGenFunction.h.
Referenced by EmitCall(), EmitCXXDestructorCall(), EmitCXXMemberOrOperatorCall(), and EmitCXXMemberPointerCallExpr().
unsigned clang::CodeGen::CodeGenFunction::NextCleanupDestIndex = 1 |
Definition at line 740 of file CodeGenFunction.h.
Referenced by getJumpDestForLabel(), and getJumpDestInCurrentScope().
RawAddress clang::CodeGen::CodeGenFunction::NormalCleanupDest = RawAddress::invalid() |
i32s containing the indexes of the cleanup destinations.
Definition at line 738 of file CodeGenFunction.h.
Referenced by destroyOptimisticNormalEntry(), and FinishFunction().
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 653 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 816 of file CodeGenFunction.h.
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPAfterScanBlock = nullptr |
Definition at line 769 of file CodeGenFunction.h.
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPBeforeScanBlock = nullptr |
Definition at line 768 of file CodeGenFunction.h.
Definition at line 772 of file CodeGenFunction.h.
SmallVector<llvm::CanonicalLoopInfo *, 4> clang::CodeGen::CodeGenFunction::OMPLoopNestStack |
List of recently emitted OMPCanonicalLoops.
Since OMPCanonicalLoops are nested inside other statements (in particular CapturedStmt generated by OMPExecutableDirective and non-perfectly nested loops), we cannot directly call OMPEmitOMPCanonicalLoop and receive its llvm::CanonicalLoopInfo. Instead, we call EmitStmt and any OMPEmitOMPCanonicalLoop called by it will add its CanonicalLoopInfo to this stack when done. Entering a new loop requires clearing this list; it either means we start parsing a new loop nest (in which case the previous loop nest goes out of scope) or a second loop in the same level in which case it would be ambiguous into which of the two (or more) loops the loop nest would extend.
Definition at line 314 of file CodeGenFunction.h.
const OMPExecutableDirective* clang::CodeGen::CodeGenFunction::OMPParentLoopDirectiveForScan = nullptr |
Parent loop-based directive for scan directive.
Definition at line 767 of file CodeGenFunction.h.
Referenced by clang::CodeGen::CodeGenFunction::ParentLoopDirectiveForScanRegion::ParentLoopDirectiveForScanRegion(), and clang::CodeGen::CodeGenFunction::ParentLoopDirectiveForScanRegion::~ParentLoopDirectiveForScanRegion().
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPScanDispatch = nullptr |
Definition at line 771 of file CodeGenFunction.h.
llvm::BasicBlock* clang::CodeGen::CodeGenFunction::OMPScanExitBlock = nullptr |
Definition at line 770 of file CodeGenFunction.h.
CodeGenFunction* clang::CodeGen::CodeGenFunction::ParentCGF = nullptr |
Definition at line 292 of file CodeGenFunction.h.
Referenced by EmitSEHExceptionCodeSave(), GenerateSEHFilterFunction(), GenerateSEHFinallyFunction(), and recoverAddrOfEscapedLocal().
EHScopeStack::stable_iterator clang::CodeGen::CodeGenFunction::PrologueCleanupDepth |
PrologueCleanupDepth - The cleanup depth enclosing all the cleanups associated with the parameters.
Definition at line 406 of file CodeGenFunction.h.
Referenced by FinishFunction(), and StartFunction().
const Expr* clang::CodeGen::CodeGenFunction::RetExpr = nullptr |
If a return statement is being visited, this holds the return statment's result expression.
Definition at line 421 of file CodeGenFunction.h.
JumpDest clang::CodeGen::CodeGenFunction::ReturnBlock |
ReturnBlock - Unified return block.
Definition at line 409 of file CodeGenFunction.h.
Referenced by EmitForwardingCallToLambda(), EmitReturnBlock(), EmitReturnValueCheck(), EnterDtorCleanups(), FinishFunction(), getOMPCancelDestination(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OutlinedRegionBodyRAII::OutlinedRegionBodyRAII(), StartFunction(), and clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::OutlinedRegionBodyRAII::~OutlinedRegionBodyRAII().
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 413 of file CodeGenFunction.h.
Referenced by createTLSAtExitStub(), EmitAutoVarAlloca(), EmitBlockCallExpr(), EmitCall(), EmitCallAndReturnForThunk(), EmitCallExpr(), EmitCUDAKernelCallExpr(), EmitCXXMemberCallExpr(), EmitCXXMemberOrOperatorCall(), EmitCXXMemberPointerCallExpr(), EmitCXXOperatorMemberCallExpr(), EmitForwardingCallToLambda(), EmitFunctionEpilog(), EmitFunctionProlog(), EmitInlinedInheritingCXXConstructorCall(), EmitSimpleCallExpr(), findDominatingStoreToReturnValue(), FinishFunction(), generateObjCGetterBody(), GenerateSEHFilterFunction(), clang::CodeGen::CodeGenFunction::InlinedInheritingConstructorScope::InlinedInheritingConstructorScope(), and StartFunction().
Address clang::CodeGen::CodeGenFunction::ReturnValuePointer = Address::invalid() |
ReturnValuePointer - The temporary alloca to hold a pointer to sret.
This is invalid if sret is not in use.
Definition at line 417 of file CodeGenFunction.h.
Referenced by StartFunction().
SanitizerSet clang::CodeGen::CodeGenFunction::SanOpts |
Sanitizers enabled for this function.
Definition at line 575 of file CodeGenFunction.h.
Referenced by emitAlignmentAssumption(), emitAlignmentAssumptionCheck(), EmitArraySubscriptExpr(), EmitBinaryOperatorLValue(), EmitBitfieldConversionCheck(), EmitCall(), EmitCastLValue(), EmitCfiCheckFail(), EmitCheck(), EmitCheckedLValue(), EmitFunctionProlog(), EmitMaterializeTemporaryExpr(), EmitNullabilityCheck(), emitPointerArithmetic(), EmitPointerWithAlignment(), EmitReturnValueCheck(), EmitScalarRangeCheck(), EmitTypeCheck(), EmitTypeMetadataCodeForVCall(), EmitUnreachable(), EmitVariablyModifiedType(), EmitVTablePtrCheckForCall(), EmitVTablePtrCheckForCast(), EmitVTableTypeCheckedLoad(), EnterDtorCleanups(), GenerateCode(), markAsIgnoreThreadCheckingAtRuntime(), sanitizePerformTypeCheck(), ShouldEmitVTableTypeCheckedLoad(), and StartFunction().
Whether we processed a Microsoft-style asm block during CodeGen.
These can potentially set the return value.
Definition at line 597 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 756 of file CodeGenFunction.h.
Referenced by EmitSEHExceptionCode(), and EmitSEHExceptionCodeSave().
llvm::Value* clang::CodeGen::CodeGenFunction::SEHInfo = nullptr |
Value returned by __exception_info intrinsic.
Definition at line 759 of file CodeGenFunction.h.
Referenced by EmitSEHExceptionCodeSave(), and EmitSEHExceptionInfo().
llvm::SmallVector<const JumpDest *, 2> clang::CodeGen::CodeGenFunction::SEHTryEpilogueStack |
Definition at line 702 of file CodeGenFunction.h.
Referenced by isSEHTryScope(), and VolatilizeTryBlocks().
const TargetInfo& clang::CodeGen::CodeGenFunction::Target |
Definition at line 289 of file CodeGenFunction.h.
Referenced by getTarget().