988 C->check_node_count(NodeLimitFudgeFactor, "too many nodes matching instructions");
989 if (C->failing()) return NULL;
990 n = mstack.node(); // Leave node on stack
991 Node_State nstate = mstack.state();
992 if (nstate == Visit) {
993 mstack.set_state(Post_Visit);
994 Node *oldn = n;
995 // Old-space or new-space check
996 if (!C->node_arena()->contains(n)) {
997 // Old space!
998 Node* m;
999 if (has_new_node(n)) { // Not yet Label/Reduced
1000 m = new_node(n);
1001 } else {
1002 if (!is_dontcare(n)) { // Matcher can match this guy
1003 // Calls match special. They match alone with no children.
1004 // Their children, the incoming arguments, match normally.
1005 m = n->is_SafePoint() ? match_sfpt(n->as_SafePoint()):match_tree(n);
1006 if (C->failing()) return NULL;
1007 if (m == NULL) { Matcher::soft_match_failure(); return NULL; }
1008 if (n->is_MemBar()) {
1009 m->as_MachMemBar()->set_adr_type(n->adr_type());
1010 }
1011 } else { // Nothing the matcher cares about
1012 if (n->is_Proj() && n->in(0) != NULL && n->in(0)->is_Multi()) { // Projections?
1013 // Convert to machine-dependent projection
1014 m = n->in(0)->as_Multi()->match( n->as_Proj(), this );
1015 #ifdef ASSERT
1016 _new2old_map.map(m->_idx, n);
1017 #endif
1018 if (m->in(0) != NULL) // m might be top
1019 collect_null_checks(m, n);
1020 } else { // Else just a regular 'ol guy
1021 m = n->clone(); // So just clone into new-space
1022 #ifdef ASSERT
1023 _new2old_map.map(m->_idx, n);
1024 #endif
1025 // Def-Use edges will be added incrementally as Uses
1026 // of this node are matched.
1027 assert(m->outcnt() == 0, "no Uses of this clone yet");
1028 }
1029 }
1030
|
988 C->check_node_count(NodeLimitFudgeFactor, "too many nodes matching instructions");
989 if (C->failing()) return NULL;
990 n = mstack.node(); // Leave node on stack
991 Node_State nstate = mstack.state();
992 if (nstate == Visit) {
993 mstack.set_state(Post_Visit);
994 Node *oldn = n;
995 // Old-space or new-space check
996 if (!C->node_arena()->contains(n)) {
997 // Old space!
998 Node* m;
999 if (has_new_node(n)) { // Not yet Label/Reduced
1000 m = new_node(n);
1001 } else {
1002 if (!is_dontcare(n)) { // Matcher can match this guy
1003 // Calls match special. They match alone with no children.
1004 // Their children, the incoming arguments, match normally.
1005 m = n->is_SafePoint() ? match_sfpt(n->as_SafePoint()):match_tree(n);
1006 if (C->failing()) return NULL;
1007 if (m == NULL) { Matcher::soft_match_failure(); return NULL; }
1008 } else { // Nothing the matcher cares about
1009 if (n->is_Proj() && n->in(0) != NULL && n->in(0)->is_Multi()) { // Projections?
1010 // Convert to machine-dependent projection
1011 m = n->in(0)->as_Multi()->match( n->as_Proj(), this );
1012 #ifdef ASSERT
1013 _new2old_map.map(m->_idx, n);
1014 #endif
1015 if (m->in(0) != NULL) // m might be top
1016 collect_null_checks(m, n);
1017 } else { // Else just a regular 'ol guy
1018 m = n->clone(); // So just clone into new-space
1019 #ifdef ASSERT
1020 _new2old_map.map(m->_idx, n);
1021 #endif
1022 // Def-Use edges will be added incrementally as Uses
1023 // of this node are matched.
1024 assert(m->outcnt() == 0, "no Uses of this clone yet");
1025 }
1026 }
1027
|