ShivaChen / riscv-llvm-integration

Temporary repository to allow downstream collaboration on the RISC-V LLVM backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LLVM RISC-V integration repository

Purpose of this repository

This repository exists to act as a temporary downstream for RISC-V LLVM backend development. The ultimate goal is to get all patches merged upstream, and for development to primarily take place on upstream LLVM infrastructure (i.e. patches submitted directly for review). When the majority of the RISC-V LLVM patches are reviewed and merged, this repository will be retired. However, for the time being it exists to allow multiple parties to collaborate downstream.

We integrate patches on top of the LLVM 5.0 release branch. Although this has downsides, other prospective contributors have indicated their preference for this.

See README.orig for the original LLVM README.

Approach

History will never be rewritten for this repo, unlike the lowRISC/riscv-llvm repo which contains a patchset which is modified and rebased as necessary in order to act as a reference for LLVM backend development. All commits must be in a form that they could reasonably be accepted upstream. i.e. they should include tests, not include temporary hacks, and should do one thing at a time.

Building

See the LLVM documentation for more general guidance. You will need ~7GiB space for a debug build of LLVM+Clang.

mkdir build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE="Debug" \
  -DBUILD_SHARED_LIBS=True -DLLVM_USE_SPLIT_DWARF=True \
  -DLLVM_OPTIMIZED_TABLEGEN=True \
  -DLLVM_BUILD_TESTS=True \
  -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="RISCV" ../
cmake --build .

You may then want to run tests:

./bin/llvm-lit -s -i -v test/MC/RISCV       # RISC-V MC-layer tests
./bin/llvm-lit -s -i -v test/CodeGen/RISCV  # RISC-V CodeGen tests
./bin/llvm-lit -s -i -v test                # All tests

Status

See the lowRISC/riscv-llvm repository and status page.

Contributing

Pull requests that build on top of this repository's lib/Target/RISCV implementation are very welcome. Code should follow the recommendations in LLVM's coding standards and programmer's manual and be in a form you would be happy to submit for upstream review. You might want to refer to this issue list, and check the lowRISC/riscv-llvm repository in case there are in-development patches that haven't yet been merged here.

About

Temporary repository to allow downstream collaboration on the RISC-V LLVM backend

License:Other


Languages

Language:LLVM 44.1%Language:C++ 38.1%Language:Assembly 15.0%Language:Mirah 1.3%Language:Python 0.4%Language:Objective-C 0.2%Language:CMake 0.2%Language:C 0.2%Language:OCaml 0.2%Language:Go 0.1%Language:Shell 0.1%Language:Vim Script 0.0%Language:Perl 0.0%Language:Emacs Lisp 0.0%Language:Batchfile 0.0%Language:SourcePawn 0.0%Language:Roff 0.0%Language:Logos 0.0%