Lines Matching defs:ToBePromoted

7919   /// Promote \p ToBePromoted by moving \p Def downward through.
7922 /// b = ToBePromoted <ty2> Def, ...
7924 /// b = ToBePromoted <ty1> a, ...
7925 /// Def = Transition <ty1> ToBePromoted to <ty2>
7926 void promoteImpl(Instruction *ToBePromoted);
8052 /// Check if we can promote \p ToBePromoted to \p Type.
8053 bool canPromote(const Instruction *ToBePromoted) const {
8055 return isa<BinaryOperator>(ToBePromoted);
8058 /// Check if it is profitable to promote \p ToBePromoted
8060 bool shouldPromote(const Instruction *ToBePromoted) const {
8063 for (const Use &U : ToBePromoted->operands()) {
8069 if (canCauseUndefinedBehavior(ToBePromoted, U.getOperandNo()))
8078 int ISDOpcode = TLI.InstructionOpcodeToISD(ToBePromoted->getOpcode());
8091 /// Record \p ToBePromoted as part of the chain to be promoted.
8092 void enqueueForPromotion(Instruction *ToBePromoted) {
8093 InstsToBePromoted.push_back(ToBePromoted);
8117 for (auto &ToBePromoted : InstsToBePromoted)
8118 promoteImpl(ToBePromoted);
8126 void VectorPromoteHelper::promoteImpl(Instruction *ToBePromoted) {
8127 // At this point, we know that all the operands of ToBePromoted but Def
8129 // For Def, we need to use its parameter in ToBePromoted:
8130 // b = ToBePromoted ty1 a
8135 assert(ToBePromoted->getType() == Transition->getType() &&
8138 ToBePromoted->replaceAllUsesWith(Transition);
8140 // b = ToBePromoted ty2 Def => b = ToBePromoted ty1 Def.
8142 ToBePromoted->mutateType(TransitionTy);
8145 // b = ToBePromoted ty1 Def => b = ToBePromoted ty1 a.
8146 for (Use &U : ToBePromoted->operands()) {
8157 canCauseUndefinedBehavior(ToBePromoted, U.getOperandNo()));
8161 ToBePromoted->setOperand(U.getOperandNo(), NewVal);
8163 Transition->moveAfter(ToBePromoted);
8164 Transition->setOperand(getTransitionOriginalValueIdx(), ToBePromoted);
8191 Instruction *ToBePromoted = cast<Instruction>(*Inst->user_begin());
8192 LLVM_DEBUG(dbgs() << "Use: " << *ToBePromoted << '\n');
8194 if (ToBePromoted->getParent() != Parent) {
8196 << ToBePromoted->getParent()->getName()
8202 if (VPH.canCombine(ToBePromoted)) {
8204 << "will be combined with: " << *ToBePromoted << '\n');
8205 VPH.recordCombineInstruction(ToBePromoted);
8212 if (!VPH.canPromote(ToBePromoted) || !VPH.shouldPromote(ToBePromoted))
8217 VPH.enqueueForPromotion(ToBePromoted);
8218 Inst = ToBePromoted;