Lines Matching refs:Init
271 llvm::Constant *Init = nullptr; in getOrCreateStaticVarDecl() local
274 Init = llvm::UndefValue::get(LTy); in getOrCreateStaticVarDecl()
276 Init = EmitNullConstant(Ty); in getOrCreateStaticVarDecl()
279 getModule(), LTy, Ty.isConstant(getContext()), Linkage, Init, Name, in getOrCreateStaticVarDecl()
346 llvm::Constant *Init = emitter.tryEmitForInitializer(D); in AddInitializerToStaticVarDecl() local
350 if (!Init) { in AddInitializerToStaticVarDecl()
369 CGM.getDataLayout().getTypeAllocSize(Init->getType())); in AddInitializerToStaticVarDecl()
377 if (GV->getValueType() != Init->getType()) { in AddInitializerToStaticVarDecl()
381 CGM.getModule(), Init->getType(), OldGV->isConstant(), in AddInitializerToStaticVarDecl()
382 OldGV->getLinkage(), Init, "", in AddInitializerToStaticVarDecl()
404 GV->setInitializer(Init); in AddInitializerToStaticVarDecl()
912 static bool canEmitInitWithFewStoresAfterBZero(llvm::Constant *Init, in canEmitInitWithFewStoresAfterBZero() argument
915 if (isa<llvm::ConstantAggregateZero>(Init) || in canEmitInitWithFewStoresAfterBZero()
916 isa<llvm::ConstantPointerNull>(Init) || in canEmitInitWithFewStoresAfterBZero()
917 isa<llvm::UndefValue>(Init)) in canEmitInitWithFewStoresAfterBZero()
919 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in canEmitInitWithFewStoresAfterBZero()
920 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in canEmitInitWithFewStoresAfterBZero()
921 isa<llvm::ConstantExpr>(Init)) in canEmitInitWithFewStoresAfterBZero()
922 return Init->isNullValue() || NumStores--; in canEmitInitWithFewStoresAfterBZero()
925 if (isa<llvm::ConstantArray>(Init) || isa<llvm::ConstantStruct>(Init)) { in canEmitInitWithFewStoresAfterBZero()
926 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in canEmitInitWithFewStoresAfterBZero()
927 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in canEmitInitWithFewStoresAfterBZero()
935 dyn_cast<llvm::ConstantDataSequential>(Init)) { in canEmitInitWithFewStoresAfterBZero()
951 llvm::Constant *Init, Address Loc, in emitStoresForInitAfterBZero() argument
954 assert(!Init->isNullValue() && !isa<llvm::UndefValue>(Init) && in emitStoresForInitAfterBZero()
957 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in emitStoresForInitAfterBZero()
958 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in emitStoresForInitAfterBZero()
959 isa<llvm::ConstantExpr>(Init)) { in emitStoresForInitAfterBZero()
960 auto *I = Builder.CreateStore(Init, Loc, isVolatile); in emitStoresForInitAfterBZero()
967 dyn_cast<llvm::ConstantDataSequential>(Init)) { in emitStoresForInitAfterBZero()
980 assert((isa<llvm::ConstantStruct>(Init) || isa<llvm::ConstantArray>(Init)) && in emitStoresForInitAfterBZero()
983 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in emitStoresForInitAfterBZero()
984 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in emitStoresForInitAfterBZero()
997 static bool shouldUseBZeroPlusStoresToInitialize(llvm::Constant *Init, in shouldUseBZeroPlusStoresToInitialize() argument
1000 if (isa<llvm::ConstantAggregateZero>(Init)) return true; in shouldUseBZeroPlusStoresToInitialize()
1010 canEmitInitWithFewStoresAfterBZero(Init, StoreBudget); in shouldUseBZeroPlusStoresToInitialize()
1018 static llvm::Value *shouldUseMemSetToInitialize(llvm::Constant *Init, in shouldUseMemSetToInitialize() argument
1024 return llvm::isBytewiseValue(Init, DL); in shouldUseMemSetToInitialize()
1738 const Expr *Init = VD->getInit(); in isCapturedBy() local
1739 if (Init && isCapturedBy(Var, Init)) in isCapturedBy()
1760 bool CodeGenFunction::isTrivialInitializer(const Expr *Init) { in isTrivialInitializer() argument
1761 if (!Init) in isTrivialInitializer()
1764 if (const CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init)) in isTrivialInitializer()
1893 const Expr *Init = D.getInit(); in EmitAutoVarInit() local
1898 if (!Init || !ContainsLabel(Init)) return; in EmitAutoVarInit()
1909 if (!Init && in EmitAutoVarInit()
1923 Init && emission.IsEscapingByRef && isCapturedBy(D, Init); in EmitAutoVarInit()
1949 if (isTrivialInitializer(Init)) in EmitAutoVarInit()
1998 isAccessedBy(D, Init)) { in EmitAutoVarInit()
2004 return EmitExprAsInit(Init, &D, lv, capturedByInit); in EmitAutoVarInit()