gcc/brig/ChangeLog:
* brigfrontend/brig-to-generic.cc
(brig_to_generic::write_globals): Use TDF_NONE rather than 0.
(dump_function): Likewise.
gcc/c-family/ChangeLog:
* c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
rather than 0.
gcc/ChangeLog:
* 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.
From-SVN: r261325
The last use was deleted in 2017. There are the generic MIN/MAX macros
to use already, and in this new world we should use std::min, std::max.
* config/rs6000/rs6000.c (min, max): Delete.
From-SVN: r261324
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.
From-SVN: r261322
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.
From-SVN: r261319
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.
From-SVN: r261317
2018-06-08 Martin Liska <mliska@suse.cz>
* symbol-summary.h (get): New function.
(call_summary::m_initialize_when_cloning): New class member.
From-SVN: r261316
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>
* lto-partition.c (lto_balanced_map): Use cgraph_node::uid
instead of summary_uid.
From-SVN: r261315
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.
From-SVN: r261313
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.
From-SVN: r261312
2018-06-08 Martin Liska <mliska@suse.cz>
* symbol-summary.h (release): Move definition out of class
declaration.
(symtab_removal): Likewise.
(symtab_duplication): Likewise.
From-SVN: r261308
gcc/ChangeLog:
2018-06-07 Carl Love <cel@us.ibm.com>
* gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
vextract_fp_from_shortl): Add BE support.
gcc/testsuite/ChangeLog:
2018-06-07 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-3-p9-runnable.c: Add debug print
statements.
From-SVN: r261299
2018-06-07 Paul Koning <ni1d@arrl.net>
gcc/
* compare-elim.c (try_merge_compare): Don't merge compare if
address contains a side effect.
(try_eliminate_compare): Likewise.
gcc/testsuite/
* gcc.c-torture/compile/20180605-1.c: New test.
From-SVN: r261287
2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86045
* simplify.c (gfc_simplify_mod): Re-arrange code to test whether
'P' is zero and issue an error if it is.
2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/86045
* gfortran.dg/pr86045.f90: New test.
From-SVN: r261286
The compiler used to do variable initializer sorting by looping
through all the initialized variables and, for each one, looping
through all the initialized variables and checking for a dependency.
For very large packages with thousands of initialized global
variables, this quadratic loop could take quite a long time.
Change the approach to first loop through all the initialized
variables and fetch all the references to other variables from the
initialization code. Then, loop through them again and this time add
a dependency for each referenced, initialized, variable, while
checking for initialization loops. We still have a nested loop, but
this time the inner loop should normally be short--just the list of
referenced variables, not the list of all variables.
Reviewed-on: https://go-review.googlesource.com/116816
From-SVN: r261284
2018-06-07 Olivier Hainque <hainque@adacore.com>
* config/t-vxworks (LIBGCC_INCLUDES): Add
-I$(MULTIBUILDTOP)../../gcc/include.
* config/t-vxworks7: Likewise. Reformat a bit to match
the t-vxworks layout.
From-SVN: r261273
* gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
symbol defined for msp430i* devices to be lower case.
gcc/testsuite/gcc.target/msp430/
* msp430i-device-symbol.c: New test.
* msp430f-device-symbol.c: New test.
* msp430.h: New test header file.
From-SVN: r261268
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.
From-SVN: r261267
* include/bits/regex.h (sub_match): Add noexcept to default
constructor and length observer.
(match_results): Add noexcept to default constructor and observers
with no preconditions. Define destructor as defaulted.
(operator==, operator!=, swap): Add noexcept.
(regex_iterator): Add default member initializers and define default
constructor and destructor as defaulted. Add noexcept to equality
and dereference operators.
From-SVN: r261266
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.
* gcc.dg/tree-ssa/pr69615.c: New test.
From-SVN: r261264
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.
* gcc.dg/graphite/pr85935.c: New testcase.
From-SVN: r261263
* src/c++11/debug.cc
(_Safe_iterator_base::_M_detach()): Reset state only if needed.
(_Safe_iterator_base::_M_detach_single()): Likewise.
(_Safe_local_iterator_base::_M_detach()): Reset state only if needed.
(_Safe_local_iterator_base::_M_detach_single()): Likewise.
From-SVN: r261262
2018-06-07 Martin Liska <mliska@suse.cz>
PR bootstrap/86057
* libgcov-driver-system.c (replace_filename_variables): Use
memcpy instead of mempcpy.
(allocate_filename_struct): Do not allocate filename, allocate
prefix and set it.
(gcov_exit_open_gcda_file): Allocate memory for gf->filename
here and properly copy content into it.
* libgcov-driver.c (struct gcov_filename): Remove max_length
field, change prefix from size_t into char *.
(compute_summary): Do not calculate longest filename.
(gcov_do_dump): Release memory of gf.filename after each file.
* libgcov-util.c (compute_summary): Use new signature of
compute_summary.
(calculate_overlap): Likewise.
From-SVN: r261260
gcc/ChangeLog:
2018-06-04 Carl Love <cel@us.ibm.com>
* gcc/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.
* gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
P9V_BUILTIN_VCLZLSBB_V16QI.
* gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
specific.
gcc/testsuite/ChangeLog:
2018-06-04 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-8-p9-runnable.c: Add additional
debug print statements. Fix a few formating issues.
From-SVN: r261255
gcc/ChangeLog:
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.
From-SVN: r261254
[gcc]
2018-06-06 Michael Meissner <meissner@linux.ibm.com>
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.
[gcc/testsuite]
2018-06-06 Michael Meissner <meissner@linux.ibm.com>
PR target/85657
* gcc.target/powerpc/pr85657-4.c: New tests.
* gcc.target/powerpc/pr85657-5.c: Likewise.
* gcc.target/powerpc/pr85657-6.c: Likewise.
From-SVN: r261253
gcc/testsuite/ChangeLog:
2018-06-06 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-7-p9-runnable.c: Change first
argument to vui_arg.
From-SVN: r261249
gcc/testsuite/ChangeLog:
2018-06-06 Carl Love <cel@us.ibm.com>
* gcc.target/powerpc/builtins-3.c: Move tests requiring -mvsx
to builtins-4.c.
* gcc.target/powerpc/builtins-4.c: New test file for tests
that need -mvsx.
From-SVN: r261247
[gcc]
2018-06-06 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.
[gcc]
2018-06-05 Michael Meissner <meissner@linux.ibm.com>
* config/rs6000/rs6000.c (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.
[gcc/testsuite]
2018-06-05 Michael Meissner <meissner@linux.ibm.com>
PR target/85657
* g++.dg/pr85657.C: Only test whether __ibm128 and long double can
be used in templates. Don't check for them in overloaded functions.
From-SVN: r261246