< prev index next >

src/hotspot/share/opto/loopnode.hpp

Print this page




1423 #endif
1424     // Assert that we have stayed within the node budget limit.
1425     assert(C->live_nodes() < C->max_node_limit(),
1426            "Exceeding node budget limit: %d + %d > %d (request = %d)",
1427            C->live_nodes() - live_at_begin, live_at_begin,
1428            C->max_node_limit(), _nodes_required);
1429 
1430     _nodes_required = UINT_MAX;
1431   }
1432 
1433   // Clone loop predicates to slow and fast loop when unswitching a loop
1434   Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check, bool is_slow_loop,
1435                               uint idx_before_clone, Node_List &old_new);
1436   ProjNode* clone_loop_predicate(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason,
1437                                  bool is_slow_loop, uint idx_before_clone, Node_List &old_new);
1438   void clone_concrete_loop_predicates(Deoptimization::DeoptReason reason, ProjNode* old_predicate_proj,
1439                                       ProjNode* new_predicate_proj, bool is_slow_loop,
1440                                       uint idx_before_clone, Node_List &old_new);
1441 
1442   bool _created_loop_node;




1443 
1444 public:
1445   void set_created_loop_node() { _created_loop_node = true; }
1446   bool created_loop_node()     { return _created_loop_node; }
1447   void register_new_node(Node* n, Node* blk);
1448 
1449 #ifdef ASSERT
1450   void dump_bad_graph(const char* msg, Node* n, Node* early, Node* LCA);
1451 #endif
1452 
1453 #ifndef PRODUCT
1454   void dump() const;

1455   void dump(IdealLoopTree* loop, uint rpo_idx, Node_List &rpo_list) const;
1456   void verify() const;          // Major slow  :-)
1457   void verify_compare(Node* n, const PhaseIdealLoop* loop_verify, VectorSet &visited) const;
1458   IdealLoopTree* get_loop_idx(Node* n) const {
1459     // Dead nodes have no loop, so return the top level loop instead
1460     return _nodes[n->_idx] ? (IdealLoopTree*)_nodes[n->_idx] : _ltree_root;
1461   }
1462   // Print some stats
1463   static void print_statistics();
1464   static int _loop_invokes;     // Count of PhaseIdealLoop invokes
1465   static int _loop_work;        // Sum of PhaseIdealLoop x _unique
1466 #endif
1467 
1468   void rpo(Node* start, Node_Stack &stk, VectorSet &visited, Node_List &rpo_list) const;
1469 };
1470 
1471 
1472 class AutoNodeBudget : public StackObj
1473 {
1474 public:




1423 #endif
1424     // Assert that we have stayed within the node budget limit.
1425     assert(C->live_nodes() < C->max_node_limit(),
1426            "Exceeding node budget limit: %d + %d > %d (request = %d)",
1427            C->live_nodes() - live_at_begin, live_at_begin,
1428            C->max_node_limit(), _nodes_required);
1429 
1430     _nodes_required = UINT_MAX;
1431   }
1432 
1433   // Clone loop predicates to slow and fast loop when unswitching a loop
1434   Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check, bool is_slow_loop,
1435                               uint idx_before_clone, Node_List &old_new);
1436   ProjNode* clone_loop_predicate(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason,
1437                                  bool is_slow_loop, uint idx_before_clone, Node_List &old_new);
1438   void clone_concrete_loop_predicates(Deoptimization::DeoptReason reason, ProjNode* old_predicate_proj,
1439                                       ProjNode* new_predicate_proj, bool is_slow_loop,
1440                                       uint idx_before_clone, Node_List &old_new);
1441 
1442   bool _created_loop_node;
1443 #ifdef ASSERT
1444   void dump_real_LCA(Node* early, Node* wrong_lca);
1445   bool check_idom_chains_intersection(const Node* n, uint& idom_idx_new, uint& idom_idx_other, const Node_List* nodes_seen) const;
1446 #endif
1447 
1448 public:
1449   void set_created_loop_node() { _created_loop_node = true; }
1450   bool created_loop_node()     { return _created_loop_node; }
1451   void register_new_node(Node* n, Node* blk);
1452 
1453 #ifdef ASSERT
1454   void dump_bad_graph(const char* msg, Node* n, Node* early, Node* LCA);
1455 #endif
1456 
1457 #ifndef PRODUCT
1458   void dump() const;
1459   void dump_idom(Node* n) const;
1460   void dump(IdealLoopTree* loop, uint rpo_idx, Node_List &rpo_list) const;
1461   void verify() const;          // Major slow  :-)
1462   void verify_compare(Node* n, const PhaseIdealLoop* loop_verify, VectorSet &visited) const;
1463   IdealLoopTree* get_loop_idx(Node* n) const {
1464     // Dead nodes have no loop, so return the top level loop instead
1465     return _nodes[n->_idx] ? (IdealLoopTree*)_nodes[n->_idx] : _ltree_root;
1466   }
1467   // Print some stats
1468   static void print_statistics();
1469   static int _loop_invokes;     // Count of PhaseIdealLoop invokes
1470   static int _loop_work;        // Sum of PhaseIdealLoop x _unique
1471 #endif
1472 
1473   void rpo(Node* start, Node_Stack &stk, VectorSet &visited, Node_List &rpo_list) const;
1474 };
1475 
1476 
1477 class AutoNodeBudget : public StackObj
1478 {
1479 public:


< prev index next >