[riscv-port] RFR: 8278041: riscv: Use t2 as the dedicated machine flags register in C2 [v2]
kuaiwei
duke at openjdk.java.net
Wed Dec 1 13:14:58 UTC 2021
On Wed, 1 Dec 2021 09:35:26 GMT, Yadong Wang <yadongwang at openjdk.org> wrote:
>> There are non-allocatable registers t0 and t1 in C2, frequently used as temporary registers for common code snipptes. Meanwhile, C2 use t1 as the flags register, so that many instructs using t1 as a temporary register must declare the data flow effect of t1 which is not part of a match rule. So we can reserve t2 and use it as the machine flags register in C2 instead, to reduce the probability of misuse of t1 without declaring the data flow effect.
>
> Yadong Wang has updated the pull request incrementally with one additional commit since the last revision:
>
> 8278041: riscv: Use t2 as the dedicated machine flags register in C2(2)
Hi Yadong, it looks cost too much to reserve a dedicated register for control flag. I think in most cases we can use the 2 scratch registers instead. Can you show some complicated cases? We can check if they can be rewrite to avoid the complication.
-------------
PR: https://git.openjdk.java.net/riscv-port/pull/21
More information about the riscv-port-dev
mailing list