• Home
  • Raw
  • Download

Lines Matching refs:Init

214   llvm::Constant *Init = CGM.EmitConstantInit(D, this);  in AddInitializerToStaticVarDecl()  local
218 if (!Init) { in AddInitializerToStaticVarDecl()
235 if (GV->getType()->getElementType() != Init->getType()) { in AddInitializerToStaticVarDecl()
238 GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(), in AddInitializerToStaticVarDecl()
240 OldGV->getLinkage(), Init, "", in AddInitializerToStaticVarDecl()
259 GV->setInitializer(Init); in AddInitializerToStaticVarDecl()
653 static bool canEmitInitWithFewStoresAfterMemset(llvm::Constant *Init, in canEmitInitWithFewStoresAfterMemset() argument
656 if (isa<llvm::ConstantAggregateZero>(Init) || in canEmitInitWithFewStoresAfterMemset()
657 isa<llvm::ConstantPointerNull>(Init) || in canEmitInitWithFewStoresAfterMemset()
658 isa<llvm::UndefValue>(Init)) in canEmitInitWithFewStoresAfterMemset()
660 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in canEmitInitWithFewStoresAfterMemset()
661 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in canEmitInitWithFewStoresAfterMemset()
662 isa<llvm::ConstantExpr>(Init)) in canEmitInitWithFewStoresAfterMemset()
663 return Init->isNullValue() || NumStores--; in canEmitInitWithFewStoresAfterMemset()
666 if (isa<llvm::ConstantArray>(Init) || isa<llvm::ConstantStruct>(Init)) { in canEmitInitWithFewStoresAfterMemset()
667 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in canEmitInitWithFewStoresAfterMemset()
668 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in canEmitInitWithFewStoresAfterMemset()
676 dyn_cast<llvm::ConstantDataSequential>(Init)) { in canEmitInitWithFewStoresAfterMemset()
692 static void emitStoresForInitAfterMemset(llvm::Constant *Init, llvm::Value *Loc, in emitStoresForInitAfterMemset() argument
695 if (Init->isNullValue() || isa<llvm::UndefValue>(Init)) in emitStoresForInitAfterMemset()
698 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in emitStoresForInitAfterMemset()
699 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in emitStoresForInitAfterMemset()
700 isa<llvm::ConstantExpr>(Init)) { in emitStoresForInitAfterMemset()
701 Builder.CreateStore(Init, Loc, isVolatile); in emitStoresForInitAfterMemset()
706 dyn_cast<llvm::ConstantDataSequential>(Init)) { in emitStoresForInitAfterMemset()
717 assert((isa<llvm::ConstantStruct>(Init) || isa<llvm::ConstantArray>(Init)) && in emitStoresForInitAfterMemset()
720 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in emitStoresForInitAfterMemset()
721 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in emitStoresForInitAfterMemset()
733 static bool shouldUseMemSetPlusStoresToInitialize(llvm::Constant *Init, in shouldUseMemSetPlusStoresToInitialize() argument
736 if (isa<llvm::ConstantAggregateZero>(Init)) return true; in shouldUseMemSetPlusStoresToInitialize()
747 canEmitInitWithFewStoresAfterMemset(Init, StoreBudget); in shouldUseMemSetPlusStoresToInitialize()
945 Expr *Init = VD->getInit(); in isCapturedBy() local
946 if (Init && isCapturedBy(var, Init)) in isCapturedBy()
967 static bool isTrivialInitializer(const Expr *Init) { in isTrivialInitializer() argument
968 if (!Init) in isTrivialInitializer()
971 if (const CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init)) in isTrivialInitializer()
990 const Expr *Init = D.getInit(); in EmitAutoVarInit() local
995 if (!Init || !ContainsLabel(Init)) return; in EmitAutoVarInit()
1003 if (isTrivialInitializer(Init)) in EmitAutoVarInit()
1011 bool capturedByInit = emission.IsByRef && isCapturedBy(D, Init); in EmitAutoVarInit()
1025 return EmitExprAsInit(Init, &D, lv, capturedByInit); in EmitAutoVarInit()