Lines Matching defs:Cst
265 /// Check if the given use (Instruction + OpIdx) of Cst should be converted into
266 /// a load of a global variable initialized with Cst.
270 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr,
322 /// Check if the given Cst should be converted into
323 /// a load of a global variable initialized with Cst.
336 static bool shouldConvertImpl(const Constant *Cst) {
337 if (isa<const UndefValue>(Cst))
342 // E.g., when the type of Cst require more instructions than the
344 // instances of Cst.
347 if (Cst->isZeroValue())
354 if (Cst->getType()->isVectorTy())
356 return isConstantUsingVectorTy(Cst->getType());
563 Constant *Cst = dyn_cast<Constant>(U);
568 if (!Cst || isa<GlobalValue>(Cst) || !containsOnlyConstantData(Cst))
572 if (!shouldConvert(*Cst, PromotionCache))
577 if (!shouldConvertUse(Cst, &I, OpNo))
580 Updates.emplace_back(Cst, &I, OpNo);