Symmetry between shenandoah_cast_not_null and must_be_not_null
Aleksey Shipilev
shade at redhat.com
Wed Oct 25 11:47:28 UTC 2017
On 10/25/2017 01:42 PM, Roland Westrelin wrote:
>> Is it safe to replace must_be_not_null(node, true) with shenandoah_cast_not_null(node) when backporting?
>
> It is.
>
> In both cases, true tells the compiler that it can assume node is not
> null in the rest of the method as well. It's usually what we want but
> sometimes, it's not safe if there's control flow in the intrinsic. In
> 8/9, I used false to be safe. In 10, I used true because I expect the
> must_be_not_null() calls to land upstream as a separate change and I'd
> like to have the most profitable change to be tested.
That's what I expected, thanks for confirming!
-Aleksey
More information about the shenandoah-dev
mailing list