Lines Matching defs:node

71    node chain.
87 struct case_node *right; /* Right son in binary tree; also node chain */
88 struct case_node *parent; /* Parent of node in binary tree */
91 tree code_label; /* Label to jump to when node matches */
209 which is a LABEL_DECL tree node.
246 LABEL should be a LABEL_DECL tree node that was or will later be
275 STRING is a STRING_CST node containing the assembler code text,
1760 /* Given a pointer to a BLOCK node return nonzero if (and only if) the node
1764 For any BLOCK node representing a "body block" of a function or method, the
1765 BLOCK_SUPERCONTEXT of the node will point to another BLOCK node which
1768 *that* node in turn will point to the relevant FUNCTION_DECL node. */
1874 type in case this node is used in a reference. */
2214 number of case nodes, i.e. the node with the most cases gets
2243 node targets. */
2431 number of unique case node targets seen. */
2658 estimate_case_costs (case_node_ptr node)
2661 tree max_ascii = build_int_cst (TREE_TYPE (node->high), 127);
2697 for (n = node; n; n = n->right)
2831 /* Search the parent sections of the case node tree
2837 known that if a parent node checks the range of the current
2838 node minus one that the current node is bounded at its lower
2842 node_has_low_bound (case_node_ptr node, tree index_type)
2847 /* If the lower bound of this node is the lowest value in the index type,
2850 if (tree_int_cst_equal (node->low, TYPE_MIN_VALUE (index_type)))
2853 /* If this node has a left branch, the value at the left must be less
2854 than that at this node, so it cannot be bounded at the bottom and
2857 if (node->left)
2860 low_minus_one = fold_build2 (MINUS_EXPR, TREE_TYPE (node->low),
2861 node->low,
2862 build_int_cst (TREE_TYPE (node->low), 1));
2867 if (! tree_int_cst_lt (low_minus_one, node->low))
2870 for (pnode = node->parent; pnode; pnode = pnode->parent)
2877 /* Search the parent sections of the case node tree
2883 known that if a parent node checks the range of the current
2884 node plus one that the current node is bounded at its upper
2888 node_has_high_bound (case_node_ptr node, tree index_type)
2898 /* If the upper bound of this node is the highest value in the type
2901 if (tree_int_cst_equal (node->high, TYPE_MAX_VALUE (index_type)))
2904 /* If this node has a right branch, the value at the right must be greater
2905 than that at this node, so it cannot be bounded at the top and
2908 if (node->right)
2911 high_plus_one = fold_build2 (PLUS_EXPR, TREE_TYPE (node->high),
2912 node->high,
2913 build_int_cst (TREE_TYPE (node->high), 1));
2918 if (! tree_int_cst_lt (node->high, high_plus_one))
2921 for (pnode = node->parent; pnode; pnode = pnode->parent)
2929 case node tree to see if both tests for the upper and lower
2933 node_is_bounded (case_node_ptr node, tree index_type)
2935 return (node_has_low_bound (node, index_type)
2936 && node_has_high_bound (node, index_type));
2942 case-node binary tree NODE, whose nodes represent test conditions.
2952 optimization, the subordinates of a tree node are examined to
2955 current node are arranged to target the subordinates associated
2956 code for out of bound conditions on the current node.
2960 of this node, and determined to be on the same side of each parent
2961 as this node is. Thus, if this node tests for the value 51,
2964 tests for the value 50, then this node need not test anything. */
2967 emit_case_nodes (rtx index, case_node_ptr node, rtx default_label,
2980 If they have, emit an unconditional jump for this node. */
2981 if (node_is_bounded (node, index_type))
2982 emit_jump (label_rtx (node->code_label));
2984 else if (tree_int_cst_equal (node->low, node->high))
2987 this node and then check our children, if any. */
2991 expand_normal (node->low),
2993 label_rtx (node->code_label), unsignedp);
2995 if (node->right != 0 && node->left != 0)
2997 /* This node has children on both sides.
2999 by comparing the index value with this node's value.
3003 if (node_is_bounded (node->right, index_type))
3008 expand_normal (node->high),
3011 label_rtx (node->right->code_label));
3012 emit_case_nodes (index, node->left, default_label, index_type);
3015 else if (node_is_bounded (node->left, index_type))
3020 expand_normal (node->high),
3023 label_rtx (node->left->code_label));
3024 emit_case_nodes (index, node->right, default_label, index_type);
3030 else if (tree_int_cst_equal (node->right->low, node->right->high)
3031 && node->right->left == 0
3032 && node->right->right == 0
3033 && tree_int_cst_equal (node->left->low, node->left->high)
3034 && node->left->left == 0
3035 && node->left->right == 0)
3037 /* Neither node is bounded. First distinguish the two sides;
3044 expand_normal (node->right->low),
3046 label_rtx (node->right->code_label),
3053 expand_normal (node->left->low),
3055 label_rtx (node->left->code_label),
3061 /* Neither node is bounded. First distinguish the two sides;
3070 expand_normal (node->high),
3077 emit_case_nodes (index, node->left, default_label, index_type);
3084 emit_case_nodes (index, node->right, default_label, index_type);
3088 else if (node->right != 0 && node->left == 0)
3097 if (node->right->right || node->right->left
3098 || !tree_int_cst_equal (node->right->low, node->right->high))
3100 if (!node_has_low_bound (node, index_type))
3105 expand_normal (node->high),
3111 emit_case_nodes (index, node->right, default_label, index_type);
3114 /* We cannot process node->right normally
3116 this node's value. So handle node->right explicitly. */
3120 expand_normal (node->right->low),
3122 label_rtx (node->right->code_label), unsignedp);
3125 else if (node->right == 0 && node->left != 0)
3128 if (node->left->left || node->left->right
3129 || !tree_int_cst_equal (node->left->low, node->left->high))
3131 if (!node_has_high_bound (node, index_type))
3136 expand_normal (node->high),
3142 emit_case_nodes (index, node->left, default_label, index_type);
3145 /* We cannot process node->left normally
3147 this node's value. So handle node->left explicitly. */
3151 expand_normal (node->left->low),
3153 label_rtx (node->left->code_label), unsignedp);
3159 value, except that we do not start by testing whether this node
3162 if (node->right != 0 && node->left != 0)
3171 if (node_is_bounded (node->right, index_type))
3172 /* Right hand node is fully bounded so we can eliminate any
3177 expand_normal (node->high),
3180 label_rtx (node->right->code_label));
3183 /* Right hand node requires testing.
3190 expand_normal (node->high),
3196 /* Value belongs to this node or to the left-hand subtree. */
3201 expand_normal (node->low),
3204 label_rtx (node->code_label));
3207 emit_case_nodes (index, node->left, default_label, index_type);
3209 /* If right node had to be handled later, do that now. */
3218 emit_case_nodes (index, node->right, default_label, index_type);
3222 else if (node->right != 0 && node->left == 0)
3224 /* Deal with values to the left of this node,
3226 if (!node_has_low_bound (node, index_type))
3231 expand_normal (node->low),
3237 /* Value belongs to this node or to the right-hand subtree. */
3242 expand_normal (node->high),
3245 label_rtx (node->code_label));
3247 emit_case_nodes (index, node->right, default_label, index_type);
3250 else if (node->right == 0 && node->left != 0)
3252 /* Deal with values to the right of this node,
3254 if (!node_has_high_bound (node, index_type))
3259 expand_normal (node->high),
3265 /* Value belongs to this node or to the left-hand subtree. */
3270 expand_normal (node->low),
3273 label_rtx (node->code_label));
3275 emit_case_nodes (index, node->left, default_label, index_type);
3282 since otherwise this node is bounded--a case tested already. */
3283 int high_bound = node_has_high_bound (node, index_type);
3284 int low_bound = node_has_low_bound (node, index_type);
3291 expand_normal (node->high),
3302 expand_normal (node->low),
3311 tree low = build1 (CONVERT_EXPR, type, node->low);
3312 tree high = build1 (CONVERT_EXPR, type, node->high);
3329 emit_jump (label_rtx (node->code_label));