[PATCH] D37957: [TableGen] Some simple optimizations to TableGen execution time

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 16 23:54:14 PDT 2017


craig.topper added inline comments.


================
Comment at: llvm/utils/TableGen/CodeGenDAGPatterns.cpp:190
+  llvm::SmallVector<MVT, 4> Types(S.begin(), S.end());
+  Types.reserve(S.size());
   array_pod_sort(Types.begin(), Types.end());
----------------
Why do you need a reserve here? Isn't the vector already have S.size() elements in it after the constructor?


https://reviews.llvm.org/D37957





More information about the llvm-commits mailing list