LLVM Discussion Forums

Custom cost model for RISC-V backend


I’m working on a RISC-V architecture that has instruction costs different from those in the default cost model. Is there an out-of-source way to provide llc with custom cost model? Or, does this need a change to LLVM backend?

Also, the cost model is not totally static. For example, loads from 0x1000-0x1ffc take 1 cycle, whereas loads from address 0x80000000, take 10-100 cycles. Is it possible to model these costs in the scheduler? Requiring programmer to define custom pointer types to mark pointers to one or the other address space is okay. Is there a way to model different costs for different pointer types?


Hi… I have build an yocto project Standard SDK with openembedded-core & meta-riscv sources, build was success. With this SDK build i got cross-compiled Riscv Toolchain, with this Tool i have compiled an helloworld source code compile successfully but when i a have copied this build to another machine, dynamic loader failing and getting an Error.