840 void build_loop_tree();
841 int build_loop_tree_impl( Node *n, int pre_order );
842 // Insert loop into the existing loop tree. 'innermost' is a leaf of the
843 // loop tree, not the root.
844 IdealLoopTree *sort( IdealLoopTree *loop, IdealLoopTree *innermost );
845
846 // Place Data nodes in some loop nest
847 void build_loop_early( VectorSet &visited, Node_List &worklist, Node_Stack &nstack );
848 void build_loop_late ( VectorSet &visited, Node_List &worklist, Node_Stack &nstack );
849 void build_loop_late_post ( Node* n );
850 void verify_strip_mined_scheduling(Node *n, Node* least);
851
852 // Array of immediate dominance info for each CFG node indexed by node idx
853 private:
854 uint _idom_size;
855 Node **_idom; // Array of immediate dominators
856 uint *_dom_depth; // Used for fast LCA test
857 GrowableArray<uint>* _dom_stk; // For recomputation of dom depth
858
859 Node* idom_no_update(Node* d) const {
860 assert(d->_idx < _idom_size, "oob");
861 Node* n = _idom[d->_idx];
862 assert(n != NULL,"Bad immediate dominator info.");
863 while (n->in(0) == NULL) { // Skip dead CFG nodes
864 //n = n->in(1);
865 n = (Node*)(((intptr_t)_nodes[n->_idx]) & ~1);
866 assert(n != NULL,"Bad immediate dominator info.");
867 }
868 return n;
869 }
870 Node *idom(Node* d) const {
871 uint didx = d->_idx;
872 Node *n = idom_no_update(d);
873 _idom[didx] = n; // Lazily remove dead CFG nodes from table.
874 return n;
875 }
876 uint dom_depth(Node* d) const {
877 guarantee(d != NULL, "Null dominator info.");
878 guarantee(d->_idx < _idom_size, "");
879 return _dom_depth[d->_idx];
880 }
881 void set_idom(Node* d, Node* n, uint dom_depth);
882 // Locally compute IDOM using dom_lca call
883 Node *compute_idom( Node *region ) const;
884 // Recompute dom_depth
885 void recompute_dom_depth();
886
887 // Is safept not required by an outer loop?
888 bool is_deleteable_safept(Node* sfpt);
889
890 // Replace parallel induction variable (parallel to trip counter)
891 void replace_parallel_iv(IdealLoopTree *loop);
892
893 // Perform verification that the graph is valid.
894 PhaseIdealLoop( PhaseIterGVN &igvn) :
895 PhaseTransform(Ideal_Loop),
|
840 void build_loop_tree();
841 int build_loop_tree_impl( Node *n, int pre_order );
842 // Insert loop into the existing loop tree. 'innermost' is a leaf of the
843 // loop tree, not the root.
844 IdealLoopTree *sort( IdealLoopTree *loop, IdealLoopTree *innermost );
845
846 // Place Data nodes in some loop nest
847 void build_loop_early( VectorSet &visited, Node_List &worklist, Node_Stack &nstack );
848 void build_loop_late ( VectorSet &visited, Node_List &worklist, Node_Stack &nstack );
849 void build_loop_late_post ( Node* n );
850 void verify_strip_mined_scheduling(Node *n, Node* least);
851
852 // Array of immediate dominance info for each CFG node indexed by node idx
853 private:
854 uint _idom_size;
855 Node **_idom; // Array of immediate dominators
856 uint *_dom_depth; // Used for fast LCA test
857 GrowableArray<uint>* _dom_stk; // For recomputation of dom depth
858
859 Node* idom_no_update(Node* d) const {
860 return idom_no_update(d->_idx);
861 }
862
863 Node* idom_no_update(uint didx) const {
864 assert(didx < _idom_size, "oob");
865 Node* n = _idom[didx];
866 assert(n != NULL,"Bad immediate dominator info.");
867 while (n->in(0) == NULL) { // Skip dead CFG nodes
868 n = (Node*)(((intptr_t)_nodes[n->_idx]) & ~1);
869 assert(n != NULL,"Bad immediate dominator info.");
870 }
871 return n;
872 }
873
874 Node *idom(Node* d) const {
875 return idom(d->_idx);
876 }
877
878 Node *idom(uint didx) const {
879 Node *n = idom_no_update(didx);
880 _idom[didx] = n; // Lazily remove dead CFG nodes from table.
881 return n;
882 }
883
884 uint dom_depth(Node* d) const {
885 guarantee(d != NULL, "Null dominator info.");
886 guarantee(d->_idx < _idom_size, "");
887 return _dom_depth[d->_idx];
888 }
889 void set_idom(Node* d, Node* n, uint dom_depth);
890 // Locally compute IDOM using dom_lca call
891 Node *compute_idom( Node *region ) const;
892 // Recompute dom_depth
893 void recompute_dom_depth();
894
895 // Is safept not required by an outer loop?
896 bool is_deleteable_safept(Node* sfpt);
897
898 // Replace parallel induction variable (parallel to trip counter)
899 void replace_parallel_iv(IdealLoopTree *loop);
900
901 // Perform verification that the graph is valid.
902 PhaseIdealLoop( PhaseIterGVN &igvn) :
903 PhaseTransform(Ideal_Loop),
|