2013-10-09  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (struct s390_frame_layout): New field
	gpr_save_slots.
	(cfun_save_arg_fprs_p, cfun_gpr_save_slot): New macros.
	(s390_reg_clobbered_rtx, s390_regs_ever_clobbered): Change type of
	regs_ever_clobbered to char*.
	(s390_regs_ever_clobbered): Check crtl->saves_all_registers
	instead of cfun->has_nonlocal_label.  Ignore frame related restore
	INSNs.
	(s390_register_info): Enable FPR save slots.  Move/Copy some
	functionality into ...
	(s390_register_info_gprtofpr, s390_register_info_stdarg_fpr)
	(s390_register_info_stdarg_gpr, s390_optimize_register_info): New
	function.
	(s390_frame_info): Do gpr slot allocation here now.  stdarg does
	not imply a stack frame.
	(s390_init_frame_layout): Remove variable clobbered_regs.
	(s390_update_register_info): Remove function.
	(s390_hard_regno_rename_ok): Call-saved regs without a save slot
	cannot be used for register renaming.
	(s390_hard_regno_scratch_ok): New function.
	(TARGET_HARD_REGNO_SCRATCH_OK): Define target hook.
	(s390_initial_elimination_offset): Change offset calculation of
	the return address pointer.
	(save_gprs): Deal with only r6 being saved from the call-saved
	regs.
	(restore_gprs): Set frame related flag.
	(s390_save_gprs_to_fprs, s390_restore_gprs_from_fprs): New
	functions.
	(s390_emit_prologue): Call s390_register_info instead of
	s390_update_frame_layout.  Call s390_save_gprs_to_fprs.
	(s390_emit_epilogue): Call s390_restore_gprs_from_fprs.
	(s390_optimize_prologue): Call s390_optimize_register_info.
	Try to remove also FPR slot save/restore INSNs.  Remove frame
	related flags from restore INSNs.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203303 138bc75d-0d04-0410-961f-82ee72b054a4
2013-10-09  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (s390_frame_info): Restructure function.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203304 138bc75d-0d04-0410-961f-82ee72b054a4
2013-10-09  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	* config/s390/s390.c (s390_register_info_stdarg_fpr): Remove
	packed stack special handling.
	(s390_frame_info, s390_emit_prologue, s390_emit_epilogue): Switch
	back to fixed stack slots for FPRs saved due to stdarg.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203305 138bc75d-0d04-0410-961f-82ee72b054a4
[gcc/]
2013-10-09  Renlin Li  <Renlin.Li@arm.com>

	* config/arm/arm.c (arm_output_mi_thunk): Use plus_constant.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203309 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] vneg ADVSimd intrinsics rewritten in C.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203310 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] Implemented vdiv_f64 ADVSimd intrinsic.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203312 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] Implement vadd_f64 and vsub_f64 ADVSimd intrinsics.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203313 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] Implement vclz ADVSimd intrinsic.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203314 138bc75d-0d04-0410-961f-82ee72b054a4
	PR middle-end/58570
	* tree-ssa-alias.c (nonoverlapping_component_refs_of_decl_p): Return
	false if both components are bitfields.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203315 138bc75d-0d04-0410-961f-82ee72b054a4
2013-10-09  Marc Glisse  <marc.glisse@inria.fr>

	PR tree-optimization/20318
gcc/c-family/
	* c-common.c (handle_returns_nonnull_attribute): New function.
	(c_common_attribute_table): Add returns_nonnull.

gcc/
	* doc/extend.texi (returns_nonnull): New function attribute.
	* fold-const.c (tree_expr_nonzero_warnv_p): Look for returns_nonnull
	attribute.
	* tree-vrp.c (gimple_stmt_nonzero_warnv_p): Likewise.
	(stmt_interesting_for_vrp): Accept all GIMPLE_CALL.

