]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Make more use of references.
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Nov 2013 10:11:17 +0000 (10:11 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 10 Nov 2013 10:11:17 +0000 (10:11 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@204627 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fold-const.c
gcc/tree-ssanames.c
gcc/tree-ssanames.h

index 45a24e31c75e0c7e37a60bb84525e77782e1c341..39276a6121ce8a70b0a721d5295105ebadccd834 100644 (file)
@@ -9900,7 +9900,7 @@ exact_inverse (tree type, tree cst)
 /*  Mask out the tz least significant bits of X of type TYPE where
     tz is the number of trailing zeroes in Y.  */
 static wide_int
-mask_with_tz (tree type, wide_int x, wide_int y)
+mask_with_tz (tree type, const wide_int &x, const wide_int &y)
 {
   int tz = wi::ctz (y);
   if (tz > 0)
index 2c177eeaec8affbffde0db9a5be13d2a12b0170a..6e887aaad664a2661770ea31782379572131d402 100644 (file)
@@ -179,7 +179,7 @@ make_ssa_name_fn (struct function *fn, tree var, gimple stmt)
 /* Store range information MIN, and MAX to tree ssa_name NAME.  */
 
 void
-set_range_info (tree name, widest_int min, widest_int max)
+set_range_info (tree name, const widest_int &min, const widest_int &max)
 {
   gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name)));
   range_info_def *ri = SSA_NAME_RANGE_INFO (name);
@@ -201,16 +201,15 @@ set_range_info (tree name, widest_int min, widest_int max)
   if (wi::cmp (min, max, TYPE_SIGN (TREE_TYPE (name))) != 1)
     {
       int prec = TYPE_PRECISION (TREE_TYPE (name));
-      widest_int xorv;
 
-      min = wi::zext (min, prec);
-      max = wi::zext (max, prec);
-      xorv = min ^ max;
+      widest_int ext_min = wi::zext (min, prec);
+      widest_int ext_max = wi::zext (max, prec);
+      widest_int xorv = ext_min ^ ext_max;
       if (xorv != 0)
        xorv = wi::mask <widest_int> (MAX_BITSIZE_MODE_ANY_INT
                                      - wi::clz (xorv),
                                      false);
-      ri->nonzero_bits = ri->nonzero_bits & (min | xorv);
+      ri->nonzero_bits = ri->nonzero_bits & (ext_min | xorv);
     }
 }
 
@@ -254,7 +253,7 @@ get_range_info (const_tree name, widest_int *min, widest_int *max)
 /* Change non-zero bits bitmask of NAME.  */
 
 void
-set_nonzero_bits (tree name, widest_int mask)
+set_nonzero_bits (tree name, const widest_int &mask)
 {
   gcc_assert (!POINTER_TYPE_P (TREE_TYPE (name)));
   if (SSA_NAME_RANGE_INFO (name) == NULL)
index cafcd7c482af0b904616f877c4b6fc18fa63c64d..2ac7744dfc9ebef34fcf51b55618a658406513ab 100644 (file)
@@ -70,11 +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, widest_int, widest_int);
+extern void set_range_info (tree, const widest_int &, const widest_int &);
 /* Gets the value range from SSA.  */
 extern enum value_range_type get_range_info (const_tree, widest_int *,
                                             widest_int *);
-extern void set_nonzero_bits (tree, widest_int);
+extern void set_nonzero_bits (tree, const widest_int &);
 extern widest_int get_nonzero_bits (const_tree);
 extern void init_ssanames (struct function *, int);
 extern void fini_ssanames (void);