Integrated: 8266746: C1: Replace UnsafeGetRaw with UnsafeGet when setting up OSR entry block

Yi Yang yyang at openjdk.java.net
Thu Jul 1 01:43:07 UTC 2021


On Fri, 7 May 2021 14:41:43 GMT, Yi Yang <yyang at openjdk.org> wrote:

> After JDK-8150921, most Unsafe{Get,Put}Raw intrinsic methods can be replaced by Unsafe{Get,Put}Object.
> 
> There is the only one occurrence where c1 refers UnsafeGetRaw among GraphBuilder::setup_osr_entry_block()
> 
> https://github.com/openjdk/jdk/blob/74fecc070a6462e6a2d061525b53a63de15339f9/src/hotspot/share/c1/c1_GraphBuilder.cpp#L3143-L3157
> 
> We can replace UnsafeGetRaw with UnsafeGetObject when setting up OSR entry block. After that, Unsafe{Get,Put}Raw can be completely removed  because no one refers to them.
> 
> (This patch actually does two things:
> 1. `Replace UnsafeGetRaw with UnsafeGetObject when setting up OSR entry block` This is the only occurrence where c1 refers UnsafeGetRaw
> 2. `Cleanup unused Unsafe{Get,Put}Raw code`
> They are related so I put it together, but I still want to hear your suggestions, I will separate them into two patches if you think it is more reasonable)
> 
> Thanks!
> Yang

This pull request has now been integrated.

Changeset: d89e630c
Author:    Yi Yang <yyang at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/d89e630cdf05d4ddd07893fa8fe90c32a7eb5433
Stats:     690 lines in 15 files changed: 24 ins; 535 del; 131 mod

8266746: C1: Replace UnsafeGetRaw with UnsafeGet when setting up OSR entry block

Replace UnsafeGetRaw with UnsafeGetObject when setting up OSR entry block, and rename Unsafe{Get,Put}Object to Unsafe{Get,Put}

Reviewed-by: thartmann, dlong, mdoerr

-------------

PR: https://git.openjdk.java.net/jdk/pull/3917



More information about the hotspot-gc-dev mailing list