Lines Matching refs:llvm

39 namespace llvm {
109 JumpDest(llvm::BasicBlock *Block, in JumpDest()
115 llvm::BasicBlock *getBlock() const { return Block; } in getBlock()
125 llvm::BasicBlock *Block;
133 typedef std::pair<llvm::Value *, llvm::Value *> ComplexPairTy;
139 void InsertHelper(llvm::Instruction *I, const llvm::Twine &Name,
140 llvm::BasicBlock *BB,
141 llvm::BasicBlock::iterator InsertPt) const;
150 llvm::Function *CurFn;
164 llvm::Value *ReturnValue;
168 llvm::AssertingVH<llvm::Instruction> AllocaInsertPt;
195 virtual void setContextValue(llvm::Value *V) { ThisValue = V; } in setContextValue()
197 virtual llvm::Value *getContextValue() const { return ThisValue; } in getContextValue()
226 llvm::SmallDenseMap<const VarDecl *, FieldDecl *> CaptureFields;
230 llvm::Value *ThisValue;
271 llvm::Value *BlockPointer;
273 llvm::DenseMap<const VarDecl *, FieldDecl *> LambdaCaptureFields;
278 llvm::DenseMap<const VarDecl *, llvm::Value *> NRVOFlags;
281 llvm::SmallVector<char, 256> LifetimeExtendedCleanupStack;
282 llvm::SmallVector<const JumpDest *, 2> SEHTryEpilogueStack;
296 llvm::AllocaInst *NormalCleanupDest;
304 llvm::BasicBlock *EHResumeBlock;
308 llvm::Value *ExceptionSlot;
312 llvm::AllocaInst *EHSelectorSlot;
314 llvm::AllocaInst *AbnormalTerminationSlot;
321 llvm::BasicBlock *EmitLandingPad();
323 llvm::BasicBlock *getInvokeDestImpl();
333 SmallVector<llvm::Value*, 8> ObjCEHValueStack;
341 llvm::Constant *BeginCatchFn;
345 llvm::AllocaInst *ForEHVar;
349 llvm::AllocaInst *SavedExnVar;
353 llvm::Constant *beginCatchFn, llvm::Constant *endCatchFn,
354 llvm::Constant *rethrowFn);
405 void PushDestructorCleanup(QualType T, llvm::Value *Addr);
411 llvm::Value *Addr);
426 llvm::Instruction *DominatingIP);
436 llvm::Instruction *DominatingIP);
545 typedef llvm::DenseMap<const VarDecl *, llvm::Value *> VarDeclMapTy;
564 const std::function<llvm::Value *()> &PrivateGen) { in addPrivate()
616 void ResolveBranchFixups(llvm::BasicBlock *Target);
621 JumpDest getJumpDestInCurrentScope(llvm::BasicBlock *Target) { in getJumpDestInCurrentScope()
649 llvm::BasicBlock *getEHResumeBlock(bool isCleanup);
650 llvm::BasicBlock *getEHDispatchBlock(EHScopeStack::stable_iterator scope);
654 llvm::BasicBlock *StartBB;
674 llvm::BasicBlock *getStartingBlock() const { in getStartingBlock()
683 void setBeforeOutermostConditional(llvm::Value *value, llvm::Value *addr) { in setBeforeOutermostConditional()
685 llvm::BasicBlock *block = OutermostConditional->getStartingBlock(); in setBeforeOutermostConditional()
686 new llvm::StoreInst(value, addr, &block->back()); in setBeforeOutermostConditional()
715 llvm::Instruction *Inst;
847 std::pair<llvm::Type *, unsigned>
852 llvm::Value *BuildBlockByrefAddress(llvm::Value *BaseAddr,
866 llvm::IndirectBrInst *IndirectBranch;
870 typedef llvm::DenseMap<const Decl*, llvm::Value*> DeclMapTy;
875 llvm::DenseMap<llvm::AllocaInst *, int> EscapedLocals;
878 llvm::DenseMap<const LabelDecl*, JumpDest> LabelMap;
903 llvm::SwitchInst *SwitchInsn;
909 llvm::BasicBlock *CaseRangeBlock;
913 llvm::DenseMap<const OpaqueValueExpr *, LValue> OpaqueLValues;
914 llvm::DenseMap<const OpaqueValueExpr *, RValue> OpaqueRValues;
922 llvm::DenseMap<const Expr*, llvm::Value*> VLASizeMap;
926 llvm::BasicBlock *UnreachableBlock;
943 FieldConstructionScope(CodeGenFunction &CGF, llvm::Value *This) in FieldConstructionScope()
953 llvm::Value *OldCXXDefaultInitExprThis;
970 llvm::Value *OldCXXThisValue;
977 llvm::Value *CXXABIThisValue;
978 llvm::Value *CXXThisValue;
982 llvm::Value *CXXDefaultInitExprThis;
987 llvm::Value *CXXStructorImplicitParamValue;
1003 llvm::DenseMap<const ValueDecl *, std::pair<llvm::Type *,
1006 llvm::BasicBlock *TerminateLandingPad;
1007 llvm::BasicBlock *TerminateHandler;
1008 llvm::BasicBlock *TrapBB;
1021 llvm::Function *Fn);
1045 llvm::Value *getExceptionSlot();
1046 llvm::Value *getEHSelectorSlot();
1050 llvm::Value *getExceptionFromSlot();
1051 llvm::Value *getSelectorFromSlot();
1053 llvm::Value *getNormalCleanupDestSlot();
1055 llvm::BasicBlock *getUnreachableBlock() { in getUnreachableBlock()
1058 new llvm::UnreachableInst(getLLVMContext(), UnreachableBlock); in getUnreachableBlock()
1063 llvm::BasicBlock *getInvokeDest() { in getInvokeDest()
1074 llvm::LLVMContext &getLLVMContext() { return CGM.getLLVMContext(); } in getLLVMContext()
1080 typedef void Destroyer(CodeGenFunction &CGF, llvm::Value *addr, QualType ty);
1082 void pushIrregularPartialArrayCleanup(llvm::Value *arrayBegin,
1083 llvm::Value *arrayEndPointer,
1086 void pushRegularPartialArrayCleanup(llvm::Value *arrayBegin,
1087 llvm::Value *arrayEnd,
1092 llvm::Value *addr, QualType type);
1094 llvm::Value *addr, QualType type);
1095 void pushDestroy(CleanupKind kind, llvm::Value *addr, QualType type,
1097 void pushLifetimeExtendedDestroy(CleanupKind kind, llvm::Value *addr,
1101 llvm::Value *CompletePtr,
1103 void pushStackRestore(CleanupKind kind, llvm::Value *SPMem);
1104 void emitDestroy(llvm::Value *addr, QualType type, Destroyer *destroyer,
1106 llvm::Function *generateDestroyHelper(llvm::Constant *addr, QualType type,
1110 void emitArrayDestroy(llvm::Value *begin, llvm::Value *end,
1150 llvm::Constant *AtomicHelperFn);
1161 llvm::Constant *AtomicHelperFn);
1169 llvm::Value *EmitBlockLiteral(const BlockExpr *);
1170 llvm::Value *EmitBlockLiteral(const CGBlockInfo &Info);
1172 llvm::Constant *BuildDescriptorBlockDecl(const BlockExpr *,
1174 llvm::StructType *,
1175 llvm::Constant *BlockVarLayout);
1177 llvm::Function *GenerateBlockFunction(GlobalDecl GD,
1182 llvm::Constant *GenerateCopyHelperFunction(const CGBlockInfo &blockInfo);
1183 llvm::Constant *GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo);
1184 llvm::Constant *GenerateObjCAtomicSetterCopyHelperFunction(
1186 llvm::Constant *GenerateObjCAtomicGetterCopyHelperFunction(
1188 llvm::Value *EmitBlockCopyAndAutorelease(llvm::Value *Block, QualType Ty);
1190 void BuildBlockRelease(llvm::Value *DeclPtr, BlockFieldFlags flags);
1197 llvm::Value *LoadBlockStruct() { in LoadBlockStruct()
1204 llvm::Value *GetAddrOfBlockDecl(const VarDecl *var, bool ByRef);
1205 llvm::Type *BuildByRefType(const VarDecl *var);
1207 void GenerateCode(GlobalDecl GD, llvm::Function *Fn,
1214 llvm::Function *Fn,
1224 void EmitBlockWithFallThrough(llvm::BasicBlock *BB, RegionCounter &Cnt);
1238 llvm::DebugLoc EmitReturnBlock();
1244 void StartThunk(llvm::Function *Fn, GlobalDecl GD,
1247 void EmitCallAndReturnForThunk(llvm::Value *Callee, const ThunkInfo *Thunk);
1250 void EmitMustTailThunk(const CXXMethodDecl *MD, llvm::Value *AdjustedThisPtr,
1251 llvm::Value *Callee);
1254 void GenerateThunk(llvm::Function *Fn, const CGFunctionInfo &FnInfo,
1257 void GenerateVarArgsThunk(llvm::Function *Fn, const CGFunctionInfo &FnInfo,
1274 typedef llvm::SmallPtrSet<const CXXRecordDecl *, 4> VisitedVirtualBasesSetTy;
1286 llvm::Value *GetVTablePtr(llvm::Value *This, llvm::Type *Ty);
1291 void EmitVTablePtrCheckForCast(QualType T, llvm::Value *Derived,
1296 void EmitVTablePtrCheckForCall(const CXXMethodDecl *MD, llvm::Value *VTable);
1300 void EmitVTablePtrCheck(const CXXRecordDecl *RD, llvm::Value *VTable);
1329 llvm::Function *Fn,
1344 llvm::BasicBlock *getTerminateLandingPad();
1349 llvm::BasicBlock *getTerminateHandler();
1351 llvm::Type *ConvertTypeForMem(QualType T);
1352 llvm::Type *ConvertType(QualType T);
1353 llvm::Type *ConvertType(const TypeDecl *T) { in ConvertType()
1359 llvm::Value *LoadObjCSelf();
1377 llvm::BasicBlock *createBasicBlock(const Twine &name = "",
1378 llvm::Function *parent = nullptr,
1379 llvm::BasicBlock *before = nullptr) {
1381 return llvm::BasicBlock::Create(getLLVMContext(), "", parent, before);
1383 return llvm::BasicBlock::Create(getLLVMContext(), name, parent, before);
1394 void SimplifyForwardingBlocks(llvm::BasicBlock *BB);
1404 void EmitBlock(llvm::BasicBlock *BB, bool IsFinished=false);
1408 void EmitBlockAfterUses(llvm::BasicBlock *BB);
1418 void EmitBranch(llvm::BasicBlock *Block);
1443 LValue MakeAddrLValue(llvm::Value *V, QualType T,
1449 LValue MakeNaturalAlignAddrLValue(llvm::Value *V, QualType T);
1454 llvm::AllocaInst *CreateTempAlloca(llvm::Type *Ty,
1458 void InitTempAlloca(llvm::AllocaInst *Alloca, llvm::Value *Value);
1465 llvm::AllocaInst *CreateIRTemp(QualType T, const Twine &Name = "tmp");
1469 llvm::AllocaInst *CreateMemTemp(QualType T, const Twine &Name = "tmp");
1487 llvm::Value *EmitCastToVoidPtr(llvm::Value *value);
1491 llvm::Value *EvaluateExprAsBool(const Expr *E);
1508 llvm::Value *EmitVAListRef(const Expr *E);
1516 void EmitAnyExprToMem(const Expr *E, llvm::Value *Location,
1519 void EmitAnyExprToExn(const Expr *E, llvm::Value *Addr);
1539 void EmitAggregateAssign(llvm::Value *DestPtr, llvm::Value *SrcPtr, in EmitAggregateAssign()
1546 void EmitAggregateCopyCtor(llvm::Value *DestPtr, llvm::Value *SrcPtr, in EmitAggregateCopyCtor()
1561 void EmitAggregateCopy(llvm::Value *DestPtr, llvm::Value *SrcPtr,
1571 llvm::Value *GetAddrOfLocalVar(const VarDecl *VD) { in GetAddrOfLocalVar()
1572 llvm::Value *Res = LocalDeclMap[VD]; in GetAddrOfLocalVar()
1582 llvm::DenseMap<const OpaqueValueExpr*,LValue>::iterator in getOpaqueLValueMapping()
1593 llvm::DenseMap<const OpaqueValueExpr*,RValue>::iterator in getOpaqueRValueMapping()
1601 static unsigned getAccessedFieldNo(unsigned Idx, const llvm::Constant *Elts);
1603 llvm::BlockAddress *GetAddrOfLabel(const LabelDecl *L);
1604 llvm::BasicBlock *GetIndirectGotoBlock();
1609 void EmitNullInitialization(llvm::Value *DestPtr, QualType Ty);
1615 llvm::Value *EmitVAArg(llvm::Value *VAListAddr, QualType Ty);
1619 llvm::Value *emitArrayLength(const ArrayType *arrayType,
1621 llvm::Value *&addr);
1633 std::pair<llvm::Value*,QualType> getVLASize(const VariableArrayType *vla);
1634 std::pair<llvm::Value*,QualType> getVLASize(QualType vla);
1638 llvm::Value *LoadCXXThis() { in LoadCXXThis()
1647 llvm::Value *LoadCXXVTT() { in LoadCXXVTT()
1654 llvm::Value *LoadCXXStructorImplicitParam() { in LoadCXXStructorImplicitParam()
1662 llvm::Value *
1663 GetAddressOfDirectBaseInCompleteClass(llvm::Value *Value,
1670 llvm::Value *GetAddressOfBaseClass(llvm::Value *Value,
1676 llvm::Value *GetAddressOfDerivedClass(llvm::Value *Value,
1686 llvm::Value *GetVTTParameter(GlobalDecl GD, bool ForVirtualBase,
1701 llvm::Value *This, const CXXConstructExpr *E);
1704 llvm::Value *This, llvm::Value *Src,
1709 llvm::Value *ArrayPtr,
1714 llvm::Value *NumElements,
1715 llvm::Value *ArrayPtr,
1723 llvm::Value *This);
1726 llvm::Type *ElementTy, llvm::Value *NewPtr,
1727 llvm::Value *NumElements,
1728 llvm::Value *AllocSizeWithoutCookie);
1731 llvm::Value *Ptr);
1733 llvm::Value *EmitCXXNewExpr(const CXXNewExpr *E);
1736 void EmitDeleteCall(const FunctionDecl *DeleteFD, llvm::Value *Ptr,
1742 llvm::Value* EmitCXXTypeidExpr(const CXXTypeidExpr *E);
1743 llvm::Value *EmitDynamicCast(llvm::Value *V, const CXXDynamicCastExpr *DCE);
1744 llvm::Value* EmitCXXUuidofExpr(const CXXUuidofExpr *E);
1785 void EmitTypeCheck(TypeCheckKind TCK, SourceLocation Loc, llvm::Value *V,
1792 void EmitBoundsCheck(const Expr *E, const Expr *Base, llvm::Value *Index,
1795 llvm::Value *EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV,
1800 void EmitAlignmentAssumption(llvm::Value *PtrValue, unsigned Alignment,
1801 llvm::Value *OffsetValue = nullptr) {
1822 void EmitScalarInit(llvm::Value *init, LValue lvalue);
1825 llvm::Value *Address);
1846 llvm::Value *Address;
1848 llvm::Value *NRVOFlag;
1858 llvm::Value *SizeForLifetimeMarkers;
1876 llvm::Value *getSizeForLifetimeMarkers() const { in getSizeForLifetimeMarkers()
1883 llvm::Value *getAllocatedAddress() const { in getAllocatedAddress()
1890 llvm::Value *getObjectAddress(CodeGenFunction &CGF) const { in getObjectAddress()
1905 llvm::GlobalValue::LinkageTypes Linkage);
1908 void EmitParmDecl(const VarDecl &D, llvm::Value *Arg, bool ArgIsPointer,
1946 llvm::Value *EmitCompoundStmt(const CompoundStmt &S, bool GetLast = false,
1948 llvm::Value *EmitCompoundStmtWithoutScope(const CompoundStmt &S,
1963 void EmitCondBrHints(llvm::LLVMContext &Context, llvm::BranchInst *CondBr,
1999 llvm::Function *GenerateSEHFilterFunction(CodeGenFunction &ParentCGF,
2002 llvm::Function *GenerateSEHFinallyFunction(CodeGenFunction &ParentCGF,
2006 llvm::Value *EmitSEHExceptionCode();
2007 llvm::Value *EmitSEHExceptionInfo();
2008 llvm::Value *EmitSEHAbnormalTermination();
2014 llvm::Value *ParentFP);
2020 llvm::Function *EmitCapturedStmt(const CapturedStmt &S, CapturedRegionKind K);
2022 llvm::Function *GenerateCapturedStmtFunctionEpilog(const CapturedStmt &S);
2023 llvm::Function *GenerateCapturedStmtFunction(const CapturedStmt &S);
2024 llvm::Value *GenerateCapturedStmtArgument(const CapturedStmt &S);
2035 llvm::Value *DestAddr, llvm::Value *SrcAddr, QualType OriginalType,
2036 const llvm::function_ref<void(llvm::Value *, llvm::Value *)> &CopyGen);
2049 llvm::Value *DestAddr, llvm::Value *SrcAddr,
2065 llvm::AtomicOrdering AO, SourceLocation Loc,
2066 const llvm::function_ref<RValue(RValue)> &CommonGen);
2104 llvm::Value *IsLastIterCond);
2145 const llvm::function_ref<void(CodeGenFunction &)> &BodyGen);
2159 OMPPrivateScope &LoopScope, llvm::Value *LB,
2160 llvm::Value *UB, llvm::Value *ST, llvm::Value *IL,
2161 llvm::Value *Chunk);
2206 RValue convertTempToRValue(llvm::Value *addr, QualType type,
2218 llvm::AtomicOrdering AO, bool IsVolatile = false,
2223 void EmitAtomicStore(RValue rvalue, LValue lvalue, llvm::AtomicOrdering AO,
2226 std::pair<RValue, llvm::Value *> EmitAtomicCompareExchange(
2228 llvm::AtomicOrdering Success = llvm::SequentiallyConsistent,
2229 llvm::AtomicOrdering Failure = llvm::SequentiallyConsistent,
2232 void EmitAtomicUpdate(LValue LVal, llvm::AtomicOrdering AO,
2238 llvm::Value *EmitToMemory(llvm::Value *Value, QualType Ty);
2242 llvm::Value *EmitFromMemory(llvm::Value *Value, QualType Ty);
2247 llvm::Value *EmitLoadOfScalar(llvm::Value *Addr, bool Volatile,
2250 llvm::MDNode *TBAAInfo = nullptr,
2258 llvm::Value *EmitLoadOfScalar(LValue lvalue, SourceLocation Loc);
2263 void EmitStoreOfScalar(llvm::Value *Value, llvm::Value *Addr,
2265 llvm::MDNode *TBAAInfo = nullptr, bool isInit = false,
2274 void EmitStoreOfScalar(llvm::Value *value, LValue lvalue, bool isInit=false);
2298 llvm::Value **Result=nullptr);
2304 llvm::Value *&Result);
2331 llvm::Value *EmitExtVectorElementLValue(LValue V);
2336 llvm::PointerIntPair<llvm::Constant*, 1, bool> ValueAndIsReference;
2337 ConstantEmission(llvm::Constant *C, bool isReference) in ConstantEmission()
2341 static ConstantEmission forReference(llvm::Constant *C) { in forReference()
2344 static ConstantEmission forValue(llvm::Constant *C) { in forValue()
2359 llvm::Constant *getValue() const { in getValue()
2371 llvm::Value *EmitIvarOffset(const ObjCInterfaceDecl *Interface,
2383 llvm::Value* Base, const ObjCIvarDecl *Ivar,
2397 void EmitDeclRefExprDbgValue(const DeclRefExpr *E, llvm::Constant *Init);
2410 llvm::Value *Callee,
2414 llvm::Instruction **callOrInvoke = nullptr);
2416 RValue EmitCall(QualType FnType, llvm::Value *Callee, const CallExpr *E,
2419 llvm::Value *Chain = nullptr);
2423 llvm::CallInst *EmitRuntimeCall(llvm::Value *callee,
2425 llvm::CallInst *EmitRuntimeCall(llvm::Value *callee,
2426 ArrayRef<llvm::Value*> args,
2428 llvm::CallInst *EmitNounwindRuntimeCall(llvm::Value *callee,
2430 llvm::CallInst *EmitNounwindRuntimeCall(llvm::Value *callee,
2431 ArrayRef<llvm::Value*> args,
2434 llvm::CallSite EmitCallOrInvoke(llvm::Value *Callee,
2435 ArrayRef<llvm::Value *> Args,
2437 llvm::CallSite EmitCallOrInvoke(llvm::Value *Callee,
2439 llvm::CallSite EmitRuntimeCallOrInvoke(llvm::Value *callee,
2440 ArrayRef<llvm::Value*> args,
2442 llvm::CallSite EmitRuntimeCallOrInvoke(llvm::Value *callee,
2444 void EmitNoreturnRuntimeCallOrInvoke(llvm::Value *callee,
2445 ArrayRef<llvm::Value*> args);
2447 llvm::Value *BuildAppleKextVirtualCall(const CXXMethodDecl *MD,
2449 llvm::Type *Ty);
2451 llvm::Value *BuildAppleKextVirtualDestructorCall(const CXXDestructorDecl *DD,
2456 EmitCXXMemberOrOperatorCall(const CXXMethodDecl *MD, llvm::Value *Callee,
2457 ReturnValueSlot ReturnValue, llvm::Value *This,
2458 llvm::Value *ImplicitParam,
2460 RValue EmitCXXStructorCall(const CXXMethodDecl *MD, llvm::Value *Callee,
2461 ReturnValueSlot ReturnValue, llvm::Value *This,
2462 llvm::Value *ImplicitParam,
2493 llvm::Value *EmitTargetBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
2495 llvm::Value *EmitAArch64CompareBuiltinExpr(llvm::Value *Op, llvm::Type *Ty,
2496 const llvm::CmpInst::Predicate Fp,
2497 const llvm::CmpInst::Predicate Ip,
2498 const llvm::Twine &Name = "");
2499 llvm::Value *EmitARMBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
2501 llvm::Value *EmitCommonNeonBuiltinExpr(unsigned BuiltinID,
2507 SmallVectorImpl<llvm::Value *> &Ops,
2508 llvm::Value *Align = nullptr);
2509 llvm::Function *LookupNeonLLVMIntrinsic(unsigned IntrinsicID,
2510 unsigned Modifier, llvm::Type *ArgTy,
2512 llvm::Value *EmitNeonCall(llvm::Function *F,
2513 SmallVectorImpl<llvm::Value*> &O,
2516 llvm::Value *EmitNeonSplat(llvm::Value *V, llvm::Constant *Idx);
2517 llvm::Value *EmitNeonShiftVector(llvm::Value *V, llvm::Type *Ty,
2519 llvm::Value *EmitNeonRShiftImm(llvm::Value *Vec, llvm::Value *Amt,
2520 llvm::Type *Ty, bool usgn, const char *name);
2522 llvm::Value *vectorWrapScalar8(llvm::Value *Op);
2523 llvm::Value *vectorWrapScalar16(llvm::Value *Op);
2524 llvm::Value *emitVectorWrappedScalar8Intrinsic(
2525 unsigned Int, SmallVectorImpl<llvm::Value *> &Ops, const char *Name);
2526 llvm::Value *emitVectorWrappedScalar16Intrinsic(
2527 unsigned Int, SmallVectorImpl<llvm::Value *> &Ops, const char *Name);
2528 llvm::Value *EmitAArch64BuiltinExpr(unsigned BuiltinID, const CallExpr *E);
2529 llvm::Value *EmitNeon64Call(llvm::Function *F,
2530 llvm::SmallVectorImpl<llvm::Value *> &O,
2533 llvm::Value *BuildVector(ArrayRef<llvm::Value*> Ops);
2534 llvm::Value *EmitX86BuiltinExpr(unsigned BuiltinID, const CallExpr *E);
2535 llvm::Value *EmitPPCBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
2536 llvm::Value *EmitR600BuiltinExpr(unsigned BuiltinID, const CallExpr *E);
2537 llvm::Value *EmitSystemZBuiltinExpr(unsigned BuiltinID, const CallExpr *E);
2539 llvm::Value *EmitObjCProtocolExpr(const ObjCProtocolExpr *E);
2540 llvm::Value *EmitObjCStringLiteral(const ObjCStringLiteral *E);
2541 llvm::Value *EmitObjCBoxedExpr(const ObjCBoxedExpr *E);
2542 llvm::Value *EmitObjCArrayLiteral(const ObjCArrayLiteral *E);
2543 llvm::Value *EmitObjCDictionaryLiteral(const ObjCDictionaryLiteral *E);
2544 llvm::Value *EmitObjCCollectionLiteral(const Expr *E,
2546 llvm::Value *EmitObjCSelectorExpr(const ObjCSelectorExpr *E);
2558 void EmitARCInitWeak(llvm::Value *value, llvm::Value *addr);
2559 void EmitARCDestroyWeak(llvm::Value *addr);
2560 llvm::Value *EmitARCLoadWeak(llvm::Value *addr);
2561 llvm::Value *EmitARCLoadWeakRetained(llvm::Value *addr);
2562 llvm::Value *EmitARCStoreWeak(llvm::Value *value, llvm::Value *addr,
2564 void EmitARCCopyWeak(llvm::Value *dst, llvm::Value *src);
2565 void EmitARCMoveWeak(llvm::Value *dst, llvm::Value *src);
2566 llvm::Value *EmitARCRetainAutorelease(QualType type, llvm::Value *value);
2567 llvm::Value *EmitARCRetainAutoreleaseNonBlock(llvm::Value *value);
2568 llvm::Value *EmitARCStoreStrong(LValue lvalue, llvm::Value *value,
2570 llvm::Value *EmitARCStoreStrongCall(llvm::Value *addr, llvm::Value *value,
2572 llvm::Value *EmitARCRetain(QualType type, llvm::Value *value);
2573 llvm::Value *EmitARCRetainNonBlock(llvm::Value *value);
2574 llvm::Value *EmitARCRetainBlock(llvm::Value *value, bool mandatory);
2575 void EmitARCDestroyStrong(llvm::Value *addr, ARCPreciseLifetime_t precise);
2576 void EmitARCRelease(llvm::Value *value, ARCPreciseLifetime_t precise);
2577 llvm::Value *EmitARCAutorelease(llvm::Value *value);
2578 llvm::Value *EmitARCAutoreleaseReturnValue(llvm::Value *value);
2579 llvm::Value *EmitARCRetainAutoreleaseReturnValue(llvm::Value *value);
2580 llvm::Value *EmitARCRetainAutoreleasedReturnValue(llvm::Value *value);
2582 std::pair<LValue,llvm::Value*>
2584 std::pair<LValue,llvm::Value*>
2587 llvm::Value *EmitObjCThrowOperand(const Expr *expr);
2589 llvm::Value *EmitObjCProduceObject(QualType T, llvm::Value *Ptr);
2590 llvm::Value *EmitObjCConsumeObject(QualType T, llvm::Value *Ptr);
2591 llvm::Value *EmitObjCExtendObjectLifetime(QualType T, llvm::Value *Ptr);
2593 llvm::Value *EmitARCExtendBlockObject(const Expr *expr);
2594 llvm::Value *EmitARCRetainScalarExpr(const Expr *expr);
2595 llvm::Value *EmitARCRetainAutoreleaseScalarExpr(const Expr *expr);
2597 void EmitARCIntrinsicUse(ArrayRef<llvm::Value*> values);
2603 void EmitObjCAutoreleasePoolPop(llvm::Value *Ptr);
2604 llvm::Value *EmitObjCAutoreleasePoolPush();
2605 llvm::Value *EmitObjCMRRAutoreleasePoolPush();
2606 void EmitObjCAutoreleasePoolCleanup(llvm::Value *Ptr);
2607 void EmitObjCMRRAutoreleasePoolPop(llvm::Value *Ptr);
2620 llvm::Value *EmitScalarExpr(const Expr *E , bool IgnoreResultAssign = false);
2624 llvm::Value *EmitScalarConversion(llvm::Value *Src, QualType SrcTy,
2630 llvm::Value *EmitComplexToScalarConversion(ComplexPairTy Src, QualType SrcTy,
2645 void EmitGCMemmoveCollectable(llvm::Value *DestPtr, llvm::Value *SrcPtr,
2650 void EmitExtendGCLifetime(llvm::Value *object);
2672 llvm::GlobalVariable *
2674 llvm::GlobalVariable *GV);
2679 void EmitCXXGlobalVarDeclInit(const VarDecl &D, llvm::Constant *DeclPtr,
2682 llvm::Constant *createAtExitStub(const VarDecl &VD, llvm::Constant *Dtor,
2683 llvm::Constant *Addr);
2687 void registerGlobalDtorWithAtExit(const VarDecl &D, llvm::Constant *fn,
2688 llvm::Constant *addr);
2695 void EmitCXXGuardedInit(const VarDecl &D, llvm::GlobalVariable *DeclPtr,
2700 void GenerateCXXGlobalInitFunc(llvm::Function *Fn,
2701 ArrayRef<llvm::Function *> CXXThreadLocals,
2702 llvm::GlobalVariable *Guard = nullptr);
2706 void GenerateCXXGlobalDtorsFunc(llvm::Function *Fn,
2707 const std::vector<std::pair<llvm::WeakVH,
2708 llvm::Constant*> > &DtorsAndObjects);
2710 void GenerateCXXGlobalVarDeclInitFunc(llvm::Function *Fn,
2712 llvm::GlobalVariable *Addr,
2717 void EmitSynthesizedCXXCopyCtor(llvm::Value *Dest, llvm::Value *Src,
2730 RValue EmitAtomicExpr(AtomicExpr *E, llvm::Value *Dest = nullptr);
2737 llvm::Value *EmitAnnotationCall(llvm::Value *AnnotationFn,
2738 llvm::Value *AnnotatedVal,
2743 void EmitVarAnnotations(const VarDecl *D, llvm::Value *V);
2747 llvm::Value *EmitFieldAnnotations(const FieldDecl *D, llvm::Value *V);
2771 bool ConstantFoldsToSimpleInteger(const Expr *Cond, llvm::APSInt &Result);
2778 void EmitBranchOnBoolExpr(const Expr *Cond, llvm::BasicBlock *TrueBlock,
2779 llvm::BasicBlock *FalseBlock, uint64_t TrueCount);
2783 llvm::Constant *EmitCheckTypeDescriptor(QualType T);
2787 llvm::Value *EmitCheckValue(llvm::Value *V);
2791 llvm::Constant *EmitCheckSourceLocation(SourceLocation Loc);
2796 void EmitCheck(ArrayRef<std::pair<llvm::Value *, SanitizerKind>> Checked,
2797 StringRef CheckName, ArrayRef<llvm::Constant *> StaticArgs,
2798 ArrayRef<llvm::Value *> DynamicArgs);
2802 void EmitTrapCheck(llvm::Value *Checked);
2815 void SetFPAccuracy(llvm::Value *Val, float Accuracy);
2818 llvm::MDNode *getRangeForLoadFromType(QualType Ty);
2821 void deferPlaceholderReplacement(llvm::Instruction *Old, llvm::Value *New);
2823 llvm::SmallVector<std::pair<llvm::Instruction *, llvm::Value *>, 4>
2831 SmallVectorImpl<llvm::Argument *>::iterator &AI);
2836 void ExpandTypeToArgs(QualType Ty, RValue RV, llvm::FunctionType *IRFuncTy,
2837 SmallVectorImpl<llvm::Value *> &IRCallArgs,
2840 llvm::Value* EmitAsmInput(const TargetInfo::ConstraintInfo &Info,
2843 llvm::Value* EmitAsmInputLValue(const TargetInfo::ConstraintInfo &Info,
2907 buildByrefHelpers(llvm::StructType &byrefType,
2910 void AddObjCARCExceptionMetadata(llvm::Instruction *Inst);
2914 std::pair<llvm::Value*, unsigned> EmitPointerWithAlignment(const Expr *Addr);
2916 llvm::Value *GetValueForARMHint(unsigned BuiltinID);
2922 typedef llvm::PointerIntPair<llvm::Value*, 1, bool> saved_type;
2925 static bool needsSaving(llvm::Value *value) { in needsSaving()
2927 if (!isa<llvm::Instruction>(value)) return false; in needsSaving()
2930 llvm::BasicBlock *block = cast<llvm::Instruction>(value)->getParent(); in needsSaving()
2935 static saved_type save(CodeGenFunction &CGF, llvm::Value *value) { in save()
2939 llvm::Value *alloca = in save()
2946 static llvm::Value *restore(CodeGenFunction &CGF, saved_type value) { in restore()
2968 llvm::Value *Value;
2970 saved_type(llvm::Value *v, Kind k) : Value(v), K(k) {}