< prev index next >

src/share/vm/opto/callnode.cpp

Print this page




1160 // Skip over any collapsed Regions
1161 Node *SafePointNode::Ideal(PhaseGVN *phase, bool can_reshape) {
1162   if (remove_dead_region(phase, can_reshape)) {
1163     return this;
1164   }
1165   if (jvms() != NULL) {
1166     bool progress = false;
1167     // A ValueTypeNode that was already heap allocated in the debug
1168     // info?  Reference the object directly. Helps removal of useless
1169     // value type allocations with incremental inlining.
1170     for (uint i = jvms()->debug_start(); i < jvms()->debug_end(); i++) {
1171       Node *arg = in(i);
1172       if (arg->is_ValueType()) {
1173         ValueTypeNode* vt = arg->as_ValueType();
1174         Node* in_oop = vt->get_oop();
1175         const Type* oop_type = phase->type(in_oop);
1176         if (!TypePtr::NULL_PTR->higher_equal(oop_type)) {
1177           set_req(i, in_oop);
1178           progress = true;
1179         }



1180       }
1181     }
1182     if (progress) {
1183       return this;
1184     }
1185   }
1186   return NULL;
1187 }
1188 
1189 //------------------------------Identity---------------------------------------
1190 // Remove obviously duplicate safepoints
1191 Node* SafePointNode::Identity(PhaseGVN* phase) {
1192 
1193   // If you have back to back safepoints, remove one
1194   if( in(TypeFunc::Control)->is_SafePoint() )
1195     return in(TypeFunc::Control);
1196 
1197   if( in(0)->is_Proj() ) {
1198     Node *n0 = in(0)->in(0);
1199     // Check if he is a call projection (except Leaf Call)




1160 // Skip over any collapsed Regions
1161 Node *SafePointNode::Ideal(PhaseGVN *phase, bool can_reshape) {
1162   if (remove_dead_region(phase, can_reshape)) {
1163     return this;
1164   }
1165   if (jvms() != NULL) {
1166     bool progress = false;
1167     // A ValueTypeNode that was already heap allocated in the debug
1168     // info?  Reference the object directly. Helps removal of useless
1169     // value type allocations with incremental inlining.
1170     for (uint i = jvms()->debug_start(); i < jvms()->debug_end(); i++) {
1171       Node *arg = in(i);
1172       if (arg->is_ValueType()) {
1173         ValueTypeNode* vt = arg->as_ValueType();
1174         Node* in_oop = vt->get_oop();
1175         const Type* oop_type = phase->type(in_oop);
1176         if (!TypePtr::NULL_PTR->higher_equal(oop_type)) {
1177           set_req(i, in_oop);
1178           progress = true;
1179         }
1180       } else if (arg->Opcode() == Op_ValueTypePtr) {
1181         ValueTypePtrNode* vtptr = (ValueTypePtrNode*)arg;
1182         vtptr->make_scalar_in_safepoint(this, phase->C->root(), phase);        
1183       }
1184     }
1185     if (progress) {
1186       return this;
1187     }
1188   }
1189   return NULL;
1190 }
1191 
1192 //------------------------------Identity---------------------------------------
1193 // Remove obviously duplicate safepoints
1194 Node* SafePointNode::Identity(PhaseGVN* phase) {
1195 
1196   // If you have back to back safepoints, remove one
1197   if( in(TypeFunc::Control)->is_SafePoint() )
1198     return in(TypeFunc::Control);
1199 
1200   if( in(0)->is_Proj() ) {
1201     Node *n0 = in(0)->in(0);
1202     // Check if he is a call projection (except Leaf Call)


< prev index next >