Project RP009_Toolchain - LLVM Spec Optimization

Bidding Starts: July 17, 2024

Bidding Ends:  August 13, 2024

Description: 

Improvements to compiler codegen is one of the most impactful areas that RISE can help the RISC-V ecosystem. Currently RISC-V compilers need significant improvements relative to other architectures and broad and large gains can be made. RISE is excited to fund a comparison of codegen vs arm64 and use that to drive specific improvements into LLVM.

Milestones to Deliver:

Phase 1: Analysis and improvements of SPEC-2017

  • Codegen improvements in LLVM. The company should focus on all or a subset of SPEC 2017. Identify and fix weaknesses for RISC-V codegen with respect to AArch64. Larger items identified can be documented (with a code and assembly snippet) without being fixed, at the discretion of the contracting company.
  • The vendor will identify a specific RISC-V ISA configuration to optimize.  The following is suggested: rva22u w/V at VLEN=256.  Alternatives will be considered.  The suggested configuration is intended to match the recently available Banana Pi F3 SBC and use of that platform (or an alternate vector enabled dev board of the vendor's choice) is encouraged.  The configuration selected must be a reasonable proxy for a broad class of 64 bit application processors.  

Here is the  Analysis: 

Reference: LLVM 18.1.6 with AArch64-SVE2

RISC-V: LLVM 18.1.6 with rv64gcv_zba_zbb_zbs_zvl256b

name

RISC-V is % worse

541.leela_r-0

39.47%

531.deepsjeng_r-0

36.41%

525.x264_r-0

34.24%

525.x264_r-1

28.73%

525.x264_r-2

27.38%

526.blender_r-0

25.08%

508.namd_r-0

24.83%

544.nab_r-0

24.33%

538.imagick_r-0

19.39%

511.povray_r-0

17.56%

500.perlbench_r-2

14.56%

Analyze the SPEC benchmarks for performance issues, and where possible bring LLVM to parity with AArch64. We prefer for the time being to use dynamic instruction count despite understanding its flaws as a metric because we want a vendor-neutral metric. Additionally, the gaps are so large vs AArch64 at this point that we are unlikely to overfit to this metric. That said, we expect engineers to use judgment and avoid intentionally overfitting should that arise during work.

Please identify what milestones RISE can expect to be accomplished within a budget of US$250,000 .

The Phase 2 of this Project will be a separate effort that will be informed by the results of Phase 1.  

For questions regarding this RFP please email info@riseproject.dev 

Bidding Closed