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