]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
8 years agoAdd a helper for getting the overall alignment of a DR
rsandifo [Mon, 3 Jul 2017 13:37:07 +0000 (13:37 +0000)] 
Add a helper for getting the overall alignment of a DR

This combines the information from previous patches to give a guaranteed
alignment for the DR as a whole.  This should be a bit safer than using
base_element_aligned, since that only really took the base into account
(not the init or offset).

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-data-ref.h (dr_alignment): Declare.
* tree-data-ref.c (dr_alignment): New function.
* tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
set it.
* tree-vect-stmts.c (vectorizable_store): Use dr_alignment.

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

8 years agoAdd DR_BASE_ALIGNMENT and DR_BASE_MISALIGNMENT
rsandifo [Mon, 3 Jul 2017 13:36:55 +0000 (13:36 +0000)] 
Add DR_BASE_ALIGNMENT and DR_BASE_MISALIGNMENT

This patch records the base alignment and misalignment in
innermost_loop_behavior, to avoid the second-guessing that was
previously done in vect_compute_data_ref_alignment.  It also makes
vect_analyze_data_refs use dr_analyze_innermost, instead of having an
almost-copy of the same code.

I wasn't sure whether the alignments should be measured in bits
(for consistency with most other interfaces) or in bytes (for consistency
with DR_ALIGNED_TO, now DR_OFFSET_ALIGNMENT, and with *_ptr_info_alignment).
I went for bytes because:

- I think in practice most consumers are going to want bytes.
  E.g. using bytes avoids having to mix TYPE_ALIGN and TYPE_ALIGN_UNIT
  in vect_compute_data_ref_alignment.

