gcc.git
9 years agosh.md: Add new unnamed split pattern to handle movt-movt sequences.
Oleg Endo [Fri, 2 Oct 2015 12:30:05 +0000 (12:30 +0000)]
sh.md: Add new unnamed split pattern to handle movt-movt sequences.

gcc/
* config/sh/sh.md: Add new unnamed split pattern to handle movt-movt
sequences.

From-SVN: r228386

9 years ago[PATCH][AARCH64][PR66776]Add cmovdi_insn_uxtw pattern.
Renlin Li [Fri, 2 Oct 2015 11:55:04 +0000 (11:55 +0000)]
[PATCH][AARCH64][PR66776]Add cmovdi_insn_uxtw pattern.

gcc/

2015-10-02  Renlin Li  <renlin.li@arm.com>

PR target/66776
* config/aarch64/aarch64.md (cmovdi_insn_uxtw): New pattern.

gcc/testsuite/

2015-10-02  Renlin Li  <renlin.li@arm.com>

PR target/66776
* gcc.target/aarch64/pr66776.c: New.

From-SVN: r228384

9 years agoMAINTAINERS: Update email address.
Florian Weimer [Fri, 2 Oct 2015 10:13:48 +0000 (12:13 +0200)]
MAINTAINERS: Update email address.

From-SVN: r228383

9 years agolang.opt (fbuiltin-printf): Accept.
Doug Rupp [Fri, 2 Oct 2015 09:45:45 +0000 (09:45 +0000)]
lang.opt (fbuiltin-printf): Accept.

* gcc-interface/lang.opt (fbuiltin-printf): Accept.
* gcc-interface/misc.c (gnat_handle_option): Ignore it.
* gcc-interface/lang-specs.h (@ada, @adawhy, @adascil): Propagate -f*
flags as -g* and -m* flags past -gnatez.

Co-Authored-By: Olivier Hainque <hainque@adacore.com>
From-SVN: r228381

9 years agoMAINTAINERS (Write After Approval): Add myself.
Louis Krupp [Fri, 2 Oct 2015 09:29:32 +0000 (09:29 +0000)]
MAINTAINERS (Write After Approval): Add myself.

2015-10-02  Louis Krupp <louis.krupp@zoho.com>

* MAINTAINERS  (Write After Approval): Add myself.

From-SVN: r228380

9 years agotrans.c (Pragma_to_gnu): Replace linear search with call to find_opt and issue warnin...
Eric Botcazou [Fri, 2 Oct 2015 09:28:56 +0000 (09:28 +0000)]
trans.c (Pragma_to_gnu): Replace linear search with call to find_opt and issue warnings if...

* gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Warnings>: Replace
linear search with call to find_opt and issue warnings if the -W
switch is not appropriate.

From-SVN: r228379

9 years agoBack out improper commit
Louis Krupp [Fri, 2 Oct 2015 09:26:40 +0000 (09:26 +0000)]
Back out improper commit

From-SVN: r228378

9 years agoada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
Eric Botcazou [Fri, 2 Oct 2015 09:18:34 +0000 (09:18 +0000)]
ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.

* gcc-interface/ada-tree.h (DECL_RESTRICTED_ALIASING_P): New flag.
* gcc-interface/decl.c (gnat_to_gnu_param): For parameters passed by
reference but whose type isn't by-ref and whose mechanism hasn't been
forced to by-ref, set the DECL_RESTRICTED_ALIASING_P flag directly on
them instead of changing their type.
* gcc-interface/trans.c (scan_rhs_r): New helper function.
(independent_iterations_p): New predicate.
(Loop_Statement_to_gnu): For a loop with an iteration scheme, set an
ivdep pragma if the iterations are independent.

From-SVN: r228377

9 years agoDelete undesirable svn:executable property
Louis Krupp [Fri, 2 Oct 2015 08:41:13 +0000 (08:41 +0000)]
Delete undesirable svn:executable property

From-SVN: r228376

9 years ago[RTL ifcvt] PR 67786, 67787: Check that intermediate instructions in the basic block...
Kyrylo Tkachov [Fri, 2 Oct 2015 08:36:45 +0000 (08:36 +0000)]
[RTL ifcvt] PR 67786, 67787: Check that intermediate instructions in the basic block don't clobber a reg used in condition

        PR rtl-optimization/67786
        PR rtl-optimization/67787
        * ifcvt.c (bb_valid_for_noce_process_p): Reject basic block if
        it modifies a reg used in the condition calculation.

        * gcc.dg/pr67786.c: New test.
        * gcc.dg/pr67787.c: Likewise.

From-SVN: r228375

9 years ago[Patch AArch64] Improve SIMD concatenation with zeroes
James Greenhalgh [Fri, 2 Oct 2015 08:32:12 +0000 (08:32 +0000)]
[Patch AArch64] Improve SIMD concatenation with zeroes

gcc/

* config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Add
alternatives for reads from memory and moves from general-purpose
registers.
(*aarch64_combinez_be<mode>): Likewise.

gcc/testsuite/

* gcc.target/aarch64/vect_combine_zeroes_1.c: New.

From-SVN: r228374

9 years agotrans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
Eric Botcazou [Fri, 2 Oct 2015 08:10:46 +0000 (08:10 +0000)]
trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.

* gcc-interface/trans.c (find_loop_for): Use FOR_EACH_VEC_ELT_REVERSE.
(Loop_Statement_to_gnu): Use FOR_EACH_VEC_ELT.
(finalize_nrv): Use FOR_EACH_VEC_SAFE_ELT and initialize field.
(build_stmt_group): Add blank lines.

From-SVN: r228373

9 years agore PR target/51726 (LTO and attribute 'selectany')
Kai Tietz [Fri, 2 Oct 2015 08:08:38 +0000 (08:08 +0000)]
re PR target/51726 (LTO and attribute 'selectany')

        PR target/51726
        * g++.dg/ext/selectany2.C: Allow uninitialized variable case.

From-SVN: r228371

9 years agore PR target/51726 (LTO and attribute 'selectany')
Kai Tietz [Fri, 2 Oct 2015 08:06:52 +0000 (08:06 +0000)]
re PR target/51726 (LTO and attribute 'selectany')

PR target/51726
* config/i386/winnt.c (ix86_handle_selectany_attribute): Handle
selectany within this function without need to keep attribute.
(i386_pe_encode_section_info): Remove selectany-code.

From-SVN: r228370

9 years agotree-ssa-sccvn.c (has_VN_INFO): New function.
Richard Biener [Fri, 2 Oct 2015 07:34:53 +0000 (07:34 +0000)]
tree-ssa-sccvn.c (has_VN_INFO): New function.

2015-10-02  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.c (has_VN_INFO): New function.
(free_scc_vn): Use it.
(visit_use): Remove dead code and refactor to use gassign
and use less indentation.

From-SVN: r228369

9 years ago[multiple changes]
Louis Krupp [Fri, 2 Oct 2015 04:03:34 +0000 (04:03 +0000)]
[multiple changes]

2015-10-01  Louis Krupp <louis.krupp@zoho.com>

PR fortran/62242
PR fortran/52332
* trans-array.c
(store_backend_decl): Create new gfc_charlen instance if requested
(get_array_ctor_all_strlen): Call store_backend_decl requesting
new gfc_charlen
(trans_array_constructor): Call store_backend_decl requesting
new gfc_charlen if get_array_ctor_strlen was called
(gfc_add_loop_ss_code): Don't try to convert non-constant length

2015-10-01  Louis Krupp     <louis.krupp@zoho.com>

PR fortran/62242
PR fortran/52332
* gfortran.dg/string_array_constructor_1.f90: New.
* gfortran.dg/string_array_constructor_2.f90: New.
* gfortran.dg/string_array_constructor_3.f90: New.

From-SVN: r228368

9 years agoApproved by FX
Louis Krupp [Fri, 2 Oct 2015 01:54:37 +0000 (01:54 +0000)]
Approved by FX

From-SVN: r228367

9 years agors6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)
Segher Boessenkool [Fri, 2 Oct 2015 01:29:26 +0000 (03:29 +0200)]
rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789)

After the shrink-wrapping patches the prologue will often be pushed
"deeper" into the function, which in turn means the software trace cache
pass will more often want to duplicate the basic block containing the
prologue.  This caused failures for 32-bit SVR4 with -msecure-plt PIC.

