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

src/share/vm/opto/escape.cpp

Print this page




 763   uint call_idx = call->_idx;
 764   if (call->is_Allocate()) {
 765     Node* k = call->in(AllocateNode::KlassNode);
 766     const TypeKlassPtr* kt = k->bottom_type()->isa_klassptr();
 767     assert(kt != NULL, "TypeKlassPtr  required.");
 768     ciKlass* cik = kt->klass();
 769     PointsToNode::EscapeState es = PointsToNode::NoEscape;
 770     bool scalar_replaceable = true;
 771     if (call->is_AllocateArray()) {
 772       if (!cik->is_array_klass()) { // StressReflectiveCode
 773         es = PointsToNode::GlobalEscape;
 774       } else {
 775         int length = call->in(AllocateNode::ALength)->find_int_con(-1);
 776         if (length < 0 || length > EliminateAllocationArraySizeLimit) {
 777           // Not scalar replaceable if the length is not constant or too big.
 778           scalar_replaceable = false;
 779         }
 780       }
 781     } else {  // Allocate instance
 782       if (cik->is_subclass_of(_compile->env()->Thread_klass()) ||

 783          !cik->is_instance_klass() || // StressReflectiveCode
 784           cik->as_instance_klass()->has_finalizer()) {
 785         es = PointsToNode::GlobalEscape;
 786       }
 787     }
 788     add_java_object(call, es);
 789     PointsToNode* ptn = ptnode_adr(call_idx);
 790     if (!scalar_replaceable && ptn->scalar_replaceable()) {
 791       ptn->set_scalar_replaceable(false);
 792     }
 793   } else if (call->is_CallStaticJava()) {
 794     // Call nodes could be different types:
 795     //
 796     // 1. CallDynamicJavaNode (what happened during call is unknown):
 797     //
 798     //    - mapped to GlobalEscape JavaObject node if oop is returned;
 799     //
 800     //    - all oop arguments are escaping globally;
 801     //
 802     // 2. CallStaticJavaNode (execute bytecode analysis if possible):




 763   uint call_idx = call->_idx;
 764   if (call->is_Allocate()) {
 765     Node* k = call->in(AllocateNode::KlassNode);
 766     const TypeKlassPtr* kt = k->bottom_type()->isa_klassptr();
 767     assert(kt != NULL, "TypeKlassPtr  required.");
 768     ciKlass* cik = kt->klass();
 769     PointsToNode::EscapeState es = PointsToNode::NoEscape;
 770     bool scalar_replaceable = true;
 771     if (call->is_AllocateArray()) {
 772       if (!cik->is_array_klass()) { // StressReflectiveCode
 773         es = PointsToNode::GlobalEscape;
 774       } else {
 775         int length = call->in(AllocateNode::ALength)->find_int_con(-1);
 776         if (length < 0 || length > EliminateAllocationArraySizeLimit) {
 777           // Not scalar replaceable if the length is not constant or too big.
 778           scalar_replaceable = false;
 779         }
 780       }
 781     } else {  // Allocate instance
 782       if (cik->is_subclass_of(_compile->env()->Thread_klass()) ||
 783           cik->is_subclass_of(_compile->env()->Reference_klass()) ||
 784          !cik->is_instance_klass() || // StressReflectiveCode
 785           cik->as_instance_klass()->has_finalizer()) {
 786         es = PointsToNode::GlobalEscape;
 787       }
 788     }
 789     add_java_object(call, es);
 790     PointsToNode* ptn = ptnode_adr(call_idx);
 791     if (!scalar_replaceable && ptn->scalar_replaceable()) {
 792       ptn->set_scalar_replaceable(false);
 793     }
 794   } else if (call->is_CallStaticJava()) {
 795     // Call nodes could be different types:
 796     //
 797     // 1. CallDynamicJavaNode (what happened during call is unknown):
 798     //
 799     //    - mapped to GlobalEscape JavaObject node if oop is returned;
 800     //
 801     //    - all oop arguments are escaping globally;
 802     //
 803     // 2. CallStaticJavaNode (execute bytecode analysis if possible):


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