[PATCH] D92674: [TableGen] Cache the vectors of records returned by getAllDerivedDefinitions().

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 11:24:39 PST 2020


dblaikie added inline comments.


================
Comment at: llvm/lib/TableGen/Record.cpp:2600
+// the same vectors multiple times.
 std::vector<Record *> RecordKeeper::getAllDerivedDefinitions(
+    StringRef ClassName) const {
----------------
Now that the result is cached, perhaps this function could return by const ref instead of by value, to avoid unnecessary copies of the resulting vector?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92674



More information about the llvm-commits mailing list