summaryrefslogtreecommitdiff
path: root/gcc/double-int.h
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-03 11:09:59 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-03 11:09:59 +0000
commit9a8b9e265b9d0df37bb0cead795c30a01d9da22f (patch)
tree7d533f06f94bafb5dd09f062d0ef17a1ab83a989 /gcc/double-int.h
parent91b3c1af6b0d2b459e8a4aaba23680852dbfdb59 (diff)
downloadgcc-9a8b9e265b9d0df37bb0cead795c30a01d9da22f.tar.gz
2013-05-03 Richard Biener <rguenther@suse.de>
* double-int.h (lshift): New overload without precision and arith argument. (operator *=, operator +=, operator -=): Move ... * double-int.c (operator *=, operator +=, operator -=): ... here and implement more efficiently. (mul_double_with_sign): Remove. (lshift_double): Adjust to take unsinged shift argument, push dispatching code to callers. (mul_double_wide_with_sign): Add early out for callers that are not interested in high parts or overflow. (lshift): New function. (lshift, rshift, alshift, arshift, llshift, lrshift): Add dispatch code here. (lrotate, rrotate): Use logical shifts. * expr.c (get_inner_reference): Use lshift. * fixed-value.c (do_fixed_divide): Likewise. * tree-dfa.c (get_ref_base_and_extent): Likewise. * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise. (indirect_refs_may_alias_p): Likewise. (stmt_kills_ref_p_1): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198576 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/double-int.h')
-rw-r--r--gcc/double-int.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/gcc/double-int.h b/gcc/double-int.h
index 5c425a84a45..39929d2b5bf 100644
--- a/gcc/double-int.h
+++ b/gcc/double-int.h
@@ -128,6 +128,7 @@ struct double_int
double_int operator ^ (double_int) const;
double_int and_not (double_int) const;
+ double_int lshift (HOST_WIDE_INT count) const;
double_int lshift (HOST_WIDE_INT count, unsigned int prec, bool arith) const;
double_int rshift (HOST_WIDE_INT count, unsigned int prec, bool arith) const;
double_int alshift (HOST_WIDE_INT count, unsigned int prec) const;
@@ -258,27 +259,6 @@ double_int::operator -- ()
}
inline double_int &
-double_int::operator *= (double_int b)
-{
- *this = *this * b;
- return *this;
-}
-
-inline double_int &
-double_int::operator += (double_int b)
-{
- *this = *this + b;
- return *this;
-}
-
-inline double_int &
-double_int::operator -= (double_int b)
-{
- *this = *this - b;
- return *this;
-}
-
-inline double_int &
double_int::operator &= (double_int b)
{
*this = *this & b;