Lines Matching refs:Init

268   llvm::Constant *Init = nullptr;  in getOrCreateStaticVarDecl()  local
271 Init = llvm::UndefValue::get(LTy); in getOrCreateStaticVarDecl()
273 Init = EmitNullConstant(Ty); in getOrCreateStaticVarDecl()
276 getModule(), LTy, Ty.isConstant(getContext()), Linkage, Init, Name, in getOrCreateStaticVarDecl()
342 llvm::Constant *Init = emitter.tryEmitForInitializer(D); in AddInitializerToStaticVarDecl() local
346 if (!Init) { in AddInitializerToStaticVarDecl()
365 CGM.getDataLayout().getTypeAllocSize(Init->getType())); in AddInitializerToStaticVarDecl()
373 if (GV->getValueType() != Init->getType()) { in AddInitializerToStaticVarDecl()
377 CGM.getModule(), Init->getType(), OldGV->isConstant(), in AddInitializerToStaticVarDecl()
378 OldGV->getLinkage(), Init, "", in AddInitializerToStaticVarDecl()
400 GV->setInitializer(Init); in AddInitializerToStaticVarDecl()
910 static bool canEmitInitWithFewStoresAfterBZero(llvm::Constant *Init, in canEmitInitWithFewStoresAfterBZero() argument
913 if (isa<llvm::ConstantAggregateZero>(Init) || in canEmitInitWithFewStoresAfterBZero()
914 isa<llvm::ConstantPointerNull>(Init) || in canEmitInitWithFewStoresAfterBZero()
915 isa<llvm::UndefValue>(Init)) in canEmitInitWithFewStoresAfterBZero()
917 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in canEmitInitWithFewStoresAfterBZero()
918 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in canEmitInitWithFewStoresAfterBZero()
919 isa<llvm::ConstantExpr>(Init)) in canEmitInitWithFewStoresAfterBZero()
920 return Init->isNullValue() || NumStores--; in canEmitInitWithFewStoresAfterBZero()
923 if (isa<llvm::ConstantArray>(Init) || isa<llvm::ConstantStruct>(Init)) { in canEmitInitWithFewStoresAfterBZero()
924 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in canEmitInitWithFewStoresAfterBZero()
925 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in canEmitInitWithFewStoresAfterBZero()
933 dyn_cast<llvm::ConstantDataSequential>(Init)) { in canEmitInitWithFewStoresAfterBZero()
949 llvm::Constant *Init, Address Loc, in emitStoresForInitAfterBZero() argument
952 assert(!Init->isNullValue() && !isa<llvm::UndefValue>(Init) && in emitStoresForInitAfterBZero()
955 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in emitStoresForInitAfterBZero()
956 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in emitStoresForInitAfterBZero()
957 isa<llvm::ConstantExpr>(Init)) { in emitStoresForInitAfterBZero()
958 auto *I = Builder.CreateStore(Init, Loc, isVolatile); in emitStoresForInitAfterBZero()
965 dyn_cast<llvm::ConstantDataSequential>(Init)) { in emitStoresForInitAfterBZero()
978 assert((isa<llvm::ConstantStruct>(Init) || isa<llvm::ConstantArray>(Init)) && in emitStoresForInitAfterBZero()
981 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in emitStoresForInitAfterBZero()
982 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in emitStoresForInitAfterBZero()
995 static bool shouldUseBZeroPlusStoresToInitialize(llvm::Constant *Init, in shouldUseBZeroPlusStoresToInitialize() argument
998 if (isa<llvm::ConstantAggregateZero>(Init)) return true; in shouldUseBZeroPlusStoresToInitialize()
1008 canEmitInitWithFewStoresAfterBZero(Init, StoreBudget); in shouldUseBZeroPlusStoresToInitialize()
1016 static llvm::Value *shouldUseMemSetToInitialize(llvm::Constant *Init, in shouldUseMemSetToInitialize() argument
1022 return llvm::isBytewiseValue(Init, DL); in shouldUseMemSetToInitialize()
1733 const Expr *Init = VD->getInit(); in isCapturedBy() local
1734 if (Init && isCapturedBy(Var, Init)) in isCapturedBy()
1755 bool CodeGenFunction::isTrivialInitializer(const Expr *Init) { in isTrivialInitializer() argument
1756 if (!Init) in isTrivialInitializer()
1759 if (const CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init)) in isTrivialInitializer()
1887 const Expr *Init = D.getInit(); in EmitAutoVarInit() local
1892 if (!Init || !ContainsLabel(Init)) return; in EmitAutoVarInit()
1903 if (!Init && in EmitAutoVarInit()
1917 Init && emission.IsEscapingByRef && isCapturedBy(D, Init); in EmitAutoVarInit()
1943 if (isTrivialInitializer(Init)) in EmitAutoVarInit()
1973 return EmitExprAsInit(Init, &D, lv, capturedByInit); in EmitAutoVarInit()