[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:05:58 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; }
+
----------------
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"?
================
Comment at: llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp:254
+ .getValueAsString();
+ if (FS.contains("-relax"))
+ return false;
----------------
Is this possible, even when the MachineFunction's subtarget has the relax feature? (I'd have thought the subtarget would already reflect/account for/be derived from the function's attributes?)
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