This configuration uses the load_toc_v4_PIC_1 instruction, which creates
assembler labels without using the normal machinery for that.  If now
the compiler decides to duplicate the insn, it will emit the same label
twice.  Boom.

It isn't so easy to fix this to use labels the compiler knows about (let
alone test that properly).  Instead, this patch wires up a "cannot_copy"
attribute to be used by TARGET_CANNOT_COPY_P, and sets that attribute on
these insns we do not want copied.

2015-10-01  Segher Boessenkool  <segher@kernel.crashing.org>

PR target/67788
PR target/67789
* config/rs6000/rs6000.c (TARGET_CANNOT_COPY_INSN_P): New.
(rs6000_cannot_copy_insn_p): New function.
* config/rs6000/rs6000.md (cannot_copy): New attribute.
(load_toc_v4_PIC_1_normal): Set cannot_copy.
(load_toc_v4_PIC_1_476): Ditto.

gcc/testsuite/
PR target/67788
PR target/67789
* gcc.target/powerpc/pr67789.c: New testcase.

From-SVN: r228366

9 years agoPR fortran.67802
Steven G. Kargl [Fri, 2 Oct 2015 00:53:00 +0000 (00:53 +0000)]
PR fortran.67802

2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran.67802
* decl.c (add_init_expr_to_sym): Numeric constant for character
length must be an INTEGER.

2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran.67802
* gfortran.dg/pr67802.f90: New test.

From-SVN: r228365

9 years agore PR fortran/66979 (gfortran internal compiler error with malformed FLUSH statement)
Steven G. Kargl [Fri, 2 Oct 2015 00:49:28 +0000 (00:49 +0000)]
re PR fortran/66979 (gfortran internal compiler error with malformed FLUSH statement)

2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/66979
* io.c (gfc_resolve_filepos): Check for a UNIT number.  Add a nearby
missing 'return false'.

2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/66979
gfortran.dg/pr66979.f90: new test.

From-SVN: r228364

9 years agore PR fortran/67616 (ICE on data initialization of type variable in block)
Steven G. Kargl [Fri, 2 Oct 2015 00:45:59 +0000 (00:45 +0000)]
re PR fortran/67616 (ICE on data initialization of type variable in block)

2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67616
* primary.c (gfc_match_structure_constructor): Use a possibly
host-associated symtree to prevent ICE.

2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/67616
* gfortran.dg/pr67616.f90: New test.

From-SVN: r228363

