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

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 21:43:48 PST 2023


jrtc27 added a comment.

In D140478#4168115 <https://reviews.llvm.org/D140478#4168115>, @dblaikie wrote:

> In D140478#4165992 <https://reviews.llvm.org/D140478#4165992>, @jrtc27 wrote:
>
>> In D140478#4165988 <https://reviews.llvm.org/D140478#4165988>, @dblaikie wrote:
>>
>>> In D140478#4164792 <https://reviews.llvm.org/D140478#4164792>, @RamNalamothu wrote:
>>>
>>>> @dblaikie
>>>>
>>>> As I already replied earlier, there is not enough context to reach the MachineFunction from the symbol or determine if relaxation is enabled for the given address range.
>>>
>>> Then won't this make the wrong decisions if the value varies between functions/subtargets?
>>>
>>>> Also, at the moment, the `-mrelax/-mno-relax` affects the entire compilation unit for the RISC-V.
>>>
>>> Then wouldn't these be target features, rather than subtarget features? My understanding is that subtarget features generally can vary by function, whereas target features cannot.
>>>
>>> Even if the command line flags don't support it, we could probably make a simple IR example with different relaxation per function? & so we probably should be able to handle that case.
>>
>> It's a per-function feature that has implications for other functions in the same section (deleting code in one function at link time will shunt around the code in the rest of the section).
>
>
>
> In D140478#4165992 <https://reviews.llvm.org/D140478#4165992>, @jrtc27 wrote:
>
>> In D140478#4165988 <https://reviews.llvm.org/D140478#4165988>, @dblaikie wrote:
>>
>>> In D140478#4164792 <https://reviews.llvm.org/D140478#4164792>, @RamNalamothu wrote:
>>>
>>>> @dblaikie
>>>>
>>>> As I already replied earlier, there is not enough context to reach the MachineFunction from the symbol or determine if relaxation is enabled for the given address range.
>>>
>>> Then won't this make the wrong decisions if the value varies between functions/subtargets?
>>>
>>>> Also, at the moment, the `-mrelax/-mno-relax` affects the entire compilation unit for the RISC-V.
>>>
>>> Then wouldn't these be target features, rather than subtarget features? My understanding is that subtarget features generally can vary by function, whereas target features cannot.
>>>
>>> Even if the command line flags don't support it, we could probably make a simple IR example with different relaxation per function? & so we probably should be able to handle that case.
>>
>> It's a per-function feature that has implications for other functions in the same section (deleting code in one function at link time will shunt around the code in the rest of the section).
>
> What does it mean for it to be per-function? Can it vary at all between functions in the same module? (if not, why is it per-function?)

It governs whether or not that function's text relocations are paired with R_RISCV_RELAX to tell the linker it can relax them.


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