PR tree-optimization/36129
* tree-ssa-cpp.c: Include value-prof.h.
(execute_fold_all_builtins): Call gimple_remove_stmt_histograms if
built-in function was folded to a constant.
* Makefile.in (tree-ssa-cpp.c): Depend on value-prof.h
From-SVN: r135123
2008-05-09 Jan Sjodin <jan.sjodin@amd.com>
Sebastian Pop <sebastian.pop@amd.com>
* tree-scalar-evolution.c: Document instantiate_scev.
(instantiate_parameters_1): Renamed instantiate_scev_1.
Don't use the same loop for instantiation_loop and evolution_loop.
(instantiate_scev): New.
(instantiate_parameters): Moved...
(resolve_mixers): Update call to instantiate_scev_1 to pass the
same loop twice. Maintains the semantics for this function.
* tree-scalar-evolution.h (instantiate_scev): Declare.
(instantiate_parameters): ...here. Now static inline.
* tree-data-ref.c (dr_analyze_indices): Call instantiate_scev
instead of resolve_mixers.
Co-Authored-By: Sebastian Pop <sebastian.pop@amd.com>
From-SVN: r135116
2008-05-08 Seongbae Park <seongbae.park@gmail.com>
* common.opt (Wframe-larger-than=): Shorten the help message
to one line.
* doc/invoke.texi (Wframe-larger-than=): Add more description.
From-SVN: r135097
* tree-complex.c (expand_complex_div_wide): Don't create CONDs that
trap.
* tree-gimple.c (is_gimple_condexpr): Check that the expression doesn't
trap and that both operands are gimple values.
(canonicalize_cond_expr_cond): Use is_gimple_condexpr.
* gcc/tree-eh.c (tree_could_trap_p): Correctly detect if a comparison
is a fp operation.
* gcc/testsuite/gcc.dg/vect/vect-111.c: Rename to no-trapping-math-vect-111.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-11.c: Rename to no-trapping-math-vect-ifcvt-11.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-12.c: Rename to no-trapping-math-vect-ifcvt-12.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-13.c: Rename to no-trapping-math-vect-ifcvt-13.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-14.c: Rename to no-trapping-math-vect-ifcvt-14.c
* gcc/testsuite/gcc.dg/vect/vect-ifcvt-15.c: Rename to no-trapping-math-vect-ifcvt-15.c
From-SVN: r135093
gcc/
* gensupport.h (pred_data): Add a "num_codes" field.
(add_predicate_code): Declare.
* gensupport.c (add_predicate_code): New function.
(std_pred_table): Add an "allows_const_p" field.
(std_preds): Set this field for predicates that allow RTX_CONST_OBJs.
Remove the (incomplete) list of such codes from the codes field.
(init_predicate_table): Use add_predicate_code. Add all
RTX_CONST_OBJs if allows_const_p is true.
* genrecog.c (process_define_predicate): Use add_predicate_code.
From-SVN: r135090
2008-05-08 David Daney <ddaney@avtrex.com>
* lib/target-supports.exp (check_effective_target_sync_int_long): Add
mips*-*-*.
(check_effective_target_sync_char_short): Same.
2008-05-08 David Daney <ddaney@avtrex.com>
Richard Sandiford <rsandifo@nildram.co.uk>
* config/mips/mips.md (mips_expand_compare_and_swap_12): Handle
special case of constant zero operands.
* config/mips/mips.c (mips_expand_compare_and_swap_12): Zero extend
old and new values. Special case constant zero values.
* config/mips/mips.h (MIPS_COMPARE_AND_SWAP): Skip 'sync' if compare
fails.
(MIPS_COMPARE_AND_SWAP_12): Handle constant zero operands.
(MIPS_COMPARE_AND_SWAP_12_0): New macro.
Co-Authored-By: Richard Sandiford <rsandifo@nildram.co.uk>
From-SVN: r135088
2008-05-08 Paolo Bonzini <bonzini@gnu.org>
PR target/36090
* simplify-rtx.c (simplify_plus_minus): Create CONST of
similar RTX_CONST_OBJ before CONST_INT.
From-SVN: r135086
2008-05-08 Richard Guenther <rguenther@suse.de>
PR middle-end/36154
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Make
sure to create a representative for trailing arrays for PTA.
* gcc.c-torture/compile/pr36154.c: New testcase.
From-SVN: r135071
2008-05-08 Richard Guenther <rguenther@suse.de>
PR middle-end/36172
* fold-const.c (operand_equal_p): Two objects which types
differ in pointerness are not equal.
* gcc.c-torture/compile/pr36172.c: New testcase.
From-SVN: r135070
PR debug/35896
* dwarf2out.c (dw_expand_expr, common_check): Removed.
(fortran_common): New function.
(gen_variable_die): Call fortran_common instead of common_check,
adjust for it returning tree instead of rtx. Formatting.
From-SVN: r135060
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
PATCH rtl/7335
PATCH rtl/33826
* see.c (see_copy_insn): Copy new pure const attributes for new
call.
* c-decl.c (merge_decls): Ditto.
* postreload.c (record_opr_changes): Change CONST_OR_PURE_CALL_P
to RTL_CONST_OR_PURE_CALL_P.
* tree.c (define_local_buitin): Rename DECL_IS_PURE to
DECL_PURE_P. Initialized DECL_LOOPING_CONST_PURE.
(process_call_operands): Set tree_side_effects properly.
* tree.h (TREE_READONLY_DECL_P): Removed.
(DECL_IS_PURE): Renamed to DECL_PURE_P.
(DECL_LOOPING_OR_CONST_P): New macro.
(struct tree_function_decl): Added looping_const_or_pure_p.
(ECF_*) Renumbered.
(ECF_LOOPING_OR_CONST_P): New macro,
* rtlanal.c (pure_const_p): Removed.
* builtins.c (expand_builtin): Rename DECL_IS_PURE to DECL_PURE_P.
* reorg.c (delete_prior_computation) Changed CONST_OR_PURE_CALL_P
to RTL_CONST_CALL_P.
* ipa-pure-const.c (pure_const_state_e): Added looping field.
(check_decl, check_tree, check_call, scan_function): Initialize
looping.
(analyze_function): Rename DECL_IS_PURE to DECL_PURE_P.
(static_execute): Set looping true for recursive functions.
Undo setting state to IPA_NEITHER for recursive functions.
* cse.c (cse_insn):
* ifcvt.c (noce_can_store_speculate_p): Changed
CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P or
RTL_CONST_OR_PURE_CALL_P.
* dse.c (scan_insn): Ditto.
* local-alloc.c (validate_equiv_mem, memref_used_between_p): Ditto.
* gcse.c (oprs_not_seen_p) Changed CONST_OR_PURE_CALL_P to
RTL_CONST_OR_PURE_CALL_P.
(store_killed_in_insn): Changed CONST_OR_PURE_CALL_P and
pure_call_p to RTL_CONST_CALL_P.
* gimplify.c (gimplify_call_expr): Clear side effects for
non-looping pure and constant calls.
* calls.c (emit_call_1): Set rtl flags from ecf flags.
(flags_from_decl_or_type): Set ecf flags from decl flags.
(initialize_argument_information): Turn off
ECF_LOOPING_CONST_OR_PURE when turning off ECF_CONST.
Change const to pure if callee_copies is true rather than just
turning off const.
(expand_call): Turn off ECF_LOOPING_PURE_CONST_CALL and remove old
way of marking pure calls.
(emit_library_call_value_1): Turn off ECF_LOOPING_PURE_CONST_CALL.
Remove hack that was supposed to fix pr7335 and remove old
way of marking pure calls.
* emit-rtl.c (emit_copy_of_insn_after): Copy RTL_CONST_CALL_P,
RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P.
* cselib.c (cselib_process_insn): Changed CONST_OR_PURE_CALL_P to
RTL_CONST_OR_PURE_CALL_P.
* tree-ssa-pre.c (can_value_number_call): Fixed spacing.
* loop-invariant.c (find_exits, find_invariant_bb): Changed
CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P.
* sched-deps.c (schedule_analyze): Ditto.
* rtl.h (struct rtx_def): Use call field, unchanging field, and
return_val field of calls to represent pure and const function
info.
(CONST_OR_PURE_CALL_P): Deleted macro.
(RTL_CONST_CALL_P, RTL_PURE_CALL_P,
RTL_LOOPING_CONST_OR_PURE_CALL_P, RTL_CONST_OR_PURE_P): New macros.
* tree-inline.c (copy_body_r): Changed TREE_READONLY_DECL_P to
TREE_READONLY.
* tree-optimize.c (execute_fixup_cfg): Added test for
ECF_LOOPING_CONST_OR_PURE.
* c-common.c (handle_pure_attribute): Changed DECL_IS_PURE to
DECL_PURE_P.
* tree-cfg.c (update_call_expr_flags): Do not clear tree side
effects for looping pure or const calls.
(verify_gimple_expr): Added verification code.
* config/alpha/alpha.c (alpha_legitimize_address,
alpha_emit_xfloating_libcall): Changed CONST_OR_PURE_CALL_P to
RTL_CONST_CALL_P.
* config/s390/s390.c (s390_emit_tls_call_insn): Ditto.
* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Ditto.
* config/mips/mips.c (mips_call_tls_get_addr): Ditto.
* cfgrtl.c (need_fake_edge_p): Changed CONST_OR_PURE_CALL_P to
RTL_CONST_OR_PURE_CALL_P.
* dce.c (deletable_insn_p): Allow non looping, non sibling, pure
and const calls to be deleted.
java:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* decl.c (java_init_decl_processing): Change DECL_IS_PURE to
DECL_PURE_P.
cp:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
DECL_LOOPING_CONST_OR_PURE_P attributes.
* rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
DECL_PURE_P.
gfortran:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
* trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
Rename DECL_IS_PURE to DECL_PURE_P.
From-SVN: r135053
* config/i386/i386.c (struct_builtin_description)
[IX86_BUILTIN_LOADHPS]: Use CODE_FOR_sse_loadhps_exp.
[IX86_BUILTIN_STOREHPS]: Use CODE_FOR_sse_loadlps_exp.
[IX86_BUILTIN_LOADHPD]: Use CODE_FOR_sse2_loadhpd_exp.
[IX86_BUILTIN_LOADLPD]: Use CODE_FOR_sse2_loadlpd_exp.
[IX86_BUILTIN_MOVHLPS]: Use CODE_FOR_sse_movhlps_exp.
[IX86_BUILTIN_MOVLHPS]: Use CODE_FOR_sse_movlhps_exp.
[IX86_BUILTIN_UNPCKHPD]: Use FOR_sse2_unpckhpd_exp.
[IX86_BUILTIN_UNPCKLPD]: Use FOR_sse2_unpcklpd_exp.
From-SVN: r135047
PR target/35714
* config/i386/mmx.md (mmx_subv2sf3): New expander.
(*mmx_subv2sf3): Rename from mmx_subv2sf3 insn pattern.
(*mmx_eqv2sf3): Rename from mmx_eqv2sf3 insn pattern.
(mmx_eqv2sf3): New expander. Use ix86_fixup_binary_operands_no_copy
to handle nonimmediate operands.
(*mmx_paddwd): Rename from mmx_paddwd insn pattern.
(mmx_paddwd): New expander. Use ix86_fixup_binary_operands_no_copy
to handle nonimmediate operands.
(*mmx_pmulhrwv4hi3): Rename from mmx_pmulhrwv4hi3 insn pattern.
(mmx_pmulhrwv4hi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_umulv1siv1di3): Rename from sse2_umulv1siv1di3 insn pattern.
(sse2_umulv1siv1di3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*mmx_eq<mode>3): Rename from mmx_eq<mode>3 insn pattern.
(mmx_eq<mode>3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*mmx_uavgv8qi3): Rename from mmx_uavgv8qi3 insn pattern.
(mmx_uavgv8qi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*mmx_uavgv4hi3): Rename from mmx_uavgv4hi3 insn pattern.
(mmx_uavgv4hi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
* config/i386/sse.md
(*sse_movhlps): Rename from sse_movhlps insn pattern.
(sse_movhlps): New expander. Use ix86_fixup_binary_operands
to handle nonimmediate operands.
(*sse_movlhps): Rename from sse_movlhps insn pattern.
(sse_movlhps): New expander. Use ix86_fixup_binary_operands
to handle nonimmediate operands.
(*sse_loadhps): Rename from sse_loadhps insn pattern.
(sse_loadhps): New expander. Use ix86_fixup_binary_operands
to handle nonimmediate operands.
(*sse_loadlps): Rename from sse_loadlps insn pattern.
(sse_loadlps): New expander. Use ix86_fixup_binary_operands
to handle nonimmediate operands.
(*sse2_unpckhpd): Rename from sse2_unpckhpd insn pattern.
(sse2_unpckhpd): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_unpcklpd): Rename from sse2_unpcklpd insn pattern.
(sse2_unpcklpd): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse_loadhpd): Rename from sse_loadhpd insn pattern.
(sse_loadhpd): New expander. Use ix86_fixup_binary_operands
to handle nonimmediate operands.
(*sse_loadlpd): Rename from sse_loadlpd insn pattern.
(sse_loadlpd): New expander. Use ix86_fixup_binary_operands
to handle nonimmediate operands.
(*sse2_<plusminus_insn><mode>3): Rename from
sse2_<plusminus_insn><mode>3 insn pattern.
(sse2_<plusminus_insn><mode>3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_umulv2siv2di3): Rename from sse2_umulv2siv2di3 insn pattern.
(sse2_umulv2siv2di3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse4_1_mulv2siv2di3): Rename from sse4_1_mulv2siv2di3 insn pattern.
(sse4_1_mulv2siv2di3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_pmaddwd): Rename from sse2_pmaddwd insn pattern.
(sse2_pmaddwd): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_eq<mode>3): Rename from sse2_eq<mode>3 insn pattern.
(sse2_eq<mode>3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse4_1_eqv2di3): Rename from sse4_1_eqv2di3 insn pattern.
(sse4_1_eqv2di3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_uavgv16qi3): Rename from sse2_uavgv16qi3 insn pattern.
(sse2_uavgv16qi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_uavgv16qi3): Rename from sse2_uavgv16qi3 insn pattern.
(sse2_uavgv16qi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*sse2_uavgv8hi3): Rename from sse2_uavgv8hi3 insn pattern.
(sse2_uavgv8hi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*ssse3_pmulhrswv8hi3): Rename from ssse3_pmulhrswv8hi3 insn pattern.
(ssse3_pmulhrswv8hi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(*ssse3_pmulhrswv4hi3): Rename from ssse3_pmulhrswv4hi3 insn pattern.
(ssse3_pmulhrswv4hi3): New expander. Use
ix86_fixup_binary_operands_no_copy to handle nonimmediate operands.
(<sse>_vm<plusminus_insn><mode>3): Do not use ix86_binary_operator_ok.
(<sse>_vmmul<mode>3): Ditto.
(divv4sf3): Do not use ix86_fixup_binary_operands_no_copy.
(divv2df3): Ditto.
(ssse3_pmaddubsw128): Use register_operand for operand 1.
(ssse3_pmaddubsw): Ditto.
* config/i386/sse.md (ix86_fixup_binary_operands): Assert that src1
and src2 must have the same mode when swapped.
(ix86_expand_binop_builtin): Do not use ix86_fixup_binary_operands
and ix86_binary_operator_ok. Do not force operands in registers
when optimizing.
testsuite/ChangeLog:
PR target/35714
* gcc.target/i386/pr35714.c: New test.
From-SVN: r135041
2008-05-07 Johannes Singler <singler@ira.uka.de>
* include/parallel/quicksort.h:
(parallel_sort_qs_conquer) Explicitly request number of threads
in the parallel clause.
(parallel_sort_qs) Remove setting the number of threads globally.
From-SVN: r135038
PR middle-end/36137
* fold-const.c (fold_binary): Use STRIP_SIGN_NOPS instead of
STRIP_NOPS on arguments even for MIN_EXPR and MAX_EXPR.
* gcc.c-torture/execute/20080506-1.c: New test.
From-SVN: r135028
PR middle-end/36106
* omp-low.c (expand_omp_atomic_pipeline): Load value using the
integral type rather than floating point, then VIEW_CONVERT_EXPR
to the floating point type.
* testsuite/libgomp.c/atomic-5.c: New test.
* testsuite/libgomp.c/atomic-6.c: New test.
* testsuite/libgomp.c/autopar-1.c: New test.
From-SVN: r135027