[PATCH] D140478: [RISCV] For Dwarf v5, emit indices into .debug_addr for range list entries

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 16:07:24 PST 2023


dblaikie added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/AsmPrinter.h:456-461
+  // The symbol's address range will only be known after the linking when using
+  // relaxations. Hence, generate address range offsets as relocatable symbols
+  // and not as absolute delta from label difference as they might get resolved
+  // before linking.
+  virtual bool needRelocSymbolsForAddrRange() const { return false; }
+
----------------
dblaikie wrote:
> Does it make sense to forward-compat this by providing the two labels to this function, even if they're ignored for now? Is it plausible that some backend could determine whether a given range is relaxable or not from those labels? Guess we can always add that in later... 
> 
> Maybe the name could be more about relaxation? "is this address range a compile-time constant" or "is this address range not subject to linker relaxation"?
At least I think this function should take the MachineFunction to operate on, rather than using the one that might be set on the AsmPrinter - I would guess if you test this with a module with some functions with relaxation and some without, the current implementation doesn't get it correct - because we emit all these ranges together, so the AsmPrinter's current MF, if it has one, won't be correct for all of the ranges being emitted, right?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140478



More information about the llvm-commits mailing list