lowRISC / lowRISC/riscv-llvm

Further investigate performance differences vs riscv-gcc

Open
#53 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
277
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Using benchmarks from https://github.com/rv8-io/rv8-bench/ I see the current dynamic instruction counts (note: this isn't a perfect proxy for performance, but reasonable for initial comparisons):

Benchmark aes with -march=rv32im and -O3
gcc instret: 283330319
clang instret: 271796365
clang/gcc: 95.00%
Benchmark dhrystone with -march=rv32im and -O3
gcc instret: 274275911
clang instret: 336272568
clang/gcc: 122.00%
Benchmark norx with -march=rv32im and -O3
gcc instret: 129801139
clang instret: 134429519
clang/gcc: 103.00%
Benchmark qsort with -march=rv32im and -O3
gcc instret: 814554722
clang instret: 692674566
clang/gcc: 85.00%
Benchmark sha512 with -march=rv32im and -O3
gcc instret: 227057803
clang instret: 274505822
clang/gcc: 120.00%

clang/gcc < 100% means there are fewer dynamic instructions for the clang-generated binary, and > 100% means fewer dynamic instructions for the gcc-generated binary.

Taken with the current version of this clang+llvm patchset and a recent gcc 8.0.0 build. We did better than gcc 7.1.1 for dhrystone, but gcc has since improved.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the benchmarks in https://github.com/rv8-io/rv8-bench/ and reproduce the reported rv32im -O3 instruction counts for clang and riscv-gcc. Compare the generated results to determine which benchmark differences need further investigation; the issue does not specify a particular file, test, or acceptance criterion.

Written by the indexing model from the issue text.

Assessment

Domain
compilers, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.