< prev index next >

src/hotspot/share/opto/macro.cpp

Print this page




 750         } else {
 751           safepoints.append_if_missing(sfpt);
 752         }
 753       } else if (use->Opcode() != Op_CastP2X) { // CastP2X is used by card mark
 754         if (use->is_Phi()) {
 755           if (use->outcnt() == 1 && use->unique_out()->Opcode() == Op_Return) {
 756             NOT_PRODUCT(fail_eliminate = "Object is return value";)
 757           } else {
 758             NOT_PRODUCT(fail_eliminate = "Object is referenced by Phi";)
 759           }
 760           DEBUG_ONLY(disq_node = use;)
 761         } else {
 762           if (use->Opcode() == Op_Return) {
 763             NOT_PRODUCT(fail_eliminate = "Object is return value";)
 764           }else {
 765             NOT_PRODUCT(fail_eliminate = "Object is referenced by node";)
 766           }
 767           DEBUG_ONLY(disq_node = use;)
 768         }
 769         can_eliminate = false;



 770       }
 771     }
 772   }
 773 
 774 #ifndef PRODUCT
 775   if (PrintEliminateAllocations) {
 776     if (can_eliminate) {
 777       tty->print("Scalar ");
 778       if (res == NULL)
 779         alloc->dump();
 780       else
 781         res->dump();
 782     } else if (alloc->_is_scalar_replaceable) {
 783       tty->print("NotScalar (%s)", fail_eliminate);
 784       if (res == NULL)
 785         alloc->dump();
 786       else
 787         res->dump();
 788 #ifdef ASSERT
 789       if (disq_node != NULL) {




 750         } else {
 751           safepoints.append_if_missing(sfpt);
 752         }
 753       } else if (use->Opcode() != Op_CastP2X) { // CastP2X is used by card mark
 754         if (use->is_Phi()) {
 755           if (use->outcnt() == 1 && use->unique_out()->Opcode() == Op_Return) {
 756             NOT_PRODUCT(fail_eliminate = "Object is return value";)
 757           } else {
 758             NOT_PRODUCT(fail_eliminate = "Object is referenced by Phi";)
 759           }
 760           DEBUG_ONLY(disq_node = use;)
 761         } else {
 762           if (use->Opcode() == Op_Return) {
 763             NOT_PRODUCT(fail_eliminate = "Object is return value";)
 764           }else {
 765             NOT_PRODUCT(fail_eliminate = "Object is referenced by node";)
 766           }
 767           DEBUG_ONLY(disq_node = use;)
 768         }
 769         can_eliminate = false;
 770       } else {
 771         assert(use->Opcode() == Op_CastP2X, "should be");
 772         assert(!use->has_out_with(Op_OrL), "should have been removed because oop is never null");
 773       }
 774     }
 775   }
 776 
 777 #ifndef PRODUCT
 778   if (PrintEliminateAllocations) {
 779     if (can_eliminate) {
 780       tty->print("Scalar ");
 781       if (res == NULL)
 782         alloc->dump();
 783       else
 784         res->dump();
 785     } else if (alloc->_is_scalar_replaceable) {
 786       tty->print("NotScalar (%s)", fail_eliminate);
 787       if (res == NULL)
 788         alloc->dump();
 789       else
 790         res->dump();
 791 #ifdef ASSERT
 792       if (disq_node != NULL) {


< prev index next >