468 }
469
470 // Propagate GlobalEscape and ArgEscape escape states to all nodes
471 // and check that we still have non-escaping java objects.
472 bool find_non_escaped_objects(GrowableArray<PointsToNode*>& ptnodes_worklist,
473 GrowableArray<JavaObjectNode*>& non_escaped_worklist,
474 bool print_method = true);
475
476 // Adjust scalar_replaceable state after Connection Graph is built.
477 void adjust_scalar_replaceable_state(JavaObjectNode* jobj, Unique_Node_List &reducible_merges);
478
479 // Reevaluate Phis reducible status after 'obj' became NSR.
480 void revisit_reducible_phi_status(JavaObjectNode* jobj, Unique_Node_List& reducible_merges);
481
482 // Propagate NSR (Not scalar replaceable) state.
483 void find_scalar_replaceable_allocs(GrowableArray<JavaObjectNode*>& jobj_worklist, Unique_Node_List &reducible_merges);
484
485 // Optimize ideal graph.
486 void optimize_ideal_graph(GrowableArray<Node*>& ptr_cmp_worklist,
487 GrowableArray<MemBarStoreStoreNode*>& storestore_worklist);
488 // Optimize objects compare.
489 const TypeInt* optimize_ptr_compare(Node* left, Node* right);
490
491 // Returns unique corresponding java object or null.
492 JavaObjectNode* unique_java_object(Node *n) const;
493
494 // Add an edge of the specified type pointing to the specified target.
495 bool add_edge(PointsToNode* from, PointsToNode* to) {
496 assert(!from->is_Field() || from->as_Field()->is_oop(), "sanity");
497
498 if (to == phantom_obj) {
499 if (from->has_unknown_ptr()) {
500 return false; // already points to phantom_obj
501 }
502 from->set_has_unknown_ptr();
503 }
504
505 bool is_new = from->add_edge(to);
506 assert(to != phantom_obj || is_new, "sanity");
507 if (is_new) { // New edge?
|
468 }
469
470 // Propagate GlobalEscape and ArgEscape escape states to all nodes
471 // and check that we still have non-escaping java objects.
472 bool find_non_escaped_objects(GrowableArray<PointsToNode*>& ptnodes_worklist,
473 GrowableArray<JavaObjectNode*>& non_escaped_worklist,
474 bool print_method = true);
475
476 // Adjust scalar_replaceable state after Connection Graph is built.
477 void adjust_scalar_replaceable_state(JavaObjectNode* jobj, Unique_Node_List &reducible_merges);
478
479 // Reevaluate Phis reducible status after 'obj' became NSR.
480 void revisit_reducible_phi_status(JavaObjectNode* jobj, Unique_Node_List& reducible_merges);
481
482 // Propagate NSR (Not scalar replaceable) state.
483 void find_scalar_replaceable_allocs(GrowableArray<JavaObjectNode*>& jobj_worklist, Unique_Node_List &reducible_merges);
484
485 // Optimize ideal graph.
486 void optimize_ideal_graph(GrowableArray<Node*>& ptr_cmp_worklist,
487 GrowableArray<MemBarStoreStoreNode*>& storestore_worklist);
488 // Expand flat accesses to accesses to each component if the object does not escape
489 void optimize_flat_accesses(GrowableArray<SafePointNode*>& sfn_worklist);
490 // Optimize objects compare.
491 const TypeInt* optimize_ptr_compare(Node* left, Node* right);
492
493 // Returns unique corresponding java object or null.
494 JavaObjectNode* unique_java_object(Node *n) const;
495
496 // Add an edge of the specified type pointing to the specified target.
497 bool add_edge(PointsToNode* from, PointsToNode* to) {
498 assert(!from->is_Field() || from->as_Field()->is_oop(), "sanity");
499
500 if (to == phantom_obj) {
501 if (from->has_unknown_ptr()) {
502 return false; // already points to phantom_obj
503 }
504 from->set_has_unknown_ptr();
505 }
506
507 bool is_new = from->add_edge(to);
508 assert(to != phantom_obj || is_new, "sanity");
509 if (is_new) { // New edge?
|