Lines Matching refs:tree

2    tree representation into the GIMPLE form.
28 #include "tree.h"
31 #include "tree-gimple.h"
32 #include "tree-inline.h"
36 #include "tree-flow.h"
83 tree current_bind_expr;
84 tree temps;
85 tree conditional_cleanups;
86 tree exit_label;
87 tree return_temp;
89 VEC(tree,heap) *case_labels;
108 tree val; /* Key */
109 tree temp; /* Value */
113 static enum gimplify_status gimplify_compound_expr (tree *, tree *, bool);
115 static bool cpt_same_type (tree a, tree b);
124 tree t = ((const elt_t *) p)->val;
133 tree t1 = ((const elt_t *) p1)->val;
134 tree t2 = ((const elt_t *) p2)->val;
171 pop_gimplify_context (tree body)
174 tree t;
193 gimple_push_bind_expr (tree bind)
206 tree
237 gimple_pop_condition (tree *pre_p)
254 tree a = (tree) xa;
255 tree b = (tree) xb;
289 static void omp_add_variable (struct gimplify_omp_ctx *, tree, unsigned int);
290 static bool omp_notice_variable (struct gimplify_omp_ctx *, tree, bool);
295 append_to_statement_list_1 (tree t, tree *list_p)
297 tree list = *list_p;
318 append_to_statement_list (tree t, tree *list_p)
327 append_to_statement_list_force (tree t, tree *list_p)
336 gimplify_and_add (tree t, tree *list_p)
365 tree
368 tree lab = build_decl (LABEL_DECL, NULL_TREE, void_type_node);
378 static tree
379 find_single_pointer_decl_1 (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
382 tree *pdecl = (tree *) data;
399 /* Find the single DECL of pointer type in the tree T and return it.
402 static tree
403 find_single_pointer_decl (tree t)
405 tree decl = NULL_TREE;
422 tree
443 tree
444 create_tmp_var_raw (tree type, const char *prefix)
446 tree tmp_var;
447 tree new_type;
476 tree
477 create_tmp_var (tree type, const char *prefix)
479 tree tmp_var;
494 /* Given a tree, try to return a useful variable name that we can use
495 to prefix a temporary that is being assigned the value of the tree.
499 get_name (tree t)
501 tree stripped_decl;
523 static inline tree
524 create_tmp_from_val (tree val)
532 static tree
533 lookup_tmp_var (tree val, bool is_formal)
535 tree ret;
583 static tree
584 internal_get_tmp_var (tree val, tree *pre_p, tree *post_p, bool is_formal)
586 tree t, mod;
594 tree u = find_single_pointer_decl (val);
635 tree
636 get_formal_tmp_var (tree val, tree *pre_p)
644 tree
645 get_initialized_tmp_var (tree val, tree *pre_p, tree *post_p)
654 declare_vars (tree vars, tree scope, bool debug_info)
656 tree last = vars;
659 tree temps, block;
698 force_constant_size (tree var)
718 gimple_add_tmp_var (tree tmp)
755 should_carry_locus_p (tree stmt)
771 annotate_one_with_locus (tree t, location_t locus)
778 annotate_all_with_locus (tree *stmt_p, location_t locus)
787 tree t = tsi_stmt (i);
803 static tree
804 mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data)
835 static tree
836 copy_if_shared_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
839 tree t = *tp;
864 /* Otherwise, mark the tree as visited and keep looking. */
871 static tree
872 unmark_visited_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
888 unshare_body (tree *body_p, tree fndecl)
901 unvisit_body (tree *body_p, tree fndecl)
914 unshare_all_trees (tree t)
924 tree
925 unshare_expr (tree expr)
934 tree
935 gimple_build_eh_filter (tree body, tree allowed, tree failure)
937 tree t;
956 tree
957 voidify_wrapper_expr (tree wrapper, tree temp)
959 tree type = TREE_TYPE (wrapper);
962 tree *p;
1036 build_stack_save_restore (tree *save, tree *restore)
1038 tree save_call, tmp_var;
1054 gimplify_bind_expr (tree *expr_p, tree *pre_p)
1056 tree bind_expr = *expr_p;
1058 tree t;
1060 tree temp = voidify_wrapper_expr (bind_expr, NULL);
1096 tree stack_save, stack_restore;
1133 gimplify_return_expr (tree stmt, tree *pre_p)
1135 tree ret_expr = TREE_OPERAND (stmt, 0);
1136 tree result_decl, result;
1204 gimplify_decl_expr (tree *stmt_p)
1206 tree stmt = *stmt_p;
1207 tree decl = DECL_EXPR_DECL (stmt);
1221 tree init = DECL_INITIAL (decl);
1228 tree t, args, addr, ptr_type;
1289 gimplify_loop_expr (tree *expr_p, tree *pre_p)
1291 tree saved_label = gimplify_ctxp->exit_label;
1292 tree start_label = build1 (LABEL_EXPR, void_type_node, NULL_TREE);
1293 tree jump_stmt = build_and_jump (&LABEL_EXPR_LABEL (start_label));
1321 tree case1 = *(tree *)p1;
1322 tree case2 = *(tree *)p2;
1330 sort_case_labels (tree label_vec)
1333 tree default_case = TREE_VEC_ELT (label_vec, len - 1);
1343 tree t = TREE_VEC_ELT (label_vec, i);
1354 qsort (&TREE_VEC_ELT (label_vec, 0), len - 1, sizeof (tree),
1362 gimplify_switch_expr (tree *expr_p, tree *pre_p)
1364 tree switch_expr = *expr_p;
1372 VEC(tree,heap) *labels, *saved_labels;
1373 tree label_vec, default_case = NULL_TREE;
1381 gimplify_ctxp->case_labels = VEC_alloc (tree, heap, 8);
1389 while (i < VEC_length (tree, labels))
1391 tree elt = VEC_index (tree, labels, i);
1392 tree low = CASE_LOW (elt);
1398 tree high = CASE_HIGH (elt);
1411 VEC_ordered_remove (tree, labels, i);
1435 TREE_VEC_ELT (label_vec, i) = VEC_index (tree, labels, i);
1438 VEC_free (tree, heap, labels);
1451 gimplify_case_label_expr (tree *expr_p)
1453 tree expr = *expr_p;
1463 VEC_safe_push (tree, heap, ctxp->case_labels, expr);
1471 tree
1472 build_and_jump (tree *label_p)
1480 tree label = create_artificial_label ();
1492 gimplify_exit_expr (tree *expr_p)
1494 tree cond = TREE_OPERAND (*expr_p, 0);
1495 tree expr;
1507 tree
1508 force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
1529 canonicalize_component_ref (tree *expr_p)
1531 tree expr = *expr_p;
1532 tree type;
1543 tree old_type = TREE_TYPE (expr);
1565 canonicalize_addr_expr (tree *expr_p)
1567 tree expr = *expr_p;
1568 tree ctype = TREE_TYPE (expr);
1569 tree addr_expr = TREE_OPERAND (expr, 0);
1570 tree atype = TREE_TYPE (addr_expr);
1571 tree dctype, datype, ddatype, otype, obj_expr;
1612 gimplify_conversion (tree *expr_p)
1628 tree sub = TREE_OPERAND (*expr_p, 0);
1649 gimplify_var_or_parm_decl (tree *expr_p)
1651 tree decl = *expr_p;
1706 gimplify_compound_lval (tree *expr_p, tree *pre_p,
1707 tree *post_p, fallback_t fallback)
1709 tree *p;
1710 VEC(tree,heap) *stack;
1716 stack = VEC_alloc (tree, heap, 10);
1736 VEC_safe_push (tree, heap, stack, *p);
1739 gcc_assert (VEC_length (tree, stack));
1753 for (i = VEC_length (tree, stack) - 1; i >= 0; i--)
1755 tree t = VEC_index (tree, stack, i);
1764 tree low = unshare_expr (array_ref_low_bound (t));
1776 tree elmt_type = TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)));
1777 tree elmt_size = unshare_expr (array_ref_element_size (t));
1778 tree factor = size_int (TYPE_ALIGN_UNIT (elmt_type));
1798 tree offset = unshare_expr (component_ref_field_offset (t));
1799 tree field = TREE_OPERAND (t, 1);
1800 tree factor
1826 for (; VEC_length (tree, stack) > 0; )
1828 tree t = VEC_pop (tree, stack);
1876 VEC_free (tree, heap, stack);
1894 gimplify_self_mod_expr (tree *expr_p, tree *pre_p, tree *post_p,
1898 tree lhs, lvalue, rhs, t1, post = NULL, *orig_post_p = post_p;
1965 maybe_with_size_expr (tree *expr_p)
1967 tree expr = *expr_p;
1968 tree type = TREE_TYPE (expr);
1969 tree size;
1991 gimplify_arg (tree *expr_p, tree *pre_p)
1993 bool (*test) (tree);
2021 gimplify_call_expr (tree *expr_p, tree *pre_p, bool want_value)
2023 tree decl;
2024 tree arglist;
2049 tree arglist = TREE_OPERAND (*expr_p, 1);
2050 tree new = fold_builtin (decl, arglist, !want_value);
2109 tree arglist = TREE_OPERAND (*expr_p, 1);
2110 tree new = fold_builtin (decl, arglist, !want_value);
2140 This function is the tree equivalent of do_jump.
2144 static tree
2145 shortcut_cond_r (tree pred, tree *true_label_p, tree *false_label_p)
2147 tree local_label = NULL_TREE;
2148 tree t, expr = NULL;
2218 static tree
2219 shortcut_cond_expr (tree expr)
2221 tree pred = TREE_OPERAND (expr, 0);
2222 tree then_ = TREE_OPERAND (expr, 1);
2223 tree else_ = TREE_OPERAND (expr, 2);
2224 tree true_label, false_label, end_label, t;
2225 tree *true_label_p;
2226 tree *false_label_p;
2372 tree
2373 gimple_boolify (tree expr)
2375 tree type = TREE_TYPE (expr);
2419 TARGET is the tree for T1 above.
2425 gimplify_cond_expr (tree *expr_p, tree *pre_p, fallback_t fallback)
2427 tree expr = *expr_p;
2428 tree tmp, tmp2, type;
2437 tree result;
2446 tree type = build_pointer_type (TREE_TYPE (expr));
2550 gimplify_modify_expr_to_memcpy (tree *expr_p, tree size, bool want_value)
2552 tree args, t, to, to_ptr, from;
2582 gimplify_modify_expr_to_memset (tree *expr_p, tree size, bool want_value)
2584 tree args, t, to, to_ptr;
2615 tree lhs_base_decl;
2621 static tree
2622 gimplify_init_ctor_preeval_1 (tree *tp, int *walk_subtrees, void *xdata)
2626 tree t = *tp;
2644 tree type, fntype = TREE_TYPE (TREE_TYPE (TREE_OPERAND (t, 0)));
2665 gimplify_init_ctor_preeval (tree *expr_p, tree *pre_p, tree *post_p,
2747 static void gimplify_init_ctor_eval (tree, VEC(constructor_elt,gc) *,
2748 tree *, bool);
2751 gimplify_init_ctor_eval_range (tree object, tree lower, tree upper,
2752 tree value, tree array_elt_type,
2753 tree *pre_p, bool cleared)
2755 tree loop_entry_label, loop_exit_label;
2756 tree var, var_type, cref;
2822 zero_sized_field_decl (tree fdecl)
2833 zero_sized_type (tree type)
2848 gimplify_init_ctor_eval (tree object, VEC(constructor_elt,gc) *elts,
2849 tree *pre_p, bool cleared)
2851 tree array_elt_type = NULL;
2853 tree purpose, value;
2860 tree cref, init;
2885 tree lower = TREE_OPERAND (purpose, 0);
2886 tree upper = TREE_OPERAND (purpose, 1);
2932 gimplify_init_constructor (tree *expr_p, tree *pre_p,
2933 tree *post_p, bool want_value)
2935 tree object;
2936 tree ctor = TREE_OPERAND (*expr_p, 1);
2937 tree type = TREE_TYPE (ctor);
3061 tree new = create_tmp_var_raw (type, "C");
3101 case of variable sized types. Avoid shared tree structures. */
3120 tree r, i;
3128 tree zero = fold_convert (TREE_TYPE (type), integer_zero_node);
3162 tree value;
3223 static tree
3224 fold_indirect_ref_rhs (tree t)
3226 tree type = TREE_TYPE (TREE_TYPE (t));
3227 tree sub = t;
3228 tree subtype;
3237 tree op = TREE_OPERAND (sub, 0);
3238 tree optype = TREE_TYPE (op);
3246 tree type_domain = TYPE_DOMAIN (optype);
3247 tree min_val = size_zero_node;
3258 tree type_domain;
3259 tree min_val = size_zero_node;
3260 tree osub = sub;
3277 gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
3278 tree *post_p, bool want_value)
3296 tree t = fold_indirect_ref_rhs (TREE_OPERAND (*from_p, 0));
3319 tree init = TARGET_EXPR_INITIAL (*from_p);
3352 tree cond = *from_p;
3353 tree result = *to_p;
3441 tree wrap = *from_p;
3442 tree t;
3475 gimplify_modify_expr_complex_part (tree *expr_p, tree *pre_p, bool want_value)
3478 tree lhs, rhs, new_rhs, other, realpart, imagpart;
3525 gimplify_modify_expr (tree *expr_p, tree *pre_p, tree *post_p, bool want_value)
3527 tree *from_p = &TREE_OPERAND (*expr_p, 1);
3528 tree *to_p = &TREE_OPERAND (*expr_p, 0);
3582 tree from = TREE_OPERAND (*from_p, 0);
3583 tree size = TREE_OPERAND (*from_p, 1);
3624 gimplify_variable_sized_compare (tree *expr_p)
3626 tree op0 = TREE_OPERAND (*expr_p, 0);
3627 tree op1 = TREE_OPERAND (*expr_p, 1);
3628 tree args, t, dest;
3650 gimplify_scalar_mode_aggregate_compare (tree *expr_p)
3652 tree op0 = TREE_OPERAND (*expr_p, 0);
3653 tree op1 = TREE_OPERAND (*expr_p, 1);
3655 tree type = TREE_TYPE (op0);
3656 tree scalar_type = lang_hooks.types.type_for_mode (TYPE_MODE (type), 1);
3680 gimplify_boolean_expr (tree *expr_p)
3683 tree type = TREE_TYPE (*expr_p);
3705 gimplify_compound_expr (tree *expr_p, tree *pre_p, bool want_value)
3707 tree t = *expr_p;
3711 tree *sub_p = &TREE_OPERAND (t, 0);
3737 gimplify_statement_list (tree *expr_p, tree *pre_p)
3739 tree temp = voidify_wrapper_expr (*expr_p, NULL);
3745 tree t;
3779 gimplify_save_expr (tree *expr_p, tree *pre_p, tree *post_p)
3782 tree val;
3826 gimplify_addr_expr (tree *expr_p, tree *pre_p, tree *post_p)
3828 tree expr = *expr_p;
3829 tree op0 = TREE_OPERAND (expr, 0);
3847 tree op00 = TREE_OPERAND (op0, 0);
3848 tree t_expr = TREE_TYPE (expr);
3849 tree t_op00 = TREE_TYPE (op00);
3854 tree t_op0 = TREE_TYPE (op0);
3920 gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p)
3922 tree expr = *expr_p;
3927 tree link;
3962 tree input;
4109 gimplify_cleanup_point_expr (tree *expr_p, tree *pre_p)
4112 tree body;
4114 tree temp = voidify_wrapper_expr (*expr_p, NULL);
4120 tree old_cleanups = gimplify_ctxp->conditional_cleanups;
4132 tree *wce_p = tsi_stmt_ptr (iter);
4133 tree wce = *wce_p;
4145 tree sl, tfe;
4182 gimple_push_cleanup (tree var, tree cleanup, bool eh_only, tree *pre_p)
4184 tree wce;
4214 tree flag = create_tmp_var (boolean_type_node, "cleanup");
4215 tree ffalse = build2 (MODIFY_EXPR, void_type_node, flag,
4217 tree ftrue = build2 (MODIFY_EXPR, void_type_node, flag,
4243 gimplify_target_expr (tree *expr_p, tree *pre_p, tree *post_p)
4245 tree targ = *expr_p;
4246 tree temp = TARGET_EXPR_SLOT (targ);
4247 tree init = TARGET_EXPR_INITIAL (targ);
4300 gimplify_stmt (tree *stmt_p)
4308 gimplify_to_stmt_list (tree *stmt_p)
4315 tree t = *stmt_p;
4327 omp_firstprivatize_variable (struct gimplify_omp_ctx *ctx, tree decl)
4355 omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *ctx, tree type)
4383 tree field;
4410 omp_add_variable (struct gimplify_omp_ctx *ctx, tree decl, unsigned int flags)
4414 tree t;
4508 omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code)
4525 tree value = get_base_address (DECL_VALUE_EXPR (decl));
4596 omp_is_private (struct gimplify_omp_ctx *ctx, tree decl)
4643 omp_check_private (struct gimplify_omp_ctx *ctx, tree decl)
4667 gimplify_scan_omp_clauses (tree *list_p, tree *pre_p, bool in_parallel,
4671 tree c;
4683 tree decl;
4794 tree *list_p = (tree *) data;
4795 tree decl = (tree) n->key;
4798 tree clause;
4853 gimplify_adjust_omp_clauses (tree *list_p)
4856 tree c, decl;
4929 gimplify_omp_parallel (tree *expr_p, tree *pre_p)
4931 tree expr = *expr_p;
4953 gimplify_omp_for (tree *expr_p, tree *pre_p)
4955 tree for_stmt, decl, t;
5038 gimplify_omp_workshare (tree *expr_p, tree *pre_p)
5040 tree stmt = *expr_p;
5054 goa_lhs_expr_p (tree expr, tree addr)
5080 gimplify_omp_atomic_fetch_op (tree *expr_p, tree addr, tree rhs, int index)
5083 tree decl, args, itype;
5140 goa_stabilize_expr (tree *expr_p, tree *pre_p, tree lhs_addr, tree lhs_var)
5142 tree expr = *expr_p;
5191 gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr,
5192 tree rhs, int index)
5194 tree oldval, oldival, oldival2, newval, newival, label;
5195 tree type, itype, cmpxchg, args, x, iaddr;
5298 gimplify_omp_atomic_mutex (tree *expr_p, tree *pre_p, tree addr, tree rhs)
5300 tree t;
5321 gimplify_omp_atomic (tree *expr_p, tree *pre_p)
5323 tree addr = TREE_OPERAND (*expr_p, 0);
5324 tree rhs = TREE_OPERAND (*expr_p, 1);
5325 tree type = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (addr)));
5368 /* Gimplifies the expression tree pointed to by EXPR_P. Return 0 if
5379 GIMPLE_TEST_F points to a function that takes a tree T and
5381 caller. The GIMPLE predicates are in tree-gimple.c.
5398 gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
5399 bool (* gimple_test_f) (tree), fallback_t fallback)
5401 tree tmp;
5402 tree internal_pre = NULL_TREE;
5403 tree internal_post = NULL_TREE;
5404 tree save_expr;
5670 tree temp = NULL_TREE;
5846 tree type = TREE_TYPE (TREE_OPERAND (*expr_p, 1));
5958 tree type = TYPE_MAIN_VARIANT (TREE_TYPE (*expr_p));
5966 tree tmp = create_tmp_var_raw (type, "vol");
6005 copy into a temp before adding the post-effects to the tree. */
6081 gimplify_type_sizes (tree type, tree *list_p)
6083 tree field, t;
6143 type declarations to the tree. */
6166 gimplify_one_sizepos (tree *expr_p, tree *stmt_p)
6168 tree type, expr = *expr_p;
6196 tree tmp;
6215 cpt_same_type (tree a, tree b)
6247 static tree
6248 check_pointer_types_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
6251 tree t = *tp;
6252 tree ptype, otype, dtype;
6294 gimplify_body (tree *body_p, tree fndecl, bool do_parms)
6297 tree body, parm_stmts;
6326 tree t = expr_only (*body_p);
6334 tree b = build3 (BIND_EXPR, void_type_node, NULL_TREE,
6369 gimplify_function_tree (tree fndecl)
6371 tree oldfn, parm, ret;
6405 tree tf, x, bind;
6436 tree
6437 force_gimple_operand (tree expr, tree *stmts, bool simple, tree var)
6439 tree t;
6474 tree
6475 force_gimple_operand_bsi (block_stmt_iterator *bsi, tree expr,
6476 bool simple_p, tree var)
6478 tree stmts;