gcc/testsuite/
	* c-c++-common/pr20318.c: New file.
	* gcc.dg/tree-ssa/pr20318.c: New file.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203316 138bc75d-0d04-0410-961f-82ee72b054a4

	* tree-flow.h: Move some protoypes.  Include new tree-ssa-loop.h.
	(struct affine_iv, struct tree_niter_desc): Move to tree-ssa-loop.h.
	(enum move_pos): Move to tree-ssa-loop-im.h
	* cfgloop.h: Move some prototypes.
	(gcov_type_to_double_int): relocate from tree-ssa-loop.niter.c.
	* tree-flow-inline.h (loop_containing_stmt): Move to tree-ssa-loop.h.
	* tree-ssa-loop.h: New File.  Include other tree-ssa-loop-*.h files.
	(struct affine_iv, struct tree_niter_desc): Relocate from tree-flow.h.
	(loop_containing_stmt): Relocate from tree-flow-inline.h.
	* tree-ssa-loop-ch.c: (do_while_loop_p): Make static.
	* tree-ssa-loop-im.c (for_each_index): Move to tree-ssa-loop.c.
	(enum move_pos): Relocate here.
	(lsm_tmp_name_add, gen_lsm_tmp_name, get_lsm_tmp_name): Move to
	tree-ssa-loop.c.
	(execute_sm_if_changed_flag_set): Change get_lsm_tmp_name call.
	(tree_ssa_loop_im, gate_tree_ssa_loop_im, pass_data_lim, make_pass_lim):
	Relocate here from tree-ssa-loop.c.
	* tree-ssa-loop-ivcanon.c (tree_num_loop_insns): Move to 
	tree-ssa-loop.c.
	(loop_edge_to_cancel, unloop_loops): Make static.
	(tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_data_iv_canon,
	make_pass_iv_canon): Relocate from tree-ssa-loop.c.
	(tree_complete_unroll, gate_tree_complete_unroll,
	pass_data_complete_unroll, make_pass_complete_unroll): Relocate here.
	(tree_complete_unroll_inner, gate_tree_complete_unroll_inner,
	pass_data_complete_unrolli, make_pass_complete_unrolli): Relocate here.
	* tree-ssa-loop-ivopts.c: Remove local prototypes.
	(stmt_invariant_in_loop_p): Remove unused function.
	* tree-ssa-loop-ivopts.h: New file.  Add prototypes.
	* tree-ssa-loop-manip.h: New file.  Add prototypes.
	* tree-ssa-loop-niter.c (record_niter_bound): Move to cfgloop.c.
	(gcov_type_to_double_int): Move to cfgloop.h.
	(double_int_cmp, bound_index,
	estimate_numbers_of_iterations_loop): Make static.
	(estimated_loop_iterations): Factor out get_estimated_loop_iterations.
	(max_loop_iterations): Factor out get_max_loop_iterations.
	(estimated_loop_iterations_int, max_stmt_executions_int): Move to
	cfgloop.c.
	* tree-ssa-loop-niter.h: New file.  Add prototypes.
	* tree-ssa-loop-prefetch.c (tree_ssa_loop_prefetch,
	gate_tree_ssa_loop_prefetch, pass_data_loop_prefetch,
	make_pass_loop_prefetch): Relocate from tree-ssa-loop.c.
	* tree-ssa-loop-unswitch.c (tree_ssa_loop_unswitch,
	gate_tree_ssa_loop_unswitch, pass_data_tree_unswitch,
	make_pass_tree_unswitch): Relocate from tree-ssa-loop.c.
	* tree-ssa-loop.c (tree_ssa_loop_im, gate_tree_ssa_loop_im,
	pass_data_lim, make_pass_lim): Move to tree-ssa-loop-im.c.
	(tree_ssa_loop_unswitch, gate_tree_ssa_loop_unswitch,
	pass_data_tree_unswitch, make_pass_tree_unswitch): Move.
	(tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_data_iv_canon,
	make_pass_iv_canon, tree_complete_unroll, gate_tree_complete_unroll,
	pass_data_complete_unroll, make_pass_complete_unroll,
	tree_complete_unroll_inner, gate_tree_complete_unroll_inner,
	pass_data_complete_unrolli, make_pass_complete_unrolli): Move to
	tree-ssa-loop-ivcanon.c.
	(tree_ssa_loop_prefetch, gate_tree_ssa_loop_prefetch,
	pass_data_loop_prefetch, make_pass_loop_prefetch): Move to
	tree-ssa-loop-prefetch.c.
	(for_each_index, lsm_tmp_name_add, gen_lsm_tmp_name): Relocate from
	tree-ssa-loop-im.c.
	(get_lsm_tmp_name): Relocate and add suffix parameter.
	(tree_num_loop_insns): Relocate from tree-ssa-ivcanon.c.
	* tree-scalar-evolution.h (simple_iv): Don't use affive_iv typedef.
	* cfgloop.c (record_niter_bound, estimated_loop_iterations_int,
	max_stmt_executions_int): Move from tree-ssa-loop-niter.c.
	(get_estimated_loop_iterations): Factor out accessor from 
	estimated_loop_iterations in tree-ssa-loop-niter.c.
	(get_max_loop_iterations): Factor out accessor from _max_loop_iterations
	in tree-ssa-niter.c.
	* loop-unroll.c (decide_unroll_constant_iterations,
	decide_unroll_runtime_iterations, decide_peel_simple,
	decide_unroll_stupid): Use new get_* accessors.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203317 138bc75d-0d04-0410-961f-82ee72b054a4


	* tree-flow.h (tm_restart_node, gimple_df): Move to gimple-ssa.h.
	(struct int_tree_map): Move to tree-hasher.h
	(SCALE, LABEL, PERCENT): Move to gimple.h
	* tree-flow-inline.h: Delete.  Move functions to other files.
	(unmodifiable_var_p, ref_contains_array_ref): Unused, so delete.
	* gimple-ssa.h (tm_restart_node, gimple_df): Relocate from tree-flow.h.
	(gimple_in_ssa_p, gimple_vop): Relocate from tree-flow-inline.h
	* gimple.h (imple_stmt_max_uid, set_gimple_stmt_max_uid,
	inc_gimple_stmt_max_uid, get_lineno): Relocate from tree-flow-inline.h.
	(SCALE, LABEL, PERCENT): Relocate from tree-flow.h
	* tree-hasher.h: Don't include tree-flow.h.
	(struct int_tree_map): Relocate from tree-flow.h.
	* tree-sra.c (contains_view_convert_expr_p): Relocate from
	tree-flow-inline.h and make static.
	* tree-ssa-alias.h (ranges_overlap_p): Relocate from tree-flow-inline.h.
	* tree-ssa-operands.c (gimple_ssa_operands): Relocate from
	tree-flow-inline.h and make static.
	* tree.h (is_global_var, may_be_aliased): Relocate from
	tree-flow-inline.h.
	* Makefile.in (GTFILES): Remove tree-flow.h and add gimple-ssa.h.
	* value-prof.c: No longer include tree-flow-inline.h.
	* tree-switch-conversion.c: No longer include tree-flow-inline.h.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203318 138bc75d-0d04-0410-961f-82ee72b054a4
	* gcc.dg/vect/bb-slp-31.c: Add cleanup-tree-dump.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203319 138bc75d-0d04-0410-961f-82ee72b054a4


	* tree-flow.h: Remove all remaining prototypes, enums and structs that
	are not related to tree-cfg.c.
	* tree-ssa-address.h: New file.  Relocate prototypes.
	* tree-ssa-address.c: (struct mem_address): Relocate from tree-flow.h.
	(addr_for_mem_ref): New.  Combine call to get_address_description and
	return addr_for_mem_ref.
	* expr.c (expand_expr_real_1): Use new addr_for_mem_ref routine.
	* tree-ssa-live.h: Adjust prototypes.
	* passes.c: Include tree-ssa-live.h.
	* gimple-pretty-print.h (gimple_dump_bb): Add prototype.
	* graphite.c (graphite_transform_loops): Make static.
	(graphite_transforms, gate_graphite_transforms, pass_data_graphite,
	make_pass_graphite, pass_data_graphite_transforms, 
	make_pass_graphite_transforms): Relocate here from tree-ssa-loop.c.
	* ipa-pure-const.c (warn_function_noreturn): Make static.
	(execute_warn_function_noreturn, gate_warn_function_noreturn,
	class pass_warn_function_noreturn, make_pass_warn_function_noreturn):
	Relocate from tree-cfg.c
	* tree-cfg.c (tree_node_can_be_shared, gimple_empty_block_p): Make
	static.
	(execute_warn_function_noreturn, gate_warn_function_noreturn,
	class pass_warn_function_noreturn, make_pass_warn_function_noreturn):
	Move to ipa-pure-const.c.
	(execute_fixup_cfg, class pass_fixup_cfg, make_pass_fixup_cfg): Relocate
	from tree-optimize.c.
	* tree-optimize.c (execute_fixup_cfg, class pass_fixup_cfg,
	make_pass_fixup_cfg): Move to tree-cfg.c.
	* tree-chrec.h: (enum ev_direction): Relocate here from tree-flow.h.
	Relocate some prototypes.
	* tree-data-ref.h (tree_check_data_deps) Add prototype.
	* tree-dump.c (dump_function_to_file): Remove prototype.
	Add tree-flow.h to the include file.
	* tree-dump.h: Remove prototype.
	* tree-parloops.h: New File.  Add prototypes.
	* tree-parloops.c (gate_tree_parallelize_loops, tree_parallelize_loops,
	pass_data_parallelize_loops,  make_pass_parallelize_loops): Relocate
	from tree-ssa-loop.c.
	* tree-predcom.c (run_tree_predictive_commoning,
	gate_tree_predictive_commoning, pass_data_predcom, make_pass_predcom):
	Relocate here from tree-ssa-loop.c.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize) Don't call 
	ssa_name_values.release ().
	* tree-ssa-threadedge.h: New File.  Relocate prototypes here.
	(ssa_name_values): Relocate from tree-flow.h.
	* tree-ssa.h: Include tree-ssa-threadedge.h and tree-ssa-address.h.
	* tree-ssa-loop.c (run_tree_predictive_commoning,
	gate_tree_predictive_commoning, pass_data_predcom, make_pass_predcom,
	graphite_transforms, gate_graphite_transforms, pass_data_graphite,
	make_pass_graphite, pass_data_graphite_transforms,
	make_pass_graphite_transforms, gate_tree_parallelize_loops,
	tree_parallelize_loops, pass_data_parallelize_loops,
	make_pass_parallelize_loops): Move to other files.
	* tree-vectorizer.h (lpeel_tree_duplicate_loop_to_edge_cfg): Prototype
	moved here.
	* tree.h: Remove prototypes from tree-address.c.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203320 138bc75d-0d04-0410-961f-82ee72b054a4
