[PATCH] D141036: [JITLink] Add an initial implementation of JITLink for ELF/LoongArch

wanglei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 01:01:53 PST 2023


wangleiat created this revision.
wangleiat added reviewers: lhames, StephenFan, SixWeining, xen0n, MaskRay.
Herald added a subscriber: hiraditya.
Herald added a project: All.
wangleiat requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This implementation supports basic relocation types and adds EHFrame,
Got/Plt handling passes.
This patch also enables JIT support for LoongArch64.

With this patch, I successfully run hello.ll and simple_throw.ll
(which is generated from test-suite/SingleSource/Regression/C++/EH/simple_throw.cpp)
using the `lli` command with options `--jit-kind=orc --jit-linker=jitlink`.

Note: `hasJIT` property of LoongArch32 remains false as there is no
validation environment.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141036

Files:
  llvm/include/llvm/ExecutionEngine/JITLink/ELF_loongarch.h
  llvm/include/llvm/ExecutionEngine/JITLink/loongarch.h
  llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
  llvm/lib/ExecutionEngine/JITLink/ELF.cpp
  llvm/lib/ExecutionEngine/JITLink/ELF_loongarch.cpp
  llvm/lib/ExecutionEngine/JITLink/loongarch.cpp
  llvm/lib/Target/LoongArch/TargetInfo/LoongArchTargetInfo.cpp
  llvm/test/ExecutionEngine/JITLink/LoongArch/ELF_loongarch32_ehframe.s
  llvm/test/ExecutionEngine/JITLink/LoongArch/ELF_loongarch32_relocations.s
  llvm/test/ExecutionEngine/JITLink/LoongArch/ELF_loongarch64_ehframe.s
  llvm/test/ExecutionEngine/JITLink/LoongArch/ELF_loongarch64_relocations.s
  llvm/test/ExecutionEngine/JITLink/LoongArch/lit.local.cfg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141036.486490.patch
Type: text/x-patch
Size: 41104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230105/26c17ff7/attachment.bin>


More information about the llvm-commits mailing list