< prev index next >

src/hotspot/share/opto/parse1.cpp

Print this page




 111     // Ptr types are mixed together with T_ADDRESS but NULL is
 112     // really for T_OBJECT types so correct it.
 113     bt = T_OBJECT;
 114   }
 115   Node *mem = memory(Compile::AliasIdxRaw);
 116   Node *adr = basic_plus_adr( local_addrs_base, local_addrs, -index*wordSize );
 117   Node *ctl = control();
 118 
 119   // Very similar to LoadNode::make, except we handle un-aligned longs and
 120   // doubles on Sparc.  Intel can handle them just fine directly.
 121   Node *l = NULL;
 122   switch (bt) {                // Signature is flattened
 123   case T_INT:     l = new LoadINode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInt::INT,        MemNode::unordered); break;
 124   case T_FLOAT:   l = new LoadFNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::FLOAT,         MemNode::unordered); break;
 125   case T_ADDRESS: l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM,  MemNode::unordered); break;
 126   case T_OBJECT:  l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM, MemNode::unordered); break;
 127   case T_VALUETYPE: {
 128     // Load oop and create a new ValueTypeNode
 129     const TypeInstPtr* ptr_type = TypeInstPtr::make(TypePtr::BotPTR, type->is_valuetype()->value_klass());
 130     l = _gvn.transform(new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, ptr_type, MemNode::unordered));
 131     l = ValueTypeNode::make_from_oop(this, l, type->is_valuetype()->value_klass(), /* buffer_check */ true, /* null2default */ false);
 132     break;
 133   }
 134   case T_LONG:
 135   case T_DOUBLE: {
 136     // Since arguments are in reverse order, the argument address 'adr'
 137     // refers to the back half of the long/double.  Recompute adr.
 138     adr = basic_plus_adr(local_addrs_base, local_addrs, -(index+1)*wordSize);
 139     if (Matcher::misaligned_doubles_ok) {
 140       l = (bt == T_DOUBLE)
 141         ? (Node*)new LoadDNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::DOUBLE, MemNode::unordered)
 142         : (Node*)new LoadLNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeLong::LONG, MemNode::unordered);
 143     } else {
 144       l = (bt == T_DOUBLE)
 145         ? (Node*)new LoadD_unalignedNode(ctl, mem, adr, TypeRawPtr::BOTTOM, MemNode::unordered)
 146         : (Node*)new LoadL_unalignedNode(ctl, mem, adr, TypeRawPtr::BOTTOM, MemNode::unordered);
 147     }
 148     break;
 149   }
 150   default: ShouldNotReachHere();
 151   }


 593     // Add check to deoptimize the nmethod if RTM state was changed
 594     rtm_deopt();
 595   }
 596 
 597   // Check for bailouts during method entry or RTM state check setup.
 598   if (failing()) {
 599     if (log)  log->done("parse");
 600     C->set_default_node_notes(caller_nn);
 601     return;
 602   }
 603 
 604   // Handle value type arguments
 605   int arg_size_sig = tf()->domain_sig()->cnt();
 606   for (uint i = 0; i < (uint)arg_size_sig; i++) {
 607     Node* parm = map()->in(i);
 608     const Type* t = _gvn.type(parm);
 609     if (!ValueTypePassFieldsAsArgs) {
 610       if (t->is_valuetypeptr()) {
 611         // Create ValueTypeNode from the oop and replace the parameter
 612         assert(!t->is_ptr()->maybe_null(), "value type arguments should never be null");
 613         Node* vt = ValueTypeNode::make_from_oop(this, parm, t->value_klass(), /* buffer_check */ true, /* null2default */ false);
 614         map()->replace_edge(parm, vt);
 615       }
 616     } else {
 617       assert(false, "FIXME");
 618       // TODO move the code from build_start_state and do_late_inline here
 619     }
 620   }
 621 
 622   entry_map = map();  // capture any changes performed by method setup code
 623   assert(jvms()->endoff() == map()->req(), "map matches JVMS layout");
 624 
 625   // We begin parsing as if we have just encountered a jump to the
 626   // method entry.
 627   Block* entry_block = start_block();
 628   assert(entry_block->start() == (is_osr_parse() ? osr_bci() : 0), "");
 629   set_map_clone(entry_map);
 630   merge_common(entry_block, entry_block->next_path_num());
 631 
 632 #ifndef PRODUCT
 633   BytecodeParseHistogram *parse_histogram_obj = new (C->env()->arena()) BytecodeParseHistogram(this, C);




 111     // Ptr types are mixed together with T_ADDRESS but NULL is
 112     // really for T_OBJECT types so correct it.
 113     bt = T_OBJECT;
 114   }
 115   Node *mem = memory(Compile::AliasIdxRaw);
 116   Node *adr = basic_plus_adr( local_addrs_base, local_addrs, -index*wordSize );
 117   Node *ctl = control();
 118 
 119   // Very similar to LoadNode::make, except we handle un-aligned longs and
 120   // doubles on Sparc.  Intel can handle them just fine directly.
 121   Node *l = NULL;
 122   switch (bt) {                // Signature is flattened
 123   case T_INT:     l = new LoadINode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInt::INT,        MemNode::unordered); break;
 124   case T_FLOAT:   l = new LoadFNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::FLOAT,         MemNode::unordered); break;
 125   case T_ADDRESS: l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM,  MemNode::unordered); break;
 126   case T_OBJECT:  l = new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM, MemNode::unordered); break;
 127   case T_VALUETYPE: {
 128     // Load oop and create a new ValueTypeNode
 129     const TypeInstPtr* ptr_type = TypeInstPtr::make(TypePtr::BotPTR, type->is_valuetype()->value_klass());
 130     l = _gvn.transform(new LoadPNode(ctl, mem, adr, TypeRawPtr::BOTTOM, ptr_type, MemNode::unordered));
 131     l = ValueTypeNode::make_from_oop(this, l, type->is_valuetype()->value_klass(), /* null2default */ false);
 132     break;
 133   }
 134   case T_LONG:
 135   case T_DOUBLE: {
 136     // Since arguments are in reverse order, the argument address 'adr'
 137     // refers to the back half of the long/double.  Recompute adr.
 138     adr = basic_plus_adr(local_addrs_base, local_addrs, -(index+1)*wordSize);
 139     if (Matcher::misaligned_doubles_ok) {
 140       l = (bt == T_DOUBLE)
 141         ? (Node*)new LoadDNode(ctl, mem, adr, TypeRawPtr::BOTTOM, Type::DOUBLE, MemNode::unordered)
 142         : (Node*)new LoadLNode(ctl, mem, adr, TypeRawPtr::BOTTOM, TypeLong::LONG, MemNode::unordered);
 143     } else {
 144       l = (bt == T_DOUBLE)
 145         ? (Node*)new LoadD_unalignedNode(ctl, mem, adr, TypeRawPtr::BOTTOM, MemNode::unordered)
 146         : (Node*)new LoadL_unalignedNode(ctl, mem, adr, TypeRawPtr::BOTTOM, MemNode::unordered);
 147     }
 148     break;
 149   }
 150   default: ShouldNotReachHere();
 151   }


 593     // Add check to deoptimize the nmethod if RTM state was changed
 594     rtm_deopt();
 595   }
 596 
 597   // Check for bailouts during method entry or RTM state check setup.
 598   if (failing()) {
 599     if (log)  log->done("parse");
 600     C->set_default_node_notes(caller_nn);
 601     return;
 602   }
 603 
 604   // Handle value type arguments
 605   int arg_size_sig = tf()->domain_sig()->cnt();
 606   for (uint i = 0; i < (uint)arg_size_sig; i++) {
 607     Node* parm = map()->in(i);
 608     const Type* t = _gvn.type(parm);
 609     if (!ValueTypePassFieldsAsArgs) {
 610       if (t->is_valuetypeptr()) {
 611         // Create ValueTypeNode from the oop and replace the parameter
 612         assert(!t->is_ptr()->maybe_null(), "value type arguments should never be null");
 613         Node* vt = ValueTypeNode::make_from_oop(this, parm, t->value_klass(), /* null2default */ false);
 614         map()->replace_edge(parm, vt);
 615       }
 616     } else {
 617       assert(false, "FIXME");
 618       // TODO move the code from build_start_state and do_late_inline here
 619     }
 620   }
 621 
 622   entry_map = map();  // capture any changes performed by method setup code
 623   assert(jvms()->endoff() == map()->req(), "map matches JVMS layout");
 624 
 625   // We begin parsing as if we have just encountered a jump to the
 626   // method entry.
 627   Block* entry_block = start_block();
 628   assert(entry_block->start() == (is_osr_parse() ? osr_bci() : 0), "");
 629   set_map_clone(entry_map);
 630   merge_common(entry_block, entry_block->next_path_num());
 631 
 632 #ifndef PRODUCT
 633   BytecodeParseHistogram *parse_histogram_obj = new (C->env()->arena()) BytecodeParseHistogram(this, C);


< prev index next >