[PATCH] D70672: [DebugInfo] Don't sink DBG_VALUEs past other DBG_VALUEs of the same variable location

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 07:49:11 PST 2019


jmorse marked an inline comment as done.
jmorse added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineSink.cpp:117
+    /// debug instructions to sink.
+    DenseMap<unsigned, TinyPtrVector<SeenDbgUser>> SeenDbgUsers;
+
----------------
aprantl wrote:
> I have a suspicion that on average, this DenseMap will have very few entries since it contains registers that hold variable values. Would it make sense to use a SmallDenseMap here? Or does it not because the DenseMap is being reused?
I'd suggest the latter; assuming the concern is memory size, there's only one instance of this field per Pass, so it shouldn't consume too much memory.

(NB, I couldn't immediately find any documentation on SmallDenseMap, so I assume its purpose is memory conservation rather than a performance improvement).


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

https://reviews.llvm.org/D70672





More information about the llvm-commits mailing list