Skip to content

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

License

Notifications You must be signed in to change notification settings

ShivaChen/riscv-llvm-integration

 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • LLVM 44.2%
  • C++ 38.1%
  • Assembly 15.0%
  • Mirah 1.3%
  • Python 0.4%
  • Objective-C 0.2%
  • Other 0.8%