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

Yi Yang yyang at openjdk.java.net
Wed Apr 21 10:07:38 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`.

Can hotspot-gc folks help review this PR?
 
Thanks!❤️
Yang

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

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


More information about the hotspot-compiler-dev mailing list