[PATCH] D34994: [table] Avoid creating temporary strings
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 4 19:32:06 PDT 2017
alexshap created this revision.
If a method / function returns a StringRef but the
variable is of type const std::string& a temporary string is
created (StringRef has a cast operator to std::string),
which is a suboptimal behavior.
Test plan: make check-all
This cleanup is a continuation of the efforts started
in https://reviews.llvm.org/D34969 and https://reviews.llvm.org/D34970.
The changes are broken up into multiples diffs
to make reviewing / landing / reverting (if necessary) easier.
Test plan: make check-all
Repository:
rL LLVM
https://reviews.llvm.org/D34994
Files:
utils/TableGen/FixedLenDecoderEmitter.cpp
utils/TableGen/SearchableTableEmitter.cpp
utils/TableGen/SubtargetEmitter.cpp
utils/TableGen/X86RecognizableInstr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34994.105210.patch
Type: text/x-patch
Size: 4076 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170705/8b771ce8/attachment-0001.bin>
More information about the llvm-commits
mailing list