diff options
author | Kugan Vivekanandarajah <kuganv@linaro.org> | 2013-09-23 15:13:39 +0000 |
---|---|---|
committer | Christophe Lyon <clyon@gcc.gnu.org> | 2013-09-23 17:13:39 +0200 |
commit | a895a2b8a98464a019e6407e71769eb8aed99013 (patch) | |
tree | f8aeebb9d4ef8b224568c677be438c4daa431b63 /gcc/tree-ssanames.h | |
parent | 984af6ac7579a3bc589401cf6d8651e98d0e9eb7 (diff) | |
download | gcc-a895a2b8a98464a019e6407e71769eb8aed99013.zip gcc-a895a2b8a98464a019e6407e71769eb8aed99013.tar.gz gcc-a895a2b8a98464a019e6407e71769eb8aed99013.tar.bz2 |
gimple-pretty-print.c (dump_ssaname_info): New function.
2013-09-23 Kugan Vivekanandarajah <kuganv@linaro.org>
gcc/
* gimple-pretty-print.c (dump_ssaname_info): New function.
(dump_gimple_phi): Call it.
(pp_gimple_stmt_1): Likewise.
* tree-core.h (tree_ssa_name): New union ssa_name_info_type field.
(range_info_def): Declare.
* tree-pretty-print.c (pp_double_int): New function.
(dump_generic_node): Call it.
* tree-pretty-print.h (pp_double_int): Declare.
* tree-ssa-alias.c (dump_alias_info): Check pointer type.
* tree-ssanames.h (range_info_def): New structure.
(value_range_type): Move definition here.
(set_range_info, value_range_type, duplicate_ssa_name_range_info):
Declare.
* tree-ssanames.c (make_ssa_name_fn): Check pointer type at
initialization.
(set_range_info): New function.
(get_range_info): Likewise.
(duplicate_ssa_name_range_info): Likewise.
(duplicate_ssa_name_fn): Check pointer type and call
duplicate_ssa_name_range_info.
* tree-ssa-copy.c (fini_copy_prop): Likewise.
* tree-vrp.c (value_range_type): Remove definition, now in
tree-ssanames.h.
(vrp_finalize): Call set_range_info to update value range of
SSA_NAMEs.
* tree.h (SSA_NAME_PTR_INFO): Macro changed to access via union.
(SSA_NAME_RANGE_INFO): New macro.
From-SVN: r202831
Diffstat (limited to 'gcc/tree-ssanames.h')
-rw-r--r-- | gcc/tree-ssanames.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/tree-ssanames.h b/gcc/tree-ssanames.h index 8cc3efd..5239bc3 100644 --- a/gcc/tree-ssanames.h +++ b/gcc/tree-ssanames.h @@ -45,6 +45,15 @@ struct GTY(()) ptr_info_def unsigned int misalign; }; +/* Value range information for SSA_NAMEs representing non-pointer variables. */ + +struct GTY (()) range_info_def { + /* Minimum for value range. */ + double_int min; + /* Maximum for value range. */ + double_int max; +}; + #define SSANAMES(fun) (fun)->gimple_df->ssa_names #define MODIFIED_NORETURN_CALLS(fun) (fun)->gimple_df->modified_noreturn_calls @@ -54,6 +63,15 @@ struct GTY(()) ptr_info_def #define ssa_name(i) ((*cfun->gimple_df->ssa_names)[(i)]) +/* Type of value ranges. See value_range_d In tree-vrp.c for a + description of these types. */ +enum value_range_type { VR_UNDEFINED, VR_RANGE, VR_ANTI_RANGE, VR_VARYING }; + +/* Sets the value range to SSA. */ +extern void set_range_info (tree ssa, double_int min, double_int max); +/* Gets the value range from SSA. */ +extern enum value_range_type get_range_info (tree name, double_int *min, + double_int *max); extern void init_ssanames (struct function *, int); extern void fini_ssanames (void); extern void ssanames_print_statistics (void); @@ -71,6 +89,7 @@ extern struct ptr_info_def *get_ptr_info (tree); extern tree copy_ssa_name_fn (struct function *, tree, gimple); extern void duplicate_ssa_name_ptr_info (tree, struct ptr_info_def *); extern tree duplicate_ssa_name_fn (struct function *, tree, gimple); +extern void duplicate_ssa_name_range_info (tree, struct range_info_def *); extern void release_defs (gimple); extern void replace_ssa_name_symbol (tree, tree); |