hotspot/src/share/vm/opto/escape.cpp
changeset 3907 2a567f035d5c
parent 3804 45b953240545
child 4432 29b057bf202d
equal deleted inserted replaced
3906:6767b0c66883 3907:2a567f035d5c
   522   //
   522   //
   523   // It could happened on subclass's branch (from the type profiling
   523   // It could happened on subclass's branch (from the type profiling
   524   // inlining) which was not eliminated during parsing since the exactness
   524   // inlining) which was not eliminated during parsing since the exactness
   525   // of the allocation type was not propagated to the subclass type check.
   525   // of the allocation type was not propagated to the subclass type check.
   526   //
   526   //
       
   527   // Or the type 't' could be not related to 'base_t' at all.
       
   528   // It could happened when CHA type is different from MDO type on a dead path
       
   529   // (for example, from instanceof check) which is not collapsed during parsing.
       
   530   //
   527   // Do nothing for such AddP node and don't process its users since
   531   // Do nothing for such AddP node and don't process its users since
   528   // this code branch will go away.
   532   // this code branch will go away.
   529   //
   533   //
   530   if (!t->is_known_instance() &&
   534   if (!t->is_known_instance() &&
   531       !t->klass()->equals(base_t->klass()) &&
   535       !base_t->klass()->is_subtype_of(t->klass())) {
   532       t->klass()->is_subtype_of(base_t->klass())) {
       
   533      return false; // bail out
   536      return false; // bail out
   534   }
   537   }
   535 
   538 
   536   const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
   539   const TypeOopPtr *tinst = base_t->add_offset(t->offset())->is_oopptr();
   537   // Do NOT remove the next call: ensure an new alias index is allocated
   540   // Do NOT remove the next call: ensure an new alias index is allocated