Skip to content

Commit 6936479

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

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
@@ -1397,9 +1397,9 @@ void VPSlotTracker::assignSlots(const VPBasicBlock *VPBB) {
13971397
assignSlot(Def);
13981398
}
13991399

1400-
bool vputils::onlyFirstLaneUsed(VPValue *Def) {
1400+
bool vputils::onlyFirstLaneUsed(const VPValue *Def) {
14011401
return all_of(Def->users(),
1402-
[Def](VPUser *U) { return U->onlyFirstLaneUsed(Def); });
1402+
[Def](const VPUser *U) { return U->onlyFirstLaneUsed(Def); });
14031403
}
14041404

14051405
bool vputils::onlyFirstPartUsed(VPValue *Def) {

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3388,7 +3388,7 @@ class VPlanSlp {
33883388
namespace vputils {
33893389

33903390
/// Returns true if only the first lane of \p Def is used.
3391-
bool onlyFirstLaneUsed(VPValue *Def);
3391+
bool onlyFirstLaneUsed(const VPValue *Def);
33923392

33933393
/// Returns true if only the first part of \p Def is used.
33943394
bool onlyFirstPartUsed(VPValue *Def);

0 commit comments

Comments
 (0)