• Home
  • Raw
  • Download

Lines Matching refs:Init

221   llvm::Constant *Init = CGM.EmitConstantInit(D, this);  in AddInitializerToStaticVarDecl()  local
225 if (!Init) { in AddInitializerToStaticVarDecl()
242 if (GV->getType()->getElementType() != Init->getType()) { in AddInitializerToStaticVarDecl()
245 GV = new llvm::GlobalVariable(CGM.getModule(), Init->getType(), in AddInitializerToStaticVarDecl()
247 OldGV->getLinkage(), Init, "", in AddInitializerToStaticVarDecl()
266 GV->setInitializer(Init); in AddInitializerToStaticVarDecl()
671 static bool canEmitInitWithFewStoresAfterMemset(llvm::Constant *Init, in canEmitInitWithFewStoresAfterMemset() argument
674 if (isa<llvm::ConstantAggregateZero>(Init) || in canEmitInitWithFewStoresAfterMemset()
675 isa<llvm::ConstantPointerNull>(Init) || in canEmitInitWithFewStoresAfterMemset()
676 isa<llvm::UndefValue>(Init)) in canEmitInitWithFewStoresAfterMemset()
678 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in canEmitInitWithFewStoresAfterMemset()
679 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in canEmitInitWithFewStoresAfterMemset()
680 isa<llvm::ConstantExpr>(Init)) in canEmitInitWithFewStoresAfterMemset()
681 return Init->isNullValue() || NumStores--; in canEmitInitWithFewStoresAfterMemset()
684 if (isa<llvm::ConstantArray>(Init) || isa<llvm::ConstantStruct>(Init)) { in canEmitInitWithFewStoresAfterMemset()
685 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in canEmitInitWithFewStoresAfterMemset()
686 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in canEmitInitWithFewStoresAfterMemset()
694 dyn_cast<llvm::ConstantDataSequential>(Init)) { in canEmitInitWithFewStoresAfterMemset()
710 static void emitStoresForInitAfterMemset(llvm::Constant *Init, llvm::Value *Loc, in emitStoresForInitAfterMemset() argument
712 assert(!Init->isNullValue() && !isa<llvm::UndefValue>(Init) && in emitStoresForInitAfterMemset()
715 if (isa<llvm::ConstantInt>(Init) || isa<llvm::ConstantFP>(Init) || in emitStoresForInitAfterMemset()
716 isa<llvm::ConstantVector>(Init) || isa<llvm::BlockAddress>(Init) || in emitStoresForInitAfterMemset()
717 isa<llvm::ConstantExpr>(Init)) { in emitStoresForInitAfterMemset()
718 Builder.CreateStore(Init, Loc, isVolatile); in emitStoresForInitAfterMemset()
723 dyn_cast<llvm::ConstantDataSequential>(Init)) { in emitStoresForInitAfterMemset()
735 assert((isa<llvm::ConstantStruct>(Init) || isa<llvm::ConstantArray>(Init)) && in emitStoresForInitAfterMemset()
738 for (unsigned i = 0, e = Init->getNumOperands(); i != e; ++i) { in emitStoresForInitAfterMemset()
739 llvm::Constant *Elt = cast<llvm::Constant>(Init->getOperand(i)); in emitStoresForInitAfterMemset()
753 static bool shouldUseMemSetPlusStoresToInitialize(llvm::Constant *Init, in shouldUseMemSetPlusStoresToInitialize() argument
756 if (isa<llvm::ConstantAggregateZero>(Init)) return true; in shouldUseMemSetPlusStoresToInitialize()
767 canEmitInitWithFewStoresAfterMemset(Init, StoreBudget); in shouldUseMemSetPlusStoresToInitialize()
969 Expr *Init = VD->getInit(); in isCapturedBy() local
970 if (Init && isCapturedBy(var, Init)) in isCapturedBy()
991 static bool isTrivialInitializer(const Expr *Init) { in isTrivialInitializer() argument
992 if (!Init) in isTrivialInitializer()
995 if (const CXXConstructExpr *Construct = dyn_cast<CXXConstructExpr>(Init)) in isTrivialInitializer()
1014 const Expr *Init = D.getInit(); in EmitAutoVarInit() local
1019 if (!Init || !ContainsLabel(Init)) return; in EmitAutoVarInit()
1027 if (isTrivialInitializer(Init)) in EmitAutoVarInit()
1035 bool capturedByInit = emission.IsByRef && isCapturedBy(D, Init); in EmitAutoVarInit()
1049 return EmitExprAsInit(Init, &D, lv, capturedByInit); in EmitAutoVarInit()