Fix unprototyped abort() introduced in libstdc++/58659.cc testcase.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203321 138bc75d-0d04-0410-961f-82ee72b054a4
[gcc/]
2013-10-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/arm/aarch-common.c (arm_early_load_addr_dep):
	Place comment above function.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203322 138bc75d-0d04-0410-961f-82ee72b054a4
	PR c++/58635
cp/
	* semantics.c (finish_return_stmt): Return error_mark_node
	when error_operand_p of the expr is true.
	(build_transaction_expr): Check for EXPR_P before setting the
	expr location.
testsuite/
	* g++.dg/tm/pr58635-1.C: New test.
	* g++.dg/tm/pr58635-2.C: New test.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203323 138bc75d-0d04-0410-961f-82ee72b054a4

	* loop-doloop.c (doloop_modify, doloop_optimize): Use 
	get_max_loop_iterations.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203324 138bc75d-0d04-0410-961f-82ee72b054a4
	* testsuite/20_util/shared_ptr/cons/58659.cc: Use VERIFY instead of
	aborting.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203325 138bc75d-0d04-0410-961f-82ee72b054a4
	* tree-ssa-phiopts.c (rhs_is_fed_for_value_replacement): New function.
	(operand_equal_for_value_replacement): New function, extracted from
	value_replacement and enhanced to catch more cases.
	(value_replacement): Use operand_equal_for_value_replacement.

	* gcc.dg/tree-ssa/phi-opt-11.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203327 138bc75d-0d04-0410-961f-82ee72b054a4