< prev index next >

src/hotspot/share/opto/loopnode.hpp

Print this page




1268   bool intrinsify_fill(IdealLoopTree* lpt);
1269   bool match_fill_loop(IdealLoopTree* lpt, Node*& store, Node*& store_value,
1270                        Node*& shift, Node*& offset);
1271 
1272 private:
1273   // Return a type based on condition control flow
1274   const TypeInt* filtered_type( Node *n, Node* n_ctrl);
1275   const TypeInt* filtered_type( Node *n ) { return filtered_type(n, NULL); }
1276  // Helpers for filtered type
1277   const TypeInt* filtered_type_from_dominators( Node* val, Node *val_ctrl);
1278 
1279   // Helper functions
1280   Node *spinup( Node *iff, Node *new_false, Node *new_true, Node *region, Node *phi, small_cache *cache );
1281   Node *find_use_block( Node *use, Node *def, Node *old_false, Node *new_false, Node *old_true, Node *new_true );
1282   void handle_use( Node *use, Node *def, small_cache *cache, Node *region_dom, Node *new_false, Node *new_true, Node *old_false, Node *old_true );
1283   bool split_up( Node *n, Node *blk1, Node *blk2 );
1284   void sink_use( Node *use, Node *post_loop );
1285   Node *place_near_use( Node *useblock ) const;
1286   Node* try_move_store_before_loop(Node* n, Node *n_ctrl);
1287   void try_move_store_after_loop(Node* n);

1288   bool identical_backtoback_ifs(Node *n);
1289   bool can_split_if(Node *n_ctrl);

1290 
1291   // Clone loop predicates to slow and fast loop when unswitching a loop
1292   Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check, bool is_slow_loop,
1293                               uint idx_before_clone, Node_List &old_new);
1294   ProjNode* clone_loop_predicate(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason,
1295                                  bool is_slow_loop, uint idx_before_clone, Node_List &old_new);
1296   void clone_concrete_loop_predicates(Deoptimization::DeoptReason reason, ProjNode* old_predicate_proj,
1297                                       ProjNode* new_predicate_proj, bool is_slow_loop,
1298                                       uint idx_before_clone, Node_List &old_new);
1299 
1300   bool _created_loop_node;
1301 public:
1302   void set_created_loop_node() { _created_loop_node = true; }
1303   bool created_loop_node()     { return _created_loop_node; }
1304   void register_new_node( Node *n, Node *blk );
1305 
1306 #ifdef ASSERT
1307   void dump_bad_graph(const char* msg, Node* n, Node* early, Node* LCA);
1308 #endif
1309 
1310 #ifndef PRODUCT
1311   void dump( ) const;
1312   void dump( IdealLoopTree *loop, uint rpo_idx, Node_List &rpo_list ) const;
1313   void rpo( Node *start, Node_Stack &stk, VectorSet &visited, Node_List &rpo_list ) const;
1314   void verify() const;          // Major slow  :-)
1315   void verify_compare( Node *n, const PhaseIdealLoop *loop_verify, VectorSet &visited ) const;
1316   IdealLoopTree *get_loop_idx(Node* n) const {
1317     // Dead nodes have no loop, so return the top level loop instead
1318     return _nodes[n->_idx] ? (IdealLoopTree*)_nodes[n->_idx] : _ltree_root;
1319   }
1320   // Print some stats
1321   static void print_statistics();
1322   static int _loop_invokes;     // Count of PhaseIdealLoop invokes
1323   static int _loop_work;        // Sum of PhaseIdealLoop x _unique
1324 #endif



1325 };
1326 
1327 // This kit may be used for making of a reserved copy of a loop before this loop
1328 //  goes under non-reversible changes.
1329 //
1330 // Function create_reserve() creates a reserved copy (clone) of the loop.
1331 // The reserved copy is created by calling
1332 // PhaseIdealLoop::create_reserve_version_of_loop - see there how
1333 // the original and reserved loops are connected in the outer graph.
1334 // If create_reserve succeeded, it returns 'true' and _has_reserved is set to 'true'.
1335 //
1336 // By default the reserved copy (clone) of the loop is created as dead code - it is
1337 // dominated in the outer loop by this node chain:
1338 //   intcon(1)->If->IfFalse->reserved_copy.
1339 // The original loop is dominated by the the same node chain but IfTrue projection:
1340 //   intcon(0)->If->IfTrue->original_loop.
1341 //
1342 // In this implementation of CountedLoopReserveKit the ctor includes create_reserve()
1343 // and the dtor, checks _use_new value.
1344 // If _use_new == false, it "switches" control to reserved copy of the loop




