summaryrefslogtreecommitdiff
path: root/gcc/fold-const.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-26 14:39:43 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-26 14:39:43 +0000
commit6d31c916e0682010ba9a3d2c1c7647201c28883c (patch)
tree8513d233a582b2c8a38f6db93929f5a48aaf43a8 /gcc/fold-const.h
parent13a78ad1136316949733262f5370a346394be242 (diff)
downloadgcc-6d31c916e0682010ba9a3d2c1c7647201c28883c.tar.gz
2014-11-26 Richard Biener <rguenther@suse.de>
* fold-const.h (const_unop): Declare. (const_binop): Likewise. * fold-const.c (const_binop): Export overload that expects a type parameter and dispatches to fold_relational_const as well. Check both operand kinds for guarding the transforms. (const_unop): New function, with constant folding from fold_unary_loc. (fold_unary_loc): Dispatch to const_unop for tcc_constant operand. Remove constant folding done there from the simplifications. (fold_binary_loc): Check for constants using CONSTANT_CLASS_P. (fold_negate_expr): Remove dead code from the REAL_CST case. Avoid building garbage in the COMPLEX_CST case. * gimple-match-head.c (gimple_resimplify1): Dispatch to const_unop. (gimple_resimplify2): Dispatch to const_binop. (gimple_simplify): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218086 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.h')
-rw-r--r--gcc/fold-const.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/fold-const.h b/gcc/fold-const.h
index 09ece6735c7..31c5984ae65 100644
--- a/gcc/fold-const.h
+++ b/gcc/fold-const.h
@@ -169,5 +169,7 @@ extern bool merge_ranges (int *, tree *, tree *, int, tree, tree, int,
tree, tree);
extern tree sign_bit_p (tree, const_tree);
extern tree exact_inverse (tree, tree);
+extern tree const_unop (enum tree_code, tree, tree);
+extern tree const_binop (enum tree_code, tree, tree, tree);
#endif // GCC_FOLD_CONST_H