< 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         if (use->has_out_with(Op_OrL)) {
 773           // Fixme
 774           // This is not a card mark!
 775           can_eliminate = false;
 776         }
 777       }
 778     }
 779   }
 780 
 781 #ifndef PRODUCT
 782   if (PrintEliminateAllocations) {
 783     if (can_eliminate) {
 784       tty->print("Scalar ");
 785       if (res == NULL)
 786         alloc->dump();
 787       else
 788         res->dump();
 789     } else if (alloc->_is_scalar_replaceable) {
 790       tty->print("NotScalar (%s)", fail_eliminate);
 791       if (res == NULL)
 792         alloc->dump();
 793       else
 794         res->dump();
 795 #ifdef ASSERT
 796       if (disq_node != NULL) {


< prev index next >