Lines Matching refs:Init

269   llvm::Constant *Init = nullptr;  in getOrCreateStaticVarDecl()  local
272 Init = llvm::UndefValue::get(LTy); in getOrCreateStaticVarDecl()
274 Init = EmitNullConstant(Ty); in getOrCreateStaticVarDecl()
277 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()
398 GV->setInitializer(Init); in AddInitializerToStaticVarDecl()
897 static bool canEmitInitWithFewStoresAfterBZero(llvm::Constant *Init, in canEmitInitWithFewStoresAfterBZero() argument
900 if (isa<llvm::ConstantAggregateZero>(Init) || in canEmitInitWithFewStoresAfterBZero()
901 isa<llvm::ConstantPointerNull>(Init) || in canEmitInitWithFewStoresAfterBZero()
902 isa<llvm::UndefValue>(Init)) in canEmitInitWithFewStoresAfterBZero()
904 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in canEmitInitWithFewStoresAfterBZero()
905 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in canEmitInitWithFewStoresAfterBZero()
906 isa<llvm::ConstantExpr>(Init)) in canEmitInitWithFewStoresAfterBZero()
907 return Init->isNullValue() || NumStores--; in canEmitInitWithFewStoresAfterBZero()
910 if (isa<llvm::ConstantArray>(Init) || isa<llvm::ConstantStruct>(Init)) { in canEmitInitWithFewStoresAfterBZero()
911 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in canEmitInitWithFewStoresAfterBZero()
912 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in canEmitInitWithFewStoresAfterBZero()
920 dyn_cast<llvm::ConstantDataSequential>(Init)) { in canEmitInitWithFewStoresAfterBZero()
936 llvm::Constant *Init, Address Loc, in emitStoresForInitAfterBZero() argument
939 assert(!Init->isNullValue() && !isa<llvm::UndefValue>(Init) && in emitStoresForInitAfterBZero()
942 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in emitStoresForInitAfterBZero()
943 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in emitStoresForInitAfterBZero()
944 isa<llvm::ConstantExpr>(Init)) { in emitStoresForInitAfterBZero()
945 auto *I = Builder.CreateStore(Init, Loc, isVolatile); in emitStoresForInitAfterBZero()
952 dyn_cast<llvm::ConstantDataSequential>(Init)) { in emitStoresForInitAfterBZero()
965 assert((isa<llvm::ConstantStruct>(Init) || isa<llvm::ConstantArray>(Init)) && in emitStoresForInitAfterBZero()
968 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in emitStoresForInitAfterBZero()
969 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in emitStoresForInitAfterBZero()
982 static bool shouldUseBZeroPlusStoresToInitialize(llvm::Constant *Init, in shouldUseBZeroPlusStoresToInitialize() argument
985 if (isa<llvm::ConstantAggregateZero>(Init)) return true; in shouldUseBZeroPlusStoresToInitialize()
995 canEmitInitWithFewStoresAfterBZero(Init, StoreBudget); in shouldUseBZeroPlusStoresToInitialize()
1003 static llvm::Value *shouldUseMemSetToInitialize(llvm::Constant *Init, in shouldUseMemSetToInitialize() argument
1009 return llvm::isBytewiseValue(Init, DL); in shouldUseMemSetToInitialize()
1686 const Expr *Init = VD->getInit(); in isCapturedBy() local
1687 if (Init && isCapturedBy(Var, Init)) in isCapturedBy()
1708 bool CodeGenFunction::isTrivialInitializer(const Expr *Init) { in isTrivialInitializer() argument
1709 if (!Init) in isTrivialInitializer()
1712 if (const CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init)) in isTrivialInitializer()
1826 const Expr *Init = D.getInit(); in EmitAutoVarInit() local
1831 if (!Init || !ContainsLabel(Init)) return; in EmitAutoVarInit()
1842 if (!Init && in EmitAutoVarInit()
1856 Init && emission.IsEscapingByRef && isCapturedBy(D, Init); in EmitAutoVarInit()
1882 if (isTrivialInitializer(Init)) in EmitAutoVarInit()
1912 return EmitExprAsInit(Init, &D, lv, capturedByInit); in EmitAutoVarInit()