PR c/79089
[official-gcc.git] / gcc / ChangeLog
blob70f200be883178e5e1ea1ccbfebe5a6a34574d3f
1 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
3         PR c/79089
4         * gimplify.c (gimplify_init_constructor): If want_value and
5         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
6         fix.
8         PR target/79080
9         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
10         sequence.  Formatting fixes.
11         (doloop_optimize): Formatting fixes.
13         PR driver/49726
14         * gcc.c (debug_level_greater_than_spec_func): New function.
15         (static_spec_functions): Add debug-level-gt spec function.
16         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
17         !g0.
18         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
19         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
20         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
21         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
22         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
23         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
25 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
27         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
28         QImode fixups to general and mask registers only.
30 2017-01-16  Carl Love  <cel@us.ibm.com>
32         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
33         for built-in functions
34         vector signed char vec_nabs (vector signed char)
35         vector signed short vec_nabs (vector signed short)
36         vector signed int vec_nabs (vector signed int)
37         vector signed long long vec_nabs (vector signed long long)
38         vector float vec_nabs (vector float)
39         vector double vec_nabs (vector double)
40         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
41         and NABS overload.
42         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
43         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
44         * doc/extend.texi: Update the documentation file for the new built-in
45         functions.
47 2017-01-16  Martin Sebor  <msebor@redhat.com>
49         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
50         message.
52 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
54         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
55         UNSPEC_VSX__XXSPLTD to require special splat handling.
57 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
59         PR bootstrap/78616
60         * system.h: Poison strndup.
62 2017-01-16  Alan Modra  <amodra@gmail.com>
64         PR target/79098
65         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
66         use a switch.
68 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
70         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
72 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
74         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
75         call recog here.  Assert that INSN_CODE (insn) is non-negative.
77 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
79         PR target/72749
80         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
81         fallthrough.
82         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
83         in the currently scheduled RTL fragment.
85 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
87         PR rtl-optimization/78751
88         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
89         give up.
91 2017-01-14  Jeff Law  <law@redhat.com>
93         PR tree-optimization/79090
94         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
95         variable length stores.
96         (compute_trims): Delete dead assignment to *trim_tail.
97         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
98         zero length.
100 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
102         PR rtl-optimization/78626
103         PR rtl-optimization/78727
104         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
105         of a block, and split such blocks after everything else is finished.
107 2017-01-14  Alan Modra  <amodra@gmail.com>
109         PR target/72749
110         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
111         target legitimate_combined_insn.
112         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
113         (rs6000_legitimate_combined_insn): New function.
114         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
115         all uses.
116         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
117         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
118         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
120 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
122         * doc/frontends.texi (G++ and GCC): Remove references to Java.
124 2017-01-13  Jeff Law  <law@redhat.com>
126         PR tree-optimization/33562
127         PR tree-optimization/61912
128         PR tree-optimization/77485
129         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
130         a statement.
131         (delete_dead_assignment): Likewise.
132         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
133         statement to delete_dead_call and delete_dead_assignment.
135 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
137         PR c/78304
138         * substring-locations.c (format_warning_va): Strengthen case 1 so
139         that both endpoints of the substring must be within the format
140         range for just the substring to be printed.
142 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
144         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
145         * config/i386/i386.c (ix86_target_string): Add missing options
146         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
147         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
148         flags_other and ix86_target_other to flags2_other.  Display unknown
149         isa2 options.
150         (ix86_valid_target_attribute_inner_p): Add missing options and
151         reorder options by implied ISAs, as in ix86_target_string.
153 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
155         * hash-table.h (hash_table::too_empty_p): New function.
156         (hash_table::expand): Use it.
157         (hash_table::traverse): Likewise.
158         (hash_table::empty_slot): Use sizeof (value_type) instead of
159         sizeof (PTR) to convert bytes to elements.  Shrink the table
160         if the current size is excessive for the current number of
161         elements.
163 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
165         * ira-costs.c (record_reg_classes): Break from the inner loop
166         early once alt_fail is known to be true.  Update outer loop
167         handling accordingly.
169 2017-01-13  Jeff Law  <law@redhat.com>
171         * tree-ssa-dse.c (decrement_count): New function.
172         (increment_start_addr, maybe_trim_memstar_call): Likewise.
173         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
174         when we know the partially dead statement is a mem* function.
176         PR tree-optimization/61912
177         PR tree-optimization/77485
178         * tree-ssa-dse.c: Include expr.h.
179         (maybe_trim_constructor_store): New function.
180         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
182         PR tree-optimization/33562
183         PR tree-optimization/61912
184         PR tree-optimization/77485
185         * doc/invoke.texi: Document new dse-max-object-size param.
186         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
187         * tree-ssa-dse.c: Include params.h.
188         (dse_store_status): New enum.
189         (initialize_ao_ref_for_dse): New, partially extracted from
190         dse_optimize_stmt.
191         (valid_ao_ref_for_dse, normalize_ref): New.
192         (setup_live_bytes_from_ref, compute_trims): Likewise.
193         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
194         (maybe_trim_partially_dead_store): Likewise.
195         (maybe_trim_complex_store): Likewise.
196         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
197         Track what bytes live from the original store.  Return tri-state
198         for dead, partially dead or live.
199         (dse_dom_walker): Add constructor, destructor and new private members.
200         (delete_dead_call, delete_dead_assignment): New extracted from
201         dse_optimize_stmt.
202         (dse_optimize_stmt): Make a member of dse_dom_walker.
203         Use initialize_ao_ref_for_dse.
205         PR tree-optimization/33562
206         PR tree-optimization/61912
207         PR tree-optimization/77485
208         * sbitmap.h (bitmap_count_bits): Prototype.
209         (bitmap_clear_range, bitmap_set_range): Likewise.
210         * sbitmap.c (bitmap_clear_range): New function.
211         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
213 2017-01-13  Martin Liska  <mliska@suse.cz>
215         PR ipa/79043
216         * function.c (set_cfun): Add new argument force.
217         * function.h (set_cfun): Likewise.
218         * ipa-inline-transform.c (inline_call): Use the function when
219         strict alising from is dropped for function we inline to.
221 2017-01-13  Richard Biener  <rguenther@suse.de>
223         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
224         for dumping GIMPLE INTEGER_CSTs.
226 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
228         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
229         to 201112L since C++17.
231 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
233         PR sanitizer/78887
234         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
235         if -fsanitize=kernel-address is present.
237 2017-01-13  Richard Biener  <rguenther@suse.de>
239         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
240         as _Literal ( type ) number in case usual suffixes do not
241         preserve all information.
243 2017-01-13  Richard Biener  <rguenther@suse.de>
245         PR tree-optimization/77283
246         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
247         and ssa-iterators.h.
248         (is_feasible_trace): Implement a cost model based on joiner
249         PHI node uses.
251 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
253         PR target/79004
254         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
255         char or short to __float128/_Float128 directly.
257 2017-01-12  Martin Sebor  <msebor@redhat.com>
259         to -Wformat-overflow.
260         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
261         (min_bytes_remaining): Same.
262         (get_string_length): Same.
263         (format_string): Same.
264         (format_directive): Same.
265         (add_bytes): Same.
266         (pass_sprintf_length::handle_gimple_call): Same.
268 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
270         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
271         info.nowrite calls with no lhs that can't throw.  Return bool
272         whether gsi_remove has been called or not.
273         (pass_sprintf_length::handle_gimple_call): Return bool whether
274         try_substitute_return_value called gsi_remove.  Formatting fix.
275         (pass_sprintf_length::execute): Don't use gsi_remove if
276         handle_gimple_call returned true.
278         PR bootstrap/79069
279         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
280         be removed due to side-effects, don't remove following barrier nor
281         turn the successor edge into fallthru edge.
283 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
285         PR target/79044
286         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
287         element-reversing loads and stores as not swappable.
289 2017-01-12  Nathan Sidwell  <nathan@acm.org>
290             Nicolai Stange  <nicstange@gmail.com>
292         * combine.c (try_combine): Don't ignore result of overlap checking
293         loop.  Combine overlap & asm check into single loop.
295 2017-01-12  Richard Biener  <rguenther@suse.de>
297         * tree-pretty-print.c (dump_generic_node): Provide -gimple
298         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
300 2017-01-12  Richard Biener  <rguenther@suse.de>
302         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
303         and TS_TARGET_OPTION directly derive from TS_BASE.
304         * tree-core.h (tree_optimization_option): Derive from tree_base.
305         (tree_target_option): Likewise.
307 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
309         * config/i386/i386.c (memory_address_length): Increase len
310         only when rip_relative_addr_p returns false.
312 2017-01-11  Julia Koval  <julia.koval@intel.com>
314         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
315         (OPTION_MASK_ISA_SGX_SET): New.
316         (ix86_handle_option): Handle OPT_msgx.
317         * config.gcc: Added sgxintrin.h.
318         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
319         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
320         * config/i386/i386.c (ix86_target_string): Add -msgx.
321         (PTA_SGX): New.
322         (ix86_option_override_internal): Handle new options.
323         (ix86_valid_target_attribute_inner_p): Add sgx.
324         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
325         * config/i386/i386.opt: Add msgx.
326         * config/i386/sgxintrin.h: New file.
327         * config/i386/x86intrin.h: Add sgxintrin.h.
329 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
331         PR c++/71537
332         * fold-const.c (maybe_nonzero_address): Return 1 for function
333         local objects.
334         (tree_single_nonzero_warnv_p): Don't handle function local objects
335         here.
337         PR c++/72813
338         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
339         of c-header.
341 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
343         PR driver/78877
344         * opts.c: Include "spellcheck.h"
345         (struct string_fragment): New struct.
346         (struct edit_distance_traits<const string_fragment &>): New
347         struct.
348         (get_closest_sanitizer_option): New function.
349         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
351 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
353         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
354         by 12.
355         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
356         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
357         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
358         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
359         for initial die_offset if dwarf_split_debug_info.
360         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
361         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
362         fields.
363         (output_skeleton_debug_sections): Formatting fix.  Use
364         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
365         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
367 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
369         * config/arm/cortex-a53.md: Add bypasses for
370         cortex_a53_r2f_cvt.
371         (cortex_a53_r2f): Only use for transfers.
372         (cortex_a53_f2r): Likewise.
373         (cortex_a53_r2f_cvt): Add reservation for conversions.
374         (cortex_a53_f2r_cvt): Likewise.
376 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
378         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
379         to all inlined functions, change static to extern.
381 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
383         PR target/78253
384         * config/arm/arm.c (legitimize_pic_address): Handle reference to
385         weak symbol.
386         (arm_assemble_integer): Likewise.
388 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
390         * config.gcc: Use new awk script to check CPU, FPU and architecture
391         parameters for --with-... options.
392         * config/arm/parsecpu.awk: New file
393         * config/arm/arm-cpus.in: New file.
394         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
395         files.
396         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
397         files.
398         * config/arm/t-arm: Update dependency rules.
399         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
400         of processing .def files.
401         * config/arm/genopt.sh: Deleted.
402         * config/arm/gentune.sh: Deleted.
403         * config/arm/arm-cores.def: Deleted.
404         * config/arm/arm-arches.def: Deleted.
405         * config/arm/arm-fpus.def: Deleted.
406         * config/arm/arm-tune.md: Regenerated.
407         * config/arm/arm-tables.opt: Regenerated.
408         * config/arm/arm-cpu.h: New generated file.
409         * config/arm/arm-cpu-data.h: New generated file.
410         * config/arm/arm-cpu-cdata.h: New generated file.
412 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
414         PR lto/79042
415         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
416         bit.
417         (input_varpool_node): Unpack dynamically_initialized bit.
419 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
421         PR rtl-optimization/79032
422         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
423         the alignment of the adjusted memory reference against that of MODE,
424         instead of the alignment of the original memory reference.
426 2017-01-11  Martin Jambor  <mjambor@suse.cz>
428         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
429         test.
430         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
431         decorated functions.
433 2017-01-11  Richard Biener  <rguenther@suse.de>
435         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
436         set range/nonnull info for PHI results.  Do not set it on
437         stmts marked for removal.
439 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
441         * expr.c (store_field): In the bitfield case, fetch the return value
442         from the registers before applying a single big-endian adjustment.
443         Always do a final load for a BLKmode value not larger than a word.
445 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
447         PR c++/77949
448         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
449         that we correctly handle column numbers greater than
450         LINE_MAP_MAX_COLUMN_NUMBER.
452 2017-01-10  Martin Sebor  <msebor@redhat.com>
454         PR middle-end/78245
455         * gimple-ssa-sprintf.c (get_destination_size): Call
456         {init,fini}object_sizes.
457         * tree-object-size.c (addr_object_size): Adjust.
458         (pass_through_call): Adjust.
459         (pass_object_sizes::execute): Adjust.
460         * tree-object-size.h (fini_object_sizes): Declare.
462 2017-01-10  Martin Sebor  <msebor@redhat.com>
464         PR tree-optimization/78775
465         * builtins.c (get_size_range): Move...
466         * calls.c: ...to here.
467         (alloc_max_size): Accept zero argument.
468         (operand_signed_p): Remove.
469         (maybe_warn_alloc_args_overflow): Call get_size_range.
470         * calls.h (get_size_range): Declare.
472 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
474         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
475         from TI's devices.csv file as of September 2016.
476         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
478 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
480         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
481         * doc/invoke.texi: Likewise.
482         * doc/md.texi: Likewise.
483         * doc/objc.texi: Likewise.
485 2017-01-10  Joshua Conner  <joshconner@google.com>
487         * config/arm/fuchsia-elf.h: New file.
488         * config/fuchsia.h: New file.
489         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
490         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
491         targets.
492         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
494 2016-01-10  Richard Biener  <rguenther@suse.de>
496         PR tree-optimization/79034
497         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
498         Propagate out degenerate PHIs in the joiner.
500 2017-01-10  Martin Liska  <mliska@suse.cz>
502         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
503         (sort_congruence_classes_by_decl_uid): Likewise.
504         (sort_congruence_class_groups_by_decl_uid): Likewise.
505         (sem_item_optimizer::merge_classes): Sort class, groups in these
506         classes and members in the groups by DECL_UID of declarations.
507         This would make merge operations stable.
509 2017-01-10  Martin Liska  <mliska@suse.cz>
511         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
512         usage of m_classes_vec.
513         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
514         (sem_item_optimizer::get_group_by_hash): Likewise.
515         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
516         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
517         (sem_item_optimizer::verify_classes): Likewise.
518         (sem_item_optimizer::process_cong_reduction): Likewise.
519         (sem_item_optimizer::dump_cong_classes): Likewise.
520         (sem_item_optimizer::merge_classes): Likewise.
521         * ipa-icf.h (congruence_class_hash): Rename from
522         congruence_class_group_hash.  Remove declaration of m_classes_vec.
524 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
526         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
527         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
528         * config.gcc: Add avx512vpopcntdqintrin.h.
529         * config/i386/avx512vpopcntdqintrin.h: New.
530         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
531         * config/i386/i386-builtin-types.def: Add new types.
532         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
533         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
534         __builtin_ia32_vpopcountq_v8di_mask): New.
535         * config/i386/i386-c.c (ix86_target_macros_internal): Define
536         __AVX512VPOPCNTDQ__.
537         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
538         (PTA_AVX512VPOPCNTDQ): Define.
539         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
540         TARGET_AVX512VPOPCNTDQ_P): Define.
541         * config/i386/i386.opt: Add mavx512vpopcntdq.
542         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
543         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
545 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
547         PR middle-end/77484
548         * predict.def (PRED_CALL): Set to 67.
550 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
552         * expr.c (store_field): In the bitfield case, if the value comes from
553         a function call and is of an aggregate type returned in registers, do
554         not modify the field mode; extract the value in all cases if the mode
555         is BLKmode and the size is not larger than a word.
557 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
559         PR target/71017
560         * config/i386/cpuid.h: Fix undefined behavior.
562 2017-01-04  Jeff Law  <law@redhat.com>
564         PR tree-optimization/79007
565         PR tree-optimization/67955
566         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
567         conservative for pt.null when flag_non_call_exceptions is on.
569 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
571         PR translation/79019
572         PR translation/79020
573         * params.def (PARAM_INLINE_MIN_SPEEDUP,
574         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
575         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
576         in descriptions.
577         * config/avr/avr.opt (maccumulate-args): Likewise.
578         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
579         * common.opt (freport-bug): Likewise.
580         * cif-code.def (CIF_FINAL_ERROR): Likewise.
581         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
582         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
583         translatable string.
584         * config/i386/i386.c (function_value_32): Likewise.
585         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
586         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
587         Likewise.
588         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
589         * common/config/msp430/msp430-common.c (msp430_handle_option):
590         Likewise.
591         * symtab.c (symtab_node::verify_base): Likewise.
592         * opts.c (set_debug_level): Likewise.
593         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
594         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
595         missing whitespace to translatable strings.
596         * config/avr/avr.md (bswapsi2): Fix typo in comment.
597         * config/sh/superh.h: Likewise.
598         * config/i386/xopintrin.h: Likewise.
599         * config/i386/znver1.md: Likewise.
600         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
601         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
602         * double-int.h (struct double_int): Likewise.
603         * double-int.c (div_and_round_double): Likewise.
604         * wide-int.cc: Likewise.
605         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
606         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
607         * cfgcleanup.c (crossjumps_occured): Renamed to ...
608         (crossjumps_occurred): ... this.
609         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
610         Adjust all uses.
612         PR tree-optimization/78899
613         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
614         returning bool return struct loop *, NULL for failure and the new
615         loop on success.
616         (versionable_outer_loop_p): Don't version outer loop if it has
617         dont_vectorized bit set.
618         (tree_if_conversion): When versioning outer loop, ensure
619         tree_if_conversion is performed also on the inner loop of the
620         non-vectorizable outer loop copy.
621         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
622         LOOP_VECTORIZED in inner loop of the scalar outer loop and
623         prevent vectorization of it.
624         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
625         the outer loop vectorization of the non-scalar version is attempted
626         before vectorization of the inner loop in scalar version.  If
627         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
628         vectorization of its inner loop.
629         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
630         has 2 inner loops, rename also on edges from bb whose single pred
631         is outer_loop->header.  Fix typo in function comment.
633 2017-01-09  Martin Sebor  <msebor@redhat.com>
635         PR bootstrap/79033
636         * asan.c (asan_emit_stack_protection): Increase local buffer size
637         to avoid snprintf truncation warning.
639 2017-01-09  Andrew Pinski  <apinski@cavium.com>
641         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
642         to reference thunderx2t99 for the tuning structure
643         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
644         Rename to ...
645         (thunderx2t99_extra_costs): This.
646         * config/aarch64/aarch64-tune.md: Regenerate.
647         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
648         (vulcan_addrcost_table): This.
649         (vulcan_regmove_cost): Rename to ...
650         (thunderx2t99_regmove_cost): This.
651         (vulcan_vector_cost): Rename to ...
652         (thunderx2t99_vector_cost): this.
653         (vulcan_branch_cost): Rename to ...
654         (thunderx2t99_branch_cost): This.
655         (vulcan_tunings): Rename to ...
656         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
657         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
659 2017-01-09  Martin Jambor  <mjambor@suse.cz>
661         PR ipa/78365
662         PR ipa/78599
663         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
664         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
665         (propagate_vr_accross_jump_function): Use the above function for all
666         value range computations for pass-through jump functions and type
667         converasion from explicit value range values.
668         (ipcp_propagate_stage): Do not attempt to deduce types of formal
669         parameters from TYPE_ARG_TYPES.
670         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
671         (ipa_write_node_info): Stream type of the actual argument.
672         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
674 2017-01-09  Martin Liska  <mliska@suse.cz>
676         PR pch/78970
677         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
678         (lookup_compiler): Do not show error message with have_E.
680 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
682         PR tree-optimization/78938
683         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
684         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
685         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
686         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
687         fixes.
689 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
691         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
692         is const0_rtx.
694 2017-01-09  Richard Biener  <rguenther@suse.de>
696         PR tree-optimization/78997
697         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
698         name condition properly.
700 2017-01-09  Richard Biener  <rguenther@suse.de>
702         PR debug/79000
703         * dwarf2out.c (is_cxx): New overload with context.
704         (is_naming_typedef_decl): Use it.
706 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
708         * invoke.texi (Option Summary): Correct spacing in option lists
709         and add line breaks to fix over-long lines.
711 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
713         PR middle-end/17660
715         * extend.texi (Common Variable Attributes): Add xref to GCC
716         Internals manual to explain mode attribute keywords.
718 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
720         PR other/16519
721         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
722         and Preprocessor Options.
723         (Options for Linking): Document -pthread here....
724         (RS/6000 and PowerPC Options): ...not here.
725         (Solaris 2 Options): ...or here.
726         * doc/cppopts.texi: Document -pthread.
728 2017-01-08  Martin Sebor  <msebor@redhat.com>
730         PR middle-end/77708
731         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
732         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
733         New member functions.
734         (format_directive): Used them.
735         (add_bytes): Same.
736         (pass_sprintf_length::handle_gimple_call): Same.
737         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
738         to avoid truncation for any argument.
739         (extract_affine_mul): Same.
740         * tree.c (get_file_function_name): Same.
742 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
744         PR middle-end/77484
745         * predict.def (PRED_INDIR_CALL): Set to 86.
747 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
749         PR preprocessor/54124
750         * doc/cppopts.texi: Reformat -d subtable to list the full name
751         of the options.  Add cross-reference to the docs for the general
752         compiler -d options.
753         * doc/invoke.texi (Developer Options): Add cross-reference to the
754         preprocessor-specific -d option documentation.
756 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
758         PR preprocessor/13498
759         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
760         redudant material, and reflect new command-line options.
761         (System Headers): Likewise.
763 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
765         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
766         -isystem, and -idirafter.  Copy-edit.
767         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
768         default for -ftrack-macro-expansion.  Delete obsolete and
769         badly-formatted implementation details about -fdebug-cpp output.
770         * doc/cppwarnopts.texi: Copy-edit.
772 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
774         PR c++/72803
775         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
776         that the transition from a max line width >= 1<<10 to narrower
777         lines works correctly.
779 2017-01-07  Alexandre Oliva <aoliva@redhat.com>
781         * doc/options.texi (PerFunction): New.
782         * opt-functions.awk (switch_flags): Map both Optimization and
783         PerFunction to CL_OPTIMIZATION.
784         * opth-gen.awk: Test for PerFunction flag along with
785         Optimization.
786         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
787         it only when the latter is present.  Skip those that don't in
788         the hash function generator.
789         * common.opt (fvar-tracking): Mark as PerFunction instead of
790         Optimization.
791         (fvar-tracking-assignments): Likewise.
792         (fvar-tracking-assignments-toggle): Likewise.
793         (fvar-tracking-uninit): Likewise.
795 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
797         PR translation/79018
798         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
799         the and store.
801 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
803         PR target/57583
804         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
805         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
806         TARGET_LONG_JUMP_TABLE_OFFSETS.
807         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
808         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
809         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
810         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
811         * config/m68k/m68k.md (tablejump expander): Likewise.
812         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
813         TARGET_LONG_JUMP_TABLE_OFFSETS.
814         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
815         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
817 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
818             David Holsgrove <david.holsgrove@xilinx.com>
820         * common/config/microblaze/microblaze-common.c
821         (TARGET_EXCEPT_UNWIND_INFO): Remove.
822         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
823         New prototype.
824         * config/microblaze/microblaze.c (microblaze_must_save_register)
825         (microblaze_expand_epilogue, microblaze_return_addr): Handle
826         calls_eh_return.
827         (microblaze_eh_return): New function.
828         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
829         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
830         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
831         * config/microblaze/microblaze.md (eh_return): New pattern.
833 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
835         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
836         GCC_DIAGNOSTIC_STRINGIFY): Define.
838         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
840 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
842         * config/arm/arm.md (<mcrr>): New.
843         (<mrrc>): New.
844         * config/arm/arm.c (arm_arch5te): New.
845         (arm_option_override): Set arm_arch5te.
846         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
847         and mrrc2.
848         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
849         (arm_mcrr_qualifiers): ... this. New.
850         (MRRC_QUALIFIERS): Define to...
851         (arm_mrrc_qualifiers): ... this. New.
852         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
853         __arm_mrrc2): New.
854         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
855         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
856         (MRRCI, mrrc, MRRC): New.
857         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
858         VUNSPEC_MRRC2): New.
860 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
862         * config/arm/arm.md (<mcr>): New.
863         (<mrc>): New.
864         * config/arm/arm.c (arm_coproc_builtin_available): Add
865         support for mcr, mrc, mcr2 and mrc2.
866         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
867         (arm_mcr_qualifiers): ... this. New.
868         (MRC_QUALIFIERS): Define to ...
869         (arm_mrc_qualifiers): ... this. New.
870         (MCR_QUALIFIERS): Define to ...
871         (arm_mcr_qualifiers): ... this. New.
872         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
873         __arm_mrc2): New.
874         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
875         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
876         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
877         VUNSPEC_MRC2): New.
879 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
881         * config/arm/arm.md (*ldc): New.
882         (*stc): New.
883         (<ldc>): New.
884         (<stc>): New.
885         * config/arm/arm.c (arm_coproc_builtin_available): Add
886         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
887         (arm_coproc_ldc_stc_legitimate_address): New.
888         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
889         'qualifier_const_pointer'.
890         (LDC_QUALIFIERS): Define to...
891         (arm_ldc_qualifiers): ... this. New.
892         (STC_QUALIFIERS): Define to...
893         (arm_stc_qualifiers): ... this. New.
894         * config/arm/arm-protos.h
895         (arm_coproc_ldc_stc_legitimate_address): New.
896         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
897         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
898         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
899         stc2, stcl, stc2l): New.
900         * config/arm/constraints.md (Uz): New.
901         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
902         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
903         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
904         VUNSPEC_STC2L): New.
906 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
908         * config/arm/arm.md (<cdp>): New.
909         * config/arm/arm.c (neon_const_bounds): Rename this ...
910         (arm_const_bounds): ... this.
911         (arm_coproc_builtin_available): New.
912         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
913         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
914         (CDP_QUALIFIERS): Define to...
915         (arm_cdp_qualifiers): ... this. New.
916         (void_UP): Define.
917         (arm_expand_builtin_args): Add case for 6 arguments.
918         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
919         (arm_const_bounds): ... this.
920         (arm_coproc_builtin_available): New.
921         * config/arm/arm_acle.h (__arm_cdp): New.
922         (__arm_cdp2): New.
923         * config/arm/arm_acle_builtins.def (cdp): New.
924         (cdp2): New.
925         * config/arm/iterators.md (CDPI,CDP,cdp): New.
926         * config/arm/neon.md: Rename all 'neon_const_bounds' to
927         'arm_const_bounds'.
928         * config/arm/types.md (coproc): New.
929         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
930         * gcc/doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
931         * gcc/doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
932         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
934 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
936         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
937         (UBINOP_QUALIFIERS): New.
938         (si_UP): Define.
939         (acle_builtin_data): New. Change comment.
940         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
941         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
942         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
943         arm_acle_builtins.def.
944         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
945         (arm_init_acle_builtins): New.
946         (CRC32_BUILTIN): Remove.
947         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
948         crc32cb, crc32ch and crc32cw.
949         (arm_init_crc32_builtins): Remove.
950         (arm_init_builtins): Use arm_init_acle_builtins rather
951         than arm_init_crc32_builtins.
952         (arm_expand_acle_builtin): New.
953         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
954         * config/arm/arm_acle_builtins.def: New.
956 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
958         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
959         (arm_builtin_datum): ... this.
960         (arm_init_neon_builtin): Rename to ...
961         (arm_init_builtin): ... this. Add a new parameters PREFIX
962         and USE_SIG_IN_NAME.
963         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
964         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
965         'arm_builtin_datum'.
966         (arm_init_vfp_builtins): Likewise.
967         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
968         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
969         (arm_expand_neon_args): Rename to ...
970         (arm_expand_builtin_args): ... this. Rename builtin_arg
971         enum values and differentiate between ARG_BUILTIN_MEMORY
972         and ARG_BUILTIN_NEON_MEMORY.
973         (arm_expand_neon_builtin_1): Rename to ...
974         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
975         values, arm_expand_builtin_args and add bool parameter NEON.
976         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
977         (arm_expand_vfp_builtin): Likewise.
978         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
980 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
982         PR middle-end/77484
983         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
984         * predict.c (tree_estimate_probability_bb): Reverse direction of
985         polymorphic call predictor.
987 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
989         * passes.c (execute_one_pass): Split out pass-skipping logic into...
990         (determine_pass_name_match): ...this new function and...
991         (should_skip_pass_p): ...this new function.
993 2017-01-06  Nathan Sidwell  <nathan@acm.org>
995         * ipa-visibility.c (function_and_variable_visibility): Reformat
996         comments and long lines.  Remove extrneous if.
997         * symtab.c (symtab_node::make_decl_local): Fix code format.
998         (symtab_node::set_section_for_node): Fix comment typo.
1000 2017-01-06  Martin Liska  <mliska@suse.cz>
1002         PR bootstrap/79003
1003         * lra-constraints.c: Rename invariant to lra_invariant.
1004         * predict.c (set_even_probabilities): Initialize e to NULL.
1006 2017-01-05  Martin Sebor  <msebor@redhat.com>
1008         PR tree-optimization/78910
1009         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
1010         (format_integer): Correct off-by-one error in the handling
1011         of precision with negative numbers in signed conversions..
1013 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
1015         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
1017 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
1019         PR tree-optimization/71016
1020         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
1021         factor_out_conditional_conversion.  Formatting fix.
1022         (factor_out_conditional_conversion): Add cond_stmt argument.
1023         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
1024         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
1025         Formatting fix.
1027 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
1029         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
1030         read-rtl-function.o, and selftest-rtl.o.
1031         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
1032         (selftest::aarch64_test_loading_full_dump): New function.
1033         (selftest::aarch64_run_selftests): New function.
1034         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
1035         selftest::aarch64_run_selftests.
1036         * config/i386/i386.c
1037         (selftest::ix86_test_loading_dump_fragment_1): New function.
1038         (selftest::ix86_test_loading_call_insn): New function.
1039         (selftest::ix86_test_loading_full_dump): New function.
1040         (selftest::ix86_test_loading_unspec): New function.
1041         (selftest::ix86_run_selftests): Call the new functions.
1042         * emit-rtl.c (maybe_set_max_label_num): New function.
1043         * emit-rtl.h (maybe_set_max_label_num): New decl.
1044         * function.c (instantiate_decls): Guard call to
1045         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
1046         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
1047         "static".
1048         * gensupport.c (gen_reader::gen_reader): Pass "false"
1049         for new "compact" param of rtx_reader.
1050         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
1051         rather than an empty string for NULL strings.
1052         * read-md.c: Potentially include config.h rather than bconfig.h.
1053         Wrap include of errors.h with #ifdef GENERATOR_FILE.
1054         (have_error): New global, copied from errors.c.
1055         (md_reader::read_name): Rename to...
1056         (md_reader::read_name_1): ...this, adding "out_loc" param,
1057         and converting "missing name or number" to returning false, rather
1058         than failing.
1059         (md_reader::read_name): Reimplement in terms of read_name_1.
1060         (md_reader::read_name_or_nil): New function.
1061         (md_reader::read_string): Handle "(nil)" by returning NULL.
1062         (md_reader::md_reader): Add new param "compact".
1063         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
1064         (md_reader::read_file): New method.
1065         * read-md.h (md_reader::md_reader): Add new param "compact".
1066         (md_reader::read_file): New method.
1067         (md_reader::is_compact): New accessor.
1068         (md_reader::read_name): Convert return type from void to file_location.
1069         (md_reader::read_name_or_nil): New decl.
1070         (md_reader::read_name_1): New decl.
1071         (md_reader::m_compact): New field.
1072         (noop_reader::noop_reader): Pass "false" for new "compact" param
1073         of rtx_reader.
1074         (rtx_reader::rtx_reader): Add new "compact" param.
1075         (rtx_reader::read_rtx_operand): Make virtual and convert return
1076         type from void to rtx.
1077         (rtx_reader::read_until): New decl.
1078         (rtx_reader::handle_any_trailing_information): New virtual function.
1079         (rtx_reader::postprocess): New virtual function.
1080         (rtx_reader::finalize_string): New virtual function.
1081         (rtx_reader::m_in_call_function_usage): New field.
1082         (rtx_reader::m_reuse_rtx_by_id): New field.
1083         * read-rtl-function.c: New file.
1084         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
1085         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
1086         (selftest::verify_three_block_rtl_cfg): New decl.
1087         * read-rtl-function.h: New file.
1088         * read-rtl.c: Potentially include config.h rather than bconfig.h.
1089         For host, include function.h, memmodel.h, and emit-rtl.h.
1090         (one_time_initialization): New function.
1091         (struct compact_insn_name): New struct.
1092         (compact_insn_names): New array.
1093         (find_code): Handle insn codes in compact dumps.
1094         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
1095         (bind_subst_iter_and_attr): Likewise.
1096         (add_condition_to_string): Likewise.
1097         (add_condition_to_rtx): Likewise.
1098         (apply_attribute_uses): Likewise.
1099         (add_current_iterators): Likewise.
1100         (apply_iterators): Likewise.
1101         (initialize_iterators): Guard usage of apply_subst_iterator with
1102         #ifdef GENERATOR_FILE.
1103         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
1104         (md_reader::read_mapping): Likewise.
1105         (add_define_attr_for_define_subst): Likewise.
1106         (add_define_subst_attr): Likewise.
1107         (read_subst_mapping): Likewise.
1108         (check_code_iterator): Likewise.
1109         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
1110         logic to...
1111         (one_time_initialization): New function.
1112         (rtx_reader::read_until): New method.
1113         (read_flags): New function.
1114         (parse_reg_note_name): New function.
1115         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
1116         Handle reuse_rtx ids.
1117         Wrap iterator lookup within #ifdef GENERATOR_FILE.
1118         Add parsing support for RTL dumps, mirroring the special-cases in
1119         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
1120         values, and calling handle_any_trailing_information.
1121         (rtx_reader::read_rtx_operand): Convert return type from void
1122         to rtx, returning return_rtx.  Handle case 'e'.  Call
1123         finalize_string on XSTR and XTMPL fields.
1124         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
1125          "(nil)" values were omitted.  Call the postprocess vfunc on the
1126         return_rtx.
1127         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
1128         class ctor.  Initialize m_in_call_function_usage.  Call
1129         one_time_initialization.
1130         * rtl-tests.c (selftest::test_uncond_jump): Call
1131         set_new_first_and_last_insn.
1132         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
1133         * selftest-rtl.c: New file.
1134         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
1135         (selftest::get_insn_by_uid): New decl.
1136         * selftest-run-tests.c (selftest::run_tests): Call
1137         read_rtl_function_c_tests.
1138         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
1139         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
1140         dumps.
1142 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
1144         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
1145         operands in a special way.  Assert that pos+len <= mode precision.
1147 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
1149         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
1150         3 argument Alias with unlimited for the negative form.
1151         (fno-vect-cost-model): Removed.
1153 2017-01-05  Martin Liska  <mliska@suse.cz>
1155         * hsa-gen.c (gen_hsa_divmod): New function.
1156         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
1158 2017-01-05  Martin Liska  <mliska@suse.cz>
1160         PR pch/78970
1161         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
1162         header.
1164 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1166         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
1167         small constant length operands.
1169 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1171         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
1172         between loop iterations.
1174 2017-01-05  Martin Liska  <mliska@suse.cz>
1176         PR sanitizer/78815
1177         * gimplify.c (gimplify_decl_expr): Compare to
1178         asan_poisoned_variables instread of checking flags.
1179         (gimplify_target_expr): Likewise.
1180         (gimplify_expr): Likewise.
1181         (gimplify_function_tree): Conditionally initialize
1182         asan_poisoned_variables.
1184 2017-01-04  Jeff Law  <law@redhat.com>
1186         PR tree-optimizatin/78812
1187         * rtl.h (contains_mem_rtx_p): Prototype.
1188         * ifcvt.c (containts_mem_rtx_p): Move from here to...
1189         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
1190         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
1191         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
1192         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
1194 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1196         * input.c (assert_char_at_range): Default-initialize actual_range.
1198 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1200         * df-scan.c (df_ref_create_structure): Make regno unsigned,
1201         to match the caller.
1203 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1205         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
1206         insns after final jump in test to emit dummy move.
1208 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1210         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
1211         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
1213 2017-01-04  Alexandre Oliva <aoliva@redhat.com>
1215         * multiple_target.c (create_dispatcher_calls): Init e_next.
1216         * tree-ssa-loop-split.c (split_loop): Init border.
1217         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
1218         scalar_type.
1220 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
1222         PR target/71977
1223         PR target/70568
1224         PR target/78823
1225         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
1226         (altivec_register_operand): Do not return true if the operand
1227         contains a SUBREG mixing SImode and SFmode.
1228         (vsx_register_operand): Likewise.
1229         (vsx_reg_sfsubreg_ok): New predicate.
1230         (vfloat_operand): Do not return true if the operand contains a
1231         SUBREG mixing SImode and SFmode.
1232         (vint_operand): Likewise.
1233         (vlogical_operand): Likewise.
1234         (gpc_reg_operand): Likewise.
1235         (int_reg_operand): Likewise.
1236         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
1237         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
1238         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
1239         SImode and SFmode.
1240         (rs6000_emit_move_si_sf_subreg): New helper function.
1241         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
1242         fixup SUBREGs involving SImode and SFmode.
1243         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
1244         numbers for the new peephole2 optimization.
1245         (peephole2 for SFmode unions): New peephole2 to optimize cases in
1246         the GLIBC math library that do AND/IOR/XOR operations on single
1247         precision floating point.
1248         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
1249         target macros to say whether we need to avoid SUBREGs mixing
1250         SImode and SFmode.
1251         (TARGET_ALLOW_SF_SUBREG): Likewise.
1252         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
1253         (UNSPEC_SI_FROM_SF): Likewise.
1254         (iorxor): Change spacing.
1255         (and_ior_xor): New iterator for AND, IOR, and XOR.
1256         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
1257         (movdi_from_sf_zero_ext): Likewise.
1258         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
1259         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
1260         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
1261         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
1262         (fms<mode>4): Likewise.
1263         (fnma<mode>4): Likewise.
1264         (fnms<mode>4): Likewise.
1265         (nfma<mode>4): Likewise.
1266         (nfms<mode>4): Likewise.
1268 2017-01-04  Marek Polacek  <polacek@redhat.com>
1270         PR c++/64767
1271         * doc/invoke.texi: Document -Wpointer-compare.
1273 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
1275         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
1276         RejectNegative.
1278         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
1279         descriptions for -gdwarf-5 and emit them as uleb128 instead of
1280         2-byte data.
1282 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1284         PR target/78056
1285         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
1286         documentation of the powerpc_popcntb_ok attribute.
1287         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
1288         code to issue warning messages if a requested CPU configuration is
1289         not supported by the binary (assembler and loader) toolchain.
1290         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
1291         made to define a built-in function that has been disabled.
1292         (paired_init_builtins): Add assertion to prevent ICE if attempt is
1293         made to define a built-in function that has been disabled.
1294         (altivec_init_builtins): Add comment explaining why definition
1295         of the DST built-in functions is not preceded by an assertion
1296         check.  Add assertions to prevent ICE if attempts are made to
1297         define an altivec predicate or an abs* built-in function that has
1298         been disabled.
1299         (htm_init_builtins): Add comment explaining why definition of the
1300         htm built-in functions is not preceded by an assertion check.
1302 2017-01-04  Jeff Law  <law@redhat.com>
1304         PR tree-optimizatin/67955
1305         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
1306         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
1307         the points-to solution does not include pt_null.  Use DECL_PT_UID
1308         unconditionally.
1310 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
1312         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
1313         Use gen_int_mode instead of gen_lopwart for const_int operands.
1315 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
1317         PR tree-optimization/71563
1318         * match.pd: Simplify X << Y into X if Y is known to be 0 or
1319         out of range value - has low bits known to be zero.
1321 2017-01-04  Alan Modra  <amodra@gmail.com>
1323         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
1324         * configure: Regenerate.
1325         * config.in: Regenerate.
1327 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
1329         PR bootstrap/77569
1330         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
1331         a substring of the message, but strcmp with the whole message.  Ifdef
1332         ENABLE_NLS, translate the message first using dgettext.
1334 2017-01-03  Jeff Law  <law@redhat.com>
1336         PR tree-optimizatin/78856
1337         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
1338         (mark_threaded_blocks): Remove code to truncate thread paths that
1339         cross multiple loop headers.  Instead invalidate the cached loop
1340         iteration information and handle case of a thread path walking
1341         into an irreducible region.
1343 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
1345         PR target/78900
1346         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
1347         assertions.  Add support for doing the signbit if the IEEE 128-bit
1348         floating point value is in a GPR.
1349         * config/rs6000/rs6000.md (Fsignbit): Delete.
1350         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
1351         Update the length attribute if the value is in a GPR.
1352         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
1353         the sign or zero extension instruction, since the value is always 0/1.
1354         (signbit<mode>2_dm2): Delete using <Fsignbit>.
1356         PR target/78953
1357         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
1358         extracting SImode to a GPR register so that we can generate a
1359         store, limit the vector to be in a traditional Altivec register
1360         for the vextuwrx instruction.
1362 2017-01-03  Ian Lance Taylor  <iant@google.com>
1364         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
1366 2017-01-03  Martin Sebor  <msebor@redhat.com>
1368         PR tree-optimization/78696
1369         * gimple-ssa-sprintf.c (format_floating): Correct handling of
1370         precision.  Use MPFR for %f for greater fidelity.  Correct handling
1371         of %g.
1372         (pass_sprintf_length::compute_format_length): Set width and precision
1373         specified by asrerisk to void_node for vararg functions.
1374         (try_substitute_return_value): Adjust dump output.
1376 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
1378         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
1380 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
1382         * doc/invoke.texi (SPARC options): Document -mlra as the default.
1383         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
1384         -mlra/-mno-lra was passed to the compiler.
1386 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
1388         PR rtl-optimization/65618
1389         * emit-rtl.c (try_split): Move initialization of "before" and
1390         "after" to just before the call to emit_insn_after_setloc.
1392 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
1394         * doc/md.texi (Standard Names): Remove reference to Java frontend.
1396 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
1398         * dwarf2out.c (gen_enumeration_type_die): When
1399         -gno-strict-dwarf, add a DW_AT_encoding attribute.
1401 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
1403         PR tree-optimization/78965
1404         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
1405         Change first argument from const call_info & to call_info &.  For %n
1406         set info.nowrite to false.
1408         PR middle-end/78901
1409         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
1410         possibly throwing calls.
1412         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
1413         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
1414         and fns handling, rather than in a separate case SSA_NAME.
1416 2017-01-02  Jeff Law  <law@redhat.com>
1418         * config/darwin-driver.c (darwin_driver_init): Const-correctness
1419         fixes for first_period and second_period variables.
1421 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
1423         PR target/78967
1424         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
1425         (*insvqi_1): New insn pattern.
1426         (*insvqi_1_mem_rex64): Ditto.
1427         (*insvqi_2): Ditto.
1428         (*insvqi_3): Rename from *insvqi.
1430         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
1432 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
1434         * doc/cfg.texi (Edges): Remove reference to Java.
1435         (Maintaining the CFG): Ditto.
1437 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
1439         PR middle-end/77674
1440         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
1441         transparent aliases.
1443 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
1445         PR middle-end/77484
1446         * predict.def (PRED_CALL): Update hitrate.
1447         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
1448         * predict.c (tree_estimate_probability_bb): Split CALL predictor
1449         into direct/indirect/polymorphic variants.
1451 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
1453         Update copyright years.
1455         * gcc.c (process_command): Update copyright notice dates.
1456         * gcov-dump.c (print_version): Ditto.
1457         * gcov.c (print_version): Ditto.
1458         * gcov-tool.c (print_version): Ditto.
1459         * gengtype.c (create_file): Ditto.
1460         * doc/cpp.texi: Bump @copying's copyright year.
1461         * doc/cppinternals.texi: Ditto.
1462         * doc/gcc.texi: Ditto.
1463         * doc/gccint.texi: Ditto.
1464         * doc/gcov.texi: Ditto.
1465         * doc/install.texi: Ditto.
1466         * doc/invoke.texi: Ditto.
1468 Copyright (C) 2017 Free Software Foundation, Inc.
1470 Copying and distribution of this file, with or without modification,
1471 are permitted in any medium without royalty provided the copyright
1472 notice and this notice are preserved.