[PATCH] D137532: [LoongArch] Implement the TargetLowering::getRegisterByName hook
WÁNG Xuěruì via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 14 00:24:43 PST 2022
xen0n added a comment.
In D137532#3924037 <https://reviews.llvm.org/D137532#3924037>, @gonglingqin wrote:
> In D137532#3923952 <https://reviews.llvm.org/D137532#3923952>, @xen0n wrote:
>
>> I'm curious what usage case motivated the change? Not to say it's unnecessary but it's better to have people know a bit more background behind this work.
>
> This interface is required by the code in https://github.com/loongson/linux/blob/master/arch/loongarch/include/asm/percpu.h#L12-L18. This patch can avoid crashes when compiling the kernel with llvm in the future.
Very nice to know.
BTW, are the normal GPRs already supported like this too (things like global `register long foo __asm__("$a0")`), even without this change, or are such usages invalid in the first place? Memory is failing me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137532/new/
https://reviews.llvm.org/D137532
More information about the llvm-commits
mailing list