Questions about Compiling and CodeGen
As Ara supports the RISC-V Vector Extension, I want to know how Ara compiles a normal C program into an executable file with vector instructions? I see that the Makefile in apps/riscv-tests/benchmarks uses "riscv64-unknown-elf-gcc" to compile the C program. I wonder how does riscv64-unknown-elf-gcc compile the program with the prior knowledge of the ISA extension? How can I compile my self-written C code into an executable file with your implementation of RISC-V Vector Extension?
Hello @tangcy98,
You can use our software environment and write your own programs. The compiler (you pointed out riscv64-unknown-elf-gcc, but we use clang (llvm) for our programs). We tell the compiler that the code can have vector instructions via the option -march=rv64[other_extensions]v, and if your code actually contains them, they will be correctly compiled. Otherwise, only non-vectorial code will be produced.
Best, Matteo