* doc/invoke.texi (C Dialect Options): Document it.
[official-gcc.git] / gcc / ChangeLog
blob1629b96894234db9eaec5ee2234fad0d9dbc2204
1 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
3         * doc/invoke.texi (C Dialect Options): Document it.
5 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
7         PR tree-optimization/71016
8         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
9         factor_out_conditional_conversion.  Formatting fix.
10         (factor_out_conditional_conversion): Add cond_stmt argument.
11         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
12         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
13         Formatting fix.
15 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
17         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
18         read-rtl-function.o, and selftest-rtl.o.
19         * config/aarch64/aarch64.c: Include selftest.h and
20         selftest-rtl.h.
21         (selftest::aarch64_test_loading_full_dump): New function.
22         (selftest::aarch64_run_selftests): New function.
23         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
24         selftest::aarch64_run_selftests.
25         * config/i386/i386.c
26         (selftest::ix86_test_loading_dump_fragment_1): New function.
27         (selftest::ix86_test_loading_call_insn): New function.
28         (selftest::ix86_test_loading_full_dump): New function.
29         (selftest::ix86_test_loading_unspec): New function.
30         (selftest::ix86_run_selftests): Call the new functions.
31         * emit-rtl.c (maybe_set_max_label_num): New function.
32         * emit-rtl.h (maybe_set_max_label_num): New decl.
33         * function.c (instantiate_decls): Guard call to
34         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
35         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
36         "static".
37         * gensupport.c (gen_reader::gen_reader): Pass "false"
38         for new "compact" param of rtx_reader.
39         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
40         rather than an empty string for NULL strings.
41         * read-md.c: Potentially include config.h rather than bconfig.h.
42         Wrap include of errors.h with #ifdef GENERATOR_FILE.
43         (have_error): New global, copied from errors.c.
44         (md_reader::read_name): Rename to...
45         (md_reader::read_name_1): ...this, adding "out_loc" param,
46         and converting "missing name or number" to returning false, rather
47         than failing.
48         (md_reader::read_name): Reimplement in terms of read_name_1.
49         (md_reader::read_name_or_nil): New function.
50         (md_reader::read_string): Handle "(nil)" by returning NULL.
51         (md_reader::md_reader): Add new param "compact".
52         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
53         (md_reader::read_file): New method.
54         * read-md.h (md_reader::md_reader): Add new param "compact".
55         (md_reader::read_file): New method.
56         (md_reader::is_compact): New accessor.
57         (md_reader::read_name): Convert return type from void to
58         file_location.
59         (md_reader::read_name_or_nil): New decl.
60         (md_reader::read_name_1): New decl.
61         (md_reader::m_compact): New field.
62         (noop_reader::noop_reader): Pass "false" for new "compact" param
63         of rtx_reader.
64         (rtx_reader::rtx_reader): Add new "compact" param.
65         (rtx_reader::read_rtx_operand): Make virtual and convert return
66         type from void to rtx.
67         (rtx_reader::read_until): New decl.
68         (rtx_reader::handle_any_trailing_information): New virtual
69         function.
70         (rtx_reader::postprocess): New virtual function.
71         (rtx_reader::finalize_string): New virtual function.
72         (rtx_reader::m_in_call_function_usage): New field.
73         (rtx_reader::m_reuse_rtx_by_id): New field.
74         * read-rtl-function.c: New file.
75         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
76         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
77         (selftest::verify_three_block_rtl_cfg): New decl.
78         * read-rtl-function.h: New file.
79         * read-rtl.c: Potentially include config.h rather than bconfig.h.
80         For host, include function.h, memmodel.h, and emit-rtl.h.
81         (one_time_initialization): New function.
82         (struct compact_insn_name): New struct.
83         (compact_insn_names): New array.
84         (find_code): Handle insn codes in compact dumps.
85         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
86         (bind_subst_iter_and_attr): Likewise.
87         (add_condition_to_string): Likewise.
88         (add_condition_to_rtx): Likewise.
89         (apply_attribute_uses): Likewise.
90         (add_current_iterators): Likewise.
91         (apply_iterators): Likewise.
92         (initialize_iterators): Guard usage of apply_subst_iterator with
93         #ifdef GENERATOR_FILE.
94         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
95         (md_reader::read_mapping): Likewise.
96         (add_define_attr_for_define_subst): Likewise.
97         (add_define_subst_attr): Likewise.
98         (read_subst_mapping): Likewise.
99         (check_code_iterator): Likewise.
100         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
101         logic to...
102         (one_time_initialization): New function.
103         (rtx_reader::read_until): New method.
104         (read_flags): New function.
105         (parse_reg_note_name): New function.
106         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
107         Handle reuse_rtx ids.
108         Wrap iterator lookup within #ifdef GENERATOR_FILE.
109         Add parsing support for RTL dumps, mirroring the special-cases in
110         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
111         values, and calling handle_any_trailing_information.
112         (rtx_reader::read_rtx_operand): Convert return type from void
113         to rtx, returning return_rtx.  Handle case 'e'.  Call
114         finalize_string on XSTR and XTMPL fields.
115         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
116          "(nil)" values were omitted.  Call the postprocess vfunc on the
117         return_rtx.
118         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
119         class ctor.  Initialize m_in_call_function_usage.  Call
120         one_time_initialization.
121         * rtl-tests.c (selftest::test_uncond_jump): Call
122         set_new_first_and_last_insn.
123         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
124         * selftest-rtl.c: New file.
125         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
126         (selftest::get_insn_by_uid): New decl.
127         * selftest-run-tests.c (selftest::run_tests): Call
128         read_rtl_function_c_tests.
129         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
130         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
131         dumps.
133 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
135         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
136         operands in a special way.  Assert that pos+len <= mode precision.
138 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
140         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
141         3 argument Alias with unlimited for the negative form.
142         (fno-vect-cost-model): Removed.
144 2017-01-05  Martin Liska  <mliska@suse.cz>
146         * hsa-gen.c (gen_hsa_divmod): New function.
147         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
149 2017-01-05  Martin Liska  <mliska@suse.cz>
151         PR pch/78970
152         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
153         header.
155 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
157         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
158         small constant length operands.
160 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
162         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
163         between loop iterations.
165 2017-01-05  Martin Liska  <mliska@suse.cz>
167         PR sanitizer/78815
168         * gimplify.c (gimplify_decl_expr): Compare to
169         asan_poisoned_variables instread of checking flags.
170         (gimplify_target_expr): Likewise.
171         (gimplify_expr): Likewise.
172         (gimplify_function_tree): Conditionally initialize
173         asan_poisoned_variables.
175 2017-01-04  Jeff Law  <law@redhat.com>
177         PR tree-optimizatin/78812
178         * rtl.h (contains_mem_rtx_p): Prototype.
179         * ifcvt.c (containts_mem_rtx_p): Move from here to...
180         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
181         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
182         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
183         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
185 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
187         * input.c (assert_char_at_range): Default-initialize actual_range.
189 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
191         * df-scan.c (df_ref_create_structure): Make regno unsigned,
192         to match the caller.
194 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
196         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
197         insns after final jump in test to emit dummy move.
199 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
201         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
202         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
204 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
206         * multiple_target.c (create_dispatcher_calls): Init e_next.
207         * tree-ssa-loop-split.c (split_loop): Init border.
208         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
209         scalar_type.
211 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
213         PR target/71977
214         PR target/70568
215         PR target/78823
216         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
217         (altivec_register_operand): Do not return true if the operand
218         contains a SUBREG mixing SImode and SFmode.
219         (vsx_register_operand): Likewise.
220         (vsx_reg_sfsubreg_ok): New predicate.
221         (vfloat_operand): Do not return true if the operand contains a
222         SUBREG mixing SImode and SFmode.
223         (vint_operand): Likewise.
224         (vlogical_operand): Likewise.
225         (gpc_reg_operand): Likewise.
226         (int_reg_operand): Likewise.
227         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
228         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
229         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
230         SImode and SFmode.
231         (rs6000_emit_move_si_sf_subreg): New helper function.
232         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
233         fixup SUBREGs involving SImode and SFmode.
234         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
235         numbers for the new peephole2 optimization.
236         (peephole2 for SFmode unions): New peephole2 to optimize cases in
237         the GLIBC math library that do AND/IOR/XOR operations on single
238         precision floating point.
239         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
240         target macros to say whether we need to avoid SUBREGs mixing
241         SImode and SFmode.
242         (TARGET_ALLOW_SF_SUBREG): Likewise.
243         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
244         (UNSPEC_SI_FROM_SF): Likewise.
245         (iorxor): Change spacing.
246         (and_ior_xor): New iterator for AND, IOR, and XOR.
247         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
248         (movdi_from_sf_zero_ext): Likewise.
249         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
250         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
251         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
252         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
253         (fms<mode>4): Likewise.
254         (fnma<mode>4): Likewise.
255         (fnms<mode>4): Likewise.
256         (nfma<mode>4): Likewise.
257         (nfms<mode>4): Likewise.
259 2017-01-04  Marek Polacek  <polacek@redhat.com>
261         PR c++/64767
262         * doc/invoke.texi: Document -Wpointer-compare.
264 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
266         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
267         RejectNegative.
269         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
270         descriptions for -gdwarf-5 and emit them as uleb128 instead of
271         2-byte data.
273 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
275         PR target/78056
276         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
277         documentation of the powerpc_popcntb_ok attribute.
278         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
279         code to issue warning messages if a requested CPU configuration is
280         not supported by the binary (assembler and loader) toolchain.
281         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
282         made to define a built-in function that has been disabled.
283         (paired_init_builtins): Add assertion to prevent ICE if attempt is
284         made to define a built-in function that has been disabled.
285         (altivec_init_builtins): Add comment explaining why definition
286         of the DST built-in functions is not preceded by an assertion
287         check.  Add assertions to prevent ICE if attempts are made to
288         define an altivec predicate or an abs* built-in function that has
289         been disabled.
290         (htm_init_builtins): Add comment explaining why definition of the
291         htm built-in functions is not preceded by an assertion check.
293 2017-01-04  Jeff Law  <law@redhat.com>
295         PR tree-optimizatin/67955
296         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
297         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
298         the points-to solution does not include pt_null.  Use DECL_PT_UID
299         unconditionally.
301 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
303         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
304         Use gen_int_mode instead of gen_lopwart for const_int operands.
306 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
308         PR tree-optimization/71563
309         * match.pd: Simplify X << Y into X if Y is known to be 0 or
310         out of range value - has low bits known to be zero.
312 2017-01-04  Alan Modra  <amodra@gmail.com>
314         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
315         * configure: Regenerate.
316         * config.in: Regenerate.
318 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
320         PR bootstrap/77569
321         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
322         a substring of the message, but strcmp with the whole message.  Ifdef
323         ENABLE_NLS, translate the message first using dgettext.
325 2017-01-03  Jeff Law  <law@redhat.com>
327         PR tree-optimizatin/78856
328         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
329         (mark_threaded_blocks): Remove code to truncate thread paths that
330         cross multiple loop headers.  Instead invalidate the cached loop
331         iteration information and handle case of a thread path walking
332         into an irreducible region.
334 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
336         PR target/78900
337         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
338         assertions.  Add support for doing the signbit if the IEEE 128-bit
339         floating point value is in a GPR.
340         * config/rs6000/rs6000.md (Fsignbit): Delete.
341         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
342         Update the length attribute if the value is in a GPR.
343         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
344         the sign or zero extension instruction, since the value is always 0/1.
345         (signbit<mode>2_dm2): Delete using <Fsignbit>.
347         PR target/78953
348         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
349         extracting SImode to a GPR register so that we can generate a
350         store, limit the vector to be in a traditional Altivec register
351         for the vextuwrx instruction.
353 2017-01-03  Ian Lance Taylor  <iant@google.com>
355         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
357 2017-01-03  Martin Sebor  <msebor@redhat.com>
359         PR tree-optimization/78696
360         * gimple-ssa-sprintf.c (format_floating): Correct handling of
361         precision.  Use MPFR for %f for greater fidelity.  Correct handling
362         of %g.
363         (pass_sprintf_length::compute_format_length): Set width and precision
364         specified by asrerisk to void_node for vararg functions.
365         (try_substitute_return_value): Adjust dump output.
367 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
369         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
371 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
373         * doc/invoke.texi (SPARC options): Document -mlra as the default.
374         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
375         -mlra/-mno-lra was passed to the compiler.
377 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
379         PR rtl-optimization/65618
380         * emit-rtl.c (try_split): Move initialization of "before" and
381         "after" to just before the call to emit_insn_after_setloc.
383 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
385         * doc/md.texi (Standard Names): Remove reference to Java frontend.
387 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
389         * dwarf2out.c (gen_enumeration_type_die): When
390         -gno-strict-dwarf, add a DW_AT_encoding attribute.
392 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
394         PR tree-optimization/78965
395         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
396         Change first argument from const call_info & to call_info &.  For %n
397         set info.nowrite to false.
399         PR middle-end/78901
400         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
401         possibly throwing calls.
403         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
404         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
405         and fns handling, rather than in a separate case SSA_NAME.
407 2017-01-02  Jeff Law  <law@redhat.com>
409         * config/darwin-driver.c (darwin_driver_init): Const-correctness
410         fixes for first_period and second_period variables.
412 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
414         PR target/78967
415         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
416         (*insvqi_1): New insn pattern.
417         (*insvqi_1_mem_rex64): Ditto.
418         (*insvqi_2): Ditto.
419         (*insvqi_3): Rename from *insvqi.
421         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
423 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
425         * doc/cfg.texi (Edges): Remove reference to Java.
426         (Maintaining the CFG): Ditto.
428 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
430         PR middle-end/77674
431         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
432         transparent aliases.
434 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
436         PR middle-end/77484
437         * predict.def (PRED_CALL): Update hitrate.
438         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
439         * predict.c (tree_estimate_probability_bb): Split CALL predictor
440         into direct/indirect/polymorphic variants.
442 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
444         Update copyright years.
446         * gcc.c (process_command): Update copyright notice dates.
447         * gcov-dump.c (print_version): Ditto.
448         * gcov.c (print_version): Ditto.
449         * gcov-tool.c (print_version): Ditto.
450         * gengtype.c (create_file): Ditto.
451         * doc/cpp.texi: Bump @copying's copyright year.
452         * doc/cppinternals.texi: Ditto.
453         * doc/gcc.texi: Ditto.
454         * doc/gccint.texi: Ditto.
455         * doc/gcov.texi: Ditto.
456         * doc/install.texi: Ditto.
457         * doc/invoke.texi: Ditto.
459 Copyright (C) 2017 Free Software Foundation, Inc.
461 Copying and distribution of this file, with or without modification,
462 are permitted in any medium without royalty provided the copyright
463 notice and this notice are preserved.