Request for review (M): 7171890: C1: add Class.isInstance intrinsic
rednaxelafx at gmail.com
Wed May 30 08:31:52 PDT 2012
Could I have a couple of review for this change, please?
This patch implements Class.isInstance() intrinsic in C1.
As a first cut, the current implementation is pretty straightforward:
1. During HIR construction, Class.isInstance() is inlined as an Intrinsic
2. Try to canonicalize the Intrinsic node into an InstanceOf node when
appending the node to the HIR graph;
3. Generate a leaf call to a runtime helper (Runtime1::is_instance_of)
LIR generation for the remaining Intrinsic nodes for Class.isInstance().
This keeps the change platform-independent.
There are several opportunities for more optimizations. e.g.
1. Turn more Intrinsic nodes into InstanceOf nodes during HIR optimizations
during LIR generation;
2. Check the clazz.isInstance(null) case in a couple of places *after*
null-checked or guaranteed to be non-null; turn that into a constant
3. Follow the lir_store_check example for better platform-dependent
These shall be addressed in some future change, if necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-compiler-dev