RFR: 8320397: RISC-V: Avoid passing t0 as temp register to MacroAssembler:: cmpxchg_obj_header/cmpxchgptr [v2]
Fei Yang
fyang at openjdk.org
Thu Dec 14 08:48:38 UTC 2023
On Thu, 14 Dec 2023 08:26:02 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
>> Sorry, I'm not saying we should remove cr, I'm just saying I don't think need to KILL cr.
>> C2 will think cr is valid all the time.
>
> I tested removing all "KILL cr" from all riscv ad files.
> CORRECTION:
> Running compiler tests c2/codegen: something blow up :)
>
> My theory was, as we never consume or produce values in 'cr' we can see cr as always having correct values, which is nothing.
>
> It seem like we need to KILL cr, not to confuse C2 to much :)
Hi @robehn, I am still a bit confused. Are you suggesting we keep the `KILL cr` in `effect`? My first comment is suggesting we remove that. Of couse, it will still work in functionality if we simply keep it there. But I am a bit worried that this may affect performance in some way as our CR could contain a live value in nodes as I mentioned in my previous comment. A `KILL cr` in `effect` as in this case may pose some unnecessary constraint on C2 code motion. That's just my concern.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16880#discussion_r1426410697
More information about the hotspot-dev
mailing list