Lines Matching defs:PointsToNode

118 class  PointsToNode;
129 class PointsToNode : public ResourceObj {
130 GrowableArray<PointsToNode*> _edges; // List of nodes this node points to
131 GrowableArray<PointsToNode*> _uses; // List of nodes which point to this node
168 PointsToNode(Compile *C, Node* n, EscapeState es, NodeType type):
216 PointsToNode* edge(int e) const { return _edges.at(e); }
217 bool add_edge(PointsToNode* edge) { return _edges.append_if_missing(edge); }
220 PointsToNode* use(int e) const { return _uses.at(e); }
221 bool add_use(PointsToNode* use) { return _uses.append_if_missing(use); }
224 bool add_base_use(FieldNode* use) { return _uses.append_if_missing((PointsToNode*)((intptr_t)use + 1)); }
225 static bool is_base_use(PointsToNode* use) { return (((intptr_t)use) & 1); }
226 static PointsToNode* get_use_node(PointsToNode* use) { return (PointsToNode*)(((intptr_t)use) & ~1); }
235 bool meet(PointsToNode* ptn);
244 class LocalVarNode: public PointsToNode {
247 PointsToNode(C, n, es, LocalVar) {}
250 class JavaObjectNode: public PointsToNode {
253 PointsToNode(C, n, es, JavaObject) {
259 class FieldNode: public PointsToNode {
260 GrowableArray<PointsToNode*> _bases; // List of JavaObject nodes which point to this node
266 PointsToNode(C, n, es, Field),
276 PointsToNode* base(int e) const { return _bases.at(e); }
277 bool add_base(PointsToNode* base) { return _bases.append_if_missing(base); }
285 class ArraycopyNode: public PointsToNode {
288 PointsToNode(C, n, es, Arraycopy) {}
293 // PointsToNode* u = i.get();
296 const PointsToNode* node;
300 inline PointsToIterator(const PointsToNode* n, int cnt) : node(n), cnt(cnt), i(0) { }
303 PointsToNode* get() const { ShouldNotCallThis(); return NULL; }
308 inline EdgeIterator(const PointsToNode* n) : PointsToIterator(n, n->edge_count()) { }
309 inline PointsToNode* get() const { return node->edge(i); }
314 inline UseIterator(const PointsToNode* n) : PointsToIterator(n, n->use_count()) { }
315 inline PointsToNode* get() const { return node->use(i); }
321 inline PointsToNode* get() const { return ((PointsToNode*)node)->as_Field()->base(i); }
327 GrowableArray<PointsToNode*> _nodes; // Map from ideal nodes to
330 GrowableArray<PointsToNode*> _worklist; // Nodes to be processed
349 PointsToNode* ptnode_adr(int idx) const {
357 void add_local_var(Node* n, PointsToNode::EscapeState es);
358 void add_java_object(Node* n, PointsToNode::EscapeState es);
359 void add_field(Node* n, PointsToNode::EscapeState es, int offset);
360 void add_arraycopy(Node* n, PointsToNode::EscapeState es, PointsToNode* src, PointsToNode* dst);
365 // Add PointsToNode node corresponding to a call
369 void map_ideal_node(Node *n, PointsToNode* ptn) {
376 // Create PointsToNode node and add it to Connection Graph.
383 bool complete_connection_graph(GrowableArray<PointsToNode*>& ptnodes_worklist,
389 void verify_connection_graph(GrowableArray<PointsToNode*>& ptnodes_worklist,
399 void add_to_worklist(PointsToNode* pt) {
405 void add_uses_to_worklist(PointsToNode* pt) {
414 void add_fields_to_worklist(FieldNode* field, PointsToNode* base);
420 int find_init_values(JavaObjectNode* ptn, PointsToNode* init_val, PhaseTransform* phase);
423 void set_escape_state(PointsToNode* ptn, PointsToNode::EscapeState esc) {
432 void set_fields_escape_state(PointsToNode* ptn, PointsToNode::EscapeState esc) {
442 bool find_non_escaped_objects(GrowableArray<PointsToNode*>& ptnodes_worklist,
458 bool add_edge(PointsToNode* from, PointsToNode* to) {
479 bool add_base(FieldNode* from, PointsToNode* to) {
504 void add_local_var_and_edge(Node* n, PointsToNode::EscapeState es, Node* to,
506 PointsToNode* ptn = ptnode_adr(to->_idx);
586 void dump(GrowableArray<PointsToNode*>& ptnodes_worklist);