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

Roger Ferrer Ibáñez via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 23:16:47 PDT 2024


rofirrim 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?

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


More information about the llvm-commits mailing list