Commit Graph

145744 Commits

Author SHA1 Message Date
Arnaud Charlet
f96fd197d2 [multiple changes]
2016-05-02  Arnaud Charlet  <charlet@adacore.com>

	* exp_ch5.adb, layout.adb, gnatcmd.adb exp_attr.adb, make.adb,
	bindgen.adb, debug.adb, exp_pakd.adb, freeze.adb, sem_util.adb,
	gnatlink.adb, switch-m.adb, exp_ch4.adb, repinfo.adb, adabkend.adb,
	osint.adb: Remove dead code.

2016-05-02  Yannick Moy  <moy@adacore.com>

	* a-tigeli.adb (Get_Line): Fix bound for test to
	decide when to compensate for character 0 added by call to fgets.

From-SVN: r235710
2016-05-02 11:11:03 +02:00
Arnaud Charlet
3ba1a9eb6e [multiple changes]
2016-05-02  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch4.adb (Analyze_Allocator): If the expression does not
	have a subtype indication and the type is an unconstrained tagged
	type with defaulted discriminants, create an explicit constraint
	for it during analysis to prevent out-of-order freezing actions
	on generated classwide types.

2016-05-02  Javier Miranda  <miranda@adacore.com>

	* exp_ch5.adb (Expand_N_Assignment_Statement):
	In the runtime check that ensures that the tags of source an
	target match, add missing displacement of the pointer to the
	objects if they cover interface types.

