forked from OSchip/llvm-project
[VPlan] Move initial quote emission from ::print to ::dumpBasicBlock.
This means there will be no stray " when printing individual recipes using print()/dump() in a debugger, for example.
This commit is contained in:
parent
a6db7cf1ce
commit
a94497a342
|
@ -502,7 +502,7 @@ void VPInstruction::execute(VPTransformState &State) {
|
|||
|
||||
void VPInstruction::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"EMIT ";
|
||||
O << "EMIT ";
|
||||
print(O, SlotTracker);
|
||||
}
|
||||
|
||||
|
@ -761,7 +761,7 @@ void VPlanPrinter::dumpBasicBlock(const VPBasicBlock *BasicBlock) {
|
|||
// Dump the block predicate.
|
||||
const VPValue *Pred = BasicBlock->getPredicate();
|
||||
if (Pred) {
|
||||
OS << " +\n" << Indent << " \"BlockPredicate: ";
|
||||
OS << " +\n" << Indent << " \"BlockPredicate: \"";
|
||||
if (const VPInstruction *PredI = dyn_cast<VPInstruction>(Pred)) {
|
||||
PredI->printAsOperand(OS, SlotTracker);
|
||||
OS << " (" << DOT::EscapeString(PredI->getParent()->getName())
|
||||
|
@ -771,7 +771,7 @@ void VPlanPrinter::dumpBasicBlock(const VPBasicBlock *BasicBlock) {
|
|||
}
|
||||
|
||||
for (const VPRecipeBase &Recipe : *BasicBlock) {
|
||||
OS << " +\n" << Indent;
|
||||
OS << " +\n" << Indent << "\"";
|
||||
Recipe.print(OS, Indent, SlotTracker);
|
||||
OS << "\\l\"";
|
||||
}
|
||||
|
@ -833,7 +833,7 @@ void VPlanPrinter::printAsIngredient(raw_ostream &O, const Value *V) {
|
|||
|
||||
void VPWidenCallRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"WIDEN-CALL ";
|
||||
O << "WIDEN-CALL ";
|
||||
|
||||
auto *CI = cast<CallInst>(getUnderlyingInstr());
|
||||
if (CI->getType()->isVoidTy())
|
||||
|
@ -850,7 +850,7 @@ void VPWidenCallRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPWidenSelectRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"WIDEN-SELECT ";
|
||||
O << "WIDEN-SELECT ";
|
||||
printAsOperand(O, SlotTracker);
|
||||
O << " = select ";
|
||||
getOperand(0)->printAsOperand(O, SlotTracker);
|
||||
|
@ -863,7 +863,7 @@ void VPWidenSelectRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPWidenRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"WIDEN ";
|
||||
O << "WIDEN ";
|
||||
printAsOperand(O, SlotTracker);
|
||||
O << " = " << getUnderlyingInstr()->getOpcodeName() << " ";
|
||||
printOperands(O, SlotTracker);
|
||||
|
@ -871,7 +871,7 @@ void VPWidenRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPWidenIntOrFpInductionRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"WIDEN-INDUCTION";
|
||||
O << "WIDEN-INDUCTION";
|
||||
if (Trunc) {
|
||||
O << "\\l\"";
|
||||
O << " +\n" << Indent << "\" " << VPlanIngredient(IV) << "\\l\"";
|
||||
|
@ -882,7 +882,7 @@ void VPWidenIntOrFpInductionRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPWidenGEPRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"WIDEN-GEP ";
|
||||
O << "WIDEN-GEP ";
|
||||
O << (IsPtrLoopInvariant ? "Inv" : "Var");
|
||||
size_t IndicesNumber = IsIndexLoopInvariant.size();
|
||||
for (size_t I = 0; I < IndicesNumber; ++I)
|
||||
|
@ -896,12 +896,12 @@ void VPWidenGEPRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPWidenPHIRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"WIDEN-PHI " << VPlanIngredient(Phi);
|
||||
O << "WIDEN-PHI " << VPlanIngredient(Phi);
|
||||
}
|
||||
|
||||
void VPBlendRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"BLEND ";
|
||||
O << "BLEND ";
|
||||
Phi->printAsOperand(O, false);
|
||||
O << " =";
|
||||
if (getNumIncomingValues() == 1) {
|
||||
|
@ -921,7 +921,7 @@ void VPBlendRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPReductionRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"REDUCE ";
|
||||
O << "REDUCE ";
|
||||
printAsOperand(O, SlotTracker);
|
||||
O << " = ";
|
||||
getChainOp()->printAsOperand(O, SlotTracker);
|
||||
|
@ -937,7 +937,7 @@ void VPReductionRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"" << (IsUniform ? "CLONE " : "REPLICATE ");
|
||||
O << (IsUniform ? "CLONE " : "REPLICATE ");
|
||||
|
||||
if (!getUnderlyingInstr()->getType()->isVoidTy()) {
|
||||
printAsOperand(O, SlotTracker);
|
||||
|
@ -952,13 +952,13 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent,
|
|||
|
||||
void VPPredInstPHIRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"PHI-PREDICATED-INSTRUCTION ";
|
||||
O << "PHI-PREDICATED-INSTRUCTION ";
|
||||
printOperands(O, SlotTracker);
|
||||
}
|
||||
|
||||
void VPWidenMemoryInstructionRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"WIDEN ";
|
||||
O << "WIDEN ";
|
||||
|
||||
if (!isStore()) {
|
||||
getVPValue()->printAsOperand(O, SlotTracker);
|
||||
|
@ -996,7 +996,7 @@ void VPWidenCanonicalIVRecipe::execute(VPTransformState &State) {
|
|||
|
||||
void VPWidenCanonicalIVRecipe::print(raw_ostream &O, const Twine &Indent,
|
||||
VPSlotTracker &SlotTracker) const {
|
||||
O << "\"EMIT ";
|
||||
O << "EMIT ";
|
||||
getVPValue()->printAsOperand(O, SlotTracker);
|
||||
O << " = WIDEN-CANONICAL-INDUCTION";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue