[PATCH] D59941: [DebugInfo] Improve handling of clobbered fragments
David Stenberg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 07:36:54 PDT 2019
dstenb marked 3 inline comments as done.
dstenb added inline comments.
================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:111
+// pointers.
+using DbgValueEntriesMap = std::map<InlinedEntity, SmallSet<EntryIndex, 1>>;
+
----------------
aprantl wrote:
> Do we really need the properties of a std::map here and in the line above?
> So far every time I tried using a std::map in AsmPrinter a std::vector + std::sort turned out to be faster and to use less memory.
There is at least be no need for iterators to be valid after insertion/deletion, nor is the iteration order important for determinism, which I guess is the two of the main benefits of std::map compared to LLVM's own map implementations. I tried switching both to DenseMap, but I did at least not see any effect on the build time when building the RelWithDebInfo+asan clang binary, but I'm not sure what conclusions I should draw from that.
I will look into switching both to sorted vectors.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59941/new/
https://reviews.llvm.org/D59941
More information about the llvm-commits
mailing list