Age | Commit message (Collapse) | Author | Files | Lines |
|
* optabs.c (expand_sync_operation): Use plus insn if minus
CONST_INT_P(val).
(expand_sync_fetch_operation): Ditto.
From-SVN: r128322
|
|
* optabs.c (sign_expand_binop): Set libcall_gen = NULL in the fake
signed optab.
From-SVN: r128288
|
|
gcc/ada/
Reapply reverted change:
2007-09-06 Eric Botcazou <ebotcazou@adacore.com>
* trans.c (convert_with_check): Update call to real_2expN.
gcc/
config/m68k/m68k.c (floating_exact_log2): Update call to real_2expN.
config/s390/s390.md (fixuns_trunc<BFP:mode><GPR:mode>2): Ditto.
Reapply reverted changes:
2007-09-06 Jan Hubicka <jh@suse.cz>
* config/i386.c (ix86_expand_lround, ix86_expand_round): Update call of
real_2expN.
2007-09-06 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
(fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
2007-09-05 Janis Johnson <janis187@us.ibm.com>
* optabs.c (expand_float): Convert unsigned integer as signed only
if it provides sufficient accuracy; add mode argument to real_2expN.
(expand_fix): Fix comment typos; extend binary float into mode
wider than destination for converion to unsigned integer; add mode
argument to real_2expN.
* real.c (real_2expN): Add mode argument to special-case decimal
float values.
* real.h (real_2expN): Ditto.
* fixed-value.c (check_real_for_fixed_mode): Add mode argument to
real_2expN.
(fixed_from_string): Ditto.
(fixed_to_decimal): Ditto.
(fixed_convert_from_real): Ditto.
(real_convert_from_fixed): Ditto.
* config/rs6000/rs6000.md (FP): Include DD and TD modes.
* config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
From-SVN: r128247
|
|
* ginclude/stdfix.h: New file.
* Makefile.in (USER_H): Add $(srcdir)/ginclude/stdfix.h.
(convert.o): Add dependence on fixed-value.h.
* c-convert.c (convert): Support FIXED_POINT_TYPE.
* c-cppbuiltin.c (builtin_define_fixed_point_constants): New function
to define fixed-point constants.
(c_cpp_builtins): Define fixed-point constants.
* convert.c (fixed-value.h): New include.
(convert_to_real): Update comment to include fixed-point.
Support FIXED_POINT_TYPE.
(convert_to_integer): Update comment to include fixed-point.
Support FIXED_POINT_TYPE.
(convert_to_complex): Support FIXED_POINT_TYPE.
(convert_to_fixed): New function.
* convert.h (convert_to_fixed): Declare.
* genopinit.c: Add comment about $Q for only fixed-point modes.
(optabs): Add fract_optab, fractuns_optab, satfract_optab,
satfractuns_optab, add_optab, ssadd_optab, usadd_optab, sub_optab,
sssub_optab, ussub_optab, smul_optab, ssmul_optab, usmul_optab,
ssmadd_widen_optab, usmadd_widen_optab, ssdiv_optab, udiv_optab,
usdiv_optab, ssashl_optab, usashl_optab, neg_optab, ssneg_optab,
usneg_optab for fixed-point modes.
(gen_insn): Add force_fixed to track the $Q format for all fixed-point
modes.
* optabs.c (optab_for_tree_code): For *DIV_EXPR, LSHIFT_EXPR,
PLUS_EXPR, MINUS_EXPR, MULT_EXPR, NEGATE_EXPR, return signed or
unsigned saturation optabs, when type is saturating.
(shift_optab_p): Return true for SS_ASHIFT or US_ASHIFT.
(expand_fixed_convert): New function.
(gen_fixed_libfunc, gen_signed_fixed_libfunc,
gen_unsigned_fixed_libfunc, gen_int_fp_fixed_libfunc,
gen_int_fp_signed_fixed_libfunc, gen_int_fixed_libfunc,
gen_int_signed_fixed_libfunc, gen_int_unsigned_fixed_libfunc,
gen_fract_conv_libfunc, gen_fractuns_conv_libfunc,
gen_satfract_conv_libfunc, gen_satfractuns_conv_libfunc): New
functions.
(init_optabs): Initialize ssadd_optab, usadd_optab, sssub_optab,
ussub_optab, ssmul_optab, usmul_optab, ssmadd_widen_optab,
usmadd_widen_optab, ssmsub_widen_optab, usmsub_widen_optab,
ssdiv_optab, usdiv_optab, ssashl_optab, usashl_optab, ssneg_optab,
usneg_optab, fract_optab, fractuns_optab, satfract_optab,
satfractuns_optab.
Initialize fixed-point libraries, including add, ssadd, usadd, sub,
sssub, ussub, mul, ssmul, usmul, div, ssdiv, udiv, usdiv, ashl,
ssashl, usashl, ashr, lshr, neg, ssneg, usneg, cmp, fract, satfract,
fractuns, satfractuns.
* optabs.h (enum optab_index): Add OTI_ssadd, OTI_usadd, OTI_sssub,
OTI_ussub, OTI_ssmul, OTI_usmul, OTI_ssdiv, OTI_usdiv, OTI_ssneg,
OTI_usneg, OTI_ssashl, OTI_usashl, OTI_ssmadd_widen, OTI_usmadd_widen,
OTI_ssmsub_widen, OTI_usmsub_widen.
(ssadd_optab, usadd_optab, sssub_optab, ussub_optab, ssmul_optab,
usmul_optab, ssdiv_optab, usdiv_optab, ssneg_optab, usneg_optab,
ssashl_optab, usashl_optab, ssmadd_widen_optab, usmadd_widen_optab,
umsub_widen_optab, usmsub_widen_optab): Define.
(enum convert_optab_index): Add COI_fract, COI_fractuns, COI_satfract,
COI_satfractuns.
(fract_optab, fractuns_optab, satfract_optab, satfractuns_optab):
Define.
(expand_fixed_convert): Declare.
* expr.c (convert_move): Support the move of fixed-point modes.
(emit_move_insn_1): Handle fixed-point mode to move via integer.
(categorize_ctor_elements_1): Handle FIXED_CST.
(count_type_elements): Handle FIXED_POINT_TYPE.
(expand_expr_real_1): For VECTOR_CST, check MODE_VECTOR_FRACT,
MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
Support FIXED_CST.
For PLUS_EXPR and MINUS_EXPR, support saturating and non-saturating
multiply and add/subtract for fixed-point types.
For MULT_EXPR, *DIV_EXPR, *SHIFT_EXPR, if the mode if a fixed-point
mode, we jump to binop directly.
Support FIXED_CONVERT_EXPR.
(do_store_flag): Check FIXED_CST to put a constant second.
(vector_mode_valid_p): Handle MODE_VECTOR_FRACT,
MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM.
(const_vector_from_tree): Support FIXED_CST.
* doc/extend.texi (Fixed-Point): New node.
* doc/md.texi (ssadd, usadd, sssub, ussub, ssmul, usmul, ssdiv, usdiv,
ssmadd, usmadd, ssmsub, usmsub, ssashl, usashl, ssneg, usneg, fract,
satfract, fractuns, satfractuns): Document them.
From-SVN: r128218
|
|
2007-09-06 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_expand_lround, ix86_expand_round): Update call of
real_2expN.
2007-09-06 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.md (fixuns_truncdfsi2, fixuns_truncdfdi2)
(fixuns_truncsfsi2, fixuns_truncsfdi2): Update calls to real_2expN.
2007-09-05 Janis Johnson <janis187@us.ibm.com>
* optabs.c (expand_float): Convert unsigned integer as signed only
if it provides sufficient accuracy; add mode argument to real_2expN.
(expand_fix): Fix comment typos; extend binary float into mode
wider than destination for converion to unsigned integer; add mode
argument to real_2expN.
* real.c (real_2expN): Add mode argument to special-case decimal
float values.
* real.h (real_2expN): Ditto.
* fixed-value.c (check_real_for_fixed_mode): Add mode argument to
real_2expN.
(fixed_from_string): Ditto.
(fixed_to_decimal): Ditto.
(fixed_convert_from_real): Ditto.
(real_convert_from_fixed): Ditto.
* config/rs6000/rs6000.md (FP): Include DD and TD modes.
* config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
From-SVN: r128193
|
|
expr.c:369)
gcc/
PR middle-end/33306
* optabs.c (avoid_expensive_constant): Do nothing if MODE is VOIDmode.
From-SVN: r128179
|
|
provides sufficient accuracy...
gcc/
* optabs.c (expand_float): Convert unsigned integer as signed only
if it provides sufficient accuracy; add mode argument to real_2expN.
(expand_fix): Fix comment typos; extend binary float into mode
wider than destination for converion to unsigned integer; add mode
argument to real_2expN.
* real.c (real_2expN): Add mode argument to special-case decimal
float values.
* real.h (real_2expN): Ditto.
* fixed-value.c (check_real_for_fixed_mode): Add mode argument to
real_2expN.
(fixed_from_string): Ditto.
(fixed_to_decimal): Ditto.
(fixed_convert_from_real): Ditto.
(real_convert_from_fixed): Ditto.
* config/rs6000/rs6000.md (FP): Include DD and TD modes.
* config/rs6000/dfp.md (extendddtd2, adddd3, addtd3, subdd3, subtd3,
muldd3, multd3, divdd3, divtd3, cmpdd_internal1, cmptd_internal1,
floatditd2, ftruncdd2, fixdddi2, ftrunctd2, fixddi2): New.
gcc/testsuite/
* gcc.target/powerpc/dfp-dd.c: New test.
* gcc.target/powerpc/dfp-td.c: New test.
From-SVN: r128156
|
|
* optabs.c (libfunc_entry): Change optab to integer.
(hash_libfunc, convert_optab_libfunc, optab_libfunc,
set_optab_libfunc, set_conv_libfunc): Use optable indexes instead
of pointers for hashing.
From-SVN: r128128
|
|
* optabs.c (debug_optab_libfunc): Update; make available to gdb.
(libfunc_entry): New structure.
(libfunc_hash): New hashtable.
(hash_libfunc): New function.
(eq_libfunc): New function.
(convert_optab_libfunc): New function.
(optab_libfunc): New function.
(expand_binop, sign_expand_binop, expand_twoval_binop_libfunc,
expand_unop, prepare_cmp_insn, prepare_float_insn, gen_add2_insn,
expand_float, expand_fix, new_optab, new_convert_optab):
Update for new libfunc API.
(init_libfunc, init_integral_libfuncs,
init_floating_libfuncs, init_interclass_conv_libfuncs
init_intraclass_conv_libfuncs): Remove; reorganize all logic to:
(gen_libfunc, gen_int_libfunc, gen_fp_libfunc, gen_int_fp_libfunc,
gen_intv_fp_libfunc, gen_interclass_conv_libfunc,
gen_int_to_fp_conv_libfunc, gen_ufloat_conv_libfunc,
gen_int_to_fp_nondecimal_conv_libfunc, gen_fp_to_int_conv_libfunc,
gen_intraclass_conv_libfunc, gen_trunc_conv_libfunc,
gen_extend_conv_libfunc): New.
(init_one_libfunc): Revamp for hashtables.
(set_conv_libfunc): Likewise.
(init_optabs): Initialize hashtable; use lazy initialization where possible.
* optabs.h (optab_handlers): Move out of GGC.
(optab, convert_optab): Move out of GGC; add lazy gen info.
(code_to_optab, convert_optab_table, optab_table): Move out of GGC.
(optab_libfunc, convert_optab_libfunc): New.
* builtins.c (expand_builtin_powi): Update for new API.
* expr.c (convert_move): Likewise.
* expmed.c (expand_divmod): Likewise.
From-SVN: r128083
|
|
* optabs.c (expand_ffs): Initialize val and defined_at_zero
to avoid warnings.
From-SVN: r128058
|
|
* optabs.c: Remove unnecessary forward declarations.
(expand_unop_direct): New, broken out of expand_unop.
(expand_doubleword_clz): New.
(expand_ctz): Move above expand_ffs. Use
start_sequence, end_sequence, add_equal_note, and
expand_unop_direct. Add more commentary.
(expand_ffs): Try both ctz optab and expand_ctz.
Generate a test and branch if the hardware doesn't give us
a useful value for input zero. Style improvements similar to
expand_ctz.
* config/arm/arm.md (ffssi2, ctzsi2): Delete.
From-SVN: r128054
|
|
above now)
gcc/
PR middle-end/33290
* optabs.c (avoid_expensive_constant): Canonicalize CONST_INTs
before forcing them into a register.
From-SVN: r128048
|
|
* config/arm/arm.c, config/rs6000/ppu_intrinsics.h,
config/spu/spu.c, df-scan.c, fixed-value.c, fold-const.c,
ginclude/tgmath.h, haifa-sched.c, optabs.c, recog.c,
sched-deps.c, sched-int.h, system.h, target.h,
tree-ssa-live.c, tree-vect-transform.c, tree-vectorizer.c,
tree.def: Fix comment typos.
From-SVN: r128016
|
|
word_mode.
2007-08-31 Andrew Pinski <andrew_pinski@playstation.sony.com>
* optabs.c (prepare_float_lib_cmp): Use
libgcc_cmp_return_mode instead of word_mode.
* config/dfp-bit.h: Likewise.
* config/fp-bit.h: Likewise.
* config/spu/spu.c (spu_libgcc_cmp_return_mode):
New function.
(spu_libgcc_shift_count_mode): New function.
(TARGET_LIBGCC_CMP_RETURN_MODE): Define.
(TARGET_LIBGCC_SHIFT_COUNT_MODE): Define.
From-SVN: r128005
|
|
gcc/
* optabs.c (shift_optab_p, commutative_optab_p): New functions,
split out from expand_binop.
(avoid_expensive_constant): New function.
(expand_binop_directly): Remove commutative_op argument and
call cummutative_optab_p instead. Do not change op0 or op1
when swapping xop0 and xop1. Apply avoid_expensive_constant
to each argument after potential swapping. Enforce the
canonical order of commutative operands.
(expand_binop): Use shift_optab_p and commutative_optab_p.
Update the calls to expand_binop_directly. Only force constants
into registers when widening an operation. Only swap operands
once a direct expansion has been rejected.
(expand_twoval_binop): Only force constants into registers when
using a direct expansion.
From-SVN: r127991
|
|
2007-08-27 Sandra Loosemore <sandra@codesourcery.com>
David Ung <davidu@mips.com>
Nigel Stephens <nigel@mips.com>
gcc/
Separate target-specific initialization from general
back-end initialization.
* toplev.c (init_alignments): New, split out from...
(process_options): ...here.
(backend_init_target): New, split out from...
(backend_init): ...here.
(lang_dependent_init_target): New, split out from...
(lang_dependent_init): ...here.
(target_reinit): New.
* toplev.h (target_reinit): Declare.
* expr.c (init_expr_target): Renamed from init_expr_once, since it
now can be called more than once. Update comments.
* expr.h (init_expr_target): Likewise.
* alias.c (init_alias_target): Renamed from init_alias_once, since it
now can be called more than once. Explicitly zero
static_reg_base_value.
* emit-rtl.c (init_emit_regs): New, split out from...
(init_emit_once): Here.
* regclass.c (initial_fixed_regs, initial_call_used_regs): Make
non-const, so that changes from command-line arguments can overwrite
values provided by the static initializers.
(initial_call_really_used_regs): New, used similarly to the above.
(initial_reg_names): Likewise.
(last_mode_for_init_move_cost): Promoted function-local static to
file-scope static to make it accessible outside init_move_cost.
(init_reg_sets): Do not initialize fixed_regs and call_used_regs yet.
Do not initialize inv_reg_alloc_order yet, either. Do initialize
reg_names since it is needed for parsing command-line options.
(init_move_cost): Use last_mode_for_init_move_cost instead of
function-local static.
(init_reg_sets_1): Initialize fixed_regs, call_used_regs, and
call_really_used_regs now. Reinitialize reg_names. Also
initialize inv_reg_alloc_order. Zero reg_class_subunion and
reg_class_superunion. Clear losing_caller_save_reg_set.
Preserve global registers if called more than once. Reset
move cost, may_move_in_cost, may_move_out_cost, and
last_mode_for_init_move_cost.
(init_reg_modes_target): Renamed from init_reg_modes_once, since it
can now be invoked more than once. Update comments.
(init_regs): Update comments.
(fix_register): Update initial_fixed_regs, initial_call_used_regs,
and initial_call_really_used_regs, instead of the non-initial
variables. This allows us to save the command-line register settings
after target reinitialization.
(init_reg_autoinc): Zero forbidden_inc_dec_classes.
* rtl.h (init_emit_regs): Declare.
(init_reg_modes_target, init_alias_target): Renamed as described
above.
* reload1.c (init_reload): Update comments.
* optabs.c (init_optabs): Likewise.
* cfgloopanal.c (init_set_costs): Explicitly zero target_avail_regs.
Co-Authored-By: David Ung <davidu@mips.com>
Co-Authored-By: Nigel Stephens <nigel@mips.com>
From-SVN: r127832
|
|
* c-common.c (vector_types_convertible_p,
decl_with_nonnull_addr_p, c_promoting_integer_type_p,
self_promoting_args_p): Constify.
* c-common.h (has_c_linkage, decl_with_nonnull_addr_p,
c_promoting_integer_type_p, self_promoting_args_p,
anon_aggr_type_p, vector_types_convertible_p): Likewise.
* c-decl.c (anon_aggr_type_p): Likewise.
* * c-dump.c (dump_stmt): Likewise.
* c-objc-common.c (has_c_linkage): Likewise.
* c-tree.h (same_translation_unit_p): Likewise.
* c-typeck.c (null_pointer_constant_p,
tagged_types_tu_compatible_p, function_types_compatible_p,
type_lists_compatible_p, lvalue_or_else, lvalue_p,
comptypes_internal, struct tagged_tu_seen_cache,
same_translation_unit_p, alloc_tagged_tu_seen_cache,
c_size_in_bytes): Likewise.
* ggc-common.c (compare_ptr_data, hash_descriptor, eq_descriptor,
hash_ptr, eq_ptr): Likewise.
* langhooks-def.h (lhd_decl_ok_for_sibcall,
LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Likewise.
* langhooks.c (lhd_decl_ok_for_sibcall): Likewise.
* langhooks.h (ok_for_sibcall, omp_privatize_by_reference):
Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* optabs.h (optab_for_tree_code): Likewise.
* rtl.h (simplify_rtx): Likewise.
* simplify-rtx.c (simplify_rtx): Likewise.
* tree-dump.c (queue, queue_and_dump_index, queue_and_dump_type,
dump_flag, dump_node): Likewise.
* tree-dump.h (struct dump_info, dump_stmt, queue_and_dump_index,
queue_and_dump_type, dump_flag): Likewise.
* tree-flow.h (vect_can_force_dr_alignment_p): Likewise.
* tree-pass.h (dump_node): Likewise.
* tree-vectorizer.c (vect_can_force_dr_alignment_p,
supportable_narrowing_operation): Likewise.
* tree-vectorizer.h (vect_can_force_dr_alignment_p,
supportable_narrowing_operation): Likewise.
* tree-vrp.c (needs_overflow_infinity, supports_overflow_infinity,
is_negative_overflow_infinity, is_positive_overflow_infinity,
is_overflow_infinity, vrp_val_is_max, vrp_val_is_min,
nonnull_arg_p, get_value_range, vrp_operand_equal_p,
update_value_range, add_equivalence, ssa_name_nonnegative_p,
ssa_name_nonzero_p, fp_predicate): Likewise.
* tree.c (auto_var_in_fn_p, empty_body_p): Likewise.
* tree.h (empty_body_p, auto_var_in_fn_p, ssa_name_nonzero_p,
ssa_name_nonnegative_p): Likewise.
cp:
* call.c (sufficient_parms_p): Constify.
* class.c (same_signature_p): Likewise.
* cp-gimplify.c (is_invisiref_parm,
cxx_omp_privatize_by_reference): Likewise.
* cp-objcp-common.c (has_c_linkage): Likewise.
* cp-tree.h (NON_THUNK_FUNCTION_CHECK, THUNK_FUNCTION_CHECK,
sufficient_parms_p, same_signature_p, copy_fn_p, move_fn_p,
grok_ctor_properties, nothrow_libfn_p, skip_artificial_parms_for,
num_artificial_parms_for, comp_template_parms,
template_parameter_pack_p, any_dependent_template_arguments_p,
any_type_dependent_arguments_p, any_value_dependent_elements_p,
repo_export_class_p, cxx_omp_privatize_by_reference, pod_type_p,
zero_init_p, member_p, cp_lvalue_kind,
builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
varargs_function_p, is_dummy_object, special_function_kind,
string_conv_p, type_unknown_p, comp_except_specs, compparms,
comp_cv_qualification, is_bitfield_expr_with_lowered_type,
unlowered_expr_type, ptr_reasonably_similar, cp_type_readonly,
cp_has_mutable_p, at_least_as_qualified_p,
invalid_nonstatic_memfn_p, lvalue_or_else, lvalue_p): Likewise.
* decl.c (copy_fn_p, move_fn_p, grok_ctor_properties): Likewise.
* except.c (nothrow_libfn_p): Likewise.
* method.c (skip_artificial_parms_for, num_artificial_parms_for):
Likewise.
* pt.c (comp_template_parms, template_parameter_pack_p,
any_type_dependent_arguments_p, any_value_dependent_elements_p,
any_dependent_template_arguments_p): Likewise.
* repo.c (repo_export_class_p): Likewise.
* semantics.c (anon_aggr_type_p): Likewise.
* tree.c (lvalue_p_1, real_lvalue_p, lvalue_p,
builtin_valid_in_constant_expr_p, decl_anon_ns_mem_p,
varargs_function_p, member_p, is_dummy_object, pod_type_p,
zero_init_p, special_function_p): Likewise.
* typeck.c (comp_array_types, type_unknown_p, comp_except_specs,
comp_array_types, at_least_as_qualified_p, comp_cv_qualification,
compparms, invalid_nonstatic_memfn_p,
is_bitfield_expr_with_lowered_type, unlowered_expr_type,
string_conv_p, ptr_reasonably_similar, cp_type_readonly,
cp_has_mutable_p, lvalue_or_else): Likewise.
fortran:
* trans-openmp.c (gfc_omp_privatize_by_reference): Constify.
* trans.h (gfc_omp_privatize_by_reference): Likewise.
java:
* lang.c (java_decl_ok_for_sibcall): Likewise.
From-SVN: r127799
|
|
interpretation of value from boolean to tri-state integer.
2007-08-09 Sandra Loosemore <sandra@codesourcery.com>
Nigel Stephens <nigel@mips.com>
gcc/
* doc/tm.texi (CLZ_DEFINED_VALUE_AT_ZERO, CTZ_DEFINED_VALUE_AT_ZERO):
Document change in interpretation of value from boolean to
tri-state integer.
* optabs.c (expand_ffs, expand_ctz): New functions to compute
ffs and ctz using clz.
(expand_unop): Call them.
* config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Fix its
result value.
(CTZ_DEFINED_VALUE_AT_ZERO): Likewise.
* config/mips/mips.h (CLZ_DEFINED_VALUE_AT_ZERO): Likewise, to
enable the new ffs expansion on this target.
Co-Authored-By: Nigel Stephens <nigel@mips.com>
From-SVN: r127318
|
|
* optabs.c (expand_widen_pattern_expr): Use optabs accestors.
(expand_ternary_op): Likewise.
(expand_vec_shift_expr): Likewise.
(expand_binop_directly): Likewise.
(expand_binop): Likewise.
(sign_expand_binop): Likewise.
(expand_twoval_unop): Likewise.
(expand_twoval_binop): Likewise.
(expand_twoval_binop_libfunc): Likewise.
(widen_clz): Likewise.
(widen_bswap): Likewise.
(expand_parity): Likewise.
(expand_unop): Likewise.
(expand_abs_nojump): Likewise.
(expand_copysign): Likewise.
(emit_no_conflict_block): Likewise.
(emit_libcall_block): Likewise.
(can_compare_p): Likewise.
(prepare_cmp_insn): Likewise.
(emit_cmp_and_jump_insn_1): Likewise.
(prepare_float_lib_cmp): Likewise.
(emit_conditional_add): Likewise.
(gen_add2_insn): Likewise.
(have_add2_insn): Likewise.
(gen_sub2_insn): Likewise.
(have_sub2_insn): Likewise.
(can_extend_p): Likewise.
(can_fix_p): Likewise.
(can_float_p): Likewise.
(expand_float): Likewise.
(expand_fix): Likewise.
(expand_sfix_optab): Likewise.
(new_optab): Likewise.
(new_convert_optab): Likewise.
(init_libfuncs): Likewise.
(init_interclass_conv_libfuncs): Likewise.
(init_intraclass_conv_libfuncs): Likewise.
(set_conv_libfunc): Likewise.
(init_optabs): Likewise.
(debug_optab_libfuncs): Likewise.
(gen_cond_trap): Likewise.
* optabs.h (optab_handler, convert_optab_hanlder): New.
* genopinit.c: Update optabs generation table.
* reload.c (find_reloads_address_1): Use optabs accestors.
* builtins.c (expand_builtin_mathfn): Likewise.
(expand_builtin_mathfn_2): Likewise.
(expand_builtin_mathfn_3): Likewise.
(expand_builtin_interclass_mathfn): Likewise.
(expand_builtin_sincos): Likewise.
(expand_builtin_cexpi): Likewise.
(expand_builtin_powi): Likewise.
(expand_builtin_strlen): Likewise.
* dojump.c (do_jump): Likewise.
* expr.c (convert_move): Likewise.
(move_by_pieces): Likewise.
(move_by_pieces_ninsns): Likewise.
(can_store_by_pieces): Likewise.
(store_by_pieces_1): Likewise.
(emit_move_via_integer): Likewise.
(emit_move_complex): Likewise.
(emit_move_ccmode): Likewise.
(emit_move_insn_1): Likewise.
(emit_single_push_insn): Likewise.
(store_constructor): Likewise.
(expand_expr_real_1): Likewise.
(do_store_flag): Likewise.
* ada/misc.c (gnat_compute_largest_alignment): Likewise.
(enumerate_modes): Likewise.
* tree-vectorizer.c (vect_supportable_dr_alignment): Likewise.
(supportable_widening_operation): Likewise.
(supportable_narrowing_operation): Likewise.
* expmed.c (store_bit_field_1): Likewise.
(extract_bit_field_1): Likewise.
(expand_mult_highpart_optab): Likewise.
(expand_smod_pow2): Likewise.
(expand_divmod): Likewise.
(emit_store_flag): Likewise.
* tree-vect-patterns.c
(vect_pattern_recog_1): Likewise.
* tree-ssa-loop-prefetch.c
(nontemporal_store_p): Likewise.
* tree-vect-transform.c (vect_model_reduction_cost): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_reduction): Likewise.
(vectorizable_operation): Likewise.
(vect_strided_store_supported): Likewise.
(vectorizable_store): Likewise.
(vect_strided_load_supported): Likewise.
(vectorizable_load): Likewise.
* combine.c (simplify_comparison): Likewise.
* tree-vect-generic.c
(type_for_widest_vector_mode): Likewise.
(expand_vector_operations_1): Likewise.
* config/spu/spu.c (spu_expand_mov): Likewise.
(spu_emit_vector_compare): Likewise.
* config/rs6000/rs6000.c
(rs6000_emit_vector_compare): Likewise.
* stmt.c (add_case_node): Likewise.
* reload1.c (gen_reload):
From-SVN: r127317
|
|
* alias.c (record_set, memory_modified_1): Constify.
* bt-load.c (note_btr_set): Likewise.
* caller-save.c (mark_set_regs, add_stored_regs): Likewise.
* combine.c (set_nonzero_bits_and_sign_copies,
expand_field_assignment, record_dead_and_set_regs_1,
use_crosses_set_p, reg_dead_at_p_1, can_combine_p,
likely_spilled_retval_1): Likewise.
* config/frv/frv.c (frv_registers_update_1, frv_io_check_address,
frv_io_handle_set): Likewise.
* config/mips/mips.c (mips_sim_record_set,
vr4130_true_reg_dependence_p_1): Likewise.
* config/mt/mt.c (insn_dependent_p_1): Likewise.
* config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
* config/sh/sh.c (flow_dependent_p_1): Likewise.
* cselib.c (cselib_invalidate_rtx_note_stores): Likewise.
* dce.c (mark_nonreg_stores_1, mark_nonreg_stores_2): Likewise.
* ddg.c (mark_mem_store): Likewise.
* df-problems.c (df_urec_mark_reg_change): Likewise.
* function.c (update_epilogue_consts): Likewise.
* gcse.c (record_set_info, record_last_set_info,
mems_conflict_for_gcse_p, canon_list_insert, reg_set_info,
reg_clear_last_set): Likewise.
* global.c (mark_reg_store, mark_reg_clobber, reg_becomes_live):
Likewise.
* jump.c (reversed_comparison_code_parts): Likewise.
* local-alloc.c (validate_equiv_mem_from_store, no_equiv,
reg_is_set): Likewise.
* loop-iv.c (mark_altered): Likewise.
* mode-switching.c (reg_becomes_live): Likewise.
* optabs.c (no_conflict_move_test): Likewise.
* postreload-gcse.c (record_last_set_info, find_mem_conflicts):
Likewise.
* postreload.c (reload_combine_note_store, move2add_note_store):
Likewise.
* regmove.c (flags_set_1): Likewise.
* regrename.c (note_sets, kill_clobbered_value, kill_set_value):
Likewise.
* reload1.c (mark_not_eliminable, forget_old_reloads_1):
Likewise.
* resource.c (update_live_status): Likewise.
* rtl.h (set_of, note_stores): Likewise.
* rtlanal.c (set_of_1, parms_set, struct set_of_data, set_of,
note_stores, parms_set): Likewise.
* sched-rgn.c (sets_likely_spilled_1): Likewise.
* stack-ptr-mod.c (notice_stack_pointer_modification_1):
Likewise.
* var-tracking.c (count_stores, add_stores): Likewise.
From-SVN: r127065
|
|
* cfglayout.c, config/arm/arm.c, config/arm/cortex-a8.md,
config/arm/neon-schedgen.ml, config/arm/neon.ml,
config/arm/vec-common.md, config/ia64/div.md, cselib.c,
df-core.c, df.h, dominance.c, optabs.c, opts.c, reg-stack.c,
regstat.c, target.h, tree-ssa-live.c, tree-ssa-pre.c,
tree-vect-transform.c, tree.def: Fix comment typos. Follow
spelling conventions.
* doc/invoke.texi: Follow spelling conventions.
From-SVN: r127030
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
PR middle-end/PR28690
* optabs.c (expand_binop): (emit_cmp_and_jump_insns): Allow EQ compares.
* rtlanal.c (commutative_operand_precedence): Prefer both REG_POINTER
and MEM_POINTER operands over REG and MEM operands.
(swap_commutative_operands_p): Change return value to bool.
* rtl.h: Update the corresponding prototype.
* tree-ssa-address.c (gen_addr_rtx): Use simplify_gen_binary
instead of gen_rtx_PLUS.
* simplify-rtx.c (simplify_plus_minus_op_data_cmp): Change return
value to bool. Change function arguments to rtx's and update code
to match.
(simplify_plus_minus): Update the simplify_plus_minus_op_data_cmp
calls to match the new declaration.
* simplify-rtx.c (simplify_associative_operation): Don't
reorder simplify_binary_operation arguments.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r126852
|
|
* optabs.h (enum optab_index): Add new OTI_signbit.
(signbit_optab): Define corresponding macro.
(enum insn_code signbit_optab[]): Remove array.
* optabs.c (init_optabs): Initialize signbit_optab using init_optab.
(expand_copysign_absneg): If back end provides signbit insn, use it
instead of bit operations on floating point argument.
* builtins.c (enum insn_code signbit_optab[]): Remove array.
(expand_builtin_signbit): Check signbit_optab->handlers[].insn_code for
availability of signbit insn.
* config/i386/i386.md (signbit<mode>2): New insn pattern to implement
signbitf, signbit and signbitl built-ins as inline x87 intrinsics when
SSE mode is not active.
(isinf<mode>2): Disable for mfpmath=sse,387.
From-SVN: r126813
|
|
2007-07-11 Kenneth Zadeck <zadeck@naturalbridge.com>
* toplev.c (no_new_pseudos): Deleted.
* rtl.h (no_new_pseudos): Deleted.
* tree-pass.h (pass_no_new_pseudos): Deleted.
* passes.c (pass_no_new_pseudos): Deleted.
* final.c (rest_of_clean_state): Removed no_new_pseudos.
(rest_of_no_new_pseudos, pass_no_new_pseudos): Deleted.
* struct-equiv.c (rtx_equiv_p): Replaced no_new_pseudos with
reload_completed.
* cfgcleanup.c (try_crossjump_to_edge): Ditto.
* rtlhooks.c (gen_lowpart_general): Ditto.
* optabs.c (prepare_operand): Ditto.
* mode-switching.c (rest_of_handle_mode_switching): Deleted set of
no_new_pseudos.
* modulo-sched.c (rest_of_handle_sms): Ditto.
* see.c (rest_of_handle_see): Ditto.
* ifcvt.c (if_convert): Ditto.
(gate_handle_if_after_combine): Replaced no_new_pseudos with
reload_completed.
* init-regs.c (gate_initialize_regs): Deleted set of
no_new_pseudos.
* lower-subreg.c (decompose_multiword_subregs): Ditto.
* bb-reorder.c (rest_of_handle_partition_blocks): Ditto.
* doc/md.texi: Changed no_new_pseudos to can_create_pseudo_p.
From-SVN: r126561
|
|
2007-07-09 Wolfgang Gellerich <gellerich@de.ibm.com>
* optabs.h: Added declaration for signbit_optab.
* optabs.c: (init_optabs): Added initialization for signbit_optab.
* genoptinit.c (optabs): Added entry for signbit insns.
* builtins.c (expand_builtin_signbit): Added code to use a signbit insn,
if available.
* config/s390/s390.h (S390_TDC_SIGNBIT_SET): New constant.
* config/s390/s390.md (signbit<mode>2): New expander.
From-SVN: r126495
|
|
2007-07-06 Andreas Krebbel <krebbel1@de.ibm.com>
* libgcc2.h (word_type): Type definition removed.
(cmp_return_type, shift_count_type): Type definitions added.
(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
replaced with shift_count_type.
(__cmpdi2, __ucmpdi2): word_type of return type replaced with
cmp_return_type.
* libgcc2.c (__udivmoddi4, __moddi3): Type of local variable c
changed from word_type to Wtype.
(__lshrdi3, __ashldi3, __ashrdi3): word_type of second parameter
replaced with shift_count_type.
(__cmpdi2, __ucmpdi2): word_type of return type replaced with
cmp_return_type.
* c-common.c (handle_mode_attribute): Handling for libgcc_cmp_return and
libgcc_shift_count attribute added.
* target-def.h (TARGET_LIBGCC_CMP_RETURN_MODE,
TARGET_LIBGCC_SHIFT_COUNT_MODE): New target hooks defined.
(TARGET_INITIALIZER): New target hooks added.
* targhooks.c (default_libgcc_cmp_return_mode,
default_libgcc_shift_count_mode): Default implementations for the new
target hooks added.
* targhooks.h (default_libgcc_cmp_return_mode,
default_libgcc_shift_count_mode): Function prototypes added.
* target.h (struct gcc_target): Fields for the new target hooks added.
* optabs.c (expand_binop): Use shift_count_mode when expanding shift
as library call.
(prepare_cmp_insn): Use cmp_return_mode when expanding comparison as
library call.
* doc/tm.texi (TARGET_LIBGCC_CMP_RETURN_MODE,
TARGET_LIBGCC_SHIFT_COUNT_MODE): Documentation added.
* config/s390/s390.c (s390_libgcc_cmp_return_mode,
s390_libgcc_shift_count_mode): Functions added.
(TARGET_LIBGCC_CMP_RETURN_MODE, TARGET_LIBGCC_SHIFT_COUNT_MODE): Target
hooks defined.
From-SVN: r126410
|
|
2007-07-05 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* optabs.c (expand_binop_directly): Fix signed/unsigned comparison.
From-SVN: r126382
|
|
2007-07-05 Sandra Loosemore <sandra@codesourcery.com>
David Ung <davidu@mips.com>
Add support for SmartMIPS ASE.
gcc/
* optabs.c (expand_binop_directly): New, broken out from...
(expand_binop): Here. Make it try rotating in the other
direction even when the second operand isn't constant.
* config/mips/mips.md (*lwxs): New.
* config/mips/mips.opt (msmartmips): New.
* config/mips/mips.c (mips_lwxs_address_p): New.
(mips_rtx_costs): Make it recognize scaled indexed addressing.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
__mips_smartmips when compiling for TARGET_SMARTMIPS.
(ISA_HAS_ROR): Define for TARGET_SMARTMIPS.
(ISA_HAS_LWXS): New.
(ASM_SPEC): Add -msmartmips/-mno-smartmips.
* doc/invoke.texi (MIPS Options): Document -msmartmips/-mno-smartmips.
* testsuite/gcc.target/mips/smartmips-lwxs.c: New test case.
* testsuite/gcc.target/mips/smartmips-ror-1.c: New test case.
* testsuite/gcc.target/mips/smartmips-ror-2.c: New test case.
* testsuite/gcc.target/mips/smartmips-ror-3.c: New test case.
* testsuite/gcc.target/mips/smartmips-ror-4.c: New test case.
Co-Authored-By: David Ung <davidu@mips.com>
From-SVN: r126370
|
|
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
Zdenek Dvorak <dvorakz@suse.cz>
Richard Guenther <rguenther@suse.de>
Kaz Kojima <kkojima@gcc.gnu.org>
* tree-vrp.c (compare_values_warnv): Convert val2 to
the type of val1.
(extract_range_from_assert): Create
POINTER_PLUS_EXPR for pointer types.
(extract_range_from_binary_expr): Handle
only POINTER_PLUS_EXPR, MIN_EXPR, and MAX_EXPR
for pointer types.
* doc/c-tree.texi (POINTER_PLUS_EXPR): Document.
* tree-ssa-loop-niter.c (split_to_var_and_offset): Handle
POINTER_PLUS_EXPR as PLUS_EXPR.
(number_of_iterations_lt_to_ne):
For pointer types, use sizetype when
creating MINUS_EXPR/PLUS_EXPRs.
(assert_loop_rolls_lt): For pointer types, use sizetype when
creating MINUS_EXPR/PLUS_EXPRs.
(number_of_iterations_le): Likewise.
(expand_simple_operations): POINTER_PLUS_EXPR are simple also.
(derive_constant_upper_bound): Handle POINTER_PLUS_EXPR just
like PLUS_EXPR and MINUS_EXPR.
* tree-pretty-print.c (dump_generic_node): Handle
POINTER_PLUS_EXPR.
(op_prio): Likewise.
(op_symbol_1): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* tree-ssa-loop-manip.c (create_iv): Handle pointer base
specially.
* tree-tailcall.c (process_assignment): Mention
POINTER_PLUS_EXPR in a TODO comment.
* tree.c (build2_stat): Assert when trying to use PLUS_EXPR or
MINUS_EXPR with a pointer. Also assert for POINTER_PLUS_EXPR
not used with a pointer and an integer type.
* tree-scalar-evolution.c (add_to_evolution_1): Convert the
increment using chrec_convert_rhs instead of chrec_convert.
(follow_ssa_edge_in_rhs): Handle POINTER_PLUS_EXPR like
PLUS_EXPR except for the right hand side's type will be
sizetype.
(interpret_rhs_modify_stmt): Handle POINTER_PLUS_EXPR.
(fold_used_pointer_cast): Kill.
(pointer_offset_p): Kill.
(fold_used_pointer): Kill.
(pointer_used_p): Kill.
(analyze_scalar_evolution_1 <case GIMPLE_MODIFY_STMT>): Don't
call fold_used_pointer.
(instantiate_parameters_1): Convert the increment
using chrec_convert_rhs instead of chrec_convert.
Handle POINTER_PLUS_EXPR as PLUS_EXPR.
* builtins.c (get_pointer_alignment): Handle POINTER_PLUS_EXPR
instead of PLUS_EXPR.
(expand_builtin_strcat): Create a POINTER_PLUS_EXPR instead of
PLUS_EXPR for pointers.
(std_gimplify_va_arg_expr): Likewise.
(fold_builtin_memory_op): Likewise.
(fold_builtin_strstr): Likewise.
(fold_builtin_strchr): Likewise.
(fold_builtin_strrchr): Likewise.
(fold_builtin_strpbrk): Likewise.
(expand_builtin_memory_chk): Likewise.
(fold_builtin_memory_chk): Likewise.
(std_expand_builtin_va_start): Use
sizetype for the call to make_tree and then convert
to the pointer type.
(fold_builtin_memchr): Use POINTER_PLUS_EXPR
instead of PLUS_EXPR for adding to a pointer.
(std_gimplify_va_arg_expr): Use fold_build2 for
the creating of POINTER_PLUS_EXPR. For the BIT_AND_EXPR, cast
the operands to sizetype first and then cast the BIT_AND_EXPR
back to the pointer type.
* fold-const.c (build_range_check): Handle pointer types
specially.
(extract_array_ref): Look for POINTER_PLUS_EXPR instead
of PLUS_EXPR's. Make sure the offset is converted to
sizetype.
(try_move_mult_to_index): Strip the NOPs from the offset.
Remove code argument and replace all uses with PLUS_EXPR.
(fold_to_nonsharp_ineq_using_bound): Handle pointer types
specially. Don't use a pointer type for MINUS_EXPR.
(fold_unary): Handle for (T1)(X op Y),
only p+ as that is the only as that can be handled for
binary operators now.
(fold_binary <case POINTER_PLUS_EXPR>): Add folding of
POINTER_PLUS_EXPR.
<case PLUS_EXPR>: Add folding of PTR+INT into
PTR p+ INT.
Don't call try_move_mult_to_index.
<case MINUS_EXPR>: Fold (PTR0 p+ A) - (PTR1 p+ B)
into (PTR0 - PTR1) + (A - B). Fold (PTR0 p+ A) - PTR1 into
(PTR0 - PTR1) + A iff (PTR0 - PTR1) simplifies.
Don't call try_move_mult_to_index.
(tree_expr_nonnegative_warnv_p): Handle POINTER_PLUS_EXPR.
(tree_expr_nonzero_p): Likewise.
(fold_indirect_ref_1): Look at POINTER_PLUS_EXPR instead
of PLUS_EXPR for the complex expression folding.
* tree-chrec.c (chrec_fold_plus_poly_poly): If the
first chrec is a pointer type, then the second should
be sizetype and not the first's type.
For POINTER_PLUS_EXPR, use a different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
(chrec_fold_plus_1): For POINTER_PLUS_EXPR, use a
different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
(chrec_fold_plus): For pointer types, use POINTER_PLUS_EXPR
instead of PLUS_EXPR.
When either operand is zero, convert the other operand.
(chrec_apply): Use chrec_convert_rhs
on the argument x instead of chrec_convert.
(reset_evolution_in_loop): For pointer types, the new_evol
should be sizetype.
(convert_affine_scev): For POINTER_PLUS_EXPR, use a
different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
(chrec_convert_rhs): New function.
(chrec_convert_aggressive): For POINTER_PLUS_EXPR, use a
different right hand side type.
Handle POINTER_PLUS_EXPR like PLUS_EXPR.
* tree-chrec.h (chrec_convert_rhs): New prototype.
(build_polynomial_chrec): For pointer types, the right hand
* tree-ssa-ccp.c (maybe_fold_stmt_indirect): Look for
POINTER_PLUS_EXPR instead of PLUS_EXPR's.
Remove subtraction case as it is always addition now.
Make sure the offset is converted to sizetype.
(fold_stmt_r): Don't handle PLUS_EXPR/MINUS_EXPR specially.
Handle POINTER_PLUS_EXPR like PLUS_EXPR was handled before.
* tree-ssa-loop-ivopts.c (determine_base_object): Abort for
PLUS_EXPR in pointer type.
Handle POINTER_PLUS_EXPR.
(tree_to_aff_combination): Likewise.
(force_expr_to_var_cost): Likewise.
(force_expr_to_var_cost): Likewise. Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* c-format.c (check_format_arg): Handle POINTER_PLUS_EXPR
instead of PLUS_EXPR of pointer types.
* tree-stdarg.c (va_list_counter_bump): Handle POINTER_PLUS_EXPR
as PLUS_EXPR.
(check_va_list_escapes): Likewise.
(check_all_va_list_escapes): Likewise.
* dwarf2out.c (loc_descriptor_from_tree_1):
Handle POINT_PLUS_EXPR as a PLUS_EXPR.
* expr.c (expand_expr_real_1): Handle POINTER_PLUS_EXPR.
(string_constant): Likewise.
* tree-ssa-address.c (tree_mem_ref_addr): When adding
the offset to the base, use POINTER_PLUS_EXPR.
(add_to_parts): Convert the index to sizetype.
(create_mem_ref): Create A POINTER_PLUS_EXPR for the one case.
* matrix-reorg.c (collect_data_for_malloc_call): Stmt
will now only be either INDIRECT_REF and POINTER_PLUS_EXPR.
Offset only holds something for PLUS_EXPR.
(ssa_accessed_in_tree): Handle POINTER_PLUS_EXPR just as
a PLUS_EXPR.
(analyze_transpose): POINTER_PLUS_EXPR will only show up now
and not PLUS_EXPR.
(analyze_accesses_for_modify_stmt): Likewise.
Remove comment about the type being integral type as it is
wrong now.
(can_calculate_expr_before_stmt): Handle POINTER_PLUS_EXPR as
PLUS_EXPR.
(transform_access_sites): POINTER_PLUS_EXPR will only show up now
and not PLUS_EXPR.
Correct the type which the artimentic is done in (is now
sizetype).
Reindent one loop.
* tree-data-ref.c (split_constant_offset): Handle
POINTER_PLUS_EXPR
* tree-affine.c (tree_to_aff_combination): Likewise.
* c-typeck.c (build_unary_op): For pointers create the increment
as a sizetype. Create a POINTER_PLUS_EXPR instead of PLUS_EXPR
for pointers.
* gimplify.c (gimplify_self_mod_expr): Create a
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
(gimplify_omp_atomic_fetch_op): Handle POINTER_PLUS_EXPR.
* tree.def (POINTER_PLUS_EXPR): New tree code.
* tree-predcom.c (ref_at_iteration): If we have a pointer
type do the multiplication in sizetype.
* tree-mudflap.c (mf_xform_derefs_1): Create a
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
* tree-ssa-forwprop.c
(forward_propagate_addr_into_variable_array_index):
Don't expect there to be a cast for the index as that
does not exist anymore.
(forward_propagate_addr_expr_1): Check for POINTER_PLUS_EXPR
instead of PLUS_EXPR.
Don't check for the first operand of the POINTER_PLUS_EXPR
was the index as it cannot be.
Call forward_propagate_addr_into_variable_array_index with
the SSA_NAME instead of the statement.
* varasm.c (const_hash_1): Handle POINTER_PLUS_EXPR.
(compare_constant): Likewise.
(copy_constant): Likewise.
(compute_reloc_for_constant): Likewise.
(output_addressed_constants): Likewise.
(initializer_constant_valid_p): Likewise.
* tree-ssa.c (tree_ssa_useless_type_conversion_1):
Convert the MIN/MAX of the inner type to the outer
type before comparing them.
* tree-ssa-loop-prefetch.c (idx_analyze_ref): Handle
POINTER_PLUS_EXPR instead of PLUS_EXPR.
(issue_prefetch_ref): Create a POINTER_PLUS_EXPR instead
of PLUS_EXPR for pointers.
* tree-inline.c (estimate_num_insns_1): Handle
POINTER_PLUS_EXPR.
* tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
Create a POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
(bump_vector_ptr): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for the pointer increment statement.
(vect_update_ivs_after_vectorizer): For pointer types, create
POINTER_PLUS_EXPR instead of PLUS_EXPR and also create
MULT_EXPR in sizetype.
(vect_gen_niters_for_prolog_loop): Add a cast when creating
byte_misalign.
* tree-object-size.c (plus_expr_object_size): Handle
POINTER_PLUS_EXPR instead of PLUS_EXPR. Removing all the extra
code which is trying to figure out which side is a pointer and
is the index.
(check_for_plus_in_loops_1): Likewise.
(check_for_plus_in_loops): Likewise.
* c-common.c (pointer_int_sum): Create a
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
* tree-ssa-structalias.c (handle_ptr_arith): Handle
only POINTER_PLUS_EXPR. Removing all the extra
code which is trying to figure out which side is a pointer and
is the index.
* tree-cfg.c (verify_expr): Add extra checking for pointers and
PLUS_EXPR and MINUS_EXPR.
Also add checking to make sure the operands of POINTER_PLUS_EXPR
are correct.
* config/frv/frv.c (frv_expand_builtin_va_start): Use sizetype
with make_tree, instead of a pointer type.
* config/s390/s390.c (s390_va_start): Use POINTER_PLUS_EXPR
for pointers instead of PLUS_EXPR.
(s390_gimplify_va_arg): Likewise.
* config/spu/spu.c (spu_va_start): Create POINTER_PLUS_EXPR
instead of PLUS_EXPR when doing addition on pointer
types. Use sizetype for the second operand.
(spu_gimplify_va_arg_expr): Likewise.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Use
POINTER_PLUS_EXPR instead of PLUS_EXPR when the operand was
a pointer. Don't create a BIT_AND_EXPR for pointer types.
* config/i386/i386.c (ix86_va_start): Use POINTER_PLUS_EXPR
for the pointer addition and also use size_int/sizetype
for the offset.
(ix86_gimplify_va_arg): Likewise.
Perform BIT_AND_EXPR on sizetype arguments.
* config/sh/sh.c (sh_va_start): Call make_tree with sizetype
and convert its result to a pointer type. Use POINTER_PLUS_EXPR
for the pointer additions and also use size_int for the offsets.
(sh_gimplify_va_arg_expr): Use POINTER_PLUS_EXPR for the pointer
additions and also use size_int for the offsets. Perform
BIT_AND_EXPR on sizetype arguments.
* config/ia64/ia64.c (ia64_gimplify_va_arg): Use
POINTER_PLUS_EXPR for pointers and create the
BIT_AND_EXPR in sizetype.
* config/rs6000/rs6000.c (rs6000_va_start): Use POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointer addition.
(rs6000_va_start): Likewise.
Also use sizetype for the offset.
* config/pa/pa.c (reloc_needed): Handle POINTER_PLUS_EXPR
as PLUS_EXPR/MINUS_EXPR.
(hppa_gimplify_va_arg_expr): Don't create MINUS_EXPR or
PLUS_EXPR for pointers, instead use POINTER_PLUS_EXPR.
Don't use BIT_AND_EXPR on a pointer type, convert the
expression to sizetype first.
* config/mips/mips.c (mips_va_start): Use POINTER_PLUS_EXPR
for pointers.
(mips_gimplify_va_arg_expr): Likewise.
Don't create BIT_AND_EXPR in a pointer type.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
* trans-expr.c (gfc_trans_string_copy): Create
POINTER_PLUS_EXPR instead of a PLUS_EXPR
for pointer types.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* typeck.c (build_binary_op): For templates build the
expression in pieces to avoid the assert in build2_stat.
(get_member_function_from_ptrfunc):
Change over to using POINTER_PLUS_EXPR and convert
the second operand to sizetype.
* typeck2.c (build_m_component_ref): Likewise.
* init.c (expand_virtual_init): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
(build_new_1): Likewise.
(build_vec_delete_1): Likewise.
(build_vec_delete): Likewise.
* class.c (build_base_path): Likewise.
(build_base_path): Likewise.
(convert_to_base_statically): Likewise.
(fixed_type_or_null): Handle POINTER_PLUS_EXPR.
(get_vtbl_decl_for_binfo): Handle POINTER_PLUS_EXPR
instead of PLUS_EXPR.
(dfs_accumulate_vtbl_inits): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* call.c (build_special_member_call): Likewise.
* rtti.c (build_headof): Likewise.
Use sizetype instead of ptrdiff_type_node.
(tinfo_base_init): Create a POINTER_PLUS_EXPR
instead of PLUS_EXPR for pointers.
* except.c (expand_start_catch_block): Do a
NEGATIVE and then a POINTER_PLUS_EXPR instead
of a MINUS_EXPR.
* cp-gimplify.c (cxx_omp_clause_apply_fn): Convert
PLUS_EXPR on pointer types over to use
POINTER_PLUS_EXPR and remove the conversion
to the pointer types.
* method.c (thunk_adjust): Use POINTER_PLUS_EXPR for
adding to a pointer type. Use size_int instead of
ssize_int. Convert the index to sizetype before
adding it to the pointer.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* trans.c (Attribute_to_gnu): When subtracting an
offset from a pointer, use POINTER_PLUS_EXPR with
NEGATE_EXPR instead of MINUS_EXPR.
(gnat_to_gnu): Likewise.
* utils.c (convert): When converting between
thin pointers, use POINTER_PLUS_EXPR and sizetype
for the offset.
* utils2.c (known_alignment): POINTER_PLUS_EXPR
have the same semantics as PLUS_EXPR for alignment.
(build_binary_op): Add support for the semantics of
POINTER_PLUS_EXPR's operands.
When adding an offset to a pointer, use POINTER_PLUS_EXPR.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
* class.c (make_class_data): Build the index in sizetype.
Use POINTER_PLUS_EXPR instead of PLUS_EXPR when
adding to a pointer type.
(build_symbol_entry): Likewise.
* expr.c (build_java_arrayaccess): Likewise.
(build_field_ref): Likewise.
(build_known_method_ref): Likewise.
(build_invokevirtual): Likewise.
* except.c (build_exception_object_ref): Do a
NEGATIVE and then a POINTER_PLUS_EXPR instead
of a MINUS_EXPR.
2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR tree-opt/32225
* gcc.c-torture/compile/20070605-1.c: New test.
* gcc.c-torture/compile/20070603-1.c: New testcase.
* gcc.c-torture/compile/20070603-2.c: New testcase.
* gcc.c-torture/compile/20070531-1.c: New test.
PR tree-opt/32167
* gcc.c-torture/compile/20070531-2.c: New test.
PR tree-opt/32144
* gcc.c-torture/compile/20070529-1.c: New test.
PR tree-opt/32145
* gcc.c-torture/compile/20070529-2.c: New test.
PR tree-opt/32015
* gcc.c-torture/compile/20070520-1.c: New test.
* g++.dg/ext/java-1.C: New test.
* gcc.dg/vect/vect-106.c: We are now able to vectorize two
loops instead of one. Remove the "can't determine dependence"
check.
* gcc.dg/tree-ssa/20030815-1.c: Remove testcase which is no longer
needed as the cast is gone in the first place.
* gcc.dg/max-1.c: Change local variable a to be a global one.
* gcc.dg/tree-ssa/ssa-pre-8.c: Update testcase since we don't
have a cast which is PREd.
From-SVN: r125755
|
|
assignment.
2007-06-07 Dirk Mueller <dmueller@suse.de>
* trans-stmt.c (gfc_trans_call): fix gcc_assert to
a comparison, not an assignment.
* optabls.c (debug_optab_libfuncs): fix gcc_assert to
a comparison, not an assignment.
From-SVN: r125647
|
|
From-SVN: r125624
|
|
* tree-data-ref.c (dr_analyze_alias): Handle case smt is NULL.
* tree-predcom.c (mark_virtual_ops_for_renaming): Exported.
* tree-ssa-loop-prefetch.c: Include optabs.h.
(FENCE_FOLLOWING_MOVNT): New macro.
(struct mem_ref): Add independent_p and storent_p fields.
(record_ref): Initalize the new fields.
(gather_memory_references_ref): Return true if the reference
could be analysed.
(gather_memory_references): Check whether all memory accesses
in loop were recorded.
(should_issue_prefetch_p): Return false for nontemporal stores.
(nontemporal_store_p, mark_nontemporal_store, emit_mfence_after_loop,
may_use_storent_in_loop_p, mark_nontemporal_stores): New functions.
(determine_loop_nest_reuse): Detect independent memory references.
(loop_prefetch_arrays): Call mark_nontemporal_stores.
* tree-flow.h (mark_virtual_ops_for_renaming): Declare.
* Makefile.in (tree-ssa-loop-prefetch.o): Add OPTABS_H dependency.
* config/i386/i386.h (x86_mfence): Declare.
(FENCE_FOLLOWING_MOVNT): Return x86_mfence.
* config/i386/i386.c (x86_mfence): New variable.
(ix86_init_mmx_sse_builtins): Initialize x86_mfence.
* tree-pretty-print.c (dump_generic_node): Mark nontemporal stores.
* optabs.c (init_optabs): Initialize storent_optab.
* optabs.h (enum optab_index): Add OTI_storent.
(storent_optab): Declare.
* genopinit.c (optabs): Add initialization for storent_optab.
* tree.h (MOVE_NONTEMPORAL): New macro.
* expr.c (expand_assignment, store_expr, store_constructor_field,
store_constructor, store_field, expand_expr_real_1): Propagate
nontemporality of the expanded store.
(emit_storent_insn): New function.
* expr.h (expand_assignment, store_expr): Declaration changed.
* function.c (assign_parm_setup_reg): Pass false as nontemporality
to expand_assignment.
* stmt.c (expand_asm_expr): Ditto.
* calls.c (initialize_argument_information): Pass false as
nontemporality to store_expr.
* config/i386/sse.md (storentv4sf, storentv2df, storentv2di,
storentsi): New.
* gcc.dg/tree-ssa/prefetch-7.c: New test.
From-SVN: r125604
|
|
prefix) with -ftree-vectorize)
PR tree-optimization/32216
* tree-vectorizer.c (supportable_widening_operation): Determine
signedness of FIX_TRUNC_EXPR from output operand.
(supportable_narrowing_operation): Ditto.
* tree-vect-generic.c (expand_vector_operations_1): Determine
signedness of VEC_UNPACK_FLOAT_HI_EXPR and VEC_UNPACK_FLOAT_LO_EXPR
from input operand.
testsuite/ChangeLog:
PR tree-optimization/32216
* gcc.dg/vect/pr32216.c: New test.
From-SVN: r125482
|
|
PR tree-optimization/24659
* optabs.h (enum optab_index): Add OTI_vec_unpacks_float_hi,
OTI_vec_unpacks_float_lo, OTI_vec_unpacku_float_hi,
OTI_vec_unpacku_float_lo, OTI_vec_pack_sfix_trunc and
OTI_vec_pack_ufix_trunc.
(vec_unpacks_float_hi_optab): Define new macro.
(vec_unpacks_float_lo_optab): Ditto.
(vec_unpacku_float_hi_optab): Ditto.
(vec_unpacku_float_lo_optab): Ditto.
(vec_pack_sfix_trunc_optab): Ditto.
(vec_pack_ufix_trunc_optab): Ditto.
* genopinit.c (optabs): Implement vec_unpack[s|u]_[hi|lo]_optab
and vec_pack_[s|u]fix_trunc_optab using
vec_unpack[s|u]_[hi\lo]_* and vec_pack_[u|s]fix_trunc_* patterns
* tree-vectorizer.c (supportable_widening_operation): Handle
FLOAT_EXPR and CONVERT_EXPR. Update comment.
(supportable_narrowing_operation): New function.
* tree-vectorizer.h (supportable_narrowing_operation): Prototype.
* tree-vect-transform.c (vectorizable_conversion): Handle
(nunits_in == nunits_out / 2) and (nunits_out == nunits_in / 2) cases.
(vect_gen_widened_results_half): Move before vectorizable_conversion.
(vectorizable_type_demotion): Call supportable_narrowing_operation()
to check for target support.
* optabs.c (optab_for_tree_code) Return vec_unpack[s|u]_float_hi_optab
for VEC_UNPACK_FLOAT_HI_EXPR, vec_unpack[s|u]_float_lo_optab
for VEC_UNPACK_FLOAT_LO_EXPR and vec_pack_[u|s]fix_trunc_optab
for VEC_PACK_FIX_TRUNC_EXPR.
(expand_binop): Special case mode of the result for
vec_pack_[u|s]fix_trunc_optab.
(init_optabs): Initialize vec_unpack[s|u]_[hi|lo]_optab and
vec_pack_[u|s]fix_trunc_optab.
* tree.def (VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR,
VEC_PACK_FIX_TRUNC_EXPR): New tree codes.
* tree-pretty-print.c (dump_generic_node): Handle
VEC_UNPACK_FLOAT_HI_EXPR, VEC_UNPACK_FLOAT_LO_EXPR and
VEC_PACK_FIX_TRUNC_EXPR.
(op_prio): Ditto.
* expr.c (expand_expr_real_1): Ditto.
* tree-inline.c (estimate_num_insns_1): Ditto.
* tree-vect-generic.c (expand_vector_operations_1): Ditto.
* config/i386/sse.md (vec_unpacks_float_hi_v8hi): New expander.
(vec_unpacks_float_lo_v8hi): Ditto.
(vec_unpacku_float_hi_v8hi): Ditto.
(vec_unpacku_float_lo_v8hi): Ditto.
(vec_unpacks_float_hi_v4si): Ditto.
(vec_unpacks_float_lo_v4si): Ditto.
(vec_pack_sfix_trunc_v2df): Ditto.
* doc/c-tree.texi (Expression trees) [VEC_UNPACK_FLOAT_HI_EXPR]:
Document.
[VEC_UNPACK_FLOAT_LO_EXPR]: Ditto.
[VEC_PACK_FIX_TRUNC_EXPR]: Ditto.
* doc/md.texi (Standard Names) [vec_pack_sfix_trunc]: Document.
[vec_pack_ufix_trunc]: Ditto.
[vec_unpacks_float_hi]: Ditto.
[vec_unpacks_float_lo]: Ditto.
[vec_unpacku_float_hi]: Ditto.
[vec_unpacku_float_lo]: Ditto.
testsuite/ChangeLog:
PR tree-optimization/24659
* gcc.dg/vect/vect-floatint-conversion-2.c: New test.
* gcc.dg/vect/vect-intfloat-conversion-1.c: Require vect_float,
not vect_int target.
* gcc.dg/vect/vect-intfloat-conversion-2.c: Require vect_float,
not vect_int target. Loop is vectorized for vect_intfloat_cvt
targets.
* gcc.dg/vect/vect-intfloat-conversion-3.c: New test.
* gcc.dg/vect/vect-intfloat-conversion-4a.c: New test.
* gcc.dg/vect/vect-intfloat-conversion-4b.c: New test.
From-SVN: r124784
|
|
call to expand_expr().
* builtins.c (expand_builtin_mathfn): Use EXPAND_NORMAL instead
of 0 in the call to expand_expr().
(expand_builtin_mathfn_3): Ditto.
(expand_builtin_interclass_mathfn): Ditto.
(expand_builtin_cexpi): Ditto.
(expand_builtin_int_roundingfn): Ditto.
(expand_builtin_int_roundingfn_2): Ditto.
(expand_builtin_pow): Ditto.
(expand_builtin_powi): Ditto.
(expand_builtin_bswap): Ditto.
(expand_builtin_unop): Ditto.
(expand_builtin_fabs): Ditto.
(get_builtin_sync_mem): Use NULL_RTX instead of NULL in
the call to expand_expr().
(expand_builtin_sync_operation): Ditto.
(expand_builtin_compare_and_swap): Ditto.
(expand_builtin_lock_test_and_set): Ditto.
* except.c (expand_builtin_eh_return_data_regno): Use EXPAND_NORMAL
instead of 0 in the call to expand_expr().
(expand_builtin_extract_return_addr): Ditto.
(expand_builtin_eh_return): Ditto.
(expand_eh_return): Ditto.
* explow.c (expr_size): Ditto.
* expr.c (optimize_bitfield_assignment_op): Ditto.
(expand_assignement): Ditto.
(store_expr): Ditto.
(store_field): Ditto.
(expand_expr_addr_expr_1): Use NULL_RTX instead of NULL in
the call to expand_expr().
(expand_expr_real_1) [COMPLEX_CST]: Use EXPAND_NORMAL instead of 0
in the call to expand_expr().
[CONSTRUCTOR, PLUS_EXPR, MINUS_EXPR, NEGATE_EXPR, ABS_EXPR,
BIT_NOT_EXPR, LSHIFT_EXPR, LT_EXPR, TRUTH_NOT_EXPR]: Ditto.
[VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO]: Use expand_normal() instead
of expand_expr().
* optabs.c (expand_vec_shift_expr): Ditto.
(expand_vec_cond_expr): Ditto.
(vector_compare_rtx): Use EXPAND_STACK_PARM instead of 1 in the
call to expand_expr().
* stmt.c (expand_return): Use EXPAND_NORMAL instead of 0
in the call to expand_expr().
From-SVN: r124722
|
|
* doc/md.texi (msub@var{m}@var{n}4, usub@var{m}@var{n}4): Document.
* optabs.h (OTI_smsub_widen, OTI_umsub_widen): New optab_indexes.
(smsub_widen_optab, umsub_widen_optab): Define.
* optabs.c (init_optabs): Initialize smsub_widen_optab and
umsub_widen_optab.
* genopinit.c (optabs): Fill in smsub_widen_optab and
umsub_widen_optab.
* expr.c (expand_expr_real_1): Try to use smsub_widen_optab
and umsub_widen_optab to implement multiply-subtract sequences.
* config/mips/mips.md (*msac<u>_di): Rename to...
(<u>msubsidi4): ...this. Extend condition to include
GENERATE_MADD_MSUB and TARGET_DSPR2. Change the constraint
of operand 0 to "ka" and use the three-operand form of msub<u>
for TARGET_DSPR2.
* config/mips/mips-dspr2.md (mips_msub, mips_msubu): Convert
to define_expands.
From-SVN: r124558
|
|
external ffs function.
gcc/
* optabs.c (set_conv_libfunc): Prefer libgcc2's __ffsMM2 functions
over an external ffs function.
From-SVN: r124096
|
|
gcc/
2007-xx-xx Chao-ying Fu <fu@mips.com>
Richard Sandiford <richard@nildram.co.uk>
* doc/md.texi (madd@var{m}@var{n}4, umadd@var{m}@var{n}4): Document.
* optabs.h (OTI_smadd_widen, OTI_umadd_widen): New optab_indexes.
(smadd_widen_optab, umadd_widen_optab): Define.
* optabs.c (init_optabs): Initialize smadd_widen_optab and
umadd_widen_optab.
* genopinit.c (optabs): Fill in smadd_widen_optab and
umadd_widen_optab.
* expr.c (expand_expr_real_1): Try to use smadd_widen_optab
and umadd_widen_optab to implement multiply-add sequences.
* config/mips/mips.md (*<su>mul_acc_di): Rename to...
(<u>maddsidi4): ...this. Extend condition to include
GENERATE_MADD_MSUB and TARGET_DSPR2. Change the constraint
of operand 0 to "ka" and use the three-operand form of madd<u>
for TARGET_DSPR2.
* config/mips/mips-dspr2.md (mips_madd, mips_maddu): Convert
to define_expands.
* config/mips/constraints.md (ka): New register constraint.
gcc/testsuite/
2007-xx-xx Richard Sandiford <richard@nildram.co.uk>
* gcc.target/mips/madd-1.c, gcc.target/mips/madd-2.c,
* gcc.target/mips/madd-3.c, gcc.target/mips/madd-4.c,
* gcc.target/mips/maddu-1.c, gcc.target/mips/maddu-2.c,
* gcc.target/mips/maddu-3.c, gcc.target/mips/maddu-4.c: New tests.
From-SVN: r124095
|
|
2007-04-22 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/24659
* optabs.h (enum optab_index) [OTI_vec_unpacks_hi,
OTI_vec_unpacks_lo]: Update comment to mention floating point operands.
(vec_pack_trunc_optab): Rename from vec_pack_mod_optab.
* genopinit.c (optabs): Rename vec_pack_mod_optab
to vec_pack_trunc_optab.
* tree-vect-transform.c (vectorizable_type_demotion): Do not fail
early for scalar floating point operands for NOP_EXPR.
(vectorizable_type_promotion): Ditto.
* optabs.c (optab_for_tree_code) [VEC_PACK_TRUNC_EXPR]: Return
vec_pack_trunc_optab.
(expand_binop): Rename vec_float_trunc_optab to vec_pack_mod_optab.
* tree.def (VEC_PACK_TRUNC_EXPR): Rename from VEC_PACK_MOD_EXPR.
* tree-pretty-print.c (dump_generic_node) [VEC_PACK_TRUNC_EXPR]:
Rename from VEC_PACK_MOD_EXPR.
(op_prio) [VEC_PACK_TRUNC_EXPR]: Ditto.
* expr.c (expand_expr_real_1): Ditto.
* tree-inline.c (estimate_num_insns_1): Ditto.
* tree-vect-generic.c (expand_vector_operations_1): Ditto.
* config/i386/sse.md (vec_unpacks_hi_v4sf): New expander.
(vec_unpacks_lo_v4sf): Ditto.
(vec_pack_trunc_v2df): Ditto.
(vec_pack_trunc_v8hi): Rename from vec_pack_mod_v8hi.
(vec_pack_trunc_v4si): Rename from vec_pack_mod_v4si.
(vec_pack_trunc_v2di): Rename from vec_pack_mod_v2di.
* config/rs6000/altivec.md (vec_pack_trunc_v8hi): Rename from
vec_pack_mod_v8hi.
(vec_pack_trunc_v4si): Rename from vec_pack_mod_v4si.
* doc/c-tree.texi (Expression trees) [VEC_PACK_TRUNC_EXPR]:
Rename from VEC_PACK_MOD_EXPR. This expression also represent
packing of floating point operands.
[VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR]: These expression also
represent unpacking of floating point operands.
* doc/md.texi (Standard Names) [vec_pack_trunc]: Update documentation.
[vec_unpacks_hi]: Ditto.
[vec_unpacks_lo]: Ditto.
testsuite/ChangeLog:
2007-04-22 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/24659
* gcc.dg/vect/vect-float-extend-1.c: New test.
* gcc.dg/vect/vect-float-truncate-1.c: New test.
From-SVN: r124045
|
|
Co-Authored-By: H.J. Lu <hongjiu.lu@intel.com>
Co-Authored-By: Marius Cornea <marius.cornea@intel.com>
From-SVN: r123185
|
|
* optabs.h (enum optab_index): Add new OTI_scalb.
(scalb_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize scalb_optab.
* genopinit.c (optabs): Implement scalb_optab using scalb?f3
patterns.
* builtins.c (expand_builtin_mathfn_2, expand_builtin): Handle
BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L} and BUILT_IN_SCALBLN{,F,L}.
(expand_builtin): Expand BUILT_IN_SCALB{,F,L}, BUILT_IN_SCALBN{,F,L}
and BUILT_IN_SCALBLN{,F,L} using expand_builtin_mathfn_2 if
flag_unsafe_math_optimizations is set.
* config/i386/i386.md (scalbxf3, scalb<mode>3): New expanders
to implement scalbf, scalb and scalbl built-ins as inline x87
intrinsics.
testsuite/ChangeLog
* gcc.dg/builtins-34.c: Add scalb/scalbn/scalbln cases.
From-SVN: r122162
|
|
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* tree.h (enum tree_code_class): Add tcc_vl_exp.
(VL_EXP_CLASS_P): New.
(TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(TREE_OPERAND_CHECK_CODE): Likewise.
(GIMPLE_STMT_OPERAND_CHECK): Likewise.
(TREE_RTL_OPERAND_CHECK): Likewise.
(tree_operand_check_failed): Make second parameter the whole tree
instead of its code. Fixed callers.
(VL_EXP_CHECK): New.
(TREE_OPERAND_LENGTH): New.
(VL_EXP_OPERAND_LENGTH): New.
(CALL_EXPR_FN): New.
(CALL_EXPR_STATIC_CHAIN): New.
(CALL_EXPR_ARGS): New.
(CALL_EXPR_ARG): New.
(call_expr_nargs): New.
(CALL_EXPR_ARGP): New.
(build_nt_call_list): Declare.
(build_vl_exp_stat): Declare.
(build_vl_exp): New.
(build_call_list): Declare.
(build_call_nary): Declare.
(build_call_valist): Declare.
(build_call_array): Declare.
(call_expr_arg): Declare.
(call_expr_argp): Declare.
(call_expr_arglist): Declare.
(fold_build_call_list): Declare.
(fold_build_call_list_initializer): Declare.
(fold_call_expr): Declare to replace fold_builtin.
(fold_builtin_fputs): Update to agree with modified definition.
(fold_builtin_strcpy): Likewise.
(fold_builtin_strncpy): Likewise.
(fold_builtin_memory_chk): Likewise.
(fold_builtin_stxcpy_chk): Likewise.
(fold_builtin_strncpy_chk): Likewise.
(fold_builtin_next_arg): Likewise.
(fold_build_call_expr): Declare.
(fold_builtin_call_list): Declare.
(fold_builtin_call_valist): Declare.
(build_call_expr): Declare.
(validate_arglist): Update to agree with modified definition.
(tree_operand_length): New.
(call_expr_arg_iterator): New.
(init_call_expr_arg_iterator): New.
(next_call_expr_arg): New.
(first_call_expr_arg): New.
(more_call_expr_args_p): New.
(FOR_EACH_CALL_EXPR_ARG): New.
* tree.c (tree_code_class_string): Add entries for tcc_vl_exp
and tcc_gimple_stmt.
(tree_code_size): Update documentation. Use sizeof (tree) rather
than sizeof (char *).
(tree_size): Likewise. Add case for tcc_vl_exp.
(tree_node_structure): Add case for tcc_vl_exp.
(contains_placeholder_p): Likewise.
(substitute_in_expr): Likewise.
(substitute_placeholder_in_expr): Likewise.
(stabilize_reference_1): Likewise.
(build3_stat): Remove logic for CALL_EXPRs. Replace with assertion
to diagnose breakage of this interface for constructing CALL_EXPRs.
(build_nt): Add similar assertion here.
(build_nt_call_list): New.
(simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors.
(iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(get_callee_fndecl): Use new CALL_EXPR accessors.
(tree_operand_check_failed): Change parameters to pass entire node
instead of its code, so that we can call TREE_OPERAND_LENGTH on it.
(process_call_operands): New.
(build_vl_exp_stat): New.
(build_call_list): New.
(build_call_nary): New.
(build_call_valist): New.
(build_call_array): New.
(walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(call_expr_arglist): New.
* tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use
tcc_vl_exp instead of a fixed-size tcc_expression.
* doc/c-tree.texi (CALL_EXPR): Document new representation and
accessors for CALL_EXPRs.
(AGGR_INIT_EXPR): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* builtins.c (c_strlen): Return NULL_TREE instead of 0.
(expand_builtin_nonlocal_goto): Change parameter to be entire
CALL_EXPR instead of an arglist. Use new CALL_EXPR accessors.
(expand_builtin_prefetch): Likewise.
(expand_builtin_classify_type): Likewise.
(mathfn_built_in): Return NULL_TREE instead of 0.
(expand_errno_check): Use new CALL_EXPR accessors.
(expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors.
Return NULL_RTX instead of 0.
(expand_builtin_mathfn_2): Likewise.
(expand_builtin_mathfn_3): Likewise.
(expand_builtin_interclass_mathfn): Likewise.
(expand_builtin_sincos): Likewise.
(expand_builtin_cexpi): Likewise.
(expand_builtin_int_roundingfn): Likewise.
(expand_builtin_int_roundingfn_2): Likewise.
(expand_builtin_pow): Likewise.
(expand_builtin_powi): Likewise.
(expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead
of arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_RTX instead of 0.
(expand_builtin_strstr): Likewise.
(expand_builtin_strchr): Likewise.
(expand_builtin_strrchr): Likewise.
(expand_builtin_strpbrk): Likewise.
(expand_builtin_memcpy): Likewise.
(expand_builtin_mempcpy): Likewise.
(expand_builtin_mempcpy_args): New.
(expand_builtin_memmove): Similarly to expand_builtin_mempcpy.
(expand_builtin_memmove_args): New.
(expand_builtin_bcopy): Similarly to expand_builtin_mempcpy.
(expand_movstr): Likewise.
(expand_builtin_strcpy): Likewise.
(expand_builtin_strcpy_args): New.
(expand_builtin_stpcpy): Similarly to expand_builtin_strcpy.
(expand_builtin_strncpy): Likewise.
(expand_builtin_memset): Likewise.
(expand_builtin_memset_args): New.
(expand_builtin_bzero): Similarly to expand_builtin_memset.
(expand_builtin_memcmp): Likewise.
(expand_builtin_strcmp): Likewise.
(expand_builtin_strncmp): Likewise.
(expand_builtin_strcat): Likewise.
(expand_builtin_strncat): Likewise.
(expand_builtin_strspn): Likewise.
(expand_builtin_strcspn): Likewise.
(expand_builtin_args_info): Likewise.
(expand_builtin_va_start): Likewise.
(gimplify_va_arg_expr): Likewise.
(expand_builtin_va_end): Likewise.
(expand_builtin_va_copy): Likewise.
(expand_builtin_frame_address): Likewise.
(expand_builtin_alloca): Likewise.
(expand_builtin_bswap): Likewise.
(expand_builtin_unop): Likewise.
(expand_builtin_fputs): Likewise.
(expand_builtin_expect): Likewise.
(expand_builtin_fabs): Likewise.
(expand_builtin_copysign): Likewise.
(expand_builtin_printf): Likewise.
(expand_builtin_fprintf): Likewise.
(expand_builtin_sprintf): Likewise.
(expand_builtin_init_trampoline): Likewise.
(expand_builtin_signbit): Likewise.
(expand_builtin_fork_or_exec): Likewise.
(expand_builtin_sync_operation): Likewise.
(expand_builtin_compare_and_swap): Likewise.
(expand_builtin_lock_test_and_set): Likewise.
(expand_builtin_lock_release): Likewise.
(expand_builtin): Likewise.
(builtin_mathfn_code): Likewise.
(fold_builtin_constant_p): Pass call arguments individually instead
of as an arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_TREE instead of 0.
(fold_builtin_expect): Likewise.
(fold_builtin_classify_type): Likewise.
(fold_builtin_strlen): Likewise.
(fold_builtin_nan): Likewise.
(integer_valued_real_p): Likewise.
(fold_trunc_transparent_mathfn): Likewise.
(fold_fixed_mathfn): Likewise.
(fold_builtin_cabs): Likewise.
(fold_builtin_sqrt): Likewise.
(fold_builtin_cbrt): Likewise.
(fold_builtin_cos): Likewise.
(fold_builtin_cosh): Likewise.
(fold_builtin_tan): Likewise.
(fold_builtin_sincos): Likewise.
(fold_builtin_cexp): Likewise.
(fold_builtin_trunc): Likewise.
(fold_builtin_floor): Likewise.
(fold_builtin_ceil): Likewise.
(fold_builtin_round): Likewise.
(fold_builtin_int_roundingfn): Likewise.
(fold_builtin_bitop): Likewise.
(fold_builtin_bswap): Likewise.
(fold_builtin_logarithm): Likewise.
(fold_builtin_hypot): Likewise.
(fold_builtin_pow): Likewise.
(fold_builtin_powi): Likewise.
(fold_builtin_exponent): Likewise.
(fold_builtin_memset): Likewise.
(fold_builtin_bzero): Likewise.
(fold_builtin_memory_op): Likewise.
(fold_builtin_bcopy): Deleted; call site changed to invoke
fold_builtin_memory_op directly.
(fold_builtin_strcpy): Similarly as for fold_builtin_memory_op.
(fold_builtin_strncpy): Likewise.
(fold_builtin_memcmp): Likewise.
(fold_builtin_strcmp): Likewise.
(fold_builtin_strncmp): Likewise.
(fold_builtin_signbit): Likewise.
(fold_builtin_copysign): Likewise.
(fold_builtin_isascii): Likewise.
(fold_builtin_toascii): Likewise.
(fold_builtin_isdigit): Likewise.
(fold_builtin_fabs): Likewise.
(fold_builtin_abs): Likewise.
(fold_builtin_fmin_fmax): Likewise.
(fold_builtin_carg): Likewise.
(fold_builtin_classify): Likewise.
(fold_builtin_unordered_cmp): Likewise.
(fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4):
New functions split out from fold_builtin_1.
(fold_builtin_n): New.
(fold_builtin_varargs): New.
(fold_builtin): Deleted. Most callers changed to use fold_call_expr
instead.
(fold_call_expr): New.
(build_function_call_expr): Rewrite to use new helper function.
(fold_builtin_call_list): New.
(build_call_expr): New.
(fold_builtin_call_valist): New.
(rewrite_call_expr): New.
(validate_arg): New.
(validate_arglist): Change parameter to be entire CALL_EXPR instead
of an arglist. Change return type to bool. Use new CALL_EXPR
accessors.
(fold_builtin_strstr): Pass call arguments individually instead
of as an arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_TREE instead of 0.
(fold_builtin_strchr): Likewise.
(fold_builtin_strrchr): Likewise.
(fold_builtin_strpbrk): Likewise.
(fold_builtin_strcat): Likewise.
(fold_builtin_strncat): Likewise.
(fold_builtin_strspn): Likewise.
(fold_builtin_strcspn): Likewise.
(fold_builtin_fputs): Likewise.
(fold_builtin_next_arg): Likewise.
(fold_builtin_sprintf): Likewise.
(expand_builtin_object_size): Use new CALL_EXPR accessors. Use
NULL_RTX instead of 0.
(expand_builtin_memory_chk): Likewise.
(maybe_emit_chk_warning): Likewise.
(maybe_emit_sprintf_chk_warning): Likewise.
(fold_builtin_object_size): Pass call arguments individually instead
of as an arglist, fixing callers appropriately. Use new CALL_EXPR
accessors and constructors. Return NULL_TREE instead of 0.
(fold_builtin_memory_chk): Likewise.
(fold_builtin_stxcpy_chk): Likewise.
(fold_builtin_strncpy_chk): Likewise.
(fold_builtin_strcat_chk): Likewise.
(fold_builtin_strcat_chk): Likewise.
(fold_builtin_strncat_chk): Likewise.
(fold_builtin_sprintf_chk): Likewise.
(fold_builtin_snprintf_chk): Likewise.
(fold_builtin_printf): Likewise.
(fold_builtin_vprintf): Likewise.
* fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and
constructors.
(operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case.
(make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(extract_muldiv_1): Add VL_EXP_CLASS_P case.
(fold_mathfn_compare): Use new CALL_EXPR accessors and constructors.
(fold_unary): Likewise.
(fold_binary): Likewise.
(fold_ternary): Remove CALL_EXPR case, since they are no longer
ternary expressions.
(fold): Add logic for tcc_vl_exp.
(fold_checksum_tree): Make it know about tcc_vl_exp. Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(fold_build3_stat): Add assertion to flag broken interface for
constructing CALL_EXPRs.
(fold_build_call_list): New.
(fold_build_call_list_initializer): New.
(tree_expr_nonnegative_p): Use new CALL_EXPR accessors and
constructors.
(fold_strip_sign_ops): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR
accessors and dump arguments explicitly.
* tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(dump_generic_node): Use new CALL_EXPR accessors and walk arguments
explicitly.
(print_call_name): Use new CALL_EXPR accessors.
* print-tree.c (print_node): Add case tcc_vl_exp. Print
CALL_EXPR arguments explicitly instead of as a list. Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
* tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors.
(vrp_visit_stmt): Likewise.
* tree-ssa-loop-im.c (outermost_invariant_loop_expr): Make it
know about tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
(force_move_till_expr): Likewise.
* targhooks.c (default_external_stack_protect_fail): Use
build_call_expr instead of build_function_call_expr.
(default_hidden_stack_protect_fail): Likewise.
* tree-complex.c (expand_complex_libcall): Use build_call_expr to
build the call.
* cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors
and walk arguments explicitly.
* tree-ssa-loop-niter.c (simplify_replace_tree): Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(expand_simple_operations): Likewise.
(infer_loop_bounds_from_array): Use new CALL_EXPR accessors.
* gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead
of TREE_CODE_LENGTH.
(walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs.
* optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
* value_prof.c (tree_ic): Use new CALL_EXPR accessors.
(tree_ic_transform): Likewise.
(interesting_stringop_to_profile_p): Pass entire CALL_EXPR as
parameter instead of arglist. Fix callers.
(tree_stringop_fixed_value): Use new CALL_EXPR accessors.
(tree_stringops_transform): Likewise.
(tree_indirect_call_to_profile): Likewise.
(tree_stringops_values_to_profile): Likewise.
* tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator.
(eliminate_tail_call): Likewise.
* ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors.
* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
Use TREE_OPERAND_LENGTH and generalize to handle any number of
operands.
(instantiate_parameters_1): Can't handle tcc_vl_exp here.
* omp-low.c (build_omp_barrier): Use build_call_expr.
(lower_rec_input_clauses): Likewise.
(lower_reduction_clauses): Likewise.
(expand_parallel_call): Likewise.
(maybe_catch_exception): Likewise.
(expand_omp_for_generic): Likewise.
(expand_omp_for_static_nochunk): Likewise.
(expand_omp_sections): Likewise.
(lower_omp_single_simple): Likewise.
(lower_omp_single_copy): Likewise.
(lower_omp_master): Likewise.
(lower_omp_ordered): Likewise.
(lower_omp_critical): Likewise.
* ipa-reference.c (check-call): Use new CALL_EXPR iterator.
(scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR.
* tree-gimple.c (is_gimple_call_addr): Fix doc.
(recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH. Add tcc_vl_exp case.
* tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH
and generalize to handle any number of operands.
(chrec_contains_undetermined): Likewise.
(tree_contains_chrecs): Likewise.
(evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH.
* cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors.
* tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors. Use
fold_call_expr instead of fold_builtin.
(ccp_fold_builtin): Likewise. Update calls into builtins.c to
match declarations there.
(fold_stmt): Use new CALL_EXPR constructor and accessors. Doc
updates.
* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
* ipa-pure-const.c (check_call): Use new CALL_EXPR accessors.
(scan_function): Add case tcc_vl_exp for CALL_EXPR.
* tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR
accessors.
* tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr.
(execute_cse_sincos): Use new CALL_EXPR accessors.
* tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator.
* gimple-low.c (lower_function_body): Use build_call_expr.
(lower_builtin_setjmp): Likewise.
* expr.c (emit_block_move_via_libcall): Use build_call_expr.
(set_storage_via_libcall): Likewise.
(safe_from_p): Add tcc_vl_exp case. Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
(expand_expr_real_1): Use new CALL_EXPR accessors.
* tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and
generalize to handle any number of operands.
(TB_parent_eq): Likewise.
* predict.c (expr_expected_value): Use new CALL_EXPR accessors.
(strip_builtin_expect): Likewise.
* function.c (gimplify_parameters): Use build_call_expr.
* tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
* ipa-type-escape.c (check_call): Use new CALL_EXPR iterators.
(scan_for_refs): Add case tcc_vl_exp for CALL_EXPR.
* tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR
iterators.
* gimplify.c (build_stack_save_restore): Use build_call_expr.
(gimplify_decl_expr): Likewise.
(gimplify_call_expr): Use fold_call_expr instead of fold_builtin.
Use new CALL_EXPR iterators.
(gimplify_modify_expr_to_memcpy): Use build_call_expr.
(gimplify_modify_expr_to_memset): Likewise.
(gimplify_variable_sized_compare): Likewise.
(gimplify_omp_atomic_fetch_op): Likewise.
(gimplify_omp_atomic_pipeline): Likewise.
(gimplify_omp_atomic_mutex): Likewise.
(gimplify_function_tree): Likewise.
* calls.c (alloca_call_p): Use new CALL_EXPR accessors.
(call_expr_flags): Likewise.
(expand_call): Likewise.
* except.c (expand_builtin_eh_return_data_regno): Pass entire
CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR
accessors.
* coverage.c (create_coverage): Use build_call_expr.
* tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete.
(temp_call_expr_obstack): New.
(pool_copy_list): Delete.
(temp_copy_call_expr): New.
(phi_translate): Add case tcc_vl_exp for CALL_EXPR. Use new
CALL_EXPR accessors. Get rid of special goo for copying argument
lists and use temp_copy_call_expr instead.
(valid_in_sets): Add case tcc_vl_exp for CALL_EXPR. Use new
CALL_EXPR accessors.
(create_expression_by_pieces): Likewise. Use build_call_array
to construct the result instead of fold_build3.
(create_value_expr_from): Add tcc_vl_exp. Delete special goo for
dealing with argument lists.
(init_pre): Remove references to expression_node_pool and
list_node_pool. Init temp_call_expr_obstack instead.
(fini_pre): Remove references to expression_node_pool and
list_node_pool.
* tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors
and walk arguments explicitly instead of as a list.
* tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr.
(mx_register_decls): Likewise.
(mudflap_register_call): Likewise.
(mudflap_finish_file): Likewise.
* ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors.
(ipa_callsite_compute_param): Likewise.
* tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR
accessors and constructor.
* tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR
accessors and constructor.
(convert_tramp_reference): Likewise.
(convert_call_expr): Likewise.
(finalize_nesting_tree_1): Likewise.
* tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR
accessors.
* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr.
* tree-inline.c (initialize_inlined_parameters): Pass entire
CALL_EXPR as parameter instead of arglist. Use new CALL_EXPR
accessors.
(estimate_num_insns_1): Use new CALL_EXPR accessors.
(expand_call_inline): Tidy up call to initialize_inlined_parameters.
* tree-vect-transform.c (vect_create_epilog_for_reduction): Use
TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
(vectorizable_reduction): Likewise.
(vectorizable_call): Use new CALL_EXPR iterators.
(vectorizable_conversion): Use build_call_expr.
(vectorizable_operation): Use TREE_OPERAND_LENGTH.
(vect_gen_widened_results_half): Use build_call_expr.
(vect_setup_realignment): Likewise.
(vectorizable_live_operation): Use TREE_OPERAND_LENGTH.
* tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors.
(pass_through_call): Likewise.
(compute_object_sizes): Likewise. Use fold_call_expr instead of
fold_builtin.
* tree-profile.c (tree_gen_interval_profiler): Use build_call_expr.
(tree_gen_pow2_profiler): Likewise.
(tree_gen_one_value_profiler): Likewise.
(tree_gen_ic_func_profiler): Likewise.
(tree_gen_average_profiler): Likewise.
(tree_gen_ior_profiler): Likewise.
* tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp.
(find_func_aliases): Use new CALL_EXPR accessors. Add case
tcc_vl_exp. Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
* tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead
of TREE_CODE_LENGTH.
* stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead
of TREE_CODE_LENGTH.
* convert.c (convert_to_real): Use new CALL_EXPR accessors and
constructor.
(convert_to_integer): Likewise.
* tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR
accessors.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR
accessors.
* config/frv/frv.c (frv_expand_builtin): Likewise.
* config/s390/s390.c (s390_expand_builtin): Likewise.
* config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr.
(sparc_expand_builtin): Use new CALL_EXPR accessors.
* config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise.
(ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter
instead of arglist. Use new CALL_EXPR accessors on it. Fix callers.
(ix86_expand_store_builtin): Likewise.
(ix86_expand_unop_builtin): Likewise.
(ix86_expand_unop1_builtin): Likewise.
(ix86_expand_sse_compare): Likewise.
(ix86_expand_sse_comi): Likewise.
(ix86_expand_vec_init_builtin): Likewise.
(ix86_expand_vec_ext_builtin): Likewise.
(ix86_expand_vec_set_builtin): Likewise.
(ix86_expand_builtin): Use new CALL_EXPR accessors.
* config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors.
* config/c4x/c4x.c (c4x_expand_builtin): Likewise.
* config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR
instead of arglist. Use new CALL_EXPR accessors. Fix callers.
(iq2000_expand_builtin): Use new CALL_EXPR accessors.
* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use
build_call_expr.
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise.
(rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of
arglist. Use new CALL_EXPR accessors. Fix callers.
(altivec_expand_abs_builtin): Likewise.
(rs6000_expand_binop_builtin): Likewise.
(altivec_expand_predicate_builtin): Likewise.
(altivec_expand_lv_builtin): Likewise.
(spe_expand_stv_builtin): Likewise.
(altivec_expand_stv_builtin): Likewise.
(rs6000_expand_ternop_builtin): Likewise.
(altivec_expand_ld_builtin): Use new CALL_EXPR accessors.
(altivec_expand_st_builtin): Likewise.
(altivec_expand_dst_builtin): Likewise.
(altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of
arglist. Use new CALL_EXPR accessors. Fix callers.
(altivec_expand_vec_set_builtin): Likewise.
(altivec_expand_vec_ext_builtin): Likewise.
(altivec_expand_builtin): Use new CALL_EXPR accessors.
(spe_expand_builtin): Likewise.
(spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of
arglist. Use new CALL_EXPR accessors. Fix callers.
(spe_expand_evsel_builtin): Likewise.
(rs6000_expand_builtin): Use new CALL_EXPR accessors. VCFUX and
FCFSX cases must construct whole new CALL_EXPR, not just arglist.
* config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR
instead of arglist. Use new CALL_EXPR accessors. Fix callers.
(arm_expand_unop_builtin): Likewise.
(arm_expand_builtin): Use new CALL_EXPR accessors.
* config/mips/mips.c (mips_expand_builtin): Use new CALL_EXPR
accessors.
* config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR
instead of arglist. Use new CALL_EXPR accessors. Fix callers.
(bfin_expand_unop_builtin): Likewise.
(bfin_expand_builtin): Use new CALL_EXPR accessors.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* c-semantics.c (build_stmt): Add internal diagnostic check.
* c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR
accessors. Print arguments explicitly instead of as a list.
* c-typeck.c (build_function_call): Use new CALL_EXPR constructors.
* c-omp.c (c_finish_omp_barrier): Use build_call_expr.
(c_finish_omp_flish): Likewise.
* c-common.c (verify_tree): Use new CALL_EXPR accessors. Traverse
arguments explicitly instead of as a list. Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
(check_function_arguments_recurse): Use new CALL_EXPR accessors.
(c_warn_unused_result): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
Change class to tcc_vl_exp.
* call.c (build_call): Use build_call_list instead
of build3.
(build_over_call): Likewise.
(build_new_method_call): Use build_min_non_dep_call_list
instead of build_min_non_dep.
* error.c (dump_call_expr_args): New function.
(dump_aggr_init_expr_args): New function.
(dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them.
Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.
* cvt.c (convert_to_void): Use build_call_array instead
of build3; use new AGGR_INIT_EXPR accessor macros.
* mangle.c (write_expression): Use TREE_OPERAND_LENGTH
instead of TREE_CODE_LENGTH.
* dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
AGGR_INIT_EXPR accessor macros.
* cp-gimplify.c (cp_gimplify_init_expr): Use
AGGR_INIT_EXPR_SLOT to set the slot operand.
* cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
(AGGR_INIT_EXPR_SLOT): New macro.
(AGGR_INIT_EXPR_ARG): New macro.
(aggr_init_expr_nargs): New macro.
(AGGR_INIT_EXPR_ARGP): New macro.
(aggr_init_expr_arg_iterator): New.
(init_aggr_init_expr_arg_iterator): New.
(next_aggr_init_expr_arg): New.
(first_aggr_init_expr_arg): New.
(more_aggr_init_expr_args_p): New.
(FOR_EACH_AGGR_INIT_EXPR_ARG): New.
(stabilize_aggr_init): New declaration.
(build_min_non_dep_call_list): Likewise.
* tree.c (process_aggr_init_operands): New function.
(build_aggr_init_array) New function.
(build_cplus_new): Update to use new CALL_EXPR and
AGGR_INIT_EXPR accessor macros. Replace use of build3 with
build_aggr_init_array.
(build_min_non_dep_call_list) New function.
(build_min_nt): Assert input code parameter is not a variable
length expression class.
(build_min, build_min_non_dep): Likewise.
(cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
to check for equality instead of recursing. Handle tcc_vl_exp
tree code classes.
(stabilize_call): Update to only handle CALL_EXPRs, not
AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
(stabilize_aggr_init): New function.
(stabilize_init): Use it.
* cxx-pretty-print.c (pp_cxx_postfix_expression)
<AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
AGGR_INIT_EXPR accessor macros and argument iterators.
* pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
build_vl_exp. Iterate through the operands, recursively
processing each one.
(tsubst_copy_and_build) <CALL_EXPR>: Update to use new
CALL_EXPR accessor macros.
(value_dependent_expression_p) <default>: Handle tcc_vl_exp
tree code classes. Use TREE_OPERAND_LENGTH instead of
TREE_CODE_LENGTH.
* semantics.c (finish_call_expr): Use build_nt_call_list
instead of build_nt.
(simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR
accessor macros. Use build_call_array to construct the
CALL_EXPR node instead of build3
* decl2.c (build_offset_ref_call_from_tree): Use
build_nt_call_list and build_min_non_dep_call_list instead
of build_min_nt and build_min_non_dep.
* parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
Use build_nt_call_list instead of build_min_nt.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
of build3.
(BUILD_MONITOR_EXIT): Likewise.
* java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
(java_gimplify_modify_expr): Likewise.
* class.c (cache_this_class_ref): Use build_call_expr.
(build_static_field_ref): Likewise.
(emit_indirect_register_classes): Likewise.
(emit_register_classes): Likewise.
* resource.c (write_resource_constructor): Use build_call_expr.
* builtins.c (builtin_creator_function): Change interpretation of
the second parameter to be the whole CALL_EXPR instead of the arglist.
(max_builtin): Tweak parameter list. Use new CALL_EXPR accessors.
(min_builtin): Likewise.
(abs_builtin): Likewise.
(java_build_function_call_expr): Likewise.
(convert_real): Likewise.
(UNMARSHAL3): Likewise.
(UNMARSHAL4): Likewise.
(UNMARSHAL5): Likewise.
(build_arglist_for_builtin): Delete. Fix callers to use
build_call_expr instead.
(putObject_builtin): Tweak parameter list. Use new CALL_EXPR
accessors.
(compareAndSwapInt_builtin): Likewise.
(compareAndSwapLong_builtin): Likewise.
(compareAndSwapObject_builtin): Likewise.
(putVolatile_builtin): Likewise.
(getVolatile_builtin): Likewise.
(VMSupportsCS8_builtin): Likewise.
(check_for_builtin): Pass entire CALL_EXPR to builtin expander
instead of arglist.
* expr.c (build_java_athrow): Use build_call_nary instead of build3.
(build_java_throw_out_of_bounds_exception): Likewise.
(java_check_reference): Likewise.
(build_java_arraystore_check): Likewise.
(build_newarray): Likewise.
(build_anewarray): Likewise.
(expand_java_multinewarray): Use build_call_list instead of build3.
(build_java_monitor): Use build_call_nary instead of build3.
(java_create_object): Likewise.
(expand_java_NEW): Likewise.
(build_instanceof): Likewise.
(expand_java_CHECKCAST): Likewise.
(build_java_soft_divmod): Likewise.
(build_java_binop): Likewise.
(build_field_ref): Likewise.
(build_class_init): Likewise.
(rewrite_arglist_getcaller): Use build_call_expr.
(build_invokeinterface): Use build_call_nary instead of build3.
(expand_invoke): Use build_call_list instead of build3.
(build_jni_stub): Use build_call_nary, build_call_list, or
build_call_expr instead of build3.
(expand_java_field_op): Use build_call_expr instead of build3.
(force_evaluation_order): Use new CALL_EXPR accessors.
* lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
(objc_get_callee_fndecl): Likewise.
2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
Brooks Moses <brooks.moses@codesourcery.com>
Lee Millward <lee.millward@codesourcery.com>
* trans-expr.c (gfc_conv_power_op): Use build_call_expr.
(gfc_conv_string_tmp): Likewise.
(gfc_conv_concat_op): Likewise.
(gfc_build_compare_string): Likewise.
(gfc_conv_function_call): Use build_call_list instead of build3.
* trans-array.c (gfc_trans_allocate_array_storage): Use
build_call_expr.
(gfc_grow_array): Likewise.
(gfc_trans_array_ctor_element): Likewise.
(gfc_trans_array_constructor_value): Likewise.
(gfc_array_allocate): Likewise.
(gfc_array_deallocate): Likewise.
(gfc_trans_auto_array_allocation): Likewise.
(gfc_trans_dummy_array_bias): Likewise.
(gfc_conv_array_parameter): Likewise.
(gfc_trans_dealloc_allocated): Likewise.
(gfc_duplicate_allocatable): Likewise.
* trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
(gfc_trans_omp_flush): Likewise.
* trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
(gfc_trans_pause): Likewise.
(gfc_trans_stop): Likewise.
(gfc_trans_character_select): Likewise.
(gfc_do_allocate): Likewise.
(gfc_trans_assign_need_temp): Likewise.
(gfc_trans_pointer_assign_need_temp): Likewise.
(gfc_trans_forall_1): Likewise.
(gfc_trans_where_2): Likewise.
(gfc_trans_allocate): Likewise.
(gfc_trans_deallocate): Likewise.
* trans.c (gfc_trans_runtime_check): Use build_call_expr.
* trans-io.c (gfc_trans_open): Use build_call_expr.
(gfc_trans_close): Likewise.
(build_filepos): Likewise.
(gfc_trans_inquire): Likewise.
(NML_FIRST_ARG): Delete.
(NML_ADD_ARG): Delete.
(transfer_namelist_element): Use build_call_expr.
(build_dt): Likewise.
(gfc_trans_dt_end): Likewise.
(transfer_expr): Likewise.
(transfer_array-desc): Likewise.
* trans-decl.c (gfc_generate_function_code): Use build_call_expr.
(gfc_generate_constructors): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
(gfc_conv_intrinsic_fdate): Likewise.
(gfc_conv_intrinsic_ttynam): Likewise.
(gfc_conv_intrinsic_array_transfer): Likewise.
(gfc_conv_associated): Likewise.
(gfc_conv_intrinsic_si_kind): Likewise.
(gfc_conv_intrinsic_trim): Likewise.
(gfc_conv_intrinsic_repeat: Likewise.
(gfc_conv_intrinsic_iargc): Likewise.
Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com>
Co-Authored-By: Lee Millward <lee.millward@codesourcery.com>
From-SVN: r122018
|
|
* config/i386/i386.md (bswapsi_1): Rename from bswapsi2,
remove flags clobber.
(bswapsi2): New expander, emit code for !TARGET_BSWAP.
(bswaphi_lowpart): New.
(bswapdi2): Rename from bswapdi2_rex, remove flags clobber,
remove TARGET_BSWAP test. Delete expander of the same name.
* optabs.c (widen_bswap, expand_doubleword_bswap): New.
(expand_unop): Use them.
From-SVN: r121884
|
|
* optabs.h (enum optab_index): Add new OTI_isinf.
(isinf_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize isinf_optab.
* genopinit.c (optabs): Implement isinf_optab using isinf?f2
patterns.
* builtins.c (mathfn_built_in): Handle BUILT_IN_ISINF{,F,L}.
(expand_builtin_interclass_mathfn): Expand BUILT_IN_ISINF{,F,L}
using isinf_optab.
(expand_builtin): Expand BUILT_IN_ISINF{,F,L} using
expand_builtin_interclass_mathfn.
* reg_stack.c (subst_stack_regs_pat): Handle UNSPEC_FXAM.
* config/i386/i386.md (UNSPEC_FXAM): New constant.
(fxam<mode>2_i387): New insn pattern.
(isinf<mode>2) New expander to implement isinf, isinff and isinfl
built-in functions as x87 inline asm.
testsuite/ChangeLog:
* gcc.dg/builtins-63.c: New test.
From-SVN: r121419
|
|
./: * common.opt: Add fstrict-overflow.
* opts.c (decode_options): Set flag_strict_overflow if -O2.
* flags.h (TYPE_OVERFLOW_WRAPS): Define.
(TYPE_OVERFLOW_UNDEFINED): Define.
(TYPE_OVERFLOW_TRAPS): Define. This replaces TYPE_TRAP_SIGNED.
Replace all uses.
* tree.h (TYPE_TRAP_SIGNED): Don't define.
* fold-const.c (negate_expr_p): Use TYPE_OVERFLOW_UNDEFINED.
(fold_negate_expr): Likewise.
(make_range): Likewise.
(extract_muldiv_1): Likewise.
(maybe_canonicalize_comparison): Likewise.
(fold_comparison): Likewise.
(fold_binary): Likewise.
(tree_expr_nonnegative_p): Likewise.
(tree_expr_nonzero_p): Likewise.
* tree-vrp.c (compare_values): Likewise.
(extract_range_from_binary_expr): Likewise.
(extract_range_from_unary_expr): Likewise.
* tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness):
Likewise.
(nowrap_type_p): Likewise.
* tree-scalar-evolution.c (simple_iv): Likewise.
* fold-const.c (negate_expr_p): Use TYPE_OVERFLOW_WRAPS.
(build_range_check): Likewise.
(extract_muldiv_1): Likewise.
(fold_comparison): Likewise.
* tree-vrp.c (vrp_int_const_binop): Likewise.
(extract_range_from_unary_expr): Likewise.
* convert.c (convert_to_integer): Likewise.
* fold-const.c (fold_negate_expr): Use TYPE_OVERFLOW_TRAPS.
(fold_comparison): Likewise.
(fold_binary): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* tree-vectorizer.c (vect_is_simple_reduction): Likewise.
* simplify-rtx.c (simplify_const_relational_operation): Check
flag_strict_overflow and flag_trapv.
(simplify_const_relational_operation): Likewise.
* doc/invoke.texi (Option Summary): Mention -fstrict-overflow.
(Optimize Options): Add -fstrict-overflow to -O2 list. Document
-fstrict-overflow.
testsuite/:
* gcc.dg/strict-overflow-1.c: New test.
* gcc.dg/no-strict-overflow-1.c: New test.
* gcc.dg/strict-overflow-2.c: New test.
* gcc.dg/no-strict-overflow-2.c: New test.
* gcc.dg/strict-overflow-3.c: New test.
* gcc.dg/no-strict-overflow-3.c: New test.
* gcc.dg/strict-overflow-4.c: New test.
* gcc.dg/no-strict-overflow-4.c: New test.
* gcc.dg/fold-mod-1.c: Add -fstrict-overflow option.
* gcc.dg/pr15784-1.c: Likewise.
* gcc.dg/pr20922-1.c: Likewise.
* gcc.dg/pr20922-3.c: Likewise.
* gcc.dg/pr20922-4.c: Likewise.
* gcc.dg/pr20922-6.c: Likewise.
* gcc.dg/compare-4.c: Likewise.
* gcc.dg/torture/pr26898-1.c: Likewise.
* gcc.dg/tree-ssa/divide-1.c: Likewise.
* gcc.dg/tree-ssa/divide-2.c: Likewise.
* gcc.dg/tree-ssa/divide-3.c: Likewise.
* gcc.dg/tree-ssa/divide-4.c: Likewise.
* gcc.dg/tree-ssa/pr14490-1.c: Likewise.
* gcc.dg/tree-ssa/pr14490-3.c: Likewise.
* gcc.dg/tree-ssa/pr21082.c: Likewise.
* gcc.dg/tree-ssa/pr26899.c: Likewise.
* g++.dg/tree-ssa/pr21082.C: Likewise.
From-SVN: r121254
|
|
* doc/c-tree.texi: Document new tree codes.
* doc/md.texi: Document new optabs.
* tree-pretty-print.c (dump_generic_node): Handle print of new tree
codes.
* optabs.c (optab_for_tree_code, init_optabs): Handle new optabs.
* optabs.h (optab_index): Add new.
(vec_extract_even_optab, vec_extract_odd_optab,
vec_interleave_high_optab, vec_interleave_low_optab): New optabs.
* genopinit.c (vec_extract_even_optab, vec_extract_odd_optab,
vec_interleave_high_optab, vec_interleave_low_optab): Initialize
new optabs.
* expr.c (expand_expr_real_1): Add implementation for new tree codes.
* tree-vectorizer.c (new_stmt_vec_info): Initialize new fields.
* tree-vectorizer.h (stmt_vec_info): Add new fields for interleaving
along with macros for their access.
* tree-data-ref.h (first_location_in_loop, data_reference): Update
comment.
* tree-vect-analyze.c (toplev.h): Include.
(vect_determine_vectorization_factor): Fix indentation.
(vect_insert_into_interleaving_chain,
vect_update_interleaving_chain, vect_equal_offsets): New functions.
(vect_analyze_data_ref_dependence): Add argument for interleaving
check. Check for interleaving if it's true.
(vect_check_dependences): New function.
(vect_analyze_data_ref_dependences): Call vect_check_dependences for
every ddr. Call vect_analyze_data_ref_dependence with new argument.
(vect_update_misalignment_for_peel): Update for interleaving.
(vect_verify_datarefs_alignment): Check only first data-ref for
interleaving.
(vect_enhance_data_refs_alignment): Update for interleaving. Check
only first data-ref for interleaving.
(vect_analyze_data_ref_access): Check interleaving, update
interleaving data.
(vect_analyze_data_refs): Call compute_data_dependences_for_loop
with different parameters.
* tree.def (VEC_EXTRACT_EVEN_EXPR, VEC_EXTRACT_ODD_EXPR,
VEC_INTERLEAVE_HIGH_EXPR, VEC_INTERLEAVE_LOW_EXPR): New tree codes.
* tree-inline.c (estimate_num_insns_1): Add cases for new codes.
* tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
Update step in case of interleaving.
(vect_strided_store_supported, vect_permute_store_chain): New
functions.
(vectorizable_store): Handle strided stores.
(vect_strided_load_supported, vect_permute_load_chain,
vect_transform_strided_load): New functions.
(vectorizable_load): Handle strided loads.
(vect_transform_stmt): Add argument. Handle strided stores. Check
that vectorized stmt exists for patterns.
(vect_gen_niters_for_prolog_loop): Update calculation for
interleaving.
(vect_transform_loop): Remove stmt_vec_info for strided stores after
whole chain vectorization.
* config/rs6000/altivec.md (UNSPEC_EXTEVEN, UNSPEC_EXTODD,
UNSPEC_INTERHI, UNSPEC_INTERLO): New constants.
(vpkuhum_nomode, vpkuwum_nomode, vec_extract_even<mode>,
vec_extract_odd<mode>, altivec_vmrghsf, altivec_vmrglsf,
vec_interleave_high<mode>, vec_interleave_low<mode>): Implement.
From-SVN: r119088
|
|
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p): Take
enum argument instead of bool.
(vect_analyze_operations): Call vectorizable_type_promotion.
* tree-vectorizer.h (type_promotion_vec_info_type): New enum
stmt_vec_info_type value.
(supportable_widening_operation, vectorizable_type_promotion): New
function declarations.
* tree-vect-transform.c (vect_gen_widened_results_half): New function.
(vectorizable_type_promotion): New function.
(vect_transform_stmt): Call vectorizable_type_promotion.
* tree-vect-analyze.c (supportable_widening_operation): New function.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern):
Add implementation.
* tree-vect-generic.c (expand_vector_operations_1): Consider correct
mode.
* tree.def (VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR):
(VEC_UNPACK_HI_EXPR, VEC_UNPACK_LO_EXPR): New tree-codes.
* tree-inline.c (estimate_num_insns_1): Add cases for above new
tree-codes.
* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
(init_optabs): Initialize new optabs.
* genopinit.c (vec_widen_umult_hi_optab, vec_widen_smult_hi_optab,
vec_widen_smult_hi_optab, vec_widen_smult_lo_optab,
vec_unpacks_hi_optab, vec_unpacks_lo_optab, vec_unpacku_hi_optab,
vec_unpacku_lo_optab): Initialize new optabs.
* optabs.h (OTI_vec_widen_umult_hi, OTI_vec_widen_umult_lo):
(OTI_vec_widen_smult_h, OTI_vec_widen_smult_lo, OTI_vec_unpacks_hi,
OTI_vec_unpacks_lo, OTI_vec_unpacku_hi, OTI_vec_unpacku_lo): New
optab indices.
(vec_widen_umult_hi_optab, vec_widen_umult_lo_optab):
(vec_widen_smult_hi_optab, vec_widen_smult_lo_optab):
(vec_unpacks_hi_optab, vec_unpacku_hi_optab, vec_unpacks_lo_optab):
(vec_unpacku_lo_optab): New optabs.
* doc/md.texi (vec_unpacks_hi, vec_unpacks_lo, vec_unpacku_hi):
(vec_unpacku_lo, vec_widen_umult_hi, vec_widen_umult_lo):
(vec_widen_smult_hi, vec_widen_smult_lo): New.
* doc/c-tree.texi (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR):
(VEC_WIDEN_MULT_HI_EXPR, VEC_WIDEN_MULT_LO_EXPR, VEC_UNPACK_HI_EXPR):
(VEC_UNPACK_LO_EXPR, VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New.
* config/rs6000/altivec.md (UNSPEC_VMULWHUB, UNSPEC_VMULWLUB):
(UNSPEC_VMULWHSB, UNSPEC_VMULWLSB, UNSPEC_VMULWHUH, UNSPEC_VMULWLUH):
(UNSPEC_VMULWHSH, UNSPEC_VMULWLSH): New.
(UNSPEC_VPERMSI, UNSPEC_VPERMHI): New.
(vec_vperm_v8hiv4si, vec_vperm_v16qiv8hi): New patterns used to
implement the unsigned unpacking patterns.
(vec_unpacks_hi_v16qi, vec_unpacks_hi_v8hi, vec_unpacks_lo_v16qi):
(vec_unpacks_lo_v8hi): New signed unpacking patterns.
(vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi):
(vec_unpacku_lo_v8hi): New unsigned unpacking patterns.
(vec_widen_umult_hi_v16qi, vec_widen_umult_lo_v16qi):
(vec_widen_smult_hi_v16qi, vec_widen_smult_lo_v16qi):
(vec_widen_umult_hi_v8hi, vec_widen_umult_lo_v8hi):
(vec_widen_smult_hi_v8hi, vec_widen_smult_lo_v8hi): New widening
multiplication patterns.
* target.h (builtin_mul_widen_even, builtin_mul_widen_odd): New.
* target-def.h (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN):
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New.
* config/rs6000/rs6000.c (rs6000_builtin_mul_widen_even): New.
(rs6000_builtin_mul_widen_odd): New.
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): Defined.
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): Defined.
* tree-vectorizer.h (enum vect_relevant): New enum type.
(_stmt_vec_info): Field relevant chaned from bool to enum
vect_relevant.
(STMT_VINFO_RELEVANT_P): Updated.
(STMT_VINFO_RELEVANT): New.
* tree-vectorizer.c (new_stmt_vec_info): Use STMT_VINFO_RELEVANT
instead of STMT_VINFO_RELEVANT_P.
* tree-vect-analyze.c (vect_mark_relevant, vect_stmt_relevant_p):
Replace calls to STMT_VINFO_RELEVANT_P with STMT_VINFO_RELEVANT,
and boolean variable with enum vect_relevant.
(vect_mark_stmts_to_be_vectorized): Likewise + update documentation.
* doc/tm.texi (TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_EVEN): New.
(TARGET_VECTORIZE_BUILTIN_MUL_WIDEN_ODD): New.
2006-11-08 Richard Henderson <rth@redhat.com>
* config/i386/sse.md (vec_widen_umult_hi_v8hi,
vec_widen_umult_lo_v8hi): New.
(vec_widen_smult_hi_v4si, vec_widen_smult_lo_v4si,
vec_widen_umult_hi_v4si, vec_widen_umult_lo_v4si): New.
* config/i386/i386.c (ix86_expand_sse_unpack): New.
* config/i386/i386-protos.h (ix86_expand_sse_unpack): New.
* config/i386/sse.md (vec_unpacku_hi_v16qi, vec_unpacks_hi_v16qi,
vec_unpacku_lo_v16qi, vec_unpacks_lo_v16qi, vec_unpacku_hi_v8hi,
vec_unpacks_hi_v8hi, vec_unpacku_lo_v8hi, vec_unpacks_lo_v8hi,
vec_unpacku_hi_v4si, vec_unpacks_hi_v4si, vec_unpacku_lo_v4si,
vec_unpacks_lo_v4si): New.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vectorizable_type_demotion): New function.
(vect_transform_stmt): Add case for type_demotion_vec_info_type.
(vect_analyze_operations): Call vectorizable_type_demotion.
* tree-vectorizer.h (type_demotion_vec_info_type): New enum
stmt_vec_info_type value.
(vectorizable_type_demotion): New function declaration.
* tree-vect-generic.c (expand_vector_operations_1): Consider correct
mode.
* tree.def (VEC_PACK_MOD_EXPR, VEC_PACK_SAT_EXPR): New tree-codes.
* expr.c (expand_expr_real_1): Add case for VEC_PACK_MOD_EXPR and
VEC_PACK_SAT_EXPR.
* tree-iniline.c (estimate_num_insns_1): Likewise.
* tree-pretty-print.c (dump_generic_node, op_prio): Likewise.
* optabs.c (optab_for_tree_code): Likewise.
* optabs.c (expand_binop): In case of vec_pack_*_optabs the mode
compared against the predicate of the result is not 'mode' (the input
to the function) but a mode with half the size of 'mode'.
(init_optab): Initialize new optabs.
* optabs.h (OTI_vec_pack_mod, OTI_vec_pack_ssat, OTI_vec_pack_usat):
New optab indices.
(vec_pack_mod_optab, vec_pack_ssat_optab, vec_pack_usat_optab): New
optabs.
* genopinit.c (vec_pack_mod_optab, vec_pack_ssat_optab):
(vec_pack_usat_optab): Initialize new optabs.
* doc/md.texi (vec_pack_mod, vec_pack_ssat, vec_pack_usat): New.
* config/rs6000/altivec.md (vec_pack_mod_v8hi, vec_pack_mod_v4si): New.
2006-11-08 Richard Henderson <rth@redehat.com>
* config/i386/sse.md (vec_pack_mod_v8hi, vec_pack_mod_v4si):
(vec_pack_mod_v2di, vec_interleave_highv16qi, vec_interleave_lowv16qi):
(vec_interleave_highv8hi, vec_interleave_lowv8hi):
(vec_interleave_highv4si, vec_interleave_lowv4si):
(vec_interleave_highv2di, vec_interleave_lowv2di): New.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vectorizable_reduction): Support multiple
datatypes.
(vect_transform_stmt): Removed redundant code.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vectorizable_operation): Support multiple
datatypes.
2006-11-08 Dorit Nuzman <dorit@il.ibm.com>
* tree-vect-transform.c (vect_align_data_ref): Removed.
(vect_create_data_ref_ptr): Added additional argument - ptr_incr.
Updated function documentation. Return the increment stmt in ptr_incr.
(bump_vector_ptr): New function.
(vect_get_vec_def_for_stmt_copy): New function.
(vect_finish_stmt_generation): Create a stmt_info to newly created
vector stmts.
(vect_setup_realignment): Call vect_create_data_ref_ptr with additional
argument.
(vectorizable_reduction, vectorizable_assignment): Not supported yet if
VF is greater than the number of elements that can fit in one vector
word.
(vectorizable_operation, vectorizable_condition): Likewise.
(vectorizable_store, vectorizable_load): Support the case that the VF
is greater than the number of elements that can fit in one vector word.
(vect_transform_loop): Don't fail in case of multiple data-types.
* tree-vect-analyze.c (vect_determine_vectorization_factor): Don't fail
in case of multiple data-types; the smallest type determines the VF.
(vect_analyze_data_ref_dependence): Don't record datarefs as same_align
if they are of different sizes.
(vect_update_misalignment_for_peel): Compare misalignments in terms of
number of elements rather than number of bytes.
(vect_enhance_data_refs_alignment): Fix/Add dump printouts.
(vect_can_advance_ivs_p): Fix a dump printout
From-SVN: r118577
|
|
2006-09-07 Eric Christopher <echristo@apple.com>
Falk Hueffner <falk@debian.org>
* doc/extend.texi (__builtin_bswap32): Document.
(__builtin_bswap64): Ditto.
* doc/libgcc.texi (bswapsi2): Document.
(bswapdi2): Ditto.
* doc/rtl.texi (bswap): Document.
* optabs.c (expand_unop): Don't widen a bswap.
(init_optabs): Init bswap. Set libfuncs explicitly
for bswapsi2 and bswapdi2.
* optabs.h (OTI_bswap): New.
(bswap_optab): Ditto.
* genopinit.c (optabs): Handle bswap_optab.
* tree.h (tree_index): Add TI_UINT32_TYPE and
TI_UINT64_TYPE.
(uint32_type_node): New.
(uint64_type_node): Ditto.
* tree.c (build_common_tree_nodes_2): Initialize
uint32_type_node and uint64_type_node.
* builtins.c (expand_builtin_bswap): New.
(expand_builtin): Call.
(fold_builtin_bswap): New.
(fold_builtin_1): Call.
* fold-const.c (tree_expr_nonnegative_p): Return true
for bswap.
* builtin-types.def (BT_UINT32): New.
(BT_UINT64): Ditto.
(BT_FN_UINT32_UINT32): Ditto.
(BT_FN_UINT64_UINT64): Ditto.
* builtins.def (BUILT_IN_BSWAP32): New.
(BUILT_IN_BSWAP64): Ditto.
* rtl.def (BSWAP): New.
* genattrtab.c (check_attr_value): New.
* libgcc2.c (__bswapSI2): New.
(__bswapDI2): Ditto.
* libgcc2.h (__bswapSI2): Declare.
(__bswapDI2): Ditto.
* mklibgcc.in (lib2funcs): Add _bswapsi2 and _bswapdi2.
* simplify-rtx.c (simplify_const_unary_operation): Return
0 for BSWAP.
* libgcc-std.ver (__bwapsi2): Add.
(__bswapdi2): Ditto.
* reload1.c (eliminate_regs_1): Add bswap.
(elimination_effects): Ditto.
* config/i386/i386.h (x86_bswap): New.
(TARGET_BSWAP): Use.
* config/i386/i386.c (x86_bswap): Set.
Co-Authored-By: Falk Hueffner <falk@debian.org>
From-SVN: r118361
|
|
2006-10-29 Richard Guenther <rguenther@suse.de>
* genopinit.c (optabs): Change lfloor_optab and lceil_optab
to conversion optabs.
* optabs.c (init_optabs): Initialize lfloor_optab and lceil_optab
as conversion optab.
* optabs.h (enum optab_index): Remove OTI_lfloor and OTI_lceil.
(enum convert_optab_index): Add COI_lfloor and COI_lceil.
(lfloor_optab, lceil_optab): Adjust defines.
* builtins.c (expand_builtin_int_roundingfn): Adjust for
lfloor and lceil optabs now being conversion optabs.
* config/i386/i386-protos.h (ix86_expand_lfloorceil): Declare.
* config/i386/i386.c (ix86_expand_sse_compare_and_jump):
New static helper function.
(ix86_expand_lfloorceil): New function to expand lfloor and
lceil inline.
* config/i386/i386.md (lfloor<mode>2): Split into ...
(lfloorxf<mode>2): ... x87 variant
(lfloor<mode>di2, lfloor<mode>si2): ... and SSE variants
using ix86_expand_lfloorceil.
(lceil<mode>2, lceilxf<mode>2, lceil<mode>di2, lceil<mode>si2):
Likewise.
* doc/md.texi (lfloorMN, lceilMN): Document.
* gcc.target/i386/math-torture/lfloor.c: New testcase.
* gcc.target/i386/math-torture/lceil.c: Likewise.
From-SVN: r118143
|