2008-12-08 Andrew Haley <aph@redhat.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Dec 2008 12:30:24 +0000 (12:30 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Dec 2008 12:30:24 +0000 (12:30 +0000)
            Kamaraju Kusumanchi <raju.mailinglists@gmail.com>

* gimple.h (gimple_build_try): Fix declaration.

* builtins.c (fold_builtin_sqrt): Don't use a conditional
operator.
* fixed-value.c (do_fixed_add): Likewise.
* tree-ssa-loop-ivopts.c (iv_ca_cost): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142549 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/builtins.c
gcc/fixed-value.c
gcc/gimple.h
gcc/tree-ssa-loop-ivopts.c

index ed541f1..353bdd1 100644 (file)
@@ -1,3 +1,13 @@
+2008-12-08  Andrew Haley  <aph@redhat.com>
+            Kamaraju Kusumanchi <raju.mailinglists@gmail.com>
+
+       * gimple.h (gimple_build_try): Fix declaration.
+
+       * builtins.c (fold_builtin_sqrt): Don't use a conditional
+       operator.
+       * fixed-value.c (do_fixed_add): Likewise.
+       * tree-ssa-loop-ivopts.c (iv_ca_cost): Likewise.
+
 2008-12-08  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/36802
index 4d507cf..63ca618 100644 (file)
@@ -7681,8 +7681,11 @@ fold_builtin_sqrt (tree arg, tree type)
          tree arg0 = CALL_EXPR_ARG (arg, 0);
          tree tree_root;
          /* The inner root was either sqrt or cbrt.  */
-         REAL_VALUE_TYPE dconstroot =
-           BUILTIN_SQRT_P (fcode) ? dconsthalf : dconst_third ();
+         REAL_VALUE_TYPE dconstroot;
+         if (BUILTIN_SQRT_P (fcode))
+           dconstroot = dconsthalf;
+         else
+           dconstroot = dconst_third ();
 
          /* Adjust for the outer root.  */
          SET_REAL_EXP (&dconstroot, REAL_EXP (&dconstroot) - 1);
index 8c8d371..26aaa02 100644 (file)
@@ -291,9 +291,17 @@ do_fixed_add (FIXED_VALUE_TYPE *f, const FIXED_VALUE_TYPE *a,
              const FIXED_VALUE_TYPE *b, bool subtract_p, bool sat_p)
 {
   bool overflow_p = false;
-  double_int temp = subtract_p ? double_int_neg (b->data) : b->data;
-  bool unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode);
-  int i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode);
+  bool unsigned_p;
+  double_int temp;
+  int i_f_bits;
+
+  if (subtract_p)
+    temp = double_int_neg (b->data);
+  else
+    temp = b->data;
+
+  unsigned_p = UNSIGNED_FIXED_POINT_MODE_P (a->mode);
+  i_f_bits = GET_MODE_IBIT (a->mode) + GET_MODE_FBIT (a->mode);
   f->mode = a->mode;
   f->data = double_int_add (a->data, temp);
   if (unsigned_p) /* Unsigned type.  */
index debba12..8f8e49b 100644 (file)
@@ -793,7 +793,7 @@ gimple gimple_build_asm_vec (const char *, VEC(tree,gc) *, VEC(tree,gc) *,
                              VEC(tree,gc) *);
 gimple gimple_build_catch (tree, gimple_seq);
 gimple gimple_build_eh_filter (tree, gimple_seq);
-gimple gimple_build_try (gimple_seq, gimple_seq, unsigned int);
+gimple gimple_build_try (gimple_seq, gimple_seq, enum gimple_try_flags);
 gimple gimple_build_wce (gimple_seq);
 gimple gimple_build_resx (int);
 gimple gimple_build_switch (unsigned, tree, tree, ...);
index aa0472e..0059443 100644 (file)
@@ -4355,7 +4355,10 @@ iv_ca_add_use (struct ivopts_data *data, struct iv_ca *ivs,
 static comp_cost
 iv_ca_cost (struct iv_ca *ivs)
 {
-  return (ivs->bad_uses ? infinite_cost : ivs->cost);
+  if (ivs->bad_uses)
+    return infinite_cost;
+  else
+    return ivs->cost;
 }
 
 /* Returns true if all dependences of CP are among invariants in IVS.  */