Request for reviews (M): 7170463: C2 should recognize "obj.getClass() == A.class" code pattern

Vladimir Kozlov vladimir.kozlov at oracle.com
Mon May 21 15:36:15 PDT 2012


http://cr.openjdk.java.net/~kvn/7170463/webrev

7170463: C2 should recognize "obj.getClass() == A.class" code pattern

The idea is to optimize this code pattern:

   x.getClass() == A.class

into

   x._klass == klassof(A)

which shortens the original pattern by 1 load.

Tested with NSK, compiler regression tests, CTW.

Contributed-by: Krystal Mok <sajia at taobao.com>


More information about the hotspot-compiler-dev mailing list