[PATCH] D129092: [Orc][LLJIT] Use JITLink on RISC-V
Jonas Hahnfeld via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 4 10:35:40 PDT 2022
Hahnfeld created this revision.
Hahnfeld added reviewers: lhames, StephenFan, fourdim.
Herald added subscribers: sunshaoce, VincentWu, luke957, vkmr, luismarques, sameer.abuasal, s.egerton, Jim, PkmX, rogfer01, shiva0217, kito-cheng, simoncook, hiraditya, arichardson.
Herald added a project: All.
Hahnfeld requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.
RuntimeDyld does not support RISC-V, so it makes sense to enable
JITLink by default. This also makes relocations work without support
for a large code model.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D129092
Files:
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
Index: llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
===================================================================
--- llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -666,8 +666,9 @@
// JIT linker.
if (!CreateObjectLinkingLayer) {
auto &TT = JTMB->getTargetTriple();
- if (TT.isOSBinFormatMachO() &&
- (TT.getArch() == Triple::aarch64 || TT.getArch() == Triple::x86_64)) {
+ if (TT.getArch() == Triple::riscv64 ||
+ (TT.isOSBinFormatMachO() &&
+ (TT.getArch() == Triple::aarch64 || TT.getArch() == Triple::x86_64))) {
JTMB->setRelocationModel(Reloc::PIC_);
JTMB->setCodeModel(CodeModel::Small);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129092.442122.patch
Type: text/x-patch
Size: 687 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220704/46a70de2/attachment.bin>
More information about the llvm-commits
mailing list