Skip to content

Commit e9fbf5e

Browse files
committed
[LLVM][NFC] Remove redundant copy parameter in lambda
1 parent 641b4d5 commit e9fbf5e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/lib/Analysis/VectorUtils.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ void InterleavedAccessInfo::analyzeInterleaving(
14141414

14151415
auto InvalidateGroupIfMemberMayWrap = [&](InterleaveGroup<Instruction> *Group,
14161416
int Index,
1417-
std::string FirstOrLast) -> bool {
1417+
StringRef FirstOrLast) -> bool {
14181418
Instruction *Member = Group->getMember(Index);
14191419
assert(Member && "Group member does not exist");
14201420
Value *MemberPtr = getLoadStorePointerOperand(Member);
@@ -1455,11 +1455,10 @@ void InterleavedAccessInfo::analyzeInterleaving(
14551455
// So we check only group member 0 (which is always guaranteed to exist),
14561456
// and group member Factor - 1; If the latter doesn't exist we rely on
14571457
// peeling (if it is a non-reversed access -- see Case 3).
1458-
if (InvalidateGroupIfMemberMayWrap(Group, 0, std::string("first")))
1458+
if (InvalidateGroupIfMemberMayWrap(Group, 0, "first"))
14591459
continue;
14601460
if (Group->getMember(Group->getFactor() - 1))
1461-
InvalidateGroupIfMemberMayWrap(Group, Group->getFactor() - 1,
1462-
std::string("last"));
1461+
InvalidateGroupIfMemberMayWrap(Group, Group->getFactor() - 1, "last");
14631462
else {
14641463
// Case 3: A non-reversed interleaved load group with gaps: We need
14651464
// to execute at least one scalar epilogue iteration. This will ensure
@@ -1503,11 +1502,11 @@ void InterleavedAccessInfo::analyzeInterleaving(
15031502
// and the last group member. Case 3 (scalar epilog) is not relevant for
15041503
// stores with gaps, which are implemented with masked-store (rather than
15051504
// speculative access, as in loads).
1506-
if (InvalidateGroupIfMemberMayWrap(Group, 0, std::string("first")))
1505+
if (InvalidateGroupIfMemberMayWrap(Group, 0, "first"))
15071506
continue;
15081507
for (int Index = Group->getFactor() - 1; Index > 0; Index--)
15091508
if (Group->getMember(Index)) {
1510-
InvalidateGroupIfMemberMayWrap(Group, Index, std::string("last"));
1509+
InvalidateGroupIfMemberMayWrap(Group, Index, "last");
15111510
break;
15121511
}
15131512
}

0 commit comments

Comments
 (0)