[PATCH] D146978: [Assignment Tracking] Improve removeRedundantDbgLocsUsingBackwardScan

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 03:59:33 PDT 2023


jmorse accepted this revision.
jmorse added a comment.
This revision is now accepted and ready to land.

LGTM with one question -- there's a semantic change whereby a debug intrinsic with no fragment is considered as covering the whole variable, right? (I think this is uncontroversial).

As you say, strictly this is doing more work, but to reduce work in the next patch.



================
Comment at: llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp:2152
   bool Changed = false;
-  SmallDenseSet<DebugVariable> VariableSet;
-
+  DenseMap<DebugAggregate, BitVector> VariableDefinedBits;
   // Scan over the entire block, not just over the instructions mapped by
----------------
Any particular reason for switching from SmallDenseMap to DenseMap -- there's an initial allocation for DenseMaps that's going to mean one additional malloc/free for each block, even if there's little work to be done in it.


================
Comment at: llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp:2188
+
+      // Inert the bits the location definition defines.
+      auto InsertResult =
----------------



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

https://reviews.llvm.org/D146978



More information about the llvm-commits mailing list