585 assert( lca->is_CFG(), "" );
586 // find LCA of all uses
587 n = dom_lca_for_get_late_ctrl_internal( lca, n, tag );
588 }
589 return find_non_split_ctrl(n);
590 }
591 Node *dom_lca_for_get_late_ctrl_internal( Node *lca, Node *n, Node *tag );
592
593 // Helper function for directing control inputs away from CFG split
594 // points.
595 Node *find_non_split_ctrl( Node *ctrl ) const {
596 if (ctrl != NULL) {
597 if (ctrl->is_MultiBranch()) {
598 ctrl = ctrl->in(0);
599 }
600 assert(ctrl->is_CFG(), "CFG");
601 }
602 return ctrl;
603 }
604
605 public:
606 bool has_node( Node* n ) const {
607 guarantee(n != NULL, "No Node.");
608 return _nodes[n->_idx] != NULL;
609 }
610 // check if transform created new nodes that need _ctrl recorded
611 Node *get_late_ctrl( Node *n, Node *early );
612 Node *get_early_ctrl( Node *n );
613 Node *get_early_ctrl_for_expensive(Node *n, Node* earliest);
614 void set_early_ctrl( Node *n );
615 void set_subtree_ctrl( Node *root );
616 void set_ctrl( Node *n, Node *ctrl ) {
617 assert( !has_node(n) || has_ctrl(n), "" );
618 assert( ctrl->in(0), "cannot set dead control node" );
619 assert( ctrl == find_non_split_ctrl(ctrl), "must set legal crtl" );
620 _nodes.map( n->_idx, (Node*)((intptr_t)ctrl + 1) );
621 }
622 // Set control and update loop membership
623 void set_ctrl_and_loop(Node* n, Node* ctrl) {
624 IdealLoopTree* old_loop = get_loop(get_ctrl(n));
|
585 assert( lca->is_CFG(), "" );
586 // find LCA of all uses
587 n = dom_lca_for_get_late_ctrl_internal( lca, n, tag );
588 }
589 return find_non_split_ctrl(n);
590 }
591 Node *dom_lca_for_get_late_ctrl_internal( Node *lca, Node *n, Node *tag );
592
593 // Helper function for directing control inputs away from CFG split
594 // points.
595 Node *find_non_split_ctrl( Node *ctrl ) const {
596 if (ctrl != NULL) {
597 if (ctrl->is_MultiBranch()) {
598 ctrl = ctrl->in(0);
599 }
600 assert(ctrl->is_CFG(), "CFG");
601 }
602 return ctrl;
603 }
604
605 bool cast_incr_before_loop(Node* incr, Node* ctrl, Node* loop);
606
607 public:
608 bool has_node( Node* n ) const {
609 guarantee(n != NULL, "No Node.");
610 return _nodes[n->_idx] != NULL;
611 }
612 // check if transform created new nodes that need _ctrl recorded
613 Node *get_late_ctrl( Node *n, Node *early );
614 Node *get_early_ctrl( Node *n );
615 Node *get_early_ctrl_for_expensive(Node *n, Node* earliest);
616 void set_early_ctrl( Node *n );
617 void set_subtree_ctrl( Node *root );
618 void set_ctrl( Node *n, Node *ctrl ) {
619 assert( !has_node(n) || has_ctrl(n), "" );
620 assert( ctrl->in(0), "cannot set dead control node" );
621 assert( ctrl == find_non_split_ctrl(ctrl), "must set legal crtl" );
622 _nodes.map( n->_idx, (Node*)((intptr_t)ctrl + 1) );
623 }
624 // Set control and update loop membership
625 void set_ctrl_and_loop(Node* n, Node* ctrl) {
626 IdealLoopTree* old_loop = get_loop(get_ctrl(n));
|