Skip to content

Commit 0153b49

Browse files
[Scalar] Avoid creating temporary instances of std::string (NFC) (llvm#140327)
ExprLinearizer::write takes StringRef and immediately sends the content to the stream without hanging onto the pointer, so we do not need to create temporary instances of std::string.
1 parent 061a769 commit 0153b49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,10 +2446,10 @@ class LowerMatrixIntrinsics {
24462446
return;
24472447
} else {
24482448
Ops.append(I->value_op_begin(), I->value_op_end());
2449-
write(std::string(I->getOpcodeName()));
2449+
write(I->getOpcodeName());
24502450
}
24512451

2452-
write(std::string("("));
2452+
write("(");
24532453

24542454
unsigned NumOpsToBreak = 1;
24552455
if (match(Expr, m_Intrinsic<Intrinsic::matrix_column_major_load>()))

0 commit comments

Comments
 (0)