hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
changeset 46630 75aa3e39d02c
parent 45514 0fc9cc73ce45
child 46633 5b87fe93ef6d
equal deleted inserted replaced
46629:8eeacdc76bf2 46630:75aa3e39d02c
   392 
   392 
   393 // This is called for each node in tree; the walk stops if a root is reached
   393 // This is called for each node in tree; the walk stops if a root is reached
   394 void LIRGenerator::walk(Value instr) {
   394 void LIRGenerator::walk(Value instr) {
   395   InstructionMark im(compilation(), instr);
   395   InstructionMark im(compilation(), instr);
   396   //stop walk when encounter a root
   396   //stop walk when encounter a root
   397   if (instr->is_pinned() && instr->as_Phi() == NULL || instr->operand()->is_valid()) {
   397   if ((instr->is_pinned() && instr->as_Phi() == NULL) || instr->operand()->is_valid()) {
   398     assert(instr->operand() != LIR_OprFact::illegalOpr || instr->as_Constant() != NULL, "this root has not yet been visited");
   398     assert(instr->operand() != LIR_OprFact::illegalOpr || instr->as_Constant() != NULL, "this root has not yet been visited");
   399   } else {
   399   } else {
   400     assert(instr->subst() == instr, "shouldn't have missed substitution");
   400     assert(instr->subst() == instr, "shouldn't have missed substitution");
   401     instr->visit(this);
   401     instr->visit(this);
   402     // assert(instr->use_count() > 0 || instr->as_Phi() != NULL, "leaf instruction must have a use");
   402     // assert(instr->use_count() > 0 || instr->as_Phi() != NULL, "leaf instruction must have a use");
  1431         if (c->as_jint_hi_bits() != other->as_jint_hi_bits()) continue;
  1431         if (c->as_jint_hi_bits() != other->as_jint_hi_bits()) continue;
  1432         if (c->as_jint_lo_bits() != other->as_jint_lo_bits()) continue;
  1432         if (c->as_jint_lo_bits() != other->as_jint_lo_bits()) continue;
  1433         break;
  1433         break;
  1434       case T_OBJECT:
  1434       case T_OBJECT:
  1435         if (c->as_jobject() != other->as_jobject()) continue;
  1435         if (c->as_jobject() != other->as_jobject()) continue;
       
  1436         break;
       
  1437       default:
  1436         break;
  1438         break;
  1437       }
  1439       }
  1438       return _reg_for_constants.at(i);
  1440       return _reg_for_constants.at(i);
  1439     }
  1441     }
  1440   }
  1442   }
  2801     case T_BYTE:
  2803     case T_BYTE:
  2802     case T_BOOLEAN:
  2804     case T_BOOLEAN:
  2803     case T_SHORT:
  2805     case T_SHORT:
  2804     case T_CHAR:
  2806     case T_CHAR:
  2805       t = T_INT;
  2807       t = T_INT;
       
  2808       break;
       
  2809     default:
  2806       break;
  2810       break;
  2807     }
  2811     }
  2808 
  2812 
  2809     LIR_Opr dest = new_register(t);
  2813     LIR_Opr dest = new_register(t);
  2810     __ move(src, dest);
  2814     __ move(src, dest);