blob: a6a4011b54c3c2782eef5d088628d0919c81846d [file] [log] [blame]
2018-12-31 Max Filippov <jcmvbkbc@gmail.com>
PR target/86814
* config/xtensa/xtensa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
2018-12-31 Martin Liska <mliska@suse.cz>
* predict.c (set_even_probabilities): Include also
unlikely_count in calculation.
(combine_predictions_for_bb): Consider also HOT and
COLD labels predictions.
* predict.def (PRED_HOT_LABEL): Move it just after
__builtin_expect_with_probability predictor.
(PRED_COLD_LABEL): Likewise.
2018-12-30 Jan Hubicka <hubicka@ucw.cz>
* x86-tune.def: Enable inter_unit_moves_to_vec for generic.
2018-12-30 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>
* gimple-fold.c (get_range_strlen): Minor logic cleanup. Add comments
on code's intent.
* gimple-fold.c (strlen_range_kind): New enum.
(get_range_strlen): Update signature to use strlen_range_kind
instead of type+fuzzy.
(get_range_strlen_tree): Update signature to use
strlen_range_kind instead of type+fuzzy. Pass rkind down to
get_range_strlen. Check the rkind enum value instead of
type+fuzzy.
(get_range_strlen): Similarly.
(get_maxval_strlen): Update signature to make NONSTR argument have
a default value and make static. Add asserts to ensure sanity of
arguments. Update calls to get_range_strlen.
(gimple_fold_builtin_strcpy): Update calls to get_maxval_strlen.
(gimple_fold_builtin_strcat, gimple_fold_builtin_fputs): Similarly.
(gimple_fold_builtin_memory_chk): Similarly.
(gimple_fold_builtin_stxcpy_chk): Similarly.
(gimple_fold_builtin_snprintf_chk): Similarly.
(gimple_fold_builtin_sprintf, gimple_fold_builtin_snprintf): Similarly.
* gimple-fold.h (get_maxval_strlen): Delete prototype.
2018-12-29 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_attr): Warn when the critical and
interrupt function attributes are used together.
* gcc/doc/extend.texi: Update documentation on the critical attribute.
2018-12-29 John David Anglin <danglin@gcc.gnu.org>
* config.gcc (hppa*64*-*-linux*): Add pa/t-pa to tmake_file. Define
d_target_objs.
(hppa*-*-openbsd*): Likewise.
(hppa[12]*-*-hpux10*): Likewise.
(hppa*64*-*-hpux11*): Likewise.
(hppa[12]*-*-hpux11*): Likewise.
2018-12-29 Jakub Jelinek <jakub@redhat.com>
PR ipa/88586
* omp-low.c (lower_omp_task_reductions): Set DECL_CONTEXT on field
and ifield. Update TYPE_ALIGN from alignment of field, ifield or
bfield.
2018-12-28 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (ADDITIONAL_REGISTER_NAMES): Add
sil, dil, bpl and spl aliases.
2018-12-28 Martin Sebor <msebor@redhat.com>
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Avoid
undesirable warning.
2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
* omp-expand.c (expand_omp_target): Restructure OpenACC vs. OpenMP
code paths. Update for libgomp OpenACC entry points change.
2018-12-28 Thomas Schwinge <thomas@codesourcery.com>
Julian Brown <julian@codesourcery.com>
* gimplify.c (gimplify_scan_omp_clauses): Fix known_eq typo/bug.
2018-12-27 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (polymorphic_call_target_d): Add n_odr_types.
(polymorphic_call_target_hasher::hash): Hash it.
(polymorphic_call_target_hasher::equal): Compare it.
(possible_polymorphic_call_targets): Set it.
* tree.c (free_lang_data): Rebuild type inheritance graph even on
non-LTO path.
2018-12-27 Martin Liska <mliska@suse.cz>
PR gcov-profile/88225
* gcov.c(source_info::get_functions_at_location):
Use newly added line_to_function_map.
(source_info::add_function): New.
(output_json_intermediate_file): Use a pointer return
type for get_functions_at_location.
(process_all_functions): Use add_function instead
of direct push to a s->functions container.
(release_structures): Release ident_to_fn.
(read_graph_file): Register function into ident_to_fn.
(read_count_file): Use the map.
(output_lines): Handle pointer return type of
get_functions_at_location.
2018-12-27 Martin Liska <mliska@suse.cz>
* builtins.c (expand_movstr): Compare with RETURN_BEGIN.
* expr.c (move_by_pieces): Likewise.
(store_by_pieces): Likewise.
(store_expr): Fix GNU coding style.
2018-12-26 Andrew Pinski <apinski@marvell.com>
* config/aarch64/aarch64-cores.def (octeontx): New.
(octeontx81): Likewise.
(octeontx83): Likewise.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options) [mtune]: Add octeontx, octeontx81
and octeontx83.
2018-12-24 Martin Sebor <msebor@redhat.com>
* gimple-fold.c (get_range_strlen_tree): Factored out of
get_range_strlen. Minor comment updates/additions. Assert
argument is not a simple SSA_NAME.
(get_range_strlen): Call get_range_strlen_tree as appropriate.
Minor comment updates/additions.
2018-12-24 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (dump_targets): Cap number of targets printed.
(dump_possible_polymorphic_call_targets): Add verbose parameter.
(ipa_devirt): Use it.
* ipa-utils.h (dump_possible_polymorphic_call_targets): Add verbose
parametrs.
2018-12-24 Jan Hubicka <hubicka@ucw.cz>
PR lto/88140
* tree.c (fld_simplified_type): Temporarily disable array
simplification.
2018-12-24 Jan Hubicka <hubicka@ucw.cz>
* lto-symtab.c (lto_symtab_merge_decls_2): Do not report ODR violations
for method whose basetype was already reported.
* ipa-devirt.c (odr_type_violation_reported_p): New.
* ipa-utils.h (odr_type_violation_reported_p): Declare.
2018-12-24 Iain Sandoe <iain@sandoe.co.uk>
* configure.ac (dwarf2_debug_line): Check for the debug_line
section using otool when there’s no objdump available.
* configure: Regenerate.
2018-12-24 Jan Hubicka <hubicka@ucw.cz>
* ipa-utils.c (ipa_merge_profiles): Fix updating of fnsummary;
also handle rescaling of mismatched profiles.
* ipa-fnsummary.c (analyze_function): Handle speculative edges.
2018-12-23 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>
* builtins.h (c_strlen_data): Add new fields and comments.
* builtins.c (unterminated_array): Change field reference from
"len" to "minlen" in c_strlen_data instance.
* gimple-fold.c (get_range_strlen): Likewise.
* gimple-ssa-sprintf.c (get_string_length): Likewise.
* builtins.c (unterminated_array): Rename "data" to "lendata". Fix
a few comments.
(expand_builtin_strnlen, expand_builtin_stpcpy_1): Likewise.
(fold_builtin_strlen): Likewise.
* gimple-fold.c (get_range_strlen): Likewise. Also rename a couple
instances of "type" to "optype" and "arg" to "fld".
* builtins.c (unterminated_array): Use empty brace initialization
for c_strlen_data.
(c_strlen, expand_builtin_strnlen): Likewise.
(expand_builtin_stpcpy_1, fold_builtin_strlen): Likewise.
* gimple-fold.c (get_range_strlen): Likewise.
(gimple_fold_builtin_stpcpy): Likewise.
* gimple-ssa-sprintf.c (get_string_length): Likewise.
2018-12-23 Alan Modra <amodra@gmail.com>
PR 88346
* config/rs6000/rs6000.h (ASM_CPU_SPEC): Correct %e message. Handle
-mcpu=rs64, not -mcpu=rs64a. Handle -mcpu=powerpc64 and -mcpu=titan.
* config/rs6000/driver-rs6000.c (asm_names): Similarly.
* config/rs6000/aix71.h (ASM_CPU_SPEC): Delete %e message. Handle
-mcpu=rs64, not -mcpu=rs64a.
* config/rs6000/aix72.h (ASM_CPU_SPEC): Likewise.
2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
* lto-wrapper.c (tool_cleanup): Don’t report ficticious temp files.
(debug_objcopy): Improve temp filenames. Append the early
debug objects to the outfiles. Remove the phase prelinking the
early debug. Emit the early debug filenames for ld.
2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
* config/i386/darwin.h (TARGET_ASM_OUTPUT_IDENT): New.
2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
* collect2.c (maybe_run_lto_and_relink): Don’t say we have a temp file
unless we actually did some LTO.
(has_lto_section, is_lto_object_file): New.
(maybe_lto_object_file): Remove.
(scan_prog_file): Use is_lto_object_file() instead of scanning the
output of nm.
2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
* collect2.c (main): Parse the output file early so we can make nicer
temp names. Respond to “-save-temps” in the GCC OPTIONS.
(maybe_unlink): Don’t print “[Leaving…”] for files we never created
and don’t exist.
2018-12-23 Iain Sandoe <iain@sandoe.co.uk>
* collect2.c (main): Combine flags from both the command line and
COLLECT_GCC_OPTIONS to determine the set in force
2018-12-21 Jan Hubicka <hubicka@ucw.cz>
* ipa-utils.c (ipa_merge_profiles): Recompute summaries.
2018-12-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85594
PR middle-end/88553
* omp-expand.c (extract_omp_for_update_vars): Regimplify the condition
if needed.
(expand_omp_for_generic): Don't clobber t temporary for ordered loops.
2018-12-15 Jan Hubicka <hubicka@ucw.cz>
PR ipa/88561
* ipa-polymorphic-call.c
(ipa_polymorphic_call_context::ipa_polymorphic_call_context): Handle
arguments of thunks correctly.
(ipa_polymorphic_call_context::get_dynamic_context): Be ready for
NULL instance pinter.
* lto-cgraph.c (lto_output_node): Always stream thunk info.
2018-12-21 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/vector.md ("floatv2div2df2", "floatunsv2div2df2")
("fix_truncv2dfv2di2", "fixuns_truncv2dfv2di2"): New pattern
definitions.
2018-12-21 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/87727
* combine.c (cant_combine_insn_p): On a LEAF_REGISTERS target, combine
again moves from leaf hard registers.
* final.c (final_scan_insn_1) <NOTE_INSN_INLINE_ENTRY>: Minor tweak.
2018-12-21 Jakub Jelinek <jakub@redhat.com>
PR target/88522
* config/i386/sse.md (*avx512pf_gatherpf<mode>sf_mask,
*avx512pf_gatherpf<mode>df_mask, *avx512pf_scatterpf<mode>sf_mask,
*avx512pf_scatterpf<mode>df_mask): Use %X5 instead of %5 for
-masm=intel.
(gatherq_mode): Remove mode iterator.
(*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2): Use X instead
of <xtg_mode>.
(*avx512f_gatherdi<mode>): Use X instead of <gatherq_mode>.
(*avx512f_gatherdi<mode>_2, *avx512f_scattersi<mode>,
*avx512f_scatterdi<mode>): Use %X5 for -masm=intel.
PR rtl-optimization/88563
* expr.c (expand_expr_real_2) <case WIDEN_MULT_EXPR>: Swap innermode
and mode arguments to convert_modes. Likewise swap mode and word_mode
arguments. Handle both arguments with VOIDmode before convert_modes
of one of them. Formatting fixes.
2018-12-21 Uros Bizjak <ubizjak@gmail.com>
PR target/88556
* internal-fn.def (COSH): New.
(SINH): Ditto.
(TANH): Ditto.
* optabs.def (cosh_optab): New.
(sinh_optab): Ditto.
(tanh_optab): Ditto.
* config/i386/i386-protos.h (ix86_emit_i387_sinh): New prototype.
(ix86_emit_i387_cosh): Ditto.
(ix86_emit_i387_tanh): Ditto.
* config/i386/i386.c (ix86_emit_i387_sinh): New function.
(ix86_emit_i387_cosh): Ditto.
(ix86_emit_i387_tanh): Ditto.
* config/i386/i386.md (sinhxf2): New expander.
(sinh<mode>2): Ditto.
(coshxf2): Ditto.
(cosh<mode>2): Ditto.
(tanhxf2): Ditto.
(tanh<mode>2): Ditto.
2018-12-21 Jakub Jelinek <jakub@redhat.com>
PR target/88547
* config/i386/i386.c (ix86_expand_int_sse_cmp): Optimize
x > y ? 0 : -1 into min (x, y) == x ? -1 : 0.
2018-12-21 Jan Beulich <jbeulich@suse.com>
* config/i386/sse.md (vaesdec_<mode>, vaesdeclast_<mode>): Allow
memory input.
2018-12-21 Alexandre Oliva <oliva@adacore.com>
* config.gcc (tmake_file): Add name to tmake_file for
each @name in --with-multilib-list on arm-*-* targets.
* doc/install.texi (with-multilib-list): Document it.
2018-12-21 Jakub Jelinek <jakub@redhat.com>
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Use
DR_TARGET_ALIGNMENT on dr_info rather than dr. Spelling fixes.
2018-12-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Don't do
versioning for data accesses with misaligned step.
2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
PR c/51628
* doc/invoke.texi: Document -Wno-address-of-packed-member.
2018-12-20 Vladimir Makarov <vmakarov@redhat.com>
PR target/88457
* ira-color.c (fast_allocation): Choose the best cost hard reg.
2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/iterators.md (SVE_INT_UNARY, fp_int_op): Add abs.
(SVE_FP_UNARY): Sort.
2018-12-20 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64-sve.md (*cond_<optab><mode>_4): Use
sve_fmla_op rather than sve_fmad_op for the movprfx alternative.
2018-12-20 Martin Jambor <mjambor@suse.cz>
PR ipa/88214
* tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Assert that
ptr is a pointer.
2018-12-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/84362
* tree-ssa-loop-im.c: Include alias.h, builtins.h and tree-dfa.h.
(struct im_mem_ref): add ref_canonical flag.
(struct mem_ref_hasher): Use ao_ref as compare_type.
(mem_ref_hasher::equal): Adjust and add variant comparing ao_ref
parts.
(mem_ref_alloc): Take ao_ref parameter, initialize ref_canonical
member.
(gather_mem_refs_stmt): Set up ao_ref early and do the lookup
using it. If we have non-equal refs canonicalize the one
in the hashtable used for insertion.
(tree_ssa_lim_initialize): Adjust.
2018-12-20 Jakub Jelinek <jakub@redhat.com>
PR target/88547
* config/i386/i386.c (ix86_expand_sse_movcc): For maskcmp, try to
emit vpmovm2? instruction perhaps after knot?. Reorganize code
so that it doesn't have to test !maskcmp in almost every conditional.
2018-12-20 Alan Modra <amodra@gmail.com>
* config/rs6000/sysv4.h (GNU_USER_DYNAMIC_LINKER): Define.
2018-12-19 Andreas Tobler <andreast@gcc.gnu.org>
* config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on
aarch64*-*-freebsd*
2018-12-19 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (SWI1248_AVX512BWDQ_64): Rename from
SWI1248_AVX512BWDQ2_64. Unconditionally enable HImode.
(*cmp<mode>_ccz_1): Emit kortest instead of ktest insn.
Use SWI1248_AVX512BWDQ_64 mode iterator and enable only for
TARGET_AVX512F.
2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
* config/arm/elf.h: Update comment about condition that need to
match with libgcc/config/arm/lib1funcs.S to also include
libgcc/config/arm/t-arm.
* doc/sourcebuild.texi (output-exists, output-exists-not): Rename
subsubsection these directives are in to "Check for output files".
Move scan-symbol to that section and add to it new scan-symbol-not
directive.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (PTX_CTA_SIZE): Define.
2018-12-19 Tom de Vries <tdevries@suse.de>
* omp-offload.c (oacc_fn_attrib_level): Remove static.
* omp-offload.h (oacc_fn_attrib_level): Declare.
2018-12-19 Tom de Vries <tdevries@suse.de>
* omp-offload.c (oacc_get_default_dim): New function.
* omp-offload.h (oacc_get_default_dim): Declare.
2018-12-19 David Malcolm <dmalcolm@redhat.com>
PR c++/87504
* gcc-rich-location.c
(maybe_range_label_for_tree_type_mismatch::get_text): Move here from
c/c-typeck.c.
(binary_op_rich_location::binary_op_rich_location): New ctor.
(binary_op_rich_location::use_operator_loc_p): New function.
* gcc-rich-location.h
(class maybe_range_label_for_tree_type_mismatch)): Move here from
c/c-typeck.c.
(struct op_location_t): New forward decl.
(class binary_op_rich_location): New class.
* tree.h (struct op_location_t): New struct.
2018-12-19 David Malcolm <dmalcolm@redhat.com>
PR c++/43064
PR c++/43486
* convert.c: Include "selftest.h".
(preserve_any_location_wrapper): New function.
(convert_to_pointer_maybe_fold): Update to handle location
wrappers.
(convert_to_real_maybe_fold): Likewise.
(convert_to_integer_1): Strip expr when using TREE_OVERFLOW.
Handle location wrappers when checking for INTEGER_CST.
(convert_to_integer_maybe_fold): Update to handle location
wrappers.
(convert_to_complex_maybe_fold): Likewise.
(selftest::test_convert_to_integer_maybe_fold): New functions.
(selftest::convert_c_tests): New function.
* convert.h (preserve_any_location_wrapper): New decl.
* fold-const.c (size_binop_loc): Strip location wrappers when
using TREE_OVERFLOW.
(operand_equal_p): Strip any location wrappers.
(integer_valued_real_p): Strip any location wrapper.
* selftest-run-tests.c (selftest::run_tests): Call
selftest::convert_c_tests.
* selftest.h (selftest::convert_c_tests): New decl.
* tree.c (build_complex): Assert that REAL and IMAG are constants.
(integer_zerop): Look through location wrappers.
(integer_onep): Likewise.
(integer_each_onep): Likewise.
(integer_all_onesp): Likewise.
(integer_minus_onep): Likewise.
(integer_pow2p): Likewise.
(integer_nonzerop): Likewise.
(integer_truep): Likewise.
(fixed_zerop): Likewise.
(real_zerop): Likewise.
(real_onep): Likewise.
(real_minus_onep): Likewise.
(tree_int_cst_equal): Likewise.
(simple_cst_equal): Treat location wrappers with non-equal source
locations as being unequal.
(uniform_integer_cst_p): Look through location wrappers.
(maybe_wrap_with_location): Don't create wrappers if any
auto_suppress_location_wrappers are active.
(suppress_location_wrappers): New variable.
(selftest::test_predicates): New test.
(selftest::tree_c_tests): Call it.
* tree.h (CONSTANT_CLASS_OR_WRAPPER_P): New macro.
(suppress_location_wrappers): New decl.
(class auto_suppress_location_wrappers): New class.
2018-12-19 Paul A. Clarke <pc@us.ibm.com>
* config/rs6000/tmmintrin.h (_mm_hadds_epi16): Vector lanes swapped.
(_mm_hsub_epi32): Likewise.
(_mm_shuffle_epi8): Fix reversed interpretation of parameters.
(_mm_shuffle_pi8): Likewise.
(_mm_addubs_pi16): Likewise.
2018-12-19 Thomas Preud'homme <thomas.preudhomme@linaro.org>
* config/arm/arm.h (TARGET_HARD_FLOAT): Restrict to TARGET_32BIT
targets.
* config/arm/arm.c (output_return_instruction): Only check
TARGET_HARD_FLOAT to decide whether FP instructions are available.
2018-12-19 Tom de Vries <tom@codesourcery.com>
* doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
dump files): Add offload-rtl.
2018-12-19 Segher Boessenkool <segher@kernel.crashing.org>
PR target/88213
* config/rs6000/vsx.md (*vsx_extract_<P:mode>_<VSX_D:mode>_load):
Require TARGET_POWERPC64.
2018-12-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/88533
Revert
2018-04-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/28364
PR tree-optimization/85275
* tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
copying first exit test.
* tree-ssa-loop-ch.c: Include tree-phinodes.h and
ssa-iterators.h.
(should_duplicate_loop_header_p): Track whether stmt compute
loop invariants or values based on IVs. Apart from the
original loop header only duplicate blocks with exit tests
that are based on IVs or invariants.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_gen_shared_bcast, shared_prop_gen)
(nvptx_goacc_expand_accel_var): Use MAX and ROUND_UP.
(nvptx_assemble_value, nvptx_output_skip): Use MIN.
(nvptx_shared_propagate, nvptx_single, nvptx_expand_shared_addr): Use
MAX.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_gen_wcast): Rename as
nvptx_gen_warp_bcast.
(nvptx_gen_wcast): Rename to nvptx_gen_shared_bcast, add bool
vector argument, and update call to nvptx_gen_shared_bcast.
(propagator_fn): Add bool argument.
(nvptx_propagate): New bool argument, pass bool argument to fn.
(vprop_gen): Rename to warp_prop_gen, update call to
nvptx_gen_warp_bcast.
(nvptx_vpropagate): Rename to nvptx_warp_propagate, update call to
nvptx_propagate.
(wprop_gen): Rename to shared_prop_gen, update call to
nvptx_gen_shared_bcast.
(nvptx_wpropagate): Rename to nvptx_shared_propagate, update call
to nvptx_propagate.
(nvptx_wsync): Rename to nvptx_cta_sync.
(nvptx_single): Update calls to nvptx_gen_warp_bcast,
nvptx_gen_shared_bcast and nvptx_cta_sync.
(nvptx_process_pars): Likewise.
(write_worker_buffer): Rename as write_shared_buffer.
(nvptx_file_end): Update calls to write_shared_buffer.
(nvptx_expand_worker_addr): Rename as nvptx_expand_shared_addr.
(nvptx_expand_builtin): Update call to nvptx_expand_shared_addr.
(nvptx_get_worker_red_addr): Rename as nvptx_get_shared_red_addr.
(nvptx_goacc_reduction_setup): Update call to
nvptx_get_shared_red_addr.
(nvptx_goacc_reduction_fini): Likewise.
(nvptx_goacc_reduction_teardown): Likewise.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (worker_bcast_size): Rename as
oacc_bcast_size.
(worker_bcast_align): Rename as oacc_bcast_align.
(worker_bcast_sym): Rename as oacc_bcast_sym.
(nvptx_option_override): Update usage of oacc_bcast_*.
(struct wcast_data_t): Rename as broadcast_data_t.
(nvptx_gen_wcast): Update type of data argument and usage of
oacc_bcast_align.
(wprop_gen): Update type of data_ and usage of oacc_bcast_align.
(nvptx_wpropagate): Update type of data and usage of
oacc_bcast_{sym,size}.
(nvptx_single): Update type of data and usage of oacc_bcast_size.
(nvptx_file_end): Update usage of oacc_bcast_{sym,align,size}.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.md (nvptx_barsync): Add and handle operand.
* config/nvptx/nvptx.c (nvptx_wsync): Update call to gen_nvptx_barsync.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_single): Always pass false to
nvptx_wsync.
(nvptx_process_pars): Likewise.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_previous_fndecl): Declare.
(nvptx_set_current_function): New function.
(TARGET_SET_CURRENT_FUNCTION): Define.
2018-12-19 Shaokun Zhang <zhangshaokun@hisilicon.com>
* config/aarch64/aarch64-cores.def (tsv110): Fix architecture. This
part is really Armv8.2 with some permitted Armv8.4 extensions.
2018-12-19 Jakub Jelinek <jakub@redhat.com>
PR target/88541
* config/i386/vpclmulqdqintrin.h (_mm256_clmulepi64_epi128): Enable
for -mavx -mvpclmulqdq rather than just for -mavx512vl -mvpclmulqdq.
2018-12-19 Alexandre Oliva <aoliva@redhat.com>
PR testsuite/86153
PR middle-end/83239
* vr-values.c
(vr_values::vrp_evaluate_conditional_warnv_with_ops): Extend
simplification of overflow tests to cover cases in which we
can determine the result of the comparison.
2018-12-19 Bin Cheng <bin.cheng@linux.alibaba.com>
* auto-profile.c (afdo_indirect_call): Skip generating histogram
value if we can't find cgraph_node for then indirected callee. Save
profile_id of the cgraph_node in histogram value's first counter.
* value-prof.c (gimple_value_profile_transformations): Don't skip
for flag_auto_profile.
2018-12-18 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/87759
* lra-assigns.c (lra_split_hard_reg_for): Recalculate
non_reload_pseudos.
2018-12-18 Jakub Jelinek <jakub@redhat.com>
PR target/88464
* config/i386/i386-builtin-types.def
(VOID_FTYPE_PDOUBLE_QI_V8SI_V4DF_INT,
VOID_FTYPE_PFLOAT_QI_V4DI_V8SF_INT,
VOID_FTYPE_PLONGLONG_QI_V8SI_V4DI_INT,
VOID_FTYPE_PINT_QI_V4DI_V8SI_INT,
VOID_FTYPE_PDOUBLE_QI_V4SI_V2DF_INT,
VOID_FTYPE_PFLOAT_QI_V2DI_V4SF_INT,
VOID_FTYPE_PLONGLONG_QI_V4SI_V2DI_INT,
VOID_FTYPE_PINT_QI_V2DI_V4SI_INT): New builtin types.
* config/i386/i386.c (enum ix86_builtins): Add
IX86_BUILTIN_SCATTERALTSIV4DF, IX86_BUILTIN_SCATTERALTDIV8SF,
IX86_BUILTIN_SCATTERALTSIV4DI, IX86_BUILTIN_SCATTERALTDIV8SI,
IX86_BUILTIN_SCATTERALTSIV2DF, IX86_BUILTIN_SCATTERALTDIV4SF,
IX86_BUILTIN_SCATTERALTSIV2DI and IX86_BUILTIN_SCATTERALTDIV4SI.
(ix86_init_mmx_sse_builtins): Fix up names of IX86_BUILTIN_GATHERALT*,
IX86_BUILTIN_GATHER3ALT* and IX86_BUILTIN_SCATTERALT* builtins to
match the IX86_BUILTIN codes. Build IX86_BUILTIN_SCATTERALTSIV4DF,
IX86_BUILTIN_SCATTERALTDIV8SF, IX86_BUILTIN_SCATTERALTSIV4DI,
IX86_BUILTIN_SCATTERALTDIV8SI, IX86_BUILTIN_SCATTERALTSIV2DF,
IX86_BUILTIN_SCATTERALTDIV4SF, IX86_BUILTIN_SCATTERALTSIV2DI and
IX86_BUILTIN_SCATTERALTDIV4SI decls.
(ix86_vectorize_builtin_scatter): Expand those new builtins.
2018-12-18 Bill Schmidt <wschmidt@linux.ibm.com>
* doc/extend.texi (PowerPC Altivec/VSX Built-in Functions):
Describe when a typedef name can be used as the type specifier for
a vector type, and when it cannot.
2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.h: Define TARGET_VTABLE_ENTRY_ALIGN.
2018-12-18 Jakub Jelinek <jakub@redhat.com>
PR target/88513
PR target/88514
* optabs.def (vec_pack_sbool_trunc_optab, vec_unpacks_sbool_hi_optab,
vec_unpacks_sbool_lo_optab): New optabs.
* optabs.c (expand_widen_pattern_expr): Use vec_unpacks_sbool_*_optab
and pass additional argument if both input and target have the same
scalar mode of VECTOR_BOOLEAN_TYPE_P vectors.
* expr.c (expand_expr_real_2) <case VEC_PACK_TRUNC_EXPR>: Handle
VECTOR_BOOLEAN_TYPE_P pack where result has the same scalar mode
as the operands using vec_pack_sbool_trunc_optab.
* tree-vect-stmts.c (supportable_widening_operation): Use
vec_unpacks_sbool_{lo,hi}_optab for VECTOR_BOOLEAN_TYPE_P conversions
where both wider_vectype and vectype have the same scalar mode.
(supportable_narrowing_operation): Similarly use
vec_pack_sbool_trunc_optab if narrow_vectype and vectype have the same
scalar mode.
* config/i386/i386.c (ix86_get_builtin)
<case IX86_BUILTIN_GATHER3ALTDIV8SF>: Check for VECTOR_MODE_P
rather than non-VOIDmode.
* config/i386/sse.md (vec_pack_trunc_qi, vec_pack_trunc_<mode>):
Remove useless ()s around "register_operand", formatting fixes.
(vec_pack_sbool_trunc_qi, vec_unpacks_sbool_lo_qi,
vec_unpacks_sbool_hi_qi): New expanders.
* doc/md.texi (vec_pack_sbool_trunc_M, vec_unpacks_sbool_hi_M,
vec_unpacks_sbool_lo_M): Document.
2018-12-18 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* combine.c (update_rsp_from_reg_equal): Only look for the nonzero bits
of src in nonzero_bits_mode if the mode of src is MODE_INT and
HWI_COMPUTABLE.
(reg_nonzero_bits_for_combine): Add clarification to comment.
2018-12-18 Wei Xiao <wei3.xiao@intel.com>
* config/i386/driver-i386.c (host_detect_local_cpu): Detect cascadelake.
* config/i386/i386.c (fold_builtin_cpu): Handle cascadelake.
* doc/extend.texi: Add cascadelake.
2018-12-17 Peter Bergner <bergner@linux.ibm.com>
PR target/87870
* config/rs6000/vsx.md (nW): New mode iterator.
(vsx_mov<mode>_64bit): Use it. Remove redundant GPR 0/-1 alternative.
Update length attribute for (<??r>, <nW>) alternative.
(vsx_mov<mode>_32bit): Likewise.
2018-12-17 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (PTX_VECTOR_LENGTH, PTX_WORKER_LENGTH,
PTX_DEFAULT_RUNTIME_DIM): Move to the top of the file.
2018-12-17 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (PTX_WARP_SIZE): Define.
(nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH.
2018-12-17 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_single): Fix whitespace.
(nvptx_neuter_pars): Likewise.
2018-12-17 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Work around Fortran
bug PR72741 by overriding dims parameter for routines.
2018-12-17 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Rewrite using
predicate vars.
2018-12-17 Steve Ellcey <sellcey@cavium.com>
* config/aarch64/aarch64-protos.h (aarch64_use_simple_return_insn_p):
New prototype.
(aarch64_epilogue_uses): Ditto.
* config/aarch64/aarch64.c (aarch64_attribute_table): New array.
(aarch64_simd_decl_p): New function.
(aarch64_reg_save_mode): New function.
(aarch64_function_ok_for_sibcall): Check for simd calls.
(aarch64_layout_frame): Check for simd function.
(aarch64_gen_storewb_pair): Handle E_TFmode.
(aarch64_push_regs): Use aarch64_reg_save_mode to get mode.
(aarch64_gen_loadwb_pair): Handle E_TFmode.
(aarch64_pop_regs): Use aarch64_reg_save_mode to get mode.
(aarch64_gen_store_pair): Handle E_TFmode.
(aarch64_gen_load_pair): Ditto.
(aarch64_save_callee_saves): Handle different mode sizes.
(aarch64_restore_callee_saves): Ditto.
(aarch64_components_for_bb): Check for simd function.
(aarch64_epilogue_uses): New function.
(aarch64_process_components): Check for simd function.
(aarch64_expand_prologue): Ditto.
(aarch64_expand_epilogue): Ditto.
(aarch64_expand_call): Ditto.
(aarch64_use_simple_return_insn_p): New function.
(TARGET_ATTRIBUTE_TABLE): New define.
* config/aarch64/aarch64.h (EPILOGUE_USES): Redefine.
(FP_SIMD_SAVED_REGNUM_P): New macro.
* config/aarch64/aarch64.md (simple_return): New define_expand.
(load_pair_dw_tftf): New instruction.
(store_pair_dw_tftf): Ditto.
(loadwb_pair<TX:mode>_<P:mode>): Ditto.
(storewb_pair<TX:mode>_<P:mode>): Ditto.
2018-12-17 Uros Bizjak <ubizjak@gmail.com>
PR target/88502
* internal-fn.def (ACOSH): New.
(ASINH): Ditto.
(ATANH): Ditto.
* optabs.def (acosh_optab): New.
(asinh_optab): Ditto.
(atanh_optab): Ditto.
* config/i386/i386-protos.h (ix86_emit_i387_asinh): New prototype.
(ix86_emit_i387_acosh): Ditto.
(ix86_emit_i387_atanh): Ditto.
* config/i386/i386.c (ix86_emit_i387_asinh): New function.
(ix86_emit_i387_acosh): Ditto.
(ix86_emit_i387_atanh): Ditto.
* config/i386/i386.md (asinhxf2): New expander.
(asinh<mode>2): Ditto.
(acoshxf2): Ditto.
(acosh<mode>2): Ditto.
(atanhxf2): Ditto.
(atanh<mode>2): Ditto.
2018-12-17 David Edelsohn <dje.gcc@gmail.com>
* config.gcc (powerpc-ibm-aix6.*): Delete extra_headers.
(powerpc-ibm-aix7.1.*): Same.
(powerpc-ibm-aix[789].*): Same.
2018-12-17 H.J. Lu <hongjiu.lu@intel.com>
PR debug/79342
* dwarf2out.c (find_AT_string_in_table): Add insert argument
defaulting to INSERT and replace INSERT.
(find_AT_string): Likewise.
(output_macinfo_op): Pass NO_INSERT to find_AT_string.
2018-12-15 Jan Hubicka <hubicka@ucw.cz>
* coverage.c (struct conts_entry): Add n_counts.
(remap_counts_file): Record number of ocunts.
(get_coverage_counts): Verify that counts match.
* coverage.h (get_coverage_counts): Update prototype.
* profile.c (get_exec_counts. compute_value_histograms): Add
n_counts parametrs.
2018-12-17 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com>
PR rtl-optimization/88253
* combine.c (combine_simplify_rtx): Test for side-effects before
substituting by zero.
2018-12-17 Richard Sandiford <richard.sandiford@arm.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* doc/invoke.texi (-fversion-loops-for-strides): Document
(loop-versioning-group-size, loop-versioning-max-inner-insns)
(loop-versioning-max-outer-insns): Document new --params.
* Makefile.in (OBJS): Add gimple-loop-versioning.o.
* common.opt (fversion-loops-for-strides): New option.
* opts.c (default_options_table): Enable fversion-loops-for-strides
at -O3.
* params.def (PARAM_LOOP_VERSIONING_GROUP_SIZE)
(PARAM_LOOP_VERSIONING_MAX_INNER_INSNS)
(PARAM_LOOP_VERSIONING_MAX_OUTER_INSNS): New parameters.
* passes.def: Add pass_loop_versioning.
* timevar.def (TV_LOOP_VERSIONING): New time variable.
* tree-ssa-propagate.h
(substitute_and_fold_engine::substitute_and_fold): Add an optional
block parameter.
* tree-ssa-propagate.c
(substitute_and_fold_engine::substitute_and_fold): Likewise.
When passed, only walk blocks dominated by that block.
* tree-vrp.h (range_includes_p): Declare.
(range_includes_zero_p): Turn into an inline wrapper around
range_includes_p.
* tree-vrp.c (range_includes_p): New function, generalizing...
(range_includes_zero_p): ...this.
* tree-pass.h (make_pass_loop_versioning): Declare.
* gimple-loop-versioning.cc: New file.
2018-12-15 Jan Hubicka <hubicka@ucw.cz>
* ipa-fnsummary.c (remap_edge_change_prob): Do not ICE when changes
are not streamed in.
2018-12-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/88483
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Revert
reversion 267133.
2018-12-15 Jan Hubicka <hubicka@ucw.cz>
* ipa-fnsummary.c (analyze_function_body): Do not loeak conds and
size_time_table.
(ipa_fn_summary_generate): Add prevails parameter; do not allocate
data when symbol is not prevailing.
(inline_read_section): Likewise.
2018-12-15 Jan Hubicka <hubicka@ucw.cz>
* cgraph.h (cgraph_node): Add predicate prevailing_p.
(cgraph_edge): Add predicate possible_call_in_translation_unit_p.
* ipa-prop.c (ipa_write_jump_function): Optimize streaming of ADDR_EXPR.
(ipa_read_jump_function): Add prevails parameter; optimize streaming.
(ipa_read_edge_info): Break out from ...
(ipa_read_node_info): ... here; optimize streaming.
* cgraph.c (cgraph_edge::possibly_call_in_translation_unit_p): New
predicate.
2018-12-15 Jan Hubicka <hubicka@ucw.cz>
* ipa-utils.c (ipa_merge_profiles): Do no merging when source function
has zero count.
2018-12-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88464
PR target/88498
* tree-vect-stmts.c (vect_build_gather_load_calls): For NARROWING
and mask with integral masktype, don't try to permute mask vectors,
instead emit VEC_UNPACK_{LO,HI}_EXPR. Fix up NOP_EXPR operand.
(vectorizable_store): Handle masked scatters with decl and integral
mask type.
(permute_vec_elements): Allow scalar_dest to be NULL.
* config/i386/i386.c (ix86_get_builtin)
<case IX86_BUILTIN_GATHER3ALTDIV16SF>: Use lowpart_subreg for masks.
<case IX86_BUILTIN_GATHER3ALTDIV8SF>: Don't assume mask and src have
to be the same.
2018-12-15 Jan Hubicka <hubicka@ucw.cz>
* ipa.c (cgraph_build_static_cdtor_1): Add OPTIMIZATION and TARGET
parameters.
(cgraph_build_static_cdtor): Update.
(build_cdtor): Use OPTIMIZATION and TARGET of the first real cdtor
callsed.
2018-12-15 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (generate_set_vrsave, rs6000_emit_savres_rtx),
(rs6000_emit_prologue, rs6000_call_aix, rs6000_call_sysv),
(rs6000_call_darwin_1): Use gen_hard_reg_clobber.
2018-12-15 Jakub Jelinek <jakub@redhat.com>
PR target/88489
* config/i386/sse.md (UNSPEC_SFIXUPIMM): New unspec enumerator.
(avx512f_sfixupimm<mode><mask_name><round_saeonly_name>): Use it
instead of UNSPEC_FIXUPIMM.
PR rtl-optimization/88478
* cselib.c (cselib_record_sets): Move sets[i].src_elt tests
after REG_P (dest) test.
2018-12-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/88372
* calls.c (maybe_warn_alloc_args_overflow): Handle function pointers.
* tree-object-size.c (alloc_object_size): Same. Simplify.
* doc/extend.texi (Object Size Checking): Update.
(Other Builtins): Add __builtin_object_size.
(Common Type Attributes): Add alloc_size.
(Common Variable Attributes): Ditto.
2018-12-14 Martin Sebor <msebor@redhat.com>
PR rtl-optimization/87096
* gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Avoid
folding calls whose bound may exceed INT_MAX. Diagnose bound ranges
that exceed the limit.
2018-12-14 Martin Sebor <msebor@redhat.com>
PR web/79738
* doc/extend.texi (attribute const, pure): Clarify.
2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (rest_of_insert_endbranch): Insert ENDBR
at the function entry only when -mmanual-endbr isn't used or
there is cf_check function attribute.
(ix86_attribute_table): Add cf_check.
* config/i386/i386.opt: Add -mmanual-endbr.
* doc/extend.texi: Document cf_check attribute.
* doc/invoke.texi: Document -mmanual-endbr.
2018-12-14 Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
* omp-offload.c (inform_oacc_loop): New function.
(execute_oacc_device_lower): Use it to display loop parallelism.
2018-12-14 Jakub Jelinek <jakub@redhat.com>
PR c++/82294
PR c++/87436
* expr.h (categorize_ctor_elements): Add p_unique_nz_elts argument.
* expr.c (categorize_ctor_elements_1): Likewise. Compute it like
p_nz_elts, except don't multiply it by mult. Adjust recursive call.
Fix up COMPLEX_CST handling.
(categorize_ctor_elements): Add p_unique_nz_elts argument, initialize
it and pass it through to categorize_ctor_elements_1.
(mostly_zeros_p, all_zeros_p): Adjust categorize_ctor_elements callers.
* gimplify.c (gimplify_init_constructor): Likewise. Don't force
ctor into readonly data section if num_unique_nonzero_elements is
smaller or equal to 1/8 of num_nonzero_elements and size is >= 64
bytes.
2018-12-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/arm/arm.md (arm_movdi): Split if -mslow-flash-data and
source is a constant that would be loaded by literal pool.
(movsf expander): Generate a no_literal_pool_sf_immediate insn if
-mslow-flash-data is present, targeting hardfloat ABI and source is a
float constant that cannot be loaded via vmov.
(movdf expander): Likewise but generate a no_literal_pool_df_immediate
insn.
(arm_movsf_soft_insn): Split if -mslow-flash-data and source is a
float constant that would be loaded by literal pool.
(softfloat constant movsf splitter): Splitter for the above case.
(movdf_soft_insn): Split if -mslow-flash-data and source is a float
constant that would be loaded by literal pool.
(softfloat constant movdf splitter): Splitter for the above case.
* config/arm/constraints.md (Pz): Document existing constraint.
(Ha): Define constraint.
(Tu): Likewise.
* config/arm/predicates.md (hard_sf_operand): New predicate.
(hard_df_operand): Likewise.
* config/arm/thumb2.md (thumb2_movsi_insn): Split if
-mslow-flash-data and constant would be loaded by literal pool.
* constant/arm/vfp.md (thumb2_movsi_vfp): Likewise and disable constant
load in VFP register.
(movdi_vfp): Likewise.
(thumb2_movsf_vfp): Use hard_sf_operand as predicate for source to
prevent match for a constant load if -mslow-flash-data and constant
cannot be loaded via vmov. Adapt constraint accordingly by
using Ha instead of E for generic floating-point constant load.
(thumb2_movdf_vfp): Likewise using hard_df_operand predicate instead.
(no_literal_pool_df_immediate): Add a clobber to use as the
intermediate general purpose register and also enable it after reload
but disable it constant is a valid FP constant. Add constraints and
generate a DI intermediate load rather than 2 SI loads.
(no_literal_pool_sf_immediate): Add a clobber to use as the
intermediate general purpose register and also enable it after
reload.
2018-12-14 Uros Bizjak <ubizjak@gmail.com>
PR target/88474
* internal-fn.def (HYPOT): New.
* optabs.def (hypot_optab): New.
* config/i386/i386.md (hypot<mode>3): New expander.
2018-12-14 Jeff Law <law@redhat.com>
* target.def (post_cfi_startproc): Fix text.
2018-12-14 Sam Tebbs <sam.tebbs@arm.com>
* doc/tm.texi (TARGET_ASM_POST_CFI_STARTPROC): Define.
* doc/tm.texi.in (TARGET_ASM_POST_CFI_STARTPROC): Define.
* dwarf2out.c (dwarf2out_do_cfi_startproc): Trigger the hook.
* hooks.c (hook_void_FILEptr_tree): Define.
* hooks.h (hook_void_FILEptr_tree): Define.
* target.def (post_cfi_startproc): Define.
2018-12-14 Tom de Vries <tdevries@suse.de>
* lto-cgraph.c (verify_node_partition): New function.
(input_overwrite_node, input_varpool_node): Use verify_node_partition.
2018-12-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/88483
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
use get_frame_size ().
2018-12-14 Andrew Stubbs <ams@codesourcery.com>
* gcc/lra-int.h (lra_register_new_scratch_op): Add third parameter.
* gcc/lra-remat.c (update_scratch_ops): Pass icode to
lra_register_new_scratch_op.
* gcc/lra.c (struct sloc): Add icode field.
(lra_register_new_scratch_op): Add icode parameter.
Use icode to skip insns that have changed beyond recognition.
2018-12-14 Eric Botcazou <ebotcazou@adacore.com>
* dwarf2out.c (analyze_discr_in_predicate): Simplify.
(analyze_variants_discr): Deal with naked boolean discriminants.
2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_restore_callee_milli) Don't clobber off
variable.
2018-12-14 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.h (reg_class): Add SIBCALL_REGS.
2018-12-14 Richard Biener <rguenther@suse.de>
* gimple-ssa-split-paths.c (is_feasible_trace): Remove
duplicated code block.
2018-12-14 Alan Modra <amodra@gmail.com>
PR rtl-optimization/88311
* config/rs6000/rs6000.c (rs6000_call_sysv): Do not mask cookie.
(rs6000_sibcall_sysv): Likewise.
2018-12-14 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/88001
* function.c (match_asm_constraints_1): Don't invalidly share RTL.
2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
* auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
if autofdo counts are all zeros.
2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
* auto-profile.c (afdo_indirect_call): Skip generating histogram
value for internal call.
2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
* auto-profile.c (AFDO_EINFO): New macro.
(class edge_info): New class.
(is_edge_annotated, set_edge_annotated): Delete.
(afdo_propagate_edge, afdo_propagate_circuit, afdo_propagate): Remove
parameter. Adjust edge count computation and annotation using class
edge_info.
(afdo_calculate_branch_prob, afdo_annotate_cfg): Likewise.
2018-12-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
* ipa-cp.c (print_all_lattices): Skip cp clones.
* ipa-cp.c: Fix various comment typos.
2018-12-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88444
* tree-inline.c (fold_marked_statements): Iterate up to
last_basic_block_for_fn rather than n_basic_blocks_for_fn.
PR rtl-optimization/88470
* cfgcleanup.c (outgoing_edges_match): If the function is
shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake
edge to EXIT, return false.
2018-12-13 Martin Sebor <msebor@redhat.com>
* doc/extend.texi: Consistently use @code for const and volatile
qualifiers, the true and false constants, and asm statements.
2018-12-13 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/88414
* lra-int.h (lra_asm_error_p): New.
* lra-assigns.c (lra_assign): Check lra_asm_error_p for checking
call crossed pseudo assignment correctness.
(lra_split_hard_reg_for): Set up lra_asm_error_p.
* lra-constraints.c (curr_insn_transform): Ditto.
* lra.c (lra_asm_error_p): New.
(lra): Reset lra_asm_error_p.
2018-12-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88416
* valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
even if !AUTO_INC_DEC.
2018-12-13 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/rs6000.c (rs6000_function_arg): Ensure type is
non-NULL.
(rs6000_arg_partial_bytes): Same.
2018-12-13 Jason Merrill <jason@redhat.com>
* gdbinit.in (pp): New macro.
(pbb): Remove.
2018-12-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88464
* tree-vect-stmts.c (vect_build_gather_load_calls): Handle INTEGER_TYPE
masktype if mask is non-NULL.
(vectorizable_load): Don't reject masked gather loads if masktype
in the decl is INTEGER_TYPE.
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtins.def (s390_vec_double_s64): Map to
s390_vec_double_s64 instead of s390_vcdgb.
(s390_vec_double_u64): Map to s390_vec_double_u64 instead of
s390_vcdlgb.
2018-12-13 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64")
("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT.
("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT.
2018-12-13 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* doc/invoke.texi (-msve-vector-bits): Clarify -msve-vector-bits=128
behavior.
2018-12-13 Wei Xiao <wei3.xiao@intel.com>
* common/config/i386/i386-common.c (processor_names): Add cascadelake.
(processor_alias_table): Add cascadelake.
* config.gcc: Add -march=cascadelake.
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
cascadelake.
* config/i386/i386.c (Add m_CASCADELAKE): New.
(processor_cost_table): Add cascadelake.
(get_builtin_code_for_version): Handle cascadelake.
* config/i386/i386.h (TARGET_CASCADELAKE, PROCESSOR_CASCADELAKE): New.
(PTA_CASCADELAKE): Ditto.
* doc/invoke.texi: Add -march=cascadelake.
2018-12-13 Jakub Jelinek <jakub@redhat.com>
PR target/88465
* config/i386/i386.md (*movdi_internal, *movsi_internal,
*movhi_internal, *movqi_internal): Add alternative(s) to load
0 or -1 into k registers using kxor or kxnoq instructions.
PR target/88461
* config/i386/sse.md (VI1248_AVX512VLBW, AVX512ZEXTMASK): New
mode iterators.
(<avx512>_testm<mode>3<mask_scalar_merge_name>,
<avx512>_testnm<mode>3<mask_scalar_merge_name>): Merge patterns
with VI12_AVX512VL and VI48_AVX512VL iterators into ones with
VI1248_AVX512VLBW iterator.
(*<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext,
*<avx512>_testm<VI1248_AVX512VLBW:mode>3_zext_mask,
*<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext,
*<avx512>_testnm<VI1248_AVX512VLBW:mode>3_zext_mask): New
define_insns.
PR target/88461
* config/i386/i386.md (*zero_extendsidi2, zero_extend<mode>di2,
*zero_extend<mode>si2, *zero_extendqihi2): Add =*k, *km alternatives.
2018-12-12 Tom de Vries <tdevries@suse.de>
Jakub Jelinek <jakub@redhat.com>
* omp-builtins.def (BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME): Fix up
function types - remove one argument.
2018-12-12 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (attribute copy): Fix typos.
2018-12-12 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (Function Attributes): Clarify C++ aspects.
(Variable Attributes): Same.
(Type Attributes): Same.
2018-12-12 Olivier Hainque <hainque@adacore.com>
* config/aarch64/aarch64.c (aarch64_override_options): Once arch,
cpu and tune were validated, insert SUBTARGET_OVERRIDE_OPTIONS if
defined.
2018-12-12 Olivier Hainque <hainque@adacore.com>
* config/aarch64/aarch64.c (PROBE_STACK_FIRST_REG) : Redefine as
R9_REGNUM instead of 9.
(PROBE_STACK_SECOND_REG): Redefine as R10_REGNUM instead of 10.
2018-12-12 Eric Botcazou <ebotcazou@adacore.com>
PR target/86806
* config/sparc/sparc.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
(speculation_barrier): New instruction for V9.
2018-12-12 Segher Boessenkool <segher@kernel.crashing.org>
Iain Sandoe <iain@sandoe.co.uk>
PR target/88343
* config/rs6000/rs6000.c (save_reg_p): Do not save the picbase reg
unless it has been used.
(first_reg_to_save): Remove dead code.
2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/rs6000-protos.h (rs6000_call_darwin): New.
(rs6000_sibcall_darwin): New. (macho_call_template): Remove.
* config/rs6000/rs6000.c (get_prev_label): Forward declaration.
(rs6000_call_template_1): Handle Darwin.
(macho_call_template): Remove.
(rs6000_call_sysv): Remove handling for Darwin.
(rs6000_call_darwin_1, rs6000_call_darwin): New
(rs6000_sibcall_darwin): New.
* config/rs6000/rs6000.md (define_expand “call”): Handle Darwin
with its own expander. (define_expand “call_value”): Likewise.
(define_expand “sibcall”): Likewise.
(define_expand “sibcall_value”): Likewise.
(call_nonlocal_sysv): Remove Darwin special-casing.
(call_value_nonlocal_sysv): Likewise.
2018-12-12 Iain Sandoe <iain@sandoe.co.uk>
* config/rs6000/darwin.md (call_indirect_nonlocal_darwin64): Remove.
(call_nonlocal_darwin64): Remove.
(call_value_indirect_nonlocal_darwin64): Remove.
(call_value_nonlocal_darwin64): Remove.
* config/rs6000/rs6000.c (rs6000_call_template_1): Handle Darwin with
the same asm output as AIX/ELFv2. (rs6000_call_sysv): Preserve the
CALL_LONG flag when needed for Darwin.
* config/rs6000/rs6000.md (define expand “call”): Expand Darwin as
per sysv.
(define_expand “call_value”): Likewise.
(define_expand “sibcall”): Likewise.
(define_expand “sibcall_value”): Likewise.
(call_indirect_nonlocal_sysv): Mark the clobber mode P.
(call_nonlocal_sysv): Likewise.
(call_nonlocal_sysv_secure): Likewise.
(call_value_indirect_nonlocal_sysv): Likewise.
(call_value_nonlocal_sysv): Likewise.
(call_value_nonlocal_sysv_secure): Likewise.
(call_local64): Mark the clobber DI.
(call_value_local64): Likewise.
2018-12-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88444
* tree-vrp.c (register_edge_assert_for_2): Only register assertions
for conversions if rhs1 is a SSA_NAME.
2018-12-11 Dimitar Dimitrov <dimitar@dinux.eu>
* cfgexpand.c (asm_clobber_reg_is_valid): Also produce
error when stack pointer is clobbered.
(expand_asm_stmt): Refactor clobber check in separate function.
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
* config/rs6000/vxworks.h (RS6000_STARTING_FRAME_OFFSET): Define,
accounting for STACK_BOUNDARY 128.
(STACK_DYNAMIC_OFFSET): Likewise.
2018-12-11 Jakub Jelinek <jakub@redhat.com>
PR target/88425
* config/i386/i386.md (*x86_mov<SWI48:mode>cc_0_m1_neg_leu<SWI:mode>):
New define_insn_and_split.
2018-12-11 Richard Biener <rguenther@suse.de>
PR middle-end/88448
PR middle-end/88415
* gimple.c (gimple_assign_set_rhs_with_ops): Revert previous
change.
* tree-complex.c (update_complex_assignment): Properly transfer
or clean EH info around gimple_assign_set_rhs_with_ops.
2018-12-11 Richard Earnshaw <rearnsha@arm.com>
PR target/87369
* config/aarch64/iterators.md (sizem1): Add sizes for SFmode and DFmode.
(Vbtype): Add SFmode mapping.
* config/aarch64/aarch64.md (copysigndf3, copysignsf3): Delete.
(copysign<GPF:mode>3): New expand pattern.
(copysign<GPF:mode>3_insn): New insn pattern.
2018-12-11 Richard Biener <rguenther@suse.de>
* ccmp.c (ccmp_candidate_p): Use GIMPLE API properly.
2018-12-11 Jakub Jelinek <jakub@redhat.com>
PR lto/86004
* doc/sourcebuild.texi (lto_incremental): Document new effective
target.
2018-12-11 Segher Boessenkool <segher@kernel.crashing.org>
PR target/88145
* config/rs6000/rs6000.c (rs6000_expand_zeroop_builtin): Use
rs6000_isa_flags instead of rs6000_isa_flags_explicit to decide
whether soft float is enabled.
(rs6000_expand_mtfsb_builtin): Ditto.
(rs6000_expand_set_fpscr_rn_builtin): Ditto.
(rs6000_expand_set_fpscr_drn_builtin): Ditto.
2018-12-10 Jeff Law <law@redhat.com>
PR tree-optimization/80520
* gimple-ssa-split-paths.c (is_feasible_trace): Recognize half
diamonds that are likely if convertable.
2018-12-10 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86196
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
base size only of arrays.
2018-12-10 Segher Boessenkool <segher@kernel.crashing.org>
* config.gcc (Obsolete configurations): Delete powerpc*-*-*spe*.
(Unsupported targets): Add powerpc*-*-*spe*.
(powerpc*-*-*spe*): Delete.
(powerpc-*-eabispe*): Delete.
(powerpc-*-rtems*spe*): Delete.
(powerpc*-*-linux*spe*): Delete.
(powerpc*-*-linux*): Do not handle the linux*spe* targets.
(powerpc-wrs-vxworks*spe): Delete.
(with_cpu setting code): Delete powerpc*-*-*spe* handling.
* config.host (target powerpc*-*-*spe*): Delete.
* doc/invoke.texi (PowerPC SPE Options): Delete.
(PowerPC SPE Options): Delete.
* config/powerpcspe: Delete.
2018-12-10 Uros Bizjak <ubizjak@gmail.com>
PR target/88418
* config/i386/i386.c (ix86_expand_sse_cmp): For vector modes,
check operand 1 with vector_operand predicate.
(ix86_expand_sse_movcc): For vector modes, check op_true with
vector_operand, not nonimmediate_operand.
2018-12-10 Richard Biener <rguenther@suse.de>
* tree-affine.c (tree_to_aff_combination): Remove unreachable
MEM_REF case.
(aff_combination_expand): Cache on SSA names, not possibly
on conversion trees. Avoid expanding cases we do not handle.
2018-12-10 Richard Biener <rguenther@suse.de>
PR tree-optimization/88427
* vr-values.c (vr_values::extract_range_from_phi_node):
Handle symbolic ranges conservatively when trying to drop
to Inf +- 1.
2018-12-10 Martin Jambor <mjambor@suse.cz>
PR ipa/88214
* ipa-prop.c (determine_locally_known_aggregate_parts): Make sure
we check pointers against pointers.
2018-12-10 Richard Biener <rguenther@suse.de>
PR middle-end/88415
* gimple.c (gimple_assign_set_rhs_with_ops): Transfer EH
info to a newly allocated stmt.
2018-12-10 Jerome Lambourg <lambourg@adacore.com>
* config/vxworksae.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): Define.
2018-12-10 Fredrik Nyström <fredrik@lysator.liu.se>
PR bootstrap/65725
* config/sol2.h: Only use libgcc-unwind.map if
ENABLE_SHARED_LIBGCC.
2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
* auto-profile.c (afdo_calculate_branch_prob): Convert profile_count
to afdo precision quality.
(afdo_callsite_hot_enough_for_early_inline): Likewise.
(afdo_annotate_cfg): Set profile_count for exit basic block.
2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com>
* auto-profile.c (string_table::get_index_by_decl)
(function_instance::get_function_instance_by_decl): Avoid infinite
recursion by using DECL_FROM_INLINE.
2018-12-09 John David Anglin <danglin@gcc.gnu.org>
* config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define
d_target_objs.
* config/pa/pa-protos.h (pa_d_target_versions): New prototype.
* config/pa/pa.h (TARGET_D_CPU_VERSIONS): Define.
* config/pa/pa-d.c: New file.
* config/pa/t-pa: New file.
2018-12-08 Bin Cheng <bin.cheng@linux.alibaba.com>
* ipa-cp.c (update_profiling_info): Call adjust_for_ipa_scaling for
zero profile count.
2018-12-08 Jakub Jelinek <jakub@redhat.com>
PR fortran/88304
* tree-nested.c (convert_local_reference_stmt): Handle clobbers where
lhs is not a decl normally, don't call use_pointer_in_frame on that
lhs.
2018-12-08 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/88390
* dwarf2cfi.c (struct dw_cfi_row): Add window_save field.
(cfi_row_equal_p): Compare it.
(dwarf2out_frame_debug_cfa_window_save): Add FAKE parameter.
If FAKE is false, set window_save of the current row.
(dwarf2out_frame_debug) <REG_CFA_TOGGLE_RA_MANGLE>: Call above
function with FAKE parameter set to true.
<REG_CFA_WINDOW_SAVE>: Likewise but with FAKE parameter set to false.
(change_cfi_row): Emit a DW_CFA_GNU_window_save if necessary.
2018-12-07 Peter Bergner <bergner@linux.ibm.com>
PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble and -mabi=ibmlongdouble without -mlong-double-128.
Do not error for -mabi=ibmlongdouble and no ISA 2.06 support.
* doc/invoke.texi: Document -mabi=ibmlongdouble and -mabi=ieeelongdouble
require -mlong-double-128.
2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_tuning_override_functions): Add
sve_width entry.
(aarch64_parse_sve_width_string): Define.
2018-12-07 Jeff Law <law@redhat.com>
PR middle-end/87813
* gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Add
m_update_global_ranges member. Add corresponding argument to ctor.
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::evrp_range_analyzer): Add new argument and
initialize m_update_global_ranges.
(evrp_range_analyzer::set_ssa_range_info): Assert that we are
updating global ranges.
(evrp_range_analyzer::record_ranges_from_incoming_edge): Only
update global ranges if explicitly requested.
(evrp_range_analyzer::record_ranges_from_phis): Similarly.
(evrp_range_analyzer::record_ranges_from_stmt): Similarly.
* gimple-ssa-evrp.c (evrp_dom_walker): Pass new argument to
evrp_range_analyzer ctor.
* gimple-ssa-sprintf.c (sprintf_dom_walker): Similarly.
* tree-ssa-dom.c (dom_opt_dom_walker): Similarly.
2018-12-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum):
Add SVE_NOT_IMPLEMENTED value.
* config/aarch64/aarch64-protos.h (struct tune_params): Add sve_width
field.
* config/aarch64/aarch64.c (generic_tunings,cortexa35_tunings,
cortexa53_tunings, cortexa57_tunings, cortexa72_tunings,
cortexa73_tunings, exynosm1_tunings, thunderx_tunings,
thunderx_tunings, tsv110_tunings, xgene1_tunings, qdf24xx_tunings,
saphira_tunings, thunderx2t99_tunings, emag_tunings):
Specify sve_width.
(aarch64_estimated_poly_value): Define.
(TARGET_ESTIMATED_POLY_VALUE): Define.
2018-12-07 Paul A. Clarke <pc@us.ibm.com>
PR target/88408
* config/rs6000/mmintrin.h (_mm_packs_pu16): Correctly use "__vector".
2018-12-07 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/88349
* ira-costs.c (record_operand_costs): Check bigger reg class on
NO_REGS.
2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64-sve.md (*mul<mode>3, *v<optab><mode>3):
Split the patterns after reload if we don't need the predicate
operand.
(*post_ra_mul<mode>3, *post_ra_v<optab><mode>3): New patterns.
2018-12-07 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/iterators.md (SVE_UNPRED_FP_BINARY): New code
iterator.
(sve_fp_op): Handle minus and mult.
* config/aarch64/aarch64-sve.md (*add<mode>3, *sub<mode>3)
(*mul<mode>3): Split the patterns after reload if we don't
need the predicate operand.
(*post_ra_<sve_fp_op><mode>3): New pattern.
2018-12-07 Bin Cheng <bin.cheng@linux.alibaba.com>
* profile-count.h (profile_count::oeprator>=): Fix typo by inverting
return condition when *this is precise zero.
2018-12-07 Jakub Jelinek <jakub@redhat.com>
PR target/85593
* final.c (rest_of_handle_final): Don't call collect_fn_hard_reg_usage
for functions with naked attribute.
PR c/88367
* tree-vrp.c (extract_range_from_binary_expr): For POINTER_PLUS_EXPR
with -fno-delete-null-pointer-checks, set_nonnull only if the pointer
is non-NULL and offset is known to have most significant bit clear.
* vr-values.c (vr_values::vrp_stmt_computes_nonzero): For ADDR_EXPR
of MEM_EXPR, return true if the MEM_EXPR has non-zero offset with
most significant bit clear. If offset does have most significant bit
set and -fno-delete-null-pointer-checks, don't return true even if
the base pointer is non-NULL.
2018-12-06 Alexandre Oliva <aoliva@redhat.com>
* cselib.c (cselib_record_sets): Skip strict low part sets
with NULL src_elt.
2018-12-06 Paul A. Clarke <pc@us.ibm.com>
PR target/88316
* config/rs6000/smmintrin.h: New file.
* config.gcc: Add smmintrin.h to extra_headers for powerpc*-*-*.
2018-12-06 Paul A. Clarke <pc@us.ibm.com>
PR target/88316
* config/rs6000/mmintrin.h (_mm_unpackhi_pi8): Fix for big-endian.
(_mm_unpacklo_pi8): Likewise.
(_mm_mulhi_pi16): Likewise.
(_mm_packs_pi16): Fix for big-endian. Use preferred API.
(_mm_packs_pi32): Likewise.
(_mm_packs_pu16): Likewise.
* config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix for big-endian.
(_mm_cvtss_si64): Likewise.
(_mm_cvtpi32x2_ps): Likewise.
(_mm_shuffle_ps): Likewise.
(_mm_movemask_pi8): Likewise.
(_mm_mulhi_pu16): Likewise.
(_mm_sad_pu8): Likewise.
(_mm_sad_pu8): Likewise.
(_mm_cvtpu16_ps): Fix for big-endian. Use preferred API.
(_mm_cvtpu8_ps): Likewise.
(_mm_movemask_ps): Better #else case for big-endian (no functional
change).
(_mm_shuffle_pi16): Likewise.
* config/rs6000/emmintrin.h (_mm_movemask_pd): Fix for big-endian.
Better #else case for big-endian (no functional change).
(_mm_movemask_epi8): Likewise.
(_mm_shufflehi_epi16): Likewise.
(_mm_shufflelo_epi16): Likewise.
(_mm_shuffle_epi32): Likewise.
(_mm_mul_epu32): Fix for big-endian.
(_mm_bsrli_si128): Likewise.
(_mm_cvtps_pd): Better #else case for big endian.
(_mm_mulhi_epi16): Likewise.
(_mm_mul_epu32): Likewise.
(_mm_slli_si128): Likewise.
(_mm_sll_epi16): Likewise.
(_mm_sll_epi32): Likewise.
(_mm_sra_epi16): Likewise.
(_mm_sra_epi32): Likewise.
(_mm_srl_epi16): Likewise.
(_mm_srl_epi32): Likewise.
(_mm_mulhi_epu16): Likewise.
(_mm_sad_epu8): Likewise.
* config/rs6000/pmmintrin.h (_mm_hadd_ps): Fix for big-endian.
(_mm_sub_ps): Likewise.
* config/rs6000/mmintrin.h (_mm_cmpeq_pi8): Fix for 32-bit mode.
* gcc/config/rs6000/tmmintrin.h (_mm_alignr_epi8): Use ENDIAN
macros consistently (no functional changes).
(_mm_alignr_pi8): Likewise.
2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
PR c++/87380
* config/darwin.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC) Remove, use the
default.
* config/rs6000/darwin7.h (TARGET_WEAK_NOT_IN_ARCHIVE_TOC): New.
2018-12-06 Vladimir Makarov <vmakarov@redhat.com>
PR target/88282
* ira.c (ira_init_register_move_cost): Use info from
hard_regno_mode_ok instead of contains_reg_of_mode.
* ira-costs.c (contains_reg_of_mode): Don't use cost from bigger
hard register class for some fixed hard registers.
2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
* doc/extend.texi (Using Assembly Language with C): Document asm inline.
(Size of an asm): Fix typo. Document asm inline.
* gimple-pretty-print.c (dump_gimple_asm): Handle asm inline.
* gimple.h (enum gf_mask): Add GF_ASM_INLINE.
(gimple_asm_set_volatile): Fix typo.
(gimple_asm_inline_p): New.
(gimple_asm_set_inline): New.
* gimplify.c (gimplify_asm_expr): Propagate the asm inline flag from
tree to gimple.
* ipa-icf-gimple.c (func_checker::compare_gimple_asm): Compare the
gimple_asm_inline_p flag, too.
* tree-core.h (tree_base): Document that protected_flag is ASM_INLINE_P
in an ASM_EXPR.
* tree-inline.c (estimate_num_insns): If gimple_asm_inline_p return
a minimum size for an asm.
* tree.h (ASM_INLINE_P): New.
2018-12-06 Segher Boessenkool <segher@kernel.crashing.org>
PR inline-asm/55681
* doc/extend.texi (Basic Asm): Update grammar.
(Extended Asm): Update grammar.
2018-12-06 Iain Sandoe <iain@sandoe.co.uk>
PR target/78444
* config/i386/darwin.h (STACK_BOUNDARY): Remove macro.
* config/i386/i386.c (ix86_compute_frame_layout): Ensure at least 128b
stack alignment in non-leaf functions.
2018-12-06 Jakub Jelinek <jakub@redhat.com>
PR target/87598
* config/aarch64/aarch64.c (aarch64_print_address_internal): Don't
call output_operand_lossage on VOIDmode CONST_INTs. After
output_operand_lossage do return false.
2018-12-06 Richard Biener <rguenther@suse.de>
* df-problems.c (df_rd_local_compute): Use bitmap_release.
(df_live_free): Likewise.
(df_md_local_compute): Likewise.
(df_md_free): Release df_md_scratch bitmap.
* loop-invariant.c (calculate_loop_reg_pressure): Use
bitmap_release.
* sched-deps.c (true_dependency_cache, output_dependency_cache,
anti_dependency_cache, control_dependency_cache,
spec_dependency_cache): Use bitmap instead of bitmap_head *.
* sched-ebb.c (schedule_ebbs_init): Initialize non-GTY
dont_calc_deps as bitmap allocated from obstack not GC.
(schedule_ebbs_finish): Use bitmap_release.
* sched-rgn.c (schedule_insns): Initialize non-GTY
not_in_df as bitmap allocated from obstack not GC.
Use bitmap_release.
* sel-sched.c (_forced_ebb_heads): Remove premature optimization.
(sel_region_init): Allocate forced_ebb_heads.
(sel_region_finish): Free forced_ebb_heads.
2018-12-06 Richard Biener <rguenther@suse.de>
* bitmap.c (bitmap_head::crashme): Define.
* bitmap.h (bitmap_head): Add constexpr default constructor
poisoning the obstack member.
(bitmap_head::crashme): Declare.
(bitmap_release): New function clearing a bitmap and poisoning
the obstack member.
* gengtype.c (main): Make it recognize CONSTEXPR.
* lra-constraints.c (lra_inheritance): Use bitmap_release
instead of bitmap_clear.
* ira.c (ira): Work around class-memaccess warning.
* regrename.c (create_new_chain): Likewise.
2018-12-06 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85726
* generic-match-head.c (optimize_successive_divisions_p): New function.
* gimple-match-head.c (optimize_successive_divisions_p): Likewise.
* match.pd: Don't combine successive divisions if they aren't exact
and optimize_successive_divisions_p is false.
PR fortran/88304
* tree-nested.c (convert_nonlocal_reference_stmt): Remove clobbers
for non-local automatic decls.
2018-12-05 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/aix72.h (ASM_DEFAULT_SPEC): Match Power7 processor
default.
2018-12-05 Uros Bizjak <ubizjak@gmail.com>
* dwarf2out.c (field_byte_offset): Remove
#ifdef PCC_BITFIELD_TYPE_MATTERS check.
2018-12-05 Richard Biener <rguenther@suse.de>
Martin Sebor <msebor@redhat.com>
PR c/87028
* calls.c (get_attr_nonstring_decl): Avoid setting *REF to
SSA_NAME_VAR.
* gcc/gimple-low.c (lower_stmt): Fold builtin calls here.
* gimplify (maybe_fold_stmt): Avoid folding builtin calls.
2018-12-05 Iain Sandoe <iain@sandoe.co.uk>
* configure.ac (gcc_cv_otool): Set.
* configure: Regenerate.
2018-12-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/cygming.h (PCC_BITFIELD_TYPE_MATTERS): Remove.
(GROUP_BITFIELDS_BY_ALIGN): Ditto.
2018-12-05 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/88064
* tree-vect-patterns.c (vect_convert_input): Convert the result of
an existing cast if it has the right width but the wrong sign.
Do not test the signedness of the required result when
considering whether to split an existing cast; instead split to
a type with the same signedness as the source of the cast, then
convert it to the opposite signedness where necessary.
(vect_recog_over_widening_pattern): Handle sign changes between
the final PLUS_EXPR and the RSHIFT_EXPR.
(vect_recog_average_pattern): Use an unsigned operation when
truncating an addition, subtraction or multiplication. Cast the
result back to the "real" signedness before promoting.
2018-12-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/86637
* tree-vectorizer.c (pass_slp_vectorize::execute): Reset
vect_location at the end.
2018-12-05 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87360
* gimple-loop-jam.c (tree_loop_unroll_and_jam): On failure to analyze
data dependencies, don't return false, just continue. Formatting
fixes.
(merge_loop_tree, bb_prevents_fusion_p, unroll_jam_possible_p,
fuse_loops): Formatting fixes.
PR sanitizer/88333
* cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
* config.gcc (csky-*-linux-gnu*): Force .init_array support.
2018-12-05 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
aggregate handling on actual AIX, not on somewhat similar systems.
(rs6000_arg_partial_bytes): Ditto.
2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/88317
* lra-constraints.c (split_reg): Don't set up check_only_regs if
we are outside the inheritance pass.
2018-12-04 Jan Hubicka <hubicka@ucw.cz>
* ipa-prop.c (jump_function_useful_p): New.
(ipa_read_node_info): Do not allocated useless jump functions.
2018-12-04 David Malcolm <dmalcolm@redhat.com>
PR c/82967
* spellcheck.c (selftest::test_suggestions): Add another assertion.
2018-12-04 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (__builtin_has_attribute): Fix typo.
2018-12-04 Jakub Jelinek <jakub@redhat.com>
PR target/88188
* config/rs6000/rs6000.c (ccr_bit): Return -1 instead of assertion
failures.
(print_operand): Use REG_P instead of GET_CODE == REG.
<case 'D'>: Also check CR_REGNO_P (REGNO (x)).
<case 't'>: Likewise. Remove GET_MODE check.
* config/rs6000/rs6000.md (scc patterns): Assert ccr_bit didn't
return -1.
2018-12-04 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (attribute aligned): Expand.
2018-12-04 David Edelsohn <dje.gcc@gmail.com>
PR target/61976
* config/rs6000/rs6000.c (rs6000_function_arg): Don't pass aggregates
in FPRs on AIX.
(rs6000_arg_partial_bytes): Same.
2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
PR target/88282
* ira-costs.c (exec): Try bigger class to use smaller register
move cost.
2018-12-04 Michael Ploujnikov <michael.ploujnikov@oracle.com>
PR ipa/88297
* ipa-cp.c (create_specialized_node): Track clone counters by
node assembler names.
(ipcp_driver): Change type of clone_num_suffixes key to const char*.
2018-12-04 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vect_transform_loop): Fix epilogue iterations
for epilogue vectorization.
2018-12-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/88301
* tree-vrp.c (register_edge_assert_for_2): Fix sign-conversion
issues in last commit.
2018-12-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/88315
* tree-vect-loop.c (get_initial_defs_for_reduction): Simplify
and fix initialization vector for SAD and DOT_PROD SLP reductions.
2018-12-03 Sandra Loosemore <sandra@codesourcery.com>
PR c/59039
* doc/extend.texi (Nonlocal gotos): New section.
2018-12-03 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md (vec_concatv2df): Change (v,xm,C)
alternative to (v,vm,c).
2018-12-03 Segher Boessenkool <segher@kernel.crashing.org>
* gcc/config.gcc (Unsupported targets): Add powerpc*-*-linux*paired*.
(powerpc*-*-linux*): Don't handle it here.
2018-12-03 Jeff Law <law@redhat.com>
* config/h8300/h8300.md (<code>qi3_1): Add gcc_unreachable to keep
warnings quiet.
* config/h8300/h8300.md (low byte masking peepholes): Only accept
nonimmediate_operand for the to-be-masked operand.
2018-12-03 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
allow expected function-pointer cast re-instantiation.
2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
* common/config/s390/s390-common.c (s390_option_init_struct):
Use section anchors by default.
* config/s390/s390.c (s390_check_symref_alignment): Handle
anchors.
(TARGET_MAX_ANCHOR_OFFSET): Use short displacement.
* output.h (assemble_align): Pass `align' as unsigned int, so
that the value 0x80000000, which corresponds to `aligned(1 <<
28)', would pass the `align > BITS_PER_UNIT' check.
* varasm.c (assemble_align): Likewise.
2018-12-03 Julian Brown <julian@codesourcery.com>
* tree-pretty-print.c (dump_omp_clause): Make default case
gcc_unreachable.
2018-12-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/88301
* tree-vrp.c (register_edge_assert_for_2): Handle conversions
that do not change the value by registering the same assert
for the operand.
2018-12-03 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vect_transform_loop): Properly compute
upper bound for the epilogue when doing epilogue vectorization.
2018-12-03 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/80080
* cfgcleanup.c (class pass_postreload_jump): New pass.
(pass_postreload_jump::execute): Likewise.
(make_pass_postreload_jump): Likewise.
* passes.def: Add pass_postreload_jump before
pass_postreload_cse.
* tree-pass.h (make_pass_postreload_jump): New pass.
2018-12-02 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (inline_memory_move_cost): Correctly
compute number of TFmode GPR moves.
2018-12-02 Jakub Jelinek <jakub@redhat.com>
PR target/88278
* config/i386/sse.md (*vec_concatv4sf_0, *vec_concatv4si_0): New insns.
2018-12-02 Jeff Law <law@redhat.com>
* config/h8300/h8300.md (call, call_value): Drop mode from
operand containing number of bytes pushed.
(call_insn, call_value_insn): Use mode iterator for number
of bytes pushed operand. Make pattern name vary appropriately.
2018-12-02 Jan Hubicka <jh@suse.cz>
* bb-reorer.c (find_rarely_executed_basic_blocks_and_crossin_edges):
trust precise profiles.
2018-12-02 Jakub Jelinek <jakub@redhat.com>
* tree-nested.c (convert_nonlocal_omp_clauses,
convert_local_omp_clauses): Handle OMP_CLAUSE_IN_REDUCTION,
OMP_CLAUSE_TASK_REDUCTION and OMP_CLAUSE__SIMT_ clauses.
(convert_nonlocal_reference_stmt, convert_local_reference_stmt):
Convert clauses for GIMPLE_OMP_TASKGROUP.
* omp-low.c (check_omp_nesting_restrictions): Allow cancel or
cancellation point with taskgroup clause inside of taskloop. Consider
a taskloop construct without nogroup clause as implicit taskgroup for
diagnostics if cancel/cancellation point with taskgroup clause is
closely nested inside of taskgroup region.
PR sanitizer/88291
* asan.c (asan_clear_shadow): Move assert that len is multiple of 4
to the start of the function.
(asan_emit_stack_protection): When emitting clearing sequence for
epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
add last_size_aligned which is last_size padded to multiples of
ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
boundaries.
2018-12-01 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/88289
* asan.c (asan_redzone_buffer::flush_redzone_payload): Fix up
an off-by-one for BYTES_BIG_ENDIAN.
PR target/54589
* combine.c (find_split_point): For invalid memory address
nonobj + obj + const, if reg + obj + const is valid addressing
mode, split at nonobj. Use if rather than else if for the
fallback. Comment fixes.
2018-11-30 Indu Bhagat <indu.bhagat@oracle.com>
* coverage.c (get_coverage_counts): Use from_function_decl for precise
function location.
* profile-count.c (profile_count::dump): Add handling for precise
profile quality.
* profile.c (compute_branch_probabilities): Rely on exec_counts instead
of profile_info to set profile_status of function.
(branch_prob): Do not set profile_status of function based on
profile_info. Done above based on exec_counts.
2018-11-30 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88274
* tree-ssa-reassoc.c (optimize_range_tests_xor,
optimize_range_tests_diff): If type has smaller precision than
corresponding mode or if it has non-standard min/max, compute
everything in a standard type for the precision.
PR testsuite/85368
* params.def (PARAM_LOGICAL_OP_NON_SHORT_CIRCUIT): New param.
* tree-ssa-ifcombine.c (ifcombine_ifandif): If
--param logical-op-non-short-circuit is present, override
LOGICAL_OP_NON_SHORT_CIRCUIT value from the param.
* fold-const.c (fold_range_test, fold_truth_andor): Likewise.
2018-11-30 Jeff Law <law@redhat.com>
* optabs.c (expand_binop): Use "machine_mode" rather than
"enum machine mode" in most recent change.
2018-11-30 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/64242
* builtins.c (expand_builtin_longjmp): Use a temporary when restoring
the frame pointer.
(expand_builtin_nonlocal_goto): Likewise.
2018-11-30 David Malcolm <dmalcolm@redhat.com>
* diagnostic-core.h (emit_diagnostic): New decl.
* diagnostic.c (emit_diagnostic): New overload, taking a
rich_location *.
2018-11-30 David Malcolm <dmalcolm@redhat.com>
* pretty-print.c (class selftest::test_pretty_printer): New
subclass of pretty_printer.
(selftest::test_prefixes_and_wrapping): New test.
(selftest::pretty_print_c_tests): Call it.
2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
Minimize clone counter memory usage in create_virtual_clone.
* cgraph.h (clone_function_name): Add a variant that takes a
tree decl.
* cgraph.h (cgraph_node::create_virtual_clone): Add a new
argument: num_suffix.
* cgraphclones.c (cgraph_node::create_virtual_clone): Pass
num_suffix to clone_function_name.
(clone_function_name): Add a variant that takes a tree decl.
* ipa-cp.c (create_specialized_node): Keep track of clone
counters in clone_num_suffixes hash map.
(ipcp_driver): Free the counter hash map.
* ipa-hsa.c (process_hsa_functions): Creates at most one hsa
clone per function.
2018-11-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
Make function assembly more independent.
This is achieved by having clone_function_name assign unique clone
numbers for each function independently.
* cgraphclones.c: Replaced clone_fn_id_num with clone_fn_ids;
hash map.
(clone_function_name_numbered): Use clone_fn_ids.
2018-11-30 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/88179
* lra-constraints.c (address_eliminator::address_eliminator):
Don't eleminate regs in illegitimate address.
2018-11-30 David Malcolm <dmalcolm@redhat.com>
PR preprocessor/88257
* input.c (get_substring_ranges_for_loc): Fix indentation.
Bulletproof against getting a different files back from
linemap_resolve_location and expand_location_to_spelling_point.
2018-11-30 Alexander Monakov <amonakov@ispras.ru>
PR gcov-profile/88279
* tree-profile.c (init_ic_make_global_vars): Call
decl_default_tls_model for variable and not it's type.
2018-11-30 Sam Tebbs <sam.tebbs@arm.com>
* config/arm/arm.h (TARGET_DOTPROD): Add TARGET_VFP5 constraint.
2018-11-30 Martin Liska <mliska@suse.cz>
PR sanitizer/81715
* asan.c (asan_shadow_cst): Remove, partially transform
into flush_redzone_payload.
(RZ_BUFFER_SIZE): New.
(struct asan_redzone_buffer): New.
(asan_redzone_buffer::emit_redzone_byte): Likewise.
(asan_redzone_buffer::flush_redzone_payload): Likewise.
(asan_redzone_buffer::flush_if_full): Likewise.
(asan_emit_stack_protection): Use asan_redzone_buffer class
that is responsible for proper aligned stores and flushing
of shadow memory payload.
* asan.h (ASAN_MIN_RED_ZONE_SIZE): New.
(asan_var_and_redzone_size): Likewise.
* cfgexpand.c (expand_stack_vars): Use smaller alignment
(ASAN_MIN_RED_ZONE_SIZE) in order to make shadow memory
for automatic variables more compact.
2018-11-30 Alan Modra <amodra@gmail.com>
* config/rs6000/predicates.md (easy_fp_constant): Avoid long
dependent insn sequences.
* config/rs6000/rs6000.c (num_insns_constant): Support long
double constants.
* config/rs6000/rs6000.md (mov<mode>_softfloat <FMOVE128>): Adjust
length attribute.
2018-11-30 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (num_insns_constant_gpr): Renamed from
num_insns_constant_wide. Make static. Revise comment.
(num_insns_constant_multi): New function.
(num_insns_constant): Formatting. Correct CONST_WIDE_INT
calculation. Simplify and extract code common to both
CONST_INT and CONST_DOUBLE. Add gcc_unreachable for unhandled
const_double modes.
* config/rs6000/rs6000-protos.h (num_insns_const_wide): Delete.
2018-11-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/88274
* tree-vrp.c (ranges_from_anti_range): Fix handling of
TYPE_MIN/MAX_VALUE.
2018-11-29 Andi Kleen <ak@linux.intel.com>
* config/i386/i386.c (current_fentry_section): Add.
(x86_function_profiler): Handle fentry section.
(ix86_attribute_table): Add fentry section.
* config/i386/i386.opt: Add -mfentry-section.
* doc/extend.texi: Document fentry_section attribute.
* doc/invoke.texi: Document -mfentry-section.
2018-11-29 Andi Kleen <ak@linux.intel.com>
* config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
(current_fentry_name): Add.
(x86_function_profiler): Handle fentry_name attribute.
(ix86_handle_fentry_name): Add.
(ix86_attribute_table): Add fentry_name.
* config/i386/i386.opt: Add -mfentry-name
* doc/extend.texi: Document fentry_name.
* doc/invoke.texi: Document minstrument-return.
2018-11-29 Andi Kleen <ak@linux.intel.com>
* config/i386/i386-opts.h (enum instrument_return): Add.
* config/i386/i386.c (output_return_instrumentation): Add.
(ix86_output_function_return): Call output_return_instrumentation.
(ix86_output_call_insn): Call output_return_instrumentation.
* config/i386/i386.opt: Add -minstrument-return=.
* doc/invoke.texi (-minstrument-return): Document.
2018-11-29 Eric Botcazou <ebotcazou@adacore.com>
PR target/87807
* config/sparc/sparc-modes.def: Minor tweak.
* config/sparc/sparc.c: Minor reordering.
(sparc_pass_by_reference): Move around.
(traverse_record_type): Change offset from HOST_WIDE_INT to int.
(classify_registers): Likewise for bitpos.
(function_arg_slotno): Remove dead test and tweak comments.
<MODE_RANDOM>: Remove useless assertion and test whether the
parameter is named in order to pass it in FP registers. Return
the regno for floating-point vector types.
(compute_int_layout): Change bitpos from HOST_WIDE_INT to int.
(compute_fp_layout): Likewise.
(count_registers): Likewise.
(assign_int_registers): Likewise.
(assign_fp_registers): Likewise.
(assign_registers): Likewise.
(function_arg_record_value): Change size from HOST_WIDE_INT to int
and use CEIL_NWORDS to compute the number of registers.
(function_arg_union_value): Minor tweaks.
(function_arg_vector_value): Add slotno and named parameters, use
CEIL_NWORDS to compute the number of registers.
(sparc_function_arg_1): Rework handling of vector types. Change
size from HOST_WIDE_INT to int.
(sparc_arg_partial_bytes): Rework handling of 32-bit ABI and deal
with vector types for the 64-bt ABI.
(sparc_function_arg_advance): Likewise.
(sparc_return_in_memory): Add reference to -fpcc-struct-return.
(sparc_struct_value_rtx): Return NULL_RTX instead of 0.
(sparc_function_value_1): Rework handling of vector types. Change
size from HOST_WIDE_INT to int.
2018-11-29 Jakub Jelinek <jakub@redhat.com>
PR target/88152
* config/i386/sse.md (*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_lt,
*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_lt,
*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_shift,
*<sse>_movmsk<ssemodesuffix><avxsizesuffix>_zext_shift,
*<sse2_avx2>_pmovmskb_lt, *<sse2_avx2>_pmovmskb_zext_lt): New
define_insn_and_split patterns.
PR target/54700
* config/i386/sse.md
(*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
*<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
*<sse4_1_avx2>_pblendvb_lt): Change define_insn into
define_insn_and_split.
2018-11-29 Peter Bergner <bergner@linux.ibm.com>
PR target/87496
* config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
-mabi=ieeelongdouble without both -mpopcntd and -mvsx.
2018-11-29 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (inline_memory_move_cost):
Check "in" for 2 in MMX_CLASS_P case.
* config/i386/mmx.md (*mov<mode>_internal): Correct
TARGET_INTER_UNIT_MOVES_FROM_VEC and TARGET_INTER_UNIT_MOVES_TO_VEC
alternatives in preferred_for_speed attribute calculation.
2018-11-29 Martin Sebor <msebor@redhat.com>
PR c/88172
PR testsuite/88208
* doc/extend.texi (attribute constructor): Clarify.
2018-11-29 Martin Liska <mliska@suse.cz>
PR middle-end/88246
* builtins.c (expand_movstr): Fix thinko introduced
when switching to the new enum.
2018-11-29 qing zhao <qing.zhao@oracle.com>
* cif-code.def (EXTERN_LIVE_ONLY_STATIC): New CIF code.
* common.opt: Add -flive-patching flag.
* doc/invoke.texi: Document -flive-patching.
* flag-types.h (enum live_patching_level): New enum.
* ipa-inline.c (can_inline_edge_p): Disable external functions from
inlining when flag_live_patching is LIVE_PATCHING_INLINE_ONLY_STATIC.
* opts.c (control_options_for_live_patching): New function.
(finish_options): Make flag_live_patching incompatible with flag_lto.
Control IPA optimizations based on different levels of
flag_live_patching.
2018-11-29 Giuliano Belinassi <giuliano.belinassi@usp.br>
* match.pd (sinh (atanh (x))): New simplification rules.
(cosh (atanh (x))): Likewise.
2018-11-29 Jakub Jelinek <jakub@redhat.com>
PR target/54700
* config/i386/sse.md (ssebytemode): Add V16SI, V8SI and V4SI entries.
(ssefltmodesuffix, ssefltvecmode): New define_mode_attrs.
(*<sse4_1>_blendv<ssemodesuffix><avxsizesuffix>_lt,
*<sse4_1>_blendv<ssefltmodesuffix><avxsizesuffix>_ltint,
*<sse4_1_avx2>_pblendvb_lt): New define_insns.
PR target/88152
* tree.h (build_uniform_cst, uniform_integer_cst_p): Declare.
* tree.c (build_uniform_cst, uniform_integer_cst_p): New functions.
* match.pd (define_predicates): Add uniform_integer_cst_p.
(cmp @0 INTEGER_CST@1, cmp (convert?@2 @0) INTEGER_CST@1): Adjust
so that it works also for vector comparisons with uniform constants
with INTEGER_CST element.
PR target/88234
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): For
vec_add and vec_sub builtins, perform PLUS_EXPR or MINUS_EXPR
in unsigned_type_for instead of vector integral type where overflow
doesn't wrap.
2018-11-29 Michael Ploujnikov <michael.ploujnikov@oracle.com>
There can be at most one .resolver clone per function
* config/rs6000/rs6000.c (make_resolver_func): Generate
resolver symbol with clone_function_name instead of
clone_function_name_numbered.
2018-11-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/88243
* tree-vect-patterns.c (vect_mark_pattern_stmts): Set the def
type of all pattern-sequence stmts to vect_internal_def.
2018-11-29 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR target/88224
* config/arm/arm-cpus.in (armv7-r): Add FP16conv configurations.
(cortex-r7, cortex-r8): Update default and add new configuration.
* doc/invoke.texi (armv7-r): Add two new vfp options.
(nofp.dp): Add cortex-r7 and cortex-r8 to the list of targets that
support this option.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (rs6000_emit_move): Disable long
double split for targets other than Darwin.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (movdi_internal64): Correct lengths.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/predicates.md (easy_fp_constant): Remove code
dealing with integers in const_double. Assert on unexpected
modes. Delete superfluous ABI_V4 test.
* config/rs6000/rs6000.c (rs6000_emit_move): Comment fixes.
Don't call easy_fp_constant for Pmode.
(rs6000_hash_constant): Remove code dealing with integers in
const_double.
(rs6000_legitimate_constant_p): Likewise.
(output_toc): Formatting, use CONST_DOUBLE_P.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/constraints.md (G, H): Comment on purpose of
constraint. Correct mode comments and "G" mode test.
* config/rs6000/rs6000.md (movdi_internal32): Remove "GH" from
alternative handling "F". Add length attr. Formatting.
(mov<mode>_softfloat <FMOVE128>): Delete "GH" from
alternative, and move "F" to separate alternative. Correct
insn lengths.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/predicates.md (easy_vector_constant): Don't call
easy_fp_constant.
2018-11-29 Alan Modra <amodra@gmail.com>
* config.in (HAVE_AS_PLTSEQ): Add.
* config/rs6000/predicates.md (indirect_call_operand): New.
* config/rs6000/rs6000-protos.h (rs6000_pltseq_template),
(rs6000_sibcall_sysv): Declare.
* config/rs6000/rs6000.c (init_cumulative_args): Set cookie
CALL_LONG for -fno-plt.
(print_operand <T, z, 0>): Handle UNSPEC_PLTSEQ.
(rs6000_indirect_call_template_1): Emit .reloc directives for
UNSPEC_PLTSEQ calls.
(rs6000_pltseq_template): New function.
(rs6000_longcall_ref): Add arg parameter. Use PLT16 insns if
relocs supported by assembler. Move SYMBOL_REF test to callers.
(rs6000_call_aix): Adjust rs6000_longcall_ref call. Package
insns in UNSPEC_PLTSEQ, preserving original func_desc.
(rs6000_call_sysv): Likewise.
(rs6000_sibcall_sysv): New function.
* config/rs6000/rs6000.h (HAVE_AS_PLTSEQ): Provide default.
* config/rs6000/rs6000.md (UNSPEC_PLTSEQ, UNSPEC_PLT16_HA,
UNSPEC_PLT16_LO): New.
(pltseq_tocsave, pltseq_plt16_ha, pltseq_plt16_lo, pltseq_mtctr): New.
(call_indirect_nonlocal_sysv): Don't differentiate zero from non-zero
cookie in constraints. Test explicitly for flags in length attr.
Handle unspec operand 1.
(call_value_indirect_nonlocal_sysv): Likewise.
(call_indirect_aix, call_value_indirect_aix): Handle unspec operand 1.
(call_indirect_elfv2, call_value_indirect_elfv2): Likewise.
(sibcall, sibcall_value): Use rs6000_sibcall_sysv.
(sibcall_indirect_nonlocal_sysv): New pattern.
(sibcall_value_indirect_nonlocal_sysv): Likewise.
(sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv): Remove indirect
call alternatives.
* configure.ac: Check for gas plt sequence marker support.
* configure: Regenerate.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/predicates.md (unspec_tls): New.
* config/rs6000/rs6000-protos.h (rs6000_call_template),
(rs6000_sibcall_template): Update prototype.
(rs6000_longcall_ref): Delete.
(rs6000_call_sysv): Declare.
* config/rs6000/rs6000.c (edit_tls_call_insn): New function.
(global_tlsarg): New variable.
(rs6000_legitimize_tls_address): Rewrite __tls_get_addr call
handling.
(print_operand): Extract UNSPEC_TLSGD address operand.
(rs6000_call_template, rs6000_sibcall_template): Remove arg
parameter, extract from second call operand instead.
(rs6000_longcall_ref): Make static, localize vars.
(rs6000_call_aix): Rename parameter to reflect new usage. Take
tlsarg from global_tlsarg. Don't create unused rtl or nop insns.
(rs6000_sibcall_aix): Rename parameter to reflect new usage. Take
tlsarg from global_tlsarg.
(rs6000_call_sysv): New function.
* config/rs6000/rs6000.md: Adjust rs6000_call_template and
rs6000_sibcall_template throughout.
(tls_gd_aix, tls_gd_sysv, tls_gd_call_aix, tls_gd_call_sysv): Delete.
(tls_ld_aix, tls_ld_sysv, tls_ld_call_aix, tls_ld_call_sysv): Delete.
(tls_gdld_nomark): New insn.
(tls_gd): Swap operand order. Simplify mode selection.
(tls_gd_high, tls_gd_low): Swap operand order.
(tls_ld): Remove const_int 0 vector element from UNSPEC_TLSLD.
Simplify mode selection.
(tls_ld_high, tls_ld_low): Similarly adjust UNSPEC_TLSLD.
(call, call_value): Don't assert for second call operand.
Use rs6000_call_sysv.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/darwin.md (call_indirect_nonlocal_darwin64),
(call_nonlocal_darwin64, call_value_indirect_nonlocal_darwin64),
(call_value_nonlocal_darwin64): Remove constraints from second call
arg, the rounded_stack_size_rtx arg.
* config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv, tls_gd_call_aix),
(tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv, tls_ld_call_aix),
(tls_ld_call_sysv, call_local32, call_local64, call_value_local32),
(call_value_local64, call_indirect_nonlocal_sysv),
(call_nonlocal_sysv, call_nonlocal_sysv_secure),
(call_value_indirect_nonlocal_sysv, call_value_nonlocal_sysv),
(call_value_nonlocal_sysv_secure, call_local_aix),
(call_value_local_aix, call_nonlocal_aix, call_value_nonlocal_aix),
(call_indirect_aix, call_value_indirect_aix, call_indirect_elfv2),
(call_value_indirect_elfv2, sibcall_local32, sibcall_local64),
(sibcall_value_local32, sibcall_value_local64, sibcall_aix),
(sibcall_value_aix): Likewise.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (TLSmode): Delete mode iterator. Replace
with P throughout except for call mems which should use SI.
(tls_abi_suffix, tls_sysv_suffix, tls_insn_suffix): Delete mode
attributes. Replace with bits, mode and ptrload respectively.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000-protos.h (rs6000_indirect_call_template),
(rs6000_indirect_sibcall_template): Declare.
* config/rs6000/rs6000.c (rs6000_indirect_call_template_1),
(rs6000_indirect_call_template, rs6000_indirect_sibcall_template):
New functions.
* config/rs6000/rs6000.md (call_indirect_nonlocal_sysv),
(call_value_indirect_nonlocal_sysv, sibcall_nonlocal_sysv),
(call_indirect_aix, call_value_indirect_aix): Use
rs6000_indirect_call_template and rs6000_indirect_sibcall_template.
call_indirect_elfv2, call_value_indirect_elfv2): Likewise, and
handle both speculation and non-speculation cases.
(call_indirect_aix_nospec, call_value_indirect_aix_nospec): Delete.
(call_indirect_elfv2_nospec, call_value_indirect_elfv2_nospec): Delete.
2018-11-29 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000-protos.h (rs6000_call_template): Declare.
(rs6000_sibcall_template): Declare.
(macho_call_template): Rename from output_call.
* config/rs6000/rs6000.c (rs6000_call_template_1): New function.
(rs6000_call_template, rs6000_sibcall_template): Likewise.
(macho_call_template): Rename from output_call.
* config/rs6000/rs6000.md (tls_gd_aix, tls_gd_sysv),
(tls_gd_call_aix, tls_gd_call_sysv, tls_ld_aix, tls_ld_sysv),
(tls_ld_call_aix, tls_ld_call_sysv, call_nonlocal_sysv),
(call_nonlocal_sysv_secure, call_value_nonlocal_sysv),
(call_value_nonlocal_sysv_secure, call_nonlocal_aix),
(call_value_nonlocal_aix): Use rs6000_call_template and update
occurrences of output_call to macho_call_template.
(sibcall_nonlocal_sysv, sibcall_value_nonlocal_sysv, sibcall_aix),
(sibcall_value_aix): Use rs6000_sibcall_template.
2018-11-28 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_block_clear): Change how
we determine if unaligned vsx is ok.
2018-11-28 Jan Hubicka <jh@suse.cz>
* predict.c (determine_unlikely_bbs): Forward declare; also determine
edges that are always known to be taken because it is only likely
edge out of given BB.
(tree_estimate_probability): Call before profile guessing to get bit
of extra precision.
2018-11-28 Jan Hubicka <jh@suse.cz>
* tree-ssa-ifcombine.c (update_profile_after_ifcombine): Handle
profile_probability::always better.
2018-11-28 Jan Hubicka <jh@suse.cz>
* profile-count.h (profile_count::split): Give better result when
splitting profile_probability::always.
2018-11-28 Vladimir Makarov <vmakarov@redhat.com>
PR target/88207
* ira-costs.c (scan_one_insn): Process subregs when updating costs
for pseudos and allocnos from insn.
2018-11-28 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/aix72.h: Update to match aix71.h changes.
2018-11-28 Jeff Law <law@redhat.com>
* config/h8300/constraints.md: Add "C" constraint for call insns.
* config/h8300/h8300.md (call, call_value): Turn into a define_expand
and define_insn pair. Move invalid call targets into a register in
the expander and fix constraints in the matching pattern.
* config/h8300/predicates.md (call_expander_operand): Renamed from
call_insn_operand. Reject things we shouldn't be trying to handle.
(call_insn_operand): New predicate for use by the call/call_value
insns.
(small_call_insn_operand): Update appropriately.
2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
* config/aarch64/aarch64.c (aarch64_process_target_attr): Replace
calls to strtok with strtok_r.
2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/88223
* tree-ssa-sccvn.c (vn_reference_lookup_3): When skipping
over a stored-same value may-alias store make sure to consider
partial overlaps which are valid when TBAA reasonings do not
apply and byte-granular overlaps are possible at all.
2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/88217
* vr-values.c (vr_values::extract_range_from_phi_node): Make
sure to handle results > +INF and < -INF correctly when
trying to drop down to +INF - 1 or -INF + 1.
2018-11-28 Alan Modra <amodra@gmail.com>
* xcoffout.c (do_block): Signed/unsigned warning fix.
2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/79351
* tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
empty CONSTRUCTORs ensure the store is at a constant position.
2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/88229
* tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
is an INTEGER_CST before accessing it so.
2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
* doc/invoke.texi (-mtune=): Remove obsolete CPU names.
2018-11-28 Jakub Jelinek <jakub@redhat.com>
PR target/88189
* config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
* config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
2018-11-27 Martin Liska <mliska@suse.cz>
* gcov.c (generate_results): Append current_working_directory
only when exists.
2018-11-27 Mike Gulick <mgulick@mathworks.com>
PR preprocessor/83173
* input.c (dump_location_info): Dump reason and included_from
fields from line_map_ordinary struct. Fix indentation when
location > 5 digits.
* diagnostic-show-locus.c (num_digits, num_digits): Move to
diagnostic.c to allow it to be utilized by input.c.
* diagnostic.c (num_digits, selftest::test_num_digits): Moved
here.
(selftest::diagnostic_c_tests): Run selftest::test_num_digits.
* diagnostic.h (num_digits): Add extern definition.
2018-11-27 Fredrik Noring <noring@nocrew.org>
* config/mips/mips.c (mips_reorg_process_insns)
(mips_option_override): Handle `-mfix-r5900'.
* config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
`mno-fix-r5900'.
* config/mips/mips.opt (mfix-r5900): New option.
* doc/invoke.texi: Document the `r5900' processor name, and
`-mfix-r5900' and `-mno-fix-r5900' options.
2018-11-27 Jakub Jelinek <jakub@redhat.com>
PR target/88188
* config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
output_operand_lossage instead of gcc_assert.
<case 't'>: Likewise.
<case 'z'>: Likewise.
<case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
2018-11-27 Jeff Law <law@redhat.com>
* config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
in call to move_by_pieces.
* config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
to move_by_pieces.
* config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
call to move_by_pieces.
* config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
in call to move_by_pieces.
* config/microblaze/microblaze.c (microblaze_block_move_straight): Use
RETURN_BEGIN in call to move_by_pieces.
(microblaze_expand_block_move): Likewise.
2018-11-27 Tamar Christina <tamar.christina@arm.com>
* doc/md.texi (xorsign): Document it.
2018-11-27 Martin Liska <mliska@suse.cz>
* config/gnu-user.h (TARGET_F951_OPTIONS): New.
* gcc.c (find_fortran_preinclude_file): New function
to handle Fortran pre-include.
2018-11-27 Martin Liska <mliska@suse.cz>
* asan.c (asan_emit_stack_protection): Use new enum values
instead of int constants.
* builtins.c (expand_builtin_memory_copy_args): Replace int
type with memop_ret enum type.
(expand_builtin_mempcpy_args): Likewise.
(expand_builtin_memcpy): Use new enum values
instead of int constants. Likewise.
(expand_builtin_mempcpy): Likewise.
(expand_movstr): Likewise.
(expand_builtin_strcpy_args): Likewise.
(expand_builtin_stpcpy_1): Likewise.
(expand_builtin_strncpy): Likewise.
(expand_builtin_memset_args): Likewise.
* expr.c (move_by_pieces_d::finish_endp): Rename to ...
(move_by_pieces_d::finish_retmode): ... this.
(move_by_pieces): Change last argument type to memop_ret.
(store_by_pieces): Use new enum values
instead of int constants.
(emit_block_move_hints): Likewise.
(emit_push_insn): Likewise.
(store_expr): Likewise.
* expr.h (store_by_pieces): Change int to newly added enum
type.
* rtl.h (enum memop_ret): Define.
(move_by_pieces): Use the enum type.
2018-11-27 Alan Modra <amodra@gmail.com>
* config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
cpu here.
(ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
form. Error on missing -mcpu case.
* config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
(asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
* config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
else if .. specs form. Error on missing -mcpu case. Don't output
duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
2018-11-26 David Malcolm <dmalcolm@redhat.com>
* dump-context.h (dump_context::dump_loc): Convert 1st param from
dump_flags_t to const dump_metadata_t &. Convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_context::dump_loc_immediate): Convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_context::dump_gimple_stmt): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::void dump_gimple_stmt_loc): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_gimple_expr): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_gimple_expr_loc): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_generic_expr): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_generic_expr_loc): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_printf_va): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_printf_loc_va): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_dec): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_symtab_node): Likewise.
(dump_context::begin_scope): Split out 2nd param into
user and impl locations.
(dump_context::ensure_pending_optinfo): Add metadata param.
(dump_context::begin_next_optinfo): Replace dump_location_t param
with metadata and user location.
* dumpfile.c (dump_context::dump_loc): Convert 1st param from
dump_flags_t to const dump_metadata_t &. Convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_context::dump_loc_immediate): Convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_context::dump_gimple_stmt): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::void dump_gimple_stmt_loc): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_gimple_expr): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_gimple_expr_loc): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_generic_expr): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_generic_expr_loc): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_printf_va): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_printf_loc_va): Likewise; convert
2nd param from const dump_location_t & to
const dump_user_location_t &.
(dump_context::dump_dec): Convert 1st param from
dump_flags_t to const dump_metadata_t &.
(dump_context::dump_symtab_node): Likewise.
(dump_context::begin_scope): Split out 2nd param into
user and impl locations.
(dump_context::ensure_pending_optinfo): Add metadata param.
(dump_context::begin_next_optinfo): Replace dump_location_t param
with metadata and user location.
(dump_gimple_stmt): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_gimple_stmt_loc): Likewise; convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_gimple_expr): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_gimple_expr_loc): Likewise; convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_generic_expr): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_generic_expr_loc): Likewise; convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_printf): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_printf_loc): Likewise; convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_dec): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_symtab_node): Likewise.
(dump_begin_scope): Split out 2nd param into user and impl
locations.
(selftest::assert_impl_location_eq): New function.
(ASSERT_IMPL_LOCATION_EQ): New macro.
(selftest::test_impl_location): Update to use
ASSERT_IMPL_LOCATION_EQ.
(selftest::test_capture_of_dump_calls): Convert "loc" to
dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
verifying line numbers of dump emissions.
* dumpfile.h (class dump_metadata_t): New class.
(dump_printf): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_printf_loc): Likewise; convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_generic_expr_loc): Likewise.
(dump_generic_expr): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_gimple_stmt_loc): Likewise; convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_gimple_stmt): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_gimple_expr_loc): Likewise; convert 2nd param from
const dump_location_t & to const dump_user_location_t &.
(dump_gimple_expr): Convert 1st param from dump_flags_t to
const dump_metadata_t &.
(dump_symtab_node): Likewise.
(dump_dec): Likewise.
(dump_begin_scope): Split out 2nd param into user and impl
locations.
(auto_dump_scope::auto_dump_scope): Split "loc" param into a user
location and impl_location, and capture the impl_location.
(AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
* loop-unroll.c (report_unroll): Update for changes to
dump_printf_loc and dump_printf.
* opt-problem.cc (opt_problem::opt_problem): Update for change to
dump_loc.
* optinfo-emit-json.cc
(selftest::test_building_json_from_dump_calls): Convert "loc" from
dump_location_t to dump_user_location_t.
* optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
dump_loc_immediate.
* profile.c (compute_branch_probabilities): Update for change to
dump_printf_loc.
* selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
* tree-vect-slp.c (vect_print_slp_tree): Update for change to
dump_printf_loc.
2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* doc/sourcebuild.texi: Document check_effective_target_int_eq_float
and check_effective_target_ptr_eq_long.
2018-11-27 Alan Modra <amodra@gmail.com>
* config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
(powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
(powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
(powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
(powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
* config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
(LINK_GCC_C_SEQUENCE_SPEC): Undef.
(ASM_APP_ON, ASM_APP_OFF): Don't define.
* config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
* config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
* config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
* config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
(LINK_GCC_C_SEQUENCE_SPEC): Undef.
* config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
* config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
(GNU_USER_TARGET_CRTN): Redefine.
(CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
(LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
(CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
(STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
(ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
(UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
(LINK_EH_SPEC): Don't define.
2018-11-26 Martin Sebor <msebor@redhat.com>
PR 87756
* expr.c (string_constant): Handle top-level decls of all character
types and subobjects of narrow character type.
2018-11-27 Alan Modra <amodra@gmail.com>
* config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
* config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
GNU_USER_TARGET_OS_CPP_BUILTINS.
(RS6000_ABI_NAME): Define.
* config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
GNU_USER_TARGET_OS_CPP_BUILTINS.
(MUSL_DYNAMIC_LINKER32): Undef before defining.
(UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
(CHOOSE_DYNAMIC_LINKER): Don't define.
(GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
* config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
(CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
not already defined.
(CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
TARGET_OS_CPP_BUILTINS.
2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
2018-11-26 Jakub Jelinek <jakub@redhat.com>
PR target/88195
* config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
and !TARGET_64BIT, return NULL_TREE.
PR c++/86900
* dwarf2out.c (secname_for_decl): For functions with
DECL_SECTION_NAME if in_cold_section_p, try to return
current_function_section's name if it is a named section.
2018-11-26 Maya Rashish <coypu@sdf.org>
PR target/58397
* config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
* config/x-netbsd: New file.
* config/host-netbsd: New file.
2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* doc/sourcebuild.texi: Document check_effective_target_size20plus.
Clarify documentation for check_effective_target_size32plus.
2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
and modify expand_strncmp_vec_sequence.
(emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
(generate_6432_conversion): New function.
(expand_block_compare): Add support for vsx.
(expand_block_compare_gpr): New function.
* config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
default limit to 63 because of more compact vsx code.
2018-11-26 Uros Bizjak <ubizjak@gmail.com>
PR target/88178
* config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
for registers for which no debug information can be generated.
Use INVALID_REGNUM for non-existent registers.
(dbx64_register_map): Ditto.
(svr4_dbx_register_map): Ditto.
2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
PR c/57182
* doc/invoke.texi (Optimize Options): Document that
-freorder-functions also uses "hot" and "cold" attributes.
2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/types.md (mul64): Rename to...
(widen_mul64): ... This.
* config/arm/arm-generic.md: Rename mul64 to widen_mul64.
* config/arm/cortex-a15.md: Likewise.
* config/arm/cortex-a5.md: Likewise.
* config/arm/cortex-a53.md: Likewise.
* config/arm/cortex-a57.md: Likewise.
* config/arm/cortex-a7.md: Likewise.
* config/arm/cortex-m4.md: Likewise.
* config/arm/exynos-m1.md: Likewise.
* config/arm/marvell-pj4.md: Likewise.
* config/arm/xgene1.md: Likewise.
2018-11-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/88182
* tree-vect-loop.c (vectorizable_reduction): Pick up single
correct reduc_def_info.
* tree-vect-slp.c (vect_analyze_slp_instance): Set
STMT_VINFO_REDUC_DEF of the first stmt.
2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
* doc/invoke.texi: Document z14/arch12 -march option.
2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
PR c/57166
* doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
(Warning Options): Likewise.
2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
PR web/79738
* doc/extend.texi (Common Function Attributes): Clarify that
functions with "const" attribute can read const global variables.
2018-11-26 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
PR other/54265
* doc/extend.texi (Common Variable Attributes): Use preferred
placement of type attributes in examples, plus whitespace fixes.
(Type Attributes): Clarify why placement of attributes
immediately after struct/union/enum keyword is preferred.
(Common Type Attributes): Use preferred placement of type
attributes in examples, plus more whitespace fixes.
2018-11-25 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* doc/sourcebuild.texi (Effective-Target Keywords, Environment
attributes): Document d_runtime.
2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
PR bootstrap/88157
* ira-costs.c (record_operand_costs): Initiate register move cost
for mode.
2018-11-23 Jeff Law <law@redhat.com>
PR rtl-optimization/87468
* tree-ssa-threadupdate.c (create_block_for_threading): Clear
EDGE_IGNORE on all outgoing edges of the duplicate block.
2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
PR bootstrap/88157
* ira-costs.c (record_operand_costs): Use bigger hard reg class if
its mode does not fit to the original class.
2018-11-23 Martin Sebor <msebor@redhat.com>
PR tree-optimization/87756
* expr.c (string_constant): Synthesize a string literal from
the address of a constant character.
* tree.c (build_string_literal): Add an argument.
* tree.h (build_string_literal): Same.
2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
* config/aarch64/aarch64-cores.def: Define emag.
* config/aarch64/aarch64-tune.md: Regenerated with emag.
* config/aarch64/aarch64.c (emag_tunings): New struct.
* doc/invoke.texi: Document mtune value.
2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
for GCC 9.
* config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
prefetch tunings.
* config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
costs.
* config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
for XGene1.
2018-11-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/88149
* tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
the case where there are two different def types for the
same operand at different operand position in the same stmt.
2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
* config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
gen_atomic_compare_swap_1.
(arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
(arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
(arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
(arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
(arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
checks.
* config/arm/arm.md (neon_vext<mode>),
(neon_vrev64<mode>, neon_vrev32<mode>),
(neon_vrev16<mode>, neon_vtrn<mode>_internal),
(neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
before the pattern name.
* config/arm/sync.md:
(atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
(atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
2018-11-23 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/86614
* gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
if TREE_NO_WARNING is set on ref.ref.
2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
Alan Coopersmith <alan.coopersmith@oracle.com>
PR c/53608
* doc/extend.texi (Designated Inits): Clarify handling of multiple
initializers for unions.
2018-11-22 Jan Hubicka <jh@suse.cz>
PR lto/88142
* ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
parameters; do not warn here.
(odr_subtypes_equivalent_p): Likewise.
(warn_odr): Fix typo.
(warn_types_mismatch): Do not output confused warnings on integer types.
(odr_types_equivalent_p): Update.
2018-11-22 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.c (ix86_option_override_internal,
ix86_can_inline_p, classify_argument, construct_container,
ix86_expand_prologue, ix86_expand_split_stack_prologue,
ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
expand_setmem_epilogue_via_loop, promote_duplicated_reg,
ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
Formatting fixes.
* config/i386/i386.c (ix86_option_override_internal): For
stack_protector_guard related options, use opts_set->x_ instead
of global_options_set. and prefix options with opts->x_ . Move
defaults for offset and reg into else block.
2018-11-22 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_check_avx_upper_register):
Return true for all SSE registers with mode bitsize > 128.
2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/87718
* ira-costs.c: Remove trailing white-spaces.
(record_operand_costs): Add a special treatment for moves
involving a hard register.
2018-11-22 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
(ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
2018-11-22 Martin Liska <mliska@suse.cz>
* common/config/i386/i386-common.c (processor_names): Add
static assert and add missing "znver2".
(ix86_get_valid_option_values): Add checking assert for null
values and add "native" value if feasible.
* config/i386/i386.h: Do not declare size of processor_names.
* common/config/i386/i386-common.c:
* config/i386/i386.c: Add static assert for size
of processor_cost_table.
2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
* target-insns.def (stack_protect_combined_set): Define new standard
pattern name.
(stack_protect_combined_test): Likewise.
* cfgexpand.c (stack_protect_prologue): Try new
stack_protect_combined_set pattern first.
* function.c (stack_protect_epilogue): Try new
stack_protect_combined_test pattern first.
* config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
parameters to control which register to use as PIC register and force
reloading PIC register respectively. Insert in the stream of insns if
possible.
(legitimize_pic_address): Expose above new parameters in prototype and
adapt recursive calls accordingly. Use pic_reg if non null instead of
cached one.
(arm_load_pic_register): Add pic_reg parameter and use it if non null.
(arm_legitimize_address): Adapt to new legitimize_pic_address
prototype.
(thumb_legitimize_address): Likewise.
(arm_emit_call_insn): Adapt to require_pic_register prototype change.
(arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
(thumb1_expand_prologue): Likewise.
* config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
change.
(arm_load_pic_register): Likewise.
* config/arm/predicated.md (guard_addr_operand): New predicate.
(guard_operand): New predicate.
* config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
prototype change.
(builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
prototype change.
(stack_protect_combined_set): New expander..
(stack_protect_combined_set_insn): New insn_and_split pattern.
(stack_protect_set_insn): New insn pattern.
(stack_protect_combined_test): New expander.
(stack_protect_combined_test_insn): New insn_and_split pattern.
(arm_stack_protect_test_insn): New insn pattern.
* config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
* config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
(UNSPEC_SP_TEST): Likewise.
* doc/md.texi (stack_protect_combined_set): Document new standard
pattern name.
(stack_protect_set): Clarify that the operand for guard's address is
legal.
(stack_protect_combined_test): Document new standard pattern name.
(stack_protect_test): Clarify that the operand for guard's address is
legal.
2018-11-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/88148
* tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
valueization callback parameter and handle it.
* tree-ssa-loop-niter.h (simplify_replace_tree): Export.
* tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
2018-11-22 Richard Biener <rguenther@suse.de>
PR lto/87229
PR lto/88112
* lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
which can appear in size expressions.
* tree-streamer-in.c (unpack_ts_base_value_fields): Stream
CALL_EXPR_BY_DESCRIPTOR.
(streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
* tree-streamer-out.c (pack_ts_base_value_fields): Stream
CALL_EXPR_BY_DESCRIPTOR.
(streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
Revert
PR lto/87229
* tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
sizepos values.
2018-11-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/88069
* tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
apply to default defs.
2018-11-22 Jakub Jelinek <jakub@redhat.com>
PR target/85644
PR target/86832
* config/i386/i386.c (ix86_option_override_internal): Default
ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
is defined.
* config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
stack_protect_test, stack_protect_test_<mode>): Use empty condition
instead of TARGET_SSP_TLS_GUARD.
2018-11-22 Martin Liska <mliska@suse.cz>
PR sanitizer/88017
* config/i386/i386.c (ix86_option_override_internal): Error
about usage -mabi=ms and -fsanitize=thread.
2018-11-21 Uros Bizjak <ubizjak@gmail.com>
Revert the revert:
2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
Revert:
2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
* lra-spills.c (lra_final_code_change): Remove useless move insns.
2018-11-21 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/88129
* function.c (expand_function_end): Do not emit extra blockage insn.
2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
PR target/85667
* config/i386/i386.c (function_value_ms_64): Return AX_REG instead
of FIRST_SSE_REG for 4 or 8 byte modes.
2018-11-21 Jan Hubicka <jh@suse.cz>
PR lto/87957
* tree.c (fld_decl_context): Break out from ...
(free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
(fld_incomplete_type_of): Build copy of TYP_DECL.
* ipa-devirt.c (free_enum_values): Rename to ...
(free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
and TREE_TYPEs of TYPE_DECLs.
(get_odr_type): Initialize odr_vtable_hash if needed.
2018-11-21 Alexandre Oliva <oliva@adacore.com>
* final.c (compute_discriminator): Declare. Renamed from...
(maybe_set_discriminator): ... this. Set and return a local.
(override_discriminator): New.
(final_scan_insn_1): Set it.
(notice_source_line): Adjust. Always set discriminator.
2018-11-21 Jakub Jelinek <jakub@redhat.com>
PR target/87839
* config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
rIJ constraint for aarch64_plus_operand rather than rn.
2018-11-21 Renlin Li <renlin.li@arm.com>
PR middle-end/84877
* explow.h (get_dynamic_stack_size): Declare it as external.
* explow.c (record_new_stack_level): Remove function static attribute.
* function.c (assign_stack_local_1): Dynamically align the stack slot
addr for parameter copy on the stack.
2018-11-21 Richard Biener <rguenther@suse.de>
PR bootstrap/88133
* bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
* Makefile.in (bitmap.o-warn): Remove again.
2018-11-20 Jeff Law <law@redhat.com>
PR tree-optimization/88069
* tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
degenerate virtual PHIs.
2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/87317
* config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
nonimmediate_operand with register_operand.
(avx2_<code>v8qiv8si2<mask_name>): Likewise.
(sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
(sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
(sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
(avx512f_<code>v8qiv8di2<mask_name>): Likewise.
(avx2_<code>v4qiv4di2<mask_name>): Likewise.
(avx2_<code>v4hiv4di2<mask_name>): Likewise.
(sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
(sse4_1_<code>v2siv2di2<mask_name>): Likewise.
(*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
(*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
(*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
(*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
(*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
(*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
(*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
(*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
(*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
(*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
(*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
(*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
(*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
(*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
(*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
(*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
(*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
(*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
* read-rtl.c (apply_subst_iterator): Handle define_split and
define_insn_and_split.
2018-11-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/87817
* config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
*bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
in the pattern to avoid triggering UB when operands[2] is zero.
(tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
(*tbm_bextri_<mode>): ... this.
2018-11-21 Tom de Vries <tdevries@suse.de>
PR driver/79855
* params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
period.
2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
* configure.ac: Add check for Binutils to determine whether vector
load/store alignments hints are being supported.
* config.in: Regenerate.
* configure: Regenerate.
* config/s390/s390.c (print_operand): Support new output
modifier A.
* config/s390/s390.md ("movti"): Append alignment hint output
using the new output modifier 'A'.
* config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
("*vec_ti_to_v1ti"): Likewise.
2018-11-20 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
2018-11-20 Jan Hubicka <hubicka@ucw.cz>
PR lto/84044
* ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
compare ENUM values.
2018-11-20 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87895
* omp-simd-clone.c (ipa_simd_modify_function_body): When removing
or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
(simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
redirects edges to EXIT to edges to incr_bb, iterate while EXIT
has any preds and always use EDGE_PRED (, 0).
2018-11-20 Uros Bizjak <ubizjak@gmail.com>
PR target/88070
* mode-switching.c (create_pre_exit): After reload, always split the
fallthrough edge to the exit block.
2018-11-20 Jan Hubicka <hubicka@ucw.cz>
* ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
* tree.c (build_array_type_1): Forward declare.
(fld_type_variant_equal_p): Add INNER_TYPE parameter.
(fld_type_variant): Likewise.
(fld_simplified_types): New hash.
(fld_process_array_type): New function.
(fld_incomplete_type_of): Handle array and enumeration types.
(fld_simplified_type): Handle simplification of arrays.
(free_lang_data): Allocate and free simplified types hash.
2018-11-20 Jan Hubicka <hubicka@ucw.cz>
PR lto/87957
* ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
when sybtype already violates ODR.
(get_odr_type): Do not ICE when insert is false and type duplicate
is not registered yet.
(register_odr_type): Be sure to register subtypes first.
2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
DImode parts of the target operand.
2018-11-20 Nathan Sidwell <nathan@acm.org>
PR 87926
* Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
2018-11-20 Jan Hubicka <hubicka@ucw.cz>
PR lto/87997
* tree.c (free_lang_data_in_cgraph): Add argument fld; break out
type checking to...
(free_lang_data) ... here; update call of free_lang_data_in_cgraph.
2018-11-20 Jan Hubicka <hubicka@ucw.cz>
PR ipa/87706
* ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
* ipa.c (possible_inline_candidate_p): Break out from ..
(process_references): ... here ; drop before_inlining_p;
cleanup handling of alises.
(walk_polymorphic_call_targets): Likewise.
(symbol_table::remove_unreachable_nodes): Likewise.
* passes.c (pass_data_ipa_remove_symbols): New structure.
(pass_ipa_remove_symbols): New pass.
(make_pass_ipa_remove_symbols): New function.
* tree-pass.h (make_pass_ipa_remove_symbols): Declare.
* passes.def (pass_ipa_remove_symbols): Schedule after early passes.
2018-11-20 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vectorizable_condition): Do not get
at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
pointless vect_is_simple_use calls.
2018-11-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/88074
* tree-ssa-dom.c (pass_dominator::execute): Do not walk
backedges.
2018-11-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/88069
* tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
virtual PHI arguments.
2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/88083
* config/s390/s390.md: Skip LT(G) peephole when literal pool is
involved.
* rtl.h (contains_constant_pool_address_p): New function.
* rtlanal.c (contains_constant_pool_address_p): Likewise.
2018-11-20 Richard Biener <rguenther@suse.de>
PR middle-end/83215
* alias.c (component_uses_parent_alias_set_from): Remove
alias-set zero and TYPE_TYPELESS_STORAGE case both already
handled in other ways.
2018-11-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/88087
* tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
call fntype.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
call fntype.
2018-11-20 Richard Biener <rguenther@suse.de>
PR middle-end/88089
* tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
2018-11-19 Jan Hubicka <hubicka@ucw.cz>
PR lto/87957
* ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
PR driver/50250
* doc/invoke.texi (Link Options): Mention shared libraries
in documentation for the -l option. Simplify discussion and
point to the system linker documentation for details.
2018-11-19 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/88033
* ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
to itself. Use HARD_REGISTER_NUM_P.
2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* tree-vect-loop.c (vect_transform_loop): Disable further unrolling
of the loop if vf is non-constant.
2018-11-19 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/87025
* dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
immediately after creating the scope optinfo.
(selftest::test_pr87025): New function.
(selftest::dumpfile_c_tests): Call it.
* optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
that we're not popping the top-level records array.
* optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
not changing the kind of a "scope" optinfo.
2018-11-19 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/87025
* dump-context.h: Include "optinfo.h".
(class optrecord_json_writer): New forward decl.
(dump_context::forcibly_enable_optinfo_p): Delete.
(dump_context::optinfo_enabled_p): New member function.
(dump_context::optimization_records_enabled_p): New member
function.
(dump_context::set_json_writer): New member function.
(dump_context::emit_optinfo): New member function.
(dump_context::m_forcibly_enable_optinfo): Delete.
(dump_context::m_json_writer): New member data.
* dumpfile.c (dump_context::set_json_writer): New member function.
(dump_context::finish_any_json_writer): New member function.
(dump_context::end_scope): Replace call to
optimization_records_maybe_pop_dump_scope with call to
m_json_writer->pop_scope.
(dump_context::optinfo_enabled_p): New member function.
(dump_context::end_any_optinfo): Replace call to optinfo::emit with call
to dump_context::emit_optinfo.
(dump_context::emit_optinfo): New member function.
(temp_dump_context::temp_dump_context): Replace
m_forcibly_enable_optinfo with call to set_json_writer.
(temp_dump_context::~temp_dump_context): Clean up any json writer.
* optinfo-emit-json.cc (class optrecord_json_writer): Move to
optinfo-emit-json.h
(the_json_writer): Delete.
(optimization_records_start): Delete.
(optimization_records_finish): Delete.
(optimization_records_enabled_p): Delete, in favor of
dump_context::optimization_records_enabled_p.
(optimization_records_maybe_record_optinfo): Delete.
(optimization_records_maybe_pop_dump_scope): Delete.
* optinfo-emit-json.h: Include "json.h". Delete forward
decl of opt_pass.
(optimization_records_start): Delete.
(optimization_records_finish): Delete.
(optimization_records_enabled_p): Delete.
(optimization_records_maybe_record_optinfo): Delete.
(optimization_records_maybe_pop_dump_scope): Delete.
(class optrecord_json_writer): Move here from
optinfo-emit-json.cc.
* optinfo.cc (optinfo::emit_for_opt_problem): Replace call
to optinfo::emit with call to dump_context::emit_optinfo.
(optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
(optinfo_enabled_p): Delete, in favor of
dump_context::optinfo_enabled_p.
(optinfo_wants_inlining_info_p): Update for conversion o
optimization_records_enabled_p to a member function of
dump_context.
* optinfo.h (optinfo_enabled_p): Delete, in favor of
dump_context::optinfo_enabled_p.
(optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
* toplev.c: Include "dump-context.h".
(compile_file): Replace call to optimization_records_finish with
dump_context::finish_any_json_writer.
(do_compile): Replace call to optimization_records_start with
conditionally creating a optrecord_json_writer for the
dump_context.
2018-11-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/88071
* tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
of false as last argument to gsi_remove.
* tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
false as last argument to gsi_replace.
PR debug/87039
* omp-expand.c: Don't include debug.h.
(adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
from innermost outer parallel, task, teams or target that has a
child_fn set, or, if there is no such outer region, use
current_function_decl. Do the DECL_CONTEXT adjustment regardless of
whether a suitable BLOCK is found or not.
(expand_parallel_call, expand_teams_call): Don't call
adjust_context_and_scope here.
(grid_expand_target_grid_body): Revert 2017-01-25 changes.
(expand_omp_taskreg, expand_omp_target): Likewise. Call
adjust_context_and_scope.
* dwarf2out.c (dwarf2out_early_global_decl): For
decl_function_context recurse instead of calling dwarf2out_decl.
2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/85925
* rtl.h (word_register_operation_p): New predicate.
* combine.c (record_dead_and_set_regs_1): Only apply specific handling
for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
* rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
(num_sign_bit_copies1): Likewise.
2018-11-19 Richard Biener <rguenther@suse.de>
PR lto/87229
* tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
sizepos values.
2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
* compare-elim.c (struct comparison): Add not_in_a field.
(is_not): New static function.
(strip_not): Likewise.
(conforming_compare): Handle a NOT in the first operand.
(can_eliminate_compare): Likewise.
(find_comparison_dom_walker::before_dom_children): Likewise.
(try_eliminate_compare): Likewise.
* config/visium/visium.md (negsi2_insn_set_carry): Turn into...
(neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
2018-11-19 Jonathan Wakely <jwakely@redhat.com>
* doc/extend.texi (Common Type Attributes): Fix typos.
2018-11-19 Martin Liska <mliska@suse.cz>
PR gcov-profile/88045
* coverage.c (coverage_begin_function): Add assert.
2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
PR other/40498
* doc/extend.texi (Common Function Attributes): Document that
no_instrument_function applies to -p and -pg, too.
* doc/invoke.texi (Instrumentation Options): Add cross-references
to docs for -p, -pg, and -finstrument-functions.
2018-11-18 Alan Modra <amodra@gmail.com>
* config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
(GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
(GNU_USER_TARGET_CRTN): Define.
(GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
(GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
2018-11-18 Alan Modra <amodra@gmail.com>
* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
!HAVE_LD_PIE variant.
(GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
2018-11-17 Nick Clifton <nickc@redhat.com>
Sandra Loosemore <sandra@codesourcery.com>
PR driver/31357
* doc/invoke.texi (Overall Options): Document that --help and
--help=<value> options cannot be combined.
2018-11-17 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
(riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
(riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
to step2 if frame_pointer_needed and step1 is 0.
2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
PR c++/4225
* doc/cpp.texi (System Headers): Add note about implicit
extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
PR c++/4025
* doc/invoke.texi (C++ Dialect Options): Clarify usage of
-fno-implicit-templates.
2018-11-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87546
* tree-vect-patterns.c (vect_look_through_possible_promotion): Add
min_precision variable, initially set it to orig_precision, only does
something if op_type's precision is <= min_precision and update
min_precision whenever calling set_op.
2018-11-16 Jan Hubicka <hubicka@ucw.cz>
PR ipa/87957
* ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi (Option Summary): Fix whitespace and line
breaks in @gccoptlist environments.
(Warning Options): Likewise.
(Optimize Options): Likewise.
(PowerPC SPE Options): Likewise.
(RS/6000 and PowerPC Options): Likewise.
2018-11-16 Jeff Law <law@redhat.com>
* config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
gcc_assert.
2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/23197
* doc/invoke.texi (Optimize Options): Update options enabled by
fprofile-generate, -fprofile-use, and -fauto-profile.
2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
PR target/87927
* target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
* target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
the byte_op hook.
* target.h: Add psi, pdi, pti to struct asm_int_op definition.
* targhooks.c (default_print_patchable_function_entry): Assert
asm_int_op does not return a NULL string.
* varasm.c (integer_asm_op): Return the op for a partial int type
when the requested size does not correspond to an integer type.
* config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
* doc/tm.texi: Regenerate.
2018-11-12 Jason Merrill <jason@redhat.com>
* gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
2018-11-16 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/constraints.md (wF constraint): Remove power9
fusion documentation. Just document wF's use for power8 fusion.
* config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
(fusion_gpr_addis): Delete power9 fusion support. Change power8
fusion support to require the upper 12 bits to be all 0's or all
1's.
(fusion_gpr_mem_load): Add comment.
(fusion_addis_mem_combo_load): Remove power9 fusion support.
(fusion_addis_mem_combo_store): Delete.
(fusion_offsettable_mem_operand): Delete.
* config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
power8 fusion here.
(ISA_3_0_MASKS_SERVER): Delete power9 fusion.
(POWERPC_MASKS): Delete power9 fusion.
* config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
(fusion_p9_p): Delete.
(expand_fusion_p9_load): Delete.
(expand_fusion_p9_store): Delete.
(emit_fusion_p9_load): Delete.
(emit_fusion_p9_store): Delete.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
fusion support.
(rs6000_option_override_internal): Set power8 fusion based on
whether we are tuning for power8. Delete power9 fusion support.
(rs6000_opt_masks): Delete -mpower9-fusion switch.
(emit_fusion_load): Rename emit_fusion_load_store to
emit_fusion_load, and drop fusion store support. Update callers.
(emit_fusion_load_store): Likewise.
(emit_fusion_gpr_load): Likewise.
(fusion_p9_p): Delete.
(expand_fusion_p9_load): Delete.
(expand_fusion_p9_store): Delete.
(emit_fusion_p9_load): Delete.
(emit_fusion_p9_store): Delete.
* config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
(GPR_FUSION): Delete.
(FPR_FUSION): Delete.
(power9 fusion peephole2s): Delete.
(fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
(fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
(fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
(fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
(fusion_p9_<mode>_constant): Delete.
* config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
power9 fusion switch.
* doc/md.texi (PowerPC constraints): Update wF constraint
documentation for power8 fusion only.
2018-11-16 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/87475
* cfgrtl.c (patch_jump_insn): Allow redirection failure for
CROSSING_JUMP_P insns.
(cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
2018-11-16 Uros Bizjak <ubizjak@gmail.com>
PR target/88051
* config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
* config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
(movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
2018-11-16 Jakub Jelinek <jakub@redhat.com>
PR middle-end/88032
* optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
is VOIDmode, in which case use int_mode. Similarly for op1_mode.
2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
* tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
location_t parameter.
(switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
(switch_decision_tree::do_jump_if_equal): Likewise.
* tree-switch-conversion.c (switch_decision_tree::emit): Pass location
of switch statement to emit_case_nodes.
(switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
set it on the newly built GIMPLE comparison statement.
(switch_decision_tree::do_jump_if_equal): Likewise.
(switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
in calls to do_jump_if_equal as well as recursive calls.
2018-11-16 Andi Kleen <ak@linux.intel.com>
* config/i386/i386.md: Allow memory operands to ptwrite.
2018-11-16 Michael Matz <matz@suse.de>
* system.h (PRsa): New macro.
(SIZE_AMOUNT): Cast number to uint64_t.
* alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
(pool_usage::dump_footer): Likewise and also use PRIu64.
* bitmap.h (bitmap_usage::dump): Likewise.
* ggc-common.c (ggc_usage::dump): Likewise.
* ggc-page.c (ggc_print_statistics): Likewise.
* input.c (dump_line_table_statistics): Likewise.
* mem-stats.h (mem_usage::dump): Likewise.
(mem_usage::dump_footer): Likewise.
* rtl.c (dump_rtx_statistics): Likewise.
* tree-cfg.c (dump_cfg_stats): Likewise.
* tree-dfa.c (dump_dfa_stats): Likewise.
* tree-phinodes.c (phinodes_print_statistics): Likewise.
* tree-ssanames (ssanames_print_statistics): Likewise.
* vec.c (vec_usage::dump): Likewise.
(vec_usage::dump_footer): Likewise.
2018-11-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/88011
* tree-vrp.c (extract_range_from_binary_expr): Fix error in
replacing set_value_range_to_undefined and
set_value_range_to_varying with method calls.
2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.md
(*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
assembler.
(*r<noxa>sbg_<mode>_sll): Likewise.
(*r<noxa>sbg_<mode>_srl): Likewise.
(*r<noxa>sbg_sidi_srl): New pattern.
2018-11-16 Jerome Lambourg <lambourg@adacore.com>
* config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
Default to TARGET_VXWORKS_RTP.
(SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
of TARGET_VXWORKS_RTP.
* config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
PR c++/25759
* doc/extend.texi (Common Type Attributes): Make it explicit
that attribute "packed" can apply to C++ classes.
2018-11-15 Martin Sebor <msebor@redhat.com>
PR c++/87541
PR c++/87542
* tree.c (type_argument_type): New function.
* tree.h (type_argument_type): Declare it.
* gcc/doc/extend.texi (alloc_align): Update and clarify.
(alloc_size, nonnull, sentinel): Same.
2018-11-15 Andrew Stubbs <ams@codesourcery.com>
Kwok Cheung Yeung <kcy@codesourcery.com>
* tree-vect-stmts.c (vectorizable_store): Don't ICE when
int_mode_for_size fails.
(vectorizable_load): Likewise.
2018-11-15 David Malcolm <dmalcolm@redhat.com>
* doc/ux.texi (Group logically-related diagnostics): Move
discussion of auto_diagnostic_group into this new subsection.
Give an example of where this grouping is used.
2018-11-15 David Malcolm <dmalcolm@redhat.com>
PR other/19165
* Makefile.in (OBJS): Move json.o to...
(OBJS-libcommon): ...here and add diagnostic-format-json.o.
* common.opt (fdiagnostics-format=): New option.
(diagnostics_output_format): New enum.
* diagnostic-format-json.cc: New file.
* diagnostic.c (default_diagnostic_final_cb): New function, taken
from start of diagnostic_finish.
(diagnostic_initialize): Initialize final_cb to
default_diagnostic_final_cb.
(diagnostic_finish): Move "being treated as errors" messages to
default_diagnostic_final_cb. Call any final_cb.
(default_diagnostic_finalizer): Add diagnostic_t param.
(diagnostic_report_diagnostic): Pass "orig_diag_kind" to
diagnostic_finalizer callback.
* diagnostic.h (enum diagnostics_output_format): New enum.
(diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
(struct diagnostic_context): Add "final_cb".
(default_diagnostic_finalizer): Add diagnostic_t param.
(diagnostic_output_format_init): New decl.
* doc/invoke.texi (-fdiagnostics-format): New option.
* dwarf2out.c (gen_producer_string): Ignore
OPT_fdiagnostics_format_.
* gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
* lto-wrapper.c (append_diag_options): Ignore it.
* opts.c (common_handle_option): Handle it.
2018-11-15 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/88015
* graphite-isl-ast-to-gimple.c
(translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
for dump_enabled_p.
* graphite-sese-to-poly.c (build_poly_scop): Likewise.
2018-11-15 Richard Biener <rguenther@suse.de>
PR middle-end/88029
* gimple.c (gimple_call_flags): Union flags from decl, type
and call fntype.
* trans-mem.c (is_tm_pure_call): Simplify.
2018-11-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/88031
* tree-vect-loop.c (vectorizable_reduction): Move check
for multiple types earlier so we get the expected dump.
Simplify calls to vectorizable_condition.
* tree-vect-stmts.h (vectorizable_condition): Update prototype.
* tree-vect-stmts.c (vectorizable_condition): Instead of
reduc_def and reduc_index take just a flag. Simplify
code-generation now that we can rely on the defs being set up.
(vectorizable_comparison): Remove unused argument.
2018-11-15 Richard Biener <rguenther@suse.de>
PR tree-optimization/88030
* tree-complex.c (need_eh_cleanup): New global.
(update_complex_assignment): Mark blocks that need EH update.
(expand_complex_comparison): Likewise.
(tree_lower_complex): Allocate and deallocate need_eh_cleanup,
perform EH cleanup and schedule CFG cleanup if that did anything.
2018-11-15 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/88018
* cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
on the presence of fallthru edge, rather than if it is a USE or not.
2018-11-15 Richard Biener <rguenther@suse.de>
PR middle-end/87917
* tree-data-ref.c (analyze_miv_subscript): Guard calls to
analyze_subscript_affine_affine properly.
2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
* config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
(GLIBC_DYNAMIC_LINKER): Define.
(LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
PR tree-optimization/84648
* tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
(number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
by calling adjust_cond_for_loop_until_wrap.
2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
PR other/56334
* doc/extend.texi (Common Function Attributes): Clarify linker
restrictions on "aligned" attribute.
(Common Variable Attributes): Likewise. Mention that linker
restrictions don't apply to stack-allocated variables.
2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
* gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
as an lvalue.
2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
PR lto/55102
PR lto/56700
* doc/invoke.texi (Optimize Options): Remove bad example about
interaction between -flto and -O. Replace it with a note that
you need to compile with -O and not just link. Copy-edit -flto
discussion to reduce verbiage and improve flow.
2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/59658
* doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
also suppress many optimizations. Alphabetize option lists for
-O1, -O2, and -Os. Add list of options disabled with -Og, and
correct documentation for those options to say that.
* opts.c (default_options_table): Sort table by level and option
name, to make it easier to correlate to the manual.
2018-11-14 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_print_operand_address_as): Simplify
printing of the names of segment registers.
2018-11-14 Nathan Sidwell <nathan@acm.org>
PR debug/88006
PR debug/87462
* dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
type list.
2018-11-14 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
2018-11-14 Jakub Jelinek <jakub@redhat.com>
P1236R1 - Signed integers are two's complement
* doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
PR bootstrap/86739
* hash-map.h (hash_map::iterator::reference_pair): New class.
(hash_map::iterator::operator*): Return it rather than std::pair.
2018-11-14 Jeff Law <law@redhat.com>
* optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
iff the operand is a constant.
2018-11-14 Aldy Hernandez <aldyh@redhat.com>
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
ignore_equivs_equal_p to equal_p.
* ipa-cp.c (meet_with_1): Use equal_p instead of
ignore_equivs_equal_p.
* ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
* tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
(value_range::operator==): Remove.
(value_range::operator!=): Remove.
(vrp_prop::visit_stmt): Use equal_p.
* tree-vrp.h (value_range): Remove operator==, operator!=,
ignore_equivs_equal_p.
* vr-values.c (update_value_range): Use equal_p.
2018-11-14 Michael Matz <matz@suse.de>
PR middle-end/86575
* gimplify.c (collect_fallthrough_labels): Add new argument,
return location via that, don't modify statements.
(warn_implicit_fallthrough_r): Adjust call, don't use
statement location directly.
2018-11-14 Richard Biener <rguenther@suse.de>
PR middle-end/87985
* tree-data-ref.c (split_constant_offset): Add wrapper
allocating a cache hash-map.
(split_constant_offset_1): Cache results of expanding
expressions from SSA def stmts.
2018-11-14 Richard Biener <rguenther@suse.de>
PR middle-end/88021
* tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
to lambda_int.
(lambda_vector_mult_const): Likewise.
(lambda_matrix_right_hermite): Use lambda_int temporaries.
2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
Jackson Woodruff <jackson.woodruff@arm.com>
PR 71026/tree-optimization
* match.pd: Simplify floating point comparisons.
2018-11-14 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/87817
* config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
last argument has low 8 bits clear, fold to 0.
2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
* tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
MAX_OFILE_ALIGNMENT as needed.
2018-11-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/88019
* graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
COND_EXPR arguments to non-trapping overflow.
2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.h (reg_class): Reorder registers classes, remove
unused register classes.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(FIXED_REGISTERS): Make lp_count fixed.
(BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
(PROGRAM_COUNTER_REGNO): Remove.
* config/arc/arc.c (arc_conditional_register_usage): Remove unused
register classes, use constants for register numbers, remove
reg_class_contents references.
(arc_process_double_reg_moves): Add asserts.
(arc_secondary_reload): Remove LPCOUNT_REG reference, use
lra_in_progress predicate.
(arc_init_reg_tables): Remove unused register classes.
(arc_register_move_cost): Likewise.
(arc_preferred_reload_class): Likewise.
(hwloop_optimize): Update rtx patterns involving lp_count register.
(arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
* config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
CHEAP_CORE_REGS. Former one will be used for LRA.
("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
one will be used for LRA.
("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
one will be used for LRA.
("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
Former one will be used for LRA.
("f"): Delete constraint.
("k"): Likewise.
("e"): Likewise.
("l"): Change it from register constraint to constraint.
* config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
(movhi_insn): Likewise.
(movsi_insn): Update pattern.
(arc_lp): Likewise.
(dbnz): Likewise.
(stack_tie): Remove 'b' constraint letter.
(R4_REG): Define.
(R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
(R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
(R57_REG, R59_REG, PCL_REG): Likewise.
(ILINK1_REGNUM): Renamed to ILINK1_REG.
(ILINK2_REGNUM): Renamed to ILINK2_REG.
(Rgp): Remove.
(SP_REGS): Likewise.
(Rcw): Remove unused reg classes.
* config/arc/predicates.md (dest_reg_operand): Just default on
register_operand predicate.
(mpy_dest_reg_operand): Likewise.
(move_dest_operand): Use macros instead of constants.
* config/arc/arc.opt (mlra): Switch to lra as default.
2018-11-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/87974
* tree-vect-loop.c (vectorizable_reduction): When computing
the vectorized reduction PHI vector type ignore constant
and external defs.
2018-11-14 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87977
* tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
stmt, build a new one and replace the old one with it. Formatting fix.
Call release_ssa_name (x) if !has_other_use and !delete_div.
(pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
verify lhs of stmt is still def.
2018-11-13 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/87507
* lower-subreg.c (operand_for_swap_move_operator): New function.
(simple_move): Strip simple operators.
(find_pseudo_copy): Likewise.
(resolve_operand_for_swap_move_operator): New function.
(resolve_simple_move): Strip simple operators and swap operands.
2018-11-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87898
* omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
(ipa_simd_modify_function_body): Remove debug stmts where the first
argument was changed into a non-decl.
2018-11-13 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/87899
* lra-lives.c (start_living): Update white space in comment.
(enum point_type): New.
(sparseset_contains_pseudos_p): New function.
(update_pseudo_point): Likewise.
(make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
(make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
handling. Move early exit after adding conflicts.
(mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
if regno is already live. Remove all handling of program points.
(mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
after adding conflicts. Remove all handling of program points and
ignore_reg_for_conflicts.
(mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
and do not guard call to mark_pseudo_live.
(mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
and do not guard call to mark_pseudo_dead.
(check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
(process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
Use new function update_pseudo_point. Handle register copies by
removing the source register from the live set. Handle INOUT operands.
Update to the next program point using the unused_set, dead_set and
start_dying sets.
(lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
2018-11-13 David Malcolm <dmalcolm@redhat.com>
* builtins.c: Replace "source_location" with "location_t".
* diagnostic-show-locus.c: Likewise.
* diagnostic.c: Likewise.
* dumpfile.c: Likewise.
* gcc-rich-location.h: Likewise.
* genmatch.c: Likewise.
* gimple.h: Likewise.
* gimplify.c: Likewise.
* input.c: Likewise.
* input.h: Likewise. Eliminate the typedef.
* omp-expand.c: Likewise.
* selftest.h: Likewise.
* substring-locations.h (get_source_location_for_substring):
Rename to...
(get_location_within_string): ...this.
* tree-cfg.c: Replace "source_location" with "location_t".
* tree-cfgcleanup.c: Likewise.
* tree-diagnostic.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-phinodes.c: Likewise.
* tree-phinodes.h: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-phiopt.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa.c: Likewise.
* tree-ssa.h: Likewise.
* tree-vect-loop-manip.c: Likewise.
2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
* doc/extend.texi: Fix typo in the weakref description.
2018-11-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/86991
* tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
group building until we have successfully detected the SLP
reduction.
(vect_is_simple_reduction): Remove fixup code here.
2018-11-13 David Malcolm <dmalcolm@redhat.com>
* dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
(dump_gimple_stmt): Use it.
(dump_gimple_stmt_loc): Likewise.
(dump_gimple_expr): Likewise.
(dump_gimple_expr_loc): Likewise.
(dump_generic_expr): Likewise.
(dump_generic_expr_loc): Likewise.
(dump_printf): Likewise.
(dump_printf_loc): Likewise.
(dump_dec): Likewise.
(dump_dec): Likewise.
(dump_hex): Likewise.
(dump_symtab_node): Likewise.
* gimple-loop-interchange.cc (tree_loop_interchange::interchange):
Guard dump call with dump_enabled_p.
* graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
* graphite-optimize-isl.c (optimize_isl): Likewise.
* graphite.c (graphite_transform_loops): Likewise.
* tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
* tree-parloops.c (parallelize_loops): Likewise.
* tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
* tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
(vect_prune_runtime_alias_test_list): Likewise.
* tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
(vect_estimate_min_profitable_iters): Likewise.
* tree-vect-slp.c (vect_record_max_nunits): Likewise.
(vect_build_slp_tree_2): Likewise.
(vect_supported_load_permutation_p): Likewise.
(vect_slp_analyze_operations): Likewise.
(vect_slp_analyze_bb_1): Likewise.
(vect_slp_bb): Likewise.
* tree-vect-stmts.c (vect_analyze_stmt): Likewise.
* tree-vectorizer.c (try_vectorize_loop_1): Likewise.
(pass_slp_vectorize::execute): Likewise.
(increase_alignment): Likewise.
2018-11-13 David Malcolm <dmalcolm@redhat.com>
PR ipa/87955
* ipa-inline.c (report_inline_failed_reason): Guard calls to
cl_target_option_print_diff and cl_optimization_print_diff with
if (dump_file).
2018-11-13 David Malcolm <dmalcolm@redhat.com>
* doc/invoke.texi (-fsave-optimization-record): Note that the
output is compressed.
* optinfo-emit-json.cc: Include <zlib.h>.
(optrecord_json_writer::write): Compress the output.
2018-11-13 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (value_range_base::dump): Dump type.
Do not use INF nomenclature for 1-bit types.
(dump_value_range): Group all variants to common dumping code.
(debug): New overloaded functions for value_ranges.
(value_range_base::dump): Remove no argument version.
(value_range::dump): Same.
2018-11-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/87931
* tree-vect-loop.c (vect_is_simple_reduction): Restrict
nested cycles we support to latch computations vectorizable_reduction
handles.
2018-11-13 Martin Liska <mliska@suse.cz>
PR tree-optimization/87885
* cfghooks.c (account_profile_record): Rename
to ...
(profile_record_check_consistency): ... this.
Calculate missing num_mismatched_freq_in.
(profile_record_account_profile): New function
that calculates time and size of a function.
* cfghooks.h (struct profile_record): Remove
all tuples.
(struct cfg_hooks): Remove after_pass flag.
(account_profile_record): Rename to ...
(profile_record_check_consistency): ... this.
(profile_record_account_profile): New.
* cfgrtl.c (rtl_account_profile_record): Remove
after_pass flag.
* passes.c (check_profile_consistency): Do only
checking.
(account_profile): Calculate size and time of
function only.
(pass_manager::dump_profile_report): Reformat
output.
(execute_one_ipa_transform_pass): Call
consistency check before clean upand call account_profile
after a clean up is done.
(execute_one_pass): Call check_profile_consistency and
account_profile instead of using after_pass flag..
* tree-cfg.c (gimple_account_profile_record): Likewise.
2018-11-13 Martin Liska <mliska@suse.cz>
PR sanitizer/87930
* config/i386/i386.c (ix86_option_override_internal): Error
about usage -mabi=ms and -fsanitize={,kernel-}address.
2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/aarch64/aarch64.c
(aarch64_vectorize_preferred_vector_alignment): Change return type to
poly_uint64.
(aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
alignment being a poly int.
* doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
return type to poly_uint64.
* target.def (default_preferred_vector_alignment): Likewise.
* targhooks.c (default_preferred_vector_alignment): Likewise.
* targhooks.h (default_preferred_vector_alignment): Likewise.
* tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
(vect_compute_data_ref_alignment): Adapt to vector alignment being a
poly int.
(vect_update_misalignment_for_peel): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
(vect_find_same_alignment_drs): Likewise.
(vect_duplicate_ssa_name_ptr_info): Likewise.
(vect_setup_realignment): Likewise.
(vect_can_force_dr_alignment_p): Change alignment parameter type to
poly_uint64.
* tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
mask with a compile time variable vector alignment.
(vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
int.
(vect_do_peeling): Exit early if vector alignment is not constant.
* tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
a poly int.
(vectorizable_store): Likewise.
(vectorizable_load): Likweise.
* tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
poly_uint64.
(vect_known_alignment_in_bytes): Adapt to vector alignment being a
poly int.
(vect_can_force_dr_alignment_p): Change alignment parameter type to
poly_uint64.
2018-11-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/87962
* tree-vect-loop.c (vect_is_simple_reduction): More reliably
detect outer reduction for disqualifying in-loop uses.
2018-11-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/87967
* tree-vect-loop.c (vect_transform_loop): Also copy PHIs
for constants for the scalar loop.
2018-11-13 Alan Modra <amodra@gmail.com>
* config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
integer constants when -mcmodel=medium.
2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
* config/arc/elf.h (PROFILE_HOOK): Define.
* config/arc/linux.h (PROFILE_HOOK): Likewise.
2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (hwloop_optimize): Bailout when detecting a
jump table data in the text section.
2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_eh_return_address_location): Repurpose it
to fit the eh_return pattern.
* config/arc/arc.md (eh_return): Define.
(VUNSPEC_ARC_EH_RETURN): Likewise.
* config/arc/arc-protos.h (arc_eh_return_address_location): Match
new implementation.
* config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
* common/config/arc/arc-common.c (arc_option_optimization_table):
Millicode optimization is default on for size optimizations.
* config/arc/arc-protos.h (arc_check_multi): New function.
* config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
(ENTER_LEAVE_START_REG): Define.
(ENTER_LEAVE_END_REG): Likewise.
(arc_override_options): Disable millicode when long calls option
is on.
(arc_frame_info): Change it from int to bool.
(arc_compute_frame_size): Clean up.
(arc_save_restore): Remove.
(frame_save_reg): New function.
(frame_restore_reg): Likewise.
(arc_enter_leave_p): Likewise.
(arc_save_callee_saves): Likewise.
(arc_restore_callee_saves): Likewise.
(arc_save_callee_enter): Likewise.
(arc_restore_callee_leave): Likewise.
(arc_save_callee_milli): Likewise.
(arc_restore_callee_milli): Likewise.
(arc_expand_prologue): Reimplement to emit enter/leave
instructions.
(arc_expand_epilogue): Likewise.
(arc_check_multi): New function.
* config/arc/arc.md (push_multi_fp): New pattern.
(push_multi_fp_blink): Likewise.
(pop_multi_fp): Likewise.
(pop_multi_fp_blink): Likewise.
(pop_multi_fp_ret): Likewise.
(pop_multi_fp_blink_ret): Likewise.
* config/arc/arc.opt (mmillicode): Update option.
(mcode-density-frame): New option.
* config/arc/predicates.md (push_multi_operand): New predicate.
(pop_multi_operand): Likewise.
* doc/invoke.texi (ARC): Update ARC options information.
2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (gen_operands_ldd_std): Add.
* config/arc/arc.c (operands_ok_ldd_std): New function.
(mem_ok_for_ldd_std): Likewise.
(gen_operands_ldd_std): Likewise.
* config/arc/arc.md: Add peephole2 rules for std/ldd.
2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
* toplev.c (output_stack_usage): Turn test on flag_stack_usage into
test on stack_usage_file.
(lang_dependent_init): Do not open the .su file if generating LTO.
2018-11-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/87918
* simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
simplify_gen_relational rather than simplify_gen_binary.
2018-11-13 Richard Biener <rguenther@suse.de>
* tree-ssanames.h (set_range_info): Use value_range_base.
(get_range_info): Likewise.
* tree-ssanames.c (set_range_info): Likewise.
(get_range_info): Likewise.
* tree-vrp.c (value_range_base::union_helper): Split
out common parts of value_range[_base]::union_.
(value_range_base::union_): Update.
(value_range::union_): Likewise.
(determine_value_range_1): Use value_range_base.
(determine_value_range): Likewise.
* tree-vrp.h (value_range_base::union_helper): Move ...
(value_range::union_helper): ... from here.
2018-11-13 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
offset for PRE_DEC.
(rs6000_secondary_reload_gpr): Don't call find_replacement.
2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/59634
* doc/invoke.texi (Optimize Options): Clarify that the
l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
apply to data cache size.
2018-11-13 Alan Modra <amodra@gmail.com>
* config/rs6000/predicates.md (logical_const_operand),
(logical_operand): Correct comment.
* config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
2018-11-13 Alan Modra <amodra@gmail.com>
* config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
2018-11-13 Alan Modra <amodra@gmail.com>
* gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
description.
* config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
covered by alternative.
(movcc_internal1): Ignore h for register preference.
(mov<mode>_hardfloat64): Likewise.
(mov<mode>_softfloat): Ignore c, l, h for register preference.
2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
PR preprocessor/47823
* doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
documentation to...
(Pragmas): ...here.
* doc/extend.texi (Pragmas): Note additional pragmas documented
in the CPP manual.
2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/86677
PR middle-end/87528
* tree-scalar-evolution.c (expression_expensive_p): Make
BUILTIN POPCOUNT as expensive when backend does not define it.
2018-11-12 Fredrik Noring <noring@nocrew.org>
* config.gcc: Update with-llsc defaults for MIPS r5900.
2018-11-12 Martin Liska <mliska@suse.cz>
PR gcov-profile/87442
* common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
options.
* doc/invoke.texi: Document them.
* tree-profile.c (parse_profile_filter): New.
(parse_profile_file_filtering): Likewise.
(release_profile_file_filtering): Likewise.
(include_source_file_for_profile): Likewise.
(tree_profiling): Filter source files based on the
newly added options.
2018-11-12 Martin Liska <mliska@suse.cz>
PR target/87903
* doc/extend.texi: Add missing values for __builtin_cpu_is and
__builtin_cpu_supports for x86 target.
2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/21110
* doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
have to be Pmode.
(Arithmetic): Likewise for "lo_sum".
2018-11-12 Renlin Li <renlin.li@arm.com>
PR target/87815
* dse.c (get_stored_val): Add check for compile-time constantness
of gap.
2018-11-12 Sudakshina Das <sudi.das@arm.com>
* config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
(ARMv8_5a): New fgroup.
(armv8.5-a): New arch.
(armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
sb and predres.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
* config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
* config/arm/t-multilib (v8_5_a_simd_variants): New variable.
Add matching rules for -march=armv8.5-a and extensions.
* doc/invoke.texi (ARM options): Document -march=armv8.5-a.
Add sb and predres to all armv8-a except armv8.5-a.
2018-11-12 Richard Biener <rguenther@suse.de>
* tree-vrp.h (value_range[_base]::set): Make public. Provide
overload for single value.
(value_range[_base]::set_nonnull): New.
(value_range[_base]::set_null): Likewise.
(value_range): Document bitmap copying behavior, mark
copy constructor and assignment operator deleted.
(value_range::move): New.
(value_range::set_and_canonicalize): Default bitmap to zero.
(set_value_range_to_nonnull): Remove.
(set_value_range_to_null): Likewise.
(set_value_range): Likewise.
(set_value_range_to_value): Likewise.
(extract_range_from_unary_expr): Work on value_range_base.
(extract_range_from_binary_expr_1): Likewise. Rename to...
(extract_range_from_binary_expr): ... this.
* tree-vrp.c (value_range::update): Clear equiv bitmap
if required.
(value_range::move): New, move equiv bitmap.
(value_range_base::set_undefined): Avoid assignment.
(value_range::set_undefined): Likewise.
(value_range_base::set_varying): Likewise.
(value_range::set_varying): Likewise.
(set_value_range): Remove.
(value_range_base::set): New overload for value.
(value_range::set): Likewise.
(set_value_range_to_nonnull): Remove.
(value_range_base::set_nonnull): New.
(value_range::set_nonnull): Likewise.
(set_value_range_to_null): Remove.
(value_range_base::set_null): New.
(value_range::set_null): Likewise.
(range_is_null): Work on value_range_base.
(range_is_nonnull): Likewise.
(ranges_from_anti_range): Likewise.
(extract_range_into_wide_ints): Likewise.
(extract_range_from_multiplicative_op): Likewise.
(extract_range_from_binary_expr): Likewise. Update for API changes.
(extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
handling.
(value_range::intersect_helper): Avoid copy and assignment.
(value_range::union_helper): Likewise.
(determine_value_range_1): Adjust.
* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
Avoid assignment by using move.
(evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
Likewise.
* tree-ssanames.c (get_range_info): Likewise.
* vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
* vr-values.c (vr_values::get_value_range): Adjust.
(vr_values::update_value_range): Likewise.
(symbolic_range_based_on_p): Work on value_range_base.
(vr_values::extract_range_from_binary_expr): Use value_range_base.
(vr_values::extract_range_from_unary_expr): Likewise.
(vr_values::extract_range_from_cond_expr): Avoid assignment.
(vr_values::extract_range_from_comparison): Adjust.
(vr_values::check_for_binary_op_overflow): Use value_range_base.
(vr_values::extract_range_basic): Adjust.
(vr_values::adjust_range_with_scev): Likewise.
(vr_values::vrp_visit_assignment_or_call): Likewise.
(vr_values::get_vr_for_comparison): Change API to avoid
assignment and copy construction.
(vr_values::compare_name_with_value): Adjust accordingly.
(vr_values::compare_names): Likewise.
(vr_values::extract_range_from_phi_node): Avoid assignment and
bogus in-place modify of equiv bitmap.
(vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
* ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
for extract_range_from_unary_expr API change.
* ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
* config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
2018-11-12 Richard Biener <rguenther@suse.de>
* tree-vrp.h (value_range_base::symbolic_p,
value_range_base::constant_p, value_range_base::zero_p,
value_range_base::singleton_p): Move from value_range.
(value_range::dump): Add.
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
* ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
Use set_varying.
* tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
(value_range::constant_p): Likewise.
(value_range::singleton_p): Likewise.
(value_range_base::dump): Add.
(set_value_range_to_undefined): Remove.
(set_value_range_to_varying): Likewise.
(range_int_cst_p): Take value_range_base argument.
(range_int_cst_singleton_p): Likewise.
(value_range_constant_singleton): Likewise.
(vrp_set_zero_nonzero_bits): Likewise.
(extract_range_from_multiplicative_op): Use set_varying.
(extract_range_from_binary_expr_1): Likewise. Use set_undefined.
(extract_range_from_unary_expr): Likewise.
(dump_value_range_base): Change to overload of dump_value_range.
(vrp_prop::vrp_initialize): Use set_varying and set_undefined.
(vrp_prop::visit_stmt): Likewise.
(value_range::intersect_helper): Likewise.
(value_range::union_helper): Likewise.
(determine_value_range_1): Likewise.
2018-11-12 Richard Biener <rguenther@suse.de>
* tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
(set_value_range_to_null): Likewise.
* vr-values.c (vr_values::extract_range_from_comparison):
Clear equiv for constant singleton ranges.
2018-11-12 Wei Xiao <wei3.xiao@intel.com>
* config/i386/sse.md: Combine VFIXUPIMM* patterns
(<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
(<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
(<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
(avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
(avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
(avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
PR c/69502
* doc/extend.texi (Common Type Attributes): For the align type
attribute, copy language about decreasing alignment from the
corresponding variable attribute.
2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
* config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
-frounding-math.
2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
PR c++/43105
* doc/invoke.texi (C++ Dialect Options): Add warning about mixing
-frtti and -fno-rtti code.
2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
PR c/26366
* doc/extend.texi (Other Builtins): Document probability associated
with __builtin_expect.
2018-11-11 Uros Bizjak <ubizjak@gmail.com>
PR target/87928
* config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
instead of (TARGET_64BIT && ix86_abi == MS_ABI).
* config/i386/darwin.h (STACK_BOUNDARY): Ditto.
* config/i386/cygming.h (STACK_BOUNDARY): Remove.
2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
* config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
* config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2018-11-11 Richard Biener <rguenther@suse.de>
* tree-vrp.h (class value_range_base): New base class for
value_range containing all but the m_equiv member.
(dump_value_range_base): Add.
(range_includes_zero_p): Work on value_range_base.
* tree-vrp.c (value_range_base::set): Split out base handling
from...
(value_range::set): this.
(value_range::set_equiv): New.
(value_range_base::value_range_base): New constructors.
(value_range_base::check): Split out base handling from...
(value_range::check): this.
(value_range::equal_p): Refactor in terms of
ignore_equivs_equal_p which is now member of the base.
(value_range_base::set_undefined): New.
(value_range_base::set_varying): Likewise.
(value_range_base::dump):Split out base handling from...
(value_range::dump): this.
(value_range_base::set_and_canonicalize): Split out base handling
from...
(value_range::set_and_canonicalize): this.
(value_range_base::union_): New.
* ipa-prop.h (struct ipa_jump_func): Use value_range_base *
for m_vr.
* ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
instead of value_range everywhere.
(ipcp_vr_lattice::print): Use dump_value_range_base.
(ipcp_vr_lattice::meet_with): Adjust.
(ipcp_vr_lattice::meet_with_1): Likewise.
(ipa_vr_operation_and_type_effects): Likewise.
(propagate_vr_across_jump_function): Likewise.
* ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
(ipa_get_value_range): Likewise.
(ipa_set_jfunc_vr): Likewise.
(ipa_compute_jump_functions_for_edge): Likewise.
2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/65703
* doc/invoke.texi (Optimize Options): Add @opindex entries
for the positive forms of -fno-xxx and -mno-xxx options
that were lacking them.
2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
* combine.c (make_more_copies): Only make an intermediate copy if the
dest of a move is a pseudo.
2018-11-09 Maya Rashish <coypu@sdf.org>
PR target/87221
* config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
(NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
PR driver/41179
PR middle-end/65703
* doc/invoke.texi (Optimize Options): Clarify default behavior
for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR tree-optimization/87940
* expr.c (string_constant): Don't strip NOPS in subexpressions.
Fold PLUS_EXPR correctly.
2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/87762
* config/s390/s390.c (s390_safe_relative_long_p): New function.
(annotate_constant_pool_refs): Skip insns which support
relative addressing.
(annotate_constant_pool_refs_1): New helper function.
(find_constant_pool_ref): Skip insns which support relative
addression.
(find_constant_pool_ref_1): New helper function.
(replace_constant_pool_ref): Skip insns which support
relative addressing.
(replace_constant_pool_ref_1): New helper function.
(s390_mainpool_start): Adapt to the new signature.
(s390_mainpool_finish): Likewise.
(s390_chunkify_start): Likewise.
(s390_chunkify_finish): Likewise.
(pass_s390_early_mach::execute): Likewise.
(s390_prologue_plus_offset): Likewise.
(s390_emit_prologue): Likewise.
(s390_emit_epilogue): Likewise.
2018-11-09 Jakub Jelinek <jakub@redhat.com>
* gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
but unsupported lastprivate with conditional modifier.
2018-11-09 Jeff Law <law@redhat.com>
* config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
unused argument better. Add gcc_unreachable to silence warning.
2018-11-09 Martin Sebor <msebor@redhat.com>
PR middle-end/81824
* attribs.c (has_attribute): New helper function.
(decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
* attribs.h (decls_mismatched_attributes): Declare.
* cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
(maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
* common.opt (-Wattribute-alias): Take an argument.
(-Wno-attribute-alias): New option.
* doc/extend.texi (Common Function Attributes): Document copy.
(Common Variable Attributes): Same.
* doc/invoke.texi (-Wmissing-attributes): Document enhancement.
(-Wattribute-alias): Document new option argument.
2018-11-09 Richard Earnshaw <rearnsha@arm.com>
* config/arm/parsecpu.awk (/alias/): Tighten invisible alias
matching criteria. Remove unused array initializer.
2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
Jinsong Ji <jji@us.ibm.com>
* config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
constraints by introducing a new temporary.
(_mm_cvtss_si64): Likewise.
2018-11-09 Martin Liska <mliska@suse.cz>
* common.opt: Add -fipa-stack-alignment flag.
* doc/invoke.texi: Document it.
* final.c (rest_of_clean_state): Guard stack
shrinking with flag.
2018-11-09 Martin Liska <mliska@suse.cz>
* cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
to ...
(ipa_discover_variable_flags): ... this.
* common.opt: Come up with new flag -fipa-reference-addressable.
* doc/invoke.texi: Document it.
* ipa-reference.c (propagate): Call the renamed fn.
* ipa-visibility.c (whole_program_function_and_variable_visibility):
Likewise.
* ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
...
(ipa_discover_variable_flags): ... this. Discover
non-addressable variables only with the newly added flag.
* opts.c: Enable the newly added flag with -O1 and higher
optimization level.
2018-11-09 David Malcolm <dmalcolm@redhat.com>
* json.cc (selftest::test_writing_literals): Fix comment.
2018-11-09 Martin Liska <mliska@suse.cz>
* config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
string to a stack buffer.
(aarch64_parse_cpu): Likewise.
(aarch64_parse_tune): Likewise.
2018-11-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/87953
* tree-vect-loop.c (vectorizable_reduction): For analysis
always pass ops[0] to vectorizable_condition.
2018-11-09 Stafford Horne <shorne@gmail.com>
Richard Henderson <rth@twiddle.net>
Joel Sherrill <joel@rtems.org>
* common/config/or1k/or1k-common.c: New file.
* config/or1k/*: New.
* config.gcc (or1k*-*-*): New.
* configure.ac (or1k*-*-*): New test for openrisc tls.
* configure: Regenerated.
* doc/install.texi: Document OpenRISC triplets.
* doc/invoke.texi: Document OpenRISC arguments.
* doc/md.texi: Document OpenRISC.
2018-11-09 Richard Earnshaw <rearnsha@arm.com>
* config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
(arm7tdmi-s): Delete CPU.
(arm710t): Add aliases for arm720t and arm740t.
(arm720t, arm740t): Delete CPUs.
(arm920t): Add aliases for arm920, arm922t and arm940t.
(arm920, arm922t, arm940t): Delete CPUs.
(arm10tdmi): Add alias for arm1020t.
(arm1020t): Delete CPU.
(arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
(arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
(arm10e): Add aliases for arm1020e and arm1022e.
(arm1020e, arm1022e): Delete CPU.
* config/arm/arm.md (generic_sched): Remove entries that are now
handled by aliases.
(generic_vfp): Likewise.
* config/arm/arm1020e.md: Simplify tuning selection based on alias
changes.
* config/arm/arm-tune.md: Regenerated.
* config/arm/arm-tables.opt: Regenerated.
2018-11-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/87621
* tree-vect-loop.c (vectorizable_reduction): Handle reduction
op with only phi inputs.
* tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
(ch_base::copy_headers): Run CSE on copied loop headers.
(pass_ch_vect::process_loop_p): Simplify.
2018-11-09 Alexandre Oliva <oliva@adacore.com>
* config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
for non-w64 x86_64 biarch.
2018-11-09 Alexandre Oliva <aoliva@redhat.com>
PR rtl-optimization/86438
* compare-elim.c (try_eliminate_compare): Use SET_SRC instead
of in_b for the compare if in_b is SET_DEST.
PR target/87793
* config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
non-toplevel UNSPEC.
2018-11-08 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (value_range::check): Do not access internals
directly.
(value_range::singleton_p): Same.
(value_range::type): Same.
(vrp_finalize): Use value_range API.
2018-11-08 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
2018-11-08 Aldy Hernandez <aldyh@redhat.com>
* vr-values.c (vr_values::get_value_range): Use value_range API
instead of piecing together ranges.
(vr_values::update_value_range): Same.
2018-11-08 Aldy Hernandez <aldyh@redhat.com>
* gimple-fold.c (size_must_be_zero_p): Use value_range API instead
of performing ad-hoc calculations.
* tree-ssanames.c (set_range_info): New overloaded function
accepting value_range &.
(get_range_info): Same.
* tree-ssanames.h (set_range_info_raw): Remove.
(set_range_info): New prototype.
(get_range_info): Same.
* tree-vrp.h (value_range::null_p): Rename to zero_p.
* tree-vrp.c (value_range::null_p): Same.
2018-11-09 Jan Hubicka <jh@suse.cz>
* tree.c (fld_type_variant_equal_p): Test user align flag.
(flt_type_variant): Copy user align flag.
(fld_incomplete_type_of): Clear it.
2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* config/arm/neon.md (div<mode>3): New pattern.
2018-11-08 Andi Kleen <ak@linux.intel.com>
* common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
(OPTION_MASK_ISA_PTWRITE_UNSET): New.
(ix86_handle_option): Handle OPT_mptwrite.
* config/i386/cpuid.h (bit_PTWRITE): Add.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
* config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
* config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
* config/i386/i386.c (ix86_target_string): Handle ptwrite.
(ix86_option_override_internal): Handle PTA_PTWRITE.
(ix86_valid_target_attribute_inner_p): Define ptwrite.
(def_builtin2): Force UINT64 to be 64bit only.
* config/i386/i386.h (TARGET_PTWRITE): Add.
(TARGET_PTWRITE_P): Add.
(PTA_PTWRITE): Add.
* config/i386/i386.md: Define ptwrite.
* config/i386/i386.opt: Add -mptwrite.
* config/i386/immintrin.h (_ptwrite64): Add.
(_ptwrite32): Add
* doc/extend.texi: Document __builtin_ia32_ptwrite*.
* doc/invoke.texi: Document -mptwrite.
2018-11-08 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/87600
* cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
* lra-constraints.c (process_alt_operands): Skip illegal hard
register usage. Prefer reloading non hard register operands.
2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
PR other/36572
* doc/invoke.texi (Optimize Options): Clarify default behavior
for -fno-sched-interblock and -fno-sched-spec.
2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
* collect2.c (linker_select): Add USE_LLD_LD.
(ld_suffixes): Add ld.lld.
(main): Handle -fuse-ld=lld.
* common.opt (-fuse-ld=lld): New option.
* doc/invoke.texi (-fuse-ld=lld): Document.
* opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2018-11-08 Paul Koning <ni1d@arrl.net>
* config/pdp11/constraints.md: Add "Z" series constraints for use
with pre-dec and post-inc addressing.
* config/pdp11/pdp11-protos.m (expand_block_move): Delete.
(pdp11_expand_operands): Add int argument (word count).
(pdp11_sp_frame_offset): Delete.
(pdp11_cmp_length): New function.
(pushpop_regeq): New function.
* config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
Add hook.
(pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
frame layout.
(pdp11_initial_elimination_offset): Ditto.
(pdp11_expand_operands): Add word count argument. Bugfixes.
(output_move_multiple): Change how pointer adjustment is done.
(pdp11_gen_int_label): Correct format.
(output_ascii): Ditto.
(pdp11_asm_output_var): Add code for DEC assembler case.
(pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
value.
(legitimate_const_double_p): Ditto.
(pdp11_register_move_cost): Adjust for new register classes.
(pdp11_regno_reg_class): Ditto.
(expand_block_move): Delete.
(pushpop_regeq): New function.
(pdp11_legitimate_address_p): Bugfix in check for constant
offset.
(pdp11_sp_frame_offset): Delete.
(pdp11_reg_save_size): New helper function for new frame layout.
(output_addr_const_pdp11): Remove CONST_DOUBLE case.
(pdp11_expand_shift): Bugfix in check for constant shift count.
(pdp11_shift_length): Ditto.
(pdp11_assemble_shift): Copy input to pdp11_expand_operands.
(pdp11_cmp_length): New function.
* config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
some compile options.
(FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
(CALL_USED_REGISTERS): Ditto.
(ELIMINABLE_REGS): Ditto.
(REGISTER_NAMES): Ditto.
(reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
constraints.
(REG_CLASS_NAMES): Ditto.
(REG_CLASS_CONTENTS): Ditto. Also remove
HARD_FRAME_POINTER_REGNUM.
(CPU_REG_CLASS): New macro.
(CLASS_MAX_NREGS): Adjust for new register classes.
(FUNCTION_PROFILER): Make no-op.
(may_call_alloca): Remove unused declaration.
(ASM_OUTPUT_ALIGN): Add workaround for PR87795.
(ASM_OUTPUT_SKIP): Fix format.
* config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
(HARD_FRAME_POINTER_REGNUM): Remove.
(return): Delete.
(*rts): Rename. Remove epilogue related checks.
(cmpsi, cmpdi): New insn.
(cbranch<mode>4): Change to apply to SI and DI modes as well.
(mov<mode>): Change constraints to enforce that push/pop
destination cannot use the same register as source.
(*mov<mode><cc_cc>): Ditto.
(movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
at assembly output rather than as RTL expander.
(zero_extendqihi2): Bugfix in check for same registers.
(adddi3_nocc): Bugfix in check for constant operand.
(addsi3_nocc): Ditto.
(subdi3_nocc): Ditto.
(subsi3_nocc): Ditto.
(negdi2_nocc): Copy input to pdp11_expand_operands.
(negsi2_nocc): Ditto.
(bswap2_nocc): Ditto.
* config/pdp11/pdp11.opt (mlra): Fix documentation.
* config/pdp11/t-pdp11: Use -Os.
2018-11-08 Richard Earnshaw <rearnsha@arm.com>
* config/arm/parsecpu.awk (/alias/): New parsing rule.
(/begin cpu/): Check that the cpu name hasn't been previously defined.
(gen_comm_data): Print out CPU alias tables.
(check_cpu): Match aliases when checking the CPU name.
* config/arm/arm-protos.h (cpu_alias): New structure.
(cpu_option): Add entry for aliases.
* config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
strongarm1100 and strongarm1110.
(strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
(config/arm/arm-generic.md): Remove redundant references to
strongarm110, strongarm1100 and strongarm1110.
* common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
Scan aliases for additional hints.
(arm_parse_cpu_option_name): Also match a cpu name against the list
of aliases.
* config/arm/arm-tables.opt: Regenerated.
* config/arm/arm-tune.md: Regenerated.
2018-11-08 Jakub Jelinek <jakub@redhat.com>
* builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
* gengtype.c (open_base_files): Add omp-general.h.
* gimple.c (gimple_build_omp_critical):
(gimple_build_omp_taskgroup): Add CLAUSES argument. Call
gimple_omp_taskgroup_set_clauses.
(gimple_build_omp_atomic_load): Add mo argument, call
gimple_omp_atomic_set_memory_order.
(gimple_build_omp_atomic_store): Likewise.
(gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
* gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
instead of GSS_OMP.
(GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
of GSS_OMP_SINGLE_LAYOUT, adjust comments.
* gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
different value for GF_OMP_ATOMIC_NEED_VALUE.
(struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
comments.
(struct gimple_statement_omp_single_layout): And remove here.
(struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
than gimple_statement_omp_single_layout.
(is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
GIMPLE_OMP_TEAMS.
(is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
(gimple_omp_subcode): Formatting fix.
(gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
gimple_omp_teams_host, gimple_omp_teams_set_host,
gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
gimple_omp_taskgroup_set_clauses): New inline functions.
(gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
(gimple_build_omp_atomic_store): Likewise.
(gimple_omp_atomic_seq_cst_p): Remove.
(gimple_omp_atomic_memory_order): New function.
(gimple_omp_atomic_set_seq_cst): Remove.
(gimple_omp_atomic_set_memory_order): New function.
(gimple_build_omp_taskgroup): Add clauses argument.
* gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
(dump_gimple_omp_task): Print taskwait with depend clauses.
(dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
dump_omp_atomic_memory_order.
(pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
* gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
(enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
ORT_UNTIED_TASKLOOP enumerators.
(enum gimplify_defaultmap_kind): New.
(struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
target_map_pointers_as_0len_arrays members, add defaultmap.
(new_omp_context): Initialize defaultmap member.
(gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
(maybe_fold_stmt): Don't fold even in host teams regions.
(omp_firstprivatize_variable): Handle ORT_TASKGROUP like
ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
ctx->omp_firstprivatize_variable.
(omp_add_variable): Don't add private/firstprivate for VLAs in
ORT_TASKGROUP.
(omp_default_clause): Print "taskloop" rather than "task" if
ORT_*TASKLOOP.
(omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
Handle new defaultmap clause kinds.
(omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
iterator to be lastprivate or private. Fix up diagnostics if linear
is used on collapse>1 simd iterator.
(omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
(gimplify_omp_depend): New function.
(gimplify_scan_omp_clauses): Add shared clause on parallel for
combined parallel master taskloop{, simd} if taskloop has
firstprivate, lastprivate or reduction clause. Handle
OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
lastprivate.
(gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
OMP_CLAUSE_{TASK,IN}_REDUCTION.
(gimplify_omp_task): Handle taskwait with depend clauses.
(gimplify_omp_for): Add shared clause on parallel for combined
parallel master taskloop{, simd} if taskloop has firstprivate,
lastprivate or reduction clause. Use ORT_TASKLOOP or
ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
__for_end and __for_range temporaries on OMP_PARALLEL for
distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
sandwiched in between two taskloops.
(computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
instead of ctx->omp_firstprivatize_variable.
(gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
host teams, use gimplify_and_return_first etc. for body like
for target or target data constructs, and at the end call
gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
(gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
of OMP_ATOMIC_SEQ_CST, pass it as new argument to
gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
gimple_omp_atomic_set_seq_cst calls.
(gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
case, handle taskgroup clauses.
* lto-streamer-out.c (hash_tree): Handle
OMP_CLAUSE_{TASK,IN}_REDUCTION.
* Makefile.in (GTFILES): Add omp-general.h.
* omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
BUILT_IN_GOMP_LOOP_DOACROSS_START,
BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
* omp-expand.c (workshare_safe_to_combine_p): Return false for
non-worksharing loops.
(omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
(determine_parallel_type): Don't combine parallel with worksharing
which has _reductemp_ clause.
(expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
if there is nonmonotonic modifier or if there is no modifier and no
ordered clause. For dynamic and guided schedule without monotonic
and nonmonotonic modifier, default to nonmonotonic.
(expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
task reductions.
(expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
there are any reduction clauses.
(expand_taskwait_call): New function.
(expand_teams_call): New function.
(expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
expand_teams_call for it. Formatting fix. Handle taskwait with
depend clauses.
(expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
of worksharing loops with task reductions.
(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
expansion of worksharing loops with task reductions.
(expand_omp_sections): Handle expansion of sections with task
reductions.
(expand_omp_synch): For host teams call expand_omp_taskreg.
(omp_memory_order_to_memmodel): New function.
(expand_omp_atomic_load, expand_omp_atomic_store,
expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
instead of gimple_omp_atomic_seq_cst_p.
(build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
depend clauses as a standalone directive.
* omp-general.c (enum omp_requires): New variable.
(omp_extract_for_data): Initialize have_reductemp member. Allow
NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
GT_EXPR loops depending on incr sign. Formatting fixes.
* omp-general.h (struct omp_for_data): Add have_reductemp member.
(enum omp_requires): New enum.
(omp_requires_mask): Declare.
* omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
Fix comment typos.
* omp-low.c (struct omp_context): Add task_reductions and
task_reduction_map fields.
(is_host_teams_ctx): New function.
(is_taskreg_ctx): Return true also if is_host_teams_ctx.
(use_pointer_for_field): Use is_global_var instead of
TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
in outer contexts.
(build_outer_var_ref): Ignore taskgroup outer contexts.
(delete_omp_context): Release task_reductions and task_reduction_map.
(scan_sharing_clauses): Don't add any fields for reduction clause on
taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
Handle OMP_CLAUSE_NONTEMPORAL.
(add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
needed.
(scan_omp_parallel): Add _reductemp_ clause if there are any reduction
clauses with task modifier.
(scan_omp_task): Handle taskwait with depend clauses.
(finish_taskreg_scan): Move field corresponding to _reductemp_ clause
first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
(scan_omp_for): Fix comment formatting.
(scan_omp_teams): Handle host teams constructs.
(check_omp_nesting_restrictions): Allow teams with no outer
OpenMP context. Adjust diagnostics for teams strictly nested into
some explicit OpenMP construct other than target. Allow OpenMP atomics
inside of simd regions.
(scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
(scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
taskreg_nesting_level while scanning host teams construct.
(task_reduction_read): New function.
(lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
second argument create_tmp_var if it is NULL. Don't ignore shared
clauses in is_host_teams_ctx contexts. Handle
OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
clauses.
(lower_reduction_clauses): Ignore reduction clauses with task
modifier. Remove second argument create_tmp_var if it is NULL.
Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
(lower_send_clauses): Ignore reduction clauses with task modifier.
Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
(maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
rely that it is the last stmt in body so far. Ignore outer taskgroup
contexts.
(omp_task_reductions_find_first, omp_task_reduction_iterate,
lower_omp_task_reductions): New functions.
(lower_omp_sections): Handle reduction clauses with taskgroup
modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
(lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
(lower_omp_for): Likewise. Handle reduction clauses with taskgroup
modifiers.
(lower_omp_taskgroup): Handle taskgroup reductions.
(create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
(lower_depend_clauses): If there are any
OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
seen, assume lowering is done already and return early. Set kind
on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
(lower_omp_taskreg): Handle reduction clauses with task modifier on
parallel construct. Handle reduction clause on taskloop construct.
Handle taskwait with depend clauses.
(lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
for host teams constructs.
* tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
nontemporal and _reductemp_ clause entries.
(omp_clause_code_name): Likewise.
(walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
* tree-core.h (enum omp_clause_code): Add
OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
(enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
(struct tree_base): Add omp_atomic_memory_order field into union.
Remove OMP_ATOMIC_SEQ_CST comment.
(enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
and OMP_CLAUSE_DEPEND_DEPOBJ.
(struct tree_omp_clause): Add subcode.defaultmap_kind.
* tree.def (OMP_TASKGROUP): Add another operand, move next to other
OpenMP constructs with body and clauses operands.
* tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
(OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
(OMP_TASKGROUP_CLAUSES): Define.
(OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
OMP_CLAUSE__LOOPTEMP_.
(OMP_ATOMIC_SEQ_CST): Remove.
(OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
(OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
(OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
Define.
* tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
* tree-nested.c (convert_nonlocal_omp_clauses): Handle
OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
(convert_local_omp_clauses): Likewise. Remove useless test.
* tree-parloops.c (create_call_for_reduction_1): Pass
OMP_MEMORY_ORDER_RELAXED as new argument to
dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
* tree-pretty-print.c (dump_omp_iterators): New function.
(dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
OMP_CLAUSE_DEFAULTMAP. Print conditional: for
OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
(dump_omp_atomic_memory_order): New function.
(dump_generic_node): Use it. Print taskgroup clauses. Print
taskwait with depend clauses.
* tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
* tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
* tree-streamer-out.c (pack_ts_omp_clause_value_fields,
write_ts_omp_clause_tree_pointers): Likewise.
2018-11-08 David Malcolm <dmalcolm@redhat.com>
PR ipa/86395
* doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
"-missed", "-note", and "-all" sub-options.
* ipa-inline.c (caller_growth_limits): Port from fprintf to dump
API.
(can_early_inline_edge_p): Likewise.
(want_early_inline_function_p): Likewise.
(want_inline_self_recursive_call_p): Likewise.
(recursive_inlining): Likewise.
(inline_small_functions): Likewise.
(flatten_function): Likewise.
(ipa_inline): Likewise.
(inline_always_inline_functions): Likewise.
(early_inline_small_functions): Likewise.
(early_inliner): Likewise.
* tree-inline.c (expand_call_inline): Likewise.
2018-11-08 David Malcolm <dmalcolm@redhat.com>
* pretty-print.c (pp_format): Handle %f.
(selftest::test_pp_format): Add test of %f.
* pretty-print.h (pp_double): New macro.
2018-11-08 David Malcolm <dmalcolm@redhat.com>
* dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
* dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
(dump_pretty_printer::decode_format): Implement "%C" for
cgraph_node *.
(selftest::test_capture_of_dump_calls): Rename "where" to
"stmt_loc". Convert test_decl to a function decl and set its
location. Add a symbol_table_test RAII instance and a
cgraph_node, using it to test "%C" and dump_symtab_node.
2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/87916
* cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
2018-11-08 David Malcolm <dmalcolm@redhat.com>
* cgraph.c: Include "selftest.h".
(saved_symtab): New variable.
(selftest::symbol_table_test::symbol_table_test): New ctor.
(selftest::symbol_table_test::~symbol_table_test): New dtor.
(selftest::test_symbol_table_test): New test.
(selftest::cgraph_c_tests): New.
* cgraph.h (saved_symtab): New decl.
(selftest::symbol_table_test): New class.
* selftest-run-tests.c (selftest::run_tests): Call
selftest::cgraph_c_tests.
* selftest.h (selftest::cgraph_c_tests): New decl.
2018-11-08 Richard Biener <rguenther@suse.de>
* tree-data-ref.h (lambda_int): New typedef.
(lambda_vector_gcd): Adjust.
(lambda_vector_new): Likewise.
(lambda_matrix_new): Likewise.
* tree-data-ref.c (print_lambda_vector): Adjust.
2018-11-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/87929
* tree-complex.c (expand_complex_comparison): Clean EH.
2018-11-08 Martin Liska <mliska@suse.cz>
* doc/extend.texi: Reword.
* predict.c (expr_expected_value_1): Likewise.
2018-11-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/87913
* tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
of extreme values to ordered comparisons.
2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
PR middle-end/42726
* doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi: Remove leading dash from @opindex entries
throughout the file.
2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
PR driver/80828
* doc/invoke.texi (Option Summary): Add -e and --entry.
(Link Options): Likewise.
2018-11-07 Nathan Sidwell <nathan@acm.org>
PR 87926
* Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
--disable-checking bootstrap.
2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
* configure: Regenerated.
2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
PR c/87691
* stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
to the mode of the widest field iff the widest field has mode class
MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
reference.
2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
* common.opt: Add -Wattribute-warning.
* doc/invoke.texi: Add documentation for -Wno-attribute-warning.
* expr.c (expand_expr_real_1): Add new attribute to warning_at
call to allow user configure behavior of "warning" attribute.
2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
* target.def: Put @: after every vs., e.g., and i.e. where it is
followed by whitespace.
* doc/extend.texi: Ditto.
* doc/fragments.texi: Ditto.
* doc/gimple.texi: Ditto.
* doc/implement-c.texi: Ditto.
* doc/install.texi: Ditto.
* doc/invoke.texi: Ditto.
* doc/md.texi: Ditto.
* doc/plugins.texi: Ditto.
* doc/rtl.texi: Ditto.
* doc/sourcebuild.texi: Ditto.
* doc/tm.texi.in: Ditto.
* doc/ux.texi: Ditto.
* doc/tm.texi: Regenerate.
2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (ares): New entry.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm-tune.md: Likewise.
* doc/invoke.texi (ARM Options): Document ares.
2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-cores.def (ares): Define.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options): Document ares value for mtune.
2018-11-07 Jan Hubicka <jh@suse.cz>
* tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
(free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
TYPE_DECL.
2018-11-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/87914
* tree-vect-loop.c (vect_is_simple_reduction): Improve detection
of nested cycles.
(vectorizable_reduction): Handle shifts and rotates by dispatching
to vectorizable_shift.
* tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
in-loop uses of vect_nested_cycle defs. Merge cycle and internal
def cases.
(vectorizable_shift): Export and handle being called as
vect_nested_cycle.
(vect_analyze_stmt): Call vectorizable_shift after
vectorizable_reduction.
* tree-vectorizer.h (vectorizable_shift): Declare.
2018-11-07 Jan Hubicka <jh@suse.cz>
* ipa-devirt.c (odr_types_equivalent_p): Expect constants
than const decls in TREE_VALUE of enum.
(dump_type_inheritance_graph): Improve duplicate dumping.
(free_enum_values): New.
(build_type_inheritance_graph): Use it.
* tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
which are not main variants or not ODR types.
(verify_type_variant): Expect variants to have no TYPE_VALUES.
2018-11-07 Richard Biener <rguenther@suse.de>
* ipa-inline.c (want_inline_small_function_p): Compute
big_speedup_p lazily and last.
2018-11-07 Jan Hubicka <jh@suse.cz>
* tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
building incomplete variant of complete type.
(fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
variant of complete type.
2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
* config/mips/mips.c: Fix typo in documentation of
mips_loongson_ext2_prefetch_cookie.
(mips_option_override): fix brain twister logical.
* config/mips/mips.h: Fix typo in documentation of
ISA_HAS_CTZ_CTO and define pattern.
* config/mips/mips.md (prefetch): Hoist EXT2 above
the 2EF/EXT block.
(prefetch_indexed): Hoist EXT2 above the EXT block.
2018-11-07 Jan Hubicka <jh@suse.cz>
* tree.c (free_lang_data_in_type): Add fld parameter; simplify
return and parameter types of function and method types.
(free_lang_data_in_cgraph): Update.
2018-11-07 Martin Liska <mliska@suse.cz>
PR rtl-optimization/87868
* postreload-gcse.c (eliminate_partially_redundant_load): Set
threshold to max_count if we would overflow.
* profile-count.h: Make max_count a public constant.
2018-11-07 Martin Liska <mliska@suse.cz>
* mem-stats.h: Fix GNU coding style.
2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
* config/mips/gs264e.md: New.
* config/mips/mips-cpus.def: Define gs264e.
* config/mips/mips-tables.opt: Regenerate.
* config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
gs264e.
(mips_issue_rate): Add support for gs264e.
(mips_multipass_dfa_lookahead): Likewise.
* config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
(MIPS_ASE_MSA_SPEC): New.
(BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
(ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
* config/mips/mips.md: Include gs264e.md.
(processor): Add gs264e.
* config/mips/mips.opt (MSA): Use Mask instead of Var.
* doc/invoke.texi: Add gs264e to supported architectures.
2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
* config/mips/gs464e.md: New.
* config/mips/mips-cpus.def: Define gs464e.
* config/mips/mips-tables.opt: Regenerate.
* config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
gs464e.
(mips_issue_rate): Add support for gs464e.
(mips_multipass_dfa_lookahead): Likewise.
(mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
* config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
(ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
(ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
* config/mips/mips.md: Include gs464e.md.
(processor): Add gs464e.
* doc/invoke.texi: Add gs464e to supported architectures.
2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
* config/mips/loongson3a.md: Rename to ...
* config/mips/gs464.md: ... here.
* config/mips/mips-cpus.def: Define gs464; Add loongson3a
as an alias of gs464 processor.
* config/mips/mips-tables.opt: Regenerate.
* config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
instead of PROCESSOR_LOONGSON_3A.
(mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
TUNE_LOONGSON_3A.
(mips_option_override): Enable MMI and EXT for gs464.
* config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
Rename TUNE_LOONGSON_3A to TUNE_GS464.
(MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
(ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
TARGET_LOONGSON_3A.
* config/mips/mips.md: Include gs464.md instead of loongson3a.md.
(processor): Add gs464;
* doc/invoke.texi: Add gs464 to supported architectures.
2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
* config/mips/mips-protos.h
(mips_loongson_ext2_prefetch_cookie): New prototype.
* config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
(mips_option_override): Enable TARGET_LOONGSON_EXT when
TARGET_LOONGSON_EXT2 is true.
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
__mips_loongson_ext2, __mips_loongson_ext_rev=2.
(ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
(ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
TARGET_LOONGSON_EXT2.
(ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
(define_insn "ctz<mode>2"): New insn pattern.
(define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
(define_insn "prefetch_indexed_<mode>"): Include
TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
* config/mips/mips.opt (-mloongson-ext2): Add option.
* gcc/doc/invoke.texi (-mloongson-ext2): Document.
2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
* config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
__mips_loongson_ext.
(MIPS_ASE_LOONGSON_EXT_SPEC): New.
(BASE_DRIVER_SELF_SPECS): march=loongson3a implies
-mloongson-ext.
(ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
* config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
<u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
instead of TARGET_LOONGSON_3A.
* config/mips/mips.opt (-mloongson-ext): Add option.
* gcc/doc/invoke.texi (-mloongson-ext): Document.
2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
* config.gcc (extra_headers): Add loongson-mmiintrin.h.
* config/mips/loongson.md: Move to ...
* config/mips/loongson-mmi.md: here; Adjustment.
* config/mips/loongson.h: Move to ...
State as deprecated. Include loongson-mmiintrin.h for back
compatibility and warning.
* config/mips/loongson-mmiintrin.h: ... here.
* config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
(mips_option_override): Make sure MMI use hard float;
(mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
TARGET_LOONGSON_VECTORS.
* gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
(TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
(MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
(BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
-mloongson-mmi.
(SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
TARGET_LOONGSON_VECTORS.
* gcc/config/mips/mips.md (MOVE64, MOVE128): Use
TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
(Loongson MMI patterns): Include loongson-mmi.md instead of
loongson.md.
* gcc/config/mips/mips.opt (-mloongson-mmi): New option.
* gcc/doc/invoke.texi (-mloongson-mmi): Document.
2018-11-07 Richard Biener <rguenther@suse.de>
PR lto/87906
* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
2018-11-07 Alexandre Oliva <aoliva@redhat.com>
PR rtl-optimization/87874
* lra.c (lra_substitute_pseudo): Do not create a subreg for
const wide ints.
2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000.md (bswap<mode>2): Force address into register
if not in indexed or indirect form.
(bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
(bswap<mode>2_store): Ditto.
2018-11-06 Richard Earnshaw <rearnsha@arm.com>
* config/aarch64/aarch64.md (speculation_tracker): Set the mode for
the UNSPEC.
2018-11-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/86850
* vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
instead of src.m_vec.
2018-11-06 Jan Hubicka <jh@suse.cz>
* tree.c (fld_simplified_type_name): Break out form ...
(free_lang_data_in_type): ... here.
(fld_type_variant_equal_p): Use it.
2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/default-d.c: Include memmodel.h.
* config/sol2-d.c: New file.
* config/t-sol2 (sol2-d.o): New rule.
* config.gcc <*-*-solaris2*>: Set d_target_objs,
target_has_targetdm.
2018-11-06 Jan Hubicka <jh@suse.cz>
* tree.c (fld_type_variant): Also copy alignment; be sure that
new variant is equal.
2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/87762
* config/s390/s390.md: Add relative_long attribute.
2018-11-06 Jan Hubicka <jh@suse.cz>
* ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
* lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
* tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
stream TYPE_NEEDS_CONSTRUCTING.
* tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
* tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
2018-11-06 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
dump-scope ...
(vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
REG_CLASS_CONTENTS[GEN_REGS].
(REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
2018-11-06 Jan Hubicka <jh@suse.cz>
* tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR sanitizer/80953
* config/sol2.h (ASAN_CC1_SPEC): Define.
(LD_WHOLE_ARCHIVE_OPTION): Define.
(LD_NO_WHOLE_ARCHIVE_OPTION): Define.
(ASAN_REJECT_SPEC): Provide default.
(LIBASAN_EARLY_SPEC): Define.
(LIBTSAN_EARLY_SPEC): Define.
(LIBLSAN_EARLY_SPEC): Define.
* config/i386/sol2.h (CC1_SPEC): Redefine.
(ASAN_REJECT_SPEC): Define.
* config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
(TARGET_ASAN_SHADOW_OFFSET): Define.
(sparc_asan_shadow_offset): New function.
* config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
(ASAN_REJECT_SPEC): Define.
2018-11-06 Jan Hubicka <jh@suse.cz>
* tree.c (fld_type_variant): Copy canonical type.
(fld_incomplete_type_of): Check that canonical types looks sane;
copy canonical type.
(verify_type): Accept when incomplete type has complete canonical type.
2018-11-06 Jan Hubicka <jh@suse.cz>
* tree.c (free_lang_data): Reset overwite_assembler_name,
print_xnode, print_decl, print_type and print_identifier of
langhooks.
2018-11-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/87889
* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
Do nothing if old and new arg are the same
2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/87723
* config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
attributes for operands 3 and 4.
2018-11-06 Richard Biener <rguenther@suse.de>
PR middle-end/18041
* simplify-rtx.c (simplify_binary_operation_1): Add pattern
matching bitfield insertion.
2018-11-06 Alexandre Oliva <aoliva@redhat.com>
* auto-inc-dec.c: Include valtrack.h. Improve comments.
(reg_next_debug_use): New.
(attempt_change): Propagate adjusted expression into affected
debug insns.
(merge_in_block): Track uses in debug insns.
(pass_inc_dec::execute): Allocate and release
reg_next_debug_use.
2018-11-06 Wei Xiao <wei3.xiao@intel.com>
* config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
(_mm512_fixupimm_round_pd): Update parameters and builtin.
(_mm512_maskz_fixupimm_round_pd): Ditto.
(_mm512_fixupimm_round_ps): Ditto.
(_mm512_maskz_fixupimm_round_ps): Ditto.
(_mm_fixupimm_round_sd): Ditto.
(_mm_maskz_fixupimm_round_sd): Ditto.
(_mm_fixupimm_round_ss): Ditto.
(_mm_maskz_fixupimm_round_ss): Ditto.
(_mm512_fixupimm_pd): Ditto.
(_mm512_maskz_fixupimm_pd): Ditto.
(_mm512_fixupimm_ps): Ditto.
(_mm512_maskz_fixupimm_ps): Ditto.
(_mm_fixupimm_sd): Ditto.
(_mm_maskz_fixupimm_sd): Ditto.
(_mm_fixupimm_ss): Ditto.
(_mm_maskz_fixupimm_ss): Ditto.
(_mm512_mask_fixupimm_round_pd): Update builtin.
(_mm512_mask_fixupimm_round_ps): Ditto.
(_mm_mask_fixupimm_round_sd): Ditto.
(_mm_mask_fixupimm_round_ss): Ditto.
(_mm512_mask_fixupimm_pd): Ditto.
(_mm512_mask_fixupimm_ps): Ditto.
(_mm_mask_fixupimm_sd): Ditto.
(_mm_mask_fixupimm_ss): Ditto.
* config/i386/avx512vlintrin.h:
(_mm256_fixupimm_pd): Update parameters and builtin.
(_mm256_maskz_fixupimm_pd): Ditto.
(_mm256_fixupimm_ps): Ditto.
(_mm256_maskz_fixupimm_ps): Ditto.
(_mm_fixupimm_pd): Ditto.
(_mm_maskz_fixupimm_pd): Ditto.
(_mm_fixupimm_ps): Ditto.
(_mm_maskz_fixupimm_ps): Ditto.
(_mm256_mask_fixupimm_pd): Update builtin.
(_mm256_mask_fixupimm_ps): Ditto.
(_mm_mask_fixupimm_pd): Ditto.
(_mm_mask_fixupimm_ps): Ditto.
* config/i386/i386-builtin-types.def: Add new types and remove useless ones.
* config/i386/i386-builtin.def: Update builtin definitions.
* config/i386/i386.c: Handle new builtin types and remove useless ones.
* config/i386/sse.md: Update VFIXUPIMM* patterns.
(<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
(<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
(<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
(avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
(avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
(avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
* config/i386/subst.md:
(round_saeonly_sd_mask_operand4): Add new subst_attr.
(round_saeonly_sd_mask_op4): Ditto.
(round_saeonly_expand_operand5): Ditto.
(round_saeonly_expand): Update.
2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/87871
* combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
2018-11-05 Paul Koning <ni1d@arrl.net>
* doc/sourcebuild.texi (target attributes): Document new "inf"
effective target keyword.
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.c (s390_register_move_cost): Increase costs for
moves involving the CC reg.
2018-11-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/87873
* tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
argument.
* tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
* tree-vect-loop.c (vect_transform_loop): When splitting the
loop exit also create forwarder PHIs for constants.
* tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
Handle constant to_arg, add extra checking we match up the correct
PHIs.
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.md: QImode and HImode for load on condition.
2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/predicates.md: Fix typo.
* config/s390/s390.md: Allow immediates for load on condition.
2018-11-05 Martin Liska <mliska@suse.cz>
* alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
* bitmap.h (struct bitmap_usage): Likewise.
* ggc-common.c (SCALE): Remove.
(LABEL): Likewise.
(struct ggc_usage): Use SIZE_AMOUNT. And update
compare method.
* ggc-page.c (SCALE): Remove.
(STAT_LABEL): Remove.
(ggc_print_statistics): Use SIZE_AMOUNT.
* gimple.h (SCALE): Remove.
(LABEL): Likewise.
* input.c (ONE_K): Remove.
(ONE_M): Likewise.
(SCALE): Likewise.
(STAT_LABEL): Likewise.
(FORMAT_AMOUNT): Likewise.
(dump_line_table_statistics): Use SIZE_AMOUNT.
* mem-stats.h (struct mem_usage): Likewise.
* rtl.c (dump_rtx_statistics): Likewise.
(rtx_alloc_counts): Change type to size_t.
(rtx_alloc_sizes): Likewise.
(rtx_count_cmp): New.
(dump_rtx_statistics): Sort first based on counts.
* tree.c (tree_nodes_cmp): New.
(tree_codes_cmp): New.
(dump_tree_statistics): Sort first based on counts.
* system.h (ONE_K): New.
(ONE_M): Likewise.
(SIZE_SCALE): Likewise.
(SIZE_LABEL): Likewise.
(SIZE_AMOUNT): Likewise.
* tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
* tree-dfa.c (dump_dfa_stats): Likewise.
* tree-phinodes.c (phinodes_print_statistics): Likewise.
* tree-ssanames.c (ssanames_print_statistics): Likewise.
* tree.c (dump_tree_statistics): Likewise.
* vec.c (struct vec_usage): Likewise.
* trans-mem.c (tm_mangle): Enlarge buffer in order to not
trigger a -Werror=format-overflow with
--enable-gather-detailed-stats.
2018-11-05 Martin Liska <mliska@suse.cz>
* mem-stats.h (mem_alloc_description::release_instance_overhead):
Return T *.
* vec.c (struct vec_usage): Register m_element_size.
(vec_prefix::register_overhead): New arguments: elements and
element_size.
(vec_prefix::release_overhead): Subtract elements.
* vec.h (struct vec_prefix): Change signature.
(va_heap::reserve): Pass proper arguments.
(va_heap::release): Likewise.
2018-11-05 Martin Liska <mliska@suse.cz>
* mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
style.
* vec.c: Likewise.
2018-11-05 Richard Biener <rguenther@suse.de>
* tree-scalar-evolution.h (final_value_replacement_loop): Update
prototype.
* tree-scalar-evolution.c (final_value_replacement_loop): Return
whether anything was done.
(scev_const_prop): Remove constant propagation part, fold
remains into ...
* tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
(pass_data_scev_cprop): TODO_cleanup_cfg is now done
conditionally.
2018-11-05 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87859
* gimple-ssa-store-merging.c (struct merged_store_group): Add
only_constants and first_nonmergeable_order members.
(merged_store_group::merged_store_group): Initialize them.
(merged_store_group::do_merge): Clear only_constants member if
adding something other than INTEGER_CST store.
(imm_store_chain_info::coalesce_immediate_stores): Don't merge
stores with order >= first_nonmergeable_order. Use
merged_store->only_constants instead of always recomputing it.
Set merged_store->first_nonmergeable_order if we've skipped any
stores. Attempt to merge overlapping INTEGER_CST stores that
we would otherwise skip.
PR sanitizer/87837
* match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
PR target/87853
* config/i386/emmintrin.h (__v16qs): New to cope with option
-funsigned-char.
(_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
(_mm_cmplt_epi8): Likewise.
(_mm_cmpgt_epi8): Likewise.
2018-11-05 Richard Biener <rguenther@suse.de>
PR rtl-optimization/87852
* fwprop.c (use_killed_between): Only consider single-defs of the
use whose definition statement dominates the use.
2018-11-05 Martin Liska <mliska@suse.cz>
PR web/87829
* doc/invoke.texi: Remove options that are
not disabled with -Os.
2018-11-05 Martin Liska <mliska@suse.cz>
PR c/87811
* doc/extend.texi: Update constrain about the last argument
of __builtin_expect_with_probability.
2018-11-05 Martin Liska <mliska@suse.cz>
PR c/87811
* predict.c (expr_expected_value_1): Verify
that last argument is a real constants and emit
error.
2018-11-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/77698
* ipa-profile.c (ipa_profile): Adjust hotness threshold
only in LTO mode.
2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR tree-optimization/86572
* builtins.c (c_strlen): Handle negative offsets in a safe way.
2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR tree-optimization/87672
* gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
* tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2018-11-04 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/58372
* cfgexpand.c (pass_expand::execute): Move the call to
finish_eh_generation in front of the call to expand_stack_alignment.
2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
* common/config/i386/i386-common.c (processor_alias_table): Add
znver2 entry.
* config.gcc (i[34567]86-*-linux* | ...): Add znver2.
(case ${target}): Add znver2.
* config/i386/driver-i386.c: (host_detect_local_cpu): Let
-march=native recognize znver2 processors.
* config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
* config/i386/i386.c (m_znver2): New definition.
(m_ZNVER): New definition.
(m_AMD_MULTIPLE): Includes m_znver2.
(processor_cost_table): Add znver2 entry.
(processor_target_table): Add znver2 entry.
(get_builtin_code_for_version): Set priority for
PROCESSOR_ZNVER2.
(processor_model): Add M_AMDFAM17H_ZNVER2.
(arch_names_table): Ditto.
(ix86_reassociation_width): Include znver2.
* config/i386/i386.h (TARGET_znver2): New definition.
(struct ix86_size_cost): Add TARGET_ZNVER2.
(enum processor_type): Add PROCESSOR_ZNVER2.
* config/i386/i386.md (define_attr "cpu"): Add znver2.
* config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
* config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
(ix86_adjust_cost): Add znver2.
* config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
* gcc/doc/extend.texi: Add details about znver2.
* gcc/doc/invoke.texi: Add details about znver2.
2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
PR target/87079
* config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
pattern.
2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2018-11-02 Richard Earnshaw <rearnsha@arm.com>
* config/aarch64/aarch64.c ((aarch64_override_options): Disable
shrink-wrapping when -mtrack-speculation.
2018-11-02 Richard Biener <rguenther@suse.de>
* tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
(pop_cost_one_pair): Do not free pair.
(pop_best_coalesce): Likewise.
(create_coalesce_list): Initialize obstack.
(delete_coalesce_list): Free obstack.
(find_coalesce_pair): Obstack-allocate coalesce pairs.
(add_cost_one_coalesce): Likewise.
(struct live_track): Remove bitmap pointer indirections.
(new_live_track): Adjust.
(delete_live_track): Likewise.
(live_track_remove_partition): Likewise.
(live_track_add_partition): Likewise.
(live_track_live_p): Likewise.
(live_track_process_def): Likewise.
(live_track_clear_base_vars): Likewise.
2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (gcc_cv_as_sparc_register_op): Remove.
* configure: Regenerate.
* config.in: Regenerate.
* config/sparc/sparc.c (sparc_output_scratch_registers): Remove
HAVE_AS_REGISTER_PSEUDO_OP guard.
* config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
!HAVE_AS_REGISTER_PSEUDO_OP support.
(ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
guard.
2018-11-02 Richard Biener <rguenther@suse.de>
* dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
with is_type_die.
2018-11-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/87776
* tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
executable when iterating but running into rpo-vn-max-loop-depth
and not eliding the iteration.
2018-11-30 Jan Hubicka <jh@suse.cz>
* tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
TYPE_DECL.
2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
prototype.
* config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
Combine with rs6000_address_for_fpconvert.
(rs6000_address_for_fpconvert): Combine with
rs6000_force_indexed_or_indirect_mem.
(rs6000_expand_vector_init): Change function call from
rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
* config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
(floatsi<mode>2_lfiwax_mem): Ditto.
(floatunssi<mode>2_lfiwzx): Ditto.
(floatunssi<mode>2_lfiwzx_mem): Ditto.
(float<QHI:mode><FP_ISA3:mode>2): Ditto.
(floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
(fix_trunc<mode>si2_stfiwx): Ditto.
(fixuns_trunc<mode>si2_stfiwx): Ditto.
(float_<mode>si2_hw): Ditto.
(floatuns_<mode>si2_hw): Ditto.
* config/rs6000/vsx.md (*vsx_extract_si): Ditto.
(vsx_splat_<mode>): Ditto.
2018-11-01 Joseph Myers <joseph@codesourcery.com>
* configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
at end of assembler input text.
* configure: Regenerate.
2018-11-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87826
* gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
negative or larger or equal to type's precision.
2018-10-31 Alexandre Oliva <aoliva@redhat.com>
* opts.c (default_options_table): Do not enable
OPT_fdelayed_branch at -Og.
* doc/invoke.texi (-fdelayed-branch): Document it.
2018-10-31 Richard Henderson <richard.henderson@linaro.org>
* optabs-libfuncs.c (build_libfunc_function_visibility):
New, split out from...
(build_libfunc_function): ... here.
(init_one_libfunc_visibility): New, split out from ...
(init_one_libfunc): ... here.
* config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
scratch register need not be early-clobber. Document the reason
why we cannot use ST<OP>.
2018-10-31 Joseph Myers <joseph@codesourcery.com>
PR bootstrap/82856
* configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
line for second argument of AC_DEFINE_UNQUOTED.
* doc/install.texi (Tools/packages necessary for modifying GCC):
Update to autoconf 2.69 and automake 1.15.1.
* aclocal.m4, config.in, configure: Regenerate.
2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
* tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
initialization.
2018-10-31 Martin Liska <mliska@suse.cz>
PR driver/83193
* common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
Add new argument invalid_extension.
(aarch64_get_all_extension_candidates): New function.
(aarch64_rewrite_selected_cpu): Add NULL to function call.
* config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
new argument.
(aarch64_get_all_extension_candidates): New function.
* config/aarch64/aarch64.c (aarch64_parse_arch): Add new
argument invalid_extension.
(aarch64_parse_cpu): Likewise.
(aarch64_print_hint_for_extensions): New function.
(aarch64_validate_mcpu): Provide hint about invalid extension.
(aarch64_validate_march): Likewise.
(aarch64_handle_attr_arch): Pass new argument.
(aarch64_handle_attr_cpu): Provide hint about invalid extension.
(aarch64_handle_attr_isa_flags): Likewise.
2018-10-31 Richard Biener <rguenther@suse.de>
PR middle-end/70359
PR middle-end/86270
* tree-outof-ssa.c (insert_backedge_copies): Restrict
copy generation to useful cases. Place the copy before
the definition of the backedge value when possible.
2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
* config/arc/arc.c (arc_active_insn): New function.
(check_store_cacheline_hazard): Likewise.
(workaround_arc_anomaly): Use check_store_cacheline_hazard.
(arc_override_options): Disable delay slot scheduler for older
A7.
(arc_store_addr_hazard_p): New implementation, old one renamed to
...
(arc_store_addr_hazard_internal_p): Renamed.
(arc_reorg): Don't combine into brcc instructions which are part
of hardware hazard solution.
* config/arc/arc.md (attr tune): Consider new arc7xx tune value.
(tune_arc700): Likewise.
* config/arc/arc.opt (arc7xx): New tune value.
* config/arc/arc700.md: Improve A7 scheduler.
2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_override_options): Remove
TARGET_COMPACT_CASESI.
* config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
(CASE_VECTOR_MODE): Likewise.
(CASE_VECTOR_PC_RELATIVE): Likewise.
(CASE_VECTOR_SHORTEN_MODE): Likewise.
(CASE_VECTOR_SHORTEN_MODE1): Delete.
(ADDR_VEC_ALIGN): Update.
(ASM_OUTPUT_CASE_LABEL): Undefine.
(ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
(TARGET_BI_BIH): Define.
(DEFAULT_BRANCH_INDEX): Likewise.
* config/arc/arc.md (casesi): Rework to accept BI/BIH
instructions, remove compact_casesi use case.
(casesi_compact_jump): Remove.
(casesi_dispatch): New pattern.
* config/arc/arc.opt: Add mbranch-index option. Deprecate
compact_casesi option.
* doc/invoke.texi: Document mbranch-index option.
2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_get_tp): Remove function.
(arc_emit_call_tls_get_addr): Likewise.
(arc_call_tls_get_addr): New function.
(arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
* config/arc/arc.md (tls_load_tp_soft): Remove.
(tls_gd_get_addr): Likewise.
2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
(mulsi3_600_lib): Remove pattern.
(umulsi3_highpart_600_lib_le): Likewise.
(umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
(umulsidi3): Remove call to umulsidi3_600_lib.
(umulsidi3_600_lib): Remove pattern.
(peephole2): Remove peephole using the above deprecated patterns.
2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
PR target/87374
* config/arm/arm.c (arm_option_check_internal): Disable the combined
use of -mslow-flash-data and -mword-relocations.
(arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
* config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
flag_pic.
* doc/invoke.texi (-mword-relocations): Mention conflict with
-mslow-flash-data.
(-mslow-flash-data): Reciprocally.
2018-10-31 Richard Henderson <richard.henderson@linaro.org>
* config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
16-byte modes held in GP registers to use an even regno.
* config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
(aarch64_atomic_ldop_supported_p): Remove.
(aarch64_gen_atomic_ldop): Remove.
* config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
Fully expand LSE operations here.
(atomic_fetch_<atomic_optab><ALLI>): Likewise.
(atomic_<atomic_optab>_fetch<ALLI>): Likewise.
(aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
and use ATOMIC_LDOP instead; use register_operand for the input;
drop the split and emit insns directly.
(aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
(aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
(@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
* config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
(aarch64_gen_atomic_ldop): Don't call it.
* config/aarch64/atomics.md (atomic_exchange<ALLI>):
Use aarch64_reg_or_zero.
(aarch64_atomic_exchange<ALLI>): Likewise.
(aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
operand 0; use aarch64_reg_or_zero for input; merge ...
(@aarch64_atomic_swp<ALLI>): ... this and remove.
* config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
(aarch64_split_compare_and_swap): Use it.
(aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
test oldval against the proper predicate.
* config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
Use nonmemory_operand for expected.
(cas_short_expected_pred): New.
(@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
(@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
* config/aarch64/predicates.md (aarch64_plushi_immediate): New.
(aarch64_plushi_operand): New.
* config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
Force oldval into the rval register for TARGET_LSE; emit the compare
during initial expansion so that it may be deleted if unused.
(aarch64_gen_atomic_cas): Remove.
* config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
Change =&r to +r for operand 0; use match_dup for operand 2;
remove is_weak and mod_f operands as unused. Drop the split
and merge with...
(@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
(@aarch64_compare_and_swap<GPI>_lse): Similarly.
(@aarch64_atomic_cas<GPI>): Similarly.
2018-10-31 Richard Biener <rguenther@suse.de>
* tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
using ABSU_EXPR.
2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
* config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
* config/aarch64/aarch64.md: Include saphira.md
* config/aarch64/saphira.md: New file for pipeline description.
2018-10-30 Martin Sebor <msebor@redhat.com>
PR middle-end/87041
* gimple-ssa-sprintf.c (format_directive): Use %G to include
inlining context.
(sprintf_dom_walker::compute_format_length):
Avoid setting POSUNDER4K here.
(get_destination_size): Handle null argument values.
(get_user_idx_format): New function.
(sprintf_dom_walker::handle_gimple_call): Handle all printf-like
functions, including user-defined with attribute format printf.
Use %G to include inlining context.
Set POSUNDER4K here.
2018-10-30 Jan Hubicka <jh@suse.cz>
* params.def (lto-partitions): Bump from 32 to 128.
2018-10-30 Jan Hubicka <jh@suse.cz>
* tree.c
(free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
head in file.
(free_lang_data_in_type): Forward declare.
(fld_type_variant_equal_p): New function.
(fld_type_variant): New function
(fld_incomplete_types): New hash.
(fld_incomplete_type_of): New function
(fld_simplfied-type): New function.
(free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
(free_lang_data): Allocate and free fld_incomplete_type; update call
of free_lang_data_in_decl.
2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
* gcov.c (output_lines): Remove duplicate line.
2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000.md (bswapdi2): Force address into register
if not in indexed or indirect form.
(bswapdi2_load): Change predicate to indexed_or_indirect_operand.
(bswapdi2_store): Ditto.
* config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
helper function.
* config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
Prototype for helper function.
2018-10-30 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (optimize): Clarify/expand attribute documentation.
(target, pragma GCC optimize, pragma GCC target): Ditto.
2018-10-30 Jonathan Wakely <jwakely@redhat.com>
* doc/extend.texi: Fix prototype and description of
__builtin_expect_with_probability.
2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
* cgraph.h (clone_function_name_1): Replaced by new
clone_function_name_numbered that takes name as string; for
privatize_symbol_name_1 use only.
(clone_function_name): Renamed to
clone_function_name_numbered to be explicit about numbering.
(clone_function_name): New two-argument function that does
not number its output.
(clone_function_name): New three-argument function that
takes a number to append to its output.
* cgraphclones.c (duplicate_thunk_for_node):
(clone_function_name_1): Renamed.
(clone_function_name_numbered): Two new functions.
(clone_function_name): Improved documentation.
(cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
* config/rs6000/rs6000.c (make_resolver_func): Ditto.
* final.c (final_scan_insn_1): Use the new clone_function_name
without numbering.
* multiple_target.c (create_dispatcher_calls): Ditto.
(create_target_clone): Ditto.
* omp-expand.c (grid_expand_target_grid_body): Ditto.
* omp-low.c (create_omp_child_function_name): Ditto.
* omp-simd-clone.c (simd_clone_create): Ditto.
* symtab.c (simd_symtab_node::noninterposable_alias): Use the
new clone_function_name without numbering.
2018-10-30 Richard Earnshaw <rearnsha@arm.com>
* alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
Assert that the allocation size is not zero.
2018-10-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/87800
* tree-vect-slp.c (vect_build_slp_tree_2): Reject any
non-induction or reduction PHIs.
2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org>
* config/aarch64/falkor-tag-collision-avoidance.c
(execute_tag_collision_avoidance): Call df_note_add_problem.
2018-10-30 Martin Liska <mliska@suse.cz>
* doc/extend.texi: Fix typo in documentation
of __builtin_expect_with_probability.
2018-10-29 David Malcolm <dmalcolm@redhat.com>
PR c++/87721
* input.c (get_substring_ranges_for_loc): Detect if
linemap_resolve_location gives us a NULL map, and reject
this case.
2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
* config.gcc (xstormy16-*-elf): Set tm_d_file.
2018-10-29 David Malcolm <dmalcolm@redhat.com>
Martin Sebor <msebor@redhat.com>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
* doc/ux.texi (Quoting): New subsection, adapted from material at
https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
MartinSebor and ManuelLopezIbanez.
(Fix-it hints): Note that fix-it hints shouldn't be marked for
translation.
2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/87469
* tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
max value.
2018-10-29 Paul A. Clarke <pc@us.ibm.com>
* gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2018-10-29 Paul Koning <ni1d@arrl.net>
* doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2018-10-29 Paul A. Clarke <pc@us.ibm.com>
* gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
_mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
_mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
_mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
_mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
_mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
_mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
_mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
Change 'vector' to '__vector'.
* gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
_mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
_mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
_mm_avg_pu16): Likewise. And, whitespace corrections.
2018-10-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87785
* tree-vect-slp.c (vect_gather_slp_loads): Only gather
internal defs.
2018-10-29 Olivier Hainque <hainque@adacore.com>
* VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2018-10-29 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
ports configuration macro, defaults to "gnu".
(VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2018-10-29 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2018-10-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87790
* tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
(vect_make_slp_decision): Adjust.
(vect_slp_analyze_bb_1): Likewise.
(vect_detect_hybrid_slp_stmts): Properly union SLP type over
edges.
2018-10-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87785
* tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
and processing.
(vect_build_slp_tree): Likewise.
(vect_gather_slp_loads): New function.
(vect_analyze_slp_instance): Gather loads separately from the
SLP tree build.
2018-10-29 Martin Liska <mliska@suse.cz>
* Makefile.in: Make dependency to json.o.
* doc/gcov.texi: Document new JSON format, remove
old intermediate format documentation.
* gcov.c (struct function_info): Come up with m_name and
m_demangled_name.
(function_info::function_info): Initialize it.
(function_info::~function_info): Release it.
(main): Rename flag_intermediate_format to flag_json_format.
(print_usage): Describe --json-format.
(process_args): Set flag_json_format.
(output_intermediate_line): Remove.
(output_intermediate_json_line): Likewise.
(get_gcov_intermediate_filename): Return new extension
".gcov.json.gz".
(output_intermediate_file): Implement JSON emission.
(output_json_intermediate_file): Implement JSON emission.
(generate_results): Use ::get_name for function name.
Handle JSON output file.
(read_graph_file): Use ::get_name instead of cplus_demangle.
(read_count_file): Likewise.
(solve_flow_graph): Likewise.
(add_line_counts): Likewise.
(accumulate_line_counts): Use new flag_json_format.
(output_function_details): Use ::get_name instead of cplus_demangle.
(output_lines): Likewise.
* json.cc (test_writing_literals): Add new tests.
* json.h (class literal): Add new boolean constructor.
2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/87701
PR rtl-optimization/87780
* combine.c (make_more_copies): Rewrite.
2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
* doc/generic.texi (ABSU_EXPR): Document.
* match.pd (absu(x)*absu(x) -> x*x): Handle.
(absu(absu(X)) -> absu(X)): Likewise.
(absu(-X) -> absu(X)): Likewise.
(absu(X) where X is nonnegative -> X): Likewise.
2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
* Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
(TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
(tm_d.h, cs-tm_d.h, default-d.o): New rules.
(d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
(s-tm-texi): Also check timestamp on d-target.def.
(generated_files): Add TM_D_H and d-target-hooks-def.h.
(build/genhooks.o): Also depend on D_TARGET_DEF.
* config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
variables.
* config/aarch64/aarch64-d.c: New file.
* config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
Define.
* config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
prototype.
* config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
* config/aarch64/t-aarch64 (aarch64-d.o): New rule.
* config/arm/arm-d.c: New file.
* config/arm/arm-protos.h (arm_d_target_versions): New prototype.
* config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
* config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
* config/arm/t-arm (arm-d.o): New rule.
* config/default-d.c: New file.
* config/glibc-d.c: New file.
* config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/i386/i386-d.c: New file.
* config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
* config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
* config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
(GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
* config/i386/t-i386 (i386-d.o): New rule.
* config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
* config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
* config/mips/mips-d.c: New file.
* config/mips/mips-protos.h (mips_d_target_versions): New prototype.
* config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
* config/mips/t-mips (mips-d.o): New rule.
* config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/powerpcspe/powerpcspe-d.c: New file.
* config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
New prototype.
* config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
Support GNU D by using 0 as the language type.
* config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
* config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
* config/riscv/riscv-d.c: New file.
* config/riscv/riscv-protos.h (riscv_d_target_versions): New
prototype.
* config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
* config/riscv/t-riscv (riscv-d.o): New rule.
* config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
* config/rs6000/rs6000-d.c: New file.
* config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
prototype.
* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
Support GNU D by using 0 as the language type.
* config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
* config/rs6000/t-rs6000 (rs6000-d.o): New rule.
* config/s390/s390-d.c: New file.
* config/s390/s390-protos.h (s390_d_target_versions): New prototype.
* config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
* config/s390/t-s390 (s390-d.o): New rule.
* config/sparc/sparc-d.c: New file.
* config/sparc/sparc-protos.h (sparc_d_target_versions): New
prototype.
* config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
* config/sparc/t-sparc (sparc-d.o): New rule.
* config/t-glibc (glibc-d.o): New rule.
* configure: Regenerated.
* configure.ac (tm_d_file): New variable.
(tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
* doc/contrib.texi (Contributors): Add self for the D frontend.
* doc/frontends.texi (G++ and GCC): Mention D as a supported language.
* doc/install.texi (Configuration): Mention libphobos as an option for
--enable-shared. Mention d as an option for --enable-languages.
(Testing): Mention check-d as a target.
* doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
name suffixes. Mention d as a -x option.
* doc/sourcebuild.texi (Top Level): Mention libphobos.
* doc/standards.texi (Standards): Add section on D language.
* doc/tm.texi: Regenerated.
* doc/tm.texi.in: Add @node for D language and ABI, and @hook for
TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
* dwarf2out.c (is_dlang): New function.
(gen_compile_unit_die): Use DW_LANG_D for D.
(declare_in_namespace): Return module die for D, instead of adding
extra declarations into the namespace.
(gen_namespace_die): Generate DW_TAG_module for D.
(gen_decl_die): Handle CONST_DECLSs for D.
(dwarf2out_decl): Likewise.
(prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
(prune_unused_types_walk): Handle DW_tag_interface_type same as other
kinds of aggregates.
* gcc.c (default_compilers): Add entries for .d, .dd and .di.
* genhooks.c: Include d/d-target.def.
2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
PR target/85669
* config/rs6000/darwin.h (STACK_BOUNDARY): New.
(RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
(STACK_DYNAMIC_OFFSET): Likewise.
2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
PR target/80024
* config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
error message.
2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
* doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
return type and other typos.
2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
a shorter sequence with fewer branches.
(emit_final_str_compare_gpr): Ditto.
2018-10-26 Paul A. Clarke <pc@us.ibm.com>
* config/rs6000/tmmintrin.h: New file.
* config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2018-10-26 Paul A. Clarke <pc@us.ibm.com>
* config/rs6000/mmintrin.h: Enable 32bit compilation.
* config/rs6000/xmmintrin.h: Likewise.
2018-10-26 Paul A. Clarke <pc@us.ibm.com>
* config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2018-10-26 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
and wrapper.
(vect_mark_slp_stmts_relevant): Likewise.
(vect_detect_hybrid_slp_stmts): Likewise.
(vect_bb_slp_scalar_cost): Likewise.
(vect_remove_slp_scalar_calls): Likewise.
2018-10-26 Jan Hubicka <jh@suse.cz>
* ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
(warn_types_mismatch): Fix walk of DECL_NAME.
(odr_types_equivalent_p): Fix overactive assert.
2018-10-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/87105
* tree-vectorizer.h (_slp_tree::refcnt): New member.
* tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
refcnt.
(vect_create_new_slp_node): Initialize refcnt to one.
(bst_traits): Move.
(scalar_stmts_set_t, bst_fail): Remove.
(vect_build_slp_tree_2): Add bst_map argument and adjust calls.
(vect_build_slp_tree): Add bst_map argument and lookup
already created SLP nodes.
(vect_print_slp_tree): Handle a SLP graph, print SLP node
addresses.
(vect_slp_rearrange_stmts): Handle a SLP graph.
(vect_analyze_slp_instance): Adjust and free SLP nodes from
the CSE map. Fix indenting.
(vect_schedule_slp_instance): Add short-cut.
2018-10-26 Martin Liska <mliska@suse.cz>
PR testsuite/86158
* ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
addr_expr and not with pointers.
2018-10-26 Jan Hubicka <jh@suse.cz>
* tree.c (free_lang_data_in_type): Only check main variants.
* ipa-devirt.c (warn_odr): Make static.
(types_same_for_odr): Drop strict variant.
(types_odr_comparable): Likewise.
(odr_or_derived_type_p): Look for main variants.
(odr_name_hasher::equal): Cleanup comment.
(odr_subtypes_equivalent): Add warn and warned arguments; check main
variants.
(type_variants_equivalent_p): break out from ...
(odr_types_equivalent): ... here; go for main variants where needed.
(warn_odr): ... here; turn static.
(warn_types_mismatch): Compare mangled names of main variants.
* ipa-utils.h (types_odr_comparable): Drop strict parameter.
(type_with_linkage_p): Sanity check that we look at main variant.
* lto.c (lto_read_decls): Only consider main variant to be ODR type.
* tree.h (types_same_for_odr): Drop strict argument.
2018-10-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/87746
* tree-vect-data-refs.c (vect_update_misalignment_for_peel):
Simplify and fix WRT strided store groups with size not
equal to step in element count.
(vect_analyze_group_access_1): Dump the whole group.
2018-10-25 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
precicion entry for each overloaded builtin.
* config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
VSCEDPUO): Rename overloaded name.
(VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
* config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
define_expand for xscmpexqp instruction.
(*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
Jinsong Ji <jji@us.ibm.com>
* config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
function with vec_sl.
(_mm_slli_epi32): Likewise.
(_mm_slli_epi64): Likewise.
(_mm_srai_epi16): Replace deprecated function with vec_sra.
(_mm_srai_epi32): Likewise.
(_mm_srli_epi16): Replace deprecated function with vec_sr.
(_mm_srli_epi32): Likewise.
(_mm_srli_epi64): Likewise.
(_mm_sll_epi16): Replace deprecated function with vec_sl.
(_mm_sll_epi32): Likewise.
(_mm_sll_epi64): Likewise.
(_mm_sra_epi16): Replace deprecated function with vec_sra.
(_mm_sra_epi32): Likewise.
(_mm_srl_epi16): Replace deprecated function with vec_sr.
(_mm_srl_epi32): Likewise.
(_mm_srl_epi64): Likewise.
2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
Jinsong Ji <jji@us.ibm.com>
* gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
comparison operators with vec_cmp* for compatibility due to
unfortunate history; clean up formatting and use types more
appropriately.
(_mm_sll_epi32): Likewise.
(_mm_sll_epi64): Likewise.
(_mm_srl_epi16): Likewise.
(_mm_srl_epi32): Likewise.
(_mm_srl_epi64): Likewise.
2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
Jinsong Ji <jji@us.ibm.com>
* config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
* config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
__vector __bool int. Use vec_cmpgt in preference to deprecated
function vec_vcmpgtfp.
(_mm_max_ps): Likewise.
2018-10-25 Jeff Law <law@redhat.com>
* config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
if returning false.
2018-10-25 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (aligned): Expand attribute description.
(Alignment): Rename section. Discuss function arguments.
2018-10-25 Jan Hubicka <jh@suse.cz>
* ipa-devirt.c (main_odr_variant): Remove.
(hash_odr_name, types_same_for_odr, types_odr_comparable,
odr_name_hasher::equal, odr_subtypes_equivalent_p):
Drop use of main_odr_variant.
(add_type_duplicate): Silence confused warnings on integer types.
(get_odr_type): Always look for main variant.
(register_odr_type): Simplify.
2018-10-25 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
Initialize ng to silence error with release checking bootstrap.
2018-10-25 Richard Biener <rguenther@suse.de>
* tree-if-conv.c: Include tree-ssa-sccvn.h.
(tree_if_conversion): Run CSE on the if-converted loop body.
2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/constraints.md (ZL): New constraint.
* config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
operands.
* config/s390/s390.md (movdi_larl): Remove.
(movdi_64): Add the LARL alternative.
2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
PR bootstrap/87747
* rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
(RTX_CODE_HWINT_P): New macro.
(rtx_code_size): Use RTX_CODE_HWINT_P ().
2018-10-25 Jan Hubicka <jh@suse.cz>
* ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
is anonymous.
2018-10-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/87665
PR tree-optimization/87745
* tree-vectorizer.h (get_earlier_stmt): Remove.
(get_later_stmt): Pick up UID from the original non-pattern stmt.
2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
* options.texi (Deprecated): Move list to Var section.
2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
Jinsong Ji <jji@us.ibm.com>
* config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
__vector long to __vector long long.
(_mm_cvtpd_ps): Likewise.
(_mm_cvttpd_epi32): Likewise.
(_mm_cvtpi32_pd): Likewise.
(_mm_unpackhi_epi64): Likewise.
(_mm_unpacklo_epi64): Likewise.
2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/87720
* combine.c (make_more_copies): Skip if the dest is pc_rtx.
2018-10-24 Alexandre Oliva <aoliva@redhat.com>
* gimple-ssa-isolate-paths.c
(find_implicit_erroneous_behavior): Do not change code if the
pass is running for warnings only.
(find_explicit_erroneous_behavior): Likewise.
2018-10-24 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
Define as rs6000_mangle_decl_assembler_name.
(rs6000_mangle_decl_assembler_name): If the user switched from IBM
long double to IEEE long double, switch the names of the long
double built-in functions to be <func>f128 instead of <func>l.
2018-10-24 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (nonnull): List no-argument form. Reference
-fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2018-10-24 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2018-10-24 Martin Liska <mliska@suse.cz>
PR tree-optimization/84436
* tree-switch-conversion.c (switch_conversion::contains_same_values_p):
Remove.
(switch_conversion::contains_linear_function_p): New.
(switch_conversion::build_one_array): Support linear
transformation on input.
* tree-switch-conversion.h (struct switch_conversion): Add
contains_linear_function_p declaration.
2018-10-24 Richard Biener <rguenther@suse.de>
* varasm.c (const_hash_1): Return hash of ADDR_EXPR
if its argument is CONSTANT_CLASS_P.
2018-10-11 Jan Hubicka <hubicka@ucw.cz>
* ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
it is wrong for forward declarations.
2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_check_qrst_address): Add the missing
SYMBOL_REF_P () check.
2018-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/87105
* tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
dump classification.
(vect_analyze_data_ref_accesses): Handle duplicate loads and
stores by splitting the affected group after the fact.
* tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
fail the SLP build because of size constraints.
2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
* configure: Regenerate.
* config.in: Regenerate.
* varasm.c (mergeable_string_section): Use readonly_data_section
if linker doesn't support SHF_MERGE with alignment > 8.
(mergeable_constant_section): Likewise.
2018-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/84013
* tree-ssa-structalias.c (struct msdi_data): New struct for
marshalling data to walk_stmt_load_store_ops.
(maybe_set_dependence_info): Refactor as callback for
walk_stmt_load_store_ops.
(compute_dependence_clique): Set restrict info on all stmt kinds.
2018-10-24 Martin Liska <mliska@suse.cz>
* cgraph.c (cgraph_node::dump):
Remove reduntant dumps and make tp_first_run dump more compact.
2018-10-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/87665
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
to reflect reality.
2018-10-12 Jeff Law <law@redhat.com>
* config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
for H8/S.
2018-10-23 Richard Biener <rguenther@suse.de>
* tree-vrp.c (add_assert_info): Guard dump_printf with
dump_enabled_p.
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::record_ranges_from_incoming_edge):
Use value_range::ignore_equivs_equal_p.
2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/87105
PR tree-optimization/87608
* passes.def (pass_all_early_optimizations): Add early phi-opt
after dce.
* tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
addition to debug stmts.
(tree_ssa_phiopt_worker): Add early_p argument, do only min/max
and abs replacement early.
* tree-cfg.c (gimple_empty_block_p): Likewise.
2018-10-23 Richard Earnshaw <rearnsha@arm.com>
PR target/86383
* config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
specified to configure.
(arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/87700
* tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2018-10-23 Jakub Jelinek <jakub@redhat.com>
PR target/87674
* config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
second argument from __mmask16 to __mmask8.
* config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
_mm_mask_packs_epi32): Likewise.
* config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
Likewise.
(_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
2018-10-23 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/86144
* tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
over simd attribute.
2018-10-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/87693
* tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
the case we do not find the taken edge.
2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
Jinsong Ji <jji@us.ibm.com>
* config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
(_mm_store_pd): Use unaligned vector type for pointer cast.
(_mm_maskmoveu_si128): Likewise.
* config/rs6000/xmmintrin.h (__m128_u): New typedef.
(_mm_store_ps): Use unaligned vector type for pointer cast.
2018-10-22 Paul Koning <ni1d@arrl.net>
* symtab.c (symtab_node::increase_alignment): Correct max
alignment check.
2018-10-22 Yury Gribov <tetra2005@gmail.com>
PR tree-optimization/87633
* match.pd: Do not generate unordered integer comparisons.
2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/87600
* combine.c: Add include of expr.h.
(cant_combine_insn_p): Do not combine moves from any hard non-fixed
register to a pseudo.
(make_more_copies): New function, add a copy to a new pseudo after
the moves from hard registers into pseudos.
(rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
later. Call make_more_copies.
2018-10-22 Andrew Stubbs <ams@codesourcery.com>
* lra-constraints.c (process_alt_operands): New local array,
matching_early_clobber. Check matching_early_clobber before
decrementing reject, and set matching_early_clobber after.
2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
PR target/87598
* config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
call output_addr_const and hope for the best.
2018-10-22 Richard Biener <rguenther@suse.de>
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::record_ranges_from_incoming_edge): Be
smarter about what ranges to use.
* tree-vrp.c (add_assert_info): Dump here.
(register_edge_assert_for_2): Instead of here at multiple but
not all places.
* gcc.dg/tree-ssa/evrp12.c: New testcase.
* gcc.dg/predict-6.c: Adjust.
* gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
* gcc.dg/tree-ssa/vrp02.c: Likewise.
* gcc.dg/tree-ssa/cunroll-9.c: Likewise.
2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
Richard Biener <rguenther@suse.de>
* bitmap.h: Update data structure documentation, including a
description of bitmap views as either linked-lists or splay trees.
(struct bitmap_element_def): Update comments for splay tree bitmaps.
(struct bitmap_head_def): Likewise.
(bitmap_list_view, bitmap_tree_view): New prototypes.
(bitmap_initialize_stat): Initialize a bitmap_head's indx and
tree_form fields.
(bmp_iter_set_init): Assert the iterated bitmaps are in list form.
(bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
* bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
released bitmap element here.
(bitmap_element_free): Remove.
(bitmap_elt_clear_from): Work on splay tree bitmaps.
(bitmap_list_link_element): Renamed from bitmap_element_link. Move
this function similar ones such that linked-list bitmap implementation
functions are grouped.
(bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
and moved for grouping.
(bitmap_list_insert_element_after): Renamed from
bitmap_elt_insert_after, and moved for grouping.
(bitmap_list_find_element): New function spliced from bitmap_find_bit.
(bitmap_tree_link_left, bitmap_tree_link_right,
bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
bitmap_tree_link_element, bitmap_tree_unlink_element,
bitmap_tree_find_element): New functions for splay-tree bitmap
implementation.
(bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
Renamed and moved, see above entries.
(bitmap_tree_listify_from): New function to convert part of a splay
tree bitmap to a linked-list bitmap.
(bitmap_list_view): Convert a splay tree bitmap to linked-list form.
(bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
(bitmap_find_bit): Remove.
(bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
Handle splay tree bitmaps.
(bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
bitmap_intersect_compl_p, bitmap_ior_and_compl,
bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
bitmap_hash): Reject trying to act on splay tree bitmaps. Make
corresponding changes to use linked-list specific bitmap_element
manipulation functions as applicable for efficiency.
(bitmap_tree_to_vec): New function.
(debug_bitmap_elt_file): New function split out from ...
(debug_bitmap_file): ... here. Handle splay tree bitmaps.
(bitmap_print): Likewise.
PR tree-optimization/63155
* tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
SSA edge worklists.
* tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
in tree-view.
2018-10-22 Martin Liska <mliska@suse.cz>
PR tree-optimization/87686
Revert
2018-08-29 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (switch_conversion::expand):
Strenghten assumption about gswitch statements.
2018-10-22 Martin Liska <mliska@suse.cz>
* ipa-icf.c (sem_item::compare_attributes): Remove.
(sem_item::compare_referenced_symbol_properties): Use
attribute_list_equal instead.
(sem_function::equals_wpa): Likewise.
* ipa-icf.h: Remove compare_attributes.
2018-10-22 Richard Biener <rguenther@suse.de>
PR middle-end/87682
* mem-stats.h (mem_usage::operator==): Fix pasto.
2018-10-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/87640
* tree-vrp.c (set_value_range_with_overflow): Decompose
incomplete result.
(extract_range_from_binary_expr_1): Adjust.
2018-10-22 Martin Jambor <mjambor@suse.cz>
* tree-eh.h (stmt_could_throw_p): Add function parameter.
(stmt_can_throw_external): Likewise.
(stmt_can_throw_internal): Likewise.
* tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
(lower_eh_constructs_2): Likewise.
(stmt_could_throw_p): Add fun parameter, use it instead of cfun.
(stmt_can_throw_external): Likewise.
(stmt_can_throw_internal): Likewise.
(maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
(maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
(maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
(maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
(pass_lower_eh_dispatch::execute): Pass cfun to
stmt_can_throw_external.
(cleanup_empty_eh): Likewise.
(verify_eh_edges): Pass cfun to stmt_could_throw_p.
* cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
stmt_can_throw_external instead of pushing it to cfun.
(symbol_table::create_edge): Likewise.
* gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
stmt_can_throw_internal.
* gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
to stmt_could_throw_p.
* gimple-ssa-store-merging.c (handled_load): Pass cfun to
stmt_can_throw_internal.
(pass_store_merging::execute): Likewise.
* gimple-ssa-strength-reduction.c
(find_candidates_dom_walker::before_dom_children): Pass cfun to
stmt_could_throw_p.
* gimplify-me.c (gimple_regimplify_operands): Pass cfun to
stmt_can_throw_internal.
* ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
to stmt_can_throw_external.
(check_stmt): Pass cfun to stmt_could_throw_p.
(check_stmt): Pass cfun to stmt_can_throw_external.
(pass_nothrow::execute): Likewise.
* trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
* tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
stmt_can_throw_internal.
(verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
(stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
(gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
* tree-complex.c (expand_complex_libcall): Pass cfun to
stmt_could_throw_p and to stmt_can_throw_internal.
(expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
* tree-inline.c (copy_edges_for_bb): Likewise.
(maybe_move_debug_stmts_to_successors): Likewise.
* tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
stmt_could_throw_p.
* tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
* tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
* tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
stmt_can_throw_internal.
* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
stmt_could_throw_p.
(mark_aliased_reaching_defs_necessary_1): Pass cfun to
stmt_can_throw_internal.
* tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
* tree-ssa-loop-im.c (movement_possibility): Pass cfun to
stmt_could_throw_p.
* tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
(add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
(convert_mult_to_fma_1): Likewise.
(convert_to_divmod): Likewise.
* tree-ssa-phiprop.c (propagate_with_phi): Likewise.
* tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
* tree-ssa-propagate.c
(substitute_and_fold_dom_walker::before_dom_children): Likewise.
* tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
(maybe_optimize_range_tests): Likewise.
(linearize_expr_tree): Likewise.
(reassociate_bb): Likewise.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
* tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
* tree-ssa-strlen.c (adjust_last_stmt): Likewise.
(handle_char_store): Likewise.
* tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
stmt_can_throw_internal.
* tree-vect-patterns.c (check_bool_pattern): Pass cfun to
stmt_could_throw_p.
* tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
(vectorizable_call): Pass cfun to stmt_can_throw_internal.
(vectorizable_simd_clone_call): Likewise.
* value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
(gimple_stringop_fixed_value): Likewise.
2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_loadrelative_operand_p): Accept
literal pool references.
(s390_check_qrst_address): Adapt to the new behavior of
s390_loadrelative_operand_p ().
2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/sse.md (*andnot<mode>3_bcst): New.
2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/sse.md (*<code><mode>3_bcst): New.
2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
V4DI, V16SI and V8DI.
(*sub<mode>3<mask_name>_bcst): New.
(*add<mode>3<mask_name>_bcst): Likewise.
2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
Jinsong Ji <jji@us.ibm.com>
* config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
__m64 with __vector unsigned long long for compatibility.
(_mm_movemask_epi8): Likewise.
* config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
(_mm_cvttps_pi32): Likewise.
(_mm_cvtpi32_ps): Likewise.
(_mm_cvtps_pi16): Likewise.
(_mm_loadh_pi): Likewise.
(_mm_storeh_pi): Likewise.
(_mm_movehl_ps): Likewise.
(_mm_movelh_ps): Likewise.
(_mm_loadl_pi): Likewise.
(_mm_storel_pi): Likewise.
(_mm_movemask_ps): Likewise.
(_mm_shuffle_pi16): Likewise.
2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
__builtin_ia32_vfnmsubpd512_mask.
(_mm512_mask_fnmsub_round_pd): Likewise.
(_mm512_fnmsub_pd): Likewise.
(_mm512_mask_fnmsub_pd): Likewise.
(_mm512_maskz_fnmsub_round_pd): Use
__builtin_ia32_vfnmsubpd512_maskz.
(_mm512_maskz_fnmsub_pd): Likewise.
(_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
(_mm512_mask_fnmsub_round_ps): Likewise.
(_mm512_fnmsub_ps): Likewise.
(_mm512_mask_fnmsub_ps): Likewise.
(_mm512_maskz_fnmsub_round_ps): Use
__builtin_ia32_vfnmsubps512_maskz.
(_mm512_maskz_fnmsub_ps): Likewise.
* config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
__builtin_ia32_vfnmsubpd256_mask.
(_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
(_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
(_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
(_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
(_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
(_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
(_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
(_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
* config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
__builtin_ia32_vfnmsubpd.
(_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
(_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
(_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
(_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
(_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
* config/i386/i386-builtin.def: Add
__builtin_ia32_vfnmsubpd256_mask,
__builtin_ia32_vfnmsubpd256_maskz,
__builtin_ia32_vfnmsubpd128_mask,
__builtin_ia32_vfnmsubpd128_maskz,
__builtin_ia32_vfnmsubps256_mask,
__builtin_ia32_vfnmsubps256_maskz,
__builtin_ia32_vfnmsubps128_mask,
__builtin_ia32_vfnmsubps128_maskz,
__builtin_ia32_vfnmsubpd512_mask,
__builtin_ia32_vfnmsubpd512_maskz,
__builtin_ia32_vfnmsubps512_mask,
__builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
__builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
__builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
__builtin_ia32_vfnmsubpd256.
* config/i386/sse.md (fma4i_fnmsub_<mode>): New.
(<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
(*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
Likewise.
(*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
Likewise.
(*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
Likewise.
(fmai_vmfnmsub_<mode><round_name>): Likewise.
2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
__builtin_ia32_vfnmaddpd512_mask.
(_mm512_mask_fnmadd_round_pd): Likewise.
(_mm512_fnmadd_pd): Likewise.
(_mm512_mask_fnmadd_pd): Likewise.
(_mm512_maskz_fnmadd_round_pd): Use
__builtin_ia32_vfnmaddpd512_maskz.
(_mm512_maskz_fnmadd_pd): Likewise.
(_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
(_mm512_mask_fnmadd_round_ps): Likewise.
(_mm512_fnmadd_ps): Likewise.
(_mm512_mask_fnmadd_ps): Likewise.
(_mm512_maskz_fnmadd_round_ps): Use
__builtin_ia32_vfnmaddps512_maskz.
(_mm512_maskz_fnmadd_ps): Likewise.
* config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
__builtin_ia32_vfnmaddpd256_mask.
(_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
(_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
(_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
(_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
(_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
(_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
(_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
(_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
* config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
__builtin_ia32_vfnmaddpd.
(_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
(_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
(_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
(_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
(_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
* config/i386/i386-builtin.def: Add
__builtin_ia32_vfnmaddpd256_mask,
__builtin_ia32_vfnmaddpd256_maskz,
__builtin_ia32_vfnmaddpd128_mask,
__builtin_ia32_vfnmaddpd128_maskz,
__builtin_ia32_vfnmaddps256_mask,
__builtin_ia32_vfnmaddps256_maskz,
__builtin_ia32_vfnmaddps128_mask,
__builtin_ia32_vfnmaddps128_maskz,
__builtin_ia32_vfnmaddpd512_mask,
__builtin_ia32_vfnmaddpd512_maskz,
__builtin_ia32_vfnmaddps512_mask,
__builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
__builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
__builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
__builtin_ia32_vfnmaddpd256.
* config/i386/sse.md (fma4i_fnmadd_<mode>): New.
(<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
(*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
Likewise.
(*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
Likewise.
(*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
Likewise.
(fmai_vmfnmadd_<mode><round_name>): Likewise.
2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
__builtin_ia32_vfmsubpd512_mask.
(_mm512_mask_fmsub_round_pd): Likewise.
(_mm512_fmsub_pd): Likewise.
(_mm512_mask_fmsub_pd): Likewise.
(_mm512_maskz_fmsub_round_pd): Use
__builtin_ia32_vfmsubpd512_maskz.
(_mm512_maskz_fmsub_pd): Likewise.
(_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
(_mm512_mask_fmsub_round_ps): Likewise.
(_mm512_fmsub_ps): Likewise.
(_mm512_mask_fmsub_ps): Likewise.
(_mm512_maskz_fmsub_round_ps): Use
__builtin_ia32_vfmsubps512_maskz.
(_mm512_maskz_fmsub_ps): Likewise.
* config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
__builtin_ia32_vfmsubpd256_mask.
(_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
(_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
(_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
(_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
(_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
(_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
(_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
(_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
* config/i386/fmaintrin.h (_mm_fmsub_pd): Use
__builtin_ia32_vfmsubpd.
(_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
(_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
(_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
(_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
(_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
* config/i386/i386-builtin.def: Add
__builtin_ia32_vfmsubpd256_mask,
__builtin_ia32_vfmsubpd256_maskz,
__builtin_ia32_vfmsubpd128_mask,
__builtin_ia32_vfmsubpd128_maskz,
__builtin_ia32_vfmsubps256_mask,
__builtin_ia32_vfmsubps256_maskz,
__builtin_ia32_vfmsubps128_mask,
__builtin_ia32_vfmsubps128_maskz,
__builtin_ia32_vfmsubpd512_mask,
__builtin_ia32_vfmsubpd512_maskz,
__builtin_ia32_vfmsubps512_mask,
__builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
__builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
__builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
__builtin_ia32_vfmsubpd256.
* config/i386/sse.md (fma4i_fmsub_<mode>): New.
(<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
(*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
Likewise.
(*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
Likewise.
(*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
Likewise.
(fmai_vmfmsub_<mode><round_name>): Likewise.
2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
Remove plus. Renamed to ...
(*sub<mode>3<mask_name>_bcst): This.
(*add<mode>3<mask_name>_bcst_2): Renamede to ...
(*add<mode>3<mask_name>_bcst): This.
2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/87662
* i386/avx512vlintrin.h (_mm256_or_epi32): New.
(_mm_or_epi32): Likewise.
(_mm256_xor_epi32): Likewise.
(_mm_xor_epi32): Likewise.
(_mm256_or_epi64): Likewise.
(_mm_or_epi64): Likewise.
(_mm256_xor_epi64): Likewise.
(_mm_xor_epi64): Likewise.
2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
2018-10-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87647
* varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
* doc/ux.texi: Move @section directly after @node.
2018-10-19 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85488
PR middle-end/87649
* omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
depend closely nested inside of loop with ordered clause with
a parameter.
2018-10-19 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
* doc/gccint.texi: Include ux.texi and use it in top-level menu.
* doc/ux.texi: New file.
2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
be the first CR field allocated.
2018-10-19 Richard Biener <rguenther@suse.de>
PR target/87657
* config/i386/i386.c (ix86_builtin_vectorization_cost): Use
TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/sse.md
(*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
(*add<mode>3<mask_name>_bcst_2): Likewise.
2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/sse.md
(*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
Replace nonimmediate_operand with register_operand.
(*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
Likewise.
(*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
Likewise.
2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
PR rtl-optimization/87596
* lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
lra_get_insn_recog_data () instead of lra_insn_recog_data[]
for instructions in FROM..TO range.
2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
* cfgexpand.c (expand_one_var): Use specific wording in error message
for non-local frame variables.
* stor-layout.c (layout_decl): Do not issue a warning for them.
2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
* haifa-sched.c (priority): Add force_recompute parameter.
(apply_replacement): Call priority () with force_recompute = true.
(restore_pattern): Likewise.
2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
* simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
HOST_BITS_PER_WIDE_INT.
(test_vector_ops_duplicate): Likewise.
2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/72782
* config/i386/sse.md (VF_AVX512): New.
(avx512bcst): Likewise.
(*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
Likewise.
(*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
Likewise.
(*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
Likewise.
2018-10-18 Jonathan Wakely <jwakely@redhat.com>
* doc/invoke.texi (-dumpversion): Improve grammar.
(-dumpfullversion): Make more consistent with -dumpversion.
2018-10-18 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_emit_fp_unordered_jump):
Set JUMP_LABEL to the jump insn.
(ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
Predict emitted jump and add label to jump insn.
2018-10-18 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/87562
* input.c (get_substring_ranges_for_loc): Use
LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
getting the linemap for the endpoint. Verify that it's either
in the same linemap as the start point's spelling location, or
at least in the same file.
2018-10-18 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
feed width-specific load/store costs through ix86_vec_cost.
* config/i386/x86-tune-costs.h (athlon_cost): Adjust.
(k8_cost): Likewise.
(bdver_cost): Likewise.
(znver1_cost): Likewise.
(btver1_cost): Likewise.
(btver2_cost): Likewise.
2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
* simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
to simplify subreg of vec_merge.
2018-10-18 Richard Biener <rguenther@suse.de>
* config/i386/i386.c: Fix costing of vector FMA.
2018-10-18 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (ix86_vec_cost): Remove !parallel path
and argument.
(ix86_builtin_vectorization_cost): For vec_construct properly
cost insertion into SSE regs.
(...): Adjust calls to ix86_vec_cost.
2018-10-18 Richard Biener <rguenther@suse.de>
PR middle-end/87087
Revert
2018-02-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/84204
* tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
this place.
2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/87537
* simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
of vec_duplicate.
(test_vector_ops_duplicate): Add test for a scalar subreg of a
VEC_MERGE of a VEC_DUPLICATE.
2018-10-17 Joseph Myers <joseph@codesourcery.com>
* doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
* doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
* doc/standards.texi (C Language): Document C2X.
* dwarf2out.c (highest_c_language), config/rl78/rl78.c
(rl78_option_override): Handle "GNU C2X" language name.
2018-10-17 Joseph Myers <joseph@codesourcery.com>
* doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
Document C17 as published in 2018.
2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/87623
* fold-const.c (fold_truth_andor_1): If the right side is not constant,
bail out if both sides do not have the same storage order.
2018-10-17 Aldy Hernandez <aldyh@redhat.com>
* bitmap.c (bitmap_head::dump): New.
* bitmap.h (bitmap_head): Add dump().
* gimple-ssa-evrp-analyze.c
(evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
(evrp_range_analyzer::set_ssa_range_info): Same.
(evrp_range_analyzer::record_ranges_from_phis): Same.
(evrp_range_analyzer::record_ranges_from_stmt): Same.
* gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
* gimple-ssa-sprintf.c (get_int_range): Same.
(format_integer): Same.
(sprintf_dom_walker::handle_gimple_call): Same.
* ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
(ipcp_vr_lattice::top_p): Same.
(ipcp_vr_lattice::bottom_p): Same.
(ipcp_vr_lattice::set_to_bottom): Same.
(ipa_vr_operation_and_type_effects): Same.
(propagate_vr_across_jump_function): Same.
(ipcp_store_vr_results): Same.
* ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
(ipa_print_node_jump_functions_for_edge): Same.
(ipa_get_value_range): Same.
(ipa_compute_jump_functions_for_edge): Same.
(ipa_write_jump_function): Same.
* tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
* tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
Same.
* vr-values.c (set_value_range_to_nonnegative): Same.
(set_value_range_to_truthvalue): Same.
(vr_values::get_value_range): Same.
(vr_values::set_defs_to_varying): Same.
(vr_values::update_value_range): Same.
(symbolic_range_based_on_p): Same.
(vr_values::op_with_boolean_value_range_p): Same.
(vr_values::extract_range_for_var_from_comparison_expr): Same.
(vr_values::extract_range_from_ssa_name): Same.
(vr_values::extract_range_from_binary_expr): Same.
(vr_values::extract_range_from_unary_expr): Same.
(vr_values::extract_range_from_cond_expr): Same.
(vr_values::extract_range_from_comparison): Same.
(vr_values::check_for_binary_op_overflow): Same.
(vr_values::extract_range_basic): Same.
(vr_values::extract_range_from_assignment): Same.
(compare_ranges): Same.
(compare_range_with_value): Same.
(vr_values::adjust_range_with_scev): Same.
(vrp_valueize): Same.
(vrp_valueize_1): Same.
(vr_values::get_vr_for_comparison): Same.
(vr_values::compare_name_with_value): Same.
(vr_values::compare_names): Same.
(vr_values::vrp_evaluate_conditional): Same.
(find_case_label_ranges): Same.
(vr_values::vrp_visit_switch_stmt): Same.
(vr_values::extract_range_from_phi_node): Same.
(vr_values::simplify_div_or_mod_using_ranges): Same.
(vr_values::simplify_bit_ops_using_ranges): Same.
(test_for_singularity): Same.
(range_fits_type_p): Same.
(vr_values::simplify_cond_using_ranges_1): Same.
(vr_values::simplify_switch_using_ranges): Same.
(vr_values::simplify_float_conversion_using_ranges): Same.
(vr_values::two_valued_val_range_p): Same.
(vr_values::add_equivalence): Move to value_range::equiv_add.
* vr-values.h (vr_values::add_equivalence): Remove.
(VR_INITIALIZER): Remove.
* tree-vrp.c (value_range::set): New.
(value_range::equiv_add): New.
(value_range::value_range): New.
(value_range::deep_copy): New.
(value_range::check): New.
(value_range::equal_p): New.
(value_range::ignore_equivs_equal_p): New.
(value_range::operator==): New.
(value_range::operator!=): New.
(value_range::symbolic_p): New.
(value_range::numeric_p): New.
(value_range::set_undefined): New.
(value_range::set_varying): New.
(value_range::may_contain_p): New.
(value_range::equiv_clear): New.
(value_range::singleton_p): New.
(value_range::intersect): New.
(value_range::dump): New.
(value_range::set_and_canonicalize): New.
(set_value_range): Adjust for value_range API.
(set_value_range_to_undefined): Same.
(set_value_range_to_varying): Same.
(set_and_canonicalize_value_range): Same.
(set_value_range_to_nonnull): Same.
(set_value_range_to_null): Same.
(range_is_null): Same.
(range_is_nonnull): Same.
(range_int_cst_p): Same.
(range_int_cst_singleton_p): Same.
(symbolic_range_p): Same.
(range_includes_zero_p): Same.
(value_range_constant_singleton): Same.
(vrp_set_zero_nonzero_bits): Same.
(ranges_from_anti_range): Same.
(extract_range_into_wide_ints): Same.
(extract_range_from_multiplicative_op): Same.
(set_value_range_with_overflow): Same.
(extract_range_from_binary_expr_1): Same.
(extract_range_from_unary_expr): Same.
(dump_value_range): Same.
(debug_value_range): Same.
(vrp_prop::check_array_ref): Same.
(vrp_prop::check_mem_ref): Same.
(vrp_prop::vrp_initialize): Same.
(vrp_prop::visit_stmt): Same.
(intersect_ranges): Same.
(vrp_prop::visit_phi): Same.
(vrp_prop::vrp_finalize): Same.
(determine_value_range_1): Same.
(determine_value_range): Same.
(vrp_intersect_ranges_1): Rename to...
(vrp_intersect_1): this.
(vrp_intersect_ranges): Rename to...
(value_range::intersect_helper): ...this.
(vrp_meet_1): Rename to...
(value_range::union_helper): ...this.
(vrp_meet): Rename to...
(value_range::union_): ...this.
(copy_value_range): Remove.
* tree-vrp.h (struct value_range): Rewrite into a proper class.
(value_range::vrtype): New.
(value_range::type): New.
(value_range::equiv): New.
(value_range::min): New.
(value_range::max): New.
(value_range::varying_p): New.
(value_range::undefined_p): New.
(value_range::null_p): New.
(value_range::equiv_add): New.
(copy_value_range): Remove.
2018-10-17 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (SELFTEST_TARGETS): New.
(selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
(C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
(selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
c/Make-lang.in.
(CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
(selftest-c++-gdb, selftest-c++-valgrind): Move to
cp/Make-lang.in.
* configure: Regenerate.
* configure.ac (selftest_languages): New.
2018-10-17 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_multiplicative_op): Remove
overflow wraps argument.
(extract_range_from_binary_expr_1): Do not pass overflow wraps to
wide_int_range_multiplicative_op.
* wide-int-range.cc (wide_int_range_mult_wrapping): Remove
overflow wraps argument.
(wide_int_range_multiplicative_op): Same.
(wide_int_range_lshift): Same.
(wide_int_range_div): Same.
* wide-int-range.h (wide_int_range_multiplicative_op): Same.
(wide_int_range_lshift): Same.
(wide_int_range_div): Same.
2018-10-17 Aldy Hernandez <aldyh@redhat.com>
* wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
use sign as argument.
* tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
wide_int_range_shift_undefined_p.
2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
Rename to...
(@despeculate_copy<ALLI_TI:mode>): ... This.
* config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
switch statement.
2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config.gcc: Obsolete *-*-solaris2.10*.
* doc/install.texi (Specific, *-*-solaris2*): Document it.
2018-10-12 Jeff Law <law@redhat.com>
* config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
reg + sym +- const_int addressing modes.
2018-10-15 David Malcolm <dmalcolm@redhat.com>
* common.opt (fdiagnostics-minimum-margin-width=): New option.
* diagnostic-show-locus.c (layout::layout): Apply the minimum
margin width.
(layout::start_annotation_line): Only print up to 3 of the
margin character, to avoid touching the left-hand side.
(selftest::test_diagnostic_show_locus_fixit_lines): Update for
minimum margin width, as set by test_diagnostic_context's ctor.
(selftest::test_fixit_insert_containing_newline): Likewise.
(selftest::test_fixit_insert_containing_newline_2): Likewise.
(selftest::test_line_numbers_multiline_range): Clear
dc.min_margin_width.
* diagnostic.c (diagnostic_initialize): Initialize
min_margin_width.
* diagnostic.h (struct diagnostic_context): Add field
"min_margin_width".
* doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
* opts.c (common_handle_option): Handle
OPT_fdiagnostics_minimum_margin_width_.
* selftest-diagnostic.c
(selftest::test_diagnostic_context::test_diagnostic_context):
Initialize min_margin_width to 6.
* toplev.c (general_init): Initialize global_dc->min_margin_width.
2018-10-15 David Malcolm <dmalcolm@redhat.com>
* gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
Fix usage of "error_at_rich_loc" in the comment.
2018-10-15 Renlin Li <renlin.li@arm.com>
PR target/87563
* tree-vectorizer.c (try_vectorize_loop_1): Don't use
if-conversioned loop when it contains ifn with types not
supported by backend.
* internal-fn.c (expand_direct_optab_fn): Add an assert.
(direct_internal_fn_supported_p): New helper function.
* internal-fn.h (direct_internal_fn_supported_p): Declare.
2018-10-15 Jakub Jelinek <jakub@redhat.com>
PR target/87572
* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
PR tree-optimization/87022
* tree-loop-distribution.c (pg_add_dependence_edges): Check all
bits in dist vector rather than the first one.
2018-10-15 Richard Biener <rguenther@suse.de>
PR middle-end/87610
* tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
(visit_loadstore): When a used restrict tag escaped verify that
the points-to solution of "other" pointers do not include
escaped.
(compute_dependence_clique): If a used restrict tag escaped
communicated that down to visit_loadstore.
2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_expand_vec_init): Force vector element
into reg if it isn't a general operand.
2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/87599
* config/i386/sse.md (*vec_dupv2di): Add register source to
movddup.
2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/87572
* common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
* dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
(notice_args_size): Set it in the current trace if no insn that can
throw internally has been seen yet.
(connect_traces): When connecting args_size between traces, allow the
incoming values not to match if there is an insn setting it before the
first insn that can throw internally; in that case, force the creation
of a CFI note on this latter insn.
2018-10-13 Jonathan Wakely <jwakely@redhat.com>
* opt-problem.h (opt_wrapper): Use template-argument-list when naming
the base class, because using the injected-class-name was not clearly
specified until DR 176.
2018-10-12 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.md (doloop_end): New expander.
(doloop_end_insn): renamed from "doloop_end".
(addqi3): New pattern.
(subqi3): New pattern.
* config/pdp11/predicates.md (incdec_operand): New predicate.
2018-10-12 Yury Gribov <tetra2005@gmail.com>
PR middle-end/81376
* real.c (format_helper::can_represent_integral_type_p): New function
* real.h (format_helper::can_represent_integral_type_p): Ditto.
* match.pd: New pattern.
2018-10-12 Alexandre Oliva <oliva@adacore.com>
* configure.ac: Introduce --enable-large-address-aware
to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
* doc/install.texi: Document it.
* configure, config.in: Rebuilt.
* config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
(LINK_SPEC): Insert it.
* config/i386/mingw-w64.h: Likewise.
* cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
2018-10-12 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/87600
* ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
2018-10-12 Paul Koning <ni1d@arrl.net>
* doc/md.texi (doloop_end): Document that the pattern code may
need to check operand mode.
2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
to zero-extend between int and floating-point registers.
(load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
ldp into floating-point registers. Add type and arch attributes.
(zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
Use f_loads for type attribute.
2018-10-11 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (attribute packed): Correct typos.
2018-10-11 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (attribute flatten): Mention interaction with
noinline.
2018-10-11 Jan Hubicka <hubicka@ucw.cz>
PR target/87156
* cgraphclones.c (cgraph_node::create_version_clone_with_body):
Set new_decl virtual flag to zero.
2018-10-11 Martin Sebor <msebor@redhat.com>
PR middle-end/87593
* doc/extend.texi (attribute format_arg): Discuss using multiple
attributes on a single function.
2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
PR tree-optimization/86829
* match.pd (sin (atan (x))): New simplification rules.
(cos (atan (x))): Likewise.
* real.c (build_sinatan_real): New function.
* real.h (build_sinatan_real): Prototype.
2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
function.
(fold_mergeeo_helper): New helper function.
(rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
intrinsics. Correct some whitespace indentation issues.
2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
PR target/87511
* config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
Use HOST_WIDE_INT_1U for shift.
2018-10-11 Doug Rupp <rupp@adacore.com>
Olivier Hainque <hainque@adacore.com>
* config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
Pass --relax to the linker for RTPs.
(LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
2018-10-11 Andrew Stubbs <ams@codesourcery.com>
Jan Hubicka <jh@suse.cz>
Martin Jambor <mjambor@suse.cz>
* print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
the same elements are repeated rather than printing all of them.
* read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
"repeated" elements.
* read-rtl-function.c (test_loading_repeat): New function.
(read_rtl_function_c_tests): Call test_loading_repeat.
* rtl-tests.c (test_dumping_repeat): New function.
(rtl_tests_c_tests): Call test_dumping_repeat.
2018-10-11 Richard Biener <rguenther@suse.de>
* config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
bdver?_cost): Unify to ...
(bdver_memcpy, bdver_memset, bdver_cost): ... this.
* config/i386/i386.c (processor_cost_table): Adjust.
2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/87574
* cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
the thunk when expanding to GIMPLE.
2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR bootstrap/87551
* varasm.c (mergeable_string_section): Don't try to move zero-length
strings to the merge section.
2018-10-10 Uros Bizjak <ubizjak@gmail.com>
PR target/87573
* config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
2018-10-10 Jakub Jelinek <jakub@redhat.com>
PR target/87550
* config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
to special_args set.
2018-10-10 Richard Biener <rguenther@suse.de>
* config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
reduc_plus_scal_v4sf): Merge into pattern reducing to half width
and recursing and pattern terminating the recursion on SSE
vector width using ix86_expand_reduc.
(reduc_sminmax_scal_<mode>): Split into part reducing to half
width and recursing and SSE2 vector variant doing the final
reduction with ix86_expand_reduc.
(reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
with terminating the recursion at AVX level, splitting that
to SSE there.
2018-10-09 David Malcolm <dmalcolm@redhat.com>
* genmatch.c (error_cb): Rename to...
(diagnostic_cb): ...this, converting int params to enums.
(fatal_at): Update for renaming.
(warning_at): Likewise.
(main): Likewise.
* input.c (selftest::ebcdic_execution_charset::apply):
Update for renaming of...
(selftest::ebcdic_execution_charset::on_error): ...this, renaming
to...
(selftest::ebcdic_execution_charset::on_diagnostic): ...this,
converting level and reason to enums.
(class selftest::lexer_error_sink): Rename to...
(class selftest::lexer_test_options): ...this, renaming field
"m_errors" to "m_diagnostics".
(selftest::lexer_test_options::apply): Update for renaming of...
(selftest::lexer_test_options::on_error): ...this, renaming to...
(selftest::lexer_test_options::on_diagnostic): ...this
converting level and reason to enums.
(selftest::test_lexer_string_locations_raw_string_unterminated):
Update for renamings.
* opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
"reason".
2018-10-09 Paul A. Clarke <pc@us.ibm.com>
* config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
* config/rs6000/pmmintrin.h: New file.
2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/86659
* gimple-match.h (gimple_match_op constructors): Initialize reverse.
2018-10-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/63155
* tree-ssa-structalias.c: Include tree-ssa.h.
(get_constraint_for_ssa_var): For undefs return nothing_id.
(find_func_aliases): Cleanup PHI handling.
2018-10-09 Richard Biener <rguenther@suse.de>
* tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
replacements.
2018-10-09 Martin Liska <mliska@suse.cz>
* asan.c (asan_emit_stack_protection): If a stack variable
is located in a same file as current function, then emit
line info into variable definition string.
2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
* print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
information.
2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
* cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
on the thunk.
2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/86659
* gimple-match.h (struct gimple_match_op): Add reverse field.
(gimple_match_op::set_op): New overloaded method.
* gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
the REF_REVERSE_STORAGE_ORDER flag on the value.
(gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/63155
* gimple-ssa-backprop.c (backprop::intersect_uses): Use
FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
PR target/87517
* config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
Defined with __builtin_ia32_vfmaddsubpd512_mask.
2018-10-08 Richard Biener <rguenther@suse.de>
* config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
cost the same as AVX128 ones.
2018-10-08 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11-protos.h (output_block_move): Remove.
(expand_block_move): New function.
* config/pdp11/pdp11.c (output_block_move): Remove.
(expand_block_move): New function.
* config/pdp11/pdp11.h (MOVE_RATIO): New definition.
* config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
(*movmemhi1): Remove.
2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/2827.md: Increase latencies for some FP instructions.
2018-10-08 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
Open a dump scope.
* tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
* tree-vectorizer.h (dump_stmt_cost): Adjust.
(add_stmt_cost): Dump return value of the hook.
2018-10-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/63155
* tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
(ssa_propagation_engine::ssa_propagate): Remove redundant
bitmap bit clearing.
2018-10-05 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/86939
PR rtl-optimization/87479
* ira.h (non_conflicting_reg_copy_p): New prototype.
* ira-lives.c (ignore_reg_for_conflicts): New static variable.
(make_hard_regno_dead): Don't add conflicts for register
ignore_reg_for_conflicts.
(make_object_dead): Likewise.
(non_conflicting_reg_copy_p): New function.
(process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
* lra-lives.c (ignore_reg_for_conflicts): New static variable.
(make_hard_regno_dead): Don't add conflicts for register
ignore_reg_for_conflicts. Remove special conflict handling of
REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
check_pic_pseudo_p and update callers.
(mark_pseudo_dead): Don't add conflicts for register
ignore_reg_for_conflicts.
(process_bb_lives): Set ignore_reg_for_conflicts for copies.
2018-10-05 Andrew Waterman <andrew@sifive.com>
Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
new pattern using HONOR_SNANS that emits one extra instruction.
2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
patterns): Merge SI and DI patterns to a GPR pattern.
(unnamed define_insn and define_split for record form of that): Merge
to a single define_insn_and_split pattern.
2018-10-05 David Malcolm <dmalcolm@redhat.com>
PR c++/56856
* input.c (expand_location_to_spelling_point): Add param "aspect"
and use rather than hardcoding LOCATION_ASPECT_CARET.
(get_substring_ranges_for_loc): Handle the case of a single token
within a macro expansion.
* input.h (expand_location_to_spelling_point): Add "aspect" param,
defaulting to LOCATION_ASPECT_CARET.
2018-10-05 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
(TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
(TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
(pdp11_guard_type): New function.
2018-10-05 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
* config/pdp11/pdp11.opt (mfloat32): Remove.
(mfloat64): Remove.
* doc/invoke.texi (pdp11 -mfloat32): Remove:
(pdp11 -mfloat64): Remove.
2018-10-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
(*cmp<mode>_cc_i387): Ditto.
(*cmpu<mode>_cc_i387): Ditto.
(*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
* config/i386/i386.c (ix86_expand_fp_compare): Remove
"scratch" argument.
<case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
Emit x86_sahf_1 pattern.
(ix86_expand_compare): Update call to ix86_expand_fp_compare.
(ix86_expand_carry_flag_compare): Ditto.
2018-10-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
to reg_or_0_operand. Add "C" constraint.
(*cmpxf_cc_i387): Ditto.
(*cmp<mode>_i387): Change operand 2 predicate
to nonimm_or_0_operand. Add "C" constraint.
(*cmp<mode>_cc_i387): Ditto.
(*cmp<mode>_0_i387): Remove insn pattern.
(*cmp<mode>_0_cc_i387): Ditto.
2018-10-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
* config/i386/predicates.md (nonimm_or_0_operand): Rename
from vector_move_operand. Update all uses.
2018-10-05 Martin Sebor <msebor@redhat.com>
PR tree-optimization/87490
* builtins.c (expand_builtin_strnlen): Handle a null data.decl
consistently.
2018-10-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/63155
* tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
vertical space in dumpfiles.
* tree-ssa-propagate.h
(ssa_propagation_engine::process_ssa_edge_worklist): Remove.
* tree-ssa-propagate.c (cfg_blocks_back): New global.
(ssa_edge_worklist_back): Likewise.
(curr_order): Likewise.
(cfg_blocks_get): Remove abstraction.
(cfg_blocks_add): Likewise.
(cfg_blocks_empty_p): Likewise.
(add_ssa_edge): Add to current or next worklist based on
RPO index.
(add_control_edge): Likewise.
(ssa_propagation_engine::process_ssa_edge_worklist): Fold
into ...
(ssa_propagation_engine::ssa_propagate): ... here. Unify
iteration from CFG and SSA edge worklist so we process
everything in RPO order, prioritizing forward progress
over iteration.
(ssa_prop_init): Allocate new worklists, do not dump
immediate uses.
(ssa_prop_fini): Free new worklists.
2018-10-05 Richard Biener <rguenther@suse.de>
* tree-core.h (tree_block::abstract_flag): Remove.
(tree_block::block_num): Make full 32bits.
* tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
* tree.h (BLOCK_ABSTRACT): Remove.
* dwarf2out.c (gen_lexical_block_die): Remove dead code
resulting from BLOCK_ABSTRACT being always false.
(gen_inlined_subroutine_die): Likewise.
(gen_block_die): Likewise.
* tree.c (block_ultimate_origin): Likewise.
* tree-pretty-print.c (dump_block_node): Remove code dealing
with BLOCK_ABSTRACT.
* tree-ssa-live.c (dump_scope_block): Likewise.
* tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
* tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
2018-10-05 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
is asked for initialize mode to the component mode of the
vector type.
2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
PR target/87522
* config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
assembler for -mavx.
* config/i386/gnu-user64.h (ASM_SPEC): Likewise.
2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
PR target/87509
* config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
RS6000_BTM_DFP.
* config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
to be DImode. When using mffscrn, force the operand to a register.
2018-10-04 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
X87MODEF mode iterator.
(*fop_<X87MODEF:mode>_3_i387): Macroize insn from
*fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
X87MODEF mode iterator.
2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
* doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
-Wno-prio-ctor-dtor.
2018-10-04 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (OBJS): Add opt-problem.o.
* dump-context.h: Include "selftest.h.
(selftest::temp_dump_context): New forward decl.
(class dump_context): Make friend of class
selftest::temp_dump_context.
(dump_context::dump_loc_immediate): New decl.
(class dump_pretty_printer): Move here from dumpfile.c.
(class temp_dump_context): Move to namespace selftest.
(temp_dump_context::temp_dump_context): Add param
"forcibly_enable_dumping".
(selftest::verify_dumped_text):
(ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
(selftest::verify_item):
(ASSERT_IS_TEXT): Move here from dumpfile.c.
(ASSERT_IS_TREE): Likewise.
(ASSERT_IS_GIMPLE): Likewise.
* dumpfile.c (dump_context::dump_loc): Move immediate dumping
to...
(dump_context::dump_loc_immediate): ...this new function.
(class dump_pretty_printer): Move to dump-context.h.
(dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
(opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
(temp_dump_context::temp_dump_context): Move to "selftest"
namespace. Add param "forcibly_enable_dumping", and use it to
conditionalize the use of m_pp;
(selftest::verify_dumped_text): Make non-static.
(ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
(selftest::verify_item): Make non-static.
(ASSERT_IS_TEXT): Move to dump-context.h.
(ASSERT_IS_TREE): Likewise.
(ASSERT_IS_GIMPLE): Likewise.
(selftest::test_capture_of_dump_calls): Pass "true" for new
param of temp_dump_context.
* dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
TDF_COMPARE_DEBUG.
* opt-problem.cc: New file.
* opt-problem.h: New file.
* optinfo-emit-json.cc
(selftest::test_building_json_from_dump_calls): Pass "true" for
new param of temp_dump_context.
* optinfo.cc (optinfo_kind_to_dump_flag): New function.
(optinfo::emit_for_opt_problem): New function.
(optinfo::emit): Clarity which emit_item is used.
* optinfo.h (optinfo::get_dump_location): New accessor.
(optinfo::emit_for_opt_problem): New decl.
(optinfo::emit): Make const.
* selftest-run-tests.c (selftest::run_tests): Call
selftest::opt_problem_cc_tests.
* selftest.h (selftest::opt_problem_cc_tests): New decl.
* tree-data-ref.c (dr_analyze_innermost): Convert return type from
bool to opt_result, converting fprintf messages to
opt_result::failure_at calls. Add "stmt" param for use by the
failure_at calls.
(create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
(runtime_alias_check_p): Convert return type from bool to
opt_result, converting dump_printf calls to
opt_result::failure_at, using the statement DDR_A for their
location.
(find_data_references_in_stmt): Convert return type from bool to
opt_result, converting "return false" to opt_result::failure_at
with a new message.
* tree-data-ref.h: Include "opt-problem.h".
(dr_analyze_innermost): Convert return type from bool to opt_result,
and add a const gimple * param.
(find_data_references_in_stmt): Convert return type from bool to
opt_result.
(runtime_alias_check_p): Likewise.
* tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
dr_analyze_innermost.
* tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
Convert return type from bool to opt_result, adding a message for
the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
(vect_analyze_data_ref_dependence): Convert return type from bool
to opt_result. Change sense of return type from "false"
effectively meaning "no problems" to "false" meaning a problem,
so that "return false" becomes "return opt_result::success".
Convert "return true" calls to opt_result::failure_at, using
the location of statement A rather than vect_location.
(vect_analyze_data_ref_dependences): Convert return type from bool
to opt_result.
(verify_data_ref_alignment): Likewise, converting dump_printf_loc
calls to opt_result::failure_at, using the stmt location rather
than vect_location.
(vect_verify_datarefs_alignment): Convert return type from bool
to opt_result.
(vect_enhance_data_refs_alignment): Likewise. Split local "stat"
into multiple more-tightly-scoped copies.
(vect_analyze_data_refs_alignment): Convert return type from bool
to opt_result.
(vect_analyze_data_ref_accesses): Likewise, converting a
"return false" to a "return opt_result::failure_at", adding a
new message.
(vect_prune_runtime_alias_test_list): Convert return type from
bool to opt_result, converting dump_printf_loc to
opt_result::failure_at. Add a %G to show the pertinent statement,
and use the stmt's location rather than vect_location.
(vect_find_stmt_data_reference): Convert return type from
bool to opt_result, converting dump_printf_loc to
opt_result::failure_at, using stmt's location.
(vect_analyze_data_refs): Convert return type from bool to
opt_result. Convert "return false" to "return
opt_result::failure_at", adding messages as needed.
* tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
type from bool to opt_result.
(vect_determine_vf_for_stmt): Likewise.
(vect_determine_vectorization_factor): Likewise, converting
dump_printf_loc to opt_result::failure_at, using location of phi
rather than vect_location.
(vect_analyze_loop_form_1): Convert return type from bool to
opt_result, converting dump_printf_loc calls, retaining the use of
vect_location.
(vect_analyze_loop_form): Convert return type from loop_vec_info
to opt_loop_vec_info.
(vect_analyze_loop_operations): Convert return type from bool to
opt_result, converting dump_printf_loc calls, using the location
of phi/stmt rather than vect_location where available. Convert
various "return false" to "return opt_result::failure_at" with
"unsupported phi" messages.
(vect_get_datarefs_in_loop): Convert return type from bool to
opt_result. Add a message for the
PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
(vect_analyze_loop_2): Convert return type from bool to
opt_result. Ensure "ok" is set to a opt_result::failure_at before
each "goto again;", adding new messages where needed.
Add "unsupported grouped {store|load}" messages.
(vect_analyze_loop): Convert return type from loop_vec_info to
opt_loop_vec_info.
* tree-vect-slp.c (vect_analyze_slp): Convert return type from
bool to opt_result.
* tree-vect-stmts.c (process_use): Likewise, converting
dump_printf_loc call and using stmt location, rather than
vect_location.
(vect_mark_stmts_to_be_vectorized): Likeise.
(vect_analyze_stmt): Likewise, adding a %G.
(vect_get_vector_types_for_stmt): Convert return type from bool to
opt_result, converting dump_printf_loc calls and using stmt
location, rather than vect_location.
(vect_get_mask_type_for_stmt): Convert return type from tree to
opt_tree, converting dump_printf_loc calls and using stmt location.
* tree-vectorizer.c: Include "opt-problem.h.
(try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
enabled, use it to report at the top level "couldn't vectorize
loop" followed by the problem.
* tree-vectorizer.h (opt_loop_vec_info): New typedef.
(vect_mark_stmts_to_be_vectorized): Convert return type from bool
to opt_result.
(vect_analyze_stmt): Likewise.
(vect_get_vector_types_for_stmt): Likewise.
(tree vect_get_mask_type_for_stmt): Likewise.
(vect_analyze_data_ref_dependences): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
(vect_analyze_data_refs_alignment): Likewise.
(vect_verify_datarefs_alignment): Likewise.
(vect_analyze_data_ref_accesses): Likewise.
(vect_prune_runtime_alias_test_list): Likewise.
(vect_find_stmt_data_reference): Likewise.
(vect_analyze_data_refs): Likewise.
(vect_analyze_loop): Convert return type from loop_vec_info to
opt_loop_vec_info.
(vect_analyze_loop_form): Likewise.
(vect_analyze_slp): Convert return type from bool to opt_result.
2018-10-04 David Malcolm <dmalcolm@redhat.com>
* doc/invoke.texi (-fopt-info): Document new "internals"
sub-option.
* dump-context.h (dump_context::apply_dump_filter_p): New decl.
* dumpfile.c (dump_options): Update for renaming of MSG_ALL to
MSG_ALL_KINDS.
(optinfo_verbosity_options): Add "internals".
(kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
(dump_context::apply_dump_filter_p): New member function.
(dump_context::dump_loc): Use apply_dump_filter_p rather than
explicitly masking the dump_kind.
(dump_context::begin_scope): Increment the scope depth first. Use
apply_dump_filter_p rather than explicitly masking the dump_kind.
(dump_context::emit_item): Use apply_dump_filter_p rather than
explicitly masking the dump_kind.
(dump_dec): Likewise.
(dump_hex): Likewise.
(dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
(opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
(opt_info_switch_p): Update handling of default
MSG_OPTIMIZED_LOCATIONS to cope with default of
MSG_PRIORITY_USER_FACING.
(dump_basic_block): Use apply_dump_filter_p rather than explicitly
masking the dump_kind.
(selftest::test_capture_of_dump_calls): Update test_dump_context
instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
than MSG_ALL. Generalize scope test to be run at all four
combinations of with/without MSG_PRIORITY_USER_FACING and
MSG_PRIORITY_INTERNALS, adding examples of explicit priority
for each of the two values.
* dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
(AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
with MSG_PRIORITY_*.
* tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
dump messages as MSG_PRIORITY_USER_FACING.
* tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
about the interaction with MSG_PRIORITY_*.
2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
* varasm.c (output_constant): Add new parameter merge_strings.
Make strings properly zero terminated in merge string sections.
(mergeable_string_section): Don't fail if the last char is non-zero.
(assemble_variable_contents): Handle merge string sections.
(assemble_variable): Likewise.
(assemble_constant_contents): Likewise.
(output_constant_def_contents): Likewise.
(output_constructor_array_range,
output_constructor_regular_field): Adjust call to output_constant.
(output_object_block): Adjust call to assemble_constant_contents
and assemble_variable_contents.
2018-10-04 Martin Liska <mliska@suse.cz>
PR c/87483
* cgraphunit.c (process_function_and_variable_attributes):
Warn about a function with alias attribute and a body.
2018-10-04 Martin Liska <mliska@suse.cz>
PR ipa/82625
* multiple_target.c (redirect_to_specific_clone): New function.
(ipa_target_clone): Use it.
* tree-inline.c: Fix comment.
2018-10-04 David Malcolm <dmalcolm@redhat.com>
* dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
fields.
(gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
(gcc::dump_manager::register_pass): New member function, adapted
from loop body in gcc::pass_manager::register_pass, adding a
call to update_dfi_for_opt_info.
(gcc::dump_manager::opt_info_enable_passes): Store the
-fopt-info options into the new fields. Move the loop
bodies into...
(gcc::dump_manager::update_dfi_for_opt_info): ...this new member
function.
* dumpfile.h (struct opt_pass): New forward decl.
(gcc::dump_manager::register_pass): New decl.
(gcc::dump_manager::update_dfi_for_opt_info): New decl.
(class gcc::dump_manager): Add fields "m_optgroup_flags",
"m_optinfo_flags", and "m_optinfo_filename".
* passes.c (gcc::pass_manager::register_pass): Move all of the
dump-handling code to gcc::dump_manager::register_pass.
2018-10-04 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/87466
* target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
* doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
* doc/tm.texi: Regenerate.
* ira-lives.c (process_bb_node_lives): Use the new target hook.
* lra-lives.c (process_bb_lives): Likewise.
* config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
Define.
2018-10-04 Tamar Christina <tamar.christina@arm.com>
* params.c (add_params): Fix initialization.
2018-10-04 Martin Liska <mliska@suse.cz>
PR gcov-profile/84107
* tree-profile.c (init_ic_make_global_vars):
Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
Come up with new ic_tuple* variables. Emit
__gcov_indirect_call{,_topn} variables.
(gimple_gen_ic_profiler): Access the variable
and emit gimple.
(gimple_gen_ic_func_profiler): Access
__gcov_indirect_call.callee field.
(gimple_init_gcov_profiler): Use ptr_type_node.
* value-prof.c (gimple_ic): Use ptr_type_node.
2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/85787
* ipa-pure-const.c (malloc_candidate_p_1): Move most of
malloc_candidate_p into this function and add support for
detecting multiple phis.
(DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
2018-10-04 Martin Liska <mliska@suse.cz>
PR ipa/87491
* ipa-inline.c (inline_to_all_callers_1):
Call ultimate_alias_target for node being inlined.
2018-10-03 Jeff Law <law@redhat.com>
* gimple-ssa-sprintf.c (format_string): Do not hardcode size of
target's wchar_t.
* tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
* tree.h (get_typenode_from_name): Prototype.
2018-10-03 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
Change operand 2 predicate to nonimmediate_operand.
(*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
2018-10-03 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>
* gimple-ssa-sprintf.c (struct fmtresult): Add new member and
initialize it.
(get_string_length): Detect unterminated arrays.
(format_string): Same.
(format_directive): Warn about unterminated arrays.
(handle_gimple_call): Mark statements with no_warning as needed.
2018-10-03 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
also define __riscv_abi_rve. Delete trailing white space.
2018-10-03 Paul Koning <ni1d@arrl.net>
Enable LRA register allocator for PDP11.
* config/pdp11/constraints.md (Q): Use define_memory_constraint.
(R): Likewise.
(D): Likewise.
* config/pdp11/pdp11.c (pdp11_lra_p): New function.
* config/pdp11/pdp11.opt (-mlra): New option.
* doc/invoke.texi (PDP-11 Options): Document -mlra.
2018-10-03 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
(*<absneg:code>extend<mode>xf2): Ditto.
2018-10-03 Aldy Hernandez <aldyh@redhat.com>
PR tree-optimization/87415
* tree-vrp.c (set_value_range_with_overflow): Special case one bit
precision fields.
2018-10-02 Jeff Law <law@redhat.com>
* gimple-fold.c (get_range_strlen): Only set *nonstr when
an unterminated string is discovered. Bubble up range
even for unterminated strings.
(gimple_fold_builtin_strlen): Do not fold if get_range_strlen
indicates the string was not terminated via NONSTR.
2018-10-03 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_unary_expr): Special case all
pointer conversions.
Do not do anything special for anti-ranges.
2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
* config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
2018-10-03 Martin Liska <mliska@suse.cz>
PR gcov-profile/86109
* coverage.c (coverage_begin_function): Do not
mark lambdas as artificial.
* tree-core.h (struct GTY): Remove tm_clone_flag
and introduce new lambda_function.
* tree.h (DECL_LAMBDA_FUNCTION): New macro.
2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/87474
* config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
P8_VECTOR and VSX are enabled.
2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/driver-native.c (s390_host_detect_local_cpu): Add
0x3907 as CPU model number.
2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
* common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
* config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
* config/s390/s390.md: Likewise. Rename also the cpu attribute
value from arch12 to z14.
2018-10-02 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
(isinfxf2): Ditto.
(isinf<mode>2): Ditto.
2018-10-02 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
before emitting fxam. Perform calculations in XFmode.
2018-10-02 Marc Glisse <marc.glisse@inria.fr>
* match.pd (((X /[ex] A) +- B) * A): New transformation.
2018-10-02 Marc Glisse <marc.glisse@inria.fr>
PR middle-end/87319
* fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
* tree.c (signed_or_unsigned_type_for): Handle complex.
2018-10-02 Jeff Law <law@redhat.com>
* gimple-fold.c (get_range_strlen): Remove dead code.
2018-10-02 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>
* builtins.c (unterminated_array): Add new arguments.
If argument is not terminated, bubble up size and exact
state to callers.
(expand_builtin_strnlen): Detect, avoid expanding
and diagnose unterminated arrays.
(c_strlen): Fill in offset of start of unterminated strings.
* builtins.h (unterminated_array): Update prototype.
2018-10-02 Richard Biener <rguenther@suse.de>
* config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
of haddv4df, first reduce to SSE width and exploit the fact
that we only need element zero with the reduction result.
(reduc_plus_scal_v2df): Likewise.
2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
* dojump.h (do_jump): Delete.
(do_jump_1): Likewise.
(split_comparison): Move around.
* dojump.c (do_jump): Make static.
(do_jump_1): Likewise.
(jumpifnot): Move around.
(jumpifnot_1): Likewise.
(jumpif): Likewise.
(jumpif_1): Likewise.
* expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
* reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
insns in the delay slot and add_insn_after for the jump insn.
2018-10-02 Richard Biener <rguenther@suse.de>
* tree-inline.c (expand_call_inline): Use the location of
the callee declaration for the inline-entry marker.
* final.c (notice_source_line): Remove special-casing of
NOTE_INSN_INLINE_ENTRY.
2018-10-01 Carl Love <cel@us.ibm.com>
PR 69431
* config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
(__builtin_mtfsb0): New.
(__builtin_mtfsb1): New.
( __builtin_set_fpscr_rn): New.
(__builtin_set_fpscr_drn): New.
* config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
(rs6000_expand_set_fpscr_rn_builtin): Add.
(rs6000_expand_set_fpscr_drn_builtin): Add.
(rs6000_expand_builtin): Add case statement entries for
RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
RS6000_BUILTIN_MFFSL.
(rs6000_init_builtins): Add ftype initialization and def_builtin
calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
__builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
* config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
rs6000_mffscdrn): Add define_insn.
(rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
* doc/extend.texi: Add documentation for the builtins.
2018-10-01 Richard Biener <rguenther@suse.de>
PR tree-optimization/87465
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
causing branch miscounts.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
* common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
aarch64_option_default_param): New.
(params.h): Include.
(TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
* config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
stack-clash protection validation code.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
* params.c (validate_param): New.
(add_params): Use it.
(set_param_value): Refactor param validation into validate_param.
(diagnostic.h): Include.
* diagnostic.h (diagnostic_ready_p): New.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
* params.c (set_param_value):
Add index of parameter being validated.
* common/common-target.def (option_validate_param): New.
* common/common-targhooks.h (default_option_validate_param): New.
* common/common-targhooks.c (default_option_validate_param): New.
* doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
* doc/tm.texi: Regenerate.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
PR target/86486
* config/aarch64/aarch64.c (aarch64_override_options_internal):
Add validation for stack-clash parameters and set defaults.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
PR target/86486
* configure.ac: Add stack-clash-protection-guard-size.
* doc/install.texi: Document it.
* config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
* params.def: Update comment for guard-size.
(PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
* configure: Regenerate.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
PR target/86486
* config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
STACK_DYNAMIC_OFFSET): New.
* config/aarch64/aarch64.c (aarch64_layout_frame):
Update outgoing args size.
(aarch64_stack_clash_protection_alloca_probe_range,
TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
PR target/86486
* explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
probe ranges.
* target.def (stack_clash_protection_alloca_probe_range): New.
(stack_clash_protection_final_dynamic_probe): Remove.
* targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
(default_stack_clash_protection_final_dynamic_probe): Remove.
* targhooks.c: Likewise.
* doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
(TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
* doc/tm.texi: Regenerate.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
PR target/86486
* config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
* config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
aarch64_clamp_to_uimm12_shift): New.
(aarch64_allocate_and_probe_stack_space): Add SVE specific section.
* config/aarch64/aarch64.md (probe_sve_stack_clash): New.
2018-10-01 Tamar Christina <tamar.christina@arm.com>
PR target/86486
* config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
2018-10-01 Jeff Law <law@redhat.com>
Richard Sandiford <richard.sandiford@linaro.org>
Tamar Christina <tamar.christina@arm.com>
PR target/86486
* config/aarch64/aarch64.md
(probe_stack_range): Add k (SP) constraint.
* config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
STACK_CLASH_MAX_UNROLL_PAGES): New.
* config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
stack probes for stack clash.
(aarch64_allocate_and_probe_stack_space): New.
(aarch64_expand_prologue): Use it.
(aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
(aarch64_sub_sp): Add emit_move_imm optional param.
2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
PR tree-optimization/87261
* match.pd: Remove trailing whitespace.
Add (x & y) | ~(x | y) -> ~(x ^ y),
(~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (*add_n): Clean up pattern, update instruction
constraints.
(ashlsi3_insn): Update instruction constraints.
(ashrsi3_insn): Likewise.
(rotrsi3): Likewise.
(add_shift): Likewise.
* config/arc/constraints.md (Csz): New 32 bit constraint. It
avoids placing in the limm field small constants which, otherwise,
could end into a small instruction.
2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (maddsidi4_split): Don't use dmac if the
destination register is not odd-even.
(umaddsidi4_split): Likewise.
2018-10-01 Richard Biener <rguenther@suse.de>
* tree-inline.c (expand_call_inline): Store origin of fn
in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
* tree.c (block_ultimate_origin): Simplify and do some
checking.
2018-09-30 Uros Bizjak <ubizjak@gmail.com>
* config/i386/mmx.md (EMMS): New int iterator.
(emms): New int attribute.
(mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
EMMS int iterator. Explicitly declare clobbers.
(mmx_emms): Remove expander.
(mmx_femms): Ditto.
* config/i386/predicates.md (emms_operation): Remove predicate.
(vzeroall_pattern): New predicate.
(vzeroupper_pattern): Rename from vzeroupper_operation.
* config/i386/i386.c (ix86_avx_u128_mode_after): Use
vzeroupper_pattern and vzeroall_pattern predicates.
2018-09-30 Peter Bergner <bergner@linux.ibm.com>
PR rtl-optimization/86939
* ira-lives.c (make_hard_regno_born): Rename from this...
(make_hard_regno_live): ... to this. Remove update to conflict
information. Update function comment.
(make_hard_regno_dead): Add conflict information update. Update
function comment.
(make_object_born): Rename from this...
(make_object_live): ... to this. Remove update to conflict information.
Update function comment.
(make_object_dead): Add conflict information update. Update function
comment.
(mark_pseudo_regno_live): Call make_object_live.
(mark_pseudo_regno_subword_live): Likewise.
(mark_hard_reg_dead): Update function comment.
(mark_hard_reg_live): Call make_hard_regno_live.
(process_bb_node_lives): Likewise.
* lra-lives.c (make_hard_regno_born): Rename from this...
(make_hard_regno_live): ... to this. Remove update to conflict
information. Remove now uneeded check_pic_pseudo_p argument.
Update function comment.
(make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
to conflict information. Update function comment.
(mark_pseudo_live): Remove update to conflict information. Update
function comment.
(mark_pseudo_dead): Add conflict information update.
(mark_regno_live): Call make_hard_regno_live.
(mark_regno_dead): Call make_hard_regno_dead with new arguement.
(process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
PR target/87370
* config/i386/i386.c (construct_container): Use TImode for
BLKmode values in 2 integer registers.
2018-09-29 Jeff Law <law@redhat.com>
* builtins.c (unterminated_array): Pass in c_strlen_data * to
c_strlen rather than just a tree *.
(c_strlen): Change NONSTR argument to a c_strlen_data pointer.
Update recursive calls appropriately. If caller did not provide a
suitable data pointer, create a local one. When a non-terminated
string is discovered, bubble up information about the string via the
c_strlen_data object.
* builtins.h (c_strlen): Update prototype.
(c_strlen_data): New structure.
* gimple-fold.c (get_range_strlen): Update calls to c_strlen.
For a type 2 call, if c_strlen indicates a non-terminated string
use the length of the non-terminated string.
(gimple_fold_builtin_stpcpy): Update calls to c_strlen.
2018-09-29 Jakub Jelinek <jakub@redhat.com>
PR target/87467
* config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
__m512d type for __A argument rather than __m512.
2018-09-28 John David Anglin <danglin@gcc.gnu.org>
* match.pd (simple_comparison): Don't optimize if either operand is
a function pointer when target needs function pointer canonicalization.
2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
power5 .. power9 to remove indirection.
* config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
ASM_CPU_476_SPEC): Delete.
(ASM_CPU_SPEC): Adjust.
(EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
* config.in: Delete HAVE_AS_DCI.
* config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
* config/rs6000/rs6000.h: Ditto.
* configure.ac: Delete HAVE_AS_DCI.
* configure: Regenerate.
2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
* config.in (HAVE_AS_LWSYNC): Delete.
* config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
* config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
do it as a .long .
* config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
* config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
as a .long .
* configure.ac: Delete HAVE_AS_LWSYNC.
* configure: Regenerate.
2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
Pierre-Marie de Rodat <derodat@adacore.com>
* calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
* cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
(cgraph_node::create_thunk): Add indirect_offset parameter.
(thunk_adjust): Likewise.
* cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
and initialize the corresponding field with it.
(cgraph_node::dump): Dump indirect_offset field.
* cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
* cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
(thunk_adjust): Add indirect_offset parameter and deal with it.
(cgraph_node::expand_thunk): Deal with the indirect_offset field and
pass it to thunk_adjust. Do not call the target hook if it's non-zero
or if the thunk is external or local. Fix formatting. Do not chain
the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
if any, in the GIMPLE representation.
* ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
* lto-cgraph.c (lto_output_node): Write indirect_offset field.
(input_node): Read indirect_offset field.
* tree-inline.c (expand_call_inline): Pass indirect_offset field in the
call to thunk_adjust.
* tree-nested.c (struct nesting_info): Add thunk_p field.
(create_nesting_tree): Set it.
(convert_all_function_calls): Copy static chain from targets to thunks.
(finalize_nesting_tree_1): Return early for thunks.
(unnest_nesting_tree_1): Do not finalize thunks.
(gimplify_all_functions): Do not gimplify thunks.
2018-09-28 David Malcolm <dmalcolm@redhat.com>
* opt-suggestions.c (option_proposer::build_option_suggestions):
Release "option_values".
2018-09-28 David Malcolm <dmalcolm@redhat.com>
* coverage.c (get_coverage_counts): Convert problem-reporting dump
messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
* dumpfile.c (kind_as_string): New function.
(dump_loc): Rather than a hardcoded prefix of "note: ", use
kind_as_string to vary the prefix based on dump_kind.
(selftest::test_capture_of_dump_calls): Update for above.
2018-09-28 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
(GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
2018-09-28 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
* config/i386/i386.c (ix86_fixed_condition_code_regs): Use
INVALID_REGNUM instead of FPSR_REG.
(ix86_md_asm_adjust): Do not clobber FPSR_REG.
* config/i386/i386.md: Update comment of FP compares.
(fldenv): Do not clobber FPSR_REG.
2018-09-28 Richard Biener <rguenther@suse.de>
* tree.h (BLOCK_ORIGIN): New.
* omp-expand.c (grid_expand_target_grid_body): Assign
BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
* tree-inline.c (remap_block): Likewise.
* auto-profile.c (get_function_decl_from_block): Simplify
by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
* langhooks.c (lhd_print_error_function): Likewise.
* optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
Likewise.
* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
* tree.c (block_nonartificial_location): Likewise.
(block_ultimate_origin): Likewise.
* tree-pretty-print.c (percent_K_format): Likewise. Remove
no longer needed LTO case.
2018-09-28 Andrew Stubbs <ams@codesourcery.com>
Jan Hubicka <jh@suse.cz>
Martin Jambor <mjambor@suse.cz>
* simplify-rtx.c (simplify_merge_mask): New function.
(simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
same masks are used in op1 or op2.
(test_vec_merge): New function.
(test_vector_ops): Call test_vec_merge.
2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
* config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
* config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
(cypress_costs): Set it.
(supersparc_costs): Likewise.
(hypersparc_costs): Likewise.
(leon_cost): Likewise.
(leon3_costs): Likewise.
(sparclet_costs): Likewise.
(ultrasparc_costs): Likewise.
(ultrasparc_costs): Likewise.
(niagara_costs): Likewise.
(niagara2_costs): Likewise.
(niagara3_costs): Likewise.
(niagara4_costs): Likewise.
(niagara7_costs): Likewise.
(m8_costs): Likewise.
(TARGET_CAN_FOLLOW_JUMP): Define.
(pass_work_around_errata::gate): Minor tweak.
(sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
Automaitcally clear MASK_FSMULD mask for V7 processors.
(sparc_can_follow_jump): New static function.
(output_ubranch): Deal with CROSSING_JUMP_P.
(sparc_use_sched_lookahead): Rewrite using switch statement.
(sparc_issue_rate): Reorder.
(sparc_branch_cost): New function.
2018-09-27 Martin Sebor <msebor@redhat.com>
* tree.h (tree_to_shwi): Add attribute nonnull and pure.
(tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
(int_fits_type_p): Same.
2018-09-27 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (FPCR_REG): Remove.
(UNSPEC_FLDCW): Remove.
(x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
(x86_fldcw_1): Remove insn pattern.
(fnstenv): Do not clobber FPCR_REG.
(fldenv): Ditto.
* config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
(CALL_USED_REGISTERS): Ditto.
(REG_ALLOC_ORDER): Ditto.
(REG_CLASS_CONTENTS): Ditto.
(HI_REGISTER_NAMES): Ditto.
(ADDITIONAL_REGISTER_NAMES): Use defines instead
of numerical constants.
* config/i386/i386.c (regclass_map): Remove fpsr register.
(dbx_register_map): Ditto.
(dbx64_register_map): Ditto.
(svr4_dbx_register_map): Ditto.
(print_reg): Do not handle FPCR_REG.
2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
PR target/87149
* config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
Delete, always treat as true.
* config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
Ditto. Simplify remaining code.
* config/powerpcspe/powerpcspe.h: Ditto.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
Simplify remaining code.
(rs6000_expand_builtin): Ditto.
* config/rs6000/rs6000.h: Ditto.
* configure.ac: Ditto.
* configure: Regenerate.
2018-09-27 Martin Liska <mliska@suse.cz>
* coverage.c (get_coverage_counts): Revert the formatting
of missing profile opt info.
2018-09-27 Richard Biener <rguenther@suse.de>
PR debug/37801
PR debug/87440
* dwarf2out.c (set_block_origin_self): Do not mark outermost
block as we do not output that.
(gen_inlined_subroutine_die): Elide the originally outermost
block, matching what we do for concrete instances.
(decls_for_scope): Add parameter specifying whether to recurse
to subblocks.
2018-09-27 Andrew Stubbs <ams@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
PR 82089
* expmed.c (emit_cstore): Fix handling of result_mode == BImode and
STORE_FLAG_VALUE == 1.
2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
constant definitions.
("tx_assist"): Replace magic number with PPA_TX_ABORT.
("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
("speculation_barrier"): New expander definition.
2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
PR gcov-profile/86957
* common.opt: New warning option -Wmissing-profile.
* coverage.c (get_coverage_counts): Add warning for missing .gcda file.
* doc/invoke.texi: Document -Wmissing-profile.
2018-09-26 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.md (subsi3_extended2): Add J constraint.
(negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
2018-09-26 Martin Sebor <msebor@redhat.com>
* tree.c (zerop): Change return type to bool.
(integer_zerop, integer_onep, integer_each_onep): Same.
(integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
(integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
(real_onep, real_minus_onep, chain_index): Same.
(print_type_hash_statistics, type_list_equal): Same.
* tree.h (zerop): Same.
(zerop, integer_zerop, integer_onep, integer_each_onep): Same.
(integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
(integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
(real_onep, real_minus_onep, chain_index): Same.
(print_type_hash_statistics, type_list_equal): Same.
2018-09-26 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
2018-09-26 Jakub Jelinek <jakub@redhat.com>
PR target/87414
* config/i386/i386.c: Include debug.h and dwarf2out.h.
(output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
call.
2018-09-25 Andrew Stubbs <ams@codesourcery.com>
* builtins.c (get_builtin_sync_mem): Force address mode conversion.
2018-09-26 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
and FP_SECOND_SSE_REGS.
(REG_CLASS_NAMES): Ditto.
(REG_CLASS_CONTENTS): Ditto.
* config/i386/i386.c (ix86_preferred_reload_class) Do not handle
FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
(ix86_preferred_output_reload_class): Ditto.
* config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
clobber constraint to "=&f".
(fix_truncdi_i387): Ditto.
(lrintxfdi2): Ditto.
(fistdi2_<rounding>): Ditto.
(fpremxf4_i387): Change "=u" constraint to "=f".
(fprem1xf4_i387): Ditto.
(sincosxf3): Ditto.
(fptanxf4_i387): Ditto.
(fxtractxf3_i387): Ditto.
(fscalexf4_i387): Ditto.
(atan2xf3): Change "u" constraint to "f".
(fyl2xxf3_i387): Ditto.
(fyl2xp1xf3_i387): Ditto.
2018-09-26 Uros Bizjak <ubizjak@gmail.com>
PR target/87439
* config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
for removed I387_MASK_PM entity.
2018-09-26 Jeff Law <law@redhat.com>
Revert
2018-09-26 Alexey Neyman <stilor@att.net>
* graphite.h: Include <isl/id.h> and <isl/space.h>; these
headers are no longer pulled in by <isl/val.h>.
2018-09-26 Richard Biener <rguenther@suse.de>
PR debug/87443
* dwarf2out.c (gen_lexical_block_die): Do not equate inline
or concrete instance DIE to the tree. Create abstract origin
attributes also for concrete instances.
2018-09-26 Alexey Neyman <stilor@att.net>
* graphite.h: Include <isl/id.h> and <isl/space.h>; these
headers are no longer pulled in by <isl/val.h>.
2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
* config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
Use new helper functions.
* config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
Use new helper functions.
* config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
aarch_mm_needs_release): New declarations.
* config/arm/aarch-common.c (aarch_mm_needs_acquire,
aarch_mm_needs_release): New.
2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
* config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
(arm32_output_mi_thunk): Deal with long calls.
2018-09-26 Richard Biener <rguenther@suse.de>
PR debug/87428
PR debug/87362
* tree-inline.c (expand_call_inline): When the location
of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
the inserted BLOCK to make inlined_function_outer_scope_p
recognize it.
* dwarf2out.c (add_call_src_coords_attributes): Do not add
coords for reserved locations.
2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
(*call_indirect_nonlocal_sysv<mode>): Ditto.
(*call_value_indirect_nonlocal_sysv<mode>): Ditto.
(*sibcall_nonlocal_sysv<mode>): Ditto.
(*sibcall_value_nonlocal_sysv<mode>): Ditto.
(<bd>_<mode>): Ditto.
(<bd>tf_<mode>): Ditto.
2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
control string as a list of templates instead of as C code.
(*altivec_movti): Ditto.
* config/rs6000/darwin.md (movdf_low_di): Ditto.
2018-09-25 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
when target symbol is weak.
2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c/87387
* builtins.c (unterminated_array): Simplify.
* expr.c (string_constant): Handle SSA_NAME. Add more exceptions
where pointer arithmetic is safe.
2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86987
* config/rs6000/altivec.md (altivec_vspltb): Use
const_0_to_15_operand instead of u5bit_cint_operand.
(*altivec_vspltb_internal): Ditto.
(altivec_vspltb_direct): Ditto.
(altivec_vsplth): Use const_0_to_7_operand instead of
u5bit_cint_operand.
(*altivec_vsplth_internal): Ditto.
(altivec_vsplth_direct): Ditto.
(altivec_vspltw): Use const_0_to_3_operand instead of
u5bit_cint_operand.
(*altivec_vspltw_internal): Ditto.
(altivec_vspltw_direct): Ditto.
(altivec_vspltsf): Ditto.
(*altivec_vspltsf_internal): Ditto.
* config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
various splats with the proper size immediate. Reorder the various
cases by ascending size of immediate, and put all such together.
2018-09-25 Richard Biener <rguenther@suse.de>
PR debug/83941
* dwarf2out.c (add_AT_external_die_ref): Remove now redundant
GC-ification.
(maybe_create_die_with_external_ref): Do not create
DW_TAG_imported_unit here.
(add_abstract_origin_attribute): Handle external BLOCK refs.
(dwarf2out_abstract_function): Simplify LTO case.
(dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
rather than using maybe_create_die_with_external_ref.
2018-09-25 Uros Bizjak <ubizjak@gmail.com>
PR target/71278
* config/i386/i386.md (frndintxf2_mask_pm): Remove.
(frndintxf2_mask_pm_i387): Ditto.
(nearbyintxf2): Rewrite expander pattern to match rintxf2.
Enable for !flag_trapping_math.
(nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
Change operand 1 predicate to nonimmediate_operand.
(attr "i387_cw"): Remove mask_pm.
* config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
(enum ix86_entity): Remove I387_MASK_PM.
* config/i386/i386.c (ix86_i387_mode_needed): Do not
handle I387_MASK_PM.
(ix86_mode_needed): Ditto.
(ix86_mode_after): Ditto.
(ix86_mode_entry): Ditto.
(ix86_mode_exit): Ditto.
(emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
2018-09-25 Jakub Jelinek <jakub@redhat.com>
* vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
to_update_switch_stmts to vNULL instead of calling create on them
immediately.
2018-09-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/87402
* tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
(visit_phi): Re-instantiate handling of supposed to be VARYING
but non-VARYING backedge value.
2018-09-25 Richard Biener <rguenther@suse.de>
PR debug/83941
* dwarf2out.c (struct sym_off_pair): New.
(external_die_map): New global.
(lookup_decl_die): When in LTO create DIEs lazily from the
external_die_map.
(lookup_block_die): New function, create DIEs lazily in LTO.
(equate_block_to_die): New function.
(dwarf2out_die_ref_for_decl): During WPA get the association
from the external DIE map.
(dwarf2out_register_external_die): Record mapping into the
external DIE map.
(maybe_create_die_with_external_ref): New function split out from
DIE generation part of old dwarf2out_register_external_die.
(add_abstract_origin_attribute): Do not return the DIE. When
in LTO reference externals directly.
(dwarf2out_abstract_function): When in LTO ignore calls for
decls with external DIEs (already present abstract instances).
(gen_call_site_die): Adjust.
(add_high_low_attributes): Likewise.
(gen_lexical_block_die): Likewise.
(gen_inlined_subroutine_die): Likewie.
(gen_block_die): Likewise.
(dwarf2out_inline_entry): Likewise.
(dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
DIEs.
2018-09-25 Martin Liska <mliska@suse.cz>
* ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
integers and not by a float value.
2018-09-25 Martin Liska <mliska@suse.cz>
PR fortran/87394
* dbgcnt.c (dbg_cnt_process_single_pair): Return false
instead of NULL.
* dumpfile.c (dump_enable_all): Remove extra parenthesis.
* gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
* godump.c (go_format_type): Remove extra parenthesis.
2018-09-25 Martin Liska <mliska@suse.cz>
* alias.c (set_dest_equal_p): Remove unused function.
* config/i386/i386.c (def_builtin_pure2): Likewise.
* diagnostic-show-locus.c (class layout): Remove
unused field.
(layout::layout): Likewise here.
* dump-context.h (class temp_dump_context): Likewise.
* dwarf2out.c (add_AT_fde_ref): Remove unused function.
(add_AT_loclistsptr): Likewise.
(add_AT_offset): Likewise.
(get_AT_hi_pc): Likewise.
(is_comdat_die): Likewise.
(type_is_enum): Likewise.
(ceiling): Likewise.
(add_AT_vms_delta): Likewise.
(is_class_die): Likewise.
* edit-context.c (class line_event): Remove unused field.
* graphite-sese-to-poly.c (tree_int_to_gmp): Remove
unused function.
* ipa-cp.c (ipa_get_vr_lat): Likewise.
* lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
(ok_for_base_p_nonstrict): Likewise.
* tree-chrec.c (is_not_constant_evolution): Likewise.
(chrec_fold_poly_cst): Likewise.
* tree-if-conv.c (has_pred_critical_p): Likewise.
* tree-ssa-coalesce.c (print_exprs): Likewise.
* tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
* tree-ssa-uninit.c (is_and_or_or_p): Likewise.
* tree-vrp.c (value_ranges_intersect_p): Likewise.
(value_range_nonnegative_p): Likewise.
2018-09-25 Martin Liska <mliska@suse.cz>
* config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
Do not handle "GNU Pascal".
* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
Likewise.
* config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
from documentation. Likewise.
* dbxout.c (dbxout_range_type): Likewise.
* doc/cpp.texi: Likewise.
* doc/extend.texi: Likewise.
* doc/frontends.texi: Likewise.
* doc/invoke.texi: Remove Pascal entry.
* tree.def (CLEANUP_POINT_EXPR): Likewise.
* doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
2018-09-25 Martin Liska <mliska@suse.cz>
PR middle-end/86078
* doc/invoke.texi: Document all parameters and remove default
of the parameters.
2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
PR bootstrap/87417
* rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
contains HOST_WIDE_INTs when computing its size.
2018-09-24 Jim Wilson <jimw@sifive.com>
PR target/87391
* config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
not TARGET_RVE.
(ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
2018-09-24 Andrew Pinski <apinski@marvell.com>
* config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
access prev before checking it for NULLness in the
AARCH64_FUSE_CMP_BRANCH case.
2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/82699
* config/i386/i386.c (rest_of_insert_endbranch): Set
endbr_queued_at_entrance to true and don't insert ENDBR if
x86_function_profiler will be called.
(x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
is true.
* config/i386/i386.h (machine_function): Add
endbr_queued_at_entrance.
2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
* genattrtab.c (mk_attr_alt): Use alternative_mask.
(attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
types.
(check_attr_test): Use alternative_mask.
(get_attr_value): Likewise.
(compute_alternative_mask): Use alternative_mask and XWINT.
(make_alternative_compare): Use alternative_mask.
(attr_alt_subset_p): Use XWINT.
(attr_alt_subset_of_compl_p): Likewise.
(attr_alt_intersection): Use alternative_mask and XWINT.
(attr_alt_union): Likewise.
(attr_alt_complement): Use HOST_WIDE_INT and XWINT.
(mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
(simplify_test_exp): Use alternative_mask and XWINT.
(write_test_expr): Use alternative_mask and XWINT, adjust bit
number calculation to support 64 bits. Generate code that
checks 64-bit masks.
(main): Use alternative_mask.
* rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/80080
* config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
RETURN+USE when returning via %r14.
2018-09-24 Martin Liska <mliska@suse.cz>
* gcov.c (output_lines): Print colorization legend
for both flag_use_colors and flag_use_hotness_colors.
Reword the help.
2018-09-24 Martin Liska <mliska@suse.cz>
* coverage.c (get_coverage_counts): Use warning_at
with current_function_decl location. Use %qD in warning
message.
2018-09-24 Martin Liska <mliska@suse.cz>
* memory-block.h (memory_block_pool::release): Annotate with
valgrind that the memory is not accessible.
2018-09-24 Martin Liska <mliska@suse.cz>
PR sanitizer/85774
* asan.c: Make asan_handled_variables extern.
* asan.h: Likewise.
* cfgexpand.c (expand_stack_vars): Make sure
a representative is unpoison if another
variable in the partition is handled by
use-after-scope sanitization.
2018-09-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/63155
* tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
the worklist when the edge of the respective argument isn't
executable.
2018-09-23 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (enum reg_class): Rename MASK_REGS to
ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
(MASK_CLASS_P): Update for rename.
(MAYBE_MASK_CLASS_P): Ditto.
(REG_CLASS_NAMES): Update.
(REG_CLASS_CONTENT): Update.
* config/i386/i386.c (regclass_map): Update for MASK_REG
and ALL_MASK_REGS rename.
* config/i386/constraints.md (Yk): Update for rename.
(k): Ditto.
2018-09-23 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.h (enum reg_class): Remove
EVEX_SSE_REGS and MOD4_SSE_REGS.
(REG_CLASS_NAMES): Update.
(REG_CLASS_CONTENT): Update.
* config/i386/i386.c (regclass_map): Declare AVX-512 SSE
registers as ALL_SSE_REGS.
(ix86_additional_allocno_class_p): Remove.
(TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
(ix86_register_priority): Lower priority of EVEX SSE registers.
Use IN_RANGE macro where appropriate.
(ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
AVX-5124VNNIW checks.
(ix86_modes_tieable_p): Tie 512-bit SSE modes.
* config/i386/sse.md (avx5124fmaddps_4fmaddps)
(avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
(avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
(avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
(avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
(avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
(avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
(avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
(avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
(avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
* config/i386/constraints.md (Yh): Remove.
2018-09-23 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (regclass_map): Declare integer REX registers
as GENERAL_REGS.
2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
* doc/service.texi (Service): Switch the fsf.org link to https.
2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
PR target/86798
* config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
2018-09-21 Florian Weimer <fweimer@redhat.com>
PR middle-end/81035
* doc/extend.texi (Common Function Attributes): Mention that
noreturn suppresses tail call optimization.
2018-09-21 Jeff Law <law@redhat.com>
* gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
vr_values::cleanup_edges_and_switches.
* tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
vr_values class.
(identify_jump_threads): Remove EDGE_IGNORE handling.
(execute_vrp): Move handling of to_remove_edges and
to_update_switch_stmts into vr_values class member functions.
* tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
(to_update_switch_stmts): Likewise.
* vr-values.c: Include cfghooks.h.
(vr_values::vr_values): Initialize to_remove_edges and
to_update_switch_stmts.
(vr_values::~vr_values): Verify to_remove_edges and
to_update_switch_stmts are empty.
(vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
(vr_values::cleanup_edges_and_switches): New member function.
* vr-values.h (vr_values): Add cleanup_edges_and_switches member
function. Add new data members.
2018-09-21 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/87309
* dumpfile.c (dump_context::begin_scope): Filter the dump_loc
calls with pflags and alt_flags.
(selftest::test_capture_of_dump_calls): Add test of interaction of
MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
(VXWORKS_LIBS_RTP): Minor reordering.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
(VXWORKS_LIBS_DIR_RTP): Remove definition and use.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
(PTRDIFF_TYPE): Likewise.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
triplet, similar to support for VxWorks7.
* config/vxworks-dummy.h: Provide a default definition
of TARGET_VXWORKS64 to 0.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
* config/vxworks-dummy.h: here.
2018-09-21 Olivier Hainque <hainque@adacore.com>
* config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
Bo Zhou <zbo.zhou@hisilicon.com>
* config/aarch64/aarch64-cores.def (tsv110): New CPU.
* config/aarch64/aarch64-tune.md: Regenerated.
* doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
* config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
* config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
2018-09-21 Andrew Stubbs <ams@codesourcery.com>
Julian Brown <julian@codesourcery.com>
* builtins.c (get_builtin_sync_mem): Handle address spaces.
2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
* config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
if the call takes a static chain.
2018-09-21 Martin Liska <mliska@suse.cz>
* auto-profile.c (autofdo_source_profile::read): Do not
set sum_all.
(read_profile): Do not add working sets.
(read_autofdo_file): Remove sum_all.
(afdo_callsite_hot_enough_for_early_inline): Remove const
qualifier.
* coverage.c (struct counts_entry): Remove gcov_summary.
(read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
do not support GCOV_TAG_PROGRAM_SUMMARY.
(get_coverage_counts): Remove summary and expected
arguments.
* coverage.h (get_coverage_counts): Likewise.
* doc/gcov-dump.texi: Remove -w option.
* gcov-dump.c (dump_working_sets): Remove.
(main): Do not support '-w' option.
(print_usage): Likewise.
(tag_summary): Likewise.
* gcov-io.c (gcov_write_summary): Do not dump
histogram.
(gcov_read_summary): Likewise.
(gcov_histo_index): Remove.
(gcov_histogram_merge): Likewise.
(compute_working_sets): Likewise.
* gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
it not obsolete.
(GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
(GCOV_TAG_SUMMARY_LENGTH): Adjust.
(GCOV_HISTOGRAM_SIZE): Remove.
(GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
(struct gcov_summary): Simplify rapidly just
to runs and sum_max fields.
(gcov_histo_index): Remove.
(NUM_GCOV_WORKING_SETS): Likewise.
(compute_working_sets): Likewise.
* gcov-tool.c (print_overlap_usage_message): Remove
trailing empty line.
* gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
(output_lines): Remove program related line.
* ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
* lto-cgraph.c (output_profile_summary): Do not stream GCOV
histogram.
(input_profile_summary): Do not read it.
(merge_profile_summaries): And do not merge it.
(input_symtab): Do not call removed function.
* modulo-sched.c (sms_schedule): Do not print sum_max.
* params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
removed when histogram method was invented.
(HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
mode.
* postreload-gcse.c (eliminate_partially_redundant_load): Fix
GCOV coding style.
* predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
and dump selected value.
* profile.c (add_working_set): Remove.
(get_working_sets): Likewise.
(find_working_set): Likewise.
(get_exec_counts): Do not work with working sets.
(read_profile_edge_counts): Do not inform as sum_max is removed.
(compute_branch_probabilities): Likewise.
(compute_value_histograms): Remove argument for call of
get_coverage_counts.
* profile.h: Do not make gcov_summary const.
2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
* config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/86990
* gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
Check that the entire merged store group is made of constants only for
overlapping stores.
2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
* gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
(VTABLE_VERIFICATION_SPEC): Likewise.
(SANITIZER_EARLY_SPEC): Likewise.
(SANITIZER_SPEC): Likewise.
* config/darwin.h (LINK_COMMAND_SPEC): Likewise.
* doc/invoke.texi (Link Options): Document -r.
2018-09-20 Richard Biener <rguenther@suse.de>
PR middle-end/87054
* gimplify.c (gimplify_expr): Retain alignment of
addressable lvalue in dereference.
2018-09-20 Alexandre Oliva <aoliva@redhat.com>
PR bootstrap/87013
* configure.ac: Check for .loc is_stmt support.
* configure, config.in: Rebuilt.
* dwarf2out.c (dwarf2out_source_line): Skip is_stmt
if not supported.
2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
* doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
-misel=no.
2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
VECTOR_OTHER.
* config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
case VECTOR_OTHER.
2018-09-20 Marek Polacek <polacek@redhat.com>
* doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/87288
* tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
into account when determining PEELING_FOR_NITERS.
2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86877
* tree-vect-loop.c (vect_analyze_loop_2): Call
vect_verify_datarefs_alignment.
2018-09-19 Marek Polacek <polacek@redhat.com>
* doc/invoke.texi: Document -Wclass-conversion.
2018-09-19 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.c (pa_adjust_priority): Delete.
(TARGET_SCHED_ADJUST_PRIORITY): Delete define.
* config/pa/pa.md (atomic_storeqi): Restore deleted expander.
(atomic_storehi): Likewise.
(atomic_storesi): Likewise.
(atomic_loaddi): Restore compare and swap exchange loop code.
2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/86902
* combine.c (try_combine): When changing the CC mode used, don't change
an unrelated mode in other_insn to that new CC mode.
2018-09-19 David Malcolm <dmalcolm@redhat.com>
* tree-data-ref.c (runtime_alias_check_p): Use formatted printing
with %T in place of calls to dump_generic_expr.
(prune_runtime_alias_test_list): Likewise.
(create_runtime_alias_checks): Likewise.
* tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
(vect_analyze_data_ref_dependence): Likewise.
(vect_slp_analyze_data_ref_dependence): Likewise.
(vect_record_base_alignment): Likewise. Use %G in place of call
to dump_gimple_stmt.
(vect_compute_data_ref_alignment): Likewise.
(verify_data_ref_alignment): Likewise.
(vect_find_same_alignment_drs): Likewise.
(vect_analyze_group_access_1): Likewise.
(vect_analyze_data_ref_accesses): Likewise.
(dependence_distance_ge_vf): Likewise.
(dump_lower_bound): Likewise.
(vect_prune_runtime_alias_test_list): Likewise.
(vect_find_stmt_data_reference): Likewise.
(vect_analyze_data_refs): Likewise.
(vect_create_addr_base_for_vector_ref): Likewise.
(vect_create_data_ref_ptr): Likewise.
* tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
(vect_can_advance_ivs_p): Likewise.
(vect_update_ivs_after_vectorizer): Likewise.
(vect_gen_prolog_loop_niters): Likewise.
(vect_prepare_for_masked_peels): Likewise.
* tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
(vect_determine_vectorization_factor): Likewise.
(vect_is_simple_iv_evolution): Likewise.
(vect_analyze_scalar_cycles_1): Likewise.
(vect_analyze_loop_operations): Likewise.
(report_vect_op): Likewise.
(vect_is_slp_reduction): Likewise.
(check_reduction_path): Likewise.
(vect_is_simple_reduction): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vect_finalize_reduction:): Likewise.
(vectorizable_induction): Likewise.
(vect_transform_loop_stmt): Likewise.
(vect_transform_loop): Likewise.
(optimize_mask_stores): Likewise.
* tree-vect-patterns.c (vect_pattern_detected): Likewise.
(vect_split_statement): Likewise.
(vect_recog_over_widening_pattern): Likewise.
(vect_recog_average_pattern): Likewise.
(vect_determine_min_output_precision_1): Likewise.
(vect_determine_precisions_from_range): Likewise.
(vect_determine_precisions_from_users): Likewise.
(vect_mark_pattern_stmts): Likewise.
(vect_pattern_recog_1): Likewise.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
(vect_record_max_nunits): Likewise.
(vect_build_slp_tree_1): Likewise.
(vect_build_slp_tree_2): Likewise.
(vect_print_slp_tree): Likewise.
(vect_analyze_slp_instance): Likewise.
(vect_detect_hybrid_slp_stmts): Likewise.
(vect_detect_hybrid_slp_1): Likewise.
(vect_slp_analyze_operations): Likewise.
(vect_slp_analyze_bb_1): Likewise.
(vect_transform_slp_perm_load): Likewise.
(vect_schedule_slp_instance): Likewise.
* tree-vect-stmts.c (vect_mark_relevant): Likewise.
(vect_mark_stmts_to_be_vectorized): Likewise.
(vect_init_vector_1): Likewise.
(vect_get_vec_def_for_operand): Likewise.
(vect_finish_stmt_generation_1): Likewise.
(vect_check_load_store_mask): Likewise.
(vectorizable_call): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_load): Likewise.
(vect_analyze_stmt): Likewise.
(vect_is_simple_use): Likewise.
(vect_get_vector_types_for_stmt): Likewise.
(vect_get_mask_type_for_stmt): Likewise.
* tree-vectorizer.c (increase_alignment): Likewise.
2018-09-19 Andrew Stubbs <ams@codesourcery.com>
* doc/rtl.texi: Adjust vec_select description.
* simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
non-constant selectors.
2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
* config/aarch64/aarch64-protos.h
(aarch64_offset_9bit_signed_unscaled_p): New declaration.
* config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
(arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
* config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
(AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
(AARCH64_FL_PROFILE): Move index so flags are ordered.
(AARCH64_ISA_RCPC8_4): New flag.
* config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
to aarch64_offset_9bit_signed_unscaled_p.
* config/aarch64/atomics.md (atomic_store<mode>): Allow offset
and use stlur.
* config/aarch64/constraints.md (Ust): New constraint.
* config/aarch64/predicates.md.
(aarch64_9bit_offset_memory_operand): New predicate.
(aarch64_rcpc_memory_operand): New predicate.
2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/87361
* rtlanal.c (nonzero_bits1): Revert accidental change.
2018-09-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/87349
PR tree-optimization/87342
* tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
2018-09-18 Marek Polacek <polacek@redhat.com>
P1064R0 - Allowing Virtual Function Calls in Constant Expressions
* gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/86882
* rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
2018-09-18 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
*<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
2018-09-18 Jonathan Wakely <jwakely@redhat.com>
PR other/87353
* doc/invoke.texi (Link Options): Fix formatting and grammar.
2018-09-18 Richard Biener <rguenther@suse.de>
PR middle-end/63155
* tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
(compute_samebase_partition_bases): Likewise.
(coalesce_ssa_name): Always use compute_optimized_partition_bases.
(gimple_can_coalesce_p): Simplify.
2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
Handle a library implementation of ffs calling __builtin_ffs.
* config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
(mmix_init_libfuncs): New function: make __builtin_ffs expand
to __ffsdi2.
2018-09-17 David Malcolm <dmalcolm@redhat.com>
* diagnostic-show-locus.c (class layout_range): Add field
"m_original_idx".
(layout_range::layout_range): Add "original_idx" param and use it
to initialize new field.
(make_range): Use 0 for original_idx.
(layout::layout): Pass in index to calls to
maybe_add_location_range.
(layout::maybe_add_location_range): Add param "original_idx" and
pass it on to layout_range.
(layout::print_any_labels): Pass on range->m_original_idx to
get_text call.
(gcc_rich_location::add_location_if_nearby): Use 0 for
original_idx.
* gcc-rich-location.h (text_range_label::get_text): Update for new
param.
(range_label_for_type_mismatch::get_text): Likewise.
2018-09-17 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
2018-09-17 David Malcolm <dmalcolm@redhat.com>
* gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
format_string_diagnostic_t.
(fmtwarn_n): Likewise.
* substring-locations.c
(format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
(format_warning_n_va): Convert to...
(format_string_diagnostic_t::emit_warning_n_va): ...this.
(format_warning_va): Convert to...
(format_string_diagnostic_t::emit_warning_va): ...this.
(format_warning_at_substring): Convert to...
(format_string_diagnostic_t::emit_warning): ...this.
(format_warning_at_substring_n): Convert to...
(format_string_diagnostic_t::emit_warning_n): ...this.
* substring-locations.h (class format_string_diagnostic_t): New
class.
(format_warning_va): Convert to
format_string_diagnostic_t::emit_warning_va.
(format_warning_n_va): Convert to
format_string_diagnostic_t::emit_warning_n_va.
(format_warning_at_substring): Convert to
format_string_diagnostic_t::emit_warning.
(format_warning_at_substring_n): Convert to
format_string_diagnostic_t::emit_warning_n.
2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
Bernd Schmidt <bernds_cb1@t-online.de>
* config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
SImode args.
2018-09-17 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
operand 0 predicate to nonimmediate operand.
(rint<mode>2_frndint): Remove insn pattern.
(rint<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate rintxf2 insn.
(frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
Do not use X87MODEF mode macro.
(frndintxf2_<rounding>_i387): Rename from
frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
(<rounding_insn><mode>2): For non-SSE modes, extend operand 1
to XFmode and generate significandxf3 insn.
2018-09-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/87328
* tree-ssa-sccvn.c (process_bb): Remove assertion about not
visiting unexecutable backedges when not iterating.
(do_rpo_vn): Mark all edges not executable even when not
iterating.
2018-09-17 Martin Jambor <mjambor@suse.cz>
PR c/63886
* doc/invoke.texi (Warning Options): Likewise.
2018-09-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/87301
* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
clean EH info from leftover copy assignments.
2018-09-17 Martin Liska <mliska@suse.cz>
PR gcov-profile/85871
* gcov.c (output_intermediate_file): Fix out of bounds
access.
2018-09-17 Vineet Gupta <vgupta@synopsys.com>
* config/arc/arc.c: Object attributes for core4 not reflected
correctly.
* config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
core3).
2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
* config/arc/linux.h (LINK_EH_SPEC): Add missing space.
2018-09-17 Martin Liska <mliska@suse.cz>
* doc/gcov.texi: Document new option --use-hotness-colors.
* gcov.c (struct source_info): Declare new field.
(source_info::source_info): Set default for maximum_count.
(print_usage): Add new -q option.
(process_args): Process it.
(accumulate_line_info): Save src->maximum_count.
(output_line_beginning): Make color line number if
flag_use_hotness_colors is set.
(output_line_details): Pass default argument value.
(output_lines): Pass src->maximum_count.
2018-09-17 Martin Liska <mliska@suse.cz>
* common/config/i386/i386-common.c (ix86_get_valid_option_values):
Use processor_names table.
* config/i386/i386.c (ix86_default_align): Use
processor_cost_table for alignment values.
(ix86_option_override_internal): Use processor_names.
(ix86_function_specific_print): Likewise.
* config/i386/i386.h (struct processor_costs):
Add alignment values.
(struct ptt): Remove and replace with const char *.
* config/i386/x86-tune-costs.h (struct processor_costs):
Declare default alignments for all costs.
2018-09-17 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_unary_expr): Do not special case
symbolics or VR_VARYING ranges for ABS_EXPR.
* wide-int-range.cc (wide_int_range_abs): Return positive numbers
when range will wrap.
2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/86864
* cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
before and after a JUMP_TABLE_DATA.
2018-09-14 John David Anglin <danglin@gcc.gnu.org>
PR middle-end/87188
* dojump.c (do_compare_and_jump): Canonicalize function pointers
when one operand is a function pointer. Use POINTER_TYPE_P and
FUNC_OR_METHOD_TYPE_P.
* expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
* fold-const.c (build_range_check): Likewise.
* match.pd (simple_comparison): Likewise.
2018-09-14 David Malcolm <dmalcolm@redhat.com>
PR c/82967
* spellcheck.c (get_edit_distance_cutoff): New function.
(selftest::test_edit_distance_unit_test_oneway): Rename to...
(selftest::test_get_edit_distance_one_way): ...this.
(selftest::test_get_edit_distance_unit): Rename to...
(selftest::test_get_edit_distance_both_ways): ...this.
(selftest::test_edit_distances): Move tests to this new function,
and test some more pairs of strings. Update for above renaming.
(selftest::get_old_cutoff): New function.
(selftest::test_get_edit_distance_cutoff): New function.
(selftest::assert_suggested_for): New function.
(ASSERT_SUGGESTED_FOR): New macro.
(selftest::assert_not_suggested_for): New function.
(ASSERT_NOT_SUGGESTED_FOR): New macro.
(selftest::test_suggestions): New function.
(selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
tests to selftest::test_edit_distances and call it. Add calls to
selftest::test_get_edit_distance_cutoff and
selftest::test_suggestions.
* spellcheck.h (get_edit_distance_cutoff): New function declaration.
(best_match::consider): Replace hard-coded cutoff calculation with
a call to...
(best_match::get_cutoff): New declaration.
(best_match::get_best_meaningful_candidate): Likewise.
2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* builtins.c (fold_builtin_strlen): Remove TODO comment.
2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
revert:
2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
terminated string literal.
2018-09-14 Martin Sebor <msebor@redhat.com>
* builtins.c (unterminated_array): Handle ARRAY_REF.
(expand_builtin_stpcpy_1): Detect unterminated char arrays.
* builtins.h (unterminated_array): Declare extern.
* gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
arrays.
(gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
calls.
2018-09-14 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>
* builtins.c (unterminated_array): New.
(expand_builtin_strcpy): Adjust.
(expand_builtin_strcpy_args): Detect unterminated arrays.
* gimple-fold.c (get_maxval_strlen): Add argument. Detect
unterminated arrays.
* gimple-fold.h (get_maxval_strlen): Add argument.
(gimple_fold_builtin_strcpy): Detec unterminated arrays.
* gimple-fold.c (get_range_strlen): Add argument.
(get_maxval_strlen): Adjust.
* gimple-fold.h (get_range_strlen): Add argument.
2018-09-14 Wei Xiao <wei3.xiao@intel.com>
* config/i386/movdirintrin.h: Fix copyright year.
2018-09-14 Uros Bizjak <ubizjak@gmail.com>
* reg-stack.c: Include regs.h.
(replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
(emit_pop_insn): Default pop insn mode to the reg_raw_mode of
FIRST_STACK_REG, not DFmode.
(emit_swap_insn): Default swap insn mode to the reg_raw_mode of
FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
(change stack): Default register mode to the reg_raw_mode of
FIRST_STACK_REG, not DFmode.
* config/i386/i386.md (*swap<mode>): Remove insn pattern.
(*swapxf): Rename from swapxf.
2018-09-14 Carl Love <cel@us.ibm.com>
* config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
* config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
PR target/87224
* config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
alternatives.
2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
PR target/85628
* config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
2018-09-14 Jason Merrill <jason@redhat.com>
Fix --enable-gather-detailed-mem-stats.
* hash-table.c (hash_table_usage): Change from variable to function.
* hash-table.h: Adjust.
* Makefile.in: Add missing dependencies on hash-table.h.
2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR tree-optimization/87259
PR lto/87283
(pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
execute_cse_reciprocals_1 has tried transforming.
2018-09-14 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_binary_expr_1): Normalize
VR_VARYING for PLUS/MINUS_EXPR.
2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
formatting.
2018-09-14 Richard Biener <rguenther@suse.de>
PR middle-end/63155
* tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
bits for the merged partition.
2018-09-13 Martin Sebor <msebor@redhat.com>
Bernd Edlinger <bernd.edlinger@hotmail.de>
* builtins.h (c_srlen): Add argument.
* builtins.c (warn_string_no_nul): New function.
(c_strlen): Add argument and use it. Update recursive calls.
Pass DECL argument to string_constant to get info on non
terminated strings. Update *NONSTR as needed.
(fold_builtin_strlen): Add argument to calls to c_strlen.
Warn for unterminated arrays.
(warn_string_no_null): Add prototype.
* expr.c (string_constant): Update arguments. Update recursive
calls appropriately. Detect missing NUL terminator and outermost
declaration its missing in.
Improve checks for arrays with nonzero lower bound or elements
that are not a single byte. Simplify offset computation.
Simplify checks for non-NUL terminated strings.
* gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
* gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
* builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
correctly.
* fold-const.c (c_getstr): Fix function comment. Remove unused third
argument. Fix range checks.
* fold-const.h (c_getstr): Adjust protoype.
* gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
string is constant but contains no NUL byte.
* expr.c (string_constant): Adjust function comment.
Remove bogus check for zero termination.
* fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
* varasm.c (compare_constant): Compare type size of STRING_CSTs.
(get_constant_size): Don't make STRING_CSTs larger than they are.
(check_string_literal): New check function for STRING_CSTs.
(output_constant): Use it.
2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
PR target/86812
* config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
2018-09-13 Richard Biener <rguenther@suse.de>
PR tree-optimization/87263
* tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
(struct unwind_state): Add max_rpo field.
(do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
Compute max_rpo, the max RPO number a block can be backwards reached
from. Re-write non-iterating mode to a RPO ordered worklist approach,
separating it from the iterating mode.
2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
* haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
(rfs_decision): New scheduling decision.
2018-09-13 Richard Biener <rguenther@suse.de>
PR bootstrap/87134
* tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
(vn_nary_op_insert_pieces_predicated): Do not write useless
valid_dominated_by_p entry outside of the allocated storage.
2018-09-13 Omar Sandoval <osandov@osandov.com>
Tom de Vries <tdevries@suse.de>
PR debug/86985
* dwarf2out.c (is_c): New function.
(add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
PR target/85628
* config/aarch64/aarch64.md (*aarch64_bfxil):
Define.
* config/aarch64/constraints.md (Ulc): Define.
* config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
Define.
* config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
New function.
2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
* config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
* config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
aarch64_layout_frame call.
(aarch64_expand_epilogue): Likewise.
(aarch64_initial_elimination_offset): Likewise.
(aarch64_get_separate_components): Likewise.
(aarch64_use_return_insn_p): Likewise.
(aarch64_layout_frame): Remove unneeded check.
2018-09-13 Jakub Jelinek <jakub@redhat.com>
* configure.ac: Only append
" : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
gcc_config_arguments if it was never reconfigured or last reconfigure
was with different arguments.
* configure: Regenerated.
2018-09-13 Jakub Jelinek <jakub@redhat.com>
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR middle-end/87290
* expr.c (maybe_optimize_pow2p_mod_cmp): New function.
(maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
2018-09-13 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/87287
* fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
X % C == 0 to X % (unsigned) C == 0 optimization to ...
* match.pd (X % C == 0): ... here. New optimization.
2018-09-12 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82853
* expr.h (maybe_optimize_mod_cmp): Declare.
* expr.c (mod_inv): New function.
(maybe_optimize_mod_cmp): New function.
(do_store_flag): Use it.
* cfgexpand.c (expand_gimple_cond): Likewise.
2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
Julian Brown <julian@codesourcery.com>
PR middle-end/86336
* gimplify.c (gimplify_scan_omp_clauses): Set
target_firstprivatize_array_bases in OpenACC parallel and kernels
region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
OpenACC data regions.
2018-09-12 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
(sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
2018-09-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/87280
* tree-ssa-sccvn.c (process_bb): Handle the case of executable
edge but unreachable target.
(do_rpo_vn): For conservatively handling a PHI only mark
the backedge executable but not the block reachable.
2018-09-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/87266
* tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
visited blocks.
2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
constants.
("trunc<BFP:mode><DFP_ALL:mode>2")
("trunc<DFP_ALL:mode><BFP:mode>2")
("extend<BFP:mode><DFP_ALL:mode>2")
("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
according to the target operand type.
2018-09-12 Jakub Jelinek <jakub@redhat.com>
Andreas Krebbel <krebbel@linux.ibm.com>
PR tree-optimization/86844
* gimple-ssa-store-merging.c
(imm_store_chain_info::coalesce_immediate): For overlapping stores, if
there are any overlapping stores in between them, make sure they are
also coalesced or we give up completely.
2018-09-12 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87248
* fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
BIT_AND_EXPR's second operand is a power of two. Formatting fix.
2018-09-12 Tom de Vries <tdevries@suse.de>
* common.opt (gdescribe-dies): Add option.
* dwarf2out.c (add_name_and_src_coords_attributes): Add description
attribute for artifical and nameless decls.
(dwarf2out_register_external_die): Add description attribute to
external reference die.
(add_desc_attribute): New functions.
(gen_subprogram_die): Add description attribute to
DW_TAG_call_site_parameter.
* tree-pretty-print.c (print_generic_expr_to_str): New function.
* tree-pretty-print.h (print_generic_expr_to_str): Declare.
* doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
-gno-describe-dies.
(@item -gdescribe-dies): Add.
2018-09-12 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (vrp_shift_undefined_p): Remove.
(extract_range_from_binary_expr_1: Call
wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
* wide-int-range.h (wide_int_range_shift_undefined_p): Do not
depend on sign.
2018-09-12 Aldy Hernandez <aldyh@redhat.com>
* gimple-ssa-warn-alloca.c
(alloca_type_and_limit::alloca_type_and_limit): Initialize limit
field for ALLOCA_BOUND_*_LARGE.
2018-09-11 Nathan Sidwell <nathan@acm.org>
* gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
2018-09-11 Uros Bizjak <ubizjak@gmail.com>
* reg-stack.c (subst_asm_stack_regs): Call replace_reg also
for clobbers. Remove obsolete comment.
2018-09-11 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
mpxchk, mpxld and mpxst types.
(define_attr length_immediate): Remove all processing of mpx types.
(define_attr prefix_0f): Ditto.
(define_attr memory): Ditto.
2018-09-11 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
(log<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate logxf3 insn.
(log10<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate log10xf3 insn.
(log2<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate log2xf3 insn.
(fyl2xp1_extend<mode>xf3_i387): Remove.
(log1p<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate log1pxf3 insn.
(fxtract_extend<mode>xf3_i387): Remove.
(logb<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate logbxf3 insn.
(ilogb<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
(significand<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate significandxf3 insn.
2018-09-11 Nathan Sidwell <nathan@acm.org>
* gcc.c (perror_with_name, pfatal_with_name): Delete.
(load_specs): Use fatal_error.
(DELETE_IF_ORDINARY, process_command): Use error.
(execute, run_attempt): Use fatal_error.
2018-09-11 Andrew Stubbs <ams@codesourcery.com>
* diagnostic-core.h (sorry_at): New prototype.
* diagnostic.c (sorry_at): New function.
2018-09-11 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
by zero as VR_UNDEFINED.
2018-09-10 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
(*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
(<sincos>mode2): New expander.
(sincos_extend<mode>xf3_i387): Remove insn pattern.
(sincos -> sin, cos splitters): Remove splitter patterns.
(sincos<mode>3): Change operand 2 predicate to general_operand.
Extend operand 2 to XFmode and generate sincosxf3 insn.
(fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
Change operand 3 predicate to const1_operand.
(fptan_extend<mode>xf4_i387): Remove insn pattern.
(tanxf2): Update operands in the call to fptanxf4_i387.
(tan<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate tanxf3 insn.
(atan2xf3): Rename from *fpatanxf3_i387.
(fpatan_extend<mode>xf3_i387): Remove insn pattern.
(atan2xf3): Remove expander.
(atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
(atan<mode>2): Change operand 1 predicate to general_operand.
Extend operand 1 to XFmode and generate atanxf3 insn.
2018-09-10 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (x87/SSE constant load splitter): Use
memory_operand instead of nonimmediate_operand for input operand
predicate.
2018-09-09 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (float partial SSE register stall splitter): Move
splitter near its instruction pattern.
(float_extend partial SSE register stall splitter): Ditto.
(float_truncate partial SSE register stall splitter): Ditto.
2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
PR target/86794
* config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
to speculation_safe_value_not_needed.
PR target/85666
* config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
(MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
leaf_function_p, instead use has_hard_reg_initial_val.
2018-09-09 Nathan Sidwell <nathan@acm.org>
* gcc.h (pfatal_with_name): Don't declare here.
* gcc.c (pfatal_with_name): Make static.
2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
* config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
earlyclobber.
2018-09-08 John David Anglin <danglin@gcc.gnu.org>
PR rtl-optimization/85458
* sel-sched.c (sel_target_adjust_priority): Allow backend adjust
priority hook to reduce the priority of EXPR.
2018-09-07 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
DImode for x87 on 32bit targets. Conditionally disable x87 modes
with X87_ENABLE_FLOAT. Remove preparation code.
(*float<SWI48:mode><MODEF:mode>2): Rename from
*float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
math using "enabled" attribute.
(*floatdi<MODEF:mode>2_i387): Rename from
*float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
enable for 32bit targets only.
(floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
splitter.
(floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
as operand 1 predicate. Rewrite as define_insn_and_split.
(floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
2018-09-06 Uros Bizjak <ubizjak@gmail.com>
* reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
to fallthru to FLOAT case.
2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
PR target/86731
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
around folding of vec_sl to handle out of range shift values.
2018-09-06 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
Update callers to gen_fix_trunc<mode>_i387_fisttp
(fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
nonimmediate_operand.
(fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
and corresponding splitters.
(*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
(fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
(fix_truncdi_i387_with_temp): Remove insn pattern
and corresponding splitters.
(fix_trunc<mode>_i387): Change operand 0 predicate to
nonimmediate_operand.
(fix_trunc<mode>_i387_with_temp): Remove insn pattern
and corresponding splitters.
(*fistdi2_1): Remove.
(fistdi2): Ditto.
(fistdi2_with_temp): Remove insn pattern and corresponding splitters.
(lrintxfdi2): Remove expander. Reimplement as define_insn.
(*fist<mode>2_1): Remove.
(fist<mode>2): Ditto.
(fist<mode>2_with_temp): Remove insn pattern and corresponding
splitters.
(lrintxf<mode>2): Remove expander. Reimplement as define_insn.
(*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
(fistdi2_<rounding>): Change operand 0 predicate to
nonimmediate_operand.
(fistdi2_<rounding>_with_temp): Remove insn pattern
and corresponding splitters.
(fist<mode>2_<rounding>): Change operand 0 predicate to
nonimmediate_operand.
(fist<mode>2_<rounding>_with_temp): Remove insn pattern
and corresponding splitters.
(*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
* varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
the init value.
2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
early gimple folding of vec_splat().
* tree-vect-generic.c: Remove static from tree_vec_extract() definition.
* gimple-fold.h: Add an extern define for tree_vec_extract().
2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
wrappers around TREE_TYPE comparisons.
2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/80080
* config/s390/predicates.md: Add nonsym_memory_operand.
* config/s390/s390.c (s390_legitimize_cs_operand): If operand
contains a SYMBOL_REF, load it into an intermediate pseudo.
(s390_emit_compare_and_swap): Legitimize operand.
* config/s390/s390.md: Use the new nonsym_memory_operand
with UNSPECV_CAS patterns.
2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/80080
* config/s390/s390-passes.def: New file.
* config/s390/s390-protos.h (class rtl_opt_pass): Add forward
declaration.
(make_pass_s390_early_mach): Add declaration.
* config/s390/s390.c (make_pass_s390_early_mach):
(s390_option_override): Remove dynamic registration.
* config/s390/t-s390: Add s390-passes.def.
2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_decompose_constant_pool_ref):
Remove UNSPEC_LTREL_BASE check.
(annotate_constant_pool_refs): Likewise.
(find_constant_pool_ref): Likewise.
(find_ltrel_base): Removed.
(replace_ltrel_base): Removed.
(s390_mainpool_finish): Remove replace_ltrel_base call.
(s390_chunkify_start): Remove pending LTREL_BASE logic.
(s390_chunkify_finish): Remove replace_ltrel_base call.
* config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
2018-09-06 Hans-Peter Nilsson <hp@axis.com>
PR target/86779
* config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
to speculation_safe_value_not_needed.
2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
Bernd Schmidt <bernds_cb1@t-online.de>
* config/nvptx/nvptx-opts.h: New file.
* config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
* config/nvptx/nvptx.h: Include "nvptx-opts.h".
(ASM_SPEC): Define.
(TARGET_SM35): New macro.
* config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
correct predicate.
* config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
values.
(misa=): New option.
* doc/invoke.texi (Nvidia PTX Options): Document -misa.
2018-09-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (truncdfsf2): Remove expander.
(truncdfsf2_with_temp): Ditto.
(truncxf<mode>2): Ditto.
(*truncdfsf_fast_mixed): Remove insn pattern.
(*truncdfsf_fast_i387): Ditto.
(*truncdfsf_mixed): Ditto.
(*truncdfsf_i387): Ditto.
(*truncdfsf2_i387_1): Ditto.
(*truncxfsf2_mixed): Ditto.
(*truncxfdf2_mixed): Ditto.
(*truncxf<mode>2_i387_noop): Ditto. Update callers
to call gen_truncxf<mode>2 instead.
(*truncxf<mode>2_i387): Remove.
(reg->reg splitters): Remove splitter pattern.
(reg->mem splitters): Ditto.
(truncdfsf2): New insn pattern.
(truncxf<mode>2): Ditto.
2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* tree-ssa-math-opts.c (is_mult_by): New function.
(is_square_of): Use the above.
(optimize_recip_sqrt): New function.
(pass_cse_reciprocals::execute): Use the above.
2018-09-05 Richard Biener <rguenther@suse.de>
PR bootstrap/87134
* tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
to zero-init the emplaced vec.
2018-09-05 Martin Liska <mliska@suse.cz>
PR tree-optimization/87205
* tree-switch-conversion.c (pass_lower_switch::execute):
Group cases for switch statements.
2018-09-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/87217
* tree-ssa-sccvn.c (vuse_valueize): New.
(vn_reference_lookup_pieces): Use it.
(vn_reference_lookup): Likewise.
2018-09-05 Nathan Sidwell <nathan@acm.org>
PR c++/87137
* stor-layout.c (place_field): Scan forwards to check last
bitfield when ms_bitfield_placement is in effect.
2018-09-05 Richard Biener <rguenther@suse.de>
PR bootstrap/87225
* tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
return.
2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
* config/aarch64/falkor-tag-collision-avoidance.c: New file.
* config.gcc (extra_objs): Build it.
* config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
Likewise.
* config/aarch64/aarch64-passes.def
(pass_tag_collision_avoidance): New pass.
* config/aarch64/aarch64.c (qdf24xx_tunings): Add
AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
(aarch64_classify_address): Remove static qualifier.
(aarch64_address_info, aarch64_address_type): Move to...
* config/aarch64/aarch64-protos.h: ... here.
(make_pass_tag_collision_avoidance): New function.
* config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
New tuning flag.
2018-09-05 Martin Liska <mliska@suse.cz>
* doc/gcov.texi: Update documentation of humar
readable mode.
* gcov.c (format_count): Print one decimal place, it provides
more fine number of situations like '1G' vs. '1.4G'.
2018-09-05 Martin Liska <mliska@suse.cz>
PR target/87164
* config/rs6000/rs6000.opt: Mark the option as Deprecated.
* optc-gen.awk: Allow 'Var' for Deprecated options in order
to generate a MASK value.
2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
PR debug/86593
* dwarf2out.c (based_loc_descr): Allow hard frame pointer even
if frame pointer isn't used.
(compute_frame_pointer_to_fb_displacement): Likewise.
2018-09-04 Jakub Jelinek <jakub@redhat.com>
PR target/87198
* common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
(OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
and OPTION_MASK_ISA_XSAVEC_UNSET.
2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
XOR operations in NAND case.
2018-09-04 Aldy Hernandez <aldyh@redhat.com>
* wide-int-range.cc (wide_int_range_convert): New.
* wide-int-range.h (wide_int_range_convert): New.
* tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
code into wide_int_range_convert.
(extract_range_into_wide_ints): Do not munge anti range constants
into the entire domain. Just return the range back.
2018-09-04 Martin Liska <mliska@suse.cz>
* genmatch.c (output_line_directive): Add new argument
fnargs.
(dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
2018-09-04 Jonathan Wakely <jwakely@redhat.com>
* doc/invoke.texi (Option Summary): Add whitespace.
* doc/invoke.texi (Option Summary): Add -Waligned-new.
2018-09-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/87211
* tree-ssa-sccvn.c (visit_phi): When value-numbering to a
backedge value we're supposed to treat as VARYING also number
the PHI to VARYING in case it got a different value-number already.
2018-09-04 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (vrp_can_optimize_bit_op): Remove.
(extract_range_from_binary_expr_1): Do not call
vrp_can_optimize_bit_op.
* wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
static.
(wide_int_range_get_mask_and_bounds): New.
(wide_int_range_optimize_bit_op): New.
(wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
(wide_int_range_bit_and): Same.
* wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
(wide_int_range_optimize_bit_op): New.
(wide_int_range_get_mask_and_bounds): New.
2018-09-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/87176
* tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
variable. When value-numbering a virtual PHI node make sure
to not value-number to the backedge value.
2018-09-04 Jonathan Wakely <jwakely@redhat.com>
* doc/extend.texi (Long Long, Hex Floats): Document support for
long long and hex floats in more recent versions of ISO C++.
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87177
* tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
cleanup.
2018-09-03 Alexander Monakov <amonakov@ispras.ru>
* bb-reorder.c (edge_order): Convert to C-qsort-style
tri-state comparator.
(reorder_basic_blocks_simple): Change std::stable_sort to
gcc_stablesort.
2018-09-03 Alexander Monakov <amonakov@ispras.ru>
* tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
tri-state comparator.
(fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
2018-09-03 Alexander Monakov <amonakov@ispras.ru>
* sort.cc (struct sort_ctx): New field 'nlim'. Use it...
(mergesort): ... here as maximum count for using netsort.
(gcc_qsort): Set nlim to 3 if stable sort is requested.
(gcc_stablesort): New.
* system.h (gcc_stablesort): Declare.
2018-09-03 Alexander Monakov <amonakov@ispras.ru>
* sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
* system.h (qsort): Always redirect to gcc_qsort. Update comment.
* vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
lxsdx and stxsdx alternatives.
(*mov<mode>_hardfloat64): Ditto.
* config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87200
* tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
simplify result.
2018-09-03 Martin Liska <mliska@suse.cz>
PR tree-optimization/87201
* tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
Fix parenthesis in an expression.
2018-09-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/87197
* tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
visited. CSE the VN_INFO hashtable lookup.
PR tree-optimization/87169
* tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
iterating make sure there's no extra backedges from irreducible
regions feeding the header. Mark the destination block
executable.
2018-09-03 Martin Liska <mliska@suse.cz>
PR driver/83193
* common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
* common/common-targhooks.c (default_get_valid_option_values):
New function.
* common/common-targhooks.h (default_get_valid_option_values):
Likewise.
* common/config/i386/i386-common.c: Move processor_target_table
from i386.c.
(ix86_get_valid_option_values): New function.
(TARGET_GET_VALID_OPTION_VALUES): New macro.
* config/i386/i386.c (struct ptt): Move to i386-common.c.
(PTA_*): Move all defined masks into i386-common.c.
(ix86_function_specific_restore): Use new processor_cost_table.
* config/i386/i386.h (struct ptt): Moved from i386.c.
(struct pta): Likewise.
* doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
* doc/tm.texi.in: Likewise.
* opt-suggestions.c (option_proposer::suggest_option):
Pass prefix to build_option_suggestions.
(option_proposer::get_completions): Likewise.
(option_proposer::build_option_suggestions): Use the new target
hook.
* opts.c (struct option_help_tuple): New struct.
(print_filtered_help): Use the new target hook.
2018-09-03 Martin Liska <mliska@suse.cz>
PR middle-end/59521
* predict.c (set_even_probabilities): Add likely_edges
argument and handle cases where we have precisely one
likely edge.
(combine_predictions_for_bb): Catch also likely_edges.
(tree_predict_by_opcode): Handle gswitch statements.
* tree-cfg.h (find_case_label_for_value): New declaration.
(find_taken_edge_switch_expr): Likewise.
* tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
Find pivot in decision tree based on probabily, not by number of
nodes.
2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
* doc/standards.texi (Standards): Update Objective-C reference.
2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
* doc/install.texi (Prerequisites): Update link for MPC.
2018-09-01 Michael Matz <matz@suse.de>
PR tree-optimization/87074
* gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
PHIs for outer-loop uses.
2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
* doc/generic.texi (OpenMP): Adjust link to openmp.org.
* doc/invoke.texi (C Dialect Options): Ditto.
2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
* doc/install.texi (Prerequisites): Adjust link mpfr.org.
2018-08-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/87168
* tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
(rpo_elim::eliminate_avail): When OP was not visited it must
be available.
2018-08-31 David Malcolm <dmalcolm@redhat.com>
* tree-vrp.c (copy_value_range): Convert param "from" from
"value_range *" to "const value_range *".
(range_is_null): Likewise for param "vr".
(range_int_cst_p): Likewise.
(range_int_cst_singleton_p): Likewise.
(symbolic_range_p): Likewise.
(value_ranges_intersect_p): Likewise for both params.
(value_range_nonnegative_p): Likewise for param "vr".
(value_range_constant_singleton): Likewise.
(vrp_set_zero_nonzero_bits): Likewise for param "ar".
(extract_range_into_wide_ints): Likewise for param "vr".
(extract_range_from_multiplicative_op): Likewise for params "vr0"
and "vr1".
(vrp_can_optimize_bit_op): Likewise.
(extract_range_from_binary_expr_1): Likewise for params "vr0_" and
"vr1_".
(extract_range_from_unary_expr): Likewise.
(debug_value_range): Likewise for param "vr".
(value_range::dump): Add "const" qualifier.
(vrp_prop::check_array_ref): Convert local "vr" from
"value_range *" to "const value_range *".
(vrp_prop::check_mem_ref): Likewise.
(vrp_prop::visit_stmt): Likewise for local "old_vr".
(vrp_intersect_ranges_1): Likewise for param "vr_1".
(vrp_intersect_ranges): Likewise.
(simplify_stmt_for_jump_threading): Likewise for local "vr".
(vrp_prop::vrp_finalize): Likewise.
* tree-vrp.h (value_range::dump): Add "const" qualifier.
(vrp_intersect_ranges): Add "const" qualifier to params as above.
(extract_range_from_unary_expr): Likewise.
(value_range_constant_singleton): Likewise.
(symbolic_range_p): Likewise.
(copy_value_range): Likewise.
(extract_range_from_binary_expr_1): Likewise.
(range_int_cst_p): Likewise.
(vrp_set_zero_nonzero_bits): Likewise.
(range_int_cst_singleton_p): Likewise.
2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
* config/aarch64/arm_neon.h (vabsd_s64): New.
(vnegd_s64): Likewise.
2018-08-31 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
2018-08-31 Martin Liska <mliska@suse.cz>
* ipa-icf.c (sem_item::add_type): Use
sem_item::m_type_hash_cache.
* ipa-icf.h: Move the cache from sem_item_optimizer
to sem_item.
2018-08-31 Nathan Sidwell <nathan@acm.org>
* doc/extend.texi (Backwards Compatibility): Remove implicit
extern C leeway of () being (...).
2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86684
PR target/87149
* config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
2018-08-31 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87138
* expmed.c (expand_mult_const): Use immed_wide_int_const instead of
gen_int_mode. Formatting fixes.
2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
* target.def (custom_function_descriptors): Improve documentation.
* doc/tm.texi.in (Trampolines): Expand discussion of function
descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
beginning of the section.
* doc/tm.texi: Regenerated.
2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
* cfg.h (class auto_edge_flag): Spell out the template-id of the
base class in the initializer list. This is a workaround for
building with older GCC.
(class auto_bb_flag): Likewise.
2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
(altivec_vcmpequ<VI_char>_p): Remove star.
* config/rs6000/rs6000-string.c (do_load_for_compare): Support
vector load modes.
(expand_strncmp_vec_sequence): New function.
(emit_final_str_compare_vec): New function.
(expand_strn_compare): Add support for vector strncmp.
* config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
length specification to bytes.
* config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
(vcmpnezb_p): New pattern.
* doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
for option -mstring-compare-inline-limit.
2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
* config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
(PTA_SKYLAKE): Add PTA_AES.
(PTA_GOLDMONT): Likewise.
2018-08-29 Jan Hubicka <jh@suse.cz>
PR lto/86517
* lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
* lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
2018-08-29 Jan Hubicka <jh@suse.cz>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
TYPE_STUB_DECL.
(hash_tree): Do not visit TYPE_STUB_DECL.
* tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
stream TYPE_STUB_DECL.
* tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
* ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
after free_lang_data.
(type_in_anonymous_namespace_p): Likewise.
2018-08-29 Jan Hubicka <jh@suse.cz>
* sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
comment that it has to be even number.
(class sreal): Change m_sig type to int32_t.
* sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
int64_t for temporary calculations.
(sreal_verify_basics): Drop one bit from minimum and maximum.
2018-08-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/87147
* tree-ssa-sccvn.c (SSA_VISITED): New function.
(visit_phi): When the degenerate result is from the backedge and
we didn't visit its definition yet drop to VARYING.
(do_rpo_vn): Properly mark blocks with incoming backedges as executable.
2018-08-29 Jan Hubicka <jh@suse.cz>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
DECL_VINDEX.
(hash_tree): Likewise.
2018-08-29 Jan Hubicka <jh@suse.cz>
* tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
and TYPE_NEXT_REF_TO.
2018-08-29 Jan Hubicka <jh@suse.cz>
* sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
comment that it has to be even number.
(class sreal): Change m_sig type to int32_t.
* sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
int64_t for temporary calculations.
(sreal_verify_basics): Drop one bit from minimum and maximum.
2018-08-30 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
PR middle-end/86995
* expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
if to_add is negative.
2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/87053
* builtins.c (c_strlen): Improve range checks.
2018-08-29 Martin Sebor <msebor@redhat.com>
Jeff Law <law@redhat.com>
PR tree-optimization/86714
PR tree-optimization/86711
* builtins.c (c_strlen): Add arguments to call to string_constant.
* expr.c (string_constant): Add argument. Detect missing nul
terminator and outermost declaration it's missing in.
* expr.h (string_constant): Add argument.
* fold-const.c (read_from_constant_string): Add arguments to call to
string_constant.
(c_getstr): Likewise.
* tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
to string_constant.
* tree-ssa-strlen.c (get_stridx): Likewise.
2018-08-29 Jan Hubicka <jh@suse.cz>
* tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
Do not stream DECL_VINDEX.
* tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
* tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
(decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
2018-08-29 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
virtual operands that are not default defs to honor region
boundaries.
(rpo_vn_valueize): Remove ineffective code here.
2018-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87132
* tree-ssa-alias.c (get_continuation_for_phi): Do not translate
when skipping defs reachable over backedges.
2018-08-29 Richard Biener <rguenther@suse.de>
* tree-core.h: Document use of deprecated_flag in SSA_NAME.
* tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
* tree-into-ssa.c (pass_build_ssa::execute): Initialize
function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
* tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
(vn_reference_lookup_3): Remove use of const_parms.
(free_rpo_vn): Do not free const_parms.
(do_rpo_vn): Do not call init_const_parms.
* tree-ssa-alias.c (refs_may_alias_p_1): Honor
SSA_NAME_POINTS_TO_READONLY_MEMORY.
(call_may_clobber_ref_p_1): Likewise.
2018-08-29 Alexander Monakov <amonakov@ispras.ru>
PR other/86726
* invoke.texi (Optimization Options): List -ftree-scev-cprop.
(-O): Ditto.
(-ftree-scev-cprop): Document.
2018-08-29 Jan Hubicka <jh@suse.cz>
* sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
parameters.
(sreal constructor): Update.
* sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
sreal:operator/): Update.
2018-08-29 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (switch_conversion::expand):
Strenghten assumption about gswitch statements.
2018-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
re-value-number released SSA VDEFs.
2018-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87126
* tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
2018-08-28 Jim Wilson <jimw@sifive.com>
* config/riscv/pic.md: Rewrite.
* config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
invalid address.
* config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
(SOFTF, default_load, softload, softstore): New.
2018-08-28 Jeff Law <law@redhat.com>
* fold-const.c (fold_binary_loc): Remove recently added assert.
2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
* genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
to OP parmeter of generated function.
2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
PR tree-optimization/87009
* match.pd: Add boolean optimizations.
2018-08-28 Martin Sebor <msebor@redhat.com>
PR middle-end/86631
* calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
* gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
(pass_walloca::gate): Use it.
(alloca_call_type): Same.
(pass_walloca::execute): Same.
* stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
2018-08-28 David Malcolm <dmalcolm@redhat.com>
* dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
GCC_VERSION for usage of "__gcc_dump_printf__" format from
>= 3005 to >= 9000.
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87124
* tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
constants before looking up avail.
2018-08-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/87099
* calls.c (maybe_warn_nonstring_arg): Punt early if
warn_stringop_overflow is zero. Don't call get_range_strlen
on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
Swap comparison operands to have constants on rhs. Only use
lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
increment lenrng[0].
2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
use of tree_to_shwi. Remove duplicated test for the size being
a whole number of bytes.
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
Handle removed stmt without LHS (GIMPLE_NOP).
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* tree-ssa-pre.c (compute_avail): Do not make expressions
with predicated values available.
(get_expr_value_id): Assert we do not run into predicated value
expressions.
2018-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/87117
* tree-ssa-operands.c (add_stmt_operand): STRING_CST may
get virtual operands.
(get_expr_operands): Handle STRING_CST like other decls.
2018-08-28 Martin Liska <mliska@suse.cz>
* tree.h: Update documentation of fndecl_built_in_p
functions.
2018-08-27 Jeff Law <law@redhat.com>
PR tree-optimization/87110
* tree-ssa-dse.c (compute_trims): Handle non-constant
TYPE_SIZE_UNIT.
2018-08-27 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86914
* tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
2018-08-27 Martin Sebor <msebor@redhat.com>
PR tree-optimization/87112
* builtins.c (expand_builtin_strnlen): Convert c_strlen result to
the type of the bound argument.
2018-08-27 Jeff Law <law@redhat.com>
* tree-ssa-dse.c (compute_trims): Handle case where the reference's
type does not have a TYPE_SIZE_UNIT.
2018-08-27 Steve Ellcey <sellcey@cavium.com>
* config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
with include of backend.h.
2018-08-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.
2018-08-27 Alexander Monakov <amonakov@ispras.ru>
PR tree-optimization/85758
* match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
2018-08-27 David Malcolm <dmalcolm@redhat.com>
PR c++/87091
* diagnostic-show-locus.c (class layout_range): Update for
conversion of show_caret_p to a tri-state.
(layout_range::layout_range): Likewise.
(make_range): Likewise.
(layout::maybe_add_location_range): Likewise.
(layout::should_print_annotation_line_p): Don't show annotation
lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
(layout::get_state_at_point): Update for conversion of
show_caret_p to a tri-state. Bail out early for
SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
underlining or source colorization.
(gcc_rich_location::add_location_if_nearby): Update for conversion
of show_caret_p to a tri-state.
(selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
(selftest::test_one_liner_fixit_replace_equal_secondary_range):
Likewise.
(selftest::test_one_liner_labels): Likewise.
* gcc-rich-location.c (gcc_rich_location::add_expr): Update for
conversion of show_caret_p to a tri-state.
* pretty-print.c (text_info::set_location): Likewise.
* pretty-print.h (text_info::set_location): Likewise.
* substring-locations.c (format_warning_n_va): Likewise.
* tree-diagnostic.c (default_tree_printer): Likewise.
* tree-pretty-print.c (newline_and_indent): Likewise.
2018-08-27 David Malcolm <dmalcolm@redhat.com>
PR c++/87091
* diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
line above for line-insertion fix-it hints.
(selftest::test_fixit_insert_containing_newline): Update the
expected results, and add a test with line-numbering enabled.
2018-08-27 Martin Liska <mliska@suse.cz>
PR sanitizer/86962
* sanopt.c (sanitize_rewrite_addressable_params): Ignore
params with DECL_HAS_VALUE_EXPR_P.
2018-08-27 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (ix86_expand_set_or_movmem): Dump
selected expansion strategy.
2018-08-27 Martin Liska <mliska@suse.cz>
* builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
* builtins.c (is_builtin_fn): Likewise.
* attribs.c (diag_attr_exclusions): Use new function
fndecl_built_in_p and remove check for FUNCTION_DECL if
possible.
(builtin_mathfn_code): Likewise.
(fold_builtin_expect): Likewise.
(fold_call_expr): Likewise.
(fold_builtin_call_array): Likewise.
(fold_call_stmt): Likewise.
(set_builtin_user_assembler_name): Likewise.
(is_simple_builtin): Likewise.
* calls.c (gimple_alloca_call_p): Likewise.
(maybe_warn_nonstring_arg): Likewise.
* cfgexpand.c (expand_call_stmt): Likewise.
* cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
(cgraph_edge::verify_corresponds_to_fndecl): Likewise.
(cgraph_node::verify_node): Likewise.
* cgraphclones.c (build_function_decl_skip_args): Likewise.
(cgraph_node::create_clone): Likewise.
* config/arm/arm.c (arm_insert_attributes): Likewise.
* config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
* dse.c (scan_insn): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* fold-const.c (operand_equal_p): Likewise.
(fold_binary_loc): Likewise.
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
* gimple-low.c (lower_stmt): Likewise.
* gimple-pretty-print.c (dump_gimple_call): Likewise.
* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
Likewise.
* gimple.c (gimple_build_call_from_tree): Likewise.
(gimple_call_builtin_p): Likewise.
(gimple_call_combined_fn): Likewise.
* gimplify.c (gimplify_call_expr): Likewise.
(gimple_boolify): Likewise.
(gimplify_modify_expr): Likewise.
(gimplify_addr_expr): Likewise.
* hsa-gen.c (gen_hsa_insns_for_call): Likewise.
* ipa-cp.c (determine_versionability): Likewise.
* ipa-fnsummary.c (compute_fn_summary): Likewise.
* ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
* ipa-split.c (visit_bb): Likewise.
(split_function): Likewise.
* ipa-visibility.c (cgraph_externally_visible_p): Likewise.
* lto-cgraph.c (input_node): Likewise.
* lto-streamer-out.c (write_symbol): Likewise.
* omp-low.c (setjmp_or_longjmp_p): Likewise.
(lower_omp_1): Likewise.
* predict.c (strip_predict_hints): Likewise.
* print-tree.c (print_node): Likewise.
* symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
* trans-mem.c (is_tm_irrevocable): Likewise.
(is_tm_load): Likewise.
(is_tm_simple_load): Likewise.
(is_tm_store): Likewise.
(is_tm_simple_store): Likewise.
(is_tm_abort): Likewise.
(tm_region_init_1): Likewise.
* tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
* tree-cfg.c (verify_gimple_call): Likewise.
(move_stmt_r): Likewise.
(stmt_can_terminate_bb_p): Likewise.
* tree-eh.c (lower_eh_constructs_2): Likewise.
* tree-if-conv.c (if_convertible_stmt_p): Likewise.
* tree-inline.c (remap_gimple_stmt): Likewise.
(copy_bb): Likewise.
(estimate_num_insns): Likewise.
(fold_marked_statements): Likewise.
* tree-sra.c (scan_function): Likewise.
* tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
(optimize_stack_restore): Likewise.
(pass_fold_builtins::execute): Likewise.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
(mark_all_reaching_defs_necessary_1): Likewise.
* tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
* tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
(pass_forwprop::execute): Likewise.
* tree-ssa-loop-im.c (stmt_cost): Likewise.
* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
* tree-ssa-strlen.c (get_string_length): Likewise.
* tree-ssa-structalias.c (handle_lhs_call): Likewise.
(find_func_aliases_for_call): Likewise.
* tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
* tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
* tree-tailcall.c (find_tail_calls): Likewise.
* tree.c (need_assembler_name_p): Likewise.
(free_lang_data_in_decl): Likewise.
(get_call_combined_fn): Likewise.
* ubsan.c (is_ubsan_builtin_p): Likewise.
* varasm.c (incorporeal_function_p): Likewise.
* tree.h (DECL_BUILT_IN): Remove and replace with
fndecl_built_in_p.
(DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
(fndecl_built_in_p): New.
2018-08-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/86847
* tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
Dump also subtree probability.
(switch_decision_tree::do_jump_if_equal): New function.
(switch_decision_tree::emit_case_nodes): Handle special
situations in balanced tree that can be emitted much simpler.
Fix calculation of probabilities that happen in tree expansion.
* tree-switch-conversion.h (struct cluster): Add
is_single_value_p.
(struct simple_cluster): Likewise.
(struct case_tree_node): Add new function has_child.
(do_jump_if_equal): New.
2018-08-27 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
Add new argument to bit_test_cluster constructor.
(bit_test_cluster::emit): Set bits really number of values
handlel by a test.
(bit_test_cluster::hoist_edge_and_branch_if_true): Add
probability argument.
* tree-switch-conversion.h (struct bit_test_cluster):
Add m_handles_entire_switch.
2018-08-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/86702
* tree-switch-conversion.c (jump_table_cluster::emit):
Make probabilities even for values in jump table
according to number of cases handled.
(switch_decision_tree::compute_cases_per_edge): Pass
argument to reset_out_edges_aux function.
(switch_decision_tree::analyze_switch_statement): Likewise.
* tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
Make it static.
2018-08-27 Martin Liska <mliska@suse.cz>
* cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
cfun argument explicitly.
* gimple-pretty-print.c (dump_gimple_switch): Likewise.
* hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
function gimple_switch_default_bb.
(convert_switch_statements):
(expand_builtins):
* ipa-fnsummary.c (set_switch_stmt_execution_predicate):
* stmt.c (label_to_block_fn): Use label_to_block and pass
cfun argument explicitly and use gimple_switch_label_bb.
(expand_case): Likewise.
* tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
cfun argument explicitly. Likewise.
(make_edges_bb): Likewise.
(make_cond_expr_edges): Likewise.
(get_cases_for_edge): Likewise.
(make_gimple_switch_edges): Likewise.
(label_to_block_fn): Likewise.
(label_to_block): Likewise.
(make_goto_expr_edges): Likewise.
(make_gimple_asm_edges): Likewise.
(main_block_label): Likewise.
(group_case_labels_stmt): Likewise.
(find_taken_edge_computed_goto): Likewise.
(find_taken_edge_switch_expr): Likewise.
(gimple_verify_flow_info): Likewise.
(gimple_redirect_edge_and_branch): Likewise.
(gimple_switch_label_bb): New function.
(gimple_switch_default_bb): Likewise.
(gimple_switch_edge): Likewise.
(gimple_switch_default_edge): Likewise.
* tree-cfg.h (label_to_block_fn): Remove and replace ...
(label_to_block): ... with this.
(gimple_switch_label_bb): New.
(gimple_switch_default_bb): Likewise.
(gimple_switch_edge): Likewise.
(gimple_switch_default_edge): Likewise.
* tree-cfgcleanup.c (convert_single_case_switch): Use
new gimple functions and pass new argument to label_to_block.
(cleanup_control_flow_bb):
* tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
cfun argument explicitly.
(make_eh_edges): Likewise.
(redirect_eh_dispatch_edge): Likewise.
(lower_resx): Likewise.
(lower_eh_dispatch): Likewise.
(maybe_remove_unreachable_handlers): Likewise.
(unsplit_eh): Likewise.
(cleanup_empty_eh): Likewise.
(verify_eh_edges): Likewise.
(verify_eh_dispatch_edge): Likewise.
* tree-ssa-dom.c (record_edge_info): Likewise.
* tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
* tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
(thread_through_normal_block): Likewise.
* tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
* tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
* tree-switch-conversion.c (switch_conversion::collect): Use new
gimple functions.
(switch_conversion::check_final_bb): Likewise.
(switch_conversion::gather_default_values): Pass new argument
to label_to_block.
(switch_conversion::build_constructors): Likewise.
(switch_decision_tree::compute_cases_per_edge): Use new
gimple_switch_edge function.
(switch_decision_tree::analyze_switch_statement): Pass new argument
to label_to_block.
(switch_decision_tree::try_switch_expansion): Use
gimple_switch_default_edge.
* tree-vrp.c (find_switch_asserts): Pass new argument
to label_to_block.
* vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
(vr_values::simplify_switch_using_ranges): Likewise.
2018-08-27 Richard Biener <rguenther@suse.de>
* cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
* cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
* tree-ssa-sccvn.h (struct vn_pval): New structure.
(struct vn_nary_op_s): Add unwind_to member. Add
predicated_values flag and put result into a union together
with a linked list of vn_pval.
(struct vn_ssa_aux): Add name member to make maintaining
a map of SSA name to vn_ssa_aux possible. Remove no longer
needed info, dfsnum, low, visited, on_sccstack, use_processed
and range_info_anti_range_p members.
(run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
(do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
New functions.
(vn_valueize): New global.
(vn_context_bb): Likewise.
(VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
VN_INFO_PTR_INFO): Remove.
* tree-ssa-sccvn.c: ... (rewrite)
(pass_fre::execute): For -O2+ initialize loops and run
RPO VN in optimistic mode (iterating). For -O1 and -Og
run RPO VN in non-optimistic mode.
* params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
(PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
* doc/invoke.texi (sccvn-max-scc-size): Remove.
(rpo-vn-max-loop-depth): Document.
* tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
when valuezing the VUSE signals we walked out of the region.
* tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
(phi_translate): Set VN context block to use for availability
lookup.
(compute_avail): Likewise.
(pre_valueize): New function.
(pass_pre::execute): Adjust to the RPO VN API.
* tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
(propagate_constants_for_unrolling): Remove.
(tree_unroll_loops_completely): Perform value-numbering
on the unrolled bodies loop parent.
2018-08-27 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (compute_antic): Re-use inverted postorder
for partial antic compute.
2018-08-27 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/87065
* combine.c (simplify_if_then_else): Formatting fix.
(if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
check.
(known_cond): Don't return const_true_rtx for vector modes. Use
CONST0_RTX instead of const0_rtx. Formatting fixes.
2018-08-27 Martin Liska <mliska@suse.cz>
PR gcov-profile/87069
* gcov.c (process_file): Record files already processed
and warn about a file being processed multiple times.
2018-08-27 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/aarch64/aarch64.c (aarch64_override_options_internal):
Set default values for x_aarch64_*_string strings.
* config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
prefix. For -mabi do not print '=ABI' in help and use
<option_value> format for -msve-vector-bits and -moverride
options.
2018-08-26 Jeff Law <law@redhat.com>
* config/mips/frame-header-opt.c: Include "backend.h" rather than
"cfg.h"
2018-08-26 Marek Polacek <polacek@redhat.com>
PR c++/87029, Implement -Wredundant-move.
* doc/invoke.texi: Document -Wredundant-move.
2018-08-25 Martin Sebor <msebor@redhat.com>
PR tree-optimization/87059
* builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
to the same type as the other.
* fold-const.c (fold_binary_loc): Assert expectation.
2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (machopic_legitimize_pic_address): Clean up
extraneous parentheses, dead code section and formatting.
2018-08-24 David Malcolm <dmalcolm@redhat.com>
PR c++/87091
* diagnostic-show-locus.c (layout::layout): Ensure the margin is
wide enough for jumps in the line-numbering to be visible.
(layout::print_gap_in_line_numbering): New member function.
(layout::calculate_line_spans): When using line numbering, merge
line spans that are only 1 line apart.
(diagnostic_show_locus): When printing line numbers, show gaps in
line numbering directly, rather than printing headers.
(selftest::test_diagnostic_show_locus_fixit_lines): Add test of
line-numbering with multiple line spans.
(selftest::test_fixit_insert_containing_newline_2): Add test of
line-numbering, in which the spans are close enough to be merged.
2018-08-24 Aldy Hernandez <aldyh@redhat.com>
* gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
* tree-vrp.c (range_is_nonnull): Remove.
(range_includes_zero_p): Accept value_range instead of min/max.
(extract_range_from_binary_expr_1): Do not early bail on
POINTER_PLUS_EXPR.
Use range_includes_zero_p instead of range_is_nonnull.
(extract_range_from_unary_expr): Use range_includes_zero_p instead
of range_is_nonnull.
(vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
special case VR_ANTI_RANGE.
(vrp_finalize): Same.
* tree-vrp.h (range_includes_zero_p): Pass value_range as argument
instead of min/max.
(range_is_nonnull): Remove.
* vr-values.c (vrp_stmt_computes_nonzero): Use
range_includes_zero_p instead of range_is_nonnull.
(extract_range_basic): Pass value_range to range_includes_zero_p
instead of range_is_nonnull.
2018-08-24 Uros Bizjak <ubizjak@gmail.com>
* emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
* emit-rtl.h (rtl_data): Remove return_bnd.
* explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
* function.c (diddle_return_value): Do not handle crtl->return_bnd.
* genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
(POINTER_BOUNDS_MODE): Remove definition.
(make_pointer_bounds_mode): Remove.
(get_mode_class): Do not handle MODE_POINTER_BOUNDS.
* machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
(scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
* mode-classes.def: Do not define MODE_POINTER_BOUNDS.
* stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
* tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
* varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
* config/i386/i386-modes.def (BND32, BND64): Remove.
* config/i386/i386.c (dbx_register_map): Remove bound registers.
(dbx64_register_map): Ditto.
(svr4_dbx_register_map): Ditto.
(indirect_thunk_bnd_needed): Remove.
(indirect_thunks_bnd_used): Ditto.
(indirect_return_bnd_needed): Ditto.
(indirect_return_via_cx_bnd): Ditto.
(enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
(indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
(output_indirect_thunk): Ditto. Remove need_prefix argument.
(output_indirect_thunk_function): Remove handling of
indirect_return_bnd_needed, indirect_return_via_cx_bnd,
indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
(ix86_save_reg): Remove handling of crtl->return_bnd.
(ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
(ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
and UNSPEC_BNDLX_ADDR.
(ix86_output_indirect_branch_via_reg): Remove handling of
indirect_thunk_prefix_bnd.
(ix86_output_indirect_branch_via_push): Ditto.
(ix86_output_function_return): Ditto.
(ix86_output_indirect_function_return): Ditto.
(avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
* config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
(CALL_USED_REGISTERS): Ditto.
(REG_ALLOC_ORDER): Update for removal of bound registers.
(HI_REGISTER_NAMES): Ditto.
* config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
(UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
(UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
(BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
(FIRST_PSEUDO_REG): Update.
(BND): Remove mode iterator.
* config/i386/predicates.md (bnd_mem_operator): Remove.
2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
vectors.
2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
the case in which the permute needs only a single element and
repeats for every vector of the result. Extend that case to
handle variable-length vectors.
* tree-vect-stmts.c (vectorizable_load): Update accordingly.
2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
PR debug/79342
* dwarf2out.c (save_macinfo_strings): Call set_indirect_string
on DW_MACINFO_start_file for -gsplit-dwarf -g3.
2018-08-24 Richard Biener <rguenther@suse.de>
* cfg.h (struct control_flow_graph): Add edge_flags_allocated and
bb_flags_allocated members.
(auto_flag): New RAII class for allocating flags.
(auto_edge_flag): New RAII class for allocating edge flags.
(auto_bb_flag): New RAII class for allocating bb flags.
* cfgloop.c (verify_loop_structure): Allocate temporary edge
flag dynamically.
* cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
in favor of temporarily allocated BB flag.
* hsa-brig.c: Re-order includes.
* hsa-dump.c: Likewise.
* hsa-regalloc.c: Likewise.
* print-rtl.c: Likewise.
* profile-count.c: Likewise.
2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86989
* config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
the TOC register.
2018-08-24 Aldy Hernandez <aldyh@redhat.com>
PR 87073/bootstrap
* wide-int-range.cc (wide_int_range_div): Do not ignore result
from wide_int_range_multiplicative_op.
2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
"permutaion".
2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
* genmatch.c (parser::parse_operation): Fix typo 'exapnded'
to 'expanded'.
2018-08-23 Alexander Monakov <amonakov@ispras.ru>
* tree-scalar-evolution.c (final_value_replacement_loop): Dump
full GENERIC expression used for replacement.
2018-08-23 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (abs_extent_range): Remove.
(extract_range_into_wide_ints): Pass wide ints by reference.
(extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
Pass wide ints by reference in all calls to
extract_range_into_wide_ints.
* wide-int-range.cc (wide_int_range_div): New.
* wide-int-range.h (wide_int_range_div): New.
(wide_int_range_includes_zero_p): New.
(wide_int_range_zero_p): New.
2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
* config/aarch64/aarch64.md (arches): New enum.
(arch): New enum attr.
(arch_enabled): New attr.
(enabled): Now uses arch_enabled only.
(simd, sve, fp16): Removed attribute.
(fp): Attr now defined in terms of 'arch'.
(*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
*movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
<FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
<FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
attributes into 'arch'.
(*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
*<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
*aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
*aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
'simd' attribute into 'arch'.
(load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
Convert use of 'fp' attribute to 'arch'.
* config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
into 'arch'.
(move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
(different modes) Merge 'fp' and 'simd' into 'arch'.
(*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
'simd' into 'arch'.
2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/87026
* expmed.c (canonicalize_comparison): If we can no longer create
pseudoregisters, don't.
2018-08-23 Richard Earnshaw <rearnsha@arm.com>
PR target/86951
* config/arm/arm-protos.h (arm_emit_speculation_barrier): New
prototype.
* config/arm/arm.c (speculation_barrier_libfunc): New static
variable.
(arm_init_libfuncs): Initialize it.
(arm_emit_speculation_barrier): New function.
* config/arm/arm.md (speculation_barrier): Call
arm_emit_speculation_barrier for architectures that do not have
DSB or ISB.
(speculation_barrier_insn): Only match on Armv7 or later.
2018-08-23 Richard Biener <rguenther@suse.de>
PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.
2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
of single-vector TBLs.
(aarch64_vectorize_vec_perm_const): Set one_vector_p when only
one input is given.
2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
PR target/85910
* config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
aarch64_evpc_tbl guard.
2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tree-ssa-dse.c (compute_trims): Avoid folding away undefined
behaviour.
2018-08-22 Martin Sebor <msebor@redhat.com>
PR middle-end/87052
* tree-pretty-print.c (pretty_print_string): Add argument.
(dump_generic_node): Call to pretty_print_string with string size.
2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/86771
* combine.c (try_combine): Do not allow splitting a resulting PARALLEL
of two SETs into those two SETs, one to be placed at i2, if that SETs
destination is modified between i2 and i3.
2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86725
* tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
function.
(vect_analyze_scalar_cycles_1): Check it.
2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86725
* tree-vect-loop.c (vect_is_simple_reduction): When treating
an outer loop phi as a double reduction, make sure that the
single user of the phi result is an inner loop phi.
2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
grouped stores with gaps to a strided group.
2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (get_group_load_store_type)
(get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
first statement in a group.
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
the sequence used in gcc/gcc.c.
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
PR other/704
* gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
building it.
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
Darwin10-specific unwinder-shim.
* config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
* config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
New to cater for Darwin10 Rosetta.
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
* config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
PR bootstrap/81033
PR target/81733
PR target/52795
* gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
(dwarf2out_switch_text_section): Generate a local label for the
second function sub-section and apply it as the second FDE start
label.
* gcc/final.c (final_scan_insn_1): Emit second FDE label after the
second sub-section start.
2018-08-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/86988
* tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
2018-08-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/86945
* tree-cfg.c (generate_range_test): Use unsigned arithmetic.
2018-08-22 Alexandre Oliva <oliva@adacore.com>
* config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
a comment about how uses of r2 for .sdata2 come about.
2018-08-22 Alexandre Oliva <aoliva@redhat.com>
* tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
2018-08-21 Marek Polacek <polacek@redhat.com>
PR c++/86981, Implement -Wpessimizing-move.
* doc/invoke.texi: Document -Wpessimizing-move.
2018-08-21 Jan Hubicka <jh@suse.cz>
* tree.c (find_decls_types_r): Do not check for redundant typedefs.
* tree.h (is_redundant_typedef): Remove.
* dwarf2out.c (is_redundant_typedef): Turn into static function.
2018-08-21 Jan Hubicka <jh@suse.cz>
* tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
when possible.
2018-08-21 Tamar Christina <tamar.christina@arm.com>
* expmed.c (extract_low_bits): Reject invalid subregs early.
2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/86121
* tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
behaviour.
2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* config/vxworks.h: Guard vxworks_asm_out_constructor and
vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
* config/vxworks.c: Likewise.
2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* config/vxworks.c: Set targetm.have_ctors_dtors
if HAVE_INITFINI_ARRAY_SUPPORT.
* config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
if HAVE_INITFINI_ARRAY_SUPPORT.
2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
default search path for VxWorks < 7.
2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gimple-ssa-sprintf.c (decl_constant_value): Remove.
(get_format_string): Refer to c_getstr.
2018-08-21 Tom de Vries <tdevries@suse.de>
* cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
(debuginfo_start, debuginfo_stop, debuginfo_early_start)
(debuginfo_early_stop): Declare.
* cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
(debuginfo_start, debuginfo_stop, debuginfo_early_start)
(debuginfo_early_stop): New function.
(symbol_table::finalize_compilation_unit): Call debuginfo_early_start
and debuginfo_early_stop.
* dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
* toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
(general_init): Call debuginfo_early_init.
(finalize): Call debuginfo_fini.
(do_compile): Call debuginfo_init.
* doc/invoke.texi (@gccoptlist): Add -fdump-debug and
-fdump-early-debug.
(@item -fdump-debug, @item -fdump-earlydebug): Add.
2018-08-21 Tom de Vries <tdevries@suse.de>
* dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
flag_dump_noaddr and flag_dump_unnumbered.
2018-08-21 Aldy Hernandez <aldyh@redhat.com>
* wide-int-range.cc (wide_int_range_abs): New.
(wide_int_range_order_set): Rename from wide_int_range_min_max.
* wide-int-range.h (wide_int_range_abs): New.
(wide_int_range_min_max): New.
* tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
case to call wide_int_range_abs.
Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
(extract_range_from_abs_expr): Delete.
2018-08-20 Michael Meissner <meissner@linux.ibm.com>
PR target/87033
* config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
from 'Y' to 'YZ' to enable the LWAX instruction to be generated
for indexed loads.
2018-08-20 Nathan Sidwell <nathan@acm.org>
Jeff Law <law@redhat.com>
* config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
* config/spu/spu-c.c (spu_macro_to_expand): Likewise.
2018-08-20 David Malcolm <dmalcolm@redhat.com>
PR other/84889
* attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
(decl_attributes): Likewise.
* calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
instance.
* cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
* diagnostic-core.h (class auto_diagnostic_group): New class.
* diagnostic.c (diagnostic_initialize): Initialize the new fields.
(diagnostic_report_diagnostic): Handle the first diagnostics within
a group.
(emit_diagnostic): Add auto_diagnostic_group instance.
(inform): Likewise.
(inform_n): Likewise.
(warning): Likewise.
(warning_at): Likewise.
(warning_n): Likewise.
(pedwarn): Likewise.
(permerror): Likewise.
(error): Likewise.
(error_n): Likewise.
(error_at): Likewise.
(sorry): Likewise.
(fatal_error): Likewise.
(internal_error): Likewise.
(internal_error_no_backtrace): Likewise.
(auto_diagnostic_group::auto_diagnostic_group): New ctor.
(auto_diagnostic_group::~auto_diagnostic_group): New dtor.
* diagnostic.h (struct diagnostic_context): Add fields
"diagnostic_group_nesting_depth",
"diagnostic_group_emission_count", "begin_group_cb",
"end_group_cb".
* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
Add auto_diagnostic_group instance(s).
(find_explicit_erroneous_behavior): Likewise.
* gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
* gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
* gimplify.c (warn_implicit_fallthrough_r): Likewise.
(gimplify_va_arg_expr): Likewise.
* hsa-gen.c (HSA_SORRY_ATV): Likewise.
(HSA_SORRY_AT): Likewise.
* ipa-devirt.c (compare_virtual_tables): Likewise.
(warn_odr): Likewise.
* multiple_target.c (expand_target_clones): Likewise.
* opts-common.c (cmdline_handle_error): Likewise.
* reginfo.c (globalize_reg): Likewise.
* substring-locations.c (format_warning_n_va): Likewise.
* tree-inline.c (expand_call_inline): Likewise.
* tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
* tree-ssa-loop-niter.c
(do_warn_aggressive_loop_optimizations): Likewise.
* tree-ssa-uninit.c (warn_uninit): Likewise.
* tree.c (warn_deprecated_use): Likewise.
2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/87014
* config/i386/i386.md (eh_return): Always update EH return
address in word_mode.
2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
* targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
TARGET_SPLIT_COMPLEX_ARG is defined.
2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
* expr.c (store_field): Change gcc_assert to gcc_checking_assert.
2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR target/86984
* expr.c (expand_assignment): Assert that bitpos is positive.
(store_field): Likewise
(expand_expr_real_1): Make sure that bitpos is positive.
* config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
integer overflow.
2018-08-20 Nathan Sidwell <nathan@acm.org>
* Makefile.in (CPP_ID_DATA_H): Delete.
(CPP_INTERNAL_H): Don't add it.
(GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
* gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
2018-08-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/78655
* tree-vrp.c (extract_range_from_binary_expr_1): Make
pointer + offset nonnull if either operand is nonnull work.
2018-08-20 Tom de Vries <tdevries@suse.de>
* dwarf2out.c (add_scalar_info): Don't add reference to existing die
unless the referenced die describes the added property using
DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
Otherwise, add a DW_AT_location to the referenced die.
2018-08-19 Uros Bizjak <ubizjak@gmail.com>
PR target/86994
* config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
register_operand when calling ix86_set_reg_reg_cost.
[case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
Set *total to 0 for operands that satisfy x86_64_immediate_operand
predicate and to 1 otherwise.
2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
emit a diagnostic that it is not supported and reset the option.
* config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
supported and consume the option. (ASM_FINAL_SPEC): New.
2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
* doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
a sentence.
2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
C-SKY port: Documentation
* doc/extend.texi (C-SKY Function Attributes): New section.
* doc/invoke.texi (Option Summary): Add C-SKY options.
(C-SKY Options): New section.
* doc/md.texi (Machine Constraints): Document C-SKY constraints.
2018-08-17 Jojo <jijie_rong@c-sky.com>
Huibin Wang <huibin_wang@c-sky.com>
Sandra Loosemore <sandra@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
C-SKY port: Backend implementation
* config/csky/*: New.
* common/config/csky/*: New.
2018-08-17 Jojo <jijie_rong@c-sky.com>
Huibin Wang <huibin_wang@c-sky.com>
Sandra Loosemore <sandra@codesourcery.com>
Chung-Lin Tang <cltang@codesourcery.com>
Andrew Jenner <andrew@codesourcery.com>
C-SKY port: Configury
* config.gcc (csky-*-*): New.
* configure.ac: Add csky to targets for dwarf2 debug_line support.
* configure: Regenerated.
2018-08-17 David Malcolm <dmalcolm@redhat.com>
* dump-context.h: Include "dumpfile.h".
(dump_context::dump_printf_va): Convert final param from va_list
to va_list *. Convert from ATTRIBUTE_PRINTF to
ATTRIBUTE_GCC_DUMP_PRINTF.
(dump_context::dump_printf_loc_va): Likewise.
* dumpfile.c: Include "stringpool.h".
(make_item_for_dump_printf_va): Delete.
(make_item_for_dump_printf): Delete.
(class dump_pretty_printer): New class.
(dump_pretty_printer::dump_pretty_printer): New ctor.
(dump_pretty_printer::emit_items): New member function.
(dump_pretty_printer::emit_any_pending_textual_chunks): New member
function.
(dump_pretty_printer::emit_item): New member function.
(dump_pretty_printer::stash_item): New member function.
(dump_pretty_printer::format_decoder_cb): New member function.
(dump_pretty_printer::decode_format): New member function.
(dump_context::dump_printf_va): Reimplement in terms of
dump_pretty_printer.
(dump_context::dump_printf_loc_va): Convert final param from va_list
to va_list *.
(dump_context::begin_scope): Reimplement call to
make_item_for_dump_printf.
(dump_printf): Update for change to dump_printf_va.
(dump_printf_loc): Likewise.
(selftest::test_capture_of_dump_calls): Convert "stmt" from
greturn * to gimple *. Add a test_decl. Add tests of dump_printf
with %T, %E, and %G.
* dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
(dump_printf): Replace ATTRIBUTE_PRINTF_2 with
ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
(dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
* tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
within a dump_printf_loc call to "%wu".
(vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
missing space after "=".
* tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
* tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
* tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
duplicate "vectorized" from message.
2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
* config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
polyNxK_t element's TYPE_STRING_FLAG.
2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
(they were unnamed before). Fix comments.
2018-08-17 Nathan Sidwell <nathan@acm.org>
* cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
2018-08-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/86841
* wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
2018-08-17 Martin Liska <mliska@suse.cz>
* common.opt: Remove Warn, Init and Report for options with
Ignore/Deprecated flag. Warning is done automatically for
Deprecated flags.
* config/i386/i386.opt: Likewise.
* config/ia64/ia64.opt: Likewise.
* config/rs6000/rs6000.opt: Likewise.
* cppbuiltin.c (define_builtin_macros_for_compilation_flags):
Remove usage of flag_check_pointer_bounds.
* lto-wrapper.c (merge_and_complain): Do not handle
OPT_fcheck_pointer_bounds.
(append_compiler_options): Likewise.
* opt-functions.awk: Do not handle Deprecated.
* optc-gen.awk: Check that Var, Report and Init are not
used for an option with Ignore/Deprecated flag.
* opts-common.c (decode_cmdline_option): Do not report
CL_ERR_DEPRECATED.
(read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
options.
* opts.h (struct cl_option): Remove cl_deprecated flag.
(CL_ERR_DEPRECATED): Remove error enum value.
2018-08-17 Richard Biener <rguenther@suse.de>
PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.
2018-08-16 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86853
* gimple-ssa-sprintf.c (struct format_result): Rename member.
(struct fmtresult): Add member and initialize it in ctors.
(format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
(format_string): Handle %S the same as %ls. Set MAYFAIL.
(format_directive): Set POSUNDER4K when MAYFAIL is set.
(parse_directive): Handle %C same as %c.
(sprintf_dom_walker::compute_format_length): Adjust.
(is_call_safe): Adjust.
2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
* builtins.c (c_strlen): Add new parameter eltsize. Use it
for determining how to count the elements.
* builtins.h (c_strlen): Adjust prototype.
* expr.c (string_constant): Add new parameter mem_size.
Set *mem_size appropriately.
* expr.h (string_constant): Adjust protoype.
* gimple-fold.c (get_range_strlen): Add new parameter eltsize.
* gimple-fold.h (get_range_strlen): Adjust prototype.
* gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
(format_string): Call get_string_length with eltsize.
2018-08-16 David Malcolm <dmalcolm@redhat.com>
* diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
to emit the span, rather than setting it as the prefix.
2018-08-16 David Malcolm <dmalcolm@redhat.com>
* diagnostic-show-locus.c (layout::start_annotation_line): Add
"margin_char" parameter, defaulting to space. Use it in place
of pp_space for the initial part of the margin.
(layout::print_leading_fixits): Use '+' when filling the margin
of line-insertion fix-it hints.
2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (two unnamed define_insn and define_split):
Delete.
2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md: Don't set length attribute to the default
value.
* config/rs6000/darwin.md: Ditto.
* config/rs6000/dfp.md: Ditto.
* config/rs6000/htm.md: Ditto.
* config/rs6000/rs6000.md: Ditto.
* config/rs6000/sync.md: Ditto.
* config/rs6000/vsx.md: Ditto.
2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md: Don't set length attribute to the default
value, for branch instructions.
* config/rs6000/darwin.md: Ditto.
* config/rs6000/rs6000.md: Ditto.
2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (length): Always define as const_int 4.
(unnamed conditional branch define_insn): Set length to 4 or 8
depending on offset.
(<bd>_<mode>): Similar, for alternative 0.
(<bd>tf_<mode>): Ditto.
2018-08-16 Tamar Christina <tamar.christina@arm.com>
* expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
* doc/rtl.texi: Replace old RTX class names with new names.
2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
* expmed.h (canonicalize_comparison): New declaration.
* expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
* expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
* optabs.c (prepare_cmp_insn): Likewise.
* rtl.h (unsigned_condition_p): New function which checks if a
comparison operator is unsigned.
2018-08-16 Nathan Sidwell <nathan@acm.org>
* config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
* config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
2018-08-16 Tamar Christina <tamar.christina@arm.com>
PR target/84711
* config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
* config/arm/neon.md (movv4hf, movv8hf): Refactored to..
(mov<mov>): ..this and enable unconditionally.
2018-08-16 Tamar Christina <tamar.christina@arm.com>
* config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
* config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
(mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
"Common" with "Target".
2018-08-15 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
* doc/invoke.texi (mmitigate-rop): Remove.
* config/i386/i386.c: Do not include "regrename.h".
(ix86_rop_should_change_byte_p, reg_encoded_number)
(ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
Remove.
(ix86_reorg): Remove call to ix86_mitigate_rop.
* config/i386/i386.md (attr "modrm_class"): Remove.
(cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
(x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
(x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
allow folding of mergeh() and mergel() for the float and double types.
(fold_mergehl_helper): Rework to handle building a permute tree
for float vectors.
2018-08-15 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
for TARGET_SSE.
2018-08-15 David Malcolm <dmalcolm@redhat.com>
* common.opt (fdiagnostics-show-labels): New option.
* diagnostic-show-locus.c (class layout_range): Add field
"m_label".
(class layout): Add field "m_show_labels_p".
(layout_range::layout_range): Add param "label" and use it to
initialize m_label.
(make_range): Pass in NULL for new "label" param of layout_range's
ctor.
(layout::layout): Initialize m_show_labels_p.
(layout::maybe_add_location_range): Pass in loc_range->m_label
when constructing layout_range instances.
(struct line_label): New struct.
(layout::print_any_labels): New member function.
(layout::print_line): Call it if label-printing is enabled.
(selftest::test_one_liner_labels): New test.
(selftest::test_diagnostic_show_locus_one_liner): Call it.
* diagnostic.c (diagnostic_initialize): Initialize
context->show_labels_p.
* diagnostic.h (struct diagnostic_context): Add field
"show_labels_p".
* doc/invoke.texi (Diagnostic Message Formatting Options): Add
-fno-diagnostics-show-labels.
* dwarf2out.c (gen_producer_string): Add
OPT_fdiagnostics_show_labels to the ignored options.
* gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
param.
(gcc_rich_location::maybe_add_expr): Likewise.
* gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
label" param, defaulting to NULL.
(gcc_rich_location::add_expr): Add "label" param.
(gcc_rich_location::maybe_add_expr): Likewise.
(class text_range_label): New class.
(class range_label_for_type_mismatch): New class.
* gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
of format_warning_va.
(fmtwarn_n): Likewise for new params of format_warning_n_va.
* lto-wrapper.c (merge_and_complain): Add
OPT_fdiagnostics_show_labels to the "pick one setting" options.
(append_compiler_options): Likewise to the dropped options.
(append_diag_options): Likewise to the passed-on options.
* opts.c (common_handle_option): Handle the new option.
* selftest-diagnostic.c
(test_diagnostic_context::test_diagnostic_context): Enable
show_labels_p.
* substring-locations.c: Include "gcc-rich-location.h".
(format_warning_n_va): Add "fmt_label" and "param_label" params
and use them as appropriate.
(format_warning_va): Add "fmt_label" and "param_label" params,
passing them on to format_warning_n_va.
(format_warning_at_substring): Likewise.
(format_warning_at_substring_n): Likewise.
* substring-locations.h (format_warning_va): Add "fmt_label" and
"param_label" params.
(format_warning_n_va): Likewise.
(format_warning_at_substring): Likewise.
(format_warning_at_substring_n): Likewise.
* toplev.c (general_init): Initialize global_dc->show_labels_p.
2018-08-15 Qing Zhao <qing.zhao@oracle.com>
PR testsuite/86519
* builtins.c (expand_builtin_memcmp): Do not expand the call
when overflow is detected.
2018-08-15 Martin Sebor <msebor@redhat.com>
PR tree-optimization/71625
* config/aarch64/aarch64-builtins.c
(aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_reorg): Remove loop.
2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
* config/darwin.c
(darwin_function_switched_text_sections): Delete.
* gcc/config/darwin.h
(TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
PR target/81685
* config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
DEBUG_PUBTYPES_SECTION) update to include GNU variant.
2018-08-15 Martin Liska <mliska@suse.cz>
PR tree-optimization/86925
* predict.c (expr_expected_value_1): When taking
later predictor, assign also probability.
Use fold_build2_initializer_loc in order to fold
the expression in -frounding-math.
2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
* config/i386/i386.c (expand_vec_perm_movs): New method matching movs
patterns.
(expand_vec_perm_1): Try the new method.
2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/86547
* lra-lives.c (remove_some_program_points_and_update_live_ranges):
Check whether lra_live_max_point is 0 before dividing.
2018-08-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86650
* tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
(vrp_prop::check_mem_ref): Same.
2018-08-13 Liu Hao <lh_mouse@126.com>
* pretty-print.c (eat_esc_sequence): Swap the foreground and
background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
and clear it thereafter, as it only works for DBCS.
2018-08-13 Liu Hao <lh_mouse@126.com>
* pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
handle returned by _get_osf_handle().
2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
for folding vec_perm.
2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
Add support for gimple-folding of vec_pack() and vec_unpack()
intrinsics.
2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
vec_xst variants to the list.
(rs6000_gimple_fold_builtin): Add support for folding unaligned
vector loads and stores.
2018-08-13 David Edelsohn <dje.gcc@gmail.com>
* config.gcc (rs6000-ibm-aix4.x): Delete.
(rs6000-ibm-aix5.1): Delete.
(rs6000-ibm-aix5.2): Delete.
(rs6000-ibm-aix5.3): Delete.
* config/rs6000/aix43.h: Delete.
* config/rs6000/aix51.h: Delete.
* config/rs6000/aix52.h: Delete.
* config/rs6000/t-aix43: Delete.
2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_decompose_constant_pool_ref):
New function.
(s390_decompose_address): Factor out constant pool ref
decomposition.
2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-predicates.c
(nds32_can_use_bclr_p): Change return type as bool.
(nds32_can_use_bset_p): Ditto.
(nds32_can_use_btgl_p): Ditto.
(nds32_can_use_bitci_p): Ditto.
* config/nds32/nds32-protos.h
(nds32_can_use_bclr_p): Change declaration.
(nds32_can_use_bset_p): Ditto.
(nds32_can_use_btgl_p): Ditto.
(nds32_can_use_bitci_p): Ditto.
2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
Support -msched-prolog-epilog option.
* config/nds32/nds32.opt (msched-prolog-epilog): New option.
2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
* common/config/nds32/nds32-common.c
(nds32_option_optimization_table): Enalbe -malways-align.
2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
extra_headers.
* common/config/nds32/nds32-common.c (nds32_handle_option): Handle
OPT_misr_secure_ case.
* config/nds32/nds32-isr.c: Implementation of backward compatibility.
* config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
* config/nds32/nds32.c (nds32_attribute_table): Add critical and
secure attribute.
* config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
(nds32_isr_info): New field security_level.
(TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
* config/nds32/nds32.md (return_internal): Consider critical attribute.
* config/nds32/nds32.opt (misr-secure): New option.
* config/nds32/nds32_init.inc: New file.
* config/nds32/nds32_isr.h: New file.
2018-08-11 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
Update comment for atomic instructions.
(atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
Remove.
(atomic_loaddi): Revise fence expansion to only emit fence prior to
load for __ATOMIC_SEQ_CST model.
(atomic_loaddi_1): Remove float register target.
(atomic_storedi): Handle CONST_INT values.
(atomic_storedi_1): Remove float register source. Add special case
for zero value.
(memory_barrier): New expander and insn.
2018-08-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/86835
* tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
new_stmt after def_gsi, make sure to insert new_square_stmt after
that stmt, not 2 stmts before it.
2018-08-10 Alexander Monakov <amonakov@ispras.ru>
PR target/82418
* config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
instead of SWI48.
2018-08-10 Martin Liska <mliska@suse.cz>
PR target/83610
* builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
function type.
* builtins.c (expand_builtin_expect_with_probability):
New function.
(expand_builtin_expect_with_probability): New function.
(build_builtin_expect_predicate): Add new argumnet probability
for BUILT_IN_EXPECT_WITH_PROBABILITY.
(fold_builtin_expect):
(fold_builtin_2):
(fold_builtin_3):
* builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
* builtins.h (fold_builtin_expect): Set new argument.
* doc/extend.texi: Document __builtin_expect_with_probability.
* doc/invoke.texi: Likewise.
* gimple-fold.c (gimple_fold_call): Pass new argument.
* ipa-fnsummary.c (find_foldable_builtin_expect): Handle
also BUILT_IN_EXPECT_WITH_PROBABILITY.
* predict.c (get_predictor_value): New function.
(expr_expected_value): Add new argument probability. Assume
that predictor and probability are always non-null.
(expr_expected_value_1): Likewise. For __builtin_expect and
__builtin_expect_with_probability set probability. Handle
combination in binary expressions.
(tree_predict_by_opcode): Simplify code by simply calling
get_predictor_value.
(pass_strip_predict_hints::execute): Add handling of
BUILT_IN_EXPECT_WITH_PROBABILITY.
* predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
new predictor.
* tree.h (DECL_BUILT_IN_P): New function.
2018-08-10 Martin Liska <mliska@suse.cz>
PR tree-optimization/85799
* passes.def: Add argument for pass_strip_predict_hints.
* predict.c (class pass_strip_predict_hints): Add new argument
early_p.
(strip_predictor_early): New function.
(pass_strip_predict_hints::execute): Call the function to
strip predictors.
(strip_predict_hints): New function.
* predict.def: Fix comment.
2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
* Makefile.in: Clarify which tm.texi to copy over to assert the
right to grant a GFDL license for all.
2018-08-09 Jeff Law <law@redhat.com>
* config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
unused variable.
2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
* config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
prototype.
2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
reductions for variable-length vectors.
2018-08-09 David Malcolm <dmalcolm@redhat.com>
PR other/84889
* common.opt (fdiagnostics-show-line-numbers): New option.
* diagnostic-show-locus.c (class layout): Add fields
"m_show_line_numbers_p" and "m_linenum_width";
(num_digits): New function.
(test_num_digits): New function.
(layout::layout): Initialize new fields. Update m_x_offset
logic to handle any left margin.
(layout::print_source_line): Print line number when requested.
(layout::start_annotation_line): New member function.
(layout::print_annotation_line): Call it.
(layout::print_leading_fixits): Likewise.
(layout::print_trailing_fixits): Likewise. Update calls to
move_to_column for new parameter.
(layout::get_x_bound_for_row): Add "add_left_margin" param and use
it to potentially call start_annotation_line.
(layout::show_ruler): Call start_annotation_line.
(selftest::test_line_numbers_multiline_range): New selftest.
(selftest::diagnostic_show_locus_c_tests): Call test_num_digits
and selftest::test_line_numbers_multiline_range.
* diagnostic.c (diagnostic_initialize): Initialize
show_line_numbers_p.
* diagnostic.h (struct diagnostic_context): Add field
"show_line_numbers_p".
* doc/invoke.texi (Diagnostic Message Formatting Options): Add
-fno-diagnostics-show-line-numbers.
* dwarf2out.c (gen_producer_string): Add
OPT_fdiagnostics_show_line_numbers to the ignored options.
* lto-wrapper.c (merge_and_complain): Likewise to the "pick
one setting" options.
(append_compiler_options): Likewise to the dropped options.
(append_diag_options): Likewise to the passed-on options.
* opts.c (common_handle_option): Handle the new option.
* toplev.c (general_init): Set up global_dc->show_line_numbers_p.
2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
third argument of type "const signed char" to descriptions of
__builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
__builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
__builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
__builtin_bcdsub_ov functions.
2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86858
* tree-vect-loop.c (vect_is_simple_reduction): Restore
flow_bb_inside_loop_p calls.
2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86871
* tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
instead of gimple_assign_lhs.
2018-08-09 Richard Earnshaw <rearnsha@arm.com>
PR target/86887
* config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
register constraint to operand 0.
(add<mode>3_carryinC): Likewise.
(add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
2018-08-09 Martin Liska <mliska@suse.cz>
PR c/86895
* common.opt: Remove extra line.
2018-08-09 Martin Liska <mliska@suse.cz>
* params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
at the end of a line, make first letter capital and end up
a sentence with a dot.
(PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
(PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
(PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
(PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
(PARAM_MAX_ISL_OPERATIONS): Likewise.
(PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
(PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
(PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
(PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
(PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
(PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
(PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
(PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
(PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
(PARAM_TREE_REASSOC_WIDTH): Likewise.
(PARAM_HSA_GEN_DEBUG_STORES): Likewise.
(PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
(PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/84332
* config/s390/s390.c (s390_option_override_internal): Reduce the
stack-clash-protection-probe-interval param if it would be too big
for z900.
2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
PR target/46179
* config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
* config/m68k/m68k.c (handle_move_double): Don't call
m68k_final_prescan_insn.
(m68k_adjust_decorated_operand): Renamed from
m68k_final_prescan_insn, remove first and third operand and
simplify.
(print_operand): Call it.
(print_operand_address): Call it.
2018-08-08 Nathan Sidwell <nathan@acm.org>
* diagnostic.c (diagnostic_report_current_module): Use
linemap_included_from & linemap_included_from_linemap.
2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
* config/aarch64/aarch64-cores.def: Add phecda core.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi: Add phecda core.
2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
PR target/85295
* config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
definitions.
* config/s390/s390.md ("movti"): Add more alternatives for
constant to GPR copies.
2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c: Fix whitespace damage throughout the file.
* config/s390/s390.h: Likewise.
* config/s390/tpf.h: Likewise.
2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_loadrelative_operand_p):
Remove TARGET_CPU_ZARCH usages.
(s390_rtx_costs): Likewise.
(s390_legitimate_constant_p): Likewise.
(s390_cannot_force_const_mem): Likewise.
(legitimate_reload_constant_p): Likewise.
(s390_preferred_reload_class): Likewise.
(legitimize_pic_address): Likewise.
(legitimize_tls_address): Likewise.
(s390_split_branches): Removed.
(s390_add_execute): Removed.
(s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
(s390_mainpool_start): Likewise.
(s390_mainpool_finish): Likewise.
(s390_mainpool_cancel): Removed.
(s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
(s390_chunkify_cancel): Likewise.
(s390_return_addr_rtx): Likewise.
(s390_register_info): Remove split_branches_pending_p uages.
(s390_optimize_register_info): Likewise.
(s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
split_branches_pending_p usages.
(s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
(s390_load_got): Likewise.
(s390_expand_split_stack_prologue): Likewise.
(output_asm_nops): Likewise.
(s390_function_profiler): Likewise.
(s390_emit_call): Likewise.
(s390_conditional_register_usage): Likewise.
(s390_optimize_prologue): Likewise.
(s390_reorg): Remove TARGET_CPU_ZARCH and
split_branches_pending_p usages.
(s390_option_override_internal): Remove TARGET_CPU_ZARCH
usages.
(s390_output_indirect_thunk_function): Likewise.
* config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
(TARGET_CPU_ZARCH_P): Removed.
(struct machine_function): Remove split_branches_pending_p.
* config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
* common/config/s390/s390-common.c (processor_flags_table):
Remove flags.
* config.gcc: Remove with_arch/with_tune support.
* config/s390/2064.md: Remove cpu attribute comparisons.
* config/s390/driver-native.c (s390_host_detect_local_cpu):
Remove MTN.
* config/s390/linux.h (ASM_SPEC):
Remove -march support.
* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
Use a table to get an arch level.
* config/s390/s390-opts.h (enum processor_type):
Remove enum values.
* config/s390/s390.c
(processor_table): Remove entries, add arch_level values.
(s390_issue_rate): Remove cases.
(s390_option_override): Adjust
s390_option_override_internal() call.
(s390_option_override_internal): Remove deprecation warning.
(s390_valid_target_attribute_tree): Adjust
s390_option_override_internal() call.
* config/s390/s390.h (struct s390_processor):
Share with s390-c.c, add arch_level field.
* config/s390/s390.md:
Remove occurrences in cpu attribute.
* config/s390/s390.opt: Remove -march/-mtune support.
* config/s390/tpf.h (ASM_SPEC): Remove -march support.
* doc/invoke.texi: Remove deprecation warning.
2018-08-08 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
global.
(qdf24xx_tunings): Set vector cost structure to
qdf24xx_vector_cost.
* config/aarch64/aarch64.c (qdf24xx_addrcost_table)
<register_sextend>: Set to 3.
2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
PR target/86838
* config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
* config/aarch64/aarch64-simd.md
(aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
(@aarch64_frecpe<mode>): ...here and the move FRECPX to...
(aarch64_frecpx<mode>): ...this new pattern.
* config/aarch64/aarch64-simd-builtins.def: Remove comment
about aarch64_frecp<FRECP:frecp_suffix><mode>.
2018-08-07 Martin Liska <mliska@suse.cz>
PR middle-end/83023
* predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
* predict.def (PRED_MALLOC_NONNULL): New predictor.
* doc/extend.texi: Document that malloc attribute adds
hit to compiler.
2018-08-06 John David Anglin <danglin@gcc.gnu.org>
PR target/86785
* config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
2018-08-06 Jeff Law <law@redhat.com>
* tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
the vr_values instance to cprop_into_stmt.
(cprop_into_stmt): Pass vr_values instance down to cprop_operand.
(cprop_operand): Also query EVRP to determine if OP is a constant.
2018-08-06 Nathan Sidwell <nathan@acm.org>
* diagnostic.c (diagnostic_report_current_module): Reroll
included-at loop. Translate text.
2018-08-06 David Malcolm <dmalcolm@redhat.com>
* function-tests.c (selftest::test_expansion_to_rtl): Call
free_after_compilation.
2018-08-06 Alan Hayward <alan.hayward@arm.com>
* config/aarch64/aarch64.md: Add clobber highs to tls_desc.
2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
loops with memory block operations from getting unrolled.
2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
PR target/86807
* config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
2018-08-06 Jeff Law <law@redhat.com>
* reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
assert.
2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
PR target/86662
* gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
with all enabled __intN types.
* gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
2018-08-06 Alan Hayward <alan.hayward@arm.com>
* alias.c (record_set): Check for clobber high.
* cfgexpand.c (expand_gimple_stmt): Likewise.
* combine-stack-adj.c (single_set_for_csa): Likewise.
* combine.c (find_single_use_1): Likewise.
(set_nonzero_bits_and_sign_copies): Likewise.
(get_combine_src_dest): Likewise.
(is_parallel_of_n_reg_sets): Likewise.
(try_combine): Likewise.
(record_dead_and_set_regs_1): Likewise.
(reg_dead_at_p_1): Likewise.
(reg_dead_at_p): Likewise.
* dce.c (deletable_insn_p): Likewise.
(mark_nonreg_stores_1): Likewise.
(mark_nonreg_stores_2): Likewise.
* df-scan.c (df_find_hard_reg_defs): Likewise.
(df_uses_record): Likewise.
(df_get_call_refs): Likewise.
* dwarf2out.c (mem_loc_descriptor): Likewise.
* haifa-sched.c (haifa_classify_rtx): Likewise.
* ira-build.c (create_insn_allocnos): Likewise.
* ira-costs.c (scan_one_insn): Likewise.
* ira.c (equiv_init_movable_p): Likewise.
(rtx_moveable_p): Likewise.
(interesting_dest_for_shprep): Likewise.
* jump.c (mark_jump_label_1): Likewise.
* postreload-gcse.c (record_opr_changes): Likewise.
* postreload.c (reload_cse_simplify): Likewise.
(struct reg_use): Add source expr.
(reload_combine): Check for clobber high.
(reload_combine_note_use): Likewise.
(reload_cse_move2add): Likewise.
(move2add_note_store): Likewise.
* print-rtl.c (print_pattern): Likewise.
* recog.c (decode_asm_operands): Likewise.
(store_data_bypass_p): Likewise.
(if_test_bypass_p): Likewise.
* regcprop.c (kill_clobbered_value): Likewise.
(kill_set_value): Likewise.
* reginfo.c (reg_scan_mark_refs): Likewise.
* reload1.c (maybe_fix_stack_asms): Likewise.
(eliminate_regs_1): Likewise.
(elimination_effects): Likewise.
(mark_not_eliminable): Likewise.
(scan_paradoxical_subregs): Likewise.
(forget_old_reloads_1): Likewise.
* reorg.c (find_end_label): Likewise.
(try_merge_delay_insns): Likewise.
(redundant_insn): Likewise.
(own_thread_p): Likewise.
(fill_simple_delay_slots): Likewise.
(fill_slots_from_thread): Likewise.
(dbr_schedule): Likewise.
* resource.c (update_live_status): Likewise.
(mark_referenced_resources): Likewise.
(mark_set_resources): Likewise.
* rtl.c (copy_rtx): Likewise.
* rtlanal.c (reg_referenced_p): Likewise.
(single_set_2): Likewise.
(noop_move_p): Likewise.
(note_stores): Likewise.
* sched-deps.c (sched_analyze_reg): Likewise.
(sched_analyze_insn): Likewise.
2018-08-06 Alan Hayward <alan.hayward@arm.com>
* cse.c (invalidate_reg): New function extracted from...
(invalidate): ...here.
(canonicalize_insn): Check for clobber high.
(invalidate_from_clobbers): invalidate clobber highs.
(invalidate_from_sets_and_clobbers): Likewise.
(count_reg_usage): Check for clobber high.
(insn_live_p): Likewise.
* cselib.c (cselib_expand_value_rtx_1):Likewise.
(cselib_invalidate_regno): Check for clobber in setter.
(cselib_invalidate_rtx): Pass through setter.
(cselib_invalidate_rtx_note_stores):
(cselib_process_insn): Check for clobber high.
* cselib.h (cselib_invalidate_rtx): Add operand.
2018-08-06 Alan Hayward <alan.hayward@arm.com>
* lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
(mark_not_eliminable): Likewise.
* lra-int.h (struct lra_insn_reg): Add clobber high marker.
* lra-lives.c (process_bb_lives): Check for clobber high.
* lra.c (new_insn_reg): Remember clobber highs.
(collect_non_operand_hard_regs): Check for clobber high.
(lra_set_insn_recog_data): Likewise.
(add_regs_to_insn_regno_info): Likewise.
(lra_update_insn_regno_info): Likewise.
2018-08-06 Alan Hayward <alan.hayward@arm.com>
* rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
* rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
2018-08-06 Alan Hayward <alan.hayward@arm.com>
* emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
(copy_insn_1): Likewise.
(gen_hard_reg_clobber_high): New gen function.
* genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
* genemit.c (gen_exp): Likewise.
(gen_emit_seq): Pass through info.
(gen_insn): Check for CLOBBER_HIGH.
(gen_expand): Pass through info.
(gen_split): Likewise.
(output_add_clobbers): Likewise.
* genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
(remove_clobbers): Likewise.
* rtl.h (gen_hard_reg_clobber_high): New declaration.
2018-08-06 Alan Hayward <alan.hayward@arm.com>
* doc/rtl.texi (clobber_high): Add.
(parallel): Add in clobber high
* rtl.c (rtl_check_failed_code3): Add function.
* rtl.def (CLOBBER_HIGH): Add expression.
* rtl.h (RTL_CHECKC3): Add macro.
(rtl_check_failed_code3): Add declaration.
(XC3EXP): Add macro.
2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
PR target/86386
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
cfun->machine->max_used_stack_alignment if needed.
2018-08-04 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86571
* gimple-ssa-sprintf.c (format_floating): Extend upper bound of
NaN output to 4.
2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
PR target/86799
* config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define.
2018-08-03 Jeff Law <law@redhat.com>
PR target/86795
* config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
2018-08-03 David Malcolm <dmalcolm@redhat.com>
* doc/gcov.texi (-x): Remove duplicate "to".
* doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
(-Wif-not-aligned): Remove duplicate "is".
(-flto): Remove duplicate "the".
(MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
duplicate "v5.00.b".
(MSP430 Options): Remove duplicate "and" from the description
of "-mgprel-sec=regexp".
(x86 Options): Remove duplicate copies of "vmldLog102" and
vmlsLog104 from description of "-mveclibabi=type".
2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
* internal-fn.h (first_commutative_argument): Declare.
* internal-fn.c (first_commutative_argument): New function.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
restrictions for pattern statements. Use first_commutative_argument
to look for commutative operands in calls to internal functions.
2018-08-03 Aldy Hernandez <aldyh@redhat.com>
* Makefile.in (wide-int-range.o): New.
* tree-vrp.c: Move all the wide_int_* functions to...
* wide-int-range.cc: ...here.
* tree-vrp.h: Move all the wide_int_* prototypes to...
* wide-int-range.h: ...here.
2018-08-03 Tom de Vries <tdevries@suse.de>
* common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
UI_NONE.
* config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
* except.c (output_function_exception_table): Do early exit if
targetm_common.except_unwind_info (&global_options) == UI_NONE.
2018-08-03 Martin Liska <mliska@suse.cz>
* predict.c (dump_prediction): Change to 2 digits
in fraction part.
2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
* config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
neon_dup_q to...
(falkor_am_1_gtov_gtov): ... a new insn reservation.
2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
* config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
* df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
* dwarf2out.c (mem_loc_descriptor): Replace > with >=.
* lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
* lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
2018-08-02 David Malcolm <dmalcolm@redhat.com>
* diagnostic-show-locus.c (diagnostic_show_locus): Use
pp_take_prefix when saving the existing prefix.
* diagnostic.c (diagnostic_append_note): Likewise.
* langhooks.c (lhd_print_error_function): Likewise.
* pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
param's type. Free the existing prefix.
(pp_take_prefix): New function.
(pretty_printer::pretty_printer): Drop the prefix parameter.
Rename the length parameter to match the comment.
(pretty_printer::~pretty_printer): Free the prefix.
* pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
parameter.
(struct pretty_printer): Drop the "const" from "prefix" field's
type and clarify memory management.
(pp_set_prefix): Drop the "const" from the 2nd param.
(pp_take_prefix): New decl.
2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
for word_mode_ok here instead of passing as argument.
(expand_block_compare): Change select_block_compare_mode() call.
(expand_strncmp_gpr_sequence): New function.
(expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
2018-08-02 Jeff Law <law@redhat.com>
PR target/86790
* config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86784
* config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
2018-08-02 Tom de Vries <tdevries@suse.de>
PR target/86660
* common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
function. Return UI_TARGET unconditionally.
(TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
* config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
* genemit.c (print_overload_test): Fix typo.
2018-08-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.
2018-08-02 Nick Clifton <nickc@redhat.com>
PR target/86813
* config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86810
* config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86810
* config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86803
* config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86797
* config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86791
* config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86789
* config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86787
* config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
Define to speculation_safe_value_not_needed.
PR target/86782
* config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
speculation_safe_value_not_needed.
PR target/86781
* config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
to speculation_safe_value_not_needed.
2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
* doc/md.texi: Expand the documentation of instruction names
to mention port-local uses. Document '@' in pattern names.
* read-md.h (overloaded_instance, overloaded_name): New structs.
(mapping): Declare.
(md_reader::handle_overloaded_name): New member function.
(md_reader::get_overloads): Likewise.
(md_reader::m_first_overload): New member variable.
(md_reader::m_next_overload_ptr): Likewise.
(md_reader::m_overloads_htab): Likewise.
* read-md.c (md_reader::md_reader): Initialize m_first_overload,
m_next_overload_ptr and m_overloads_htab.
* read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
(get_mode_token, get_code_token, get_int_token): New functions.
(map_attr_string): Add an optional argument that passes back
the associated iterator.
(overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
(md_reader::handle_overloaded_name, add_overload_instance): New
functions.
(apply_iterators): Handle '@' names. Report an error if '@'
is used without iterators.
(initialize_iterators): Initialize the new iterator_group fields.
* genopinit.c (handle_overloaded_code_for)
(handle_overloaded_gen): New functions.
(main): Use them to print declarations of maybe_code_for_* and
maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
* genemit.c (print_overload_arguments, print_overload_test)
(handle_overloaded_code_for, handle_overloaded_gen): New functions.
(main): Use it to print definitions of maybe_code_for_* and
maybe_gen_* functions.
* config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
instead of explicit mode checks.
(aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
(aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
(aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
(aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
(aarch64_expand_compare_and_swap): Likewise
gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
(aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
(aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
(aarch64_constant_pool_reload_icode): Delete.
(aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
instead of aarch64_constant_pool_reload_icode. Use
code_for_aarch64_reload_mov instead of explicit mode checks.
(rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
(aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
(recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
(aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
(aarch64_atomic_load_op_code): Delete.
(aarch64_emit_atomic_load_op): Likewise.
(aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
instead of aarch64_emit_atomic_load_op.
* config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
(aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
(aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
(aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
character before the pattern name.
* config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
(aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
(aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
(aarch64_frecps<mode>): Likewise.
* config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
(aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
(aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
(aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
(aarch64_atomic_load<atomic_ldop><mode>): Likewise.
2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
* config/aarch64/aarch64.c (aarch64_float_const_representable_p):
Allow HFmode constants if TARGET_FP_F16INST.
2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
PR target/86014
* config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
No longer check last store for clobber of address register.
2018-08-02 Martin Liska <mliska@suse.cz>
PR gcov-profile/86817
* gcov.c (process_all_functions): New function.
(main): Call it.
(process_file): Move functions processing to
process_all_functions.
2018-08-02 David Malcolm <dmalcolm@redhat.com>
* dumpfile.c (dump_user_location_t::dump_user_location_t): Add
"const" to the "gimple *" and "rtx_insn *" parameters.
* dumpfile.h (dump_user_location_t::dump_user_location_t):
Likewise.
(dump_location_t::dump_location_t): Likewise.
2018-08-01 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86650
* gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
rather than a "gcall *". Directly pass the data of interest
to percent_K_format, rather than building a temporary CALL_EXPR
to hold it.
* gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
(gimple_fold_builtin_strncat): Adjust.
* gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
gcall* argument with gimple*.
* gimple-ssa-warn-restrict.c (check_call): Same.
(wrestrict_dom_walker::before_dom_children): Same.
(builtin_access::builtin_access): Same.
(check_bounds_or_overlap): Same
(maybe_diag_overlap): Same.
(maybe_diag_offset_bounds): Same.
* tree-diagnostic.c (default_tree_printer): Move usage of
EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
to this callsite.
* tree-pretty-print.c (percent_K_format): Add argument.
* tree-pretty-print.h: Add argument.
* tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
(maybe_diag_stxncpy_trunc): Same.
(handle_builtin_stxncpy): Same.
(handle_builtin_strcat): Same.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* match.pd: Optimise pointer range checks.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86758
* tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
to remove pattern statements.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
result of dfs_enumerate_from when constructing stmt_vec_infos,
instead of additionally calling get_loop_body.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
parameter.
* tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
When creating an iv, assert that the step is not known to be zero.
(vect_setup_realignment): Update call accordingly.
* tree-vect-stmts.c (vectorizable_store): Likewise.
(vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_stmt_to_vectorize): New function.
* tree-vect-loop.c (vect_update_vf_for_slp): Use it.
(vectorizable_reduction): Likewise.
* tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
(vect_detect_hybrid_slp_stmts): Likewise.
* tree-vect-stmts.c (vect_is_simple_use): Likewise.
2018-08-01 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
(wide_int_set_zero_nonzero_bits): ...this.
(zero_nonzero_bits_from_vr): Rename to...
(vrp_set_zero_nonzero_bits): ...this.
(extract_range_from_multiplicative_op_1): Abstract wide int
code...
(wide_int_range_multiplicative_op): ...here.
(extract_range_from_binary_expr_1): Extract wide int binary
operations into their own functions.
(wide_int_range_lshift): New.
(wide_int_range_can_optimize_bit_op): New.
(wide_int_range_shift_undefined_p): New.
(wide_int_range_bit_xor): New.
(wide_int_range_bit_ior): New.
(wide_int_range_bit_and): New.
(wide_int_range_trunc_mod): New.
(extract_range_into_wide_ints): New.
(vrp_shift_undefined_p): New.
(extract_range_from_multiplicative_op): New.
(vrp_can_optimize_bit_op): New.
* tree-vrp.h (value_range::dump): New.
(wide_int_range_multiplicative_op): New.
(wide_int_range_lshift):New.
(wide_int_range_shift_undefined_p): New.
(wide_int_range_bit_xor): New.
(wide_int_range_bit_ior): New.
(wide_int_range_bit_and): New.
(wide_int_range_trunc_mod): New.
(zero_nonzero_bits_from_bounds): Rename to...
(wide_int_set_zero_nonzero_bits): ...this.
(zero_nonzero_bits_from_vr): Rename to...
(vrp_set_zero_nonzero_bits): ...this.
(range_easy_mask_min_max): Rename to...
(wide_int_range_can_optimize_bit_op): this.
* vr-values.c (simplify_bit_ops_using_ranges): Rename
zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_orig_stmt): New function.
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
* tree-vect-loop.c (vect_model_reduction_cost): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_live_operation): Likewise.
* tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
(vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
* tree-vect-stmts.c (vectorizable_call): Likewise.
(vectorizable_simd_clone_call, vect_remove_stores): Likewise.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
argument.
* tree-vect-stmts.c (vect_transform_stmt): Likewise.
* tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
(vect_transform_loop): Likewise.
* tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_schedule_slp): Return void.
* tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
(vect_schedule_slp): Likewise.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
argument.
(vect_transform_loop): Update calls accordingly. Schedule SLP
instances before the main loop, if any exist.
2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86749
* tree-vect-patterns.c (vect_determine_min_output_precision_1):
If the lhs is used in a COND_EXPR, check that it is being used
as the "then" or "else" value.
2018-08-01 Tom de Vries <tdevries@suse.de>
PR target/86800
* config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
speculation_safe_value_not_needed.
2018-08-01 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
as base and offset.
2018-08-01 Martin Liska <mliska@suse.cz>
* value-prof.c (gimple_divmod_fixed_value_transform): Unify
format how successful transformation is dumped.
(gimple_mod_pow2_value_transform): Likewise.
(gimple_mod_subtract_transform): Likewise.
(gimple_stringops_transform): Likewise.
2018-08-01 Martin Liska <mliska@suse.cz>
PR value-prof/35543
* value-prof.c (interesting_stringop_to_profile_p):
Simplify the code and add BUILT_IN_MEMMOVE.
(gimple_stringops_transform): Likewise.
2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
* config/aarch64/aarch64-simd.md
(*aarch64_get_lane_zero_extendsi<mode>): Rename to...
(*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
use GPI iterator instead of SI mode.
2018-08-01 Richard Earnshaw <rearnsha@arm.com>
* config/rs6000/rs6000.md (speculation_barrier): Renamed from
rs6000_speculation_barrier.
* config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
new barrier pattern name.
2018-08-01 Richard Earnshaw <rearnsha@arm.com>
* config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
(speculation_barrier): New insn.
2018-08-01 Richard Biener <rguenther@suse.de>
PR bootstrap/86724
* graphite.h: Include isl/id.h and isl/space.h to allow build
with ISL 0.20.
2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
PR target/86651
* dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
mode for COFF targets.
* defaults.h (TARGET_COFF): Define.
* config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
TARGET_COFF): Define.
(i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
* config/i386/djgpp.c (saved_debug_info_level): New static variable.
(i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
2018-07-31 Alexandre Oliva <oliva@adacore.com>
* gimple-streamer-in.c (input_bb): Restore BB discriminator.
* gimple-streamer-out.c (output_bb): Save it.
* lto-streamer-in.c (input_struct_function_base): Restore
instance discriminator if available. Create map on demand.
* lto-streamer-out.c (output_struct_function_base): Save it if
available.
* final.c (decl_to_instance_map): Document LTO strategy.
2018-07-31 Alexandre Oliva <oliva@adacore.com>
Olivier Hainque <hainque@adacore.com>
* debug.h (decl_to_instance_map_t): New type.
(decl_to_instance_map): Declare.
(maybe_create_decl_to_instance_map): New inline function.
* final.c (bb_discriminator, last_bb_discriminator): New statics,
to track basic block discriminators.
(final_start_function_1): Initialize them.
(final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
bb_discriminator.
(decl_to_instance_map): New variable.
(map_decl_to_instance, maybe_set_discriminator): New functions.
(notice_source_line): Set discriminator.
2018-07-31 Ian Lance Taylor <iant@golang.org>
* targhooks.c (default_have_speculation_safe_value): Add
ATTRIBUTE_UNUSED.
2018-07-31 David Malcolm <dmalcolm@redhat.com>
* dump-context.h: Include "pretty-print.h".
(dump_context::refresh_dumps_are_enabled): New decl.
(dump_context::emit_item): New decl.
(class dump_context): Add fields "m_test_pp" and
"m_test_pp_flags".
(temp_dump_context::temp_dump_context): Add param "test_pp_flags".
(temp_dump_context::get_dumped_text): New decl.
(class temp_dump_context): Add field "m_pp".
* dumpfile.c (refresh_dumps_are_enabled): Convert to...
(dump_context::refresh_dumps_are_enabled): ...and add a test for
m_test_pp.
(set_dump_file): Update for above change.
(set_alt_dump_file): Likewise.
(dump_loc): New overload, taking a pretty_printer *.
(dump_context::dump_loc): Call end_any_optinfo. Dump the location
to any test pretty-printer.
(make_item_for_dump_gimple_stmt): New function, adapted from
optinfo::add_gimple_stmt.
(dump_context::dump_gimple_stmt): Call it, and use the result,
eliminating the direct usage of dump_file and alt_dump_file in
favor of indirectly using them via emit_item.
(make_item_for_dump_gimple_expr): New function, adapted from
optinfo::add_gimple_expr.
(dump_context::dump_gimple_expr): Call it, and use the result,
eliminating the direct usage of dump_file and alt_dump_file in
favor of indirectly using them via emit_item.
(make_item_for_dump_generic_expr): New function, adapted from
optinfo::add_tree.
(dump_context::dump_generic_expr): Call it, and use the result,
eliminating the direct usage of dump_file and alt_dump_file in
favor of indirectly using them via emit_item.
(make_item_for_dump_printf_va): New function, adapted from
optinfo::add_printf_va.
(make_item_for_dump_printf): New function.
(dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
and use the result, eliminating the direct usage of dump_file and
alt_dump_file in favor of indirectly using them via emit_item.
(make_item_for_dump_dec): New function.
(dump_context::dump_dec): Call it, and use the result,
eliminating the direct usage of dump_file and alt_dump_file in
favor of indirectly using them via emit_item.
(make_item_for_dump_symtab_node): New function, adapted from
optinfo::add_symtab_node.
(dump_context::dump_symtab_node): Call it, and use the result,
eliminating the direct usage of dump_file and alt_dump_file in
favor of indirectly using them via emit_item.
(dump_context::begin_scope): Reimplement, avoiding direct usage
of dump_file and alt_dump_file in favor of indirectly using them
via emit_item.
(dump_context::emit_item): New member function.
(temp_dump_context::temp_dump_context): Add param "test_pp_flags".
Set up test pretty-printer on the underlying context. Call
refresh_dumps_are_enabled.
(temp_dump_context::~temp_dump_context): Call
refresh_dumps_are_enabled.
(temp_dump_context::get_dumped_text): New member function.
(selftest::verify_dumped_text): New function.
(ASSERT_DUMPED_TEXT_EQ): New macro.
(selftest::test_capture_of_dump_calls): Run all tests twice, with
and then without optinfo enabled. Add uses of
ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
* dumpfile.h: Update comment for the dump_* API.
* optinfo-emit-json.cc
(selftest::test_building_json_from_dump_calls): Update for new
param for temp_dump_context ctor.
* optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
and "m_owned" field.
(optinfo_item::~optinfo_item): Likewise.
(optinfo::add_item): New member function.
(optinfo::emit): Update comment.
(optinfo::add_string): Delete.
(optinfo::add_printf): Delete.
(optinfo::add_printf_va): Delete.
(optinfo::add_gimple_stmt): Delete.
(optinfo::add_gimple_expr): Delete.
(optinfo::add_tree): Delete.
(optinfo::add_symtab_node): Delete.
(optinfo::add_dec): Delete.
* optinfo.h (class dump_context): New forward decl.
(optinfo::add_item): New decl.
(optinfo::add_string): Delete.
(optinfo::add_printf): Delete.
(optinfo::add_printf_va): Delete.
(optinfo::add_gimple_stmt): Delete.
(optinfo::add_gimple_expr): Delete.
(optinfo::add_tree): Delete.
(optinfo::add_symtab_node): Delete.
(optinfo::add_dec): Delete.
(optinfo::add_poly_int): Delete.
(optinfo_item::optinfo_item): Remove "owned" param.
(class optinfo_item): Remove field "m_owned".
2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
PR middle-end/86705
* gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
requested variable alignment.
(expand_one_ssa_partition): Likewise.
(expand_one_var): Likewise.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
to speculation_safe_value_not_needed.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* targhooks.h (speculation_safe_value_not_needed): New prototype.
* targhooks.c (speculation_safe_value_not_needed): New function.
* target.def (have_speculation_safe_value): Update documentation.
* doc/tm.texi: Regenerated.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/aarch64/iterators.md (ALLI_TI): New iterator.
* config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
expand.
(despeculate_copy<ALLI:mode>_insn): New insn.
(despeculate_copyti_insn): New insn.
(despeculate_simple<ALLI:mode>): New insn
(despeculate_simpleti): New insn.
* config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
function.
(TARGET_SPECULATION_SAFE_VALUE): Redefine to
aarch64_speculation_safe_value.
(aarch64_print_operand): Handle const0_rtx in modifier 'H'.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/aarch64/aarch64-speculation.cc: New file.
* config/aarch64/aarch64-passes.def (pass_track_speculation): Add
before pass_reorder_blocks.
* config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
prototype.
* config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
X14 and X15 when tracking speculation.
* config/aarch64/aarch64.md (register name constants): Add
SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
(unspec): Add UNSPEC_SPECULATION_TRACKER.
(speculation_barrier): New insn attribute.
(cmp<mode>): Allow SP in comparisons.
(speculation_tracker): New insn.
(speculation_barrier): Add speculation_barrier attribute.
* config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
* config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
* doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
aarch64_track_speculation is true.
(tb<optab><mode>1): Likewise.
* config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
generate CB[N]Z when tracking speculation.
(aarch64_split_compare_and_swap): Likewise.
(aarch64_split_atomic_op): Likewise.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/aarch64/aarch64.opt (mtrack-speculation): New target option.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
(speculation_barrier): New insn.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
* config/arm/arm.md (speculation_barrier): New expand.
(speculation_barrier_insn): New pattern.
2018-07-31 Richard Earnshaw <rearnsha@arm.com>
* builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
(BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
(BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
* builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
list.
* builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
(BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
(BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
(BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
(BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
(BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
(BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
* builtins.c (expand_speculation_safe_value): New function.
(expand_builtin): Call it.
* doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
* doc/extend.texi: Document __builtin_speculation_safe_value.
* doc/md.texi: Document "speculation_barrier" pattern.
* doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
TARGET_HAVE_SPECULATION_SAFE_VALUE.
* doc/tm.texi: Regenerated.
* target.def (have_speculation_safe_value, speculation_safe_value): New
hooks.
* targhooks.c (default_have_speculation_safe_value): New function.
(default_speculation_safe_value): New function.
* targhooks.h (default_have_speculation_safe_value): Add prototype.
(default_speculation_safe_value): Add prototype.
2018-07-31 David Malcolm <dmalcolm@redhat.com>
* dump-context.h (dump_context::dump_loc): New decl.
* dumpfile.c (dump_context::dump_loc): New member function.
(dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
and dump_gimple_stmt.
(dump_context::dump_gimple_expr_loc): Likewise, using
dump_gimple_expr.
(dump_context::dump_generic_expr_loc): Likewise, using
dump_generic_expr.
(dump_context::dump_printf_loc_va): Likewise, using
dump_printf_va.
(dump_context::begin_scope): Explicitly using the global function
"dump_loc", rather than the member function.
2018-07-31 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86741
* tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390.c (s390_expand_setmem): Make the unrolling to
depend on whether prefetch instructions will be emitted or not.
Use TARGET_SETMEM_PFD for checking whether prefetch instructions
will be emitted or not.
* config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
(TARGET_SETMEM_PFD): New macros.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
(NULL_STMT_VEC_INFO): Delete.
(stmt_vec_info::operator*): Likewise.
(stmt_vec_info::operator gimple *): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Use NULL instead
of NULL_STMT_VEC_INFO.
* tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
(vect_reassociating_reduction_p): Likewise.
* tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
(vectorizable_store): Likewise.
* tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
(vec_info::free_stmt_vec_infos): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_stmt_in_region_p): Delete.
* tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
(vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
(vec_info::free_stmt_vec_info): New private member functions.
(set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
(set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
* tree-parloops.c (gather_scalar_reductions): Remove calls to
set_stmt_vec_info_vec and free_stmt_vec_infos.
* tree-vect-loop.c (_loop_vec_info): Remove call to
set_stmt_vec_info_vec.
* tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
(free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
* tree-vectorizer.c (vec_info::new_stmt_vec_info)
(vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
(vec_info::free_stmt_vec_info): ...these new functions. Remove
assignments in {vec_info::,}new_stmt_vec_info that are redundant
with the clearing in the xcalloc.
(stmt_vec_info_vec): Delete.
(vec_info::vec_info): Don't call set_stmt_vec_info_vec.
(vectorize_loops): Likewise.
(vec_info::~vec_info): Remove argument from call to
free_stmt_vec_infos.
(vec_info::add_stmt): Remove vinfo argument from call to
new_stmt_vec_info.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
rather than a gimple stmt.
* tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
information for pattern statements when passed the original
statement; instead wait to be passed the pattern statement itself.
Don't call set_vinfo_for_stmt here.
(free_stmt_vec_infos): Update call to free_stmt_vec_info.
* tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
stmt_vec_infos here.
* tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
* tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
stmt_vec_infos entry.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::replace_stmt): Declare.
* tree-vectorizer.c (vec_info::replace_stmt): New function.
* tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
* tree-vect-stmts.c (vectorizable_call): Likewise.
(vectorizable_simd_clone_call): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::remove_stmt): Declare.
* tree-vectorizer.c (vec_info::remove_stmt): New function.
* tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
* tree-vect-loop.c (vect_transform_loop): Likewise.
* tree-vect-slp.c (vect_schedule_slp): Likewise.
* tree-vect-stmts.c (vect_remove_stores): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::lookup_dr): New member function.
(vect_dr_stmt): Delete.
* tree-vectorizer.c (vec_info::lookup_dr): New function.
* tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
of DR_VECT_AUX.
* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
(vect_analyze_data_ref_dependence, vect_record_base_alignments)
(vect_verify_datarefs_alignment, vect_peeling_supportable)
(vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
(vect_analyze_data_refs): Likewise.
(vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
argument.
(vect_find_same_alignment_drs): Likewise.
(vect_slp_analyze_node_dependences): Update calls accordingly.
(vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
instead of DR_VECT_AUX.
(vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
of a vector data references. Use vec_info::lookup_dr instead of
DR_VECT_AUX.
(vect_peeling_hash_get_lowest_cost): Update calls accordingly.
(vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
instead of DR_VECT_AUX.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
dr_vec_info.
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
accordingly.
* tree-vect-loop.c (vect_analyze_loop_2): Likewise.
* tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
(vect_gen_prolog_loop_niters): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
(DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
(vect_known_alignment_in_bytes, vect_dr_behavior)
(vect_get_scalar_dr_size): Take references as dr_vec_infos
instead of data_references. Update calls to other routines for
which the same change has been made.
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
dr_vec_infos instead of stmt_vec_infos.
(vect_analyze_data_ref_dependence): Update call accordingly.
(vect_slp_analyze_data_ref_dependence)
(vect_record_base_alignments): Use DR_VECT_AUX.
(vect_calculate_target_alignment, vect_compute_data_ref_alignment)
(vect_update_misalignment_for_peel, verify_data_ref_alignment)
(vector_alignment_reachable_p, vect_get_data_access_cost)
(vect_peeling_supportable, vect_analyze_group_access_1)
(vect_analyze_group_access, vect_analyze_data_ref_access)
(vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
(vect_compile_time_alias, vect_small_gap_p)
(vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
(vect_supportable_dr_alignment): Take references as dr_vec_infos
instead of data_references. Update calls to other routines for
which the same change has been made.
(vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
(vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
(vect_slp_analyze_and_verify_node_alignment)
(vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
(vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
(vect_setup_realignment): Use dr_vec_infos. Update calls after
above changes.
(_vect_peel_info::dr): Replace with...
(_vect_peel_info::dr_info): ...this new field.
(vect_peeling_hash_get_most_frequent)
(vect_peeling_hash_choose_best_peeling): Update accordingly.
(vect_peeling_hash_get_lowest_cost):
(vect_enhance_data_refs_alignment): Likewise. Update calls to other
routines for which the same change has been made.
(vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
data_reference.
* tree-vect-loop-manip.c (get_misalign_in_elems)
(vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
above changes.
* tree-vect-loop.c (vect_analyze_loop_2): Likewise.
* tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
(vect_truncate_gather_scatter_offset, compare_step_with_zero)
(get_group_load_store_type, get_negative_load_store_type)
(vect_get_data_ptr_increment, vectorizable_store)
(vectorizable_load): Likewise.
(ensure_base_align): Take a dr_vec_info instead of a data_reference.
Update calls to other routines for which the same change has been made.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::move_dr): New member function.
(dataref_aux): Rename to...
(dr_vec_info): ...this and add "dr" and "stmt" fields.
(_stmt_vec_info::dr_aux): Update accordingly.
(_stmt_vec_info::data_ref_info): Delete.
(STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
(DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
(DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
(REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
of data_ref.
(STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
(STMT_VINFO_DR_INFO): New macro.
(DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
(set_dr_misalignment): Update after rename of dataref_aux.
(vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
* tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
initialization of STMT_VINFO_DATA_REF.
* tree-vectorizer.c (vec_info::move_dr): New function.
* tree-vect-patterns.c (vect_recog_bool_pattern)
(vect_recog_mask_conversion_pattern)
(vect_recog_gather_scatter_pattern): Use it.
* tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
the "dr" and "stmt" fields of dr_vec_info instead of
STMT_VINFO_DATA_REF.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
(is_pattern_stmt_p): Use it.
* tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
on pattern statements.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
original stmt as a stmt_vec_info rather than a gimple stmt.
(vect_pattern_recog_1): Take the statement directly as a
stmt_vec_info, rather than via a gimple_stmt_iterator.
Update call to vect_mark_pattern_stmts.
(vect_pattern_recog): Update calls accordingly.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
(vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
a vect_def_type for the first argument.
* tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
(vect_get_vec_def_for_stmt_copy): Likewise. Return the original
operand if it isn't defined by a vectorized statement.
(vect_build_gather_load_calls): Remove the mask_dt argument and
update calls to vect_get_vec_def_for_stmt_copy.
(vectorizable_bswap): Likewise the dt argument.
(vectorizable_call): Update calls to vectorizable_bswap and
vect_get_vec_def_for_stmt_copy.
(vectorizable_simd_clone_call, vectorizable_assignment)
(vectorizable_shift, vectorizable_operation, vectorizable_condition)
(vectorizable_comparison): Update calls to
vect_get_vec_def_for_stmt_copy.
(vectorizable_store): Likewise. Remove now-unnecessary calls to
vect_is_simple_use.
(vect_get_loop_based_defs): Remove dt argument and update call
to vect_get_vec_def_for_stmt_copy.
(vectorizable_conversion): Update calls to vect_get_loop_based_defs
and vect_get_vec_def_for_stmt_copy.
(vectorizable_load): Update calls to vect_build_gather_load_calls
and vect_get_vec_def_for_stmt_copy.
* tree-vect-loop.c (vect_create_epilog_for_reduction)
(vectorizable_reduction, vectorizable_live_operation): Update calls
to vect_get_vec_def_for_stmt_copy.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
and gimple stmt arguments with a stmt_vec_info.
(vect_record_base_alignments): Update calls accordingly.
* tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
and gimple stmt arguments with a stmt_vec_info.
(vect_build_slp_tree_1): Remove vinfo argument and update call
to vect_record_max_nunits.
(vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
and vect_record_max_nunits.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (nested_in_vect_loop_p): Move further down
file and take a stmt_vec_info instead of a gimple stmt.
(supportable_widening_operation, vect_finish_replace_stmt)
(vect_finish_stmt_generation, vect_get_store_rhs)
(vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
(vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
(vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
(vect_get_smallest_scalar_type, vect_check_gather_scatter)
(vect_create_data_ref_ptr, bump_vector_ptr)
(vect_permute_store_chain, vect_setup_realignment)
(vect_transform_grouped_load, vect_record_grouped_load_vectors)
(vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
(vectorizable_reduction, vectorizable_induction)
(get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
(vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
than gimple stmts as arguments.
* tree-vect-data-refs.c (vect_get_smallest_scalar_type)
(vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
(can_group_stmts_p, vect_check_gather_scatter)
(vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
(bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
(vect_permute_load_chain, vect_shift_permute_load_chain)
(vect_transform_grouped_load)
(vect_record_grouped_load_vectors): Likewise.
* tree-vect-loop.c (vect_fixup_reduc_chain)
(get_initial_def_for_reduction, vect_create_epilog_for_reduction)
(vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
(vectorizable_reduction, vectorizable_induction)
(vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
* tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
(vect_get_load_store_mask): Likewise.
* tree-vect-slp.c (vect_get_place_in_interleaving_chain)
(vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
* tree-vect-stmts.c (vect_mark_relevant)
(is_simple_and_all_uses_invariant)
(exist_non_indexing_operands_for_use_p, process_use)
(vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
(vect_get_vec_def_for_operand, vect_get_vec_defs)
(vect_finish_stmt_generation_1, vect_finish_replace_stmt)
(vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
(compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
(get_negative_load_store_type, get_load_store_type)
(vect_check_load_store_mask, vect_check_store_rhs)
(vect_build_gather_load_calls, vect_get_strided_load_store_ops)
(vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
(vect_create_vectorized_demotion_stmts, vectorizable_conversion)
(vectorizable_assignment, vectorizable_shift, vectorizable_operation)
(get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
(vectorizable_load, vectorizable_condition, vectorizable_comparison)
(vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
(supportable_widening_operation): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
a stmt_vec_info instead of a gcall.
(vect_check_gather_scatter): Update call accordingly.
* tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
of a gphi.
(vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
(slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
* tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
instead of a gimple stmt.
(vect_transform_loop): Update calls accordingly.
* tree-vect-slp.c (vect_split_slp_store_group): Take and return
stmt_vec_infos instead of gimple stmts.
(vect_analyze_slp_instance): Update use accordingly.
* tree-vect-stmts.c (read_vector_array, write_vector_array)
(vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
(vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
(vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
(vect_gen_widened_results_half, vect_get_loop_based_defs)
(vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
down to subroutines.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
of the worklist from a vector of gimple stmts to a vector of
stmt_vec_infos.
* tree-vect-stmts.c (vect_mark_relevant, process_use)
(vect_mark_stmts_to_be_vectorized): Likewise
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vect_analyze_loop_operations): Look up the
statement before passing it to vect_analyze_stmt.
(vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
the chain of phi vector definitions. Track the exit phi via its
stmt_vec_info.
(vectorizable_reduction): Set cond_stmt_vinfo directly from the
STMT_VINFO_REDUC_DEF.
* tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
stmt_vec_infos to handle the statement chains.
(vect_get_slp_defs): Record the first statement in the node
using a stmt_vec_info.
* tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
statements here and pass their stmt_vec_info down to subroutines.
(vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
down to vect_finish_stmt_generation.
(vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
(vect_finish_stmt_generation): Call vinfo_for_stmt and pass
stmt_vec_infos to subroutines.
(vect_remove_stores): Use stmt_vec_infos to handle the statement
chains.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
(vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
(vect_permute_store_chain, vect_setup_realignment)
(vect_permute_load_chain, vect_shift_permute_load_chain)
(vect_transform_grouped_load): Use stmt_vec_info rather than gimple
stmts internally, and when passing values to other vectorizer routines.
* tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1)
(vect_analyze_loop_operations, get_initial_def_for_reduction)
(vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
(vectorizable_reduction, vectorizable_induction)
(vectorizable_live_operation, vect_transform_loop_stmt)
(vect_transform_loop): Likewise.
* tree-vect-patterns.c (vect_reassociating_reduction_p)
(vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
(vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
* tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
(vect_slp_analyze_node_operations_1): Likewise.
* tree-vect-stmts.c (vect_mark_relevant, process_use)
(exist_non_indexing_operands_for_use_p, vect_init_vector_1)
(vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
(vect_finish_stmt_generation_1, get_group_load_store_type)
(get_load_store_type, vect_build_gather_load_calls)
(vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
(vect_create_vectorized_demotion_stmts, vectorizable_conversion)
(vectorizable_assignment, vectorizable_shift, vectorizable_operation)
(vectorizable_store, vectorizable_load, vectorizable_condition)
(vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
(supportable_widening_operation): Likewise.
(vect_get_vector_types_for_stmt): Likewise.
* tree-vectorizer.h (vect_dr_behavior): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
(vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
(vect_permute_store_chain, vect_permute_load_chain)
(vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
repeated stmt_vec_info lookups.
* tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
(vect_update_ivs_after_vectorizer): Likewise.
* tree-vect-loop.c (vect_is_simple_reduction): Likewise.
(vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
* tree-vect-patterns.c (adjust_bool_stmts): Likewise.
* tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
(vect_bb_slp_scalar_cost): Likewise.
* tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
gcall rather than the generic gimple stmt to gimple_call_internal_fn.
(vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
to get gassigns and gcalls, rather than operating on generc gimple
stmts.
* tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
(vect_mark_stmts_to_be_vectorized, vectorizable_store)
(vectorizable_load, vect_analyze_stmt): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
return stmt_vec_infos rather than gimple stmts. Do not accept
null arguments.
(vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
of a gimple stmt.
* tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
Update use of get_later_stmt.
(vect_get_constant_vectors): Update call accordingly.
(vect_schedule_slp_instance): Likewise
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
(vect_slp_analyze_instance_dependence): Likewise.
(vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
(stmt_info_for_cost::stmt_info): ...this new field.
(add_stmt_costs): Update accordingly.
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
(vect_get_known_peeling_cost): Likewise.
(vect_estimate_min_profitable_iters): Likewise.
* tree-vect-stmts.c (record_stmt_cost): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
accordingly.
* tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
a gimple stmt to a stmt_vec_info.
* tree-vect-stmts.c (vectorizable_load): Update accordingly.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::grouped_stores): Change from
an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
(_loop_vec_info::reduction_chains): Likewise.
* tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
accordingly.
* tree-vect-slp.c (vect_analyze_slp): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info::first_element): Change from
a gimple stmt to a stmt_vec_info.
(_stmt_vec_info::next_element): Likewise.
* tree-vect-data-refs.c (vect_update_misalignment_for_peel)
(vect_slp_analyze_and_verify_node_alignment)
(vect_analyze_group_access_1, vect_analyze_group_access)
(vect_small_gap_p, vect_prune_runtime_alias_test_list)
(vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
(vect_supportable_dr_alignment): Update accordingly.
* tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
(vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
(vect_is_simple_reduction, vectorizable_reduction): Likewise.
* tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
* tree-vect-slp.c (vect_build_slp_tree_1)
(vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
(vect_split_slp_store_group, vect_analyze_slp_instance)
(vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
* tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
(get_group_load_store_type, get_load_store_type)
(get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
(vect_transform_stmt, vect_remove_stores): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
than a gimple stmt.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
(vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
(vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
(vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
(vector_alignment_reachable_p, vect_get_data_access_cost)
(vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
(vect_peeling_supportable, vect_enhance_data_refs_alignment)
(vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
(vect_analyze_group_access_1, vect_analyze_group_access)
(vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
(vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
(vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
result of vect_dr_stmt and use the stmt_vec_info instead of
the associated gimple stmt.
* tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
(vect_gen_prolog_loop_niters): Likewise.
* tree-vect-loop.c (vect_analyze_loop_2): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
to a vec<stmt_vec_info>.
* tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
(vect_create_new_slp_node): Take a vec<gimple *> instead of a
vec<stmt_vec_info>.
(_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
to a vec<stmt_vec_info>.
(bst_traits::value_type, bst_traits::value_type): Likewise.
(bst_traits::hash): Update accordingly.
(vect_get_and_check_slp_defs): Change the stmts parameter from
a vec<gimple *> to a vec<stmt_vec_info>.
(vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
(vect_build_slp_tree): Likewise.
(vect_build_slp_tree_2): Likewise. Update uses of
SLP_TREE_SCALAR_STMTS.
(vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
(vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
(vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
(vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
(vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
(vect_slp_analyze_node_operations, vect_slp_analyze_operations)
(vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
(vect_get_constant_vectors, vect_get_slp_defs)
(vect_transform_slp_perm_load, vect_schedule_slp_instance)
(vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
(vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
instead of gimple stmts.
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
(vect_slp_analyze_instance_dependence): Update uses of
SLP_TREE_SCALAR_STMTS.
(vect_slp_analyze_and_verify_node_alignment): Likewise.
(vect_slp_analyze_and_verify_instance_alignment): Likewise.
* tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
(get_initial_defs_for_reduction): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorize_fold_left_reduction): Likewise.
* tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
(vect_model_simple_cost, vectorizable_shift, vectorizable_load)
(can_vectorize_live_stmts): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_loop_vec_info::reductions): Change from an
auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
(vect_force_simple_reduction): Take and return stmt_vec_infos rather
than gimple stmts.
* tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
of a gimple stmt.
(gather_scalar_reductions): Update after above interface changes.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
(vect_is_simple_reduction): Take and return stmt_vec_infos rather
than gimple stmts.
(vect_force_simple_reduction): Likewise.
* tree-vect-patterns.c (vect_pattern_recog_1): Update use of
LOOP_VINFO_REDUCTIONS.
* tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
a gimple stmt to a stmt_vec_info.
* tree-vect-loop.c (vect_active_double_reduction_p)
(vect_force_simple_reduction, vectorizable_reduction): Update
accordingly.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
vec<gimple *> to a vec<stmt_vec_info>.
* tree-vect-loop.c (vect_create_epilog_for_reduction): Change
the reduction_phis argument from a vec<gimple *> to a
vec<stmt_vec_info>.
(vectorizable_reduction): Likewise the phis local variable that
is passed to vect_create_epilog_for_reduction. Update for new type
of SLP_TREE_VEC_STMTS.
(vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
(vectorizable_live_operation): Likewise.
* tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
(vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
a gimple stmt to a stmt_vec_info.
(vectorizable_condition, vectorizable_live_operation)
(vectorizable_reduction, vectorizable_induction): Pass back the
vectorized statement as a stmt_vec_info.
* tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
use of STMT_VINFO_VEC_STMT.
* tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
as stmt_vec_infos rather than gimple stmts.
(vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
to a stmt_vec_info.
(vectorizable_live_operation): Likewise.
(vectorizable_reduction, vectorizable_induction): Likewise,
updating use of STMT_VINFO_VEC_STMT.
* tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
of STMT_VINFO_VEC_STMT.
(vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
(vectorizable_simd_clone_call, vectorizable_conversion)
(vectorizable_assignment, vectorizable_shift, vectorizable_operation)
(vectorizable_store, vectorizable_load, vectorizable_condition)
(vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
from a gimple stmt to a stmt_vec_info.
(vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
pointer to a stmt_vec_info to the vectorizable_* routines.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
a gimple stmt to a stmt_vec_info.
(is_pattern_stmt_p): Update accordingly.
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
(vect_record_grouped_load_vectors): Likewise.
* tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
(vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
(vect_model_reduction_cost): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_reduction, vectorizable_induction): Likewise.
* tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
Return the stmt_vec_info for the pattern statement.
(vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
(vect_split_statement, vect_mark_pattern_stmts): Likewise.
* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
(vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
* tree-vect-stmts.c (vect_mark_relevant): Likewise.
(vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
(vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
(free_stmt_vec_info, vect_is_simple_use): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
(vect_finish_stmt_generation): Likewise.
* tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
(vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
(vect_build_gather_load_calls): Use the return value of the above
functions instead of a separate call to vinfo_for_stmt. Use narrow
scopes for the input gimple stmt and wider scopes for the associated
stmt_vec_info. Use vec_info::lookup_def when setting these
stmt_vec_infos from an SSA_NAME definition.
(vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
(vect_create_vectorized_demotion_stmts, vectorizable_conversion)
(vectorizable_assignment, vectorizable_shift, vectorizable_operation)
(vectorizable_store, vectorizable_load, vectorizable_condition)
(vectorizable_comparison): Likewise.
* tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
(vectorizable_reduction): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_is_simple_use): Add an optional
stmt_vec_info * parameter before the optional gimple **.
* tree-vect-stmts.c (vect_is_simple_use): Likewise.
(process_use, vect_get_vec_def_for_operand_1): Update callers.
(vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
* tree-vect-loop.c (vectorizable_reduction): Likewise.
(vectorizable_live_operation): Likewise.
* tree-vect-patterns.c (type_conversion_p): Likewise.
(vect_look_through_possible_promotion): Likewise.
(vect_recog_rotate_pattern): Likewise.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (stmt_vec_info): Temporarily change from
a typedef to a wrapper class.
(NULL_STMT_VEC_INFO): New macro.
(vec_info::stmt_infos): Change to vec<stmt_vec_info>.
(stmt_vec_info::operator*): New function.
(stmt_vec_info::operator gimple *): Likewise.
(set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
(add_stmt_costs): Likewise.
* tree-vect-loop-manip.c (iv_phi_p): Likewise.
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
(vect_get_known_peeling_cost): Likewise.
(vect_estimate_min_profitable_iters): Likewise.
* tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
* tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
* tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
(vectorizable_store, free_stmt_vec_infos): Likewise.
(new_stmt_vec_info): Change return type of xcalloc to
_stmt_vec_info *.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::lookup_single_use): Declare.
* tree-vectorizer.c (vec_info::lookup_single_use): New function.
* tree-vect-loop.c (vectorizable_reduction): Use it instead of
a single_imm_use-based sequence.
* tree-vect-stmts.c (supportable_widening_operation): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::lookup_def): Declare.
* tree-vectorizer.c (vec_info::lookup_def): New function.
* tree-vect-patterns.c (vect_get_internal_def): Use it.
(vect_widened_op_tree): Likewise.
* tree-vect-stmts.c (vect_is_simple_use): Likewise.
* tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
(vectorizable_reduction): Likewise.
(vect_valid_reduction_input_p): Take a stmt_vec_info instead
of a gimple *.
(vect_is_slp_reduction): Update calls accordingly. Use
vec_info::lookup_def.
(vect_is_simple_reduction): Likewise
* tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vec_info::lookup_stmt): Declare.
* tree-vectorizer.c (vec_info::lookup_stmt): New function.
* tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
of vinfo_for_stmt.
(vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
(vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
(vect_update_vf_for_slp, vect_analyze_loop_operations)
(vect_is_slp_reduction, vectorizable_induction)
(vect_transform_loop_stmt, vect_transform_loop): Likewise.
* tree-vect-patterns.c (vect_init_pattern_stmt):
(vect_determine_min_output_precision_1, vect_determine_precisions)
(vect_pattern_recog): Likewise.
* tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
* config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
* config/rs6000/rs6000.c (rs6000_density_test): Likewise.
* tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
(vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
(vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
info field from a loop to a loop_vec_info.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
(vec_info::add_stmt): Declare.
* tree-vectorizer.c (vec_info::add_stmt): New function.
* tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
(vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
(vectorizable_induction): Likewise.
* tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
* tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
(vectorizable_simd_clone_call, vectorizable_store): Likewise.
(vectorizable_load): Likewise.
* tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
(vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
(vect_recog_gather_scatter_pattern): Likewise.
(append_pattern_def_seq): Likewise. Remove a check that is
performed by add_stmt itself.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vectorizable_reduction): Fix an instance in
which make_ssa_name was called with new_stmt before new_stmt
had been created.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vect_valid_reduction_input_p): New function,
split out from...
(vect_is_slp_reduction): ...here...
(vect_is_simple_reduction): ...and here. Remove repetition of tests
that are already known to be false.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
* tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
STMT_VINFO_NUM_SLP_USES when it's true.
(vect_free_slp_instance): Add a final_p parameter and pass it to
vect_free_slp_tree.
(vect_build_slp_tree_2): Update call to vect_free_slp_instance.
(vect_analyze_slp_instance): Likewise.
(vect_slp_analyze_operations): Likewise.
(vect_slp_analyze_bb_1): Likewise.
* tree-vectorizer.c (vec_info): Likewise.
* tree-vect-loop.c (vect_transform_loop): Likewise.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vectorizable_reduction): Assert that the
function is not called for second and subsequent members of
a reduction group.
2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (get_initial_def_for_reduction): Move special
cases for nested loops from here to ...
(vect_create_epilog_for_reduction): ...here. Only call
vect_is_simple_use for inner-loop reductions.
2018-07-31 Martin Liska <mliska@suse.cz>
PR gcov-profile/85338
PR gcov-profile/85350
PR gcov-profile/85372
* profile.c (struct location_triplet): New.
(struct location_triplet_hash): Likewise.
(output_location): Do not output a BB that
is already recorded for a line.
(branch_prob): Use streamed_locations.
2018-07-31 Martin Liska <mliska@suse.cz>
PR gcov-profile/85370
* coverage.c (coverage_begin_function): Do not mark target
clones as artificial functions.
2018-07-31 Martin Liska <mliska@suse.cz>
PR gcov-profile/83813
PR gcov-profile/84758
PR gcov-profile/85217
PR gcov-profile/85332
* profile.c (branch_prob): Do not record GOTO expressions
for GIMPLE statements which locations are already streamed.
2018-07-31 Olivier Hainque <hainque@adacore.com>
* gcc.c (handle_spec_function): Accept a soft_matched_part
argument, as do_spec_1. Pass it down to ...
(eval_spec_function): Accept a soft_matched_part argument,
and pass it down to ...
(do_spec_2): Accept a soft_matched_part argument, and pass
it down to do_spec_1.
(do_spec_1): Pass soft_matched_part to handle_spec_function.
(handle_braces): Update call to handle_spec_function.
(driver::set_up_specs): Update calls to do_spec_2.
(compare_debug_dump_opt_spec_function): Likewise.
(compare_debug_self_opt_spec_function): Likewise.
2018-07-31 Olivier Hainque <hainque@adacore.com>
* common.opt (nolibc): New option.
* doc/invoke.texi (Link Options): Document it.
* gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
* config/alpha/linux.h: Likewise.
* config/arc/elf.h: Likewise.
* config/arm/uclinux-elf.h: Likewise.
* config/arm/unknown-elf.h: Likewise.
* config/avr/avrlibc.h: Likewise.
* config/bfin/bfin.h: Likewise.
* config/bfin/linux.h: Likewise.
* config/bfin/uclinux.h: Likewise.
* config/darwin.h: Likewise.
* config/darwin10.h: Likewise.
* config/darwin12.h: Likewise.
* config/gnu-user.h: Likewise.
* config/lm32/uclinux-elf.h: Likewise.
* config/pa/pa-hpux11.h: Likewise.
* config/pa/pa64-hpux.h: Likewise.
* config/sparc/sparc.h: Likewise.
2018-07-31 Olivier Hainque <hainque@adacore.com>
* gcc.c (getenv_spec_function): Prepend '/' to value for allowed
undefined variables.
2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86640
* config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
instead of GEN_INT.
2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
terminated string literal.
2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85160
* combine.c (is_just_move): New function.
(try_combine): Allow combining two instructions into two if neither of
the original instructions was a move.
2018-07-30 Alexander Monakov <amonakov@ispras.ru>
PR target/86673
* doc/extend.texi (Global Register Variables): Discourage use of type
qualifiers.
(Local Register Variables): Likewise.
2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86506
* hwint.h (ceil_log2): Resync with hwint.c implementation.
2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
PR target/86547
* lra-constraints.c (spill_hard_reg_in_range): When selecting the
hard_regno, make sure no insn between `from` and `to` clobbers it.
2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
(PTX_DEFAULT_RUNTIME_DIM): ... this.
(nvptx_goacc_validate_dims): Set default worker and gang dims to
PTX_DEFAULT_RUNTIME_DIM.
(nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
2018-07-29 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.c (pa_output_addr_vec): Align address table.
* config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
* config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
2018-07-27 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/constraints.md (wG constraint): Delete, no longer
used.
* config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
predicate to reflect toc fusion has been deleted.
(toc_fusion_mem_raw): Delete, no longer used.
(toc_fusion_mem_wrapped): Likewise.
* config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
fusion mask bit.
* config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
Delete, no longer used.
* config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
meant to be used for toc fusion.
(rs6000_debug_print_mode): Delete toc fusion debugging.
(rs6000_debug_reg_global): Likewise.
(rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
fusion and secondary reload support that were never used.
(rs6000_option_override_internal): Delete TOC fusion, that was only
partially defined, and it did not work unless you also used the
-mcmodel= switch.
(rs6000_legitimate_address_p): Delete TOC fusion support.
(rs6000_opt_masks): Likewise.
(fusion_wrap_memory_address): Delete function, no longer used.
(fusion_split_address); Delete TOC fusion support.
* config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
longer used with toc fusion being deleted.
(TARGET_TOC_FUSION_FP): Likewise.
* config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
UNSPEC.
(toc fusion spliter): Delete TOC fusion support.
(toc_fusionload_<mode>): Likewise.
(toc_fusionload_di): Likewise.
(fusion_gpr_load_<mode>): Delete generator function, this insn no
longer needs to be named. Rename predicate to delete TOC fusion.
(fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
(fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
(fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
(fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
(p9 fusion peephole2s): Rename predicate to delete TOC fusion.
2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (Basic PowerPC Built-in Functions Available on
ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
__int128 in built-in function prototypes.
(PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
(PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
2018-07-27 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86696
* tree-ssa-strlen.c (get_min_string_length): Handle all integer
types, including enums.
(handle_char_store): Be prepared for the above function to fail.
2018-07-26 Qing Zhao <qing.zhao@oracle.com>
* builtins.c (inline_expand_builtin_string_cmp): Disable inlining
when optimization level is lower than 2 or optimize for size.
2018-07-26 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86043
PR tree-optimization/86042
* tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
(get_string_cst_length): Rename...
(get_min_string_length): ...to this. Add argument.
(handle_char_store): Extend to handle multi-character stores by
MEM_REF.
* tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
* tree.h (initializer_zerop): Add argument.
2018-07-26 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86660
* omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
declare target to variables if they have always,{to,from,tofrom} map
kinds.
2018-07-26 Martin Liska <mliska@suse.cz>
PR lto/86548
* lto-wrapper.c: Add linker_output as prefix
for ltrans_output_file.
2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85805
* combine.c (reg_nonzero_bits_for_combine): Only use the last set
value for hard registers if that was written in the same mode.
2018-07-26 Martin Liska <mliska@suse.cz>
PR gcov-profile/86536
* gcov.c (format_gcov): Use printf format %.*f directly
and do not handle special values.
2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
* common/config/arc/arc-common.c (arc_option_optimization_table):
Update default optimizations for size.
2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (movsf_insn): Add short instruction selection.
* config/arc/constraints.md (CfZ): New constraint.
* config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
(subsf3_fpu): Likewise.
(cmpsf_fpu): Likewise.
(cmpsf_fpu_uneq): Likewise.
2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (compact_memory_operand_p): Check for uncached
accesses as well.
(arc_is_uncached_mem_p): uncached applies to both the variable and
the pointer.
2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
register names.
2018-07-25 David Malcolm <dmalcolm@redhat.com>
* optinfo-emit-json.cc (class optrecord_json_writer): Convert
field "m_scopes" from vec to auto_vec.
2018-07-25 Martin Liska <mliska@suse.cz>
* config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
return type.
2018-07-25 Richard Biener <rguenther@suse.de>
PR debug/86654
* dwarf2out.c (dwarf2out_decl): Do not handle nested functions
special wrt context_die late.
(gen_subprogram_die): Re-use DIEs in local scope.
2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86644
* hwint.c (ceil_log2): Fix comment. Return 0 for 0.
2018-07-25 Martin Liska <mliska@suse.cz>
PR middle-end/86645
* dumpfile.c: And excluded values with TDF_ALL_VALUES.
* dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
2018-07-25 Martin Liska <mliska@suse.cz>
PR sanitizer/79635
* params.def: Explain ASan abbreviation and provide
a documentation link.
2018-07-24 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86622
PR tree-optimization/86532
* builtins.h (string_length): Declare.
* builtins.c (c_strlen): Correct handling of non-constant offsets.
(check_access): Be prepared for non-constant length ranges.
(string_length): Make extern.
* expr.c (string_constant): Only handle the minor non-constant
array index. Use string_constant to compute the length of
a generic string constant.
2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/86618
* tree-vect-stmts.c (vectorizable_call): Don't take the address
of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
2018-07-24 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/86636
* json.cc (json::object::set): Fix comment. Add assertions.
(json::array::append): Move here from json.h. Add comment and an
assertion.
(json::string::string): Likewise.
* json.h (json::array::append): Move to json.cc.
(json::string::string): Likewise.
* optinfo-emit-json.cc
(optrecord_json_writer::impl_location_to_json): Assert that we
aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
wrapper around it. Expand the location once, rather than three
times.
(optrecord_json_writer::inlining_chain_to_json): Fix the check for
UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
wrappers.
(optrecord_json_writer::optinfo_to_json): Likewise, in four
places. Fix some overlong lines.
2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
* config/aarch64/aarch64-simd.md
(aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
(aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
(aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
(aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
(aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
(aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
(aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
(aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
(aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
2018-07-24 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86627
* expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
and abs_d == d, do the power of two handling if profitable.
2018-07-24 Richard Biener <rguenther@suse.de>
* match.pd: Add BIT_FIELD_REF canonicalizations.
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c/86617
* genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
* gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
terminated STRING_CST object.
2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
* config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
* config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
the elements into a register.
(rs6000_split_v4si_init_di_reg): Delete.
(rs6000_split_v4si_init): Delete.
* config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
(vsx_init_v4si): Rewrite as a define_expand.
2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
zero_extend argument from memory): New.
2018-07-22 Martin Sebor <msebor@redhat.com>
PR bootstrap/86621
* gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
diagnosing calls with unknown arguments unless -Walloca-larger-than
is restricted to less than PTRDIFF_MAX bytes.
2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
* doc/gcov.texi (Invoking Gcov): Editorial changes.
2018-07-20 David Malcolm <dmalcolm@redhat.com>
* pretty-print.c (text_info::set_location): Remove redundant
"line_table" parameter from call to rich_location::set_range.
2018-07-20 Martin Sebor <msebor@redhat.com>
PR middle-end/82063
* builtins.c (expand_builtin_alloca): Adjust.
* calls.c (alloc_max_size): Simplify.
* cgraphunit.c (cgraph_node::expand): Adjust.
* common.opt (larger_than_size, warn_frame_larger_than): Remove
variables.
(frame_larger_than_size): Same.
(-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
to take a HOST_WIDE_INT argument and accept a byte-size suffix.
Initialize.
* doc/invoke.texi (GCC Command Options): Document option arguments.
Explain byte-size arguments and suffixes.
(-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
(-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
(-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
* doc/options.texi (UInteger): Expand.
(Host_Wide_Int, ByteSize): Document new properties.
* final.c (final_start_function_1): Include sizes in an error message.
* function.c (frame_offset_overflow): Same.
* gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
(alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
Diagnose unbounded alloca calls only for limits of less than
PTRDIFF_MAX.
(alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
calls and VLA size only for limits of less than PTRDIFF_MAX. Same
for alloca(0).
(pass_walloca::execute): Adjust. Diagnose alloca calls in loops
only for limits of less than PTRDIFF_MAX.
* langhooks-def.h (lhd_handle_option): Change function argument
to HOST_WIDE_INT.
* langhooks.c (lhd_handle_option): Same.
* langhooks.h (handle_option): Same.
* opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
ByteSize flags.
(var_type, var_type_struct): Same.
(var_set): Handle ByteSize flag.
* optc-gen.awk: Add comments to output to ease debugging. Make
use of HOST_WIDE_INT where appropriate.
* opts-gen-save.awk: Use %lx to format unsigned long.
* opth-gen.awk: Change function argument to HOST_WIDE_INT.
* opts-common.c (integral_argument): Return HOST_WIDE_INT and add
arguments. Parse bytes-size suffixes.
(enum_arg_to_value): Change function argument to HOST_WIDE_INT.
(enum_value_to_arg): Same.
(decode_cmdline_option): Handle cl_host_wide_int. Adjust.
(handle_option): Adjust.
(generate_option): Change function argument to HOST_WIDE_INT.
(cmdline_handle_error): Adjust.
(read_cmdline_option): Change function argument to HOST_WIDE_INT.
(set_option): Change function argument to HOST_WIDE_INT.
(option_enabled): Handle cl_host_wide_int.
(get_option_state): Handle CLVC_SIZE.
(control_warning_option): Same.
* opts.c (common_handle_option): Change function argument to
HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
OPT_Wvla_larger_than_.
* opts.h (enum cl_var_type): Add an enumerator.
* stor-layout.c (layout_decl): Print a more meaningful warning.
* toplev.c (output_stack_usage): Adjust.
2018-07-20 Qing Zhao <qing.zhao@oracle.com>
* builtins.c (expand_builtin_memcmp): Delete the last parameter for
call to inline_expand_builtin_string_cmp.
(expand_builtin_strcmp): Likewise.
(expand_builtin_strncmp): Likewise.
(inline_string_cmp): Delete the last parameter, change char_type_node
to unsigned_char_type_node for strcmp/strncmp, add conversions to the
two operands.
(inline_expand_builtin_string_cmp): Delete the last parameter, give up
the inlining expansion on target where the type of the call has same or
narrower precision than unsigned char.
2018-07-20 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
(CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
* common.opt (fsave-optimization-record): New option.
* coretypes.h (struct kv_pair): Move here from dumpfile.c.
* doc/invoke.texi (-fsave-optimization-record): New option.
* dumpfile.c: Include "optinfo-emit-json.h".
(struct kv_pair): Move to coretypes.h.
(optgroup_options): Make non-static.
(dump_context::end_scope): Call
optimization_records_maybe_pop_dump_scope.
* dumpfile.h (optgroup_options): New decl.
* json.cc: New file.
* json.h: New file.
* optinfo-emit-json.cc: New file.
* optinfo-emit-json.h: New file.
* optinfo.cc: Include "optinfo-emit-json.h".
(optinfo::emit): Call optimization_records_maybe_record_optinfo.
(optinfo_enabled_p): Check optimization_records_enabled_p.
(optinfo_wants_inlining_info_p): Likewise.
* optinfo.h: Update comment.
* profile-count.c (profile_quality_as_string): New function.
* profile-count.h (profile_quality_as_string): New decl.
(profile_count::quality): New accessor.
* selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
and optinfo_emit_json_cc_tests.
* selftest.h (selftest::json_cc_tests): New decl.
(selftest::optinfo_emit_json_cc_tests): New decl.
* toplev.c: Include "optinfo-emit-json.h".
(compile_file): Call optimization_records_finish.
(do_compile): Call optimization_records_start.
* tree-ssa-live.c: Include optinfo.h.
(remove_unused_scope_block_p): Retain inlining information if
optinfo_wants_inlining_info_p returns true.
2018-07-20 Richard Biener <rguenther@suse.de>
PR debug/86585
* dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
to cover -flto-partition=none.
2018-07-20 Martin Liska <mliska@suse.cz>
* tree.h (DECL_LOCATION_RANGE): Remove unused macro.
(get_decl_source_range): Remove unused function.
2018-07-20 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
(struct vn_phi_s): Likewise.
(struct vn_reference_s): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
for searching the slot of an entry known to be in the hash itself.
(vn_phi_hasher::equal): Likewise.
(vn_reference_hasher::equal): Likewise.
(last_inserted_ref, last_inserted_phi, last_inserted_nary): New
globals.
(optimistic_info, current_info): Remove, keeping only valid_info.
(vn_reference_lookup_1): Remove fallback lookup.
(vn_reference_lookup_2): Likewise.
(vn_nary_op_lookup_1): Likewise.
(vn_phi_lookup): Likewise.
(vn_nary_build_or_lookup_1): Make sure to not chain the built
hash element.
(vn_reference_insert): Adjust, chain the inserted hash element
at last_inserted_ref.
(vn_reference_insert_pieces): Likewise.
(visit_reference_op_call): Likewise.
(vn_nary_op_insert_into): Chain the inserted hash element at
last_inserted_nary.
(vn_nary_op_insert_pieces): Adjust.
(vn_nary_op_insert): Likewise.
(vn_nary_op_insert_stmt): Likewise.
(vn_phi_insert): Adjust, chain the inserted hash element at
last_inserted_phi.
(process_scc): Remove clearing and copying the optimistic
table. Instead remove elements inserted during an optimistic
iteration from the single table we maintain.
(init_scc_vn): Adjust.
(free_scc_vn): Likewise.
(sccvn_dom_walker::record_cond): Likewise.
(sccvn_dom_walker::after_dom_children): Likewise.
2018-07-19 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84047
PR tree-optimization/83776
* tree-vrp.c (vrp_prop::check_mem_ref): New function.
(check_array_bounds): Call it.
2018-07-19 Martin Sebor <msebor@redhat.com>
* align.h (align_flags): Use member initialization.
2018-07-19 David Malcolm <dmalcolm@redhat.com>
* Makefile.in (OBJS): Add optinfo.o.
* coretypes.h (class symtab_node): New forward decl.
(struct cgraph_node): New forward decl.
(class varpool_node): New forward decl.
* dump-context.h: New file.
* dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
"tree-pass.h".
(refresh_dumps_are_enabled): Use optinfo_enabled_p.
(set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
(set_alt_dump_file): Likewise.
(dump_context::~dump_context): New dtor.
(dump_gimple_stmt): Move implementation to...
(dump_context::dump_gimple_stmt): ...this new member function.
Add the stmt to any pending optinfo, creating one if need be.
(dump_gimple_stmt_loc): Move implementation to...
(dump_context::dump_gimple_stmt_loc): ...this new member function.
Start a new optinfo and add the stmt to it.
(dump_gimple_expr): Move implementation to...
(dump_context::dump_gimple_expr): ...this new member function.
Add the stmt to any pending optinfo, creating one if need be.
(dump_gimple_expr_loc): Move implementation to...
(dump_context::dump_gimple_expr_loc): ...this new member function.
Start a new optinfo and add the stmt to it.
(dump_generic_expr): Move implementation to...
(dump_context::dump_generic_expr): ...this new member function.
Add the tree to any pending optinfo, creating one if need be.
(dump_generic_expr_loc): Move implementation to...
(dump_context::dump_generic_expr_loc): ...this new member
function. Add the tree to any pending optinfo, creating one if
need be.
(dump_printf): Move implementation to...
(dump_context::dump_printf_va): ...this new member function. Add
the text to any pending optinfo, creating one if need be.
(dump_printf_loc): Move implementation to...
(dump_context::dump_printf_loc_va): ...this new member function.
Start a new optinfo and add the stmt to it.
(dump_dec): Move implementation to...
(dump_context::dump_dec): ...this new member function. Add the
value to any pending optinfo, creating one if need be.
(dump_context::dump_symtab_node): New member function.
(dump_context::get_scope_depth): New member function.
(dump_context::begin_scope): New member function.
(dump_context::end_scope): New member function.
(dump_context::ensure_pending_optinfo): New member function.
(dump_context::begin_next_optinfo): New member function.
(dump_context::end_any_optinfo): New member function.
(dump_context::s_current): New global.
(dump_context::s_default): New global.
(dump_scope_depth): Delete global.
(dumpfile_ensure_any_optinfo_are_flushed): New function.
(dump_symtab_node): New function.
(get_dump_scope_depth): Reimplement in terms of dump_context.
(dump_begin_scope): Likewise.
(dump_end_scope): Likewise.
(selftest::temp_dump_context::temp_dump_context): New ctor.
(selftest::temp_dump_context::~temp_dump_context): New dtor.
(selftest::verify_item): New function.
(ASSERT_IS_TEXT): New macro.
(ASSERT_IS_TREE): New macro.
(ASSERT_IS_GIMPLE): New macro.
(selftest::test_capture_of_dump_calls): New test.
(selftest::dumpfile_c_tests): Call it.
* dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
(dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
(dump_gimple_stmt, dump_dec): Gather these related decls and add a
descriptive comment.
(dump_function, print_combine_total_stats, enable_rtl_dump_file)
(dump_node, dump_bb): Move these unrelated decls.
(class dump_manager): Add leading comment.
* optinfo.cc: New file.
* optinfo.h: New file.
2018-07-19 Michael Collison <michael.collison@arm.com>
Richard Henderson <rth@redhat.com>
* config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
(subti): Handle op1 zero.
(subvti4, usub4ti4): New.
(*sub<GPI>3_compare1_imm): New.
(sub<GPI>3_carryinCV): New.
(*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
(*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
2018-07-19 Michael Collison <michael.collison@arm.com>
Richard Henderson <rth@redhat.com>
* config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
(addti3): Create simpler code if low part is already known to be 0.
(addvti4, uaddvti4): New.
(*add<GPI>3_compareC_cconly_imm): New.
(*add<GPI>3_compareC_cconly): New.
(*add<GPI>3_compareC_imm): New.
(*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
handle constants within this pattern..
(*add<GPI>3_compareV_cconly_imm): New.
(*add<GPI>3_compareV_cconly): New.
(*add<GPI>3_compareV_imm): New.
(add<GPI>3_compareV): New.
(add<GPI>3_carryinC, add<GPI>3_carryinV): New.
(*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
(*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
with 'comparison' operator.
(*add<GPI>3_compareV_cconly_imm): Ditto.
(*add<GPI>3_compareV_cconly): Ditto.
(*add<GPI>3_compareV_imm): Ditto.
(add<GPI>3_compareV): Ditto.
(add<mode>3_carryinC): Ditto.
(*add<mode>3_carryinC_zero): Ditto.
(*add<mode>3_carryinC): Ditto.
(add<mode>3_carryinV): Ditto.
(*add<mode>3_carryinV_zero): Ditto.
(*add<mode>3_carryinV): Ditto.
2018-07-19 Michael Collison <michael.collison@arm.com>
Richard Henderson <rth@redhat.com>
* config/aarch64/aarch64-modes.def (CC_V): New.
* config/aarch64/aarch64-protos.h
(aarch64_addti_scratch_regs): Declare
(aarch64_subvti_scratch_regs): Declare.
(aarch64_expand_subvti): Declare.
(aarch64_gen_unlikely_cbranch): Declare
* config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
for signed overflow using CC_Vmode.
(aarch64_get_condition_code_1): Handle CC_Vmode.
(aarch64_gen_unlikely_cbranch): New function.
(aarch64_addti_scratch_regs): New function.
(aarch64_subvti_scratch_regs): New function.
(aarch64_expand_subvti): New function.
2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/aarch64/aarch64-option-extensions.def: New entry for profile
extension.
* config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
* doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
extension.
2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR target/83009
* config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
address check not strict.
2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
Umq with Umn.
(store_pair_lanes<mode>): Likewise.
* config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
enum value 'ADDR_QUERY_LDP_STP_N'.
* config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
(aarch64_print_address_internal): Add declaration.
(aarch64_print_ldpstp_address): Remove.
(aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
(aarch64_print_operand): Change printing of 'y'.
* config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
'true' rather than '1'.
* config/aarch64/constraints.md (Uml): Likewise.
(Uml): Rename to Umn.
(Umq): Remove.
2018-07-19 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
a trailing array.
* tree-ssa-sccvn.c: Remove alloc-pool.h use.
(vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
(vn_reference_hasher): Likewise.
(struct vn_tables_s): Remove obstack and alloc-pool members.
(vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
(vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
(vn_reference_insert): Allocate from obstack instead of from alloc-pool.
(vn_reference_insert_pieces): Likewise.
(alloc_vn_nary_op_noinit): Adjust.
(vn_nary_op_insert_stmt): Allocate phiargs in-place.
(vn_phi_eq): Adjust.
(shared_lookup_phiargs): Remove.
(vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
(vn_phi_insert): Allocate from obstack instead of from alloc-pool.
(visit_reference_op_call): Likewise.
(copy_nary, copy_phi, copy_reference): Remove.
(process_scc): Rewind the obstack when iterating. Do not
copy the elements to valid_info but just move them from one
hashtable to the other.
(allocate_vn_table): Adjust.
(free_vn_table): Likewise.
(init_scc_vn): Likewise.
(free_scc_vn): Likewise.
2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/86560
* config/i386/i386.c (rest_of_insert_endbranch): Lookup
indirect_return as function type attribute.
(ix86_attribute_table): Change indirect_return to function
type attribute.
* doc/extend.texi: Update indirect_return attribute.
2018-07-19 Aldy Hernandez <aldyh@redhat.com>
* wide-int.h (widest2_int): New.
* gimple-fold.c (arith_overflowed_p): Use it.
* tree.h (widest2_int_cst): New.
* tree-vrp.c (wide_int_binop_overflow): Rename from
vrp_int_const_binop.
Rewrite to work on trees.
(extract_range_from_multiplicative_op_1): Abstract code to...
(wide_int_range_min_max): ...here.
(wide_int_range_cross_product): ...and here.
(extract_range_from_binary_expr_1): Abstract overflow code to...
(wide_int_range_mult_wrapping): ...here.
* tree-vrp.h (wide_int_range_cross_product): New.
(wide_int_range_mult_wrapping): New.
2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
Julia Koval <julia.koval@intel.com>
* config/i386/x86-tune-costs.h (skylake_memcpy,
skylake_memset): Replace rep_prefix with unrolling for size 512.
2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/86544
* tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
comparision with EQ_EXPR in last stmt.
2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
this subsection to "PowerPC AltiVec/VSX Built-in Functions".
(PowerPC AltiVec/VSX Built-in Functions): New name for subsection
previously known as "PowerPC AltiVec Built-in Functions". Move
some material to new subsubsections "PowerPC AltiVec Built-in
Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
ISA 2.07".
(PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
(PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
(PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
(PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
2018-07-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/86557
* tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
EXACT_DIV_EXPR.
2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_function_profiler): Generate CFI.
2018-07-17 Jeff Law <law@redhat.com>
* config/arm/arm.c (get_label_padding): Update for recent
changes to label_to_alignment.
PR tree-optimization/86010
* tree-ssa-dse.c (compute_trims): Fix typo/thinko.
* config/mips/mips.c (vr4130_align_insns): Update for recent
changes to label_to_alignment.
* config/frv/frv.c (frv_label_align): Update for recent changes
to label_to_alignment.
* config/nios2/nios2.c (nios2_label_align): Update for recent
changes which dropped ALIGN_LABELS_LOG.
2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
* config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
(smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_label_align): Use align_labels instead of
deprecated align_labels_log.
2018-07-17 Richard Biener <rguenther@suse.de>
PR lto/86456
* dwarf2out.c (init_sections_and_labels): Always generate
a debug_line_str_section for early LTO debug.
(dwarf2out_finish): Reset debug_line_str_hash output early.
Bump counter for extra dwarf5 .debug_loc labels to not conflict
with fat LTO part.
(dwarf2out_early_finish): Output debug_line_str.
2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.c (preferred_la_operand_p): Do not use LA with
index register on z196 or later.
2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
* config/s390/s390.c (s390_default_align): Set default function
alignment to 16.
(s390_override_options_after_change): Call s390_default align.
(s390_option_override_internal): Call s390_default_align.
(TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
2018-07-17 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86542
* omp-low.c (create_task_copyfn): Copy over also fields corresponding
to _looptemp_ clauses, other than the first two.
2018-07-17 Martin Liska <mliska@suse.cz>
* opts.c: Do not enable OPT_falign_* for -Os.
2018-07-17 Martin Liska <mliska@suse.cz>
* align.h (MAX_CODE_ALIGN): New.
(MAX_CODE_ALIGN_VALUE): New.
* common/config/i386/i386-common.c (ix86_handle_option):
(MAX_CODE_ALIGN): Moved to align.h.
* final.c (MAX_CODE_ALIGN): Likewise.
* opts.c (parse_and_check_align_values):
(MAX_CODE_ALIGN): Likewise.
(MAX_CODE_ALIGN_VALUE): Likewise.
2018-07-17 Martin Liska <mliska@suse.cz>
* config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
in order to fulfil coding style.
* config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
* config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
* config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
* config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
* config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
* config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
* config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
* config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
(ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2018-07-17 Martin Liska <mliska@suse.cz>
* align.h: New file.
* config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
directly.
* config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
align_flags of label_to_alignment.
* config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
align_flags class.
* config/m68k/m68k.c: Do not use removed align_labels_value and
align_loops_value.
* config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
(LOOP_ALIGN): Likewise.
(LABEL_ALIGN): Likewise.
* config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
Remove not used macro.
(rs6000_loop_align): Change return type to align_flags.
(rs6000_loop_align_max_skip): Remove.
* config/rs6000/rs6000-protos.h (rs6000_loop_align):
Change return type to align_flags.
* config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
Remove not used macro.
(rs6000_loop_align): Change return type to align_flags.
(rs6000_loop_align_max_skip): Remove.
* config/rx/rx.h (JUMP_ALIGN): Wrap integer values
* config/rx/rx-protos.h (rx_align_for_label): Make it
static function.
* config/rx/rx.c (rx_align_for_label): Change return type
to align_flags.
(rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
macro definitions.
into align_flags class.
(LABEL_ALIGN): Likewise.
(LOOP_ALIGN): Likewise.
* config/s390/s390.c (s390_label_align): Use align_flags
class member.
(s390_asm_output_function_label): Likewise.
* config/sh/sh.c (sh_override_options_after_change):
Use align_flags class directly without macros.
(find_barrier): Likewise.
(barrier_align): Likewise.
(sh_loop_align): Likewise.
* config/spu/spu.c (spu_option_override):
Use align_flags_tuple::get_value instead of removed macros.
(spu_sched_init): Likewise.
* config/spu/spu.h (GTY): Likewise.
* config/visium/visium.c (visium_option_override):
Set "8" as default secondary alignment.
* config/visium/visium.h (SUBALIGN_LOG): Define to 3
in order to guarantee secondary alignment of 8.
* coretypes.h: Include align.h header file.
* doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
* doc/tm.texi.in: Likewise.
* final.c (struct label_alignment): Remove not used structure.
(LABEL_ALIGN): Change type to align_flags.
(LOOP_ALIGN): Likewise.
(JUMP_ALIGN): Likewise.
(default_loop_align_max_skip): Remove.
(default_label_align_max_skip): Likewise.
(default_jump_align_max_skip): Likewise.
(default_label_align_after_barrier_max_skip):
(LABEL_TO_ALIGNMENT): Change to access label_align vector.
(LABEL_TO_MAX_SKIP): Remove.
(label_to_alignment): Return align_flags type instead of integer.
(label_to_max_skip): Remove.
(align_fuzz): Use align_flags type.
(compute_alignments): Use align_flags type and use align_flags::max
to combine multiple alignments.
(grow_label_align): Grow vec instead of C array.
(update_alignments): Assign just LABEL_TO_ALIGNMENT.
(shorten_branches): Use align_flags type and use align_flags::max
to combine multiple alignments.
(final_scan_insn_1): Remove usage of secondary alignment that comes
from label alignment, but instead use proper secondary alignment
which is computed in grow_label_align.
* flags.h (struct align_flags_tuple): Move to align.h.
(struct align_flags): Likewise.
(state_align_loops): Rename to align_loops.
(state_align_jumps): Rename to align_jumps.
(state_align_labels): Rename to align_labels.
(state_align_functions): Rename to align_functions.
(align_loops_log): Remove.
(align_jumps_log): Remove.
(align_labels_log): Remove.
(align_functions_log): Remove.
(align_loops_max_skip): Remove.
(align_jumps_max_skip): Remove.
(align_labels_max_skip): Remove.
(align_functions_max_skip): Remove.
(align_loops_value): Remove.
(align_jumps_value): Remove.
(align_labels_value): Remove.
(align_functions_value): Remove.
* output.h (label_to_alignment): Change return type to align_flags.
(label_to_max_skip): Remove.
* target.def: Remove loop_align_max_skip, label_align_max_skip,
jump_align_max_skip macros.
* targhooks.h (default_loop_align_max_skip): Remove.
(default_label_align_max_skip): Likewise.
(default_jump_align_max_skip): Likewise.
(default_label_align_after_barrier_max_skip): Remove.
* toplev.c (read_log_maxskip): Use ::normalize function.
(parse_N_M): Remove not used argument and also call ::normalize.
(parse_alignment_opts): Do not pass unused arguments.
* varasm.c (assemble_start_function): Use directly align_functions
instead of removed macros.
* system.h: Do not poison removed macros.
2018-07-17 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86539
* gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
and cond temporaries don't have reference type if iterator has
pointer type. For init use &for_pre_body instead of pre_p if
for_pre_body is non-empty.
2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
double-double modes to SFmode directly directly.
(trunc<mode>sf2_fprs): Delete.
2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
for conversions between IFmode and the decimal floating point modes.
(init_float128_ieee): Use the correct names for conversions between
KFmode and the decimal floating point modes.
2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
for the conversions between TDmode and IFmode.
(init_float128_ieee): Use more correct names for the conversions
between TDmode and KFmode.
2018-07-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/86526
* builtins.c (expand_builtin_memcmp): Formatting fixes.
(inline_expand_builtin_string_cmp): Likewise.
(inline_string_cmp): Likewise. Use c_readstr instead of
builtin_memcpy_read_str. Add unit_mode temporary.
2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR middle-end/86528
* builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
* expr.c (string_constant): Fix the element size of ARRAY_TYPE.
2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC AltiVec Built-in Functions):
Alphabetize prototypes of built-in functions, separating out
built-in functions that are listed in this section but should be
described elsewhere.
2018-07-16 Uros Bizjak <ubizjak@gmail.com>
PR target/86511
* expmed.c (emit_store_flag): Do not emit setcc followed by a
conditional move when trapping comparison was split to a
non-trapping one (and vice versa).
2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_function_profiler): Generate nops
instead of profiler call sequences.
* config/s390/s390.opt: Add the new option.
2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_function_profiler): Generate
__mcount_loc section.
* config/s390/s390.opt: Add the new option.
2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
* common.opt: Add the new warning.
* config/s390/s390.c (s390_function_profiler): Emit "brasl
%r0,__fentry__" when -mfentry is specified.
(s390_option_override_internal): Disallow -mfentry for 31-bit
CPUs.
* config/s390/s390.opt: Add the new option.
2018-07-16 Richard Biener <rguenther@suse.de>
PR lto/86523
* dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
for function-local FUNCTION_DECL and RESULT_DECL immediately.
2018-07-16 Martin Liska <mliska@suse.cz>
PR ipa/86529
* ipa-pure-const.c (malloc_candidate_p): Revert ::get
to ::get_create.
2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arcHS.md: Update ARCHS scheduling rules.
2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
for ARCHS4x.
* config/arc/arc-cpus.def (hs4x): New cpu.
(hs4xd): Likewise.
* config/arc/arc-tables.opt: Regenerate.
* config/arc/arc.c (arc_sched_issue_rate): New function.
(TARGET_SCHED_ISSUE_RATE): Define.
(TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
* config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
fpu_cvt.
(attr tune): Add ARCHS4x tune values.
(attr tune_dspmpy): Define.
(*tst): Correct instruction type.
* config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
* config/arc/arcHS4x.md: New file.
* config/arc/fpu.md: Update instruction type attributes.
* config/arc/t-multilib: Regenerate.
2018-07-16 Tom de Vries <tdevries@suse.de>
PR debug/86455
* var-tracking.c (vt_initialize): Fix pre_dec handling.
2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
early clobber.
2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/86514
* tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
conversion to a boolean type from a type with greater precision.
2018-07-16 Tom de Vries <tdevries@suse.de>
* var-tracking.c (vt_initialize): Print adjusted insn slim if
dump_flags request TDF_SLIM.
2018-07-16 Aldy Hernandez <aldyh@redhat.com>
* fold-const.c (int_const_binop_1): Abstract...
(wide_int_binop): ...wide int code here.
(poly_int_binop): ...poly int code here.
Abstract the rest of int_const_binop_1 into int_const_binop.
* fold-const.h (wide_int_binop): New.
* tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
Remove useless PLUS/MINUS_EXPR case.
(zero_nonzero_bits_from_vr): Move wide int code...
(zero_nonzero_bits_from_bounds): ...here.
(extract_range_from_binary_expr_1): Move mask optimization code...
(range_easy_mask_min_max): ...here.
* tree-vrp.h (zero_nonzero_bits_from_bounds): New.
(range_easy_mask_min_max): New.
2018-07-15 Jeff Law <law@redhat.com>
PR target/85993
* config/sh/sh.c (output_mi_thunk): Remove dead conditional
block.
2018-07-14 Jim Wilson <jimw@sifive.com>
* config/riscv/linux.h (TARGET_ASM_FILE_END): New.
2018-07-14 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
2018-07-13 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (copy_function_or_variable): Dump info about
copying section.
2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
Steve Munroe <munroesj52@gmail.com>
* config/rs6000/emmintrin.h (_mm_and_si128): New function.
(_mm_andnot_si128): Likewise.
(_mm_or_si128): Likewise.
(_mm_xor_si128): Likewise.
2018-07-13 Qing Zhao <qing.zhao@oracle.com>
PR middle-end/78809
* builtins.c (expand_builtin_memcmp): Inline the calls first
when result_eq is false.
(expand_builtin_strcmp): Inline the calls first.
(expand_builtin_strncmp): Likewise.
(inline_string_cmp): New routine. Expand a string compare
call by using a sequence of char comparison.
(inline_expand_builtin_string_cmp): New routine. Inline expansion
a call to str(n)cmp/memcmp.
* doc/invoke.texi (--param builtin-string-cmp-inline-length):
New option.
* params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
2018-07-13 Richard Earnshaw <rearnsha@arm.com>
* config/arm/driver-arm.c: Include arm-native.h.
(host_detect_local_cpu): Use auto-generated data tables.
(vendors, arm_cpu_table): Delete. Move part information to ...
* config/arm/arm-cpus.in: ... here.
* config/arm/parsecpu.awk (gen_native): New function.
(vendor, part): New CPU fields.
(END): Add support for building the native CPU detection tables.
* config/arm/t-arm (arm-native.h): Add build rule.
(driver-arm.o): Add dependency on arm-native.h.
2018-07-13 Richard Biener <rguenther@suse.de>
PR middle-end/85974
* match.pd (addr1 - addr2): Allow either of the operand to
have a conversion.
2018-07-13 Tom de Vries <tdevries@suse.de>
* tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
in remap_ssa_name.
2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
* config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
arrays instead of numbered variables.
2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
* config/sparc/sparc.c (sparc_compute_frame_size): Make static.
2018-07-13 Richard Biener <rguenther@suse.de>
PR debug/86452
* dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
instead of get_context_die.
2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
Richard Biener <rguenther@suse.de>
PR middle-end/86489
* tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
that the loop latch destination where phi is defined.
2018-07-12 Kito Cheng <kito.cheng@gmail.com>
* config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
(riscv_expand_epilogue): Add assertion to check interrupt mode.
(riscv_set_current_function): Extract getting interrupt type to new
function.
(riscv_get_interrupt_type): New function.
(riscv_merge_decl_attributes): New function, checking interrupt type is
same.
(TARGET_MERGE_DECL_ATTRIBUTES): Define.
2018-07-12 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
directive.
2018-07-12 Paul Koning <ni1d@arrl.net>
* doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
zero reference, add doloop_end instead.
* doc/md.texi (decrement_and_branch_until_zero): Remove.
(Looping patterns): Remove decrement_and_branch_until_zero. Add
detail for doloop_end.
2018-07-12 Martin Sebor <msebor@redhat.com>
PR c/86453
* attribs.c (decl_attributes): Reject conflicting attributes before
calling attribute handlers.
2018-07-12 Jan Hubicka <hubicka@ucw.cz>
* dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
parameter.
(gcc::dump_manager::get_dump_file_name): likewise.
(dump_begin): Likewise.
* dumpfile.h (dump_begin): Update prototype.
(gcc::dump_manager::get_dump_file_name,
gcc::dump_manager::get_dump_file_name): Update prototype.
2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
* internal-fn.h (vectorizable_internal_fn_p): New function.
* tree-vect-slp.c (compatible_calls_p): Likewise.
(vect_build_slp_tree_1): Remove nops argument. Handle calls
to internal functions.
(vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
* fold-const.h (inverse_conditions_p): Declare.
* fold-const.c (inverse_conditions_p): New function.
* match.pd: Use inverse_conditions_p. Add folds of view_converts
that test the inverse condition of a conditional internal function.
* internal-fn.h (vectorized_internal_fn_supported_p): Declare.
* internal-fn.c (internal_fn_mask_index): Handle conditional
internal functions.
(vectorized_internal_fn_supported_p): New function.
* tree-if-conv.c: Include internal-fn.h and fold-const.h.
(any_pred_load_store): Replace with...
(need_to_predicate): ...this new variable.
(redundant_ssa_names): New variable.
(ifcvt_can_use_mask_load_store): Move initial checks to...
(ifcvt_can_predicate): ...this new function. Handle tree codes
for which a conditional internal function exists.
(if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
instead of ifcvt_can_use_mask_load_store. Update after variable
name change.
(predicate_load_or_store): New function, split out from
predicate_mem_writes.
(check_redundant_cond_expr): New function.
(value_available_p): Likewise.
(predicate_rhs_code): Likewise.
(predicate_mem_writes): Rename to...
(predicate_statements): ...this. Use predicate_load_or_store
and predicate_rhs_code.
(combine_blocks, tree_if_conversion): Update after above name changes.
(ifcvt_local_dce): Handle redundant_ssa_names.
* tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
general conditional functions.
* tree-vect-stmts.c (vectorizable_call): Likewise.
2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* internal-fn.h (can_interpret_as_conditional_op_p): Declare.
* internal-fn.c (can_interpret_as_conditional_op_p): New function.
* tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
plus and minus and convert them into IFN_COND_FMA-based sequences.
(convert_mult_to_fma): Handle conditional plus and minus.
2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
* doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
* optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
(cond_fnms_optab): New optabs.
* internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
internal functions.
(FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
* internal-fn.h (get_conditional_internal_fn): Declare.
(get_unconditional_internal_fn): Likewise.
* internal-fn.c (cond_ternary_direct): New macro.
(expand_cond_ternary_optab_fn): Likewise.
(direct_cond_ternary_optab_supported_p): Likewise.
(FOR_EACH_COND_FN_PAIR): Likewise.
(get_conditional_internal_fn): New function.
(get_unconditional_internal_fn): Likewise.
* gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
(gimple_match_op::gimple_match_op): Add a new overload for 5
operands.
(gimple_match_op::set_op): Likewise.
(gimple_resimplify5): Declare.
* genmatch.c (decision_tree::gen): Generate simplifications for
5 operands.
* gimple-match-head.c (gimple_simplify): Define an overload for
5 operands. Handle calls with 5 arguments in the top-level overload.
(convert_conditional_op): Handle conversions from unconditional
internal functions to conditional ones.
(gimple_resimplify5): New function.
(build_call_internal): Pass a fifth operand.
(maybe_push_res_to_seq): Likewise.
(try_conditional_simplification): Try converting conditional
internal functions to unconditional internal functions.
Handle 3-operand unconditional forms.
* match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
Define ternary equivalents of the current rules for binary conditional
internal functions.
* config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
ternary operations.
* config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
(UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
(optab): Handle them.
(SVE_COND_FP_TERNARY): New int iterator.
(sve_fmla_op, sve_fmad_op): New int attributes.
* config/aarch64/aarch64-sve.md (cond_<optab><mode>)
(*cond_<optab><mode>_2, *cond_<optab><mode_4)
(*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
* target.def (preferred_else_value): New target hook.
* doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
* doc/tm.texi: Regenerate.
* targhooks.h (default_preferred_else_value): Declare.
* targhooks.c (default_preferred_else_value): New function.
* internal-fn.h (conditional_internal_fn_code): Declare.
* internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
(get_conditional_internal_fn): Use it.
(conditional_internal_fn_code): New function.
* gimple-match.h (gimple_match_cond): New struct.
(gimple_match_op): Add a cond member function.
(gimple_match_op::gimple_match_op): Update all forms to take a
gimple_match_cond.
* genmatch.c (expr::gen_transform): Use the same condition as res_op
for the suboperation, but don't specify a particular else_value.
* tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
(visit_nary_op, visit_reference_op_load): Pass
gimple_match_cond::UNCOND to the gimple_match_op constructor.
* gimple-match-head.c: Include tree-eh.h
(convert_conditional_op): New function.
(maybe_resimplify_conditional_op): Likewise.
(gimple_resimplify1): Call maybe_resimplify_conditional_op.
(gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
(gimple_resimplify4): Likewise.
(maybe_push_res_to_seq): Return null for conditional operations.
(try_conditional_simplification): New function.
(gimple_simplify): Call it. Pass conditions to the gimple_match_op
constructor.
* match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
IFN_COND_* call.
* config/aarch64/aarch64.c (aarch64_preferred_else_value): New
function.
(TARGET_PREFERRED_ELSE_VALUE): Redefine.
2018-07-12 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
DECL_FCONTEXT
(hash_tree): Do not hash DECL_FCONTEXT
* tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
Do not stream DECL_FCONTEXT.
* tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
* tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
2018-07-12 Richard Biener <rguenther@suse.de>
PR debug/86462
* dwarf2out.c (gen_block_die): Only output blocks when they have
at least one !DECL_IGNORED_P variable.
2018-07-12 Richard Biener <rguenther@suse.de>
PR target/84829
* config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
Remove -mieee-fp handling.
2018-07-12 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
left-over from last patch.
2018-07-12 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/86492
* gimple-ssa-store-merging.c
(imm_store_chain_info::coalesce_immediate_stores): Call
check_no_overlap even for the merge_overlapping case. Formatting fix.
2018-07-12 Richard Biener <rguenther@suse.de>
PR middle-end/86479
* fold-const.c (fold_binary_op_with_conditional_arg): Do not
move possibly trapping operations into the conditional.
2018-07-12 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
(vn_lookup_simplify_result): Remove recursion limit applied
here.
(vn_nary_build_or_lookup_1): Adjust.
(try_to_simplify): Likewise.
* gimple-match-head.c (gimple_resimplify1): Instead apply one
here.
(gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
(gimple_resimplify4): Likewise.
2018-07-11 Jakub Jelinek <jakub@redhat.com>
* config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
Use __mmask64 type instead of __mmask8 for __M argument.
* config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
_mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
__U argument.
(_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
__mmask16 for __M argument.
(_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
_mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
to __mmask16 instead of __mmask8.
* config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
_mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
_mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
_mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
instead of __mmask16 for __U argument.
* config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
__mmask16 instead of __mmask8 for __U argument.
(_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
__U argument.
(_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
__mmask16.
(_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
argument.
(_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
__U argument.
(_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
__mmask16.
(_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
of __mmask16.
(_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
__U argument.
(_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
__U argument.
(_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
__U argument.
(_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
__U argument.
(_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
_mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
return type as well as __M argument type and all casts from __mmask8
to __mmask32.
(_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
_mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
return type as well as __M argument type and all casts from __mmask8
to __mmask16.
(_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
_mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
return type as well as __M argument type and all casts from __mmask8
to __mmask32.
(_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
_mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
return type as well as __M argument type and all casts from __mmask8
to __mmask16.
* config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
_mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
__mmask16.
2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
* config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
_mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
for __U argument.
2018-07-11 Paul Koning <ni1d@arrl.net>
* doc/md.texi (define_subst): Document how multiple occurrences of
the same argument in the replacement pattern are handled.
2018-07-11 Paul Koning <ni1d@arrl.net>
* doc/extend.texi (Common Variable Attributes): Move "mode" into
alphabetical order.
(Common Type Attributes): Add "mode" attribute.
2018-07-11 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
stream DECL_ORIGINAL_TYPE.
(DFS::DFS_write_tree_body): Drop hack handling local external decls.
(hash_tree): Do not walk DECL_ORIGINAL_TYPE.
* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
Do not walk original type.
* tree-streamer-out.c (streamer_write_chain): Drop hack handling
external decls.
(write_ts_decl_non_common_tree_pointers): Do not stream
DECL_ORIGINAL_TYPE
* tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
(find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
2018-07-11 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
thread twice from the same starting edge.
2018-07-11 Aldy Hernandez <aldyh@redhat.com>
* vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
* gimple.c (gimple_call_nonnull_result_p): ...here...
(gimple_call_nonnull_arg): ...and here.
* gimple.h (gimple_call_nonnull_result_p): New.
(gimple_call_nonnull_arg): New.
2018-07-11 Richard Earnshaw <rearnsha@arm.com>
* config/arm/arm-cpus.in: Move information from fpu field of each
cpu definition to the isa field.
* config/arm/parsecpu.awk (fpu): Delete match rule.
(gen_comm_data): Don't add bits from the CPU's FPU entry.
2018-07-11 Richard Biener <rguenther@suse.de>
PR debug/86457
* dwarf2out.c (init_sections_and_labels): Use
output_asm_line_debug_info consistently.
(dwarf2out_early_finish): Likewise.
(dwarf2out_finish): Remove DW_AT_stmt_list from early generated
type units.
2018-07-11 Richard Biener <rguenther@suse.de>
* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
Rework father_bb setting in a way to avoid propagating constants
multiple times on a loop body.
2018-07-10 Mark Wielaard <mark@klomp.org>
PR debug/86459
* dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
2018-07-10 Richard Biener <rguenther@suse.de>
* hash-map.h (hash_map::iterator::operator*): Return
references to key and value.
2018-07-10 Jakub Jelinek <jakub@redhat.com>
PR c++/86443
* gimplify.c (find_combined_omp_for): Add DATA argument, in addition
to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
(gimplify_omp_for): For composite loops, move outer
OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
TREE_LIST for both the original class iterator and the "last" helper
var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
loop, remember has_decl_expr from outer composite loops for the
innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
2018-07-09 Martin Sebor <msebor@redhat.com>
PR middle-end/77357
PR middle-end/86428
* builtins.c (c_strlen): Avoid out-of-bounds warnings when
accessing implicitly initialized array elements.
* expr.c (string_constant): Handle string initializers of
character arrays within aggregates.
* gimple-fold.c (fold_array_ctor_reference): Add argument.
Store element offset. As a special case, handle zero size.
(fold_nonarray_ctor_reference): Same.
(fold_ctor_reference): Add argument. Store subobject offset.
* gimple-fold.h (fold_ctor_reference): Add argument.
2018-07-09 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.c (pdp11_addr_cost): New function.
(pdp11_insn_cost): New function.
(pdp11_md_asm_adjust): New function.
(TARGET_INVALID_WITHIN_DOLOOP): Define.
(pdp11_rtx_costs): Update to match machine better.
(output_addr_const_pdp11): Correct format mismatch warnings.
* config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
* config/pdp11/pdp11.md: General change to add base_cost and/or
length attributes for use by new pdp11_insn_cost function.
(MIN_BRANCH): Correct definition.
(MIN_SOB): Ditto.
(doloop_end): Use standard pattern name for looping pattern.
(doloop_end_nocc): New.
(movsf): Add another constraint alternative.
(zero_extendqihi2): Add constraint alternatives for not in place
extend.
(zero_extendhisi2): Remove.
(shift patterns): Add CC handling variants.
(bswaphi2): New.
(bswapsi2): New.
(rothi3): New.
(define_peephole2): New peephole to recognize mov that sets CC for
subsequent test.
2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
wi::add.
2018-07-09 Jakub Jelinek <jakub@redhat.com>
PR c/86420
* real.c (real_nextafter): Return true if result is denormal.
2018-07-09 Martin Liska <mliska@suse.cz>
* common.opt: Add back wrongly removed attribute.
2018-07-09 Richard Biener <rguenther@suse.de>
PR debug/86413
* dwarf2out.c (gen_block_die): For an early generated DIE
always output high/low PC attributes.
2018-07-09 Tom de Vries <tdevries@suse.de>
* cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
* tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
onto VAR_DECL with abstract origin.
2018-07-07 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
2018-07-07 Tom de Vries <tdevries@suse.de>
* tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
2018-07-07 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (vrp_int_const_binop): Change overflow type to
overflow_type.
(combine_bound): Use wide-int overflow calculation instead of
rolling our own.
* calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
overflow_type.
* fold-const.c (int_const_binop_2): Same.
(extract_muldiv_1): Same.
(fold_div_compare): Same.
(fold_abs_const): Same.
* match.pd: Same.
* poly-int.h (add): Same.
(sub): Same.
(neg): Same.
(mul): Same.
* predict.c (predict_iv_comparison): Same.
* profile-count.c (slow_safe_scale_64bit): Same.
* simplify-rtx.c (simplify_const_binary_operation): Same.
* tree-chrec.c (tree_fold_binomial): Same.
* tree-data-ref.c (split_constant_offset_1): Same.
* tree-if-conv.c (idx_within_array_bound): Same.
* tree-scalar-evolution.c (iv_can_overflow_p): Same.
* tree-ssa-phiopt.c (minmax_replacement): Same.
* tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
* tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
* vr-values.c (vr_values::adjust_range_with_scev): Same.
* wide-int.cc (wi::add_large): Same.
(wi::mul_internal): Same.
(wi::sub_large): Same.
(wi::divmod_internal): Same.
* wide-int.h: Change overflow type to overflow_type for neg, add,
mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
mod_trunc, mod_ceil, mod_round, add_large, sub_large,
mul_internal, divmod_internal.
(overflow_type): New enum.
(accumulate_overflow): New.
2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
* tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
(tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
* tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
argument is checked for zero before entering loop, avoid checking again.
2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
* gimplify.h (generic_expr_could_trap_p): Set as global function.
* gimplify.h (generic_expr_could_trap_p): Likwise.
* tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
2018-07-06 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/86401
* fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
((A & N) + B) & M -> (A + B) & M etc. optimization into ...
(fold_bit_and_mask): ... here. New helper function for match.pd.
* fold-const.h (fold_bit_and_mask): Declare.
* match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
2018-07-06 Peter Bergner <bergner@linux.ibm.com>
PR target/86324
* target.def (translate_mode_attribute): New hook.
* targhooks.h (default_translate_mode_attribute): Declare.
* targhooks.c (default_translate_mode_attribute): New function.
* doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
* doc/tm.texi: Regenerate.
* config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
(rs6000_translate_mode_attribute): New function.
2018-07-06 Paul Koning <ni1d@arrl.net>
* doc/md.texi (define_split): Document DONE and FAIL.
(define_peephole2): Ditto.
2018-07-05 Jeff Law <law@redhat.com>
PR tree-optimization/86010
* tree-ssa-dse.c (compute_trims): More aggressively trim at
both the head and tail of mem* and str* calls.
2018-07-05 Jim Wilson <jimw@sifive.com>
* config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
* config/aarch64/aarch64-simd.md: correct flags text for
MIN_EXPR replacement.
2018-07-05 James Clarke <jrtc27@jrtc27.com>
* configure: Regenerated.
2018-07-05 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
float argument to VSX_BUILTIN_DOUBLEH_V4SF.
Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
VSX_BUILTIN_DOUBLEL_V4SF.
2018-07-05 Martin Sebor <msebor@redhat.com>
PR c++/86400
* tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
than its domain to compute its the upper bound of a char array.
2018-07-05 Nathan Sidwell <nathan@acm.org>
Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
* doc/cpp.texi: Update comment.
* doc/tm.texi: Rebuilt.
* doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
(SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
* doc/extend.texi (Backwards Compatibility): Clarify it is system
headers affected by extern "C".
* system.h: Poison NO_IMPLICIT_EXTERN_C.
* config/alpha/alpha.h, config/arm/uclinux-elf.h,
config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
config/sparc/openbsd64.h, config/sparc/sp-elf.h,
config/sparc/sp64-elf.h, config/spu/spu.h,
config/stormy16/stormy16.h, config/v850/v850.h,
config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
define NO_IMPLICIT_EXTERN_C.
* config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
2018-07-05 Tamar Christina <tamar.christina@arm.com>
PR target/84711
* config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
instead of GET_MODE_SIZE when comparing Units.
2018-07-05 Tamar Christina <tamar.christina@arm.com>
PR target/84711
* rtlanal.c (set_noop_p): Constrain on mode change,
include hard-reg-set.h
2018-07-05 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
2018-07-05 Jakub Jelinek <jakub@redhat.com>
Revert
2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/84250
* config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
libasan.
* gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/84250
* config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
libasan.
* gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/86380
* expmed.c (choose_multiplier): Fix incorrect comparison with mask.
2018-07-04 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_binary_expr_1): Initialize
neg_*_op* variables.
2018-07-04 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c: Define
max_ratio_for_speed and max_ratio_for_size constants.
2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
Martin Liska <mliska@suse.cz>
PR middle-end/66240
PR target/45996
PR c/84100
* common.opt: Rename align options with 'str_' prefix.
* common/config/i386/i386-common.c (set_malign_value): New
function.
(ix86_handle_option): Use it to set -falign-* options/
* config/aarch64/aarch64-protos.h (struct tune_params): Change
type from int to string.
* config/aarch64/aarch64.c: Update default values from int
to string.
* config/alpha/alpha.c (alpha_override_options_after_change):
Likewise.
* config/arm/arm.c (arm_override_options_after_change_1): Likewise.
* config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
max skip conditionally.
* config/i386/freebsd.h (SUBALIGN_LOG): New.
(ASM_OUTPUT_MAX_SKIP_ALIGN): Print
max skip conditionally.
* config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
max skip conditionally.
* config/i386/gnu-user.h (SUBALIGN_LOG): New.
(ASM_OUTPUT_MAX_SKIP_ALIGN): Print
max skip conditionally.
* config/i386/i386.c (struct ptt): Change type from int to
string.
(ix86_default_align): Set default values.
* config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
max skip conditionally.
* config/i386/iamcu.h (SUBALIGN_LOG): New.
(ASM_OUTPUT_MAX_SKIP_ALIGN):
* config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
* config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
max skip conditionally.
* config/i386/openbsdelf.h (SUBALIGN_LOG): New.
(ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
* config/i386/x86-64.h (SUBALIGN_LOG): New.
(ASM_OUTPUT_MAX_SKIP_ALIGN): Print
max skip conditionally.
(ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
* config/ia64/ia64.c (ia64_option_override): Set default values
for alignment options.
* config/m68k/m68k.c: Handle new str_align_* options.
* config/mips/mips.c (mips_set_compression_mode): Change
type of constants.
(mips_option_override): Set default values for options.
* config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
Likewise.
* config/rs6000/rs6000.c (rs6000_option_override_internal):
Likewise.
* config/rx/rx.c (rx_option_override): Likewise.
* config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
(LABEL_ALIGN): Use align_labels_log.
(LOOP_ALIGN): Use align_loops_align.
* config/s390/s390.c (s390_asm_output_function_label): Use new
macros.
* config/sh/sh.c (sh_override_options_after_change):
Change type of constants.
* config/spu/spu.c (spu_sched_init): Likewise.
* config/sparc/sparc.c (sparc_option_override): Set default
values for options.
* config/visium/visium.c (visium_option_override): Likewise.
* config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
emit p2align format with last argument if it's not needed.
* doc/invoke.texi: Document extended format of -falign-*.
* final.c: Use align_labels alignment.
* flags.h (struct target_flag_state): Change type to use
align_flags.
(struct align_flags_tuple): New.
(struct align_flags): Likewise.
(align_loops_log): Redefine macro to use new types.
(align_loops_max_skip): Redefine macro to use new types.
(align_jumps_log): Redefine macro to use new types.
(align_jumps_max_skip): Redefine macro to use new types.
(align_labels_log): Redefine macro to use new types.
(align_labels_max_skip): Redefine macro to use new types.
(align_functions_log): Redefine macro to use new types.
(align_loops): Redefine macro to use new types.
(align_jumps): Redefine macro to use new types.
(align_labels): Redefine macro to use new types.
(align_functions): Redefine macro to use new types.
(align_functions_max_skip): Redefine macro to use new types.
(align_loops_value): New macro.
(align_jumps_value): New macro.
(align_labels_value): New macro.
(align_functions_value): New macro.
* function.c (invoke_set_current_function_hook): Propagate
alignment values from flags to global variables default in
topleev.h.
* ipa-icf.c (sem_function::equals_wpa): Use
cl_optimization_option_eq instead of memcmp.
* lto-streamer.h (cl_optimization_stream_out): Support streaming
of string types.
(cl_optimization_stream_in): Likewise.
* optc-save-gen.awk: Support strings in cl_optimization.
* opth-gen.awk: Likewise.
* opts.c (finish_options): Remove error checking of invalid
value ranges.
(MAX_CODE_ALIGN): Remove.
(MAX_CODE_ALIGN_VALUE): Likewise.
(parse_and_check_align_values): New function.
(check_alignment_argument): Likewise.
(common_handle_option): Use check_alignment_argument.
* opts.h (parse_and_check_align_values): Declare.
* toplev.c (init_alignments): Remove.
(read_log_maxskip): New.
(parse_N_M): Likewise.
(parse_alignment_opts): Likewise.
(backend_init_target): Remove usage of init_alignments.
* toplev.h (parse_alignment_opts): Declare.
* tree-streamer-in.c (streamer_read_tree_bitfields): Add new
argument.
* tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
* tree.c (cl_option_hasher::equal): New.
* varasm.c: Use new global macros.
2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
* config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
Use a simpler align directive also if MAXSKIP = ALIGN-1.
* config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
* config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
* config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
* config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
* config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
* config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
* config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
* config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
* config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
2018-07-04 Martin Liska <mliska@suse.cz>
Jonathan Wakely <jwakely@redhat.com>
* coverage.c: Use correct type.
* doc/invoke.texi: Language correction.
2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
PR target/85620
* config/i386/i386.c (rest_of_insert_endbranch): Also generate
ENDBRANCH for non-tail call which may return via indirect branch.
* doc/extend.texi: Document indirect_return attribute.
2018-07-03 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86274
* gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
precondition.
(format_floating): Correct handling of infinities and NaNs.
2018-07-03 Martin Sebor <msebor@redhat.com>
* print-tree.c (print_real_cst): New function.
(print_node_brief): Call it.
(print_node): Ditto.
2018-07-03 Jeff Law <law@redhat.com>
* config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
into a single pattern.
* config/h8300/h8300.md (ors code_iterator): New.
(bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
a single pattern and single splitter.
(bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
(iorqi3_1, xorqi3_1): Likewise.
(iorqi3, xorqi3 expanders): Similarly.
* config/h8300/h8300.md (movmd_internal_normal): Consolidated with
(movmd_internal) into a single pattern using the P mode iterator.
(movmd splitters): Similarly.
(stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
(movsd splitters): Similarly.
* config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
ADDB, ADDW and ADDL into a single ADD attribute which selects the
right table based on the size of the operand.
* config/h8300/h8300.md (length_table): Corresponding changes. All
references to "addb", "addw" and "addl" changed to "add".
(btst patterns): Merge two variants into a single pattern.
(tstqi, tsthi): Likewise.
(addhi3_incdec, addsi3_incdec): Likewise.
(subhi3_h8300hs, subsi3_h8300hs): Likewise.
(mulhi3, mulsi3): Likewise.
(udivhi3, udivsi3): Likewise.
(divhi3, divsi3): Likewise.
(andorqi3, andorhi3, andorsi3): Likewise.
2018-07-03 Uros Bizjak <ubizjak@gmail.com>
PR target/85694
* config/i386/sse.md (uavg<mode>3_ceil): New expander.
(<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/85694
* config/aarch64/iterators.md (HADD, RHADD): New int iterators.
(u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
UNSPEC_URHADD.
* config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
(<u>avg<mode>3_ceil): New patterns.
2018-07-03 David Malcolm <dmalcolm@redhat.com>
* gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
scan-tree-dump directive.
* gcc.dg/vect/slp-perm-2.c: Likewise.
* gcc.dg/vect/slp-perm-3.c: Likewise.
* gcc.dg/vect/slp-perm-5.c: Likewise.
* gcc.dg/vect/slp-perm-6.c: Likewise.
* gcc.dg/vect/slp-perm-7.c: Likewise.
* gcc.dg/vect/slp-perm-8.c: Likewise.
2018-07-03 Marek Polacek <polacek@redhat.com>
PR middle-end/86202
* gimple-fold.c (size_must_be_zero_p): Check the type of the size.
2018-07-03 Richard Biener <rguenther@suse.de>
PR ipa/86389
* tree-ssa-structalias.c (find_func_clobbers): Properly
handle indirect calls.
2018-07-03 Jeff Law <law@redhat.com>
* config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
(shifts): New code iterator.
(movqi, movhi, movsi, movsf expanders): Consolidate into a single
expander. Fix HImode handling on H8/SX.
(addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
(subqi3, subhi3, subsi3 expanders): Likewise.
(andqi3, andhi3, andsi3 expanders): Likewise.
(iorqi3, iorhi3, iorsi3 expanders): Likewise.
(xorqi3, xorhi3, xorsi3 expanders): Likewise.
(negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
(one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
(zero_extendqihi2, zero_extendqisi2): Likewise.
(extendqihi2, extendqisi2): Likewise.
(rotlqi3, rotlhi3, rotlsi3): Likewise.
(neghi2_h8300, negsi2_h8300): Likewise for these patterns.
(rotlqi3_1, rotlhi3_1): Likewise.
(logicalhi3_sn, logicalsi3_sn): Likewise.
(logicalhi3, logicalsi3): Likewise.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_recog_rotate_pattern)
(vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
(vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
(adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
type to append_pattern_def_seq instead of creating a stmt_vec_info
directly.
(build_mask_conversion): Likewise. Remove vinfo argument.
(vect_add_conversion_to_patterm): Likewise, renaming to...
(vect_add_conversion_to_pattern): ...this.
(vect_recog_mask_conversion_pattern): Update call to
build_mask_conversion. Pass the vector type to
append_pattern_def_seq here too.
(vect_recog_gather_scatter_pattern): Update call to
vect_add_conversion_to_pattern.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (new_pattern_def_seq): Delete.
(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
(vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
(vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
STMT_VINFO_PATTERN_DEF_SEQ to null here.
(vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
append_pattern_def_seq instead of new_pattern_def_seq.
(vect_recog_divmod_pattern): Do both of the above.
(vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
is null.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_recog_dot_prod_pattern):
(vect_recog_sad_pattern, vect_recog_widen_op_pattern)
(vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
(vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
(vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
(vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
(vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
(vect_recog_mult_pattern, vect_recog_divmod_pattern)
(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
(vect_recog_mask_conversion_pattern): Replace vec<gimple *>
parameter with a single stmt_vec_info.
(vect_recog_func_ptr): Likewise.
(vect_recog_gather_scatter_pattern): Likewise, folding in...
(vect_try_gather_scatter_pattern): ...this.
(vect_pattern_recog_1): Remove stmts_to_replace and just pass
the stmt_vec_info of the statement to be matched. Don't clear
STMT_VINFO_RELATED_STMT.
(vect_pattern_recog): Update call accordingly.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/85694
* doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
(uavgM3_ceil): Document new optabs.
* doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
* internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
functions.
* optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
(savg_ceil_optab): New optabs.
* tree-vect-patterns.c (vect_recog_average_pattern): New function.
(vect_vect_recog_func_ptrs): Add it.
* tree-vect-stmts.c (vectorizable_call): Get the type of the zero
constant directly from the associated lhs.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_split_statement): New function.
(vect_convert_input): Use it to try to split an existing cast.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
* poly-int.h (print_hex): New function.
* dumpfile.h (dump_dec, dump_hex): Declare.
* dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
* tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
min_input_precision, operation_precision and operation_sign.
* tree-vect-patterns.c (vect_get_range_info): New function.
(vect_same_loop_or_bb_p, vect_single_imm_use)
(vect_operation_fits_smaller_type): Delete.
(vect_look_through_possible_promotion): Add an optional
single_use_p parameter.
(vect_recog_over_widening_pattern): Rewrite to use new
stmt_vec_info infomration. Handle one operation at a time.
(vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
(vect_truncatable_operation_p, vect_set_operation_type)
(vect_set_min_input_precision): New functions.
(vect_determine_min_output_precision_1): Likewise.
(vect_determine_min_output_precision): Likewise.
(vect_determine_precisions_from_range): Likewise.
(vect_determine_precisions_from_users): Likewise.
(vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
(vect_vect_recog_func_ptrs): Put over_widening first.
Add cast_forwprop.
(vect_pattern_recog): Call vect_determine_precisions.
2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
statements that have been replaced by further pattern statements.
(vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
2018-07-03 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
always set *dt. Dump vectype in vectype overload.
* dumpfile.h (dump_gimple_expr): New function.
(dump_gimple_expr_loc): Likewise.
* dumpfile.c (dump_gimple_expr): New function.
(dump_gimple_expr_loc): Likewise.
2018-07-02 Jeff Law <law@redhat.com>
* config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
the H8/300, H8/300H and H8/S variants into a single pattern.
(movhi_h8300, movqi_h8300hs): Similarly.
(pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
(QHI mode iterator): New.
* config/h8300/h8300.md: Remove trailing whitespace.
2018-07-02 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
instead of emit_insn for interrupt returns.
* config/riscv/riscv.md (riscv_met): Add (return) to rtl.
(riscv_sret, riscv_uret): Likewise.
2018-07-02 David Malcolm <dmalcolm@redhat.com>
* pretty-print.c (selftest::test_pp_format): Move save and restore
of quotes to class auto_fix_quotes, and add an instance.
* selftest.c: Include "intl.h".
(selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
(selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
* selftest.h (selftest::auto_fix_quotes): New class.
2018-07-02 Richard Henderson <richard.henderson@linaro.org>
* config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
(aarch64_sve_prepare_conditional_op): Remove.
* config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
Allow aarch64_simd_reg_or_zero as select operand; remove
the aarch64_sve_prepare_conditional_op call.
(cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
(cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
(*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
(*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
(*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
(*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
(*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
(*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
and a splitters to match all of the *_any patterns.
* config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
* config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
(SVE_COND_FP_BINARY_REV): Remove.
(sve_int_op_rev, sve_fp_op_rev): New.
* config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
(*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
(*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
(*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
(*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
(*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
(*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
(*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
(*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
* config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
Remove match_dup 1 from the inner unspec.
(*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
* config/aarch64/aarch64.md (movprfx): New attr.
(length): Default movprfx to 8.
* config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
(*madd<SVE_I>, *msub<SVE_I): Likewise.
(*<su>mul<SVE_I>3_highpart): Likewise.
(*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
(*v<ASHIFT><SVE_I>3): Likewise.
(*<su><MAXMIN><SVE_I>3): Likewise.
(*<su><MAXMIN><SVE_F>3): Likewise.
(*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
(*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
(*div<SVE_F>4): Likewise.
2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
in dump string.
2018-07-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/86363
* tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
memset argument refers to a non-variable address.
2018-07-02 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
{PLUS,MINUS}_EXPR code to...
(adjust_symbolic_bound): ...here,
(combine_bound): ...here,
(set_value_range_with_overflow): ...and here.
2018-07-02 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
code...
(extract_range_from_abs_expr): ...here.
2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
* config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
-fno-omit-frame-pointer when not optimizing.
2018-07-02 Martin Liska <mliska@suse.cz>
PR ipa/86279
* ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
(propagate_nothrow): Likewise.
2018-07-02 Martin Liska <mliska@suse.cz>
PR ipa/86323
* ipa-inline.c (early_inliner): Revert wrongly added ::get call.
2018-07-02 David Malcolm <dmalcolm@redhat.com>
* dumpfile.c (dump_generic_expr_loc): Undo removal of this
function in r262149, changing "loc" param from source_location to
const dump_location_t &.
* dumpfile.h (dump_generic_expr_loc): Undo removal of this
declaration, as above.
2018-07-01 Paul Koning <ni1d@arrl.net>
* common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
-munit-asm, -mgnu-asm, -mdec-asm.
* config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
(pdp11_output_labelref): New.
(pdp11_output_def): New.
(pdp11_output_addr_vec_elt): New.
* config/pdp11/pdp11.c: Use tab between opcode and operands. Use
%# and %@ format codes.
(pdp11_option_override): New.
(TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
(pdp11_output_ident): New.
(pdp11_asm_named_section): New.
(pdp11_asm_init_sections): New.
(pdp11_file_start): New.
(pdp11_file_end): New.
(output_ascii): Use .ascii/.asciz for -mdec-asm.
(pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
%o, like %c but octal.
(pdp11_option_override): New.
* config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
-mdec-asm.
(DATA_SECTION_ASM_OP): Ditto.
(READONLY_DATA_SECTION_ASM_OP): New.
(IS_ASM_LOGICAL_LINE_SEPARATOR): New.
(ASM_GENERATE_INTERNAL_LABEL): Use new function.
(ASM_OUTPUT_LABELREF): Ditto.
(ASM_OUTPUT_DEF): Ditto.
(ASM_OUTPUT_EXTERNAL): New.
(ASM_OUTPUT_SOURCE_FILENAME): New.
(ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
(ASM_OUTPUT_SKIP): Update for -mdec-asm.
* config/pdp11/pdp11.md: Use tab between opcode and operands. Use
%# and %@ format codes.
* config/pdp11/pdp11.opt (mgnu-asm): New.
(mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
(munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
* doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
2018-07-01 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
dereferencing path[] beyond its length.
(debug_path): New.
(debug_all_paths): New.
(rewire_first_differing_edge): New.
(adjust_paths_after_duplication): New.
(duplicate_thread_path): Call adjust_paths_after_duplication.
Add new argument.
(thread_through_all_blocks): Add new argument to
duplicate_thread_path.
2018-06-30 Jim Wilson <jimw@sifive.com>
* config/riscv/predicates.md (p2m1_shift_operand): New.
(high_mask_shift_operand): New.
* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
pattern using p2m1_shift_operand.
(lshsi3_zero_extend_3+2): New combiner pattern using
high_mask_shift_operand.
2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_get_external_def_edge): New function,
split out from...
(vect_recog_rotate_pattern): ...here.
(vect_convert_input): Try to insert casts of invariants in the
preheader.
* tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
preheader to be empty.
2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (append_pattern_def_seq): Take an optional
vector type. If given, install it in the new statement's
STMT_VINFO_VECTYPE.
(vect_element_precision): New function.
(vect_unpromoted_value): New struct.
(vect_unpromoted_value::vect_unpromoted_value): New function.
(vect_unpromoted_value::set_op): Likewise.
(vect_look_through_possible_promotion): Likewise.
(vect_joust_widened_integer, vect_joust_widened_type): Likewise.
(vect_widened_op_tree, vect_convert_input): Likewise.
(vect_convert_inputs, vect_convert_output): Likewise.
(vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
to handle the optional cast of the multiplication result and
vect_widened_op_tree to detect the widened multiplication itself.
Do not require the input and output of promotion casts to have
the same sign, but base the signedness of the operation on the
input rather than the result. If the pattern includes two
promotions, check that those promotions have the same sign.
Do not restrict the MULT_EXPR handling to a double-width result;
handle quadruple-width results and wider. Use vect_convert_inputs
to convert the inputs to the common type.
(vect_recog_sad_pattern): Use vect_look_through_possible_promotion
to handle the optional cast of the ABS result. Also allow a sign
change or a sign extension between the ABS and MINUS.
Use vect_widened_op_tree to detect the widened subtraction and use
vect_convert_inputs to convert the inputs to the common type.
(vect_handle_widen_op_by_const): Delete.
(vect_recog_widen_op_pattern): New function.
(vect_recog_widen_mult_pattern): Use it.
(vect_recog_widen_shift_pattern): Likewise.
(vect_recog_widen_sum_pattern): Use
vect_look_through_possible_promotion to handle the promoted
PLUS_EXPR operand.
2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
* gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
the containing gimple_seq *.
* gimple-iterator.h (gsi_for_stmt): Declare it.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern)
(vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
(vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
(vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
(vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
checks.
(vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
split out from...
(vect_mark_pattern_stmts): ...here. Handle cases in which the
statement being replaced is part of an existing pattern
definition sequence, inserting the new pattern statements before
the original one.
(vect_pattern_recog_1): Don't return a bool. If the statement
is already part of a pattern, instead apply pattern matching
to the pattern definition statements. Don't clear the
STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
(vect_pattern_recog): Don't break after the first match;
continue processing the pattern definition statements instead.
Don't bail out for STMT_VINFO_IN_PATTERN_P here.
2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
(vect_recog_widen_sum_pattern): Use it.
2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-loop.c (vectorizable_reduction): Assert that the
phi is not a pattern statement and has not been replaced by
a pattern statement.
* tree-vect-patterns.c (type_conversion_p): Don't check
STMT_VINFO_IN_PATTERN_P.
(vect_recog_vector_vector_shift_pattern): Likewise.
(vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
the pattern statement rather than the original statement; check
directly for a WIDEN_MULT_EXPR here.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
vect_is_simple_use to return the pattern statement rather
than the original statement; use is_pattern_stmt_p to check
for such a pattern statement.
* tree-vect-stmts.c (process_use): Expect vect_is_simple_use
to return the pattern statement rather than the original statement;
don't do the same transformation here.
(vect_is_simple_use): If the defining statement has been replaced
by a pattern statement, return the pattern statement instead.
Remove the corresponding (local) transformation from the vectype
overload.
2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
end and default to null.
* tree-vect-loop.c (vect_create_epilog_for_reduction)
(vectorizable_reduction): Update calls accordingly, dropping the
gimple ** argument if the passed-back statement isn't needed.
* tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
(vect_recog_rotate_pattern): Likewise.
(vect_recog_mask_conversion_pattern): Likewise.
* tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
(vect_mask_constant_operand_p): Likewise.
* tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
(vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
(get_group_load_store_type, get_load_store_type): Likewise.
(vect_check_load_store_mask, vect_check_store_rhs): Likewise.
(vectorizable_call, vectorizable_simd_clone_call): Likewise.
(vectorizable_conversion, vectorizable_assignment): Likewise.
(vectorizable_shift, vectorizable_operation): Likewise.
(vectorizable_store, vect_is_simple_cond): Likewise.
(vectorizable_condition, vectorizable_comparison): Likewise.
(get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
(vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
and move it to the end. Cope with null def_stmt_outs.
2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
* Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
2018-06-29 Jeff Law <law@redhat.com>
* config/v850/v850.c (v850_legitimate_address_p): Handle large
displacements for TARGET_V850E2V3 and newer.
(TARGET_LRA_P): Remove. Defaults to LRA now.
* config/v850/v850.md (sign23byte_load): Remove.
(unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
(23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
2018-06-29 Martin Liska <mliska@suse.cz>
PR lto/85759
* coverage.c (coverage_init): Mangle full path name.
* doc/invoke.texi: Document the change.
* gcov-io.c (mangle_path): New.
* gcov-io.h (mangle_path): Likewise.
* gcov.c (mangle_name): Use mangle_path for path mangling.
2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm.c (output_move_double): Don't allow STRD instructions
if starting source register is not even.
2018-06-29 Martin Liska <mliska@suse.cz>
PR tree-optimization/86263
* tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
Make edge redirection.
2018-06-29 David Malcolm <dmalcolm@redhat.com>
* dumpfile.c (dump_loc): Add indentation based on scope depth.
(dump_scope_depth): New variable.
(get_dump_scope_depth): New function.
(dump_begin_scope): New function.
(dump_end_scope): New function.
* dumpfile.h (get_dump_scope_depth): New declaration.
(dump_begin_scope): New declaration.
(dump_end_scope): New declaration.
(class auto_dump_scope): New class.
(AUTO_DUMP_SCOPE): New macro.
* tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
AUTO_DUMP_SCOPE.
2018-06-29 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
compute_all_dependences succeeds.
* tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
exceed --param loop-max-datarefs-for-datadeps.
2018-06-29 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
2018-06-28 Uros Bizjak <ubizjak@gmail.com>
PR target/86348
* config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
alternative 0 in preferred_for_speed attribute.
2018-06-28 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
* config/pdp11/pdp11.c (pdp11_shift_length): New function.
* config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
* config/pdp11/pdp11.md: Correct "length" attribute calculation
for shift insn patterns.
2018-06-28 David Malcolm <dmalcolm@redhat.com>
* cgraph.c (cgraph_node::get_body): Replace assignments to
"dump_file" with calls to set_dump_file.
* dumpfile.c (alt_dump_file): Make static, and group with...
(alt_flags): ...this definition.
(dumps_are_enabled): New variable.
(refresh_dumps_are_enabled): New function.
(set_dump_file): New function.
(set_alt_dump_file): New function.
(gcc::dump_manager::dump_start): Replace assignments to
"dump_file" and "alt_dump_file" with calls to set_dump_file and
set_alt_dump_file.
(gcc::dump_manager::dump_finish): Likewise.
* dumpfile.h (alt_dump_file): Delete decl.
(dumps_are_enabled): New variable decl.
(set_dump_file): New function decl.
(dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
global.
* tree-nested.c (lower_nested_functions): Replace assignments to
"dump_file" with calls to set_dump_file.
2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
* tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
goto_locus of each outgoing edge of each basic block.
2018-06-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (decl_scope_table): Remove.
(push_decl_scope): Likewise.
(pop_decl_scope): Likewise.
(gen_type_die_for_member): Do not call push/pop_decl_scope.
(gen_struct_or_union_type_die): Likewise.
(gen_tagged_type_die): Likewise.
(dwarf2out_init): Do not initialize decl_scope_table.
(dwarf2out_c_finalize): Do not free it.
2018-06-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (gen_subprogram_die): Use is_unit_die when
deciding whether to not re-use a DIE.
2018-06-28 Richard Biener <rguenther@suse.de>
* dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
DW_AT_abstract_origin attribute.
2018-06-28 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
Use newly introduced constants.
* tree-switch-conversion.h (struct jump_table_cluster):
Define max_ratio_for_size and max_ratio_for_speed.
2018-06-28 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
Add new checking assert to catch invalid state.
(jump_table_cluster::can_be_handled): Handle single case
clusters.
(jump_table_cluster::is_beneficial): Bail out for such case.
(bit_test_cluster::find_bit_tests):
Add new checking assert to catch invalid state.
(bit_test_cluster::can_be_handled): Handle single case
clusters.
(bit_test_cluster::is_beneficial): Bail out for such case.
(switch_decision_tree::analyze_switch_statement):
Fix comment.
2018-06-28 Martin Liska <mliska@suse.cz>
* common.opt: Introduce -completion option.
* gcc.c (driver_handle_option): Handle it.
(driver::main): Print completions if completion
is set.
* opt-suggestions.c (option_proposer::get_completions):
New function.
(option_proposer::suggest_completion): Likewise.
(option_proposer::find_param_completions): Likewise.
(verify_autocompletions): Likewise.
(test_completion_valid_options): Likewise.
(test_completion_valid_params): Likewise.
(in_completion_p): Likewise.
(empty_completion_p): Likewise.
(test_completion_partial_match): Likewise.
(test_completion_garbage): Likewise.
(opt_proposer_c_tests): Likewise.
* opt-suggestions.h: Declare new functions.
* opts.c (common_handle_option): Handle OPT__completion_.
* selftest-run-tests.c (selftest::run_tests): Add
opt_proposer_c_tests.
* selftest.c (assert_str_startswith): New.
* selftest.h (assert_str_startswith): Likewise.
(opt_proposer_c_tests): New.
(ASSERT_STR_STARTSWITH): Likewise.
2018-06-28 Martin Liska <mliska@suse.cz>
* Makefile.in: Add opt-suggestions.o.
* gcc-main.c: Include opt-suggestions.h.
* gcc.c (driver::driver): Likewise.
(driver::~driver): Remove m_option_suggestions.
(driver::build_option_suggestions): Moved to option_proposer.
(driver::suggest_option): Likewise.
(driver::handle_unrecognized_options): Use option_proposer.
* gcc.h (class driver): Add new memver m_option_proposer.
* opt-suggestions.c: New file.
* opt-suggestions.h: New file.
2018-06-28 Martin Liska <mliska@suse.cz>
* vec.h (class auto_string_vec): New (moved from auto_argvec).
(auto_string_vec::~auto_string_vec): Likewise.
2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
* tree-inline.h (struct copy_body_data): Move remapping_type_depth and
prevent_decl_creation_for_types fields up and add reset_location field.
* tree-inline.c (remap_gimple_stmt): Force input_location on the new
statement if id->reset_location is true.
(copy_edges_for_bb): Do not set goto_locus on the new edges if
id->reset_location is true.
(copy_phis_for_bb): Force input_location on the arguments if
id->reset_location is true.
(expand_call_inline): Set id->reset_location if DECL_IGNORED_P
is set on the function to be inlined.
2018-06-27 Stephan Bergmann <sbergman@redhat.com>
* doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
* lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
registers for Pmode.
* lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
hard registers for the clobbered pseudo.
2018-06-27 Paul Koning <ni1d@arrl.net>
* common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
mutually exclusive options.
* config/pdp11/constraints.md (h): New constraint.
(O): Update definition to match shift code generation.
(D): New constraint.
* config/pdp11/pdp11-modes.def (CCNZ): Define mode.
(CCFP): Remove.
* config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
function.
(output_jump): Change arguments.
(pdp11_fixed_cc_regs): New function.
(pdp11_cc_mode): Ditto.
(pdp11_expand_shift): Ditto.
(pdp11_assemble_shift): Ditto.
(pdp11_small_shift): Ditto.
(pdp11_branch_cost): Remove.
* config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
from output.
(pdp11_register_move_cost): Update for CC registers.
(pdp11_rtx_costs): Add case for LSHIFTRT.
(pdp11_output_jump): Add CCNZ mode conditional branches.
(notice_update_cc_on_set): Remove.
(pdp11_cc_mode): New function.
(simple_memory_operand): Correct pre/post decrement case.
(no_side_effect_operand): New function.
(pdp11_regno_reg_class): Add CC_REGS class.
(pdp11_fixed_cc_regs): New function.
(pdp11_small_shift): New function.
(pdp11_expand_shift): New function to expand shift insns.
(pdp11_assemble_shift): New function to output shifts.
(pdp11_branch_cost): Remove.
(pdp11_modes_tieable_p): Make QI/HI modes tieable.
* config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
(WCHAR_TYPE): Ditto.
(PTRDIFF_TYPE): Ditto.
(ADJUST_INSN_LENGTH): New macro.
(FIXED_REGISTERS): Add CC registers.
(CALL_USED_REGISTERS): Ditto.
(reg_class): Ditto.
(REG_CLASS_NAMES): Ditto.
(REG_CLASS_CONTENTS): Ditto.
(SELECT_CC_MODE): Use new function.
(TARGET_FLAGS_REGNUM): New macro.
(TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
(cc0_reg_rtx): Remove.
(CC_STATUS_MDEP): Remove.
(CC_STATUS_MDEFP_INIT): Remove.
(CC_IN_FPU): Remove.
(NOTICE_UPDATE_CC): Remove.
(REGISTER_NAMES): Add CC registers.
(BRANCH_COST): Change to constant 1.
* config/pdp11/pdp11.md: Rewrite for CCmode condition code
handling.
* config/pdp11/pdp11.opt (mbcopy): Remove.
(mbcopy-builtin): Remove.
(mbranch-cheap): Remove.
(mbranch-expensive): Remove.
* config/pdp11/predicates.md (expand_shift_operand): Update to
match shift code generation.
(ccnz_operator): New predicate.
* doc/invoke.texi (PDP-11 Options): Remove deleted options
-mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
Remove non-existent option -mabshi, -mno-abshi. Document mutually
exclusive options.
* doc/md.texi (PDP-11): Document new D and h constraints. Update
description of O constraint.
2018-06-27 Jeff Law <law@redhat.com>
Austin Law <austinklaw@gmail.com>
* config/v850/v850.md (addsi3_set_flags): New pattern.
(subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
(iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
(zero_extendhisi2_v850_set_flags): Likewise.
(zero_extendqisi2_v850_set_flags): Likewise.
(ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
(lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
(ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
* config/v850/v850-protos.h (notice_update_cc): Remove.
* config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
(v850_print_operand): Handle 'D' and "d".
(v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
Add handling of arithmetic/logical operations compared against zero.
(v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
Do not look at v850_compare_op, instead get mode from last argument.
(v850_gen_compare): Remove
(increment_stack): Use addsi3_clobber_flags to avoid splitting failure
after reload for prologue insns.
(expand_prologue): Account for CLOBBER of CC_REGNUM in various
patterns.
(construct_save_jarl): Likewise.
(TARGET_FLAGS_REGNUM): Define.
* config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
(NOTICE_UPDATE_CC): Remove.
* config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
than cc0. Conditionalize on reload_completed.
(cmpsi_insn, setfcc_insn): Likewise.
(tst1 splitter): Turn into define_and_split which sets the flags
after reload.
(cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
(cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
(cstoresf4, cstoredf4): Clobber the flags.
(cmpsi, cmpsf, cmpdf): Remove expanders.
(setf_insn): Remove pattern.
(addsi3): Turn into define_and_split which clobbers the flags after
reload and a suitable pattern (addsi3_clobber_flags) for use after
reload.
(subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
(ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
(ashrsi3, ashrsi3_v850e2): Likewise.
(bins): Clobber the flags.
(movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
(movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
(fix_loop_counter, call_internal_short, call_internal_long): Likewise.
(call_value_internal_short, call_value_internal_long): Likewise.
(callt_save_interrupt, callt_return_interrupt): Likewise.
(save_interrupt, return_interrupt): Likewise.
(callt_save_all_interrupt, save_all_interrupt): Likewise.
(_save_all_interrupt, callt_restore_all_interrupt): Likewise.
(restore_all_interrupt, _restore_all_interrupt): Likewise.
(All FP comparisons): Only allow after reload has completed.
(trfsr): Likewise.
(divh, divhu): Tweak output template.
(branch_z_normal, branch_z_invert): Remove
(branch_nz_normal, branch_nz_invert): Likewise.
(extendhisi_insn, extendqisi_insn): Do not clobber flags.
* config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
* config/v850/v850.c (notice_update_cc): Remove.
* config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
(CC_NO_CARRY): Likewise.
(NOTICE_UPDATE_CC): Define to nothing.
* config/v850/v850.md: Remove block comment on cc0 handling
Remove "cc" attribute from all patterns. Remove cc_status handling
from all patterns. Minor formatting fixes.
2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-cores.def (cortex-a76): New entry.
(cortex-a76.cortex-a55): Likewise.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi (AArch64 Options): Document cortex-a76 and
cortex-a76.cortex-a55.
2018-06-27 Jeff Law <law@redhat.com>
* config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
(MULTILIB_DIRNAMES): Similarly.
2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
* gimple.h (gimple_return_retbnd): Delete.
(gimple_return_set_retbnd): Likewise.
* cgraphunit.c (cgraph_node::expand_thunk): Remove call to
gimple_return_set_retbnd.
* gimple-pretty-print.c (dump_gimple_return): Remove call to
gimple_return_retbnd and adjust.
* tree-inline.h (struct copy_body_data): Remove retbnd field.
* tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
Explicitly return NULL in a couple more cases. Move assertion
on debug statements and remove unreachable code.
(reset_debug_binding): Do not test id->retbnd.
(expand_call_inline): Do not set it.
2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
* configure.ac: Add --disable-gcov option.
* configure: Regenerate.
* Makefile.in: Honour @enable_gcov@.
* doc/install.texi: Document --disable-gcov.
2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (cortex-a76): New entry.
(cortex-a76.cortex-a55): Likewise.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm-tune.md: Likewise.
* config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
* doc/invoke.texi (ARM Options): Document cortex-a76 and
cortex-a76.cortex-a55.
2018-06-27 Tamar Christina <tamar.christina@arm.com>
PR target/85769
* config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
* config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
comment.
(EPILOGUE_USES): Likewise.
2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
* tree-inline.c (remap_location): New function extracted from...
(copy_edges_for_bb): Add ID parameter. Remap goto_locus.
(copy_phis_for_bb): ...here. Call remap_location.
(copy_cfg_body): Adjust call to copy_edges_for_bb.
2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (expand_block_clear): Don't use
unaligned vsx for 16B memset.
2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86285
* config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
ieee128_float_type_node to long_double_type_node unless
TARGET_LONG_DOUBLE_128 is set.
2018-06-26 David Malcolm <dmalcolm@redhat.com>
* cfgloop.c (get_loop_location): Convert return type from
location_t to dump_user_location_t, replacing INSN_LOCATION lookups
by implicit construction from rtx_insn *, and using
dump_user_location_t::from_function_decl for the fallback case.
* cfgloop.h (get_loop_location): Convert return type from
location_t to dump_user_location_t.
* cgraphunit.c (walk_polymorphic_call_targets): Update call to
dump_printf_loc to pass in a dump_location_t rather than a
location_t, via the gimple stmt.
* coverage.c (get_coverage_counts): Update calls to
dump_printf_loc to pass in dump_location_t rather than a
location_t.
* doc/optinfo.texi (Dump types): Convert example of
dump_printf_loc from taking "locus" to taking "insn". Update
description of the "_loc" calls to cover dump_location_t.
* dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
"selftest.h".
(dump_user_location_t::dump_user_location_t): New constructors,
from gimple *stmt and rtx_insn *.
(dump_user_location_t::from_function_decl): New function.
(dump_loc): Make static.
(dump_gimple_stmt_loc): Convert param "loc" from location_t to
const dump_location_t &.
(dump_generic_expr_loc): Delete.
(dump_printf_loc): Convert param "loc" from location_t to
const dump_location_t &.
(selftest::test_impl_location): New function.
(selftest::dumpfile_c_tests): New function.
* dumpfile.h: Include "profile-count.h".
(class dump_user_location_t): New class.
(struct dump_impl_location_t): New struct.
(class dump_location_t): New class.
(dump_printf_loc): Convert 2nd param from source_location to
const dump_location_t &.
(dump_generic_expr_loc): Delete.
(dump_gimple_stmt_loc): Convert 2nd param from source_location to
const dump_location_t &.
* gimple-fold.c (fold_gimple_assign): Update call to
dump_printf_loc to pass in a dump_location_t rather than a
location_t, via the gimple stmt.
(gimple_fold_call): Likewise.
* gimple-loop-interchange.cc
(loop_cand::analyze_iloop_reduction_var): Update for change to
check_reduction_path.
(tree_loop_interchange::interchange): Update for change to
find_loop_location.
* graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
change in return-type of find_loop_location.
(graphite_regenerate_ast_isl): Likewise.
* graphite-optimize-isl.c (optimize_isl): Likewise.
* graphite.c (graphite_transform_loops): Likewise.
* ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
pass in a dump_location_t rather than a location_t, via the
gimple stmt.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa.c (walk_polymorphic_call_targets): Likewise.
* loop-unroll.c (report_unroll): Convert "locus" param from
location_t to dump_location_t.
(decide_unrolling): Update for change to get_loop_location's
return type.
* omp-grid.c (struct grid_prop): Convert field "target_loc" from
location_t to dump_user_location_t.
(grid_find_single_omp_among_assignments_1): Updates calls to
dump_printf_loc to pass in a dump_location_t rather than a
location_t, via the gimple stmt.
(grid_parallel_clauses_gridifiable): Convert "tloc" from
location_t to dump_location_t. Updates calls to dump_printf_loc
to pass in a dump_location_t rather than a location_t, via the
gimple stmt.
(grid_inner_loop_gridifiable_p): Likewise.
(grid_dist_follows_simple_pattern): Likewise.
(grid_gfor_follows_tiling_pattern): Likewise.
(grid_target_follows_gridifiable_pattern): Likewise.
(grid_attempt_target_gridification): Convert initialization
of local "grid" from memset to zero-initialization; FIXME: does
this require C++11? Update call to dump_printf_loc to pass in a
optinfo_location rather than a location_t, via the gimple stmt.
* profile.c (read_profile_edge_counts): Updates call to
dump_printf_loc to pass in a dump_location_t rather than a
location_t
(compute_branch_probabilities): Likewise.
* selftest-run-tests.c (selftest::run_tests): Call
dumpfile_c_tests.
* selftest.h (dumpfile_c_tests): New decl.
* tree-loop-distribution.c (pass_loop_distribution::execute):
Update for change in return type of find_loop_location.
* tree-parloops.c (parallelize_loops): Likewise.
* tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
"locus" from location_t to dump_user_location_t.
(canonicalize_loop_induction_variables): Likewise.
* tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
for change in return type of find_loop_location.
* tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
to dump_printf_loc to pass in a dump_location_t rather than a
location_t, via the stmt.
* tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
Likewise.
* tree-vect-loop-manip.c (find_loop_location): Convert return
type from source_location to dump_user_location_t.
(vect_do_peeling): Update for above change.
(vect_loop_versioning): Update for change in type of
vect_location.
* tree-vect-loop.c (check_reduction_path): Convert "loc" param
from location_t to dump_user_location_t.
(vect_estimate_min_profitable_iters): Update for change in type
of vect_location.
* tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
location_t to dump_location_t.
(vect_slp_bb): Update for change in type of vect_location.
* tree-vectorizer.c (vect_location): Convert from source_location
to dump_user_location_t.
(try_vectorize_loop_1): Update for change in vect_location's type.
(vectorize_loops): Likewise.
(increase_alignment): Likewise.
* tree-vectorizer.h (vect_location): Convert from source_location
to dump_user_location_t.
(find_loop_location): Convert return type from source_location to
dump_user_location_t.
(check_reduction_path): Convert 1st param from location_t to
dump_user_location_t.
* value-prof.c (check_counter): Update call to dump_printf_loc to
pass in a dump_user_location_t rather than a location_t; update
call to error_at for change in type of "locus".
(check_ic_target): Update call to dump_printf_loc to
pass in a dump_user_location_t rather than a location_t, via the
call_stmt.
2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
* config/s390/s390.h (enum processor_flags): Do not use
default tune parameter when -march was specified.
2018-06-26 Jakub Jelinek <jakub@redhat.com>
PR target/86314
* config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
Check reg_overlap_mentioned_p in addition to reg_set_p with the same
operands.
2018-06-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/86287
PR bootstrap/86316
* tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
(vect_analyze_loop): Initialize n_stmts.
2018-06-26 Richard Biener <rguenther@suse.de>
PR middle-end/86271
* fold-const.c (fold_convertible_p): Pointer extension
isn't valid.
2018-06-26 Alexandre Oliva <aoliva@redhat.com>
PR debug/86064
* dwarf2out.c (loc_list_has_views): Adjust comments.
(dw_loc_list): Split single cross-partition range with
nonzero locview.
2018-06-25 Jeff Law <law@redhat.com>
* common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
on -mbig-switch by default.
* config/v850/predicates.md (const_float_1_operand): Fix match_code
test.
(const_float_0_operand): Remove unused predicate.
* config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
(define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
(recipsf2): New expander. Original pattern now called
(recipsf2_insn).
(recipdf2, recipdf2_insn): Similarly.
(rsqrtsf2, rsqrtsf2_insn): Similarly
(rsqrtdf2, rsqrtdf2_insn): Similarly
2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
* ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
Simplify logic for FreeBSD (twice).
2018-06-25 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86204
* tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
a strnlen result if it's less than the length of the string.
2018-06-25 Martin Sebor <msebor@redhat.com>
PR tree-optimization/85700
* gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
* tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
(maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
2018-06-25 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (Zero-length arrays): Update and clarify.
2018-06-25 Michael Meissner <meissner@linux.ibm.com>
* config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
added IEEE/IBM long double multilib support on PowerPC little
endian Linux systems.
* config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
(MULTILIB_DEFAULTS): Likewise.
* config/rs6000/rs6000.c (rs6000_option_override_internal):
Likewise.
* config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
* config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
* config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
2018-06-25 Alexander Monakov <amonakov@ispras.ru>
PR middle-end/86311
* sort.cc (REORDER_23): Avoid memcpy with same destination and source.
(REORDER_45): Likewise.
2018-06-25 Jeff Law <law@redhat.com>
* config/v850/v850.md (divmodhi4): Make sure to sign extend the
dividend to 32 bits. Adjust length.
(udivmodhi4): Cleanup output template. Fix length.
2018-06-25 Carl Love <cel@us.ibm.com>
* config/rs6000/vsx.md: Change word selector to prefered location.
2018-06-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/86304
* tree-vectorizer.c (vectorize_loops): Walk over new possibly
epilogue-if-converted loops as well.
2018-06-25 Jan Hubicka <hubicka@ucw.cz>
* lto-section-out.c (lto_begin_section): Do not print section
name for noaddr and unnumbered dumps.
2018-06-25 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (struct vec_info_shared): New structure
with parts split out from struct vec_info and loop_nest from
struct _loop_vec_info.
(struct vec_info): Adjust accordingly.
(struct _loop_vec_info): Likewise.
(LOOP_VINFO_LOOP_NEST): Adjust.
(LOOP_VINFO_DATAREFS): Likewise.
(LOOP_VINFO_DDRS): Likewise.
(struct _bb_vec_info): Likewise.
(BB_VINFO_DATAREFS): Likewise.
(BB_VINFO_DDRS): Likewise.
(struct _stmt_vec_info): Add dr_aux member.
(DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
(DR_MISALIGNMENT_UNINITIALIZED): New.
(set_dr_misalignment): Adjust.
(dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
(vect_analyze_loop): Adjust prototype.
(vect_analyze_loop_form): Likewise.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
Compute dependences lazily.
(vect_record_base_alignments): Use shared datarefs/ddrs.
(vect_verify_datarefs_alignment): Likewise.
(vect_analyze_data_refs_alignment): Likewise.
(vect_analyze_data_ref_accesses): Likewise.
(vect_analyze_data_refs): Likewise.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
constructor parameter for shared part.
(vect_analyze_loop_form): Pass in shared part and adjust.
(vect_analyze_loop_2): Pass in storage for the number of
stmts. Move loop nest finding to the caller. Compute
datarefs lazily.
(vect_analyze_loop): Pass in shared part.
(vect_transform_loop): Verify shared datarefs are unchanged.
* tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
constructor parameter for shared part.
(vect_slp_analyze_bb_1): Pass in shared part and adjust.
(vect_slp_bb): Verify shared datarefs are unchanged before
transform.
* tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
change.
(new_stmt_vec_info): Initialize DR_AUX misalignment to
DR_MISALIGNMENT_UNINITIALIZED.
* tree-vectorizer.c (vec_info::vec_info): Add constructor
parameter for shared part.
(vec_info::~vec_info): Adjust.
(vec_info_shared::vec_info_shared): New.
(vec_info_shared::~vec_info_shared): Likewise.
(vec_info_shared::save_datarefs): Likewise.
(vec_info_shared::check_datarefs): Likewise.
(try_vectorize_loop_1): Construct shared part live for analyses
of a single loop for multiple vector sizes.
* tree-parloops.c (gather_scalar_reductions): Adjust.
2018-06-25 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
(vect_analyze_data_refs): Remove similar code from here and
simplify accordingly.
2018-06-25 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_check_gather_scatter): Fail
for reverse storage order accesses rather than asserting
they cannot happen here.
2018-06-25 Tom de Vries <tdevries@suse.de>
PR debug/86257
* config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
Use data16 instead of .byte for insn prefix.
2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
PR C++/86082
* parser.c (make_char_string_pack): Pass this literal chars
through cpp_interpret_string.
(cp_parser_userdef_numeric_literal): Check the result of
make_char_string_pack.
2018-06-24 Maya Rashish <coypu@sdf.org>
* ginclude/stddef.h: Simplify conditions around avoiding
re-definition of __size_t.
2018-06-22 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
2018-06-22 Maya Rashish <coypu@sdf.org>
* doc/invoke.texi (mno-fancy-math-387): Update for changes
made to OpenBSD and NetBSD through the years.
2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_pack (vector double, vector double) to match
behavior of vec_float2 (vector double, vector double).
2018-06-22 Olivier Hainque <hainque@adacore.com>
* gimplify.c (gimplify_function_tree): Prevent creation
of a trampoline for the address of the current function
passed to entry/exit instrumentation hooks.
2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/86222
* config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
correctly.
2018-06-22 Martin Liska <mliska@suse.cz>
PR tree-optimization/86263
* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
Bail out if is_enabled is false.
* tree-switch-conversion.h (jump_table_cluster::is_enabled):
New declaration.
(jump_table_cluster::is_enabled): New function.
2018-06-22 Jan Hubicka <hubicka@ucw.cz>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
* tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
(lto_input_ts_binfo_tree_pointers): Likewise.
* tree-streamer-out.c (streamer_write_tree_bitfields,
write_ts_binfo_tree_pointers): Likewise.
* tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
2018-06-22 Jan Hubicka <hubicka@ucw.cz>
* tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
2018-06-22 Martin Liska <mliska@suse.cz>
* symbol-summary.h (get): Make it pure and inline move
functionality from ::get function.
(get): Remove and inline into ::get and ::get_create.
(get_create): Move code from ::get function.
2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/85994
* config/i386/sol2.h (CPP_SPEC): Don't pass -P for
-x assembler-with-cpp.
2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
_FILE_OFFSET_BITS=64 for C++.
2018-06-21 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
conversion insn that shows up when pr85657-3.c is compiled using
IEEE 128-bit long double.
(neg<mode>2_internal): Use the correct mode to check whether the
mode is IBM extended.
* config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
multiply and divide external functions from being created more
than once.
2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
* cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
functions.
(rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
the edge can be forwarded.
(cfg_layout_merge_blocks): Likewise.
2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
* except.c (finish_eh_generation): Commit edge insertions only after
the EH edges have been redirected from post-landing to landing pads.
2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
* tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
create_tmp_var_for to create the FRAME decl.
(finalize_nesting_tree_1): Do not unchain the FRAME decl.
2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
* tree-inline.c (copy_edges_for_bb): Minor tweak.
(maybe_move_debug_stmts_to_successors): Also reset the locus of the
debug statement when resetting its value.
(expand_call_inline): Copy the locus of the call onto the assignment
of the return value, if any. Use local variable in more cases.
2018-06-21 Martin Liska <mliska@suse.cz>
* ipa-pure-const.c (propagate_nothrow): Use
funct_state_summaries->get.
(dump_malloc_lattice): Likewise.
(propagate_malloc): Likewise.
2018-06-21 Richard Biener <rguenther@suse.de>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
comment.
* tree-streamer-out.c (write_ts_block_tree_pointers): Stream
BLOCK_ABSTRACT_ORIGIN unconditionally.
2018-06-21 David Malcolm <dmalcolm@redhat.com>
* ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
deleting it.
* ipa-reference.c (ipa_reference_c_finalize): Delete
ipa_ref_opt_sum_summaries and set it to NULL.
2018-06-21 Tom de Vries <tdevries@suse.de>
PR tree-optimization/85859
* tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
test with comment from bb_no_side_effects_p.
2018-06-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/86232
* tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
max for constant niter.
2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/aarch64/aarch64-simd.md
(*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
Make opernads of the unspec commutative.
2018-06-21 Richard Biener <rguenther@suse.de>
* tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
(vect_analyze_data_ref_dependence): Re-order checks to deal with
NULL DR_STEP.
(vect_record_base_alignments): Do not record base alignment
for gathers or scatters.
(vect_compute_data_ref_alignment): Drop return value that is always
true. Bail out early for gathers or scatters.
(vect_enhance_data_refs_alignment): Bail out early for gathers
or scatters.
(vect_find_same_alignment_drs): Likewise.
(vect_analyze_data_refs_alignment): Remove dead code.
(vect_slp_analyze_and_verify_node_alignment): Likewise.
(vect_analyze_data_refs): For possible gathers or scatters do
not create an alternate DR, just check their possible validity
and mark them. Adjust DECL_NONALIASED handling to not rely
on DR_BASE_ADDRESS.
* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
update inits of gathers or scatters.
* tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
Also copy gather/scatter flag to pattern vinfo.
2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_packsu (vector unsigned long long, vector unsigned
long long) to match behavior of vec_packs with same signature.
2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
Thomas Schwinge <thomas@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
* gimplify.c (gimplify_scan_omp_clauses): Add support for
OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
(gimplify_adjust_omp_clauses): Likewise.
(gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
(gimplify_omp_target_update): Update handling of acc update and
enter/exit data.
* omp-low.c (install_var_field): Remove unused parameter
base_pointers_restrict.
(scan_sharing_clauses): Remove base_pointers_restrict parameter.
Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
FINALIZE}
(omp_target_base_pointers_restrict_p): Delete.
(scan_omp_target): Update call to scan_sharing_clauses.
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
FINALIZE}.
* tree-nested.c (convert_nonlocal_omp_clauses): Handle
OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
(convert_local_omp_clauses): Likewise.
* tree-pretty-print.c (dump_omp_clause): Likewise.
* tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
FINALIZE}.
(omp_clause_code_name): Likewise.
2018-06-20 Jakub Jelinek <jakub@redhat.com>
PR debug/86194
* var-tracking.c (use_narrower_mode_test): Check if shift amount can
be narrowed.
PR tree-optimization/86231
* tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
anti-range don't overwrite *vr0min before using it to compute *vr0max.
2018-06-20 Tom de Vries <tdevries@suse.de>
PR tree-optimization/86097
* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
iv type if signedness of iv type is not the same as that of *nit.
2018-06-20 Jakub Jelinek <jakub@redhat.com>
* cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
EDGE_EH edges, verify they are all EDGE_EH.
2018-06-20 Maya Rashish <coypu@sdf.org>
* ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
* config/aarch64/aarch64.c (xgene1_tunings): Add
AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
(aarch64_mode_valid_for_sched_fusion_p):
Allow 16-byte modes.
(aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
* config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
128-bit modes.
* config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
New pattern.
(vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
* config/aarch64/iterators.md (VQ2): New mode iterator.
2018-06-20 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
Change default ratio from 10 to 8.
2018-06-20 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
New.
(bit_test_cluster::find_bit_tests): Likewise.
(switch_decision_tree::analyze_switch_statement): Find clusters.
* tree-switch-conversion.h (struct jump_table_cluster): Document
hierarchy.
2018-06-20 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (switch_conversion::collect):
Record m_uniq property.
(switch_conversion::expand): Bail out for special conditions.
(group_cluster::~group_cluster): New.
(group_cluster::group_cluster): Likewise.
(group_cluster::dump): Likewise.
(jump_table_cluster::emit): New.
(switch_decision_tree::fix_phi_operands_for_edges): New.
(struct case_node): Remove struct.
(jump_table_cluster::can_be_handled): New.
(case_values_threshold): Moved to header.
(reset_out_edges_aux): Likewise.
(jump_table_cluster::is_beneficial): New.
(bit_test_cluster::can_be_handled): Likewise.
(add_case_node): Remove.
(bit_test_cluster::is_beneficial): New.
(case_bit_test::cmp): New.
(bit_test_cluster::emit): New.
(expand_switch_as_decision_tree_p): Remove.
(bit_test_cluster::hoist_edge_and_branch_if_true): New.
(fix_phi_operands_for_edge): Likewise.
(switch_decision_tree::analyze_switch_statement): New.
(compute_cases_per_edge): Move ...
(switch_decision_tree::compute_cases_per_edge): ... here.
(try_switch_expansion): Likewise.
(switch_decision_tree::try_switch_expansion): Likewise.
(record_phi_operand_mapping): Likewise.
(switch_decision_tree::record_phi_operand_mapping): Likewise.
(emit_case_decision_tree): Likewise.
(switch_decision_tree::emit): Likewise.
(balance_case_nodes): Likewise.
(switch_decision_tree::balance_case_nodes): Likewise.
(dump_case_nodes): Likewise.
(switch_decision_tree::dump_case_nodes): Likewise.
(emit_jump): Likewise.
(switch_decision_tree::emit_jump): Likewise.
(emit_cmp_and_jump_insns): Likewise.
(switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
(emit_case_nodes): Likewise.
(switch_decision_tree::emit_case_nodes): Likewise.
(conditional_probability): Remove.
* tree-switch-conversion.h (enum cluster_type): New.
(PRINT_CASE): New.
(struct cluster): Likewise.
(cluster::cluster): Likewise.
(struct simple_cluster): Likewise.
(simple_cluster::simple_cluster): Likewise.
(struct group_cluster): Likewise.
(struct jump_table_cluster): Likewise.
(struct bit_test_cluster): Likewise.
(struct min_cluster_item): Likewise.
(struct case_tree_node): Likewise.
(case_tree_node::case_tree_node): Likewise.
(jump_table_cluster::case_values_threshold): Likewise.
(struct case_bit_test): Likewise.
(struct switch_decision_tree): Likewise.
(struct switch_conversion): Likewise.
(switch_decision_tree::reset_out_edges_aux): Likewise.
2018-06-20 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
(hoist_edge_and_branch_if_true): Likewise.
(expand_switch_using_bit_tests_p): Likewise.
(struct case_bit_test): Likewise.
(case_bit_test_cmp): Likewise.
(emit_case_bit_tests): Likewise.
(switch_conversion::switch_conversion): New class.
(struct switch_conv_info): Remove old struct.
(collect_switch_conv_info): More to ...
(switch_conversion::collect): ... this.
(check_range): Likewise.
(switch_conversion::check_range): Likewise.
(check_all_empty_except_final): Likewise.
(switch_conversion::check_all_empty_except_final): Likewise.
(check_final_bb): Likewise.
(switch_conversion::check_final_bb): Likewise.
(create_temp_arrays): Likewise.
(switch_conversion::create_temp_arrays): Likewise.
(free_temp_arrays): Likewise.
(gather_default_values): Likewise.
(switch_conversion::gather_default_values): Likewise.
(build_constructors): Likewise.
(switch_conversion::build_constructors): Likewise.
(constructor_contains_same_values_p): Likewise.
(switch_conversion::contains_same_values_p): Likewise.
(array_value_type): Likewise.
(switch_conversion::array_value_type): Likewise.
(build_one_array): Likewise.
(switch_conversion::build_one_array): Likewise.
(build_arrays): Likewise.
(switch_conversion::build_arrays): Likewise.
(gen_def_assigns): Likewise.
(switch_conversion::gen_def_assigns): Likewise.
(prune_bbs): Likewise.
(switch_conversion::prune_bbs): Likewise.
(fix_phi_nodes): Likewise.
(switch_conversion::fix_phi_nodes): Likewise.
(gen_inbound_check): Likewise.
(switch_conversion::gen_inbound_check): Likewise.
(process_switch): Use the newly created class.
(switch_conversion::expand): New.
(switch_conversion::~switch_conversion): New.
* tree-switch-conversion.h: New file.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
tree-vect-patterns.c.
* tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
(vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
(vect_recog_sad_pattern): Likewise.
(vect_recog_widen_sum_pattern): Likewise.
(vect_recog_pow_pattern): Likewise. Check for a null vectype.
(vect_recog_widen_shift_pattern): Remove the type_in argument.
(vect_recog_rotate_pattern): Likewise.
(vect_recog_mult_pattern): Likewise.
(vect_recog_vector_vector_shift_pattern): Likewise.
(vect_recog_divmod_pattern): Likewise.
(vect_recog_mixed_size_cond_pattern): Likewise.
(vect_recog_bool_pattern): Likewise.
(vect_recog_mask_conversion_pattern): Likewise.
(vect_try_gather_scatter_pattern): Likewise.
(vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
(vect_recog_over_widening_pattern): Likewise.
(vect_recog_gather_scatter_pattern): Likewise.
(vect_recog_func_ptr): Move from tree-vectorizer.h
(vect_vect_recog_func_ptrs): Move further down the file.
(vect_recog_func): Likewise. Remove the third argument.
(NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
(vect_pattern_recog_1): Expect the pattern function to do any
necessary target tests. Also expect it to provide a vector type.
Remove the type_in handling.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_pattern_detected): New function.
(vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
(vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
(vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
(vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
(vect_recog_mult_pattern, vect_recog_divmod_pattern)
(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
(vect_recog_mask_conversion_pattern)
(vect_try_gather_scatter_pattern): Likewise.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_get_internal_def): New function.
(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
(vect_recog_vector_vector_shift_pattern, check_bool_pattern)
(search_type_for_mask_1): Use it.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
redundant WIDEN_SUM_EXPR handling.
(vect_recog_sad_pattern): Likewise.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
(vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
(vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
(vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vectorizable_call): Make sure that we
use the stmt_vec_info of the original bb statement for the
new zero assignment, even if the call is part of a pattern.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
that the sequence is attached to the original statement rather
than the pattern statement.
* tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
PATTERN_DEF_SEQ from the original statement rather than
the main pattern statement.
* tree-vect-stmts.c (free_stmt_vec_info): Likewise.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
(vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
* tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
definition statements before the early exit for statements that aren't
live or relevant.
* tree-vect-loop.c (vect_transform_loop_stmt): New function,
split out from...
(vect_transform_loop): ...here. Process pattern definition
statements without first checking whether the main pattern
statement is live or relevant.
2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
* tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
-O0 if the locus represent UNKNOWN_LOCATION but have different values.
2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
* config/rs6000/rs6000-string.c (select_block_compare_mode): Check
TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
(do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
(expand_block_compare): Change select_block_compare_mode call.
(expand_strncmp_align_check): Use new functions, fix comment.
(emit_final_str_compare_gpr): New function.
(expand_strn_compare): Refactor and clean up code.
* config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2018-06-19 Tony Reix <tony.reix@atos.com>
Damien Bergamini <damien.bergamini@atos.com>
David Edelsohn <dje.gcc@gmail.com>
* collect2.c (static_obj): New variable.
(static_libs): New variable.
(is_in_list): Uncomment declaration.
(main): Track AIX libraries linked statically.
(is_in_list): Uncomment definition.
(scan_prog_file): Don't add AIX shared libraries initializer
to constructor list if linking statically.
2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
* config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
constant.
(allocate_stack, frame_blockage, *frame_blockage): New patterns.
2018-06-19 Jan Hubicka <hubicka@ucw.cz>
* tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
blocks.
2018-06-19 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (ix86_can_inline_p): Do not use
ipa_fn_summaries::get_create.
* ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
get.
(devirtualization_time_bonus): Likewise.
(ipcp_propagate_stage): Likewise.
* ipa-fnsummary.c (redirect_to_unreachable): Likewise.
(edge_set_predicate): Likewise.
(evaluate_conditions_for_known_args): Likewise.
(evaluate_properties_for_edge): Likewise.
(ipa_call_summary::reset): Tranform to ...
(ipa_call_summary::~ipa_call_summary): ... this.
(ipa_fn_summary::reset): Transform to ...
(ipa_fn_summary::~ipa_fn_summary): ... this.
(ipa_fn_summary_t::remove): Rename to ...
(ipa_fn_summary_t::remove_callees): ... this.
(ipa_fn_summary_t::duplicate): Use placement new
instead of memory copy.
(ipa_call_summary_t::duplicate): Likewise.
(ipa_call_summary_t::remove): Remove.
(dump_ipa_call_summary): Change get_create to get.
(ipa_dump_fn_summary): Dump only when summary exists.
(analyze_function_body): Use symbol_summary::get instead
of get_create.
(compute_fn_summary): Likewise.
(estimate_edge_devirt_benefit): Likewise.
(estimate_edge_size_and_time): Likewise.
(inline_update_callee_summaries): Likewise.
(remap_edge_change_prob): Likewise.
(remap_edge_summaries): Likewise.
(ipa_merge_fn_summary_after_inlining): Likewise.
(write_ipa_call_summary): Likewise.
(ipa_fn_summary_write): Likewise.
(ipa_free_fn_summary): Likewise.
* ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
(struct ipa_call_summary): Likewise.
* ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
of get_create.
* ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
(estimate_size_after_inlining): Likewise.
(estimate_growth): Likewise.
(growth_likely_positive): Likewise.
* ipa-inline-transform.c (clone_inlined_nodes): Likewise.
(inline_call): Likewise.
* ipa-inline.c (caller_growth_limits): Likewise.
(can_inline_edge_p): Likewise.
(can_inline_edge_by_limits_p): Likewise.
(compute_uninlined_call_time): Likewise.
(compute_inlined_call_time): Likewise.
(want_inline_small_function_p): Likewise.
(edge_badness): Likewise.
(update_caller_keys): Likewise.
(update_callee_keys): Likewise.
(inline_small_functions): Likewise.
(inline_to_all_callers_1): Likewise.
(dump_overall_stats): Likewise.
(early_inline_small_functions): Likewise.
(early_inliner): Likewise.
* ipa-profile.c (ipa_propagate_frequency_1): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa-pure-const.c (malloc_candidate_p): Likewise.
* ipa-split.c (execute_split_functions): Likewise.
* symbol-summary.h: Likewise.
* tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2018-06-19 Richard Biener <rguenther@suse.de>
* tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
(vectorize_loops): ... here. Fix dbgcnt handling.
(try_vectorize_loop): Wrap try_vectorize_loop_1.
2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
PR target/86197
* config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
ieee128 argument takes up only one (vector) register, not two (floating
point) registers.
2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (gimplify_init_constructor): Really never clear for an
incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2018-06-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/86179
* tree-vect-patterns.c (vect_pattern_recog_1): Clean up
after failed recognition.
2018-06-18 Martin Sebor <msebor@redhat.com>
PR middle-end/85602
* calls.c (maybe_warn_nonstring_arg): Handle strncat.
* tree-ssa-strlen.c (is_strlen_related_p): Make extern.
Handle integer subtraction.
(maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
* tree-ssa-strlen.h (is_strlen_related_p): Declare.
2018-06-18 David Malcolm <dmalcolm@redhat.com>
* config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
param from rtx to rtx_insn *.
* config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
param.
(frv_ifcvt_modify_insn): Likwise.
(frv_ifcvt_modify_final): Likwise for local "existing_insn",
adding an as_a <rtx_insn *> cast. Likewise for local "insn".
* config/mips/mips.c (r10k_insert_cache_barriers): Add an
as_a <rtx_insn *> cast to local "unprotected_region" once
it's been established that it's not NULL or pc_rtx.
* config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
param "sethi" from rtx to rtx_insn *.
(nds32_group_float_insns): Likewise for param "insn".
* config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
param.
(vax_output_int_subtract): Likewise.
* config/vax/vax.c (vax_output_int_add): Likewise for param
"insn".
(vax_output_int_subtract): Likewise.
* emit-rtl.c (set_insn_deleted): Likewise, removing cast.
(emit_pattern_after): Likewise for param "after".
(emit_insn_after): Likewise.
(emit_jump_insn_after): Likewise.
(emit_call_insn_after): Likewise.
(emit_debug_insn_after): Likewise.
(emit_pattern_before): Likewise for param "before".
(emit_insn_before): Likewise.
(emit_jump_insn_before): Likewise.
* final.c (get_insn_template): Likewise for param "insn", removing
a cast.
* output.h (get_insn_template): Likewise for 2nd param.
* rtl.h (emit_insn_before): Likewise.
(emit_jump_insn_before): Likewise.
(emit_debug_insn_before_noloc): Likewise.
(emit_insn_after): Likewise.
(emit_jump_insn_after): Likewise.
(emit_call_insn_after): Likewise.
(emit_debug_insn_after): Likewise.
(set_insn_deleted): Likewise for param.
2018-06-18 Michael Meissner <meissner@linux.ibm.com>
PR target/85358
* config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
floating point modes, so that IFmode is numerically greater than
TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
to declare the ordering. This prevents IFmode from being
converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
machine. Include rs6000-modes.h to share the fractional values
between genmodes* and the rest of the compiler.
(IFmode): Likewise.
(KFmode): Likewise.
(TFmode): Likewise.
* config/rs6000/rs6000-modes.h: New file.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
meaning of rs6000_long_double_size so that 126..128 selects an
appropriate 128-bit floating point type.
(rs6000_option_override_internal): Likewise.
* config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
(TARGET_LONG_DOUBLE_128): Change the meaning of
rs6000_long_double_size so that 126..128 selects an appropriate
128-bit floating point type.
(LONG_DOUBLE_TYPE_SIZE): Update comment.
* config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
source and destination to match the standard usage.
(truncifkf2): Likewise.
(copysign<mode>3, IEEE iterator): Rework copysign of float128 on
ISA 2.07 to use an explicit clobber, instead of passing in a
temporary.
(copysign<mode>3_soft): Likewise.
2018-06-18 David Malcolm <dmalcolm@redhat.com>
* tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
Replace dump_printf_loc call with DUMP_VECT_SCOPE.
(vect_slp_analyze_instance_dependence): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
(vect_analyze_data_refs_alignment): Likewise.
(vect_slp_analyze_and_verify_instance_alignment
(vect_analyze_data_ref_accesses): Likewise.
(vect_prune_runtime_alias_test_list): Likewise.
(vect_analyze_data_refs): Likewise.
* tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
* tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
(vect_analyze_scalar_cycles_1): Likewise.
(vect_get_loop_niters): Likewise.
(vect_analyze_loop_form_1): Likewise.
(vect_update_vf_for_slp): Likewise.
(vect_analyze_loop_operations): Likewise.
(vect_analyze_loop): Likewise.
(vectorizable_induction): Likewise.
(vect_transform_loop): Likewise.
* tree-vect-patterns.c (vect_pattern_recog): Likewise.
* tree-vect-slp.c (vect_analyze_slp): Likewise.
(vect_make_slp_decision): Likewise.
(vect_detect_hybrid_slp): Likewise.
(vect_slp_analyze_operations): Likewise.
(vect_slp_bb): Likewise.
* tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
(vectorizable_bswap): Likewise.
(vectorizable_call): Likewise.
(vectorizable_simd_clone_call): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
* tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2018-06-18 Martin Sebor <msebor@redhat.com>
PR tree-optimization/81384
* builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
* builtins.c (expand_builtin_strnlen): New function.
(expand_builtin): Call it.
(fold_builtin_n): Avoid setting TREE_NO_WARNING.
* builtins.def (BUILT_IN_STRNLEN): New.
* calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
Warn for bounds in excess of maximum object size.
* tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
single-value ranges. Handle strnlen.
(handle_builtin_strlen): Handle strnlen.
(strlen_check_and_optimize_stmt): Same.
* doc/extend.texi (Other Builtins): Document strnlen.
2018-06-18 Maya Rashish <coypu@sdf.org>
* config/alpha/openbsd.h (TARGET_DEFAULT): Define.
(LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
(INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
* config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
here to ...
* config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* tree.c (escaped_string::escape): Replace cast to char * by
const_cast<char *> (unescaped).
2018-06-18 Nick Clifton <nickc@redhat.com>
PR 84195
* tree.c (escaped_string): New class. Converts an unescaped
string into its escaped equivalent.
(warn_deprecated_use): Use the new class to convert the
deprecation message, if present.
(test_escaped_strings): New self test.
(test_c_tests): Add test_escaped_strings.
* doc/extend.texi (deprecated): Add a note that the
deprecation message is affected by the -fmessage-length
option, and that control characters will be escaped.
(#pragma GCC error): Document this pragma.
(#pragma GCC warning): Likewise.
* doc/invoke.texi (-fmessage-length): Document this option's
effect on the #warning and #error preprocessor directives and
the deprecated attribute.
2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (decl_value_expr_lookup): Revert latest change.
(decl_value_expr_insert): Likewise.
2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
* gimplify.c (nonlocal_vlas): Delete.
(nonlocal_vla_vars): Likewise.
(gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
referenced VLAs.
(gimplify_body): Do not create and destroy nonlocal_vlas.
* tree-nested.c: Include diagnostic.h.
(use_pointer_in_frame): Tweak.
(lookup_field_for_decl): Add assertion and declare the transformation.
(convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
internal error when the reference is in a wrong context. Do not
create a debug decl by default.
(note_nonlocal_block_vlas): Delete.
(convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
(convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
create a debug decl by default.
(convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
call is in a wrong context.
(fixup_vla_decls): New function.
(finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
debug variables were created.
* tree.c (decl_value_expr_lookup): Add checking assertion.
(decl_value_expr_insert): Likewise.
2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/82479
* ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
* tree-scalar-evolution.c (interpret_expr): Likewise.
(expression_expensive_p): Likewise.
* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
* tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
(number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
(ssa_defined_by_minus_one_stmt_p): New.
2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
PR middle-end/64946
* cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
* config/i386/i386.c (ix86_add_stmt_cost): Likewise.
* dojump.c (do_jump): Likewise.
* expr.c (expand_expr_real_2): Check operand type's sign.
* fold-const.c (const_unop): Handle ABSU_EXPR.
(fold_abs_const): Likewise.
* gimple-pretty-print.c (dump_unary_rhs): Likewise.
* gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
(strip_sign_op_1): Likesise.
* match.pd: Add new pattern to generate ABSU_EXPR.
* optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
* tree-cfg.c (verify_gimple_assign_unary): Likewise.
* tree-eh.c (operation_could_trap_helper_p): Likewise.
* tree-inline.c (estimate_operator_cost): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
* tree.def (ABSU_EXPR): New.
2018-06-16 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86095
* common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
documented as preserved for backward compatibility only.
* doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
PR rtl-optimization/86108
* bb-reorder.c (create_forwarder_block): Renamed to ...
(create_eh_forwarder_block): ... this. Split OLD_BB after labels and
jump from new landing pad to the second part.
(sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
Adjust callers.
2018-06-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85878
* expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
Only call store_expr for halves if the mode is the same.
PR middle-end/86123
* match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
Fix up comment formatting.
2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
* typed-splay-tree.h (typed_splay_tree::remove): New function.
(typed_splay_tree::closure,
typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
(typed_splay_tree::typed_splay_tree,
typed_splay_tree::operator =): Declared private.
(typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
typed_splay_tree::splay_tree_splay,
typed_splay_tree::splay_tree_foreach_helper,
typed_splay_tree::splay_tree_insert,
typed_splay_tree::splay_tree_remove,
typed_splay_tree::splay_tree_lookup,
typed_splay_tree::splay_tree_predecessor,
typed_splay_tree::splay_tree_successor,
typed_splay_tree::splay_tree_min,
typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
(typed_splay_tree::root, typed_splay_tree::comp,
typed_splay_tree::delete_key,
typed_splay_tree::delete_value): New data members.
* typed-splay-tree.c (selftest::test_str_to_int): Add a test for
typed_splay_tree::remove.
2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
* config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
-mginv and -mno-ginv to the assembler.
* config/mips/mips.opt (-mcrc): New option.
(-mginv): Likewise.
* doc/invoke.text (-mcrc): Document.
(-mginv): Likewise.
2018-06-15 Nick Clifton <nickc@redhat.com>
PR 84195
* tree.c (escaped_string): New class. Converts an unescaped
string into its escaped equivalent.
(warn_deprecated_use): Use the new class to convert the
deprecation message, if present.
(test_escaped_strings): New self test.
(test_c_tests): Add test_escaped_strings.
* doc/extend.texi (deprecated): Add a note that the
deprecation message is affected by the -fmessage-length
option, and that control characters will be escaped.
(#pragma GCC error): Document this pragma.
(#pragma GCC warning): Likewise.
* doc/invoke.texi (-fmessage-length): Document this option's
effect on the #warning and #error preprocessor directives and
the deprecated attribute.
2018-06-15 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
here, also noting vector size used.
* tree-vectorizer.c (vectorize_loops): Adjust. Note vector
size used in MSG_OPTIMIZED_LOCATIONS dump.
(pass_slp_vectorize::execute): Adjust.
2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
PR target/85968
* config/arc/arc.c (arc_return_address_register): Fix
if-condition.
2018-06-15 Richard Biener <rguenther@suse.de>
PR middle-end/86159
* tree-cfg.c (gimplify_build3): Do not strip sign conversions,
leave useless conversion stripping to force_gimple_operand_gsi.
(gimplify_build2): Likewise.
(gimplify_build1): Likewise.
2018-06-15 Richard Biener <rguenther@suse.de>
PR middle-end/86076
* tree-cfg.c (move_stmt_op): unshare invariant addresses
before adjusting their block.
2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
multilibs for *-*-rtems*.
* config/riscv/t-rtems: New file.
2018-06-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86122
* match.pd ((A +- CST1) +- CST2): Punt if last resort
unsigned_type_for returns NULL.
PR target/85945
* lower-subreg.c (find_decomposable_subregs): Don't decompose float
subregs of multi-word pseudos unless the float mode has word size.
2018-06-14 Richard Biener <rguenther@suse.de>
PR middle-end/86139
* tree-vect-generic.c (build_word_mode_vector_type): Remove
duplicate and harmful type_hash_canon.
* tree.c (type_hash_canon): Assert we didn't find ourselves.
2018-06-14 Richard Biener <rguenther@suse.de>
PR ipa/86124
* tree-ssa-struct-alias.c (create_variable_info_for): Handle
NULL cgraph_node.
2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config/rtems.h (STDINT_LONG32): Define.
2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
Prachi Godbole <prachi.godbole@imgtec.com>
* config/mips/mips-cpus.def: Define P6600.
* config/mips/mips-tables.opt: Regenerate.
* config/mips/mips.c (mips_ucbranch_type): New enum.
(mips_rtx_cost_data): Add support for P6600.
(mips_issue_rate): Likewise.
(mips_multipass_dfa_lookahead): Likewise.
(mips_avoid_hazard): Likewise.
(mips_reorg_process_insns): Likewise.
(mips_classify_branch_p6600): New function.
* config/mips/mips.h (TUNE_P6600): New define.
(MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
(ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
* config/mips/mips.md: Include p6600.md.
(processor): Add p6600.
* config/mips/p6600.md: New file.
* doc/invoke.texi: Add p6600 to supported architectures.
2018-06-13 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86114
* gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
of integer types.
* tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2018-06-13 Richard Biener <rguenther@suse.de>
* tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
Properly set vector type of the intermediate stmt.
* tree-vect-stmts.c (vectorizable_operation): The destination
var always has vectype_out type.
2018-06-13 Jeff Law <law@redhat.com>
* config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
integer 0 for argument to print_rtl_with_bb.
(rl78_reorg): Likewise.
2018-06-13 David Malcolm <dmalcolm@redhat.com>
* config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
from rtx to rtx_insn *.
* config/bfin/bfin.c (hwloop_optimize): Likewise for local
"label".
(add_sched_insns_for_speculation): Likewise for local "target",
converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
* config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
from rtx_insn ** to rtx_code_label **.
(reorg_emit_nops): Likewise.
(c6x_reorg): Likewise for local "call_labels".
* config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
rtx to rtx_insn *.
* config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
the loops over LABEL_REFS.
(fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
braf_label.
(barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
(get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
(split_branches): Strengthen local "olabel" from rtx to
rtx_insn *, adding a safe_as_a cast.
* emit-rtl.c (next_real_insn): Strengthen param from "rtx"
to "rtx_insn *".
(add_insn_after): Likewise for first two params.
(add_insn_before): Likewise.
(remove_insn): Likewise for param.
(emit_pattern_before_noloc): Likewise for second and third params.
(emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
(emit_call_insn_before_noloc): Likewise.
(emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
to "rtx_insn *".
(emit_barrier_before): Likewise.
(emit_label_before): Strengthen "label" param from "rtx" to
"rtx_code_label *". Strengthen "before" param from "rtx" to
"rtx_insn *".
(emit_insn_after_1): Strengthen "after" param from "rtx" to
"rtx_insn *".
(emit_pattern_after_noloc): Likewise.
(emit_insn_after_noloc): Likewise.
(emit_jump_insn_after_noloc): Likewise.
(emit_call_insn_after_noloc): Likewise.
(emit_debug_insn_after_noloc): Likewise.
(emit_barrier_after): Likewise.
(emit_label_after): Likewise for both params.
(emit_pattern_after_setloc): Likewise for "after" param. Convert
"loc" param from "int" to "location_t".
(emit_insn_after_setloc): Likewise.
(emit_jump_insn_after_setloc): Likewise.
(emit_call_insn_after_setloc): Likewise.
(emit_debug_insn_after_setloc): Likewise.
(emit_pattern_before_setloc): Likewise for "before" param. Convert
"loc" param from "int" to "location_t".
(emit_pattern_before): Convert NULL_RTX to NULL.
(emit_insn_before_setloc): Convert "loc" param from "int" to
"location_t".
(emit_jump_insn_before_setloc): Likewise.
(emit_call_insn_before_setloc): Likewise.
(emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
rtx_insn *. Convert "loc" param from "int" to "location_t".
* rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
Convert 3rd param from "int" to "location_t".
(emit_barrier_before, emit_barrier_after, next_real_insn):
Strengthen param from rtx to rtx_insn *.
(emit_label_before): Strengthen 1st param from "rtx" to
"rtx_code_label *". Strengthen 2nd param from "rtx" to
"rtx_insn *".
(emit_insn_after_noloc, emit_jump_insn_after_noloc,
emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
Strengthen 2nd param from "rtx" to "rtx_insn *".
(emit_insn_after_setloc, emit_jump_insn_after_setloc)
emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
Likewise. Convert 3rd param from "int" to "location_t".
(emit_label_after): Strengthen 1st param from "rtx" to
"rtx_code_label *".
(next_real_insn, remove_insn): Strengthen param from "rtx" to
"rtx_insn *".
(add_insn_before, add_insn_after): Strengthen 1st and 2nd params
from "rtx" to "rtx_insn *".
2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
* cgraph.c (cgraph_node::get_untransformed_body): Dump function
bodies streamed in with -Q.
* dumpfile.c (dump_files): Add lto-stream-out dump file.
* dumpfile.h (tree_dump_index): Add lto_stream_out.
* gimple-streamer-out.c: Include gimple-pretty-print.h
(output_bb): Dump stmts streamed.
* lto-section-out.c: Include print-tree.h
(lto_begin_section): Dump sections created.
(lto_output_decl_index): Dump decl encoded.
* lto-streamer-out.c: Include print-tree.h
(create_output_block): Dump output block created.
(DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
(output_function): Dump function output.
(output_constructor): Dump constructor streamed.
(write_global_stream): Output indexes encoded.
(produce_asm_for_decls): Dump streams encoded.
* lto-streamer.c (streamer_dump_file): New global var.
* lto-streamer.h (streamer_dump_file): Declare.
* passes.c (ipa_write_summaries): Initialize streamer dump.
* varpool.c (varpool_node::get_constructor): Dump constructors streamed
in.
2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
PR target/86048
* config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
offsets for register save directives. Emit a second batch of save
directives, if need be, when the function accesses prior frames.
2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/fpu.md (fmasf4): Force operand to register.
(fnmasf4): Likewise.
2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (arc_pad_return): Remove.
* config/arc/arc.c (machine_function): Remove force_short_suffix
and size_reason.
(arc_print_operand): Adjust printing of '&'.
(arc_verify_short): Remove conditional printing of short suffix.
(arc_final_prescan_insn): Remove reference to size_reason.
(pad_return): New function.
(arc_reorg): Call pad_return.
(arc_pad_return): Remove.
(arc_init_machine_status): Remove reference to force_short_suffix.
* config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
(attr length): When attribute iscompact is true force to 2
regardless; in the case of maybe check if we want to force the
instruction to have 4 bytes length.
(nopv): Change it to generate 4 byte long nop as well.
(blockage): New pattern.
(simple_return): Remove call to arc_pad_return.
(p_return_i): Likewise.
2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/builtins.def (SYNC): SYNC instruction is valid on all
ARC cores.
2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (atomic_exchangesi): EX instruction is default
for ARC700 and ARCv2.
2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
PR target/86076
* config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
operands[2] instead of operands[1].
2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
* lra-constraints.c (simplify_operand_subreg): In the paradoxical
case, check whether the outer register overlaps an unallocatable
register, not just whether it fits the required class.
2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
* poly-int.h (can_div_trunc_p): Add new overload in which all values
are poly_ints.
* alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
(memrefs_conflict_p): Likewise.
(init_alias_analysis): Likewise.
* cfgexpand.c (expand_debug_expr): Likewise.
* combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
* cse.c (fold_rtx): Likewise.
* explow.c (adjust_stack, anti_adjust_stack): Likewise.
* expr.c (emit_block_move_hints): Likewise.
(clear_storage_hints, push_block, emit_push_insn): Likewise.
(store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
(emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
(emit_group_store): Likewise.
(find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
to read the PRE/POST_MODIFY increment.
* calls.c (store_one_arg): Use strip_offset.
* rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
poly_int_rtx_p.
(set_noop_p): Use rtx_to_poly_int64 for the elements selected
by a VEC_SELECT.
* simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
(simplify_binary_operation_1): Extend CONST_INT handling to
poly_int_rtx_p.
* var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
than a HOST_WIDE_INT.
(hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
poly_int64.
(adjust_mems, add_stores): Update accodingly.
(vt_canonicalize_addr): Track polynomial offsets.
(emit_note_insn_var_location): Likewise.
(vt_add_function_parameter): Likewise.
(vt_initialize): Likewise.
2018-06-12 Jeff Law <law@redhat.com>
* config.gcc (alpha*-*-freebsd*): Remove.
* config/alpha/freebsd.h: Remove.
2018-06-12 David Malcolm <dmalcolm@redhat.com>
PR other/69968
* spellcheck-tree.c (levenshtein_distance): Rename to...
(get_edit_distance): ...this, and update for underlying renaming.
* spellcheck-tree.h (levenshtein_distance): Rename to...
(get_edit_distance): ...this.
* spellcheck.c (levenshtein_distance): Rename to...
(get_edit_distance): ...this. Convert from Levenshtein distance
to Damerau-Levenshtein distance by supporting transpositions of
adjacent characters. Rename "v1" to "v_next" and "v0" to
"v_one_ago".
(selftest::levenshtein_distance_unit_test_oneway): Rename to...
(selftest::test_edit_distance_unit_test_oneway): ...this, and
update for underlying renaming.
(selftest::levenshtein_distance_unit_test): Rename to...
(selftest::test_get_edit_distance_unit): ...this, and update for
underlying renaming.
(selftest::test_find_closest_string): Add example from PR 69968
where transposition helps
(selftest::test_metric_conditions): Update for renaming.
(selftest::test_metric_conditions): Likewise.
(selftest::spellcheck_c_tests): Likewise.
* spellcheck.h (levenshtein_distance): Rename both overloads to...
(get_edit_distance): ...this.
(best_match::consider): Update for renaming.
2018-06-12 Martin Sebor <msebor@redhat.com>
PR tree-optimization/85259
* builtins.c (compute_objsize): Handle constant offsets.
* gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
true iff a warning has been issued.
* gimple.h (gimple_nonartificial_location): New function.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
gimple_nonartificial_location and handle -Wno-system-headers.
(handle_builtin_stxncpy): Same.
2018-06-12 Martin Sebor <msebor@redhat.com>
PR c/85931
* fold-const.c (operand_equal_p): Handle SAVE_EXPR.
2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
BUILTIN_VEC_XST entries for pointer to double and long long.
2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
PR target/85990
* config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
Update comments.
* config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
Likewise.
2018-06-12 Martin Liska <mliska@suse.cz>
* doc/options.texi: Document IntegerRange.
2018-06-12 Martin Liska <mliska@suse.cz>
* config/i386/i386.opt: Make MPX-related options as Deprecated.
* opt-functions.awk: Handle Deprecated flag.
* opts-common.c (decode_cmdline_option): Handle cl_deprecated
and report error.
(read_cmdline_option): Report warning for a deprecated option.
* opts.h (struct cl_option): Add new field cl_deprecated.
(CL_ERR_DEPRECATED): New.
2018-06-12 Martin Liska <mliska@suse.cz>
* doc/options.texi: Document Deprecated option flag.
2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-arch.h (arc_extras): New enum.
(arc_cpu_t):Add field extra.
(arc_cpu_types): Consider the extras.
* config/arc/arc-cpus.def: Add extras info.
* config/arc/arc-opts.h (processor_type): Consider extra field.
* config/arc/arc.c (arc_override_options): Handle extra field.
2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-arch.h: Update ARC_OPTX macro.
* config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
field.
* config/arc/arc.c (arc_init): Update pic warning.
(irq_range): Update irq range parsing warnings.
(arc_override_options): Update various warning messages.
(arc_handle_aux_attribute): Likewise.
2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
* config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* doc/sourcebuild.texi: Document usage of line number 0 in verify
compiler messages directives.
2018-06-12 Matthew Fortune <mfortune@gmail.com>
* config/mips/mips-cpus.def: New MIPS_CPU for i6500.
* config/mips/mips-tables.opt: Regenerate.
* config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
mips64r6.
* doc/invoke.texi: Document -march=i6500.
2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
* config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
(i6400_gpmul): Add cpu_unit.
(i6400_gpdiv): Likewise.
(i6400_msa_add_d): Update reservations.
(i6400_msa_int_add) Likewise.
(i6400_msa_short_logic3) Likewise.
(i6400_msa_short_logic2) Likewise.
(i6400_msa_short_logic) Likewise.
(i6400_msa_move) Likewise.
(i6400_msa_cmp) Likewise.
(i6400_msa_short_float2) Likewise.
(i6400_msa_div_d) Likewise.
(i6400_msa_long_logic1) Likewise.
(i6400_msa_long_logic2) Likewise.
(i6400_msa_mult) Likewise.
(i6400_msa_long_float2) Likewise.
(i6400_msa_long_float4) Likewise.
(i6400_msa_long_float5) Likewise.
(i6400_msa_long_float8) Likewise.
(i6400_fpu_fadd): Include frint type.
(i6400_fpu_store): New define_insn_reservation.
(i6400_fpu_load): Likewise.
(i6400_fpu_move): Likewise.
(i6400_fpu_fcmp): Likewise.
(i6400_fpu_fmadd): Likewise.
(i6400_int_mult): Include imul3nc type and update reservation.
(i6400_int_div): Include idiv3 type and update reservation.
(i6400_int_load): Update to check type not move_type.
(i6400_int_store): Likewise.
(i6400_int_prefetch): Set zero latency.
2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c: Document new %@{...} sequence.
(LINK_COMMAND_SPEC): Use it for the -L switches.
(cpp_unique_options): Use it for the -I switches.
(at_file_argbuf): New global variable.
(in_at_file): Likewise.
(alloc_args): Create at_file_argbuf.
(clear_args): Truncate at_file_argbuf.
(store_arg): If in_at_file, push the argument onto at_file_argbuf.
(open_at_file): New function.
(close_at_file): Likewise.
(create_at_file): Delete.
(do_spec_1) <'i'>: Use open_at_file/close_at_file.
<'o'>: Likewise.
<'@'>: New case.
(validate_switches_from_spec): Deal with %@{...} sequence.
(validate_switches): Likewise.
(driver::finalize): Call clear_args.
2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
* config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
2018-06-11 Martin Sebor <msebor@redhat.com>
* doc/invoke.texi (-Wall): List -Wc++17-compat.
(Wno-class-memaccess): Add @opindex.
(Wno-templates, Wno-multiple-inheritance): Same.
(Wno-virtual-inheritance, Wno-namespaces): Same.
(Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
(Wno-format-overflow, Wno-format-truncation): Same.
(Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
(Wno-alloc-size-larger-than, Wframe-larger-than): Same
(Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
(Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
(Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
(Wno-misspelled-isr): Same.
2018-06-11 Martin Sebor <msebor@redhat.com>
* PR tree-optimization/86083
* tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
* tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
PR target/85755
* config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
on the correct operand.
(*movdi_internal64): Ditto.
2018-06-11 Martin Liska <mliska@suse.cz>
PR tree-optimization/86089
* tree-ssa-strlen.c (get_string_length): Move back removed hunk.
2018-06-11 Julia Koval <julia.koval@intel.com>
* config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
_mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
* config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2018-06-11 Olivier Hainque <hainque@adacore.com>
* dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
for Ada with strict dwarf2.
2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
PR target/85755
* config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
addresses.
2018-06-08 Jan Hubicka <hubicka@ucw.cz>
* dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2018-06-08 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
TARGET_ELF.
2018-06-08 Martin Liska <mliska@suse.cz>
* tree-cfg.h (debug_function): Fix argument type to match
implementation.
2018-06-08 Martin Liska <mliska@suse.cz>
* config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
Remove usage of MPX-related (and removed) fields.
* config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2018-06-08 David Malcolm <dmalcolm@redhat.com>
* cfg.c (debug): Use TDF_NONE rather than 0.
* cfghooks.c (debug): Likewise.
* dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
(struct dump_option_value_info): Convert to...
(struct kv_pair): ...this template type.
(dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
rather than 0.
(optinfo_verbosity_options): Likewise.
(optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
OPTGROUP_NONE.
(gcc::dump_manager::dump_register): Use optgroup_flags_t rather
than int for "optgroup_flags" param.
(dump_generic_expr_loc): Use dump_flags_t rather than int for
"dump_kind" param.
(dump_dec): Likewise.
(dump_finish): Use TDF_NONE rather than 0.
(gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
rather than int for "optgroup_flags" param. Use TDF_NONE rather
than 0. Update for change to option_ptr.
(opt_info_switch_p_1): Convert "optgroup_flags" param from int *
to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
0. Update for changes to optinfo_verbosity_options and
optgroup_options.
(opt_info_switch_p): Convert optgroup_flags from int to
optgroup_flags_t.
(dump_basic_block): Use dump_flags_t rather than int
for "dump_kind" param.
* dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
TDF_NONE): Convert from macros to...
(enum dump_flag): ...this new enum.
(dump_flags_t): Update to use enum.
(operator|, operator&, operator~, operator|=, operator&=):
Implement for dump_flags_t.
(OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
Convert from macros to...
(enum optgroup_flag): ...this new enum.
(optgroup_flags_t): New typedef.
(operator|, operator|=): Implement for optgroup_flags_t.
(struct dump_file_info): Convert field "alt_flags" to
dump_flags_t. Convert field "optgroup_flags" to
optgroup_flags_t.
(dump_basic_block): Use dump_flags_t rather than int for param.
(dump_generic_expr_loc): Likewise.
(dump_dec): Likewise.
(dump_register): Convert param "optgroup_flags" to
optgroup_flags_t.
(opt_info_enable_passes): Likewise.
* early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
than 0.
* gimple-pretty-print.c (debug): Likewise.
* gimple-ssa-store-merging.c (bswap_replace): Likewise.
(merged_store_group::apply_stores): Likewise.
* gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
* gimple.c (verify_gimple_pp): Likewise.
* graphite-poly.c (print_pbb_body): Likewise.
* passes.c (pass_manager::register_one_dump_file): Convert
local "optgroup_flags" to optgroup_flags_t.
* print-tree.c (print_node): Use TDF_NONE rather than 0.
(debug): Likewise.
(debug_body): Likewise.
* tree-pass.h (struct pass_data): Convert field "optgroup_flags"
to optgroup_flags_t.
* tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
than 0.
* tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
(convert_mult_to_fma): Likewise.
* tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
* tree-ssa-sccvn.c (vn_eliminate): Likewise.
* tree-vect-data-refs.c (dump_lower_bound): Convert param
"dump_kind" to dump_flags_t.
2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (min, max): Delete.
2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
* doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
-mabi=spe and -mabi=no-spe.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-pure-const.c (propagate_pure_const): Use ::get at places
where we expect an existing summary.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
* ipa-inline.h (estimate_edge_growth): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* cgraph.c (function_version_hasher::hash): Use
cgraph_node::get_uid ().
(function_version_hasher::equal):
* cgraph.h (cgraph_node::get_uid): New method.
* ipa-inline.c (update_caller_keys): Use
cgraph_node::get_uid ().
(update_callee_keys): Likewise.
* ipa-utils.c (searchc): Likewise.
(ipa_reduced_postorder): Likewise.
* lto-cgraph.c (input_node): Likewise.
* passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
* symbol-summary.h (symtab_insertion): Likewise.
(symtab_removal): Likewise.
(symtab_duplication): Likewise.
* tree-pretty-print.c (dump_function_header): Likewise.
* tree-sra.c (convert_callers_for_node): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* cgraph.c (symbol_table::create_edge): Always assign a new
unique number.
(symbol_table::free_edge): Do not recycle numbers.
* cgraph.h (cgraph_edge::get): New method.
* symbol-summary.h (symtab_removal): Use it.
(symtab_duplication): Likewise.
(call_summary::hashable_uid): Remove.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
(initialize_growth_caches): Remove.
(free_growth_caches): Likewise.
(do_estimate_edge_time): Use edge_growth_cache.
(do_estimate_edge_size): Likewise.
(do_estimate_edge_hints): Likewise.
* ipa-inline.c (reset_edge_caches): Likewise.
(recursive_inlining): Likewise.
(inline_small_functions): Likewise.
* ipa-inline.h (initialize_growth_caches): Remove.
(estimate_edge_size): Likewise.
(estimate_edge_time): Likewise.
(estimate_edge_hints): Likewise.
(reset_edge_growth_cache): Likewise.
* symbol-summary.h (call_summary::remove): New method.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-cp.c (class edge_clone_summary): New summary.
(grow_edge_clone_vectors): Remove.
(ipcp_edge_duplication_hook): Remove.
(class edge_clone_summary_t): New call_summary class.
(ipcp_edge_removal_hook): Remove.
(edge_clone_summary_t::duplicate): New function.
(get_next_cgraph_edge_clone): Use edge_clone_summaries.
(create_specialized_node): Likewise.
(ipcp_driver): Initialize edge_clone_summaries and do not
register hooks.
2018-06-08 Martin Liska <mliska@suse.cz>
* symbol-summary.h (get): New function.
(call_summary::m_initialize_when_cloning): New class member.
2018-06-08 Martin Liska <mliska@suse.cz>
* cgraph.c (cgraph_node::remove): Do not recycle uid.
* cgraph.h (symbol_table::release_symbol): Do not pass uid.
(symbol_table::allocate_cgraph_symbol): Do not set uid.
* passes.c (uid_hash_t): Record removed_nodes by their uids.
(remove_cgraph_node_from_order): Use the removed_nodes set.
(do_per_function_toporder): Likwise.
* symbol-summary.h (symtab_insertion): Use cgraph_node::uid
instead of summary_uid.
(symtab_removal): Likewise.
(symtab_duplication): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-cp.c (ipcp_store_bits_results): Use
ipcp_transformation_sum.
(ipcp_store_vr_results): Likewise.
* ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
to ...
(ipcp_transformation_initialize): ... this.
(ipa_set_node_agg_value_chain):
(ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
(write_ipcp_transformation_info): Likewise.
(read_ipcp_transformation_info): Likewise.
(ipcp_update_bits): Likewise.
(ipcp_update_vr): Likewise.
(ipcp_transform_function): Likewise.
* ipa-prop.h: Rename ipcp_transformation_summary to
ipcp_transformation.
(class ipcp_transformation_t): New function summary.
(ipcp_get_transformation_summary): Use ipcp_transformation_sum.
(ipa_get_agg_replacements_for_node): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-pure-const.c (struct funct_state_d): Do it class instead
of struct.
(class funct_state_summary_t): New function_summary class.
(has_function_state): Remove.
(get_function_state): Likewise.
(set_function_state): Likewise.
(add_new_function): Likewise.
(funct_state_summary_t::insert): New function.
(duplicate_node_data): Remove.
(remove_node_data): Remove.
(funct_state_summary_t::duplicate): New function.
(register_hooks): Create new funct_state_summaries.
(pure_const_generate_summary): Use it.
(pure_const_write_summary): Likewise.
(pure_const_read_summary): Likewise.
(propagate_pure_const): Likewise.
(propagate_nothrow): Likewise.
(dump_malloc_lattice): Likewise.
(propagate_malloc): Likewise.
(execute): Do not register hooks, just remove summary
instead.
(pass_ipa_pure_const::pass_ipa_pure_const): Simplify
constructor.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-reference.c (remove_node_data): Remove.
(duplicate_node_data): Likewise.
(class ipa_ref_var_info_summary_t): New class.
(class ipa_ref_opt_summary_t): Likewise.
(get_reference_vars_info): Use ipa_ref_var_info_summaries.
(get_reference_optimization_summary): Use
ipa_ref_opt_sum_summaries.
(set_reference_vars_info): Remove.
(set_reference_optimization_summary): Likewise.
(ipa_init): Create summaries.
(init_function_info): Use function summary.
(ipa_ref_opt_summary_t::duplicate): New function.
(ipa_ref_opt_summary_t::remove): New function.
(get_read_write_all_from_node): Fix GNU coding style.
(propagate): Use function summary.
(write_node_summary_p): Fix GNU coding style.
(stream_out_bitmap): Likewise.
(ipa_reference_read_optimization_summary): Use function summary.
(ipa_reference_c_finalize): Do not release hooks.
2018-06-08 Martin Liska <mliska@suse.cz>
* ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
(analyze_function_body): Extract multiple calls of get_create.
* ipa-inline-analysis.c (simple_edge_hints): Likewise.
* ipa-inline.c (recursive_inlining): Use ::get method.
* ipa-inline.h (estimate_edge_growth): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
HSA_INVALID.
(hsa_function_summary::hsa_function_summary): Use the new enum
value.
(hsa_gpu_implementation_p): Use hsa_summaries::get.
* hsa-gen.c (hsa_get_host_function): Likewise.
(get_brig_function_name): Likewise.
* ipa-hsa.c (process_hsa_functions): Likewise.
(ipa_hsa_write_summary): Likewise.
* symbol-summary.h (symtab_duplication): Use ::get function/
(get): New function.
2018-06-08 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (ix86_can_inline_p): Use get_create instead
of get.
* hsa-common.c (hsa_summary_t::link_functions): Likewise.
(hsa_register_kernel): Likewise.
* hsa-common.h (hsa_gpu_implementation_p): Likewise.
* hsa-gen.c (hsa_get_host_function): Likewise.
(get_brig_function_name): Likewise.
(generate_hsa): Likewise.
(pass_gen_hsail::execute): Likewise.
* ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
(devirtualization_time_bonus): Likewise.
(ipcp_propagate_stage): Likewise.
* ipa-fnsummary.c (redirect_to_unreachable): Likewise.
(edge_set_predicate): Likewise.
(evaluate_conditions_for_known_args): Likewise.
(evaluate_properties_for_edge): Likewise.
(ipa_fn_summary::reset): Likewise.
(ipa_fn_summary_t::duplicate): Likewise.
(dump_ipa_call_summary): Likewise.
(ipa_dump_fn_summary): Likewise.
(analyze_function_body): Likewise.
(compute_fn_summary): Likewise.
(estimate_edge_devirt_benefit): Likewise.
(estimate_edge_size_and_time): Likewise.
(estimate_calls_size_and_time): Likewise.
(estimate_node_size_and_time): Likewise.
(inline_update_callee_summaries): Likewise.
(remap_edge_change_prob): Likewise.
(remap_edge_summaries): Likewise.
(ipa_merge_fn_summary_after_inlining): Likewise.
(ipa_update_overall_fn_summary): Likewise.
(read_ipa_call_summary): Likewise.
(inline_read_section): Likewise.
(write_ipa_call_summary): Likewise.
(ipa_fn_summary_write): Likewise.
(ipa_free_fn_summary): Likewise.
* ipa-hsa.c (process_hsa_functions): Likewise.
(ipa_hsa_write_summary): Likewise.
(ipa_hsa_read_section): Likewise.
* ipa-icf.c (sem_function::merge): Likewise.
* ipa-inline-analysis.c (simple_edge_hints): Likewise.
(do_estimate_edge_time): Likewise.
(estimate_size_after_inlining): Likewise.
(estimate_growth): Likewise.
(growth_likely_positive): Likewise.
* ipa-inline-transform.c (clone_inlined_nodes): Likewise.
(inline_call): Likewise.
* ipa-inline.c (caller_growth_limits): Likewise.
(can_inline_edge_p): Likewise.
(can_inline_edge_by_limits_p): Likewise.
(compute_uninlined_call_time): Likewise.
(compute_inlined_call_time): Likewise.
(want_inline_small_function_p): Likewise.
(edge_badness): Likewise.
(update_caller_keys): Likewise.
(update_callee_keys): Likewise.
(recursive_inlining): Likewise.
(inline_small_functions): Likewise.
(inline_to_all_callers_1): Likewise.
(dump_overall_stats): Likewise.
(early_inline_small_functions): Likewise.
(early_inliner): Likewise.
* ipa-inline.h (estimate_edge_growth): Likewise.
* ipa-profile.c (ipa_propagate_frequency_1): Likewise.
* ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
* ipa-prop.h (IPA_NODE_REF): Likewise.
(IPA_EDGE_REF): Likewise.
* ipa-pure-const.c (malloc_candidate_p): Likewise.
(propagate_malloc): Likewise.
* ipa-split.c (execute_split_functions): Likewise.
* symbol-summary.h: Rename get to get_create.
(get): Likewise.
(get_create): Likewise.
* tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* symbol-summary.h (release): Move definition out of class
declaration.
(symtab_removal): Likewise.
(symtab_duplication): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* symbol-summary.h (function_summary): Move constructor
implementation out of class declaration.
(release): Likewise.
(symtab_insertion): Likewise.
(symtab_removal): Likewise.
(symtab_duplication): Likewise.
(get): Likewise.
2018-06-08 Martin Liska <mliska@suse.cz>
* Makefile.in: Remove support for MPX (macros, related functions,
fields in cgraph_node, ...).
* builtin-types.def (BT_BND): Likewise.
(BT_FN_BND_CONST_PTR): Likewise.
(BT_FN_CONST_PTR_BND): Likewise.
(BT_FN_VOID_PTR_BND): Likewise.
(BT_FN_BND_CONST_PTR_SIZE): Likewise.
(BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
* builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
(expand_builtin_mempcpy_with_bounds): Likewise.
(expand_builtin_memset_with_bounds): Likewise.
(expand_builtin_memset_args): Likewise.
(std_expand_builtin_va_start): Likewise.
(expand_builtin): Likewise.
(expand_builtin_with_bounds): Likewise.
* builtins.def (DEF_BUILTIN_CHKP): Likewise.
(DEF_LIB_BUILTIN_CHKP): Likewise.
(DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
(DEF_CHKP_BUILTIN): Likewise.
(BUILT_IN_MEMCPY): Likewise.
(BUILT_IN_MEMMOVE): Likewise.
(BUILT_IN_MEMPCPY): Likewise.
(BUILT_IN_MEMSET): Likewise.
(BUILT_IN_STPCPY): Likewise.
(BUILT_IN_STRCAT): Likewise.
(BUILT_IN_STRCHR): Likewise.
(BUILT_IN_STRCPY): Likewise.
(BUILT_IN_STRLEN): Likewise.
(BUILT_IN_MEMCPY_CHK): Likewise.
(BUILT_IN_MEMMOVE_CHK): Likewise.
(BUILT_IN_MEMPCPY_CHK): Likewise.
(BUILT_IN_MEMSET_CHK): Likewise.
(BUILT_IN_STPCPY_CHK): Likewise.
(BUILT_IN_STRCAT_CHK): Likewise.
(BUILT_IN_STRCPY_CHK): Likewise.
* calls.c (store_bounds): Likewise.
(emit_call_1): Likewise.
(special_function_p): Likewise.
(maybe_warn_nonstring_arg): Likewise.
(initialize_argument_information): Likewise.
(finalize_must_preallocate): Likewise.
(compute_argument_addresses): Likewise.
(expand_call): Likewise.
* cfgexpand.c (expand_call_stmt): Likewise.
(expand_return): Likewise.
(expand_gimple_stmt_1): Likewise.
(pass_expand::execute): Likewise.
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
(cgraph_node::remove): Likewise.
(cgraph_node::dump): Likewise.
(cgraph_node::verify_node): Likewise.
* cgraph.h (chkp_function_instrumented_p): Likewise.
(symtab_node::get_alias_target): Likewise.
(cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
(cgraph_local_p): Likewise.
* cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
(cgraph_edge::rebuild_references): Likewise.
* cgraphunit.c (varpool_node::finalize_decl): Likewise.
(walk_polymorphic_call_targets): Likewise.
(cgraph_node::expand_thunk): Likewise.
(symbol_table::output_weakrefs): Likewise.
* common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
(ix86_handle_option): Likewise.
* config/i386/constraints.md: Likewise.
* config/i386/i386-builtin-types.def (BND): Likewise.
(VOID): Likewise.
(PVOID): Likewise.
(ULONG): Likewise.
* config/i386/i386-builtin.def (BDESC_END): Likewise.
(BDESC_FIRST): Likewise.
(BDESC): Likewise.
* config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
* config/i386/i386.c (enum reg_class): Likewise.
(ix86_target_string): Likewise.
(ix86_option_override_internal): Likewise.
(ix86_conditional_register_usage): Likewise.
(ix86_valid_target_attribute_inner_p): Likewise.
(ix86_set_indirect_branch_type): Likewise.
(ix86_set_current_function): Likewise.
(ix86_function_arg_regno_p): Likewise.
(init_cumulative_args): Likewise.
(ix86_function_arg_advance): Likewise.
(ix86_function_arg): Likewise.
(ix86_pass_by_reference): Likewise.
(ix86_function_value_regno_p): Likewise.
(ix86_function_value_1): Likewise.
(ix86_function_value_bounds): Likewise.
(ix86_return_in_memory): Likewise.
(ix86_setup_incoming_vararg_bounds): Likewise.
(ix86_va_start): Likewise.
(indirect_thunk_need_prefix): Likewise.
(print_reg): Likewise.
(ix86_print_operand): Likewise.
(ix86_expand_call): Likewise.
(ix86_output_function_return): Likewise.
(reg_encoded_number): Likewise.
(BDESC_VERIFYS): Likewise.
(ix86_init_mpx_builtins): Likewise.
(ix86_init_builtins): Likewise.
(ix86_emit_cmove): Likewise.
(ix86_emit_move_max): Likewise.
(ix86_expand_builtin): Likewise.
(ix86_builtin_mpx_function): Likewise.
(ix86_get_arg_address_for_bt): Likewise.
(ix86_load_bounds): Likewise.
(ix86_store_bounds): Likewise.
(ix86_load_returned_bounds): Likewise.
(ix86_store_returned_bounds): Likewise.
(ix86_class_likely_spilled_p): Likewise.
(ix86_hard_regno_mode_ok): Likewise.
(x86_order_regs_for_local_alloc): Likewise.
(ix86_mitigate_rop): Likewise.
(ix86_bnd_prefixed_insn_p): Likewise.
(ix86_mpx_bound_mode): Likewise.
(ix86_make_bounds_constant): Likewise.
(ix86_initialize_bounds): Likewise.
(TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
(TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
(TARGET_LOAD_RETURNED_BOUNDS): Likewise.
(TARGET_STORE_RETURNED_BOUNDS): Likewise.
(TARGET_CHKP_BOUND_MODE): Likewise.
(TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
(TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
* config/i386/i386.h (TARGET_MPX): Likewise.
(TARGET_MPX_P): Likewise.
(VALID_BND_REG_MODE): Likewise.
(FIRST_BND_REG): Likewise.
(LAST_BND_REG): Likewise.
(enum reg_class): Likewise.
(BND_REG_P): Likewise.
(BND_REGNO_P): Likewise.
(BNDmode): Likewise.
(ADJUST_INSN_LENGTH): Likewise.
* config/i386/i386.md: Likewise.
* config/i386/i386.opt: Likewise.
* config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
(defined): Likewise.
(LINK_MPX): Likewise.
(MPX_SPEC): Likewise.
(LIBMPX_SPEC): Likewise.
(LIBMPXWRAPPERS_SPEC): Likewise.
(CHKP_SPEC): Likewise.
* config/i386/predicates.md: Likewise.
* dbxout.c (dbxout_type): Likewise.
* doc/extend.texi: Likewise.
* doc/invoke.texi: Likewise.
* doc/md.texi: Likewise.
* doc/tm.texi: Likewise.
* doc/tm.texi.in: Likewise.
* dwarf2out.c (is_base_type): Likewise.
(gen_formal_types_die): Likewise.
(gen_subprogram_die): Likewise.
(gen_type_die_with_usage): Likewise.
(gen_decl_die): Likewise.
(dwarf2out_late_global_decl): Likewise.
* expr.c (expand_assignment): Likewise.
(emit_storent_insn): Likewise.
(store_expr_with_bounds): Likewise.
(store_expr): Likewise.
(expand_expr_real_1): Likewise.
* expr.h (store_expr_with_bounds): Likewise.
* function.c (use_register_for_decl): Likewise.
(struct bounds_parm_data): Likewise.
(assign_parms_augmented_arg_list): Likewise.
(assign_parm_find_entry_rtl): Likewise.
(assign_parm_is_stack_parm): Likewise.
(assign_parm_load_bounds): Likewise.
(assign_bounds): Likewise.
(assign_parms): Likewise.
(expand_function_start): Likewise.
* gcc.c (CHKP_SPEC): Likewise.
* gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
* gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
(wrestrict_dom_walker::check_call): Likewise.
* gimple.c (gimple_build_call_from_tree): Likewise.
* gimple.h (enum gf_mask): Likewise.
(gimple_call_with_bounds_p): Likewise.
(gimple_call_set_with_bounds): Likewise.
* gimplify.c (gimplify_init_constructor): Likewise.
* ipa-cp.c (initialize_node_lattices): Likewise.
(propagate_constants_across_call): Likewise.
(find_more_scalar_values_for_callers_subset): Likewise.
* ipa-hsa.c (process_hsa_functions): Likewise.
* ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
* ipa-icf.c (sem_function::merge): Likewise.
* ipa-inline.c (early_inliner): Likewise.
* ipa-pure-const.c (warn_function_noreturn): Likewise.
(warn_function_cold): Likewise.
(propagate_pure_const): Likewise.
* ipa-ref.h (enum GTY): Likewise.
* ipa-split.c (find_retbnd): Likewise.
(consider_split): Likewise.
(split_function): Likewise.
* ipa-visibility.c (cgraph_externally_visible_p): Likewise.
* ipa.c (walk_polymorphic_call_targets): Likewise.
(symbol_table::remove_unreachable_nodes): Likewise.
(process_references): Likewise.
(cgraph_build_static_cdtor_1): Likewise.
* lto-cgraph.c (lto_output_node): Likewise.
(output_refs): Likewise.
(compute_ltrans_boundary): Likewise.
(input_overwrite_node): Likewise.
(input_node): Likewise.
(input_cgraph_1): Likewise.
* params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
* passes.c (pass_manager::execute_early_local_passes): Likewise.
(class pass_chkp_instrumentation_passes): Likewise.
(make_pass_chkp_instrumentation_passes): Likewise.
* passes.def: Likewise.
* rtl.h (struct GTY): Likewise.
(CALL_EXPR_WITH_BOUNDS_P): Likewise.
* stor-layout.c (layout_type): Likewise.
* symtab.c: Likewise.
* target.def: Likewise.
* targhooks.c (default_chkp_bound_type): Likewise.
(default_chkp_bound_mode): Likewise.
(default_builtin_chkp_function): Likewise.
(default_chkp_function_value_bounds): Likewise.
(default_chkp_make_bounds_constant): Likewise.
(default_chkp_initialize_bounds): Likewise.
* targhooks.h (default_chkp_bound_type): Likewise.
(default_chkp_bound_mode): Likewise.
(default_builtin_chkp_function): Likewise.
(default_chkp_function_value_bounds): Likewise.
(default_chkp_make_bounds_constant): Likewise.
(default_chkp_initialize_bounds): Likewise.
* toplev.c (compile_file): Likewise.
(process_options): Likewise.
* tree-core.h (DEF_BUILTIN): Likewise.
(DEF_BUILTIN_CHKP): Likewise.
* tree-inline.c (declare_return_variable): Likewise.
(remap_gimple_stmt): Likewise.
(copy_bb): Likewise.
(initialize_inlined_parameters): Likewise.
(expand_call_inline): Likewise.
* tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
(make_pass_ipa_chkp_early_produce_thunks): Likewise.
(make_pass_ipa_chkp_produce_thunks): Likewise.
(make_pass_chkp): Likewise.
(make_pass_chkp_opt): Likewise.
(make_pass_chkp_instrumentation_passes): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
* tree-ssa-dce.c (propagate_necessity): Likewise.
(eliminate_unnecessary_stmts): Likewise.
* tree-ssa-pre.c (create_expression_by_pieces): Likewise.
* tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
* tree-ssa-sccvn.h: Likewise.
* tree-ssa-strlen.c (get_string_length): Likewise.
(valid_builtin_call): Likewise.
(adjust_last_stmt): Likewise.
(handle_builtin_strchr): Likewise.
(handle_builtin_strcpy): Likewise.
(handle_builtin_stxncpy): Likewise.
(handle_builtin_memcpy): Likewise.
(handle_builtin_strcat): Likewise.
(strlen_check_and_optimize_stmt): Likewise.
* tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
* tree-streamer-in.c: Likewise.
* tree-streamer.c (record_common_node): Likewise.
* tree.c (tree_code_size): Likewise.
(wide_int_to_tree_1): Likewise.
(type_contains_placeholder_1): Likewise.
(build_common_tree_nodes): Likewise.
* tree.def (POINTER_BOUNDS_TYPE): Likewise.
* tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
(POINTER_BOUNDS_P): Likewise.
(BOUNDED_TYPE_P): Likewise.
(BOUNDED_P): Likewise.
(CALL_WITH_BOUNDS_P): Likewise.
(pointer_bounds_type_node): Likewise.
* value-prof.c (gimple_ic): Likewise.
* var-tracking.c (vt_add_function_parameters): Likewise.
* varasm.c (make_decl_rtl): Likewise.
(assemble_start_function): Likewise.
(output_constant): Likewise.
(maybe_assemble_visibility): Likewise.
* varpool.c (ctor_for_folding): Likewise.
* chkp-builtins.def: Remove.
* ipa-chkp.c: Remove.
* ipa-chkp.h: Remove.
* rtl-chkp.c: Remove.
* rtl-chkp.h: Remove.
* tree-chkp-opt.c: Remove.
* tree-chkp.c: Remove.
* tree-chkp.h: Remove.
2018-06-07 Carl Love <cel@us.ibm.com>
* config/rs6000/vsx.md (vextract_fp_from_shorth,
vextract_fp_from_shortl): Add BE support.
2018-06-07 Paul Koning <ni1d@arrl.net>
* compare-elim.c (try_merge_compare): Don't merge compare if
address contains a side effect.
(try_eliminate_compare): Likewise.
2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
* config.gcc: Support "tremont".
* config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
PROCESSOR_TREMONT.
* config/i386/i386.c (m_TREMONT): Define.
(processor_target_table): Add "tremont".
(PTA_TREMONT): Define.
(ix86_lea_outperforms): Add TARGET_TREMONT.
(get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
(fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
and M_INTEL_GOLDMONT_PLUS.
(fold_builtin_cpu): Add "tremont".
(ix86_add_stmt_cost): Add TARGET_TREMONT.
(ix86_option_override_internal): Add "tremont".
* config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
(processor_type): Add PROCESSOR_TREMONT.
* config/i386/x86-tune.def: Add m_TREMONT.
* doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
symbol defined for msp430i* devices to be lower case.
2018-06-07 Richard Biener <rguenther@suse.de>
* graphite-sese-to-poly.c (extract_affine): Avoid unneded
wrapping. Properly wrap the result of a BIT_NOT_EXPR.
Properly wrap signed arithmetic if overflow wraps.
2018-06-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/69615
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
of a cast from a same precision integral SSA_NAME in a bb dominated
by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
cast to utype if rhs2 has already a compatible type.
2018-06-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/85935
* graphite-scop-detection.c (find_params_in_bb): Analyze
condition operands with respect to the correct loop. Assert
the analysis doesn't fail.
2018-06-04 Carl Love <cel@us.ibm.com>
* config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
as it is slightly cheaper.
(first_match_or_eos_index_<mode>):
Calculate index using natural element order.
(first_match_index_<mode>):
Calculate index using natural element order.
(first_match_or_eos_index_<mode>):
Calculate index using natural order.
(define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
for BE and LE modes.
* config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
P9V_BUILTIN_VCLZLSBB_V16QI.
* config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
specific.
2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
indentation and line wrap for many prototypes. Add missing
@smallexample directives around block of prototypes for vec_xl and
vec_xst.
2018-06-05 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
track if we pass or return IEEE 128-bit floating point.
(ieee128_mangling_gcc_8_1): New boolean to say whether to generate
C++ mangling that is compatible with GCC 8.1.
(TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
(init_cumulative_args): Note if we pass or return IEEE 128-bit
floating point types.
(rs6000_function_arg_advance_1): Likewise.
(rs6000_mangle_type): Optionally generate mangled names that match
what GCC 8.1 generated for IEEE 128-bit floating point types.
(rs6000_globalize_decl_name): If we have an external function that
passes or returns IEEE 128-bit types, generate a weak reference
from the mangled name used in GCC 8.1 to the current mangled
name.
(rs6000_init_builtins): Make __ibm128 use the long double type if
long double is IBM extended double. Make __float128 use the long
double type if long double is IEEE 128-bit.
PR target/85657
* config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
macro for __ibm128 built-in functions.
(PACK_IF): Add __ibm128 pack/unpack functions.
(UNPACK_IF): Likewise.
* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
enable long double built-in functions if long double is IEEE
128-bit floating point.
(rs6000_invalid_builtin): Update long double built-in function
error message.
(rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
functions, adjust the built-in function to use the long double
built-in function if __ibm128 and long double are the same type.
* doc/extend.texi (PowerPC builtins): Update documention for
__builtin_{,un}pack_longdouble. Add documentation for
__builtin_{,un}pack_ibm128.
2018-06-06 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (enum riscv_privilege_levels): New.
(struct machine_function): New field interrupt_mode.
(riscv_handle_type_attribute): New function. Add forward declaration.
(riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
(riscv_expand_epilogue): Check interrupt_mode field.
(riscv_set_current_function): Check interrupt attribute args and
set interrupt_mode field.
* config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
(riscv_sret, riscv_uret): New.
* doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
new arguments to interrupt attribute.
2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
PR target/63177
* /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
Don't handle -mcpu=power8 if -mpower9-vector is also used.
2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
several redundant entries.
2018-06-06 David Malcolm <dmalcolm@redhat.com>
* config/i386/i386-protos.h (ix86_expand_call): Strengthen return
type from "rtx" to "rtx_insn *".
* config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
for local "call_insn", removing cast.
(ix86_expand_call): Likewise, introducing a "call_insn" local.
2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/86066
* gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
for BIT_INSERT_EXPR stores.
2018-06-06 Richard Biener <rguenther@suse.de>
PR tree-optimization/86062
* tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
component refs ontop
of to be offsetted base.
2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
to be static and remove check on interrupt attribute name.
2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2018-06-05 Steve Ellcey <sellcey@cavium.com>
PR target/79924
* config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
second argument.
* config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
Remove second argument, change how error is called.
(aarch64_layout_arg): Remove second argument from
aarch64_err_no_fpadvsimd call.
(aarch64_init_cumulative_args): Ditto.
(aarch64_gimplify_va_arg_expr): Ditto.
* config/aarch64/aarch64.md (mov<mode>): Ditto.
2018-06-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (simple_return_indirect_internal): New expander.
(*simple_return_indirect_internal<mode>): Rename from
simple_return_indirect_internal. Use W mode iterator.
(rstorssp): New expander.
(*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
(clrssbsy): New expander.
(*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
__typeof__.
(cmse_check_pointed_object): Likewise.
2018-06-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/47618
* doc/invoke.texi: Document how -fprofile-dir format
is extended.
2018-06-05 Richard Biener <rguenther@suse.de>
* tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
removal pretend DOM info isn't available so we do not update
it and only remove edges, not dominated blocks. Actually free
DOM info in case we removed something. Remove unreachable blocks.
(mfb_keep_latches): Work with either DOM info or marked backedges.
(cleanup_tree_cfg_noloop): Do not remove unreachable blocks
first. Mark backedges if DOM info isn't available.
(Re-)compute DOM info after cleanup_control_flow_pre.
2018-06-05 Richard Biener <rguenther@suse.de>
* tree-cfg.c (struct locus_discrim_map): Store line, not location.
(locus_discrim_hasher::hash): Adjust.
(locus_discrim_hasher::equal): Likewise.
(next_discriminator_for_locus): Work on line directly.
(same_line_p): Pass in expanded locus1 as well.
(assign_discriminators): Avoid redundant location expansions.
2018-06-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/86046
* tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
if required after clearing TREE_ADDRESSABLE.
2018-06-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/86047
* tree-ssa-loop.c (for_each_index): Glob handling of all
decls and constants and really handle all of them.
2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/81497
* config/arm/arm-builtins.c (arm_type_qualifiers): Add
qualifier_void_pointer and qualifier_const_void_pointer.
(arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
(arm_init_builtins): Handle the above.
* config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
__arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
__arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
void intrinsics.
2018-06-05 Martin Liska <mliska@suse.cz>
* auto-profile.c (read_autofdo_file): Do not use
gcov_ctr_summary struct.
(afdo_callsite_hot_enough_for_early_inline): Likewise.
* coverage.c (struct counts_entry): Likewise.
(read_counts_file): Read just single summary entry.
(get_coverage_counts): Use gcov_summary struct.
* coverage.h (get_coverage_counts): Likewise.
* gcov-dump.c (dump_working_sets): Likewise.
(tag_summary): Dump just single summary.
* gcov-io.c (gcov_write_summary): Write just histogram
summary.
(gcov_read_summary): Read just single summary.
(compute_working_sets): Use gcov_summary struct.
* gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
of GCOV_COUNTERS_SUMMABLE.
(GCOV_COUNTERS_SUMMABLE): Remove.
(GCOV_FIRST_VALUE_COUNTER): Replace with
GCOV_COUNTER_V_INTERVAL.
(struct gcov_ctr_summary): Remove.
(struct gcov_summary): Directly use fields of former
gcov_ctr_summary.
(compute_working_sets): Use gcov_summary struct.
* gcov.c (read_count_file): Do not use ctrs fields.
* lto-cgraph.c (merge_profile_summaries): Use gcov_summary
struct.
* lto-streamer.h (struct GTY): Make profile_info gcov_summary
struct.
* profile.c: Likewise.
* profile.h: Likewise.
2018-06-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/84846
* gcov.c (output_lines): Print working directory only
in intermediate format.
2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
* config/s390/s390-builtin-types.def: Add void function type.
* config/s390/s390-builtins.def: Use the function type for the
tbeginc builtin.
2018-06-04 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
to int.
* config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
and maybe_eh_return. Change regno to unsigned int. Use new args to
handle EH_RETURN_DATA_REGNO registers properly.
(riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
(riscv_expand_epilogue): Update comment. Change argument name and
type. Update code to use new name and type. Pass new args to
riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
EXCEPTION_RETURN.
* config/riscv/riscv.md (NORMAL_RETURN): New.
(SIBCALL_RETURN, EXCEPTION_RETURN): New.
(epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
(eh_return): Call gen_eh_return_internal and emit barrier.
(eh_return_internal): Call riscv_expand_epilogue.
2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
* gimple-ssa-store-merging.c (struct merged_store_group): Move up
bit_insertion field and declare can_be_merged_into method.
(merged_store_group::can_be_merged_into): New method.
(imm_store_chain_info::coalesce_immediate): Call it to decide whether
consecutive non-overlapping stores can be merged. Turn MEM_REF stores
into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
2018-06-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/85955
* builtins.c (fold_builtin_sincos): Convert pointers to
destination to appropriate type before dereferencing.
2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
* expr.c (expand_expr_real_1): Force the operand into memory if
its TYPE_MODE is BLKmode and if there is no integer mode for
the number of bits being extracted.
2018-06-04 Jakub Jelinek <jakub@redhat.com>
PR target/85832
PR target/86036
* config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
Use vptestnm rather than vptestm in (=Yc,v,C) variant.
2018-06-04 Richard Biener <rguenther@suse.de>
* tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
(cleanup_tree_cfg_noloop): ... single caller. Do
start_recording_case_labels later.
2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
* config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
to _IMMINTRIN_H_INCLUDED.
* config/i386/pconfigintrin.h: Ditto.
* config/i386/waitpkgintrin.h: Ditto.
* config/i386/immintrin.h: Add includes for sgxintrin.h,
pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
* config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
waitpkgintrin.h and cldemoteintrin.h.
2018-06-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/86038
* tracer.c (find_best_successor): Check probability for
being initialized, bail out if not.
2018-06-04 Richard Earnshaw <rearnsha@arm.com>
PR target/86003
* config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
of bits to ignore when comparing architectures.
2018-06-04 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/69615
* fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
maximum or minimum of the type, try to merge it also as if
range1 is + [-, x - 1] or + [x + 1, -].
PR c++/86025
* tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/86034
* gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
the unsigned bitfield type in a bit insertion sequence if it does not
have a larger precision than the bitfield size.
(process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
2018-06-03 Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-peephole2.md: Add new patterns for code size.
2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
* config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
* config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
* config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
* common/config/nds32/nds32-common.c (nds32_option_optimization_table):
Disable -fdelete-null-pointer-checks for ELF toolchain.
2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
(nds32le-*-*, nds32be-*-*): Integrate checking process.
(nds32*-*-*): Add glibc and uclibc conditions.
* common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
(TARGET_EXCEPT_UNWIND_INFO): Define.
* config/nds32/elf.h: New file.
* config/nds32/linux.h: New file.
* config/nds32/nds32-elf.opt: New file.
* config/nds32/nds32-linux.opt: New file.
* config/nds32/nds32-fp-as-gp.c
(pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
* config/nds32/nds32.c (nds32_conditional_register_usage): Consider
TARGET_LINUX_ABI.
(nds32_asm_file_end): Ditto.
(nds32_print_operand): Ditto.
(nds32_insert_attributes): Ditto.
(nds32_init_libfuncs): New function.
(TARGET_HAVE_TLS): Define.
(TARGET_INIT_LIBFUNCS): Define.
* config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
spec content.
(TARGET_ELF): Apply different mcmodel setting.
(LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
been migrated into elf.h and linux.h files.
* config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
* config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
(mcmodel): The content has been migrated into nds32-elf.opt and
nds32-linux.opt files.
* config/nds32/t-elf: New file.
* config/nds32/t-linux: New file.
2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
Shiva Chen <shiva0217@gmail.com>
* config/nds32/constants.md (unspec_volatile_element): Add
UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
* config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
optimization.
* config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
(make_pass_nds32_fp_as_gp): Declare.
* config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
optmization pass.
(nds32_asm_function_end_prologue): Remove unused asm output.
(nds32_asm_function_begin_epilogue): Remove unused asm output.
(nds32_asm_file_start): Output necessary fp_as_gp information.
(nds32_option_override): Adjust register usage.
(nds32_expand_prologue): Consider fp_as_gp situation.
(nds32_expand_prologue_v3push): Consider fp_as_gp situation.
* config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
(epilogue): Ditto.
(return): Ditto.
(simple_return): Ditto.
(omit_fp_begin): Output special directive for fp_as_gp.
(omit_fp_end): Output special directive for fp_as_gp.
* config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
mforbid-fp-as-gp): New options.
2018-06-01 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (dwarf2out_finish): Remove generation of
DW_AT_loclists_base.
2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
* gimple-ssa-store-merging.c: Include gimple-fold.h.
(struct store_immediate_info): Document BIT_INSERT_EXPR stores.
(struct merged_store_group): Add bit_insertion field.
(dump_char_array): Use standard hexadecimal format.
(merged_store_group::merged_store_group): Set bit_insertion to false.
(merged_store_group::apply_stores): Use optimal buffer size. Deal
with BIT_INSERT_EXPR stores. Move up code updating the mask and
also print the mask in the dump file.
(pass_store_merging::gate): Minor tweak.
(imm_store_chain_info::coalesce_immediate): Fix wrong association
of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
stores with INTEGER_CST stores.
(count_multiple_uses) <BIT_INSERT_EXPR>: New case.
(imm_store_chain_info::output_merged_store): Add try_bitpos variable
and use it throughout. Generate bit insertion sequences if need be.
(pass_store_merging::process_store): Remove redundant condition.
Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
the 128-bit floating point types. Fix function comment.
2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-simd.md
(aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
mnemonics.
(aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
mnemonics.
2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/85989
* gimple-ssa-backprop.c (backprop::m_visited_phis): New member
variable.
(backprop::intersect_uses): Check it when deciding whether this
is a backedge reference.
(backprop::process_block): Add each phi to m_visited_phis
after visiting it, then clear it at the end.
2018-06-01 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (vect_dr_stmt): New function.
(vect_get_load_cost): Adjust.
(vect_get_store_cost): Likewise.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
Use vect_dr_stmt instead of DR_SMTT.
(vect_record_base_alignments): Likewise.
(vect_calculate_target_alignment): Likewise.
(vect_compute_data_ref_alignment): Likewise and make static.
(vect_update_misalignment_for_peel): Likewise.
(vect_verify_datarefs_alignment): Likewise.
(vector_alignment_reachable_p): Likewise.
(vect_get_data_access_cost): Likewise. Pass down
vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
(vect_get_peeling_costs_all_drs): Likewise.
(vect_peeling_hash_get_lowest_cost): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
(vect_find_same_alignment_drs): Likewise.
(vect_analyze_data_refs_alignment): Likewise.
(vect_analyze_group_access_1): Likewise.
(vect_analyze_group_access): Likewise.
(vect_analyze_data_ref_access): Likewise.
(vect_analyze_data_ref_accesses): Likewise.
(vect_vfa_segment_size): Likewise.
(vect_small_gap_p): Likewise.
(vectorizable_with_step_bound_p): Likewise.
(vect_prune_runtime_alias_test_list): Likewise.
(vect_analyze_data_refs): Likewise.
(vect_supportable_dr_alignment): Likewise.
* tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
(vect_gen_prolog_loop_niters): Likewise.
* tree-vect-loop.c (vect_analyze_loop_2): Likewise.
* tree-vect-patterns.c (vect_recog_bool_pattern): Do not
modify DR_STMT.
(vect_recog_mask_conversion_pattern): Likewise.
(vect_try_gather_scatter_pattern): Likewise.
* tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
to vect_get_store_cost.
(vect_get_store_cost): Get stmt_info instead of DR.
(vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
(vect_get_load_cost): Get stmt_info instead of DR.
2018-06-01 Richard Biener <rguenther@suse.de>
PR middle-end/86017
* gimple-fold.c (var_decl_component_p): Also allow offsetted
vars wrapped in MEM_REFs.
2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
Fix subreg tests so that we only return a choice between
GENERAL_REGS and FP_REGS if the original classes included both.
2018-06-01 Richard Biener <rguenther@suse.de>
PR ipa/85960
* tree-ssa-structalias.c (get_function_part_constraint):
Handle NULL fi->decl.
(find_func_aliases_for_call): Properly handle indirect
fi from direct call.
(find_func_clobbers): Likewise.
(ipa_pta_execute): Likewise.
(create_variable_info_for): For functions that are ifunc_resolver
resolve to a varinfo that contains the result of the resolver call.
(associate_varinfo_to_alias): Do not treat ifunc resolvers as
aliases.
2018-05-31 Michael Collison <michael.collison@arm.com>
* config/aarch64/aarch64.md:
(*fix_to_zero_extenddfdi2): New pattern.
* gcc.target/aarch64/fix_extend1.c: New testcase.
2018-05-31 Qing Zhao <qing.zhao@oracle.com>
PR middle-end/78809
PR middle-end/83026
* builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
and BUILT_IN_STRNCMP_EQ.
* builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
BUILT_IN_STRNCMP_EQ.
* gimple-fold.c (gimple_fold_builtin_string_compare): Add the
handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
(gimple_fold_builtin): Likewise.
* tree-ssa-strlen.c (compute_string_length): New function.
(determine_min_obsize): New function.
(handle_builtin_string_cmp): New function to handle calls to
string compare functions.
(strlen_optimize_stmt): Add handling to builtin string compare
calls.
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
* tree.c (build_common_builtin_nodes): Add new defines of
BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
2018-05-31 Jakub Jelinek <jakub@redhat.com>
PR target/85984
* bb-reorder.c (pass_partition_blocks::gate): Return false for
functions with naked attribute.
2018-05-31 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md (avx_vec_concat<mode>):
Substitute concat_tg_mode mode attribute with xtg_mode.
(<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
(concat_tg_mode): Remove mode attribute.
2018-05-31 Martin Sebor <msebor@redhat.com>
PR c/82063
* calls.c (alloc_max_size): Correct a logic error/typo.
Treat excessive arguments as infinite. Warn for invalid arguments.
* doc/invoke.texi (-Walloc-size-larger-than): Update.
2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
PR target/85829
* config/i386/x86-tune.def: Re-enable partial_reg_dependency
and movx for Haswell.
2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
PR middle-end/85879
* gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
when emitting error on private/firstprivate reductions.
* omp-low.c (lower_omp_target): Avoid reference-type processing
on pointers for firstprivate clause.
2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
* config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
(st1x2): Likewise.
(st1x3): Likewise.
* config/aarch64/aarch64-simd.md
(aarch64_ld1x3<VALLDIF:mode>): New pattern.
(aarch64_ld1_x3_<mode>): Likewise
(aarch64_st1x2<VALLDIF:mode>): Likewise
(aarch64_st1_x2_<mode>): Likewise
(aarch64_st1x3<VALLDIF:mode>): Likewise
(aarch64_st1_x3_<mode>): Likewise
* config/aarch64/arm_neon.h (vld1_u8_x3): New function.
(vld1_s8_x3): Likewise.
(vld1_u16_x3): Likewise.
(vld1_s16_x3): Likewise.
(vld1_u32_x3): Likewise.
(vld1_s32_x3): Likewise.
(vld1_u64_x3): Likewise.
(vld1_s64_x3): Likewise.
(vld1_f16_x3): Likewise.
(vld1_f32_x3): Likewise.
(vld1_f64_x3): Likewise.
(vld1_p8_x3): Likewise.
(vld1_p16_x3): Likewise.
(vld1_p64_x3): Likewise.
(vld1q_u8_x3): Likewise.
(vld1q_s8_x3): Likewise.
(vld1q_u16_x3): Likewise.
(vld1q_s16_x3): Likewise.
(vld1q_u32_x3): Likewise.
(vld1q_s32_x3): Likewise.
(vld1q_u64_x3): Likewise.
(vld1q_s64_x3): Likewise.
(vld1q_f16_x3): Likewise.
(vld1q_f32_x3): Likewise.
(vld1q_f64_x3): Likewise.
(vld1q_p8_x3): Likewise.
(vld1q_p16_x3): Likewise.
(vld1q_p64_x3): Likewise.
(vst1_s64_x2): Likewise.
(vst1_u64_x2): Likewise.
(vst1_f64_x2): Likewise.
(vst1_s8_x2): Likewise.
(vst1_p8_x2): Likewise.
(vst1_s16_x2): Likewise.
(vst1_p16_x2): Likewise.
(vst1_s32_x2): Likewise.
(vst1_u8_x2): Likewise.
(vst1_u16_x2): Likewise.
(vst1_u32_x2): Likewise.
(vst1_f16_x2): Likewise.
(vst1_f32_x2): Likewise.
(vst1_p64_x2): Likewise.
(vst1q_s8_x2): Likewise.
(vst1q_p8_x2): Likewise.
(vst1q_s16_x2): Likewise.
(vst1q_p16_x2): Likewise.
(vst1q_s32_x2): Likewise.
(vst1q_s64_x2): Likewise.
(vst1q_u8_x2): Likewise.
(vst1q_u16_x2): Likewise.
(vst1q_u32_x2): Likewise.
(vst1q_u64_x2): Likewise.
(vst1q_f16_x2): Likewise.
(vst1q_f32_x2): Likewise.
(vst1q_f64_x2): Likewise.
(vst1q_p64_x2): Likewise.
(vst1_s64_x3): Likewise.
(vst1_u64_x3): Likewise.
(vst1_f64_x3): Likewise.
(vst1_s8_x3): Likewise.
(vst1_p8_x3): Likewise.
(vst1_s16_x3): Likewise.
(vst1_p16_x3): Likewise.
(vst1_s32_x3): Likewise.
(vst1_u8_x3): Likewise.
(vst1_u16_x3): Likewise.
(vst1_u32_x3): Likewise.
(vst1_f16_x3): Likewise.
(vst1_f32_x3): Likewise.
(vst1_p64_x3): Likewise.
(vst1q_s8_x3): Likewise.
(vst1q_p8_x3): Likewise.
(vst1q_s16_x3): Likewise.
(vst1q_p16_x3): Likewise.
(vst1q_s32_x3): Likewise.
(vst1q_s64_x3): Likewise.
(vst1q_u8_x3): Likewise.
(vst1q_u16_x3): Likewise.
(vst1q_u32_x3): Likewise.
(vst1q_u64_x3): Likewise.
(vst1q_f16_x3): Likewise.
(vst1q_f32_x3): Likewise.
(vst1q_f64_x3): Likewise.
(vst1q_p64_x3): Likewise.
2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_output_labelref): Prepend
user_label_prefix to name.
* tree-core.h: Update comment about the format of NAME string
passed to handler in attribute_spec.
* config/msp430/msp430.md: Remove erroneous subreg expression from
zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
zero_extend{q,h}isi2.
2018-05-30 Borislav Petkov <bp@suse.de>
* doc/extend.texi: Document some architecture specific
constraints and sort entries.
2018-05-30 Martin Sebor <msebor@redhat.com>
PR middle-end/85369
* builtins.c (expand_builtin_stpcpy_1): New function.
(expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
only if the former succeeds.
2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
* config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
in saphira.
2018-05-30 Jan Hubicka <hubicka@ucw.cz>
* doc/invoke.texi (-flinker-output): Document
2018-05-30 Jan Hubicka <hubicka@ucw.cz>
* passes.c (ipa_write_summaries): Only modify statements if body
is in memory.
* cgraphunit.c (ipa_passes): Also produce intermeidate code when
incrementally linking.
(ipa_passes): Likewise.
* lto-cgraph.c (lto_output_node): When incrementally linking do not
pass down resolution info.
* common.opt (flag_incremental_link): Update info.
* gcc.c (plugin specs): Turn flinker-output=* to
-plugin-opt=-linker-output-known
* toplev.c (compile_file): Also cut compilation when doing incremental
link.
* flag-types. (enum lto_partition_model): Add
LTO_LINKER_OUTPUT_NOLTOREL.
(invoke.texi): Add -flinker-output docs.
* ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
link same way as WPA; do not stream in dead initializers.
* dwarf2out.c (dwarf2out_die_ref_for_decl,
darf2out_register_external_decl): Support incremental link.
2018-05-30 Jan Hubicka <hubicka@ucw.cz>
* lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
2018-05-30 Jan Hubicka <hubicka@ucw.cz>
* lto-wrapper.c (debug_objcopy): Add rename parameter; pass
it down to simple_object_copy_lto_debug_sections.
(run_gcc): Determine incremental LTO link time and configure
lto1 into non-wpa mode, disable renaming of debug sections.
2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
descriptions of various incorrectly documented functions.
2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
Revert:
* config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
address check not strict.
2018-05-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/85964
* tracer.c (better_p): Drop initialized count check, we only
call the function with initialized counts now.
(find_best_successor): Do find a best edge if one
has uninitialized count.
(find_best_predecessor): Likewise. Do BB frequency check only
if count is initialized.
2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
* config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
(aarch64_ldrstr_offset_compare): New.
(aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
load/store orderings.
(aarch64_gen_adjusted_ldpstp): Likewise.
2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
Check for subset of GENERAL_REGS and FP_REGS.
* config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
r=w alternative.
2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
* alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
and wi::to_poly_offset. Add the current offset and then check
whether the sum fits, rather than using an unchecked addition of
a checked term. Check for a shwi rather than a uhwi.
* expr.c (get_bit_range): Use tree_to_poly_uint64.
(store_constructor): Use poly_int_tree_p.
(expand_expr_real_1): Likewise.
* function.c (assign_temp): Likewise.
* fold-const.c (const_binop): Use poly_int_tree_p and
wi::to_poly_offset.
(fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
division.
* ipa-icf-gimple.c (func_checker::compare_operand): Use
to_poly_offset for MEM offsets.
* ipa-icf.c (sem_variable::equals): Likewise.
* stor-layout.c (compute_record_mode): Use poly_int_tree_p.
* tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
wi::to_poly_offset for BIT_FIELD_REF offsets.
(vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
wi::to_poly_offset.
* var-tracking.c (emit_note_insn_var_location): Use
tree_to_poly_uint64.
2018-05-29 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
2018-05-29 Uros Bizjak <ubizjak@gmail.com>
PR target/85950
* config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
sequence.
(sse4_1_round<mode>2): Use nonimmediate_operand
for operand 1 predicate.
2018-05-29 Martin Sebor <msebor@redhat.com>
Richard Biener <rguenther@suse.de>
PR testsuite/85888
* calls.c (get_size_range): Call determine_value_range instead
of get_value_range..
* tree-vrp.h (determine_value_range): Declared new function.
* tree-vrp.c (determine_value_range_1, determine_value_range): New.
2018-05-29 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
sure to use non-pattern stmts for get_earlier_stmt arguments.
* tree-vectorizer.h (get_earlier_stmt): Assert we do not get
called on pattern stmts.
(get_later_stmt): Likewise.
2018-05-29 Martin Liska <mliska@suse.cz>
PR gcov-profile/85759
* doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
env variables.
2018-05-29 Jakub Jelinek <jakub@redhat.com>
* tree-cfg.c (verify_gimple_assign_unary): Add checking for
VEC_UNPACK_*_EXPR.
(verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
VEC_PACK_*_EXPR.
PR target/85918
* tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
VEC_PACK_FLOAT_EXPR): New tree codes.
* tree-pretty-print.c (op_code_prio): Handle
VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
(dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
* tree-inline.c (estimate_operator_cost): Likewise.
* gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
* fold-const.c (const_binop): Likewise.
(const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
VEC_UNPACK_FIX_TRUNC_LO_EXPR.
* tree-cfg.c (verify_gimple_assign_unary): Likewise.
(verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
* cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
* expr.c (expand_expr_real_2): Likewise.
* optabs.def (vec_packs_float_optab, vec_packu_float_optab,
vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
optabs.
* optabs.c (expand_widen_pattern_expr): For
VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
sign from result type rather than operand's type.
(expand_binop_directly): For vec_packu_float_optab and
vec_packs_float_optab allow result type to be different from operand's
type.
* optabs-tree.c (optab_for_tree_code): Handle
VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
VEC_PACK_FLOAT_EXPR. Formatting fixes.
* tree-vect-generic.c (expand_vector_operations_1): Handle
VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
VEC_PACK_FLOAT_EXPR.
* tree-vect-stmts.c (supportable_widening_operation): Handle
FIX_TRUNC_EXPR.
(supportable_narrowing_operation): Handle FLOAT_EXPR.
* config/i386/i386.md (fixprefix, floatprefix): New code attributes.
* config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
(float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
(vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
mode attributes.
(vec_pack<floatprefix>_float_<mode>): New expander.
(vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
attributes.
(vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
* doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
Document.
* doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
(VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
VEC_PACK_FLOAT_EXPR): Document.
2018-05-29 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
member.
(stmt_vec_info_vec): Make pointer.
(init_stmt_vec_info_vec): Remove.
(free_stmt_vec_info_vec): Likewise.
(set_stmt_vec_info_vec): New function.
(free_stmt_vec_infos): Likewise.
(vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
(set_vinfo_for_stmt): Likewise.
(get_earlier_stmt): Likewise.
(get_later_stmt): Likewise.
* tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
(vec_info::vec_info): Allocate stmt_vec_infos and set the global.
(vec_info::~vec_info): Free stmt_vec_infos.
(vectorize_loops): Set the global stmt_vec_info_vec to NULL.
Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
(pass_slp_vectorize::execute): Likewise.
* tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
(free_stmt_vec_info_vec): Likewise.
(set_stmt_vec_info_vec): New function.
(free_stmt_vec_infos): Likewise.
* tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
the global stmt_vec_info_vec.
* tree-parloops.c (gather_scalar_reductions): Use
set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
vector.
2018-05-29 Richard Biener <rguenther@suse.de>
* dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
2018-05-29 Martin Liska <mliska@suse.cz>
David Malcolm <dmalcolm@redhat.com>
* vec.c (test_reverse): New.
(vec_c_tests): Add new test.
* vec.h (vl_ptr>::reverse): New function.
2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
* config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
* config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
and later.
2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
* tree-dump.c (dump_node): Use splay_tree_delete_pointers.
2018-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/85933
* tree-vect-data-refs.c (vect_record_base_alignments): Only
look at stmts marked as vectorizable.
2018-05-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/85934
* tree-vect-generic.c (expand_vector_operations_1): Hoist
vector boolean check before scalar optimization.
2018-05-28 Jakub Jelinek <jakub@redhat.com>
* doc/invoke.texi (ARM Options): Use @item instead of @itemx
for armv5te.
2018-05-28 Mark Wielaard <mark@klomp.org>
* dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
if it is an expression containing a minus sign.
2018-05-27 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
2018-05-27 Paul Koning <ni1d@arrl.net>
* config/pdp11/pdp11.md (truncsihi2): Remove.
2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
implementation.
(unaligned_store_dw): Ditto.
* config/nds32/nds32-memory-manipulation.c
(nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
(nds32_gen_dup_4_byte_to_word_value): Rename to ...
(nds32_gen_dup_4_byte_to_word_value_aux): ... this.
(emit_setmem_word_loop): Rename to ...
(emit_setmem_doubleword_loop): ... this.
(nds32_gen_dup_4_byte_to_word_value): New function.
(nds32_gen_dup_8_byte_to_double_word_value): New function.
(nds32_expand_setmem_loop): Refine implementation.
(nds32_expand_setmem_loop_v3m): Ditto.
* config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
pattern.
2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
(nds32_init_machine_status): Initialize machine->attr_naked_p and
machine->attr_no_prologue_p.
(nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
(nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
(nds32_expand_epilogue): Consider attr_naked_p.
(nds32_expand_epilogue_v3pop): Likewise.
(nds32_can_use_return_insn): Likewise.
* config/nds32/nds32.h (machine_function): Add attr_naked_p and
attr_no_prologue_p fields.
* config/nds32/nds32.opt (mret-in-naked-func): New option.
2018-05-27 Jakub Jelinek <jakub@redhat.com>
PR target/85918
* config/i386/i386.md (fixunssuffix, floatunssuffix): New code
attributes.
* config/i386/sse.md
(<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
Rename to ...
(float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
... this.
(<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
Rename to ...
(float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
... this.
(*<floatsuffix>floatv2div2sf2): Rename to ...
(*float<floatunssuffix>v2div2sf2): ... this.
(<floatsuffix>floatv2div2sf2_mask): Rename to ...
(float<floatunssuffix>v2div2sf2_mask): ... this.
(*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
(*float<floatunssuffix>v2div2sf2_mask_1): ... this.
(<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
to ...
(fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
... this.
(<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
Rename to ...
(fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
... this.
(<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
Rename to ...
(fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
... this.
(<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
(fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
(vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
gen_ufix_truncv8dfv8si2.
* config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
__builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
__builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
__builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
__builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
__builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
__builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/85900
PR target/85345
* varasm.c (assemble_alias): Lookup ifunc attribute on error.
2018-05-25 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
* config/riscv/riscv.c (struct machine_function): Add
interrupt_handler_p and attribute_checked_p fields.
(riscv_attribute_table): Add interrupt.
(riscv_interrupt_type_p): New.
(riscv_save_reg_p): Save extra regs for interrupt handler.
(riscv_use_save_libcall): Return false for interrupt handler.
(riscv_first_stack_step): Add forward declaration.
(riscv_compute_frame_info): New local interrupt_save_t1. Set it
for interrupt handler with large frame. Use it for saved reg list.
(riscv_expand_prologue): Move flag_stack_usage_info support to
eliminate duplication.
(riscv_expand_epilogue): Generate mret for interrupt handler.
(riscv_epilogue_uses): New.
(riscv_can_use_return_insn): Return false for interrupt handler.
(riscv_function_ok_for_sibcall): Likewise.
(riscv_set_current_function): Add interrupt handler support.
* config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
* config/riscv/riscv.md (UNSPECV_MRET): New.
(GP_REGNUM): New.
(riscv_frflags, riscv_fsflags): Use tab after opcode.
(riscv_mret): New.
* doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
* gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
this candidate has already been replaced in-situ by a copy.
2018-05-25 Jason Merrill <jason@redhat.com>
PR c++/80485 - inline function non-zero address.
* symtab.c (nonzero_address): Check DECL_COMDAT.
2018-05-25 Uros Bizjak <ubizjak@gmail.com>
PR target/83628
* config/alpha/alpha.md (ashlsi3): New insn pattern.
(*ashlsi_se): Rename from *ashldi_se. Define as sign
extension of SImode operation. Use const123_operand predicate.
(*saddsi_1): Remove.
(*saddl_se_1): Ditto.
(*ssubsi_1): Ditto.
(*ssubl_se_1): Ditto.
* config/alpha/predicates.md (const123_operand): New predicate.
* config/alpha/constraints.md (P): Use IN_RANGE.
2018-05-25 Richard Biener <rguenther@suse.de>
* tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
defaulted to true.
(ref_maybe_used_by_stmt_p): Likewise.
(stmt_may_clobber_ref_p): Likewise.
(stmt_may_clobber_ref_p_1): Likewise.
* tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
and pass it along.
(ref_maybe_used_by_stmt_p): Likewise.
(stmt_may_clobber_ref_p): Likewise.
(stmt_may_clobber_ref_p_1): Likewise.
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
the alias oracle to disambiguate DRs with stmts DR analysis
couldn't handle.
(vect_analyze_data_refs): Do not give up on not analyzable
DRs for BB vectorization. Remove code truncating the dataref
vector.
2018-05-25 Jakub Jelinek <jakub@redhat.com>
PR target/85832
* config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
2018-05-25 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_find_stmt_data_reference): New
function, combining stmt data ref gathering and fatal analysis
parts.
(vect_analyze_data_refs): Remove now redudnant code and simplify.
* tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
vect_analyze_loop_2 and use vect_find_stmt_data_reference.
* tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
* tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
2018-05-25 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/85720
* tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
SCC if all partitions are builtins.
(version_loop_by_alias_check): New parameter. Generate cancelable
runtime alias check if all partitions are builtins.
(distribute_loop): Update call to above function.
2018-05-25 Bin Cheng <bin.cheng@arm.com>
* tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
(create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
(parm_default_def_partition_arg): Ditto.
(set_parm_default_def_partition): Ditto.
(get_parm_default_def_partitions): Ditto and make it static.
(get_undefined_value_partitions): Ditto and make it static.
(remove_ssa_form): Refactor call to init_var_map here.
* tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
computation for loop region.
(coalesce_partitions, compute_optimized_partition_bases): Ditto.
(register_default_def): Delete.
(for_all_parms, create_default_def): Move to tree-outof-ssa.c.
(parm_default_def_partition_arg): Ditto.
(set_parm_default_def_partition): Ditto.
(get_parm_default_def_partitions): Ditto and make it static.
(get_undefined_value_partitions): Ditto and make it static.
(coalesce_with_default, coalesce_with_default): Update comment.
(create_coalesce_list_for_region): New func factored out from
create_outofssa_var_map.
(populate_coalesce_list_for_outofssa): New func factored out from
create_outofssa_var_map and coalesce_ssa_name.
(create_outofssa_var_map): Delete.
(coalesce_ssa_name): Refactor to support live range computation.
* tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
(get_parm_default_def_partitions): Delete.
(get_undefined_value_partitions): Ditto.
* tree-ssa-live.c (init_var_map, delete_var_map): Support live range
computation for loop region.
(new_tree_live_info, loe_visit_block): Ditto.
(live_worklist, set_var_live_on_entry): Ditto.
(calculate_live_on_exit, verify_live_on_entry): Ditto.
* tree-ssa-live.h (struct _var_map): New fields.
(init_var_map): Change decl.
(region_contains_p): New.
2018-05-25 Bin Cheng <bin.cheng@arm.com>
* tree-ssa-live.h (live_merge_and_clear): Delete.
2018-05-25 Richard Biener <rguenther@suse.de>
PR c++/85912
* tree-dump.c (dequeue_and_dump): Remove access to removed
operand 2 of a SWITCH_EXPR.
2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
* doc/sourcebuild.texi (vect_double_cond_arith): Include
multiplication and division.
* doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
(cond_udiv@var{m}, cond_umod@var{m}): Document.
* optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
(cond_udiv_optab, cond_umod_optab): New optabs.
* internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
(IFN_COND_RDIV): New internal functions.
* internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
TRUNC_MOD_EXPR and RDIV_EXPR.
* match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
* config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
New unspecs.
(SVE_INT_BINARY): Include mult.
(SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
(optab, sve_int_op): Handle mult.
(optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
UNSPEC_COND_DIV.
* config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
for SVE_INT_BINARY_SD.
2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
(optab, sve_int_op): Handle div and udiv.
* config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
for SVE_INT_BINARY_SD.
(*<optab><mode>3): New insn for the same.
2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-patterns.c: Include predict.h.
(vect_recog_divmod_pattern): Restrict check for division support
to when optimizing for size.
2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
* doc/sourcebuild.texi (vect_double_cond_arith: Document.
* gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
(gimple_match_op::gimple_match_op): Add an overload for 4 operands.
(gimple_match_op::set_op): Likewise.
(gimple_resimplify4): Declare.
* genmatch.c (get_operand_type): Handle CFN_COND_* functions.
(expr::gen_transform): Likewise.
(decision_tree::gen): Generate a simplification routine for 4 operands.
* gimple-match-head.c (gimple_simplify): Add an overload for
4 operands. In the top-level function, handle up to 4 call
arguments and call gimple_resimplify4.
(gimple_resimplify4): New function.
(build_call_internal): Pass a fourth operand.
(maybe_push_to_seq): Likewise.
* match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
Fold VEC_COND_EXPRs of an operation and a default value into
an IFN_COND_* function if possible.
* config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
New unspecs.
(SVE_COND_FP_BINARY): Include them.
(optab, sve_fp_op): Handle them.
(SVE_INT_BINARY_REV): New code iterator.
(SVE_COND_FP_BINARY_REV): New int iterator.
(commutative): New int attribute.
* config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
Declare.
* config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
function.
* config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
(*cond_<optab><mode>): New patterns for reversed operands.
2018-05-25 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
(DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
(REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
(STMT_VINFO_GROUPED_ACCESS): Adjust.
* tree-vect-data-refs.c (everywhere): Adjust users.
* tree-vect-loop.c (everywhere): Likewise.
* tree-vect-slp.c (everywhere): Likewise.
* tree-vect-stmts.c (everywhere): Likewise.
* tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (gcc_cv_as_section_has_e): Move to common section.
Rename to...
(gcc_cv_as_section_exclude): ... this.
Try Solaris as #exclude syntax.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/i386.c (i386_solaris_elf_named_section): Handle
SECTION_EXCLUDE.
* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
[HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
* varasm.c (default_elf_asm_named_section): Don't check if
HAVE_GAS_SECTION_EXCLUDE is defined.
2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
* doc/md.texi: Update the documentation of the cond_* optabs
to mention the new final operand. Fix GET_MODE_NUNITS call.
Describe the scalar case too.
* internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
* internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
instead of 2.
(expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
(get_conditional_internal_fn): Update comment.
* tree-vect-loop.c (vectorizable_reduction): Pass the original
accumulator value as a final argument to conditional functions.
* config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
a define_expand and add an "else" operand. Assert for now that
the else operand is equal to operand 2. Use SVE_INT_BINARY and
SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
(*cond_<optab><mode>): New patterns.
* config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
(UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
(UNSPEC_COND_EOR): Delete.
(optab): Remove associated mappings.
(SVE_INT_BINARY): New code iterator.
(sve_int_op): Remove int attribute and add "minus" to the code
attribute.
(SVE_COND_INT_OP): Delete.
(SVE_COND_FP_OP): Rename to...
(SVE_COND_FP_BINARY): ...this.
2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
* optabs.c (can_reuse_operands_p): New function.
(maybe_legitimize_operands): Try to reuse the results for
earlier operands.
2018-05-24 Uros Bizjak <ubizjak@gmail.com>
* config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
Add {q} suffix to insn mnemonic.
2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
(msp430_warn_func_return): New.
2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
* fold-const.c (tree_nonzero_bits): New function.
* fold-const.h (tree_nonzero_bits): Likewise.
* match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/85900
PR target/85345
* varasm.c (assemble_alias): Check ifunc_resolver only on
FUNCTION_DECL.
2018-05-24 Uros Bizjak <ubizjak@gmail.com>
PR target/85903
* config/i386/sse.md (movdi_to_sse): Do not generate pseudo
when memory input operand is handled.
2018-05-24 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
global.
(qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
* match.pd: Delay FMA folds until after vectorization.
2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
PR target/83009
* config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
address check not strict.
2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
* gimple-match.h (gimple_match_op): New class.
(mprts_hook): Replace parameters with a gimple_match_op *.
(maybe_build_generic_op): Likewise.
(gimple_simplified_result_is_gimple_val): Replace parameters with
a const gimple_match_op *.
(gimple_simplify): Replace code_helper * and tree * parameters with
a gimple_match_op * parameter.
(gimple_resimplify1): Replace code_helper *, tree and tree *
parameters with a gimple_match_op * parameter.
(gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
(maybe_push_res_to_seq): Replace code_helper, tree and tree *
parameters with a gimple_match_op * parameter.
* gimple-match-head.c (gimple_simplify): Change prototypes of
auto-generated functions to take a gimple_match_op * instead of
separate code_helper * and tree * parameters. Make the same
change in the top-level overload and update calls to the
gimple_resimplify routines. Update calls to the auto-generated
functions and to maybe_push_res_to_seq in the publicly-facing
operation-specific gimple_simplify overloads.
(gimple_match_op::MAX_NUM_OPS): Define.
(gimple_resimplify1): Replace rcode and ops with a single res_op
parameter. Update call to gimple_simplify.
(gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
(mprts_hook): Replace parameters with a gimple_match_op *.
(maybe_build_generic_op): Likewise.
(build_call_internal): Replace type, nargs and ops with
a gimple_match_op *.
(maybe_push_res_to_seq): Replace res_code, type and ops parameters
with a single gimple_match_op *. Update calls to mprts_hook,
build_call_internal and gimple_simplified_result_is_gimple_val.
Factor out code that is common to the tree_code and combined_fn cases.
* genmatch.c (expr::gen_transform): Replace tem_code and
tem_ops with a gimple_match_op called tem_op. Update calls
to the gimple_resimplify functions and maybe_push_res_to_seq.
(dt_simplify::gen_1): Manipulate res_op instead of res_code and
res_ops. Update call to the gimple_resimplify functions.
(dt_simplify::gen): Pass res_op instead of res_code and res_ops.
(decision_tree::gen): Make the functions take a gimple_match_op *
called res_op instead of separate res_code and res_ops parameters.
Update call accordingly.
* gimple-fold.c (replace_stmt_with_simplification): Replace rcode
and ops with a single res_op parameter. Update calls to
maybe_build_generic_op and maybe_push_res_to_seq.
(fold_stmt_1): Update calls to gimple_simplify and
replace_stmt_with_simplification.
(gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
and gimple_simplified_result_is_gimple_val.
* tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
gimple_simplify.
* tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
with a gimple_match_op *.
(vn_nary_build_or_lookup): Likewise. Update call to
vn_nary_build_or_lookup_1.
(vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
gimple_match_op *. Update calls to the gimple_resimplify routines
and to gimple_simplified_result_is_gimple_val.
(vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
(vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
(visit_nary_op): Likewise.
(visit_reference_op_load): Likewise.
2018-05-23 Luis Machado <luis.machado@linaro.org>
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
modifier for printing the step amount.
2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
PR target/78849
* tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
types.
2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
* doc/sourcebuild.texi (Endianness): New subsubsection.
2018-05-23 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<prefetch_dynamic_strides>: New const bool field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
prefetch_dynamic_strides.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
false.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_DYNAMIC_STRIDES.
* doc/invoke.texi (prefetch-dynamic-strides): Document new option.
* params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
* params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
prefetch-dynamic-strides setting.
2018-05-23 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<minimum_stride>: New const int field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
minimum_stride field defaulting to -1.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
<default_opt_level>: Set to 3.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_MINIMUM_STRIDE.
* doc/invoke.texi (prefetch-minimum-stride): Document new option.
* params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
* params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
stride is constant and is below the minimum stride threshold.
2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (mode26): Delete.
(armv4): Delete mode26 reference.
* config/arm/arm.c (arm_configure_build_target): Delete use of
isa_bit_mode26.
2018-05-23 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
New insn pattern.
(floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
for non-SSE modes.
(floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
(floatunsdidf2): Ditto.
2018-05-23 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
(fixuns_trunc<mode>si2_avx512f): Ditto.
(*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
(fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
2018-05-23 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/79985
* df-scan.c (df_insn_refs_collect): Remove special case for
global registers and asm statements.
2018-05-23 Alexander Monakov <amonakov@ispras.ru>
* extend.texi (Global Register Variables): Rewrite the bullet list.
Note that the register is available for allocation. Note that access
via inline asm must use constraints. Add note about async-signal
handlers. Remove paragraph about automagic register selection.
2018-05-23 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
of fixed offset from memset VN.
2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
* gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
first_interp field.
(alloc_cand_and_find_basis): Initialize first_interp field.
(slsr_process_mul): Modify first_interp field.
(slsr_process_add): Likewise.
(slsr_process_cast): Modify first_interp field for each new
interpretation.
(slsr_process_copy): Likewise.
(dump_candidate): Dump first_interp field.
(replace_mult_candidate): Process all interpretations, not just
subsequent ones.
(replace_rhs_if_not_dup): Likewise.
(replace_one_candidate): Likewise.
2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.c (aarch64_use_frame_pointer):
Add new boolean.
(aarch64_needs_frame_chain): New function.
(aarch64_parse_override_string): Set aarch64_use_frame_pointer.
2018-05-23 Sudakshina Das <sudi.das@arm.com>
PR target/84882
* common/config/aarch64/aarch64-common.c (aarch64_handle_option):
Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
* config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
* config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
as true for strict-align.
(aarch64_can_inline_p): Perform checks even when callee has no
attributes to check for strict alignment.
* doc/extend.texi (AArch64 Function Attributes): Document
no-strict-align.
* doc/invoke.texi: (AArch64 Options): Likewise.
2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/85853
* tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
the handling of the root of the node to...
(vect_slp_analyze_node_operations_1): ...this new function,
and run the whole thing with the child nodes' def types
set according to their SLP node's def type.
2018-05-23 Richard Biener <rguenther@suse.de>
PR middle-end/85874
* tree-data-ref.c (create_runtime_alias_checks): Defer
and ignore overflow warnings.
2018-05-23 Yury Gribov <tetra2005@gmail.com>
PR tree-optimization/85822
* tree-vrp.c (is_masked_range_test): Fix handling of negative
constants.
2018-05-23 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
memset constants via native_interpret_expr.
2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/85345
* cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
attribute.
(cgraph_node::create_alias): Likewise.
(cgraph_node::get_availability): Check ifunc_resolver instead
of looking up ifunc attribute.
* cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
* varasm.c (do_assemble_alias): Likewise.
(assemble_alias): Likewise.
(default_binds_local_p_3): Likewise.
* cgraph.h (cgraph_node): Add ifunc_resolver.
(cgraph_node::only_called_directly_or_aliased_p): Return false
for IFUNC resolver.
* lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
attribute.
* symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
(symtab_node::binds_to_current_def_p): Check ifunc_resolver
instead of looking up ifunc attribute.
2018-05-22 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
2018-05-22 Martin Sebor <msebor@redhat.com>
PR middle-end/85359
* builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
only when expasion succeeds.
(expand_builtin_strcmp): Same.
(expand_builtin_strncmp): Same.
2018-05-22 Martin Sebor <msebor@redhat.com>
* calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-ldpstp.md: Replace uses of
aarch64_mem_pair_operand with memory_operand and delete operand swapping
code.
* config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
Add check for legitimate_address.
(aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
(aarch64_swap_ldrstr_operands): New.
* config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
Define prototype.
2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md: New patterns to generate stp
and ldp.
(store_pair_sw, store_pair_dw): New patterns to generate stp for
single words and double words.
(load_pair_sw, load_pair_dw): Likewise.
(store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
Delete.
(load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
Delete.
* config/aarch64/aarch64-ldpstp.md: Modify peephole
for different mode ldpstp and add peephole for merged zero stores.
Likewise for loads.
* config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
Add size check.
(aarch64_gen_store_pair): Rename calls to match new patterns.
(aarch64_gen_load_pair): Rename calls to match new patterns.
* config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
(load_pair<DREG:mode><DREG2:mode>): ... This.
(store_pair<mode>): Rename to...
(vec_store_pair<DREG:mode><DREG2:mode>): ... This.
* config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
New mode iterators.
(V_INT_EQUIV): Handle SImode.
* config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
New predicate.
2018-05-22 Martin Sebor <msebor@redhat.com>
PR c/85623
* calls.c (maybe_warn_nonstring_arg): Use string length to set
or ajust the presumed bound on an operation to avoid unnecessary
warnings.
2018-05-22 Martin Sebor <msebor@redhat.com>
PR tree-optimization/85826
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
assuming that a DECL necesarily has a constant size.
2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
PR middle-end/85862
* internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
2018-05-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/85834
* tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
non-constant and non-zero memset arguments.
2018-05-22 Martin Liska <mliska@suse.cz>
PR ipa/85607
* ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
2018-05-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/85863
* tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
comparisons when vectype is specified.
(vectorizable_condition): Do not specify vectype for
vect_is_simple_cond when SLP vectorizing.
2018-05-21 Michael Meissner <meissner@linux.ibm.com>
PR target/85657
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
define __ibm128 as long double.
* config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
as a distinct type when IEEE 128-bit support is enabled.
(init_float128_ieee): Fix up conversions between IFmode and IEEE
128-bit types to use the correct functions.
(rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
convert between 128-bit floating point types that have different
modes but the same representation, instead of using gen_lowpart to
makean alias.
* config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
KFmode.
(IFKF_reg): New attributes to give the register constraints for
IFmode and KFmode.
(extend<mode>tf2_internal): New insns to mark an explicit
conversion between 128-bit floating point types that have a
different mode but share the same representation.
2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/85814
* tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
a null return from get_strinfo when unsharing the next
strinfo in the chain.
2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gcc/84923
* varasm.c (weak_finish): Clean up weak_decls.
2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
UNSPEC_UADALP values.
* config/aarch64/iterators.md (ABAL): New int iterator.
(ABDL2): Likewise.
(ADALP): Likewise.
(sur): Add mappings for the above.
* config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
New define_insn.
(aarch64_<sur>abal<mode>_4): Likewise.
(aarch64_<sur>adalp<mode>_3): Likewise.
(<sur>sadv16qi): New define_expand.
2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
* config/i386/i386.md (*movsf_internal): AVX falsedep fix.
(*movdf_internal): Ditto.
(*rcpsf2_sse): Ditto.
(*rsqrtsf2_sse): Ditto.
(*sqrt<mode>2_sse): Ditto.
2018-05-21 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
eor3q<mode>4.
(aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
* config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
vbcaxq_s64): New.
* config/aarch64/arm_neon.h: Likewise.
* config/aarch64/iterators.md (VQ_I): New.
2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
* config.gcc: Add arc/t-multilib-linux to tmake_file for
arc*-*-linux*.
* config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
MULTILIB_DIRNAMES
2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/constraints.md (S): New constraint.
* config/nds32/nds32.md (call_internal): Use constraint S.
(call_value_internal): Likewise.
(sibcall_internal): Likewise.
(sibcall_value_internal): Likewise.
2018-05-20 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
into consideration.
2018-05-20 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
(insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
(nds32_rtx_costs_impl): Simplify.
(nds32_address_cost_impl): Simplify.
(nds32_init_rtx_costs): New function.
(nds32_rtx_costs_speed_prefer): Likewise.
(nds32_rtx_costs_size_prefer): Likewise.
(nds32_address_cost_speed_prefer): Likewise.
(nds32_address_cost_speed_fwprop): Likewise.
(nds32_address_cost_size_prefer): Likewise.
* config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
* config/nds32/nds32.c (nds32_option_override): Use
nds32_init_rtx_costs function.
2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
* config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
(TARGET_PIPELINE_N8): Likewise.
(TARGET_PIPELINE_N10): Likewise.
(TARGET_PIPELINE_N13): Likewise.
(TARGET_PIPELINE_GRAYWOLF): Likewise.
2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/nds32-fpu.md: Update copyright year.
2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c
(nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
* config/nds32/nds32.opt (minline-asm-r15): New option.
2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
* common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
MASK_HW_ABS.
* config/nds32/nds32.md (abssi2): New pattern.
2018-05-19 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (rex64namesuffix): New mode attribute.
* config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
Merge insn pattern from sse_cvtsi2ss<round_name> and
sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
(sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
using SWI48 mode iterator.
(sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
(sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
pattern from sse_cvttss2si<round_saeonly_name>
and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
(avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
using SWI48 mode iterator.
(avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
(avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
using SWI48 mode iterator.
(avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
(sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
SWI48 mode iterator.
(sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
(sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
pattern from sse_cvttsd2si<round_saeonly_name>
and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-md-auxiliary.c
(nds32_valid_smw_lwm_base_p): Refine.
(nds32_output_smw_single_word): Refine.
(nds32_output_smw_double_word): New.
* config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
(nds32_output_stack_pop): Refine.
(nds32_expand_unaligned_load): Refine.
(nds32_expand_unaligned_store): Refine.
2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/constants.md: Add TP_REGNUM constant.
(unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
UNSPEC_ADD32.
* config/nds32/nds32-doubleword.md: Consider flag_pic.
* config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
* config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
* config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
and PIC code generation.
* config/nds32/nds32-protos.h: Declarations that support TLS and PIC
code generation.
* config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
optimization.
* config/nds32/nds32.md: Support TLS and PIC.
* config/nds32/nds32.c: Support TLS and PIC.
* config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
* config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
predicate.
2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
mode with E_ prefix.
2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
* config/nds32/nds32-md-auxiliary.c
(symbolic_reference_mentioned_p): New.
(nds32_legitimize_ict_address): New.
(nds32_expand_ict_move): New.
(nds32_indirect_call_referenced_p): New.
(nds32_symbol_binds_local_p): Delete.
(nds32_long_call_p): Modify.
* config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
* config/nds32/nds32-protos.h
(symbolic_reference_mentioned_p): Declare.
(nds32_legitimize_ict_address): Declare.
(nds32_expand_ict_move): Declare.
(nds32_indirect_call_referenced_p): Declare.
* config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
(nds32_relax_group): Use nds32_ict_const_p as condition.
* config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
(nds32_asm_file_start): Output ict_model directive in asm code.
(nds32_legitimate_address_p): Consider indirect call.
(nds32_print_operand): Consider indirect call.
(nds32_print_operand_address): Consider indirect call.
(nds32_insert_attributes): Handle "indirect_call" attribute.
(TARGET_LEGITIMATE_ADDRESS_P): Define.
(TARGET_LEGITIMATE_CONSTANT_P): Define.
(TARGET_CANNOT_FORCE_CONST_MEM): Define.
(TARGET_DELEGITIMIZE_ADDRESS): Define.
(TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
* config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
(TARGET_ICT_MODEL_SMALL): Define.
(TARGET_ICT_MODEL_LARGE): Define.
* config/nds32/nds32.md (movsi): Consider ict model.
(call, call_value): Consider ict model.
(sibcall, sibcall_value): Consider ict model.
* config/nds32/nds32.opt (mict-model): New option.
* config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
model.
2018-05-18 Kito Cheng <kito.cheng@gmail.com>
Monk Chiang <sh.chiang04@gmail.com>
Jim Wilson <jimw@sifive.com>
* common/config/riscv/riscv-common.c (riscv_parse_arch_string):
Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
* config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
* config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
__riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
* config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
* config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
compute save_libcall_adjustment properly.
(riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
(riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
* config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
(STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
(GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
(ABI_SPEC): Handle mabi=ilp32e.
* config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
(RVE): Add RVE mask.
* doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
<-march>: Add rv32e as an example.
2018-05-18 Marc Glisse <marc.glisse@inria.fr>
PR c++/82899
* tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
(intra_create_variable_infos): Handle C++ constructors.
2018-05-18 Martin Liska <mliska@suse.cz>
* passes.def: Remove a redundant pass.
2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
PR bootstrap/85838
* config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (armv3m, mode32): Delete features.
(ARMv4): Update.
(ARMv2, ARMv3, ARMv3m): Delete fgroups.
(ARMv6m): Update.
(armv2, armv2a, armv3, armv3m): Delete architectures.
(arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
Delete cpus.
* config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
(*mulsidi3adddi): Likewise.
(mulsidi3): Likewise.
(*mulsidi3_nov6): Likewise.
(umulsidi3): Likewise.
(umulsidi3_nov6): Likewise.
(umaddsidi4): Likewise.
(*umulsidi3adddi): Likewise.
(smulsi3_highpart): Likewise.
(*smulsi3_highpart_nov6): Likewise.
(umulsi3_highpart): Likewise.
(*umulsi3_highpart_nov6): Likewise.
* config/arm/arm.h (arm_arch3m): Delete.
* config/arm/arm.c (arm_arch3m): Delete.
(arm_option_override_internal): Update armv3-related comment.
(arm_configure_build_target): Delete use of isa_bit_mode32.
(arm_option_reconfigure_globals): Delete set of arm_ach3m.
(arm_rtx_costs_internal): Delete check of arm_arch3m.
* config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
(mulsa3): Likewise.
(mulusa3): Likewise.
* config/arm/arm-protos.h (arm_arch3m): Delete.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm-tune.md: Likewise.
* config/arm/t-arm-elf (all_early_nofp): Delete mentions of
deleted architectures.
2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (armv5, armv5e): Delete features.
(armv5t, armv5te): New features.
(ARMv5, ARMv5e): Delete fgroups.
(ARMv5t, ARMv5te): Adjust for above changes.
(ARMv6m): Likewise.
(armv5, armv5e): Delete arches.
* config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
arm_arch5.
(*call_reg_arm): Likewise.
(*call_value_reg_armv5): Likewise.
(*call_value_reg_arm): Likewise.
(*call_symbol): Likewise.
(*call_value_symbol): Likewise.
(*sibcall_insn): Likewise.
(*sibcall_value_insn): Likewise.
(clzsi2): Likewise.
(prefetch): Likewise.
(define_split and define_peephole2 dependent on arm_arch5):
Likewise.
* config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
arm_arch5e.
(TARGET_ARM_QBIT): Likewise.
(TARGET_DSP_MULTIPLY): Likewise.
(enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
(arm_arch5, arm_arch5e): Delete.
(arm_arch5t, arm_arch5te): Declare.
* config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
(arm_arch5t): Declare.
(arm_option_reconfigure_globals): Update for the above.
(arm_options_perform_arch_sanity_checks): Update comment, replace
use of arm_arch5 with arm_arch5t.
(use_return_insn): Likewise.
(arm_emit_call_insn): Likewise.
(output_return_instruction): Likewise.
(arm_final_prescan_insn): Likewise.
(arm_coproc_builtin_available): Likewise.
* config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
arm_arch5e with arm_arch5t and arm_arch5te.
* config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
(arm_arch5t, arm_arch5te): Declare.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/t-arm-elf: Remove references to armv5, armv5e.
* config/arm/t-multilib: Likewise.
* config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
instead of arm_arch5.
(*call_reg_thumb1): Likewise.
(*call_value_reg_thumb1_v5): Likewise.
(*call_value_reg_thumb1): Likewise.
* config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
unreachable path.
* doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
2018-05-18 Martin Liska <mliska@suse.cz>
PR gcov-profile/84846
* doc/gcov.texi: Document -t option of gcov tool.
2018-05-18 Martin Liska <mliska@suse.cz>
PR gcov-profile/84846
* gcov.c (print_usage): Add new -t option.
(process_args): Handle the option.
(generate_results): Use stdout as output when requested by
the option.
2018-05-18 Martin Liska <mliska@suse.cz>
PR gcov-profile/84846
* coverage.c (coverage_init): Write PWD to .gcno file.
* doc/gcov.texi: Document how working directory is printed.
* gcov-dump.c (dump_gcov_file): Print PWD.
* gcov.c (output_intermediate_file): Likewise.
(read_graph_file): Read PWD string.
(output_lines): Print PWD.
2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR middle-end/85817
* ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
for retval and return false if all args to phi are zero.
2018-05-18 Richard Biener <rguenther@suse.de>
* gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
method.
(evrp_dom_walker::before_dom_children): Call it.
2018-05-18 Richard Biener <rguenther@suse.de>
* tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
results when processing array refs with variable index.
2018-05-18 Toon Moene <toon@moene.org>
* doc/invoke.texi: Move -floop-unroll-and-jam documentation
directly after that of -floop-interchange. Indicate that both
options are enabled by default when specifying -O3.
2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
iterator. Delete separate integer-mode vec_set<mode> expander.
(aarch64_simd_vec_setv2di): Delete.
(vec_setv2di): Delete.
(aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
the "w, r" alternative.
2018-05-18 Martin Liska <mliska@suse.cz>
* passes.def: Add pass_lower_switch and pass_lower_switch_O0.
* tree-pass.h (make_pass_lower_switch_O0): New function.
* tree-switch-conversion.c (node_has_low_bound): Remove.
(node_has_high_bound): Likewise.
(node_is_bounded): Likewise.
(class pass_lower_switch): Make it a template type and create
two instances.
(pass_lower_switch::execute): Add template argument.
(make_pass_lower_switch): New function.
(make_pass_lower_switch_O0): New function.
(do_jump_if_equal): Remove.
(emit_case_nodes): Simplify to just handle all 3 cases and leave
all the hard work to tree optimization passes.
2018-05-18 Martin Liska <mliska@suse.cz>
* dbgcnt.c (limit_low): Renamed from limit.
(limit_high): New variable.
(dbg_cnt_is_enabled): Check for upper limit.
(dbg_cnt): Adjust dumping.
(dbg_cnt_set_limit_by_index): Add new argument for high
value.
(dbg_cnt_set_limit_by_name): Likewise.
(dbg_cnt_process_single_pair): Parse new format.
(dbg_cnt_process_opt): Use strtok.
(dbg_cnt_list_all_counters): Remove 'value' and add
'limit_high'.
* doc/invoke.texi: Document changes.
2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
* doc/sourcebuild.texi (scalar_all_fma): Document.
* tree.def (FMA_EXPR): Delete.
* internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
* internal-fn.c (ternary_direct): New macro.
(expand_ternary_optab_fn): Likewise.
(direct_ternary_optab_supported_p): Likewise.
* Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
* builtins.c (fold_builtin_fma): Delete.
(fold_builtin_3): Don't call it.
* cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
* expr.c (expand_expr_real_2): Likewise.
* fold-const.c (operand_equal_p): Likewise.
(fold_ternary_loc): Likewise.
* gimple-pretty-print.c (dump_ternary_rhs): Likewise.
* gimple.c (DEFTREECODE): Likewise.
* gimplify.c (gimplify_expr): Likewise.
* optabs-tree.c (optab_for_tree_code): Likewise.
* tree-cfg.c (verify_gimple_assign_ternary): Likewise.
* tree-eh.c (operation_could_trap_p): Likewise.
(stmt_could_throw_1_p): Likewise.
* tree-inline.c (estimate_operator_cost): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
(op_code_prio): Likewise.
* tree-ssa-loop-im.c (stmt_cost): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree.c (commutative_ternary_tree_code, add_expr): Likewise.
* fold-const-call.h (fold_fma): Delete.
* fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
CFN_FNMA and CFN_FNMS.
(fold_fma): Delete.
* genmatch.c (combined_fn): New enum.
(commutative_ternary_tree_code): Remove FMA_EXPR handling.
(commutative_op): New function.
(commutate): Use it. Handle more than 2 operands.
(dt_operand::gen_gimple_expr): Use commutative_op.
(parser::parse_expr): Allow :c to be used with non-binary
operators if the commutative operand is known.
* gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
CFN_FMS, CFN_FNMA and CFN_FNMS.
(backprop::process_assign_use): Remove FMA_EXPR handling.
* hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
(gen_hsa_fma): New function.
(gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
IFN_FNMA and IFN_FNMS.
* match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
* gimple-fold.h (follow_all_ssa_edges): Declare.
* gimple-fold.c (follow_all_ssa_edges): New function.
* tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
gimple_build interface and use follow_all_ssa_edges to fold the result.
(convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
instead of checking for optabs directly.
* config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
rather than FMA_EXPRs.
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
call to IFN_FMA instead of an FMA_EXPR.
2018-05-17 Jim Wilson <jimw@sifive.com>
* expr.c (do_tablejump): When converting index to Pmode, if we have a
sign extended promoted subreg, and the range does not have the sign bit
set, then do a sign extend.
* config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
test, check for sign extended subreg and/or constant operands, and
do a sign extend in that case.
2018-05-17 Steve Ellcey <sellcey@cavium.com>
* config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
(thunderx2t99_multiple): Delete psuedo-units from used cpus.
Add untyped.
(thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
Change logics_shift_reg to logics_shift_imm.
(thunderx2t99_fp_loadpair_basic): Delete.
(thunderx2t99_fp_storepair_basic): Delete.
(thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
(thunderx2t99_asimd_polynomial): Delete.
(thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
and neon_fp_mul_d_scalar_q.
(thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
(thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
(thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
(thunderx2t99_asimd_lut): Add missing tbl types.
(thunderx2t99_asimd_ext): Delete.
(thunderx2t99_asimd_load1_1_mult): Delete.
(thunderx2t99_asimd_load1_2_mult): Delete.
(thunderx2t99_asimd_load1_ldp): New.
(thunderx2t99_asimd_load1): New.
(thunderx2t99_asimd_load2): Add missing *load2* types.
(thunderx2t99_asimd_load3): New.
(thunderx2t99_asimd_load4): New.
(thunderx2t99_asimd_store1_1_mult): Delete.
(thunderx2t99_asimd_store1_2_mult): Delete.
(thunderx2t99_asimd_store2_mult): Delete.
(thunderx2t99_asimd_store2_onelane): Delete.
(thunderx2t99_asimd_store_stp): New.
(thunderx2t99_asimd_store1): New.
(thunderx2t99_asimd_store2): New.
(thunderx2t99_asimd_store3): New.
(thunderx2t99_asimd_store4): New.
2018-05-17 Jerome Lambourg <lambourg@adacore.com>
* config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
#include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
Segher Boessenkool <segher@kernel.crashing.org>
PR target/85698
* config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
operand.
2018-05-17 Richard Biener <rguenther@suse.de>
* tree-ssa-dse.c (dse_classify_store): Fix iterator increment
for pruning loop and prune defs feeding only already visited PHIs.
2018-05-17 Richard Biener <rguenther@suse.de>
* tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
2018-05-17 Bin Cheng <bin.cheng@arm.com>
Richard Biener <rguenther@suse.de>
PR tree-optimization/85793
* tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
for VMAT_ELEMENTWISE.
2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
* internal-fn.h (lookup_internal_fn): Declare
* internal-fn.c (lookup_internal_fn): New function.
* gimple.c (gimple_build_call_from_tree): Handle calls to
internal functions.
* gimple-pretty-print.c (dump_gimple_call): Print "." before
internal function names.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
* gimple-fold.h (gimple_build): Make the function forms take
combined_fn rather than built_in_function.
(gimple_simplify): Likewise.
* gimple-match-head.c (gimple_simplify): Likewise.
* gimple-fold.c (gimple_build): Likewise.
* tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
rather than gimple_build_call_internal.
(get_initial_defs_for_reduction): Likewise.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_live_operation): Likewise.
2018-05-17 Martin Liska <mliska@suse.cz>
* gimple-ssa-sprintf.c (format_directive): Do not use
space in between 'G_' and '('.
2018-05-17 Jakub Jelinek <jakub@redhat.com>
PR target/85323
* config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
even if the mask is not all ones.
PR target/85323
* config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
vector.
(ix86_gimple_fold_builtin): Likewise.
PR target/85323
* config/i386/i386.c: Include tree-vector-builder.h.
(ix86_vector_shift_count): New function.
(ix86_fold_builtin): Fold shift builtins by scalar count.
(ix86_gimple_fold_builtin): Likewise.
* config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
_mm512_setzero): New intrinsics.
2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
code generation for cases where splatting a value is not useful.
* simplify-rtx.c (simplify_ternary_operation): Simplify
vec_merge across a vec_duplicate and a paradoxical subreg forming
a vector mode to a vec_concat.
2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
* config.gcc: Support "goldmont-plus".
* config/i386/driver-i386.c (host_detect_local_cpu): Detect
"goldmont-plus".
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
PROCESSOR_GOLDMONT_PLUS.
* config/i386/i386.c (m_GOLDMONT_PLUS): Define.
(processor_target_table): Add "goldmont-plus".
(PTA_GOLDMONT_PLUS): Define.
(ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
(get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
(fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
(fold_builtin_cpu): Add "goldmont-plus".
(ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
(ix86_option_override_internal): Add "goldmont-plus".
* config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
(processor_type): Add PROCESSOR_GOLDMONT_PLUS.
* config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
* doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
2018-05-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/85757
* tree-ssa-dse.c (dse_classify_store): Record a PHI def and
remove defs that only feed that PHI from further processing.
2018-05-16 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
asterisk to name.
(<optab>di3_mask, <optab>di3_mask_1): Likewise.
2018-05-16 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (count_index_strings): New function.
(output_indirect_strings): Call count_index_strings and generate
header for dwarf_version >= 5.
2018-05-16 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (dwarf_FORM): New function.
(set_indirect_string): Use dwarf_FORM.
(reset_indirect_string): Likewise.
(size_of_die): Likewise.
(value_format): Likewise.
(output_die): Likewise.
(add_skeleton_AT_string): Likewise.
(output_macinfo_op): Likewise.
(index_string): Likewise.
(output_index_string_offset): Likewise.
(output_index_string): Likewise.
(count_index_strings): Likewise.
2018-05-16 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
2018-05-16 Martin Jambor <mjambor@suse.cz>
* ipa-prop.c (ipa_free_all_edge_args): Remove.
* ipa-prop.h (ipa_free_all_edge_args): Likewise.
2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
(fnma<mode>4): Likewise.
(fms<mode>4): Likewise.
(fnms<mode>4): Likewise.
(aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
(aarch64_fnma<mode>4): Likewise.
(aarch64_fms<mode>4): Likewise.
(aarch64_fnms<mode>4): Likewise.
(aarch64_fnmadd<mode>4): Likewise.
2018-05-16 Jason Merrill <jason@redhat.com>
* tree.c (warn_deprecated_use): Return bool. Simplify logic.
2018-05-16 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
(dump_stmt_cost): Declare.
(add_stmt_cost): Dump cost we add.
(add_stmt_costs): New function.
(vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
No longer exported.
(vect_analyze_stmt): Adjust prototype.
(vectorizable_condition): Likewise.
(vectorizable_live_operation): Likewise.
(vectorizable_reduction): Likewise.
(vectorizable_induction): Likewise.
* tree-vect-loop.c (vect_analyze_loop_operations): Create local
cost vector to pass to vectorizable_ and record afterwards.
(vect_model_reduction_cost): Take cost vector argument and adjust.
(vect_model_induction_cost): Likewise.
(vectorizable_reduction): Likewise.
(vectorizable_induction): Likewise.
(vectorizable_live_operation): Likewise.
* tree-vect-slp.c (vect_create_new_slp_node): Initialize
SLP_TREE_NUMBER_OF_VEC_STMTS.
(vect_analyze_slp_cost_1): Remove.
(vect_analyze_slp_cost): Likewise.
(vect_slp_analyze_node_operations): Take visited args and
a target cost vector. Avoid processing already visited stmt sets.
(vect_slp_analyze_operations): Use a local cost vector to gather
costs and register those of non-discarded instances.
(vect_bb_vectorization_profitable_p): Use add_stmt_costs.
(vect_schedule_slp_instance): Remove copying of
SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
zero.
* tree-vect-stmts.c (record_stmt_cost): Remove path directly
adding cost. Record cost entry location.
(vect_prologue_cost_for_slp_op): Function to compute cost of
a constant or invariant generated for SLP vect in the prologue,
split out from vect_analyze_slp_cost_1.
(vect_model_simple_cost): Make static. Adjust for SLP costing.
(vect_model_promotion_demotion_cost): Likewise.
(vect_model_store_cost): Likewise, make static.
(vect_model_load_cost): Likewise.
(vectorizable_bswap): Add cost vector arg and adjust.
(vectorizable_call): Likewise.
(vectorizable_simd_clone_call): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
(vectorizable_condition): Likewise.
(vectorizable_comparison): Likewise.
(can_vectorize_live_stmts): Likewise.
(vect_analyze_stmt): Likewise.
(vect_transform_stmt): Adjust calls to vectorizable_*.
* tree-vectorizer.c: Include gimple-pretty-print.h.
(dump_stmt_cost): New function.
2018-05-16 Richard Biener <rguenther@suse.de>
* params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
* doc/invoke.texi (dse-max-alias-queries-per-store): Document.
* tree-ssa-dse.c: Include tree-ssa-loop.h.
(check_name): New callback.
(dse_classify_store): Track cycles via a visited bitmap of PHI
defs and simplify handling of in-loop and across loop dead stores
and properly fail for loop-variant refs. Handle byte-tracking with
multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
limiting the walk.
2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
(vect_get_mask_type_for_stmt): Likewise.
* tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
split out from...
(vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
to determine the statement's vector type and the vector type that
should be used for calculating nunits. Deal with cases in which
the type has to be deferred.
(vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
* tree-vect-loop.c (vect_determine_vf_for_stmt_1)
(vect_determine_vf_for_stmt): New functions, split out from...
(vect_determine_vectorization_factor): ...here.
* tree-vect-stmts.c (vect_get_vector_types_for_stmt)
(vect_get_mask_type_for_stmt): New functions, split out from
vect_determine_vectorization_factor.
2018-05-16 Richard Biener <rguenther@suse.de>
* tree-cfg.c (verify_gimple_assign_ternary): Properly
verify the [VEC_]COND_EXPR embedded comparison.
2018-05-15 Martin Sebor <msebor@redhat.com>
PR tree-optimization/85753
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
RECORD_TYPE in addition to ARRAY_TYPE.
2018-05-15 Martin Sebor <msebor@redhat.com>
PR middle-end/85643
* calls.c (get_attr_nonstring_decl): Handle MEM_REF.
2018-05-15 Richard Biener <rguenther@suse.de>
* tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
add by_clobber_p one. Change algorithm to collect all defs
representing uses we need to walk and try reducing them to
a single one before failing.
(dse_dom_walker::dse_optimize_stmt): Adjust.
2018-05-13 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
(size_of_loc_descr): Likewise.
(output_loc_operands): Likewise.
(output_loc_operands_raw): Likewise.
(dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
(resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
(hash_loc_operands): Likewise.
(compare_loc_operands): Likewise.
2018-05-14 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (count_index_addrs): New function.
(dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/83648
* ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
return value as malloc candidate.
2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR ipa/85734
* ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
param as true in call to suggest_attribute.
2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
* doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
-mreadonly-in-sdata.
2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
New pattern.
(aarch64_crypto_aesd_fused): Likewise.
2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
(movsi_aarch64): Likewise.
(load_pairsi): Likewise.
(load_pairdi): Likewise.
(store_pairsi): Likewise.
(store_pairdi): Likewise.
(load_pairsf): Likewise.
(load_pairdf): Likewise.
(store_pairsf): Likewise.
(store_pairdf): Likewise.
(zero_extend): Likewise.
(trunc): Swap alternatives.
(fcvt_target): Add '?' to prefer w over r.
2018-05-14 Jakub Jelinek <jakub@redhat.com>
PR target/85756
* config/i386/i386.md: Disallow non-commutative arithmetics in
last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
in the peephole2 before it.
2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
* common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
(ix86_handle_option): Handle -mcldemote.
* config.gcc: New header.
* config/i386/cldemoteintrin.h: New file.
* config/i386/cpuid.h (bit_CLDEMOTE): New bit.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect
-mcldemote.
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
OPTION_MASK_ISA_CLDEMOTE.
* config/i386/i386.c (ix86_target_string): Add -mcldemote.
(ix86_valid_target_attribute_inner_p): Ditto.
(enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
(ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
(ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
* config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
* config/i386/i386.md (UNSPECV_CLDEMOTE): New.
(cldemote): New.
* config/i386/i386.opt: Add -mcldemote.
* config/i386/x86intrin.h: New header.
* doc/invoke.texi: Add -mcldemote.
2018-05-14 Richard Biener <rguenther@suse.de>
* doc/match-and-simplify.texi: Adjust :s documentation.
2018-05-14 Alexander Monakov <amonakov@ispras.ru>
* sort.cc (REORDER_23): Pass the type for the temporaries instead of
intended memcpy size.
(REORDER_45): Likewise.
2018-05-13 Alexander Monakov <amonakov@ispras.ru>
* sort.cc: New file.
* system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
* vec.c (qsort_chk): Use gcc_qsort.
* Makefile.in (OBJS-libcommon): Add sort.o.
(build/sort.o): New target. Use it...
(BUILD_RTL): ... here, and...
(build/gencfn-macros): ... here, and...
(build/genmatch): ... here.
2018-05-13 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
* config/nds32/nds32-graywolf.md: New file.
* config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
* config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
pipeline.
* config/nds32/nds32-protos.h: More declarations for n15 pipeline.
* config/nds32/nds32-utils.c: More implementations for n15 pipeline.
* config/nds32/nds32.md (pipeline_model): Add graywolf.
* config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
* config/nds32/pipelines.md: Include n15 settings.
2018-05-13 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
* config/nds32/nds32-n13.md: New file.
* config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
* config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
pipeline.
* config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
* config/nds32/nds32.md (pipeline_model): Add n13.
* config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
* config/nds32/pipelines.md: Include n13 settings.
2018-05-13 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
* config/nds32/nds32-n10.md: New file.
* config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
* config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
pipeline.
* config/nds32/nds32-protos.h: More declarations for n10 pipeline.
* config/nds32/nds32-utils.c: More implementations for n10 pipeline.
* config/nds32/nds32.md (pipeline_model): Add n10.
* config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
* config/nds32/pipelines.md: Include n10 settings.
2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32be-*-*): Handle --with-ext-dsp.
* config/nds32/constants.md (unspec_element, unspec_volatile_element):
Add enum values for DSP extension instructions.
* config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
New constraints.
* config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
New code iterators.
(su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
* config/nds32/nds32-dspext.md: New file for DSP implementation.
* config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
* config/nds32/nds32-intrinsic.md: Likewise.
* config/nds32/nds32_intrinsic.h: Likewise.
* config/nds32/nds32-md-auxiliary.c: Likewise.
* config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
* config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
(nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
(nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
* config/nds32/nds32-protos.h: New declarations for DSP extension.
* config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
TYPE_DMAC in switch statement.
* config/nds32/nds32.c: New checking and implementation for DSP
extension instructions.
* config/nds32/nds32.h: Likewise.
* config/nds32/nds32.md: Likewise.
* config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
* config/nds32/predicates.md: Implement new predicates for DSP
extension.
2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
Reformat alternatives and attributes so it is easier to identify
which constraints/attributes go with which instruction.
(mov<mode>_hardfloat32, FMOVE64): Likewise.
(mov<mode>_softfloat32, FMOVE64): Likewise.
(mov<mode>_hardfloat64, FMOVE64): Likewise.
(mov<mode>_softfloat64, FMOVE64): Likewise.
2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC Built-in Functions): Rename this
subsection.
(Basic PowerPC Built-in Functions): The new name of the
subsection previously known as "PowerPC Built-in Functions".
(Basic PowerPC Built-in Functions Available on all Configurations):
New subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
(Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
(Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
(Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
2018-05-11 Martin Jambor <mjambor@suse.cz>
PR ipa/85655
* ipa-cp.c (intersect_with_plats): Check that the lattice contains
single const.
2018-05-11 Richard Earnshaw <rearnsha@arm.com>
PR target/85733
* config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
* common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
(ix86_handle_option): Handle -mwaitpkg.
* config.gcc: New header.
* config/i386/cpuid.h (bit_WAITPKG): New bit.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
* config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
function type.
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
OPTION_MASK_ISA_WAITPKG.
* config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
(ix86_option_override_internal): Add PTA_WAITPKG.
(ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
(enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
IX86_BUILTIN_TPAUSE.
(ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
__builtin_ia32_umwait and __builtin_ia32_tpause.
(ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
* config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
* config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
UNSPECV_TPAUSE): New.
(umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
* config/i386/i386.opt: Add -mwaitpkg.
* config/i386/waitpkgintrin.h: New file.
* config/i386/x86intrin.h: New header.
* doc/invoke.texi: Add -mwaitpkg.
2018-05-11 Richard Earnshaw <rearnsha@arm.com>
PR target/85606
* config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
equivalent.
(cortex-m0): Use armv6s-m isa.
(cortex-m0plus): Likewise.
(cortex-m1): Likewise.
(cortex-m0.small-multiply): Likewise.
(cortex-m0plus.small-multiply): Likewise.
(cortex-m1.small-multiply): Likewise.
2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85692
* tree-ssa-forwprop.c (simplify_vector_constructor): Try two
source permute as well.
2018-05-11 Martin Liska <mliska@suse.cz>
PR sanitizer/85556
* doc/extend.texi: Document LLVM style format for no_sanitize
attribute.
2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (mode_supports_dq_form): Rename
mode_supports_vsx_dform_quad to mode_supports_dq_form.
(mode_supports_vsx_dform_quad): Likewise.
(mode_supports_vmx_dform): Move these functions to be next to the
other mode_supports functions.
(mode_supports_dq_form): Likewise.
(quad_address_p): Change calls of mode_supports_vsx_dform_quad to
mode_supports_dq_form.
(reg_offset_addressing_ok_p): Likewise.
(offsettable_ok_by_alignment): Likewise.
(rs6000_legitimate_offset_address_p): Likewise.
(legitimate_lo_sum_address_p): Likewise.
(rs6000_legitimize_address): Likewise.
(rs6000_legitimize_reload_address): Likewise.
(rs6000_secondary_reload_inner): Likewise.
(rs6000_preferred_reload_class): Likewise.
(rs6000_output_move_128bit): Likewise.
2018-05-10 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
Generate SImode target register for null target.
<case IX86_BUILTIN_XGETBV>: Ditto.
<case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
* config/i386/xsaveintrin.h (_xgetbv): Add missing return.
2018-05-10 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
dcbtt and dcbtstt if operands[2] is 0.
2018-05-10 Uros Bizjak <ubizjak@gmail.com>
PR target/85693
* config/i386/sse.md (usadv64qi): New expander.
2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
-maltivec=be support.
(vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
altivec_vsumsws): Adjust.
(altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
*altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
support.
(altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
(altivec_lve<VI_char>x): Delete expand.
(*altivec_lve<VI_char>x_internal): Rename to...
(altivec_lve<VI_char>x): ... this.
(altivec_lvxl_<mode>): Delete expand.
(*altivec_lvxl_<mode>_internal): Rename to ...
(altivec_lvxl_<mode>): ... this.
(altivec_stvxl_<mode>): Delete expand.
(*altivec_stvxl_<mode>_internal): Rename to ...
(altivec_stvxl_<mode>): ... this.
(altivec_stve<VI_char>x): Delete expand.
(*altivec_stve<VI_char>x_internal): Rename to ...
(altivec_stve<VI_char>x): ... this.
(doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
reduc_plus_scal_<mode>): Adjust.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
comment.
(rs6000_cpu_cpp_builtins): Adjust.
(altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
* config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
-maltivec=be support.
(rs6000_split_vec_extract_var): Adjust.
(rs6000_split_v4si_init): Adjust.
(swap_selector_for_mode): Delete.
(altivec_expand_lvx_be, altivec_expand_stvx_be,
altivec_expand_stvex_be): Delete.
(altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
-maltivec=be support.
(rs6000_gimple_fold_builtin): Ditto.
(rs6000_generate_float2_double_code, rs6000_generate_float2_code):
Adjust.
* config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
(TARGET_DIRECT_MOVE_64BIT): Adjust.
* config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
* config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
* config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
*vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
*vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
*vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
anonymous split): Adjust.
(vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
(vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
* configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
when --with-gxx-include-dir is also specified.
* configure: Regenerate.
2018-05-09 Jim Wilson <jimw@sifive.com>
PR target/84797
* config.gcc (riscv*-*-*): Handle --with-multilib-list.
* config/riscv/t-withmultilib: New.
* config/riscv/withmultilib.h: New.
* doc/install.texi: Document RISC-V --with-multilib-list support.
2018-05-09 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
vector.
(vect_bb_vectorization_profitable_p): Adjust. Compute
actual scalar cost using the cost vector and the add_stmt_cost
machinery.
2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85645
* config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
in the REG_CFA_REGISTER note for LR, don't leave it empty.
2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85645
* shrink-wrap.c (spread_components): Return a boolean saying if
anything was changed.
(try_shrink_wrapping_separate): Iterate spread_components until
nothing changes anymore.
2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85645
* regrename.c (build_def_use): Also kill the chains that include the
destination of a REG_CFA_REGISTER note.
2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/85645
* regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
insn that has a REG_CFA_REGISTER note.
2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
* cfgexpand.c (expand_clobber): New function.
(expand_gimple_stmt_1): Use it.
* tree-vect-stmts.c (vect_clobber_variable): New function,
split out from...
(vectorizable_simd_clone_call): ...here.
(vectorizable_store): Emit a clobber either side of an
IFN_STORE_LANES sequence.
(vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
2018-05-09 Tom de Vries <tom@codesourcery.com>
PR target/85626
* config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
(define_insn "trap_if_false"): Add exit after trap.
2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/85638
* bb-reorder.c: Include common/common-target.h.
(create_forwarder_block): New function extracted from...
(fix_up_crossing_landing_pad): ...here. Rename into...
(dw2_fix_up_crossing_landing_pad): ...this.
(sjlj_fix_up_crossing_landing_pad): New function.
(find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
from both partitions and exit the loop after one iteration.
2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
Revert:
* doc/extend.texi (PowerPC Built-in Functions): Rename this
subsection.
(Basic PowerPC Built-in Functions): The new name of the
subsection previously known as "PowerPC Built-in Functions".
(Basic PowerPC Built-in Functions Available on all Configurations):
New subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 2.05): New
subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 2.06): New
subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 2.07): New
subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 3.0): New
subsubsection.
2018-05-08 Jim Wilson <jimw@sifive.com>
* config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
(LD_EMUL_SUFFIX): New.
(LINK_SPEC): Use it.
2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
* doc/extend.texi (PowerPC Built-in Functions): Rename this
subsection.
(Basic PowerPC Built-in Functions): The new name of the
subsection previously known as "PowerPC Built-in Functions".
(Basic PowerPC Built-in Functions Available on all Configurations):
New subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 2.05): New
subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 2.06): New
subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 2.07): New
subsubsection.
(Basic PowerPC Built-in Functions Available on ISA 3.0): New
subsubsection.
2018-05-08 Jakub Jelinek <jakub@redhat.com>
PR target/85683
* config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
after cmpelim optimization.
2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
* config.gcc: Support "goldmont".
* config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
PROCESSOR_GOLDMONT.
* config/i386/i386.c (m_GOLDMONT): Define.
(processor_target_table): Add "goldmont".
(PTA_GOLDMONT): Define.
(ix86_lea_outperforms): Add TARGET_GOLDMONT.
(get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
(fold_builtin_cpu): Add M_INTEL_GOLDMONT.
(fold_builtin_cpu): Add "goldmont".
(ix86_add_stmt_cost): Add TARGET_GOLDMONT.
(ix86_option_override_internal): Add "goldmont".
* config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
(processor_type): Add PROCESSOR_GOLDMONT.
* config/i386/i386.md: Add CPU "glm".
* config/i386/glm.md: New file.
* config/i386/x86-tune.def: Add m_GOLDMONT.
* doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
2018-05-08 Jakub Jelinek <jakub@redhat.com>
PR target/85572
* config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
E_V4DImode.
* config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
PR target/85317
* config/i386/i386.c (ix86_fold_builtin): Handle
IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
PR target/85480
* config/i386/sse.md (ssequaterinsnmode): New mode attribute.
(*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
2018-05-08 Richard Earnshaw <rearnsha@arm.com>
PR target/85658
* config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
(check_arch): Likewise.
(check_fpu): Return the result rather than printing it.
(end arch): Fix operator precedence.
(end cpu): Likewise.
(END): Print the result from check_fpu.
2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
(*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
(*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
(*fcmuo<mode>_and): New patterns.
2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
(UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
(SVE_INT_CMP, SVE_FP_CMP): New code iterators.
(cmp_op, sve_imm_con): New code attributes.
(SVE_COND_INT_CMP, imm_con): Delete.
(cmp_op): Remove above unspecs from int attribute.
* config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
to...
(*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
comparison-specific unspecs.
(*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
(*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
(*vec_cmp<cmp_op>_<mode>_cc): Rename to...
(*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
(*vec_fcm<cmp_op><mode>): Rename to...
(*fcm<cmp_op><mode>): ...this and adjust likewise.
(*vec_fcmuo<mode>): Rename to...
(*fcmuo<mode>): ...this and adjust likewise.
(*pred_fcm<cmp_op><mode>): New pattern.
* config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
(aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
functions.
(aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
and UNORDERED.
(aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
(aarch64_emit_sve_predicated_cond): New function.
(aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
(aarch64_emit_unspec_cond_or): Replace with...
(aarch64_emit_sve_or_conds): ...this new function. Use
aarch64_emit_sve_ptrue_op for the individual comparisons and
aarch64_emit_binop to OR them together.
(aarch64_emit_inverted_unspec_cond): Replace with...
(aarch64_emit_sve_inverted_cond): ...this new function. Use
aarch64_emit_sve_ptrue_op for the comparison and
aarch64_emit_unop to invert the result.
(aarch64_expand_sve_vec_cmp_float): Update after the above
changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
2018-05-07 Nathan Sidwell <nathan@acm.org>
* doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
* doc/extend.texi (Deprecated Features): Remove -fno-for-scope
(Backwards Compatibility): Likewise.
2018-05-07 Luis Machado <luis.machado@linaro.org>
PR bootstrap/85681
Revert:
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<prefetch_dynamic_strides>: New const bool field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
prefetch_dynamic_strides.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
to false.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_DYNAMIC_STRIDES.
* doc/invoke.texi (prefetch-dynamic-strides): Document new option.
* params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
* params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
prefetch-dynamic-strides setting.
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<minimum_stride>: New const int field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
minimum_stride field.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_MINIMUM_STRIDE.
* doc/invoke.texi (prefetch-minimum-stride): Document new option.
* params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
* params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
stride is constant and is below the minimum stride threshold.
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
to 512.
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<prefetch_dynamic_strides>: New const bool field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
prefetch_dynamic_strides.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
to false.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_DYNAMIC_STRIDES.
* doc/invoke.texi (prefetch-dynamic-strides): Document new option.
* params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
* params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
prefetch-dynamic-strides setting.
2018-05-07 Luis Machado <luis.machado@linaro.org>
* config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
<minimum_stride>: New const int field.
* config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
minimum_stride field.
(exynosm1_prefetch_tune): Likewise.
(thunderxt88_prefetch_tune): Likewise.
(thunderx_prefetch_tune): Likewise.
(thunderx2t99_prefetch_tune): Likewise.
(qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
(aarch64_override_options_internal): Update to set
PARAM_PREFETCH_MINIMUM_STRIDE.
* doc/invoke.texi (prefetch-minimum-stride): Document new option.
* params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
* params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
* tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
stride is constant and is below the minimum stride threshold.
2018-05-06 Jakub Jelinek <jakub@redhat.com>
PR c++/85659
* cfgexpand.c (expand_asm_stmt): Don't create a temporary if
the type is addressable. Don't force op into register if it has
BLKmode.
2018-05-05 Roland McGrath <mcgrathr@google.com>
PR other/77609
* varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
any section for which we don't know a specific type it should have,
regardless of name. Previously this was done only for the exact
names ".init_array", ".fini_array", and ".preinit_array".
(default_elf_asm_named_section): Add comment about
relationship with default_section_type_flags and SECTION_NOTYPE.
(get_section): Don't consider it a type conflict if one side has
SECTION_NOTYPE and the other doesn't, as long as neither has the
SECTION_BSS et al used in the default_section_type_flags logic.
2018-05-05 Tom de Vries <tom@codesourcery.com>
PR target/85653
* config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
(workaround_barsyncs): New function.
(nvptx_reorg): Use workaround_barsyncs.
* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
(define_expand "nvptx_membar_cta"): New define_expand.
(define_insn "*nvptx_membar_cta"): New insn.
2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
* brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
To improve optimization opportunities.
* builtin-types.def: The new needed builtin types for the above.
2018-05-04 Richard Biener <rguenther@suse.de>
* bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
* gimple-ssa-store-merging.c
(imm_store_chain_info::output_merged_store): Remove redundant create,
release split_store vector contents on failure.
* tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
scalar stmt vector on cache hit.
2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
* common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
Xilinx FP support.
* config.gcc (powerpc-xilinx-eabi*): Remove.
* config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
support.
(fusion_addis_mem_combo_load): Ditto.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
FP support.
(rs6000_cpu_cpp_builtins): Ditto.
* config/rs6000/rs6000-linux.c
(rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
* config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
* config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
support.
(rs6000_setup_reg_addr_masks): Ditto.
(rs6000_init_hard_regno_mode_ok): Ditto.
(rs6000_option_override_internal): Ditto.
(legitimate_lo_sum_address_p): Ditto.
(rs6000_legitimize_address): Ditto.
(rs6000_legitimize_reload_address): Ditto.
(rs6000_legitimate_address_p): Ditto.
(abi_v4_pass_in_fpr): Ditto.
(setup_incoming_varargs): Ditto.
(rs6000_gimplify_va_arg): Ditto.
(rs6000_split_multireg_move): Ditto.
(rs6000_savres_strategy): Ditto.
(rs6000_emit_prologue_components): Ditto.
(rs6000_emit_epilogue_components): Ditto.
(rs6000_emit_prologue): Ditto.
(rs6000_emit_epilogue): Ditto.
(rs6000_elf_file_end): Ditto.
(rs6000_function_value): Ditto.
(rs6000_libcall_value): Ditto.
* config/rs6000/rs6000.h: Ditto.
(TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
(TARGET_MINMAX): ... this. New.
(TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
* config/rs6000/rs6000.md: Remove Xilinx FP support.
(*movsi_internal1_single): Delete.
* config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
mfpu=, mxilinx-fpu): Delete.
* config/rs6000/singlefp.h: Delete.
* config/rs6000/sysv4.h: Remove Xilinx FP support.
* config/rs6000/t-rs6000: Ditto.
* config/rs6000/t-xilinx: Delete.
* config/rs6000/titan.md: Adjust for fp_type removal.
* config/rs6000/vsx.md: Remove Xilinx FP support.
(VStype_simple): Delete.
(VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
* config/rs6000/xfpu.h: Delete.
* config/rs6000/xfpu.md: Delete.
* config/rs6000/xilinx.h: Delete.
* config/rs6000/xilinx.opt: Delete.
* doc/invoke.texi (RS/6000 and PowerPC Options): Remove
-msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
2018-05-04 Tom de Vries <tom@codesourcery.com>
PR libgomp/85639
* builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
if ignore == 0.
2018-05-04 Richard Biener <rguenther@suse.de>
PR middle-end/85627
* tree-complex.c (update_complex_assignment): We are always in SSA form.
(expand_complex_div_wide): Likewise.
(expand_complex_operations_1): Likewise.
(expand_complex_libcall): Preserve EH info of the original stmt.
(tree_lower_complex): Handle removed blocks.
* tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
on complex multiplication and division libcall builtins.
2018-05-04 Richard Biener <rguenther@suse.de>
PR middle-end/85574
* fold-const.c (negate_expr_p): Restrict negation of operand
zero of a division to when we know that can happen without
overflow.
(fold_negate_expr_1): Likewise.
2018-05-04 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/85466
* real.h (real_nextafter): Declare.
* real.c (real_nextafter): New function.
* fold-const-call.c (fold_const_nextafter): New function.
(fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
CASE_CFN_NEXTTOWARD.
(fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
even when arg1_mode is different from arg0_mode.
2018-05-03 Nathan Sidwell <nathan@acm.org>
* doc/extend.texi (Deprecated Features): Remove
-ffriend-injection.
(Backwards Compatibility): Likewise.
* doc/invoke.texi (C++ Language Options): Likewise.
(C++ Dialect Options): Likewise.
2018-05-03 Jakub Jelinek <jakub@redhat.com>
PR target/85530
* config/i386/avx512fintrin.h (_mm512_mullox_epi64,
_mm512_mask_mullox_epi64): New intrinsics.
2018-05-03 Tom de Vries <tom@codesourcery.com>
PR testsuite/85106
* doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
dump files): Add offload-tree.
2018-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/85615
* tree-ssa-threadupdate.c (thread_block_1): Only allow exits
to loops not nested in BBs loop father to avoid creating multi-entry
loops.
2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR tree-optimization/70291
* tree-complex.c (expand_complex_libcall): Add type, inplace_p
arguments. Change return type to tree. Emit libcall as a new
statement rather than replacing existing one when inplace_p is true.
(expand_complex_multiplication_components): New function.
(expand_complex_multiplication): Expand floating-point complex
multiplication using the above.
(expand_complex_division): Rename inner_type parameter to type.
Update expand_complex_libcall call-site.
(expand_complex_operations_1): Update expand_complex_multiplication
and expand_complex_division call-sites.
2018-05-02 Jakub Jelinek <jakub@redhat.com>
PR target/85582
* config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
*ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
*<shift_insn><dwi>3_doubleword_mask_1): In condition require that
the highest significant bit of the shift count mask is clear. In
check whether and[sq]i3 is needed verify that all significant bits
of the shift count other than the highest are set.
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR libgomp/82428
* builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
* omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
(BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
* builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
(expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
* doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
__builtin_goacc_parlevel_size.
2018-05-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/85597
* tree-vect-stmts.c (vectorizable_operation): For ternary SLP
do not use split vect_get_vec_defs call but call vect_get_slp_defs
directly.
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR testsuite/85106
* doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
dump files): Add ltrans-tree.
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR testsuite/85106
* doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
dump files): Add wpa-ipa.
2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
* config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
powerpc*-*-linux*paired* target.
* config/rs6000/750cl.h: Delete.
* config/rs6000/paired.h: Delete.
* config/rs6000/paired.md: Delete.
* config/rs6000/predicates.md (easy_vector_constant): Remove paired
float support.
* config/rs6000/rs6000-builtin.def: Remove paired float support.
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
comment. Remove paired float support.
* config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
* config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
VECTOR_PAIRED.
* config/rs6000/rs6000-protos.h (paired_expand_vector_init,
paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
declarations.
* config/rs6000/rs6000.c: Remove paired float support.
(paired_expand_vector_init, paired_expand_vector_move,
paired_emit_vector_compare, paired_emit_vector_cond_expr,
(paired_expand_lv_builtin, paired_expand_stv_builtin,
paired_expand_builtin, paired_expand_predicate_builtin,
paired_init_builtins): Delete.
* config/rs6000/rs6000.h: Remove paired float support.
* config/rs6000/rs6000.md: Remove paired float support.
(move_from_CR_ov_bit): Delete.
* config/rs6000/rs6000.opt (mpaired): Delete.
* config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
* doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
2018-05-02 Richard Biener <rguenther@suse.de>
PR middle-end/85567
* gimplify.c (gimplify_save_expr): When in SSA form allow
SAVE_EXPRs to compute to SSA vars.
2018-05-02 Jakub Jelinek <jakub@redhat.com>
PR target/85582
* config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
*ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
*<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
clobber operands[2], instead use a new pseudo. Formatting fixes.
2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/85586
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
exit early for statements in the same group if the accesses are
not strided.
2018-05-02 Tom de Vries <tom@codesourcery.com>
PR lto/85451
* lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
error message.
2018-05-01 Marc Glisse <marc.glisse@inria.fr>
PR tree-optimization/85143
* match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
2018-05-01 Tom de Vries <tom@codesourcery.com>
PR lto/85451
* config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
not found" error message.
2018-05-01 Tom de Vries <tom@codesourcery.com>
PR other/83786
* vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
* vec.c (test_ordered_remove_if): New function.
(vec_c_tests): Call test_ordered_remove_if.
* dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
* lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
* tree-vect-patterns.c (vect_pattern_recog_1): Use
VEC_ORDERED_REMOVE_IF.
2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/82665
* vr-values.c (vr_values::extract_range_from_binary_expr): Handle
pointer subtraction where arguments come from a memchr call.
2018-05-01 Jakub Jelinek <jakub@redhat.com>
* configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
--push-state --as-needed and --pop-state instead of --as-needed and
--no-as-needed if ld supports it.
* configure: Regenerated.
PR web/85578
* doc/install.texi2html: Replace _002d with - and _002a with * in
generated html files using sed.
2018-04-30 David Malcolm <dmalcolm@redhat.com>
PR c++/85523
* gcc-rich-location.c (blank_line_before_p): New function.
(use_new_line): New function.
(gcc_rich_location::add_fixit_insert_formatted): New function.
* gcc-rich-location.h
(gcc_rich_location::add_fixit_insert_formatted): New function.
2018-04-30 David Malcolm <dmalcolm@redhat.com>
* selftest.c (assert_streq): Rename "expected" and "actual" to
"val1" and "val2". Extend NULL-handling to cover both inputs
symmetrically, while still requiring both to be non-NULL for a pass.
* selftest.h (assert_streq): Rename "expected" and "actual" to
"val1" and "val2".
(ASSERT_EQ): Likewise.
(ASSERT_EQ_AT): Likewise.
(ASSERT_KNOWN_EQ): Likewise.
(ASSERT_KNOWN_EQ_AT): Likewise.
(ASSERT_NE): Likewise.
(ASSERT_MAYBE_NE): Likewise.
(ASSERT_MAYBE_NE_AT): Likewise.
(ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
the assertion to pass.
(ASSERT_STREQ_AT): Likewise.
2018-04-30 Jonathan Wakely <jwakely@redhat.com>
* doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
interaction with -pie.
2018-04-30 David Malcolm <dmalcolm@redhat.com>
* selftest.h: Fix alphabetization of per-source-file selftest
declarations.
2018-04-30 Jason Merrill <jason@redhat.com>
PR c++/61982 - dead stores to destroyed objects.
* gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
of clobber.
2018-04-30 Jason Merrill <jason@redhat.com>
* tree.c (build_clobber): New.
* tree.h: Declare it.
* gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
2018-04-30 David Malcolm <dmalcolm@redhat.com>
* diagnostic-show-locus.c (layout::layout): Update for
location_get_source_line returning a char_span.
(struct char_span): Move to input.h.
(struct correction): Update for fields in char_span becoming
private.
(struct source_line): Update for location_get_source_line
returning a char_span.
(layout::print_line): Likewise.
* edit-context.c (edited_file::print_content): Likewise.
(edited_file::print_diff_hunk): Likewise.
(edited_file::print_run_of_changed_lines): Likewise.
(edited_file::get_num_lines): Likewise.
(edited_line::edited_line): Likewise.
* final.c (asm_show_source): Likewise.
* input.c (location_get_source_line): Convert return type
from const char * to char_span, losing the final "line_len"
param.
(dump_location_info): Update for the above.
(get_substring_ranges_for_loc): Likewise. Use a char_span
when handling the literal within the line.
(test_reading_source_line): Update for location_get_source_line
returning a char_span.
* input.h (class char_span): Move here from
diagnostic-show-locus.c, converting from a struct to a class.
Make data members private.
(char_span::operator bool): New.
(char_span::length): New.
(char_span::get_buffer): New.
(char_span::operator[]): New.
(char_span::subspan): Make const.
(char_span::xstrdup): New.
(location_get_source_line): Convert return type from const char *
to char_span, losing the final "line_size" param.
2018-04-30 Jan Hubicka <jh@suse.cz>
* lto-wrapper.c (ltrans_priorities): New static var.
(cmp_priority): New.
(run_gcc): Read priorities and if doing parallel build order
the Makefile by them.
2018-04-30 David Malcolm <dmalcolm@redhat.com>
* input.h (builtins_location_check): Convert to a STATIC_ASSERT.
2018-04-30 Richard Biener <rguenther@suse.de>
* tree-cfg.c (verify_address): Remove base argument, add
flag whether to check TREE_ADDRESSABLE and do that.
(verify_expr): Remove.
(verify_types_in_gimple_reference): Add pieces from verify_expr.
(verify_gimple_assign_single): Likewise.
(verify_gimple_switch): Likewise.
(verify_expr_location_1): Dereference tp once. Add (disabled)
piece from verify_expr.
(verify_gimple_in_cfg): Do not call verify_expr on all ops.
2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/linux.h (CLEAR_INSN_CACHE): Define.
2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (prepare_extend_operands): Remove.
(small_data_pattern): Likewise.
(arc_rewrite_small_data): Likewise.
* config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
(LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
(get_symbol_alignment): New function.
(legitimate_small_data_address_p): Likewise.
(legitimate_scaled_address): Update, call
legitimate_small_data_address_p.
(output_sdata): New static variable.
(arc_print_operand): Update how we handle small data operands.
(arc_print_operand_address): Likewise.
(arc_legitimate_address_p): Update, use
legitimate_small_data_address_p.
(arc_rewrite_small_data_p): Remove.
(arc_rewrite_small_data_1): Likewise.
(arc_rewrite_small_data): Likewise.
(small_data_pattern): Likewise.
(compact_sda_memory_operand): Update to use
legitimate_small_data_address_p and get_symbol_alignment.
(prepare_move_operands): Don't rewite sdata pattern.
(prepare_extend_operands): Remove.
* config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
pattern.
(zero_extendqisi2): Likewise.
(zero_extendhisi2): Likewise.
(extendqihi2): Likewise.
(extendqisi2): Likewise.
(extendhisi2): Likewise.
(addsi3): Likewise.
(subsi3): Likewise.
(andsi3): Likewise.
* config/arc/constraints.md (Usd): Change it to memory constraint.
2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
as source of std instructions.
* config/arc/arc.md (movsi_insn): Update pattern predicate to
allow 6-bit constants as source for store instructions.
(movdi_insn): Update instruction pattern to allow 6-bit constants
as source for store instructions.
2018-04-30 Jonathan Wakely <jwakely@redhat.com>
* doc/invoke.texi (-fdebug-types-section): Fix grammar.
2018-04-30 Nathan Sidwell <nathan@acm.org>
Sandra Loosemore <sandra@codesourcery.com>
* dumpfile.c (dump_open): Allow '-' for stdout.
* doc/invoke.texi (Developer Options): Document dump filename
determination early. Document stdin/stdout selection.
2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
Microblaze Target: PIC data text relative
* config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
* config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
Add declaration.
* config/microblaze/microblaze.h (microblaze_constant_address_p):
CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
* config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
New addressing mode for data-text relative position indepenedent code.
(microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
'ADDRESS_SYMBOLIC_TXT_REL'.
(microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
(microblaze_legitimate_pic_operand): Exclude function calls from
pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
(microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
addresses cases.
(microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
(print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
(print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
for 'address + offset'.
(microblaze_expand_prologue): Add new function prologue call for
'r20' assignation.
(microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
table in case of TARGET_PIC_DATA_TEXT_REL.
(expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
* config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
Add new macros 'UNSPEC_TEXT',
'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
+ exclude function calls from 'UNSPEC_PLT' in case of data text
relative mode.
* doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
new target hook for generating address diff vector tables in case of
flag_pic.
* doc/tm.texi : Regenerate.
* stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
of addr diff vector generation.
* target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
target hook definition.
* targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
Add default function for generate_pic_addr_diff_vec -> flag_pic.
* doc/invoke.texi (Add new pic option): Add new microblaze pic
option for data text relative.
2018-04-30 Richard Biener <rguenther@suse.de>
* tree-chrec.h (evolution_function_is_constant_p): Remove
redundant check.
* tree-cfg.c (tree_node_can_be_shared): Re-order checks.
2018-04-30 Richard Biener <rguenther@suse.de>
PR bootstrap/85571
* dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
2018-04-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/28364
PR tree-optimization/85275
* tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
copying first exit test.
2018-04-28 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
dwarf_version >= 5.
(dwarf_AT): Handle DW_AT_addr_base.
(add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
2018-04-28 Uros Bizjak <ubizjak@gmail.com>
PR target/84431
* config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
(*ashl<dwi>3_doubleword_mask_1): Ditto.
(*<shift_insn><dwi>3_doubleword_mask): Ditto.
(*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
2018-04-28 Richard Biener <rguenther@suse.de>
* tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
(verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
to reflect use. Only add interesting stmts.
2018-04-27 Martin Jambor <mjambor@suse.cz>
PR ipa/85549
* ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
the jump function allows for passing through aggregate values.
2018-04-27 David Malcolm <dmalcolm@redhat.com>
* input.h (in_system_header_at): Convert from macro to inline
function.
(from_macro_expansion_at): Likewise.
(from_macro_definition_at): Likewise.
2018-04-27 Jeff Law <law@redhat.com>
* config.gcc: Mark tile* targets as deprecated/obsolete.
2018-04-27 Richard Biener <rguenther@suse.de>
* config/aarch64/aarch64.c: Simplify ap.__stack advance and
fix for ILP32.
2018-04-27 Richard Biener <rguenther@suse.de>
* tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
2018-04-27 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*movti_internal): Substitute Ye constraint
with Yd constraint. Set "preferred_for_speed" attribute from
TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
with Yd constraint.
(*movdi_internal): Ditto.
(movti_interunit splitters): Remove
TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
(movdi_interunit splitters): Ditto.
* config/i386/constraints.md (Ye): Remove.
(Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/85512
* config/aarch64/constraints.md (Usg): Limit to 31.
(Usj): Limit to 63.
2018-04-27 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85529
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
zero extension or masking of the MSB bit.
(optimize_range_tests): Add FIRST_BB argument, pass it through
to optimize_range_tests_var_bound.
(maybe_optimize_range_tests, reassociate_bb): Adjust
optimize_range_tests callers.
2018-04-26 Richard Biener <rguenther@suse.de>
Jakub Jelinek <jakub@redhat.com>
* cgraph.h (symbol_table): Just declare debug method here.
* symtab.c (symbol_table::debug): Define.
2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
* loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
2018-04-26 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md ("isa" attribute): Add x64_sse2.
("enabled" attribute): Handle x64_sse2 "isa" attribute.
(*movdi_internal): Substitute Yi and Yj constraint with x
and Ym and Yn constraint with y constraint. Update "isa"
attribute and set "preferred_for_speed" attribute from
TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
(*movsi_internal): Ditto.
(*movdf_internal): Ditto.
(*movsf_internal): Ditto.
(*zero_extendsidi2): Ditto.
* config/i386/sse.md (vec_set<mode>_0): Ditto.
(sse2_loadld): Ditto.
(*vec_extract<ssevecmodelower>_0): Ditto.
(*vec_extractv4si_0_zext_sse4): Ditto.
(vec_concatv2di): Ditto.
(*vec_dup<mode>): Ditto.
* config/i386/mmx.md (*mov<mode>_internal): Ditto.
* config/i386/constraints.md (Yi): Remove.
(Yj): Remove.
(Ym): Remove.
(Yn): Remove.
2018-04-26 Nathan Sidwell <nathan@acm.org>
* dumpfile.c (dump_open): New.
(dump_open_alternate_stream, dump_start, dump_begin): Call it.
(dump_finish): Detect stdio/stderr by value not name.
2018-04-26 Jonathan Wakely <jwakely@redhat.com>
* doc/invoke.texi (-Wreturn-type): Document default status for C++.
2018-04-26 Tom de Vries <tom@codesourcery.com>
PR target/84952
* config/nvptx/nvptx.c (verify_neutering_jumps)
(verify_neutering_labels): New function
(nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
2018-04-26 Tom de Vries <tom@codesourcery.com>
PR target/84025
* config/nvptx/nvptx.c (needs_neutering_p): New function.
(nvptx_single): Use needs_neutering_p to skip over insns that do not
need neutering.
2018-04-26 Richard Biener <rguenther@suse.de>
Tom de Vries <tom@codesourcery.com>
PR lto/85422
* lto-streamer-out.c (output_function): Fixup loops if required to match
discovery done in the reader.
2018-04-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/85116
* tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
have a loop exit from the single latch predecessor. Remove
case of header with just condition.
(ch_base::copy_headers): Exclude infinite loops from any
processing.
(pass_ch::execute): Record exits.
2018-04-26 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_get_data_access_cost): Get
prologue cost vector and pass it to vect_get_load_cost.
(vect_get_peeling_costs_all_drs): Likewise.
(vect_peeling_hash_get_lowest_cost): Likewise.
(vect_enhance_data_refs_alignment): Likewise.
2018-04-26 Richard Biener <rguenther@suse.de>
PR middle-end/85450
* tree-cfg.c (verify_gimple_assign_unary): Restore proper
checking of integer<->pointer conversions.
* omp-expand.c (expand_omp_for_static_nochunk): Avoid
sign-/zero-extending pointer types.
(expand_omp_for_static_chunk): Likewise.
2018-03-22 Hans-Peter Nilsson <hp@axis.com>
Jean Lee <xiaoyur347@gmail.com>
* config/mips/mips.c (mips_asan_shadow_offset): New function.
(TARGET_ASAN_SHADOW_OFFSET): Define.
* config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
true for -fsanitize=address.
2018-04-25 Mark Wielaard <mark@klomp.org>
* dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
shorter ones.
2018-04-25 Jakub Jelinek <jakub@redhat.com>
* config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
than "alu", remove explicit "memory" and "imm_disp" attributes.
(*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
PR middle-end/85414
* simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
gen_lowpart_no_emit.
2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
PR target/85473
* config/i386/i386.c (ix86_expand_builtin): Change memory
operand to XI, extend p0 to Pmode.
* config/i386/i386.md: Change unspec volatile and operand
1 mode to XI, change operand 0 mode to P.
2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
GET_MODE_MASK before any checking.
(nds32_can_use_bset_p): Likewise.
(nds32_can_use_btgl_p): Likewise.
2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-doubleword.md: New define_split pattern for
illegal register number.
2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
2018-04-25 Richard Biener <rguenther@suse.de>
* lto-streamer.h (LTO_major_version): Bump to 8.
2018-04-25 Jakub Jelinek <jakub@redhat.com>
* BASE-VER: Set to 9.0.0.
2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
in __abskf2 and __powikf2.
2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/85512
* config/aarch64/constraints.md (Usg, Usj): New constraints.
* config/aarch64/iterators.md (cmode_simd): New mode attribute.
* config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
Use the above on operand 2. Reindent.
(*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/85485
* common/config/i386/i386-common.c (ix86_handle_option): Don't
handle OPT_mcet.
* config/i386/i386.opt (mcet): Removed.
* doc/install.texi: Remove -mcet documentation.
* doc/invoke.texi: Likewise.
2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
PR target/85485
* doc/install.texi: Remove -mcet from bootstrap-cet.
2018-04-24 Jakub Jelinek <jakub@redhat.com>
PR target/85511
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
__builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
if TARGET_64BIT.
PR target/85503
* config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
containing a CONST_VECTOR.
2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
* doc/install.texi: Update newlib dependency for nvptx.
2018-04-24 Jakub Jelinek <jakub@redhat.com>
PR target/85508
* config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
instead of INTVAL when shifting x left.
2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
PR tree-optimization/85478
* tree-vect-loop.c (vect_analyze_loop_2): Do not call
vect_grouped_store_supported for single element vectors.
2018-04-24 Richard Biener <rguenther@suse.de>
PR target/85491
* config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
load cost increase to the case of non-constant step.
2018-04-24 Jakub Jelinek <jakub@redhat.com>
PR target/84828
* reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
destination if any_malformed_asm.
2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/85496
* expr.c (store_field): In the bitfield case, if the value comes from
a function call and is returned in registers by means of a PARALLEL,
do not change the mode of the temporary unless BLKmode and VOIDmode.
2018-04-23 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/85423
* sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
dependencies to debug insns when the previous insn is non-debug.
2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
enums into a single definition.
(fls): Fix predicates and printing.
(seti): Likewise.
2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
* config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
and short u6 immediate.
(check_if_valid_sleep_operand): Remove.
* config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_compute_stack_frame): Consider
flag_always_save_lp condition.
* config/nds32/nds32.opt (malways-save-lp): New option.
2018-04-22 Shiva Chen <shiva0217@gmail.com>
* config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
* config/nds32/nds32.c (nds32_use_load_post_increment): New.
* config/nds32/nds32.h
(USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
(USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
2018-04-22 Shiva Chen <shiva0217@gmail.com>
* config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
* config/nds32/nds32.c (nds32_ls_333_p): Remove.
2018-04-22 Shiva Chen <shiva0217@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
Declare.
* config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
* config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-protos.h (nds32_data_alignment,
nds32_local_alignment): Declare.
* config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
nds32_local_alignment): New functions.
(TARGET_CONSTANT_ALIGNMENT): Define.
* config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c
(TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
(TARGET_MODES_TIEABLE_P): Likewise.
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_asm_file_start): Display optimization
level Ofast and Og.
2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/constants.md (unspec_volatile_element): Add enum values
for unaligned access.
* config/nds32/nds32-intrinsic.c: Implementation of expanding
unaligned access.
* config/nds32/nds32-intrinsic.md: Likewise.
* config/nds32/nds32_intrinsic.h: Likewise.
* config/nds32/nds32.h (nds32_builtins): Likewise.
* config/nds32/nds32.opt (munaligned-access): New option.
* config/nds32/nds32.c (nds32_asm_file_start): Display
flag_unaligned_access status.
2018-04-20 Kito Cheng <kito.cheng@gmail.com>
* config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
-mno-relax is present.
* config/riscv/linux.h (LINK_SPEC): Ditto.
2018-04-20 Martin Sebor <msebor@redhat.com>
PR c/85365
* gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
for null pointers.
(gimple_fold_builtin_stxcpy_chk): Same.
* gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
2018-04-20 Michael Meissner <meissner@linux.ibm.com>
PR target/85456
* config/rs6000/rs6000.c (init_float128_ieee): Add support to call
__powikf2 when long double is IEEE 128-bit.
2018-04-20 Kito Cheng <kito.cheng@gmail.com>
* config/riscv/riscv.c (riscv_first_stack_step): Round up min
step to make sure stack always aligned.
2018-04-20 Carl Love <cel@us.ibm.com>
PR target/83402
* config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
size check for arg0.
2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
PR target/85445
* config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
Emit insns for calls too.
(nvptx_find_par): Always look for worker-level predecessor insn.
(nvptx_propagate): Add is_call parm, return bool. Copy frame for
calls.
(nvptx_vpropagate, nvptx_wpropagate): Adjust.
(nvptx_process_pars): Propagate frames for calls.
2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
PR target/85469
* common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
Removed.
(OPTION_MASK_ISA_IBT_UNSET): Likewise.
(ix86_handle_option): Don't handle OPT_mibt.
* config/i386/cet.h: Check __CET__ instead of __IBT__ and
__SHSTK__.
* config/i386/driver-i386.c (host_detect_local_cpu): Remove
has_ibt and ibt.
* config/i386/i386-c.c (ix86_target_macros_internal): Don't
check OPTION_MASK_ISA_IBT nor flag_cf_protection.
(ix86_target_macros): Define __CET__ with flag_cf_protection
for -fcf-protection.
* config/i386/i386.c (isa2_opts): Remove -mibt.
* config/i386/i386.h (TARGET_IBT): Removed.
(TARGET_IBT_P): Likewise.
(ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
* config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
* config/i386/i386.opt (mcet): Update help message.
(mshstk): Likewise.
(mibt): Removed.
* doc/invoke.texi: Remove -mibt. Document __CET__. Document
-mcet as an alias for -mshstk.
2018-04-20 Richard Biener <rguenther@suse.de>
PR middle-end/85475
* match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
complexity by forcing a single use of the multiply operand.
2018-04-20 Martin Jambor <mjambor@suse.cz>
ipa/85449
* ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
recursion dependency to only apply to non-clones.
2018-04-20 Martin Jambor <mjambor@suse.cz>
ipa/85447
* ipa-cp.c (create_specialized_node): Check that clones of
self-recursive edges exist during IPA-CP.
2018-04-19 Toon Moene <toon@moene.org>
* doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
by -O3.
2018-04-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85467
* fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
VECTOR_CST element to type.
2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/85397
* config/i386/i386.h (STACK_SAVEAREA_MODE): New.
* config/i386/i386.md (builtin_setjmp_setup): Removed.
(builtin_longjmp): Likewise.
(save_stack_nonlocal): New pattern.
(restore_stack_nonlocal): Likewise.
2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/85404
* config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
Replace ASM_OUTPUT_LABEL with fprintf.
2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
PR target/85417
* config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
* config/i386/i386-c.c (ix86_target_macros_internal): Also
define __IBT__ and __SHSTK__ for -fcf-protection.
* config/i386/i386.c (pass_insert_endbranch::gate): Don't check
TARGET_IBT.
(ix86_trampoline_init): Likewise.
(x86_output_mi_thunk): Likewise.
(ix86_notrack_prefixed_insn_p): Likewise.
(ix86_option_override_internal): Don't disallow -fcf-protection.
* config/i386/i386.md (rdssp<mode>): Also enable for
-fcf-protection.
(incssp<mode>): Likewise.
(nop_endbr): Likewise.
* config/i386/i386.opt (mcet): Change help message to built-in
functions only.
(mibt): Likewise.
(mshstk): Likewise.
* doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
on -fcf-protection. Change -mcet, -mibt and -mshstk to only
enable CET built-in functions.
2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
* common/config/i386/i386-common.c
(OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
OPTION_MASK_ISA_MOVDIRI_UNSET,
OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
(ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
* config.gcc (movdirintrin.h): New header.
* config/i386/cpuid.h (bit_MOVDIRI,
bit_MOVDIR64B): New bits.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
and -mmvodir64b.
* config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
(VOID, PVOID, PCVOID)): New function types.
* config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
__builtin_ia32_directstoreu_u64,
__builtin_ia32_movdir64b): New builtins.
* config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
* config/i386/i386.c (ix86_target_string): Added -mmovdir64b
and -mmovdiri.
(ix86_valid_target_attribute_inner_p): Ditto.
(ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
and VOID_FTYPE_PUNSIGNED_UNSIGNED.
(ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
* config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
* config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
(movdiri<mode>, movdir64b_<mode>): New.
* config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
* config/i386/immintrin.h: Include movdirintrin.h.
* config/i386/movdirintrin.h: New file.
* doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
2018-04-19 Richard Biener <rguenther@suse.de>
PR middle-end/85455
* cfg.c (clear_bb_flags): When loop state says we have
marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
2018-04-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/84737
* tree-vect-data-refs.c (vect_copy_ref_info): New function
copying restrict info.
(vect_setup_realignment): Use it.
* tree-vectorizer.h (vect_copy_ref_info): Declare.
* tree-vect-stmts.c (vectorizable_store): Copy ref info from
the first DR to all generated stores.
(vectorizable_load): Likewise for loads.
2018-04-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85446
* match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
the integral and pointer types to have the same precision.
* doc/install.texi: Document --disable-cet being the default and
--enable-cet=auto.
2018-04-18 Martin Liska <mliska@suse.cz>
* ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
style.
2018-04-18 Martin Liska <mliska@suse.cz>
Revert
2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
PR ipa/83983
* ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
arguments if they are comparable.
2018-04-18 Martin Liska <mliska@suse.cz>
Revert
2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
PR lto/84805
* ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
incomplete types.
2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
PR target/85388
* config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
ENDBR after calling __morestack.
2018-04-18 David Malcolm <dmalcolm@redhat.com>
PR jit/85384
* configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
by using gcc_base_ver to generate a gcc_driver_version, and use
it when generating GCC_DRIVER_NAME.
* configure: Regenerate.
2018-04-18 Jakub Jelinek <jakub@redhat.com>
PR target/81084
* config.gcc: Obsolete powerpc*-*-*spe*.
2018-04-17 Jakub Jelinek <jakub@redhat.com>
PR debug/84637
* dbxout.c (dbxout_int): Perform negation in unsigned int type.
(stabstr_D): Change type of unum from unsigned int to
unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
type.
2018-04-17 Jim Wilson <jimw@sifive.com>
PR 84856
* config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
Set arg_pointer_offset after using pretend_args_size.
2018-04-17 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85431
* dse.c (record_store): Ignore zero width stores.
PR sanitizer/85230
* asan.c (handle_builtin_stack_restore): Adjust comment. Emit
__asan_allocas_unpoison call and last_alloca_addr = new_sp before
__builtin_stack_restore rather than after it.
* builtins.c (expand_asan_emit_allocas_unpoison): Pass
arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
argument instead of virtual_dynamic_stack_rtx.
2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
New prototype.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
Add note to error message to explain internal mapping of overloaded
built-in function name to non-overloaded built-in function name.
* config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
function.
2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/85424
* config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
where the inputs overlap with the output.
2018-04-17 Jakub Jelinek <jakub@redhat.com>
* config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
(=v, v) alternative and explicit "memory" attribute.
(vec_extract_lo_<mode><mask_name>): Likewise. Also add
"type", "prefix", "prefix_extra", "length_immediate" and "mode"
attributes.
(vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
"sselog1" type instead of "sselog".
(vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
"sselog". Remove explicit "memory" attribute.
(vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
"type", "prefix", "prefix_extra", "length_immediate" and "mode"
attributes.
(vec_extract_hi_v32hi): Merge all alternatives into one, use
"sselog1" type instead of "sselog". Remove explicit "memory"
attribute.
(vec_extract_hi_v16hi): Merge each pair of alternatives into one,
use "sselog1" type instead of "sselog". Remove explicit "memory"
attribute.
(vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
"type", "prefix", "prefix_extra", "length_immediate" and "mode"
attributes.
(vec_extract_hi_v64qi): Merge all alternatives into one, use
"sselog1" type instead of "sselog". Remove explicit "memory"
attribute.
(vec_extract_hi_v32qi): Merge each pair of alternatives into one,
use "sselog1" type instead of "sselog". Remove explicit "memory"
attribute.
PR target/85430
* config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
PR middle-end/85414
* rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
on a SUBREG.
2018-04-17 Martin Jambor <mjambor@suse.cz>
PR ipa/85421
* ipa-cp.c (create_specialized_node): Call
expand_all_artificial_thunks if necessary.
2018-04-17 Martin Liska <mliska@suse.cz>
PR lto/85405
* ipa-devirt.c (odr_types_equivalent_p): Remove trailing
in message, remote space in between '_G' and '('.
2018-04-17 Jakub Jelinek <jakub@redhat.com>
PR target/85281
* config/i386/sse.md (reduces<mode><mask_scalar_name>,
avx512f_vmcmp<mode>3<round_saeonly_name>,
avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
avx512f_rndscale<mode><round_saeonly_name>,
avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
Use %<iptr>2 instead of %2 for -masm=intel.
(avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
avx512f_vcvttss2usi<round_saeonly_name>,
avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
-masm=intel.
(avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
avx512f_vcvttsd2usi<round_saeonly_name>,
avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
Use %q1 instead of %1 for -masm=intel.
(avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
of %3 for -masm=intel.
(sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
-masm=intel.
(*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
-masm=intel.
(*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
-masm=intel.
(avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
%k0 and %1 for -masm=intel rather than two patterns, one with %0 and
%g1.
(*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
-masm=intel.
(avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
%q0 and %1 for -masm=intel rather than two patterns, one with %0 and
%g1 and one with %0 and %1.
(avx512er_vmrcp28<mode><round_saeonly_name>,
avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
%1 for -masm=intel.
(avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
of %0 and %{%4%} for -masm=intel.
(avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
order of %0 and %{%5%}%{z%} for -masm=intel.
2018-04-17 Jan Hubicka <jh@suse.cz>
PR lto/85405
* ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
2018-04-17 Martin Liska <mliska@suse.cz>
PR ipa/85329
* multiple_target.c (create_dispatcher_calls): Set apostrophes
for target_clone error message. Make default implementation
clone to be a local declaration.
(separate_attrs): Add new argument and check for an empty
string.
(expand_target_clones): Handle it.
(ipa_target_clone): Make redirection just for target_clones
functions.
2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
Tom de Vries <tom@codesourcery.com>
PR middle-end/84955
* omp-expand.c (expand_oacc_for): Add dummy false branch for
tiled basic blocks without omp continue statements.
2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/83660
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
vec_extract expression as having side effects to make sure it gets
a cleanup point.
2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
PR target/85403
* config/i386/i386.c (get_builtin_code_for_version): Check
error_mark_node.
2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
PR target/84331
* config.gcc: Support "skylake".
* config/i386/i386-c.c (ix86_target_macros_internal): Handle
PROCESSOR_SKYLAKE.
* config/i386/i386.c (m_SKYLAKE): Define.
(processor_target_table): Add "skylake".
(ix86_option_override_internal): Add "skylake".
(get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
PROCESSOR_CANNONLAKE.
(get_builtin_code_for_version): Fix priority for
PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
PROCESSOR_SKYLAKE-AVX512.
* config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
(processor_type): Add PROCESSOR_SKYLAKE.
2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
Jason Merrill <jason@redhat.com>
PR c++/85112
* convert.c (convert_to_integer_1): Use direct recursion for
enumeral types and types with a precision less than the number
of bits in their mode.
2018-04-16 Julia Koval <julia.koval@intel.com>
PR target/84413
* config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
PR target/85293
* config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
* doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
and -mno-direct-move.
2018-04-13 Paul A. Clarke <pc@us.ibm.com>
PR target/83402
* config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
Ensure negative shifts result in {0}.
2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/79916
* config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
regs (if any) to define how to gnerate SD moves when LRA is in
progress.
2018-04-13 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85393
* except.h (expand_dw2_landing_pad_for_region): Remove declaration.
* except.c (expand_dw2_landing_pad_for_region): Make static.
* bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
a label and unconditional jump to old_bb, rather than
expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
basic block.
PR rtl-optimization/85376
* simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
instead of a specific value.
2018-04-13 Jan Hubicka <hubicka@ucw.cz>
Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/82965
PR tree-optimization/83991
* cfgloopanal.c (expected_loop_iterations_unbounded): Add
by_profile_only parameter.
* cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
information if the loop was predicted to iterate too many times.
* cfgloop.h (expected_loop_iterations_unbounded): Update prototype
2018-04-13 Jan Hubicka <hubicka@ucw.cz>
PR lto/71991
* config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
always inline.
2018-04-13 Martin Liska <mliska@suse.cz>
Jakub Jelinek <jakub@redhat.com>
PR middle-end/81657
* expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
* expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
* builtins.c (expand_builtin_memory_copy_args): Use
BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
handle dest_addr == pc_rtx.
2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
PR target/85291
* config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
asked to not generate direct moves.
(fix_trunc<mode>si2_stfiwx): Similar.
(fix_trunc<mode>si2_internal): Similar.
2018-04-12 Jakub Jelinek <jakub@redhat.com>
PR debug/83157
* var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
* cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
lookup if dest in some wider mode is known to be const0_rtx and
if so, record permanent equivalence for it to be ZERO_EXTEND of
the narrower mode destination.
2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
* lto-streamer-out.c (output_function): Revert 259346.
* omp-expand.c (expand_oacc_for): Likewise.
2018-04-12 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/85354
* sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
* sel-sched.c (sel_global_init): ... here.
2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
PR target/85238
* lto-wrapper.c (debug_objcopy): Open the files in binary mode.
* dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
mode for PE-COFF targets.
* config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
(i386_pe_asm_lto_end): Likewise.
* config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
(TARGET_ASM_LTO_END): Likewise.
* config/i386/winnt.c (saved_debug_info_level): New static variable.
(i386_pe_asm_lto_start): New function.
(i386_pe_asm_lto_end): Likewise.
2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
Richard Biener <rguenther@suse.de>
PR middle-end/84955
* lto-streamer-out.c (output_function): Fix CFG loop state before
streaming out.
* omp-expand.c (expand_oacc_for): Handle calls to internal
functions like regular functions.
2018-04-12 Richard Biener <rguenther@suse.de>
PR lto/85371
* dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
for the early LTO debug to properly generate references to it
during DIE emission. Do not re-use that for the skeleton for
split-dwarf.
(dwarf2out_early_finish): Likewise.
2018-04-12 Jakub Jelinek <jakub@redhat.com>
PR target/85328
* config/i386/sse.md
(<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
and output is a reg, avoid creating invalid lowpart subreg, but
instead split into a 512-bit move. Don't split if not AVX512VL,
input is xmm16+ reg and output is a mem.
(vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
xmm16+ reg and output is a mem.
2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_output_indirect_thunk_function): Check
also for flag_dwarf2_cfi_asm.
2018-04-12 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85342
* regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
a bool scalar var inside of the loop instead. Don't try to update
recog_data.operand after failed apply_change_group.
2018-04-12 Tom de Vries <tom@codesourcery.com>
PR target/85296
* config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
(nvptx_assemble_decl_begin): Add undefined param. Declare undefined
array with flexible array member as array without given dimension.
(nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
argument for undefined param to true.
2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/85321
* doc/invoke.texi (RS/6000 and PowerPC Options): Document options
-mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
from PowerPC section.
* config/rs6000/sysv4.opt (mcall-): Improve help text.
* config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
help text that is too long.
* config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
help text that is too long.
* config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
help text that is too long.
2018-04-11 Uros Bizjak <ubizjak@gmail.com>
* config/alpha/alpha.md (stack_probe_internal): Rename
from "probe_stack". Update all callers.
2018-04-11 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/84566
* sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
sched_macro_fuse_insns.
2018-04-11 Alexander Monakov <amonakov@ispras.ru>
PR target/84301
* sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
(compute_block_dependences): ... from here.
2018-04-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85331
* vec-perm-indices.h (vec_perm_indices::clamp): Change input type
from int to HOST_WIDE_INT.
2018-04-11 Martin Jambor <mjambor@suse.cz>
PR ipa/84149
* ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
(cgraph_edge_brings_value_p): New parameter dest_val, check if it is
not the same as the source val.
(cgraph_edge_brings_value_p): New parameter.
(gather_edges_for_value): Pass destination value to
cgraph_edge_brings_value_p.
(perhaps_add_new_callers): Likewise.
(get_info_about_necessary_edges): Likewise and exclude values brought
only by self-recursive edges.
(create_specialized_node): Redirect only clones of self-calling edges.
(+self_recursive_pass_through_p): New function.
(find_more_scalar_values_for_callers_subset): Use it.
(find_aggregate_values_for_callers_subset): Likewise.
(known_aggs_to_agg_replacement_list): Removed.
(decide_whether_version_node): Re-calculate known constants for all
remaining context clones.
2018-04-11 Richard Biener <rguenther@suse.de>
PR lto/85339
* dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
from early DWARF output.
(dwarf2out_early_finish): Output line info unconditionally into
early DWARF and add reference to it.
2018-04-11 Jakub Jelinek <jakub@redhat.com>
PR target/85281
* config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
(<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
other than V2DFmode using iptr mode attribute.
(<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
2018-04-11 Alexander Monakov <amonakov@ispras.ru>
PR rtl-optimization/84659
* sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
2018-04-11 Jakub Jelinek <jakub@redhat.com>
PR debug/85302
* dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
SIZEP is NULL.
(output_loc_list): Pass address of a dummy size variable even in the
locview handling loop.
(index_location_lists): Add comment on why skip_loc_list_entry can't
call size_of_locs.
2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR target/85261
* config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
into register.
2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
PR target/85321
* doc/invoke.texi (RS/6000 and PowerPC Options): Document options
-mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
and -mstring-compare-inline-limit.
2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
PR target/85287
* config/rs6000/rs6000.md (allocate_stack): Put the residual size
for stack clash protection in a register whenever we need it to be in
a register.
2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
* common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
PR target/85321
* config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
the help text.
(mlong-double-): Ditto.
* config/rs6000/sysv4.opt (msdata=): Ditto.
(mtls-size=): Ditto.
2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
erroneous entries for
"vector int vec_ldl (int, long int *)", and
"vector unsigned int vec_ldl (int, unsigned long int *)".
Add comments and entries for
"vector bool char vec_ldl (int, bool char *)",
"vector bool short vec_ldl (int, bool short *)",
"vector bool int vec_ldl (int, bool int *)",
"vector bool long long vec_ldl (int, bool long long *)",
"vector pixel vec_ldl (int, pixel *)",
"vector long long vec_ldl (int, long long *)",
"vector unsigned long long vec_ldl (int, unsigned long long *)".
* config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
type tree bool_long_long_type_node and correct definition of
bool_V2DI_type_node to make reference to this new type tree.
(rs6000_mangle_type): Replace erroneous reference to
bool_long_type_node with bool_long_long_type_node.
* config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
comments to emphasize sign distinctions for char and int types and
replace RS6000_BTI_bool_long constant with
RS6000_BTI_bool_long_long constant. Also add comment to restrict
use of RS6000_BTI_pixel.
(bool_long_type_node): Remove this macro definition.
(bool_long_long_type_node): New macro definition
2018-04-10 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85300
* combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
simplify_unary_operation fails.
2018-04-10 Martin Liska <mliska@suse.cz>
* gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
cgraph_edge and ipa_ref.
2018-04-10 Jakub Jelinek <jakub@redhat.com>
PR target/85177
PR target/85255
* config/i386/sse.md
(<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
computation of the VEC_MERGE selector from mask.
(<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
Fix decoding of the VEC_MERGE selector into mask.
2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/85286
* tree-vect-data-refs.c (vect_get_smallest_scalar_type):
2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
* final.c (final_1): Set insn_last_address as well as
insn_current_address.
2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/85173
* explow.c (emit_stack_probe): Call validize_mem on memory location
before passing it to gen_probe_stack. Create address operand and
legitimize it for the probe_stack_address case.
2018-04-09 Jan Hubicka <jh@suse.cz>
PR lto/85078
* ipa-devirt.c (rebuild_type_inheritance-hash): New.
* ipa-utils.h (rebuild_type_inheritance-hash): Declare.
* tree.c (free_lang_data_in_type): Fix handling of binfos;
walk basetypes.
(free_lang_data): Rebuild type inheritance graph.
2018-04-09 Martin Sebor <msebor@redhat.com>
* invoke.texi (-finline-small-functions): Mention other optimization
options.
(-findirect-inlining, -fpartial-inlining): Same.
(-finline-functions-called-once): Same.
(-freorder-blocks-and-partition): Same.
2018-04-09 Jan Hubicka <jh@suse.cz>
PR rtl/84058
* cfgcleanup.c (try_forward_edges): Do not give up on crossing
jumps; choose last target that matches the criteria (i.e.
no partition changes for non-crossing jumps).
* cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
support for redirecting crossing jumps to non-crossing.
2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
* config/arc/arc.c (arc_expand_prologue): Set stack usage info
also for naked functions.
2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (add_shift): New pattern.
(add_shift2): Likewise.
(sub_shift): Likewise.
(sub_shift_cmp0_noout): Likewise.
(compare_si_ashiftsi): Likewise.
(xbfu_cmp0_noout): New combine pattern.
(xbfu_cmp0"): Likewise.
(movsi_set_cc_insn): Place the predicable variant first.
(commutative_binary_cmp0_noout): Remove clobber.
(commutative_binary_cmp0): New pattern.
(noncommutative_binary_cmp0): Likewise.
(noncommutative_binary_cmp0_noout): Likewise.
(noncommutative_binary_comparison_result_used): Removed.
(rsub_cmp0): New pattern.
(rsub_cmp0_noout): Likewise.
(extzvsi): Changed, keep only meaningful variants.
(SQH, SEZ): New iterators.
(SQH_postfix): New mode attribute.
(SEZ_prefix): New code attribute.
(<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
(<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
* config/arc/predicates.md (cc_set_register): Use CC_REG instead
of numerical value.
(noncommutative_operator): Check the availability of barrel
shifter option.
2018-04-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/85284
* tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
Only use the niter constraining form of simple_iv when the exit
is always executed.
2018-04-09 Tom de Vries <tom@codesourcery.com>
PR target/84041
* config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
(define_expand "*memory_barrier"): New define_expand.
(define_insn "memory_barrier"): New insn.
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/80463
PR rtl-optimization/83972
PR rtl-optimization/83480
* sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
correct producer for the insn.
(tidy_control_flow): Fixup seqnos in case of debug insns.
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/83913
* sel-sched-ir.c (merge_expr_data): Choose the middle between two
different sched-times when merging exprs.
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/83962
* sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
tidy_fallthru_edge and tidy_control_flow.
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/83530
* sel-sched.c (force_next_insn): New global variable.
(remove_insn_for_debug): When force_next_insn is true, also leave only
next insn in the ready list.
(sel_sched_region): When the region wasn't scheduled, make another pass
over it with force_next_insn set to 1.
2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
* config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
into tm_file.
* config/nds32/constants.md (unspec_volatile_element): Add enum values
for interrupt control.
* config/nds32/nds32-intrinsic.c: Implementation of intrinsic
functions for interrupt control.
* config/nds32/nds32-intrinsic.md: Likewise.
* config/nds32/nds32_intrinsic.h: Likewise.
* config/nds32/nds32.h (nds32_builtins): Likewise.
2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_init_machine_status,
nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
strict_aligned_p field.
(nds32_expand_to_rtl_hook): New function.
(TARGET_EXPAND_TO_RTL_HOOK): Define.
* config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
2018-04-08 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
* config/nds32/nds32-n7.md: New file.
* config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
* config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
pipeline.
* config/nds32/nds32-protos.h: More declarations for n7 pipeline.
* config/nds32/nds32.md (pipeline_model): Add n7.
* config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
* config/nds32/pipelines.md: Include n7 settings.
2018-04-08 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
* config/nds32/nds32-e8.md: New file.
* config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
* config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
pipeline.
* config/nds32/nds32-protos.h: More declarations for e8 pipeline.
* config/nds32/nds32.md (pipeline_model): Add e8.
* config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
* config/nds32/pipelines.md: Include e8 settings.
2018-04-08 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
* config/nds32/nds32-n8.md: New file.
* config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
* config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
pipeline.
* config/nds32/nds32-protos.h: More declarations for n8 pipeline.
* config/nds32/nds32-utils.c: More implementations for n8 pipeline.
* config/nds32/nds32.md (pipeline_model): Add n8.
* config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
* config/nds32/pipelines.md: Include n8 settings.
2018-04-08 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*): Add nds32-utils.o into extra_objs.
* config/nds32/nds32-n9-2r1w.md: New file.
* config/nds32/nds32-n9-3r2w.md: New file.
* config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
nds32_register_ports): New or modify for cpu n9.
* config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
pipeline.
* config/nds32/nds32-protos.h: More declarations for n9 pipeline.
* config/nds32/nds32-utils.c: New file.
* config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
TARGET_MUL_SLOW): Define.
* config/nds32/nds32.md (pipeline_model): New attribute.
* config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
New options that support cpu n9.
* config/nds32/pipelines.md: Include n9 settings.
* config/nds32/t-nds32 (nds32-utils.o): Add dependency.
2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
information if necessary.
(output_cond_branch_compare_zero): Likewise.
* config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
(nds32_target_alignment): Refine for alignment.
* config/nds32/nds32.h (NDS32_ALIGN_P): Define.
(FUNCTION_BOUNDARY): Modify.
* config/nds32/nds32.md (call_internal, call_value_internal): Consider
align case.
* config/nds32/nds32.opt (malways-align, malign-functions): New.
2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/constants.md (unspec_volatile_element): Add values for
TLB operation and data prefetch.
* config/nds32/nds32-intrinsic.c: Implementation of intrinsic
functions for TLB operation and data prefetch.
* config/nds32/nds32-intrinsic.md: Likewise.
* config/nds32/nds32_intrinsic.h: Likewise.
* config/nds32/nds32.c (nds32_dpref_names): Likewise.
(nds32_print_operand): Likewise.
* config/nds32/nds32.h (nds32_builtins): Likewise.
2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
Andrew Pinski <pinsika@gcc.gnu.org>
PR middle-end/82976
* match.pd: Use constant_boolean_node of correct type instead of
boolean_true_node or boolean_false_node for simplifying
pointer comparisons to zero.
2018-04-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/80021
* tree.c (verify_type_variant): Make error call in verify_variant_match
translatable and remove final full stop.
2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/constants.md (unspec_volatile_element): Add
UNSPEC_VOLATILE_EH_RETURN.
* config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
nds32_output_stack_pop): Support dwarf exception handling process.
* config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
* config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
exception handling process.
(nds32_compute_stack_frame): Likewise.
(nds32_return_addr_rtx): Likewise.
(nds32_initial_elimination_offset): Likewise.
(nds32_expand_prologue): Likewise.
(nds32_expand_epilogue): Likewise.
(nds32_dynamic_chain_address): New function.
* config/nds32/nds32.h (machine_function): Add fields for dwarf
exception handling.
(DYNAMIC_CHAIN_ADDRESS): Define.
(EH_RETURN_DATA_REGNO): Define.
(EH_RETURN_STACKADJ_RTX): Define.
* config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
patterns for dwarf exception handling.
2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h: Clean up obsolete macros.
2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/constants.md (unspec_element, unspec_volatile_element):
Add enum values for particular instructions.
* config/nds32/nds32-intrinsic.c: Implementation of expanding
particular intrinsic functions.
* config/nds32/nds32-intrinsic.md: Likewise.
* config/nds32/nds32_intrinsic.h: Likewise.
* config/nds32/nds32.h (nds32_builtins): Likewise.
* config/nds32/nds32.md (type): Add pbsad and pbsada.
(btst, ave): New patterns for particular instructions.
2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/constants.md (unspec_element, unspec_volatile_element):
Add enum values for atomic load/store and memory sync.
* config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
and memory sync.
* config/nds32/nds32-intrinsic.md: Likewise.
* config/nds32/nds32_intrinsic.h: Likewise.
* config/nds32/nds32.h (nds32_builtins): Likewise.
2018-04-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85257
* fold-const.c (native_encode_vector): If not all elts could fit
and off is -1, return 0 rather than offset.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
(offseti - offset2) / BITS_PER_UNIT as 4th argument to
native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
adjust buffer in native_interpret_expr call.
2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/constants.md (unspec_volatile_element): Add cache
control enum values.
* config/nds32/nds32-intrinsic.c: Add cache control expand functions.
* config/nds32/nds32-intrinsic.md: Add cache control patterns.
* config/nds32/nds32.c (nds32_cctl_names): New.
(nds32_print_operand): Handle cache control register names.
* config/nds32/nds32.h (nds32_builtins): New enum values.
* config/nds32/nds32_intrinsic.h: Add cache control enum types and
macros.
* config/nds32/nds32.md (type): Add mmu.
* config/nds32/pipelines.md (simple_insn): Add mmu.
2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (type): Remove call.
* config/nds32/pipelines.md (simple_insn): Likewise.
2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/constants.md (unspec_volatile_element): Add
UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
UNSPEC_VOLATILE_FMFCFG.
* config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
description for fmfcfg and fmfcsr.
(bdesc_1arg): Add fmtcsr.
(bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
(nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
* config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
unspec_fmfcfg): New patterns.
* config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
* config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
__nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
__nds32__fmfcfg): Define.
2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
intrinsic register names.
* config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
intrinsic register enum values and macros.
2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
for load/store addressing form.
(nds32_print_operand_address): Likewise.
2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
PR target/85196
* config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
based on LABEL_REF. Remove useless assertion.
(pic_address_needs_scratch): Fix formatting.
(sparc_legitimize_pic_address): Minor tweaks.
(sparc_delegitimize_address): Adjust assertion accordingly.
* config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
into symbolic_operand.
(movsi_high_pic_label_ref): Likewise.
(movsi_lo_sum_pic_label_ref): Likewise.
(movdi_pic_label_ref): Likewise.
(movdi_high_pic_label_ref): Likewise.
(movdi_lo_sum_pic_label_ref): Likewise.
2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
* config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
custom LIB_SPEC setup.
2018-04-06 Ruslan Bukin <br@bsdpad.com>
Kito Cheng <kito.cheng@gmail.com>
* config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
* config/riscv/freebsd.h: New.
2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
* config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
file.
2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-md-auxiliary.c (nds32_output_return,
nds32_output_call, nds32_symbol_binds_local_p): New functions.
* config/nds32/nds32-protos.h (nds32_output_call,
nds32_output_return): Declare.
* config/nds32/nds32.md: Refine all the call and return patterns.
2018-04-06 Jakub Jelinek <jakub@redhat.com>
PR debug/85252
* dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
PR rtl-optimization/84872
* cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
EDGE_CROSSING edge.
2018-04-06 Tamar Christina <tamar.christina@arm.com>
* expr.c (copy_blkmode_to_reg): Revert 254862.
* doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
2018-04-06 Richard Biener <rguenther@suse.de>
PR middle-end/85244
* tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
after seeing a component reference with an adjacent field. Treat
refs to arrays at struct end of external decls similar to
refs to unconstrained commons.
2018-04-06 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/85213
* fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
look through SAVE_EXPRs with non-side-effects argument. Adjust
recursive calls.
(fold_comparison): Adjust twoval_comparison_p caller, don't handle
save_p here.
2018-04-06 Richard Biener <rguenther@suse.de>
PR middle-end/85180
* alias.c (find_base_term): New wrapper around find_base_term
unwinding CSELIB_VAL_PTR changes.
(find_base_term): Do not restore CSELIB_VAL_PTR during the
recursion.
2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
instructions.
* config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
constant definitions.
("nop"): lr 0,0 -> nopr r0
("nop_lr0", "nop_lr1"): New insn definitions.
2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (*stack_push, *stack_pop): Use
NDS32_V3PUSH_AVAILABLE_P macro.
2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
(nds32*-*-*): Add float and fpu_config into supported_defaults.
* common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
* config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
* config/nds32/constraints.md: New constraints and checking for hard
float configuration.
* config/nds32/iterators.md: New mode iterator and attribute for hard
float configuration.
* config/nds32/nds32-doubleword.md: Use hard float alternatives and
patterns.
* config/nds32/nds32-fpu.md: New file.
* config/nds32/nds32-md-auxiliary.c: New functions and checkings to
deal with hard float code generation.
* config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
ARCH_V3S.
(abi_type, float_reg_number): New enum type.
* config/nds32/nds32-predicates.c: New predicates for hard float.
* config/nds32/nds32-protos.h: Declare functions for hard float.
* config/nds32/nds32.c: Implementation for hard float configuration.
* config/nds32/nds32.h: Definitions for hard float configuration.
* config/nds32/nds32.md: Include hard float machine description and
modify patterns for hard float configuration.
* config/nds32/nds32.opt: New options for hard float configuration.
* config/nds32/predicates.md: New predicates for hard float
configuration.
2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
* common/config/nds32/nds32-common.c
(nds32_option_optimization_table): Enable -mreleax-hint by default.
2018-04-05 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85195
* match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
CONSTRUCTOR_ELT (ctor, ...)->value.
2018-04-05 Uros Bizjak <ubizjak@gmail.com>
PR target/85193
* config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
2018-04-05 Tom de Vries <tom@codesourcery.com>
PR target/85204
* config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
cond jump.
2018-04-05 Shiva Chen <shiva0217@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config/nds32/constraints.md (U33): Fine-tune checking condition.
* config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
* config/nds32/nds32.h (nds32_16bit_address_type): Add
ADDRESS_POST_MODIFY_LO_REG_IMM3U.
2018-04-05 Shiva Chen <shiva0217@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config/nds32/constraints.md (Ufe): New memory constraint.
* config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
* config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
operands.
* config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
* config/nds32/nds32.md (*mov<mode>): Adjust pattern.
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md: Use optimize_size in the condition for
alu-shift instructions.
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (divsi4, udivsi4): New patterns.
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (negsi2): Refine pattern.
2018-04-05 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/iterators.md (shift_rotate): New code iterator.
(shift): New code attribute.
* config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
* config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
* config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
* config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
bit-wise operations.
(andsi3, *andsi3): Ditto.
(iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
(xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
(<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
* config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
nds32_ior_operand, nds32_xor_operand): New predicates.
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
(addsi3, subsi3): ... this.
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md: Adjust indention.
2018-04-05 Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32.md (feature): New attribute.
2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (subtype): New attribute.
2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR target/85203
* config/arm/arm-builtins.c (arm_expand_builtin): Change
expansion to perform a bitwise AND of the argument followed by a
boolean negation of the result.
2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
PR rtl-optimization/84878
* ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
the basic block. Assert the use reference is not artificial and that
it has an associated insn.
2018-04-04 Michael Matz <matz@suse.de>
* builtins.c (compute_objsize): Pass correct operand
to array_at_struct_end_p.
2018-04-04 Richard Biener <rguenther@suse.de>
PR lto/85176
* dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
from contexts for DINFO_LEVEL_TERSE and below.
2018-04-04 Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-doubleword.md (move_<mode>): Require
resiter_operand condition.
* config/nds32/nds32.md (*move<mode>): Ditto.
2018-04-04 Kito Cheng <kito.cheng@gmail.com>
Monk Chiang <sh.chiang04@gmail.com>
* config/nds32/nds32.md (movmisalign<mode>): New pattern.
2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
nds32_cond_code_str, output_cond_branch,
output_cond_branch_compare_zero, nds32_expand_cbranch,
nds32_expand_cstore, nds32_expand_movcc,
nds32_output_cbranchsi4_equality_zero,
nds32_output_cbranchsi4_equality_reg,
nds32_output_cbranchsi4_equality_reg_or_const_int,
nds32_output_cbranchsi4_greater_less_zero: New functions.
* config/nds32/nds32-protos.h (nds32_expand_cbranch,
nds32_expand_cstore, nds32_expand_movcc,
nds32_output_cbranchsi4_equality_zero,
nds32_output_cbranchsi4_equality_reg,
nds32_output_cbranchsi4_equality_reg_or_const_int,
nds32_output_cbranchsi4_greater_less_zero): Declare.
* config/nds32/predicates.md (nds32_movecc_comparison_operator,
nds32_rimm11s_operand): New predicates.
* config/nds32/nds32.h (nds32_expand_result_type): New enum type.
* config/nds32/nds32.md: Rewrite all the branch and conditional move
patterns.
2018-04-04 Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-doubleword.md: Refine all the instruction type.
* config/nds32/nds32.md: Ditto.
* config/nds32/pipelines.md: Ditto.
2018-04-04 Richard Biener <rguenther@suse.de>
PR tree-optimization/85168
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
propagating abnormals.
2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (enabled): Use yes/no for this attribute.
2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
* config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
* config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
(TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
* config/nds32/nds32.md (sibcall_internal): New.
(sibcall_register): Remove.
(sibcall_immediate): Remove.
(sibcall_value_internal): New.
(sibcall_value_register): Remove.
(sibcall_value_immediate): Remove.
* config/nds32/predicates.md (nds32_general_register_operand): New.
(nds32_call_address_operand): New.
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/85167
* shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
bb_defs if *split_p, instead preinitialize it to NULL.
PR tree-optimization/85156
* builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
evaluating the argument multiple times.
2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
* config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
than vector.
(_mm_cvtpd_ps): Likewise.
(_mm_cvttpd_epi32): Likewise.
* config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
* config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
vector, pixel, and bool following altivec.h include.
2018-04-03 Martin Sebor <msebor@redhat.com>
* doc/extend.texi (Common Function Attributes): Clarify.
(const attribute): Likewise.
(pure attribute): Likewise.
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR target/85169
* config/i386/i386.c (ix86_expand_vector_set): Use
HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
2018-04-03 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (emit_i387_cw_initialization): Always use logic
instructions when changing rounding bits to preserve precision bits
in the x87 control word.
2018-04-03 Martin Liska <mliska@suse.cz>
PR tree-optimization/82491
* rtl.h (strip_offset_and_add): Replace += suboffset with
poly_uint64 () + suboffset.
2018-03-29 Martin Liska <mliska@suse.cz>
Martin Jambor <mjambor@suse.cz>
PR ipa/84947
* ipa-cp.c (propagate_bits_across_jump_function): Bail out if
param_type is not an integral or pointer type.
2018-04-03 Richard Biener <rguenther@suse.de>
* sese.h (recompute_all_dominators): Remove.
2018-04-02 Martin Sebor <msebor@redhat.com>
* doc/invoke.texi (-Wrestrict): Fix typos.
2018-04-02 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
* config/riscv/riscv.md (<optab>si3): Use QImode shift count.
(<optab>di3, <optab>si3_extend): Likewise.
(<optab>si3_mask, <optab>si3_mask_1): New.
(<optab>di3_mask, <optab>di3_mask_1): New.
(<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
(lshrsi3_zero_extend_1): Use VOIDmode shift count.
* config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
* doc/cpp.texi (Variadic Macros): Fix line continuation in an
example.
2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
(nds32_canonicalize_comparison): New function.
2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
Kuan-Lin Chen <kuanlinchentw@gmail.com>
* config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
* config/nds32/constants.md (unspec_volatile_element): Add
UNSPEC_VOLATILE_RELAX_GROUP.
* config/nds32/nds32-relax-opt.c: New file.
* config/nds32/nds32-predicates.c
(nds32_symbol_load_store_p): New function.
* config/nds32/nds32-protos.h
(nds32_symbol_load_store_p): Declare function.
(make_pass_nds32_relax_opt): Declare new rtl pass function.
* config/nds32/nds32.c
(nds32_register_pass): New function to register pass.
(nds32_register_passes): New function to register passes.
* config/nds32/nds32.md (relax_group): New pattern.
* config/nds32/nds32.opt (mrelax-hint): New option.
* config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
2018-04-01 Kito Cheng <kito.cheng@gmail.com>
* config/nds32/t-nds32: Modify files dependency.
2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
(PROFILE_HOOK): Define its implementation.
2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
type and 32-bit size.
2018-04-01 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85090
* config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
(V_128_256): New mode iterator.
(*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
(*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
(xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
of V.
* config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
PR target/83315
* config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
NaN inputs correctly.
2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
PR target/80546
* config/rs6000/vsx.md (??r): New mode attribute.
(*vsx_mov<mode>_64bit): Use it.
(*vsx_mov<mode>_32bit): Likewise.
2018-03-30 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84818
* builtins.c (check_access): Use warning_n.
2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
PR target/83822
* config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
condition.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
condition.
2018-03-30 Julia Koval <julia.koval@intel.com>
PR target/84413
* x86-tune.def (movx, partial_reg_dependency): Enable for
m_SKYLAKE_AVX512.
2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
PR inline-asm/84985
* lra-constraints.c (process_alt_operands): Move setting
this_alternative_matches below.
2018-03-29 Martin Liska <mliska@suse.cz>
PR lto/84995.
* doc/invoke.texi: Document how LTO works with debug info.
Describe auto-load support of binutils. Mention 'x86-64'
as valid option value of -march option.
2018-03-29 Jakub Jelinek <jakub@redhat.com>
* config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
PR c/85094
* fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
OEP_NO_HASH_CHECK for recursive call, to avoid exponential
checking.
2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
PR target/84912
* config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
(RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
for RS6000_BTM_POWERPC64.
(rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
(rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
* config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
definition.
(DIVDE): Use it.
(DIVDEU): Likewise.
2018-03-28 Carl Love <cel@us.ibm.com>
Revert
2017-09-27 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
(FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
* config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
fctiw instruction.
2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
instead of __vector bool.
(_mm_max_pu8): Likewise.
(_mm_min_pi16): Likewise.
2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
PR target/84912
* config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
(DIVWEUO): Likewise.
(DIVDEO): Likewise.
(DIVDEUO): Likewise.
* config/rs6000/rs6000.c (builtin_function_type): Remove support for
DIVWEUO and DIVDEUO.
* config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
(UNSPEC_DIV_EXTEND): Remove deleted unspecs.
(div_extend): Likewise.
* doc/extend.texi (__builtin_divweo): Remove documentation for deleted
builtin function.
(__builtin_divweuo): Likewise.
(__builtin_divdeo): Likewise.
(__builtin_divdeuo): Likewise.
2018-03-28 Jakub Jelinek <jakub@redhat.com>
PR target/85095
* config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
*sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
PR tree-optimization/82004
* gimple-match-head.c (optimize_pow_to_exp): New function.
* match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
Don't fold to exp if optimize_pow_to_exp is false.
2018-03-28 Martin Liska <mliska@suse.cz>
PR other/84819
* calls.c (initialize_argument_information): Fix trailing space.
* common.opt: Fix typo and provide better explanation for
-fsanitize-coverage option.
* config/i386/i386.opt: Fix typo.
2018-03-28 Jakub Jelinek <jakub@redhat.com>
Martin Liska <mliska@suse.cz>
PR sanitizer/85081
* gimplify.c (asan_poison_variable): Don't do the check for
gimplify_omp_ctxp here.
(gimplify_decl_expr): Do it here.
(gimplify_target_expr): Likewise.
2018-03-28 Martin Liska <mliska@suse.cz>
PR target/84988
* config/i386/i386.c (ix86_function_arg_advance): Do not call
chkp_type_bounds_count if MPX is not enabled.
2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (BRANCH_COST): Adjust cost.
2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/84914
* config/rs6000/rs6000.c (create_complex_muldiv): New helper
function to create the function decl for complex long double
multiply and divide for -mabi=ieeelongdouble.
(init_float128_ieee): Call it.
2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
PR target/85044
* config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
-fcf-protection=branch -mibt.
* config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/81863
* config/arm/arm.c (arm_valid_symbolic_address): Handle
arm_word_relocations.
2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
PR target/85056
* config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
extern array declarations.
2018-03-27 Richard Biener <rguenther@suse.de>
PR middle-end/84067
* match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
explicit single_use checks.
2018-03-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/85082
* tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
Valueize the VUSE.
2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
* common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
Turn on fasynchronous-unwind-tables and funwind-tables.
2018-03-26 Uros Bizjak <ubizjak@gmail.com>
PR target/85073
* config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
(*bmi_blsr_<mode>_ccz): Ditto.
2018-03-26 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/85063
* omp-general.c (offloading_function_p): New function. Factor out
of ...
* omp-offload.c (pass_omp_target_link::gate): ... here.
* omp-general.h (offloading_function_p): Declare.
* tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
with attribute omp declare target for offloading functions.
2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84005
* tree-data-ref.h (get_base_for_alignment): Declare.
* tree-data-ref.c (get_base_for_alignment_1): New function.
(get_base_for_alignment): Likewise.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
get_base_for_alignment to find a suitable base object, instead
of always using drb->base_address.
2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/85022
* emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
known size by default.
2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
PR inline-asm/85030
* lra-constraints.c (process_alt_operands): Don't match BLKmode
and non BLKmode operands.
2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/85026
* config/arm/arm.md (unaligned_loadhis): Remove first alternative.
Clean up attributes.
2018-03-23 Richard Biener <rguenther@suse.de>
PR debug/85020
* dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
we are going to emit early debug for LTO.
2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/85034
* function.c (match_asm_constraints_1): Don't optimize if input
doesn't satisfy general_operand predicate for output's mode.
PR inline-asm/85022
* alias.c (write_dependence_p): Don't require for x_canonicalized
non-VOIDmode if x has VOIDmode.
PR sanitizer/85029
* sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
just don't try to optimize it rather than assert it never happens.
2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
macro expansions for definition of ST_INTERNAL_<mode> and
LD_INTERNAL_<mode> builtins.
* config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
Remove prototype.
* config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
function.
(altivec_expand_st_builtin): Likewise.
(altivec_expand_builtin): Remove calls to deleted functions.
(rs6000_address_for_altivec): Delete this function.
* config/rs6000/vector.md: Remove expands for
vector_altivec_load_<mode> and vector_altivec_store_<mode>.
2018-03-22 Sudakshina Das <sudi.das@arm.com>
PR target/84826
* config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
* config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
re-computing once computed.
(arm_expand_prologue): Compute machine->static_chain_stack_bytes.
(arm_init_machine_status): Initialize
machine->static_chain_stack_bytes.
2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
PR target/84760
* doc/extend.texi: Add four new prototypes for vec_ld.
* config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
definitions for more logical presentation.
* config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
entries for V1TI variants of __builtin_altivec_ld builtin.
* config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
handling of V1TI variant of LVX icode pattern.
(altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
(rs6000_gimple_fold_builtin): Likewise.
(altivec_init_builtins): Add code to define
__builtin_altivec_lvx_v1ti function.
2018-03-22 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84941
* function.c (match_asm_constraints_1): Don't do the optimization
if input isn't a REG, SUBREG, MEM or constant.
2018-03-22 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/84956
* tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
bb_has_abnormal_pred.
2018-03-22 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/85018
* dwarf2asm.c (dw2_output_indirect_constant_1): Set
DECL_INITIAL (decl) to decl at the end.
* varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
adjust the comment.
2018-03-21 Joseph Myers <joseph@codesourcery.com>
* doc/extend.texi (__builtin_tgmath): Document when complex
integer types are treated as _Complex _Float64.
2018-03-21 Tom de Vries <tom@codesourcery.com>
* doc/extend.texi (__builtin_extend_pointer): Remove pasto.
2018-03-21 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84960
* tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
if it is ENTRY block, move them into single succ of ENTRY in that case.
2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84811
* poly-int.h (poly_span_traits): Remove the T3 parameter and
promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
(maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
(known_subrange_p): Update accordingly. Cast each value involved
in the size comparison, rather than casting the result of the
subtraction.
2018-03-21 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84982
* gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
by flipping the least significant bit rather than all bits from
bitpos to bitpos + bitsize - 1.
2018-03-21 Nathan Sidwell <nathan@acm.org>
* doc/extend.texi (Deprecated Features): Remove mention of
long-deleted deprecations.
2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR jit/84288
* configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
* configure: Regenerate.
2018-03-21 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/83126
* tree-parloops.c (num_phis): New function.
(gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
2018-03-21 Nathan Sidwell <nathan@acm.org>
* doc/extend.texi (Deprecated Features): Update deprecated flags,
mention anon-struct/union members and trailing attributes.
2018-03-21 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/84969
* tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
builtin memset partitions if they set different rhs values.
2018-03-21 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/84989
* simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
VEC_DUPLICATE with scalar result mode.
2018-03-21 Martin Liska <mliska@suse.cz>
PR ipa/84963
* ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
not intended return statement.
2018-03-21 Martin Liska <mliska@suse.cz>
PR target/84988
* tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
(chkp_find_bound_slots_1): Limit number of iterations.
2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
PR target/84838
* Minor grammar fixes for x86 options.
2018-03-20 Jakub Jelinek <jakub@redhat.com>
PR debug/84875
* dce.c (delete_unmarked_insns): Don't remove frame related noop moves
holding REG_CFA_RESTORE notes, instead turn them into a USE.
2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
PR target/83789
* config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
(altivec_lvx_<mode>_1op): Likewise.
(altivec_stvx_<mode>_2op): Likewise.
(altivec_stvx_<mode>_1op): Likewise.
(altivec_lvx_<VM2:mode>): New define_expand.
(altivec_stvx_<VM2:mode>): Likewise.
(altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
(altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
(altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
(altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
* config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
(rs6000_gen_lvx): Likewise.
* config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
(altivec_expand_stv_builtin): Likewise.
(altivec_expand_builtin): Likewise.
* config/rs6000/vector.md: Likewise.
2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/82518
* config/arm/arm.c (arm_array_mode_supported_p): Return false for
BYTES_BIG_ENDIAN.
2018-03-20 Richard Biener <rguenther@suse.de>
PR target/84986
* config/i386/i386.c (ix86_add_stmt_cost): Only cost
sign-conversions as zero, fall back to standard scalar_stmt
cost for the rest.
2018-03-20 Martin Liska <mliska@suse.cz>
PR ipa/84825
* predict.c (rebuild_frequencies): Handle case when we have
PROFILE_ABSENT, but flag_guess_branch_prob is false.
2018-03-20 Jakub Jelinek <jakub@redhat.com>
PR target/84990
* dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
flag_section_anchors.
* varasm.c (use_blocks_for_decl_p): Remove hack for
dw2_force_const_mem.
PR target/84845
* config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
to ...
(*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
be created, use lowpart_subreg of operands[0] rather than operands[0]
itself.
(*aarch64_reg_<mode>3_minus_mask): Rename to ...
(*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
(*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
and n constraint instead of aarch64_shift_imm_di and Usd.
(*aarch64_reg_<optab>_minus<mode>3): Rename to ...
(*aarch64_<optab>_reg_minus<mode>3): ... this.
2018-03-20 Sudakshina Das <sudi.das@arm.com>
PR target/82989
* config/arm/neon.md (ashldi3_neon): Update ?s for constraints
to favor GPR over NEON registers.
(<shift>di3_neon): Likewise.
2018-03-20 Tom de Vries <tom@codesourcery.com>
PR target/84952
* config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
(nvptx_process_pars): Emit bar.sync asap and alap.
2018-03-20 Tom de Vries <tom@codesourcery.com>
PR target/84954
* config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
seen_label if seen_label is already set.
2018-03-20 Jakub Jelinek <jakub@redhat.com>
PR target/84945
* config/i386/i386.c (fold_builtin_cpu): For features above 31
use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
Use 1U instead of 1. Formatting fixes.
PR c/84953
* builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
instead of TREE_TYPE (s1) for the return value.
2018-03-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84946
* gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
bitsize + bitsize in poly_uint64 rather than poly_int64.
PR sanitizer/78651
* dwarf2asm.c: Include fold-const.c.
(dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
of decl rather than decl itself.
PR rtl-optimization/84643
* memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
PR sanitizer/78651
* dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
calling assemble_variable.
2018-03-19 Sudakshina Das <sudi.das@arm.com>
PR target/81647
* config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
2018-03-19 Jim Wilson <jimw@sifive.com>
PR bootstrap/84856
* config/riscv/riscv.c (riscv_function_arg_boundary): Use
PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
(riscv_first_stack_step): Likewise.
(riscv_option_override): Use STACK_BOUNDARY instead of
MIN_STACK_BOUNDARY.
* config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
MIN_STACK_BOUNDARY.
(BIGGEST_ALIGNMENT): Set to 128.
(PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
(RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
STACK_BOUNDARY.
2018-03-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/84933
* tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
2018-03-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/84859
* tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
(cond_if_else_store_replacement): Perform sinking operation on
single-store BBs regardless of MAX_STORES_TO_SINK setting.
Generalize what a BB with a single eligible store is.
2018-03-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/84929
* tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
chrec_is_positive against non-chrec arg.
2018-03-19 Tamar Christina <tamar.christina@arm.com>
PR target/84711
* config/arm/arm.c (arm_can_change_mode_class): revert r258554.
2018-03-18 Martin Liska <mliska@suse.cz>
PR rtl-optimization/84635
* regrename.c (build_def_use): Use matches_mode only when
matches >= 0.
2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84913
* tree-vect-loop.c (vectorizable_reduction): Don't try to
vectorize chains of COND_EXPRs.
2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
* config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
(nds32_adjust_reg_alloc_order): New function.
* config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
2018-03-17 Kito Cheng <kito.cheng@gmail.com>
* config/nds32/nds32.c (nds32_asm_output_mi_thunk,
nds32_print_operand, nds32_print_operand_address): Use
HOST_WIDE_INT_PRINT_DEC instead.
2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_register_priority): Modify cost.
2018-03-17 Jakub Jelinek <jakub@redhat.com>
PR target/84902
* config/i386/i386.c (initial_ix86_tune_features,
initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
unsigned long long.
(set_ix86_tune_features): Change ix86_tune_mask from unsigned int
to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
rather than 1u << ix86_tune. Formatting fix.
(ix86_option_override_internal): Change ix86_arch_mask from
unsigned int to unsigned HOST_WIDE_INT, initialize to
HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
(ix86_function_specific_restore): Likewise.
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR target/84899
* postreload.c (reload_combine_recognize_pattern): Perform
INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
truncate_int_for_mode the result for the destination's mode.
PR c/84909
* hsa-gen.c (mem_type_for_type): Fix comment typo.
* tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
Likewise.
* gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
Likewise.
2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
PR target/84876
* lra-assigns.c (lra_split_hard_reg_for): Don't use
regno_allocno_class_array and sorted_pseudos.
* lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
insns where regno is used.
2018-03-16 Martin Liska <mliska@suse.cz>
PR ipa/84833
* multiple_target.c (create_dispatcher_calls): Redirect
reference in the symbol table.
2018-03-16 Martin Liska <mliska@suse.cz>
PR ipa/84722
* multiple_target.c (create_dispatcher_calls): Redirect also
an alias.
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR c++/79937
PR c++/82410
* tree.h (TARGET_EXPR_NO_ELIDE): Define.
* gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
2018-03-16 Julia Koval <julia.koval@intel.com>
* doc/invoke.texi (Skylake Server): Add CLWB.
Cannonlake): Remove CLWB.
2018-03-16 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84841
* tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
1 << 3.
(FLOAT_ONE_CONST_TYPE): Define.
(constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
(sort_by_operand_rank): Put entries with higher constant_type last
rather than first to match comments.
2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
* config/nios2/nios2.md (movsi_internal): Fix thinko in
split predicate.
2018-03-15 Jakub Jelinek <jakub@redhat.com>
PR c++/79085
* calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
check and use address of target always.
2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/84574
* config/i386/i386.c (indirect_thunk_needed): Update comments.
(indirect_thunk_bnd_needed): Likewise.
(indirect_thunks_used): Likewise.
(indirect_thunks_bnd_used): Likewise.
(indirect_return_needed): New.
(indirect_return_bnd_needed): Likewise.
(output_indirect_thunk_function): Add a bool argument for
function return.
(output_indirect_thunk_function): Don't generate alias for
function return thunk.
(ix86_code_end): Call output_indirect_thunk_function to generate
function return thunks.
(ix86_output_function_return): Set indirect_return_bnd_needed
and indirect_return_needed instead of indirect_thunk_bnd_needed
and indirect_thunk_needed.
2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
* config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
(__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
(ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
2018-03-15 David Malcolm <dmalcolm@redhat.com>
Paul Hua <paul.hua.gm@gmail.com>
PR c/84852
* gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
resp. SFmode cases.
2018-03-15 Tamar Christina <tamar.christina@arm.com>
PR target/84711
* config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
instead of GET_MODE_SIZE when comparing Units.
2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR target/68256
* varasm.c (hash_section): Return an unchangeble hash value
* config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
Return !aarch64_can_use_per_function_literal_pools_p ().
2018-03-15 Jakub Jelinek <jakub@redhat.com>
PR target/84860
* optabs.c (emit_conditional_move): Pass address of cmode's copy
rather than address of cmode as last argument to prepare_cmp_insn.
2018-03-15 Julia Koval <julia.koval@intel.com>
* config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
F_AVX512VNNI, F_AVX512BITALG): New.
2018-03-14 John David Anglin <danglin@gcc.gnu.org>
PR target/83451
* config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
insn for floating-point loads and stores.
2018-03-14 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-c.c: Add macro definitions for
ALTIVEC_BUILTIN_VEC_PERMXOR.
* config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
* config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
* config/rs6000/altivec.md (altivec_vpermxor): New define expand.
* config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
UNSPEC_VPERMXOR.
* config/doc/extend.texi: Add prototypes for vec_permxor.
2018-03-14 David Malcolm <dmalcolm@redhat.com>
PR c/84852
* diagnostic-show-locus.c (class layout_point): Convert m_line
from int to linenum_type.
(line_span::comparator): Use linenum "compare" function when
comparing line numbers.
(test_line_span): New function.
(layout_range::contains_point): Convert param "row" from int to
linenum_type.
(layout_range::intersects_line_p): Likewise.
(layout::will_show_line_p): Likewise.
(layout::print_source_line): Likewise.
(layout::should_print_annotation_line_p): Likewise.
(layout::print_annotation_line): Likewise.
(layout::print_leading_fixits): Likewise.
(layout::annotation_line_showed_range_p): Likewise.
(struct line_corrections): Likewise for field m_row.
(line_corrections::line_corrections): Likewise for param "row".
(layout::print_trailing_fixits): Likewise.
(layout::get_state_at_point): Likewise.
(layout::get_x_bound_for_row): Likewise.
(layout::print_line): Likewise.
(diagnostic_show_locus): Likewise for locals "last_line" and "row".
(selftest::diagnostic_show_locus_c_tests): Call test_line_span.
* input.c (selftest::test_linenum_comparisons): New function.
(selftest::input_c_tests): Call it.
* selftest.c (selftest::test_assertions): Test ASSERT_GT,
ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
* selftest.h (ASSERT_GT): New macro.
(ASSERT_GT_AT): New macro.
(ASSERT_LT): New macro.
(ASSERT_LT_AT): New macro.
2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/84780
* combine.c (distribute_links): Don't make a link based on pc_rtx.
2018-03-14 Martin Liska <mliska@suse.cz>
* tree.c (record_node_allocation_statistics): Use
get_stats_node_kind.
(get_stats_node_kind): New function extracted from
record_node_allocation_statistics.
(free_node): Use get_stats_node_kind.
2018-03-14 Richard Biener <rguenther@suse.de>
* tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
that the value-set of ANTIC_IN doesn't grow.
Revert
* tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
member.
(BB_VISITED_WITH_VISITED_SUCCS): New define.
(compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
2018-03-14 Julia Koval <julia.koval@intel.com>
* config.gcc (icelake-client, icelake-server): New.
(icelake): Remove.
* config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
(initial_ix86_arch_features): Ditto.
(PTA_SKYLAKE): Add SGX.
(PTA_ICELAKE): Remove.
(PTA_ICELAKE_CLIENT): New.
(PTA_ICELAKE_SERVER): New.
(ix86_option_override_internal): Split up icelake on icelake client and
icelake server.
(get_builtin_code_for_version): Ditto.
(fold_builtin_cpu): Ditto.
* config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
* config/i386/i386-c.c (ix86_target_macros_internal): Ditto
* config/i386/i386.h (processor_type): Ditto.
* doc/invoke.texi: Ditto.
2018-03-14 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/83392
* sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
INTEGER_CST offset, add it together with bitpos / 8 and
sign extend based on POINTER_SIZE.
PR target/84844
Revert
2017-04-20 Uros Bizjak <ubizjak@gmail.com>
PR target/78090
* config/i386/constraints.md (Yc): New register constraint.
* config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
Use Yc constraint for alternative 2 of operand 0. Remove
preferred_for_speed attribute.
2018-03-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/84830
* tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
with the old one to avoid oscillations.
2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
PR target/83712
* lra-assigns.c (find_all_spills_for): Ignore uninteresting
pseudos.
(assign_by_spills): Return a flag of reload assignment failure.
Do not process the reload assignment failures. Do not spill other
reload pseudos if they has the same reg class. Update n if
necessary.
(lra_assign): Add a return arg. Set up from the result of
assign_by_spills call.
(find_reload_regno_insns, lra_split_hard_reg_for): New functions.
* lra-constraints.c (split_reg): Add a new arg. Use it instead of
usage_insns if it is not NULL.
(spill_hard_reg_in_range): New function.
(split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
* lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
function prototypes.
(lra_assign): Change prototype.
* lra.c (lra): Add code to deal with fails by splitting hard reg
live ranges.
2018-03-01 Palmer Dabbelt <palmer@sifive.com>
* config/riscv/riscv.opt (mrelax): New option.
* config/riscv/riscv.c (riscv_file_start): Emit ".option
"norelax" when riscv_mrelax is disabled.
* doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
PR target/84743
* config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
reassociation for int modes.
2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
for big-endian.
* config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
* config/aarch64/aarch64-sve.md
(*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
(aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
(*extend<mode><Vwide>2): Rename to...
(aarch64_sve_extend<mode><Vwide>2): ...this.
(vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
renaming the old pattern to...
(aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
unsigned packs.
(vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
define_expand, renaming the old pattern to...
(aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
(*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
(vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
account when deciding which SVE instruction the optab should use.
(vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
(V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
(P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
(P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
(tlsdesc_small_<mode>): Turn a define_expand and use
tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
(tlsdesc_small_advsimd_<mode>): ...this.
(tlsdesc_small_sve_<mode>): New pattern.
2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
(UNSPEC_UMUL_HIGHPART): New constants.
(MUL_HIGHPART): New int iteraor.
(su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
* config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
define_expand.
(*<su>mul<mode>3_highpart): New define_insn.
2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
PR lto/84805
* ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
incomplete types.
2018-03-13 Martin Liska <mliska@suse.cz>
PR ipa/84658.
* (sem_item_optimizer::sem_item_optimizer): Initialize new
vector.
(sem_item_optimizer::~sem_item_optimizer): Release it.
(sem_item_optimizer::merge_classes): Register variable aliases.
(sem_item_optimizer::fixup_pt_set): New function.
(sem_item_optimizer::fixup_points_to_sets): Likewise.
* ipa-icf.h: Declare new variables and functions.
2018-03-13 Jakub Jelinek <jakub@redhat.com>
PR middle-end/84834
* match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
integer_pow2p@2 and test integer_pow2p in condition.
(A < 0 ? C : 0): Similarly for @1.
PR middle-end/84831
* stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
characters starting at p contain '\0' character, don't look beyond
that.
PR target/84827
* config/i386/i386.md (round<mode>2): For 387 fancy math, disable
pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
PR target/84828
* reg-stack.c (change_stack): Change update_end var from int to
rtx_insn *, if non-NULL don't update just BB_END (current_block), but
also call set_block_for_insn on the newly added insns and rescan.
PR target/84786
* config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
on the last operand.
PR c++/84704
* tree.c (stabilize_reference_1): Return save_expr (e) for
STATEMENT_LIST even if it doesn't have side-effects.
2018-03-12 Jonathan Wakely <jwakely@redhat.com>
* doc/invoke.texi (-mclflushopt): Fix spelling of option.
2018-03-12 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
aarch64_output_scalar_simd_mov_immediate.
2018-03-12 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83456
* gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
for perfectly overlapping calls to memcpy.
(gimple_fold_builtin_memory_chk): Same.
(gimple_fold_builtin_strcpy): Handle no-warning.
(gimple_fold_builtin_stxcpy_chk): Same.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
parameter. Use it for SFmode.
(rs6000_function_arg_advance_1): Adjust.
(rs6000_function_arg): Adjust.
(rs6000_gimplify_va_arg): Pass false for that new parameter.
2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/84169
PR rtl-optimization/84780
* combine.c (can_combine_p): Check for a 2-insn combination whether
the destination register is used between the two insns, too.
2018-03-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/84803
* tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
for refs DR analysis didn't process.
2018-03-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/84777
* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
force-vectorize loops ignore whether we are optimizing for size.
2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_md_asm_adjust): New function.
(TARGET_MD_ASM_ADJUST): Define.
2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_compute_stack_frame,
nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
* config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
* config/nds32/nds32.md (prologue, epilogue): Use macro
NDS32_V3PUSH_AVAILABLE_P to do checking.
2018-03-11 Jakub Jelinek <jakub@redhat.com>
PR debug/58150
* dwarf2out.c (gen_enumeration_type_die): Don't guard adding
DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
addition of most attributes on !orig_type_die or the attribute not
being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
2018-03-11 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
__NDS32_VH__ macro.
* config/nds32/nds32.opt (mvh): New option.
2018-03-11 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
function.
* config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
* config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
definition.
2018-03-11 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
function.
* config/nds32/nds32-multiple.md (strlensi): New pattern.
* config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
UNSPEC_FFMISM and UNSPEC_FLMISM.
* config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
for ffb, ffmism and flmism.
* config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
(unspec_ffmism): Ditto.
(unspec_flmism): Ditto.
(nds32_expand_builtin_impl): Check if string extension is available.
* config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
Reverting patch:
2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
PR target/83712
* lra-assigns.c (assign_by_spills): Return a flag of reload
assignment failure. Do not process the reload assignment
failures. Do not spill other reload pseudos if they has the same
reg class.
(lra_assign): Add a return arg. Set up from the result of
assign_by_spills call.
(find_reload_regno_insns, lra_split_hard_reg_for): New functions.
* lra-constraints.c (split_reg): Add a new arg. Use it instead of
usage_insns if it is not NULL.
(spill_hard_reg_in_range): New function.
(split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
* lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
function prototypes.
(lra_assign): Change prototype.
* lra.c (lra): Add code to deal with fails by splitting hard reg
live ranges.
2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
PR target/84807
* config/i386/i386.opt: Replace Enforcment with Enforcement.
2018-03-10 Alexandre Oliva <aoliva@redhat.com>
PR debug/84620
* dwarf2out.h (dw_val_class): Add dw_val_class_symview.
(dw_val_node): Add val_symbolic_view.
* dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
(symview_upper_bound): New.
(new_line_info_table): Initialize symviews_since_reset.
(dwarf2out_source_line): Count symviews_since_reset and set
symview_upper_bound.
(dw_val_equal_p): Handle symview.
(add_AT_symview): New.
(print_dw_val): Handle symview.
(attr_checksum, attr_checksum_ordered): Likewise.
(same_dw_val_p, size_of_die): Likewise.
(value_format, output_die): Likewise.
(add_high_low_attributes): Use add_AT_symview for entry_view.
(dwarf2out_finish): Reset symview_upper_bound, clear
zero_view_p.
2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
PR target/83969
* config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
Add strict argument and use it.
(rs6000_split_multireg_move): Update for new strict argument.
(mem_operand_gpr): Disallow all non-offsettable addresses.
* config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
2018-03-09 Jakub Jelinek <jakub@redhat.com>
PR target/84772
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
* config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
PR c++/84767
* tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
decl, use remap_type if we want to use the type.
2018-03-09 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84526
* gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
Remove dead code.
(builtin_access::generic_overlap): Be prepared to handle non-array
base objects.
2018-03-09 Alexandre Oliva <aoliva@redhat.com>
PR rtl-optimization/84682
* lra-constraints.c (process_address_1): Check is_address flag
for address constraints.
(process_alt_operands): Likewise.
* lra.c (lra_set_insn_recog_data): Pass asm operand locs to
preprocess_constraints.
* recog.h (preprocess_constraints): Add oploc parameter.
Adjust callers.
* recog.c (preprocess_constraints): Test address_operand for
CT_ADDRESS constraints.
2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
PR target/83712
* lra-assigns.c (assign_by_spills): Return a flag of reload
assignment failure. Do not process the reload assignment
failures. Do not spill other reload pseudos if they has the same
reg class.
(lra_assign): Add a return arg. Set up from the result of
assign_by_spills call.
(find_reload_regno_insns, lra_split_hard_reg_for): New functions.
* lra-constraints.c (split_reg): Add a new arg. Use it instead of
usage_insns if it is not NULL.
(spill_hard_reg_in_range): New function.
(split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
* lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
function prototypes.
(lra_assign): Change prototype.
* lra.c (lra): Add code to deal with fails by splitting hard reg
live ranges.
2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/83193
* common/config/arm/arm-common.c (arm_parse_arch_option_name):
Accept complain bool parameter. Only emit errors if it is true.
(arm_parse_cpu_option_name): Likewise.
(arm_target_thumb_only): Adjust callers of the above.
* config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
prototype to take a default true bool parameter.
(arm_parse_arch_option_name): Likewise.
2018-03-09 David Malcolm <dmalcolm@redhat.com>
Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR jit/64089
PR jit/84288
* Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
* configure: Regenerate.
* configure.ac ("linker --version-script option"): New.
("linker soname option"): New.
2018-03-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/84775
* tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
immediate uses of predicate stmts and mark them modified.
Revert
PR tree-optimization/84178
* tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
to caller.
(version_loop_for_if_conversion): Delay update_ssa call.
(tree_if_conversion): Delay update_ssa until after predicate
insertion.
2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
PR target/84763
* config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
when the function accesses prior frames.
2018-03-08 Jakub Jelinek <jakub@redhat.com>
PR debug/84456
* dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
gen_llsym, otherwise call maybe_gen_llsym.
PR inline-asm/84742
* recog.c (asm_operand_ok): Return 0 if multi-character constraint
has ',' character inside of it.
2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/84748
* config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
as clobbering CC_REGNUM.
2018-03-08 Richard Biener <rguenther@suse.de>
PR middle-end/84552
* tree-scalar-evolution.c: Include tree-into-ssa.h.
(follow_copies_to_constant): Do not follow SSA names registered
for update.
2018-03-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/84178
* tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
to caller.
(version_loop_for_if_conversion): Delay update_ssa call.
(tree_if_conversion): Delay update_ssa until after predicate
insertion.
2018-03-08 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/84178
* tree-if-conv.c (release_bb_predicate): Remove the
the assertion that the stmts have NULL use_ops.
Discard the statements, asserting that they haven't
yet been added to a BB.
2018-03-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/84746
* tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
(phi_translate): Pass in destination ANTIC_OUT set.
(phi_translate_1): Likewise. For a simplified result lookup
a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
(phi_translate_set): Adjust.
(do_pre_regular_insertion): Likewise.
(do_pre_partial_partial_insertion): Likewise.
2018-03-08 Martin Liska <mliska@suse.cz>
PR gcov-profile/84735
* doc/gcov.texi: Document usage of profile files.
* gcov-io.h: Document changes in the format.
2018-03-08 Alexandre Oliva <aoliva@redhat.com>
PR debug/84404
PR debug/84408
* dwarf2out.c (struct dw_line_info_table): Update comments for
view == -1.
(FORCE_RESET_NEXT_VIEW): New.
(FORCE_RESETTING_VIEW_P): New.
(RESETTING_VIEW_P): Check for -1 too.
(ZERO_VIEW_P): Likewise.
(new_line_info_table): Force-reset next view.
(dwarf2out_begin_function): Likewise.
(dwarf2out_source_line): Simplify zero_view_p initialization.
Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
view directly. Omit view when omitting .loc at line 0.
2018-03-08 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84740
* tree-switch-conversion.c (process_switch): Call build_constructors
only if info.phi_count is non-zero.
PR tree-optimization/84739
* tree-tailcall.c (find_tail_calls): Check call arguments against
DECL_ARGUMENTS (current_function_decl) rather than
DECL_ARGUMENTS (func) when checking for tail recursion.
2018-03-07 Jakub Jelinek <jakub@redhat.com>
* doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
Volker Reichelt's entry and add entries for people that perform
GCC fuzzy testing and report numerous bugs.
2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
PR target/82411
* config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
readonly data in sdata, if that is disabled.
* config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
* doc/invoke.texi (RS/6000 and PowerPC Options): Document
-mreadonly-in-sdata option.
2018-03-07 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84468
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
basic block when looking for nul assignment.
2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
PR target/84277
* except.h (output_function_exception_table): Adjust prototype.
* except.c (output_function_exception_table): Remove FNNAME parameter
and add SECTION parameter. Ouput one part of the table at a time.
* final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
the first part of the exception table and emit unwind directives.
* config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
(i386_pe_seh_cold_init): Likewise.
* config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
(ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
* config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
(ix86_output_call_insn): Emit a nop in one more case for SEH.
* config/i386/winnt.c: Include except.h.
(struct seh_frame_state): Add reg_offset, after_prologue and
in_cold_section fields.
(i386_pe_seh_end_prologue): Set seh->after_prologue.
(i386_pe_seh_cold_init): New function.
(i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
to seh->in_cold_section.
(seh_emit_push): Record the offset of the push.
(seh_emit_save): Record the offet of the save.
(i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
Test seh->after_prologue to disregard the epilogue.
(i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
(i386_pe_end_cold_function): New function.
2018-03-07 Jakub Jelinek <jakub@redhat.com>
PR fortran/84565
* config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
PR c++/84704
* gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
on tmp_var.
* tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
PR middle-end/84723
* multiple_target.c: Include tree-inline.h and intl.h.
(expand_target_clones): Diagnose and fail if node->definition and
!tree_versionable_function_p (node->decl).
2018-03-06 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
sprint_ul.
(ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
(ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
* config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
2018-03-06 Jakub Jelinek <jakub@redhat.com>
PR target/84710
* combine.c (try_combine): Use reg_or_subregno instead of handling
just paradoxical SUBREGs and REGs.
2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_finalize_pic): Remove function.
(arc_must_save_register): We use single base PIC register, remove
checks to save/restore the PIC register.
(arc_expand_prologue): Likewise.
* config/arc/arc-protos.h (arc_set_default_type_attributes):
Remove.
(arc_verify_short): Likewise.
(arc_attr_type): Likewise.
* config/arc/arc.c (arc_set_default_type_attributes): Remove.
(walk_stores): Likewise.
(arc_address_cost): Make it static.
(arc_verify_short): Likewise.
(branch_dest): Likewise.
(arc_attr_type): Likewise.
* config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
(TARGET_INSN_LENGTH_PARAMETERS): Likewise.
(arc_final_prescan_insn): Remove inserting the nops due to
hardware hazards. It is done in reorg step.
(insn_length_variant_t): Remove.
(insn_length_parameters_t): Likewise.
(arc_insn_length_parameters): Likewise.
(arc_get_insn_variants): Likewise.
* config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
2018-03-06 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/84683
* reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
assertion failure.
PR tree-optimization/84687
* omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
on new_node->decl.
* match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
Rename to ppc_speculation_barrier.
* config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
__builtin_ppc_speculation_barrier.
2018-03-05 Jakub Jelinek <jakub@redhat.com>
PR target/84700
* combine.c (combine_simplify_rtx): Don't try to simplify if
if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
are equal to x.
2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
to 32 bytes when compiling for POWER9.
2018-03-05 Jakub Jelinek <jakub@redhat.com>
PR target/84564
* config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
regparm >= 3 with no arg reg available also for calls with
flag_force_indirect_call. Pass decl to ix86_function_regparm.
PR target/84524
* config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
orig,vex.
(*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
PR target/84264
* config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
2018-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/84486
* tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
When inserting a __builtin_assume_aligned call set the LHS
SSA name alignment info accordingly.
2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
PR tree-optimization/84114
* config/aarch64/aarch64.c (aarch64_reassociation_width)
Avoid reassociation of FLOAT_MODE addition.
2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
* common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
(ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
* config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
* config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
and -mwbnoinvd.
* config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
__builtin_ia32_wbinvd): New builtins.
(SPECIAL_ARGS2): New.
* config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
(SPECIAL_ARGS2): New.
* config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
(ix86_valid_target_attribute_inner_p): Ditto.
(ix86_init_mmx_sse_builtins): Add special_args2.
* config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
TARGET_WBNOINVD_P): New.
* config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
(define_insn "wbinvd", define_insn "wbnoinvd"): New.
* config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
* config/i386/immintrin.h (_wbinvd): New intrinsic.
* config/i386/pconfigintrin.h: New file.
* config/i386/wbnoinvdintrin.h: Ditto.
* config/i386/x86intrin.h: Add headers pconfigintrin.h and
wbnoinvdintrin.h.
* doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
2018-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/84670
* tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
member.
(BB_VISITED_WITH_VISITED_SUCCS): New define.
(compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
(compute_antic_aux): Only assert the number of values in ANTIC_IN
doesn't grow if all successors (recursively) were visited at least
once.
2018-03-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/84650
* tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
if executed in the loop pipeline.
2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
* doc/configfiles.texi (Configuration Files): Move info about
conditionalizing $target-protos.h to...
* doc/sourcebuild.texi (Back End): Here. Explain how $target.h
differs from $target-protos.h.
2018-03-05 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
* config/nds32/nds32-multiple.md (setmemsi): Define.
* config/nds32/nds32-memory-manipulation.c
(nds32_gen_dup_4_byte_to_word_value): New.
(emit_setmem_word_loop): New.
(emit_setmem_byte_loop): New.
(nds32_expand_setmem_loop): New.
(nds32_expand_setmem_loop_v3m): New.
(nds32_expand_setmem_unroll): New.
(nds32_expand_setmem): New.
2018-03-04 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-memory-manipulation.c
(nds32_emit_load_store): New.
(nds32_emit_post_inc_load_store): New.
(nds32_emit_mem_move): New.
(nds32_emit_mem_move_block): New.
(nds32_expand_movmemsi_loop_unknown_size): New.
(nds32_expand_movmemsi_loop_known_size): New.
(nds32_expand_movmemsi_loop): New.
(nds32_expand_movmemsi_unroll): New.
(nds32_expand_movmemqi): Rename ...
(nds32_expand_movmemsi): ... to this.
* config/nds32/nds32-multiple.md (movmemqi): Rename ...
(movmemsi): ... to this.
* config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
(nds32_expand_movmemsi): ... to this.
2018-03-04 Kito Cheng <kito.cheng@gmail.com>
Monk Chiang <sh.chiang04@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-protos.h
(nds32_expand_load_multiple): New arguments.
(nds32_expand_store_multiple): Ditto.
(nds32_valid_multiple_load_store): Rename ...
(nds32_valid_multiple_load_store_p): ... to this.
* config/nds32/nds32-memory-manipulation.c
(nds32_expand_load_multiple): Refine implementation.
(nds32_expand_store_multiple): Ditto.
* config/nds32/nds32-multiple.md
(load_multiple): Update nds32_expand_load_multiple interface.
(store_multiple): Update nds32_expand_store_multiple interface.
* config/nds32/nds32-predicates.c
(nds32_valid_multiple_load_store): Rename ...
(nds32_valid_multiple_load_store_p): ... to this and refine
implementation.
* config/nds32/predicates.md
(nds32_load_multiple_and_update_address_operation): New predicate.
(nds32_store_multiple_and_update_address_operation): New predicate.
2018-03-04 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (type): Add load_multiple and store_multiple.
(combo): New attribute.
* config/nds32/nds32-multiple.md: Refine patterns with new attributes.
2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.opt: Change -mcmodel= default value.
2018-03-03 Kito Cheng <kito.cheng@gmail.com>
Monk Chiang <sh.chiang04@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/constants.md (unspec_element): New enum.
* config/nds32/constraints.md (Umw): New constraint.
* config/nds32/nds32-intrinsic.c: Add more builtin functions.
* config/nds32/nds32-intrinsic.md: Likewise.
* config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
(nds32_valid_smw_lwm_base_p): New.
(nds32_output_smw_single_word): New.
(nds32_output_lmw_single_word): New.
(nds32_expand_unaligned_load): New.
(nds32_expand_unaligned_store): New.
* config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
(nds32_output_smw_single_word): Declare.
(nds32_output_lmw_single_word): Declare.
(nds32_expand_unaligned_load): Declare.
(nds32_expand_unaligned_store): Declare.
* config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
NDS32_BUILTIN_UASTORE_DW.
* config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
predicate.
2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-intrinsic.c
(nds32_expand_builtin_null_ftype_reg): Delete.
(nds32_expand_builtin_reg_ftype_imm): Ditto.
(nds32_expand_builtin_null_ftype_reg_imm): Ditto.
(nds32_read_argument): New.
(nds32_legitimize_target): Ditto.
(nds32_legitimize_argument): Ditto.
(nds32_check_constant_argument): Ditto.
(nds32_expand_unop_builtin): Ditto.
(nds32_expand_unopimm_builtin): Ditto.
(nds32_expand_binop_builtin): Ditto.
(nds32_builtin_decl_impl): Ditto.
(builtin_description): Ditto.
(nds32_expand_builtin_impl): Rewrite with new infrastructure.
(nds32_init_builtins_impl): Ditto.
* config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
(nds32_builtin_decl): New.
* config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
* config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
2018-03-02 Jeff Law <law@redhat.com>
* reorg.c (stop_search_p): Handle DEBUG_INSN.
(redundant_insn, fill_simple_delay_slots): Likewise.
(fill_slots_from_thread): Likewise.
* resource.c (mark_referenced_resources): Likewise.
(mark_set_resources, find_dead_or_set_registers): Likewise.
2018-03-02 Jakub Jelinek <jakub@redhat.com>
* substring-locations.h (format_warning_va): Formatting fix for
ATTRIBUTE_GCC_DIAG.
(format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
argument.
(format_warning_n_va, format_warning_at_substring_n): New prototypes.
* substring-locations.c: Include intl.h.
(format_warning_va): Turned into small wrapper around
format_warning_n_va, renamed to ...
(format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
use ngettext.
(format_warning_at_substring_n): New function.
* gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
(fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
format_warning_at_substring with just a shorter name instead of
const function pointer.
(fmtwarn_n): New function.
(maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
appropriate, get rid of all the fmtstr temporaries, move conditionals
with G_() wrapped string literals directly into fmtwarn arguments,
cast dir.len to (int), formatting fixes.
2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
* doc/invoke.texi: Remove "Cilk Plus" references.
2018-03-02 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenther@suse.de>
PR ipa/84628
* expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
for error or warning attributes if CALL_FROM_THUNK_P is set.
Formatting fixes.
2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR target/56540
* config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
__SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
PR target/56540
* config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
__SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
* predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
instead of -1U in last predictors element's probability member.
2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
PR ipa/83983
* ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
arguments if they are comparable.
2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84634
* tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
masks and masked_loop_p with a single loop_masks, making sure it's
null for bb vectorization.
2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
(vect_analyze_data_ref_access): Use loop->safe_len rather than
loop->force_vectorize to check whether there is no alias.
2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR target/84614
* rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
prototypes.
* emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
comments.
(next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
* cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
instead of a loop around prev_real_insn.
* combine.c (move_deaths): Use prev_real_nondebug_insn instead of
prev_real_insn.
PR inline-asm/84625
* config/i386/i386.c (ix86_print_operand): Use conditional
output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
zero vector.
2018-03-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/84427
* tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
(bitmap_set_subtract_values): Rewrite to handle multiple
exprs per value.
(clean): Likewise.
(prune_clobbered_mems): Likewise.
(phi_translate): Take edge instead of pred/phiblock.
(phi_translate_1): Likewise.
(phi_translate_set): Likewise. Insert all translated
exprs for a value into the set, keeping possibly multiple
expressions per value.
(compute_antic_aux): Adjust for phi_translate changes.
When intersecting union the expressions and prune those
not in the final value set, keeping possibly multiple
expressions per value. Do not use value-insertion
for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
all expressions. Add verification that the value-sets
only shrink during iteration.
(compute_partial_antic_aux): Adjust for the phi_translate changes.
(do_pre_regular_insertion): Likewise.
(do_pre_partial_partial_insertion): Likewise.
2018-03-02 Richard Biener <rguenther@suse.de>
PR target/82005
* config/darwin.c (saved_debug_info_level): New static global.
(darwin_asm_lto_start): Disable debug info generation for LTO out.
(darwin_asm_lto_end): Restore debug info generation settings.
2018-03-01 Martin Liska <mliska@suse.cz>
PR sanitizer/82484
* sanopt.c (sanitize_rewrite_addressable_params): Do not handle
volatile arguments.
2018-03-01 Richard Biener <rguenther@suse.de>
PR debug/84645
* dwarf2out.c (gen_variable_die): Properly handle late VLA
type annotation with LTO when debug was disabled at compile-time.
2018-03-01 Matthew Fortune <mfortune@gmail.com>
* config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
XINT with INTVAL.
(mips_final_postscan_insn): Likewise.
2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
PR rtl-optimization/84528
* alias.c (init_alias_target): Add commentary.
(init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
a unique base value if the frame pointer is not eliminated
to the stack pointer.
2018-03-01 Tom de Vries <tom@codesourcery.com>
PR rtl-optimization/83327
* lra-int.h (hard_regs_spilled_into): Declare.
* lra.c (hard_regs_spilled_into): Define.
(init_reg_info): Init hard_regs_spilled_into.
* lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
* lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
(process_bb_lives): Handle hard_regs_spilled_into.
(lra_create_live_ranges_1): Before doing liveness propagation, clear
regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
2018-02-28 David Edelsohn <dje.gcc@gmail.com>
* config.gcc (powerpc-ibm-aix7.1.*): New stanza.
(powerpc-ibm-aix[789]*): Default to AIX 7.2.
* config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
* config/rs6000/aix72.h: New file.
2018-02-28 Jakub Jelinek <jakub@redhat.com>
* gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
instead of warning_at with conditional singular and plural messages
where possible.
PR target/52991
* stor-layout.c (update_alignment_for_field): For
targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
&& !DECL_PACKED (field), do the alignment update, just use
only desired_align instead of MAX (type_align, desired_align)
as the alignment.
(place_field): Don't do known_align < desired_align handling
early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
is non-NULL, instead do it after rli->prev_field handling and
only if not within a bitfield word. For DECL_PACKED (field)
use type_align of BITS_PER_UNIT.
2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
* config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
superfluous parentheses and trailing spaces.
2018-02-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/84584
* graphite-scop-detection.c (scop_detection::add_scop): Discard
SCoPs with fake exit edge.
2018-02-28 Martin Liska <mliska@suse.cz>
PR testsuite/84597
* timevar.c (timer::print): Fix format to properly print 100%
values.
2018-02-28 Richard Biener <rguenther@suse.de>
PR middle-end/84607
* genmatch.c (capture_info::walk_match): Do not mark
captured expressions without operands as expr_p given
they act more like predicates and should be subject to
"lost tail" side-effect preserving.
2018-02-28 Alexandre Oliva <aoliva@redhat.com>
PR rtl-optimization/81611
* auto-inc-dec.c (attempt_change): Move dead note from
mem_insn if it's the next use of regno
(find_address): Take address use of reg holding
non-incremented value. Add parm to limit search to the named
reg only.
(merge_in_block): Attempt to use a mem insn that is the next
use of the original regno.
2018-02-27 Martin Sebor <msebor@redhat.com>
PR c++/83871
* doc/invoke.texi (-Wmissing-attributes): New option.
* print-tree.c (print_node): Handle DECL_UNINLINABLE.
2018-02-27 Martin Sebor <msebor@redhat.com>
PR translation/84207
* diagnostic-core.h (warning_n, error_n, inform_n): Change
n argument to unsigned HOST_WIDE_INT.
* diagnostic.c (warning_n, error_n, inform_n): Ditto.
(diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
* gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
2018-02-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/84512
* tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
Do not use the estimate returned from record_stmt_cost for
the scalar iteration cost but sum properly using add_stmt_cost.
2018-02-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/84466
* graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
Adjust last change to less strictly validate use operands.
2018-02-27 Martin Liska <mliska@suse.cz>
PR gcov-profile/84548
* gcov.c (process_file): Allow partial overlap and consider it
also as group functions.
(output_lines): Properly calculate range of lines for a group.
2018-02-27 Martin Liska <mliska@suse.cz>
* timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
'ggc' suffixes. Change first column width.
(timer::print): Fix formatting of the column.
2018-02-27 Alexandre Oliva <aoliva@redhat.com>
* tree-ssa-live.c (remove_unused_scope_block_p): Do not
preserve inline entry blocks for the sake of debug inline
entry point markers alone.
(remove_unused_locals): Suggest in comments a better place to
force the preservation of inline entry blocks that are
otherwise unused, but do not preserve them.
2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR target/84039
* config/i386/constraints.md (Bs): Replace
ix86_indirect_branch_register with
TARGET_INDIRECT_BRANCH_REGISTER.
(Bw): Likewise.
* config/i386/i386.md (indirect_jump): Likewise.
(tablejump): Likewise.
(*sibcall_memory): Likewise.
(*sibcall_value_memory): Likewise.
Peepholes of indirect call and jump via memory: Likewise.
(*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
(*sibcall_value_GOT_32): Likewise.
* config/i386/predicates.md (indirect_branch_operand): Likewise.
(GOT_memory_operand): Likewise.
(call_insn_operand): Likewise.
(sibcall_insn_operand): Likewise.
(GOT32_symbol_operand): Likewise.
* config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/83496
* reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
booleans to RTXes. Call fix_reg_dead_note on every non-null element.
(steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
redundant insn, if any.
(relax_delay_slots): Likewise.
(update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83965
* tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
that grouped statements are part of a reduction chain. Return
true if the statement is not marked as a reduction itself but
is part of a group.
(vect_recog_dot_prod_pattern): Don't check whether the statement
is part of a group here.
(vect_recog_sad_pattern): Likewise.
(vect_recog_widen_sum_pattern): Likewise.
2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
PR debug/84545
* final.c (rest_of_clean_state): Also look for calls inside sequences.
2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
PR target/84530
* config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
the bool argument.
(ix86_output_indirect_function_return): New prototype.
(ix86_split_simple_return_pop_internal): Likewise.
* config/i386/i386.c (indirect_return_via_cx): New.
(indirect_return_via_cx_bnd): Likewise.
(indirect_thunk_name): Handle return va CX_REG.
(output_indirect_thunk_function): Create alias for
__x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
(ix86_output_indirect_jmp): Remove the bool argument.
(ix86_output_indirect_function_return): New function.
(ix86_split_simple_return_pop_internal): Likewise.
* config/i386/i386.md (*indirect_jump): Don't pass false
to ix86_output_indirect_jmp.
(*tablejump_1): Likewise.
(simple_return_pop_internal): Change it to define_insn_and_split.
Call ix86_split_simple_return_pop_internal to split it for
-mfunction-return=.
(simple_return_indirect_internal): Call
ix86_output_indirect_function_return instead of
ix86_output_indirect_jmp.
2018-02-26 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/84405
* vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
memset and value initialization afterwards.
2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
* Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
PR target/84521
* common/config/aarch64/aarch64-common.c
(aarch_option_optimization_table[]): Switch
off fomit-frame-pointer
2018-02-26 Kito Cheng <kito.cheng@gmail.com>
Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32-multiple.md (load_multiple): Disallow
volatile memory.
(store_multiple): Ditto.
2018-02-26 Kito Cheng <kito.cheng@gmail.com>
* config.gcc: Add --with-cpu support for nds32 target.
* config/nds32/nds32-opts.h (nds32_cpu_type): New.
* config/nds32/nds32.opt: Add -mcpu= option.
2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
isel=yes): Warn for these deprecated options.
2018-02-23 David Edelsohn <dje.gcc@gmail.com>
* config/rs6000/aix71.h (TARGET_DEFAULT): Change to
ISA_2_5_MASKS_EMBEDDED.
2018-02-23 Jakub Jelinek <jakub@redhat.com>
* ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
p->max as pointers rather than using iterative_hash_expr.
2018-02-23 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
BU_P8V_OVERLOAD_2.
* config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
P8V_BUILTIN_VEC_VUNSIGNED2.
2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
PR target/81572
* lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
* lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
LRA_UNKNOWN_ALT.
* lra-constraints.c (curr_insn_transform): Set up
LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
LRA_UNKNOWN_ALT.
(remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
* lra-eliminations.c (spill_pseudos): Ditto.
(process_insn_for_elimination): Ditto.
* lra-lives.c (reg_early_clobber_p): Use the new macros.
* lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
LRA_NON_CLOBBERED_ALT.
2018-02-22 Martin Sebor <msebor@redhat.com>
PR tree-optimization/84480
* gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
to maybe_diag_stxncpy_trunc. Call it.
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
from gimple_fold_builtin_strcpy. Print inlining stack.
(handle_builtin_stxncpy): Print inlining stack.
* tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
PR target/84176
* config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
error when -mindirect-branch=thunk-extern, -fcf-protection=branch
and -fcheck-pointer-bounds are used together.
(indirect_thunk_prefix): New enum.
(indirect_thunk_need_prefix): New function.
(indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
"_nt" instead of "_bnd" for NOTRACK prefix.
(output_indirect_thunk): Replace need_bnd_p with need_prefix.
(output_indirect_thunk_function): Likewise.
(): Likewise.
(ix86_code_end): Update output_indirect_thunk_function calls.
(ix86_output_indirect_branch_via_reg): Replace
ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
(ix86_output_indirect_branch_via_push): Likewise.
(ix86_output_function_return): Likewise.
* doc/invoke.texi: Document -mindirect-branch=thunk-extern is
incompatible with -fcf-protection=branch and
-fcheck-pointer-bounds.
2018-02-22 Steve Ellcey <sellcey@cavium.com>
PR target/83335
* config/aarch64/aarch64.c (aarch64_print_address_internal):
Change gcc_assert call to output_operand_lossage.
2018-02-22 Steve Ellcey <sellcey@cavium.com>
* doc/extend.texi (__builtin_extend_pointer): Document builtin.
2018-02-22 DJ Delorie <dj@redhat.com>
Sebastian Perta <sebastian.perta@renesas.com>
Oleg Endo <olegendo@gcc.gnu.org>
* config/rx/rx.c (rx_rtx_costs): New function.
(TARGET_RTX_COSTS): Override to use rx_rtx_costs.
2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
2018-02-22 Martin Liska <mliska@suse.cz>
PR driver/83193
* common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
Add "native" as a possible value.
2018-02-22 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/i386/i386.c (ix86_option_override_internal):
Add "native" as a possible value for -march and -mtune.
2018-02-22 Jakub Jelinek <jakub@redhat.com>
PR target/84502
* stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
to all type variants.
PR tree-optimization/84503
* gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
width as info->bitpos + info->bitsize - start.
(merged_store_group::merge_overlapping): Simplify width computation.
(check_no_overlap): New function.
(imm_store_chain_info::try_coalesce_bswap): Compute expected
start + width and last_order of the group, fail if check_no_overlap
fails.
(imm_store_chain_info::coalesce_immediate_stores): Don't merge info
to group if check_no_overlap fails.
2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md: Delete contraint arguments to
define_expand, define_split, and define_peephole2, and in
define_insn_and_split if always unused.
* config/rs6000/darwin.md: Ditto.
* config/rs6000/dfp.md: Ditto.
* config/rs6000/rs6000.md: Ditto.
* config/rs6000/sync.md: Ditto.
* config/rs6000/vector.md: Ditto.
* config/rs6000/vsx.md: Ditto.
2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/altivec.md: Write output control strings as braced
blocks instead of double-quoted strings.
* config/rs6000/darwin.md: Ditto.
* config/rs6000/rs6000.md: Ditto.
* config/rs6000/vector.md: Ditto.
* config/rs6000/vsx.md: Ditto.
2018-02-21 Jason Merrill <jason@redhat.com>
PR c++/84314 - ICE with templates and fastcall attribute.
* attribs.c (build_type_attribute_qual_variant): Remove assert.
2018-02-21 Jan Hubicka <hubicka@ucw.cz>
* ipa-cp.c (determine_versionability): Fix comment typos.
2018-02-21 Jan Hubicka <hubicka@ucw.cz>
PR c/84229
* ipa-cp.c (determine_versionability): Do not version functions caling
va_arg_pack.
2018-02-21 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
Add "native" as a possible value.
* config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
the macro when native cpu detection is available.
2018-02-21 Martin Liska <mliska@suse.cz>
PR driver/83193
* common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
Add "native" as a possible value.
* config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
when native cpu detection is available.
2018-02-21 Jakub Jelinek <jakub@redhat.com>
Martin Sebor <msebor@redhat.com>
PR tree-optimization/84478
* gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
false.
* gimple-fold.c (get_range_strlen): Make minlen const and assume it
can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
support which is conservatively correct, for 2 only stay conservative
for maxlen. Formatting and comment capitalization fixes. Add STRICT
argument to the 2 argument get_range_strlen, adjust 6 arg
get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
false.
(get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
(gimple_fold_builtin_strlen): Pass true as last argument to
get_range_strlen.
2018-02-20 Martin Sebor <msebor@redhat.com>
PR middle-end/84095
* gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
(builtin_memref::set_base_and_offset): Same. Handle inner references.
(builtin_memref::builtin_memref): Factor out parts into
set_base_and_offset and call it.
2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
PR middle-end/84406
* optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
search at the associated MODE_INT.
2018-02-20 Jeff Law <law@redhat.com>
PR middle-end/82123
PR tree-optimization/81592
PR middle-end/79257
* gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
for range data rather than using global data.
* gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
range data rather than using global data.
* gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
pass it to children as needed.
(struct directive::fmtresult): Similarly.
(struct directive::set_width): Similarly.
(struct directive::set_precision): Similarly.
(format_integer, format_directive, parse_directive): Similarly.
(format_none): Accept unnamed vr_values parameter.
(format_percent, format_floating, format_character): Similarly.
(format_string, format_plain): Similarly.
* gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
the EVRP range analyzer for range data rather than using global data.
* gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
gimple-ssa-evrp-analyze.h
(class sprintf_dom_walker): Add after_dom_children member function.
Add evrp_range_analyzer member.
(sprintf_dom_walker::before_dom_children): Call into the EVRP
range analyzer as needed.
(sprintf_dom_walker::after_dom_children): New member function.
* gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
if not optimizing.
(evrp_range_analyzer::record_ranges_from_stmt): Likewise.
(evrp_range_analyzer::pop_to_marker): Likewise.
2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84419
* internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
with the required type if its current type is compatible but
different.
2018-02-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82004
* match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
after vectorization.
2018-02-20 Martin Liska <mliska@suse.cz>
PR driver/83193
* config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
possible values if we don't have a hint.
2018-02-20 Martin Liska <mliska@suse.cz>
PR c/84310
PR target/79747
* final.c (shorten_branches): Build align_tab array with one
more element.
* opts.c (finish_options): Add alignment option limit check.
(MAX_CODE_ALIGN): Likewise.
(MAX_CODE_ALIGN_VALUE): Likewise.
* doc/invoke.texi: Document maximum allowed option value for
all -falign-* options.
2018-02-19 Jakub Jelinek <jakub@redhat.com>
PR target/84146
* reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
* insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
* var-tracking.c (emit_note_insn_var_location): Remove all references
to NOTE_INSN_CALL_ARG_LOCATION.
(emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
Use copy_rtx_if_shared.
* dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
(dwarf2out_var_location): Remove handling of
NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
on call_insn.
* final.c (final_scan_insn): Remove all references to
NOTE_INSN_CALL_ARG_LOCATION.
(rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
before dumping final insns.
* except.c (emit_note_eh_region_end): Remove all references to
NOTE_INSN_CALL_ARG_LOCATION.
* config/alpha/alpha.c (alpha_pad_function_end): Likewise.
* config/c6x/c6x.c (c6x_gen_bundles): Likewise.
* config/arc/arc.c (hwloop_optimize): Likewise.
* config/arm/arm.c (create_fix_barrier): Likewise.
* config/s390/s390.c (s390_chunkify_start): Likewise.
* config/sh/sh.c (find_barrier): Likewise.
* config/i386/i386.c (rest_of_insert_endbranch,
ix86_seh_fixup_eh_fallthru): Likewise.
* config/xtensa/xtensa.c (hwloop_optimize): Likewise.
* config/iq2000/iq2000.c (final_prescan_insn): Likewise.
* config/frv/frv.c (frv_function_prologue): Likewise.
* emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
reg note.
(note_outside_basic_block_p): Remove all references to
NOTE_INSN_CALL_ARG_LOCATION.
* gengtype.c (adjust_field_rtx_def): Likewise.
* print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
Likewise.
* jump.c (cleanup_barriers, delete_related_insns): Likewise.
* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
PR c++/84444
* builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
is ADDR_EXPR.
PR tree-optimization/84452
* tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
is NULL.
2018-02-19 Martin Liska <mliska@suse.cz>
PR sanitizer/82183
* passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
2018-02-19 Martin Liska <mliska@suse.cz>
Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/82491
* gimple-fold.c (get_base_constructor): Make earlier bail out
to prevent ubsan.
2018-02-19 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
BU_P8V_OVERLOAD_1.
* config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
P8V_BUILTIN_VEC_NEG.
2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.md (movdf): New define expand.
2018-02-19 Martin Liska <mliska@suse.cz>
PR other/80589
* doc/invoke.texi: Fix typo.
* params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
handle rs6000_single_float and rs6000_double_float specially for
e500 family CPUs.
2018-02-16 Jeff Law <law@redhat.com>
* config/rx/rx.c (add_pop_cfi_notes): New function.;
(pop_regs): Use it.
2018-02-16 Jakub Jelinek <jakub@redhat.com>
PR ipa/84425
* ipa-inline.c (inline_small_functions): Fix a typo.
2018-02-16 Nathan Sidwell <nathan@acm.org>
* doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
2018-02-16 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
* config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
expansion to P8V_BUILTIN_VEC_FLOAT2.
2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/70023
* lra-constraints.c (inherit_in_ebb): Take hard reg mode of
src_regno into account.
2018-02-16 Carl Love <cel@us.ibm.com>
* config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
* config/rs6000/rs6000-builtin.def: Remove macro expansion for
VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
* config/rs6000/rs6000.c: Remove case statements for
P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
and P9V_BUILTIN_VEC_VINSERT4B.
* config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
* config/rs6000/vsx.md:
* doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
vec_insert4b.
2018-02-16 Carl Love <cel@us.ibm.com>
* config/rs6000/altivec.h: Add builtin names vec_extract4b
vec_insert4b.
* config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
definitions.
* config/rs6000/rs6000-c.c: Add the definitions for
P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
* config/rs6000/rs6000.c (altivec_expand_builtin): Add
P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
* config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
definition for insert4b and define insn *insert3b_internal.
* doc/extend.texi: Add documentation for vec_extract4b.
2018-02-16 Nathan Sidwell <nathan@acm.org>
* doc/extend.texi (Backwards Compatibility): Mention friend
injection. Note for-scope is deprecated.
* doc/invoke.texi (-ffriend-injection): Deprecate.
2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
* combine.c (try_combine): When adjusting LOG_LINKS for the destination
that moved to I2, also allow destinations that are a paradoxical
subreg (instead of a normal reg).
2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
PR target/83831
* config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
to QImode.
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84037
PR tree-optimization/84016
PR target/82862
* config/i386/i386.c (ix86_builtin_vectorization_cost):
Adjust vec_construct for the fact we need additional higher latency
128bit inserts for AVX256 and AVX512 vector builds.
(ix86_add_stmt_cost): Scale vector construction cost for
elementwise loads.
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84417
* tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
(non_rewritable_lvalue_p): Likewise, use poly-ints.
2018-02-16 Martin Liska <mliska@suse.cz>
PR sanitizer/84307
* internal-fn.def (ASAN_CHECK): Set proper flags.
(ASAN_MARK): Likewise.
2018-02-16 Julia Koval <julia.koval@intel.com>
* config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
from PTA_CANNONLAKE.
2018-02-16 Jakub Jelinek <jakub@redhat.com>
PR target/84272
* config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
Use ++iter rather than iter++ for std::list iterators.
(func_fma_steering::dfs): Likewise. Don't delete nodes right away,
defer deleting them until all nodes in the forest are processed. Do
free even leaf nodes. Change to_process into auto_vec.
PR bootstrap/84405
* system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
* vec.h (vec_default_construct): Use memset instead of placement new
if BROKEN_VALUE_INITIALIZATION is defined.
* hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
is defined.
PR rtl-optimization/83723
* lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
* lra.c (lra_substitute_pseudo): Likewise. If true, use
gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
recursive calls.
(lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
callers.
* lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/81443
* rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
from inner REGs to paradoxical SUBREGs.
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84399
* graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
For operands we can analyze at their definition make sure we can
analyze them at each use as well.
2018-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/84190
* tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
volatile accesses if the decl isn't volatile.
2018-02-15 Jason Merrill <jason@redhat.com>
PR c++/84314 - ICE with templates and fastcall attribute.
* attribs.c (build_type_attribute_qual_variant): Don't clobber
TYPE_CANONICAL on an existing type.
2018-02-15 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84383
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
dstoff nor call operand_equal_p if dstbase is NULL.
PR tree-optimization/84334
* match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
also a CONSTANT_CLASS_P, punt.
2018-02-14 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (riscv_first_stack_step): Move locals after
first SMALL_OPERAND check. New local min_second_step. Move assert
to where locals are set. Add TARGET_RVC support.
* config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
* doc/invoke.texi: Correct -Wformat-overflow code sample.
2018-02-14 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83698
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
arrays constrain the offset range to their bounds.
(builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
(builtin_access::overlap): Avoid setting the size of overlap if it's
already been set.
(maybe_diag_overlap): Also consider arrays when deciding what values
of offsets to include in diagnostics.
2018-02-14 Martin Sebor <msebor@redhat.com>
PR c/84108
* attribs.c (diag_attr_exclusions): Consider the exclusion(s)
that correspond to the kind of a declaration.
2018-02-14 John David Anglin <danglin@gcc.gnu.org>
PR target/83984
* config/pa/pa.md: Load address of PIC label using the linkage table
if the label is nonlocal.
2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
warning message if user requests -maltivec=be.
* doc/invoke.texi: Document deprecation of -maltivec=be.
2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
PR target/84220
* config/rs6000/rs6000-c.c: Update definitions for
ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
PR target/84239
* config/i386/cetintrin.h: Remove _rdssp[d|q] and
add _get_ssp intrinsics. Remove argument from
__builtin_ia32_rdssp[d|q].
* config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
* config/i386/i386-builtin.def: Remove argument from
__builtin_ia32_rdssp[d|q].
* config/i386/i386.c: Use UINT_FTYPE_VOID. Use
ix86_expand_special_args_builtin for _rdssp[d|q].
* config/i386/i386.md: Remove argument from rdssp[si|di] insn.
Clear register before usage.
* doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
Add documentation for new _get_ssp and _inc_ssp intrinsics.
2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84357
* tree-data-ref.c (object_address_invariant_in_loop_p): Check
operand 1 of an ARRAY_REF too.
2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
PR target/83831
* config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
declarations.
(set_of_reg): New struct.
(rx_find_set_of_reg, rx_find_use_of_reg): New functions.
* config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
functions.
* config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
Split into bitclr, bitset, bitinvert patterns if appropriate.
(*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
use rx_fuse_in_memory_bitop.
(*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
to named insn, correct maximum insn length.
2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
PR target/79242
* machmode.def: Define a complex mode for PARTIAL_INT.
* genmodes.c (complex_class): Return MODE_COMPLEX_INT for
MODE_PARTIAL_INT.
* doc/rtl.texi: Document CSPImode.
* config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
handling.
(msp430_hard_regno_nregs_with_padding): Likewise.
2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
PR target/84279
* config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/84169
* combine.c (try_combine): New variable split_i2i3. Set it to true if
we generated a parallel as new i3 and we split that to new i2 and i3
instructions. Handle split_i2i3 similar to swap_i2i3: scan the
LOG_LINKs of i3 to see which of those need to link to i2 now. Link
those to i2, not i1. Partially rewrite this scan code.
2018-02-13 Jakub Jelinek <jakub@redhat.com>
PR c/82210
* stor-layout.c (place_field): For variable length fields, adjust
offset_align afterwards not just based on the field's alignment,
but also on the size.
PR middle-end/84309
* match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
of exps and logs in the use_exp2 case.
2018-02-13 Jeff Law <law@redhat.com>
* config/rl/rl78.c (rl78_attribute_table): Fix terminator and
entry for "vector".
* config/rl78/rl78.c (rl78_handle_func_attribute): Mark
ARGS as unused.
2018-02-13 Alexandre Oliva <aoliva@redhat.com>
PR debug/84342
PR debug/84319
* common.opt (gas-loc-support, gas-locview-support): New.
(ginline-points, ginternal-reset-location-views): New.
* doc/invoke.texi: Document them. Use @itemx where intended.
(gvariable-location-views): Adjust.
* target.def (reset_location_view): New.
* doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
(TARGET_RESET_LOCATION_VIEW): New.
* doc/tm.texi: Rebuilt.
* dwarf2out.c (dwarf2out_default_as_loc_support): New.
(dwarf2out_default_as_locview_support): New.
(output_asm_line_debug_info): Use option variables.
(dwarf2out_maybe_output_loclist_view_pair): Likewise.
(output_loc_list): Likewise.
(add_high_low_attributes): Check option variables.
Don't output entry view attribute in strict mode.
(gen_inlined_subroutine_die): Check option variables.
(dwarf2out_inline_entry): Likewise.
(init_sections_and_labels): Likewise.
(dwarf2out_early_finish): Likewise.
(maybe_reset_location_view): New, from...
(dwarf2out_var_location): ... here. Call it.
* debug.h (dwarf2out_default_as_loc_support): Declare.
(dwarf2out_default_as_locview_support): Declare.
* hooks.c (hook_int_rtx_insn_0): New.
* hooks.h (hook_int_rtx_insn_0): Declare.
* toplev.c (process_options): Take -gas-loc-support and
-gas-locview-support from dwarf2out. Enable
-gvariable-location-views by default only with locview
assembler support. Enable -ginternal-reset-location-views by
default only if the target defines the corresponding hook.
Enable -ginline-points by default if location views are
enabled; force it disabled if statement frontiers are
disabled.
* tree-inline.c (expand_call_inline): Check option variables.
* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84321
* tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
handling. Also check whether the anti-range contains any values
that satisfy the mask; switch to a VR_RANGE if not.
2018-02-13 Paolo Bonzini <bonzini@gnu.org>
PR sanitizer/84340
* internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
2018-02-13 Martin Jambor <mjambor@suse.cz>
PR c++/83990
* ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
of call statements, also set location of a load to a temporary.
2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.c (add_vector_labels): New function.
* config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
* config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
* config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
which checks that no arguments are passed.
* config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
* doc/extend.texi: Documentation for the new attribute.
2018-02-13 Andreas Schwab <schwab@suse.de>
* config/riscv/linux.h (CPP_SPEC): Define.
2018-02-13 Jakub Jelinek <jakub@redhat.com>
PR target/84335
* config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
OPTION_MASK_ISA_AES as first argument to def_builtin_const
for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
instead of OPTION_MASK_ISA_PCLMUL as first argument to
def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
* config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
temporarily for AES and PCLMUL builtins.
PR tree-optimization/84339
* gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
Formatting fixes.
PR middle-end/84309
* match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
* generic-match-head.c (canonicalize_math_after_vectorization_p): New
inline function.
* gimple-match-head.c (canonicalize_math_after_vectorization_p): New
inline function.
* omp-simd-clone.h: New file.
* omp-simd-clone.c: Include omp-simd-clone.h.
(expand_simd_clones): No longer static.
* tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
cgraph.h and omp-simd-clone.h.
(vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
(vect_recog_widen_shift_pattern): Formatting fix.
(vect_pattern_recog_1): Don't check optab for calls.
PR target/84336
* config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
operands[2] into a REG before using gen_lowpart on it.
2018-02-12 Jeff Law <law@redhat.com>
PR target/83760
* config/sh/sh.c (find_barrier): Consider a sibling call
a barrier as well.
* cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
successfully back substituting a reg.
2018-02-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/84037
* tree-vect-slp.c (vect_analyze_slp_cost): Add visited
parameter, move visited init to caller.
(vect_slp_analyze_operations): Separate cost from validity
check, initialize visited once for all instances.
(vect_schedule_slp): Analyze map to CSE vectorized nodes once
for all instances.
* tree-vect-stmts.c (vect_model_simple_cost): Make early
out an assert.
(vect_model_promotion_demotion_cost): Likewise.
(vectorizable_bswap): Guard cost modeling with !slp_node
instead of !PURE_SLP_STMT to avoid double-counting on hybrid
SLP stmts.
(vectorizable_call): Likewise.
(vectorizable_conversion): Likewise.
(vectorizable_assignment): Likewise.
(vectorizable_shift): Likewise.
(vectorizable_operation): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
(vectorizable_condition): Likewise.
(vectorizable_comparison): Likewise.
2018-02-12 Paolo Bonzini <bonzini@gnu.org>
PR sanitizer/84307
* internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
(ASAN_MARK): Fix fnspec to account for return value, change pointer
argument from 'R' to 'W' so that the pointed-to datum is clobbered.
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83665
* params.def (inline-min-speedup): Increase from 8 to 15.
(max-inline-insns-auto): Decrease from 40 to 30.
* ipa-split.c (consider_split): Add some buffer for function to
be considered inlining candidate.
* invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
default values.
2018-02-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/84037
* tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
matched stmts if we cannot swap the non-matched ones.
2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
* config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
_mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
_mm_maskz_scalef_round_ss): New intrinsics.
(__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
* config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
__builtin_ia32_scalefss_round): Remove.
(__builtin_ia32_scalefsd_mask_round,
__builtin_ia32_scalefss_mask_round): New intrinsics.
* config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
(vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
((match_operand:VF_128 2 "<round_nimm_predicate>"
"<round_constraint>")): Changed to ...
((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
"<round_scalar_constraint>")): ... this.
("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
%0, %1, %2<round_op3>}"): Changed to ...
("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
%0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
%2<round_scalar_mask_op3>}"): ... this.
* config/i386/subst.md (round_scalar_nimm_predicate): New.
2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
* config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
(_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
(_mm_maskz_sqrt_round_ss): New intrinsics.
(__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
(__builtin_ia32_sqrtsd_mask_round)
(__builtin_ia32_sqrtss_mask_round): New builtins.
* config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
(__builtin_ia32_sqrtss_round): Remove.
(__builtin_ia32_sqrtsd_mask_round)
(__builtin_ia32_sqrtss_mask_round): New builtins.
* config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
(vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
((match_operand:VF_128 1 "vector_operand"
"xBm,<round_constraint>")): Changed to ...
((match_operand:VF_128 1 "vector_operand"
"xBm,<round_scalar_constraint>")): ... this.
(vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
%0, %2, %<iptr>1<round_op3>}): Changed to ...
(vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
%0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
%<iptr>1<round_scalar_mask_op3>}): ... this.
((set_attr "prefix" "<round_prefix>")): Changed to ...
((set_attr "prefix" "<round_scalar_prefix>")): ... this.
2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
PR target/84266
* config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
Cast vec_cmpeq result to correct type.
* config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
Cast vec_cmpgt result to correct type.
2018-02-11 Alexandre Oliva <aoliva@redhat.com>
* final.c (final_scan_insn_1): Renamed from...
(final_scan_insn): ... this. New wrapper, to recover
seen from the outermost call in recursive ones.
* config/sparc/sparc.c (output_return): Drop seen from call.
(output_sibcall): Likewise.
* config/visium/visium.c (output_branch): Likewise.
2018-02-10 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
function label.
2018-02-10 Alan Modra <amodra@gmail.com>
PR target/84300
* config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
Specify LR as an input.
2018-02-10 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/83987
* omp-low.c (maybe_remove_omp_member_access_dummy_vars,
remove_member_access_dummy_vars): New functions.
(lower_omp_for, lower_omp_taskreg, lower_omp_target,
lower_omp_1, execute_lower_omp): Use them.
PR rtl-optimization/84308
* shrink-wrap.c (spread_components): Release todo vector.
2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/57193
* ira-color.c (struct allocno_color_data): Add member
conflict_allocno_hard_prefs.
(update_conflict_allocno_hard_prefs): New.
(bucket_allocno_compare_func): Add a preference based on
conflict_allocno_hard_prefs.
(push_allocno_to_stack): Update conflict_allocno_hard_prefs.
(color_allocnos): Remove a dead code. Initiate
conflict_allocno_hard_prefs. Call update_costs_from_prefs.
2018-02-09 Jakub Jelinek <jakub@redhat.com>
PR target/84226
* config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
constraint from =wa to wa. Avoid a subreg on the output operand,
instead use a pseudo and subreg it in a move.
(p9_xxbrd_<mode>): Changed to ...
(p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
(p9_xxbrd_v2df): New expander.
(p9_xxbrw_<mode>): Changed to ...
(p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
(p9_xxbrw_v4sf): New expander.
2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
* config/rx/rx.md (movsicc): Update expander to be matched by GCC.
2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
PR target/83926
* config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
multiply in 32-bit mode.
(vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
(vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
mode.
2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
* config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
to allow or block "symbol_ref" depending on the value of TARGET_JSR.
* config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
* config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
PR lto/84213
* dwarf2out.c (is_trivial_indirect_ref): New function.
(dwarf2out_late_global_decl): Do not generate a location
attribute for variables that have a non-trivial DECL_VALUE_EXPR
and that are not defined in the current unit.
2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
* optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
instead of a libcall for UNORDERED.
2018-02-09 Tamar Christina <tamar.christina@arm.com>
PR target/82641
* config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
__ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/PR84295
* config/s390/s390.c (s390_set_current_function): Invoke
s390_indirect_branch_settings also if fndecl didn't change.
2018-02-09 Alexandre Oliva <aoliva@redhat.com>
* config/rs6000/rs6000.md (blockage): Set length to zero.
2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
* expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
2018-02-09 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/84285
* gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
-static-lib*san.
PR debug/84252
* var-tracking.c (vt_add_function_parameter): Punt for non-onepart
PARALLEL incoming that failed vt_get_decl_and_offset check.
PR middle-end/84237
* output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
* varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
TREE_READONLY bit.
(get_variable_section): For decls in named .bss* sections pass true as
second argument to bss_initializer_p.
2018-02-09 Marek Polacek <polacek@redhat.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/83659
* fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
Sync some changes from cxx_fold_indirect_ref.
2018-02-09 Alexandre Oliva <aoliva@redhat.com>
* cfgexpand.c (expand_gimple_basic_block): Handle inline entry
markers.
* dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
(BLOCK_INLINE_ENTRY_LABEL): New.
(dwarf2out_var_location): Disregard inline entry markers.
(inline_entry_data): New struct.
(inline_entry_data_hasher): New hashtable type.
(inline_entry_data_hasher::hash): New.
(inline_entry_data_hasher::equal): New.
(inline_entry_data_table): New variable.
(add_high_low_attributes): Add DW_AT_entry_pc and
DW_AT_GNU_entry_view attributes if a pending entry is found
in inline_entry_data_table. Add old entry_pc attribute only
if debug nonbinding markers are disabled.
(gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
markers are enabled.
(block_within_block_p, dwarf2out_inline_entry): New.
(dwarf2out_finish): Check that no entries remained in
inline_entry_data_table.
* final.c (reemit_insn_block_notes): Handle inline entry notes.
(final_scan_insn, notice_source_line): Likewise.
(rest_of_clean_state): Skip inline entry markers.
* gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
markers.
* gimple.c (gimple_build_debug_inline_entry): New.
* gimple.h (enum gimple_debug_subcode): Add
GIMPLE_DEBUG_INLINE_ENTRY.
(gimple_build_debug_inline_entry): Declare.
(gimple_debug_inline_entry_p): New.
(gimple_debug_nonbind_marker_p): Adjust.
* insn-notes.def (INLINE_ENTRY): New.
* print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
inline entry marker notes.
(print_insn): Likewise.
* rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
(INSN_DEBUG_MARKER_KIND): Likewise.
(GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
* tree-inline.c (expand_call_inline): Build and insert
debug_inline_entry stmt.
* tree-ssa-live.c (remove_unused_scope_block_p): Preserve
inline entry blocks early, if nonbind markers are enabled.
(dump_scope_block): Dump fragment info.
* var-tracking.c (reemit_marker_as_note): Handle inline entry note.
* doc/gimple.texi (gimple_debug_inline_entry_p): New.
(gimple_build_debug_inline_entry): New.
* doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
Enable/disable inline entry points too.
* doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
(DEBUG_INSN): Describe inline entry markers.
* common.opt (gvariable-location-views): New.
(gvariable-location-views=incompat5): New.
* config.in: Rebuilt.
* configure: Rebuilt.
* configure.ac: Test assembler for view support.
* dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
* dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
* dwarf2out.c (var_loc_view): New typedef.
(struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
(dwarf2out_locviews_in_attribute): New.
(dwarf2out_locviews_in_loclist): New.
(dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
(enum dw_line_info_opcode): Add LI_adv_address.
(struct dw_line_info_table): Add view.
(RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
(DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
(zero_view_p): New variable.
(ZERO_VIEW_P): New macro.
(output_asm_line_debug_info): New.
(struct var_loc_node): Add view.
(add_AT_view_list, AT_loc_list): New.
(add_var_loc_to_decl): Add view param. Test it against last.
(new_loc_list): Add view params. Record them.
(AT_loc_list_ptr): Handle loc and view lists.
(view_list_to_loc_list_val_node): New.
(print_dw_val): Handle dw_val_class_view_list.
(size_of_die): Likewise.
(value_format): Likewise.
(loc_list_has_views): New.
(gen_llsym): Set vl_symbol too.
(maybe_gen_llsym, skip_loc_list_entry): New.
(dwarf2out_maybe_output_loclist_view_pair): New.
(output_loc_list): Output view list or entries too.
(output_view_list_offset): New.
(output_die): Handle dw_val_class_view_list.
(output_dwarf_version): New.
(output_compilation_unit_header): Use it.
(output_skeleton_debug_sections): Likewise.
(output_rnglists, output_line_info): Likewise.
(output_pubnames, output_aranges): Update version comments.
(output_one_line_info_table): Output view numbers in asm comments.
(dw_loc_list): Determine current endview, pass it to new_loc_list.
Call maybe_gen_llsym.
(loc_list_from_tree_1): Adjust.
(add_AT_location_description): Create view list attribute if
needed, check it's absent otherwise.
(convert_cfa_to_fb_loc_list): Adjust.
(maybe_emit_file): Call output_asm_line_debug_info for test.
(dwarf2out_var_location): Reset views as needed. Precompute
add_var_loc_to_decl args. Call get_attr_min_length only if we have the
attribute. Set view.
(new_line_info_table): Reset next view.
(set_cur_line_info_table): Call output_asm_line_debug_info for test.
(dwarf2out_source_line): Likewise. Output view resets and labels to
the assembler, or select appropriate line info opcodes.
(prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
(optimize_string_length): Catch it. Adjust.
(resolve_addr): Copy vl_symbol along with ll_symbol. Handle
dw_val_class_view_list, and remove it if no longer needed.
(hash_loc_list): Hash view numbers.
(loc_list_hasher::equal): Compare them.
(optimize_location_lists): Check whether a view list symbol is
needed, and whether the locview attribute is present, and
whether they match. Remove the locview attribute if no longer
needed.
(index_location_lists): Call skip_loc_list_entry for test.
(dwarf2out_finish): Call output_asm_line_debug_info for test.
Use output_dwarf_version.
* dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
(struct dw_val_node): Add val_view_list.
* final.c (SEEN_NEXT_VIEW): New.
(set_next_view_needed): New.
(clear_next_view_needed): New.
(maybe_output_next_view): New.
(final_start_function): Rename to...
(final_start_function_1): ... this. Take pointer to FIRST,
add SEEN parameter. Emit param bindings in the initial view.
(final_start_function): Reintroduce SEEN-less interface.
(final): Rename to...
(final_1): ... this. Take SEEN parameter. Output final pending
next view at the end.
(final): Reintroduce seen-less interface.
(final_scan_insn): Output pending next view before switching
sections or ending a block. Mark the next view as needed when
outputting variable locations. Notify debug backend of section
changes, and of location view changes.
(rest_of_handle_final): Adjust.
* toplev.c (process_options): Autodetect value for debug variable
location views option. Warn on incompat5 without -gdwarf-5.
* doc/invoke.texi (gvariable-location-views): New.
(gvariable-location-views=incompat5): New.
(gno-variable-location-views): New.
2018-02-08 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/84136
* tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
that the result of find_edge is non-NULL.
2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
PR target/83008
* config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
storing integer register in SImode. Fix cost of 256 and 512
byte aligned SSE register store.
2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
* config/i386/i386.c (ix86_multiplication_cost): Fix
multiplication cost for TARGET_AVX512DQ.
2018-02-08 Marek Polacek <polacek@redhat.com>
PR tree-optimization/84238
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
get_range_strlen.
2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/84265
* tree-vect-stmts.c (vectorizable_store): Don't treat
VMAT_CONTIGUOUS accesses as grouped.
(vectorizable_load): Likewise.
2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/81635
* wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
* wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
(test_round_for_mask): New functions.
(wide_int_cc_tests): Call test_round_for_mask.
* tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
* tree-vrp.c (intersect_range_with_nonzero_bits): New function.
* tree-data-ref.c (split_constant_offset_1): Use it to refine the
range returned by get_range_info.
2018-02-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
* symtab.c: Include builtins.h
(symtab_node::output_to_lto_symbol_table_p): Move here
from lto-streamer-out.c:output_symbol_p.
* lto-streamer-out.c (write_symbol): Turn early exit to assert.
(output_symbol_p): Move all logic to symtab.c
(produce_symtab): Update.
2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390-opts.h (enum indirect_branch): Define.
* config/s390/s390-protos.h (s390_return_addr_from_memory)
(s390_indirect_branch_via_thunk)
(s390_indirect_branch_via_inline_thunk): Add function prototypes.
(enum s390_indirect_branch_type): Define.
* config/s390/s390.c (struct s390_frame_layout, struct
machine_function): Remove.
(indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
(indirect_branch_table_label_no, indirect_branch_table_name):
Define variables.
(INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
(enum s390_indirect_branch_option): Define.
(s390_return_addr_from_memory): New function.
(s390_handle_string_attribute): New function.
(s390_attribute_table): Add new attribute handler.
(s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
(s390_indirect_branch_via_thunk): New function.
(s390_indirect_branch_via_inline_thunk): New function.
(s390_function_ok_for_sibcall): When jumping via thunk disallow
sibling call optimization for non z10 compiles.
(s390_emit_call): Force indirect branch target to be a single
register. Add r1 clobber for non-z10 compiles.
(s390_emit_epilogue): Emit return jump via return_use expander.
(s390_reorg): Handle JUMP_INSNs as execute targets.
(s390_option_override_internal): Perform validity checks for the
new command line options.
(s390_indirect_branch_attrvalue): New function.
(s390_indirect_branch_settings): New function.
(s390_set_current_function): Invoke s390_indirect_branch_settings.
(s390_output_indirect_thunk_function): New function.
(s390_code_end): Implement target hook.
(s390_case_values_threshold): Implement target hook.
(TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
macros.
* config/s390/s390.h (struct s390_frame_layout)
(struct machine_function): Move here from s390.c.
(TARGET_INDIRECT_BRANCH_NOBP_RET)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
(TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
(TARGET_INDIRECT_BRANCH_NOBP_CALL)
(TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
(TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
(TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
(TARGET_INDIRECT_BRANCH_TABLE): Define macros.
* config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
(INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
(mnemonic attribute): Add values which aren't recognized
automatically.
("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
pattern for branch conversion. Fix mnemonic attribute.
("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
indirect branch via thunk if requested.
("indirect_jump", "<code>"): Expand patterns for branch conversion.
("*indirect_jump"): Disable for branch conversion using out of
line thunks.
("indirect_jump_via_thunk<mode>_z10")
("indirect_jump_via_thunk<mode>")
("indirect_jump_via_inlinethunk<mode>_z10")
("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
("casesi_jump_via_inlinethunk<mode>_z10")
("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
("*indirect2_jump"): Disable for branch conversion.
("casesi_jump"): Turn into expander and expand patterns for branch
conversion.
("return_use"): New expander.
("*return"): Emit return via thunk and rename it to ...
("*return<mode>"): ... this one.
* config/s390/s390.opt: Add new options and and enum for the
option values.
2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
* lra-constraints.c (match_reload): Unconditionally use
gen_lowpart_SUBREG, rather than selecting between that
and equivalent gen_rtx_SUBREG code.
2018-02-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/84233
* tree-ssa-phiprop.c (propagate_with_phi): Use separate
changed flag instead of boguously re-using phi_inserted.
2018-02-08 Martin Jambor <mjambor@suse.cz>
* hsa-gen.c (get_symbol_for_decl): Set program allocation for
static local variables.
2018-02-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/84278
* tree-vect-stmts.c (vectorizable_store): When looking for
smaller vector types to perform grouped strided loads/stores
make sure the mode is supported by the target.
(vectorizable_load): Likewise.
2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
* config/aarch64/aarch64.c (aarch64_components_for_bb):
Increase LDP/STP opportunities by adding adjacent callee-saves.
2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
PR rtl-optimization/84068
PR rtl-optimization/83459
* haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
2018-02-08 Aldy Hernandez <aldyh@redhat.com>
PR tree-optimization/84224
* gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
* calls.c (gimple_alloca_call_p): Only return TRUE when we have
non-zero arguments.
2018-02-07 Iain Sandoe <iain@codesourcery.com>
PR target/84113
* config/rs6000/altivec.md (*restore_world): Remove LR use.
* config/rs6000/predicates.md (restore_world_operation): Adjust op
count, remove one USE.
2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
* doc/install.texi (Configuration): Document the
--with-long-double-format={ibm,ieee} PowerPC configuration
options.
PR target/84154
* config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
Convert from define_expand to be define_insn_and_split. Rework
float/double/_Float128 conversions to QI/HI/SImode to work with
both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
conversions to QI/HImode types did a store and then a load to
truncate the value. For conversions to VSX registers, don't split
the insn, instead emit the code directly. Use the code iterator
any_fix to combine signed and unsigned conversions.
(fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
(fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
(fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
(fix_<mode>di2_hw): Likewise.
(fixuns_<mode>di2_hw): Likewise.
(fix_<mode>si2_hw): Likewise.
(fixuns_<mode>si2_hw): Likewise.
(fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
(fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
(fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
fix<uns>_trunc<SFDF:mode>si2_p8.
(fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
(fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
(fix<uns>_<mode>_mem): Likewise.
(fctiw<u>z_<mode>_mem): Likewise.
(fix<uns>_<mode>_mem): Likewise.
(fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
the register allocator from doing a direct move to the GPRs to do
a store, and instead use the ISA 3.0 store byte/half-word from
vector register instruction. For IEEE 128-bit floating point,
also optimize stores of 32-bit ints.
(fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
2018-02-07 Alan Hayward <alan.hayward@arm.com>
* genextract.c (push_pathstr_operand): New function to support
[a-zA-Z].
(walk_rtx): Call push_pathstr_operand.
(print_path): Support [a-zA-Z].
2018-02-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/84037
* tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
(cse_and_gimplify_to_preheader): Declare.
(vect_get_place_in_interleaving_chain): Likewise.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
ivexpr_map.
(_loop_vec_info::~_loop_vec_info): Delete it.
(cse_and_gimplify_to_preheader): New function.
* tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
* tree-vect-stmts.c (vectorizable_store): CSE base and steps.
(vectorizable_load): Likewise. For grouped stores always base
the IV on the first element.
* tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
condition before gimplifying.
2018-02-07 Jakub Jelinek <jakub@redhat.com>
* tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
*DIV_EXPR and *MOD_EXPR.
2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
PR target/84248
* config/i386/i386.c (ix86_option_override_internal): Mask out
the CF_SET bit when checking -fcf-protection.
2018-02-07 Tom de Vries <tom@codesourcery.com>
PR libgomp/84217
* omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
enough.
2018-02-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/84204
* tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
this place.
PR tree-optimization/84205
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
special-case isl_ast_op_zdiv_r.
PR tree-optimization/84223
* graphite-scop-detection.c (gather_bbs::before_dom_children):
Only add conditions from within the region.
(gather_bbs::after_dom_children): Adjust.
2018-02-07 Georg-Johann Lay <avr@gjlay.de>
PR target/84209
* config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
* config/avr/avr.md: Only post-reload split REG-REG moves if
either register is GENERAL_REG_P.
2018-02-07 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84235
* tree-ssa-scopedtables.c
(avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
if the subtraction is performed in floating point type where NaNs are
honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
build 1. Formatting fix.
2018-02-06 Jakub Jelinek <jakub@redhat.com>
PR target/84146
* config/i386/i386.c (rest_of_insert_endbranch): Only skip
NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
and skip it regardless of bb boundaries. Use CALL_P macro,
don't test INSN_P (insn) together with CALL_P or JUMP_P check
unnecessarily, formatting fix.
2018-02-06 Michael Collison <michael.collison@arm.com>
* config/arm/thumb2.md:
(*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
(*thumb_mov_notscc): Ditto.
2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/84154
* config/rs6000/rs6000.md (su code attribute): Use "u" for
unsigned_fix, not "s".
2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (gcc_fn_eh_frame_ro): New function.
(gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
correct .eh_frame permissions.
* configure: Regenerate.
2018-02-06 Andrew Jenner <andrew@codeourcery.com>
* doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
irrelevant options.
2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_option_override_internal):
Display warning message for -mno-speculate-indirect-jumps.
2018-02-06 Andrew Jenner <andrew@codesourcery.com>
* config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
Undocumented.
* config/powerpcspe/sysv4.opt (mbit-align): Likewise.
2018-02-06 Aldy Hernandez <aldyh@redhat.com>
PR tree-optimization/84225
* tree-eh.c (find_trapping_overflow): Only call
operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
PR target/84145
* config/i386/i386.c: Reimplement the check of possible options
-mibt/-mshstk conbination. Change error messages.
* doc/invoke.texi: Fix a typo: remove extra '='.
2018-02-06 Marek Polacek <polacek@redhat.com>
PR tree-optimization/84228
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
2018-02-06 Tamar Christina <tamar.christina@arm.com>
PR target/82641
* config/arm/arm.c (arm_print_asm_arch_directives): Record already
emitted arch directives.
* config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
__ARM_FEATURE_COPROC before changing architectures.
2018-02-06 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (print_reg): Fix typo.
(ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
* configure: Regenerate.
2018-02-05 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83369
* tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
inlining context.
2018-02-05 Martin Liska <mliska@suse.cz>
* doc/invoke.texi: Cherry-pick upstream r323995.
2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
* ira.c (ira_init_register_move_cost): Adjust comment.
2018-02-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/84137
* doc/gcov.texi: Fix typo in documentation.
2018-02-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/83879
* doc/gcov.texi: Document necessity of --dynamic-list-data when
using dlopen functionality.
2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
* config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
_mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
_mm_maskz_range_ss, _mm_mask_range_round_ss,
_mm_maskz_range_round_ss): New intrinsics.
(__builtin_ia32_rangesd128_round)
(__builtin_ia32_rangess128_round): Remove.
(__builtin_ia32_rangesd128_mask_round,
__builtin_ia32_rangess128_mask_round): New builtins.
* config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
__builtin_ia32_rangess128_round): Remove.
(__builtin_ia32_rangesd128_mask_round,
__builtin_ia32_rangess128_mask_round): New builtins.
* config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
(ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
"<round_saeonly_constraint>")): Changed to ...
((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
"<round_saeonly_scalar_constraint>")): ... this.
("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
%0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
%1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
%2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
2018-02-02 Andrew Jenner <andrew@codesourcery.com>
* config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
options.
* config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
Remove all values except native, 8540 and 8548.
2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_output_function_return): Pass
INVALID_REGNUM, instead of -1, as invalid register number to
indirect_thunk_name and output_indirect_thunk.
2018-02-02 Julia Koval <julia.koval@intel.com>
* config.gcc: Add -march=icelake.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
* config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
* config/i386/i386.c (processor_costs): Add m_ICELAKE.
(PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
(processor_target_table): Add icelake.
(ix86_option_override_internal): Handle new PTAs.
(get_builtin_code_for_version): Handle icelake.
(M_INTEL_COREI7_ICELAKE): New.
(fold_builtin_cpu): Handle icelake.
* config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
* doc/invoke.texi: Add -march=icelake.
2018-02-02 Julia Koval <julia.koval@intel.com>
* config/i386/i386.c (ix86_option_override_internal): Change flags type
to wide_int_bitmask.
* wide-int-bitmask.h: New.
2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
PR target/84066
* config/i386/i386.md: Replace Pmode with word_mode in
builtin_setjmp_setup and builtin_longjmp to support x32.
2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
PR target/56010
PR target/83743
* config/rs6000/driver-rs6000.c: #include "diagnostic.h".
#include "opts.h".
(rs6000_supported_cpu_names): New static variable.
(linux_cpu_translation_table): Likewise.
(elf_platform) <cpu>: Define new static variable and use it.
Translate kernel AT_PLATFORM name to canonical name if needed.
Error if platform name is unknown.
2018-02-01 Aldy Hernandez <aldyh@redhat.com>
PR target/84089
* config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
2018-02-01 Jeff Law <law@redhat.com>
PR target/84128
* config/i386/i386.c (release_scratch_register_on_entry): Add new
OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
the scratch if RELEASE_VIA_POP is false.
(ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
If we have to save a temporary register, decrement SIZE appropriately.
Pass new arguments to release_scratch_register_on_entry.
(ix86_adjust_stack_and_probe): Likewise.
(ix86_emit_probe_stack_range): Pass new arguments to
release_scratch_register_on_entry.
2018-02-01 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/84157
* combine.c (change_zero_ext): Use REG_P predicate in
front of HARD_REGISTER_P predicate.
2018-02-01 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr.c (avr_option_override): Move disabling of
-fdelete-null-pointer-checks to...
* common/config/avr/avr-common.c (avr_option_optimization_table):
...here.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/81635
* tree-data-ref.c (split_constant_offset_1): For types that
wrap on overflow, try to use range info to prove that wrapping
cannot occur.
2018-02-01 Renlin Li <renlin.li@arm.com>
PR target/83370
* config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
TAILCALL_ADDR_REGS.
(aarch64_register_move_cost): Likewise.
* config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
TAILCALL_ADDR_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
TAILCALL_ADDR_REGS. Remove IP registers.
* config/aarch64/aarch64.md (Ucs): Update register constraint.
2018-02-01 Richard Biener <rguenther@suse.de>
* domwalk.h (dom_walker::dom_walker): Add additional constructor
for specifying RPO order and allow NULL for that.
* domwalk.c (dom_walker::dom_walker): Likewise.
(dom_walker::walk): Handle NULL RPO order.
* tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
in RPO order.
(rewrite_update_dom_walker): Likewise.
(mark_def_dom_walker): Likewise.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
(aarch64_maybe_expand_sve_subreg_move): Declare.
* config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
* config/aarch64/predicates.md (aarch64_any_register_operand): New
predicate.
* config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
that are semantically a reverse operation.
(*aarch64_sve_mov<mode>_subreg_be): New pattern.
* config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
(aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
functions.
(aarch64_can_change_mode_class): For big-endian, forbid changes
between two SVE modes if they have different element sizes.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
the TImode handling for big-endian targets.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
(*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
not just bytes.
* config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
Remove BSWAP handing for big-endian targets and use the form of
LD1RQ appropariate for the mode.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
duplicated element.
2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
PR tearget/83845
* config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
check for operands that need to go through aarch64_sve_reload_be.
2018-02-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/81661
PR tree-optimization/84117
* tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
* tree-eh.c: Include gimplify.h.
(find_trapping_overflow, replace_trapping_overflow,
rewrite_to_non_trapping_overflow): New functions.
* tree-vect-loop.c: Include tree-eh.h.
(vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
* tree-data-ref.c: Include tree-eh.h.
(get_segment_min_max): Use rewrite_to_non_trapping_overflow.
2018-01-31 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/84123
* combine.c (change_zero_ext): Check if hard register satisfies
can_change_dest_mode before calling gen_lowpart_SUBREG.
2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
PR target/82444
* ira.c (ira_init_register_move_cost): Remove assert.
2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/84071
* doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
* doc/tm.texi: Regenerate.
2018-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/84132
* tree-data-ref.c (analyze_miv_subscript): Properly
check whether evolution_function_is_affine_multivariate_p
before calling gcd_of_steps_may_divide_p.
2018-01-31 Julia Koval <julia.koval@intel.com>
PR target/83618
* config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
* config/i386/i386.md (rdpid_rex64) New.
(rdpid): Make 32bit only.
2018-01-29 Aldy Hernandez <aldyh@redhat.com>
PR lto/84105
* tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
an IDENTIFIER_NODE for FUNCTION_TYPE's.
2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
Revert
2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/84071
* combine.c (record_dead_and_set_regs_1): Record the source unmodified
for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_handle_aux_attribute): New function.
(arc_attribute_table): Add 'aux' attribute.
(arc_in_small_data_p): Consider aux like variables.
(arc_is_aux_reg_p): New function.
(arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
(arc_get_aux_arg): New function.
(prepare_move_operands): Handle aux-register access.
(arc_handle_aux_attribute): New function.
* doc/extend.texi (ARC Variable attributes): Add subsection.
2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
* config/arc/arc.c (arc_handle_uncached_attribute): New function.
(arc_attribute_table): Add 'uncached' attribute.
(arc_print_operand): Print '.di' flag for uncached memory
accesses.
(arc_in_small_data_p): Do not consider for small data the uncached
types.
(arc_is_uncached_mem_p): New function.
* config/arc/predicates.md (compact_store_memory_operand): Check
for uncached memory accesses.
(nonvol_nonimm_operand): Likewise.
* doc/extend.texi (ARC Type Attribute): New subsection.
2018-01-31 Jakub Jelinek <jakub@redhat.com>
PR c/84100
* common.opt (falign-functions=, falign-jumps=, falign-labels=,
falign-loops=): Add Optimization flag.
2018-01-30 Jeff Law <law@redhat.com>
PR target/84064
* i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
INT_REGISTERS_SAVED. Check it prior to calling
get_scratch_register_on_entry.
(ix86_adjust_stack_and_probe): Similarly.
(ix86_emit_probe_stack_range): Similarly.
(ix86_expand_prologue): Corresponding changes.
2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/40411
* config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
-std=iso9899:199409 instead of -pedantic to select values-Xc.o.
2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
PR target/84112
* lra-constraints.c (curr_insn_transform): Process AND in the
address.
2018-01-30 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83986
* sched-deps.c (sched_analyze_insn): For frame related insns, add anti
dependence against last_pending_memory_flush in addition to
pending_jump_insns.
2018-01-30 Alexandre Oliva <aoliva@redhat.com>
PR tree-optimization/81611
* tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
copies.
2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
PR target/83758
* config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
a reg rtx.
2018-01-30 Richard Biener <rguenther@suse.de>
Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84111
* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
inner loops added during recursion, as they don't have up-to-date
SSA form.
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
PR ipa/81360
* ipa-inline.c (can_inline_edge_p): Break out late tests to...
(can_inline_edge_by_limits_p): ... here.
(can_early_inline_edge_p, check_callers,
update_caller_keys, update_callee_keys, recursive_inlining,
add_new_edges_to_heap, speculation_useful_p,
inline_small_functions,
inline_small_functions, flatten_function,
inline_to_all_callers_1): Update.
2018-01-30 Jan Hubicka <hubicka@ucw.cz>
* profile-count.c (profile_count::combine_with_ipa_count): Handle
zeros correctly.
2018-01-30 Richard Biener <rguenther@suse.de>
PR tree-optimization/83008
* tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
invariant and constant vector uses in stmts when they need
more than one stmt.
2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/84017
* configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
* configure: Regenerate.
2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
pattern.
(*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
Use gen_rtx_REG rather than gen_lowpart.
2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
* lra-constraints.c (match_reload): Use subreg_lowpart_offset
rather than 0 when creating partial subregs.
2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
* vec-perm-indices.c (vec_perm_indices::series_p): Give examples
of usage.
2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/81550
* config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
-mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
flags. This restores the settings used before the 2017-07-24.
Turning off pre increment/decrement/modify allows IVOPTS to
optimize DF/SF loops where the index is an int.
2018-01-29 Richard Biener <rguenther@suse.de>
Kelvin Nilsen <kelvin@gcc.gnu.org>
PR bootstrap/80867
* tree-vect-stmts.c (vectorizable_call): Don't call
targetm.vectorize_builtin_md_vectorized_function if callee is
NULL.
2018-01-22 Carl Love <cel@us.ibm.com>
* doc/extend.tex: Fix typo in second arg in
__builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
2018-01-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/84086
* tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
(flush_ssaname_freelist): When SSA names were released reset
the SCEV hash table.
2018-01-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/84057
* tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
removed paths when removing edges.
2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
* doc/invoke.texi: Replace -mfunction-return==@var{choice} with
-mfunction-return=@var{choice}.
2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR diagnostic/84034
* diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
Handle CR like TAB.
(layout::print_source_line): Likewise.
(test_get_line_width_without_trailing_whitespace): Add test cases.
2018-01-27 Jakub Jelinek <jakub@redhat.com>
PR middle-end/84040
* sched-deps.c (sched_macro_fuse_insns): Return immediately for
debug insns.
2018-01-26 Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
* config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
specified.
2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
and CMP + SUB-immediate -> SUBS.
2018-01-26 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83896
* tree-ssa-strlen.c (get_string_len): Rename...
(get_string_cst_length): ...to this. Return HOST_WIDE_INT.
Avoid assuming length is constant.
(handle_char_store): Use HOST_WIDE_INT for string length.
2018-01-26 Uros Bizjak <ubizjak@gmail.com>
PR target/81763
* config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
2018-01-26 Richard Biener <rguenther@suse.de>
PR rtl-optimization/84003
* dse.c (record_store): Only record redundant stores when
the earlier store aliases at least all accesses the later one does.
2018-01-26 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/83985
* dce.c (deletable_insn_p): Return false for separate shrink wrapping
REG_CFA_RESTORE insns.
(delete_unmarked_insns): Don't ignore separate shrink wrapping
REG_CFA_RESTORE insns here.
PR c/83989
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
* config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
(arc_init): Likewise.
(arc_override_options): Likewise.
(arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
value.
(hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
support.
* config/arc/arc.h (TARGET_DBNZ): Define.
* config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
properly set the tune attribute.
(dbnz): Use TARGET_DBNZ guard.
* config/arc/arc.opt (mtune): Add core3 option.
2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (arc_delegitimize_address_0): Refactored to
recognize new pic like addresses.
(arc_delegitimize_address): Clean up.
2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-arches.def: Option mrf16 valid for all
architectures.
* config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
* config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
* config/arc/arc-options.def (FL_RF16): Add mrf16 option.
* config/arc/arc-tables.opt: Regenerate.
* config/arc/arc.c (arc_conditional_register_usage): Handle
reduced register file case.
(arc_file_start): Set must have build attributes.
* config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
mrf16 option value.
* config/arc/arc.opt (mrf16): Add new option.
* config/arc/elf.h (ATTRIBUTE_PCS): Define.
* config/arc/genmultilib.awk: Handle new mrf16 option.
* config/arc/linux.h (ATTRIBUTE_PCS): Define.
* config/arc/t-multilib: Regenerate.
* doc/invoke.texi (ARC Options): Document mrf16 option.
2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
* config/arc/arc.c (arc_handle_secure_attribute): New function.
(arc_attribute_table): Add 'secure_call' attribute.
(arc_print_operand): Print secure call operand.
(arc_function_ok_for_sibcall): Don't optimize tail calls when
secure.
(arc_is_secure_call_p): New function. * config/arc/arc.md
(call_i): Add support for sjli instruction.
(call_value_i): Likewise.
* config/arc/constraints.md (Csc): New constraint.
2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
John Eric Martin <John.Martin@emmicro-us.com>
* config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
* config/arc/arc.c (_arc_jli_section): New struct.
(arc_jli_section): New type.
(rc_jli_sections): New static variable.
(arc_handle_jli_attribute): New function.
(arc_attribute_table): Add jli_always and jli_fixed attribute.
(arc_file_end): New function.
(TARGET_ASM_FILE_END): Define.
(arc_print_operand): Reuse 'S' letter for JLI output instruction.
(arc_add_jli_section): New function.
(jli_call_scan): Likewise.
(arc_reorg): Call jli_call_scan.
(arc_output_addsi): Remove 'S' from printing asm operand.
(arc_is_jli_call_p): New function.
* config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
operand.
(movhi_insn): Likewise.
(movsi_insn): Likewise.
(movsi_set_cc_insn): Likewise.
(loadqi_update): Likewise.
(load_zeroextendqisi_update): Likewise.
(load_signextendqisi_update): Likewise.
(loadhi_update): Likewise.
(load_zeroextendhisi_update): Likewise.
(load_signextendhisi_update): Likewise.
(loadsi_update): Likewise.
(loadsf_update): Likewise.
(movsicc_insn): Likewise.
(bset_insn): Likewise.
(bxor_insn): Likewise.
(bclr_insn): Likewise.
(bmsk_insn): Likewise.
(bicsi3_insn): Likewise.
(cmpsi_cc_c_insn): Likewise.
(movsi_ne): Likewise.
(movsi_cond_exec): Likewise.
(clrsbsi2): Likewise.
(norm_f): Likewise.
(normw): Likewise.
(swap): Likewise.
(divaw): Likewise.
(flag): Likewise.
(sr): Likewise.
(kflag): Likewise.
(ffs): Likewise.
(ffs_f): Likewise.
(fls): Likewise.
(call_i): Remove 'S' asm letter, add jli instruction.
(call_value_i): Likewise.
* config/arc/arc.op (mjli-always): New option.
* config/arc/constraints.md (Cji): New constraint.
* config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
operand.
(subsf3_fpx): Likewise.
(mulsf3_fpx): Likewise.
* config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
asm operand.
* doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
function attrbutes.
* doc/invoke.texi (ARC): Document mjli-always option.
2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
avoid addition with 0 and use incw and decw where possible.
2018-01-26 Richard Biener <rguenther@suse.de>
PR tree-optimization/81082
* fold-const.c (fold_plusminus_mult_expr): Do not perform the
association if it requires casting to unsigned.
* match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
from fold_plusminus_mult_expr to catch important cases late when
range info is available.
2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
* configure.ac (hidden_linkonce): New test.
* configure: Regenerate.
* config.in: Regenerate.
2018-01-26 Julia Koval <julia.koval@intel.com>
* config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
_mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
_mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
_mm_mask_bitshuffle_epi64_mask): Fix type.
* config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
USI_FTYPE_V4DI_V4DI_USI): Remove.
* config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
__builtin_ia32_vpshufbitqmb256_mask,
__builtin_ia32_vpshufbitqmb128_mask): Fix types.
* config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
* config/i386/sse.md (VI1_AVX512VLBW): Change types.
2018-01-26 Alan Modra <amodra@gmail.com>
PR target/84033
* config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
UNSPEC_VBPERMQ. Sort other unspecs.
2018-01-25 David Edelsohn <dje.gcc@gmail.com>
* doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
2018-01-25 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83055
* predict.c (drop_profile): Do not push/pop cfun; update also
node->count.
(handle_missing_profiles): Fix logic looking for zero profiles.
2018-01-25 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83977
* ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
on functions with #pragma omp declare simd or functions with simd
attribute.
* omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
Remove trailing \n from warning_at calls.
2018-01-25 Tom de Vries <tom@codesourcery.com>
PR target/84028
* config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
for neutered workers.
2018-01-24 Joseph Myers <joseph@codesourcery.com>
PR target/68467
* config/m68k/m68k.c (m68k_promote_function_mode): New function.
(TARGET_PROMOTE_FUNCTION_MODE): New macro.
2018-01-24 Jeff Law <law@redhat.com>
PR target/83994
* i386.c (get_probe_interval): Move to earlier point.
(ix86_compute_frame_layout): If -fstack-clash-protection and
the frame is larger than the probe interval, then use pushes
to save registers rather than reg->mem moves.
(ix86_expand_prologue): Remove conditional for int_registers_saved
assertion.
2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
PR target/84014
* ira-build.c (setup_min_max_allocno_live_range_point): Set up
min/max for never referenced object.
2018-01-24 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83977
* tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
here.
* omp-low.c (create_omp_child_function): Remove "omp declare simd"
attributes from DECL_ATTRIBUTES (decl) without affecting
DECL_ATTRIBUTES (current_function_decl).
* omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
functions with non-NULL DECL_ABSTRACT_ORIGIN.
2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83979
* fold-const.c (fold_comparison): Use constant_boolean_node
instead of boolean_{true,false}_node.
2018-01-24 Jan Hubicka <hubicka@ucw.cz>
* ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
with zero counts.
2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
Simplify the clause that sets the length attribute.
(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
(*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
clause that sets the length attribute.
(*sibcall_value_nonlocal_sysv<mode>): Likewise.
2018-01-24 Tom de Vries <tom@codesourcery.com>
PR target/83589
* config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
(nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
Add strict parameter.
(prevent_branch_around_nothing): Insert dummy insn between branch to
label and label with no ptx insn inbetween.
* config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
2018-01-24 Tom de Vries <tom@codesourcery.com>
PR target/81352
* config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
for neutered threads in warp.
* config/nvptx/nvptx.md (define_insn "exit"): New insn.
2018-01-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/83176
* tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
operands.
2018-01-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/82819
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
code generating pluses that are no-ops in the target precision.
2018-01-24 Richard Biener <rguenther@suse.de>
PR middle-end/84000
* tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
2018-01-23 Jan Hubicka <hubicka@ucw.cz>
* cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
to merge probabilities.
* predict.c (probably_never_executed): Also mark as cold functions
with global 0 profile and guessed local profile.
* profile-count.c (profile_probability::combine_with_count): New
member function.
* profile-count.h (profile_probability::operator*,
profile_probability::operator*=, profile_probability::operator/,
profile_probability::operator/=): Reduce precision to adjusted
and set value to guessed on contradictory divisions.
(profile_probability::combine_with_freq): Remove.
(profile_probability::combine_wiht_count): Declare.
(profile_count::force_nonzero):: Set to adjusted.
(profile_count::probability_in):: Set quality to adjusted.
* tree-ssa-tail-merge.c (replace_block_by): Use
combine_with_count.
2018-01-23 Andrew Waterman <andrew@sifive.com>
Jim Wilson <jimw@sifive.com>
* config/riscv/riscv.c (riscv_stack_boundary): New.
(riscv_option_override): Set riscv_stack_boundary. Handle
riscv_preferred_stack_boundary_arg.
* config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
(BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
(STACK_BOUNDARY): Set to riscv_stack_boundary.
(RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
* config/riscv/riscv.opt (mpreferred-stack-boundary): New.
* doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
PR target/83905
* config/i386/i386.c (ix86_expand_prologue): Use cost reference
of struct ix86_frame.
(ix86_expand_epilogue): Likewise. Add a local variable for
the reg_save_offset field in struct ix86_frame.
2018-01-23 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/82604
* tree-loop-distribution.c (enum partition_kind): New enum item
PKIND_PARTIAL_MEMSET.
(partition_builtin_p): Support above new enum item.
(generate_code_for_partition): Ditto.
(compute_access_range): Differentiate cases that equality can be
proven at all loops, the innermost loops or no loops.
(classify_builtin_st, classify_builtin_ldst): Adjust call to above
function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
(finalize_partitions, distribute_loop): Don't fuse partition of
PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
(prepare_perfect_loop_nest): Distribute 3-level loop nest only if
parloop is enabled.
2018-01-23 Martin Liska <mliska@suse.cz>
* predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
order to ignore the predictor.
(PRED_POLYMORPHIC_CALL): Likewise.
(PRED_RECURSIVE_CALL): Likewise.
2018-01-23 Martin Liska <mliska@suse.cz>
* tree-profile.c (tree_profiling): Print function header to
aware reader which function we are working on.
* value-prof.c (gimple_find_values_to_profile): Do not print
not interesting value histograms.
2018-01-23 Martin Liska <mliska@suse.cz>
* profile-count.h (enum profile_quality): Add
profile_uninitialized as the first value. Do not number values
as they are zero based.
(profile_count::verify): Update sanity check.
(profile_probability::verify): Likewise.
2018-01-23 Nathan Sidwell <nathan@acm.org>
* doc/invoke.texi (ffor-scope): Deprecate.
2018-01-23 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/83510
* domwalk.c (set_all_edges_as_executable): New function.
(dom_walker::dom_walker): Convert bool param
"skip_unreachable_blocks" to enum reachability. Move setup of
edge flags to set_all_edges_as_executable and only do it when
reachability is REACHABLE_BLOCKS.
* domwalk.h (enum dom_walker::reachability): New enum.
(dom_walker::dom_walker): Convert bool param
"skip_unreachable_blocks" to enum reachability.
(set_all_edges_as_executable): New decl.
* graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
from false for "skip_unreachable_blocks" to ALL_BLOCKS for
"reachability".
* tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
but converting true to REACHABLE_BLOCKS.
* tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
* tree-vrp.c
(check_array_bounds_dom_walker::check_array_bounds_dom_walker):
Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
(vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
REACHABLE_BLOCKS.
(vrp_prop::vrp_finalize): Call set_all_edges_as_executable
if check_all_array_refs will be called.
2018-01-23 David Malcolm <dmalcolm@redhat.com>
* tree.c (selftest::test_location_wrappers): Add more test
coverage.
2018-01-23 David Malcolm <dmalcolm@redhat.com>
* sbitmap.c (selftest::test_set_range): Fix memory leaks.
(selftest::test_bit_in_range): Likewise.
2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
PR testsuite/83888
* doc/sourcebuild.texi (vect_float): Say that the selector
only describes the situation when -funsafe-math-optimizations is on.
(vect_float_strict): Document.
2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83965
* tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
(vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
instead of checking only for a reduction.
(vect_recog_widen_sum_pattern): Likewise.
2018-01-23 Jan Hubicka <hubicka@ucw.cz>
* predict.c (probably_never_executed): Only use precise profile info.
(compute_function_frequency): Skip after inlining hack since we now
have quality checking.
2018-01-23 Jan Hubicka <hubicka@ucw.cz>
* profile-count.h (profile_probability::very_unlikely,
profile_probability::unlikely, profile_probability::even): Set
precision to guessed.
2018-01-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/83963
* graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
Properly terminate dominator walk when crossing the exit edge not
when visiting its source block.
2018-01-23 Jakub Jelinek <jakub@redhat.com>
PR c++/83918
* tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
VIEW_CONVERT_EXPR to wrap CONST_DECLs.
2018-01-22 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/83957
* omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
semicolon after for body surrounded by braces.
PR tree-optimization/83081
* profile-count.h (profile_probability::split): New method.
* dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
Use profile_probability::split.
(do_compare_rtx_and_jump): Fix adjustment of probabilities
when splitting a single conditional jump into 2.
2018-01-22 David Malcolm <dmalcolm@redhat.com>
PR tree-optimization/69452
* tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
decl.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78-expand.md (bswaphi2): New define_expand.
* config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
* config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78-protos.h (rl78_split_movdi): New function
declaration.
* config/rl78/rl78.md (movdi): New define_expand.
* config/rl78/rl78.c (rl78_split_movdi): New function.
2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/83862
* config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
no longer used.
* config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
* config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
128-bit to produce an UNSPEC move to get the double word with the
signbit and then a shift directly to do signbit.
(signbit<mode>2_dm): Replace old IEEE 128-bit signbit
implementation with a new version that just does either a direct
move or a regular move. Move memory interface to separate insns.
Move insns so they are next to the expander.
(signbit<mode>2_dm_mem_be): New combiner insns to combine load
with signbit move. Split big and little endian case.
(signbit<mode>2_dm_mem_le): Likewise.
(signbit<mode>2_dm_<su>ext): Delete, no longer used.
(signbit<mode>2_dm2): Likewise.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.md (anddi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.md (umindi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.md (smindi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.md (smaxdi3): New define_expand.
2018-01-22 Carl Love <cel@us.ibm.com>
* config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
LVX_V1TI): Add macro expansion.
* config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
* config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
Change check to determine if the instruction is a byte reversing
entry. Fix typo in comment.
* config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
Add def_builtin calls for new builtins.
* config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
Add define_insn expansion.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.md (umaxdi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
* config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
for non-QImode registers.
2018-01-22 Richard Biener <rguenther@suse.de>
PR tree-optimization/83963
* graphite-scop-detection.c (scop_detection::get_sese): Delay
including the loop exit block.
(scop_detection::merge_sese): Likewise.
(scop_detection::add_scop): Do it here instead.
2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* doc/sourcebuild.texi (arm_softfloat): Document.
2018-01-21 John David Anglin <danglin@gcc.gnu.org>
PR gcc/77734
* config/pa/pa.c (pa_function_ok_for_sibcall): Use
targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
David Edelsohn <dje.gcc@gmail.com>
PR target/83946
* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
Change "crset eq" to "crset 2".
(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
(*call_indirect_aix<mode>_nospec): Likewise.
(*call_value_indirect_aix<mode>_nospec): Likewise.
(*call_indirect_elfv2<mode>_nospec): Likewise.
(*call_value_indirect_elfv2<mode>_nospec): Likewise.
(*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
change assembly output from . to $.
(*sibcall_value_nonlocal_sysv<mode>): Likewise.
(indirect_jump<mode>_nospec): Change assembly output from . to $.
(*tablejump<mode>_internal1_nospec): Likewise.
2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
PR target/80870
* config/sh/sh_optimize_sett_clrt.cc:
Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83940
* tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
offset_dt to vect_constant_def rather than vect_unknown_def_type.
(vect_check_load_store_mask): Add a mask_dt_out parameter and
use it to pass back the definition type.
(vect_check_store_rhs): Likewise rhs_dt_out.
(vect_build_gather_load_calls): Add a mask_dt argument and use
it instead of a call to vect_is_simple_use.
(vectorizable_store): Update calls to vect_check_load_store_mask
and vect_check_store_rhs. Use the dt returned by the latter instead
of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
instead of calls to vect_is_simple_use. Pass the scalar rather
than the vector operand to vect_is_simple_use when handling
second and subsequent copies of an rhs value.
(vectorizable_load): Update calls to vect_check_load_store_mask
and vect_build_gather_load_calls. Use the cached mask_dt and
gs_info.offset_dt instead of calls to vect_is_simple_use.
2018-01-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83945
* tree-emutls.c: Include gimplify.h.
(lower_emutls_2): New function.
(lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
it before further processing.
PR target/83930
* simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
UINTVAL (trueop1) instead of INTVAL (op1).
2018-01-19 Jakub Jelinek <jakub@redhat.com>
PR debug/81570
PR debug/83728
* dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
INCOMING_FRAME_SP_OFFSET if not defined.
(scan_trace): Add ENTRY argument. If true and
DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
emit a note to adjust the CFA offset.
(create_cfi_notes): Adjust scan_trace callers.
(create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
INCOMING_FRAME_SP_OFFSET in the CIE.
* config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
* config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
Likewise.
* doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
* doc/tm.texi: Regenerated.
2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR rtl-optimization/83147
* lra-constraints.c (remove_inheritance_pseudos): Use
lra_substitute_pseudo_within_insn.
2018-01-19 Tom de Vries <tom@codesourcery.com>
Cesar Philippidis <cesar@codesourcery.com>
PR target/83920
* config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
PR target/83790
* config/nvptx/nvptx.c (output_init_frag): Don't use generic address
spaces for function labels.
2018-01-19 Martin Liska <mliska@suse.cz>
* predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
(PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
(PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
(PRED_OPCODE_POSITIVE): Change from 64 to 59.
(PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
(PRED_CONST_RETURN): Change from 69 to 65.
(PRED_NULL_RETURN): Change from 91 to 71.
(PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
(PRED_LOOP_GUARD): Change from 66 to 73.
2018-01-19 Martin Liska <mliska@suse.cz>
* predict.c (predict_insn_def): Add new assert.
(struct branch_predictor): Change type to signed integer.
(test_prediction_value_range): Amend test to cover
PROB_UNINITIALIZED.
* predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
(PRED_LOOP_ITERATIONS_GUESSED): Likewise.
(PRED_LOOP_ITERATIONS_MAX): Likewise.
(PRED_LOOP_IV_COMPARE): Likewise.
* predict.h (PROB_UNINITIALIZED): Define new constant.
2018-01-19 Martin Liska <mliska@suse.cz>
* predict.c (dump_prediction): Add new format for
analyze_brprob.py script which is enabled with -details
suboption.
* profile-count.h (precise_p): New function.
2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83922
* tree-vect-loop.c (vect_verify_full_masking): Return false if
there are no statements that need masking.
(vect_active_double_reduction_p): New function.
(vect_analyze_loop_operations): Use it when handling phis that
are not in the loop header.
2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83914
* tree-vect-loop.c (vectorizable_induction): Don't convert
init_expr or apply the peeling adjustment for inductions
that are nested within the vectorized loop.
2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
instead of NEG.
2018-01-18 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81715
PR testsuite/83882
* function.h (gimplify_parameters): Add gimple_seq * argument.
* function.c: Include gimple.h and options.h.
(gimplify_parameters): Add cleanup argument, add CLOBBER stmts
for the added local temporaries if needed.
* gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
if there are any parameter cleanups, wrap whole body into a
try/finally with the cleanups.
2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
PR target/82964
* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
Use GET_MODE_CLASS for scalar floating point.
2018-01-18 Jan Hubicka <hubicka@ucw.cz>
PR ipa/82256
patch by PaX Team
* cgraphclones.c (cgraph_node::create_version_clone_with_body):
Fix call of call_cgraph_insertion_hooks.
2018-01-18 Martin Sebor <msebor@redhat.com>
* doc/invoke.texi (-Wclass-memaccess): Tweak text.
2018-01-18 Jan Hubicka <hubicka@ucw.cz>
PR ipa/83619
* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
frequencies.
2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
PR other/70268
* common.opt: (-ffile-prefix-map): New option.
* opts.c (common_handle_option): Defer it.
* opts-global.c (handle_common_deferred_options): Handle it.
* debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
* file-prefix-map.h: New file.
(remap_debug_filename, add_debug_prefix_map): ...here.
(add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
* final.c (debug_prefix_map, add_debug_prefix_map
remap_debug_filename): Move to...
* file-prefix-map.c: New file.
(file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
generalize, get rid of alloca(), use strrchr() instead of strchr().
(add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
Implement in terms of add_prefix_map().
(remap_macro_filename, remap_debug_filename): Implement in term of
remap_filename().
* Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
* builtins.c (fold_builtin_FILE): Call remap_macro_filename().
* dbxout.c: Include file-prefix-map.h.
* varasm.c: Likewise.
* vmsdbgout.c: Likewise.
* xcoffout.c: Likewise.
* dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
* doc/cppopts.texi (-fmacro-prefix-map): Document.
* doc/invoke.texi (-ffile-prefix-map): Document.
(-fdebug-prefix-map): Update description.
2018-01-18 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (indirect_thunk_name): Document that also
lfence is emitted.
(output_indirect_thunk): Document why both instructions
(pause and lfence) are generated.
2018-01-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/83887
* graphite-scop-detection.c
(scop_detection::get_nearest_dom_with_single_entry): Remove.
(scop_detection::get_nearest_pdom_with_single_exit): Likewise.
(scop_detection::merge_sese): Re-implement with a flood-fill
algorithm that properly finds a SESE region if it exists.
2018-01-18 Jakub Jelinek <jakub@redhat.com>
PR c/61240
* match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
pointer_diff optimizations use view_convert instead of convert.
2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
Generate different code for -mno-speculate-indirect-jumps.
(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
(*call_indirect_aix<mode>): Disable for
-mno-speculate-indirect-jumps.
(*call_indirect_aix<mode>_nospec): New define_insn.
(*call_value_indirect_aix<mode>): Disable for
-mno-speculate-indirect-jumps.
(*call_value_indirect_aix<mode>_nospec): New define_insn.
(*sibcall_nonlocal_sysv<mode>): Generate different code for
-mno-speculate-indirect-jumps.
(*sibcall_value_nonlocal_sysv<mode>): Likewise.
2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
long double type, set the flags for noting the default long double
type, even if we don't pass or return a long double type.
2018-01-17 Jan Hubicka <hubicka@ucw.cz>
PR ipa/83051
* ipa-inline.c (flatten_function): Do not overwrite final inlining
failure.
2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
support for merge[hl].
(fold_mergehl_helper): New helper function.
(tree-vector-builder.h): New #include for tree_vector_builder usage.
* config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
(altivec_vmrglw_direct): Add xxmrglw insn.
2018-01-17 Andrew Waterman <andrew@sifive.com>
* config/riscv/riscv.c (riscv_conditional_register_usage): If
UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
2018-01-17 David Malcolm <dmalcolm@redhat.com>
PR lto/83121
* ipa-devirt.c (add_type_duplicate): When comparing memory layout,
call the lto_location_cache before reading the
DECL_SOURCE_LOCATION of the types.
2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
* config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
(aarch64_legitimate_constant_p): Just support CONST_DOUBLE
SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
* config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
Add declaration.
* config/aarch64/constraints.md (aarch64_movti_operand):
Limit immediates.
* config/aarch64/predicates.md (Uti): Add new constraint.
2018-01-17 Carl Love <cel@us.ibm.com>
* config/rs6000/vsx.md (define_expand xl_len_r,
define_expand stxvl, define_expand *stxvl): Add match_dup argument.
(define_insn): Add, match_dup 1 argument to define_insn stxvll and
lxvll.
(define_expand, define_insn): Move the shift left from the
define_insn to the define_expand for lxvl and stxvl instructions.
* config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
and XL_LEN_R definitions to PURE.
2018-01-17 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (indirect_thunk_name): Declare regno
as unsigned int. Compare regno with INVALID_REGNUM.
(output_indirect_thunk): Ditto.
(output_indirect_thunk_function): Ditto.
(ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
in the call to output_indirect_thunk_function.
2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
PR middle-end/83884
* expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
rather than the size of inner_type to determine the stack slot size
when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
PR target/83546
* config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
to PTA_SILVERMONT.
2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
* config.gcc (powerpc*-linux*-*): Add support for 64-bit little
endian Linux systems to optionally enable multilibs for selecting
the long double type if the user configured an explicit type.
* config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
have no long double multilibs if not defined.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
warn if the user used -mabi={ieee,ibm}longdouble and we built
multilibs for long double.
* config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
appropriate multilib option.
(MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
multilib options.
* config/rs6000/t-ldouble-linux64le-ibm: New configuration files
for building long double multilibs.
* config/rs6000/t-ldouble-linux64le-ieee: Likewise.
2018-01-16 John David Anglin <danglin@gcc.gnu.org>
* config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
copies.
* config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
64 bits.
* config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
128 bits.
* config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
variables.
* config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
return value.
2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
different rtl trees depending on TARGET_64BIT.
(rs6000_gen_lvx): Likewise.
2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
* config/visium/visium.md (nop): Tweak comment.
(hazard_nop): Likewise.
2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
-mspeculate-indirect-jumps.
* config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
for -mno-speculate-indirect-jumps.
(*call_indirect_elfv2<mode>_nospec): New define_insn.
(*call_value_indirect_elfv2<mode>): Disable for
-mno-speculate-indirect-jumps.
(*call_value_indirect_elfv2<mode>_nospec): New define_insn.
(indirect_jump): Emit different RTL for
-mno-speculate-indirect-jumps.
(*indirect_jump<mode>): Disable for
-mno-speculate-indirect-jumps.
(*indirect_jump<mode>_nospec): New define_insn.
(tablejump): Emit different RTL for
-mno-speculate-indirect-jumps.
(tablejumpsi): Disable for -mno-speculate-indirect-jumps.
(tablejumpsi_nospec): New define_expand.
(tablejumpdi): Disable for -mno-speculate-indirect-jumps.
(tablejumpdi_nospec): New define_expand.
(*tablejump<mode>_internal1): Disable for
-mno-speculate-indirect-jumps.
(*tablejump<mode>_internal1_nospec): New define_insn.
* config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
option.
2018-01-16 Artyom Skrobov tyomitch@gmail.com
* caller-save.c (insert_save): Drop unnecessary parameter. All
callers updated.
2018-01-16 Jakub Jelinek <jakub@redhat.com>
Richard Biener <rguenth@suse.de>
PR libgomp/83590
* gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
return early, inline manually is_gimple_sizepos. Make sure if we
call gimplify_expr we don't end up with a gimple constant.
* tree.c (variably_modified_type_p): Don't return true for
is_gimple_constant (_t). Inline manually is_gimple_sizepos.
* gimplify.h (is_gimple_sizepos): Remove.
2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83857
* tree-vect-loop.c (vect_analyze_loop_operations): Don't call
vectorizable_live_operation for pure SLP statements.
(vectorizable_live_operation): Handle PHIs.
2018-01-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/83867
* tree-vect-stmts.c (vect_transform_stmt): Precompute
nested_in_vect_loop_p since the scalar stmt may get invalidated.
2018-01-16 Jakub Jelinek <jakub@redhat.com>
PR c/83844
* stor-layout.c (handle_warn_if_not_align): Use byte_position and
multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
If off is not INTEGER_CST, issue a may not be aligned warning
rather than isn't aligned. Use isn%'t rather than isn't.
* fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
into MULT_EXPR.
<case MULT_EXPR>: Improve the case when bottom and one of the
MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
operand, in that case check if the other operand is multiple of
bottom divided by the INTEGER_CST operand.
2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
PR target/83858
* config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
* config/pa/pa-protos.h (pa_function_arg_size): Declare.
* config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
pa_function_arg_size instead of FUNCTION_ARG_SIZE.
* config/pa/pa.c (pa_function_arg_advance): Likewise.
(pa_function_arg, pa_arg_partial_bytes): Likewise.
(pa_function_arg_size): New function.
2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
* fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
in a separate statement.
2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83847
* tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
group gathers and scatters.
2018-01-16 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/86620
* params.def (max-sched-ready-insns): Bump minimum value to 1.
PR rtl-optimization/83213
* recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
to last if both are JUMP_INSNs.
PR tree-optimization/83843
* gimple-ssa-store-merging.c
(imm_store_chain_info::output_merged_store): Handle bit_not_p on
store_immediate_info for bswap/nop orig_stores.
2018-01-15 Andrew Waterman <andrew@sifive.com>
* config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
!TARGET_MUL.
<UDIV>: Increase cost if !TARGET_DIV.
2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
(define_attr "cr_logical_3op"): New.
(cceq_ior_compare): Adjust.
(cceq_ior_compare_complement): Adjust.
(*cceq_rev_compare): Adjust.
* config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
(is_cracked_insn): Adjust.
(insn_must_be_first_in_group): Adjust.
* config/rs6000/40x.md: Adjust.
* config/rs6000/440.md: Adjust.
* config/rs6000/476.md: Adjust.
* config/rs6000/601.md: Adjust.
* config/rs6000/603.md: Adjust.
* config/rs6000/6xx.md: Adjust.
* config/rs6000/7450.md: Adjust.
* config/rs6000/7xx.md: Adjust.
* config/rs6000/8540.md: Adjust.
* config/rs6000/cell.md: Adjust.
* config/rs6000/e300c2c3.md: Adjust.
* config/rs6000/e500mc.md: Adjust.
* config/rs6000/e500mc64.md: Adjust.
* config/rs6000/e5500.md: Adjust.
* config/rs6000/e6500.md: Adjust.
* config/rs6000/mpc.md: Adjust.
* config/rs6000/power4.md: Adjust.
* config/rs6000/power5.md: Adjust.
* config/rs6000/power6.md: Adjust.
* config/rs6000/power7.md: Adjust.
* config/rs6000/power8.md: Adjust.
* config/rs6000/power9.md: Adjust.
* config/rs6000/rs64.md: Adjust.
* config/rs6000/titan.md: Adjust.
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/predicates.md (indirect_branch_operand): Rewrite
ix86_indirect_branch_register logic.
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/constraints.md (Bs): Update
ix86_indirect_branch_register check. Don't check
ix86_indirect_branch_register with GOT_memory_operand.
(Bw): Likewise.
* config/i386/predicates.md (GOT_memory_operand): Don't check
ix86_indirect_branch_register here.
(GOT32_symbol_operand): Likewise.
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/predicates.md (constant_call_address_operand):
Rewrite ix86_indirect_branch_register logic.
(sibcall_insn_operand): Likewise.
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/constraints.md (Bs): Replace
ix86_indirect_branch_thunk_register with
ix86_indirect_branch_register.
(Bw): Likewise.
* config/i386/i386.md (indirect_jump): Likewise.
(tablejump): Likewise.
(*sibcall_memory): Likewise.
(*sibcall_value_memory): Likewise.
Peepholes of indirect call and jump via memory: Likewise.
* config/i386/i386.opt: Likewise.
* config/i386/predicates.md (indirect_branch_operand): Likewise.
(GOT_memory_operand): Likewise.
(call_insn_operand): Likewise.
(sibcall_insn_operand): Likewise.
(GOT32_symbol_operand): Likewise.
2018-01-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/83837
* omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
type rather than type addr's type points to.
(expand_omp_atomic_mutex): Likewise.
(expand_omp_atomic): Likewise.
2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
PR target/83839
* config/i386/i386.c (output_indirect_thunk_function): Use
ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
for __x86_return_thunk.
2018-01-15 Richard Biener <rguenther@suse.de>
PR middle-end/83850
* expmed.c (extract_bit_field_1): Fix typo.
2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/83687
* config/arm/iterators.md (VF): New mode iterator.
* config/arm/neon.md (neon_vabd<mode>_2): Use the above.
Remove integer-related logic from pattern.
(neon_vabd<mode>_3): Likewise.
2018-01-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/82694
* common.opt (fstrict-overflow): No longer an alias.
(fwrapv-pointer): New option.
* tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
also for pointer types based on flag_wrapv_pointer.
* opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
opts->x_flag_wrapv got set.
* fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
POINTER_TYPE_OVERFLOW_UNDEFINED.
* match.pd: Likewise in address comparison pattern.
* doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
2018-01-15 Richard Biener <rguenther@suse.de>
PR lto/83804
* tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
Reset type names to their identifier if their TYPE_DECL doesn't
have linkage (and thus is used for ODR and devirt).
(save_debug_info_for_decl): Remove.
(save_debug_info_for_type): Likewise.
(add_tree_to_fld_list): Adjust.
* tree-pretty-print.c (dump_generic_node): Make dumping of
type names more robust.
2018-01-15 Richard Biener <rguenther@suse.de>
* BASE-VER: Bump to 8.0.1.
2018-01-14 Martin Sebor <msebor@redhat.com>
PR other/83508
* builtins.c (check_access): Avoid warning when the no-warning bit
is set.
2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
* tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
* ira-color (allocno_hard_regs_compare): Likewise.
2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
PR target/83013
* config/microblaze/microblaze.c (microblaze_asm_output_ident):
Use .pushsection/.popsection.
2018-01-14 Martin Sebor <msebor@redhat.com>
PR c++/81327
* doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
2018-01-14 Jakub Jelinek <jakub@redhat.com>
* config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
entry from extra_headers.
(x86_64-*-*): Remove two duplicate gfniintrin.h entries from
extra_headers, make the list bitwise identical to the i?86-*-* one.
2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
-mcmodel=large with -mindirect-branch=thunk,
-mindirect-branch=thunk-extern, -mfunction-return=thunk and
-mfunction-return=thunk-extern.
* doc/invoke.texi: Document -mcmodel=large is incompatible with
-mindirect-branch=thunk, -mindirect-branch=thunk-extern,
-mfunction-return=thunk and -mfunction-return=thunk-extern.
2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.c (print_reg): Print the name of the full
integer register without '%'.
(ix86_print_operand): Handle 'V'.
* doc/extend.texi: Document 'V' modifier.
2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/constraints.md (Bs): Disallow memory operand for
-mindirect-branch-register.
(Bw): Likewise.
* config/i386/predicates.md (indirect_branch_operand): Likewise.
(GOT_memory_operand): Likewise.
(call_insn_operand): Likewise.
(sibcall_insn_operand): Likewise.
(GOT32_symbol_operand): Likewise.
* config/i386/i386.md (indirect_jump): Call convert_memory_address
for -mindirect-branch-register.
(tablejump): Likewise.
(*sibcall_memory): Likewise.
(*sibcall_value_memory): Likewise.
Disallow peepholes of indirect call and jump via memory for
-mindirect-branch-register.
(*call_pop): Replace m with Bw.
(*call_value_pop): Likewise.
(*sibcall_pop_memory): Replace m with Bs.
* config/i386/i386.opt (mindirect-branch-register): New option.
* doc/invoke.texi: Document -mindirect-branch-register option.
2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386-protos.h (ix86_output_function_return): New.
* config/i386/i386.c (ix86_set_indirect_branch_type): Also
set function_return_type.
(indirect_thunk_name): Add ret_p to indicate thunk for function
return.
(output_indirect_thunk_function): Pass false to
indirect_thunk_name.
(ix86_output_indirect_branch_via_reg): Likewise.
(ix86_output_indirect_branch_via_push): Likewise.
(output_indirect_thunk_function): Create alias for function
return thunk if regno < 0.
(ix86_output_function_return): New function.
(ix86_handle_fndecl_attribute): Handle function_return.
(ix86_attribute_table): Add function_return.
* config/i386/i386.h (machine_function): Add
function_return_type.
* config/i386/i386.md (simple_return_internal): Use
ix86_output_function_return.
(simple_return_internal_long): Likewise.
* config/i386/i386.opt (mfunction-return=): New option.
(indirect_branch): Mention -mfunction-return=.
* doc/extend.texi: Document function_return function attribute.
* doc/invoke.texi: Document -mfunction-return= option.
2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386-opts.h (indirect_branch): New.
* config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
* config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
with local indirect jump when converting indirect call and jump.
(ix86_set_indirect_branch_type): New.
(ix86_set_current_function): Call ix86_set_indirect_branch_type.
(indirectlabelno): New.
(indirect_thunk_needed): Likewise.
(indirect_thunk_bnd_needed): Likewise.
(indirect_thunks_used): Likewise.
(indirect_thunks_bnd_used): Likewise.
(INDIRECT_LABEL): Likewise.
(indirect_thunk_name): Likewise.
(output_indirect_thunk): Likewise.
(output_indirect_thunk_function): Likewise.
(ix86_output_indirect_branch_via_reg): Likewise.
(ix86_output_indirect_branch_via_push): Likewise.
(ix86_output_indirect_branch): Likewise.
(ix86_output_indirect_jmp): Likewise.
(ix86_code_end): Call output_indirect_thunk_function if needed.
(ix86_output_call_insn): Call ix86_output_indirect_branch if
needed.
(ix86_handle_fndecl_attribute): Handle indirect_branch.
(ix86_attribute_table): Add indirect_branch.
* config/i386/i386.h (machine_function): Add indirect_branch_type
and has_local_indirect_jump.
* config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
to true.
(tablejump): Likewise.
(*indirect_jump): Use ix86_output_indirect_jmp.
(*tablejump_1): Likewise.
(simple_return_indirect_internal): Likewise.
* config/i386/i386.opt (mindirect-branch=): New option.
(indirect_branch): New.
(keep): Likewise.
(thunk): Likewise.
(thunk-inline): Likewise.
(thunk-extern): Likewise.
* doc/extend.texi: Document indirect_branch function attribute.
* doc/invoke.texi: Document -mindirect-branch= option.
2018-01-14 Jan Hubicka <hubicka@ucw.cz>
PR ipa/83051
* ipa-inline.c (edge_badness): Tolerate roundoff errors.
2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
* ipa-inline.c (want_inline_small_function_p): Return false if
inlining has already failed with CIF_FINAL_ERROR.
(update_caller_keys): Call want_inline_small_function_p before
can_inline_edge_p.
(update_callee_keys): Likewise.
2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
* config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
New function.
(rs6000_quadword_masked_address_p): Likewise.
(quad_aligned_load_p): Likewise.
(quad_aligned_store_p): Likewise.
(const_load_sequence_p): Add comment to describe the outer-most loop.
(mimic_memory_attributes_and_flags): New function.
(rs6000_gen_stvx): Likewise.
(replace_swapped_aligned_store): Likewise.
(rs6000_gen_lvx): Likewise.
(replace_swapped_aligned_load): Likewise.
(replace_swapped_load_constant): Capitalize argument name in
comment describing this function.
(rs6000_analyze_swaps): Add a third pass to search for vector loads
and stores that access quad-word aligned addresses and replace
with stvx or lvx instructions when appropriate.
* config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
New function prototype.
(rs6000_quadword_masked_address_p): Likewise.
(rs6000_gen_lvx): Likewise.
(rs6000_gen_stvx): Likewise.
* config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
VSX_D (V2DF, V2DI), modify this split to select lvx instruction
when memory address is aligned.
(*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
this split to select lvx instruction when memory address is aligned.
(*vsx_le_perm_load_v8hi): Modify this split to select lvx
instruction when memory address is aligned.
(*vsx_le_perm_load_v16qi): Likewise.
(four unnamed splitters): Modify to select the stvx instruction
when memory is aligned.
2018-01-13 Jan Hubicka <hubicka@ucw.cz>
* predict.c (determine_unlikely_bbs): Handle correctly BBs
which appears in the queue multiple times.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vectorizer.h (vec_lower_bound): New structure.
(_loop_vec_info): Add check_nonzero and lower_bounds.
(LOOP_VINFO_CHECK_NONZERO): New macro.
(LOOP_VINFO_LOWER_BOUNDS): Likewise.
(LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
* tree-data-ref.h (dr_with_seg_len): Add access_size and align
fields. Make seg_len the distance travelled, not including the
access size.
(dr_direction_indicator): Declare.
(dr_zero_step_indicator): Likewise.
(dr_known_forward_stride_p): Likewise.
* tree-data-ref.c: Include stringpool.h, tree-vrp.h and
tree-ssanames.h.
(runtime_alias_check_p): Allow runtime alias checks with
variable strides.
(operator ==): Compare access_size and align.
(prune_runtime_alias_test_list): Rework for new distinction between
the access_size and seg_len.
(create_intersect_range_checks_index): Likewise. Cope with polynomial
segment lengths.
(get_segment_min_max): New function.
(create_intersect_range_checks): Use it.
(dr_step_indicator): New function.
(dr_direction_indicator): Likewise.
(dr_zero_step_indicator): Likewise.
(dr_known_forward_stride_p): Likewise.
* tree-loop-distribution.c (data_ref_segment_size): Return
DR_STEP * (niters - 1).
(compute_alias_check_pairs): Update call to the dr_with_seg_len
constructor.
* tree-vect-data-refs.c (vect_check_nonzero_value): New function.
(vect_preserves_scalar_order_p): New function, split out from...
(vect_analyze_data_ref_dependence): ...here. Check for zero steps.
(vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
(vect_vfa_access_size): New function.
(vect_vfa_align): Likewise.
(vect_compile_time_alias): Take access_size_a and access_b arguments.
(dump_lower_bound): New function.
(vect_check_lower_bound): Likewise.
(vect_small_gap_p): Likewise.
(vectorizable_with_step_bound_p): Likewise.
(vect_prune_runtime_alias_test_list): Ignore cross-iteration
depencies if the vectorization factor is 1. Convert the checks
for nonzero steps into checks on the bounds of DR_STEP. Try using
a bunds check for variable steps if the minimum required step is
relatively small. Update calls to the dr_with_seg_len
constructor and to vect_compile_time_alias.
* tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
function.
(vect_loop_versioning): Call it.
* tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
when retrying.
(vect_estimate_min_profitable_iters): Account for any bounds checks.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/sourcebuild.texi (vect_scatter_store): Document.
* optabs.def (scatter_store_optab, mask_scatter_store_optab): New
optabs.
* doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
Document.
* genopinit.c (main): Add supports_vec_scatter_store and
supports_vec_scatter_store_cached to target_optabs.
* gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
IFN_MASK_SCATTER_STORE.
* internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
functions.
* internal-fn.h (internal_store_fn_p): Declare.
(internal_fn_stored_value_index): Likewise.
* internal-fn.c (scatter_store_direct): New macro.
(expand_scatter_store_optab_fn): New function.
(direct_scatter_store_optab_supported_p): New macro.
(internal_store_fn_p): New function.
(internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
IFN_MASK_SCATTER_STORE.
(internal_fn_mask_index): Likewise.
(internal_fn_stored_value_index): New function.
(internal_gather_scatter_fn_supported_p): Adjust operand numbers
for scatter stores.
* optabs-query.h (supports_vec_scatter_store_p): Declare.
* optabs-query.c (supports_vec_scatter_store_p): New function.
* tree-vectorizer.h (vect_get_store_rhs): Declare.
* tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
true for scatter stores.
(vect_gather_scatter_fn_p): Handle scatter stores too.
(vect_check_gather_scatter): Consider using scatter stores if
supports_vec_scatter_store_p.
* tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
scatter stores too.
* tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
internal_fn_stored_value_index.
(check_load_store_masking): Handle scatter stores too.
(vect_get_store_rhs): Make public.
(vectorizable_call): Use internal_store_fn_p.
(vectorizable_store): Handle scatter store internal functions.
(vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
when deciding whether the end of the group has been reached.
* config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
* config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
(mask_scatter_store<mode>): New insns.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
* tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
* tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
function.
(vect_use_strided_gather_scatters_p): Take a masked_p argument.
Use vect_truncate_gather_scatter_offset if we can't treat the
operation as a normal gather load or scatter store.
(get_group_load_store_type): Take the gather_scatter_info
as argument. Try using a gather load or scatter store for
single-element groups.
(get_load_store_type): Update calls to get_group_load_store_type
and vect_use_strided_gather_scatters_p.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
optional tree argument.
* tree-vect-data-refs.c (vect_check_gather_scatter): Check for
null target hooks.
(vect_create_data_ref_ptr): Take the iv_step as an optional argument,
but continue to use the current value as a fallback.
(bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
to compare the updates.
* tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
(get_load_store_type): Use it when handling a strided access.
(vect_get_strided_load_store_ops): New function.
(vect_get_data_ptr_increment): Likewise.
(vectorizable_load): Handle strided gather loads. Always pass
a step to vect_create_data_ref_ptr and bump_vector_ptr.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/md.texi (gather_load@var{m}): Document.
(mask_gather_load@var{m}): Likewise.
* genopinit.c (main): Add supports_vec_gather_load and
supports_vec_gather_load_cached to target_optabs.
* optabs-tree.c (init_tree_optimization_optabs): Use
ggc_cleared_alloc to allocate target_optabs.
* optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
* internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
functions.
* internal-fn.h (internal_load_fn_p): Declare.
(internal_gather_scatter_fn_p): Likewise.
(internal_fn_mask_index): Likewise.
(internal_gather_scatter_fn_supported_p): Likewise.
* internal-fn.c (gather_load_direct): New macro.
(expand_gather_load_optab_fn): New function.
(direct_gather_load_optab_supported_p): New macro.
(direct_internal_fn_optab): New function.
(internal_load_fn_p): Likewise.
(internal_gather_scatter_fn_p): Likewise.
(internal_fn_mask_index): Likewise.
(internal_gather_scatter_fn_supported_p): Likewise.
* optabs-query.c (supports_at_least_one_mode_p): New function.
(supports_vec_gather_load_p): Likewise.
* optabs-query.h (supports_vec_gather_load_p): Declare.
* tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
and memory_type field.
(NUM_PATTERNS): Bump to 15.
* tree-vect-data-refs.c: Include internal-fn.h.
(vect_gather_scatter_fn_p): New function.
(vect_describe_gather_scatter_call): Likewise.
(vect_check_gather_scatter): Try using internal functions for
gather loads. Recognize existing calls to a gather load function.
(vect_analyze_data_refs): Consider using gather loads if
supports_vec_gather_load_p.
* tree-vect-patterns.c (vect_get_load_store_mask): New function.
(vect_get_gather_scatter_offset_type): Likewise.
(vect_convert_mask_for_vectype): Likewise.
(vect_add_conversion_to_patterm): Likewise.
(vect_try_gather_scatter_pattern): Likewise.
(vect_recog_gather_scatter_pattern): New pattern recognizer.
(vect_vect_recog_func_ptrs): Add it.
* tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
internal_fn_mask_index and internal_gather_scatter_fn_p.
(check_load_store_masking): Take the gather_scatter_info as an
argument and handle gather loads.
(vect_get_gather_scatter_ops): New function.
(vectorizable_call): Check internal_load_fn_p.
(vectorizable_load): Likewise. Handle gather load internal
functions.
(vectorizable_store): Update call to check_load_store_masking.
* config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
* config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
* config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
(aarch64_gather_scale_operand_d): New predicates.
* config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
(mask_gather_load<mode>): New insns.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* optabs.def (fold_left_plus_optab): New optab.
* doc/md.texi (fold_left_plus_@var{m}): Document.
* internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
* internal-fn.c (fold_left_direct): Define.
(expand_fold_left_optab_fn): Likewise.
(direct_fold_left_optab_supported_p): Likewise.
* fold-const-call.c (fold_const_fold_left): New function.
(fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
* tree-parloops.c (valid_reduction_p): New function.
(gather_scalar_reductions): Use it.
* tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
(vect_finish_replace_stmt): Declare.
* tree-vect-loop.c (fold_left_reduction_fn): New function.
(needs_fold_left_reduction_p): New function, split out from...
(vect_is_simple_reduction): ...here. Accept reductions that
forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
(vect_force_simple_reduction): Also store the reduction type in
the assignment's STMT_VINFO_REDUC_TYPE.
(vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
(merge_with_identity): New function.
(vect_expand_fold_left): Likewise.
(vectorize_fold_left_reduction): Likewise.
(vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
scalar phi in place for it. Check for target support and reject
cases that would reassociate the operation. Defer the transform
phase to vectorize_fold_left_reduction.
* config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
* config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
(*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
* tree-if-conv.c (predicate_mem_writes): Remove redundant
call to ifc_temp_var.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* target.def (legitimize_address_displacement): Take the original
offset as a poly_int.
* targhooks.h (default_legitimize_address_displacement): Update
accordingly.
* targhooks.c (default_legitimize_address_displacement): Likewise.
* doc/tm.texi: Regenerate.
* lra-constraints.c (base_plus_disp_to_reg): Take the displacement
as an argument, moving assert of ad->disp == ad->disp_term to...
(process_address_1): ...here. Update calls to base_plus_disp_to_reg.
Try calling targetm.legitimize_address_displacement before expanding
the address rather than afterwards, and adjust for the new interface.
* config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
Match the new hook interface. Handle SVE addresses.
* config/sh/sh.c (sh_legitimize_address_displacement): Make the
new hook interface.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
* Makefile.in (OBJS): Add early-remat.o.
* target.def (select_early_remat_modes): New hook.
* doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
* doc/tm.texi: Regenerate.
* targhooks.h (default_select_early_remat_modes): Declare.
* targhooks.c (default_select_early_remat_modes): New function.
* timevar.def (TV_EARLY_REMAT): New timevar.
* passes.def (pass_early_remat): New pass.
* tree-pass.h (make_pass_early_remat): Declare.
* early-remat.c: New file.
* config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
function.
(TARGET_SELECT_EARLY_REMAT_MODES): Define.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
vfm1 with a bound_epilog parameter.
(vect_do_peeling): Update calls accordingly, and move the prologue
call earlier in the function. Treat the base bound_epilog as 0 for
fully-masked loops and retain vf - 1 for other loops. Add 1 to
this base when peeling for gaps.
* tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
with fully-masked loops.
(vect_estimate_min_profitable_iters): Handle the single peeled
iteration in that case.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
single-element interleaving even if the size is not a power of 2.
* tree-vect-stmts.c (get_load_store_type): Disallow elementwise
accesses for single-element interleaving if the group size is
not a power of 2.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/md.texi (fold_extract_last_@var{m}): Document.
* doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
* optabs.def (fold_extract_last_optab): New optab.
* internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
* internal-fn.c (fold_extract_direct): New macro.
(expand_fold_extract_optab_fn): Likewise.
(direct_fold_extract_optab_supported_p): Likewise.
* tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
* tree-vect-loop.c (vect_model_reduction_cost): Handle
EXTRACT_LAST_REDUCTION.
(get_initial_def_for_reduction): Do not create an initial vector
for EXTRACT_LAST_REDUCTION reductions.
(vectorizable_reduction): Leave the scalar phi in place for
EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
epilogue code for EXTRACT_LAST_REDUCTION and defer the
transform phase to vectorizable_condition.
* tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
split out from...
(vect_finish_stmt_generation): ...here.
(vect_finish_replace_stmt): New function.
(vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
* config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
pattern.
* config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/md.texi (extract_last_@var{m}): Document.
* optabs.def (extract_last_optab): New optab.
* internal-fn.def (EXTRACT_LAST): New internal function.
* internal-fn.c (cond_unary_direct): New macro.
(expand_cond_unary_optab_fn): Likewise.
(direct_cond_unary_optab_supported_p): Likewise.
* tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
loops using EXTRACT_LAST.
* config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
(extract_last_<mode>): ...this optab.
(vec_extract<mode><Vel>): Update accordingly.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* target.def (empty_mask_is_expensive): New hook.
* doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
* doc/tm.texi: Regenerate.
* targhooks.h (default_empty_mask_is_expensive): Declare.
* targhooks.c (default_empty_mask_is_expensive): New function.
* tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
if the target says that empty masks are expensive.
* config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
New function.
(TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
(LOOP_VINFO_MASK_SKIP_NITERS): New macro.
(vect_use_loop_mask_for_alignment_p): New function.
(vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
* tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
niters_skip argument. Make sure that the first niters_skip elements
of the first iteration are inactive.
(vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
Update call to vect_set_loop_masks_directly.
(get_misalign_in_elems): New function, split out from...
(vect_gen_prolog_loop_niters): ...here.
(vect_update_init_of_dr): Take a code argument that specifies whether
the adjustment should be added or subtracted.
(vect_update_init_of_drs): Likewise.
(vect_prepare_for_masked_peels): New function.
(vect_do_peeling): Skip prologue peeling if we're using a mask
instead. Update call to vect_update_inits_of_drs.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
mask_skip_niters.
(vect_analyze_loop_2): Allow fully-masked loops with peeling for
alignment. Do not include the number of peeled iterations in
the minimum threshold in that case.
(vectorizable_induction): Adjust the start value down by
LOOP_VINFO_MASK_SKIP_NITERS iterations.
(vect_transform_loop): Call vect_prepare_for_masked_peels.
Take the number of skipped iterations into account when calculating
the loop bounds.
* tree-vect-stmts.c (vect_gen_while_not): New function.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/sourcebuild.texi (vect_fully_masked): Document.
* params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
default value to 0.
* tree-vect-loop.c (vect_analyze_loop_costing): New function,
split out from...
(vect_analyze_loop_2): ...here. Don't check the vectorization
factor against the number of loop iterations if the loop is
fully-masked.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
(USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
(dump_groups): Update accordingly.
(iv_use::mem_type): New member variable.
(address_p): New function.
(record_use): Add a mem_type argument and initialize the new
mem_type field.
(record_group_use): Add a mem_type argument. Use address_p.
Remove obsolete null checks of base_object. Update call to record_use.
(find_interesting_uses_op): Update call to record_group_use.
(find_interesting_uses_cond): Likewise.
(find_interesting_uses_address): Likewise.
(get_mem_type_for_internal_fn): New function.
(find_address_like_use): Likewise.
(find_interesting_uses_stmt): Try find_address_like_use before
calling find_interesting_uses_op.
(addr_offset_valid_p): Use the iv mem_type field as the type
of the addressed memory.
(add_autoinc_candidates): Likewise.
(get_address_cost): Likewise.
(split_small_address_groups_p): Use address_p.
(split_address_groups): Likewise.
(add_iv_candidate_for_use): Likewise.
(autoinc_possible_for_pair): Likewise.
(rewrite_groups): Likewise.
(get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
(determine_group_iv_cost): Update after split of USE_ADDRESS.
(get_alias_ptr_type_for_ptr_address): New function.
(rewrite_use_address): Rewrite address uses in calls that were
identified by find_address_like_use.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
TARGET_MEM_REFs.
* gimple-expr.h (is_gimple_addressable: Likewise.
* gimple-expr.c (is_gimple_address): Likewise.
* internal-fn.c (expand_call_mem_ref): New function.
(expand_mask_load_optab_fn): Use it.
(expand_mask_store_optab_fn): Likewise.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
(cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
(cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
(cond_umax@var{mode}): Document.
* optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
(cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
(cond_umin_optab, cond_umax_optab): New optabs.
* internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
(COND_IOR, COND_XOR): New internal functions.
* internal-fn.h (get_conditional_internal_fn): Declare.
* internal-fn.c (cond_binary_direct): New macro.
(expand_cond_binary_optab_fn): Likewise.
(direct_cond_binary_optab_supported_p): Likewise.
(get_conditional_internal_fn): New function.
* tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
Cope with reduction statements that are vectorized as calls rather
than assignments.
* config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
* config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
(UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
(UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
(UNSPEC_COND_EOR): New unspecs.
(optab): Add mappings for them.
(SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
(sve_int_op, sve_fp_op): New int attributes.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* optabs.def (while_ult_optab): New optab.
* doc/md.texi (while_ult@var{m}@var{n}): Document.
* internal-fn.def (WHILE_ULT): New internal function.
* internal-fn.h (direct_internal_fn_supported_p): New override
that takes two types as argument.
* internal-fn.c (while_direct): New macro.
(expand_while_optab_fn): New function.
(convert_optab_supported_p): Likewise.
(direct_while_optab_supported_p): New macro.
* wide-int.h (wi::udiv_ceil): New function.
* tree-vectorizer.h (rgroup_masks): New structure.
(vec_loop_masks): New typedef.
(_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
and fully_masked_p.
(LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
(LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
(vect_max_vf): New function.
(slpeel_make_loop_iterate_ntimes): Delete.
(vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
(vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
(vect_record_loop_mask, vect_get_loop_mask): Likewise.
* tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
internal-fn.h, stor-layout.h and optabs-query.h.
(vect_set_loop_mask): New function.
(add_preheader_seq): Likewise.
(add_header_seq): Likewise.
(interleave_supported_p): Likewise.
(vect_maybe_permute_loop_masks): Likewise.
(vect_set_loop_masks_directly): Likewise.
(vect_set_loop_condition_masked): Likewise.
(vect_set_loop_condition_unmasked): New function, split out from
slpeel_make_loop_iterate_ntimes.
(slpeel_make_loop_iterate_ntimes): Rename to..
(vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
(vect_do_peeling): Update call accordingly.
(vect_gen_vector_loop_niters): Use VF as the step for fully-masked
loops.
* tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
mask_compare_type, can_fully_mask_p and fully_masked_p.
(release_vec_loop_masks): New function.
(_loop_vec_info): Use it to free the loop masks.
(can_produce_all_loop_masks_p): New function.
(vect_get_max_nscalars_per_iter): Likewise.
(vect_verify_full_masking): Likewise.
(vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
retries, and free the mask rgroups before retrying. Check loop-wide
reasons for disallowing fully-masked loops. Make the final decision
about whether use a fully-masked loop or not.
(vect_estimate_min_profitable_iters): Do not assume that peeling
for the number of iterations will be needed for fully-masked loops.
(vectorizable_reduction): Disable fully-masked loops.
(vectorizable_live_operation): Likewise.
(vect_halve_mask_nunits): New function.
(vect_double_mask_nunits): Likewise.
(vect_record_loop_mask): Likewise.
(vect_get_loop_mask): Likewise.
(vect_transform_loop): Handle the case in which the final loop
iteration might handle a partial vector. Call vect_set_loop_condition
instead of slpeel_make_loop_iterate_ntimes.
* tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
(check_load_store_masking): New function.
(prepare_load_store_mask): Likewise.
(vectorizable_store): Handle fully-masked loops.
(vectorizable_load): Likewise.
(supportable_widening_operation): Use vect_halve_mask_nunits for
booleans.
(supportable_narrowing_operation): Likewise vect_double_mask_nunits.
(vect_gen_while): New function.
* config/aarch64/aarch64.md (umax<mode>3): New expander.
(aarch64_uqdec<mode>): New insn.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
(reduc_xor_scal_optab): New optabs.
* doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
(reduc_xor_scal_@var{m}): Document.
* doc/sourcebuild.texi (vect_logical_reduc): Likewise.
* internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
internal functions.
* fold-const-call.c (fold_const_call): Handle them.
* tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
* config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
(*reduc_<bit_reduc>_scal_<mode>): New patterns.
* config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
(UNSPEC_XORV): New unspecs.
(optab): Add entries for them.
(BITWISEV): New int iterator.
(bit_reduc_op): New int attributes.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/md.texi (vec_shl_insert_@var{m}): New optab.
* internal-fn.def (VEC_SHL_INSERT): New internal function.
* optabs.def (vec_shl_insert_optab): New optab.
* tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
(duplicate_and_interleave): Likewise.
* tree-vect-loop.c: Include internal-fn.h.
(neutral_op_for_slp_reduction): New function, split out from
get_initial_defs_for_reduction.
(get_initial_def_for_reduction): Handle option 2 for variable-length
vectors by loading the neutral value into a vector and then shifting
the initial value into element 0.
(get_initial_defs_for_reduction): Replace the code argument with
the neutral value calculated by neutral_op_for_slp_reduction.
Use gimple_build_vector for constant-length vectors.
Use IFN_VEC_SHL_INSERT for variable-length vectors if all
but the first group_size elements have a neutral value.
Use duplicate_and_interleave otherwise.
(vect_create_epilog_for_reduction): Take a neutral_op parameter.
Update call to get_initial_defs_for_reduction. Handle SLP
reductions for variable-length vectors by creating one vector
result for each scalar result, with the elements associated
with other scalar results stubbed out with the neutral value.
(vectorizable_reduction): Call neutral_op_for_slp_reduction.
Require IFN_VEC_SHL_INSERT for double reductions on
variable-length vectors, or SLP reductions that have
a neutral value. Require can_duplicate_and_interleave_p
support for variable-length unchained SLP reductions if there
is no neutral value, such as for MIN/MAX reductions. Also require
the number of vector elements to be a multiple of the number of
SLP statements when doing variable-length unchained SLP reductions.
Update call to vect_create_epilog_for_reduction.
* tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
and remove initial values.
(duplicate_and_interleave): Make public.
* config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
* config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
(can_duplicate_and_interleave_p): New function.
(vect_get_and_check_slp_defs): Take the vector of statements
rather than just the current one. Remove excess parentheses.
Restriction rejectinon of vect_constant_def and vect_external_def
for variable-length vectors to boolean types, or types for which
can_duplicate_and_interleave_p is false.
(vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
(duplicate_and_interleave): New function.
(vect_get_constant_vectors): Use gimple_build_vector for
constant-length vectors and suitable variable-length constant
vectors. Use duplicate_and_interleave for other variable-length
vectors. Don't defer the update when inserting new statements.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
min_profitable_iters doesn't go negative.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
(vec_mask_store_lanes@var{m}@var{n}): Likewise.
* optabs.def (vec_mask_load_lanes_optab): New optab.
(vec_mask_store_lanes_optab): Likewise.
* internal-fn.def (MASK_LOAD_LANES): New internal function.
(MASK_STORE_LANES): Likewise.
* internal-fn.c (mask_load_lanes_direct): New macro.
(mask_store_lanes_direct): Likewise.
(expand_mask_load_optab_fn): Handle masked operations.
(expand_mask_load_lanes_optab_fn): New macro.
(expand_mask_store_optab_fn): Handle masked operations.
(expand_mask_store_lanes_optab_fn): New macro.
(direct_mask_load_lanes_optab_supported_p): Likewise.
(direct_mask_store_lanes_optab_supported_p): Likewise.
* tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
parameter.
(vect_load_lanes_supported): Likewise.
* tree-vect-data-refs.c (strip_conversion): New function.
(can_group_stmts_p): Likewise.
(vect_analyze_data_ref_accesses): Use it instead of checking
for a pair of assignments.
(vect_store_lanes_supported): Take a masked_p parameter.
(vect_load_lanes_supported): Likewise.
* tree-vect-loop.c (vect_analyze_loop_2): Update calls to
vect_store_lanes_supported and vect_load_lanes_supported.
* tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
* tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
parameter. Don't allow gaps for masked accesses.
Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
and vect_load_lanes_supported.
(get_load_store_type): Take a masked_p parameter and update
call to get_group_load_store_type.
(vectorizable_store): Update call to get_load_store_type.
Handle IFN_MASK_STORE_LANES.
(vectorizable_load): Update call to get_load_store_type.
Handle IFN_MASK_LOAD_LANES.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
modes for SVE.
* config/aarch64/aarch64-protos.h
(aarch64_sve_struct_memory_operand_p): Declare.
* config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
(vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
(VPRED, vpred): Handle SVE structure modes.
* config/aarch64/constraints.md (Utx): New constraint.
* config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
(aarch64_sve_struct_nonimmediate_operand): New predicates.
* config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
* config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
(*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
structure modes. Split into pieces after RA.
(vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
(vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
New patterns.
* config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
SVE structure modes.
(aarch64_classify_address): Likewise.
(sizetochar): Move earlier in file.
(aarch64_print_operand): Handle SVE register lists.
(aarch64_array_mode): New function.
(aarch64_sve_struct_memory_operand_p): Likewise.
(TARGET_ARRAY_MODE): Redefine.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* target.def (array_mode): New target hook.
* doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
* doc/tm.texi: Regenerate.
* hooks.h (hook_optmode_mode_uhwi_none): Declare.
* hooks.c (hook_optmode_mode_uhwi_none): New function.
* tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
targetm.array_mode.
* stor-layout.c (mode_for_array): Likewise. Support polynomial
type sizes.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* fold-const.c (fold_binary_loc): Check the argument types
rather than the result type when testing for a vector operation.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
* doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
* doc/tm.texi: Regenerate.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* doc/invoke.texi (-msve-vector-bits=): Document new option.
(sve): Document new AArch64 extension.
* doc/md.texi (w): Extend the description of the AArch64
constraint to include SVE vectors.
(Upl, Upa): Document new AArch64 predicate constraints.
* config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
enum.
* config/aarch64/aarch64.opt (sve_vector_bits): New enum.
(msve-vector-bits=): New option.
* config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
SVE when these are disabled.
(sve): New extension.
* config/aarch64/aarch64-modes.def: Define SVE vector and predicate
modes. Adjust their number of units based on aarch64_sve_vg.
(MAX_BITSIZE_MODE_ANY_MODE): Define.
* config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
aarch64_addr_query_type.
(aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
(aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
(aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
(aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
(aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
(aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
(aarch64_simd_imm_zero_p): Delete.
(aarch64_check_zero_based_sve_index_immediate): Declare.
(aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
(aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
(aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
(aarch64_sve_float_mul_immediate_p): Likewise.
(aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
rather than an rtx.
(aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
(aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
(aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
(aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
(aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
(aarch64_regmode_natural_size): Likewise.
* config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
(AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
left one place.
(AARCH64_ISA_SVE, TARGET_SVE): New macros.
(FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
for VG and the SVE predicate registers.
(V_ALIASES): Add a "z"-prefixed alias.
(FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
(AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
(PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
(PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
(REG_CLASS_NAMES): Add entries for them.
(REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
and the predicate registers.
(aarch64_sve_vg): Declare.
(BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
(SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
(REGMODE_NATURAL_SIZE): Define.
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
SVE macros.
* config/aarch64/aarch64.c: Include cfgrtl.h.
(simd_immediate_info): Add a constructor for series vectors,
and an associated step field.
(aarch64_sve_vg): New variable.
(aarch64_dbx_register_number): Handle VG and the predicate registers.
(aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
(VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
(VEC_ANY_DATA, VEC_STRUCT): New constants.
(aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
(aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
(aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
(aarch64_get_mask_mode): New functions.
(aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
(aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
predicate modes and predicate registers. Explicitly restrict
GPRs to modes of 16 bytes or smaller. Only allow FP registers
to store a vector mode if it is recognized by
aarch64_classify_vector_mode.
(aarch64_regmode_natural_size): New function.
(aarch64_hard_regno_caller_save_mode): Return the original mode
for predicates.
(aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
(aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
(aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
(aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
functions.
(aarch64_add_offset): Add a temp2 parameter. Assert that temp1
does not overlap dest if the function is frame-related. Handle
SVE constants.
(aarch64_split_add_offset): New function.
(aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
them aarch64_add_offset.
(aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
and update call to aarch64_sub_sp.
(aarch64_add_cfa_expression): New function.
(aarch64_expand_prologue): Pass extra temporary registers to the
functions above. Handle the case in which we need to emit new
DW_CFA_expressions for registers that were originally saved
relative to the stack pointer, but now have to be expressed
relative to the frame pointer.
(aarch64_output_mi_thunk): Pass extra temporary registers to the
functions above.
(aarch64_expand_epilogue): Likewise. Prevent inheritance of
IP0 and IP1 values for SVE frames.
(aarch64_expand_vec_series): New function.
(aarch64_expand_sve_widened_duplicate): Likewise.
(aarch64_expand_sve_const_vector): Likewise.
(aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
Handle SVE constants. Use emit_move_insn to move a force_const_mem
into the register, rather than emitting a SET directly.
(aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
(aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
(offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
(offset_9bit_signed_scaled_p): New functions.
(aarch64_replicate_bitmask_imm): New function.
(aarch64_bitmask_imm): Use it.
(aarch64_cannot_force_const_mem): Reject expressions involving
a CONST_POLY_INT. Update call to aarch64_classify_symbol.
(aarch64_classify_index): Handle SVE indices, by requiring
a plain register index with a scale that matches the element size.
(aarch64_classify_address): Handle SVE addresses. Assert that
the mode of the address is VOIDmode or an integer mode.
Update call to aarch64_classify_symbol.
(aarch64_classify_symbolic_expression): Update call to
aarch64_classify_symbol.
(aarch64_const_vec_all_in_range_p): New function.
(aarch64_print_vector_float_operand): Likewise.
(aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
"vN" for FP registers with SVE modes. Handle (const ...) vectors
and the FP immediates 1.0 and 0.5.
(aarch64_print_address_internal): Handle SVE addresses.
(aarch64_print_operand_address): Use ADDR_QUERY_ANY.
(aarch64_regno_regclass): Handle predicate registers.
(aarch64_secondary_reload): Handle big-endian reloads of SVE
data modes.
(aarch64_class_max_nregs): Handle SVE modes and predicate registers.
(aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
(aarch64_convert_sve_vector_bits): New function.
(aarch64_override_options): Use it to handle -msve-vector-bits=.
(aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
rather than an rtx.
(aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
Handle SVE vector and predicate modes. Accept VL-based constants
that need only one temporary register, and VL offsets that require
no temporary registers.
(aarch64_conditional_register_usage): Mark the predicate registers
as fixed if SVE isn't available.
(aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
Return true for SVE vector and predicate modes.
(aarch64_simd_container_mode): Take the number of bits as a poly_int64
rather than an unsigned int. Handle SVE modes.
(aarch64_preferred_simd_mode): Update call accordingly. Handle
SVE modes.
(aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
if SVE is enabled.
(aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
(aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
(aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
(aarch64_sve_float_mul_immediate_p): New functions.
(aarch64_sve_valid_immediate): New function.
(aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
Explicitly reject structure modes. Check for INDEX constants.
Handle PTRUE and PFALSE constants.
(aarch64_check_zero_based_sve_index_immediate): New function.
(aarch64_simd_imm_zero_p): Delete.
(aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
vector modes. Accept constants in the range of CNT[BHWD].
(aarch64_simd_scalar_immediate_valid_for_move): Explicitly
ask for an Advanced SIMD mode.
(aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
(aarch64_simd_vector_alignment): Handle SVE predicates.
(aarch64_vectorize_preferred_vector_alignment): New function.
(aarch64_simd_vector_alignment_reachable): Use it instead of
the vector size.
(aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
(aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
functions.
(MAX_VECT_LEN): Delete.
(expand_vec_perm_d): Add a vec_flags field.
(emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
(aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
(aarch64_evpc_ext): Don't apply a big-endian lane correction
for SVE modes.
(aarch64_evpc_rev): Rename to...
(aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
(aarch64_evpc_rev_global): New function.
(aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
(aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
MAX_VECT_LEN.
(aarch64_evpc_sve_tbl): New function.
(aarch64_expand_vec_perm_const_1): Update after rename of
aarch64_evpc_rev. Handle SVE permutes too, trying
aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
than aarch64_evpc_tbl.
(aarch64_vectorize_vec_perm_const): Initialize vec_flags.
(aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
(aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
(aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
(aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
(aarch64_expand_sve_vcond): New functions.
(aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
of aarch64_vector_mode_p.
(aarch64_dwarf_poly_indeterminate_value): New function.
(aarch64_compute_pressure_classes): Likewise.
(aarch64_can_change_mode_class): Likewise.
(TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
(TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
(TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
(TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
(TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
(TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
* config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
(Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
constraints.
(Dn, Dl, Dr): Accept const as well as const_vector.
(Dz): Likewise. Compare against CONST0_RTX.
* config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
of "vector" where appropriate.
(SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
(SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
(UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
(UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
(UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
(UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
(Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
(v_int_equiv): Extend to SVE modes.
(Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
mode attributes.
(LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
(optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
(logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
(LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
(SVE_COND_FP_CMP): New int iterators.
(perm_hilo): Handle the new unpack unspecs.
(optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
attributes.
* config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
(aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
(aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
(aarch64_equality_operator, aarch64_constant_vector_operand)
(aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
(aarch64_sve_nonimmediate_operand): Likewise.
(aarch64_sve_general_operand): Likewise.
(aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
(aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
(aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
(aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
(aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
(aarch64_sve_float_arith_immediate): Likewise.
(aarch64_sve_float_arith_with_sub_immediate): Likewise.
(aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
(aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
(aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
(aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
(aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
(aarch64_sve_float_arith_operand): Likewise.
(aarch64_sve_float_arith_with_sub_operand): Likewise.
(aarch64_sve_float_mul_operand): Likewise.
(aarch64_sve_vec_perm_operand): Likewise.
(aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
(aarch64_mov_operand): Accept const_poly_int and const_vector.
(aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
as well as const_vector.
(aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
in file. Use CONST0_RTX and CONSTM1_RTX.
(aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
(aarch64_simd_reg_or_zero): Accept const as well as const_vector.
Use aarch64_simd_imm_zero.
* config/aarch64/aarch64-sve.md: New file.
* config/aarch64/aarch64.md: Include it.
(VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
(UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
(UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
(UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
(UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
(sve): New attribute.
(enabled): Disable instructions with the sve attribute unless
TARGET_SVE.
(movqi, movhi): Pass CONST_POLY_INT operaneds through
aarch64_expand_mov_immediate.
(*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
CNT[BHSD] immediates.
(movti): Split CONST_POLY_INT moves into two halves.
(add<mode>3): Accept aarch64_pluslong_or_poly_operand.
Split additions that need a temporary here if the destination
is the stack pointer.
(*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
(*add<mode>3_poly_1): New instruction.
(set_clobber_cc): New expander.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
* simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
parameter and use it instead of GET_MODE_SIZE (innermode). Use
inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
Change innermode from fixed_mode_size to machine_mode.
(simplify_subreg): Update call accordingly. Handle a constant-sized
subreg of a variable-length CONST_VECTOR.
2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
(add_offset_to_base): New function, split out from...
(create_mem_ref): ...here. When handling a scale other than 1,
check first whether the address is valid without the offset.
Add it into the base if so, leaving the index and scale as-is.
2018-01-12 Jakub Jelinek <jakub@redhat.com>
PR c++/83778
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
fold_for_warn before checking if arg2 is INTEGER_CST.
2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
* config/rs6000/predicates.md (load_multiple_operation): Delete.
(store_multiple_operation): Delete.
* config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
* config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
* config/rs6000/rs6000-string.c (expand_block_move): Delete everything
guarded by TARGET_STRING.
(rs6000_output_load_multiple): Delete.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
OPTION_MASK_STRING / TARGET_STRING handling.
(print_operand) <'N', 'O'>: Add comment that these are unused now.
(const rs6000_opt_masks) <"string">: Change mask to 0.
* config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
(MASK_STRING): Delete.
* config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
parts. Simplify.
(load_multiple): Delete.
(*ldmsi8): Delete.
(*ldmsi7): Delete.
(*ldmsi6): Delete.
(*ldmsi5): Delete.
(*ldmsi4): Delete.
(*ldmsi3): Delete.
(store_multiple): Delete.
(*stmsi8): Delete.
(*stmsi7): Delete.
(*stmsi6): Delete.
(*stmsi5): Delete.
(*stmsi4): Delete.
(*stmsi3): Delete.
(movmemsi_8reg): Delete.
(corresponding unnamed define_insn): Delete.
(movmemsi_6reg): Delete.
(corresponding unnamed define_insn): Delete.
(movmemsi_4reg): Delete.
(corresponding unnamed define_insn): Delete.
(movmemsi_2reg): Delete.
(corresponding unnamed define_insn): Delete.
(movmemsi_1reg): Delete.
(corresponding unnamed define_insn): Delete.
* config/rs6000/rs6000.opt (mno-string): New.
(mstring): Replace by deprecation warning stub.
* doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
2018-01-12 Jakub Jelinek <jakub@redhat.com>
* regrename.c (regrename_do_replace): If replacing the same
reg multiple times, try to reuse last created gen_raw_REG.
PR debug/81155
* bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
main to workaround a bug in GDB.
2018-01-12 Tom de Vries <tom@codesourcery.com>
PR target/83737
* config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/80481
* ira-color.c (get_cap_member): New function.
(allocnos_conflict_by_live_ranges_p): Use it.
(slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
(setup_slot_coalesced_allocno_live_ranges): Ditto.
2018-01-12 Uros Bizjak <ubizjak@gmail.com>
PR target/83628
* config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
(*saddl_se_1): Ditto.
(*ssubsi_1): Ditto.
(*ssubl_se_1): Ditto.
2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
* tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
rather than wi::to_widest for DR_INITs.
* tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
wi::to_poly_offset rather than wi::to_offset for DR_INIT.
(vect_analyze_data_ref_accesses): Require both DR_INITs to be
INTEGER_CSTs.
(vect_analyze_group_access_1): Note that here.
2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
polynomial type sizes.
2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
* gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
(gimple_add_tmp_var): Likewise.
2018-01-12 Martin Liska <mliska@suse.cz>
* gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
(gimple_alloc_sizes): Likewise.
(dump_gimple_statistics): Use PRIu64 in printf format.
* gimple.h: Change uint64_t to int.
2018-01-12 Martin Liska <mliska@suse.cz>
* tree-core.h: Use uint64_t instead of int.
* tree.c (tree_node_counts): Likewise.
(tree_node_sizes): Likewise.
(dump_tree_statistics): Use PRIu64 in printf format.
2018-01-12 Martin Liska <mliska@suse.cz>
* Makefile.in: As qsort_chk is implemented in vec.c, add
vec.o to linkage of gencfn-macros.
* tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
passing the info to record_node_allocation_statistics.
(test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
and pass the info.
* ggc-common.c (struct ggc_usage): Add operator== and use
it in operator< and compare function.
* mem-stats.h (struct mem_usage): Likewise.
* vec.c (struct vec_usage): Remove operator< and compare
function. Can be simply inherited.
2018-01-12 Martin Jambor <mjambor@suse.cz>
PR target/81616
* params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
* tree-ssa-math-opts.c: Include domwalk.h.
(convert_mult_to_fma_1): New function.
(fma_transformation_info): New type.
(fma_deferring_state): Likewise.
(cancel_fma_deferring): New function.
(result_of_phi): Likewise.
(last_fma_candidate_feeds_initial_phi): Likewise.
(convert_mult_to_fma): Added deferring logic, split actual
transformation to convert_mult_to_fma_1.
(math_opts_dom_walker): New type.
(math_opts_dom_walker::after_dom_children): New method, body moved
here from pass_optimize_widening_mul::execute, added deferring logic
bits.
(pass_optimize_widening_mul::execute): Moved most of code to
math_opts_dom_walker::after_dom_children.
* config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
* config/i386/i386.c (ix86_option_override_internal): Added
maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
2018-01-12 Richard Biener <rguenther@suse.de>
PR debug/83157
* dwarf2out.c (gen_variable_die): Do not reset old_die for
inline instance vars.
2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
PR target/81819
* config/rx/rx.c (rx_is_restricted_memory_address):
Handle SUBREG case.
2018-01-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/80846
* target.def (split_reduction): New target hook.
* targhooks.c (default_split_reduction): New function.
* targhooks.h (default_split_reduction): Declare.
* tree-vect-loop.c (vect_create_epilog_for_reduction): If the
target requests first reduce vectors by combining low and high
parts.
* tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
(get_vectype_for_scalar_type_and_size): Export.
* tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
* doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
* doc/tm.texi: Regenerate.
* config/i386/i386.c (ix86_split_reduction): Implement
TARGET_VECTORIZE_SPLIT_REDUCTION.
2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
PR target/83368
* config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
in PIC mode except for TARGET_VXWORKS_RTP.
* config/sparc/sparc.c: Include cfgrtl.h.
(TARGET_INIT_PIC_REG): Define.
(TARGET_USE_PSEUDO_PIC_REG): Likewise.
(sparc_pic_register_p): New predicate.
(sparc_legitimate_address_p): Use it.
(sparc_legitimize_pic_address): Likewise.
(sparc_delegitimize_address): Likewise.
(sparc_mode_dependent_address_p): Likewise.
(gen_load_pcrel_sym): Remove 4th parameter.
(load_got_register): Adjust call to above. Remove obsolete stuff.
(sparc_expand_prologue): Do not call load_got_register here.
(sparc_flat_expand_prologue): Likewise.
(sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
(sparc_use_pseudo_pic_reg): New function.
(sparc_init_pic_reg): Likewise.
* config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
(builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
* doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
Add item for branch_cost.
2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/83565
* rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
not extend the result to a larger mode for rotate operations.
(num_sign_bit_copies1): Likewise.
2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/40411
* config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
-symbolic.
Use values-Xc.o for -pedantic.
Link with values-xpg4.o for C90, values-xpg6.o otherwise.
2018-01-12 Martin Liska <mliska@suse.cz>
PR ipa/83054
* ipa-devirt.c (final_warning_record::grow_type_warnings):
New function.
(possible_polymorphic_call_targets): Use it.
(ipa_devirt): Likewise.
2018-01-12 Martin Liska <mliska@suse.cz>
* profile-count.h (enum profile_quality): Use 0 as invalid
enum value of profile_quality.
2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
* doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
-mext-string options.
2018-01-12 Richard Biener <rguenther@suse.de>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Process
DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
* tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
Likewise.
* tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
* configure.ac (--with-long-double-format): Add support for the
configuration option to change the default long double format on
PowerPC systems.
* config.gcc (powerpc*-linux*-*): Likewise.
* configure: Regenerate.
* config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
used without modification.
2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
(SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
* config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
MISC_BUILTIN_SPEC_BARRIER.
(rs6000_init_builtins): Likewise.
* config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
enum value.
(speculation_barrier): New define_insn.
* doc/extend.texi: Document __builtin_speculation_barrier.
2018-01-11 Jakub Jelinek <jakub@redhat.com>
PR target/83203
* config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
* config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
iterators.
(ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
integral modes instead of "ss" and "sd".
(vec_set<mode>_0): New define_insns for 256-bit and 512-bit
vectors with 32-bit and 64-bit elements.
(vecdupssescalarmodesuffix): New mode attribute.
(vec_dup<mode>): Use it.
2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
PR target/83330
* config/i386/i386.c (ix86_compute_frame_layout): Align stack
frame if argument is passed on stack.
2018-01-11 Jakub Jelinek <jakub@redhat.com>
PR target/82682
* ree.c (combine_reaching_defs): Optimize also
reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
reg2=any_extend(exp); reg1=reg2;, formatting fix.
2018-01-11 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83189
* gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
2018-01-11 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83718
* tree-inline.c (copy_cfg_body): Adjust num&den for scaling
after they are computed.
2018-01-11 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/83695
* gimple-loop-linterchange.cc
(tree_loop_interchange::interchange_loops): Call scev_reset_htab to
reset cached scev information after interchange.
(pass_linterchange::execute): Remove call to scev_reset_htab.
2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
* config/arm/arm_neon_builtins.def (vfmal_lane_low,
vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
* config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
(V_lane_reg): Likewise.
* config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
New define_expand.
(neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
(vfmal_lane_low<mode>_intrinsic,
vfmal_lane_low<vfmlsel2><mode>_intrinsic,
vfmal_lane_high<vfmlsel2><mode>_intrinsic,
vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
vfmsl_lane_high<mode>_intrinsic): New define_insns.
2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (fp16fml): New feature.
(ALL_SIMD): Add fp16fml.
(armv8.2-a): Add fp16fml as an option.
(armv8.3-a): Likewise.
(armv8.4-a): Add fp16fml as part of fp16.
* config/arm/arm.h (TARGET_FP16FML): Define.
* config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
when appropriate.
* config/arm/arm-modes.def (V2HF): Define.
* config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
* config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
vfmsl_low, vfmsl_high): New set of builtins.
* config/arm/iterators.md (PLUSMINUS): New code iterator.
(vfml_op): New code attribute.
(VFMLHALVES): New int iterator.
(VFML, VFMLSEL): New mode attributes.
(V_reg): Define mapping for V2HF.
(V_hi, V_lo): New mode attributes.
(VF_constraint): Likewise.
(vfml_half, vfml_half_selector): New int attributes.
* config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
define_expand.
(vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
New define_insn.
* config/arm/t-arm-elf (v8_fps): Add fp16fml.
* config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
* config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
* doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
documentation.
* doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
Document new effective target and option set.
2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/arm-cpus.in (armv8_4): New feature.
(ARMv8_4a): New fgroup.
(armv8.4-a): New arch.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
* config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
* config/arm/t-multilib (v8_4_a_simd_variants): New variable.
Add matching rules for -march=armv8.4-a and extensions.
* doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
PR target/81821
* config/rx/rx.md (BW): New mode attribute.
(sync_lock_test_and_setsi): Add mode suffix to insn output.
2018-01-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/83435
* graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
* graphite-scop-detection.c (scop_detection::get_sese): Likewise.
* tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
field.
(aarch64_classify_address): Initialize it. Track polynomial offsets.
(aarch64_print_address_internal): Use it to check for a zero offset.
2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
* config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
Return a poly_int64 rather than a HOST_WIDE_INT.
(aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
rather than a HOST_WIDE_INT.
* config/aarch64/aarch64.h (aarch64_frame): Protect with
HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
hard_fp_offset, frame_size, initial_adjust, callee_offset and
final_offset from HOST_WIDE_INT to poly_int64.
* config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
to_constant when getting the number of units in an Advanced SIMD
mode.
(aarch64_builtin_vectorized_function): Check for a constant number
of units.
* config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
GET_MODE_SIZE.
(aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
attribute instead of GET_MODE_NUNITS.
* config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
(aarch64_class_max_nregs): Use the constant_lowest_bound of the
GET_MODE_SIZE for fixed-size registers.
(aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
(aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
(aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
(aarch64_legitimize_address_displacement, aarch64_secondary_reload)
(aarch64_print_operand, aarch64_print_address_internal)
(aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
(aarch64_short_vector_p, aapcs_vfp_sub_candidate)
(aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
Handle polynomial GET_MODE_SIZE.
(aarch64_hard_regno_caller_save_mode): Likewise. Return modes
wider than SImode without modification.
(tls_symbolic_operand_type): Use strip_offset instead of split_const.
(aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
(aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
passing and returning SVE modes.
(aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
rather than GEN_INT.
(aarch64_emit_probe_stack_range): Take the size as a poly_int64
rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
(aarch64_allocate_and_probe_stack_space): Likewise.
(aarch64_layout_frame): Cope with polynomial offsets.
(aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
polynomial offsets.
(offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
(aarch64_offset_7bit_signed_scaled_p): Take the offset as a
poly_int64 rather than a HOST_WIDE_INT.
(aarch64_get_separate_components, aarch64_process_components)
(aarch64_expand_prologue, aarch64_expand_epilogue)
(aarch64_use_return_insn_p): Handle polynomial frame offsets.
(aarch64_anchor_offset): New function, split out from...
(aarch64_legitimize_address): ...here.
(aarch64_builtin_vectorization_cost): Handle polynomial
TYPE_VECTOR_SUBPARTS.
(aarch64_simd_check_vect_par_cnst_half): Handle polynomial
GET_MODE_NUNITS.
(aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
number of elements from the PARALLEL rather than the mode.
(aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
rather than GET_MODE_BITSIZE.
(aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
(aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
(aarch64_expand_vec_perm_const_1): Handle polynomial
d->perm.length () and d->perm elements.
(aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
Apply to_constant to d->perm elements.
(aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
polynomial CONST_VECTOR_NUNITS.
(aarch64_move_pointer): Take amount as a poly_int64 rather
than an int.
(aarch64_progress_pointer): Avoid temporary variable.
* config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
the mode attribute instead of GET_MODE.
2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
x exists before using it.
(aarch64_add_constant_internal): Rename to...
(aarch64_add_offset_1): ...this. Replace regnum with separate
src and dest rtxes. Handle the case in which they're different,
including when the offset is zero. Replace scratchreg with an rtx.
Use 2 additions if there is no spare register into which we can
move a 16-bit constant.
(aarch64_add_constant): Delete.
(aarch64_add_offset): Replace reg with separate src and dest
rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
Use aarch64_add_offset_1.
(aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
an rtx rather than an int. Take the delta as a poly_int64
rather than a HOST_WIDE_INT. Use aarch64_add_offset.
(aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
(aarch64_expand_prologue): Update calls to aarch64_sub_sp,
aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
(aarch64_expand_epilogue): Update calls to aarch64_add_offset
and aarch64_add_sp.
(aarch64_output_mi_thunk): Use aarch64_add_offset rather than
aarch64_add_constant.
2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
Use scalar_float_mode.
2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64-simd.md
(aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
(aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
(aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
(aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
(aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
(aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
(aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
(aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
(aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
(aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR target/83514
* config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
targ_options->x_arm_arch_string is non NULL.
2018-01-11 Tamar Christina <tamar.christina@arm.com>
* config/aarch64/aarch64.h
(AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
2018-01-11 Sudakshina Das <sudi.das@arm.com>
PR target/82096
* expmed.c (emit_store_flag_force): Swap if const op0
and change VOIDmode to mode of op0.
2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
PR rtl-optimization/83761
* caller-save.c (replace_reg_with_saved_mem): Pass bits rather
than bytes to mode_for_size.
2018-01-10 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83189
* gfortran.fortran-torture/compile/pr83189.f90: New testcase.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
profile.
2018-01-10 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83575
* cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
when in layout mode.
(cfg_layout_finalize): Do not verify cfg before we are out of layout.
* cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
partition fixup.
2018-01-10 Michael Collison <michael.collison@arm.com>
* config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
* config/aarch64/aarch64-option-extension.def: Add
AARCH64_OPT_EXTENSION of 'fp16fml'.
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
(__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
* config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
* config/aarch64/constraints.md (Ui7): New constraint.
* config/aarch64/iterators.md (VFMLA_W): New mode iterator.
(VFMLA_SEL_W): Ditto.
(f16quad): Ditto.
(f16mac1): Ditto.
(VFMLA16_LOW): New int iterator.
(VFMLA16_HIGH): Ditto.
(UNSPEC_FMLAL): New unspec.
(UNSPEC_FMLSL): Ditto.
(UNSPEC_FMLAL2): Ditto.
(UNSPEC_FMLSL2): Ditto.
(f16mac): New code attribute.
* config/aarch64/aarch64-simd-builtins.def
(aarch64_fmlal_lowv2sf): Ditto.
(aarch64_fmlsl_lowv2sf): Ditto.
(aarch64_fmlalq_lowv4sf): Ditto.
(aarch64_fmlslq_lowv4sf): Ditto.
(aarch64_fmlal_highv2sf): Ditto.
(aarch64_fmlsl_highv2sf): Ditto.
(aarch64_fmlalq_highv4sf): Ditto.
(aarch64_fmlslq_highv4sf): Ditto.
(aarch64_fmlal_lane_lowv2sf): Ditto.
(aarch64_fmlsl_lane_lowv2sf): Ditto.
(aarch64_fmlal_laneq_lowv2sf): Ditto.
(aarch64_fmlsl_laneq_lowv2sf): Ditto.
(aarch64_fmlalq_lane_lowv4sf): Ditto.
(aarch64_fmlsl_lane_lowv4sf): Ditto.
(aarch64_fmlalq_laneq_lowv4sf): Ditto.
(aarch64_fmlsl_laneq_lowv4sf): Ditto.
(aarch64_fmlal_lane_highv2sf): Ditto.
(aarch64_fmlsl_lane_highv2sf): Ditto.
(aarch64_fmlal_laneq_highv2sf): Ditto.
(aarch64_fmlsl_laneq_highv2sf): Ditto.
(aarch64_fmlalq_lane_highv4sf): Ditto.
(aarch64_fmlsl_lane_highv4sf): Ditto.
(aarch64_fmlalq_laneq_highv4sf): Ditto.
(aarch64_fmlsl_laneq_highv4sf): Ditto.
* config/aarch64/aarch64-simd.md:
(aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
(aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
(aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
(aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
(aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
(aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
(aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
(aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
(aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
(aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
(aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
(aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
(aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
(aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
(aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
(aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
(aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
(aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
(aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
(aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
* config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
(vfmlsl_low_u32): Ditto.
(vfmlalq_low_u32): Ditto.
(vfmlslq_low_u32): Ditto.
(vfmlal_high_u32): Ditto.
(vfmlsl_high_u32): Ditto.
(vfmlalq_high_u32): Ditto.
(vfmlslq_high_u32): Ditto.
(vfmlal_lane_low_u32): Ditto.
(vfmlsl_lane_low_u32): Ditto.
(vfmlal_laneq_low_u32): Ditto.
(vfmlsl_laneq_low_u32): Ditto.
(vfmlalq_lane_low_u32): Ditto.
(vfmlslq_lane_low_u32): Ditto.
(vfmlalq_laneq_low_u32): Ditto.
(vfmlslq_laneq_low_u32): Ditto.
(vfmlal_lane_high_u32): Ditto.
(vfmlsl_lane_high_u32): Ditto.
(vfmlal_laneq_high_u32): Ditto.
(vfmlsl_laneq_high_u32): Ditto.
(vfmlalq_lane_high_u32): Ditto.
(vfmlslq_lane_high_u32): Ditto.
(vfmlalq_laneq_high_u32): Ditto.
(vfmlslq_laneq_high_u32): Ditto.
* config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
(AARCH64_FL_FOR_ARCH8_4): New.
(AARCH64_ISA_F16FML): New ISA flag.
(TARGET_F16FML): New feature flag for fp16fml.
(doc/invoke.texi): Document new fp16fml option.
2018-01-10 Michael Collison <michael.collison@arm.com>
* config/aarch64/aarch64-builtins.c:
(aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
(__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
* config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
(AARCH64_ISA_SHA3): New ISA flag.
(TARGET_SHA3): New feature flag for sha3.
* config/aarch64/iterators.md (sha512_op): New int attribute.
(CRYPTO_SHA512): New int iterator.
(UNSPEC_SHA512H): New unspec.
(UNSPEC_SHA512H2): Ditto.
(UNSPEC_SHA512SU0): Ditto.
(UNSPEC_SHA512SU1): Ditto.
* config/aarch64/aarch64-simd-builtins.def
(aarch64_crypto_sha512hqv2di): New builtin.
(aarch64_crypto_sha512h2qv2di): Ditto.
(aarch64_crypto_sha512su0qv2di): Ditto.
(aarch64_crypto_sha512su1qv2di): Ditto.
(aarch64_eor3qv8hi): Ditto.
(aarch64_rax1qv2di): Ditto.
(aarch64_xarqv2di): Ditto.
(aarch64_bcaxqv8hi): Ditto.
* config/aarch64/aarch64-simd.md:
(aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
(aarch64_crypto_sha512su0qv2di): Ditto.
(aarch64_crypto_sha512su1qv2di): Ditto.
(aarch64_eor3qv8hi): Ditto.
(aarch64_rax1qv2di): Ditto.
(aarch64_xarqv2di): Ditto.
(aarch64_bcaxqv8hi): Ditto.
* config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
(vsha512h2q_u64): Ditto.
(vsha512su0q_u64): Ditto.
(vsha512su1q_u64): Ditto.
(veor3q_u16): Ditto.
(vrax1q_u64): Ditto.
(vxarq_u64): Ditto.
(vbcaxq_u16): Ditto.
* config/arm/types.md (crypto_sha512): New type attribute.
(crypto_sha3): Ditto.
(doc/invoke.texi): Document new sha3 option.
2018-01-10 Michael Collison <michael.collison@arm.com>
* config/aarch64/aarch64-builtins.c:
(aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
(__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
(__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
* config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
(AARCH64_ISA_SM4): New ISA flag.
(TARGET_SM4): New feature flag for sm4.
* config/aarch64/aarch64-simd-builtins.def
(aarch64_sm3ss1qv4si): Ditto.
(aarch64_sm3tt1aq4si): Ditto.
(aarch64_sm3tt1bq4si): Ditto.
(aarch64_sm3tt2aq4si): Ditto.
(aarch64_sm3tt2bq4si): Ditto.
(aarch64_sm3partw1qv4si): Ditto.
(aarch64_sm3partw2qv4si): Ditto.
(aarch64_sm4eqv4si): Ditto.
(aarch64_sm4ekeyqv4si): Ditto.
* config/aarch64/aarch64-simd.md:
(aarch64_sm3ss1qv4si): Ditto.
(aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
(aarch64_sm3partw<sm3part_op>qv4si): Ditto.
(aarch64_sm4eqv4si): Ditto.
(aarch64_sm4ekeyqv4si): Ditto.
* config/aarch64/iterators.md (sm3tt_op): New int iterator.
(sm3part_op): Ditto.
(CRYPTO_SM3TT): Ditto.
(CRYPTO_SM3PART): Ditto.
(UNSPEC_SM3SS1): New unspec.
(UNSPEC_SM3TT1A): Ditto.
(UNSPEC_SM3TT1B): Ditto.
(UNSPEC_SM3TT2A): Ditto.
(UNSPEC_SM3TT2B): Ditto.
(UNSPEC_SM3PARTW1): Ditto.
(UNSPEC_SM3PARTW2): Ditto.
(UNSPEC_SM4E): Ditto.
(UNSPEC_SM4EKEY): Ditto.
* config/aarch64/constraints.md (Ui2): New constraint.
* config/aarch64/predicates.md (aarch64_imm2): New predicate.
* config/arm/types.md (crypto_sm3): New type attribute.
(crypto_sm4): Ditto.
* config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
(vsm3tt1aq_u32): Ditto.
(vsm3tt1bq_u32): Ditto.
(vsm3tt2aq_u32): Ditto.
(vsm3tt2bq_u32): Ditto.
(vsm3partw1q_u32): Ditto.
(vsm3partw2q_u32): Ditto.
(vsm4eq_u32): Ditto.
(vsm4ekeyq_u32): Ditto.
(doc/invoke.texi): Document new sm4 option.
2018-01-10 Michael Collison <michael.collison@arm.com>
* config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
* config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
(AARCH64_FL_FOR_ARCH8_4): New.
(AARCH64_FL_V8_4): New flag.
(doc/invoke.texi): Document new armv8.4-a option.
2018-01-10 Michael Collison <michael.collison@arm.com>
* config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
(__ARM_FEATURE_AES): Define if TARGET_AES is true.
(__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
* config/aarch64/aarch64-option-extension.def: Add
AARCH64_OPT_EXTENSION of 'sha2'.
(aes): Add AARCH64_OPT_EXTENSION of 'aes'.
(crypto): Disable sha2 and aes if crypto disabled.
(crypto): Enable aes and sha2 if enabled.
(simd): Disable sha2 and aes if simd disabled.
* config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
New flags.
(AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
(TARGET_SHA2): New feature flag for sha2.
(TARGET_AES): New feature flag for aes.
* config/aarch64/aarch64-simd.md:
(aarch64_crypto_aes<aes_op>v16qi): Make pattern
conditional on TARGET_AES.
(aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
(aarch64_crypto_sha1hsi): Make pattern conditional
on TARGET_SHA2.
(aarch64_crypto_sha1hv4si): Ditto.
(aarch64_be_crypto_sha1hv4si): Ditto.
(aarch64_crypto_sha1su1v4si): Ditto.
(aarch64_crypto_sha1<sha1_op>v4si): Ditto.
(aarch64_crypto_sha1su0v4si): Ditto.
(aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
(aarch64_crypto_sha256su0v4si): Ditto.
(aarch64_crypto_sha256su1v4si): Ditto.
(doc/invoke.texi): Document new aes and sha2 options.
2018-01-10 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83781
* gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
as string arrays.
2018-01-11 Martin Sebor <msebor@gmail.com>
Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/83501
PR tree-optimization/81703
* tree-ssa-strlen.c (get_string_cst): Rename...
(get_string_len): ...to this. Handle global constants.
(handle_char_store): Adjust.
2018-01-10 Kito Cheng <kito.cheng@gmail.com>
Jim Wilson <jimw@sifive.com>
* config/riscv/riscv-protos.h (riscv_output_return): New.
* config/riscv/riscv.c (struct machine_function): New naked_p field.
(riscv_attribute_table, riscv_output_return),
(riscv_handle_fndecl_attribute, riscv_naked_function_p),
(riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
(riscv_compute_frame_info): Only compute frame->mask if not a naked
function.
(riscv_expand_prologue): Add early return for naked function.
(riscv_expand_epilogue): Likewise.
(riscv_function_ok_for_sibcall): Return false for naked function.
(riscv_set_current_function): New.
(TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
(TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
* config/riscv/riscv.md (simple_return): Call riscv_output_return.
* doc/extend.texi (RISC-V Function Attributes): New.
2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
check for 128-bit long double before checking TCmode.
* config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
128-bit long doubles before checking TFmode or TCmode.
(FLOAT128_IBM_P): Likewise.
2018-01-10 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83671
* builtins.c (c_strlen): Unconditionally return zero for the empty
string.
Use -Warray-bounds for warnings.
* gimple-fold.c (get_range_strlen): Handle non-constant lengths
for non-constant array indices with COMPONENT_REF, arrays of
arrays, and pointers to arrays.
(gimple_fold_builtin_strlen): Determine and set length range for
non-constant character arrays.
2018-01-10 Aldy Hernandez <aldyh@redhat.com>
PR middle-end/81897
* tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
empty blocks.
2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
* dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
PR target/83399
* config/rs6000/rs6000.c (print_operand) <'y'>: Use
VECTOR_MEM_ALTIVEC_OR_VSX_P.
* config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
indexed_or_indirect_operand predicate.
(*vsx_le_perm_load_<mode> for VSX_W): Likewise.
(*vsx_le_perm_load_v8hi): Likewise.
(*vsx_le_perm_load_v16qi): Likewise.
(*vsx_le_perm_store_<mode> for VSX_D): Likewise.
(*vsx_le_perm_store_<mode> for VSX_W): Likewise.
(*vsx_le_perm_store_v8hi): Likewise.
(*vsx_le_perm_store_v16qi): Likewise.
(eight unnamed splitters): Likewise.
2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
* config/rs6000/x86intrin.h: Change #warning to #error. Update message.
* config/rs6000/emmintrin.h: Likewise.
* config/rs6000/mmintrin.h: Likewise.
* config/rs6000/xmmintrin.h: Likewise.
2018-01-10 David Malcolm <dmalcolm@redhat.com>
PR c++/43486
* tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
"public_flag".
* tree.c (tree_nop_conversion): Return true for location wrapper
nodes.
(maybe_wrap_with_location): New function.
(selftest::check_strip_nops): New function.
(selftest::test_location_wrappers): New function.
(selftest::tree_c_tests): Call it.
* tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
(maybe_wrap_with_location): New decl.
(EXPR_LOCATION_WRAPPER_P): New macro.
(location_wrapper_p): New inline function.
(tree_strip_any_location_wrapper): New inline function.
2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
PR target/83735
* config/i386/i386.c (ix86_compute_frame_layout): Always adjust
stack_realign_offset for the largest alignment of stack slot
actually used.
(ix86_find_max_used_stack_alignment): New function.
(ix86_finalize_stack_frame_flags): Use it. Set
max_used_stack_alignment if we don't realign stack.
* config/i386/i386.h (machine_function): Add
max_used_stack_alignment.
2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
* config/arm/arm.opt (-mbranch-cost): New option.
* config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
account.
2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
PR target/83629
* config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
2018-01-10 Richard Biener <rguenther@suse.de>
PR debug/83765
* dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
early out so it also covers the case where we have a non-NULL
origin.
2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/83753
* tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
for non-strided grouped accesses if the number of elements is 1.
2018-01-10 Jan Hubicka <hubicka@ucw.cz>
PR target/81616
* i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
* i386.h (TARGET_USE_GATHER): Define.
* x86-tune.def (X86_TUNE_USE_GATHER): New.
2018-01-10 Martin Liska <mliska@suse.cz>
PR bootstrap/82831
* basic-block.h (CLEANUP_NO_PARTITIONING): New define.
* bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
partitioning.
* cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
CLEANUP_NO_PARTITIONING is not set.
2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
* doc/rtl.texi: Remove documentation of (const ...) wrappers
for vectors, as a partial revert of r254296.
* rtl.h (const_vec_p): Delete.
(const_vec_duplicate_p): Don't test for vector CONSTs.
(unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
* expmed.c (make_tree): Likewise.
Revert:
* common.md (E, F): Use CONSTANT_P instead of checking for
CONST_VECTOR.
* emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
checking for CONST_VECTOR.
2018-01-09 Jan Hubicka <hubicka@ucw.cz>
PR middle-end/83575
* predict.c (force_edge_cold): Handle in more sane way edges
with no prediction.
2018-01-09 Carl Love <cel@us.ibm.com>
* config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
V4SI, V4SF types.
(p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
* config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
* config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
* config/rs6000/rs6000-protos.h: Add extern defition for
rs6000_generate_float2_double_code.
* config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
function.
* config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
(float2_v2df): Add define_expand.
2018-01-09 Uros Bizjak <ubizjak@gmail.com>
PR target/83628
* combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
op_mode in the force_to_mode call.
2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
instead of checking each element individually.
(aarch64_evpc_uzp): Likewise.
(aarch64_evpc_zip): Likewise.
(aarch64_evpc_ext): Likewise.
(aarch64_evpc_rev): Likewise.
(aarch64_evpc_dup): Test the encoding for a single duplicated element,
instead of checking each element individually. Return true without
generating rtl if
(aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
whether all selected elements come from the same input, instead of
checking each element individually. Remove calls to gen_rtx_REG,
start_sequence and end_sequence and instead assert that no rtl is
generated.
2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
* config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
order of HIGH and CONST checks.
2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
if the destination isn't an SSA_NAME.
2018-01-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/83668
* graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
move prologue...
(canonicalize_loop_form): ... here, renamed from ...
(canonicalize_loop_closed_ssa_form): ... this and amended to
swap successor edges for loop exit blocks to make us use
the RPO order we need for initial schedule generation.
2018-01-09 Joseph Myers <joseph@codesourcery.com>
PR tree-optimization/64811
* match.pd: When optimizing comparisons with Inf, avoid
introducing or losing exceptions from comparisons with NaN.
2018-01-09 Martin Liska <mliska@suse.cz>
PR sanitizer/82517
* asan.c (shadow_mem_size): Add gcc_assert.
2018-01-09 Georg-Johann Lay <avr@gjlay.de>
Don't save registers in main().
PR target/83738
* doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
* config/avr/avr.opt (-mmain-is-OS_task): New target option.
* config/avr/avr.c (avr_set_current_function): Don't error if
naked, OS_task or OS_main are specified at the same time.
(avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
OS_main.
(avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
attribute.
* common/config/avr/avr-common.c (avr_option_optimization_table):
Switch on -mmain-is-OS_task for optimizing compilations.
2018-01-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/83572
* graphite.c: Include cfganal.h.
(graphite_transform_loops): Connect infinite loops to exit
and remove fake edges at the end.
2018-01-09 Jan Hubicka <hubicka@ucw.cz>
* ipa-inline.c (edge_badness): Revert accidental checkin.
2018-01-09 Jan Hubicka <hubicka@ucw.cz>
PR ipa/80763
* ipa-comdats.c (set_comdat_group): Only set comdat group of real
symbols; not inline clones.
2018-01-09 Jakub Jelinek <jakub@redhat.com>
PR target/83507
* modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
hard registers. Formatting fixes.
PR preprocessor/83722
* gcc.c (try_generate_repro): Pass
&temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
&temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
do_report_bug.
2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
Kito Cheng <kito.cheng@gmail.com>
* config/riscv/riscv.c (machine_function::is_leaf): Remove field.
(riscv_leaf_function_p): Delete.
(riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
* config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
function.
(do_ifelse): New function.
(do_isel): New function.
(do_sub3): New function.
(do_add3): New function.
(do_load_mask_compare): New function.
(do_overlap_load_compare): New function.
(expand_compare_loop): New function.
(expand_block_compare): Call expand_compare_loop() when appropriate.
* config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
option description.
(-mblock-compare-inline-loop-limit): New option.
2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/83677
* config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
Reverse order of second and third operands in first alternative.
* config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
of first and second elements in UNSPEC_VPERMR vector.
(altivec_expand_vec_perm_le): Likewise.
2018-01-08 Jeff Law <law@redhat.com>
PR rtl-optimizatin/81308
* tree-switch-conversion.c (cfg_altered): New file scoped static.
(process_switch): If group_case_labels makes a change, then set
cfg_altered.
(pass_convert_switch::execute): If a switch is converted, then
set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
PR rtl-optimization/81308
* recog.c (split_all_insns): Conditionally cleanup the CFG after
splitting insns.
2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
PR target/83663 - Revert r255946
* config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
generation for cases where splatting a value is not useful.
* simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
across a vec_duplicate and a paradoxical subreg forming a vector
mode to a vec_concat.
2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
-march=armv8.3-a variants.
* config/arm/t-multilib: Likewise.
* config/arm/t-arm-elf: Likewise. Handle dotprod extension.
2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
to generate rtl.
(cceq_ior_compare_complement): Give it a name so I can use it, and
change boolean_or_operator predicate to boolean_operator so it can
be used to generate a crand.
(eqne): New code iterator.
(bd/bd_neg): New code_attrs.
(<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
a single define_insn.
(<bd>tf_<mode>): A new insn pattern for the conditional form branch
decrement (bdnzt/bdnzf/bdzt/bdzf).
* config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
with the new names of the branch decrement patterns, and added the
names of the branch decrement conditional patterns.
2018-01-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/83563
* graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
cache.
2018-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/83713
* convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
2018-01-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/83685
* tree-ssa-pre.c (create_expression_by_pieces): Do not insert
references to abnormals.
2018-01-08 Richard Biener <rguenther@suse.de>
PR lto/83719
* dwarf2out.c (output_indirect_strings): Handle empty
skeleton_debug_str_hash.
(dwarf2out_early_finish): Index strings for -gsplit-dwarf.
2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
(emit_store_direct): Likewise.
(arc_trampoline_adjust_address): Likewise.
(arc_asm_trampoline_template): New function.
(arc_initialize_trampoline): Use asm_trampoline_template.
(TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
* config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
* config/arc/arc.md (flush_icache): Delete pattern.
2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
* config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
munaligned-access.
2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR target/83681
* config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
by not USED_FOR_TARGET.
(make_pass_resolve_sw_modes): Likewise.
2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config/nios2/nios2.h (nios2_section_threshold): Guard by not
USED_FOR_TARGET.
2018-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/83580
* tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
2018-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/83517
* match.pd ((t * 2) / 2) -> t): Add missing :c.
2018-01-06 Aldy Hernandez <aldyh@redhat.com>
PR middle-end/81897
* tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
basic blocks with a small number of successors.
(convert_control_dep_chain_into_preds): Improve handling of
forwarder blocks.
(dump_predicates): Split apart into...
(dump_pred_chain): ...here...
(dump_pred_info): ...and here.
(can_one_predicate_be_invalidated_p): Add debugging printfs.
(can_chain_union_be_invalidated_p): Improve check for invalidation
of paths.
(uninit_uses_cannot_happen): Avoid unnecessary if
convert_control_dep_chain_into_preds yielded nothing.
2018-01-06 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83640
* gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
subtracting negative offset from size.
(builtin_access::overlap): Adjust offset bounds of the access to fall
within the size of the object if possible.
2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
PR rtl-optimization/83699
* expmed.c (extract_bit_field_1): Restrict the vector usage of
extract_bit_field_as_subreg to cases in which the extracted
value is also a vector.
* lra-constraints.c (process_alt_operands): Test for the equivalence
substitutions when detecting a possible reload cycle.
2018-01-06 Jakub Jelinek <jakub@redhat.com>
PR debug/83480
* toplev.c (process_options): Don't enable debug_nonbind_markers_p
by default if flag_selective_schedling{,2}. Formatting fixes.
PR rtl-optimization/83682
* rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
if it has non-VECTOR_MODE element mode.
(vec_duplicate_p): Likewise.
PR middle-end/83694
* cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
2018-01-05 Jakub Jelinek <jakub@redhat.com>
PR target/83604
* config/i386/i386-builtin.def
(__builtin_ia32_vgf2p8affineinvqb_v64qi,
__builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
Require also OPTION_MASK_ISA_AVX512F in addition to
OPTION_MASK_ISA_GFNI.
(__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
__builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
to OPTION_MASK_ISA_GFNI.
(__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
OPTION_MASK_ISA_AVX512BW.
(__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
addition to OPTION_MASK_ISA_GFNI.
(__builtin_ia32_vgf2p8affineinvqb_v16qi,
__builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
to OPTION_MASK_ISA_GFNI.
* config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
a requirement for all ISAs rather than any of them with a few
exceptions.
(ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
processing.
(ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
bitmasks to be enabled with 3 exceptions, instead of requiring any
enabled ISA with lots of exceptions.
* config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
Change avx512bw in isa attribute to avx512f.
* config/i386/sgxintrin.h: Add license boilerplate.
* config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
to __AVX512F__ and __AVX512VL to __AVX512VL__.
(_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
_mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
defined.
* config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
_mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
temporarily sse2 rather than sse if not enabled already.
PR target/83604
* config/i386/sse.md (VI248_VLBW): Rename to ...
(VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
(vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
mode iterator instead of VI248_VLBW.
2018-01-05 Jan Hubicka <hubicka@ucw.cz>
* ipa-fnsummary.c (record_modified_bb_info): Add OP.
(record_modified): Skip clobbers; add debug output.
(param_change_prob): Use sreal frequencies.
2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
punt for user-aligned variables.
2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
* tree-chrec.c (chrec_contains_symbols): Return true for
POLY_INT_CST.
2018-01-05 Sudakshina Das <sudi.das@arm.com>
PR target/82439
* simplify-rtx.c (simplify_relational_operation_1): Add simplifications
of (x|y) == x for BICS pattern.
2018-01-05 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/83605
* gimple-ssa-strength-reduction.c: Include tree-eh.h.
(find_candidates_dom_walker::before_dom_children): Ignore stmts that
can throw.
2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
* config/epiphany/rtems.h: New file.
2018-01-04 Jakub Jelinek <jakub@redhat.com>
Uros Bizjak <ubizjak@gmail.com>
PR target/83554
* config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
QIreg_operand instead of register_operand predicate.
* config/i386/i386.c (ix86_rop_should_change_byte_p,
set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
comments instead of -fmitigate[-_]rop.
2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR bootstrap/81926
* cgraphunit.c (symbol_table::compile): Switch to text_section
before calling assembly_start debug hook.
* run-rtl-passes.c (run_rtl_passes): Likewise.
Include output.h.
2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vrp.c (extract_range_from_binary_expr_1): Check
range_int_cst_p rather than !symbolic_range_p before calling
extract_range_from_multiplicative_op_1.
2018-01-04 Jeff Law <law@redhat.com>
* tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
redundant test in assertion.
2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
* doc/rtl.texi: Document machine_mode wrapper classes.
2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
* fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
using tree_to_uhwi.
2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
* tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
the VEC_PERM_EXPR fold to fail.
2018-01-04 Jakub Jelinek <jakub@redhat.com>
PR debug/83585
* bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
to switched_sections.
2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
PR target/83680
* config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
test for d.testing.
2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
PR target/83387
* config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
allow arguments in FP registers if TARGET_HARD_FLOAT is false.
2018-01-04 Jakub Jelinek <jakub@redhat.com>
PR debug/83666
* cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
is BLKmode and bitpos not zero or mode change is needed.
2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
PR target/83675
* config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
TARGET_VIS2.
2018-01-04 Uros Bizjak <ubizjak@gmail.com>
PR target/83628
* config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
instead of MULT rtx. Update all corresponding splitters.
(*saddl_se): Ditto.
(*ssub<modesuffix>): Ditto.
(*ssubl_se): Ditto.
(*cmp_sadd_di): Update split patterns.
(*cmp_sadd_si): Ditto.
(*cmp_sadd_sidi): Ditto.
(*cmp_ssub_di): Ditto.
(*cmp_ssub_si): Ditto.
(*cmp_ssub_sidi): Ditto.
* config/alpha/predicates.md (const23_operand): New predicate.
* config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
Look for ASHIFT, not MULT inner operand.
(alpha_split_conditional_move): Update for *sadd<modesuffix> change.
2018-01-04 Martin Liska <mliska@suse.cz>
PR gcov-profile/83669
* gcov.c (output_intermediate_file): Add version to intermediate
gcov file.
* doc/gcov.texi: Document new field 'version' in intermediate
file format. Fix location of '-k' option of gcov command.
2018-01-04 Martin Liska <mliska@suse.cz>
PR ipa/82352
* ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
2018-01-04 Jakub Jelinek <jakub@redhat.com>
* gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
2018-01-03 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83655
* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
checking calls with invalid arguments.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (vect_get_store_rhs): New function.
(vectorizable_mask_load_store): Delete.
(vectorizable_call): Return false for masked loads and stores.
(vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
instead of gimple_assign_rhs1.
(vectorizable_load): Handle IFN_MASK_LOAD.
(vect_transform_stmt): Don't set is_store for call_vec_info_type.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (vect_build_gather_load_calls): New function,
split out from..,
(vectorizable_mask_load_store): ...here.
(vectorizable_load): ...and here.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (vect_build_all_ones_mask)
(vect_build_zero_merge_argument): New functions, split out from...
(vectorizable_load): ...here.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (vect_check_store_rhs): New function,
split out from...
(vectorizable_mask_load_store): ...here.
(vectorizable_store): ...and here.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-stmts.c (vect_check_load_store_mask): New function,
split out from...
(vectorizable_mask_load_store): ...here.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
(vect_model_store_cost): Take a vec_load_store_type instead of a
vect_def_type.
* tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
(vect_model_store_cost): Take a vec_load_store_type instead of a
vect_def_type.
(vectorizable_mask_load_store): Update accordingly.
(vectorizable_store): Likewise.
* tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-loop.c (vect_transform_loop): Stub out scalar
IFN_MASK_LOAD calls here rather than...
* tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* expmed.c (extract_bit_field_1): For vector extracts,
fall back to extract_bit_field_as_subreg if vec_extract
isn't available.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
they are variable or constant sized.
(assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
slots for constant-sized data.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
handling COND_EXPRs with boolean comparisons, try to find a better
basis for the mask type than the boolean itself.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
is calculated and how it can be overridden.
* genmodes.c (max_bitsize_mode_any_mode): New variable.
(create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
if defined.
(emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
if nonzero.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
Remove the mode argument.
(aarch64_simd_valid_immediate): Remove the mode and inverse
arguments.
* config/aarch64/iterators.md (bitsize): New iterator.
* config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
(ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
* config/aarch64/constraints.md (Do, Db, Dn): Update calls to
aarch64_simd_valid_immediate.
* config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
(aarch64_reg_or_bic_imm): Likewise.
* config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
with an insn_type enum and msl with a modifier_type enum.
Replace element_width with a scalar_mode. Change the shift
to unsigned int. Add constructors for scalar_float_mode and
scalar_int_mode elements.
(aarch64_vect_float_const_representable_p): Delete.
(aarch64_can_const_movi_rtx_p)
(aarch64_simd_scalar_immediate_valid_for_move)
(aarch64_simd_make_constant): Update call to
aarch64_simd_valid_immediate.
(aarch64_advsimd_valid_immediate_hs): New function.
(aarch64_advsimd_valid_immediate): Likewise.
(aarch64_simd_valid_immediate): Remove mode and inverse
arguments. Rewrite to use the above. Use const_vec_duplicate_p
to detect duplicated constants and use aarch64_float_const_zero_rtx_p
and aarch64_float_const_representable_p on the result.
(aarch64_output_simd_mov_immediate): Remove mode argument.
Update call to aarch64_simd_valid_immediate and use of
simd_immediate_info.
(aarch64_output_scalar_simd_mov_immediate): Update call
accordingly.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
(mode_nunits): Likewise CONST_MODE_NUNITS.
* machmode.def (ADJUST_NUNITS): Document.
* genmodes.c (mode_data::need_nunits_adj): New field.
(blank_mode): Update accordingly.
(adj_nunits): New variable.
(print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
parameter.
(emit_mode_size_inline): Set need_bytesize_adj for all modes
listed in adj_nunits.
(emit_mode_nunits_inline): Set need_nunits_adj for all modes
listed in adj_nunits. Don't emit case statements for such modes.
(emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
nothing if adj_nunits is nonnull.
(emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
(emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
(emit_mode_fbit): Update use of print_maybe_const_decl.
(emit_move_size): Likewise. Treat the array as non-const
if adj_nunits.
(emit_mode_adjustments): Handle adj_nunits.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
* genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
(VECTOR_MODES): Use it.
(make_vector_modes): Take the prefix as an argument.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* mode-classes.def (MODE_VECTOR_BOOL): New mode class.
* machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
for MODE_VECTOR_BOOL.
* machmode.def (VECTOR_BOOL_MODE): Document.
* genmodes.c (VECTOR_BOOL_MODE): New macro.
(make_vector_bool_mode): New function.
(complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
MODE_VECTOR_BOOL.
* lto-streamer-in.c (lto_input_mode_table): Likewise.
* rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
Likewise.
* stor-layout.c (int_mode_for_mode): Likewise.
* tree.c (build_vector_type_for_mode): Likewise.
* varasm.c (output_constant_pool_2): Likewise.
* emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
for MODE_VECTOR_BOOL.
* expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
of mode class checks.
* tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
instead of a list of mode class checks.
(expand_vector_scalar_condition): Likewise.
(type_for_widest_vector_mode): Handle BImode as an inner mode.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* machmode.h (mode_size): Change from unsigned short to
poly_uint16_pod.
(mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
(GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
or if measurement_type is not polynomial.
(fixed_size_mode::includes_p): Check for constant-sized modes.
* genmodes.c (emit_mode_size_inline): Make mode_size_inline
return a poly_uint16 rather than an unsigned short.
(emit_mode_size): Change the type of mode_size from unsigned short
to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
(emit_mode_adjustments): Cope with polynomial vector sizes.
* lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
for GET_MODE_SIZE.
* lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
for GET_MODE_SIZE.
* auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
* builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
* caller-save.c (setup_save_areas): Likewise.
(replace_reg_with_saved_mem): Likewise.
* calls.c (emit_library_call_value_1): Likewise.
* combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
* combine.c (simplify_set, make_extraction, simplify_shift_const_1)
(gen_lowpart_for_combine): Likewise.
* convert.c (convert_to_integer_1): Likewise.
* cse.c (equiv_constant, cse_insn): Likewise.
* cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
(cselib_subst_to_values): Likewise.
* dce.c (word_dce_process_block): Likewise.
* df-problems.c (df_word_lr_mark_ref): Likewise.
* dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
* dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
(concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
(rtl_for_decl_location): Likewise.
* emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
* expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
* expr.c (emit_group_load_1, clear_storage_hints): Likewise.
(emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
(expand_expr_real_1): Likewise.
* function.c (assign_parm_setup_block_p, assign_parm_setup_block)
(pad_below): Likewise.
* gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
* gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
* ira.c (get_subreg_tracking_sizes): Likewise.
* ira-build.c (ira_create_allocno_objects): Likewise.
* ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
(ira_sort_regnos_for_alter_reg): Likewise.
* ira-costs.c (record_operand_costs): Likewise.
* lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
(resolve_simple_move): Likewise.
* lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
(process_addr_reg, simplify_operand_subreg, curr_insn_transform)
(lra_constraints): Likewise.
(CONST_POOL_OK_P): Reject variable-sized modes.
* lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
(add_pseudo_to_slot, lra_spill): Likewise.
* omp-low.c (omp_clause_aligned_alignment): Likewise.
* optabs-query.c (get_best_extraction_insn): Likewise.
* optabs-tree.c (expand_vec_cond_expr_p): Likewise.
* optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
(expand_mult_highpart, valid_multiword_target_p): Likewise.
* recog.c (offsettable_address_addr_space_p): Likewise.
* regcprop.c (maybe_mode_change): Likewise.
* reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
* regrename.c (build_def_use): Likewise.
* regstat.c (dump_reg_info): Likewise.
* reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
(find_reloads, find_reloads_subreg_address): Likewise.
* reload1.c (eliminate_regs_1): Likewise.
* rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
* simplify-rtx.c (avoid_constant_pool_reference): Likewise.
(simplify_binary_operation_1, simplify_subreg): Likewise.
* targhooks.c (default_function_arg_padding): Likewise.
(default_hard_regno_nregs, default_class_max_nregs): Likewise.
* tree-cfg.c (verify_gimple_assign_binary): Likewise.
(verify_gimple_assign_ternary): Likewise.
* tree-inline.c (estimate_move_cost): Likewise.
* tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
* tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
(get_address_cost_ainc): Likewise.
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
(vect_supportable_dr_alignment): Likewise.
* tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
(vectorizable_reduction): Likewise.
* tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
(vectorizable_operation, vectorizable_load): Likewise.
* tree.c (build_same_sized_truth_vector_type): Likewise.
* valtrack.c (cleanup_auto_inc_dec): Likewise.
* var-tracking.c (emit_note_insn_var_location): Likewise.
* config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
(ADDR_VEC_ALIGN): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* machmode.h (mode_to_bits): Return a poly_uint16 rather than an
unsigned short.
(GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
or if measurement_type is polynomial.
* calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
* combine.c (make_extraction): Likewise.
* dse.c (find_shift_sequence): Likewise.
* dwarf2out.c (mem_loc_descriptor): Likewise.
* expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
(extract_bit_field, extract_low_bits): Likewise.
* expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
(optimize_bitfield_assignment_op, expand_assignment): Likewise.
(store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
* fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
* gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
* reload.c (find_reloads): Likewise.
* reload1.c (alter_reg): Likewise.
* stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
* targhooks.c (default_secondary_memory_needed_mode): Likewise.
* tree-if-conv.c (predicate_mem_writes): Likewise.
* tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
* tree-vect-patterns.c (adjust_bool_pattern): Likewise.
* tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
* valtrack.c (dead_debug_insert_temp): Likewise.
* varasm.c (mergeable_constant_section): Likewise.
* config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* expr.c (expand_assignment): Cope with polynomial mode sizes
when assigning to a CONCAT.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* machmode.h (mode_precision): Change from unsigned short to
poly_uint16_pod.
(mode_to_precision): Return a poly_uint16 rather than an unsigned
short.
(GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
or if measurement_type is not polynomial.
(HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
in which the mode is already known to be a scalar_int_mode.
* genmodes.c (emit_mode_precision): Change the type of mode_precision
from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
initializer.
* lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
for GET_MODE_PRECISION.
* lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
for GET_MODE_PRECISION.
* combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
as polynomial.
(try_combine, find_split_point, combine_simplify_rtx): Likewise.
(expand_field_assignment, make_extraction): Likewise.
(make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
(get_last_value): Likewise.
* convert.c (convert_to_integer_1): Likewise.
* cse.c (cse_insn): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* lra-constraints.c (simplify_operand_subreg): Likewise.
* optabs-query.c (can_atomic_load_p): Likewise.
* optabs.c (expand_atomic_load): Likewise.
(expand_atomic_store): Likewise.
* ree.c (combine_reaching_defs): Likewise.
* rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
* rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
* tree.h (type_has_mode_precision_p): Likewise.
* ubsan.c (instrument_si_overflow): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
polynomial numbers of units.
(SET_TYPE_VECTOR_SUBPARTS): Likewise.
(valid_vector_subparts_p): New function.
(build_vector_type): Remove temporary shim and take the number
of units as a poly_uint64 rather than an int.
(build_opaque_vector_type): Take the number of units as a
poly_uint64 rather than an int.
* tree.c (build_vector_from_ctor): Handle polynomial
TYPE_VECTOR_SUBPARTS.
(type_hash_canon_hash, type_cache_hasher::equal): Likewise.
(uniform_vector_p, vector_type_mode, build_vector): Likewise.
(build_vector_from_val): If the number of units is variable,
use build_vec_duplicate_cst for constant operands and
VEC_DUPLICATE_EXPR otherwise.
(make_vector_type): Remove temporary is_constant ().
(build_vector_type, build_opaque_vector_type): Take the number of
units as a poly_uint64 rather than an int.
(check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
VECTOR_CST_NELTS.
* cfgexpand.c (expand_debug_expr): Likewise.
* expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
(store_constructor, expand_expr_real_1): Likewise.
(const_scalar_mask_from_tree): Likewise.
* fold-const-call.c (fold_const_reduction): Likewise.
* fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
(operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
(native_encode_vector, vec_cst_ctor_to_array): Likewise.
(fold_relational_const): Likewise.
(native_interpret_vector): Likewise. Change the size from an
int to an unsigned int.
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
TYPE_VECTOR_SUBPARTS.
(gimple_fold_indirect_ref, gimple_build_vector): Likewise.
(gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
duplicating a non-constant operand into a variable-length vector.
* hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
* ipa-icf.c (sem_variable::equals): Likewise.
* match.pd: Likewise.
* omp-simd-clone.c (simd_clone_subparts): Likewise.
* print-tree.c (print_node): Likewise.
* stor-layout.c (layout_type): Likewise.
* targhooks.c (default_builtin_vectorization_cost): Likewise.
* tree-cfg.c (verify_gimple_comparison): Likewise.
(verify_gimple_assign_binary): Likewise.
(verify_gimple_assign_ternary): Likewise.
(verify_gimple_assign_single): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
(simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
* tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
(vect_grouped_load_supported, vect_permute_load_chain): Likewise.
(vect_shift_permute_load_chain): Likewise.
* tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
(expand_vector_condition, optimize_vector_constructor): Likewise.
(lower_vec_perm, get_compute_type): Likewise.
* tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
(get_initial_defs_for_reduction, vect_transform_loop): Likewise.
* tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
(vect_recog_mask_conversion_pattern): Likewise.
* tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
(vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
* tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
(get_group_load_store_type, vectorizable_mask_load_store): Likewise.
(vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
(vectorizable_shift, vectorizable_operation, vectorizable_store)
(vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
(supportable_widening_operation): Likewise.
(supportable_narrowing_operation): Likewise.
* tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
Likewise.
* varasm.c (output_constant): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
so that both the length == 3 and length != 3 cases set up their
own permute vectors. Add comments explaining why we know the
number of elements is constant.
(vect_permute_load_chain): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* machmode.h (mode_nunits): Change from unsigned char to
poly_uint16_pod.
(ONLY_FIXED_SIZE_MODES): New macro.
(pod_mode::measurement_type, scalar_int_mode::measurement_type)
(scalar_float_mode::measurement_type, scalar_mode::measurement_type)
(complex_mode::measurement_type, fixed_size_mode::measurement_type):
New typedefs.
(mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
(GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
or if measurement_type is not polynomial.
* genmodes.c (ZERO_COEFFS): New macro.
(emit_mode_nunits_inline): Make mode_nunits_inline return a
poly_uint16.
(emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
Use ZERO_COEFFS when emitting initializers.
* data-streamer.h (bp_pack_poly_value): New function.
(bp_unpack_poly_value): Likewise.
* lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
for GET_MODE_NUNITS.
* lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
for GET_MODE_NUNITS.
* tree.c (make_vector_type): Remove temporary shim and make
the real function take the number of units as a poly_uint64
rather than an int.
(build_vector_type_for_mode): Handle polynomial nunits.
* dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
* emit-rtl.c (const_vec_series_p_1): Likewise.
(gen_rtx_CONST_VECTOR): Likewise.
* fold-const.c (test_vec_duplicate_folding): Likewise.
* genrecog.c (validate_pattern): Likewise.
* optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
* optabs-tree.c (expand_vec_cond_expr_p): Likewise.
* optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
(shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
(expand_vec_cond_expr, expand_mult_highpart): Likewise.
* rtlanal.c (subreg_get_info): Likewise.
* tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
(vect_grouped_load_supported): Likewise.
* tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
* tree-vect-loop.c (have_whole_vector_shift): Likewise.
* simplify-rtx.c (simplify_unary_operation_1): Likewise.
(simplify_const_unary_operation, simplify_binary_operation_1)
(simplify_const_binary_operation, simplify_ternary_operation)
(test_vector_ops_duplicate, test_vector_ops): Likewise.
(simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
instead of CONST_VECTOR_NUNITS.
* varasm.c (output_constant_pool_2): Likewise.
* rtx-vector-builder.c (rtx_vector_builder::build): Only include the
explicit-encoded elements in the XVEC for variable-length vectors.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* coretypes.h (fixed_size_mode): Declare.
(fixed_size_mode_pod): New typedef.
* builtins.h (target_builtins::x_apply_args_mode)
(target_builtins::x_apply_result_mode): Change type to
fixed_size_mode_pod.
* builtins.c (apply_args_size, apply_result_size, result_vector)
(expand_builtin_apply_args_1, expand_builtin_apply)
(expand_builtin_return): Update accordingly.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* cse.c (hash_rtx_cb): Hash only the encoded elements.
* cselib.c (cselib_hash_rtx): Likewise.
* expmed.c (make_tree): Build VECTOR_CSTs directly from the
CONST_VECTOR encoding.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Jeff Law <law@redhat.com>
PR target/83641
* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
and add REG_CFA_ADJUST_CFA notes in that case to both insns.
PR target/83641
* config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
explicitly probe *sp in a noreturn function if there were any callee
register saves or frame pointer is needed.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
PR debug/83621
* cfgexpand.c (expand_debug_expr): Return NULL if mode is
BLKmode for ternary, binary or unary expressions.
PR debug/83645
* var-tracking.c (delete_vta_debug_insn): New inline function.
(delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
insns from get_insns () to NULL instead of each bb separately.
Use delete_vta_debug_insn. No longer static.
(vt_debug_insns_local, variable_tracking_main_1): Adjust
delete_vta_debug_insns callers.
* rtl.h (delete_vta_debug_insns): Declare.
* final.c (rest_of_handle_final): Call delete_vta_debug_insns
instead of variable_tracking_main.
2018-01-03 Martin Sebor <msebor@redhat.com>
PR tree-optimization/83603
* calls.c (maybe_warn_nonstring_arg): Avoid accessing function
arguments past the endof the argument list in functions declared
without a prototype.
* gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
Avoid checking when arguments are null.
2018-01-03 Martin Sebor <msebor@redhat.com>
PR c/83559
* doc/extend.texi (attribute const): Fix a typo.
* ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
issuing -Wsuggest-attribute for void functions.
2018-01-03 Martin Sebor <msebor@redhat.com>
* gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
offset_int::from instead of wide_int::to_shwi.
(maybe_diag_overlap): Remove assertion.
Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
* gimple-ssa-sprintf.c (format_directive): Same.
(parse_directive): Same.
(sprintf_dom_walker::compute_format_length): Same.
(try_substitute_return_value): Same.
2018-01-03 Jeff Law <law@redhat.com>
PR middle-end/83654
* explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
non-constant residual for zero at runtime and avoid probing in
that case. Reorganize code for trailing problem to mirror handling
of the residual.
2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
PR tree-optimization/83501
* tree-ssa-strlen.c (get_string_cst): New.
(handle_char_store): Call get_string_cst.
2018-01-03 Martin Liska <mliska@suse.cz>
PR tree-optimization/83593
* tree-ssa-strlen.c: Include tree-cfg.h.
(strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
(strlen_dom_walker): Add new member variable m_cleanup_cfg.
(strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
to false.
(strlen_dom_walker::before_dom_children): Call
gimple_purge_dead_eh_edges. Dump tranformation with details
dump flags.
(strlen_dom_walker::before_dom_children): Update call by adding
new argument cleanup_eh.
(pass_strlen::execute): Return TODO_cleanup_cfg if needed.
2018-01-03 Martin Liska <mliska@suse.cz>
PR ipa/83549
* cif-code.def (VARIADIC_THUNK): New enum value.
* ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
thunks.
2018-01-03 Jan Beulich <jbeulich@suse.com>
* sse.md (mov<mode>_internal): Tighten condition for when to use
vmovdqu<ssescalarsize> for TI and OI modes.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
Update copyright years.
2018-01-03 Martin Liska <mliska@suse.cz>
PR ipa/83594
* ipa-visibility.c (function_and_variable_visibility): Skip
functions with noipa attribure.
2018-01-03 Jakub Jelinek <jakub@redhat.com>
* gcc.c (process_command): Update copyright notice dates.
* gcov-dump.c (print_version): Ditto.
* gcov.c (print_version): Ditto.
* gcov-tool.c (print_version): Ditto.
* gengtype.c (create_file): Ditto.
* doc/cpp.texi: Bump @copying's copyright year.
* doc/cppinternals.texi: Ditto.
* doc/gcc.texi: Ditto.
* doc/gccint.texi: Ditto.
* doc/gcov.texi: Ditto.
* doc/install.texi: Ditto.
* doc/invoke.texi: Ditto.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* vector-builder.h (vector_builder::m_full_nelts): Change from
unsigned int to poly_uint64.
(vector_builder::full_nelts): Update prototype accordingly.
(vector_builder::new_vector): Likewise.
(vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
(vector_builder::operator ==): Likewise.
(vector_builder::finalize): Likewise.
* int-vector-builder.h (int_vector_builder::int_vector_builder):
Take the number of elements as a poly_uint64 rather than an
unsigned int.
* vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
from unsigned int to poly_uint64.
(vec_perm_indices::vec_perm_indices): Update prototype accordingly.
(vec_perm_indices::new_vector): Likewise.
(vec_perm_indices::length): Likewise.
(vec_perm_indices::nelts_per_input): Likewise.
(vec_perm_indices::input_nelts): Likewise.
* vec-perm-indices.c (vec_perm_indices::new_vector): Take the
number of elements per input as a poly_uint64 rather than an
unsigned int. Use the original encoding for variable-length
vectors, rather than clamping each individual element.
For the second and subsequent elements in each pattern,
clamp the step and base before clamping their sum.
(vec_perm_indices::series_p): Handle polynomial element counts.
(vec_perm_indices::all_in_range_p): Likewise.
(vec_perm_indices_to_tree): Likewise.
(vec_perm_indices_to_rtx): Likewise.
* tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
* tree-vector-builder.c (tree_vector_builder::new_unary_operation)
(tree_vector_builder::new_binary_operation): Handle polynomial
element counts. Return false if we need to know the number
of elements at compile time.
* fold-const.c (fold_vec_perm): Punt if the number of elements
isn't known at compile time.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* vec-perm-indices.h (vec_perm_builder): Change element type
from HOST_WIDE_INT to poly_int64.
(vec_perm_indices::element_type): Update accordingly.
(vec_perm_indices::clamp): Handle polynomial element_types.
* vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
(vec_perm_indices::all_in_range_p): Likewise.
(tree_to_vec_perm_builder): Check for poly_int64 trees rather
than shwi trees.
* vector-builder.h (vector_builder::stepped_sequence_p): Handle
polynomial vec_perm_indices element types.
* int-vector-builder.h (int_vector_builder::equal_p): Likewise.
* fold-const.c (fold_vec_perm): Likewise.
* optabs.c (shift_amt_for_vec_perm_mask): Likewise.
* tree-vect-generic.c (lower_vec_perm): Likewise.
* tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
* config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
element type to HOST_WIDE_INT.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* alias.c (addr_side_effect_eval): Take the size as a poly_int64
rather than an int. Use plus_constant.
(memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* calls.c (emit_call_1, expand_call): Change struct_value_size from
a HOST_WIDE_INT to a poly_int64.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* calls.c (load_register_parameters): Cope with polynomial
mode sizes. Require a constant size for BLKmode parameters
that aren't described by a PARALLEL. If BLOCK_REG_PADDING
forces a parameter to be padded at the lsb end in order to
fill a complete number of words, require the parameter size
to be ordered wrt UNITS_PER_WORD.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* reload1.c (spill_stack_slot_width): Change element type
from unsigned int to poly_uint64_pod.
(alter_reg): Treat mode sizes as polynomial.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* reload.c (complex_word_subreg_p): New function.
(reload_inner_reg_of_subreg, push_reload): Use it.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* lra-constraints.c (process_alt_operands): Reject matched
operands whose sizes aren't ordered.
(match_reload): Refer to this check here.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
that the mode size is in the set {1, 2, 4, 8, 16}.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
Use plus_constant instead of gen_rtx_PLUS.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
* config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
* config/cr16/cr16.c (cr16_push_rounding): ...this new function.
* config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
* config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
* config/h8300/h8300.c (h8300_push_rounding): ...this new function.
* config/i386/i386-protos.h (ix86_push_rounding): Declare.
* config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
* config/i386/i386.c (ix86_push_rounding): ...this new function.
* config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
a poly_int64.
* config/m32c/m32c.c (m32c_push_rounding): Likewise.
* config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
* config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
* config/m68k/m68k.c (m68k_push_rounding): ...this new function.
* config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
* config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
* config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
* config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
* config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
* config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
function.
* expr.c (emit_move_resolve_push): Treat the input and result
of PUSH_ROUNDING as a poly_int64.
(emit_move_complex_push, emit_single_push_insn_1): Likewise.
(emit_push_insn): Likewise.
* lra-eliminations.c (mark_not_eliminable): Likewise.
* recog.c (push_operand): Likewise.
* reload1.c (elimination_effects): Likewise.
* rtlanal.c (nonzero_bits1): Likewise.
* calls.c (store_one_arg): Likewise. Require the padding to be
known at compile time.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
Use plus_constant instead of gen_rtx_PLUS.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
rather than an int.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* expr.c (expand_expr_real_1): Use tree_to_poly_uint64
instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
via stack temporaries. Treat the mode size as polynomial too.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* expr.c (expand_expr_real_2): When handling conversions involving
unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
as a poly_uint64 too.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* combine.c (can_change_dest_mode): Handle polynomial
REGMODE_NATURAL_SIZE.
* expmed.c (store_bit_field_1): Likewise.
* expr.c (store_constructor): Likewise.
* emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
and polynomial REGMODE_NATURAL_SIZE.
(gen_lowpart_common): Likewise.
* reginfo.c (record_subregs_of_mode): Likewise.
* rtlanal.c (read_modify_subreg_p): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
numbers of elements.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* match.pd: Cope with polynomial numbers of vector elements.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
in a POINTER_PLUS_EXPR.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* omp-simd-clone.c (simd_clone_subparts): New function.
(simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
(ipa_simd_modify_function_body): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
(expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
(expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
(expand_vector_condition, vector_element): Likewise.
(subparts_gt): New function.
(get_compute_type): Use subparts_gt.
(count_type_subparts): Delete.
(expand_vector_operations_1): Use subparts_gt instead of
count_type_subparts.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-data-refs.c (vect_no_alias_p): Replace with...
(vect_compile_time_alias): ...this new function. Do the calculation
on poly_ints rather than trees.
(vect_prune_runtime_alias_test_list): Update call accordingly.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
numbers of units.
(vect_schedule_slp_instance): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
constant and extern definitions for variable-length vectors.
(vect_get_constant_vectors): Note that the number of units
is known to be constant.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-stmts.c (vectorizable_conversion): Treat the number
of units as polynomial. Choose between WIDE and NARROW based
on multiple_p.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-stmts.c (simd_clone_subparts): New function.
(vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-stmts.c (vectorizable_call): Treat the number of
vectors as polynomial. Use build_index_vector for
IFN_GOMP_SIMD_LANE.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-stmts.c (get_load_store_type): Treat the number of
units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
for variable-length vectors.
(vectorizable_mask_load_store): Treat the number of units as
polynomial, asserting that it is constant if the condition has
already been enforced.
(vectorizable_store, vectorizable_load): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-loop.c (vectorizable_live_operation): Treat the number
of units as polynomial. Punt if we can't tell at compile time
which vector contains the final result.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-loop.c (vectorizable_induction): Treat the number
of units as polynomial. Punt on SLP inductions. Use an integer
VEC_SERIES_EXPR for variable-length integer reductions. Use a
cast of such a series for variable-length floating-point
reductions.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree.h (build_index_vector): Declare.
* tree.c (build_index_vector): New function.
* tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
of units as polynomial, forcibly converting it to a constant if
vectorizable_reduction has already enforced the condition.
(vect_create_epilog_for_reduction): Likewise. Use build_index_vector
to create a {1,2,3,...} vector.
(vectorizable_reduction): Treat the number of units as polynomial.
Choose vectype_in based on the largest scalar element size rather
than the smallest number of units. Enforce the restrictions
relied on above.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
number of units as polynomial.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* target.h (vector_sizes, auto_vector_sizes): New typedefs.
* target.def (autovectorize_vector_sizes): Return the vector sizes
by pointer, using vector_sizes rather than a bitmask.
* targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
* targhooks.c (default_autovectorize_vector_sizes): Likewise.
* config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
Likewise.
* config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
* config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
* config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
* config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
* omp-general.c (omp_max_vf): Likewise.
* omp-low.c (omp_clause_aligned_alignment): Likewise.
* optabs-query.c (can_vec_mask_load_store_p): Likewise.
* tree-vect-loop.c (vect_analyze_loop): Likewise.
* tree-vect-slp.c (vect_slp_bb): Likewise.
* doc/tm.texi: Regenerate.
* tree-vectorizer.h (current_vector_size): Change from an unsigned int
to a poly_uint64.
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
the vector size as a poly_uint64 rather than an unsigned int.
(current_vector_size): Change from an unsigned int to a poly_uint64.
(get_vectype_for_scalar_type): Update accordingly.
* tree.h (build_truth_vector_type): Take the size and number of
units as a poly_uint64 rather than an unsigned int.
(build_vector_type): Add a temporary overload that takes
the number of units as a poly_uint64 rather than an unsigned int.
* tree.c (make_vector_type): Likewise.
(build_truth_vector_type): Take the number of units as a poly_uint64
rather than an unsigned int.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* target.def (get_mask_mode): Take the number of units and length
as poly_uint64s rather than unsigned ints.
* targhooks.h (default_get_mask_mode): Update accordingly.
* targhooks.c (default_get_mask_mode): Likewise.
* config/i386/i386.c (ix86_get_mask_mode): Likewise.
* doc/tm.texi: Regenerate.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
* omp-general.c (omp_max_vf): Likewise.
* omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
(expand_omp_simd): Handle polynomial safelen.
* omp-low.c (omplow_simd_context): Add a default constructor.
(omplow_simd_context::max_vf): Change from int to poly_uint64.
(lower_rec_simd_input_clauses): Update accordingly.
(lower_rec_input_clauses): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vectorizer.h (vect_nunits_for_cost): New function.
* tree-vect-loop.c (vect_model_reduction_cost): Use it.
* tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
(vect_analyze_slp_cost): Likewise.
* tree-vect-stmts.c (vect_model_store_cost): Likewise.
(vect_model_load_cost): Likewise.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
(vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
from an unsigned int * to a poly_uint64_pod *.
(calculate_unrolling_factor): New function.
(vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* tree-vectorizer.h (_slp_instance::unrolling_factor): Change
from an unsigned int to a poly_uint64.
(_loop_vec_info::slp_unrolling_factor): Likewise.
(_loop_vec_info::vectorization_factor): Change from an int
to a poly_uint64.
(MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
(vect_get_num_vectors): New function.
(vect_update_max_nunits, vect_vf_for_cost): Likewise.
(vect_get_num_copies): Use vect_get_num_vectors.
(vect_analyze_data_ref_dependences): Change max_vf from an int *
to an unsigned int *.
(vect_analyze_data_refs): Change min_vf from an int * to a
poly_uint64 *.
(vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
than an unsigned HOST_WIDE_INT.
* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
(vect_analyze_data_ref_dependence): Change max_vf from an int *
to an unsigned int *.
(vect_analyze_data_ref_dependences): Likewise.
(vect_compute_data_ref_alignment): Handle polynomial vf.
(vect_enhance_data_refs_alignment): Likewise.
(vect_prune_runtime_alias_test_list): Likewise.
(vect_shift_permute_load_chain): Likewise.
(vect_supportable_dr_alignment): Likewise.
(dependence_distance_ge_vf): Take the vectorization factor as a
poly_uint64 rather than an unsigned HOST_WIDE_INT.
(vect_analyze_data_refs): Change min_vf from an int * to a
poly_uint64 *.
* tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
vfm1 as a poly_uint64 rather than an int. Make the same change
for the returned bound_scalar.
(vect_gen_vector_loop_niters): Handle polynomial vf.
(vect_do_peeling): Likewise. Update call to
vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
(vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
be constant.
* tree-vect-loop.c (vect_determine_vectorization_factor)
(vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
(vect_get_known_peeling_cost): Likewise.
(vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
(vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
(vect_transform_loop): Likewise. Use the lowest possible VF when
updating the upper bounds of the loop.
(vect_min_worthwhile_factor): Make static. Return an unsigned int
rather than an int.
* tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
polynomial unroll factors.
(vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
(vect_make_slp_decision): Likewise.
(vect_supported_load_permutation_p): Likewise, and polynomial
vf too.
(vect_analyze_slp_cost): Handle polynomial vf.
(vect_slp_analyze_node_operations): Likewise.
(vect_slp_analyze_bb_1): Likewise.
(vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
than an unsigned HOST_WIDE_INT.
* tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
(vectorizable_load): Handle polynomial vf.
* tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
a poly_uint64.
(adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
Alan Hayward <alan.hayward@arm.com>
David Sherwood <david.sherwood@arm.com>
* match.pd: Handle bit operations involving three constants
and try to fold one pair.
2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
* tree-vect-loop-manip.c: Include gimple-fold.h.
(slpeel_make_loop_iterate_ntimes): Add step, final_iv and
niters_maybe_zero parameters. Handle other cases besides a step of 1.
(vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
Add a path that uses a step of VF instead of 1, but disable it
for now.
(vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
and niters_no_overflow parameters. Update calls to
slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
Create a new SSA name if the latter choses to use a ste other
than zero, and return it via niters_vector_mult_vf_var.
* tree-vect-loop.c (vect_transform_loop): Update calls to
vect_do_peeling, vect_gen_vector_loop_niters and
slpeel_make_loop_iterate_ntimes.
* tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
(vect_gen_vector_loop_niters): Update declarations after above changes.
2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
128-bit round to integer instructions.
(ceil<mode>2): Likewise.
(btrunc<mode>2): Likewise.
(round<mode>2): Likewise.
2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
* config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
unaligned VSX load/store on P8/P9.
(expand_block_clear): Allow the use of unaligned VSX
load/store on P8/P9.
2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
New function.
(rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
swap associated with both a load and a store.
2018-01-02 Andrew Waterman <andrew@sifive.com>
* config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
* config/riscv/riscv.md (clear_cache): Use it.
2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
* web.c: Remove out-of-date comment.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* expr.c (fixup_args_size_notes): Check that any existing
REG_ARGS_SIZE notes are correct, and don't try to re-add them.
(emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
(emit_single_push_insn): ...here.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
(const_vector_encoded_nelts): New function.
(CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
(const_vector_int_elt, const_vector_elt): Declare.
* emit-rtl.c (const_vector_int_elt_1): New function.
(const_vector_elt): Likewise.
* simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
of CONST_VECTOR_ELT.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* expr.c: Include rtx-vector-builder.h.
(const_vector_mask_from_tree): Use rtx_vector_builder and operate
directly on the tree encoding.
(const_vector_from_tree): Likewise.
* optabs.c: Include rtx-vector-builder.h.
(expand_vec_perm_var): Use rtx_vector_builder and create a repeating
sequence of "u" values.
* vec-perm-indices.c: Include rtx-vector-builder.h.
(vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
directly on the vec_perm_indices encoding.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* doc/rtl.texi (const_vector): Describe new encoding scheme.
* Makefile.in (OBJS): Add rtx-vector-builder.o.
* rtx-vector-builder.h: New file.
* rtx-vector-builder.c: Likewise.
* rtl.h (rtx_def::u2): Add a const_vector field.
(CONST_VECTOR_NPATTERNS): New macro.
(CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
(CONST_VECTOR_DUPLICATE_P): Likewise.
(CONST_VECTOR_STEPPED_P): Likewise.
(CONST_VECTOR_ENCODED_ELT): Likewise.
(const_vec_duplicate_p): Check for a duplicated vector encoding.
(unwrap_const_vec_duplicate): Likewise.
(const_vec_series_p): Check for a non-duplicated vector encoding.
Say that the function only returns true for integer vectors.
* emit-rtl.c: Include rtx-vector-builder.h.
(gen_const_vec_duplicate_1): Delete.
(gen_const_vector): Call gen_const_vec_duplicate instead of
gen_const_vec_duplicate_1.
(const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
(gen_const_vec_duplicate): Use rtx_vector_builder.
(gen_const_vec_series): Likewise.
(gen_rtx_CONST_VECTOR): Likewise.
* config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
(swap_const_vector_halves): Take an rtx pointer rather than rtx.
Build a new vector rather than modifying a CONST_VECTOR in-place.
(handle_special_swappables): Update call accordingly.
* config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
(swap_const_vector_halves): Take an rtx pointer rather than rtx.
Build a new vector rather than modifying a CONST_VECTOR in-place.
(handle_special_swappables): Update call accordingly.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* simplify-rtx.c (simplify_const_binary_operation): Use
CONST_VECTOR_ELT instead of XVECEXP.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
the selector elements to be different from the data elements
if the selector is a VECTOR_CST.
* tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
ssizetype for the selector.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
before testing each element individually.
* tree-vect-generic.c (lower_vec_perm): Likewise.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* selftest.h (selftest::vec_perm_indices_c_tests): Declare.
* selftest-run-tests.c (selftest::run_tests): Call it.
* vector-builder.h (vector_builder::operator ==): New function.
(vector_builder::operator !=): Likewise.
* vec-perm-indices.h (vec_perm_indices::series_p): Declare.
(vec_perm_indices::all_from_input_p): New function.
* vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
(test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
* fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
instead of reading the VECTOR_CST directly. Detect whether both
vector inputs are the same before constructing the vec_perm_indices,
and update the number of inputs argument accordingly. Use the
utility functions added above. Only construct sel2 if we need to.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs.c (expand_vec_perm_var): Use an explicit encoding for
the broadcast of the low byte.
(expand_mult_highpart): Use an explicit encoding for the permutes.
* optabs-query.c (can_mult_highpart_p): Likewise.
* tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
* tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
(vectorizable_bswap): Likewise.
* tree-vect-data-refs.c (vect_grouped_store_supported): Use an
explicit encoding for the power-of-2 permutes.
(vect_permute_store_chain): Likewise.
(vect_grouped_load_supported): Likewise.
(vect_permute_load_chain): Likewise.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
* vec-perm-indices.c (vec_perm_indices_to_tree): New function.
* tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
* tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
* tree-vect-stmts.c (vectorizable_bswap): Likewise.
(vect_gen_perm_mask_any): Likewise.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* int-vector-builder.h: New file.
* vec-perm-indices.h: Include int-vector-builder.h.
(vec_perm_indices): Redefine as an int_vector_builder.
(auto_vec_perm_indices): Delete.
(vec_perm_builder): Redefine as a stand-alone class.
(vec_perm_indices::vec_perm_indices): New function.
(vec_perm_indices::clamp): Likewise.
* vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
(vec_perm_indices::new_vector): New function.
(vec_perm_indices::new_expanded_vector): Update for new
vec_perm_indices class.
(vec_perm_indices::rotate_inputs): New function.
(vec_perm_indices::all_in_range_p): Operate directly on the
encoded form, without computing elided elements.
(tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
encoding. Update for new vec_perm_indices class.
* optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
the given vec_perm_builder.
(expand_vec_perm_var): Update vec_perm_builder constructor.
(expand_mult_highpart): Use vec_perm_builder instead of
auto_vec_perm_indices.
* optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
vec_perm_indices instead of auto_vec_perm_indices. Use a single
or double series encoding as appropriate.
* fold-const.c (fold_ternary_loc): Use vec_perm_builder and
vec_perm_indices instead of auto_vec_perm_indices.
* tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
* tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
(vect_permute_store_chain): Likewise.
(vect_grouped_load_supported): Likewise.
(vect_permute_load_chain): Likewise.
(vect_shift_permute_load_chain): Likewise.
* tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
(vect_transform_slp_perm_load): Likewise.
(vect_schedule_slp_instance): Likewise.
* tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
(vectorizable_mask_load_store): Likewise.
(vectorizable_bswap): Likewise.
(vectorizable_store): Likewise.
(vectorizable_load): Likewise.
* tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
vec_perm_indices instead of auto_vec_perm_indices. Use
tree_to_vec_perm_builder to read the vector from a tree.
* tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
vec_perm_builder instead of a vec_perm_indices.
(have_whole_vector_shift): Use vec_perm_builder and
vec_perm_indices instead of auto_vec_perm_indices. Leave the
truncation to calc_vec_perm_mask_for_shift.
(vect_create_epilog_for_reduction): Likewise.
* config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
from auto_vec_perm_indices to vec_perm_indices.
(aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
instead of changing individual elements.
(aarch64_vectorize_vec_perm_const): Use new_vector to install
the vector in d.perm.
* config/arm/arm.c (expand_vec_perm_d::perm): Change
from auto_vec_perm_indices to vec_perm_indices.
(arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
instead of changing individual elements.
(arm_vectorize_vec_perm_const): Use new_vector to install
the vector in d.perm.
* config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
Update vec_perm_builder constructor.
(rs6000_expand_interleave): Likewise.
* config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
(rs6000_expand_interleave): Likewise.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs-query.c (can_vec_perm_var_p): Check whether lowering
to qimode could truncate the indices.
* optabs.c (expand_vec_perm_var): Likewise.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* Makefile.in (OBJS): Add vec-perm-indices.o.
* vec-perm-indices.h: New file.
* vec-perm-indices.c: Likewise.
* target.h (vec_perm_indices): Replace with a forward class
declaration.
(auto_vec_perm_indices): Move to vec-perm-indices.h.
* optabs.h: Include vec-perm-indices.h.
(expand_vec_perm): Delete.
(selector_fits_mode_p, expand_vec_perm_var): Declare.
(expand_vec_perm_const): Declare.
* target.def (vec_perm_const_ok): Replace with...
(vec_perm_const): ...this new hook.
* doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
(TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
* doc/tm.texi: Regenerate.
* optabs.def (vec_perm_const): Delete.
* doc/md.texi (vec_perm_const): Likewise.
(vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
* expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
expand_vec_perm for constant permutation vectors. Assert that
the mode of variable permutation vectors is the integer equivalent
of the mode that is being permuted.
* optabs-query.h (selector_fits_mode_p): Declare.
* optabs-query.c: Include vec-perm-indices.h.
(selector_fits_mode_p): New function.
(can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
is defined, instead of checking whether the vec_perm_const_optab
exists. Use targetm.vectorize.vec_perm_const instead of
targetm.vectorize.vec_perm_const_ok. Check whether the indices
fit in the vector mode before using a variable permute.
* optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
vec_perm_indices instead of an rtx.
(expand_vec_perm): Replace with...
(expand_vec_perm_const): ...this new function. Take the selector
as a vec_perm_indices rather than an rtx. Also take the mode of
the selector. Update call to shift_amt_for_vec_perm_mask.
Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
Use vec_perm_indices::new_expanded_vector to expand the original
selector into bytes. Check whether the indices fit in the vector
mode before using a variable permute.
(expand_vec_perm_var): Make global.
(expand_mult_highpart): Use expand_vec_perm_const.
* fold-const.c: Includes vec-perm-indices.h.
* tree-ssa-forwprop.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
Delete.
* config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
* config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
(aarch64_vectorize_vec_perm_const_ok): Fuse into...
(aarch64_vectorize_vec_perm_const): ...this new function.
(TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
(TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
* config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
* config/arm/vec-common.md (vec_perm_const<mode>): Delete.
* config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
(TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
(arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
into...
(arm_vectorize_vec_perm_const): ...this new function. Explicitly
check for NEON modes.
* config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
* config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
* config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
(ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
into...
(ix86_vectorize_vec_perm_const): ...this new function. Incorporate
the old VEC_PERM_CONST conditions.
* config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
* config/ia64/vect.md (vec_perm_const<mode>): Delete.
* config/ia64/ia64.c (ia64_expand_vec_perm_const)
(ia64_vectorize_vec_perm_const_ok): Merge into...
(ia64_vectorize_vec_perm_const): ...this new function.
* config/mips/loongson.md (vec_perm_const<mode>): Delete.
* config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
* config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
* config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
* config/mips/mips.c (mips_expand_vec_perm_const)
(mips_vectorize_vec_perm_const_ok): Merge into...
(mips_vectorize_vec_perm_const): ...this new function.
* config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
* config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
* config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
* config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
* config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
(rs6000_expand_vec_perm_const): Delete.
* config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
Delete.
(TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
(altivec_expand_vec_perm_const_le): Take each operand individually.
Operate on constant selectors rather than rtxes.
(altivec_expand_vec_perm_const): Likewise. Update call to
altivec_expand_vec_perm_const_le.
(rs6000_expand_vec_perm_const): Delete.
(rs6000_vectorize_vec_perm_const_ok): Delete.
(rs6000_vectorize_vec_perm_const): New function.
(rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
an element count and rtx array.
(rs6000_expand_extract_even): Update call accordingly.
(rs6000_expand_interleave): Likewise.
* config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
* config/rs6000/paired.md (vec_perm_constv2sf): Delete.
* config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
* config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
(rs6000_expand_vec_perm_const): Delete.
* config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
(TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
(altivec_expand_vec_perm_const_le): Take each operand individually.
Operate on constant selectors rather than rtxes.
(altivec_expand_vec_perm_const): Likewise. Update call to
altivec_expand_vec_perm_const_le.
(rs6000_expand_vec_perm_const): Delete.
(rs6000_vectorize_vec_perm_const_ok): Delete.
(rs6000_vectorize_vec_perm_const): New function. Remove stray
reference to the SPE evmerge intructions.
(rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
an element count and rtx array.
(rs6000_expand_extract_even): Update call accordingly.
(rs6000_expand_interleave): Likewise.
* config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
* config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
new function.
(TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs.c (expand_vec_perm_1): Assert that SEL has an integer
vector mode and that that mode matches the mode of the data
being permuted.
(expand_vec_perm): Split handling of non-CONST_VECTOR selectors
out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
directly using expand_vec_perm_1 when forcing selectors into
registers.
(expand_vec_perm_var): New function, split out from expand_vec_perm.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs-query.h (can_vec_perm_p): Delete.
(can_vec_perm_var_p, can_vec_perm_const_p): Declare.
* optabs-query.c (can_vec_perm_p): Split into...
(can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
(can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
particular selector is valid.
* tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
* tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
(vect_grouped_load_supported): Likewise.
(vect_shift_permute_load_chain): Likewise.
* tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
(vect_transform_slp_perm_load): Likewise.
* tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
(vectorizable_bswap): Likewise.
(vect_gen_perm_mask_checked): Likewise.
* fold-const.c (fold_ternary_loc): Likewise. Don't take
implementations of variable permutation vectors into account
when deciding which selector to use.
* tree-vect-loop.c (have_whole_vector_shift): Don't check whether
vec_perm_const_optab is supported; instead use can_vec_perm_const_p
with a false third argument.
* tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
to test whether the constant selector is valid and can_vec_perm_var_p
to test whether a variable selector is valid.
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
* optabs-query.c (can_vec_perm_p): Likewise.
* fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
instead of vec_perm_indices.
* tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
(vect_gen_perm_mask_checked): Likewise,
* tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
(vect_gen_perm_mask_checked): Likewise,
2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
* optabs-query.h (qimode_for_vec_perm): Declare.
* optabs-query.c (can_vec_perm_p): Split out qimode search to...
(qimode_for_vec_perm): ...this new function.
* optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
* rtlanal.c (canonicalize_condition): Return 0 if final rtx
does not have a conditional at the top.
2018-01-02 Richard Biener <rguenther@suse.de>
* ipa-inline.c (big_speedup_p): Fix expression.
2018-01-02 Jan Hubicka <hubicka@ucw.cz>
PR target/81616
* config/i386/x86-tune-costs.h: Increase cost of integer load costs
for generic 4->6.
2018-01-02 Jan Hubicka <hubicka@ucw.cz>
PR target/81616
Generic tuning.
* x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
cond_taken_branch_cost 3->4.
2018-01-01 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/83581
* tree-loop-distribution.c (pass_loop_distribution::execute): Return
TODO_cleanup_cfg if any changes have been made.
PR middle-end/83608
* expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
convert_modes if target mode has the right side, but different mode
class.
PR middle-end/83609
* expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
last argument when extracting from CONCAT. If either from_real or
from_imag is NULL, use expansion through memory. If result is not
a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
the parts directly to inner mode, if even that fails, use expansion
through memory.
PR middle-end/83623
* expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
check for bswap in mode rather than HImode and use that in expand_unop
too.
Copyright (C) 2018 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.