src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File JDK-8022284 Sdiff src/share/vm/opto

src/share/vm/opto/compile.cpp

Print this page




2245   bool cut_short = false;
2246   tty->print_cr("#");
2247   tty->print("#  ");  _tf->dump();  tty->cr();
2248   tty->print_cr("#");
2249 
2250   // For all blocks
2251   int pc = 0x0;                 // Program counter
2252   char starts_bundle = ' ';
2253   _regalloc->dump_frame();
2254 
2255   Node *n = NULL;
2256   for( uint i=0; i<_cfg->_num_blocks; i++ ) {
2257     if (VMThread::should_terminate()) { cut_short = true; break; }
2258     Block *b = _cfg->_blocks[i];
2259     if (b->is_connector() && !Verbose) continue;
2260     n = b->_nodes[0];
2261     if (pcs && n->_idx < pc_limit)
2262       tty->print("%3.3x   ", pcs[n->_idx]);
2263     else
2264       tty->print("      ");
2265     b->dump_head( &_cfg->_bbs );
2266     if (b->is_connector()) {
2267       tty->print_cr("        # Empty connector block");
2268     } else if (b->num_preds() == 2 && b->pred(1)->is_CatchProj() && b->pred(1)->as_CatchProj()->_con == CatchProjNode::fall_through_index) {
2269       tty->print_cr("        # Block is sole successor of call");
2270     }
2271 
2272     // For all instructions
2273     Node *delay = NULL;
2274     for( uint j = 0; j<b->_nodes.size(); j++ ) {
2275       if (VMThread::should_terminate()) { cut_short = true; break; }
2276       n = b->_nodes[j];
2277       if (valid_bundle_info(n)) {
2278         Bundle *bundle = node_bundling(n);
2279         if (bundle->used_in_unconditional_delay()) {
2280           delay = n;
2281           continue;
2282         }
2283         if (bundle->starts_bundle())
2284           starts_bundle = '+';
2285       }


3508 int Compile::ConstantTable::find_offset(Constant& con) const {
3509   int idx = _constants.find(con);
3510   assert(idx != -1, "constant must be in constant table");
3511   int offset = _constants.at(idx).offset();
3512   assert(offset != -1, "constant table not emitted yet?");
3513   return offset;
3514 }
3515 
3516 void Compile::ConstantTable::add(Constant& con) {
3517   if (con.can_be_reused()) {
3518     int idx = _constants.find(con);
3519     if (idx != -1 && _constants.at(idx).can_be_reused()) {
3520       _constants.adr_at(idx)->inc_freq(con.freq());  // increase the frequency by the current value
3521       return;
3522     }
3523   }
3524   (void) _constants.append(con);
3525 }
3526 
3527 Compile::Constant Compile::ConstantTable::add(MachConstantNode* n, BasicType type, jvalue value) {
3528   Block* b = Compile::current()->cfg()->_bbs[n->_idx];
3529   Constant con(type, value, b->_freq);
3530   add(con);
3531   return con;
3532 }
3533 
3534 Compile::Constant Compile::ConstantTable::add(Metadata* metadata) {
3535   Constant con(metadata);
3536   add(con);
3537   return con;
3538 }
3539 
3540 Compile::Constant Compile::ConstantTable::add(MachConstantNode* n, MachOper* oper) {
3541   jvalue value;
3542   BasicType type = oper->type()->basic_type();
3543   switch (type) {
3544   case T_LONG:    value.j = oper->constantL(); break;
3545   case T_FLOAT:   value.f = oper->constantF(); break;
3546   case T_DOUBLE:  value.d = oper->constantD(); break;
3547   case T_OBJECT:
3548   case T_ADDRESS: value.l = (jobject) oper->constant(); break;




2245   bool cut_short = false;
2246   tty->print_cr("#");
2247   tty->print("#  ");  _tf->dump();  tty->cr();
2248   tty->print_cr("#");
2249 
2250   // For all blocks
2251   int pc = 0x0;                 // Program counter
2252   char starts_bundle = ' ';
2253   _regalloc->dump_frame();
2254 
2255   Node *n = NULL;
2256   for( uint i=0; i<_cfg->_num_blocks; i++ ) {
2257     if (VMThread::should_terminate()) { cut_short = true; break; }
2258     Block *b = _cfg->_blocks[i];
2259     if (b->is_connector() && !Verbose) continue;
2260     n = b->_nodes[0];
2261     if (pcs && n->_idx < pc_limit)
2262       tty->print("%3.3x   ", pcs[n->_idx]);
2263     else
2264       tty->print("      ");
2265     b->dump_head(_cfg);
2266     if (b->is_connector()) {
2267       tty->print_cr("        # Empty connector block");
2268     } else if (b->num_preds() == 2 && b->pred(1)->is_CatchProj() && b->pred(1)->as_CatchProj()->_con == CatchProjNode::fall_through_index) {
2269       tty->print_cr("        # Block is sole successor of call");
2270     }
2271 
2272     // For all instructions
2273     Node *delay = NULL;
2274     for( uint j = 0; j<b->_nodes.size(); j++ ) {
2275       if (VMThread::should_terminate()) { cut_short = true; break; }
2276       n = b->_nodes[j];
2277       if (valid_bundle_info(n)) {
2278         Bundle *bundle = node_bundling(n);
2279         if (bundle->used_in_unconditional_delay()) {
2280           delay = n;
2281           continue;
2282         }
2283         if (bundle->starts_bundle())
2284           starts_bundle = '+';
2285       }


3508 int Compile::ConstantTable::find_offset(Constant& con) const {
3509   int idx = _constants.find(con);
3510   assert(idx != -1, "constant must be in constant table");
3511   int offset = _constants.at(idx).offset();
3512   assert(offset != -1, "constant table not emitted yet?");
3513   return offset;
3514 }
3515 
3516 void Compile::ConstantTable::add(Constant& con) {
3517   if (con.can_be_reused()) {
3518     int idx = _constants.find(con);
3519     if (idx != -1 && _constants.at(idx).can_be_reused()) {
3520       _constants.adr_at(idx)->inc_freq(con.freq());  // increase the frequency by the current value
3521       return;
3522     }
3523   }
3524   (void) _constants.append(con);
3525 }
3526 
3527 Compile::Constant Compile::ConstantTable::add(MachConstantNode* n, BasicType type, jvalue value) {
3528   Block* b = Compile::current()->cfg()->get_block_for_node(n);
3529   Constant con(type, value, b->_freq);
3530   add(con);
3531   return con;
3532 }
3533 
3534 Compile::Constant Compile::ConstantTable::add(Metadata* metadata) {
3535   Constant con(metadata);
3536   add(con);
3537   return con;
3538 }
3539 
3540 Compile::Constant Compile::ConstantTable::add(MachConstantNode* n, MachOper* oper) {
3541   jvalue value;
3542   BasicType type = oper->type()->basic_type();
3543   switch (type) {
3544   case T_LONG:    value.j = oper->constantL(); break;
3545   case T_FLOAT:   value.f = oper->constantF(); break;
3546   case T_DOUBLE:  value.d = oper->constantD(); break;
3547   case T_OBJECT:
3548   case T_ADDRESS: value.l = (jobject) oper->constant(); break;


src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File