1 Star 0 Fork 43

jchzhou/mesa

forked from src-openEuler/mesa 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
31108.patch 2.22 KB
一键复制 编辑 原始数据 按行查看 历史
jchzhou 提交于 2024-09-10 17:22 . add upstream gallivm patch
From afe6147af2be4093fbc5e69299e86015982658ec Mon Sep 17 00:00:00 2001
From: Icenowy Zheng <uwu@icenowy.me>
Date: Tue, 10 Sep 2024 17:00:30 +0800
Subject: [PATCH] gallivm: use JITLink unconditionally with ORCJIT
RuntimeDyld is getting deprecated along with MCJIT, so although it's
possible to use it with ORCJIT now, using JITLink seems to be better.
Drop the condition for enabling JITLink, to enforce it everywhere.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
---
src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
index f38db3a57fb03..202eaca4683b3 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init_orc.cpp
@@ -58,12 +58,6 @@
/* conflict with ObjectLinkingLayer.h */
#include "util/u_memory.h"
-#if DETECT_ARCH_RISCV64 == 1 || DETECT_ARCH_RISCV32 == 1 || DETECT_ARCH_LOONGARCH64 == 1 || (defined(_WIN32) && LLVM_VERSION_MAJOR >= 15)
-/* use ObjectLinkingLayer (JITLINK backend) */
-#define USE_JITLINK
-#endif
-/* else use old RTDyldObjectLinkingLayer (RuntimeDyld backend) */
-
namespace {
class LPObjectCacheORC : public llvm::ObjectCache {
@@ -334,24 +328,17 @@ LPJit::LPJit() :jit_dylib_count(0) {
tm = wrap(tm_unique.get());
/* Create an LLJIT instance with an ObjectLinkingLayer (JITLINK)
- * or RuntimeDyld as the base layer.
+ * as the base layer.
* intel & perf listeners are not supported by ObjectLinkingLayer yet
*/
lljit = ExitOnErr(
LLJITBuilder()
.setJITTargetMachineBuilder(std::move(JTMB))
-#ifdef USE_JITLINK
.setObjectLinkingLayerCreator(
[&](ExecutionSession &ES, const llvm::Triple &TT) {
return std::make_unique<ObjectLinkingLayer>(
ES, ExitOnErr(llvm::jitlink::InProcessMemoryManager::Create()));
})
-#else
-#if LLVM_USE_INTEL_JITEVENTS
- .RegisterJITEventListener(
- llvm::JITEventListener::createIntelJITEventListener())
-#endif
-#endif
.create());
LLVMOrcIRTransformLayerRef TL = wrap(&lljit->getIRTransformLayer());
--
GitLab
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/jchzhou/mesa.git
git@gitee.com:jchzhou/mesa.git
jchzhou
mesa
mesa
master

搜索帮助