[VPlan] Move live-out printing to VPLiveOut::print (NFC).
Preparation for D150398. This brings live-out printing in line with how printing for recipes is handled.
This commit is contained in:
3 files changed
+14
-5
No files matched your search
@@ -791,11 +791,7 @@ void VPlan::print(raw_ostream &O) const {
|
||||
if (!LiveOuts.empty())
|
||||
O << "\n";
|
||||
for (const auto &KV : LiveOuts) {
|
||||
O << "Live-out ";
|
||||
KV.second->getPhi()->printAsOperand(O);
|
||||
O << " = ";
|
||||
KV.second->getOperand(0)->printAsOperand(O, SlotTracker);
|
||||
O << "\n";
|
||||
KV.second->print(O, SlotTracker);
|
||||
}
|
||||
|
||||
O << "}\n";
|
||||
|
||||
@@ -686,6 +686,11 @@ public:
|
||||
}
|
||||
|
||||
PHINode *getPhi() const { return Phi; }
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
/// Print the VPLiveOut to \p O.
|
||||
void print(raw_ostream &O, VPSlotTracker &SlotTracker) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
/// VPRecipeBase is a base class modeling a sequence of one or more output IR
|
||||
|
||||
@@ -169,6 +169,14 @@ void VPLiveOut::fixPhi(VPlan &Plan, VPTransformState &State) {
|
||||
State.Builder.GetInsertBlock());
|
||||
}
|
||||
|
||||
void VPLiveOut::print(raw_ostream &O, VPSlotTracker &SlotTracker) const {
|
||||
O << "Live-out ";
|
||||
getPhi()->printAsOperand(O);
|
||||
O << " = ";
|
||||
getOperand(0)->printAsOperand(O, SlotTracker);
|
||||
O << "\n";
|
||||
}
|
||||
|
||||
void VPRecipeBase::insertBefore(VPRecipeBase *InsertPos) {
|
||||
assert(!Parent && "Recipe already in some VPBasicBlock");
|
||||
assert(InsertPos->getParent() &&
|
||||
|
||||
Reference in new issue
Block a user