[PATCH] D63335: [HIP] Change kernel stub name again
Michael Liao via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 14 11:30:49 PDT 2019
hliao marked an inline comment as done.
hliao added inline comments.
================
Comment at: clang/lib/CodeGen/CGCUDANV.cpp:789
+ return Name;
+ return std::move(("__device_stub__" + Name).str());
+}
----------------
tra wrote:
> I suspect `return "__device_stub__" + Name;` would do. StringRef will convert to std::string and copy elision should avoid unnecessary copy.
"__device__stub__" + Name results in Twine, where not copy is generated. Only the final str() converts Twine into std::string involving copies. Otherwise, there's one copy from Name to std::string and another copy by std::string operator+, right?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63335/new/
https://reviews.llvm.org/D63335
More information about the cfe-commits
mailing list