2016-05-02  Ed Schonberg  <schonberg@adacore.com>

	* sem_attr.adb (Analyze_Attribute, case 'Old): Do not use
	base type for attribute when type is discrete: transformation
	is not needed for such types, and leads to spurious errors if
	the context is a case construct.

From-SVN: r235709
2016-05-02 11:08:44 +02:00
Claudiu Zissulescu
fc1c2d0482 [ARC] Add new ARCv2 instructions.
gcc/
2016-05-02  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc-protos.h (compact_memory_operand_p): Declare.
	* config/arc/arc.c (arc_output_commutative_cond_exec): Consider
	bmaskn instruction.
	(arc_dwarf_register_span): Remove enum keyword.
	(compact_memory_operand_p): New function.
	* config/arc/arc.h (reg_class): Add code density register classes.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	* config/arc/arc.md (*movqi_insn): Add code density instructions.
	(*movhi_insn, *movsi_insn, *movsf_insn): Likewise.
	(*extendhisi2_i, andsi3_i, cmpsi_cc_insn_mixed): Likewise.
	(*cmpsi_cc_c_insn, *movsi_ne): Likewise.
	* config/arc/constraints.md (C2p, Uts, Cm1, Cm3, Ucd): New
	constraints.
	(h, Rcd, Rsd, Rzd): New register constraints.
	(T): Use compact_memory_operand_p function.
	* config/arc/predicates.md (compact_load_memory_operand): Remove.

From-SVN: r235707
2016-05-02 10:54:34 +02:00
Richard Biener
02673c66c6 decl.c (grokdeclarator): Properly insert a DECL_EXPR for anonymous VLAs.
2016-05-02  Richard Biener  <rguenther@suse.de>

	cp/
	* decl.c (grokdeclarator): Properly insert a DECL_EXPR for
	anonymous VLAs.

From-SVN: r235706
2016-05-02 08:28:33 +00:00
Richard Biener
c83e6ebf12 trans-array.c (gfc_trans_create_temp_array): Properly create a DECL_EXPR for the anonymous VLA array type.
2016-05-02  Richard Biener  <rguenther@suse.de>

	fortran/
	* trans-array.c (gfc_trans_create_temp_array): Properly
	create a DECL_EXPR for the anonymous VLA array type.

From-SVN: r235705
2016-05-02 08:27:54 +00:00
Oleg Endo
7555e8b225 sh.md (*negnegt, *movtt): Remove.
gcc/
	* config/sh/sh.md (*negnegt, *movtt): Remove.

From-SVN: r235704
2016-05-02 08:21:27 +00:00
Eric Botcazou
552cc5904c decl.c (elaborate_reference_1): Do not bother about operand #2 for COMPONENT_REF.
* gcc-interface/decl.c (elaborate_reference_1): Do not bother about
	operand #2 for COMPONENT_REF.
	* gcc-interface/utils2.c (gnat_save_expr): Likewise.
	(gnat_protect_expr): Likewise.
	(gnat_stabilize_reference_1): Likewise.
	(gnat_rewrite_reference): Do not bother about operand #3 for ARRAY_REF.
	(get_inner_constant_reference): Likewise.
	(gnat_invariant_expr): Likewise.
	* gcc-interface/trans.c (fold_constant_decl_in_expr): Likewise.

From-SVN: r235701
2016-05-02 07:46:05 +00:00
Marek Polacek
6b9933b9b4 Fix ICE in dump_pred_graph
2016-05-02  Marek Polacek  <polacek@redhat.com>
	    Tom de Vries  <tom@codesourcery.com>

	PR tree-optimization/70700
	* tree-ssa-structalias.c (dump_pred_graph): Fix getting varinfo for ids
	bigger than FIRST_REF_NODE.

	* gcc.dg/pr70700.c: New test.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r235700
2016-05-02 07:42:06 +00:00
Eric Botcazou
3eaec28592 trans.c (Range_to_gnu): New static function.
* gcc-interface/trans.c (Range_to_gnu): New static function.
	(Raise_Error_to_gnu) <N_In>: Call it to translate the range.
	(gnat_to_gnu) <N_In>: Likewise.

From-SVN: r235699
2016-05-02 07:38:37 +00:00
Oleg Endo
40d848c714 re PR target/52898 (SH Target: Inefficient DImode comparisons)
gcc/
	PR target/52898
	* config/sh/sh.c (sh_option_override): Remove TARGET_CBRANCHDI4,
	TARGET_CMPEQDI_T.
	(prepare_cbranch_operands): Don't use scratch register.  Assume that
	function is used when pseudos can be created.
	(expand_cbranchdi4): Likewise.  Remove unused TARGET_CMPEQDI_T paths.
	* config/sh/sh.md (cbranchsi4): Allow only when pseudos can be created.
	(cbranchdi4, cbranchdi4_i): Simplify to single cbranchdi4
	define_expand.  Allow it only when pseudos can be created.
	* config/sh/sh.opt (mcbranchdi, mcmpeqdi): Delete.

From-SVN: r235698
2016-05-02 05:25:46 +00:00
GCC Administrator
126fa2bb01 Daily bump.
From-SVN: r235697
2016-05-02 00:16:19 +00:00
Uros Bizjak
90f8226087 constraints.md (BC): Only allow -1 operands.
* config/i386/constraints.md (BC): Only allow -1 operands.
	* config/i386/sse.md (mov<mode>_internal): Add (v,C) alternative.
	Add "enabled" attribute.  Update XI mode attribute calculation.
	* config/i386/i386.md (*movxi_internal_avx512f): Add (v,C) alternative.
	(*movoi_internal_avx): Update XI mode attribute calculation.
	(*movti_internal): Ditto.

testsuite/ChangeLog:

	* gcc.target/i386/avx256-unaligned-load-1.c: Update scan strings.
	* gcc.target/i386/avx256-unaligned-store-1.c: Ditto.
	* gcc.target/i386/avx256-unaligned-store-2.c: Ditto.
	* gcc.target/i386/avx256-unaligned-store-3.c: Ditto.
	* gcc.target/i386/avx256-unaligned-store-4.c: Ditto.

From-SVN: r235693
2016-05-01 21:04:05 +02:00
Jakub Jelinek
c100769bcc re PR bootstrap/70704 (AIX bootstrap comparison failure)
PR bootstrap/70704
	* configure.ac (--enable-stage1-checking): Add missing
	--enable-checking=.
	* configure: Regenerated.

From-SVN: r235692
2016-05-01 12:49:25 +02:00
Oleg Endo
ea15a06fe7 sh.md (push, [...]): Remove constraints.
gcc/
	* config/sh/sh.md (push, pop, ic_invalidate_line, cstoresi4, cstoredi4,
	cstoresf4, cstoredf4, fix_truncsfsi2): Remove constraints.

From-SVN: r235691
2016-05-01 07:52:32 +00:00
Eric Botcazou
72a109f7cc rs6000.c (altivec_expand_lv_builtin): Do not use switch statement on instruction code.
* config/rs6000/rs6000.c (altivec_expand_lv_builtin): Do not use switch
	statement on instruction code.  Remove trailing spaces.
	(altivec_expand_stv_builtin): Likewise.

From-SVN: r235690
2016-05-01 07:32:01 +00:00
Oleg Endo
d5dd0a6208 sh.h (TARGET_SH4): Remove and use default implementation.
gcc/
	* config/sh/sh.h (TARGET_SH4): Remove and use default implementation.
	(TARGET_FPU_DOUBLE): Simplify.
	(BASE_ARG_REG, DOUBLE_TYPE_SIZE, OPTIMIZE_MODE_SWITCHING): Replace
	'TARGET_SH4 || TARGET_SH2A_DOUBLE' conditions with 'TARGET_FPU_DOUBLE'.
	* config/sh/sh.c: Replace 'TARGET_SH4 || TARGET_SH2A_DOUBLE' conditions
	with 'TARGET_FPU_DOUBLE'.
	* config/sh/sh.md: Likewise.

From-SVN: r235689
2016-05-01 05:06:08 +00:00
Yoshinori Sato
21b607581a linux.h (SH_DIV_STRATEGY_DEFAULT, [...]): Remove.
gcc/
	* config/sh/linux.h (SH_DIV_STRATEGY_DEFAULT,
	SH_DIV_STR_FOR_SIZE): Remove.
	* config/sh/netbsd-elf.h (SH_DIV_STRATEGY_DEFAULT,
	SH_DIV_STR_FOR_SIZE): Remove.

From-SVN: r235688
2016-05-01 03:59:39 +00:00
Oleg Endo
5a2fc4d738 predicates.md (any_register_operand, [...]): Delete.
gcc/
	* config/sh/predicates.md (any_register_operand, zero_extend_operand,
	logical_reg_operand): Delete.
	(arith_operand, arith_reg_dest, arith_or_int_operand, cmpsi_operand,
	arith_reg_or_0_operand, arith_reg_or_0_or_1_operand, logical_operand,
	logical_and_operand, movsrc_no_disp_mem_operand): Rewrite using
	match_operand and match_test.
	(sh_const_vec, sh_1el_vec): Remove redundant checks.  Declare local
	variables on their first use.  Return bool values.
	* config/sh/sh.h (LOAD_EXTEND_OP): Update comment.
	* config/sh/sh.md (andsi3, iorsi3): Use arith_reg_dest for result and
	arith_reg_operand for input operand.  Remove empty constraints.
	(xorsi3): Delete.
	(*xorsi3_compact): Rename to xorsi3.
	(zero_extend<mode>si2): Use arith_reg_operand for input operand.
	(*zero_extend<mode>si2_disp_mem): Update comment.
	(mov_nop): Delete.

From-SVN: r235687
2016-05-01 03:23:26 +00:00
GCC Administrator
c4ef2cba38 Daily bump.
From-SVN: r235686
2016-05-01 00:16:23 +00:00
Joseph Myers
f3fe9c75d0 * zh_CN.po: Update.
From-SVN: r235681
2016-04-30 22:49:44 +01:00
Joseph Myers
c48d70fe91 * sv.po: Update.
From-SVN: r235679
2016-04-30 15:11:52 +01:00
Eric Botcazou
f73036c179 Make-lang.in (ACATSCMD): New variable.
ada/
	* gcc-interface/Make-lang.in (ACATSCMD): New variable.
	(check-acats): Use it.
	(check_acats_targets): Likewise.
testsuite/
	* ada/acats/run_acats: Rename into...
	* ada/acats/run_acats.sh: ...this.  Only export BASE variable.
	* ada/acats/run_all.sh: Remove redundant test.
	(target_run): Move around.
	(target_gnatchop): Use newly built executable.
	(target_gnatmake): Likewise.
	Check that the compilation of impbit succeeds.

From-SVN: r235678
2016-04-30 10:42:14 +00:00
Oleg Endo
ace08cb86b config.guess: Revert r235676.
/
	* config.guess: Revert r235676.
	* config.sub: Revert r235676.

libjava/
	* classpath/config.guess: Revert r235676.
	* classpath/config.sub: Revert r235676.

From-SVN: r235677
2016-04-30 10:26:14 +00:00
Oleg Endo
bc6d901463 config.guess: Remove SH5 support.
/
	* config.guess:  Remove SH5 support.
	* config.sub: Likewise.
	* configure: Likewise.
	* configure.ac: Likewise.

config/
	* picflag.m4:  Remove SH5 support.

gcc/
	* config/sh/t-sh: Remove SH5 support.
	* config.gcc: Likewise.
	* configure: Likewise.

contrib/
	* compare-all-tests: Remove SH5 support.
	* config-list.mk: Likewise.

libada/
	* configure: Remove SH5 support.

libgcc/
	* config.host: Remove SH5 support.
	* configure: Likewise.

libiberty/
	* configure: Remove SH5 support.

libjava/
	* classpath/config.guess: Remove SH5 support.
	* classpath/config.sub: Likewise.

From-SVN: r235676
2016-04-30 09:11:03 +00:00
Rainer Orth
c41de70aca Handle -fcilkplus in Mac OS X LINK_COMMAND_SPEC
* config/darwin.h (LINK_COMMAND_SPEC_A): Handle -fcilkplus.

From-SVN: r235675
2016-04-30 06:27:10 +00:00
Oleg Endo
f1bebab697 sh.c (register_sh_passes, [...]): Remove TARGET_SH1 checks.
gcc/
	* config/sh/sh.c (register_sh_passes, sh_option_override,
	sh_print_operand, prepare_move_operands,
	sh_can_follow_jump): Remove TARGET_SH1 checks.
	* config/sh/sh.h (TARGET_VARARGS_PRETEND_ARGS, VALID_REGISTER_P,
	PROMOTE_MODE): Likewise.
	* config/sh/sh.md (adddi3, addsi3, subdi3, subsi3, andsi3,
	movdi): Likewise.

From-SVN: r235674
2016-04-30 05:39:59 +00:00
Oleg Endo
85e051a3c4 thunk3.C: Remove SH5 checks.
testsuite/
	* g++.old-deja/g++.jason/thunk3.C: Remove SH5 checks.
	* gcc.dg/20021029-1.c: Likewise.
	* gcc.target/sh/attr-isr-trap_exit.c: Likewise.
	* gcc.target/sh/attr-isr-trapa.c: Likewise.
	* gcc.target/sh/cmpstr.c: Likewise.
	* gcc.target/sh/cmpstrn.c: Likewise.
	* gcc.target/sh/memset.c: Likewise.
	* gcc.target/sh/pr21255-2-mb.c: Likewise.
	* gcc.target/sh/pr21255-2-ml.c: Likewise.
	* gcc.target/sh/pr39423-1.c: Likewise.
	* gcc.target/sh/pr49468-di.c: Likewise.
	* gcc.target/sh/pr49468-si.c: Likewise.
	* gcc.target/sh/pr49880-1.c: Likewise.
	* gcc.target/sh/pr49880-2.c: Likewise.
	* gcc.target/sh/pr49880-3.c: Likewise.
	* gcc.target/sh/pr50751-1.c: Likewise.
	* gcc.target/sh/pr50751-4.c: Likewise.
	* gcc.target/sh/pr50751-7.c: Likewise.
	* gcc.target/sh/pr51244-1.c: Likewise.
	* gcc.target/sh/pr51244-10.c: Likewise.
	* gcc.target/sh/pr51244-11.c: Likewise.
	* gcc.target/sh/pr51244-12.c: Likewise.
	* gcc.target/sh/pr51244-13.c: Likewise.
	* gcc.target/sh/pr51244-14.c: Likewise.
	* gcc.target/sh/pr51244-17.c: Likewise.
	* gcc.target/sh/pr51244-18.c: Likewise.
	* gcc.target/sh/pr51244-19.c: Likewise.
	* gcc.target/sh/pr51244-4.c: Likewise.
	* gcc.target/sh/pr51244-5.c: Likewise.
	* gcc.target/sh/pr51244-7.c: Likewise.
	* gcc.target/sh/pr51244-8.c: Likewise.
	* gcc.target/sh/pr51244-9.c: Likewise.
	* gcc.target/sh/pr51697.c: Likewise.
	* gcc.target/sh/pr52483-1.c: Likewise.
	* gcc.target/sh/pr52483-2.c: Likewise.
	* gcc.target/sh/pr52483-3.c: Likewise.
	* gcc.target/sh/pr52483-5.c: Likewise.
	* gcc.target/sh/pr52933-1.c: Likewise.
	* gcc.target/sh/pr52933-2.c: Likewise.
	* gcc.target/sh/pr52933-3.c: Likewise.
	* gcc.target/sh/pr53568-1.c: Likewise.
	* gcc.target/sh/pr53976-1.c: Likewise.
	* gcc.target/sh/pr53988-1.c: Likewise.
	* gcc.target/sh/pr53988.c: Likewise.
	* gcc.target/sh/pr54089-1.c: Likewise.
	* gcc.target/sh/pr54089-6.c: Likewise.
	* gcc.target/sh/pr54089-7.c: Likewise.
	* gcc.target/sh/pr54089-8.c: Likewise.
	* gcc.target/sh/pr54089-9.c: Likewise.
	* gcc.target/sh/pr54236-1.c: Likewise.
	* gcc.target/sh/pr54236-2.c: Likewise.
	* gcc.target/sh/pr54236-3.c: Likewise.
	* gcc.target/sh/pr54236-4.c: Likewise.
	* gcc.target/sh/pr54386.c: Likewise.
	* gcc.target/sh/pr54602-1.c: Likewise.
	* gcc.target/sh/pr54685.c: Likewise.
	* gcc.target/sh/pr54760-1.c: Likewise.
	* gcc.target/sh/pr54760-2.c: Likewise.
	* gcc.target/sh/pr54760-3.c: Likewise.
	* gcc.target/sh/pr54760-4.c: Likewise.
	* gcc.target/sh/pr54760-5.c: Likewise.
	* gcc.target/sh/pr54760-6.c: Likewise.
	* gcc.target/sh/pr55146.c: Likewise.
	* gcc.target/sh/pr55160.c: Likewise.
	* gcc.target/sh/pr59278.c: Likewise.
	* gcc.target/sh/pr59401-1.c: Likewise.
	* gcc.target/sh/pr59533-1.c: Likewise.
	* gcc.target/sh/pr63260.c: Likewise.
	* gcc.target/sh/pragma-isr-trap-exit.c: Likewise.
	* gcc.target/sh/pragma-isr-trapa.c: Likewise.
	* gcc.target/sh/strlen.c: Likewise.
	* gcc.target/sh/torture/pr30807.c: Likewise.
	* gcc.target/sh/torture/pr34777.c: Likewise.
	* gcc.target/sh/torture/pr64652.c: Likewise.
	* gcc.target/sh/torture/pr65505.c: Likewise.
	* gcc.target/sh/torture/pragma-isr.c: Likewise.
	* gcc.target/sh/torture/pragma-isr2.c: Likewise.

From-SVN: r235673
2016-04-30 01:56:55 +00:00
Alan Modra
cc5f735431 [RS6000] Allow saving of fixed regs.
As I noted a long time ago in the comment on fixed_reg_p, the real
problem with saving fixed/global regs is that exception frame
unwinding might restore them.  So don't emit eh_frame info for any
such reg, and the unwinder won't restore them.

Also, tidy rs6000_savres_strategy.  Delaying some checks means we
won't iterate over regs quite so often.

	* config/rs6000/rs6000.c (rs6000_savres_strategy): Force inline
	restoring when fixed_reg_p, but allow out-of-line or stmw save.
	Check for user regs later to avoid unnecessary looping over regs.
	Merge user reg check with non-saved reg check.  Don't force
	inline VR restore when static chain used.
	(rs6000_frame_related): Omit eh_frame info for user regs when
	saving.
	(fixed_regs_p): Delete.

From-SVN: r235672
2016-04-30 10:05:39 +09:30
Alan Modra
8cd5d1f46c [RS6000] Split SAVRES_STRATEGY
No functional change here.  A single bit becomes two bits, which
always have the same value at the moment.

	* config/rs6000/rs6000.c (SAVRES_MULTIPLE): Replace with..
	(SAVE_STRATEGY, REST_STRATEGY): ..this.  Renumber and sort enum.
	Update all uses.

From-SVN: r235671
2016-04-30 10:04:58 +09:30
Alan Modra
223de6dae1 [RS6000] PR69645, -ffixed-reg ignored
Treat -ffixed-reg as we do for global asm regs.

	PR target/69645
	* config/rs6000/rs6000.c (fixed_reg_p): New function.
	(fixed_regs_p): Rename from global_regs_p.  Call fixed_reg_p.
	Update all uses.

From-SVN: r235670
2016-04-30 10:04:16 +09:30
Alan Modra
fd1c95f7fb [RS6000] Simplify setting of fixed_regs[RS6000_PIC_OFFSET_TABLE_REGNUM]
This makes the conditions look the same as other places that deal with
RS6000_PIC_OFFSET_TABLE_REGNUM, eg. first_reg_to_save.  No functional
changes.

	* config/rs6000/rs6000.c (rs6000_conditional_register_usage):
	Remove redundant PIC_OFFSET_TABLE_REGNUM test.  Replace with
	flag_pic test for Darwin.

From-SVN: r235669
2016-04-30 10:03:26 +09:30
GCC Administrator
de3259f228 Daily bump.
From-SVN: r235668
2016-04-30 00:16:18 +00:00
Alan Modra
725842d06f Goodbye REG_FREQ_CALLS_CROSSED and REG_N_THROWING_CALLS_CROSSED
* regs.h (struct reg_info_t): Delete freq_calls_crossed and
	throw_calls_crossed.
	(REG_FREQ_CALLS_CROSSED): Delete.
	(REG_N_THROWING_CALLS_CROSSED): Delete.
	* regstat.c (regstat_bb_compute_ri): Don't calculate
	REG_FREQ_CALLS_CROSSED and REG_N_THROWING_CALLS_CROSSED.
	(dump_reg_info): Don't print call cross frequency.
	* ira.c (combine_and_move_insns): Don't set REG_FREQ_CALLS_CROSSED
	and REG_N_THROWING_CALLS_CROSSED.

From-SVN: r235664
2016-04-30 09:31:52 +09:30
Alan Modra
91dabbb2c7 Goodbye REG_LIVE_LENGTH
* regs.h (struct reg_info_t): Delete live_length.
	(REG_LIVE_LENGTH): Delete macro.
	* regstat.c (regstat_bb_compute_ri): Delete artificial_uses,
	local_live, local_processed and local_live_last_luid params.
	Replace bb_index param with bb.  Don't set REG_LIVE_LENGTH.
	Formatting fixes.
	(regstat_compute_ri): Adjust for above.  Don't set
	REG_LIVE_LENGTH.
	(dump_reg_info): Don't print live length.
	* ira.c (update_equiv_regs): Replace test of REG_LIVE_LENGTH
	with test of setjmp_crosses.  Don't set REG_LIVE_LENGTH.
	Localize loop_depth var.

From-SVN: r235663
2016-04-30 09:31:07 +09:30
Paolo Carlini
411e5c675d re PR c++/66644 (Rejects C++11 in-class anonymous union members initialization)
/cp
2016-04-29  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/66644
	* class.c (check_field_decl): Remove final int* parameter, change
	the return type to bool; fix logic in order not to reject multiple
	initialized fields in anonymous struct.
	(check_field_decls): Adjust call.

/testsuite
2016-04-29  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/66644
	* g++.dg/cpp0x/nsdmi-anon-struct1.C: New.

From-SVN: r235662
2016-04-30 00:00:51 +00:00
Alan Modra
63ce14e03b ira.c validate_equiv_mem
This function is used to validate REG_EQUIV notes generated by ira,
and to validate potential insn combines performed by ira.  The two
conditions are not exactly the same, with reload being more
restrictive.  Separate them so more combines/moves can occur.

For example, this sequence from cfgexpand.c:expand_gimple_cond
	callq  _Z18update_bb_for_insnP15basic_block_def
	mov    0x10(%rbx),%rdi
	mov    0x0(%rip),%rbp        # x_rtl+0x34
	callq  _Z9safe_as_aIP8rtx_insn7rtx_defET_PT0_
	mov    %r13,%rdx
	mov    %rbp,%rsi
	mov    %rax,%rdi
	callq  _Z18create_basic_blockP7rtx_defS0_P15basic_block_def

becomes
	callq  _Z18update_bb_for_insnP15basic_block_def
	mov    0x10(%rbx),%rdi
	callq  _Z9safe_as_aIP8rtx_insn7rtx_defET_PT0_
	mov    0x0(%rip),%rsi        # x_rtl+0x34
	mov    %r13,%rdx
	mov    %rax,%rdi
	callq  _Z18create_basic_blockP7rtx_defS0_P15basic_block_def

	* ira.c (enum valid_equiv): New.
	(validate_equiv_mem): Return enum.
	(update_equiv_mem): Create replacement in more cases.
	(add_store_equivs): Update validate_equiv_mem call.

From-SVN: r235661
2016-04-30 09:30:22 +09:30
Alan Modra
b00544fa6d ira.c use DF infrastructure for combine_and_move_insns
This patch actually improves generated code, because REG_DEAD notes
used by the old insn scan are not always present.  On x86_64, see
gcc/wide-int-print.o:print_hex for an example of a function that is
smaller and uses one less callee saved reg.

	* ira.c (combine_and_move_insns): Rather than scanning insns,
	use DF infrastucture to find use and def insns.

From-SVN: r235660
2016-04-30 09:29:22 +09:30
Alan Modra
10e044468a ira.c combine_and_move_insns, and ordering of functions
Notes added by add_store_equivs are not used directly or indirectly by
combine_and_move_insns.  add_store_equivs can therefore run later
without affecting the output of combine_and_move_insns, and thus
add_store_equivs need not take into account potentially moved insns.
Since not all potentially combined/moved insns are in fact combined or
moved, this may allow add_store_equivs to add more REG_EQUIV notes.

grow_reg_equivs isn't needed until the reload reg_equivs array is
changed.

	ira.c (combine_and_move_insns): Move invariant conditions..
	(ira.c): ..to here.  Call combine_and_move_insns before
	add_store_equivs.  Call grow_reg_equivs later.  Allocate
	req_equiv later using max_reg_num() rather than global max_regno.
	(contains_replace_regs): Delete.
	(add_store_equivs): Remove contains_replace_regs test.

From-SVN: r235659
2016-04-30 09:28:17 +09:30
Alan Modra
c7a99fc663 ira.c tidies: validate_equiv_mem_from_store
* ira.c (struct equiv_mem_data): New.
	(equiv_mem, equiv_mem_modified): Delete static vars.
	(validate_equiv_mem_from_store): Use "data" param to communicate..
	(validate_equiv_mem): ..from here.

From-SVN: r235658
2016-04-30 09:27:33 +09:30
Alan Modra
42ae0d7fad ira.c tidies: split update_reg_equivs
* ira.c (add_store_equivs, combine_and_move_insns): New functions,
	split out from..
	(update_reg_equivs): ..here.  Move allocation and freeing of
	reg_equiv, and calls to grow_reg_equivs, init_alias_analysis,
	end_alias_analysis to..
	(ira): ..here.

From-SVN: r235657
2016-04-30 09:27:00 +09:30
Alan Modra
8c1d8b59fe ira.c tidies: move pdx_subregs into reg_equiv
Where pdx_subregs[regno] is used, reg_equiv[regno] is also used.

	* ira.c (pdx_subregs): Delete.
	(struct equivalence): Add pdx_subregs field.
	(set_paradoxical_subreg): Remove pdx_subregs param.  Update
	pdx_subregs access.
	(update_equiv_regs): Don't create or free pdx_subregs.  Update
	pdx_subregs access.

From-SVN: r235656
2016-04-30 09:26:16 +09:30
Bill Schmidt
8fa97501de altivec.h: Change definitions of vec_xl and vec_xst.
[gcc]

2016-04-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/altivec.h: Change definitions of vec_xl and
	vec_xst.
	* config/rs6000/rs6000-builtin.def (LD_ELEMREV_V2DF): New.
	(LD_ELEMREV_V2DI): New.
	(LD_ELEMREV_V4SF): New.
	(LD_ELEMREV_V4SI): New.
	(LD_ELEMREV_V8HI): New.
	(LD_ELEMREV_V16QI): New.
	(ST_ELEMREV_V2DF): New.
	(ST_ELEMREV_V2DI): New.
	(ST_ELEMREV_V4SF): New.
	(ST_ELEMREV_V4SI): New.
	(ST_ELEMREV_V8HI): New.
	(ST_ELEMREV_V16QI): New.
	(XL): New.
	(XST): New.
	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
	descriptions for VSX_BUILTIN_VEC_XL and VSX_BUILTIN_VEC_XST.
	* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Map from
	TARGET_P9_VECTOR to RS6000_BTM_P9_VECTOR.
	(altivec_expand_builtin): Add handling for
	VSX_BUILTIN_ST_ELEMREV_<MODE> and VSX_BUILTIN_LD_ELEMREV_<MODE>.
	(rs6000_invalid_builtin): Add error-checking for
	RS6000_BTM_P9_VECTOR.
	(altivec_init_builtins): Define builtins used to implement vec_xl
	and vec_xst.
	(rs6000_builtin_mask_names): Define power9-vector.
	* config/rs6000/rs6000.h (MASK_P9_VECTOR): Define.
	(RS6000_BTM_P9_VECTOR): Define.
	(RS6000_BTM_COMMON): Include RS6000_BTM_P9_VECTOR.
	* config/rs6000/vsx.md (vsx_ld_elemrev_v2di): New define_insn.
	(vsx_ld_elemrev_v2df): Likewise.
	(vsx_ld_elemrev_v4sf): Likewise.
	(vsx_ld_elemrev_v4si): Likewise.
	(vsx_ld_elemrev_v8hi): Likewise.
	(vsx_ld_elemrev_v16qi): Likewise.
	(vsx_st_elemrev_v2df): Likewise.
	(vsx_st_elemrev_v2di): Likewise.
	(vsx_st_elemrev_v4sf): Likewise.
	(vsx_st_elemrev_v4si): Likewise.
	(vsx_st_elemrev_v8hi): Likewise.
	(vsx_st_elemrev_v16qi): Likewise.
	* doc/extend.texi: Add prototypes for vec_xl and vec_xst.  Correct
	grammar.

[gcc/testsuite]

2016-04-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/vsx-elemrev-1.c: New.
	* gcc.target/powerpc/vsx-elemrev-2.c: New.
	* gcc.target/powerpc/vsx-elemrev-3.c: New.
	* gcc.target/powerpc/vsx-elemrev-4.c: New.

From-SVN: r235654
2016-04-29 20:57:14 +00:00
Patrick Palka
5a9561113a tree-ssa-threadedge.c (simplify_control_stmt_condition): Split out into ...
2016-04-29  Patrick Palka  <ppalka@gcc.gnu.org>

	* tree-ssa-threadedge.c (simplify_control_stmt_condition): Split
	out into ...
	(simplify_control_stmt_condition_1): ... here.  Recurse into
	BIT_AND_EXPRs and BIT_IOR_EXPRs.

	* gcc.dg/tree-ssa/ssa-thread-14.c: New test.
	* gcc.dg/tree-ssa/ssa-thread-11.c: Update expected output.

From-SVN: r235653
2016-04-29 13:15:25 -06:00
Cesar Philippidis
e7ff0319f3 re PR middle-end/70626 (bogus results in 'acc parallel loop' reductions)
gcc/c-family/
	PR middle-end/70626
	* c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
	* c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
	reduction clauses in acc parallel loops.

	gcc/c/
	PR middle-end/70626
	* c-parser.c (c_parser_oacc_loop): Don't augment mask with
	OACC_LOOP_CLAUSE_MASK.
	(c_parser_oacc_kernels_parallel): Update call to
	c_oacc_split_loop_clauses.

	gcc/cp/
	PR middle-end/70626
	* parser.c (cp_parser_oacc_loop): Don't augment mask with
	OACC_LOOP_CLAUSE_MASK.
	(cp_parser_oacc_kernels_parallel): Update call to
	c_oacc_split_loop_clauses.

	gcc/fortran/
	PR middle-end/70626
	* trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
	the reduction clause in both parallel and loop directives.

	gcc/testsuite/
	PR middle-end/70626
	* c-c++-common/goacc/combined-reduction.c: New test.
	* gfortran.dg/goacc/reduction-2.f95: Add check for kernels reductions.

	libgomp/
	PR middle-end/70626
	* testsuite/libgomp.oacc-c++/template-reduction.C: Adjust test.
	* testsuite/libgomp.oacc-c-c++-common/combined-reduction.c: New test.
	* testsuite/libgomp.oacc-fortran/combined-reduction.f90: New test.

From-SVN: r235651
2016-04-29 10:42:04 -07:00
Chris Manghane
e49aacaf30 escape: Remove previously existing analysis.
* Make-lang.in (GO_OBJS): Remove go/dataflow.o, go/escape.o.

    Reviewed-on: https://go-review.googlesource.com/18261

From-SVN: r235649
2016-04-29 17:33:01 +00:00
H.J. Lu
52d11a4bbf Update scan-assembler-not in PR target/70155 tests
Since PIC leads to the *movdi_internal pattern, check for nonexistence
of the *movdi_internal pattern in PR target/70155 tests only if PIC is
off.

	* gcc.target/i386/pr70155-1.c: Check for nonexistence of the
	*movdi_internal pattern only if PIC off.
	* gcc.target/i386/pr70155-2.c: Likewise.
	* gcc.target/i386/pr70155-3.c: Likewise.
	* gcc.target/i386/pr70155-4.c: Likewise.
	* gcc.target/i386/pr70155-5.c: Likewise.
	* gcc.target/i386/pr70155-6.c: Likewise.
	* gcc.target/i386/pr70155-7.c: Likewise.
	* gcc.target/i386/pr70155-8.c: Likewise.
	* gcc.target/i386/pr70155-15.c: Likewise.
	* gcc.target/i386/pr70155-17.c: Likewise.
	* gcc.target/i386/pr70155-22.c: Likewise.

From-SVN: r235647
2016-04-29 10:27:59 -07:00
David Edelsohn
402315aee6 re PR target/69810 (PowerPC64: unrecognizable insn)
PR target/69810
        * config/rs6000/rs6000.md (EXTQI): Don't allow extension to HImode.
        (zero_extendqi<mode>2_dot): Revert earlier conversion from
        define_insn_and_split to define_insn.
        (zero_extendqi<mode>2_dot2): Same.
        (extendqi<mode>2_dot): Same.
        (extendqi<mode>2_dot2): Same.

From-SVN: r235646
2016-04-29 13:20:36 -04:00
Chris Gregory
f92ab29ffa Remove trailing whitespace from libstdc++-v3 files
2016-04-29  Chris Gregory  <czipperz@gmail.com>

	* config/*: Remove trailing whitespace.
	* src/*: Likewise.
	* testsuite/tr1/*: Likewise.
	* testsuite/util/*: Likewise.

From-SVN: r235645
2016-04-29 17:11:43 +01:00
Bin Cheng
8960db3195 re PR tree-optimization/70803 (gcc.dg/vect/pr56625.c FAILs)
gcc/testsuite/ChangeLog
	PR tree-optimization/70803
	* gcc.dg/vect/pr56625.c: Require vect_int_mult.

From-SVN: r235644
2016-04-29 15:13:03 +00:00
Tom Tromey
76fe84ecfe Add DW_LANG_Rust
include/
	* dwarf2.h (enum dwarf_source_language) <DW_LANG_Rust,
	DW_LANG_Rust_old>: New constants.

From-SVN: r235643
2016-04-29 15:01:30 +00:00