1268   bool intrinsify_fill(IdealLoopTree* lpt);
1269   bool match_fill_loop(IdealLoopTree* lpt, Node*& store, Node*& store_value,
1270                        Node*& shift, Node*& offset);
1271 
1272 private:
1273   // Return a type based on condition control flow
1274   const TypeInt* filtered_type( Node *n, Node* n_ctrl);
1275   const TypeInt* filtered_type( Node *n ) { return filtered_type(n, NULL); }
1276  // Helpers for filtered type
1277   const TypeInt* filtered_type_from_dominators( Node* val, Node *val_ctrl);
1278 
1279   // Helper functions
1280   Node *spinup( Node *iff, Node *new_false, Node *new_true, Node *region, Node *phi, small_cache *cache );
1281   Node *find_use_block( Node *use, Node *def, Node *old_false, Node *new_false, Node *old_true, Node *new_true );
1282   void handle_use( Node *use, Node *def, small_cache *cache, Node *region_dom, Node *new_false, Node *new_true, Node *old_false, Node *old_true );
1283   bool split_up( Node *n, Node *blk1, Node *blk2 );
1284   void sink_use( Node *use, Node *post_loop );
1285   Node *place_near_use( Node *useblock ) const;
1286   Node* try_move_store_before_loop(Node* n, Node *n_ctrl);
1287   void try_move_store_after_loop(Node* n);
1288 public:
1289   bool identical_backtoback_ifs(Node *n);
1290   bool can_split_if(Node *n_ctrl);
1291 private:
1292 
1293   // Clone loop predicates to slow and fast loop when unswitching a loop
1294   Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check, bool is_slow_loop,
1295                               uint idx_before_clone, Node_List &old_new);
1296   ProjNode* clone_loop_predicate(ProjNode* predicate_proj, Node* new_entry, Deoptimization::DeoptReason reason,
1297                                  bool is_slow_loop, uint idx_before_clone, Node_List &old_new);
1298   void clone_concrete_loop_predicates(Deoptimization::DeoptReason reason, ProjNode* old_predicate_proj,
1299                                       ProjNode* new_predicate_proj, bool is_slow_loop,
1300                                       uint idx_before_clone, Node_List &old_new);
1301 
1302   bool _created_loop_node;
1303 public:
1304   void set_created_loop_node() { _created_loop_node = true; }
1305   bool created_loop_node()     { return _created_loop_node; }
1306   void register_new_node( Node *n, Node *blk );
1307 
1308 #ifdef ASSERT
1309   void dump_bad_graph(const char* msg, Node* n, Node* early, Node* LCA);
1310 #endif
1311 
1312 #ifndef PRODUCT
1313   void dump( ) const;
1314   void dump( IdealLoopTree *loop, uint rpo_idx, Node_List &rpo_list ) const;

1315   void verify() const;          // Major slow  :-)
1316   void verify_compare( Node *n, const PhaseIdealLoop *loop_verify, VectorSet &visited ) const;
1317   IdealLoopTree *get_loop_idx(Node* n) const {
1318     // Dead nodes have no loop, so return the top level loop instead
1319     return _nodes[n->_idx] ? (IdealLoopTree*)_nodes[n->_idx] : _ltree_root;
1320   }
1321   // Print some stats
1322   static void print_statistics();
1323   static int _loop_invokes;     // Count of PhaseIdealLoop invokes
1324   static int _loop_work;        // Sum of PhaseIdealLoop x _unique
1325 #endif
1326   void rpo( Node *start, Node_Stack &stk, VectorSet &visited, Node_List &rpo_list ) const;
1327 
1328   PhaseIterGVN& igvn() { return _igvn; }
1329 };
1330 
1331 // This kit may be used for making of a reserved copy of a loop before this loop
1332 //  goes under non-reversible changes.
1333 //
1334 // Function create_reserve() creates a reserved copy (clone) of the loop.
1335 // The reserved copy is created by calling
1336 // PhaseIdealLoop::create_reserve_version_of_loop - see there how
1337 // the original and reserved loops are connected in the outer graph.
1338 // If create_reserve succeeded, it returns 'true' and _has_reserved is set to 'true'.
1339 //
1340 // By default the reserved copy (clone) of the loop is created as dead code - it is
1341 // dominated in the outer loop by this node chain:
1342 //   intcon(1)->If->IfFalse->reserved_copy.
1343 // The original loop is dominated by the the same node chain but IfTrue projection:
1344 //   intcon(0)->If->IfTrue->original_loop.
1345 //
1346 // In this implementation of CountedLoopReserveKit the ctor includes create_reserve()
1347 // and the dtor, checks _use_new value.
1348 // If _use_new == false, it "switches" control to reserved copy of the loop


< prev index next >