3011 }
3012 } else {
3013 if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
3014 Node* shift = new (this) AndINode(in2, ConNode::make(this, TypeInt::make(mask)));
3015 n->set_req(2, shift);
3016 }
3017 }
3018 if (in2->outcnt() == 0) { // Remove dead node
3019 in2->disconnect_inputs(NULL, this);
3020 }
3021 }
3022 break;
3023 case Op_MemBarStoreStore:
3024 case Op_MemBarRelease:
3025 // Break the link with AllocateNode: it is no longer useful and
3026 // confuses register allocation.
3027 if (n->req() > MemBarNode::Precedent) {
3028 n->set_req(MemBarNode::Precedent, top());
3029 }
3030 break;
3031 // Must set a control edge on all nodes that produce a FlagsProj
3032 // so they can't escape the block that consumes the flags.
3033 // Must also set the non throwing branch as the control
3034 // for all nodes that depends on the result. Unless the node
3035 // already have a control that isn't the control of the
3036 // flag producer
3037 case Op_FlagsProj:
3038 {
3039 MathExactNode* math = (MathExactNode*) n->in(0);
3040 Node* ctrl = math->control_node();
3041 Node* non_throwing = math->non_throwing_branch();
3042 math->set_req(0, ctrl);
3043
3044 Node* result = math->result_node();
3045 if (result != NULL) {
3046 for (DUIterator_Fast jmax, j = result->fast_outs(jmax); j < jmax; j++) {
3047 Node* out = result->fast_out(j);
3048 // Phi nodes shouldn't be moved. They would only match below if they
3049 // had the same control as the MathExactNode. The only time that
3050 // would happen is if the Phi is also an input to the MathExact
3051 //
3052 // Cmp nodes shouldn't have control set at all.
3053 if (out->is_Phi() ||
3054 out->is_Cmp()) {
3055 continue;
3056 }
3057
3058 if (out->in(0) == NULL) {
3059 out->set_req(0, non_throwing);
3060 } else if (out->in(0) == ctrl) {
3061 out->set_req(0, non_throwing);
3062 }
3063 }
3064 }
3065 }
3066 break;
3067 default:
3068 assert( !n->is_Call(), "" );
3069 assert( !n->is_Mem(), "" );
3070 break;
3071 }
3072
3073 // Collect CFG split points
3074 if (n->is_MultiBranch())
3075 frc._tests.push(n);
3076 }
3077
3078 //------------------------------final_graph_reshaping_walk---------------------
3079 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3080 // requires that the walk visits a node's inputs before visiting the node.
3081 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3082 ResourceArea *area = Thread::current()->resource_area();
3083 Unique_Node_List sfpt(area);
3084
3085 frc._visited.set(root->_idx); // first, mark node as visited
3086 uint cnt = root->req();
|
3011 }
3012 } else {
3013 if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
3014 Node* shift = new (this) AndINode(in2, ConNode::make(this, TypeInt::make(mask)));
3015 n->set_req(2, shift);
3016 }
3017 }
3018 if (in2->outcnt() == 0) { // Remove dead node
3019 in2->disconnect_inputs(NULL, this);
3020 }
3021 }
3022 break;
3023 case Op_MemBarStoreStore:
3024 case Op_MemBarRelease:
3025 // Break the link with AllocateNode: it is no longer useful and
3026 // confuses register allocation.
3027 if (n->req() > MemBarNode::Precedent) {
3028 n->set_req(MemBarNode::Precedent, top());
3029 }
3030 break;
3031 default:
3032 assert( !n->is_Call(), "" );
3033 assert( !n->is_Mem(), "" );
3034 break;
3035 }
3036
3037 // Collect CFG split points
3038 if (n->is_MultiBranch())
3039 frc._tests.push(n);
3040 }
3041
3042 //------------------------------final_graph_reshaping_walk---------------------
3043 // Replacing Opaque nodes with their input in final_graph_reshaping_impl(),
3044 // requires that the walk visits a node's inputs before visiting the node.
3045 void Compile::final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Reshape_Counts &frc ) {
3046 ResourceArea *area = Thread::current()->resource_area();
3047 Unique_Node_List sfpt(area);
3048
3049 frc._visited.set(root->_idx); // first, mark node as visited
3050 uint cnt = root->req();
|