RFR: 8343206: Final graph reshaping should not compress abstract or interface class pointers [v3]
Tobias Hartmann
thartmann at openjdk.org
Tue Nov 5 10:44:33 UTC 2024
On Mon, 4 Nov 2024 22:34:04 GMT, Dean Long <dlong at openjdk.org> wrote:
>> Right, this was an oversimplified example. I used this code:
>>
>> Class test(MyAbstract obj, boolean b) {
>> if (b) {
>> return obj.getClass();
>> }
>> return null;
>> }
>>
>>
>> We pass `null` for `obj` and `false` for `b`. Usually, the branch is then only compiled with Xcomp.
>
> I think there is still hope for moving the assert into `TypeNarrowKlass::make` in a future RFE. In the example above, if we are generating code for obj.getClass() based on the assumption that the type is a leaf, we could also notice that the type is abstract and deduce that obj must be null.
Right, we could do that.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21784#discussion_r1829127985
More information about the hotspot-compiler-dev
mailing list