[llvm-dev] How to build lli (LLVM JIT) for RISCV?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] How to build lli (LLVM JIT) for RISCV?

Finkel, Hal J. via llvm-dev
Hi everyone,

I am trying to build a JIT for the RISC-V platform, but I could not figure out how. Could you provide some hints? Great thanks!

Initially, I found that LLVM has RISCV backend, and I compiled it following the instructions here. I got a cross-compiler version of clang (running on x86 and the generated binary runs on RISC-V), but the lli is still a X86 tool.

Then, I tried to build LLVM with riscv-gnu-toolchain, and I got many tools such as llc working on RISC-V properly. However, the lli still could not work properly. When I tried to process the LLVM bytecode file (.ll file) on RISC-V using lli, I got the error:
         error creating EE: No available targets are compatible with this triple.
Furthermore, when I typed: lli -version, I got:
  LLVM version 7.0.0svn
  DEBUG build with assertions.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: (unknown)
But when I typed: llc -version (llc works fine), I got:
  LLVM version 7.0.0svn
  DEBUG build with assertions.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: (unknown)
  Registered Targets:
    riscv32 - 32-bit RISC-V
    riscv64 - 64-bit RISC-V
    x86     - 32-bit X86: Pentium-Pro and above
    x86-64  - 64-bit X86: EM64T and AMD64

It seems that the lli tool does not support RISC-V target.

Could anyone give me some hints? Thank you so much!!

Best,
Rui



_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] How to build lli (LLVM JIT) for RISCV?

Finkel, Hal J. via llvm-dev
No one has implemented JIT for RISC-V yet.

On Tue, Dec 18, 2018 at 8:20 AM Dogtail L via llvm-dev <[hidden email]> wrote:
Hi everyone,

I am trying to build a JIT for the RISC-V platform, but I could not figure out how. Could you provide some hints? Great thanks!

Initially, I found that LLVM has RISCV backend, and I compiled it following the instructions here. I got a cross-compiler version of clang (running on x86 and the generated binary runs on RISC-V), but the lli is still a X86 tool.

Then, I tried to build LLVM with riscv-gnu-toolchain, and I got many tools such as llc working on RISC-V properly. However, the lli still could not work properly. When I tried to process the LLVM bytecode file (.ll file) on RISC-V using lli, I got the error:
         error creating EE: No available targets are compatible with this triple.
Furthermore, when I typed: lli -version, I got:
  LLVM version 7.0.0svn
  DEBUG build with assertions.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: (unknown)
But when I typed: llc -version (llc works fine), I got:
  LLVM version 7.0.0svn
  DEBUG build with assertions.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: (unknown)
  Registered Targets:
    riscv32 - 32-bit RISC-V
    riscv64 - 64-bit RISC-V
    x86     - 32-bit X86: Pentium-Pro and above
    x86-64  - 64-bit X86: EM64T and AMD64

It seems that the lli tool does not support RISC-V target.

Could anyone give me some hints? Thank you so much!!

Best,
Rui


_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev