145 // create a new phi with in edges matching r and set (initially) to x
146 static PhiNode* make( Node* r, Node* x );
147 // extra type arguments override the new phi's bottom_type and adr_type
148 static PhiNode* make( Node* r, Node* x, const Type *t, const TypePtr* at = NULL );
149 // create a new phi with narrowed memory type
150 PhiNode* slice_memory(const TypePtr* adr_type) const;
151 PhiNode* split_out_instance(const TypePtr* at, PhaseIterGVN *igvn) const;
152 // like make(r, x), but does not initialize the in edges to x
153 static PhiNode* make_blank( Node* r, Node* x );
154
155 // Accessors
156 RegionNode* region() const { Node* r = in(Region); assert(!r || r->is_Region(), ""); return (RegionNode*)r; }
157
158 Node* is_copy() const {
159 // The node is a real phi if _in[0] is a Region node.
160 DEBUG_ONLY(const Node* r = _in[Region];)
161 assert(r != NULL && r->is_Region(), "Not valid control");
162 return NULL; // not a copy!
163 }
164
165 // Determine a unique non-trivial input, if any.
166 // Ignore casts if it helps. Return NULL on failure.
167 Node* unique_input(PhaseTransform *phase);
168
169 // Check for a simple dead loop.
170 enum LoopSafety { Safe = 0, Unsafe, UnsafeLoop };
171 LoopSafety simple_data_loop_check(Node *in) const;
172 // Is it unsafe data loop? It becomes a dead loop if this phi node removed.
173 bool is_unsafe_data_reference(Node *in) const;
174 int is_diamond_phi() const;
175 virtual int Opcode() const;
176 virtual bool pinned() const { return in(0) != 0; }
177 virtual const TypePtr *adr_type() const { verify_adr_type(true); return _adr_type; }
178
179 const int inst_id() const { return _inst_id; }
180 const int inst_index() const { return _inst_index; }
181 const int inst_offset() const { return _inst_offset; }
182 bool is_same_inst_field(const Type* tp, int id, int index, int offset) {
183 return type()->basic_type() == tp->basic_type() &&
184 inst_id() == id &&
|
145 // create a new phi with in edges matching r and set (initially) to x
146 static PhiNode* make( Node* r, Node* x );
147 // extra type arguments override the new phi's bottom_type and adr_type
148 static PhiNode* make( Node* r, Node* x, const Type *t, const TypePtr* at = NULL );
149 // create a new phi with narrowed memory type
150 PhiNode* slice_memory(const TypePtr* adr_type) const;
151 PhiNode* split_out_instance(const TypePtr* at, PhaseIterGVN *igvn) const;
152 // like make(r, x), but does not initialize the in edges to x
153 static PhiNode* make_blank( Node* r, Node* x );
154
155 // Accessors
156 RegionNode* region() const { Node* r = in(Region); assert(!r || r->is_Region(), ""); return (RegionNode*)r; }
157
158 Node* is_copy() const {
159 // The node is a real phi if _in[0] is a Region node.
160 DEBUG_ONLY(const Node* r = _in[Region];)
161 assert(r != NULL && r->is_Region(), "Not valid control");
162 return NULL; // not a copy!
163 }
164
165 bool is_tripcount() const;
166
167 // Determine a unique non-trivial input, if any.
168 // Ignore casts if it helps. Return NULL on failure.
169 Node* unique_input(PhaseTransform *phase);
170
171 // Check for a simple dead loop.
172 enum LoopSafety { Safe = 0, Unsafe, UnsafeLoop };
173 LoopSafety simple_data_loop_check(Node *in) const;
174 // Is it unsafe data loop? It becomes a dead loop if this phi node removed.
175 bool is_unsafe_data_reference(Node *in) const;
176 int is_diamond_phi() const;
177 virtual int Opcode() const;
178 virtual bool pinned() const { return in(0) != 0; }
179 virtual const TypePtr *adr_type() const { verify_adr_type(true); return _adr_type; }
180
181 const int inst_id() const { return _inst_id; }
182 const int inst_index() const { return _inst_index; }
183 const int inst_offset() const { return _inst_offset; }
184 bool is_same_inst_field(const Type* tp, int id, int index, int offset) {
185 return type()->basic_type() == tp->basic_type() &&
186 inst_id() == id &&
|