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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 09:43:55 PDT 2019


aprantl added a comment.

What's the performance impact of this change? Specifically, I'd be interested in the wall clock time difference for building an RelWithDebInfo+asan build of clang.



================
Comment at: include/llvm/CodeGen/DbgEntityHistoryCalculator.h:26
 // For each user variable, keep a list of instruction ranges where this variable
 // is accessible. The variables are listed in order of appearance.
 class DbgValueHistoryMap {
----------------
`///`


================
Comment at: include/llvm/CodeGen/DbgEntityHistoryCalculator.h:28
 class DbgValueHistoryMap {
-  // Each instruction range starts with a DBG_VALUE instruction, specifying the
-  // location of a variable, which is assumed to be valid until the end of the
-  // range. If end is not specified, location is valid until the start
-  // instruction of the next instruction range, or until the end of the
-  // function.
+  // There exist two types of history map entries:
+  //
----------------
This should be the second paragraph of the class doxygen comment above (i.e., the non-brief part).


================
Comment at: include/llvm/CodeGen/DbgEntityHistoryCalculator.h:44
 public:
-  class Entry {
-    const MachineInstr *Begin;
-    const MachineInstr *End;
+  // Index in the entry vector.
+  typedef size_t EntryIndex;
----------------
`///` etc..


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


================
Comment at: lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp:152
+
+// Add a new debug value for @Var. Closes all overlapping debug values.
+static void handleNewDebugValue(InlinedEntity Var, const MachineInstr &DV,
----------------
`///`  and `\p Var`


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59941





More information about the llvm-commits mailing list