Marek Polacek [Thu, 9 Feb 2017 17:07:26 +0000 (17:07 +0000)]
re PR c/79428 (ICE in c_parser_consume_token, at c/c-parser.c:770)
PR c/79428
* c-parser.c (c_parser_omp_ordered): Call c_parser_skip_to_pragma_eol
instead of c_parser_skip_until_found.
* c-c++-common/cilk-plus/CK/pr79428-4.c: New test.
* c-c++-common/cilk-plus/CK/pr79428-7.c: New test.
* c-c++-common/goacc/pr79428-1.c: New test.
* c-c++-common/gomp/pr79428-2.c: New test.
* c-c++-common/gomp/pr79428-5.c: New test.
* c-c++-common/gomp/pr79428-6.c: New test.
* c-c++-common/pr79428-3.c: New test.
Chung-Lin Tang [Thu, 9 Feb 2017 13:46:20 +0000 (13:46 +0000)]
gimplify.c (gimplify_scan_omp_clauses): No special handling for OMP_CLAUSE_TILE.
2017-02-09 Nathan Sidwell <nathan@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
gcc/
* gimplify.c (gimplify_scan_omp_clauses): No special handling for
OMP_CLAUSE_TILE.
(gimplify_adjust_omp_clauses): Don't delete TILE.
(gimplify_omp_for): Deal with TILE.
* internal-fn.c (expand_GOACC_TILE): New function.
* internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
(GOACC_TILE): New.
* omp-expand.c (struct oacc_collapse): Add tile and outer fields.
(expand_oacc_collapse_init): Add LOC paramter. Initialize tile
element fields.
(expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
avoid DIV for outermost collapse var.
(expand_oacc_for): Insert tile element loop as needed. Adjust.
Remove out of date comments, fix whitespace.
* omp-general.c (omp_extract_for_data): Deal with tiling.
* omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
adjust OLF_DIM_BASE value.
(struct omp_for_data): Add tiling field.
* omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
(lower_oacc_head_mark): Add OLF_TILE as appropriate. Ensure 2 levels
for auto loops. Remove default auto determining, moved to
oacc_loop_fixed_partitions.
* omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
stmts, add e_mask field.
(oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
(oacc_thread_numbers): Use oacc_dim_call.
(oacc_xform_tile): New.
(new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
(finish_oacc_loop): Adjust for ifns vector.
(oacc_loop_discover_walk): Append loop abstraction sites to list,
add case for GOACC_TILE fns.
(oacc_loop_xform_loop): Delete.
(oacc_loop_process): Iterate over call list directly, and add
handling for GOACC_TILE fns.
(oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
dump partitioning.
(oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
vector partitioning to outer loops. Assign 2 partitions to loops
when available. Add TILE handling.
(oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
(execite_oacc_device_lower): Process GOACC_TILE fns, ignore unknown specs.
* tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
* tree.c (omp_clause_num_ops): Adjust TILE ops.
* tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
Richard Biener [Thu, 9 Feb 2017 07:47:07 +0000 (07:47 +0000)]
re PR tree-optimization/69823 (internal compiler error: in create_pw_aff_from_tree, at graphite-sese-to-poly.c:445)
2017-02-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/69823
* graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
Properly enumerate all BBs in the region. Use auto_vec/auto_bitmap.
Andrew Burgess [Thu, 9 Feb 2017 00:35:20 +0000 (00:35 +0000)]
arc/gcc: Better creation of __NPS400__ define
The __NPS400__ define is currently created in CPP_SPEC unlike the other
target defines, which are created in arc-c.def. Further, the current
__NPS400__ define is (currently) only created when -mcpu=nps400 is
passed, which is fine, except that if GCC is configured using
--with-cpu=nps400 then the -mcpu option is not required and the
__NPS400__ define will not be created.
This commit moves the __NPS400__ define into arc-c.def inline with all
of the other target defines, and removes the code in CPP_SPEC that used
to create the define.
In order to support the creation of the define in arc-c.def, a new
TARGET_NPS400 macro is created in arc.h.
Andrew Burgess [Thu, 9 Feb 2017 00:34:00 +0000 (00:34 +0000)]
gcc/arc: Make arc_selected_cpu global
Currently we only make the base_architecture globally available, this
means we can tell if we have selected arc700/archs/etc but it's not
possible to tell if the user has selected a specific cpu variant, for
example nps400.
One problem this causes is, for example, in arc-c.def, if we want to add
an __NPS400__ define then we need a flag we can check to determine if
this is the right thing to do.
In this commit the arc_selected_cpu variable (previously local within
arc.c) has been made global. Two other variables arc_base_cpu and
arc_selected_arch have been deleted, all of this information can be
found within (or through) arc_selected_cpu.
All uses of arc_base_cpu and arc_selected_arch have been updated. This
commit does not introduce any new defines (like __NPS400__), this is
just a restructuring commit.
The declaration of arc_selected_cpu has moved into arc-arch.h, in
contrast to the declaration of arc_base_cpu which was previously in
arc.h. This avoids a compilation issue when building libgcc, as the
structure and enums declared in arc-arch.h are not included for libgcc
then declaring an arc_selected_cpu (a struct type) in arc.h would result
in an unknown struct error. We got away with this for arc_base_cpu as
that was an enum type. The declaration of arc_selected_cpu in
arc.h could have been wrapped in a '#ifndef IN_LIBGCC2 ... #endif', but
it felt neater to simply move the declaration into arc-arch.h.
gcc/ChangeLog:
* config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
file.
(arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
pointer, arch_info.
(arc_cpu_types): Fill the arch_info field with a pointer into the
arc_arch_types table.
(arc_selected_cpu): Declare.
* config/arc/arc.c (arc_selected_cpu): Make global.
(arc_selected_arch): Delete.
(arc_base_cpu): Delete.
(arc_override_options): Remove references to deleted variables,
update access to arch information.
(ARC_OPT): Update access to arch information.
(ARC_OPTX): Likewise.
* config/arc/arc.h (arc_base_cpu): Remove declaration.
(TARGET_ARC600): Update access to arch information.
(TARGET_ARC601): Likewise.
(TARGET_ARC700): Likewise.
(TARGET_EM): Likewise.
(TARGET_HS): Likewise.
* config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
information.
* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: Skip on
hppa*-*-*.
* testsuite/libgomp.oacc-c-c++-common/reduction-cplx-dbl.c: Don't
include complex.h on hppa*-*-hpux*.
* testsuite/libgomp.oacc-c-c++-common/reduction-cplx-flt.c: Likewise.
Jonathan Wakely [Wed, 8 Feb 2017 12:02:36 +0000 (12:02 +0000)]
Update links and references in libstdc++ manual
* doc/xml/manual/policy_data_structures.xml: Fix spelling of author's
name.
* doc/xml/manual/policy_data_structures_biblio.xml: Likewise. Remove
broken links to texts that are no longer online.
* doc/xml/manual/profile_mode.xml: Update links to CGO 2009 paper and
LCPC 2006 paper.
* doc/xml/manual/using.xml: Update links to memory model information.
* doc/xml/manual/using_exceptions.xml: Update link to "Appendix E:
Standard-Library Exception Safety".
* doc/html/*: Regenerate.
Martin Jambor [Wed, 8 Feb 2017 09:47:09 +0000 (10:47 +0100)]
[PR 79375] Avoid passing NULL by reference
2017-02-08 Martin Jambor <mjambor@suse.cz>
PR ipa/79375
* ipa-prop.c (ipa_alloc_node_params): Make static, return bool
whether allocation happened.
(ipa_initialize_node_params): Do not call ipa_alloc_node_params if
nothing was allocated.
Jakub Jelinek [Wed, 8 Feb 2017 09:21:57 +0000 (10:21 +0100)]
re PR tree-optimization/79408 (Missed VRP optimization of integer modulo)
PR tree-optimization/79408
* tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
constant, but SSA_NAME with a known integer range, use the minimum
of that range instead of op1 to determine if modulo can be replaced
with its first operand.
* doc/Makefile.am (xml_extradir): Remove.
(xml_extra): Ditto.
(stamp-html-docbook-lwg): Remove recipe...
(stamp-html-docbook-data): ...and its use here.
* doc/Makefile.in: Regenerate.
* doc/xml/manual/intro.xml: Shorten two paragraphs explaining
the relationship to the upstream working group.
Replace a local link to ../ext/lwg-active.html by the upstream one.
Replace all reference to ../ext/lwg-defects.html by a new entity
&DR; which refers to the upstream address.
Jakub Jelinek [Tue, 7 Feb 2017 21:51:21 +0000 (22:51 +0100)]
re PR middle-end/79399 (GCC fails to compile big source at -O0)
PR middle-end/79399
* ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
type from int to size_t.
* ira-costs.c (struct_costs_size): Change type from int to size_t.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r245256
Jakub Jelinek [Tue, 7 Feb 2017 17:45:57 +0000 (18:45 +0100)]
re PR rtl-optimization/79386 (ICE: segmentation fault in cprop w/ -O2 on 32-bit BE powerpc)
PR rtl-optimization/79386
* cprop.c (bypass_conditional_jumps): Initialize
bypass_last_basic_block already before splitting bbs after
unconditional traps...
(bypass_conditional_jumps): ... rather than here.
Richard Biener [Tue, 7 Feb 2017 11:29:06 +0000 (11:29 +0000)]
re PR tree-optimization/79256 (FAIL: gcc.dg/vect/pr25413a.c execution test)
2017-02-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/79256
PR middle-end/79278
* builtins.c (get_object_alignment_2): Use min_align_of_type
to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
and ADJUST_FIELD_ALIGN.
Revert
2017-01-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/79256
* targhooks.c (default_builtin_vector_alignment_reachable): Honor
BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
alignment on TYPE.
c/
* gimple-parser.c (c_parser_gimple_expr_list): Simplify.
(c_parser_gimple_postfix_expression_after_primary):
Do not use c_build_function_call_vec to avoid folding and promotion.
Simplify.
* gcc.dg/gimplefe-23.c: New testcase.
* gcc.dg/gimplefe-24.c: Likewise.
Toma Tabacu [Tue, 7 Feb 2017 10:34:47 +0000 (10:34 +0000)]
MIPS: Fix mode mismatch error between Loongson builtin arguments and insn
operands.
gcc/
* config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
builtins to SImode and emit a zero-extend, if necessary.
re PR target/66144 (vector element operator produces very bad code)
[gcc]
2017-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/66144
* config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
false values to be constant vectors with all 0 or all 1 bits set.
(vcondu<mode><mode>): Likewise.
* config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
predicate.
(fpmask_comparison_operator): Update comment.
(vecint_comparison_operator): New predicate.
* config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
vector conditionals when the true and false values are constant
vectors with all 0 bits or all 1 bits set.
[gcc/testsuite]
2017-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
Jakub Jelinek [Mon, 6 Feb 2017 20:03:15 +0000 (21:03 +0100)]
re PR c++/79372 (ICE on C++ code with illegal decomposition declaration on x86_64-linux-gnu: in tsubst_decomp_names, at cp/pt.c:15599)
PR c++/79372
* decl.c (cp_finish_decomp): On error set decl type to error_mark_node.
* pt.c (tsubst_expr): Don't call tsubst_decomp_names on decompositions
with error_mark_node type.
sched: Do not move expensive insns speculatively (PR68664)
Scheduling should never move very expensive instructions to places they
are executed more frequently. This patch fixes that, reducing the
execution time of c-ray by over 40% (I tested on a BE Power7 system).
This introduces a new target hook sched.can_speculate_insn which returns
whether the scheduler is allowed to speculate a given instruction. The
rs6000 implementation disallows all divide and square root instructions.
PR rtl-optimization/68664
* target.def (can_speculate_insn): New hook.
* doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
* doc/tm.texi: Regenerate.
* sched-rgn.c (can_schedule_ready_p): Use the new hook.
* config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
(rs6000_sched_can_speculate_insn): New function.
Jakub Jelinek [Mon, 6 Feb 2017 19:15:36 +0000 (20:15 +0100)]
re PR tree-optimization/79284 (ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed)
PR tree-optimization/79284
* tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
* tree-vect-stmts.c (vect_get_vec_def_for_operand,
vectorizable_mask_load_store, vectorizable_operation,
vect_is_simple_cond, get_same_sized_vectype): Use it instead
of comparing TREE_CODE of a type against BOOLEAN_TYPE.
* tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
* tree-vect-slp.c (vect_get_constant_vectors): Likewise.
* tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
is_gimple_assign (stmt). Replace another such test with
is_gimple_assign (stmt).
testsuite/
* gcc.c-torture/compile/pr79284.c: New test.
Gerald Pfeifer [Mon, 6 Feb 2017 10:26:59 +0000 (10:26 +0000)]
documentation_hacking.xml: Remove obsolete link to DocBook Publishing Tools.
* doc/xml/manual/documentation_hacking.xml: Remove obsolete link
to DocBook Publishing Tools.
epubcheck has moved to GitHub.
Update URL of the DocBook Element Reference; use that term as
link description instead of "online".
Julian Brown [Mon, 6 Feb 2017 02:23:07 +0000 (02:23 +0000)]
aarch64-cores.def: Change the scheduler to Thunderx2t99.
2017-02-06 Julian Brown <julian@codesourcery.com>
Naveen H.S <Naveen.Hurugalawadi@cavium.com>
Virendra Pathak <virendra.pathak@broadcom.com>
* config/aarch64/aarch64-cores.def: Change the scheduler
to Thunderx2t99.
* config/aarch64/aarch64.md: Include thunderx2t99.md.
* config/aarch64/thunderx2t99.md: New file.
* gcc.dg/tree-ssa/ifc-10.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-11.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-12.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-20040816-1.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-20040816-2.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-5.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-8.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-9.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-cd.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr56541.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr68583.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr69489-1.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr69489-2.c: Match for profile mismatches.
Martin Liska [Sun, 5 Feb 2017 15:51:13 +0000 (16:51 +0100)]
re PR bootstrap/78985 (profiledbootstrap failure by -Wuninitialized)
PR bootstrap/78985
* config/s390/s390.c (s390_gimplify_va_arg): Initialize local
variable to NULL.
(print_operand_address): Initialize a struct to zero.
re PR fortran/79344 (segmentation faults and run-time errors)
gcc/fortran/ChangeLog:
2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79344
* trans-stmt.c (gfc_trans_allocate): Only deallocate the components of
the temporary, when a new object was created for the temporary. Not
when it is just an alias to an existing object.
gcc/testsuite/ChangeLog:
2017-02-04 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79344
* gfortran.dg/allocate_with_source_24.f90: New test.
re PR fortran/79335 (Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53))
gcc/fortran/ChangeLog:
2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79335
* trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
attributes before using them.
Eric Botcazou [Sun, 5 Feb 2017 09:47:48 +0000 (09:47 +0000)]
re PR target/79353 (ICE in curr_insn_transform, at lra-constraints.c:3773)
PR target/79353
* config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
(atomic_storedi_1): Likewise.