hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
changeset 38031 e0b822facc03
parent 38017 55047d16f141
child 38237 d972e3a2df53
child 38060 954c9575f653
equal deleted inserted replaced
38030:93f24e7b3c43 38031:e0b822facc03
   148 
   148 
   149 PhiResolver::~PhiResolver() {
   149 PhiResolver::~PhiResolver() {
   150   int i;
   150   int i;
   151   // resolve any cycles in moves from and to virtual registers
   151   // resolve any cycles in moves from and to virtual registers
   152   for (i = virtual_operands().length() - 1; i >= 0; i --) {
   152   for (i = virtual_operands().length() - 1; i >= 0; i --) {
   153     ResolveNode* node = virtual_operands()[i];
   153     ResolveNode* node = virtual_operands().at(i);
   154     if (!node->visited()) {
   154     if (!node->visited()) {
   155       _loop = NULL;
   155       _loop = NULL;
   156       move(NULL, node);
   156       move(NULL, node);
   157       node->set_start_node();
   157       node->set_start_node();
   158       assert(_temp->is_illegal(), "move_temp_to() call missing");
   158       assert(_temp->is_illegal(), "move_temp_to() call missing");
   159     }
   159     }
   160   }
   160   }
   161 
   161 
   162   // generate move for move from non virtual register to abitrary destination
   162   // generate move for move from non virtual register to abitrary destination
   163   for (i = other_operands().length() - 1; i >= 0; i --) {
   163   for (i = other_operands().length() - 1; i >= 0; i --) {
   164     ResolveNode* node = other_operands()[i];
   164     ResolveNode* node = other_operands().at(i);
   165     for (int j = node->no_of_destinations() - 1; j >= 0; j --) {
   165     for (int j = node->no_of_destinations() - 1; j >= 0; j --) {
   166       emit_move(node->operand(), node->destination_at(j)->operand());
   166       emit_move(node->operand(), node->destination_at(j)->operand());
   167     }
   167     }
   168   }
   168   }
   169 }
   169 }
   175     int vreg_num = opr->vreg_number();
   175     int vreg_num = opr->vreg_number();
   176     node = vreg_table().at_grow(vreg_num, NULL);
   176     node = vreg_table().at_grow(vreg_num, NULL);
   177     assert(node == NULL || node->operand() == opr, "");
   177     assert(node == NULL || node->operand() == opr, "");
   178     if (node == NULL) {
   178     if (node == NULL) {
   179       node = new ResolveNode(opr);
   179       node = new ResolveNode(opr);
   180       vreg_table()[vreg_num] = node;
   180       vreg_table().at_put(vreg_num, node);
   181     }
   181     }
   182     // Make sure that all virtual operands show up in the list when
   182     // Make sure that all virtual operands show up in the list when
   183     // they are used as the source of a move.
   183     // they are used as the source of a move.
   184     if (source && !virtual_operands().contains(node)) {
   184     if (source && !virtual_operands().contains(node)) {
   185       virtual_operands().append(node);
   185       virtual_operands().append(node);