diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2013-10-09 13:42:17 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2013-10-09 13:42:17 +0000 |
commit | cc524fc7b800bff51dc86d05d8ce80d9c5524ef3 (patch) | |
tree | 40318ce4bf8ae61fbdc6507579e982b6008fb23f /gcc/gimple.h | |
parent | 713438778be52a0cb0533fad271c05481435b519 (diff) | |
download | gcc-cc524fc7b800bff51dc86d05d8ce80d9c5524ef3.zip gcc-cc524fc7b800bff51dc86d05d8ce80d9c5524ef3.tar.gz gcc-cc524fc7b800bff51dc86d05d8ce80d9c5524ef3.tar.bz2 |
tree-flow.h (tm_restart_node, gimple_df): Move to gimple-ssa.h.
* tree-flow.h (tm_restart_node, gimple_df): Move to gimple-ssa.h.
(struct int_tree_map): Move to tree-hasher.h
(SCALE, LABEL, PERCENT): Move to gimple.h
* tree-flow-inline.h: Delete. Move functions to other files.
(unmodifiable_var_p, ref_contains_array_ref): Unused, so delete.
* gimple-ssa.h (tm_restart_node, gimple_df): Relocate from tree-flow.h.
(gimple_in_ssa_p, gimple_vop): Relocate from tree-flow-inline.h
* gimple.h (imple_stmt_max_uid, set_gimple_stmt_max_uid,
inc_gimple_stmt_max_uid, get_lineno): Relocate from tree-flow-inline.h.
(SCALE, LABEL, PERCENT): Relocate from tree-flow.h
* tree-hasher.h: Don't include tree-flow.h.
(struct int_tree_map): Relocate from tree-flow.h.
* tree-sra.c (contains_view_convert_expr_p): Relocate from
tree-flow-inline.h and make static.
* tree-ssa-alias.h (ranges_overlap_p): Relocate from tree-flow-inline.h.
* tree-ssa-operands.c (gimple_ssa_operands): Relocate from
tree-flow-inline.h and make static.
* tree.h (is_global_var, may_be_aliased): Relocate from
tree-flow-inline.h.
* Makefile.in (GTFILES): Remove tree-flow.h and add gimple-ssa.h.
* value-prof.c: No longer include tree-flow-inline.h.
* tree-switch-conversion.c: No longer include tree-flow-inline.h.
From-SVN: r203318
Diffstat (limited to 'gcc/gimple.h')
-rw-r--r-- | gcc/gimple.h | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/gcc/gimple.h b/gcc/gimple.h index 2272075..e8e98ad 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1028,6 +1028,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 *); @@ -1055,6 +1076,7 @@ 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 gimple_can_coalesce_p (tree, tree); extern bool nonfreeing_call_p (gimple); /* In omp-low.c. */ @@ -1077,9 +1099,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 @@ -3910,6 +3929,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 * @@ -5431,4 +5467,16 @@ 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 */ |