Lines Matching refs:Node
39 class Node;
88 LoopNode( Node *entry, Node *backedge ) : RegionNode(3), _loop_flags(0), _unswitch_count(0) {
94 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
154 // Node count prior to last unrolling - used to decide if
159 CountedLoopNode( Node *entry, Node *backedge )
169 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
171 Node *init_control() const { return in(EntryControl); }
172 Node *back_control() const { return in(LoopBackControl); }
174 Node *init_trip() const;
175 Node *stride() const;
178 Node *limit() const;
179 Node *incr() const;
180 Node *phi() const;
183 static Node* match_incr_with_optional_truncation(Node* expr, Node** trunc1, Node** trunc2, const TypeInt** trunc_type);
250 CountedLoopEndNode( Node *control, Node *test, float prob, float cnt )
256 Node *cmp_node() const { return (in(TestValue)->req() >=2) ? in(TestValue)->in(1) : NULL; }
257 Node *incr() const { Node *tmp = cmp_node(); return (tmp && tmp->req()==3) ? tmp->in(1) : NULL; }
258 Node *limit() const { Node *tmp = cmp_node(); return (tmp && tmp->req()==3) ? tmp->in(2) : NULL; }
259 Node *stride() const { Node *tmp = incr (); return (tmp && tmp->req()==3) ? tmp->in(2) : NULL; }
260 Node *phi() const { Node *tmp = incr (); return (tmp && tmp->req()==3) ? tmp->in(1) : NULL; }
261 Node *init_trip() const { Node *tmp = phi (); return (tmp && tmp->req()==3) ? tmp->in(1) : NULL; }
263 bool stride_is_con() const { Node *tmp = stride (); return (tmp != NULL && tmp->is_Con()); }
272 Node *ln = phi()->in(0);
286 Node *bc = back_control();
288 Node *le = bc->in(0);
293 inline Node *CountedLoopNode::init_trip() const { return loopexit() ? loopexit()->init_trip() : NULL; }
294 inline Node *CountedLoopNode::stride() const { return loopexit() ? loopexit()->stride() : NULL; }
297 inline Node *CountedLoopNode::limit() const { return loopexit() ? loopexit()->limit() : NULL; }
298 inline Node *CountedLoopNode::incr() const { return loopexit() ? loopexit()->incr() : NULL; }
299 inline Node *CountedLoopNode::phi() const { return loopexit() ? loopexit()->phi() : NULL; }
308 class LoopLimitNode : public Node {
311 LoopLimitNode( Compile* C, Node *init, Node *limit, Node *stride ) : Node(0,init,limit,stride) {
320 virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
321 virtual Node *Identity( PhaseTransform *phase );
335 Node *_head; // Head of loop
336 Node *_tail; // Tail of loop
337 inline Node *tail(); // Handle lazy update of _tail field
352 IdealLoopTree( PhaseIdealLoop* phase, Node *head, Node *tail )
409 // Check for Node being a loop-breaking test
410 Node *is_loop_exit(Node *iff) const;
413 bool dominates_backedge(Node* ctrl);
473 Node* reassociate_add_sub(Node* n1, PhaseIdealLoop *phase);
476 int is_invariant_addition(Node* n, PhaseIdealLoop *phase);
479 bool is_invariant(Node* n) const;
544 int is_visited( Node *n ) const { return _preorders[n->_idx]; }
546 void set_preorder_visited( Node *n, int pre_order ) {
551 int get_preorder( Node *n ) const { assert( is_visited(n), "" ); return _preorders[n->_idx]>>1; }
555 int is_postvisited( Node *n ) const { assert( is_visited(n), "" ); return _preorders[n->_idx]&1; }
558 void set_postvisited( Node *n ) { assert( !is_postvisited( n ), "" ); _preorders[n->_idx] |= 1; }
562 bool has_ctrl( Node *n ) const { return ((intptr_t)_nodes[n->_idx]) & 1; }
574 bool verify_dominance(Node* n, Node* use, Node* LCA, Node* early);
576 Node* compute_lca_of_uses(Node* n, Node* early, bool verify = false);
581 Node *dom_lca_for_get_late_ctrl( Node *lca, Node *n, Node *tag ) {
591 Node *dom_lca_for_get_late_ctrl_internal( Node *lca, Node *n, Node *tag );
595 Node *find_non_split_ctrl( Node *ctrl ) const {
606 bool has_node( Node* n ) const { return _nodes[n->_idx] != NULL; }
608 Node *get_late_ctrl( Node *n, Node *early );
609 Node *get_early_ctrl( Node *n );
610 Node *get_early_ctrl_for_expensive(Node *n, Node* earliest);
611 void set_early_ctrl( Node *n );
612 void set_subtree_ctrl( Node *root );
613 void set_ctrl( Node *n, Node *ctrl ) {
617 _nodes.map( n->_idx, (Node*)((intptr_t)ctrl + 1) );
620 void set_ctrl_and_loop(Node* n, Node* ctrl) {
630 // get their replacement Node in slot 1. Instead of updating the block
634 Node *get_ctrl( Node *i ) {
636 Node *n = get_ctrl_no_update(i);
637 _nodes.map( i->_idx, (Node*)((intptr_t)n + 1) );
643 bool is_dominator(Node *d, Node *n);
645 Node* ctrl_or_self(Node* n) {
655 Node *get_ctrl_no_update( Node *i ) const {
657 Node *n = (Node*)(((intptr_t)_nodes[i->_idx]) & ~1);
661 n = (Node*)(((intptr_t)_nodes[n->_idx]) & ~1);
670 bool has_loop( Node *n ) const {
675 void set_loop( Node *n, IdealLoopTree *loop ) {
676 _nodes.map(n->_idx, (Node*)loop);
683 void lazy_update( Node *old_node, Node *new_node ) {
688 _nodes.map( old_node->_idx, (Node*)((intptr_t)new_node + 1) );
690 void lazy_replace( Node *old_node, Node *new_node ) {
694 void lazy_replace_proj( Node *old_node, Node *new_node ) {
705 int build_loop_tree_impl( Node *n, int pre_order );
713 void build_loop_late_post ( Node* n );
718 Node **_idom; // Array of immediate dominators
722 Node* idom_no_update(Node* d) const {
724 Node* n = _idom[d->_idx];
728 n = (Node*)(((intptr_t)_nodes[n->_idx]) & ~1);
733 Node *idom(Node* d) const {
735 Node *n = idom_no_update(d);
739 uint dom_depth(Node* d) const {
743 void set_idom(Node* d, Node* n, uint dom_depth);
745 Node *compute_idom( Node *region ) const;
750 bool is_deleteable_safept(Node* sfpt);
771 Node *dom_lca( Node *n1, Node *n2 ) const {
774 Node *dom_lca_internal( Node *n1, Node *n2 ) const;
776 // Compute the Ideal Node to Loop mapping
807 // Per-Node transform
808 virtual Node *transform( Node *a_node ) { return 0; }
810 bool is_counted_loop( Node *x, IdealLoopTree *loop );
812 Node* exact_limit( IdealLoopTree *loop );
815 IdealLoopTree *get_loop( Node *n ) const {
823 int is_member( const IdealLoopTree *loop, Node *n ) const {
842 Node* side_by_side_idom = NULL);
856 // If Node n lives in the back_ctrl block, we clone a private version of n
858 Node *clone_up_backedge_goo( Node *back_ctrl, Node *preheader_ctrl, Node *n, VectorSet &visited, Node_Stack &clones );
870 bool is_scaled_iv(Node* exp, Node* iv, int* p_scale);
873 bool is_scaled_iv_plus_offset(Node* exp, Node* iv, int* p_scale, Node** p_offset, int depth = 0);
883 ProjNode* create_new_if_for_predicate(ProjNode* cont_proj, Node* new_entry,
885 void register_control(Node* n, IdealLoopTree *loop, Node* pred);
888 static ProjNode* clone_predicate(ProjNode* predicate_proj, Node* new_entry,
893 static Node* clone_loop_predicates(Node* old_entry, Node* new_entry,
897 Node* clone_loop_predicates(Node* old_entry, Node* new_entry, bool clone_limit_check);
899 static Node* skip_loop_predicates(Node* entry);
902 static ProjNode* find_predicate_insertion_point(Node* start_c, Deoptimization::DeoptReason reason);
904 static Node* find_predicate(Node* entry);
906 BoolNode* rc_predicate(IdealLoopTree *loop, Node* ctrl,
907 int scale, Node* offset,
908 Node* init, Node* limit, Node* stride,
909 Node* range, bool upper);
924 bool is_node_unreachable(Node *n) const {
950 void add_constraint( int stride_con, int scale_con, Node *offset, Node *low_limit, Node *upper_limit, Node *pre_ctrl, Node **pre_limit, Node **main_limit );
952 Node* adjust_limit( int stride_con, Node * scale, Node *offset, Node *rc_limit, Node *loop_limit, Node *pre_ctrl );
960 bool has_use_in_set( Node* n, VectorSet& vset );
962 bool has_use_internal_to_set( Node* n, VectorSet& vset, IdealLoopTree *loop );
964 int clone_for_use_outside_loop( IdealLoopTree *loop, Node* n, Node_List& worklist );
966 void clone_for_special_use_inside_loop( IdealLoopTree *loop, Node* n,
969 void insert_phi_for_loop( Node* use, uint idx, Node* lp_entry_val, Node* back_edge_val, LoopNode* lp );
976 bool is_valid_clone_loop_exit_use( IdealLoopTree *loop, Node* use, uint exit_idx);
980 int stride_of_possible_iv( Node* iff );
981 bool is_possible_iv_test( Node* iff ) { return stride_of_possible_iv(iff) != 0; }
983 Node* stay_in_loop( Node* n, IdealLoopTree *loop);
988 void register_node(Node* n, IdealLoopTree *loop, Node* pred, int ddepth);
992 Node* short_circuit_if(IfNode* iff, ProjNode* live_proj);
996 ProjNode* insert_if_before_proj(Node* left, bool Signed, BoolTest::mask relop, Node* right, ProjNode* proj);
1009 Node *remix_address_expressions( Node *n );
1012 Node *conditional_move( Node *n );
1023 Node *split_if_with_blocks_pre ( Node *n );
1024 void split_if_with_blocks_post( Node *n );
1025 Node *has_local_phi_input( Node *n );
1028 void dominated_by( Node *prevdom, Node *iff, bool flip = false, bool exclude_loop_predicate = false );
1030 // Split Node 'n' through merge point
1031 Node *split_thru_region( Node *n, Node *region );
1032 // Split Node 'n' through merge point if there is enough win.
1033 Node *split_thru_phi( Node *n, Node *region, int policy );
1036 void do_split_if( Node *iff );
1041 bool match_fill_loop(IdealLoopTree* lpt, Node*& store, Node*& store_value,
1042 Node*& shift, Node*& offset);
1046 const TypeInt* filtered_type( Node *n, Node* n_ctrl);
1047 const TypeInt* filtered_type( Node *n ) { return filtered_type(n, NULL); }
1049 const TypeInt* filtered_type_from_dominators( Node* val, Node *val_ctrl);
1052 Node *spinup( Node *iff, Node *new_false, Node *new_true, Node *region, Node *phi, small_cache *cache );
1053 Node *find_use_block( Node *use, Node *def, Node *old_false, Node *new_false, Node *old_true, Node *new_true );
1054 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 );
1055 bool split_up( Node *n, Node *blk1, Node *blk2 );
1056 void sink_use( Node *use, Node *post_loop );
1057 Node *place_near_use( Node *useblock ) const;
1063 void register_new_node( Node *n, Node *blk );
1066 void dump_bad_graph(const char* msg, Node* n, Node* early, Node* LCA);
1072 void rpo( Node *start, Node_Stack &stk, VectorSet &visited, Node_List &rpo_list ) const;
1074 void verify_compare( Node *n, const PhaseIdealLoop *loop_verify, VectorSet &visited ) const;
1075 IdealLoopTree *get_loop_idx(Node* n) const {
1086 inline Node* IdealLoopTree::tail() {
1088 Node *n = _tail;