LLVM/Clang 16 Adds Support For -mcpu=native & -mtune=native On RISC-V
For those working on RISC-V software development on bare metal hardware, the in-development LLVM Clang 16 compiler has added support for allowing "-mtune=native" and "-mcpu=native" to work properly on this CPU ISA.
As of this week, LLVM/Clang Git now allows -mcpu=native and -mtune=native to be properly supported and used on RISC-V. Thus if wanting to optimize your compiled program for the RISC-V SoC in use on your system, the convenient "native" option will now work with LLVM 16.0 rather than worrying about picking the right mcpu/mtune values.
The support was merged to mainline via this commit.
This RISC-V mtune/mcpu native supprot goes along with LLVM/Clang 16.0 working on more C2x features, more C++20 and C++2b features, Intel AMX-FP16 support, support for other new Intel instructions from PREFETCHI to AVX-NE-CONVERT and AVX-VNNI-INT8, Raptor Lake and Meteor Lake target support, Arm Neoverse V2 tuning, support for new RISC-V extensions, and much more. LLVM 16 will likely debut around March if their usual release cadence holds.
As of this week, LLVM/Clang Git now allows -mcpu=native and -mtune=native to be properly supported and used on RISC-V. Thus if wanting to optimize your compiled program for the RISC-V SoC in use on your system, the convenient "native" option will now work with LLVM 16.0 rather than worrying about picking the right mcpu/mtune values.
The support was merged to mainline via this commit.
This RISC-V mtune/mcpu native supprot goes along with LLVM/Clang 16.0 working on more C2x features, more C++20 and C++2b features, Intel AMX-FP16 support, support for other new Intel instructions from PREFETCHI to AVX-NE-CONVERT and AVX-VNNI-INT8, Raptor Lake and Meteor Lake target support, Arm Neoverse V2 tuning, support for new RISC-V extensions, and much more. LLVM 16 will likely debut around March if their usual release cadence holds.
Add A Comment