[vector] reducing the cast implementation

Paul Sandoz paul.sandoz at oracle.com
Mon Jun 4 23:14:41 UTC 2018



> On Jun 4, 2018, at 3:59 PM, Lupusoru, Razvan A <razvan.a.lupusoru at intel.com> wrote:
> 
> Hey Paul,
>  
> I am not sure just from looking at it, but I believe it should work. Hotspot already inlines o.bitSize() and this is based on type profile. Thus technically the cast is not needed since it should know by that point what type “o” is. The only part I am unsure about is whether the call to o.getClass() gets inlined so that Hotspot intrinsification resolves the class to a “constant oop”. Would you be able to do a simple cast micro and see if generated code looks still good? If yes, then you can go ahead with your change.
>  

Ok, i can write micro benchmark to check.

—

Separately should we simplify the cast intrinsic itself? that would likely require a split of shared code for _VectorReinterpret and 
_VectorCast, which may be a good thing in terms of clarity.
 

Thanks,
Paul.


More information about the panama-dev mailing list