compiler: Use MPC library for complex numbers.

	* go-gcc.cc (Gcc_backend::complex_constant_expression): Take one
	mpc_t parameter instead of two mpfr_t parameters.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216611 138bc75d-0d04-0410-961f-82ee72b054a4
	* ipa-icf.c (sem_item_optimizer::parse_nonsingleton_classes): Guard
	division by zero in dumps.
	(sem_item_optimizer::merge_classes): Ditto.



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

r216566 (r216568 for 4.9 branch) added %{fno-lto} to LINK_COMMAND_SPEC.
However the linker doesn't understand -fno-lto and errors out.
This causes an LTO/PGO bootstrap failure, because -fno-lto is used
during STAGEprofile.
Fixed by filtering out -fno-lto in collect2.c.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216613 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-24  Richard Biener  <rguenther@suse.de>

	* fold-const.c (fold_binary_loc): Fix copy-and-pasto.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216617 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-24  Richard Biener  <rguenther@suse.de>

	* Makefile.in (BUILD_CPPLIB): When in stage2+ use the
	host library and make sure to pull in the required libintl
	and libiconv dependencies.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216619 138bc75d-0d04-0410-961f-82ee72b054a4
Account for prologue spills in reg_pressure scheduling

	* haifa-sched.c (sched_class_regs_num, call_used_regs_num): New static
	arrays.  Use sched_class_regs_num instead of ira_class_hard_regs_num.
	(print_curr_reg_pressure, setup_insn_reg_pressure_info,)
	(model_update_pressure, model_spill_cost): Use sched_class_regs_num.
	(model_start_schedule): Update.
	(sched_pressure_start_bb): New static function.  Calculate
	sched_class_regs_num.
	(schedule_block): Use it.
	(alloc_global_sched_pressure_data): Calculate call_used_regs_num.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216620 138bc75d-0d04-0410-961f-82ee72b054a4
Improve scheduler dumps of ready list

	* sched-int.h (struct _haifa_insn_data:last_rfs_win): New field.
	* haifa-sched.c (INSN_LAST_RFS_WIN): New access macro.
	(rfs_result): Set INSN_LAST_RFS_WIN.  Update signature.
	(rank_for_schedule): Update calls to rfs_result to pass new parameters.
	(print_rank_for_schedule_stats): Print out elements of ready list that
	ended up on their respective places due to each of the sorting
	heuristics.
	(ready_sort): Update.
	(debug_ready_list_1): Improve printout for SCHED_PRESSURE_MODEL.
	(schedule_block): Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216621 138bc75d-0d04-0410-961f-82ee72b054a4
Remove cached_first_cycle_multipass_dfa_lookahead and cached_issue_rate

	* haifa-sched.c (cached_first_cycle_multipass_dfa_lookahead,)
	(cached_issue_rate): Remove.  Use dfa_lookahead and issue_rate instead.
	(max_issue, choose_ready, sched_init): Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216622 138bc75d-0d04-0410-961f-82ee72b054a4
Disable max_issue when scheduling for register pressure

	* haifa-sched.c (sched_init): Disable max_issue when scheduling for
	register pressure.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216623 138bc75d-0d04-0410-961f-82ee72b054a4
Handle SCRATCH in decompose_address

	* rtlanal.c (get_base_term): Handle SCRATCH.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216624 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-24  Daniel Hellstrom  <daniel@gaisler.com>

	* MAINTAINERS (write-after-approval): Add myself.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216626 138bc75d-0d04-0410-961f-82ee72b054a4
	* gcc.target/alpha/980217-1.c (main): Fix implicit int.
	* gcc.target/alpha/pr19518.c (_mm_setzero_si64): New function.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216627 138bc75d-0d04-0410-961f-82ee72b054a4
