3157 }
3158 } else {
3159 if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
3160 Node* shift = new AndINode(in2, ConNode::make(TypeInt::make(mask)));
3161 n->set_req(2, shift);
3162 }
3163 }
3164 if (in2->outcnt() == 0) { // Remove dead node
3165 in2->disconnect_inputs(NULL, this);
3166 }
3167 }
3168 break;
3169 case Op_MemBarStoreStore:
3170 case Op_MemBarRelease:
3171 // Break the link with AllocateNode: it is no longer useful and
3172 // confuses register allocation.
3173 if (n->req() > MemBarNode::Precedent) {
3174 n->set_req(MemBarNode::Precedent, top());
3175 }
3176 break;
3177 default:
3178 assert( !n->is_Call(), "" );
3179 assert( !n->is_Mem(), "" );
3180 assert( nop != Op_ProfileBoolean, "should be eliminated during IGVN");
3181 break;
3182 }
3183
3184 // Collect CFG split points
3185 if (n->is_MultiBranch())
3186 frc._tests.push(n);
3187 }
3188
3189 //------------------------------final_graph_reshaping_walk---------------------
3190 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3191 // requires that the walk visits a node's inputs before visiting the node.
3192 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3193 ResourceArea *area = Thread::current()->resource_area();
3194 Unique_Node_List sfpt(area);
3195
3196 frc._visited.set(root->_idx); // first, mark node as visited
3197 uint cnt = root->req();
3198 Node *n = root;
3199 uint i = 0;
3200 while (true) {
3201 if (i < cnt) {
3202 // Place all non-visited non-null inputs onto stack
3203 Node* m = n->in(i);
3204 ++i;
3205 if (m != NULL && !frc._visited.test_set(m->_idx)) {
3206 if (m->is_SafePoint() && m->as_SafePoint()->jvms() != NULL) {
|
3157 }
3158 } else {
3159 if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
3160 Node* shift = new AndINode(in2, ConNode::make(TypeInt::make(mask)));
3161 n->set_req(2, shift);
3162 }
3163 }
3164 if (in2->outcnt() == 0) { // Remove dead node
3165 in2->disconnect_inputs(NULL, this);
3166 }
3167 }
3168 break;
3169 case Op_MemBarStoreStore:
3170 case Op_MemBarRelease:
3171 // Break the link with AllocateNode: it is no longer useful and
3172 // confuses register allocation.
3173 if (n->req() > MemBarNode::Precedent) {
3174 n->set_req(MemBarNode::Precedent, top());
3175 }
3176 break;
3177 case Op_RangeCheck: {
3178 RangeCheckNode* rc = n->as_RangeCheck();
3179 Node* iff = new IfNode(rc->in(0), rc->in(1), rc->_prob, rc->_fcnt);
3180 n->subsume_by(iff, this);
3181 frc._tests.push(iff);
3182 break;
3183 }
3184 default:
3185 assert( !n->is_Call(), "" );
3186 assert( !n->is_Mem(), "" );
3187 assert( nop != Op_ProfileBoolean, "should be eliminated during IGVN");
3188 break;
3189 }
3190
3191 // Collect CFG split points
3192 if (n->is_MultiBranch() && !n->is_RangeCheck()) {
3193 frc._tests.push(n);
3194 }
3195 }
3196
3197 //------------------------------final_graph_reshaping_walk---------------------
3198 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3199 // requires that the walk visits a node's inputs before visiting the node.
3200 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3201 ResourceArea *area = Thread::current()->resource_area();
3202 Unique_Node_List sfpt(area);
3203
3204 frc._visited.set(root->_idx); // first, mark node as visited
3205 uint cnt = root->req();
3206 Node *n = root;
3207 uint i = 0;
3208 while (true) {
3209 if (i < cnt) {
3210 // Place all non-visited non-null inputs onto stack
3211 Node* m = n->in(i);
3212 ++i;
3213 if (m != NULL && !frc._visited.test_set(m->_idx)) {
3214 if (m->is_SafePoint() && m->as_SafePoint()->jvms() != NULL) {
|