This patch adds functionality to libgcov to enable user applications to
collect profile data only in regions of interest. This is useful, for
example, to collect profile data from a long-running server only
during the time when it is serving requests.

Specifically, the new routines __gcov_reset will clear all profile counters
to zero and __gcov_dump will write out the profile information collected so
far. A global variable is used to prevent writing out the profile a
second time during exit.

2012-05-08   Teresa Johnson  <tejohnson@google.com>

	* libgcc/libgcov.c (gcov_clear, __gcov_reset): New functions.
	(__gcov_dump): Ditto.
	(gcov_dump_complete): New global variable.
	(gcov_exit): Export hidden to enable use in L_gcov_dump.
	(__gcov_flush): Outline functionality now in gcov_clear.
	* libgcc/Makefile.in (L_gcov_reset, L_gcov_dump): Define.
	* gcc/gcov-io.h (__gcov_reset, __gcov_dump): Declare.
	* gcc/doc/gcov.texi: Add note on using __gcov_reset and __gcov_dump.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187297 138bc75d-0d04-0410-961f-82ee72b054a4
	PR target/51244
	* config/sh/sh.md (*branch_true, *branch_false): New insns.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187298 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	PR rtl-optimization/53278
	* lower-subreg.c (decompose_multiword_subregs): Remove left-over
	speed_p code from earlier patch.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187299 138bc75d-0d04-0410-961f-82ee72b054a4
2012-05-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c++/53261
c-family/
	* c-common.c (warn_logical_operator): Check that argument of
	integer_zerop is not NULL.


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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187307 138bc75d-0d04-0410-961f-82ee72b054a4
Remove -Y option from linker command line on Linux/Sparc.

gcc/

	* config/sparc/linux.h (LINK_SPEC): Don't pass "-Y" option.
	* config/sparc/linux64.h (LINK_ARCH32_SPEC): Likewise.
	* config/sparc/linux64.h (LINK_ARCH64_SPEC): Likewise.

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

	* cgraphbuild.c (build_cgraph_edges): Do not finalize vars
	with VALUE_EXPR.
	* cgraph.h (varpool_can_remove_if_no_refs): Vars with VALUE_EXPR
	are removable.
	* toplev.c (wrapup_global_declaration_2): Vars with VALUE_EXPR
	need to wrapup.
	(compile_file): Do not output variables.
	* cgraphbuild.c (varpool_finalize_decl): When var is finalized late,
	output it.
	* langhooks.c: Include timevar.h
	(write_global_declarations): Finalize compilation unit after wrapup;
	set timevars correctly.
	* passes.c (rest_of_decl_compilation): Decls with VALUE_EXPR needs
	not to be added to varpool.
	* varpool.c (varpool_assemble_decl): Sanity check that we are called
	only on cases where it makes sense; skip constant pool and value expr
	vars.

	* lto.c (do_whole_program_analysis): Set timevars correctly.
	(lto_main): Likewise.
	
	* trans-common.c (create_common): Do not fake TREE_ASM_WRITTEN.
	* trans-decl.c (gfc_finish_cray_pointee): Likewise.


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

	* gcc.dg/predict-1.c: Remove the replicated text in this test.
	* gcc.dg/predict-2.c: Likewise.
	* gcc.dg/predict-3.c: Likewise.
	* gcc.dg/predict-4.c: Likewise.
	* gcc.dg/predict-5.c: Likewise.
	* gcc.dg/predict-6.c: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187315 138bc75d-0d04-0410-961f-82ee72b054a4
	PR target/53271
	* config/rs6000/rs6000.c (gen_frame_set): New function.
	(gen_frame_load, gen_frame_store): New functions.
	(rs6000_savres_rtx): Use the above.
	(rs6000_emit_epilogue, rs6000_emit_prologue): Here too.
	Correct mode used for CR2 in save/restore_world patterns.
	Don't emit instructions for eh_return frame unwind reg info.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187316 138bc75d-0d04-0410-961f-82ee72b054a4
2012-05-09  Richard Guenther  <rguenther@suse.de>

	* stor-layout.c (bit_from_pos): Document.
	(byte_from_pos): Likewise.  Optimize.
	(pos_from_bit): Likewise.
	(normalize_offset): Use pos_from_bit instead of replicating it.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187317 138bc75d-0d04-0410-961f-82ee72b054a4
	* config/mips/mips.c (mips16_gp_pseudo_reg): Remove line
	information from the instruction produced.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187319 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/
	PR middle-end/53249
	* dwarf2out.h (get_address_mode): Move declaration to...
	* rtl.h: ...here.
	* dwarf2out.c (get_address_mode): Move definition to...
	* rtlanal.c: ...here.
	* var-tracking.c (get_address_mode): Delete.
	* combine.c (find_split_point): Use get_address_mode instead of
	targetm.addr_space.address_mode.
	* cselib.c (cselib_record_sets): Likewise.
	* dse.c (canon_address, record_store): Likewise.
	* emit-rtl.c (adjust_address_1, offset_address): Likewise.
	* expr.c (move_by_pieces, emit_block_move_via_loop, store_by_pieces)
	(store_by_pieces_1, expand_assignment, store_expr, store_constructor)
	(expand_expr_real_1): Likewise.
	* ifcvt.c (noce_try_cmove_arith): Likewise.
	* optabs.c (maybe_legitimize_operand_same_code): Likewise.
	* reload.c (find_reloads): Likewise.
	* sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise.
	* sel-sched-dump.c (debug_mem_addr_value): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187320 138bc75d-0d04-0410-961f-82ee72b054a4
