[PATCH] D59941: [DebugInfo] Improve handling of clobbered fragments

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 2 16:36:35 PDT 2019


aprantl added inline comments.


================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:111
+// pointers.
+using DbgValueEntriesMap = std::map<InlinedEntity, SmallSet<EntryIndex, 1>>;
+
----------------
dstenb wrote:
> 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.
... or sorted llvm::SmallVectors.


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

https://reviews.llvm.org/D59941





More information about the llvm-commits mailing list