- It means that any bit-level paranoia is dealt with when building
  the innermost_loop_behavior and doesn't get pushed down to consumers.

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-data-ref.h (innermost_loop_behavior): Add base_alignment
and base_misalignment fields.
(DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
* tree-data-ref.c: Include builtins.h.
(dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
* tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
(STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
* tree-vect-data-refs.c: Include tree-cfg.h.
(vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
fields instead of calculating an alignment here.
(vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
innermost_loop_behavior fields.

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

8 years agoAdd DR_STEP_ALIGNMENT
rsandifo [Mon, 3 Jul 2017 13:36:45 +0000 (13:36 +0000)] 
Add DR_STEP_ALIGNMENT

A later patch adds base alignment information to innermost_loop_behavior.
After that, the only remaining piece of alignment information that wasn't
immediately obvious was the step alignment.  Adding that allows a minor
simplification to vect_compute_data_ref_alignment, and also potentially
improves the handling of variable strides for outer loop vectorisation.
A later patch will also use it to give the alignment of the DR as a whole.

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
field.
(DR_STEP_ALIGNMENT): New macro.
* tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
* tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
(create_data_ref): Print it.
* tree-vect-stmts.c (vectorizable_load): Use the step alignment
to tell whether the step preserves vector (mis)alignment.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
Move the check for an integer step and generalise to all INTEGER_CST.
(vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
Print the outer step alignment.

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

8 years agoRename DR_ALIGNED_TO to DR_OFFSET_ALIGNMENT
rsandifo [Mon, 3 Jul 2017 13:36:36 +0000 (13:36 +0000)] 
Rename DR_ALIGNED_TO to DR_OFFSET_ALIGNMENT

This patch renames DR_ALIGNED_TO to DR_OFFSET_ALIGNMENT, to avoid
confusion with the upcoming DR_BASE_ALIGNMENT.  Nothing needed the
value as a tree, and the value is clipped to BIGGEST_ALIGNMENT
(maybe it should be MAX_OFILE_ALIGNMENT?) so we might as well use
an unsigned int instead.

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
with offset_alignment.
(DR_ALIGNED_TO): Delete.
(DR_OFFSET_ALIGNMENT): New macro.
* tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
(STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
* tree-data-ref.c (dr_analyze_innermost): Update after above changes.
(create_data_ref): Likewise.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
(vect_analyze_data_refs): Likewise.
* tree-if-conv.c (if_convertible_loop_p_1): Use memset before
creating dummy innermost behavior.

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

8 years agoMake dr_analyze_innermost operate on innermost_loop_behavior
rsandifo [Mon, 3 Jul 2017 13:36:26 +0000 (13:36 +0000)] 
Make dr_analyze_innermost operate on innermost_loop_behavior

This means that callers to dr_analyze_innermost don't need a full
data_reference and don't need to fill in any fields beforehand.

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
with a "innermost_loop_behavior *" and refeence tree.
* tree-data-ref.c (dr_analyze_innermost): Likewise.
(create_data_ref): Update call accordingly.
* tree-predcom.c (find_looparound_phi): Likewise.

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

8 years agoRequire ifunc support in gcc.target/i386/mvc6.c
ro [Mon, 3 Jul 2017 13:36:20 +0000 (13:36 +0000)] 
Require ifunc support in gcc.target/i386/mvc6.c

* gcc.target/i386/mvc6.c: Require ifunc support.

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

8 years agoUse innermost_loop_behavior for outer loop vectorisation
rsandifo [Mon, 3 Jul 2017 13:36:13 +0000 (13:36 +0000)] 
Use innermost_loop_behavior for outer loop vectorisation

This patch replaces the individual stmt_vinfo dr_* fields with
an innermost_loop_behavior, so that the changes in later patches
get picked up automatically.  It also adds a helper function for
getting the behavior of a data reference wrt the vectorised loop.

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
fields with dr_wrt_vec_loop.
(STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
(STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
(STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
(vect_dr_behavior): New function.
(vect_create_addr_base_for_vector_ref): Remove loop parameter.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
track whether the step preserves the misalignment.
(vect_create_addr_base_for_vector_ref): Remove loop parameter.
Use vect_dr_behavior.
(vect_setup_realignment): Update call accordingly.
(vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
* tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
call to vect_create_addr_base_for_vector_ref.
(vect_create_cond_for_align_checks): Likewise.
* tree-vect-patterns.c (vect_recog_bool_pattern): Copy
STMT_VINFO_DR_WRT_VEC_LOOP as a block.
(vect_recog_mask_conversion_pattern): Likewise.
* tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
(new_stmt_vec_info): Remove redundant zeroing.

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

8 years ago[arm] Clean up generation of BE8 format images.
rearnsha [Mon, 3 Jul 2017 13:22:05 +0000 (13:22 +0000)] 
[arm] Clean up generation of BE8 format images.

The existing code in arm/bpabi.h was quite fragile and relied on matching
specific CPU and/or architecture names.  The introduction of the option
format for -mcpu and -march broke that in a way that would be non-trivial
to fix by updating the list.  The hook in that file was always a pain
as it required every new CPU being added to be add an update here as well
(easy to miss).

I've fixed that problem once and for all by adding a new callback into
the driver to select the correct BE8 behaviour.  This uses features in
the ISA capabilities list to select whether or not to use BE8 format
during linking.

I also noticed that if the user happened to pass both -mbig-endian and
-mlittle-endian on the command line then the linker spec rules would
get somewhat confused and potentially do the wrong thing.  I've fixed that
by marking these options as opposites in the option descriptions.  The
driver will now automatically suppress overridden options leading to the
correct desired behavior.

Whilst fixing this I noticed a couple of anomolus cases in the
existing BE8 support: we were not generating BE8 format for ARMv6 or
ARMv7-R targets.  While the ARMv6 status was probably deliberate at
the time, this is probably not a good idea in the long term as the
alternative, BE32, has been deprecated by ARM.  After discussion with
a couple of colleagues I've decided to change this, but to then add an
option to restore the existing behaviour at the user's option.  So
this patch introduces two new options (opposites) -mbe8 and -mbe32.

This is a quiet behavior change, so I'll add a comment to the release
notes shortly.

* common/config/arm/arm-common.c (arm_be8_option): New function.
* config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
(ISA_ARMv6): Add isa_bit_be8.
* config/arm/arm.h (arm_be8_option): Add prototype.
(BE8_SPEC_FUNCTION): New define.
(EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
* config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
(mlittle-endian): Similarly.
(mbe8, mbe32): New options.
* config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
* doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.

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

8 years ago * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
hubicka [Mon, 3 Jul 2017 12:43:19 +0000 (12:43 +0000)] 
* tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.

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

8 years ago * tree-cfgcleanup.c (want_merge_blocks_p): New function.
hubicka [Mon, 3 Jul 2017 12:42:07 +0000 (12:42 +0000)] 
* tree-cfgcleanup.c (want_merge_blocks_p): New function.
        (cleanup_tree_cfg_bb): Use it.
* profile-count.h (profile_count::of_for_merging, profile_count::merge):
New functions.
* tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.

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

8 years ago PR bootstrap/81285
hubicka [Mon, 3 Jul 2017 12:17:59 +0000 (12:17 +0000)] 
PR bootstrap/81285
* loop-doloop.c (add_test): Update profile.

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

8 years agoASAN: handle addressable params (PR sanitize/81040).
marxin [Mon, 3 Jul 2017 11:48:47 +0000 (11:48 +0000)] 
ASAN: handle addressable params (PR sanitize/81040).

2017-07-03  Martin Liska  <mliska@suse.cz>

PR sanitize/81040
* g++.dg/asan/function-argument-1.C: New test.
* g++.dg/asan/function-argument-2.C: New test.
* g++.dg/asan/function-argument-3.C: New test.
2017-07-03  Martin Liska  <mliska@suse.cz>

PR sanitize/81040
* sanopt.c (rewrite_usage_of_param): New function.
(sanitize_rewrite_addressable_params): Likewise.
(pass_sanopt::execute): Call rewrite_usage_of_param.

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

8 years ago2017-07-03 Richard Biener <rguenther@suse.de>
rguenth [Mon, 3 Jul 2017 09:42:22 +0000 (09:42 +0000)] 
2017-07-03  Richard Biener  <rguenther@suse.de>

* tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
back to using VIEW_CONVERT_EXPR.

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

8 years agoMake stack epilogue more efficient
marxin [Mon, 3 Jul 2017 09:26:31 +0000 (09:26 +0000)] 
Make stack epilogue more efficient

2017-07-03  Martin Liska  <mliska@suse.cz>

* asan.c (asan_emit_stack_protection): Unpoison just red zones
and shadow memory of auto variables which are subject of
use-after-scope sanitization.
(asan_expand_mark_ifn): Add do set only when is_poison.

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

8 years ago2016-07-03 Richard Biener <rguenther@suse.de>
rguenth [Mon, 3 Jul 2017 07:28:28 +0000 (07:28 +0000)] 
2016-07-03  Richard Biener  <rguenther@suse.de>

* tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
reduction PHIs.
(vect_force_simple_reduction): Record reduction def -> phi mapping.
(vectorizable_reduction): Perform reduction PHI creation when
visiting a reduction PHI and adjust and simplify code generation
phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
(vect_transform_loop): Visit reduction PHIs.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
defs into the SLP tree.
(vect_build_slp_tree): Reduction defs terminate the recursion.
* tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
of reduction defs.
(vect_get_vec_defs_for_stmt_copy): Export.
(vect_get_vec_defs): Likewise.
* tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
purpose.
(vect_get_vec_defs_for_stmt_copy): Declare.
(vect_get_vec_defs): Likewise.

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

8 years agoTweak BB analysis for dr_analyze_innermost
rsandifo [Mon, 3 Jul 2017 07:26:21 +0000 (07:26 +0000)] 
Tweak BB analysis for dr_analyze_innermost

dr_analyze_innermost had a "struct loop *nest" parameter that acted
like a boolean.  This was added in r179161, with the idea that a
null nest selected BB-level analysis rather than loop analysis.

The handling seemed strange though.  If the DR was part of a loop,
we still tried to express the base and offset values as IVs, potentially
giving a nonzero step.  If that failed for any reason, we'd revert to
using the original base and offset, just as we would if we hadn't asked
for an IV in the first place.

It seems more natural to use the !in_loop handling whenever nest is null
and always set the step to zero.  This actually enables one more SLP
opportunity in bb-slp-pr65935.c.

I checked out r179161 and tried the patch there.  The test case added
in that revision still passes, so I don't think there was any particular
need to check simple_iv.

2017-06-28  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
parameter with a "loop" parameter and use it instead of the
loop containing DR_STMT.  Don't check simple_iv when doing
BB analysis.  Describe the two analysis modes in the comment.

gcc/testsuite/
* gcc.dg/vect/bb-slp-pr65935.c: Expect SLP to be used in main
as well.

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

8 years agoIgnore EDGE_{DFS_BACK,EXECUTABLE} in tail-merge
vries [Mon, 3 Jul 2017 07:23:01 +0000 (07:23 +0000)] 
Ignore EDGE_{DFS_BACK,EXECUTABLE} in tail-merge

2017-07-03  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/69468
* tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
(find_same_succ_bb): Handle ignore_edge_flags.

* gcc.dg/pr81192.c: Update.

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

8 years agoDon't tail-merge blocks from different loops
vries [Mon, 3 Jul 2017 07:21:34 +0000 (07:21 +0000)] 
Don't tail-merge blocks from different loops

2017-07-03  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/81192
* tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
hash.
(same_succ::equal): Don't find bbs to be equal if bb->loop_father
differs.
(find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.

* gcc.dg/pr81192.c: Update.

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

8 years agoFix sigsegv in find_same_succ_bb
vries [Mon, 3 Jul 2017 07:20:49 +0000 (07:20 +0000)] 
Fix sigsegv in find_same_succ_bb

2017-07-03  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/81192
* tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
BB_SAME_SUCC (bb) == NULL.

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

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

8 years agoDaily bump.
gccadmin [Mon, 3 Jul 2017 00:16:42 +0000 (00:16 +0000)] 
Daily bump.

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

8 years ago * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
hubicka [Sun, 2 Jul 2017 22:27:50 +0000 (22:27 +0000)] 
* cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
consistency.

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

8 years ago * dumpfile.c: Include profile-count.h
hubicka [Sun, 2 Jul 2017 22:25:59 +0000 (22:25 +0000)] 
* dumpfile.c: Include profile-count.h
* tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes; update
profile.
(insert_cond_bb): Update profile.
* tree-cfg.h (insert_cond_bb): Update prototype.
* tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
* tree-dump.c: Do not include tree-cfg.

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

8 years ago * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
hubicka [Sun, 2 Jul 2017 22:18:21 +0000 (22:18 +0000)] 
* bb-reorder.c (fix_up_crossing_landing_pad): Update profile.

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

8 years ago * expect.c (dw2_build_landing_pads): Update profile of the landing pad
hubicka [Sun, 2 Jul 2017 22:16:30 +0000 (22:16 +0000)] 
* expect.c (dw2_build_landing_pads): Update profile of the landing pad
bb.

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

8 years ago * tree-complex.c (expand_complex_div_wide): update profile.
hubicka [Sun, 2 Jul 2017 22:11:14 +0000 (22:11 +0000)] 
* tree-complex.c (expand_complex_div_wide): update profile.

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

8 years agoinclude/ChangeLog
jkratoch [Sun, 2 Jul 2017 20:00:48 +0000 (20:00 +0000)] 
include/ChangeLog
2017-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>

        * dwarf2.def (DW_IDX_compile_unit, DW_IDX_type_unit, DW_IDX_die_offset)
        (DW_IDX_parent, DW_IDX_type_hash, DW_IDX_lo_user, DW_IDX_hi_user)
        (DW_IDX_GNU_internal, DW_IDX_GNU_external): New.
        * dwarf2.h (DW_IDX, DW_IDX_DUP, DW_FIRST_IDX, DW_END_IDX): New.
        (enum dwarf_name_index_attribute): Remove.
        (get_DW_IDX_name): New declaration.

libiberty/ChangeLog
2017-07-02  Jan Kratochvil  <jan.kratochvil@redhat.com>

        * dwarfnames.c (DW_FIRST_IDX, DW_END_IDX, DW_IDX, DW_IDX_DUP): New.

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

8 years ago2017-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Sun, 2 Jul 2017 12:34:52 +0000 (12:34 +0000)] 
2017-07-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

* intrinsics/eoshift0.c:  For contiguous arrays, use
block algorithm.  Use memcpy where possible.

2017-07-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

* gfortran/eoshift_3.f90:  New test.

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

8 years agoReorganise machmode.h headers
rsandifo [Sun, 2 Jul 2017 09:06:10 +0000 (09:06 +0000)] 
Reorganise machmode.h headers

This patch splits the auto-generated inline functions out of
insn-modes.h and puts them in a new header file, insn-modes-inline.h.
It also makes coretypes.h include these files directly, rather than
indirectly via machmode.h.  This in turn allows insn-modes-inline.h
and machmode.h to come later in the include list, after wide-int.h.
This is useful for later patches.

insn-modes.h itself still needs to come first, since it provides
configuration information like MAX_BITSIZE_MODE_ANY_INT, which is
used to control the size of a wide_int.

The patch also makes the generator files include machmode.h
via coretypes.h.  Previously they did it by more indirect means.

Finally, the patch makes wide-int-print.h available via coretypes.h
too.  There didn't seem to be any reason to force only the print
routines to be included directly, and it would be painful to extend
that approach to the SVE patches.

[Based on the code ARM contributed in branches/ARM/sve-branch@242100]

2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

contrib/header-tools/
* graph-header-logs (ignore): Update coretypes.h header list.

gcc/
* Makefile.in (MACHMODE_H): Remove insn-modes.h
(CORETYPES_H): New define.
(MOSTLYCLEANFILES): Add insn-modes-inline.h.
(insn-modes-inline.h, s-modes-inline-h): New rules.
(generated_files): Add insn-modes-inline.h.
(RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
(build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
(build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
(build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
(build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
(build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
(build/gencodes.o, build/genconditions.o): Likewise.
(build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
(build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
(build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
(build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
(build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
(build/gencfn-macros.o, build/gcov-iov.o): Likewise.
* coretypes.h: Include everything up to real.h for generators.
Include insn-modes.h first.  Include wide-int-print.h after
wide-int.h.  Include insn-modes-inline.h and then machmode.h.
* machmode.h: Don't include insn-modes.h here.
* function-tests.c: Remove includes of signop.h, machmode.h,
double-int.h and wide-int.h.
* rtl.h: Likewise.
* gcc-rich-location.c: Remove includes of machmode.h, double-int.h
and wide-int.h.
* optc-save-gen.awk: Likewise.
* gencheck.c (BITS_PER_UNIT): Delete dummy definition.
* godump.c: Remove include of wide-int-print.h.
* pretty-print.h: Likewise.
* wide-int-print.cc: Likewise.
* wide-int.cc: Likewise.
* hash-map-tests.c: Remove include of signop.h.
* hash-set-tests.c: Likewise.
* rtl-tests.c: Likewise.
* mkconfig.sh: Remove include of machmode.h.
* genmodes.c (emit_insn_modes_h): Split emission of inline functions
into...
(emit_insn_modes_inline_h): ...this new function.  Emit the code
into an insn-modes-inline.h header file, adding appropriate
include guards and end comments.
(emit_insn_modes_c_header): Remove include of machmode.h.
(emit_min_insn_modes_c_header): Include coretypes.h rather than
machmode.h.
(main): Handle -i flag and call emit_insn_modes_inline_h when
it is passed.

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

8 years agoMake tree-ssa-strlen.c handle partial unterminated strings
rsandifo [Sun, 2 Jul 2017 08:52:42 +0000 (08:52 +0000)] 
Make tree-ssa-strlen.c handle partial unterminated strings

tree-ssa-strlen.c looks for cases in which a string is built up using
operations like:

    memcpy (a, "foo", 4);
    memcpy (a + 3, "bar", 4);
    int x = strlen (a);

As a side-effect, it optimises the non-final memcpys so that they don't
include the nul terminator.

However, after removing some "& ~0x1"s from tree-ssa-dse.c, the DSE pass
does this optimisation itself (because it can tell that later memcpys
overwrite the terminators).  The strlen pass wasn't able to handle these
pre-optimised calls in the same way as the unoptimised ones.

This patch adds support for tracking unterminated strings.

[Based on the code ARM contributed in branches/ARM/sve-branch@246236]

2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-ssa-strlen.c (strinfo): Rename the length field to
nonzero_chars.  Add a full_string_p field.
(compare_nonzero_chars, zero_length_string_p): New functions.
(get_addr_stridx): Add an offset_out parameter.
Use compare_nonzero_chars.
(get_stridx): Update accordingly.  Use compare_nonzero_chars.
(new_strinfo): Update after above changes to strinfo.
(set_endptr_and_length): Set full_string_p.
(get_string_length): Update after above changes to strinfo.
(unshare_strinfo): Update call to new_strinfo.
(maybe_invalidate): Likewise.
(get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
as a uhwi instead of an shwi.  Update after above changes to
strinfo and new_strinfo.
(zero_length_string): Assert that chainsi contains full strings.
Use zero_length_string_p.  Update call to new_strinfo.
(adjust_related_strinfos): Update after above changes to strinfo.
Copy full_string_p from origsi.
(adjust_last_stmt): Use zero_length_string_p.
(handle_builtin_strlen): Update after above changes to strinfo and
new_strinfo.  Install the lhs as the string length if the previous
entry didn't describe a full string.
(handle_builtin_strchr): Update after above changes to strinfo
and new_strinfo.
(handle_builtin_strcpy): Likewise.
(handle_builtin_strcat): Likewise.
(handle_builtin_malloc): Likewise.
(handle_pointer_plus): Likewise.
(handle_builtin_memcpy): Likewise.  Track nonzero characters
that aren't necessarily followed by a nul terminator.
(handle_char_store): Likewise.

gcc/testsuite/
* gcc.dg/strlenopt-32.c: New testcase.
* gcc.dg/strlenopt-33.c: Likewise.
* gcc.dg/strlenopt-33g.c: Likewise.
* gcc.dg/strlenopt-34.c: Likewise.
* gcc.dg/strlenopt-35.c: Likewise.

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

8 years agoPR 80769: Incorrect strlen optimisation
rsandifo [Sun, 2 Jul 2017 08:43:11 +0000 (08:43 +0000)] 
PR 80769: Incorrect strlen optimisation

In this testcase, we (correctly) record after:

  strcpy (p1, "abcde");
  char *p2 = strchr (p1, '\0');
  strcpy (p2, q);

that the length of p1 and p2 can be calculated by converting the
second strcpy to:

  tmp = stpcpy (p2, q)

and then doing tmp - p1 for p1 and tmp - p2 for p2.  This is delayed
until we know whether we actually need it.  Then:

  char *p3 = strchr (p2, '\0');

forces us to calculate the length of p2 in this way.  At this point
we had three related strinfos:

  p1: delayed length, calculated from tmp = stpcpy (p2, q)
  p2: known length, tmp - p2
  p3: known length, 0

After:

  memcpy (p3, "x", 2);

we use adjust_related_strinfos to add 1 to each length.  However,
that didn't do anything for delayed lengths because:

  else if (si->stmt != NULL)
    /* Delayed length computation is unaffected.  */
    ;

So after the memcpy we had:

  p1: delayed length, calculated from tmp = stpcpy (p2, q)
  p2: known length, tmp - p2 + 1
  p3: known length, 1

where the length of p1 was no longer correct.

2017-05-16  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/80769
* tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
for malloc and calloc.  Document the new invariant that all related
strinfos have delayed lengths or none do.
(verify_related_strinfos): Move earlier in file.
(set_endptr_and_length): New function, split out from...
(get_string_length): ...here.  Also set the lengths of related
strinfos.
(zero_length_string): Assert that chainsi has known (rather than
delayed) lengths.
(adjust_related_strinfos): Likewise.

gcc/testsuite/
PR tree-optimization/80769
* gcc.dg/strlenopt-31.c: New test.
* gcc.dg/strlenopt-31g.c: Likewise.

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

8 years agoPR81136: ICE from inconsistent DR_MISALIGNMENTs
rsandifo [Sun, 2 Jul 2017 08:37:07 +0000 (08:37 +0000)] 
PR81136: ICE from inconsistent DR_MISALIGNMENTs

The test case triggered this assert in vect_update_misalignment_for_peel:

      gcc_assert (DR_MISALIGNMENT (dr) / dr_size ==
                  DR_MISALIGNMENT (dr_peel) / dr_peel_size);

The problem was that:

- one memory reference guaranteed a high base alignment, when considering
  that reference in isolation.  This meant that we could calculate the
  vector misalignment for its DR at compile time.

- the other memory reference only guaranteed a low base alignment,
  when considering that reference in isolation.  We therefore couldn't
  calculate the vector misalignment for its DR at compile time.

- when looking at the values of the two addresses as a pair (rather
  than the memory references), it was obvious that they had the same
  misalignment, whatever that misalignment happened to be.

This is working as designed, so the patch restricts the assert to cases
in which both addresses have a compile-time misalignment.

In the test case this looks like a missed opportunity.  Both references
are unconditional, so it should be possible to use the highest of the
available base alignment guarantees when analyzing each reference.
A later patch does this, but the problem would still remain for
conditional references.

2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/81136
* tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
assert that two references with the same misalignment have the same
compile-time misalignment if those compile-time misalignments
are known.

gcc/testsuite/
PR tree-optimization/81136
* gcc.dg/vect/pr81136.c: New test.

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

8 years agoAlways print attributes when dumping tree
ak [Sun, 2 Jul 2017 00:18:37 +0000 (00:18 +0000)] 
Always print attributes when dumping tree

A tree type dump currently doesn't print the attributes. Since we have
so many now and they do many interesting things dumping them can be
useful. So dump them by default for tree type dumps.

gcc/:

2017-07-01  Andi Kleen  <ak@linux.intel.com>

        * print-tree.c (print_node): Print all attributes.

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

8 years agoDaily bump.
gccadmin [Sun, 2 Jul 2017 00:16:34 +0000 (00:16 +0000)] 
Daily bump.

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

8 years ago * cfg.c (scale_bbs_frequencies): New function.
hubicka [Sat, 1 Jul 2017 20:46:40 +0000 (20:46 +0000)] 
* cfg.c (scale_bbs_frequencies): New function.
* cfg.h (scale_bbs_frequencies): Declare it.
* cfgloopanal.c (single_likely_exit): Cleanup.
* cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
as parameter.
(scale_loop_profile): Likewise.
(loop_version): Likewise.
(create_empty_loop_on_edge): Update.
* cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
scale_loop_frequencies, scale_loop_profile, loopify,
loop_version): Update prototypes.
* modulo-sched.c (sms_schedule): Update.
* predict.c (unlikely_executed_edge_p): Also check probability.
(probably_never_executed_edge_p): Fix typo.
* tree-if-conv.c (version_loop_for_if_conversion): Update.
* tree-parloops.c (gen_parallel_loop): Update.
* tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
* tree-ssa-loop-split.c (split_loop): Update.
* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
* tree-vect-loop-manip.c (vect_do_peeling): Update.
(vect_loop_versioning): Update.
* tree-vect-loop.c (scale_profile_for_vect_loop): Update.

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

8 years ago * trans-mem.c (split_bb_make_tm_edge): Update profile.
hubicka [Sat, 1 Jul 2017 14:56:21 +0000 (14:56 +0000)] 
* trans-mem.c (split_bb_make_tm_edge): Update profile.

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

8 years ago * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
hubicka [Sat, 1 Jul 2017 14:55:28 +0000 (14:55 +0000)] 
* tree-if-conv.c (combine_blocks): Use make_single_succ_edge
to keep profile consistent.

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

8 years ago * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
hubicka [Sat, 1 Jul 2017 12:31:25 +0000 (12:31 +0000)] 
* cfgrtl.c (rtl_flow_call_edges_add): Update profile.
* tree-cfg.c (gimple_flow_call_edges_add): Likewise.
* profile-count.h (max_safe_multiplier): Make unsigned.
(profile_count::guessed_zero): New.

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

8 years ago * bb-reorder.c (fix_up_crossing_landing_pad,
hubicka [Sat, 1 Jul 2017 12:29:55 +0000 (12:29 +0000)] 
* bb-reorder.c (fix_up_crossing_landing_pad,
fix_crossing_conditional_branches): Use make_single_succ_edge
to keep profile consistent.

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

8 years ago * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
hubicka [Sat, 1 Jul 2017 12:05:29 +0000 (12:05 +0000)] 
* tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
to update profile.

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

8 years ago PR sanitizer/81262
jakub [Sat, 1 Jul 2017 10:11:16 +0000 (10:11 +0000)] 
PR sanitizer/81262
* bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
the right scopes, make sure cond_jump isn't preserved between multiple
iterations.  Search for fallthru edge whenever there are 3+ edges and
use find_fallthru_edge for it.

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

8 years ago PR sanitizer/81262
jakub [Sat, 1 Jul 2017 08:16:27 +0000 (08:16 +0000)] 
PR sanitizer/81262
* bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
the right scopes, make sure cond_jump isn't preserved between multiple
iterations.  Search for fallthru edge whenever there are 3+ edges and
use find_fallthru_edge for it.

* gcc.c-torture/compile/pr81262.c: New test.
* g++.dg/ubsan/pr81262.C: New test.

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

8 years ago Patch by Alexander Monakov <amonakov@ispras.ru>
hubicka [Sat, 1 Jul 2017 07:47:22 +0000 (07:47 +0000)] 
Patch by Alexander Monakov <amonakov@ispras.ru>
* sel-sched-ir.c (compute_succs_info): Handle uninitialized
probabilities consistently.

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

8 years ago * sel-sched-ir.c (compute_succs_info): Handle uninitialized
hubicka [Sat, 1 Jul 2017 07:44:45 +0000 (07:44 +0000)] 
* sel-sched-ir.c (compute_succs_info): Handle uninitialized
probabilities consistently.

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

8 years ago * pa.c (pa_expand_compare_and_swap_loop): Update call of
hubicka [Sat, 1 Jul 2017 07:28:27 +0000 (07:28 +0000)] 
* pa.c (pa_expand_compare_and_swap_loop): Update call of
emit_cmp_and_jump_insns.

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

8 years agoDaily bump.
gccadmin [Sat, 1 Jul 2017 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

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

8 years ago PR ipa/81261
hubicka [Fri, 30 Jun 2017 21:09:13 +0000 (21:09 +0000)] 
PR ipa/81261
* tree-inline.c (expand_call_inline): Combine profile statuses.

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

8 years ago PR c++/81257 - ICE with invalid ::template.
jason [Fri, 30 Jun 2017 21:08:53 +0000 (21:08 +0000)] 
PR c++/81257 - ICE with invalid ::template.

PR c++/54769 - wrong lookup of dependent template-name.
* parser.c (cp_parser_template_name): Revert part of last change.

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

8 years ago2017-06-30 Andrew Pinski <apinski@cavium.com>
pinskia [Fri, 30 Jun 2017 20:40:38 +0000 (20:40 +0000)] 
2017-06-30  Andrew Pinski  <apinski@cavium.com>

        * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
        fold_stmt returned true.
2017-06-30  Andrew Pinski  <apinski@cavium.com>

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

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

8 years ago * config-lang.in (gtfiles): Add cp/lex.c.
nathan [Fri, 30 Jun 2017 18:46:01 +0000 (18:46 +0000)] 
* config-lang.in (gtfiles): Add cp/lex.c.
* cp-tree.h (mangle_convop_name_for_type): Rename ...
(make_conv_op_name): ... here.  Move to lex.
* lambda.c (maybe_add_lambda_conv_op): Update.
* parser.c (cp_parser_conversion_function_id): Update.
* pt.c (tsubst_decl, tsubst_baselink, tsubst_copy,
tsubst_copy_and_build): Update.
* semantics.c (apply_deduced_return_type): Update.
* mangle.c (conv_type_hasher, conv_type_names,
mangle_conv_op_name_for_type): Move to ...
* lex.c (conv_type_hasher, conv_type_names, make_convop_name):
... here.  Rename.

* libcp1plugin.cc (plugin_build_decl): Use make_conv_op_name.
(plugin_build_dependent_expr): Likewise.

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

8 years ago * ggc.h (empty_string): Delete.
nathan [Fri, 30 Jun 2017 17:00:46 +0000 (17:00 +0000)] 
* ggc.h (empty_string): Delete.
* cfgexpand.c (expand_asm_stmt): Use plain "".
* optabs.c (expand_asm_memory_barrier): Likewise.
* stringpool.c (empty_string): Delete.
(digit_vector, digit_string): Delete.
(ggc_alloc_string): Use plain "", don't optimize single digit
strings.  Use ggc_alloc_atomic.

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

8 years ago[rtlanal] Do a better job of costing parallel sets containing flag-setting operations.
rearnsha [Fri, 30 Jun 2017 16:36:57 +0000 (16:36 +0000)] 
[rtlanal] Do a better job of costing parallel sets containing flag-setting operations.

Many parallel set insns are of the form of a single set that also sets
the condition code flags.  In this case the cost of such an insn is
normally the cost of the part that doesn't set the flags, since
updating the condition flags is simply a side effect.

At present all such insns are treated as having unknown cost (ie 0)
and combine assumes that such insns are infinitely more expensive than
any other insn sequence with a non-zero cost.

This patch addresses this problem by allowing insn_rtx_cost to ignore
the condition setting part of a PARALLEL iff there is exactly one
comparison set and one non-comparison set.  If the only set operation
is a comparison we still use that as the basis of the insn cost.

* rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
comparison set and one other set, use the cost of the non-comparison
set.

Bootstrapped on aarch64-none-linuxgnu

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

8 years ago * ggc.h: Replace all 'static inline' with plain 'inline'. Fix
nathan [Fri, 30 Jun 2017 16:10:13 +0000 (16:10 +0000)] 
* ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
some formatting.

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

8 years ago * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
bergner [Fri, 30 Jun 2017 16:04:08 +0000 (16:04 +0000)] 
* tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
loops.  Remove now unneeded calls to gimple_switch_set_label() that
just set removed labels to NULL_TREE.

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

8 years ago * tree-ssanames.c (set_range_info_raw): Abstract from ...
aldyh [Fri, 30 Jun 2017 15:36:41 +0000 (15:36 +0000)] 
* tree-ssanames.c (set_range_info_raw): Abstract from ...
(set_range_info): ...here.  Only call set_range_info_raw if domain
is useful.
(set_nonzero_bits): Call set_range_info_raw.
* tree-ssanames.h (set_range_info_raw): New.
testsuite/
* gcc.dg/Walloca-14.c: Adapt test to recognize new complaint of
unbounded use.

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

8 years agoFix location of typeid() (PR c++/80014)
dmalcolm [Fri, 30 Jun 2017 15:20:55 +0000 (15:20 +0000)] 
Fix location of typeid() (PR c++/80014)

gcc/cp/ChangeLog:
PR c++/80014
* parser.c (cp_parser_postfix_expression): Construct a location
for typeid expressions.

gcc/testsuite/ChangeLog:
PR c++/80014
* g++.dg/plugin/diagnostic-test-expressions-1.C (std::type_info):
Add declaration.
(test_typeid): New test function.

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

8 years ago PR target/81225
jakub [Fri, 30 Jun 2017 14:52:24 +0000 (14:52 +0000)] 
PR target/81225
* config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For
V8FI, V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
of nonimmediate_operand and <store_mask_constraint> instead of m for
the input operand.  For V8FI iterator, always split if input is a MEM.
For V16FI and V8SF_256 iterators, don't test if both operands are MEM
if <mask_applied>.  For VI4F_256 iterator, use <store_mask_predicate>
instead of register_operand and <store_mask_constraint> instead of v for
        the input operand.  Make sure both operands aren't MEMs for if not
<mask_applied>.

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

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

8 years ago * cp-tree.h (lookup_fnfields_1, class_method_index_for_fn): Don't
nathan [Fri, 30 Jun 2017 14:50:48 +0000 (14:50 +0000)] 
* cp-tree.h (lookup_fnfields_1, class_method_index_for_fn): Don't
declare.
(lookup_all_conversions): Declare.
* class.c (get_basefndecls): Use lookup_fnfields_slot.
* decl.c (register_dtor_fn): Use lookup_fnfields_slot.
* decl2.c (check_class_fn): Use lookup_fnfields_slot.  Rework
diagnostics.
* pt.c (retrieve_specialization): Use lookup_fnfields_slot.
(check_explicit_specialization): Use lookup_fnfields_slot_nolazy,
lookup_all_conversions.
* search.c (lookup_fnfields_1): Make static.
(lookup_all_conversions): New.
(class_method_index_for_fn): Delete.
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Use
lookup_fnfields_slot.

* g++.dg/concepts/memfun-err.C: Adjust diagnostics.
* g++.dg/cpp0x/decltype9.C: Likewise.
* g++.dg/cpp0x/forw_enum9.C: Likewise.
* g++.dg/lookup/decl1.C: Likewise.
* g++.dg/lookup/extern-c-redecl.C: Likewise.
* g++.dg/other/pr28432.C: Likewise.
* g++.dg/parse/crash12.C: Likewise.
* g++.dg/parse/enum3.C: Likewise.
* g++.dg/parse/operator6.C: Likewise.
* g++.dg/template/crash69.C: Likewise.
* g++.dg/template/error27.C: Likewise.
* g++.dg/template/error28.C: Likewise.
* g++.dg/template/memfriend6.C: Likewise.
* g++.old-deja/g++.mike/err1.C: Likewise.
* g++.old-deja/g++.mike/p811.C: Likewise.
* g++.old-deja/g++.other/crash25.C: Likewise.
* g++.old-deja/g++.other/dtor4.C: Likewise.
* g++.old-deja/g++.pt/t37.C: Likewise.

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

8 years ago * lto-wrapper.c (copy_file) Close both file descriptors before
sylvestre [Fri, 30 Jun 2017 14:17:54 +0000 (14:17 +0000)] 
* lto-wrapper.c (copy_file) Close both file descriptors before
exiting normally.

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

8 years agoFix removal of ifunc (PR ipa/81214).
marxin [Fri, 30 Jun 2017 13:51:19 +0000 (13:51 +0000)] 
Fix removal of ifunc (PR ipa/81214).

2017-06-30  Martin Liska  <mliska@suse.cz>

PR ipa/81214
* gcc.target/i386/pr81214.c: New test.
2017-06-30  Martin Liska  <mliska@suse.cz>

PR ipa/81214
* multiple_target.c (create_dispatcher_calls): Make ifunc
also for function that don't have calls or are not referenced.

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

8 years ago2017-06-30 Richard Biener <rguenther@suse.de>
rguenth [Fri, 30 Jun 2017 13:19:29 +0000 (13:19 +0000)] 
2017-06-30  Richard Biener  <rguenther@suse.de>

* tree-vect-slp.c (vect_slp_analyze_node_operations): Only
analyze the first scalar stmt.  Move vector type computation
for the BB case here from ...
* tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
live operation processing in the SLP case properly.

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

8 years ago * call.c (build_new_method_call_1): Use constructo_name to get
nathan [Fri, 30 Jun 2017 13:11:01 +0000 (13:11 +0000)] 
* call.c (build_new_method_call_1): Use constructo_name to get
ctor name.  Move argument processing earlier to merge cdtor
handling blocks.
* decl.c (grokfndecl): Cdtors have special names.
* method.c (implicitly_declare_fn): Likewise. Simplify flag setting.
* pt.c (check_explicit_specialization): Cdtor name is already
special.
* search.c (class_method_index_for_fn): Likewise.

* g++.dg/plugin/decl-plugin-test.C: Expect special ctor name.

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

8 years ago PR c++/81229
nathan [Fri, 30 Jun 2017 11:40:08 +0000 (11:40 +0000)] 
PR c++/81229
* name-lookup.c (do_pushdecl): Reset IDENTIFIER_TYPE when finding
a matching TYPE_DECL.

* g++.dg/lookup/pr81229.C: New.

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

8 years ago2017-06-30 Richard Biener <rguenther@suse.de>
rguenth [Fri, 30 Jun 2017 09:49:44 +0000 (09:49 +0000)] 
2017-06-30  Richard Biener  <rguenther@suse.de>

* graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.

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

8 years agoCall BUILT_IN_ASAN_HANDLE_NO_RETURN before BUILT_IN_UNWIND_RESUME (PR sanitizer/81021).
marxin [Fri, 30 Jun 2017 08:51:00 +0000 (08:51 +0000)] 
Call BUILT_IN_ASAN_HANDLE_NO_RETURN before BUILT_IN_UNWIND_RESUME (PR sanitizer/81021).

2017-06-30  Martin Liska  <mliska@suse.cz>

PR sanitizer/81021
* g++.dg/asan/pr81021.C: New test.
2017-06-30  Martin Liska  <mliska@suse.cz>

PR sanitizer/81021
* tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
before BUILT_IN_UNWIND_RESUME when ASAN is used.

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

8 years agoDocumentation: Clean up AArch64 options.
yroux [Fri, 30 Jun 2017 08:36:57 +0000 (08:36 +0000)] 
Documentation: Clean up AArch64 options.

gcc/
2017-06-30  Yvan Roux  <yvan.roux@linaro.org>

* doc/invoke.texi (AArch64): Add missing options and remove redundant
ones.

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

8 years ago2017-06-30 Richard Biener <rguenther@suse.de>
rguenth [Fri, 30 Jun 2017 08:08:33 +0000 (08:08 +0000)] 
2017-06-30  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81249
* tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
condition reduction result to original scalar type.

* g++.dg/torture/pr81249.C: New testcase.

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

8 years agoprofile-count.h: Fix typos and whitespace issues.
krebbel [Fri, 30 Jun 2017 06:46:42 +0000 (06:46 +0000)] 
profile-count.h: Fix typos and whitespace issues.

gcc/ChangeLog:

2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* profile-count.h (enum profile_quality): Fix typos and whitespace
issues.

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

8 years agoS/390: Adjust to the recent branch probability changes.
krebbel [Fri, 30 Jun 2017 06:45:51 +0000 (06:45 +0000)] 
S/390: Adjust to the recent branch probability changes.

This fixes the bootstrap failure triggered by the recent changes wrt
branch probabilities aka emit_cmp_and_jump_insns does not accept
integers as branch probability anymore.

gcc/ChangeLog:

2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

* config/s390/s390.c (s390_expand_setmem): Adjust to the new data
type for branch probabilities.

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

8 years ago2017-06-29 Julian Brown <julian@codesourcery.com>
naveenh [Fri, 30 Jun 2017 03:58:48 +0000 (03:58 +0000)] 
2017-06-29  Julian Brown  <julian@codesourcery.com>
    Naveen H.S  <Naveen.Hurugalawadi@cavium.com>

* config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
* config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
(thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
(aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.

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

8 years ago2017-06-29 Naveen H.S <Naveen.Hurugalawadi@cavium.com>
naveenh [Fri, 30 Jun 2017 03:50:44 +0000 (03:50 +0000)] 
2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>

* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
check for CC usage into AARCH64_FUSE_CMP_BRANCH.
* config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
CC usage from generic code to here.
* sched-deps.c (sched_macro_fuse_insns): Move the condition for
CC usage into the target macros.

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

8 years agoDaily bump.
gccadmin [Fri, 30 Jun 2017 00:16:27 +0000 (00:16 +0000)] 
Daily bump.

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

8 years ago2017-06-29 Maya Rashish <coypu@sdf.org>
law [Thu, 29 Jun 2017 23:23:06 +0000 (23:23 +0000)] 
2017-06-29  Maya Rashish  <coypu@sdf.org>

* config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
objects.

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

8 years ago * arm/arm-builtins.c: Include profile-count.h
hubicka [Thu, 29 Jun 2017 22:38:30 +0000 (22:38 +0000)] 
* arm/arm-builtins.c: Include profile-count.h
* except.c (sjlj_emit_function_enter): Use
profile_probability::unlikely.

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

8 years ago/cp
paolo [Thu, 29 Jun 2017 22:32:33 +0000 (22:32 +0000)] 
/cp
2017-06-29  Paolo Carlini  <paolo.carlini@oracle.com>

* class.c (add_method): Change pair of errors to error + inform.
(handle_using_decl): Likewise.

/testsuite
2017-06-29  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/cpp0x/inh-ctor3.C: Adjust for dg-message vs dg-error.
* g++.dg/diagnostic/variadic1.C: Likewise.
* g++.dg/gomp/udr-3.C: Likewise.
* g++.dg/overload/error1.C: Likewise.
* g++.dg/overload/error2.C: Likewise.
* g++.dg/template/duplicate1.C: Likewise.
* g++.old-deja/g++.benjamin/warn02.C: Likewise.
* g++.old-deja/g++.brendan/arm2.C: Likewise.
* g++.old-deja/g++.other/redecl2.C: Likewise.
* g++.old-deja/g++.other/redecl4.C: Likewise.
* g++.old-deja/g++.pt/memtemp78.C: Likewise.

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

8 years ago * constexpr.c, error.c, tree.c: Remove WITH_CLEANUP_EXPR handling.
jason [Thu, 29 Jun 2017 21:44:11 +0000 (21:44 +0000)] 
* constexpr.c, error.c, tree.c: Remove WITH_CLEANUP_EXPR handling.

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

8 years ago PR c++/81180 - ICE with C++17 deduction of member class template.
jason [Thu, 29 Jun 2017 21:13:43 +0000 (21:13 +0000)] 
PR c++/81180 - ICE with C++17 deduction of member class template.

* pt.c (build_deduction_guide): Correct member template handling.

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

8 years ago2017-06-29 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
acsawdey [Thu, 29 Jun 2017 20:10:05 +0000 (20:10 +0000)] 
2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>

        * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
        and tocrel_offset be pointer args rather than implicitly using
        static versions.
        (legitimate_constant_pool_address_p, rs6000_emit_move,
        const_load_sequence_p, adjust_vperm): Add local tocrel_base and
        tocrel_offset and use in toc_relative_expr_p call.
        (print_operand, print_operand_address): Use static tocrel_base_oac
        and tocrel_offset_oac.
        (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
        tocrel_offset_oac.

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

8 years ago PR c++/81188 - matching decltype of member function call.
jason [Thu, 29 Jun 2017 19:44:12 +0000 (19:44 +0000)] 
PR c++/81188 - matching decltype of member function call.

* tree.c (cp_tree_equal): Remove COMPONENT_REF special case.

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

8 years ago2017-06-29 Maya Rashish <coypu@sdf.org>
law [Thu, 29 Jun 2017 19:43:15 +0000 (19:43 +0000)] 
2017-06-29  Maya Rashish  <coypu@sdf.org>

* config/vax/builtins.md (ffssi2_internal): Correct constraint.

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

8 years ago * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
ebotcazou [Thu, 29 Jun 2017 19:21:25 +0000 (19:21 +0000)] 
* expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
objects, take into account only the alignment of 'op0' and 'mode1' if
'op0' is a MEM.

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

8 years ago PR fortran/77765
cesar [Thu, 29 Jun 2017 19:03:43 +0000 (19:03 +0000)] 
PR fortran/77765

gcc/fortran/
* openmp.c (gfc_match_oacc_routine): Check if proc_name exist before
comparing the routine name against it.

gcc/testsuite/
* gfortran.dg/goacc/pr77765.f90: New test.

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

8 years ago2017-06-29 Steve Ellcey <sellcey@cavium.com>
sje [Thu, 29 Jun 2017 18:23:40 +0000 (18:23 +0000)] 
2017-06-29  Steve Ellcey  <sellcey@cavium.com>

* gcc.target/aarch64/ccmp_2.c: New test.

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

8 years ago2017-06-29 Steve Ellcey <sellcey@cavium.com>
sje [Thu, 29 Jun 2017 18:20:14 +0000 (18:20 +0000)] 
2017-06-29  Steve Ellcey  <sellcey@cavium.com>

* ccmp.c (ccmp_tree_comparison_p): New function.
(ccmp_candidate_p): Update to use above function.
(get_compare_parts): New function.
(expand_ccmp_next): Update to use new functions.
(expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
new functions.
(expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
take mode as argument.
* ccmp.h (expand_ccmp_expr): Add mode as argument.
* expr.c (expand_expr_real_1): Pass mode as argument.

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

8 years ago PR c++/81247
nathan [Thu, 29 Jun 2017 18:20:13 +0000 (18:20 +0000)] 
PR c++/81247
* parser.c (cp_parser_namespace_definition): Immediately close the
namespace if there's no open-brace.
* name-lookup.c (do_pushdecl): Reset OLD when pushing into new
namespace.

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

8 years ago * bid/bid2dpd_dpd2bid.c (_bid_to_dpd32): Fix whitespace.
law [Thu, 29 Jun 2017 17:35:03 +0000 (17:35 +0000)] 
* bid/bid2dpd_dpd2bid.c (_bid_to_dpd32): Fix whitespace.
(_dpd_to_bid32): Simplify identical code on multiple branches.
Fix whitespace.
(_bid_to_dpd64, _dpd_to_bid64): Likewise.
(_bid_to_dpd128, _dpd_to_bid128): Likewise.

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

8 years agocombine: Print insns with the cost dump
segher [Thu, 29 Jun 2017 17:28:47 +0000 (17:28 +0000)] 
combine: Print insns with the cost dump

In the combine dump file, at the start there is a list of the RTL cost
of every insn.  The only thing listed about the insns is the UID though.
To make it more useful, this patch prints the insn itself as well (in
slim format).

* combine.c (combine_instructions): Print insns to dump_file, together
with their costs.

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

8 years ago * asan.c (asan_emit_stack_protection): Update.
hubicka [Thu, 29 Jun 2017 16:40:53 +0000 (16:40 +0000)] 
* asan.c (asan_emit_stack_protection): Update.
(create_cond_insert_point): Update.
* auto-profile.c (afdo_propagate_circuit): Update.
* basic-block.h (struct edge_def): Turn probability to
profile_probability.
(EDGE_FREQUENCY): Update.
* bb-reorder.c (find_traces_1_round): Update.
(better_edge_p): Update.
(sanitize_hot_paths): Update.
* cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
(make_single_succ_edge): Update.
(check_bb_profile): Update.
(dump_edge_info): Update.
(update_bb_profile_for_threading): Update.
* cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
probabilitycount to 0.
* cfgbuild.c (compute_outgoing_frequencies): Update.
* cfgcleanup.c (try_forward_edges): Update.
(outgoing_edges_match): Update.
(try_crossjump_to_edge): Update.
* cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
(expand_gimple_tailcall): Update.
(construct_init_block): Use make_single_succ_edge.
(construct_exit_block): Use make_single_succ_edge.
* cfghooks.c (verify_flow_info): Update.
(redirect_edge_succ_nodup): Update.
(split_edge): Update.
(account_profile_record): Update.
* cfgloopanal.c (single_likely_exit): Update.
* cfgloopmanip.c (scale_loop_profile): Update.
(set_zero_probability): Remove.
(duplicate_loop_to_header_edge): Update.
* cfgloopmanip.h (loop_version): Update prototype.
* cfgrtl.c (try_redirect_by_replacing_jump): Update.
(force_nonfallthru_and_redirect): Update.
(update_br_prob_note): Update.
(rtl_verify_edges): Update.
(purge_dead_edges): Update.
(rtl_lv_add_condition_to_bb): Update.
* cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
* cgraphunit.c (init_lowered_empty_function): Update.
(cgraph_node::expand_thunk): Update.
* cilk-common.c: Include profile-count.h
* dojump.c (inv): Remove.
(jumpifnot): Update.
(jumpifnot_1): Update.
(do_jump_1): Update.
(do_jump): Update.
(do_jump_by_parts_greater_rtx): Update.
(do_compare_rtx_and_jump): Update.
* dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
do_jump_1. do_compare_rtx_and_jump): Update prototype.
* dwarf2cfi.c: Include profile-count.h
* except.c (dw2_build_landing_pads): Use make_single_succ_edge.
(sjlj_emit_dispatch_table): Likewise.
* explow.c: Include profile-count.h
* expmed.c (emit_store_flag_force): Update.
(do_cmp_and_jump): Update.
* expr.c (compare_by_pieces_d::generate): Update.
(compare_by_pieces_d::finish_mode): Update.
(emit_block_move_via_loop): Update.
(store_expr_with_bounds): Update.
(store_constructor): Update.
(expand_expr_real_2): Update.
(expand_expr_real_1): Update.
* expr.h (try_casesi, try_tablejump): Update prototypes.
* gimple-pretty-print.c (dump_probability): Update.
(dump_profile): New.
(dump_gimple_label): Update.
(dump_gimple_bb_header): Update.
* graph.c (draw_cfg_node_succ_edges): Update.
* hsa-gen.c (convert_switch_statements): Update.
* ifcvt.c (cheap_bb_rtx_cost_p): Update.
(find_if_case_1): Update.
(find_if_case_2): Update.
* internal-fn.c (expand_arith_overflow_result_store): Update.
(expand_addsub_overflow): Update.
(expand_neg_overflow): Update.
(expand_mul_overflow): Update.
(expand_vector_ubsan_overflow): Update.
* ipa-cp.c (good_cloning_opportunity_p): Update.
* ipa-split.c (split_function): Use make_single_succ_edge.
* ipa-utils.c (ipa_merge_profiles): Update.
* loop-doloop.c (add_test): Update.
(doloop_modify): Update.
* loop-unroll.c (compare_and_jump_seq): Update.
(unroll_loop_runtime_iterations): Update.
* lra-constraints.c (lra_inheritance): Update.
* lto-streamer-in.c (input_cfg): Update.
* lto-streamer-out.c (output_cfg): Update.
* mcf.c (adjust_cfg_counts): Update.
* modulo-sched.c (sms_schedule): Update.
* omp-expand.c (expand_omp_for_init_counts): Update.
(extract_omp_for_update_vars): Update.
(expand_omp_ordered_sink): Update.
(expand_omp_for_ordered_loops): Update.
(expand_omp_for_generic): Update.
(expand_omp_for_static_nochunk): Update.
(expand_omp_for_static_chunk): Update.
(expand_cilk_for): Update.
(expand_omp_simd): Update.
(expand_omp_taskloop_for_outer): Update.
(expand_omp_taskloop_for_inner): Update.
* omp-simd-clone.c (simd_clone_adjust): Update.
* optabs.c (expand_doubleword_shift): Update.
(expand_abs): Update.
(emit_cmp_and_jump_insn_1): Update.
(expand_compare_and_swap_loop): Update.
* optabs.h (emit_cmp_and_jump_insns): Update prototype.
* predict.c (predictable_edge_p): Update.
(edge_probability_reliable_p): Update.
(set_even_probabilities): Update.
(combine_predictions_for_insn): Update.
(combine_predictions_for_bb): Update.
(propagate_freq): Update.
(estimate_bb_frequencies): Update.
(force_edge_cold): Update.
* profile-count.c (profile_count::dump): Add missing space into dump.
(profile_count::debug): Add newline.
(profile_count::differs_from_p): Explicitly convert to unsigned.
(profile_count::stream_in): Update.
(profile_probability::dump): New member function.
(profile_probability::debug): New member function.
(profile_probability::differs_from_p): New member function.
(profile_probability::differs_lot_from_p): New member function.
(profile_probability::stream_in): New member function.
(profile_probability::stream_out): New member function.
* profile-count.h (profile_count_quality): Rename to ...
(profile_quality): ... this one.
(profile_probability): New.
(profile_count): Update.
* profile.c (compute_branch_probabilities): Update.
* recog.c (peep2_attempt): Update.
* sched-ebb.c (schedule_ebbs): Update.
* sched-rgn.c (find_single_block_region): Update.
(compute_dom_prob_ps): Update.
(schedule_region): Update.
* sel-sched-ir.c (compute_succs_info): Update.
* stmt.c (struct case_node): Update.
(do_jump_if_equal): Update.
(get_outgoing_edge_probs): Update.
(conditional_probability): Update.
(emit_case_dispatch_table): Update.
(expand_case): Update.
(expand_sjlj_dispatch_table): Update.
(emit_case_nodes): Update.
* targhooks.c: Update.
* tracer.c (better_p): Update.
(find_best_successor): Update.
* trans-mem.c (expand_transaction): Update.
* tree-call-cdce.c: Update.
* tree-cfg.c (gimple_split_edge): Upate.
(move_sese_region_to_fn): Upate.
* tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
* tree-eh.c (lower_resx): Upate.
(cleanup_empty_eh_move_lp): Upate.
* tree-if-conv.c (version_loop_for_if_conversion): Update.
* tree-inline.c (copy_edges_for_bb): Update.
(copy_cfg_body): Update.
* tree-parloops.c (gen_parallel_loop): Update.
* tree-profile.c (gimple_gen_ic_func_profiler): Update.
(gimple_gen_time_profiler): Update.
* tree-ssa-dce.c (remove_dead_stmt): Update.
* tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
* tree-ssa-loop-im.c (execute_sm_if_changed): Update.
* tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
(unloop_loops): Update.
(try_peel_loop): Update.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
* tree-ssa-loop-split.c (connect_loops): Update.
(split_loop): Update.
* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
(hoist_guard): Update.
* tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
(value_replacement): Update.
* tree-ssa-reassoc.c (branch_fixup): Update.
* tree-ssa-tail-merge.c (replace_block_by): Update.
* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
(create_edge_and_update_destination_phis): Update.
(compute_path_counts): Update.
(recompute_probabilities): Update.
(update_joiner_offpath_counts): Update.
(freqs_to_counts_path): Update.
(duplicate_thread_path): Update.
* tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
(struct switch_conv_info): Update.
(gen_inbound_check): Update.
* tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
(vect_do_peeling): Update.
(vect_loop_versioning): Update.
* tree-vect-loop.c (scale_profile_for_vect_loop): Update.
(optimize_mask_stores): Update.
* ubsan.c (ubsan_expand_null_ifn): Update.
* value-prof.c (gimple_divmod_fixed_value): Update.
(gimple_divmod_fixed_value_transform): Update.
(gimple_mod_pow2): Update.
(gimple_mod_pow2_value_transform): Update.
(gimple_mod_subtract): Update.
(gimple_mod_subtract_transform): Update.
(gimple_ic): Update.
(gimple_stringop_fixed_value): Update.
(gimple_stringops_transform): Update.
* value-prof.h: Update.

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

8 years ago * Makefile.am (MOSTLYCLEANFILES): Remove testing files and logs.
ian [Thu, 29 Jun 2017 16:01:38 +0000 (16:01 +0000)] 
* Makefile.am (MOSTLYCLEANFILES): Remove testing files and logs.
(mostlyclean-local): Remove check-runtime-dir, cgo-test-dir,
carchive-test-dir.
(ECHO_ENV): Define.
(check-go-tool): Depend on cgo.  Write command to testlog.
(check-runtime): New target.
(check-cgo-test): New target.
(check-carchive-test): New target.
(check): Depend on check-runtime, check-cgo-test,
check-carchive-test.  Add @ to prettify output.
(.PHONY): Add check-runtime, check-cgo-test, check-carchive-test.
* Makefile.in: Rebuild.

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

8 years agogcc/ChangeLog:
carll [Thu, 29 Jun 2017 15:39:57 +0000 (15:39 +0000)] 
gcc/ChangeLog:

2017-06-29  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-c.c: Add support for built-in functions
vector signed int vec_signed (vector float);
vector signed long long vec_signed (vector double);
vector signed int vec_signed2 (vector double, vector double);
vector signed int vec_signede (vector double);
vector signed int vec_signedo (vector double);
* config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
instruction generator.
* config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
UNSPEC_VSX_VSIGNED2): Add UNSPECS.
(vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
Add define_insn.
(vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
vunsignede_v2df): Add define_expands.
* config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
VEC_UNSIGNEDO): Add definitions.
* config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
UNSPEC_VSX_VSIGNED2): Add UNSPECs.
(vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
(vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
* config/rs6000/altivec.h (vec_signed, vec_signed2,
vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
vec_unsignede, vec_unsignedo): Add builtin defines.
* config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
declaration.
* doc/extend.texi: Update the built-in documentation file for the
new built-in functions.

gcc/testsuite/ChangeLog:

2017-06-29  Carl Love  <cel@us.ibm.com>

* gcc.target/powerpc/builtins-3-runnable.c (test_int_result,
test_unsigned_int_result, test_ll_int_result,
test_ll_unsigned_int_result): Add result checking functions, add
debug support.
(main): Add builtin function tests.

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

8 years ago PR c++/81164 - ICE with invalid inherited constructor.
jason [Thu, 29 Jun 2017 15:30:11 +0000 (15:30 +0000)] 
PR c++/81164 - ICE with invalid inherited constructor.

* search.c (binfo_direct_p): New.
* name-lookup.c (do_class_using_decl): Use it.

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

8 years ago misc/cgo/testcarchive: fix test to work for gccgo
ian [Thu, 29 Jun 2017 15:17:20 +0000 (15:17 +0000)] 
misc/cgo/testcarchive: fix test to work for gccgo

    This test is not yet run, but it will be soon.

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

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

8 years ago cmd/go: fix -buildmode={c-archive,c-shared,pie} for gccgo
ian [Thu, 29 Jun 2017 15:14:05 +0000 (15:14 +0000)] 
cmd/go: fix -buildmode={c-archive,c-shared,pie} for gccgo

    The tests are misc/cgo tests that are not currently run but will be
    run soon.

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

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

8 years agogcc/testsuite/ChangeLog:
carll [Thu, 29 Jun 2017 15:11:25 +0000 (15:11 +0000)] 
gcc/testsuite/ChangeLog:

2017-06-29  Carl Love  <cel@us.ibm.com>

* gcc.target/powerpc/builtins-3-vec_reve-runnable.c (dg-options,
dg-skip-if): Add -mvsx -mcpu=power7.

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

8 years ago * cp-tree.h (THIS_NAME, IN_CHARGE_NAME, VTBL_PTR_TYPE,
nathan [Thu, 29 Jun 2017 14:49:46 +0000 (14:49 +0000)] 
* cp-tree.h (THIS_NAME, IN_CHARGE_NAME, VTBL_PTR_TYPE,
VTABLE_DELTA_NAME, VTABLE_PFN_NAME): Delete.
* decl.c (initialize_predefined_identifiers): Name cdtor special
names consistently.  Use literals for above deleted defines.
(cxx_init_decl_processing): Use literal for vtbl_ptr_type name,

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

8 years ago * lex.c (maybe_add_lang_type_raw): Exit early, rather than use a
nathan [Thu, 29 Jun 2017 14:45:44 +0000 (14:45 +0000)] 
* lex.c (maybe_add_lang_type_raw): Exit early, rather than use a
flag.

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

8 years ago * call.c (check_dtor_name): Use constructor_name for enums too.
nathan [Thu, 29 Jun 2017 14:38:09 +0000 (14:38 +0000)] 
* call.c (check_dtor_name): Use constructor_name for enums too.
(build_new_method_call_1): Use constructor_name for cdtors and
show ~ for dtor.
* class.c (build_self_reference): Use TYPE_NAME to get name of
self reference.
* name-lookup (constructor_name): Use DECL_NAME directly.
(constructor_name_p): Reimplement.
(push_class_level_binding_1): Use TYPE_NAME directly.

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

8 years ago * class.c (finish_struct): Use OVL_P.
nathan [Thu, 29 Jun 2017 14:28:24 +0000 (14:28 +0000)] 
* class.c (finish_struct): Use OVL_P.
(get_vfield_name): Measure constructor_name length.
* cp-tree.h (SET_CLASS_TYPE_P): Add RECORD_OR_UNION_CHECK.
(NON_UNION_CLASS_TYPE_P): Check RECORD_TYPE up front.
* cxx-pretty-print.c (is_destructor_name): Delete.
(pp_cxx_unqualified_id): Remove bogus destructor name checking.
* decl.c (grokfndecl): Move cheap checks first when looking for
implicit extern cness.

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

8 years ago * parser.c (cp_parser_direct_declarator): Reorder if to avoid
nathan [Thu, 29 Jun 2017 14:16:58 +0000 (14:16 +0000)] 
* parser.c (cp_parser_direct_declarator): Reorder if to avoid
indentation. Remove unnecessary assignment of constructor name.

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

8 years ago Whitespace cleanups.
nathan [Thu, 29 Jun 2017 14:13:11 +0000 (14:13 +0000)] 
Whitespace cleanups.
* call.c (name_as_c_string): Move CONST_CAST to return.
(build_new_method_call_1): Remove unneeded bracing.
* class.c (include_empty_classes): Unbreak line.
* constraint.cc (tsubst_check_constraint): Add space.
* cp-tree.h (lang_decl_ns): Add comment.
(PTRMEM_CST_MEMBER): Break line.
* decl.c (grokfndecl): Add blank lines. Unbreak some others.
(grokdeclarator): Remove lines, move declaration to first use.
* decl2.c (decl_needed_p): Fix indentation.
(c_parse_final_cleanups): Remove blank line.
* method.c (implicitly_declare_fn): Move declaration to first use.
* search.c (current_scope): Add blank lines.

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

8 years ago2017-06-29 Richard Biener <rguenther@suse.de>
rguenth [Thu, 29 Jun 2017 14:04:02 +0000 (14:04 +0000)] 
2017-06-29  Richard Biener  <rguenther@suse.de>

* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
reduction chains to LOOP_VINFO_REDUCTIONS.
* tree-vect-slp.c (vect_analyze_slp): Continue looking for
SLP reductions after processing reduction chains.

* gcc.dg/vect/slp-reduc-8.c: New testcase.

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