Lines Matching defs:Cst
253 /// Check if the given use (Instruction + OpIdx) of Cst should be converted into
254 /// a load of a global variable initialized with Cst.
258 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr,
310 /// Check if the given Cst should be converted into
311 /// a load of a global variable initialized with Cst.
324 static bool shouldConvertImpl(const Constant *Cst) {
325 if (isa<const UndefValue>(Cst))
330 // E.g., when the type of Cst require more instructions than the
332 // instances of Cst.
335 if (Cst->isZeroValue())
342 if (Cst->getType()->isVectorTy())
344 return isConstantUsingVectorTy(Cst->getType());
550 Constant *Cst = dyn_cast<Constant>(U);
554 if (!Cst || isa<GlobalValue>(Cst) || isa<ConstantExpr>(Cst))
558 if (!shouldConvert(*Cst, PromotionCache))
563 if (!shouldConvertUse(Cst, &I, OpNo))
566 Updates.emplace_back(Cst, &I, OpNo);