[llvm] [ORC] Do not set CodeModel::Small in LLJITBuilder if JTMB already has… (PR #90599)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 05:44:00 PDT 2024
https://github.com/epitavy created https://github.com/llvm/llvm-project/pull/90599
… a value
>From b8926071f1a443cabce024a2fd5b10d383030441 Mon Sep 17 00:00:00 2001
From: Eliaz Pitavy <eliaz.pitavy at obspm.fr>
Date: Tue, 30 Apr 2024 14:08:33 +0200
Subject: [PATCH] [ORC] Do not set CodeModel::Small in LLJITBuilder if JTMB
already has a value
---
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
index 568b2ececaa09a..6a8fbac8233f4e 100644
--- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -801,8 +801,9 @@ Error LLJITBuilderState::prepareForConstruction() {
break;
}
if (UseJITLink) {
+ if (!JTMB->getCodeModel())
+ JTMB->setCodeModel(CodeModel::Small);
JTMB->setRelocationModel(Reloc::PIC_);
- JTMB->setCodeModel(CodeModel::Small);
CreateObjectLinkingLayer =
[](ExecutionSession &ES,
const Triple &) -> Expected<std::unique_ptr<ObjectLayer>> {
More information about the llvm-commits
mailing list