RFR: 8265322: C2: Simplify control inputs for BarrierSetC2::obj_allocate
Vladimir Kozlov
kvn at openjdk.java.net
Fri Apr 16 17:39:40 UTC 2021
On Fri, 16 Apr 2021 03:06:19 GMT, Yi Yang <yyang at openjdk.org> wrote:
> This PR simplifies control inputs for BarrierSetC2::obj_allocate. In most cases, it doesn't change anything since `toobig_false` is equivalent to `ctrl`. In rare case, `toobig_false` is created for Unsafe.allocateInstance while instance size is not statically known, `ctrl` would become control input of IfNode whose projects are `toobig_false` and `toobig_true`, old eden_end and old_eden_top can simply accept `toobig_false` as their control input rather than `ctrl`.
>From compiler code POV the fix is reasonable and correct.
Note, the path when `initial_slow_test != NULL` is not rare. It is frequent for arrays allocation when `length` is not constant.
-------------
Marked as reviewed by kvn (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/3529
More information about the hotspot-compiler-dev
mailing list