diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-06 13:08:06 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-06 13:08:06 +0000 |
commit | 4a8f88ff0c38b6acf5d0c6d5c43c5a6071eeb2ff (patch) | |
tree | 053822df465eb3c1f6c53f1d007303a4f3ddaef0 /gcc/tree.c | |
parent | fc3eff8854861fcd70d33d26095b17fe456fae31 (diff) | |
download | gcc-4a8f88ff0c38b6acf5d0c6d5c43c5a6071eeb2ff.tar.gz |
2013-11-06 Richard Biener <rguenther@suse.de>
* tree.c (drop_tree_overflow): New function.
* tree.h (drop_tree_overflow): Declare.
* gimplify.c (gimplify_expr): Drop TREE_OVERFLOW.
* tree-vrp.c (range_int_cst_singleton_p): Use
is_overflow_infinity instead of testing TREE_OVERFLOW.
(extract_range_from_assert): Likewise.
(zero_nonzero_bits_from_vr): Likewise.
(extract_range_basic): Likewise.
(register_new_assert_for): Use drop_tree_overflow.
(vrp_visit_phi_node): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204454 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index e0e9d8d4f36..98896f82e81 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -12542,4 +12542,23 @@ get_tree_code_name (enum tree_code code) return tree_code_name[code]; } +/* Drops the TREE_OVERFLOW flag from T. */ + +tree +drop_tree_overflow (tree t) +{ + gcc_checking_assert (TREE_OVERFLOW (t)); + + /* For tree codes with a sharing machinery re-build the result. */ + if (TREE_CODE (t) == INTEGER_CST) + return build_int_cst_wide (TREE_TYPE (t), + TREE_INT_CST_LOW (t), TREE_INT_CST_HIGH (t)); + + /* Otherwise, as all tcc_constants are possibly shared, copy the node + and drop the flag. */ + t = copy_node (t); + TREE_OVERFLOW (t) = 0; + return t; +} + #include "gt-tree.h" |