[PATCH] D83797: [InjectTLIMappings] Use StringRef instead of std::string for FN name.

Nadav Rotem via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 13:06:03 PDT 2020


nadav updated this revision to Diff 277953.

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83797/new/

https://reviews.llvm.org/D83797

Files:
  llvm/lib/Transforms/Utils/InjectTLIMappings.cpp


Index: llvm/lib/Transforms/Utils/InjectTLIMappings.cpp
===================================================================
--- llvm/lib/Transforms/Utils/InjectTLIMappings.cpp
+++ llvm/lib/Transforms/Utils/InjectTLIMappings.cpp
@@ -77,7 +77,8 @@
   if (CI.isNoBuiltin() || !CI.getCalledFunction())
     return;
 
-  const std::string ScalarName = std::string(CI.getCalledFunction()->getName());
+  StringRef ScalarName = CI.getCalledFunction()->getName();
+
   // Nothing to be done if the TLI thinks the function is not
   // vectorizable.
   if (!TLI.isFunctionVectorizable(ScalarName))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83797.277953.patch
Type: text/x-patch
Size: 588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200714/86f80101/attachment.bin>


More information about the llvm-commits mailing list