Lines Matching refs:constant

1097                                   llvm::Constant *constant) {  in emitStoresForConstant()  argument
1098 auto *Ty = constant->getType(); in emitStoresForConstant()
1102 Builder.CreateStore(constant, Loc, isVolatile); in emitStoresForConstant()
1113 if (shouldUseBZeroPlusStoresToInitialize(constant, ConstantSize)) { in emitStoresForConstant()
1118 constant->isNullValue() || isa<llvm::UndefValue>(constant); in emitStoresForConstant()
1121 emitStoresForInitAfterBZero(CGM, constant, Loc, isVolatile, Builder); in emitStoresForConstant()
1126 llvm::Value *Pattern = shouldUseMemSetToInitialize(constant, ConstantSize); in emitStoresForConstant()
1141 createUnnamedGlobalFrom(CGM, D, Builder, constant, Loc.getAlignment()), in emitStoresForConstant()
1149 llvm::Constant *constant = llvm::Constant::getNullValue(ElTy); in emitStoresForZeroInit() local
1150 emitStoresForConstant(CGM, D, Loc, isVolatile, Builder, constant); in emitStoresForZeroInit()
1157 llvm::Constant *constant = patternFor(CGM, ElTy); in emitStoresForPatternInit() local
1158 assert(!isa<llvm::UndefValue>(constant)); in emitStoresForPatternInit()
1159 emitStoresForConstant(CGM, D, Loc, isVolatile, Builder, constant); in emitStoresForPatternInit()
1162 static bool containsUndef(llvm::Constant *constant) { in containsUndef() argument
1163 auto *Ty = constant->getType(); in containsUndef()
1164 if (isa<llvm::UndefValue>(constant)) in containsUndef()
1167 for (llvm::Use &Op : constant->operands()) in containsUndef()
1173 static llvm::Constant *replaceUndef(llvm::Constant *constant) { in replaceUndef() argument
1177 auto *Ty = constant->getType(); in replaceUndef()
1178 if (isa<llvm::UndefValue>(constant)) in replaceUndef()
1181 return constant; in replaceUndef()
1182 if (!containsUndef(constant)) in replaceUndef()
1183 return constant; in replaceUndef()
1184 llvm::SmallVector<llvm::Constant *, 8> Values(constant->getNumOperands()); in replaceUndef()
1185 for (unsigned Op = 0, NumOp = constant->getNumOperands(); Op != NumOp; ++Op) { in replaceUndef()
1186 auto *OpValue = cast<llvm::Constant>(constant->getOperand(Op)); in replaceUndef()
1725 llvm::Constant *constant = nullptr; in EmitAutoVarInit() local
1728 constant = ConstantEmitter(*this).tryEmitAbstractForInitializer(D); in EmitAutoVarInit()
1729 if (constant && trivialAutoVarInit != in EmitAutoVarInit()
1731 constant = replaceUndef(constant); in EmitAutoVarInit()
1734 if (!constant) { in EmitAutoVarInit()
1745 return EmitStoreThroughLValue(RValue::get(constant), lv, true); in EmitAutoVarInit()
1751 isVolatile, Builder, constant); in EmitAutoVarInit()