Skip to content

Commit 3444240

Browse files
committed
[VPlan] Mark vputils::onlyFirstPartUsed arg as const (NFC)
Split off #80269 as suggested.
1 parent 6936479 commit 3444240

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,9 +1402,9 @@ bool vputils::onlyFirstLaneUsed(const VPValue *Def) {
14021402
[Def](const VPUser *U) { return U->onlyFirstLaneUsed(Def); });
14031403
}
14041404

1405-
bool vputils::onlyFirstPartUsed(VPValue *Def) {
1405+
bool vputils::onlyFirstPartUsed(const VPValue *Def) {
14061406
return all_of(Def->users(),
1407-
[Def](VPUser *U) { return U->onlyFirstPartUsed(Def); });
1407+
[Def](const VPUser *U) { return U->onlyFirstPartUsed(Def); });
14081408
}
14091409

14101410
VPValue *vputils::getOrCreateVPValueForSCEVExpr(VPlan &Plan, const SCEV *Expr,

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3391,7 +3391,7 @@ namespace vputils {
33913391
bool onlyFirstLaneUsed(const VPValue *Def);
33923392

33933393
/// Returns true if only the first part of \p Def is used.
3394-
bool onlyFirstPartUsed(VPValue *Def);
3394+
bool onlyFirstPartUsed(const VPValue *Def);
33953395

33963396
/// Get or create a VPValue that corresponds to the expansion of \p Expr. If \p
33973397
/// Expr is a SCEVConstant or SCEVUnknown, return a VPValue wrapping the live-in

0 commit comments

Comments
 (0)