[llvm] [llvm-objdump] Optimize live element tracking (PR #158763)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 4 01:51:55 PST 2025


================
@@ -122,11 +136,19 @@ class LiveElementPrinter {
   // put live element lines. Pick a less overloaded word.
   unsigned moveToFirstVarColumn(formatted_raw_ostream &OS);
 
-  unsigned findFreeColumn();
+  // Get an existing column for a live element, or find a free one.
+  unsigned getOrCreateColumn(unsigned ElementIdx);
+
+  // Free a column when its element is no longer live.
+  void freeColumn(unsigned ColIdx);
+
+  // Returns the indices of all currently active elements, sorted by their DWARF
+  // discovery order (ElementIdx).
----------------
jh7370 wrote:

I'm not sure what the reference to `ElementIdx` means in the context of this comment?

https://github.com/llvm/llvm-project/pull/158763


More information about the llvm-commits mailing list