[PATCH] D16832: Minor performance tweaks to llvm-tblgen (and a few that might be a good idea)

Alexander Riccio via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 2 17:38:11 PST 2016

ariccio added a comment.

(posted elaborative comments)

Comment at: C:/LLVM/llvm/include/llvm/TableGen/Record.h:1312
@@ -1311,1 +1311,3 @@
+      // TODO: getNameInitAsString copy constructs a new std::string,
+      // yet we're only using it in this comparison. Is there a better way?
       if (SCPair.first->getNameInitAsString() == Name)
This is more of a long term suggestion, as I'm not immediately sure how to modify this to eliminate the copy.

Comment at: C:/LLVM/llvm/utils/TableGen/CodeGenTarget.cpp:462
@@ -450,2 +461,3 @@
+  // ~CodeGenIntrinsic(), which is quite wasteful.
   std::sort(Result.begin(), Result.end(),
             [](CodeGenIntrinsic LHS, CodeGenIntrinsic RHS) {
rnk added this code ~8 days ago... any reason why you wrote it as a by-value lambda?


More information about the llvm-commits mailing list