File tree Expand file tree Collapse file tree 4 files changed +5
-12
lines changed
unittests/Transforms/Vectorize Expand file tree Collapse file tree 4 files changed +5
-12
lines changed Original file line number Diff line number Diff line change @@ -64,15 +64,9 @@ static cl::opt<bool> PrintVPlansInDotFormat(
6464#define DEBUG_TYPE " loop-vectorize"
6565
6666#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
67- raw_ostream &llvm::operator <<(raw_ostream &OS, const VPValue &V) {
68- const VPInstruction *Instr = dyn_cast<VPInstruction>(&V);
69- VPSlotTracker SlotTracker (
70- (Instr && Instr->getParent ()) ? Instr->getParent ()->getPlan () : nullptr );
71- V.print (OS, SlotTracker);
72- return OS;
73- }
7467raw_ostream &llvm::operator <<(raw_ostream &OS, const VPRecipeBase &R) {
75- VPSlotTracker SlotTracker (R.getParent ()->getPlan ());
68+ const VPBasicBlock *Parent = R.getParent ();
69+ VPSlotTracker SlotTracker (Parent ? Parent->getPlan () : nullptr );
7670 R.print (OS, " " , SlotTracker);
7771 return OS;
7872}
Original file line number Diff line number Diff line change @@ -516,8 +516,8 @@ VPInstruction *VPlanSlp::buildGraph(ArrayRef<VPValue *> Values) {
516516 auto *Inst = cast<VPInstruction>(Values[0 ])->getUnderlyingInstr ();
517517 auto *VPI = new VPInstruction (Opcode, CombinedOperands, Inst->getDebugLoc ());
518518
519- LLVM_DEBUG (dbgs () << " Create VPInstruction " << cast<VPValue>( *VPI) << " "
520- << Values[ 0 ] << " \n " );
519+ LLVM_DEBUG (dbgs () << " Create VPInstruction " << *VPI << " " << Values[ 0 ]
520+ << " \n " );
521521 addCombined (Values, VPI);
522522 return VPI;
523523}
Original file line number Diff line number Diff line change @@ -194,7 +194,6 @@ class VPValue {
194194typedef DenseMap<Value *, VPValue *> Value2VPValueTy;
195195typedef DenseMap<VPValue *, Value *> VPValue2ValueTy;
196196
197- raw_ostream &operator <<(raw_ostream &OS, const VPValue &V);
198197raw_ostream &operator <<(raw_ostream &OS, const VPRecipeBase &R);
199198
200199// / This class augments VPValue with operands which provide the inverse def-use
Original file line number Diff line number Diff line change @@ -812,7 +812,7 @@ Successor(s): ir-bb<scalar.header>
812812 {
813813 std::string I4Dump;
814814 raw_string_ostream OS (I4Dump);
815- OS << *cast<VPValue>(I4) ;
815+ OS << *I4 ;
816816 EXPECT_EQ (" EMIT vp<%5> = mul vp<%3>, vp<%2>" , I4Dump);
817817 }
818818}
You can’t perform that action at this time.
0 commit comments