osprey-gcc/gcc/gimplify.c File Reference

#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
#include "rtl.h"
#include "errors.h"
#include "varray.h"
#include "tree-gimple.h"
#include "tree-inline.h"
#include "diagnostic.h"
#include "langhooks.h"
#include "langhooks-def.h"
#include "tree-flow.h"
#include "cgraph.h"
#include "timevar.h"
#include "except.h"
#include "hashtab.h"
#include "flags.h"
#include "real.h"
#include "function.h"
#include "output.h"
#include "expr.h"
#include "ggc.h"
#include "target.h"
#include "gt-gimplify.h"

Include dependency graph for gimplify.c:

Go to the source code of this file.

Data Types

type  gimplify_ctx
type  gimple_temp_hash_elt
type  gimplify_init_ctor_preeval_data

Typedefs

typedef struct gimple_temp_hash_elt elt_t

Functions/Subroutines

static enum gimplify_status gimplify_compound_expr (tree *, tree *, bool)
static hashval_t gimple_tree_hash (const void *p)
static int gimple_tree_eq (const void *p1, const void *p2)
void push_gimplify_context (void)
void pop_gimplify_context (tree body)
void gimple_push_bind_expr (tree bind)
void gimple_pop_bind_expr (void)
tree gimple_current_bind_expr (void)
static bool gimple_conditional_context (void)
static void gimple_push_condition (void)
static void gimple_pop_condition (tree *pre_p)
static void append_to_statement_list_1 (tree t, tree *list_p)
void append_to_statement_list (tree t, tree *list_p)
void append_to_statement_list_force (tree t, tree *list_p)
void gimplify_and_add (tree t, tree *list_p)
static void remove_suffix (char *name, int len)
tree create_artificial_label (void)
static GTY (())
tree create_tmp_var_raw (tree type, const char *prefix)
tree create_tmp_var (tree type, const char *prefix)
const char * get_name (tree t)
static tree create_tmp_from_val (tree val)
static tree lookup_tmp_var (tree val, bool is_formal)
static tree internal_get_tmp_var (tree val, tree *pre_p, tree *post_p, bool is_formal)
tree get_formal_tmp_var (tree val, tree *pre_p)
tree get_initialized_tmp_var (tree val, tree *pre_p, tree *post_p)
void declare_tmp_vars (tree vars, tree scope)
void gimple_add_tmp_var (tree tmp)
static bool should_carry_locus_p (tree stmt)
static void annotate_one_with_locus (tree t, location_t locus)
void annotate_all_with_locus (tree *stmt_p, location_t locus)
static tree mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data)
static tree copy_if_shared_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED)
static tree unmark_visited_r (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, void *data ATTRIBUTE_UNUSED)
static void unshare_body (tree *body_p, tree fndecl)
static void unvisit_body (tree *body_p, tree fndecl)
void unshare_all_trees (tree t)
tree unshare_expr (tree expr)
tree gimple_build_eh_filter (tree body, tree allowed, tree failure)
tree voidify_wrapper_expr (tree wrapper, tree temp)
static void build_stack_save_restore (tree *save, tree *restore)
static enum gimplify_status gimplify_bind_expr (tree *expr_p, tree temp, tree *pre_p)
static enum gimplify_status gimplify_return_expr (tree stmt, tree *pre_p)
static enum gimplify_status gimplify_decl_expr (tree *stmt_p)
static enum gimplify_status gimplify_loop_expr (tree *expr_p, tree *pre_p)
static int compare_case_labels (const void *p1, const void *p2)
void sort_case_labels (tree label_vec)
static enum gimplify_status gimplify_switch_expr (tree *expr_p, tree *pre_p)
static enum gimplify_status gimplify_case_label_expr (tree *expr_p)
tree build_and_jump (tree *label_p)
static enum gimplify_status gimplify_exit_expr (tree *expr_p)
tree force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
static void canonicalize_component_ref (tree *expr_p)
static void canonicalize_addr_expr (tree *expr_p)
static enum gimplify_status gimplify_conversion (tree *expr_p)
static enum gimplify_status gimplify_compound_lval (tree *expr_p, tree *pre_p, tree *post_p, fallback_t fallback)
static enum gimplify_status gimplify_self_mod_expr (tree *expr_p, tree *pre_p, tree *post_p, bool want_value)
static void maybe_with_size_expr (tree *expr_p)
static enum gimplify_status gimplify_arg (tree *expr_p, tree *pre_p)
static enum gimplify_status gimplify_call_expr (tree *expr_p, tree *pre_p, bool want_value)
static tree shortcut_cond_r (tree pred, tree *true_label_p, tree *false_label_p)
static tree shortcut_cond_expr (tree expr)
static tree gimple_boolify (tree expr)
static enum gimplify_status gimplify_cond_expr (tree *expr_p, tree *pre_p, tree *post_p, tree target, fallback_t fallback)
static enum gimplify_status gimplify_modify_expr_to_memcpy (tree *expr_p, tree size, bool want_value)
static enum gimplify_status gimplify_modify_expr_to_memset (tree *expr_p, tree size, bool want_value)
static tree gimplify_init_ctor_preeval_1 (tree *tp, int *walk_subtrees, void *xdata)
static void gimplify_init_ctor_preeval (tree *expr_p, tree *pre_p, tree *post_p, struct gimplify_init_ctor_preeval_data *data)
static void gimplify_init_ctor_eval (tree, tree, tree *, bool)
static void gimplify_init_ctor_eval_range (tree object, tree lower, tree upper, tree value, tree array_elt_type, tree *pre_p, bool cleared)
static enum gimplify_status gimplify_init_constructor (tree *expr_p, tree *pre_p, tree *post_p, bool want_value)
static enum gimplify_status gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p, tree *post_p, bool want_value)
static enum gimplify_status gimplify_modify_expr (tree *expr_p, tree *pre_p, tree *post_p, bool want_value)
static enum gimplify_status gimplify_variable_sized_compare (tree *expr_p)
static enum gimplify_status gimplify_boolean_expr (tree *expr_p)
static enum gimplify_status gimplify_statement_list (tree *expr_p)
static enum gimplify_status gimplify_save_expr (tree *expr_p, tree *pre_p, tree *post_p)
static enum gimplify_status gimplify_addr_expr (tree *expr_p, tree *pre_p, tree *post_p)
static enum gimplify_status gimplify_asm_expr (tree *expr_p, tree *pre_p, tree *post_p)
static enum gimplify_status gimplify_cleanup_point_expr (tree *expr_p, tree *pre_p)
static void gimple_push_cleanup (tree var, tree cleanup, bool eh_only, tree *pre_p)
static enum gimplify_status gimplify_target_expr (tree *expr_p, tree *pre_p, tree *post_p)
void gimplify_stmt (tree *stmt_p)
void gimplify_to_stmt_list (tree *stmt_p)
enum gimplify_status gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p, bool(*gimple_test_f)(tree), fallback_t fallback)
void gimplify_type_sizes (tree type, tree *list_p)
void gimplify_one_sizepos (tree *expr_p, tree *stmt_p)
void gimplify_body (tree *body_p, tree fndecl, bool do_parms)
void gimplify_function_tree (tree fndecl)
tree force_gimple_operand (tree expr, tree *stmts, bool simple, tree var)

