RFR: 8265322: C2: Simplify control inputs for BarrierSetC2::obj_allocate

Nils Eliasson neliasso at openjdk.java.net
Wed Apr 28 12:58:55 UTC 2021


On Fri, 16 Apr 2021 03:06:19 GMT, Yi Yang <yyang at openjdk.org> wrote:

> While just using BarrierSetC2::obj_allocate in https://github.com/openjdk/valhalla/pull/385, I noticed the control input `ctrl` for obj_allocate is not so much necessary. 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 other cases, `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`.

Looks good.

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

Marked as reviewed by neliasso (Reviewer).

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



More information about the hotspot-gc-dev mailing list