Lines Matching refs:Cst
166 bool insertDefinitions(Constant *Cst, InsertionPointsPerFunc &InsPtsPerFunc);
182 bool promoteConstant(Constant *Cst);
239 static bool shouldConvertUse(const Constant *Cst, const Instruction *Instr, in shouldConvertUse() argument
308 static bool shouldConvert(const Constant *Cst) { in shouldConvert() argument
309 if (isa<const UndefValue>(Cst)) in shouldConvert()
319 if (Cst->isZeroValue()) in shouldConvert()
326 if (Cst->getType()->isVectorTy()) in shouldConvert()
328 return isConstantUsingVectorTy(Cst->getType()); in shouldConvert()
461 Constant *Cst, InsertionPointsPerFunc &InsPtsPerFunc) { in insertDefinitions() argument
480 *M, Cst->getType(), true, GlobalValue::InternalLinkage, nullptr, in insertDefinitions()
482 PromotedGV->setInitializer(Cst); in insertDefinitions()
522 bool AArch64PromoteConstant::promoteConstant(Constant *Cst) { in promoteConstant() argument
523 assert(Cst && "Given variable is not a valid constant."); in promoteConstant()
525 if (!shouldConvert(Cst)) in promoteConstant()
530 DEBUG(Cst->print(dbgs())); in promoteConstant()
533 return computeAndInsertDefinitions(Cst); in promoteConstant()
547 Constant *Cst = dyn_cast<Constant>(Op); in runOnFunction() local
551 if (Cst && !isa<GlobalValue>(Cst) && !isa<ConstantExpr>(Cst) && in runOnFunction()
552 AlreadyChecked.insert(Cst).second) in runOnFunction()
553 LocalChange |= promoteConstant(Cst); in runOnFunction()