Variables

static struct gimplify_ctxgimplify_ctxp


Typedef Documentation


Function Documentation

void annotate_all_with_locus ( tree stmt_p,
location_t  locus 
)

static void annotate_one_with_locus ( tree  t,
location_t  locus 
) [static]

void append_to_statement_list ( tree  t,
tree list_p 
)

Definition at line 251 of file gimplify.c.

Referenced by alpha_gimplify_va_arg_1(), bsi_insert_on_edge(), build_cdtor(), copy_body_r(), create_coverage(), cxx_omp_clause_apply_fn(), do_goto_redirection(), do_return_redirection(), expand_call_inline(), expand_omp_for_generic(), expand_omp_for_static_chunk(), expand_omp_for_static_nochunk(), finalize_nesting_tree_1(), finish_bc_block(), finish_fname_decls(), frob_into_branch_around(), generate_copy_inout(), generate_element_copy(), generate_element_zero(), gimple_build_eh_filter(), gimple_pop_condition(), gimple_push_cleanup(), gimplify_and_add(), gimplify_bind_expr(), gimplify_c_loop(), gimplify_cleanup_point_expr(), gimplify_compound_expr(), gimplify_cp_loop(), gimplify_expr(), gimplify_function_tree(), gimplify_init_constructor(), gimplify_init_ctor_eval_range(), gimplify_loop_expr(), gimplify_modify_expr(), gimplify_modify_expr_complex_part(), gimplify_must_not_throw_expr(), gimplify_save_expr(), gimplify_self_mod_expr(), gimplify_statement_list(), gimplify_switch_expr(), gimplify_target_expr(), gimplify_to_stmt_list(), gimplify_va_arg_expr(), GTY(), honor_protect_cleanup_actions(), initialize_inlined_parameters(), ix86_gimplify_va_arg(), lower_catch(), lower_cleanup(), lower_lastprivate_clauses(), lower_omp_for(), lower_omp_for_lastprivate(), lower_omp_master(), lower_omp_ordered(), lower_omp_parallel(), lower_omp_sections(), lower_omp_single(), lower_omp_single_copy(), lower_rec_input_clauses(), lower_reduction_clauses(), lower_try_finally(), lower_try_finally_copy(), lower_try_finally_nofallthru(), lower_try_finally_onedest(), lower_try_finally_switch(), maybe_catch_exception(), mudflap_finish_file(), mx_register_decls(), remove_useless_stmts_tf(), rs6000_gimplify_va_arg(), s390_gimplify_va_arg(), scalarize_init(), set_component_ssa_name(), setup_one_parameter(), shortcut_cond_expr(), and shortcut_cond_r().