Fix gcc.dg/pr63594-1.c execution on Solaris/x86

        * gcc.dg/pr63594-1.c: Apply -mno-mmx to all i?86-*-* and x86_64-*-*
        targets.
        * gcc.dg/pr63594-2.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216629 138bc75d-0d04-0410-961f-82ee72b054a4
        PR target/63173
        * config/aarch64/arm_neon.h (__LD2R_FUNC): Remove macro.
        (__LD3R_FUNC): Ditto.
        (__LD4R_FUNC): Ditto.
        (vld2_dup_s8, vld2_dup_s16, vld2_dup_s32, vld2_dup_f32, vld2_dup_f64,
         vld2_dup_u8, vld2_dup_u16, vld2_dup_u32, vld2_dup_p8, vld2_dup_p16
         vld2_dup_s64, vld2_dup_u64, vld2q_dup_s8, vld2q_dup_p8, 
         vld2q_dup_s16, vld2q_dup_p16, vld2q_dup_s32, vld2q_dup_s64, 
         vld2q_dup_u8, vld2q_dup_u16, vld2q_dup_u32, vld2q_dup_u64 
         vld2q_dup_f32, vld2q_dup_f64): Rewrite using builtin functions.
        (vld3_dup_s64, vld3_dup_u64, vld3_dup_f64, vld3_dup_s8 
         vld3_dup_p8, vld3_dup_s16, vld3_dup_p16, vld3_dup_s32 
         vld3_dup_u8, vld3_dup_u16, vld3_dup_u32, vld3_dup_f32
         vld3q_dup_s8, vld3q_dup_p8, vld3q_dup_s16, vld3q_dup_p16 
         vld3q_dup_s32, vld3q_dup_s64, vld3q_dup_u8, vld3q_dup_u16 
         vld3q_dup_u32, vld3q_dup_u64, vld3q_dup_f32, vld3q_dup_f64): Likewise.
        (vld4_dup_s64, vld4_dup_u64, vld4_dup_f64, vld4_dup_s8 
         vld4_dup_p8, vld4_dup_s16, vld4_dup_p16, vld4_dup_s32 
         vld4_dup_u8, vld4_dup_u16, vld4_dup_u32, vld4_dup_f32 
         vld4q_dup_s8, vld4q_dup_p8, vld4q_dup_s16, vld4q_dup_p16 
         vld4q_dup_s32, vld4q_dup_s64, vld4q_dup_u8, vld4q_dup_u16 
         vld4q_dup_u32, vld4q_dup_u64, vld4q_dup_f32, vld4q_dup_f64): Likewise.
        * config/aarch64/aarch64.md (define_c_enum "unspec"): Add
        UNSPEC_LD2_DUP, UNSPEC_LD3_DUP, UNSPEC_LD4_DUP.
        * config/aarch64/aarch64-simd-builtins.def (ld2r, ld3r, ld4r): New
        builtins.
        * config/aarch64/aarch64-simd.md (aarch64_simd_ld2r<mode>): New pattern.
        (aarch64_simd_ld3r<mode>): Likewise.
        (aarch64_simd_ld4r<mode>): Likewise.
        (aarch64_ld2r<mode>): New expand.
        (aarch64_ld3r<mode>): Likewise.
        (aarch64_ld4r<mode>): Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216630 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-24  Richard Biener  <rguenther@suse.de>

	* genmatch.c (expr::gen_transform): Use fold_buildN_loc
	and build_call_expr_loc.
	(dt_simplify::gen): Drop non_lvalue for GIMPLE, use
	non_lvalue_loc to build it for GENERIC.
	(decision_tree::gen_generic): Add location argument to
	generic_simplify prototype.
	(capture_info): New class.
	(capture_info::capture_info): New constructor.
	(capture_info::walk_match): New method.
	(capture_info::walk_result): New method.
	(capture_info::walk_c_expr): New method.
	(dt_simplify::gen): Handle preserving side-effects for
	GENERIC code generation.
	(decision_tree::gen_generic): Do not reject operands
	with TREE_SIDE_EFFECTS.
	* generic-match.h: New file.
	* generic-match-head.c: Include generic-match.h, not gimple-match.h.
	* match.pd: Add some constant folding patterns from fold-const.c.
	* fold-const.c: Include generic-match.h.
	(fold_unary_loc): Dispatch to generic_simplify.
	(fold_ternary_loc): Likewise.
	(fold_binary_loc): Likewise.  Remove patterns now implemented
	by generic_simplify.
	* gimple-fold.c (replace_stmt_with_simplification): New function.
	(fold_stmt_1): Add valueize parameter, dispatch to gimple_simplify.
	(no_follow_ssa_edges): New function.
	(fold_stmt): New overload with valueization hook.  Use
	no_follow_ssa_edges for the overload without hook.
	(fold_stmt_inplace): Likewise.
	* gimple-fold.h (no_follow_ssa_edges): Declare.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216631 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-24  Richard Biener  <rguenther@suse.de>

	* Makefile.in (BUILD_CPPLIB): Move $(LIBINTL) $(LIBICONV)
	to genmatch BUILD_LIBS instead.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216632 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] Cleanup logic around aarch64_final_prescan

	* config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Wrap definition in
	do while (0).
	* config/aarch64/aarch64.c (is_mem_p): Delete.
	(is_memory_op): Rename to...
	(has_memory_op): ... This.  Use FOR_EACH_SUBRTX.
	(dep_between_memop_and_curr): Assert that the input is a SET.
	(aarch64_madd_needs_nop): Add comment.  Do not call
	dep_between_memop_and_curr on NULL body.
	(aarch64_final_prescan_insn): Add comment.
	Include rtl-iter.h.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216637 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-24  Christophe Lyon  <christophe.lyon@linaro.org>

	* lib/wrapper.exp ({tool}_maybe_build_wrapper): Clear
	wrap_compile_flags before setting it.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216638 138bc75d-0d04-0410-961f-82ee72b054a4
[AArch64] LINK_SPEC changes for Cortex-A53 erratum 835769 workaround 

     * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
     (LINK_SPEC): Include CA53_ERR_835769_SPEC.
     * config/aarch64/aarch64-linux.h (CA53_ERR_835769_SPEC): Define.
     (LINK_SPEC): Include CA53_ERR_835769_SPEC.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216639 138bc75d-0d04-0410-961f-82ee72b054a4
2014-10-24  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/arm/README.advsimd-intrinsics: New file.
	* gcc.target/aarch64/advsimd-intrinsics/README: Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h: Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/compute-ref-data.h:
	Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/advsimd-intrinsics.exp:
	Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/vaba.c: Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/vld1.c: Likewise.
	* gcc.target/aarch64/advsimd-intrinsics/vshl.c: Likewise.



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