RFR: 8278518: String(byte[], int, int, Charset) constructor and String.translateEscapes() miss bounds check elimination [v4]

Roland Westrelin roland at openjdk.java.net
Mon Jan 17 08:13:27 UTC 2022


On Sat, 15 Jan 2022 04:29:42 GMT, John R Rose <jrose at openjdk.org> wrote:

> Thank you; that's much clearer.
> 
> Reviewed!

Thanks

> A couple of minor style issues I noticed which you might address (or not):
> 
>     * The name insertion_point should be probably be named is_insertion_point or at_insertion_point  since it's a predicate
> 
>     * In `assert((succs->at(ciTypeFlow::IF_NOT_TAKEN) == loop->head()) == (tail->limit() == loop->head()->start()), "bytecode and CFG not consistent")` the top-level `==` should be reversed so that the assert looks more like the previous assert.  It's easier to tell what they are doing if their structures line up with each other.

Done.

> I wish we could handle profile counts on `switch` arms. But that's a matter for another day.

The other blind spot is if the tail falls through to the head (and there's no if at the end of the tail to branch out of the loop).

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

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


More information about the hotspot-compiler-dev mailing list