static void append_to_statement_list_1 ( tree  t,
tree list_p 
) [static]

void append_to_statement_list_force ( tree  t,
tree list_p 
)

tree build_and_jump ( tree label_p  ) 

static void build_stack_save_restore ( tree save,
tree restore 
) [static]

static void canonicalize_addr_expr ( tree expr_p  )  [static]

static void canonicalize_component_ref ( tree expr_p  )  [static]

static int compare_case_labels ( const void p1,
const void p2 
) [static]

Definition at line 1096 of file gimplify.c.

References CASE_LOW, and tree_int_cst_compare().

Referenced by sort_case_labels().

static tree copy_if_shared_r ( tree tp,
int *walk_subtrees  ATTRIBUTE_UNUSED,
void *data  ATTRIBUTE_UNUSED 
) [static]

tree create_artificial_label ( void   ) 

static tree create_tmp_from_val ( tree  val  )  [inline, static]

Definition at line 413 of file gimplify.c.

References create_tmp_var, get_name(), and TREE_TYPE.

Referenced by lookup_tmp_var().

tree create_tmp_var ( tree  type,
const char *  prefix 
)

Definition at line 368 of file gimplify.c.

tree create_tmp_var_raw ( tree  type,
const char *  prefix 
)

void declare_tmp_vars ( tree  vars,
tree  scope 
)

tree force_gimple_operand ( tree  expr,
tree stmts,
bool  simple,
tree  var 
)

tree force_labels_r ( tree tp,
int *  walk_subtrees,
void *data  ATTRIBUTE_UNUSED 
)

Definition at line 1262 of file gimplify.c.

References FORCED_LABEL, NULL_TREE, TREE_CODE, and TYPE_P.

Referenced by gimplify_decl_expr(), and gimplify_init_constructor().

tree get_formal_tmp_var ( tree  val,
tree pre_p 
)

tree get_initialized_tmp_var ( tree  val,
tree pre_p,
tree post_p 
)

