62 }
63
64 //=============================================================================
65 HaltNode::HaltNode( Node *ctrl, Node *frameptr ) : Node(TypeFunc::Parms) {
66 Node* top = Compile::current()->top();
67 init_req(TypeFunc::Control, ctrl );
68 init_req(TypeFunc::I_O, top);
69 init_req(TypeFunc::Memory, top);
70 init_req(TypeFunc::FramePtr, frameptr );
71 init_req(TypeFunc::ReturnAdr,top);
72 }
73
74 const Type *HaltNode::bottom_type() const { return Type::BOTTOM; }
75
76 //------------------------------Ideal------------------------------------------
77 Node *HaltNode::Ideal(PhaseGVN *phase, bool can_reshape) {
78 return remove_dead_region(phase, can_reshape) ? this : NULL;
79 }
80
81 //------------------------------Value------------------------------------------
82 const Type *HaltNode::Value( PhaseTransform *phase ) const {
83 return ( phase->type(in(TypeFunc::Control)) == Type::TOP)
84 ? Type::TOP
85 : Type::BOTTOM;
86 }
87
88 const RegMask &HaltNode::out_RegMask() const {
89 return RegMask::Empty;
90 }
91
92 #ifndef PRODUCT
93 //-----------------------------related-----------------------------------------
94 // Include all control inputs in the related set, and also the input data
95 // boundary. In compact mode, include all inputs till level 2. Also include
96 // all outputs at level 1.
97 void HaltNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
98 if (compact) {
99 this->collect_nodes(in_rel, 2, false, false);
100 } else {
101 this->collect_nodes_in_all_ctrl(in_rel, true);
102 }
|
62 }
63
64 //=============================================================================
65 HaltNode::HaltNode( Node *ctrl, Node *frameptr ) : Node(TypeFunc::Parms) {
66 Node* top = Compile::current()->top();
67 init_req(TypeFunc::Control, ctrl );
68 init_req(TypeFunc::I_O, top);
69 init_req(TypeFunc::Memory, top);
70 init_req(TypeFunc::FramePtr, frameptr );
71 init_req(TypeFunc::ReturnAdr,top);
72 }
73
74 const Type *HaltNode::bottom_type() const { return Type::BOTTOM; }
75
76 //------------------------------Ideal------------------------------------------
77 Node *HaltNode::Ideal(PhaseGVN *phase, bool can_reshape) {
78 return remove_dead_region(phase, can_reshape) ? this : NULL;
79 }
80
81 //------------------------------Value------------------------------------------
82 const Type* HaltNode::Value(PhaseGVN* phase) const {
83 return ( phase->type(in(TypeFunc::Control)) == Type::TOP)
84 ? Type::TOP
85 : Type::BOTTOM;
86 }
87
88 const RegMask &HaltNode::out_RegMask() const {
89 return RegMask::Empty;
90 }
91
92 #ifndef PRODUCT
93 //-----------------------------related-----------------------------------------
94 // Include all control inputs in the related set, and also the input data
95 // boundary. In compact mode, include all inputs till level 2. Also include
96 // all outputs at level 1.
97 void HaltNode::related(GrowableArray<Node*> *in_rel, GrowableArray<Node*> *out_rel, bool compact) const {
98 if (compact) {
99 this->collect_nodes(in_rel, 2, false, false);
100 } else {
101 this->collect_nodes_in_all_ctrl(in_rel, true);
102 }
|