riscof icon indicating copy to clipboard operation
riscof copied to clipboard

Slow build with GCC 12.2

Open davidharrishmc opened this issue 3 years ago • 2 comments

riscof runs normally for me with GCC 11.x installed. It's slow but usable.

I've been trying to upgrade to GCC 12.2 (specifically 2023.01.31).

riscof appears to hang at INFO | Running Tests on Reference Model.

Looking into riscof_work, I see that the reference runs have become extremely slow. In particular, I get to rv32i_m/D/src/fmadd.d_b15-01.S. Generating the objdump takes 4 minutes. It's similar on the other FMA b_15 variants.

Is this a known issue?

I'm interested in compiling the bit manipulation tests. Is there an older version of gcc that is adequate?

Thank you,

David

-rw-rw-r-- 1 harris harris 355094731 Feb 7 16:04 fmadd.d_b15-01.log -rwxrwxr-x 1 harris harris 15646896 Feb 7 16:00 ref.elf -rw-rw-r-- 1 harris harris 174017680 Feb 7 16:04 ref.elf.objdump -rw-rw-r-- 1 harris harris 3672216 Feb 7 16:04 Reference-sail_c_simulator.signature

davidharrishmc avatar Feb 08 '23 00:02 davidharrishmc

I've tracked the issue to a difference between binutils 2.37 and binutils 2.39.

Disassembling fmadd.d_b15-01 takes 2.2 seconds with 2.37 and 3 minutes 36 seconds with binutils 2.39. See the logs below.


harris@vlsi:~/cvw/tests/riscof/work/riscv-arch-test/rv32i_m/D/src/fmadd.d_b15-01.S/ref$ /opt/riscv/riscv-gnu-toolchain-orig/bin/riscv64-unknown-elf-objdump -v GNU objdump (GNU Binutils) 2.37

harris@vlsi:~/cvw/tests/riscof/work/riscv-arch-test/rv32i_m/D/src/fmadd.d_b15-01.S/ref$ time /opt/riscv/riscv-gnu-toolchain-orig/bin/riscv64-unknown-elf-objdump -D ref.elf > ref.elf.objdump3

real 0m2.206s user 0m2.064s sys 0m0.072s

$ riscv64-unknown-elf-objdump -v GNU objdump (GNU Binutils) 2.39

harris@vlsi:~/cvw/tests/riscof/work/riscv-arch-test/rv32i_m/D/src/fmadd.d_b15-01.S/ref$ time riscv64-unknown-elf-objdump -D ref.elf > ref.elf.objdump2

real 3m36.759s user 3m36.673s sys 0m0.080s

davidharrishmc avatar Feb 08 '23 14:02 davidharrishmc

I'm not sure if posting this in riscv-gnu-toolchain is more appropriate. I've posted an issue there.

https://github.com/riscv-collab/riscv-gnu-toolchain/issues/1188

davidharrishmc avatar Feb 08 '23 14:02 davidharrishmc