const char* get_name ( tree  t  ) 

Definition at line 388 of file gimplify.c.

void gimple_add_tmp_var ( tree  tmp  ) 

static tree gimple_boolify ( tree  expr  )  [static]

tree gimple_build_eh_filter ( tree  body,
tree  allowed,
tree  failure 
)

Definition at line 739 of file gimplify.c.

Referenced by genericize_eh_spec_block(), and gimplify_must_not_throw_expr().

static bool gimple_conditional_context ( void   )  [static]

Definition at line 192 of file gimplify.c.

References gimplify_ctx::conditions, and gimplify_ctxp.

Referenced by gimple_push_cleanup().

tree gimple_current_bind_expr ( void   ) 

Definition at line 183 of file gimplify.c.

Referenced by add_block_to_enclosing().

void gimple_pop_bind_expr ( void   ) 

Definition at line 176 of file gimplify.c.

References gimplify_ctx::current_bind_expr, gimplify_ctxp, and TREE_CHAIN.

Referenced by gimplify_bind_expr().

static void gimple_pop_condition ( tree pre_p  )  [static]

void gimple_push_bind_expr ( tree  bind  ) 

Definition at line 169 of file gimplify.c.

References gimplify_ctx::current_bind_expr, gimplify_ctxp, and TREE_CHAIN.

Referenced by gimplify_bind_expr().

static void gimple_push_cleanup ( tree  var,
tree  cleanup,
bool  eh_only,
tree pre_p 
) [static]

static void gimple_push_condition ( void   )  [static]

static int gimple_tree_eq ( const void p1,
const void p2 
) [static]

Definition at line 102 of file gimplify.c.

References gcc_assert, gimple_tree_hash(), operand_equal_p(), t1, t2, TREE_CODE, and TREE_TYPE.

Referenced by push_gimplify_context().

static hashval_t gimple_tree_hash ( const void p  )  [static]

Definition at line 93 of file gimplify.c.

References iterative_hash_expr().

Referenced by gimple_tree_eq(), and push_gimplify_context().

static enum gimplify_status gimplify_addr_expr ( tree expr_p,
tree pre_p,
tree post_p 
) [static]

void gimplify_and_add ( tree  t,
tree list_p 
)

static enum gimplify_status gimplify_arg ( tree expr_p,
tree pre_p 
) [static]

static enum gimplify_status gimplify_asm_expr ( tree expr_p,
tree pre_p,
tree post_p 
) [static]

static enum gimplify_status gimplify_bind_expr ( tree expr_p,
tree  temp,
tree pre_p 
) [static]

void gimplify_body ( tree body_p,
tree  fndecl,
bool  do_parms 
)

Definition at line 4598 of file gimplify.c.

Referenced by gimplify_function_tree(), and initialize_inlined_parameters().

static enum gimplify_status gimplify_boolean_expr ( tree expr_p  )  [static]

Definition at line 3101 of file gimplify.c.

References boolean_false_node, boolean_true_node, build(), convert(), GS_OK, and TREE_TYPE.

Referenced by gimplify_expr().

static enum gimplify_status gimplify_call_expr ( tree expr_p,
tree pre_p,
bool  want_value 
) [static]

static enum gimplify_status gimplify_case_label_expr ( tree expr_p  )  [static]

static enum gimplify_status gimplify_cleanup_point_expr ( tree expr_p,
tree pre_p 
) [static]

static enum gimplify_status gimplify_compound_expr ( tree expr_p,
tree pre_p,
bool  want_value 
) [static]

static enum gimplify_status gimplify_compound_lval ( tree expr_p,
tree pre_p,
tree post_p,
fallback_t  fallback 
) [static]

static enum gimplify_status gimplify_cond_expr ( tree expr_p,
tree pre_p,
tree post_p,
tree  target,
fallback_t  fallback 
) [static]

static enum gimplify_status gimplify_conversion ( tree expr_p  )  [static]