Fix gcc.target/i386/hle-* testcases with Sun as

	* gcc.target/i386/hle-add-acq-1.c: Allow for ; after lock.
	* gcc.target/i386/hle-add-rel-1.c: Likewise.
	* gcc.target/i386/hle-and-acq-1.c: Likewise.
	* gcc.target/i386/hle-and-rel-1.c: Likewise.
	* gcc.target/i386/hle-cmpxchg-acq-1.c: Likewise.
	* gcc.target/i386/hle-cmpxchg-rel-1.c: Likewise.
	* gcc.target/i386/hle-or-acq-1.c: Likewise.
	* gcc.target/i386/hle-or-rel-1.c: Likewise.
	* gcc.target/i386/hle-sub-acq-1.c: Likewise.
	* gcc.target/i386/hle-sub-rel-1.c: Likewise.
	* gcc.target/i386/hle-xadd-acq-1.c: Likewise.
	* gcc.target/i386/hle-xadd-rel-1.c: Likewise.
	* gcc.target/i386/hle-xor-acq-1.c: Likewise.
	* gcc.target/i386/hle-xor-rel-1.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187321 138bc75d-0d04-0410-961f-82ee72b054a4
2012-05-09  Richard Guenther  <rguenther@suse.de>

	* tree-vectorizer.h (vect_loop_versioning): Adjust prototype.
	(vect_do_peeling_for_loop_bound): Likewise.
	(vect_do_peeling_for_alignment): Likewise.
	* tree-vect-loop-manip.c (conservative_cost_threshold): Remove.
	(vect_do_peeling_for_loop_bound): Get check_profitability and
	threshold as parameters.
	(vect_do_peeling_for_alignment): Likewise.
	(vect_loop_versioning): Likewise.
	* tree-vect-loop.c (vect_transform_loop): Compute check_profitability
	and threshold here.  Control where to put the check here.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187323 138bc75d-0d04-0410-961f-82ee72b054a4
        * Makefile.in (s-mlib): Add new argument MULTILIB_REQUIRED.
        * genmultilib (MULTILIB_REQUIRED): New.
        * doc/fragments.texi: Document the MULTILIB_REQUIRED.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187325 138bc75d-0d04-0410-961f-82ee72b054a4
        * genmultilib: Update copyright dates.
        * doc/fragments.texi: Ditto.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187327 138bc75d-0d04-0410-961f-82ee72b054a4
	PR tree-optimization/53226
	* tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Remove
	prev and prev_initialized vars, gimple_set_plf (stmt, GF_PLF_1, false)
	before processing it and gimple_set_plf (stmt, GF_PLF_1, true) if it
	doesn't need to be revisited, look for earliest stmt with
	!gimple_plf (stmt, GF_PLF_1) if something changed.

	* gcc.c-torture/compile/pr53226.c: New test.


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

2012-05-09  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

	* tree-ssa-loop-ivopts.c (add_autoinc_candidates, get_address_cost):
	Replace use of HAVE_{POST/PRE}_{INCREMENT/DECREMENT} with
	USE_{LOAD/STORE}_{PRE/POST}_{INCREMENT/DECREMENT} appropriately.
	* config/arm/arm.h (ARM_AUTOINC_VALID_FOR_MODE_P): New.
	(USE_LOAD_POST_INCREMENT): Define.
	(USE_LOAD_PRE_INCREMENT): Define.
	(USE_LOAD_POST_DECREMENT): Define.
	(USE_LOAD_PRE_DECREMENT): Define.
	(USE_STORE_PRE_DECREMENT): Define.
	(USE_STORE_PRE_INCREMENT): Define.
	(USE_STORE_POST_DECREMENT): Define.
	(USE_STORE_POST_INCREMENT): Define.
	(arm_auto_incmodes): Add enumeration.
	* config/arm/arm-protos.h (arm_autoinc_modes_ok_p): Declare.
	* config/arm/arm.c (arm_autoinc_modes_ok_p): Define.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187329 138bc75d-0d04-0410-961f-82ee72b054a4
2012-05-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/18437
	* gfortran.dg/vect/rnflow-trs2a2.f90: Move ...
	* gfortran.dg/vect/fast-math-rnflow-trs2a2.f90: ... here.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187330 138bc75d-0d04-0410-961f-82ee72b054a4
Add a test for PR middle-end/53249

	PR middle-end/53249
	* gcc.target/i386/pr53249.c: New.


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