[PATCH] D149526: [JITLink][RISCV] Implement linker relaxation

Job Noorman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 04:38:26 PDT 2023


jobnoorman updated this revision to Diff 518680.
jobnoorman added a comment.

Implement the following suggestion:

In D149524#4308261 <https://reviews.llvm.org/D149524#4308261>, @lhames wrote:

> For `R_RISCV_RELAX` we should add relaxable edge kinds to the RISCV edge kinds enum (along the same lines as the x86-64 relaxable edges, and we should take this opportunity to rename the RISCV edges to bring them in line with the other architectures). When the ELF/RISCV LinkGraphBuilder sees an `R_RISCV_RELAX` relocation it should choose the relaxable variant for the corresponding edge.

The new edge kinds are called `CallRelaxable` and `AlignRelaxable`.

Note that I think we should do the renaming of other edges in a different patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149526

Files:
  llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
  llvm/include/llvm/ExecutionEngine/JITLink/riscv.h
  llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
  llvm/lib/ExecutionEngine/JITLink/riscv.cpp
  llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_align.s
  llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_align_rvc.s
  llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_call.s
  llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_call_boundary.s
  llvm/test/ExecutionEngine/JITLink/RISCV/ELF_relax_call_rvc.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149526.518680.patch
Type: text/x-patch
Size: 37295 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230502/4d411d38/attachment.bin>


More information about the llvm-commits mailing list