gimple.h (gimple_build_try): Fix declaration.

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.


Co-Authored-By: Kamaraju Kusumanchi <raju.mailinglists@gmail.com>

From-SVN: r142549
This commit is contained in:
Andrew Haley 2008-12-08 12:30:24 +00:00 committed by Andrew Haley
parent a5d137be06
commit cb4ad1803b
5 changed files with 31 additions and 7 deletions

View 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

View 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);

View 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. */

View 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, ...);

View 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. */