#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"
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);
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);
/* 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);
extern void recalculate_side_effects (tree);
extern bool gimple_compare_field_offset (tree, tree);
extern tree gimple_register_type (tree);
-extern bool gimple_types_compatible_p (tree, tree, bool);
+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);
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));
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. */
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);