Skip to content

Commit e3d9b01

Browse files
authored
[VPlan][NFC] Make VPValue pointer const. (#101334)
1 parent 6867324 commit e3d9b01

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ VPValue *vputils::getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr,
16241624
return Expanded;
16251625
}
16261626

1627-
bool vputils::isHeaderMask(VPValue *V, VPlan &Plan) {
1627+
bool vputils::isHeaderMask(const VPValue *V, VPlan &Plan) {
16281628
if (isa<VPActiveLaneMaskPHIRecipe>(V))
16291629
return true;
16301630

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,12 +3799,12 @@ VPValue *getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr,
37993799
ScalarEvolution &SE);
38003800

38013801
/// Returns true if \p VPV is uniform after vectorization.
3802-
inline bool isUniformAfterVectorization(VPValue *VPV) {
3802+
inline bool isUniformAfterVectorization(const VPValue *VPV) {
38033803
// A value defined outside the vector region must be uniform after
38043804
// vectorization inside a vector region.
38053805
if (VPV->isDefinedOutsideVectorRegions())
38063806
return true;
3807-
VPRecipeBase *Def = VPV->getDefiningRecipe();
3807+
const VPRecipeBase *Def = VPV->getDefiningRecipe();
38083808
assert(Def && "Must have definition for value defined inside vector region");
38093809
if (auto Rep = dyn_cast<VPReplicateRecipe>(Def))
38103810
return Rep->isUniform();
@@ -3816,7 +3816,7 @@ inline bool isUniformAfterVectorization(VPValue *VPV) {
38163816
}
38173817

38183818
/// Return true if \p V is a header mask in \p Plan.
3819-
bool isHeaderMask(VPValue *V, VPlan &Plan);
3819+
bool isHeaderMask(const VPValue *V, VPlan &Plan);
38203820
} // end namespace vputils
38213821

38223822
} // end namespace llvm

0 commit comments

Comments
 (0)