Request for review (S): C2 should recognize "obj.getClass() == A.class" code pattern
John Rose
john.r.rose at oracle.com
Wed Apr 25 23:59:30 PDT 2012
On Apr 25, 2012, at 7:37 PM, John Rose wrote:
> On Apr 25, 2012, at 6:32 PM, Krystal Mok wrote:
>
>> Oops. I'm getting native NPE in CmpPNode::Ideal() with SPECjvm2008.
>> Will investigate and post an updated patch later.
>
> In the long run, those asserts will fire also. (At least, such asserts usually do. Compilers eventually explore all dark corners in the IR schema.)
>
> I am mulling over some more comments along that line. Basically, pattern-matching code has to "expect the unexpected".
One other quick comment: LoadKlass nodes are not just for oopDesc::_klass. They load klasses from other places too. The way you tell the difference is by looking at the base object and offset. Grep for LoadKlassNode::make to see various constructions. Also look at uses of Ideal_base_and_offset; the offset is never disregarded.
— John
More information about the hotspot-compiler-dev
mailing list