Skip to content

Commit 0dc9780

Browse files
committed
!fixup address comments, thanks!
1 parent 1a1172e commit 0dc9780

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -966,11 +966,10 @@ class VPIRMetadata {
966966
/// nodes that are common to both.
967967
void intersect(const VPIRMetadata &MD);
968968

969+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
969970
/// Print metadata with node IDs.
970971
void print(raw_ostream &O, const Module *M) const;
971-
972-
/// Return true if there is any metadata to print.
973-
bool empty() const { return Metadata.empty(); }
972+
#endif
974973
};
975974

976975
/// This is a concrete Recipe that models a single VPlan-level instruction.

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1676,6 +1676,7 @@ void VPIRMetadata::intersect(const VPIRMetadata &Other) {
16761676
Metadata = std::move(MetadataIntersection);
16771677
}
16781678

1679+
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16791680
void VPIRMetadata::print(raw_ostream &O, const Module *M) const {
16801681
if (Metadata.empty())
16811682
return;
@@ -1694,6 +1695,7 @@ void VPIRMetadata::print(raw_ostream &O, const Module *M) const {
16941695
});
16951696
O << ")";
16961697
}
1698+
#endif
16971699

16981700
void VPWidenCallRecipe::execute(VPTransformState &State) {
16991701
assert(State.VF.isVector() && "not widening");
@@ -1991,6 +1993,8 @@ void VPWidenSelectRecipe::print(raw_ostream &O, const Twine &Indent,
19911993
O << ", ";
19921994
getOperand(2)->printAsOperand(O, SlotTracker);
19931995
O << (isInvariantCond() ? " (condition is loop invariant)" : "");
1996+
1997+
VPIRMetadata::print(O, getParent()->getPlan()->getModule());
19941998
}
19951999
#endif
19962000

@@ -3461,6 +3465,8 @@ void VPReplicateRecipe::print(raw_ostream &O, const Twine &Indent,
34613465

34623466
if (shouldPack())
34633467
O << " (S->V)";
3468+
3469+
VPIRMetadata::print(O, getParent()->getPlan()->getModule());
34643470
}
34653471
#endif
34663472

@@ -3727,6 +3733,7 @@ void VPWidenLoadEVLRecipe::print(raw_ostream &O, const Twine &Indent,
37273733
printAsOperand(O, SlotTracker);
37283734
O << " = vp.load ";
37293735
printOperands(O, SlotTracker);
3736+
VPIRMetadata::print(O, getParent()->getPlan()->getModule());
37303737
}
37313738
#endif
37323739

@@ -3835,6 +3842,7 @@ void VPWidenStoreEVLRecipe::print(raw_ostream &O, const Twine &Indent,
38353842
VPSlotTracker &SlotTracker) const {
38363843
O << Indent << "WIDEN vp.store ";
38373844
printOperands(O, SlotTracker);
3845+
VPIRMetadata::print(O, getParent()->getPlan()->getModule());
38383846
}
38393847
#endif
38403848

@@ -4123,6 +4131,8 @@ void VPInterleaveRecipe::print(raw_ostream &O, const Twine &Indent,
41234131
}
41244132
++OpIdx;
41254133
}
4134+
4135+
VPIRMetadata::print(O, getParent()->getPlan()->getModule());
41264136
}
41274137
#endif
41284138

@@ -4267,6 +4277,8 @@ void VPInterleaveEVLRecipe::print(raw_ostream &O, const Twine &Indent,
42674277
}
42684278
++OpIdx;
42694279
}
4280+
4281+
VPIRMetadata::print(O, getParent()->getPlan()->getModule());
42704282
}
42714283
#endif
42724284

0 commit comments

Comments
 (0)