Skip to content

llvmpipe: add a new JIT engine based on LLVM ORCJIT, also add RISC-V support, also make unnamed global have internal linkage (updated)

Yukari Chiba requested to merge YukariChiba/mesa:orcjit into main

This MR contains updates of multiple previous commits to implement ORCJIT, a new JIT engine from LLVM, to provide support for new architectures.

Original commits come from @alexfanqi in these MRs, however, the original author doesn't seems to be updating anymore:

  • !17801 (closed) Draft: llvmpipe: add a new jit engine based on llvm orcjit, also add in riscv support
  • !20036 llvmpipe: make unnamed global have internal linkage

Some changes in lp_bld_init.c (MCJIT) have also been synchronized to lp_bld_init_orc.cpp (ORCJIT).

A meson option llvm-orcjit is introduced to enable ORCJIT support. (Disabled by default)

I've tested on PineTab-V (JH7110 RISC-V) with glxgears and glmark2 (score: 10). More tests and benchmarks are welcomed.

I've tested on Visionfive2(JH7110), LicheePi 4A(TH1520), Sophgo Mango(SG2042). It works.


WIP (maybe later?):

  • Remove redundant GALLIVM_USE_ORCJIT for LLVMOrcThreadSafeContextRef
  • Remove redundant GALLIVM_USE_ORCJIT for function name (char *) and value ref (LLVMValueRef)
Edited by Yukari Chiba

Merge request reports