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
2008-05-06 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/36130
* include/bits/c++config: Namespace macros and setup only in C++.
* testsuite/29_atomics/headers/stdatomic.h/debug_mode.c: New.
From-SVN: r134995
gcc/testsuite
PR preprocessor/35313, PR preprocessor/36088:
* gcc.dg/cpp/pr35313.c: New file.
* gcc.dg/cpp/if-oppr.c: Remove test for ',' in a conditional
expression.
* gcc.dg/cpp/if-oppr2.c: New file.
libcpp
PR preprocessor/35313, PR preprocessor/36088:
* expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
(reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.
From-SVN: r134989
2008-05-06 H.J. Lu <hongjiu.lu@intel.com>
PR target/35657
* config/i386/i386.c (contains_128bit_aligned_vector_p): Renamed
to ...
(contains_aligned_value_p): This. Handle _Decimal128.
(ix86_function_arg_boundary): Only align _Decimal128 to its
natural boundary and handle it properly.
From-SVN: r134987
2008-05-06 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (ipcp_method_orig_node): Renamed to ipcp_get_orig_node.
(ipcp_method_is_cloned): Renamed to ipcp_node_is_clone
(ipcp_method_set_orig_node): Removed.
(ipcp_cval_get_cvalue_type): Removed.
(ipcp_method_get_scale): Renamed to ipcp_get_node_scale.
(ipcp_method_set_scale): Renamed to ipcp_set_node_scale.
(ipcp_cval_set_cvalue_type): Removed.
(ipcp_cval_get_cvalue): Removed.
(ipcp_cval_set_cvalue): Removed.
(ipcp_type_is_const): Renamed to ipcp_lat_is_const.
(ipcp_cval_equal_cvalues): Renamed to ipcp_lats_are_equal
(ipcp_lats_are_equal): Changed parameters to two ipcp_lattice's
(ipcp_cval_meet): Renamed to ipa_lattice_meet
(ipcp_cval_changed): Changed to use ipcp_lat_is_const
(ipcp_method_cval): Renamed to ipcp_get_ith_lattice
(ipcp_get_ith_lattice): Changed parameters.
(ipcp_cval_compute): Renamed to ipcp_lattice_from_jfunc
(ipcp_lattice_from_jfunc): Changed parameters.
(ipcp_redirect): Local lattice pointer instead of lattice type variable.
(ipcp_method_cval_print): Added temporary variable info.
(ipcp_redirect): Removed already unused local variable caller.
(ipcp_redirect): New temporary variable orig_callee_info
(ipcp_redirect): Removed newly unused local variable callee.
(ipcp_redirect): Removed (a bit confusing) local variable type.
(ipcp_insert_stage): Added local variable info.
(ipcp_cval_changed): Renamed to ipcp_lattice_changed, parameters
renamed too
(ipcp_formal_create): Removed.
(ipcp_method_cval_set): Removed.
(ipcp_propagate_stage): Renamed lattice variables.
(ipcp_method_cval_set_cvalue_type): Removed.
(ipcp_method_cval_print): Renamed to ipcp_print_all_lattices
(ipcp_print_all_lattices): Changed printed strings to refer to
lattices rather than cvals.
(ipcp_method_cval_init): Renamed to ipcp_initialize_node_lattices
(ipcp_propagate_const): Changed formal parameters.
(build_const_val): Changed formal parameters.
(ipcp_insert_stage): Removed useless variable cvalue
(build_const_val): Changed formal parameters.
(ipcp_method_compute_scale): Renamed to ipcp_compute_node_scale
(ipcp_after_propagate): Renamed to ipcp_change_tops_to_bottom
(ipcp_callsite_param_print): Renamed to ipcp_print_all_jump_functions
(ipcp_profile_mt_count_print): Renamed to ipcp_print_func_profile_counts
(ipcp_print_func_profile_counts): Changed string from "method" to
"function"
(ipcp_profile_cs_count_print): Renamed to ipcp_print_call_profile_counts
(ipcp_profile_edge_print): Renamed to ipcp_print_edge_profiles
(ipcp_profile_bb_print): Renamed to ipcp_print_bb_profiles
(ipcp_structures_print): Renamed to ipcp_print_all_structures
(ipcp_profile_print): Renamed to ipcp_print_profile_data
(ipcp_lat_is_const): Changed parameters and made inline.
(ipcp_replace_map_create): Renamed to ipcp_create_replace_map
(ipcp_redirect): Renamed to ipcp_need_redirect_p
(ipcp_need_redirect_p): Calls ipcp_lat_is_const instead of using
the predicate condition directly
(ipcp_propagate_stage): Added local variable args. Removed local
variable callee. (Both are mere code simplifications.)
(ipcp_method_dont_insert_const): Renamed to
ipcp_node_not_modifiable_p.
(ipcp_node_not_modifiable_p): Made inline.
(ipcp_cloned_create): Renamed to ipcp_init_cloned_node
(ipcp_propagate_const): Renamed to ipcp_propagate_one_const
(ipcp_print_all_lattices): Removed variable cvalue
(ipcp_method_scale_print): Renamed to ipcp_function_scale_print
Updated comments.
From-SVN: r134984
2008-05-06 Kai Tietz <kai.tietz@onevision.com>
* config/i386/i386.c (output_set_got): Fix for x86_64 output_emit_asm
by using 'q' specifier for instruction.
(ix86_file_end): Replaced case TARGET_64BIT_MS_ABI by TARGET_64BIT.
From-SVN: r134981