Lines Matching refs:Init
201 llvm::Constant *Init = nullptr; in getOrCreateStaticVarDecl() local
203 Init = EmitNullConstant(Ty); in getOrCreateStaticVarDecl()
205 Init = llvm::UndefValue::get(LTy); in getOrCreateStaticVarDecl()
210 Init, Name, nullptr, in getOrCreateStaticVarDecl()
285 llvm::Constant *Init = CGM.EmitConstantInit(D, this); in AddInitializerToStaticVarDecl() local
289 if (!Init) { in AddInitializerToStaticVarDecl()
306 if (GV->getType()->getElementType() != Init->getType()) { in AddInitializerToStaticVarDecl()
309 GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(), in AddInitializerToStaticVarDecl()
311 OldGV->getLinkage(), Init, "", in AddInitializerToStaticVarDecl()
331 GV->setInitializer(Init); in AddInitializerToStaticVarDecl()
801 static bool canEmitInitWithFewStoresAfterMemset(llvm::Constant *Init, in canEmitInitWithFewStoresAfterMemset() argument
804 if (isa<llvm::ConstantAggregateZero>(Init) || in canEmitInitWithFewStoresAfterMemset()
805 isa<llvm::ConstantPointerNull>(Init) || in canEmitInitWithFewStoresAfterMemset()
806 isa<llvm::UndefValue>(Init)) in canEmitInitWithFewStoresAfterMemset()
808 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in canEmitInitWithFewStoresAfterMemset()
809 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in canEmitInitWithFewStoresAfterMemset()
810 isa<llvm::ConstantExpr>(Init)) in canEmitInitWithFewStoresAfterMemset()
811 return Init->isNullValue() || NumStores--; in canEmitInitWithFewStoresAfterMemset()
814 if (isa<llvm::ConstantArray>(Init) || isa<llvm::ConstantStruct>(Init)) { in canEmitInitWithFewStoresAfterMemset()
815 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in canEmitInitWithFewStoresAfterMemset()
816 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in canEmitInitWithFewStoresAfterMemset()
824 dyn_cast<llvm::ConstantDataSequential>(Init)) { in canEmitInitWithFewStoresAfterMemset()
840 static void emitStoresForInitAfterMemset(llvm::Constant *Init, llvm::Value *Loc, in emitStoresForInitAfterMemset() argument
842 assert(!Init->isNullValue() && !isa<llvm::UndefValue>(Init) && in emitStoresForInitAfterMemset()
845 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in emitStoresForInitAfterMemset()
846 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in emitStoresForInitAfterMemset()
847 isa<llvm::ConstantExpr>(Init)) { in emitStoresForInitAfterMemset()
848 Builder.CreateDefaultAlignedStore(Init, Loc, isVolatile); in emitStoresForInitAfterMemset()
853 dyn_cast<llvm::ConstantDataSequential>(Init)) { in emitStoresForInitAfterMemset()
860 Elt, Builder.CreateConstGEP2_32(Init->getType(), Loc, 0, i), in emitStoresForInitAfterMemset()
866 assert((isa<llvm::ConstantStruct>(Init) || isa<llvm::ConstantArray>(Init)) && in emitStoresForInitAfterMemset()
869 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in emitStoresForInitAfterMemset()
870 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in emitStoresForInitAfterMemset()
875 Elt, Builder.CreateConstGEP2_32(Init->getType(), Loc, 0, i), in emitStoresForInitAfterMemset()
885 static bool shouldUseMemSetPlusStoresToInitialize(llvm::Constant *Init, in shouldUseMemSetPlusStoresToInitialize() argument
888 if (isa<llvm::ConstantAggregateZero>(Init)) return true; in shouldUseMemSetPlusStoresToInitialize()
898 canEmitInitWithFewStoresAfterMemset(Init, StoreBudget); in shouldUseMemSetPlusStoresToInitialize()
1131 const Expr *Init = VD->getInit(); in isCapturedBy() local
1132 if (Init && isCapturedBy(var, Init)) in isCapturedBy()
1153 bool CodeGenFunction::isTrivialInitializer(const Expr *Init) { in isTrivialInitializer() argument
1154 if (!Init) in isTrivialInitializer()
1157 if (const CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init)) in isTrivialInitializer()
1177 const Expr *Init = D.getInit(); in EmitAutoVarInit() local
1182 if (!Init || !ContainsLabel(Init)) return; in EmitAutoVarInit()
1190 if (isTrivialInitializer(Init)) in EmitAutoVarInit()
1196 bool capturedByInit = emission.IsByRef && isCapturedBy(D, Init); in EmitAutoVarInit()
1210 return EmitExprAsInit(Init, &D, lv, capturedByInit); in EmitAutoVarInit()