751 if (call != NULL && call->_name != NULL && strcmp(call->_name, "uncommon_trap") == 0) {
752 // control flow leads to uct so should be ok
753 _uncommon_traps.push(call);
754 ctrl_path.push(call);
755 ptr = ptr->in(0)->in(0);
756 continue;
757 }
758 }
759
760 #ifndef PRODUCT
761 // Some unexpected control flow we don't know how to handle.
762 if (PrintOptimizeStringConcat) {
763 tty->print_cr("failing with unknown test");
764 b->dump();
765 cmp->dump();
766 v1->dump();
767 v2->dump();
768 tty->cr();
769 }
770 #endif
771 break;
772 } else if (ptr->is_Proj() && ptr->in(0)->is_Initialize()) {
773 ptr = ptr->in(0)->in(0);
774 } else if (ptr->is_Region()) {
775 Node* copy = ptr->as_Region()->is_copy();
776 if (copy != NULL) {
777 ptr = copy;
778 continue;
779 }
780 if (ptr->req() == 3 &&
781 ptr->in(1) != NULL && ptr->in(1)->is_Proj() &&
782 ptr->in(2) != NULL && ptr->in(2)->is_Proj() &&
783 ptr->in(1)->in(0) == ptr->in(2)->in(0) &&
784 ptr->in(1)->in(0) != NULL && ptr->in(1)->in(0)->is_If()) {
785 // Simple diamond.
786 // XXX should check for possibly merging stores. simple data merges are ok.
787 ptr = ptr->in(1)->in(0)->in(0);
788 continue;
789 }
790 #ifndef PRODUCT
|
751 if (call != NULL && call->_name != NULL && strcmp(call->_name, "uncommon_trap") == 0) {
752 // control flow leads to uct so should be ok
753 _uncommon_traps.push(call);
754 ctrl_path.push(call);
755 ptr = ptr->in(0)->in(0);
756 continue;
757 }
758 }
759
760 #ifndef PRODUCT
761 // Some unexpected control flow we don't know how to handle.
762 if (PrintOptimizeStringConcat) {
763 tty->print_cr("failing with unknown test");
764 b->dump();
765 cmp->dump();
766 v1->dump();
767 v2->dump();
768 tty->cr();
769 }
770 #endif
771 fail = true;
772 break;
773 } else if (ptr->is_Proj() && ptr->in(0)->is_Initialize()) {
774 ptr = ptr->in(0)->in(0);
775 } else if (ptr->is_Region()) {
776 Node* copy = ptr->as_Region()->is_copy();
777 if (copy != NULL) {
778 ptr = copy;
779 continue;
780 }
781 if (ptr->req() == 3 &&
782 ptr->in(1) != NULL && ptr->in(1)->is_Proj() &&
783 ptr->in(2) != NULL && ptr->in(2)->is_Proj() &&
784 ptr->in(1)->in(0) == ptr->in(2)->in(0) &&
785 ptr->in(1)->in(0) != NULL && ptr->in(1)->in(0)->is_If()) {
786 // Simple diamond.
787 // XXX should check for possibly merging stores. simple data merges are ok.
788 ptr = ptr->in(1)->in(0)->in(0);
789 continue;
790 }
791 #ifndef PRODUCT
|