summaryrefslogtreecommitdiff
path: root/gcc/gimple.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r--gcc/gimple.h527
1 files changed, 422 insertions, 105 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 5f1280586d2..d8528acade5 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -28,21 +28,13 @@ along with GCC; see the file COPYING3. If not see
#include "ggc.h"
#include "basic-block.h"
#include "tree.h"
-#include "tree-ssa-operands.h"
#include "tree-ssa-alias.h"
#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
typedef gimple gimple_seq_node;
-/* Types of supported temporaries. GIMPLE temporaries may be symbols
- in normal form (i.e., regular decls) or SSA names. This enum is
- used by create_gimple_tmp to tell it what kind of temporary the
- caller wants. */
-enum ssa_mode {
- M_SSA = 0,
- M_NORMAL
-};
-
/* For each block, the PHI nodes that need to be rewritten are stored into
these vectors. */
typedef vec<gimple> gimple_vec;
@@ -90,7 +82,7 @@ enum gimple_rhs_class
/* Specific flags for individual GIMPLE statements. These flags are
always stored in gimple_statement_base.subcode and they may only be
- defined for statement codes that do not use sub-codes.
+ defined for statement codes that do not use subcodes.
Values for the masks can overlap as long as the overlapping values
are never used in the same statement class.
@@ -113,6 +105,13 @@ enum gf_mask {
GF_OMP_FOR_KIND_MASK = 3 << 0,
GF_OMP_FOR_KIND_FOR = 0 << 0,
GF_OMP_FOR_KIND_SIMD = 1 << 0,
+ GF_OMP_FOR_KIND_DISTRIBUTE = 2 << 0,
+ GF_OMP_FOR_COMBINED = 1 << 2,
+ GF_OMP_FOR_COMBINED_INTO = 1 << 3,
+ GF_OMP_TARGET_KIND_MASK = 3 << 0,
+ GF_OMP_TARGET_KIND_REGION = 0 << 0,
+ GF_OMP_TARGET_KIND_DATA = 1 << 0,
+ GF_OMP_TARGET_KIND_UPDATE = 2 << 0,
/* True on an GIMPLE_OMP_RETURN statement if the return does not require
a thread synchronization via some sort of barrier. The exact barrier
@@ -122,6 +121,7 @@ enum gf_mask {
GF_OMP_SECTION_LAST = 1 << 0,
GF_OMP_ATOMIC_NEED_VALUE = 1 << 0,
+ GF_OMP_ATOMIC_SEQ_CST = 1 << 1,
GF_PREDICT_TAKEN = 1 << 15
};
@@ -615,7 +615,7 @@ struct GTY(()) gimple_statement_omp_continue {
tree control_use;
};
-/* GIMPLE_OMP_SINGLE */
+/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS */
struct GTY(()) gimple_statement_omp_single {
/* [ WORD 1-7 ] */
@@ -730,19 +730,6 @@ union GTY ((desc ("gimple_statement_structure (&%h)"),
struct gimple_statement_transaction GTY((tag ("GSS_TRANSACTION"))) gimple_transaction;
};
-/* In gimple.c. */
-
-/* Helper functions to build GIMPLE statements. */
-tree create_gimple_tmp (tree, enum ssa_mode = M_SSA);
-gimple build_assign (enum tree_code, tree, int, enum ssa_mode = M_SSA);
-gimple build_assign (enum tree_code, gimple, int, enum ssa_mode = M_SSA);
-gimple build_assign (enum tree_code, tree, tree, enum ssa_mode = M_SSA);
-gimple build_assign (enum tree_code, gimple, tree, enum ssa_mode = M_SSA);
-gimple build_assign (enum tree_code, tree, gimple, enum ssa_mode = M_SSA);
-gimple build_assign (enum tree_code, gimple, gimple, enum ssa_mode = M_SSA);
-gimple build_type_cast (tree, tree, enum ssa_mode = M_SSA);
-gimple build_type_cast (tree, gimple, enum ssa_mode = M_SSA);
-
/* Offset in bytes to the location of the operand vector.
Zero if there is no operand vector for this tuple structure. */
extern size_t const gimple_ops_offset_[];
@@ -807,11 +794,14 @@ gimple gimple_build_omp_critical (gimple_seq, tree);
gimple gimple_build_omp_section (gimple_seq);
gimple gimple_build_omp_continue (tree, tree);
gimple gimple_build_omp_master (gimple_seq);
+gimple gimple_build_omp_taskgroup (gimple_seq);
gimple gimple_build_omp_return (bool);
gimple gimple_build_omp_ordered (gimple_seq);
gimple gimple_build_omp_sections (gimple_seq, tree);
gimple gimple_build_omp_sections_switch (void);
gimple gimple_build_omp_single (gimple_seq, tree);
+gimple gimple_build_omp_target (gimple_seq, int, tree);
+gimple gimple_build_omp_teams (gimple_seq, tree);
gimple gimple_build_cdt (tree, tree);
gimple gimple_build_omp_atomic_load (tree, tree);
gimple gimple_build_omp_atomic_store (tree);
@@ -856,9 +846,9 @@ 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);
const char *gimple_decl_printable_name (tree, int);
-tree gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree);
-tree gimple_extract_devirt_binfo_from_cst (tree, tree);
+/* Returns true iff T is a virtual ssa name decl. */
+extern bool virtual_operand_p (tree);
/* Returns true iff T is a scalar register variable. */
extern bool is_gimple_reg (tree);
/* Returns true iff T is any sort of variable. */
@@ -903,14 +893,9 @@ extern bool is_gimple_builtin_call (gimple stmt);
extern void recalculate_side_effects (tree);
extern bool gimple_compare_field_offset (tree, tree);
-extern tree gimple_register_canonical_type (tree);
-extern void print_gimple_types_stats (const char *);
-extern void free_gimple_type_tables (void);
extern tree gimple_unsigned_type (tree);
extern tree gimple_signed_type (tree);
extern alias_set_type gimple_get_alias_set (tree);
-extern void count_uses_and_derefs (tree, gimple, unsigned *, unsigned *,
- unsigned *);
extern bool walk_stmt_load_store_addr_ops (gimple, void *,
bool (*)(gimple, tree, void *),
bool (*)(gimple, tree, void *),
@@ -1053,6 +1038,27 @@ is_gimple_sizepos (tree expr)
|| CONTAINS_PLACEHOLDER_P (expr));
}
+/* Get the number of the next statement uid to be allocated. */
+static inline unsigned int
+gimple_stmt_max_uid (struct function *fn)
+{
+ return fn->last_stmt_uid;
+}
+
+/* Set the number of the next statement uid to be allocated. */
+static inline void
+set_gimple_stmt_max_uid (struct function *fn, unsigned int maxid)
+{
+ fn->last_stmt_uid = maxid;
+}
+
+/* Set the number of the next statement uid to be allocated. */
+static inline unsigned int
+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 *);
@@ -1079,9 +1085,10 @@ 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);
-
-/* In omp-low.c. */
-extern tree omp_reduction_init (tree, tree);
+extern void dump_decl_set (FILE *, bitmap);
+extern bool gimple_can_coalesce_p (tree, tree);
+extern bool nonfreeing_call_p (gimple);
+extern tree copy_var_decl (tree, tree, tree);
/* In trans-mem.c. */
extern void diagnose_tm_safe_errors (tree);
@@ -1100,9 +1107,6 @@ extern tree gimple_assign_rhs_to_tree (gimple);
/* In builtins.c */
extern bool validate_gimple_arglist (const_gimple, ...);
-/* In tree-ssa-coalesce.c */
-extern bool gimple_can_coalesce_p (tree, tree);
-
/* Return the first node in GIMPLE sequence S. */
static inline gimple_seq_node
@@ -1254,12 +1258,15 @@ gimple_has_substatements (gimple g)
case GIMPLE_TRY:
case GIMPLE_OMP_FOR:
case GIMPLE_OMP_MASTER:
+ case GIMPLE_OMP_TASKGROUP:
case GIMPLE_OMP_ORDERED:
case GIMPLE_OMP_SECTION:
case GIMPLE_OMP_PARALLEL:
case GIMPLE_OMP_TASK:
case GIMPLE_OMP_SECTIONS:
case GIMPLE_OMP_SINGLE:
+ case GIMPLE_OMP_TARGET:
+ case GIMPLE_OMP_TEAMS:
case GIMPLE_OMP_CRITICAL:
case GIMPLE_WITH_CLEANUP_EXPR:
case GIMPLE_TRANSACTION:
@@ -1486,34 +1493,6 @@ gimple_set_use_ops (gimple g, struct use_optype_d *use)
}
-/* Return the set of VUSE operand for statement G. */
-
-static inline use_operand_p
-gimple_vuse_op (const_gimple g)
-{
- struct use_optype_d *ops;
- if (!gimple_has_mem_ops (g))
- return NULL_USE_OPERAND_P;
- ops = g->gsops.opbase.use_ops;
- if (ops
- && USE_OP_PTR (ops)->use == &g->gsmembase.vuse)
- return USE_OP_PTR (ops);
- return NULL_USE_OPERAND_P;
-}
-
-/* Return the set of VDEF operand for statement G. */
-
-static inline def_operand_p
-gimple_vdef_op (gimple g)
-{
- if (!gimple_has_mem_ops (g))
- return NULL_DEF_OPERAND_P;
- if (g->gsmembase.vdef)
- return &g->gsmembase.vdef;
- return NULL_DEF_OPERAND_P;
-}
-
-
/* Return the single VUSE operand of the statement G. */
static inline tree
@@ -1614,27 +1593,6 @@ gimple_expr_code (const_gimple stmt)
}
-/* Mark statement S as modified, and update it. */
-
-static inline void
-update_stmt (gimple s)
-{
- if (gimple_has_ops (s))
- {
- gimple_set_modified (s, true);
- update_stmt_operands (s);
- }
-}
-
-/* Update statement S if it has been optimized. */
-
-static inline void
-update_stmt_if_modified (gimple s)
-{
- if (gimple_modified_p (s))
- update_stmt_operands (s);
-}
-
/* Return true if statement STMT contains volatile operands. */
static inline bool
@@ -1687,7 +1645,7 @@ static inline unsigned
gimple_omp_subcode (const_gimple s)
{
gcc_gimple_checking_assert (gimple_code (s) >= GIMPLE_OMP_ATOMIC_LOAD
- && gimple_code (s) <= GIMPLE_OMP_SINGLE);
+ && gimple_code (s) <= GIMPLE_OMP_TEAMS);
return s->gsbase.subcode;
}
@@ -1723,6 +1681,36 @@ gimple_omp_return_nowait_p (const_gimple g)
}
+/* Set the LHS of OMP return. */
+
+static inline void
+gimple_omp_return_set_lhs (gimple g, tree lhs)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
+ g->gimple_omp_atomic_store.val = lhs;
+}
+
+
+/* Get the LHS of OMP return. */
+
+static inline tree
+gimple_omp_return_lhs (const_gimple g)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
+ return g->gimple_omp_atomic_store.val;
+}
+
+
+/* Return a pointer to the LHS of OMP return. */
+
+static inline tree *
+gimple_omp_return_lhs_ptr (gimple g)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_RETURN);
+ return &g->gimple_omp_atomic_store.val;
+}
+
+
/* Return true if OMP section statement G has the GF_OMP_SECTION_LAST
flag set. */
@@ -1792,6 +1780,29 @@ gimple_omp_atomic_set_need_value (gimple g)
}
+/* Return true if OMP atomic load/store statement G has the
+ GF_OMP_ATOMIC_SEQ_CST flag set. */
+
+static inline bool
+gimple_omp_atomic_seq_cst_p (const_gimple g)
+{
+ if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
+ GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
+ return (gimple_omp_subcode (g) & GF_OMP_ATOMIC_SEQ_CST) != 0;
+}
+
+
+/* Set the GF_OMP_ATOMIC_SEQ_CST flag on G. */
+
+static inline void
+gimple_omp_atomic_set_seq_cst (gimple g)
+{
+ if (gimple_code (g) != GIMPLE_OMP_ATOMIC_LOAD)
+ GIMPLE_CHECK (g, GIMPLE_OMP_ATOMIC_STORE);
+ g->gsbase.subcode |= GF_OMP_ATOMIC_SEQ_CST;
+}
+
+
/* Return the number of operands for statement GS. */
static inline unsigned
@@ -3596,6 +3607,96 @@ gimple_phi_set_arg (gimple gs, unsigned index, struct phi_arg_d * phiarg)
gs->gimple_phi.args[index] = *phiarg;
}
+/* PHI nodes should contain only ssa_names and invariants. A test
+ for ssa_name is definitely simpler; don't let invalid contents
+ slip in in the meantime. */
+
+static inline bool
+phi_ssa_name_p (const_tree t)
+{
+ if (TREE_CODE (t) == SSA_NAME)
+ return true;
+ gcc_checking_assert (is_gimple_min_invariant (t));
+ return false;
+}
+
+/* Return the PHI nodes for basic block BB, or NULL if there are no
+ PHI nodes. */
+
+static inline gimple_seq
+phi_nodes (const_basic_block bb)
+{
+ gcc_checking_assert (!(bb->flags & BB_RTL));
+ return bb->il.gimple.phi_nodes;
+}
+
+/* Return a pointer to the PHI nodes for basic block BB. */
+
+static inline gimple_seq *
+phi_nodes_ptr (basic_block bb)
+{
+ gcc_checking_assert (!(bb->flags & BB_RTL));
+ return &bb->il.gimple.phi_nodes;
+}
+
+/* Return the tree operand for argument I of PHI node GS. */
+
+static inline tree
+gimple_phi_arg_def (gimple gs, size_t index)
+{
+ return gimple_phi_arg (gs, index)->def;
+}
+
+
+/* Return a pointer to the tree operand for argument I of PHI node GS. */
+
+static inline tree *
+gimple_phi_arg_def_ptr (gimple gs, size_t index)
+{
+ return &gimple_phi_arg (gs, index)->def;
+}
+
+/* Return the edge associated with argument I of phi node GS. */
+
+static inline edge
+gimple_phi_arg_edge (gimple gs, size_t i)
+{
+ return EDGE_PRED (gimple_bb (gs), i);
+}
+
+/* Return the source location of gimple argument I of phi node GS. */
+
+static inline source_location
+gimple_phi_arg_location (gimple gs, size_t i)
+{
+ return gimple_phi_arg (gs, i)->locus;
+}
+
+/* Return the source location of the argument on edge E of phi node GS. */
+
+static inline source_location
+gimple_phi_arg_location_from_edge (gimple gs, edge e)
+{
+ return gimple_phi_arg (gs, e->dest_idx)->locus;
+}
+
+/* Set the source location of gimple argument I of phi node GS to LOC. */
+
+static inline void
+gimple_phi_arg_set_location (gimple gs, size_t i, source_location loc)
+{
+ gimple_phi_arg (gs, i)->locus = loc;
+}
+
+/* Return TRUE if argument I of phi node GS has a location record. */
+
+static inline bool
+gimple_phi_arg_has_location (gimple gs, size_t i)
+{
+ return gimple_phi_arg_location (gs, i) != UNKNOWN_LOCATION;
+}
+
+
/* Return the region number for GIMPLE_RESX GS. */
static inline int
@@ -3892,6 +3993,23 @@ gimple_debug_source_bind_set_value (gimple dbg, tree value)
gimple_set_op (dbg, 1, value);
}
+/* Return the line number for EXPR, or return -1 if we have no line
+ number information for it. */
+static inline int
+get_lineno (const_gimple stmt)
+{
+ location_t loc;
+
+ if (!stmt)
+ return -1;
+
+ loc = gimple_location (stmt);
+ if (loc == UNKNOWN_LOCATION)
+ return -1;
+
+ return LOCATION_LINE (loc);
+}
+
/* Return a pointer to the body for the OMP statement GS. */
static inline gimple_seq *
@@ -3968,6 +4086,56 @@ gimple_omp_for_set_kind (gimple g, int kind)
}
+/* Return true if OMP for statement G has the
+ GF_OMP_FOR_COMBINED flag set. */
+
+static inline bool
+gimple_omp_for_combined_p (const_gimple g)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
+ return (gimple_omp_subcode (g) & GF_OMP_FOR_COMBINED) != 0;
+}
+
+
+/* Set the GF_OMP_FOR_COMBINED field in G depending on the boolean
+ value of COMBINED_P. */
+
+static inline void
+gimple_omp_for_set_combined_p (gimple g, bool combined_p)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
+ if (combined_p)
+ g->gsbase.subcode |= GF_OMP_FOR_COMBINED;
+ else
+ g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED;
+}
+
+
+/* Return true if OMP for statement G has the
+ GF_OMP_FOR_COMBINED_INTO flag set. */
+
+static inline bool
+gimple_omp_for_combined_into_p (const_gimple g)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
+ return (gimple_omp_subcode (g) & GF_OMP_FOR_COMBINED_INTO) != 0;
+}
+
+
+/* Set the GF_OMP_FOR_COMBINED_INTO field in G depending on the boolean
+ value of COMBINED_P. */
+
+static inline void
+gimple_omp_for_set_combined_into_p (gimple g, bool combined_p)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_FOR);
+ if (combined_p)
+ g->gsbase.subcode |= GF_OMP_FOR_COMBINED_INTO;
+ else
+ g->gsbase.subcode &= ~GF_OMP_FOR_COMBINED_INTO;
+}
+
+
/* Return the clauses associated with OMP_FOR GS. */
static inline tree
@@ -4577,6 +4745,148 @@ gimple_omp_single_set_clauses (gimple gs, tree clauses)
}
+/* Return the clauses associated with OMP_TARGET GS. */
+
+static inline tree
+gimple_omp_target_clauses (const_gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ return gs->gimple_omp_parallel.clauses;
+}
+
+
+/* Return a pointer to the clauses associated with OMP_TARGET GS. */
+
+static inline tree *
+gimple_omp_target_clauses_ptr (gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ return &gs->gimple_omp_parallel.clauses;
+}
+
+
+/* Set CLAUSES to be the clauses associated with OMP_TARGET GS. */
+
+static inline void
+gimple_omp_target_set_clauses (gimple gs, tree clauses)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ gs->gimple_omp_parallel.clauses = clauses;
+}
+
+
+/* Return the kind of OMP target statemement. */
+
+static inline int
+gimple_omp_target_kind (const_gimple g)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_TARGET);
+ return (gimple_omp_subcode (g) & GF_OMP_TARGET_KIND_MASK);
+}
+
+
+/* Set the OMP target kind. */
+
+static inline void
+gimple_omp_target_set_kind (gimple g, int kind)
+{
+ GIMPLE_CHECK (g, GIMPLE_OMP_TARGET);
+ g->gsbase.subcode = (g->gsbase.subcode & ~GF_OMP_TARGET_KIND_MASK)
+ | (kind & GF_OMP_TARGET_KIND_MASK);
+}
+
+
+/* Return the child function used to hold the body of OMP_TARGET GS. */
+
+static inline tree
+gimple_omp_target_child_fn (const_gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ return gs->gimple_omp_parallel.child_fn;
+}
+
+/* Return a pointer to the child function used to hold the body of
+ OMP_TARGET GS. */
+
+static inline tree *
+gimple_omp_target_child_fn_ptr (gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ return &gs->gimple_omp_parallel.child_fn;
+}
+
+
+/* Set CHILD_FN to be the child function for OMP_TARGET GS. */
+
+static inline void
+gimple_omp_target_set_child_fn (gimple gs, tree child_fn)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ gs->gimple_omp_parallel.child_fn = child_fn;
+}
+
+
+/* Return the artificial argument used to send variables and values
+ from the parent to the children threads in OMP_TARGET GS. */
+
+static inline tree
+gimple_omp_target_data_arg (const_gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ return gs->gimple_omp_parallel.data_arg;
+}
+
+
+/* Return a pointer to the data argument for OMP_TARGET GS. */
+
+static inline tree *
+gimple_omp_target_data_arg_ptr (gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ return &gs->gimple_omp_parallel.data_arg;
+}
+
+
+/* Set DATA_ARG to be the data argument for OMP_TARGET GS. */
+
+static inline void
+gimple_omp_target_set_data_arg (gimple gs, tree data_arg)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TARGET);
+ gs->gimple_omp_parallel.data_arg = data_arg;
+}
+
+
+/* Return the clauses associated with OMP_TEAMS GS. */
+
+static inline tree
+gimple_omp_teams_clauses (const_gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
+ return gs->gimple_omp_single.clauses;
+}
+
+
+/* Return a pointer to the clauses associated with OMP_TEAMS GS. */
+
+static inline tree *
+gimple_omp_teams_clauses_ptr (gimple gs)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
+ return &gs->gimple_omp_single.clauses;
+}
+
+
+/* Set CLAUSES to be the clauses associated with OMP_TEAMS GS. */
+
+static inline void
+gimple_omp_teams_set_clauses (gimple gs, tree clauses)
+{
+ GIMPLE_CHECK (gs, GIMPLE_OMP_TEAMS);
+ gs->gimple_omp_single.clauses = clauses;
+}
+
+
/* Return the clauses associated with OMP_SECTIONS GS. */
static inline tree
@@ -4919,8 +5229,11 @@ gimple_return_set_retval (gimple gs, tree retval)
case GIMPLE_OMP_SECTIONS: \
case GIMPLE_OMP_SECTIONS_SWITCH: \
case GIMPLE_OMP_SINGLE: \
+ case GIMPLE_OMP_TARGET: \
+ case GIMPLE_OMP_TEAMS: \
case GIMPLE_OMP_SECTION: \
case GIMPLE_OMP_MASTER: \
+ case GIMPLE_OMP_TASKGROUP: \
case GIMPLE_OMP_ORDERED: \
case GIMPLE_OMP_CRITICAL: \
case GIMPLE_OMP_RETURN: \
@@ -5061,7 +5374,7 @@ gsi_start_1 (gimple_seq *seq)
return i;
}
-#define gsi_start(x) gsi_start_1(&(x))
+#define gsi_start(x) gsi_start_1 (&(x))
static inline gimple_stmt_iterator
gsi_none (void)
@@ -5104,7 +5417,7 @@ gsi_last_1 (gimple_seq *seq)
return i;
}
-#define gsi_last(x) gsi_last_1(&(x))
+#define gsi_last(x) gsi_last_1 (&(x))
/* Return a new iterator pointing to the last statement in basic block BB. */
@@ -5300,6 +5613,14 @@ 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
@@ -5404,21 +5725,6 @@ gimple_alloc_kind (enum gimple_code code)
extern void dump_gimple_statistics (void);
-/* In gimple-fold.c. */
-void gimplify_and_update_call_from_tree (gimple_stmt_iterator *, tree);
-tree gimple_fold_builtin (gimple);
-bool fold_stmt (gimple_stmt_iterator *);
-bool fold_stmt_inplace (gimple_stmt_iterator *);
-tree get_symbol_constant_value (tree);
-tree canonicalize_constructor_val (tree, tree);
-extern tree maybe_fold_and_comparisons (enum tree_code, tree, tree,
- enum tree_code, tree, tree);
-extern tree maybe_fold_or_comparisons (enum tree_code, tree, tree,
- enum tree_code, tree, tree);
-
-bool gimple_val_nonnegative_real_p (tree);
-
-
/* Set the location of all statements in SEQ to LOC. */
static inline void
@@ -5428,4 +5734,15 @@ gimple_seq_set_location (gimple_seq seq, location_t loc)
gimple_set_location (gsi_stmt (i), loc);
}
+/* Macros for showing usage statistics. */
+#define SCALE(x) ((unsigned long) ((x) < 1024*10 \
+ ? (x) \
+ : ((x) < 1024*1024*10 \
+ ? (x) / 1024 \
+ : (x) / (1024*1024))))
+
+#define LABEL(x) ((x) < 1024*10 ? 'b' : ((x) < 1024*1024*10 ? 'k' : 'M'))
+
+#define PERCENT(x,y) ((float)(x) * 100.0 / (float)(y))
+
#endif /* GCC_GIMPLE_H */