summaryrefslogtreecommitdiff
path: root/gcc/tree-ssanames.h
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-31 13:55:31 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-31 13:55:31 +0000
commitfc08b993096e47f63278b70ea0df4e3ae54115cc (patch)
tree3f7b240bb836007eb44a47aff2ecae17e1a2a5ef /gcc/tree-ssanames.h
parentd9d5743f8314772cdcf12e934ba58543c0d85a79 (diff)
downloadgcc-fc08b993096e47f63278b70ea0df4e3ae54115cc.tar.gz
* gimple-pretty-print.c (dump_ssaname_info): Print newline also
in case of VR_VARYING. Print get_nonzero_bits if not all ones. * tree-ssanames.h (struct range_info_def): Add nonzero_bits field. (set_nonzero_bits, get_nonzero_bits): New prototypes. * tree-ssa-ccp.c (get_default_value): Use get_range_info to see if a default def isn't partially constant. (ccp_finalize): If after IPA, set_range_info if integral SSA_NAME is known to be partially zero. (evaluate_stmt): If we'd return otherwise VARYING, use get_range_info to see if a default def isn't partially constant. * tree-ssanames.c (set_range_info): Initialize nonzero_bits upon creation of a range, if VR_RANGE, try to improve nonzero_bits from the range. (set_nonzero_bits, get_nonzero_bits): New functions. * g++.dg/warn/pr33738.C (main): Initialize a2 again to make sure we warn about it already during VRP1 pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204256 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssanames.h')
-rw-r--r--gcc/tree-ssanames.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-ssanames.h b/gcc/tree-ssanames.h
index f80e0b2ce33..1d02d966fd7 100644
--- a/gcc/tree-ssanames.h
+++ b/gcc/tree-ssanames.h
@@ -52,6 +52,8 @@ struct GTY (()) range_info_def {
double_int min;
/* Maximum for value range. */
double_int max;
+ /* Non-zero bits - bits not set are guaranteed to be always zero. */
+ double_int nonzero_bits;
};
@@ -68,10 +70,11 @@ struct GTY (()) range_info_def {
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);
+extern void set_range_info (tree, double_int, double_int);
/* Gets the value range from SSA. */
-extern enum value_range_type get_range_info (tree name, double_int *min,
- double_int *max);
+extern enum value_range_type get_range_info (tree, double_int *, double_int *);
+extern void set_nonzero_bits (tree, double_int);
+extern double_int get_nonzero_bits (tree);
extern void init_ssanames (struct function *, int);
extern void fini_ssanames (void);
extern void ssanames_print_statistics (void);