static enum gimplify_status gimplify_decl_expr ( tree stmt_p  )  [static]

static enum gimplify_status gimplify_exit_expr ( tree expr_p  )  [static]

enum gimplify_status gimplify_expr ( tree expr_p,
tree pre_p,
tree post_p,
bool(*)(tree gimple_test_f,
fallback_t  fallback 
)

void gimplify_function_tree ( tree  fndecl  ) 

Definition at line 4670 of file gimplify.c.

Referenced by c_genericize(), and cgraph_build_static_cdtor().

static enum gimplify_status gimplify_init_constructor ( tree expr_p,
tree pre_p,
tree post_p,
bool  want_value 
) [static]

static void gimplify_init_ctor_eval ( tree  object,
tree  list,
tree pre_p,
bool  cleared 
) [static]

static void gimplify_init_ctor_eval_range ( tree  object,
tree  lower,
tree  upper,
tree  value,
tree  array_elt_type,
tree pre_p,
bool  cleared 
) [static]

static void gimplify_init_ctor_preeval ( tree expr_p,
tree pre_p,
tree post_p,
struct gimplify_init_ctor_preeval_data data 
) [static]

static tree gimplify_init_ctor_preeval_1 ( tree tp,
int *  walk_subtrees,
void xdata 
) [static]

static enum gimplify_status gimplify_loop_expr ( tree expr_p,
tree pre_p 
) [static]

static enum gimplify_status gimplify_modify_expr ( tree expr_p,
tree pre_p,
tree post_p,
bool  want_value 
) [static]

static enum gimplify_status gimplify_modify_expr_rhs ( tree expr_p,
tree from_p,
tree to_p,
tree pre_p,
tree post_p,
bool  want_value 
) [static]

static enum gimplify_status gimplify_modify_expr_to_memcpy ( tree expr_p,
tree  size,
bool  want_value 
) [static]

static enum gimplify_status gimplify_modify_expr_to_memset ( tree expr_p,
tree  size,
bool  want_value 
) [static]

void gimplify_one_sizepos ( tree expr_p,
tree stmt_p 
)

Definition at line 4471 of file gimplify.c.

Referenced by gimplify_decl_expr(), gimplify_parameters(), and gimplify_type_sizes().

static enum gimplify_status gimplify_return_expr ( tree  stmt,
tree pre_p 
) [static]

static enum gimplify_status gimplify_save_expr ( tree expr_p,
tree pre_p,
tree post_p 
) [static]

static enum gimplify_status gimplify_self_mod_expr ( tree expr_p,
tree pre_p,
tree post_p,
bool  want_value 
) [static]

static enum gimplify_status gimplify_statement_list ( tree expr_p  )  [static]

void gimplify_stmt ( tree stmt_p  ) 

static enum gimplify_status gimplify_switch_expr ( tree expr_p,
tree pre_p 
) [static]

static enum gimplify_status gimplify_target_expr ( tree expr_p,
tree pre_p,
tree post_p 
) [static]

void gimplify_to_stmt_list ( tree stmt_p  ) 

void gimplify_type_sizes ( tree  type,
tree list_p 
)

Definition at line 4396 of file gimplify.c.

Referenced by gimplify_decl_expr(), gimplify_parm_type(), and gimplify_type_sizes().

static enum gimplify_status gimplify_variable_sized_compare ( tree expr_p  )  [static]

static GTY ( ()   )  [static]

Definition at line 311 of file gimplify.c.

References ASM_FORMAT_PRIVATE_NAME, ASTRDUP, get_identifier(), remove_suffix(), and strlen().

static tree internal_get_tmp_var ( tree  val,
tree pre_p,
tree post_p,
bool  is_formal 
) [static]

static tree lookup_tmp_var ( tree  val,
bool  is_formal 
) [static]

static void maybe_with_size_expr ( tree expr_p  )  [static]

static tree mostly_copy_tree_r ( tree tp,
int *  walk_subtrees,
void data 
) [static]

void pop_gimplify_context ( tree  body  ) 

void push_gimplify_context ( void   ) 

static void remove_suffix ( char *  name,
int  len 
) [inline, static]

Definition at line 281 of file gimplify.c.

References i.

Referenced by GTY().

static tree shortcut_cond_expr ( tree  expr  )  [static]

static tree shortcut_cond_r ( tree  pred,
tree true_label_p,
tree false_label_p 
) [static]

static bool should_carry_locus_p ( tree  stmt  )  [static]

Definition at line 559 of file gimplify.c.

References TREE_CODE, and TREE_SIDE_EFFECTS.

Referenced by annotate_one_with_locus().

void sort_case_labels ( tree  label_vec  ) 

Definition at line 1107 of file gimplify.c.

Referenced by gimplify_switch_expr(), and lower_try_finally_switch().

static tree unmark_visited_r ( tree tp,
int *walk_subtrees  ATTRIBUTE_UNUSED,
void *data  ATTRIBUTE_UNUSED 
) [static]

Definition at line 676 of file gimplify.c.

References NULL_TREE, and TREE_VISITED.

Referenced by unshare_all_trees(), and unvisit_body().

void unshare_all_trees ( tree  t  ) 

Definition at line 718 of file gimplify.c.

References copy_if_shared_r(), NULL, unmark_visited_r(), and walk_tree().

Referenced by gimplify_body().

static void unshare_body ( tree body_p,
tree  fndecl 
) [static]

Definition at line 692 of file gimplify.c.

References cgraph_node(), copy_if_shared_r(), DECL_SAVED_TREE, NULL, and walk_tree().

Referenced by gimplify_body(), and unshare_body().

tree unshare_expr ( tree  expr  ) 

Definition at line 729 of file gimplify.c.

Referenced by add_to_dst_predicate_list(), add_to_predicate_list(), analyze_ref(), build_vtbl_address(), build_vtbl_ref_1(), constant_value_1(), convert_default_arg(), copy_body_r(), create_expression_by_pieces(), create_new_iv(), decl_constant_value_for_broken_optimization(), determine_exit_conditions(), expand_complex_move(), extract_component(), find_interesting_uses_address(), find_phi_replacement_condition(), forward_propagate_addr_expr_1(), forward_propagate_addr_into_variable_array_index(), generate_copy_inout(), get_ref_tag(), gimplify_asm_expr(), gimplify_compound_lval(), gimplify_cond_expr(), gimplify_expr(), gimplify_init_constructor(), gimplify_init_ctor_eval(), gimplify_init_ctor_eval_range(), gimplify_modify_expr_rhs(), gimplify_one_sizepos(), gimplify_var_or_parm_decl(), gimplify_variable_sized_compare(), issue_prefetch_ref(), maybe_with_size_expr(), mf_build_check_statement_for(), remap_decl(), replace_phi_args_in(), replace_phi_with_cond_modify_expr(), rewrite_use_address(), rewrite_use_compare(), rewrite_use_nonlinear_expr(), rewrite_use_outer(), scalarize_init(), scev_const_prop(), schedule_sm(), simplify_replace_tree(), substitute_and_fold(), tree_duplicate_bb(), tree_if_convert_cond_expr(), tree_unswitch_loop(), unshare_aff_combination(), unshare_and_remove_ssa_names(), vect_build_loop_niters(), vect_create_addr_base_for_vector_ref(), vect_create_data_ref_ptr(), vect_is_simple_iv_evolution(), and vect_update_ivs_after_vectorizer().

static void unvisit_body ( tree body_p,
tree  fndecl 
) [static]

Definition at line 705 of file gimplify.c.

References cgraph_node(), DECL_SAVED_TREE, NULL, unmark_visited_r(), and walk_tree().

Referenced by gimplify_body(), and unvisit_body().

tree voidify_wrapper_expr ( tree  wrapper,
tree  temp 
)


Variable Documentation


Generated on Wed Apr 8 14:21:17 2009 for Open64 by  doxygen 1.5.6