[PATCH] D93001: [lld-macho] Don't load dylibs more than once

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 13:51:35 PST 2020


smeenai added inline comments.


================
Comment at: lld/MachO/DriverUtils.cpp:181
 
+static StringSet<> loadedDylibs;
+
----------------
StringSet copies all the strings you add to it. I don't think that's a huge deal for this use case, but just something to keep in mind if this ever starts showing up in profiles.

(A SmallSet of StringRef would avoid the copying, but you'd rehash all the strings whenever you grew the set. A SmallSet of CachedHashStringRef would avoid both the copying and the rehashing, but it feels kinda overkill?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93001



More information about the llvm-commits mailing list