[llvm] [RISCV] Lower llvm.clear_cache to __riscv_flush_icache for glibc targets (PR #93481)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 16 23:40:15 PDT 2024


wangpc-pp wrote:

> @kito-cheng @wangpc-pp I currently gated this to glibc.
> 
> However, investigating it further this seems a Linux ABI specific thing ( https://docs.kernel.org/arch/riscv/cmodx.html ) supported by both glibc and musl ( https://git.musl-libc.org/cgit/musl/tree/src/linux/cache.c#n39 ).
> 
> It looks to me it makes more sense to gate this to just Linux and not glibc (which would also include things like Hurd).
> 
> Do you agree?

Yeah, make sense to me. Maybe we should write it down in psABI or elsewhere? @kito-cheng 

https://github.com/llvm/llvm-project/pull/93481


More information about the llvm-commits mailing list