diff options
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 116 |
1 files changed, 29 insertions, 87 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index 33e790c..4f34a9ee 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -766,7 +766,6 @@ gimple gimple_build_call_valist (tree, unsigned, va_list); gimple gimple_build_call_internal (enum internal_fn, unsigned, ...); gimple gimple_build_call_internal_vec (enum internal_fn, vec<tree> ); gimple gimple_build_call_from_tree (tree); -gimple gimplify_assign (tree, tree, gimple_seq *); gimple gimple_build_cond (enum tree_code, tree, tree, tree, tree); gimple gimple_build_label (tree label); gimple gimple_build_goto (tree dest); @@ -806,8 +805,6 @@ gimple gimple_build_omp_atomic_store (tree); gimple gimple_build_transaction (gimple_seq, tree); gimple gimple_build_predict (enum br_predictor, enum prediction); enum gimple_statement_structure_enum gss_for_assign (enum tree_code); -void sort_case_labels (vec<tree> ); -void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *); gimple_seq gimple_seq_alloc (void); void gimple_seq_free (gimple_seq); void gimple_seq_add_seq (gimple_seq *, gimple_seq); @@ -834,8 +831,10 @@ bool gimple_has_side_effects (const_gimple); bool gimple_could_trap_p (gimple); bool gimple_could_trap_p_1 (gimple, bool, bool); bool gimple_assign_rhs_could_trap_p (gimple); -void gimple_regimplify_operands (gimple, gimple_stmt_iterator *); bool empty_body_p (gimple_seq); +extern void annotate_all_with_location_after (gimple_seq, gimple_stmt_iterator, + location_t); +extern void annotate_all_with_location (gimple_seq, location_t); unsigned get_gimple_rhs_num_ops (enum tree_code); #define gimple_alloc(c, n) gimple_alloc_stat (c, n MEM_STAT_INFO) gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL); @@ -859,48 +858,8 @@ extern bool gimple_ior_addresses_taken (bitmap, gimple); extern bool gimple_call_builtin_p (gimple, enum built_in_class); extern bool gimple_call_builtin_p (gimple, enum built_in_function); extern bool gimple_asm_clobbers_memory_p (const_gimple); - -/* In gimplify.c */ -extern tree create_tmp_var_raw (tree, const char *); -extern tree create_tmp_var_name (const char *); -extern tree create_tmp_var (tree, const char *); -extern tree create_tmp_reg (tree, const char *); -extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *); -extern tree get_formal_tmp_var (tree, gimple_seq *); -extern void declare_vars (tree, gimple, bool); -extern void annotate_all_with_location (gimple_seq, location_t); extern unsigned gimple_call_get_nobnd_arg_index (const_gimple, unsigned); -/* Validation of GIMPLE expressions. Note that these predicates only check - the basic form of the expression, they don't recurse to make sure that - underlying nodes are also of the right form. */ -typedef bool (*gimple_predicate)(tree); - - -/* FIXME we should deduce this from the predicate. */ -enum fallback { - fb_none = 0, /* Do not generate a temporary. */ - - fb_rvalue = 1, /* Generate an rvalue to hold the result of a - gimplified expression. */ - - fb_lvalue = 2, /* Generate an lvalue to hold the result of a - gimplified expression. */ - - fb_mayfail = 4, /* Gimplification may fail. Error issued - afterwards. */ - fb_either= fb_rvalue | fb_lvalue -}; - -typedef int fallback_t; - -enum gimplify_status { - GS_ERROR = -2, /* Something Bad Seen. */ - GS_UNHANDLED = -1, /* A langhook result for "I dunno". */ - GS_OK = 0, /* We did something, maybe more to do. */ - GS_ALL_DONE = 1 /* The expression is fully gimplified. */ -}; - /* Formal (expression) temporary table handling: multiple occurrences of the same scalar expression are evaluated into the same temporary. */ @@ -1010,31 +969,8 @@ inc_gimple_stmt_max_uid (struct function *fn) return fn->last_stmt_uid++; } -extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *, - bool (*) (tree), fallback_t); -extern void gimplify_type_sizes (tree, gimple_seq *); -extern void gimplify_one_sizepos (tree *, gimple_seq *); -enum gimplify_status gimplify_self_mod_expr (tree *, gimple_seq *, gimple_seq *, - bool, tree); -extern bool gimplify_stmt (tree *, gimple_seq *); -extern gimple gimplify_body (tree, bool); -extern void push_gimplify_context (struct gimplify_ctx *); -extern void pop_gimplify_context (gimple); -extern void gimplify_and_add (tree, gimple_seq *); - /* Miscellaneous helpers. */ -extern void gimple_add_tmp_var (tree); -extern gimple gimple_current_bind_expr (void); -extern vec<gimple> gimple_bind_expr_stack (void); -extern tree voidify_wrapper_expr (tree, tree); -extern tree build_and_jump (tree *); -extern tree force_labels_r (tree *, int *, void *); -extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *, - gimple_seq *); struct gimplify_omp_ctx; -extern void omp_firstprivatize_variable (struct gimplify_omp_ctx *, tree); -extern tree gimple_boolify (tree); -extern gimple_predicate rhs_predicate_for (tree); extern tree canonicalize_cond_expr_cond (tree); extern void dump_decl_set (FILE *, bitmap); extern bool nonfreeing_call_p (gimple); @@ -1048,9 +984,6 @@ extern void compute_transaction_bits (void); extern void lower_nested_functions (tree); extern void insert_field_into_struct (tree, tree); -/* In gimplify.c. */ -extern void gimplify_function_tree (tree); - /* In cfgexpand.c. */ extern tree gimple_assign_rhs_to_tree (gimple); @@ -1121,14 +1054,8 @@ gimple_seq_empty_p (gimple_seq s) return s == NULL; } -void gimple_seq_add_stmt (gimple_seq *, gimple); - -/* Link gimple statement GS to the end of the sequence *SEQ_P. If - *SEQ_P is NULL, a new sequence is allocated. This function is - similar to gimple_seq_add_stmt, but does not scan the operands. - During gimplification, we need to manipulate statement sequences - before the def/use vectors have been constructed. */ -void gimple_seq_add_stmt_without_update (gimple_seq *, gimple); +extern void gimple_seq_add_stmt (gimple_seq *, gimple); +extern void gimple_seq_add_stmt_without_update (gimple_seq *, gimple); /* Allocate a new sequence and initialize its first element with STMT. */ @@ -5563,15 +5490,6 @@ void gsi_commit_one_edge_insert (edge, basic_block *); void gsi_commit_edge_inserts (void); gimple gimple_call_copy_skip_args (gimple, bitmap); -/* In gimplify.c. */ -tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree); -tree force_gimple_operand (tree, gimple_seq *, bool, tree); -tree force_gimple_operand_gsi_1 (gimple_stmt_iterator *, tree, - gimple_predicate, tree, - bool, enum gsi_iterator_update); -tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree, - bool, enum gsi_iterator_update); - /* Convenience routines to walk all statements of a gimple function. Note that this is useful exclusively before the code is converted into SSA form. Once the program is in SSA form, the standard @@ -5684,6 +5602,27 @@ gimple_seq_set_location (gimple_seq seq, location_t loc) gimple_set_location (gsi_stmt (i), loc); } +/* Return true if a location should not be emitted for this statement + by annotate_all_with_location. */ + +static inline bool +gimple_do_not_emit_location_p (gimple g) +{ + return gimple_plf (g, GF_PLF_1); +} + +/* Mark statement G so a location will not be emitted by + annotate_one_with_location. */ + +static inline void +gimple_set_do_not_emit_location (gimple g) +{ + /* The PLF flags are initialized to 0 when a new tuple is created, + so no need to initialize it anywhere. */ + gimple_set_plf (g, GF_PLF_1, true); +} + + /* Macros for showing usage statistics. */ #define SCALE(x) ((unsigned long) ((x) < 1024*10 \ ? (x) \ @@ -5695,4 +5634,7 @@ gimple_seq_set_location (gimple_seq seq, location_t loc) #define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y)) +extern void sort_case_labels (vec<tree> ); +extern void preprocess_case_label_vec_for_gimple (vec<tree> , tree, tree *); + #endif /* GCC_GIMPLE_H */ |