9 years agoDaily bump.
GCC Administrator [Fri, 2 Oct 2015 00:16:15 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r228362

9 years agouse sese_l throughout scop-detection
Aditya Kumar [Thu, 1 Oct 2015 22:04:20 +0000 (22:04 +0000)]
use sese_l throughout scop-detection

Use sese_l throughout SCoP detection and create vec<scop_p> at the very end when
all SCoPs have been identified. 'struct sese_l' is very lightweight (two
pointers) compared to 'struct scop'.

No functional change intended. Passes regtest and bootstrap.

gcc/ChangeLog:

2015-10-01  Aditya Kumar  <hiraditya@msn.com>

        * graphite-scop-detection.c (struct sese_l): New conversion constructor
          so that this type can be pushed into a vec.
        (class scop_builder): use sese_l to collect scops.
        (get_scops): New getter function.
        (remove_intersecting_scops): Use sese_l instead of scops_p.
        (intersects): Same.
        (add_scop): Same.
        (subsumes): Same.
        (remove_subscops): Same.
        (build_scops): Add scops to vec<scops_p> once all the scops have been
        detected.

From-SVN: r228359

9 years agoRename gimple_bb to gimple_poly_bb
Aditya Kumar [Thu, 1 Oct 2015 22:04:14 +0000 (22:04 +0000)]
Rename gimple_bb to gimple_poly_bb

Renaming gimple_bb to gimple_poly_bb because there is a function gimple_bb
by the same name in gimple.h. No functional change intended.
Passes regtest and bootstrap.

gcc/ChangeLog:

2015-10-01  Aditya Kumar  <hiraditya@msn.com>

        * graphite-isl-ast-to-gimple.c (class translate_isl_ast_to_gimple):
Renamed type from gimple_bb_p to gimple_poly_bb_p.
        (translate_isl_ast_node_user): Same.
        * graphite-poly.c (new_poly_bb): Same.
        * graphite-poly.h (gbb_from_bb): Same.
        * sese.h: Same.
        * graphite-sese-to-poly.c (new_gimple_bb): gimple_bb_p -> gimple_poly_bb_p
        (build_scop_scattering): Same.
        (find_params_in_bb): Same.
        (add_conditions_to_domain): Same.
        (sese_dom_walker::before_dom_children): Same.
        (analyze_drs_in_stmts): Same.
        (new_pbb_from_pbb): Same.
        (free_data_refs_aux): New pointer to type base_alias_pair.
        * graphite-sese-to-poly.h: Same.
        * sese.c (if_region_set_false_region): Fixed Indentation.
        (move_sese_in_condition): Same.

From-SVN: r228358

9 years agocorrectly handle non affine data references
Sebastian Pop [Thu, 1 Oct 2015 22:04:07 +0000 (22:04 +0000)]
correctly handle non affine data references

2015-10-01  Sebastian Pop  <s.pop@samsung.com>
            Aditya Kumar  <aditya.k7@samsung.com>
        PR tree-optimization/66980
        * graphite-scop-detection.c (stmt_has_simple_data_refs_p): Return false
        when data reference analysis has failed.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228357

9 years agore PR c++/54430 ([C++11] For-Loop: Scope of iterating variable begins too early)
Ville Voutilainen [Thu, 1 Oct 2015 19:22:08 +0000 (22:22 +0300)]
re PR c++/54430 ([C++11] For-Loop: Scope of iterating variable begins too early)

PR c++/54430

/cp
2015-10-01  Ville Voutilainen  <ville.voutilainen@gmail.com>

PR c++/54430
* name-lookup.c (push_binding): Make non-static.
* name-lookup.h (push_binding): Declare it.
* parser.c (cp_parser_range_for): Use it, get the range
declaration away from the scope until the range expression
has been parsed, then restore the declaration.

/testsuite
2015-10-01  Ville Voutilainen  <ville.voutilainen@gmail.com>

PR c++/54430
* g++.dg/cpp0x/range-for30.C: New.

From-SVN: r228354

9 years agoDo not describe -std=c11 etc. as experimental in c.opt help text.
Joseph Myers [Thu, 1 Oct 2015 17:00:14 +0000 (18:00 +0100)]
Do not describe -std=c11 etc. as experimental in c.opt help text.

I noticed that c.opt still described -std=c11 and related options as
experimental in the --help text.  This patch fixes this.

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

* c.opt (std=c11): Do not describe as experimental.
(std=gnu11): Likewise.
(std=iso9899:2011): Likewise.

From-SVN: r228349

9 years ago* doc/html/manual/errno.html: Add new file.
Jonathan Wakely [Thu, 1 Oct 2015 16:02:54 +0000 (17:02 +0100)]
* doc/html/manual/errno.html: Add new file.

From-SVN: r228348

9 years agocall scev analysis in scop-detection as in sese-to-poly
Sebastian Pop [Thu, 1 Oct 2015 15:17:58 +0000 (15:17 +0000)]
call scev analysis in scop-detection as in sese-to-poly

Before our rewrite of the scop detection, we used to not have a valid SESE
region under hand, and so we used to do more ad-hoc analysis of data references
by trying to prove that at all levels of a loop nest the data references would
be still valid.

Now that we have a valid SESE region, we can call the scev analysis in the same
way on the same computed loop nest in the scop-detection as in the sese-to-poly.

Next step will be to cache the data references analyzed in the scop detection
and not compute the same info in sese-to-poly.

The patch fixes block-1.f90 that used to ICE on x86_64-linux when compiled with
-m32.  Patch passed bootstrap with BOOT_CFLAGS="-g -O2 -fgraphite-identity
-floop-nest-optimize" and check on x86_64-linux using ISL-0.15.

2015-09-28  Sebastian Pop  <s.pop@samsung.com>
Aditya Kumar  <aditya.k7@samsung.com>

PR tree-optimization/67754
* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Call
scev analysis on the same loop nest as analyze_drs_in_stmts.
* graphite-sese-to-poly.c (outermost_loop_in_sese_1): Moved and renamed...
(try_generate_gimple_bb): Call outermost_loop_in_sese.
(analyze_drs_in_stmts): Same.
* sese.c (outermost_loop_in_sese): ...here.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228347

9 years agoadd recursion on the inner loops
Sebastian Pop [Thu, 1 Oct 2015 15:17:51 +0000 (15:17 +0000)]
add recursion on the inner loops

We now check that all data references in the current loop and inner loops
contained within loop are valid in an outer region before declaring that the
outer loop is a valid scop.

2015-09-30  Sebastian Pop  <s.pop@samsung.com>
    Aditya Kumar  <aditya.k7@samsung.com>

PR tree-optimization/67754
* graphite-scop-detection.c (loop_body_is_valid_scop): Add missing
recursion on the inner loops.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228346

9 years agoremove many typedefs
Trevor Saunders [Thu, 1 Oct 2015 15:12:31 +0000 (15:12 +0000)]
remove many typedefs

gcc/ChangeLog:

2015-10-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* cfganal.c, compare-elim.c, coverage.c, cprop.c, df-scan.c,
function.c, read-rtl.c, statistics.c, trans-mem.c, tree-if-conv.c,
tree-into-ssa.c, tree-loop-distribution.c, tree-ssa-coalesce.c,
tree-ssa-loop-ivopts.c, tree-ssa-reassoc.c, tree-ssa-strlen.c,
tree-ssa-tail-merge.c, tree-vrp.c, var-tracking.c: Remove
unneeded typedefs.

From-SVN: r228344

9 years agore PR c/65345 (ICE with _Generic selection on _Atomic int)
Marek Polacek [Thu, 1 Oct 2015 14:53:10 +0000 (14:53 +0000)]
re PR c/65345 (ICE with _Generic selection on _Atomic int)

PR c/65345
* config/i386/i386.c (ix86_atomic_assign_expand_fenv): Adjust to use
create_tmp_var_raw rather than create_tmp_var.

* gcc.dg/atomic/pr65345-4.c: New test.
* gcc.dg/pr65345-3.c: New test.

From-SVN: r228343

9 years agore PR go/66870 (split stack issues on ppc64le and ppc64)
Ian Lance Taylor [Thu, 1 Oct 2015 14:43:57 +0000 (14:43 +0000)]
re PR go/66870 (split stack issues on ppc64le and ppc64)

PR go/66870
* gospec.c (lang_specific_driver): Only look for OPT_m32 if
TARGET_CAN_SPLIT_STACK_64BIT is defined.

From-SVN: r228342

9 years agore PR tree-optimization/67769 (VRP pass does wrong optimization)
Marek Polacek [Thu, 1 Oct 2015 14:25:42 +0000 (14:25 +0000)]
re PR tree-optimization/67769 (VRP pass does wrong optimization)

PR tree-optimization/67769
* tree-ssa-phiopt.c (conditional_replacement): Call
reset_flow_sensitive_info_in_bb.
(minmax_replacement): Likewise.
(abs_replacement): Likewise.

* gcc.dg/torture/pr67769.c: New test.

From-SVN: r228341

9 years agobuiltins.c: Don't include gomp-constants.h.
Nathan Sidwell [Thu, 1 Oct 2015 14:13:30 +0000 (14:13 +0000)]
builtins.c: Don't include gomp-constants.h.

* builtins.c: Don't include gomp-constants.h.
(fold_builtin_1): Don't fold acc_on_device here.
* gimple-fold.c: Include gomp-constants.h.
(gimple_fold_builtin_acc_on_device): New.
(gimple_fold_builtin): Call it.

From-SVN: r228340

9 years agoEnable bt and and movzx for Lakemont
H.J. Lu [Thu, 1 Oct 2015 13:34:49 +0000 (13:34 +0000)]
Enable bt and and movzx for Lakemont

* config/i386/x86-tune.def (X86_TUNE_USE_BT): Enable for
Lakemont.
(X86_TUNE_ZERO_EXTEND_WITH_AND): Disable for Lakemont.

From-SVN: r228337

9 years agopr55113_0.c: Skip on all x86 targets.
Uros Bizjak [Thu, 1 Oct 2015 12:46:19 +0000 (14:46 +0200)]
pr55113_0.c: Skip on all x86 targets.

* gcc.dg/lto/pr55113_0.c: Skip on all x86 targets.

From-SVN: r228334

9 years agoFix typo in ChangeLog.
Oleg Endo [Thu, 1 Oct 2015 12:38:28 +0000 (12:38 +0000)]
Fix typo in ChangeLog.

From-SVN: r228333

9 years agore PR target/54236 ([SH] Improve addc and subc insn utilization)
Oleg Endo [Thu, 1 Oct 2015 12:36:15 +0000 (12:36 +0000)]
re PR target/54236 ([SH] Improve addc and subc insn utilization)

gcc/testsuite/
PR target/54236
* gcc.target/sh/pr54236-6.c: Fix assembler-no string.

From-SVN: r228332

9 years agoSave-and-restore errno more carefully in libstdc++
Jonathan Wakely [Thu, 1 Oct 2015 11:23:39 +0000 (12:23 +0100)]
Save-and-restore errno more carefully in libstdc++

* doc/xml/manual/diagnostics.xml: Document use of errno.
* doc/html/*: Regenerate.
* config/locale/generic/c_locale.cc (_Save_errno): New helper.
(__convert_to_v): Use _Save_errno.
* include/ext/string_conversions.h (__stoa): Only restore errno when
it isn't set to non-zero.

From-SVN: r228328

9 years ago* c-typeck.c (convert_for_assignment): Improve commentary.
Marek Polacek [Thu, 1 Oct 2015 10:14:39 +0000 (10:14 +0000)]
* c-typeck.c (convert_for_assignment): Improve commentary.

From-SVN: r228327

9 years agopr65105-1.c: Require sse2 effective target.
Uros Bizjak [Thu, 1 Oct 2015 10:06:27 +0000 (12:06 +0200)]
pr65105-1.c: Require sse2 effective target.

* gcc.target/i386/pr65105-1.c: Require sse2 effective target.
(main): Rename to sse2_test.  Abort if count != 5.
(dg-options): Add -save-temps.  Use "-msse2 -mtune=slm" instead
of -march=slm.
* gcc.target/i386/pr46865-2.c (dg-options): Remove -save-temps.

From-SVN: r228326

9 years ago[ChangeLog] Fix typo in 228324.
James Greenhalgh [Thu, 1 Oct 2015 09:36:01 +0000 (09:36 +0000)]
[ChangeLog] Fix typo in 228324.

s/Liekwise/Likewise/

From-SVN: r228325

9 years ago[Patch 2/2 ARM/AArch64] Add a new Cortex-A53 scheduling model
James Greenhalgh [Thu, 1 Oct 2015 09:33:40 +0000 (09:33 +0000)]
[Patch 2/2 ARM/AArch64] Add a new Cortex-A53 scheduling model

* config/arm/aarch-common-protos.h
(aarch_accumulator_forwarding): New.
(aarch_forward_to_shift_is_not_shifted_reg): Likewise.
* config/arm/aarch-common.c (aarch_accumulator_forwarding): New.
(aarch_forward_to_shift_is_not_shifted_reg): Liekwise.
* config/arm/cortex-a53.md: Rewrite.

From-SVN: r228324

9 years agogimple-match.h (mprts_hook): Declare.
Richard Biener [Thu, 1 Oct 2015 07:54:26 +0000 (07:54 +0000)]
gimple-match.h (mprts_hook): Declare.

2015-10-01  Richard Biener  <rguenther@suse.de>

* gimple-match.h (mprts_hook): Declare.
* gimple-match.head.c (mprts_hook): Define.
(maybe_push_res_to_seq): Use new hook.
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
* tree-ssa-sccvn.h (vn_ssa_aux::expr): Change to a gimple_seq.
(vn_ssa_aux::has_constants): Remove.
* tree-ssa-sccvn.c: Include gimple-match.h.
(VN_INFO_GET): Assert we don't re-use SSA names.
(vn_get_expr_for): Remove.
(expr_has_constants): Likewise.
(stmt_has_constants): Likewise.
(simplify_binary_expression): Likewise.
(simplify_unary_expression): Likewise.
(vn_lookup_simplify_result): New hook.
(visit_copy): Adjust.
(visit_reference_op_call): Likewise.
(visit_phi): Likewise.
(visit_use): Likewise.
(process_scc): Likewise.
(init_scc_vn): Likewise.
(visit_reference_op_load): Likewise.  Use match-and-simplify and
a gimple seq for inserted expressions.
(try_to_simplify): Remove GENERIC stmt combining code.
(sccvn_dom_walker::before_dom_children): Use match-and-simplify.
* tree-ssa-pre.c (eliminate_insert): Adjust.
(eliminate_dom_walker::before_dom_children): Likewise.

* gcc.dg/tree-ssa/ssa-fre-7.c: Adjust.
* gcc.dg/tree-ssa/ssa-fre-8.c: Likewise.

From-SVN: r228320

9 years agobb-reorder: Documentation updates
Segher Boessenkool [Thu, 1 Oct 2015 06:40:01 +0000 (08:40 +0200)]
bb-reorder: Documentation updates

2015-09-23   Segher Boessenkool  <segher@kernel.crashing.org>

* doc/invoke.texi (Optimization Options): Add
-freorder-blocks-algorithm=.
(Optimize Options) <-O>: Add -freorder-blocks.
<-O2>: Remove -freorder-blocks.  Add -freorder-blocks-algorithm=stc.
<-Os>: Add -freorder-blocks-algorithm=stc as not enabled.
<-freorder-blocks>: Also enabled at levels -O and -Os.
<-freorder-blocks-algorithm=>: Document new option.

From-SVN: r228319

9 years agobb-reorder: Add -freorder-blocks-algorithm= and wire it up
Segher Boessenkool [Thu, 1 Oct 2015 06:38:24 +0000 (08:38 +0200)]
bb-reorder: Add -freorder-blocks-algorithm= and wire it up

This adds an -freorder-blocks-algorithm=[simple|stc] flag, with "simple"
as default.  For -O2 and up (except -Os) it is switched to "stc" instead.
Targets that never want STC can override this.  This changes -freorder-blocks
to be on at -O1 and up (was -O2 and up).

In effect, the changes are for -O1 (which now gets "simple" instead of
nothing), -Os (which now gets "simple" instead of "stc", since STC results
in much bigger code), and for targets that wish to never use STC (not in
this patch though).

2015-09-23   Segher Boessenkool  <segher@kernel.crashing.org>

* bb-reorder.c (reorder_basic_blocks): Use the algorithm selected
with flag_reorder_blocks_algorithm.
* common.opt (freorder-blocks-algorithm=): New flag.
(reorder_blocks_algorithm): New enum.
* flag-types.h (reorder_blocks_algorithm): New enum.
* opts.c (default_options_table): Use -freorder-blocks at -O1 and up,
and -freorder-blocks-algorithm=stc at -O2 and up (not at -Os).

From-SVN: r228318

9 years agobb-reorder: Add the "simple" algorithm
Segher Boessenkool [Thu, 1 Oct 2015 06:35:57 +0000 (08:35 +0200)]
bb-reorder: Add the "simple" algorithm

2015-10-01  Segher Boessenkool  <segher@kernel.crashing.org>

* bb-reorder.c: Add intro comment.
(reorder_basic_blocks_software_trace_cache): Print a header to
the dump file.
(edge_order): New function.
(reorder_basic_blocks_simple): New function.
(reorder_basic_blocks): Choose between the STC and the simple
algorithms (always choose the former).

From-SVN: r228317

9 years agobb-reorder: Split out STC
Segher Boessenkool [Thu, 1 Oct 2015 06:33:09 +0000 (08:33 +0200)]
bb-reorder: Split out STC

2015-09-23   Segher Boessenkool  <segher@kernel.crashing.org>

* bb-reorder.c (reorder_basic_blocks_software_trace_cache): New
function, factored out from ...
(reorder_basic_blocks): ... here.

From-SVN: r228316

9 years agoMake dumping of function attributes resemble source syntax
Tom de Vries [Thu, 1 Oct 2015 05:42:50 +0000 (05:42 +0000)]
Make dumping of function attributes resemble source syntax

2015-10-01  Tom de Vries  <tom@codesourcery.com>

* tree-cfg.c (dump_function_to_file): Dump function attributes using
__attribute__(()) string.  Move dumping of function attributes to before
function name.

From-SVN: r228315

9 years agoDaily bump.
GCC Administrator [Thu, 1 Oct 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r228314

9 years agore PR go/66870 (split stack issues on ppc64le and ppc64)
Lynn Boger [Wed, 30 Sep 2015 23:06:11 +0000 (18:06 -0500)]
re PR go/66870 (split stack issues on ppc64le and ppc64)

PR target/66870
* config/rs6000/sysv4.h (TARGET_CAN_SPLIT_STACK_64BIT): Define.
* configure.ac: Define HAVE_GOLD_ALTERNATE_SPLIT_STACK on Power
based on gold linker version.
* gcc.c: Add -fuse-ld=gold to STACK_SPLIT_SPEC if
HAVE_GOLD_ALTERNATE_SPLIT_STACK defined.
* configure, config.in: Regenerate.
go:
* gospec.c (lang_specific_driver): Set appropriate split stack
options for 64 bit compiles based on TARGET_CAN_SPLIT_STACK_64BIT.

From-SVN: r228311

9 years ago[RS6000] Make -msingle-pic-base remove the ELFv2 global entry code
Alan Modra [Wed, 30 Sep 2015 22:19:18 +0000 (07:49 +0930)]
[RS6000] Make -msingle-pic-base remove the ELFv2 global entry code

For other ABIs, -msingle-pic-base makes gcc omit loading of the PIC
register in function prologues.  This patch makes the option affect
ELFv2 too.

* config/rs6000/rs6000.c (rs6000_emit_prologue): Don't set
r2_setup_needed when TARGET_SINGLE_PIC_BASE.
(rs6000_output_mi_thunk): Likewise.

From-SVN: r228309

9 years agomkoffload.c (process): Change offload data format.
Nathan Sidwell [Wed, 30 Sep 2015 21:35:47 +0000 (21:35 +0000)]
mkoffload.c (process): Change offload data format.

gcc/
* config/nvptx/mkoffload.c (process): Change offload data format.

libgomp/
* plugin/plugin-nvptx.c (targ_fn_launch): Use GOMP_DIM_MAX.
(struct targ_ptx_obj): New.
(nvptx_tdata): Move earlier, change data format.
(link_ptx): Take targ_ptx_obj ptr and count.  Allow multiple
objects.
(GOMP_OFFLOAD_load_image): Adjust.

Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
From-SVN: r228308

9 years ago[RS6000] Correct powerpc sysv stack argument accounting
Alan Modra [Wed, 30 Sep 2015 21:29:00 +0000 (06:59 +0930)]
[RS6000] Correct powerpc sysv stack argument accounting

ppc32 starts using the stack for integer arg passing when we run out
of integer arg passing registers.  Similarly, we start using the stack
for floating point args when we run out of floating point registers.
The decision on where an integer arg goes does not depend on number of
floating point args, nor does the decision on where a floating point
arg goes depend on number of integer args.  Alignment of stack args
also simply depends on number of stack args.

This patch untangles the horrible mess we had, with intarg_count being
wrongly used to count both integer args and stack words.

* src/powerpc/ffi_sysv.c (ffi_prep_cif_sysv_core): Count fprs,
gprs, and stack words separately.
(ffi_prep_args_SYSV): Similarly.

From-SVN: r228307

9 years ago[PATCH] Improve DOM's optimization of control statements
Jeff Law [Wed, 30 Sep 2015 20:28:14 +0000 (14:28 -0600)]
[PATCH] Improve DOM's optimization of control statements

* tree-ssa-dom.c (optimize_stmt): Collapse control flow statements
with constant conditions.
* tree-ssa-threadupdate.c (remove_jump_threads_starting_at): New.
(remove_ctrl_stmt_and_useless_edges): No longer static.
* tree-ssa-threadupdate.h (remove_jump_threads_starting_at): Prototype.
(remove_ctrl_stmt_and_useless_edges): Likewise.

* gcc.dg/tree-ssa/ssa-dom-branch-1.c: New test.

From-SVN: r228306

9 years agomessages_members.cc (Catalog_info, Catalogs): Move...
François Dumont [Wed, 30 Sep 2015 20:04:43 +0000 (20:04 +0000)]
messages_members.cc (Catalog_info, Catalogs): Move...

2015-09-30  François Dumont  <fdumont@gcc.gnu.org>
    Jonathan Wakely  <jwakely@redhat.com>

* config/locale/gnu/messages_members.cc (Catalog_info, Catalogs):
Move...
* config/locale/gnu/c++locale_internal.h: ...here in std namespace.
* config/locale/gnu/c_locale.cc: Move implementation of latter here.
* src/c++98/Makefile.am: Compile c++locale.cc with -fimplicit-templates.
* src/c++98/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Adjust.

Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r228305

9 years agonvptx.c (nvptx_goacc_validate_dims): New.
Nathan Sidwell [Wed, 30 Sep 2015 19:16:29 +0000 (19:16 +0000)]
nvptx.c (nvptx_goacc_validate_dims): New.

* config/nvptx/nvptx.c (nvptx_goacc_validate_dims): New.
(TARGET_GOACC_VALIDATE_DIMS): Override.
* target.def (TARGET_GOACC): New target hook prefix.
(validate_dims): New hook.
* targhooks.h (default_goacc_validate_dims): New.
* omp-low.c (oacc_validate_dims): New.
(execute_oacc_device_lower): New.
(default_goacc_validate_dims): New.
(pass_data_oacc_device_lower): New.
(pass_oacc_device_lower): New pass.
(make_pass_oacc_device_lower): New.
* tree-pass.h (make_pass_oacc_device_lower): Declare.
* passes.def (pass_oacc_device_lower): Add it.
* doc/tm.texi: Rebuilt.
* doc/tm.texi.in (TARGET_GOACC_VALIDATE_DIMS): Add hook.
* doc/invoke.texi (oaccdevlow): Document tree dump flag.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
From-SVN: r228304

9 years agore PR rtl-optimization/67037 (Wrong code at -O1 and above on ARM)
Bernd Edlinger [Wed, 30 Sep 2015 18:51:31 +0000 (18:51 +0000)]
re PR rtl-optimization/67037 (Wrong code at -O1 and above on ARM)

2015-09-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR rtl-optimization/67037
        * lra-constraints.c (process_addr_reg): Use copy_rtx when necessary.

testsuite:
2015-09-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR rtl-optimization/67037
        * gcc.c-torture/execute/pr67037.c: New test.

From-SVN: r228303

9 years ago[PATCH] Update SSA_NAME manager to use two lists
Bernd Schmidt [Wed, 30 Sep 2015 17:43:26 +0000 (17:43 +0000)]
[PATCH] Update SSA_NAME manager to use two lists

* gimple-ssa.h (gimple_df): Add free_ssanames_queue field.
* passes.c: Include tree-ssanames.h.
(execute_function_todo): Flush the pending free SSA_NAMEs after
eliminating unreachable basic blocks.
* tree-ssanames.c (FREE_SSANAMES_QUEUE): new.
(init_ssanames): Initialize FREE_SSANAMES_QUEUE.
(fini_ssanames): Finalize FREE_SSANAMES_QUEUE.
(flush_ssanames_freelist): New function.
(release_ssaname_fn): Put released names on the queue.
(pass_release_ssa_names::execute): Call flush_ssanames_freelist.
* tree-ssanames.h (flush_ssanames_freelist): Declare.

From-SVN: r228302

9 years agoPass on the verbose flag "-v" to/in the mkoffloads
Thomas Schwinge [Wed, 30 Sep 2015 16:42:32 +0000 (18:42 +0200)]
Pass on the verbose flag "-v" to/in the mkoffloads

gcc/
* config/i386/intelmic-mkoffload.c (main): Parse "-v" flag.
(generate_target_descr_file, generate_target_offloadend_file)
(generate_host_descr_file, prepare_target_image, main): Pass it
on.
* config/nvptx/mkoffload.c (main): Parse "-v" flag.
(compile_native, main): Pass it on.
* lto-wrapper.c (compile_offload_image): Likewise.

From-SVN: r228301

9 years agoRefactor intelmic-mkoffload.c argv building to use obstacks
Thomas Schwinge [Wed, 30 Sep 2015 16:42:22 +0000 (18:42 +0200)]
Refactor intelmic-mkoffload.c argv building to use obstacks

That is, restore and adapt the code as originally proposed.

gcc/
* config/i386/intelmic-mkoffload.c (generate_host_descr_file)
(prepare_target_image, main): Refactor argv building to use
obstacks.

Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com>
From-SVN: r228300

9 years agoMore DEF_FUNCTION_TYPE_VAR_6/DEF_FUNCTION_TYPE_VAR_11 cleanup
Thomas Schwinge [Wed, 30 Sep 2015 15:14:29 +0000 (17:14 +0200)]
More DEF_FUNCTION_TYPE_VAR_6/DEF_FUNCTION_TYPE_VAR_11 cleanup

gcc/ada/
* gcc-interface/utils.c (DEF_FUNCTION_TYPE_VAR_11): Don't define.
gcc/jit/
* jit-builtins.h: Undefine DEF_FUNCTION_TYPE_VAR_6 after use.

Co-Authored-By: Ulrich Drepper <drepper@gmail.com>
From-SVN: r228298

9 years agospu-protos.h (spu_expand_atomic_op): Add prototype.
Ulrich Weigand [Wed, 30 Sep 2015 14:58:49 +0000 (14:58 +0000)]
spu-protos.h (spu_expand_atomic_op): Add prototype.

gcc/
* config/spu/spu-protos.h (spu_expand_atomic_op): Add prototype.
* config/spu/spu.c (spu_expand_atomic_op): New function.
* config/spu/spu.md (AINT): New mode iterator.
(ATOMIC): New code iterator.
(atomic_name, atomic_pred): New code predicates.
("atomic_load<mode>", "atomic_store<mode>"): New expanders.
("atomic_compare_and_swap<mode>", "atomic_exchange<mode>"): Likewise.
(""atomic_<atomic_name><mode>", "atomic_fetch_<atomic_name><mode>",
"atomic_<atomic_name>_fetch<mode>"): Likewise.

gcc/testsuite/
* lib/target-supports.exp (check_effective_target_sync_int_128):
Return 1 on spu-*-* targets.
(check_effective_target_sync_int_128_runtime): Likewise.
(check_effective_target_sync_long_long): Likewise.
(check_effective_target_sync_long_long_runtime): Likewise.
(check_effective_target_sync_int_long): Likewise.
(check_effective_target_sync_char_short): Likewise.

From-SVN: r228297

9 years agoi386.c (scalar_chain::analyze_register_chain): Ignore debug insns.
Ilya Enkovich [Wed, 30 Sep 2015 13:08:01 +0000 (13:08 +0000)]
i386.c (scalar_chain::analyze_register_chain): Ignore debug insns.

gcc/

* config/i386/i386.c (scalar_chain::analyze_register_chain): Ignore
debug insns.
(scalar_chain::convert_reg): Likewise.

gcc/testsuite/

* gcc.target/i386/pr67761.c: New test.

From-SVN: r228292

9 years agoalpha, ia64: Remove empty directories.
Matthias Klose [Wed, 30 Sep 2015 12:55:05 +0000 (12:55 +0000)]
alpha, ia64: Remove empty directories.

2015-09-30  Matthias Klose  <doko@ubuntu.com>

        * config/cpu/alpha, config/cpu/ia64: Remove empty directories.

From-SVN: r228291

9 years agobuiltins.c: Add comment that no new simplifications shouldd be added here.
Richard Biener [Wed, 30 Sep 2015 12:52:37 +0000 (12:52 +0000)]
builtins.c: Add comment that no new simplifications shouldd be added here.

2015-09-30  Richard Biener  <rguenther@suse.de>

* builtins.c: Add comment that no new simplifications shouldd
be added here.

From-SVN: r228290

9 years ago2015-09-30 Matthias Klose <doko@ubuntu.com>
Matthias Klose [Wed, 30 Sep 2015 12:42:44 +0000 (12:42 +0000)]
2015-09-30  Matthias Klose  <doko@ubuntu.com>

        * jit-builtins.h Define DEF_FUNCTION_TYPE_VAR_6,
        remove DEF_FUNCTION_TYPE_VAR_11.
        * jit-builtins.c (builtins_manager::make_type): Define and handle
        DEF_FUNCTION_TYPE_VAR_6, remove DEF_FUNCTION_TYPE_VAR_11.

From-SVN: r228289

9 years agore PR c/67730 (No warning when returning NULL in void function)
Marek Polacek [Wed, 30 Sep 2015 11:26:44 +0000 (11:26 +0000)]
re PR c/67730 (No warning when returning NULL in void function)

PR c/67730
* c-typeck.c (c_finish_return): Use the expansion point location for
certain "return with value" warnings.

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

From-SVN: r228286

9 years agore PR tree-optimization/67690 (wrong code with -O2 on x86_64/Linux)
Marek Polacek [Wed, 30 Sep 2015 09:24:02 +0000 (09:24 +0000)]
re PR tree-optimization/67690 (wrong code with -O2 on x86_64/Linux)

PR tree-optimization/67690
* tree-ssa-ifcombine.c (pass_tree_ifcombine::execute): Call
reset_flow_sensitive_info_in_bb.
* tree-ssa-tail-merge.c (replace_block_by): Likewise.
* tree-ssanames.c: Include "gimple-iterator.h".
(reset_flow_sensitive_info_in_bb): New function.
* tree-ssanames.h (reset_flow_sensitive_info_in_bb): Declare.

* gcc.dg/torture/pr67690.c: New test.

From-SVN: r228284

9 years agoUse gcc/coretypes.h:enum offload_abi in mkoffloads
Thomas Schwinge [Wed, 30 Sep 2015 08:58:04 +0000 (10:58 +0200)]
Use gcc/coretypes.h:enum offload_abi in mkoffloads

gcc/
* config/i386/intelmic-mkoffload.c (target_ilp32): Remove
variable, replacing it with...
(offload_abi): ... this new variable.  Adjust all users.
* config/nvptx/mkoffload.c (target_ilp32, offload_abi): Likewise.

From-SVN: r228283

9 years agoAdd checkpoint to libgomp dg-shouldfail tests
Thomas Schwinge [Wed, 30 Sep 2015 08:44:49 +0000 (10:44 +0200)]
Add checkpoint to libgomp dg-shouldfail tests

That is, verify that we're actually reaching the expected checkpoint before
terminating.

libgomp/
* testsuite/libgomp.oacc-c-c++-common/abort-1.c: Add checkpoint.
* testsuite/libgomp.oacc-c-c++-common/abort-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/clauses-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-11.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-17.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-18.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-20.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-21.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-22.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-23.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-26.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-27.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-28.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-29.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-30.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-34.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-35.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-36.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-39.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-4.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-40.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-42.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-43.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-44.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-47.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-48.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-52.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-53.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-54.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-57.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-58.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-62.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-63.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-64.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-65.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-67.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-68.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-71.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-77.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-80.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/present-1.c: Likewise.
* testsuite/libgomp.oacc-fortran/abort-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-1.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.

From-SVN: r228282

9 years agoconfigure.ac: Remove extraneous ;;.
Matthias Klose [Wed, 30 Sep 2015 08:43:09 +0000 (08:43 +0000)]
configure.ac: Remove extraneous ;;.

2015-09-30  Matthias Klose  <doko@ubuntu.com>

        * configure.ac: Remove extraneous ;;.
        * configure: Regenerate.

From-SVN: r228281

9 years ago[testsuite] Fix order of dg-do and dg-require-effective-target directives
Christophe Lyon [Wed, 30 Sep 2015 08:14:03 +0000 (08:14 +0000)]
[testsuite] Fix order of dg-do and dg-require-effective-target directives

2015-09-30  Christophe Lyon  <christophe.lyon@linaro.org>

* g++.dg/cpp0x/stdint.C: Move dg-require-effective-target after
dg-do.
* g++.dg/gomp/tls-wrap4.C: Likewise.
* gcc.dg/atomic-op-optimize.c: Likewise.
* gcc.dg/pr54087.c: Likewise.
* gcc.dg/tls/section-2.c: Likewise.
* gcc.dg/vect/costmodel/ppc/costmodel-bb-slp-9a-pr63175.c:
Likewise.
* gcc.dg/vect/costmodel/ppc/costmodel-pr37194.c: Likewise.
* gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.
* gcc.target/arm/divzero.c: Likewise.
* gcc.target/arm/sibcall-2.c: Likewise.
* gcc.target/arm/thumb1-Os-mult.c: Likewise.
* gcc.target/arm/thumb1-load-64bit-constant-1.c: Likewise.
* gcc.target/arm/thumb1-load-64bit-constant-2.c: Likewise.
* gcc.target/arm/thumb1-load-64bit-constant-3.c: Likewise.
* gcc.target/arm/volatile-bitfields-1.c: Likewise.
* gcc.target/arm/volatile-bitfields-2.c: Likewise.
* gcc.target/arm/volatile-bitfields-3.c: Likewise.
* gcc.target/arm/volatile-bitfields-4.c: Likewise.
* gfortran.dg/default_format_2.f90: Likewise.
* gfortran.dg/default_format_denormal_2.f90: Likewise.

From-SVN: r228280

9 years ago* ChangeLog: Fix whitespace.
Uros Bizjak [Wed, 30 Sep 2015 06:52:45 +0000 (08:52 +0200)]
* ChangeLog: Fix whitespace.

From-SVN: r228279

9 years agoDaily bump.
GCC Administrator [Wed, 30 Sep 2015 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r228276

9 years agopr65771.c: Use tls_runtime instead of tls.
Jonathan Roelofs [Wed, 30 Sep 2015 00:02:35 +0000 (00:02 +0000)]
pr65771.c: Use tls_runtime instead of tls.

2015-09-29  Jonathan Roelofs  <jonathan@codesourcery.com>

* gcc.dg/debug/pr65771.c: Use tls_runtime instead of tls.

From-SVN: r228273

9 years agoLimit the MEMSET (setmemsi pattern) and MEMCPY (movmemsi pattern) instructions to...
James Bowman [Tue, 29 Sep 2015 23:34:34 +0000 (23:34 +0000)]
Limit the MEMSET (setmemsi pattern) and MEMCPY (movmemsi pattern) instructions to 0-511 bytes.

Limit the MEMSET (setmemsi pattern) and MEMCPY (movmemsi pattern)
instructions to 0-511 bytes. There is a hardware limitation on large
MEMSET, MEMCPY operations that the library versions of memset() and
memcpy() deal with.

2015-09-29  James Bowman  <james.bowman@ftdichip.com>

* config/ft32/predicates.md (ft32_imm_operand): New predicate.
* config/ft32/ft32.md (movmemsi, setmemsi): Use ft32_imm_operand
predicate, disallow register for operand 2.

From-SVN: r228271

9 years agocompiler: Accept untyped integral values as string/array indices.
Ian Lance Taylor [Tue, 29 Sep 2015 22:27:53 +0000 (22:27 +0000)]
compiler: Accept untyped integral values as string/array indices.

    When determining the type of an index for a string/array indexing
    expression, the gofrontend would disallow floating-point and complex
    values even if they were integral and throw an internal error.  This
    patch changes gofrontend to use an integral type context when
    determining the types of a string/array index.

    Fixes golang/go#11545.

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

From-SVN: r228270

9 years agoMake compute_deps, extend_schedule static
Aditya Kumar [Tue, 29 Sep 2015 22:20:14 +0000 (22:20 +0000)]
Make compute_deps, extend_schedule static

No functional changes intended. Passes make check and bootstrap.
gcc/ChangeLog:

2015-09-29  Aditya Kumar  <hiraditya@msn.com>

        * graphite-dependences.c (scop_get_dependences): Moved in down
in order to be visible to its caller.
        * graphite-poly.h: Removed compute_deps, and extend_schedule.

From-SVN: r228269

9 years agouse MIN fusion for ISL-14
Sebastian Pop [Tue, 29 Sep 2015 22:15:08 +0000 (22:15 +0000)]
use MIN fusion for ISL-14

This patch fixes PR66754 by reverting an earlier unintended change.
We now generate a much simpler AST for interchange-1.c:

ISL AST generated by ISL:
{
  for (int c1 = 0; c1 <= 1334; c1 += 1) {
    S_7(c1);
    for (int c3 = 0; c3 <= 1334; c3 += 1)
      S_4(c1, c3);
    S_5(c1);
  }
  for (int c1 = 0; c1 <= 1334; c1 += 1)
    S_10(c1);
  S_8();
}

Bootstrap and check pass on x86_64-linux with isl-0.14.1

          PR tree-optimization/67754
          * graphite-optimize-isl.c (optimize_isl): Call
          isl_options_set_schedule_fuse with ISL_SCHEDULE_FUSE_MIN for ISL-14.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228268

9 years agobuiltins.c (expand_builtin_acc_on_device): Delete.
Nathan Sidwell [Tue, 29 Sep 2015 20:03:33 +0000 (20:03 +0000)]
builtins.c (expand_builtin_acc_on_device): Delete.

gcc/
* builtins.c (expand_builtin_acc_on_device): Delete.
(expand_builtin): Don't call it.
(fold_builtin_1): Fold acc_on_device.

libgomp/
* oacc-init.c (acc_on_device): Force optimization level.

From-SVN: r228267

9 years agoFix typos in comments in i386.c
H.J. Lu [Tue, 29 Sep 2015 19:48:39 +0000 (19:48 +0000)]
Fix typos in comments in i386.c

* config/i386/i386.c (ix86_function_arg): Fix typo in comments.
(ix86_nsaved_sseregs): Likewise.

From-SVN: r228266

9 years agoplugin-nvptx.c (ARRAYSIZE): Delete.
Nathan Sidwell [Tue, 29 Sep 2015 19:45:47 +0000 (19:45 +0000)]
plugin-nvptx.c (ARRAYSIZE): Delete.

* plugin/plugin-nvptx.c (ARRAYSIZE): Delete.
(cuda_errlist): Delete.
(cuda_error): Reimplement.

From-SVN: r228265

9 years ago[PATCH] Fix building microblaze targets with trunk
Jeff Law [Tue, 29 Sep 2015 18:31:55 +0000 (12:31 -0600)]
[PATCH] Fix building microblaze targets with trunk

[PATCH] Fix building microblaze targets with trunk
* config/microblaze/microblaze.c (microblaze_version_to_int): Remove
computation of unused value.

From-SVN: r228263

9 years ago2015-09-29 Steven G. Kargl <kargl@gcc.gnu.org>
Steven G. Kargl [Tue, 29 Sep 2015 18:08:54 +0000 (18:08 +0000)]
2015-09-29  Steven G. Kargl  <kargl@gcc.gnu.org>

gfortran.dg/ieee/ieee_4.f90: xfail on i386-*-freebsd*
gfortran.dg/round_4.f90: ditto.

From-SVN: r228262

9 years ago[PATCH] Fix warnings building pdp11 port
Jeff Law [Tue, 29 Sep 2015 16:56:04 +0000 (10:56 -0600)]
[PATCH] Fix warnings building pdp11 port

* config/pdp11/pdp11.c (pdp11_branch_cost): New function.
* config/pdp11/pdp11.h (BRANCH_COST): Call function rather than
inline macro expansion.

From-SVN: r228259

9 years ago[PATCH] Fix building interix targets
Jeff Law [Tue, 29 Sep 2015 16:48:55 +0000 (10:48 -0600)]
[PATCH] Fix building interix targets

* config/i386/t-interix (winnt-stubs.o): Fix compilation rule.

From-SVN: r228258

9 years ago[PATCH] Fix undefined behaviour in SH port
Jeff Law [Tue, 29 Sep 2015 16:41:38 +0000 (10:41 -0600)]
[PATCH] Fix undefined behaviour in SH port

* config/sh/sh.c (gen_shl_and): Fix undefined left shift
behaviour.
(gen_shl_sext): Likewise.
* config/sh/sh.md (divsi3): Likewise.
(imm->ext_dest_operand splitter): Likewise.

From-SVN: r228257

9 years agoremove dead code of commutative_reductions
Sebastian Pop [Tue, 29 Sep 2015 16:33:45 +0000 (16:33 +0000)]
remove dead code of commutative_reductions

This code is not used anymore after we removed the previous loop optimizer (not
based on the ISL scheduler.)  We will add back the detection of commutative
reductions after we improve the code generation of scalar dependences (by not
going out of SSA for scalar dependences just to expose them to the data
dependence graph.)

Patch passed bootstrap and check on x86_64-linux with ISL-0.15.

2015-09-29  Sebastian Pop  <s.pop@samsung.com>
            Aditya Kumar  <aditya.k7@samsung.com>

            * graphite-sese-to-poly.c (gsi_for_phi_node): Remove.
            (nb_data_writes_in_bb): Remove.
            (split_pbb): Remove.
            (split_reduction_stmt): Remove.
            (is_reduction_operation_p): Remove.
            (phi_contains_arg): Remove.
            (follow_ssa_with_commutative_ops): Remove.
            (detect_commutative_reduction_arg): Remove.
            (detect_commutative_reduction_assign): Remove.
            (follow_inital_value_to_phi): Remove.
            (edge_initial_value_for_loop_phi): Remove.
            (initial_value_for_loop_phi): Remove.
            (used_outside_reduction): Remove.
            (detect_commutative_reduction): Remove.
            (translate_scalar_reduction_to_array_for_stmt): Remove.
            (remove_phi): Remove.
            (dr_indices_valid_in_loop): Remove.
            (close_phi_written_to_memory): Remove.
            (translate_scalar_reduction_to_array): Remove.
            (rewrite_commutative_reductions_out_of_ssa_close_phi): Remove.
            (rewrite_commutative_reductions_out_of_ssa_loop): Remove.
            (rewrite_commutative_reductions_out_of_ssa): Remove.
            (build_poly_scop): Remove call to rewrite_commutative_reductions_out_of_ssa.

Co-Authored-By: Aditya Kumar <aditya.k7@samsung.com>
From-SVN: r228255

9 years ago[PATCH] Fix undefined behaviour in rx port
Jeff Law [Tue, 29 Sep 2015 16:32:45 +0000 (10:32 -0600)]
[PATCH] Fix undefined behaviour in rx port

[PATCH] Fix undefined behaviour in rx port
        * config/rx/constraints.md (Int08): Fix undefined left shift
        behaviour.
        (Sint08, Sint16, Sint24): Likewise.
        * config/rx/rx.c (rx_get_stack_layout): Likewise.

From-SVN: r228254

9 years agoadd separate insn sched class for vector LDP & STP
Evandro Menezes [Tue, 29 Sep 2015 16:30:45 +0000 (16:30 +0000)]
add separate insn sched class for vector LDP & STP

2015-09-29  Evandro Menezes  <e.menezes@samsung.com>

* config/arm/types.md (neon_ldp, neon_ldp_q, neon_stp, neon_stp_q):
Add new insn types for vector load and store pairs.
* config/arm/cortex-a53.md (cortex_a53_f_load_2reg): Add insn
types "neon_ldp{,_q}".
* config/arm/cortex-a57.md (neon_load_c): Add insn types
"neon_ldp{,_q}".
(neon_store_complex): Add insn types "neon_stp{,_q}".
* config/aarch64/aarch64-simd.md (aarch64_be_movoi): Add insn types
"neon_{ldp,stp}_q".

From-SVN: r228253

9 years ago[PATCH] Fix undefined behaviour in rl78 port
Jeff Law [Tue, 29 Sep 2015 16:28:51 +0000 (10:28 -0600)]
[PATCH] Fix undefined behaviour in rl78 port

[PATCH] Fix undefined behaviour in rl78 port
        * config/rl78/rl78-expand.md (movqi): Fix undefined left shift
        behaviour.

From-SVN: r228252

9 years ago[PATCH] Fix undefined behaviour in msp430 port
Jeff Law [Tue, 29 Sep 2015 16:25:21 +0000 (10:25 -0600)]
[PATCH] Fix undefined behaviour in msp430 port

       * config/msp430/msp430.c (msp430_legitimate_constant): Fix undefined
        left shift behaviour.
        * config/msp430/constraints.md ('L' constraint): Similarly.
        ('Ys' constraint): Similarly.

From-SVN: r228251

9 years agoLeave errno unchanged by successful std::stoi etc
Jonathan Wakely [Tue, 29 Sep 2015 15:15:39 +0000 (16:15 +0100)]
Leave errno unchanged by successful std::stoi etc

* include/ext/string_conversions.h (__stoa): Save and restore errno.
* testsuite/21_strings/basic_string/numeric_conversions/char/errno.cc:
New.

From-SVN: r228249

9 years agolibgomp-plugin-intelmic.cpp (OFFLOAD_ACTIVE_WAIT_ENV): New define.
Ilya Verbin [Tue, 29 Sep 2015 14:11:16 +0000 (14:11 +0000)]
libgomp-plugin-intelmic.cpp (OFFLOAD_ACTIVE_WAIT_ENV): New define.

liboffloadmic/
* plugin/libgomp-plugin-intelmic.cpp (OFFLOAD_ACTIVE_WAIT_ENV): New
define.
(init): Set OFFLOAD_ACTIVE_WAIT env var to 0, if it is not set.
* runtime/emulator/coi_common.h (PIPE_HOST_PATH): Replace with ...
(PIPE_HOST2TGT_NAME): ... this.
(PIPE_TARGET_PATH): Replace with ...
(PIPE_TGT2HOST_NAME): ... this.
(MALLOCN): New define.
(READN): Likewise.
(WRITEN): Likewise.
(enum cmd_t): Replace CMD_RUN_FUNCTION with CMD_PIPELINE_RUN_FUNCTION.
Add CMD_PIPELINE_CREATE, CMD_PIPELINE_DESTROY.
* runtime/emulator/coi_device.cpp (engine_dir): New static variable.
(pipeline_thread_routine): New static function.
(COIProcessWaitForShutdown): Use global engine_dir instead of mic_dir.
Rename pipe_host and pipe_target to pipe_host2tgt and pipe_tgt2host.
If cmd is CMD_PIPELINE_CREATE, create a new thread for the pipeline.
Remove cmd == CMD_RUN_FUNCTION case.
* runtime/emulator/coi_device.h (COIERRORN): New define.
* runtime/emulator/coi_host.cpp: Include set, map, queue.
Replace typedefs with enums and structs.
(struct Function): Remove name, add num_buffers, bufs_size,
bufs_data_target, misc_data_len, misc_data, return_value_len,
return_value, completion_event.
(struct Callback): New.
(struct Process): Remove pipeline.  Add pipe_host2tgt and pipe_tgt2host.
(struct Pipeline): Remove pipe_host and pipe_target.  Add thread,
destroy, is_destroyed, pipe_host2tgt_path, pipe_tgt2host_path,
pipe_host2tgt, pipe_tgt2host, queue, process.
(max_pipeline_num): New static variable.
(pipelines): Likewise.
(max_event_num): Likewise.
(non_signalled_events): Likewise.
(errored_events): Likewise.
(callbacks): Likewise.
(cleanup): Do not check tmp_dirs before free.
(start_critical_section): New static function.
(finish_critical_section): Likewise.
(pipeline_is_destroyed): Likewise.
(maybe_invoke_callback): Likewise.
(signal_event): Likewise.
(get_event_result): Likewise.
(COIBufferCopy): Rename arguments according to headers.  Add asserts.
Use process' main pipes, instead of pipeline's pipes.  Signal completion
event.
(COIBufferCreate): Rename arguments according to headers.  Add asserts.
Use process' main pipes, instead of pipeline's pipes.
(COIBufferCreateFromMemory): Rename arguments according to headers.
Add asserts.
(COIBufferDestroy): Rename arguments according to headers.  Add asserts.
Use process' main pipes, instead of pipeline's pipes.
(COIBufferGetSinkAddress): Rename arguments according to headers.
Add asserts.
(COIBufferMap): Rename arguments according to headers.  Add asserts.
Signal completion event.
(COIBufferRead): Likewise.
(COIBufferSetState): Likewise.
(COIBufferUnmap): Likewise.
(COIBufferWrite): Likewise.
(COIEngineGetCount): Add assert.
(COIEngineGetHandle): Rename arguments according to headers.
Add assert.
(COIEventWait): Rename arguments according to headers.  Add asserts.
Implement waiting for events with zero or infinite timeout.
(COIEventRegisterCallback): New function.
(pipeline_thread_routine): New static function.
(COIPipelineCreate): Create a new thread for the pipeline.
(COIPipelineDestroy): Exit pipeline thread.
(COIPipelineRunFunction): Add the function into pipeline's queue,
instead running it here.  Wait for it's completion in case of
synchronous execution.
(COIProcessCreateFromMemory): Rename arguments according to headers.
Add asserts.  Create process' main pipes, instead of pipeline's pipes.
(COIProcessDestroy): Rename arguments according to headers.
Add asserts.  Destroy all undestroyed pipelines.
(COIProcessGetFunctionHandles): Rename arguments according to headers.
Add asserts.  Use process' main pipes, instead of pipeline's pipes.
Remove useless function names.
(COIProcessLoadLibraryFromMemory): Add asserts.  Use process' main
pipes, instead of pipeline's pipes.
(COIProcessUnloadLibrary): Likewise.
(COIEngineGetInfo): Add assert.
* runtime/emulator/coi_host.h (COIERRORN): New define.

From-SVN: r228248

9 years agoPR libstdc++/67583 Fix invalid sputn calls in tests
Jonathan Wakely [Tue, 29 Sep 2015 13:31:51 +0000 (14:31 +0100)]
PR libstdc++/67583 Fix invalid sputn calls in tests

PR libstdc++/67583
* testsuite/27_io/basic_stringbuf/seekoff/char/1.cc: Fix sputn call
with mismatched arguments.
* testsuite/27_io/basic_stringbuf/seekoff/wchar_t/1.cc: Likewise.

From-SVN: r228245

9 years agore PR fortran/67170 (PRE can't hoist out a readonly argument)
Richard Biener [Tue, 29 Sep 2015 13:04:18 +0000 (13:04 +0000)]
re PR fortran/67170 (PRE can't hoist out a readonly argument)

2015-09-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/67170
* tree-ssa-alias.h (get_continuation_for_phi): Adjust
the translate function pointer parameter to get the
bool whether to disambiguate only by reference.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-alias.c (maybe_skip_until): Adjust.
(get_continuation_for_phi_1): Likewise.
(get_continuation_for_phi): Likewise.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-sccvn.c (const_parms): New bitmap.
(vn_reference_lookup_3): Adjust for interface change.
Disambiguate parameters pointing to readonly memory.
(free_scc_vn): Free const_parms.
(run_scc_vn): Initialize const_parms from a fn spec attribute.

* gfortran.dg/pr67170.f90: New testcase.

From-SVN: r228244

9 years agore PR tree-optimization/67741 (Invalid built-in usage should not cause segmentation...
Richard Biener [Tue, 29 Sep 2015 13:02:42 +0000 (13:02 +0000)]
re PR tree-optimization/67741 (Invalid built-in usage should not cause segmentation fault in compiler)

2015-09-29  Richard Biener  <rguenther@suse.de>

PR tree-optimization/67741
* tree-ssa-math-opts.c (pass_cse_sincos::execute): Only recognize
builtin calls with correct signature.

* gcc.dg/torture/pr67741.c: New testcase.

From-SVN: r228243

9 years agoReduce space and time overhead of std::thread
Jonathan Wakely [Tue, 29 Sep 2015 12:54:05 +0000 (13:54 +0100)]
Reduce space and time overhead of std::thread

PR libstdc++/65393
* config/abi/pre/gnu.ver: Export new symbols.
* include/std/thread (thread::_State, thread::_State_impl): New types.
(thread::_M_start_thread): Add overload taking unique_ptr<_State>.
(thread::_M_make_routine): Remove.
(thread::_S_make_state): Add.
(thread::_Impl_base, thread::_Impl, thread::_M_start_thread)
[_GLIBCXX_THREAD_ABI_COMPAT] Only declare conditionally.
* src/c++11/thread.cc (execute_native_thread_routine): Rename to
execute_native_thread_routine_compat and re-define to use _State.
(thread::_State::~_State()): Define.
(thread::_M_make_thread): Define new overload.
(thread::_M_make_thread) [_GLIBCXX_THREAD_ABI_COMPAT]: Only define old
overloads conditionally.

From-SVN: r228242