Commit 5906d013 by Eric Christopher

builtins.c (expand_builtin_cabs): Delete.

2004-09-02  Eric Christopher  <echristo@redhat.com>

	* builtins.c (expand_builtin_cabs): Delete.
	(expand_builtin): If unable to fold the values do a normal
	library call for builtin_cab*.
	(fold_builtin_cabs): Depend on optimize and optimize_size.
	* optabs.c (expand_cmplxdiv_straight): Delete.
	(expand_cmplxdiv_wide): Ditto.
	(expand_vector_binop): Ditto.
	(expand_vector_unop): Ditto.
	(expand_complex_abs): Delete.
	(expand_binop): Remove calls to above functions.
	Remove open coding of complex arithmetic.
	(expand_unop): Ditto.
	* optabs.h: Remove prototypes.

From-SVN: r87000
parent 3041390d
2004-09-02 Eric Christopher <echristo@redhat.com>
* builtins.c (expand_builtin_cabs): Delete.
(expand_builtin): If unable to fold the values do a normal
library call for builtin_cab*.
(fold_builtin_cabs): Depend on optimize and optimize_size.
* optabs.c (expand_cmplxdiv_straight): Delete.
(expand_cmplxdiv_wide): Ditto.
(expand_vector_binop): Ditto.
(expand_vector_unop): Ditto.
(expand_complex_abs): Delete.
(expand_binop): Remove calls to above functions.
Remove open coding of complex arithmetic.
(expand_unop): Ditto.
* optabs.h: Remove prototypes.
2004-09-02 Ziemowit Laski <zlaski@apple.com> 2004-09-02 Ziemowit Laski <zlaski@apple.com>
* c-decl.c (store_parm_decls_newstyle): Make externally visible. * c-decl.c (store_parm_decls_newstyle): Make externally visible.
......
...@@ -145,7 +145,6 @@ static bool integer_valued_real_p (tree); ...@@ -145,7 +145,6 @@ static bool integer_valued_real_p (tree);
static tree fold_trunc_transparent_mathfn (tree); static tree fold_trunc_transparent_mathfn (tree);
static bool readonly_data_expr (tree); static bool readonly_data_expr (tree);
static rtx expand_builtin_fabs (tree, rtx, rtx); static rtx expand_builtin_fabs (tree, rtx, rtx);
static rtx expand_builtin_cabs (tree, rtx);
static rtx expand_builtin_signbit (tree, rtx); static rtx expand_builtin_signbit (tree, rtx);
static tree fold_builtin_cabs (tree, tree); static tree fold_builtin_cabs (tree, tree);
static tree fold_builtin_trunc (tree); static tree fold_builtin_trunc (tree);
...@@ -4897,30 +4896,6 @@ expand_builtin_fabs (tree arglist, rtx target, rtx subtarget) ...@@ -4897,30 +4896,6 @@ expand_builtin_fabs (tree arglist, rtx target, rtx subtarget)
return expand_abs (mode, op0, target, 0, safe_from_p (target, arg, 1)); return expand_abs (mode, op0, target, 0, safe_from_p (target, arg, 1));
} }
/* Expand a call to cabs, cabsf or cabsl with arguments ARGLIST.
Return 0 if a normal call should be emitted rather than expanding
the function inline. If convenient, the result should be placed
in target. */
static rtx
expand_builtin_cabs (tree arglist, rtx target)
{
enum machine_mode mode;
tree arg;
rtx op0;
if (arglist == 0 || TREE_CHAIN (arglist))
return 0;
arg = TREE_VALUE (arglist);
if (TREE_CODE (TREE_TYPE (arg)) != COMPLEX_TYPE
|| TREE_CODE (TREE_TYPE (TREE_TYPE (arg))) != REAL_TYPE)
return 0;
mode = TYPE_MODE (TREE_TYPE (arg));
op0 = expand_expr (arg, NULL_RTX, VOIDmode, 0);
return expand_complex_abs (mode, op0, target, 0);
}
/* Create a new constant string literal and return a char* pointer to it. /* Create a new constant string literal and return a char* pointer to it.
The STRING_CST value is the LEN characters at STR. */ The STRING_CST value is the LEN characters at STR. */
static tree static tree
...@@ -5550,15 +5525,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode, ...@@ -5550,15 +5525,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
return target; return target;
break; break;
/* Just do a normal library call if we were unable to fold
the values. */
case BUILT_IN_CABS: case BUILT_IN_CABS:
case BUILT_IN_CABSF: case BUILT_IN_CABSF:
case BUILT_IN_CABSL: case BUILT_IN_CABSL:
if (flag_unsafe_math_optimizations)
{
target = expand_builtin_cabs (arglist, target);
if (target)
return target;
}
break; break;
case BUILT_IN_EXP: case BUILT_IN_EXP:
...@@ -6518,7 +6489,9 @@ fold_builtin_cabs (tree arglist, tree type) ...@@ -6518,7 +6489,9 @@ fold_builtin_cabs (tree arglist, tree type)
&& real_zerop (TREE_OPERAND (arg, 1))) && real_zerop (TREE_OPERAND (arg, 1)))
return fold (build1 (ABS_EXPR, type, TREE_OPERAND (arg, 0))); return fold (build1 (ABS_EXPR, type, TREE_OPERAND (arg, 0)));
if (flag_unsafe_math_optimizations) /* Don't do this when optimizing for size. */
if (flag_unsafe_math_optimizations
&& optimize && !optimize_size)
{ {
tree sqrtfn = mathfn_built_in (type, BUILT_IN_SQRT); tree sqrtfn = mathfn_built_in (type, BUILT_IN_SQRT);
......
...@@ -429,9 +429,6 @@ extern rtx expand_unop (enum machine_mode, optab, rtx, rtx, int); ...@@ -429,9 +429,6 @@ extern rtx expand_unop (enum machine_mode, optab, rtx, rtx, int);
extern rtx expand_abs_nojump (enum machine_mode, rtx, rtx, int); extern rtx expand_abs_nojump (enum machine_mode, rtx, rtx, int);
extern rtx expand_abs (enum machine_mode, rtx, rtx, int, int); extern rtx expand_abs (enum machine_mode, rtx, rtx, int, int);
/* Expand the complex absolute value operation. */
extern rtx expand_complex_abs (enum machine_mode, rtx, rtx, int);
/* Generate an instruction with a given INSN_CODE with an output and /* Generate an instruction with a given INSN_CODE with an output and
an input. */ an input. */
extern void emit_unop_insn (int, rtx, rtx, enum rtx_code); extern void emit_unop_insn (int, rtx, rtx, enum rtx_code);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment