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
This commit is contained in:
Eric Christopher 2004-09-02 23:22:12 +00:00
parent 3041390da7
commit 5906d01335
4 changed files with 78 additions and 1194 deletions

View file

@ -1,3 +1,19 @@
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>
* c-decl.c (store_parm_decls_newstyle): Make externally visible.
@ -133,7 +149,7 @@
(struct algorithm): Change type of cost field to be mult_cost.
(synth_mult): Change type of cost_limit argument to be a
pointer to a mult_cost. Update all cost comparisons to use the
new mult_cost infrastructure. For alg_add_factor and
new mult_cost infrastructure. For alg_add_factor and
alg_sub_factor operations, latency is lower than the rtx_cost.
(choose_mult_variant): Update calls to synth_mult. Perform
cost comparisons using the new mult_cost infrastructure.
@ -343,7 +359,7 @@
* config/arm/arm.c (arm_cxx_export_class_data): New function.
(TARGET_CXX_EXPORT_CLASS_DATA): Use it.
* doc/tm.texi (TARGET_CXX_EXPORT_CLASS_DATA): Document it.
2004-08-31 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (output_branch): Check the insn length possibly
@ -384,7 +400,7 @@
(TARGET_CXX_KEY_METHOD_MAY_BE_INLINE): New macro.
* config/arm/bpabi.h: Use __THUMB_INTERWORK__ instead of
__THUMB_INTERWORK.
2004-08-31 Denis Chertykov <denisc@overta.ru>
PR target/15417
@ -401,7 +417,7 @@
* config/darwin.c (darwin_make_decl_one_only): Allocate section
names once per compilation, instead of once per symbol.
2004-08-31 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (build_subdir): New substitution.
@ -420,7 +436,7 @@
* fixinc.in: New, from fixinc/fixincl.sh.
* fixinc/*: Removed.
2004-08-31 Joseph S. Myers <jsm@polyomino.org.uk>
* attribs.c (strip_attrs): Remove.
@ -450,12 +466,12 @@
2004-08-30 Andrew Pinski <apinski@apple.com>
* hard-reg-set.h:
* hard-reg-set.h:
s/HOST_BITS_PER_WIDES_FAST_INT/HOST_BITS_PER_WIDEST_FAST_INT.
* ChangeLog: Fix previous ChangeLog entry.
PR rtl-opt/13987
* config.host (use_long_long_for_widest_fast_int): New, default is
* config.host (use_long_long_for_widest_fast_int): New, default is
off.
(ia64-*-hpux*): Enable use_long_long_for_widest_fast_int.
* configure.ac: If use_long_long_for_widest_fast_int, then
@ -468,7 +484,7 @@
* sbitmap.h (SBITMAP_ELT_BITS): Define based on
HOST_BITS_PER_WIDEST_FAST_INT.
(SBITMAP_ELT_TYPE): Define based on HOST_WIDEST_FAST_INT.
* hard-reg-set.h (HARD_REG_ELT_TYPE): Define based on
* hard-reg-set.h (HARD_REG_ELT_TYPE): Define based on
HOST_WIDEST_FAST_INT
instead of HOST_WIDE_INT.
(HARD_REG_SET_LONGS): Likewise.
@ -515,7 +531,7 @@
2004-08-30 Richard Henderson <rth@redhat.com>
* c-typeck.c (build_unary_op): Don't expand ADDR_EXPR of a
* c-typeck.c (build_unary_op): Don't expand ADDR_EXPR of a
COMPONENT_REF to pointer arithmetic.
* varasm.c (initializer_constant_valid_p): Allow "&(*c).f", for
constant "c" as a valid constant initializer. Allow narrowing of
@ -769,7 +785,7 @@
2004-08-29 Chao-ying Fu <fu@mips.com>
James E Wilson <wilson@specifixinc.com>
* config/mips/mips-modes.def (V2SF, CCV2, CCV4): New modes. Give CCV2
8 byte size and alignment. Give CCV4 16 byte size and alignment.
* config/mips/mips-ps-3d.md: New file.
@ -811,7 +827,7 @@
(enum mips_builtins): New for MIPS builtin functions.
(enum mips_function_type): New for the types of MIPS builtin functions.
(enum mips_cmp_choice): New for the MIPS comparison builtin functions.
* config/mips/mips.md: New constants for paired single and MIPS-3D
* config/mips/mips.md: New constants for paired single and MIPS-3D
instructions. Include the new mips-ps-3d.md file.
(addv2sf3, subv2sf3, mulv2sf3, absv2sf2, negv2sf2, movv2sf,
movv2sf_hardfloat_64bit): New named patterns.
@ -976,7 +992,7 @@
2004-08-26 Fariborz Jahanian <fjahanian@apple.com>
* config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Added
* config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Added
TFmode as additional register mode cloberred by call.
2004-08-26 Fariborz Jahanian <fjahanian@apple.com>
@ -997,7 +1013,7 @@
target mode.
* config/rs6000/rs6000.md (movdi_update): Changed to movdi_<mode>_update,
to generate two versions.
2004-08-26 Daniel Berlin <dberlin@dberlin.org>
* Makefile.in (lambda-code.o): New.
@ -1016,11 +1032,11 @@
* lambda-mat.c: Include tree.h
2004-08-26 Daniel Berlin <dberlin@dberlin.org>
Sebastian Pop <pop@cri.ensmp.fr>
* tree-data-ref.h: Include lambda.h
Sebastian Pop <pop@cri.ensmp.fr>
* tree-data-ref.h: Include lambda.h
(free_dependence_relation): Declared here.
(free_dependence_relations): Ditto.
(free_dependence_relations): Ditto.
(free_data_refs): Ditto.
* tree-data-ref.c (free_dependence_relation): New function.
(free_dependence_relations): Ditto.
@ -1038,7 +1054,7 @@
and classic_dist vectors.
(analyze_all_data_dependences): Adjusted for using the new interface of
compute_data_dependences_for_loop. Remove the statistics dump.
2004-08-26 Bob Wilson <bob.wilson@acm.org>
* config/xtensa/xtensa.c (xtensa_ld_opcodes, xtensa_st_opcodes): Delete.
@ -1064,7 +1080,7 @@
if the constant satisfies add_operand.
2004-08-25 Richard Henderson <rth@redhat.com>
PR debug/10695
* config/alpha/alpha.c (emit_frame_store_1, emit_frame_store): New.
(alpha_expand_prologue): Handle >32-bit frames. Generate proper
@ -1134,7 +1150,7 @@
(FOR_EACH_SSA_USE_OPERAND): New. Iterate over operands as uses.
(FOR_EACH_SSA_DEF_OPERAND): New. Iterate over operands as defs.
(FOR_EACH_SSA_MAYDEF_OPERAND): New. Iterate over V_MAY_DEFs.
* tree-ssa-operands.c (NULL_DEF_OPERAND_P, NULL_USE_OPERAND_P): New.
* tree-ssa-operands.c (NULL_DEF_OPERAND_P, NULL_USE_OPERAND_P): New.
Empty operand pointers.
* tree-flow-inline.h (op_iter_done): New. Return true if finished.
(op_iter_next_use): New. Return next use_operand_p.
@ -1145,10 +1161,10 @@
(op_iter_init_def): New. Initialize structure and get the first def.
(op_iter_init_tree): New. Initialize structure and get the first tree.
(op_iter_next_maydef): New. Return next V_MAY_DEF operands.
(op_iter_init_maydef): New. Initialize structure and get the first
(op_iter_init_maydef): New. Initialize structure and get the first
V_MAY_DEF operands.
* tree-cfg.c (tree_duplicate_bb): Use new operand iterator.
* tree-dfa.c (compute_immediate_uses_for_stmt,
* tree-dfa.c (compute_immediate_uses_for_stmt,
redirect_immediate_uses): Use new operand iterator.
(v_may_defs_disappeared_p, v_must_defs_disappeared_p): Delete.
(mark_new_vars_to_rename): Use new operand iterator. Count virtual
@ -1159,12 +1175,12 @@
rewrite_trees): Use new operand iterator.
* tree-pretty-print.c (dump_vops): Use new operand iterator.
* tree-sra.c (mark_all_v_defs): Use new operand iterator.
* tree-ssa-alias.c (compute_points_to_and_addr_escape,
* tree-ssa-alias.c (compute_points_to_and_addr_escape,
dump_points_to_info): Use new operand iterator.
* tree-ssa-ccp.c (cp_lattice_meet, visit_stmt, initialize,
replace_uses_in, replace_vuse_in, likely_value, set_rhs): Use new
* tree-ssa-ccp.c (cp_lattice_meet, visit_stmt, initialize,
replace_uses_in, replace_vuse_in, likely_value, set_rhs): Use new
operand iterator.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary,
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary,
propagate_necessity): Use new operand iterator.
* tree-ssa-dom.c (cprop_into_stmt, optimize_stmt): Use operand iterator.
(register_definitions_for_stmt): Use new operand iterator. Take stmt as
@ -1173,7 +1189,7 @@
build_tree_conflict_graph): Use new operand iterator.
* tree-ssa-loop-im.c (determine_max_movement, single_reachable_address,
rewrite_mem_refs): Use new operand iterator.
* tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
* tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
check_loop_closed_ssa_use): Use new operand iterator.
* tree-ssa.c (verify_ssa, replace_immediate_uses): Use operand iterator.
* tree-ssanames.c (release_defs): Use new operand iterator.
@ -1203,19 +1219,19 @@
to comments at start of function.
* cfgbuild.c (make_edges): Add more details to hot/cold partitioning
comment.
* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
merge_blocks_move_predecessor_nojumps,
merge_blocks_move_successor_nojumps, merge_blocks_move,
* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
merge_blocks_move_predecessor_nojumps,
merge_blocks_move_successor_nojumps, merge_blocks_move,
try_crossjump_to_edge, try_crossjump_bb): Likewise.
* cfglayout.c (fixup_reorder_chain): Likewise.
* cfgrtl.c (rtl_can_merge_blocks, try_redirect_by_replacing_jump,
cfg_layout_can_merge_blocks_p): Likewise.
* ifcvt.c (find_if_case_1, find_if_case_2): Likewise.
* passes.c (rest_of_compilation): Update comments for calling
* passes.c (rest_of_compilation): Update comments for calling
optimization that partitions hot/cold basic blocks.
* doc/invoke.texi: Update documentation of
* doc/invoke.texi: Update documentation of
freorder-blocks-and-partition flag.
2004-08-25 Richard Sandiford <rsandifo@redhat.com>
* config/mips/mips.md (reg): Renamed mode attribute from ccreg.
@ -1246,7 +1262,7 @@
PR libstdc++/17005 (fix for HP-UX 11.11)
* config.gcc (hppa*-*-*): Move MASK_BIG_SWITCH to target_cpu_default2.
(hppa*-*-hpux*): Consolidate hppa1.0-*-* code. Rework handling of
tm_file including pa-hpux1010.h or pa-hpux1111.h when appropriate.
tm_file including pa-hpux1010.h or pa-hpux1111.h when appropriate.
* config/pa/pa-hpux1010.h, config/pa/pa-hpux1111.h: New files.
* config/pa/pa-hpux.h (TARGET_HPUX): Define.
(LINK_SPEC): Handle march=1.0 option.
@ -1377,7 +1393,7 @@
Likewise.
* config/xtensa/xtensa.c (xtensa_va_start,
xtensa_gimplify_va_arg_expr): Likewise.
* objc/objc-act.c (build_objc_string_object,
build_objc_symtab_template, init_def_list, init_objc_symtab,
init_module_descriptor, generate_static_references,

View file

@ -145,7 +145,6 @@ static bool integer_valued_real_p (tree);
static tree fold_trunc_transparent_mathfn (tree);
static bool readonly_data_expr (tree);
static rtx expand_builtin_fabs (tree, rtx, rtx);
static rtx expand_builtin_cabs (tree, rtx);
static rtx expand_builtin_signbit (tree, rtx);
static tree fold_builtin_cabs (tree, tree);
static tree fold_builtin_trunc (tree);
@ -377,7 +376,7 @@ c_readstr (const char *str, enum machine_mode mode)
unsigned int i, j;
gcc_assert (GET_MODE_CLASS (mode) == MODE_INT);
c[0] = 0;
c[1] = 0;
ch = 1;
@ -391,7 +390,7 @@ c_readstr (const char *str, enum machine_mode mode)
j = j + UNITS_PER_WORD - 2 * (j % UNITS_PER_WORD) - 1;
j *= BITS_PER_UNIT;
gcc_assert (j <= 2 * HOST_BITS_PER_WIDE_INT);
if (ch)
ch = (unsigned char) str[i];
c[j / HOST_BITS_PER_WIDE_INT] |= ch << (j % HOST_BITS_PER_WIDE_INT);
@ -758,7 +757,7 @@ expand_builtin_longjmp (rtx buf_addr, rtx value)
for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
{
gcc_assert (insn != last);
if (JUMP_P (insn))
{
REG_NOTES (insn) = alloc_EXPR_LIST (REG_NON_LOCAL_GOTO, const0_rtx,
@ -1358,7 +1357,7 @@ expand_builtin_apply (rtx function, rtx arguments, rtx argsize)
if ((mode = apply_result_mode[regno]) != VOIDmode)
{
gcc_assert (!valreg); /* HAVE_untyped_call required. */
valreg = gen_rtx_REG (mode, regno);
}
@ -2030,7 +2029,7 @@ expand_builtin_mathfn_3 (tree exp, rtx target, rtx subtarget)
if (builtin_optab == sincos_optab)
{
int result;
switch (DECL_FUNCTION_CODE (fndecl))
{
case BUILT_IN_SIN:
@ -4620,7 +4619,7 @@ expand_builtin_unop (enum machine_mode target_mode, tree arglist, rtx target,
target = expand_unop (TYPE_MODE (TREE_TYPE (TREE_VALUE (arglist))),
op_optab, op0, target, 1);
gcc_assert (target);
return convert_to_mode (target_mode, target, 0);
}
@ -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));
}
/* 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.
The STRING_CST value is the LEN characters at STR. */
static tree
@ -5550,15 +5525,11 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
return target;
break;
/* Just do a normal library call if we were unable to fold
the values. */
case BUILT_IN_CABS:
case BUILT_IN_CABSF:
case BUILT_IN_CABSL:
if (flag_unsafe_math_optimizations)
{
target = expand_builtin_cabs (arglist, target);
if (target)
return target;
}
break;
case BUILT_IN_EXP:
@ -6518,7 +6489,9 @@ fold_builtin_cabs (tree arglist, tree type)
&& real_zerop (TREE_OPERAND (arg, 1)))
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);

File diff suppressed because it is too large Load diff

View file

@ -419,7 +419,7 @@ extern int expand_twoval_binop (optab, rtx, rtx, rtx, rtx, int);
/* Generate code to perform an operation on two operands with two
results, using a library function. */
extern bool expand_twoval_binop_libfunc (optab, rtx, rtx, rtx, rtx,
extern bool expand_twoval_binop_libfunc (optab, rtx, rtx, rtx, rtx,
enum rtx_code);
/* Expand a unary arithmetic operation given optab rtx operand. */
@ -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 (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
an input. */
extern void emit_unop_insn (int, rtx, rtx, enum rtx_code);