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

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 6 13:48:15 PST 2020


lattner added a comment.

Nice!  StringMap is definitely a good way to go here, the timings in that talk don't look right at all.



================
Comment at: llvm/lib/TableGen/Record.cpp:2602
+    StringRef ClassName) const {
+  std::string ClassNameString = ClassName.str();
+  auto Pair = ClassRecordsMap.try_emplace(ClassNameString);
----------------
Because you're using StringMap you don't need to convert this to an std::string.  try_emplace works with StringRef.


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

https://reviews.llvm.org/D92674



More information about the llvm-commits mailing list