X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fgimple.h;h=c9e835a60c5ccf980aa33e715b5f08a3345e9496;hb=16bd2f3cbfa8c8526eeb3ed89b2f880fee4a9553;hp=ec7fc932d2828499c7b171522612e3b29ddc09f4;hpb=251e7603b8f0016178515eb5f041f6f1e29ec588;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/gimple.h b/gcc/gimple.h index ec7fc932d28..c9e835a60c5 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -27,8 +27,6 @@ along with GCC; see the file COPYING3. If not see #include "vecprim.h" #include "vecir.h" #include "ggc.h" -#include "tm.h" -#include "hard-reg-set.h" #include "basic-block.h" #include "tree-ssa-operands.h" #include "tree-ssa-alias.h" @@ -869,7 +867,6 @@ int gimple_call_arg_flags (const_gimple, unsigned); void gimple_call_reset_alias_info (gimple); bool gimple_assign_copy_p (gimple); bool gimple_assign_ssa_name_copy_p (gimple); -bool gimple_assign_single_p (gimple); bool gimple_assign_unary_nop_p (gimple); void gimple_set_bb (gimple, struct basic_block_def *); void gimple_assign_set_rhs_from_tree (gimple_stmt_iterator *, tree); @@ -886,6 +883,7 @@ void gimple_cond_set_condition_from_tree (gimple, tree); bool gimple_has_side_effects (const_gimple); bool gimple_rhs_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); @@ -943,8 +941,6 @@ extern bool is_gimple_mem_rhs (tree); /* Returns true iff T is a valid if-statement condition. */ extern bool is_gimple_condexpr (tree); -/* Returns true iff T is a type conversion. */ -extern bool is_gimple_cast (tree); /* Returns true iff T is a variable that does not need to live in memory. */ extern bool is_gimple_non_addressable (tree t); @@ -956,6 +952,9 @@ extern tree get_call_expr_in (tree t); extern void recalculate_side_effects (tree); extern bool gimple_compare_field_offset (tree, tree); extern tree gimple_register_type (tree); +extern tree gimple_register_canonical_type (tree); +enum gtc_mode { GTC_MERGE = 0, GTC_DIAG = 1 }; +extern bool gimple_types_compatible_p (tree, tree, enum gtc_mode); extern void print_gimple_types_stats (void); extern void free_gimple_type_tables (void); extern tree gimple_unsigned_type (tree); @@ -1900,7 +1899,10 @@ gimple_assign_rhs_code (const_gimple gs) enum tree_code code; GIMPLE_CHECK (gs, GIMPLE_ASSIGN); - code = gimple_expr_code (gs); + code = (enum tree_code) gs->gsbase.subcode; + /* While we initially set subcode to the TREE_CODE of the rhs for + GIMPLE_SINGLE_RHS assigns we do not update that subcode to stay + in sync when we rewrite stmts into SSA form or do SSA propagations. */ if (get_gimple_rhs_class (code) == GIMPLE_SINGLE_RHS) code = TREE_CODE (gimple_assign_rhs1 (gs)); @@ -1929,6 +1931,19 @@ gimple_assign_rhs_class (const_gimple gs) return get_gimple_rhs_class (gimple_assign_rhs_code (gs)); } +/* Return true if GS is an assignment with a singleton RHS, i.e., + there is no operator associated with the assignment itself. + Unlike gimple_assign_copy_p, this predicate returns true for + any RHS operand, including those that perform an operation + and do not have the semantics of a copy, such as COND_EXPR. */ + +static inline bool +gimple_assign_single_p (gimple gs) +{ + return (is_gimple_assign (gs) + && gimple_assign_rhs_class (gs) == GIMPLE_SINGLE_RHS); +} + /* Return true if S is a type-cast assignment. */ @@ -4873,6 +4888,7 @@ tree maybe_fold_offset_to_address (location_t, tree, tree, tree); tree maybe_fold_offset_to_reference (location_t, tree, tree, tree); tree maybe_fold_stmt_addition (location_t, tree, tree, tree); tree get_symbol_constant_value (tree); +tree canonicalize_constructor_val (tree); bool may_propagate_address_into_dereference (tree, tree); extern tree maybe_fold_and_comparisons (enum tree_code, tree, tree, enum tree_code, tree, tree);