Mercurial > hg > truffle
comparison src/share/vm/opto/doCall.cpp @ 164:c436414a719e
6703890: Compressed Oops: add LoadNKlass node to generate narrow oops (32-bits) compare instructions
Summary: Add LoadNKlass and CMoveN nodes, use CmpN and ConN nodes to generate narrow oops compare instructions.
Reviewed-by: never, rasbold
author | kvn |
---|---|
date | Wed, 21 May 2008 13:46:23 -0700 |
parents | 16e1cb7cde24 |
children | d1605aabd0a1 |
comparison
equal
deleted
inserted
replaced
163:885ed790ecf0 | 164:c436414a719e |
---|---|
578 | 578 |
579 // Get the exception oop klass from its header | 579 // Get the exception oop klass from its header |
580 Node* ex_klass_node = NULL; | 580 Node* ex_klass_node = NULL; |
581 if (has_ex_handler() && !ex_type->klass_is_exact()) { | 581 if (has_ex_handler() && !ex_type->klass_is_exact()) { |
582 Node* p = basic_plus_adr( ex_node, ex_node, oopDesc::klass_offset_in_bytes()); | 582 Node* p = basic_plus_adr( ex_node, ex_node, oopDesc::klass_offset_in_bytes()); |
583 ex_klass_node = _gvn.transform(new (C, 3) LoadKlassNode(NULL, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT)); | 583 ex_klass_node = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); |
584 | 584 |
585 // Compute the exception klass a little more cleverly. | 585 // Compute the exception klass a little more cleverly. |
586 // Obvious solution is to simple do a LoadKlass from the 'ex_node'. | 586 // Obvious solution is to simple do a LoadKlass from the 'ex_node'. |
587 // However, if the ex_node is a PhiNode, I'm going to do a LoadKlass for | 587 // However, if the ex_node is a PhiNode, I'm going to do a LoadKlass for |
588 // each arm of the Phi. If I know something clever about the exceptions | 588 // each arm of the Phi. If I know something clever about the exceptions |
590 // klass constant for the exception oop. | 590 // klass constant for the exception oop. |
591 if( ex_node->is_Phi() ) { | 591 if( ex_node->is_Phi() ) { |
592 ex_klass_node = new (C, ex_node->req()) PhiNode( ex_node->in(0), TypeKlassPtr::OBJECT ); | 592 ex_klass_node = new (C, ex_node->req()) PhiNode( ex_node->in(0), TypeKlassPtr::OBJECT ); |
593 for( uint i = 1; i < ex_node->req(); i++ ) { | 593 for( uint i = 1; i < ex_node->req(); i++ ) { |
594 Node* p = basic_plus_adr( ex_node->in(i), ex_node->in(i), oopDesc::klass_offset_in_bytes() ); | 594 Node* p = basic_plus_adr( ex_node->in(i), ex_node->in(i), oopDesc::klass_offset_in_bytes() ); |
595 Node* k = _gvn.transform(new (C, 3) LoadKlassNode(0, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT)); | 595 Node* k = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) ); |
596 ex_klass_node->init_req( i, k ); | 596 ex_klass_node->init_req( i, k ); |
597 } | 597 } |
598 _gvn.set_type(ex_klass_node, TypeKlassPtr::OBJECT); | 598 _gvn.set_type(ex_klass_node, TypeKlassPtr::OBJECT); |
599 | 599 |
600 } | 600 } |