* cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
[official-gcc.git] / gcc / ChangeLog
blob60689054d05eab2f641ced023a3381f1c854de61
1 2017-11-18  Jan Hubicka  <hubicka@ucw.cz>
3         * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
4         (cgraph_edge::clone): Cleanup updating of profile.
5         * ipa-cp.c (update_profiling_info): Likewise.
6         * ipa-inline-transform.c (inline_transform): Likewise.
7         * ipa-inline.c (inline_small_functions): Add missing space to dump.
8         * ipa-split.c (execute_split_functions): Do not split when function
9         is cold.
10         * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
11         * profile-count.c (profile_count::dump): Add global0.
12         (profile_count::to_cgraph_frequency): Do not ICE when entry is
13         undefined.
14         (profile_count::to_sreal_scale): Likewise.
15         (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
16         (profile_count::combine_with_ipa_count): New function.
17         * profile-count.h (profile_guessed_global0adjusted): New.
18         (profile_count::adjusted_zero): New.
19         (profile_count::global0adjusted): New.
20         (profile_count::combine_with_ipa_count): New.
21         * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
22         correct profile of return block of split functions.
23         (copy_cfg_body): Remove unused profile_count.
24         (copy_body): Likewise.
25         (expand_call_inline): Update.
26         (tree_function_versioning): Update.
28 2017-11-18  Aldy Hernandez  <aldyh@redhat.com>
30         * hash-set.h (hash_set::empty): New.
31         * tree-ssa-threadbackward.h: Delete.
32         * tree-ssa-threadbackward.c (class thread_jumps): New.
33         Move max_threaded_paths into class.
34         (fsm_find_thread_path): Remove arguments that are now in class.
35         (profitable_jump_thread_path): Rename to...
36         (thread_jumps::profitable_jump_thread_path): ...this.
37         (convert_and_register_jump_thread_path): Rename to...
38         (thread_jumps::convert_and_register_current_path): ...this.
39         (check_subpath_and_update_thread_path): Rename to...
40         (thread_jumps::check_subpath_and_update_thread_path): ...this.
41         (register_jump_thread_path_if_profitable): Rename to...
42         (thread_jumps::register_jump_thread_path_if_profitable): ...this.
43         (handle_phi): Rename to...
44         (thread_jumps::handle_phi): ...this.
45         (handle_assignment): Rename to...
46         (thread_jumps::handle_assignment): ...this.
47         (fsm_find_control_statement_thread_paths): Rename to...
48         (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
49         (find_jump_threads_backwards): Rename to...
50         (thread_jumps::find_jump_threads_backwards): ...this.
51         Initialize path local data.
52         (pass_thread_jumps::execute): Call find_jump_threads_backwards
53         from within thread_jumps class.
54         (pass_early_thread_jumps::execute): Same.
56 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
58         * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
60 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
62         * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
63         to canonical location.
65 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
67         PR target/81356
68         * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
69         Remove.
70         (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
72 2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>
74         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
75         rcrt1.o%s/grcrt1.o%s for -static-pie.
77 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
79         * i386.c (ix86_multiplication_cost, ix86_division_cost,
80         ix86_shift_rotate_cost): Break out from ...
81         (ix86_rtx_costs): ... here.
82         (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
83         vector operations.
85 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
87         * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
88         when entry block was promoted unlikely.
89         (estimate_bb_frequencies): Increase frequency scale.
90         * profile-count.h (profile_count): Export precision info.
92 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
94         * tree-tailcall.c (eliminate_tail_call): Be more careful about not
95         disturbin profile of entry block.
97 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
99         * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
100         roundoff errors.
102 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
104         * ipa-cp.c (update_profiling_info): Handle conversion to local
105         profile.
106         * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
108 2017-11-17  Jeff Law  <law@redhat.com>
110         * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
111         from evrp_dom_walker class.  Various methods moved into new class.
112         (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
113         (evrp_range_analyzer::enter): New method.
114         (evrp_range_analyzer::leave): New method.
115         (evrp_dom_walker): Remove delegators no longer needed by this class.
116         Replace vr_values data member with evrp_range_analyzer
118         * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
119         method extracted from evrp_dom_walker::before_dom_children.
120         (evrp_dom_walker::record_ranges_from_stmt): Likewise.
121         (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
123         * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
124         Add private copy constructor and move assignment operators.
125         Privatize methods and class data where trivially possible.
126         (evrp_dom_walker::cleanup): New function, extracted from
127         execute_early_vrp.  Simplify access to class data.
129         * vr-values.h (get_output_for_vrp): Prototype.
130         * vr-values.c (get_output_for_vrp): New function extracted from
131         vrp_visit_assignment_or_call and extract_range_from_stmt.
132         (vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.
134 2017-11-17  Luis Machado  <luis.machado@linaro.org>
136         * config/aarch64/aarch64.c
137         (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
138         (qdf24xx_tunings) <autoprefetcher_model>: Set to
139         tune_params::AUTOPREFETCHER_WEAK.
141 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
143         PR target/82641
144         * config/arm/arm.c (arm_valid_target_attribute_rec):
145         Parse "arch=" and "+<ext>".
146         (arm_valid_target_attribute_tree): Re-init global options.
147         (arm_option_override): Make non-static.
148         (arm_options_perform_arch_sanity_checks): Make errors fatal.
149         * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
150         (__ARM_FEATURE_CRC32): Support undef.
151         * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
152         * doc/extend.texi (ARM Function Attributes): Add pragma and target.
154 2017-11-17  David Malcolm  <dmalcolm@redhat.com>
156         * gdbinit.in (break-on-diagnostic): New command.
158 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
160         * config/i386/i386.c (ix86_expand_epilogue): Change simple
161         return to indirect jump for EH return if control-flow
162         protection is enabled. Change explicit 'false' argument in
163         pro_epilogue_adjust_stack with a value of
164         flag_cf_protection.
165         * config/i386/i386.md (simple_return_indirect_internal):
166         Remove SImode restriction to support 64-bit.
168 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
170         * combine.c (added_notes_insn): New.
171         (try_combine): Handle added_notes_insn like added_links_insn.
172         Rewrite return value code.
173         (distribute_notes): Set added_notes_insn to the earliest insn we added
174         a note to.
176 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
178         PR rtl-optimization/82621
179         * combine.c (try_combine): Do not split PARALLELs of two SETs if the
180         dest of one of those SETs is unused.
182 2017-11-17  Richard Biener  <rguenther@suse.de>
184         PR fortran/83017
185         * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
186         * tree-pretty-print.c (dump_generic_node): Handle
187         annot_expr_parallel_kind.
188         * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
189         * gimplify.c (gimple_boolify): Likewise.
191 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
193         * config.gcc (extra_headers): Add cet.h for x86 targets.
194         * config/i386/cet.h: New file.
195         * doc/install.texi: Add --enable-cet/--disable-cet.
197 2017-11-17  Richard Biener  <rguenther@suse.de>
199         PR tree-optimization/83017
200         * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
201         (gen_parallel_loop): Properly count iterations.
202         (parallelize_loops): Handle loop->can_be_parallel independent
203         of flag_loop_parallelize_all.  Make static profitability test match
204         the runtime one.
205         * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
206         * invoke.texi (parloops-min-per-thread): Document.
208 2017-11-17  Vineet Gupta  <vgupta@synopsys.com>
210         * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
211         upstreaming review comments.
213 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
215         * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
216         with fast unaligned access.
217         * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
219 2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
221         * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
222         to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
224 2017-11-17  Richard Biener  <rguenther@suse.de>
226         * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
227         folding of references.
229 2017-11-17  Qing Zhao  <qing.zhao@oracle.com>
231         PR middle-end/78809
232         * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
233         of replacing call to strncmp with corresponding call to strcmp when
234         meeting conditions.
236 2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>
238         * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
239         option prefer-avx256 for skylake-avx512 configuration.
240         * config/i386/i386.c (ix86_option_override_internal): Ditto.
241         (get_builtin_code_for_version): Ditto.
243 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
244             Monk Chiang  <sh.chiang04@gmail.com>
246         * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
247         (FIXED_REGISTERS): Reserve more register numbers.
248         (CALL_USED_REGISTERS): Likewise.
249         (REG_ALLOC_ORDER): Likewise.
250         (REG_CLASS_CONTENTS): Likewise.
251         (REGISTER_NAMES): Likewise.
253 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
254             Kito Cheng  <kito.cheng@gmail.com>
256         * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
257         V2SI.
258         * config/nds32/iterators.md: Add vector mode iterators and attributes.
260 2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>
262         * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
263         parameter list for vec_splats.
265 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
267         * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
268         date of C17.
269         (-std=c18, -std=iso9899:2018, -std=gnu18): Document option
270         aliases.
272 2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
274         PR bootstrap/82856
275         * doc/install.texi: Document incompatibility of Perl >=5.6.26
276         with the required version of automake 1.11.6.
278 2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>
280         * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
281         for it.
282         (DU_C2_3_power9): Correct reservation combinations.
283         (FP_DIV_power9, VEC_DIV_power9): New.
284         (power9-alu): Split out rotate/shift...
285         (power9-rot): ...to here, correct dispatch resource.
286         (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
287         resource.
288         (power9-fp): Correct latency.
289         (power9-sdiv): Add div/sqrt resource.
290         (power9-ddiv): Correct latency, add div/sqrt resource.
291         (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
292         (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
293         resource.
294         (power9-qpdiv, power9-qpmul): Adjust resource usage.
296 2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
298         * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
299         switch statement mapping KF built-ins to TF built-ins if we don't
300         have the proper ISA 3.0 assembler support.
302 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
304         * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
305         (lower_emutls_function_body): Do not compute it.
307 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
309         * ipa-split.c (split_bb_info): Turn time to sreal.
310         (split_point): Likewise.
311         (dump_split_point): Likewise.
312         (fine_split_points): Likewise.
313         (execute_split_functions): Only zero split_bbs; turn time to sreals.
315 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
317         * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
318         in sreal.
320 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
322         * predict.c (combine_predictions_for_bb): Preserve zero predicted       
323         eges.
324         (expensive_function_p): Remove useless assert.
325         (determine_unlikely_bbs): Propagate also forward; determine cold blocks
327 2017-11-16  Martin Sebor  <msebor@redhat.com>
329         PR tree-optimization/82588
330         PR tree-optimization/82583
331         * tree-vrp.c (check_array_ref): Handle flexible array members,
332         string literals, and inner indices.
333         (search_for_addr_array): Add detail to diagnostics.
335 2017-11-16  Nathan Sidwell  <nathan@acm.org>
337         PR c++/82836
338         PR c++/82737
339         * tree.h (COPY_DECL_RTL): Rename parms for clarity.
340         (SET_DECL_ASSEMBLER_NAME): Forward to
341         overwrite_decl_assembler_name.
342         (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
343         (overwrite_decl_assembler_name): Declare.
344         * tree.c (overwrite_decl_assembler_name): New.
345         * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
346         (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
347         (LANG_HOOKS_INITIALIZER): Add it.
348         * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
349         * langhooks.c (lhd_set_decl_assembler_name): Use
350         SET_DECL_ASSEMBLER_NAME.
351         (lhd_overwrite_decl_assembler_name): Default implementation.
353 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
354             Jackson Woodruff  <jackson.woodruff@arm.com>
356         PR tree-optimization/71026
357         * match.pd: Canonicalize constant multiplies in division.
359 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
361         * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
362         * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
363         Remove OPT_fomit_frame_pointer entry.
364         * common/config/arc/arc-common.c: Likewise.
365         * common/config/arm/arm-common.c: Likewise.
366         * common/config/avr/avr-common.c: Likewise.
367         * common/config/c6x/c6x-common.c: Likewise.
368         * common/config/cr16/cr16-common.c: Likewise.
369         * common/config/cris/cris-common.c: Likewise.
370         * common/config/epiphany/epiphany-common.c: Likewise.
371         * common/config/fr30/fr30-common.c: Likewise.
372         * common/config/frv/frv-common.c: Likewise.
373         * common/config/ia64/ia64-common.c: Likewise.
374         * common/config/iq2000/iq2000-common.c: Likewise.
375         * common/config/lm32/lm32-common.c: Likewise.
376         * common/config/m32r/m32r-common.c: Likewise.
377         * common/config/mcore/mcore-common.c: Likewise.
378         * common/config/microblaze/microblaze-common.c: Likewise.
379         * common/config/mips/mips-common.c: Likewise.
380         * common/config/mmix/mmix-common.c: Likewise.
381         * common/config/mn10300/mn10300-common.c: Likewise.
382         * common/config/nios2/nios2-common.c: Likewise.
383         * common/config/pa/pa-common.c: Likewise.
384         * common/config/pdp11/pdp11-common.c: Likewise.
385         * common/config/powerpcspe/powerpcspe-common.c: Likewise.
386         * common/config/riscv/riscv-common.c: Likewise.
387         * common/config/rs6000/rs6000-common.c: Likewise.
388         * common/config/rx/rx-common.c: Likewise.
389         * common/config/s390/s390-common.c: Likewise.
390         * common/config/sh/sh-common.c: Likewise.
391         * common/config/sparc/sparc-common.c: Likewise.
392         * common/config/tilegx/tilegx-common.c: Likewise.
393         * common/config/tilepro/tilepro-common.c: Likewise.
394         * common/config/v850/v850-common.c: Likewise.
395         * common/config/visium/visium-common.c: Likewise.
396         * common/config/xstormy16/xstormy16-common.c: Likewise.
397         * common/config/xtensa/xtensa-common.c: Likewise.
398         * invoke.texi (-fomit-frame-pointer): Update documentation.
400 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
402         * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
404 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
406         * cfg.c (scale_bbs_frequencies_int,
407         cale_bbs_frequencies_gcov_type): Remove.
408         * cfg.h (scale_bbs_frequencies_int,
409         cale_bbs_frequencies_gcov_type): Remove.
411 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
413         * tree-ssa-loop-manip.c
414         (scale_dominated_blocks_in_loop): Update to profile counts.
415         (tree_transform_and_unroll_loop): Likewise.
417 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
419         * tree-vect-loop-manip.c (vect_do_peeling): Do not use
420         scale_bbs_frequencies_int.
422 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
424         * final.c (compute_alignments): Use counts rather than frequencies.
426 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
428         * cfgloopanal.c: Include sreal.h
429         (average_num_loop_insns): Use counts and sreal for accounting.
431 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
433         * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
434         manipulation.
436 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
437             Kito Cheng  <kito.cheng@gmail.com>
439         * config/nds32/constraints.md: Provide more constraints.
440         * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
441         REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
442         support constraints usage.
444 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
446         * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
448 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
449             Kito Cheng  <kito.cheng@gmail.com>
451         * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
452         * config/nds32/nds32.opt: Refine the layout.
453         * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
454         TARGET_EXT_STRING): Support new options.
455         * config/nds32/nds32.h: Likewise.
456         * config/nds32/nds32.md: Likewise.
457         * config/nds32/nds32-predicates.c: Likewise.
458         * config/nds32/constraints.md: Likewise.
459         * common/config/nds32/nds32-common.c: Likewise.
461 2017-11-16  Julia Koval  <julia.koval@intel.com>
463         PR target/82983
464         * config/i386/gfniintrin.h: Add sse check.
465         * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
467 2017-11-16  Julia Koval  <julia.koval@intel.com>
469         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
470         OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
471         (ix86_handle_option): Handle -mavx512vbmi2.
472         * config/i386/cpuid.h: Add bit_AVX512VBMI2.
473         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
474         * config/i386/i386-c.c (__AVX512VBMI2__): New.
475         * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
476         (ix86_valid_target_attribute_inner_p): Ditto.
477         * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
478         * config/i386/i386.opt (mavx512vbmi2): New option.
479         * doc/invoke.texi: Add new option.
481 [2017-11-16  Julia Koval  <julia.koval@intel.com>
483         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
484         _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
485         _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
486         _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
487         _mm512_gf2p8mul_epi8): New intrinsics.
488         * config/i386/i386-builtin-types.def
489         (V64QI_FTYPE_V64QI_V64QI): New type.
490         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
491         __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
492         __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
493         __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
494         * config/i386/sse.md (vgf2p8mulb_*): New pattern.
495         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
497 2017-11-15  Uros Bizjak  <ubizjak@gmail.com>
499         * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
500         explicitly as a stream of bytes.
502 2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
504         * config/rs6000/altivec.h (vec_xst_be): New #define.
505         * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
506         and externalize from *altivec_vperm_<mode>_internal.
507         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
508         instantiation.
509         (XL_BE_V8HI): Likewise.
510         (XL_BE_V4SI): Likewise.
511         (XL_BE_V4SI): Likewise.
512         (XL_BE_V2DI): Likewise.
513         (XL_BE_V4SF): Likewise.
514         (XL_BE_V2DF): Likewise.
515         (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
516         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
517         all array entries with these keys: VSX_BUILTIN_VEC_XL,
518         VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
519         VSX_BUILTIN_VEC_XST_BE.
520         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
521         (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
522         built-ins.
523         (altivec_init_builtins): Replace conditional calls to def_builtin
524         for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
525         __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
526         with unconditional calls.  Remove calls to def_builtin for
527         __builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
528         __builtin_vec_xst_be.
529         * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
530         to define_expand, and add alternate RTL generation for P8.
531         (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
532         vsx_ld_elemrev_v8hi.
533         (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
534         add alternate RTL generation for P8.
535         (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
536         vsx_ld_elemrev_v16qi.
537         (vsx_st_elemrev_v8hi): Convert define_insn
538         to define_expand, and add alternate RTL generation for P8.
539         (*vsx_st_elemrev_v8hi_internal): New define_insn based on
540         vsx_st_elemrev_v8hi.
541         (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
542         add alternate RTL generation for P8.
543         (*vsx_st_elemrev_v16qi_internal): New define_insn based on
544         vsx_st_elemrev_v16qi.
546 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
548         PR target/82990
549         * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
550         TARGET_AVX512ER check.
551         (ix86_option_override_internal): Set MASK_VZEROUPPER if
552         neither -mzeroupper nor -mno-zeroupper is used and
553         TARGET_EMIT_VZEROUPPER is set.
554         * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
555         * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
557 2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
559         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
560         folding of vector compares.
561         (fold_build_vec_cmp): New helper function.
562         (fold_compare_helper): New helper function.
563         (builtin_function_type): Add compare builtins to the list of functions
564         having unsigned arguments.  Cosmetic updates to comment indentation.
565         * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
566         the not+eq combination.
568 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
570         PR tree-optimization/82726
571         PR tree-optimization/70754
572         * tree-predcom.c (order_drefs_by_pos): New function.
573         (combine_chains): Move code setting has_max_use_after to...
574         (try_combine_chains): ...here.  New parameter.  Sort combined chains
575         according to position information.
576         (tree_predictive_commoning_loop): Update call to above function.
577         (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
579 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
581         PR tree-optimization/82726
582         Revert
583         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
585         PR tree-optimization/70754
586         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
587         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
588         combined stmt before it if not NULL.
589         (combine_chains): Process refs reversely and compute dominance point
590         for root ref.
592         Revert
593         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
595         PR tree-optimization/79663
596         * tree-predcom.c (combine_chains): Process refs in reverse order
597         only for ZERO length chains, and add explaining comment.
599 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
601         * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
602         * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
603         * doc/invoke.texi (ARM Options): Add armv8.3-a.
605 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
607         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
609 2017-11-15  Martin Liska  <mliska@suse.cz>
611         * tree-cfg.c (pass_warn_function_return::execute):
612         Compare warn_return_type for greater than zero.
614 2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>
616         PR target/82941
617         PR target/82942
618         * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
619         to return true on Xeon and not on Xeon Phi.
620         (ix86_check_avx256_register): Changed to ...
621         (ix86_check_avx_upper_register): ... this. Add extra check for
622         VALID_AVX512F_REG_OR_XI_MODE.
623         (ix86_avx_u128_mode_needed): Changed
624         ix86_check_avx256_register to ix86_check_avx_upper_register.
625         (ix86_check_avx256_stores): Changed to ...
626         (ix86_check_avx_upper_stores): ... this. Changed
627         ix86_check_avx256_register to ix86_check_avx_upper_register.
628         (ix86_avx_u128_mode_after): Changed
629         avx_reg256_found to avx_upper_reg_found. Changed
630         ix86_check_avx256_stores to ix86_check_avx_upper_stores.
631         (ix86_avx_u128_mode_entry): Changed
632         ix86_check_avx256_register to ix86_check_avx_upper_register.
633         (ix86_avx_u128_mode_exit): Ditto.
634         * config/i386/i386.h: (host_detect_local_cpu): New define.
636 2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
638         * config/arm/xgene1.md (xgene1): Split into automatons
639         xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
640         (xgene1_f_load): Adjust reservations and/or types.
641         (xgene1_f_store): Likewise.
642         (xgene1_load_pair): Likewise.
643         (xgene1_store_pair): Likewise.
644         (xgene1_fp_load1): Likewise.
645         (xgene1_load1): Likewise.
646         (xgene1_store1): Likewise.
647         (xgene1_move): Likewise.
648         (xgene1_alu): Likewise.
649         (xgene1_simd): Likewise.
650         (xgene1_bfm): Likewise.
651         (xgene1_neon_load1): Likewise.
652         (xgene1_neon_store1): Likewise.
653         (xgene1_neon_logic): Likewise.
654         (xgene1_neon_st1): Likewise.
655         (xgene1_neon_ld1r): Likewise.
656         (xgene1_alu_cond): Added.
657         (xgene1_shift_reg): Likwise.
658         (xgene1_bfx): Likewise.
659         (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
661 2017-11-15  Jakub Jelinek  <jakub@redhat.com>
663         PR target/82981
664         * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
665         ssa-iterators.h.
666         (can_widen_mult_without_libcall): New function.
667         (expand_mul_overflow): If only checking unsigned mul overflow,
668         not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
669         Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
670         no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
671         (expand_DIVMOD): Formatting fix.
672         * expmed.h (expand_mult): Add NO_LIBCALL argument.
673         * expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
674         than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
676         PR tree-optimization/82977
677         * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
678         constructed temporary to strlen_to_stridx.put.
680 2017-11-15  Martin Liska  <mliska@suse.cz>
682         * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
683         * configure: Regenerate.
685 2017-11-15  Martin Liska  <mliska@suse.cz>
687         PR target/82927
688         * config/sh/sh-mem.cc: Use proper probability for
689         REG_BR_PROB_NOTE.
691 2017-11-14  Jeff Law  <law@redhat.com>
693         * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
694         the red zone for stack_clash_protection_final_dynamic_probe targets
695         when the total dynamic stack size is zero bytes.
697         * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
698         blocks is post order.
700 2017-11-15  Alexandre Oliva <aoliva@redhat.com>
702         * dumpfile.h (TDF_COMPARE_DEBUG): New.
703         * final.c (rest_of_clean_state): Set it for the
704         -fcompare-debug dump.
705         * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
706         class when TDF_COMPARE_DEBUG is set.
708         * dwarf2out.c (gen_producer_string): Discard
709         OPT_fcompare_debug.
711 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
713         PR c/81156
714         * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
715         * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
716         (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
717         (__TGMATH_REAL_2_3): Remove macros.
718         (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
719         (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
720         __builtin_tgmath.
721         (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
722         __TGMATH_REAL_2.
723         (remquo): Define using __TGMATH_REAL_3.
725 2017-11-14  Jeff Law  <law@redhat.com>
727         * vr-values.c: New file with contents extracted from tree-vrp.c.
728         * Makefile.in (OBJS): Add vr-values.o
729         * tree-vrp.h (set_value_range_to_nonnull): Prototype.
730         (set_value_range, set_and_canonicalize_value_range): Likewise.
731         (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
732         (value_range_constant_singleton, symbolic_range_p): Likewise.
733         (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
734         (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
735         (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
736         (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
737         (find_case_label_range, find_case_label_index): Likewise.
738         (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
739         (range_int_cst_singleton_p, value_inside_range): Likewise.
740         (get_single_symbol): Likewise.
741         (switch_update): Move structure definition here.
742         (to_remove_edges, to_update_switch_stmts): Provide externs.
743         * tree-vrp.c: Move all methods for vr-values class to vr-values.c
744         (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
745         (vrp_val_is_min, set_value_range): Likewise.
746         (set_and_canonicalize_value_range, copy_value_range): Likewise.
747         (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
748         (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
749         (range_is_nonnull, range_int_cst_p): Likewwise.
750         (range_int_cst_singleton_p, symbolic_range_p): Likewise.
751         (get_single_symbol, operand_less_p): Likewise
752         (compare_values_warnv, compare_values): Likewise.
753         (value_inside_range, value_range_constant_singleton): Likewise.
754         (zero_nonzero_bitgs_from_vr): Likewise.
755         (extract_range_from_binary_expr_1): Likewise.
756         (overflow_comparison_p): Likewise.
757         (to_remove_edges, to_update_switch_stmts): Likewise.
758         (find_case_label-index, find_case_label_range): Likewise.
759         (switch_update, set_value_range_to_nonnegative): Remove.
760         (set_value_range_to_truthvalue): Likewise.
761         (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
762         (gimple_stmt_nonzero_p, compare_ranges): Likewise.
763         (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
764         (find_case_label_ranges, test_for_singularity): Likewise.
765         (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
766         (x_vr_values): Move to its remaining use site.
768 2017-11-10  Jeff Law  <law@redhat.com>
770         * vr-values.h (VR_INITIALIZER): Move #define here.
771         * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
772         * Makefile.in (OBJS): Add tree-evrp.o
773         * tree-vrp.h (assert_info): Move structure definition here.
774         (set_value_range_to_varying): Prototype.
775         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
776         (infer_value_range, register_edge_assert_for): Likewise.
777         (stmt_interesting_for_vrp): Likewise.
778         * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
779         (set_value_range_to_varying): No longer static.
780         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
781         (infer_value_range, register_edge_assert_for): Likewise.
783 2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
785         * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
786         generate the XXBRD instruction.
788         * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
789         (rs6000_builtin_type_compatible): Treat _Float128 and long double
790         as being compatible if -mabi=ieeelongdouble.
791         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
792         to setup float128 built-ins with hardware support.
793         (BU_FLOAT128_HW_2): Likewise.
794         (BU_FLOAT128_HW_3): Likewise.
795         (BU_FLOAT128_HW_VSX_1): Likewise.
796         (BU_FLOAT128_HW_VSX_2): Likewise.
797         (scalar_extract_expq): Change float128 built-in functions to
798         accommodate having both KFmode and TFmode functions.  Use the
799         KFmode variant as the default.
800         (scalar_extract_sigq): Likewise.
801         (scalar_test_neg_qp): Likewise.
802         (scalar_insert_exp_q): Likewise.
803         (scalar_insert_exp_qp): Likewise.
804         (scalar_test_data_class_qp): Likewise.
805         (sqrtf128_round_to_odd): Delete processing the round to odd
806         built-in functions as special built-in functions, and define them
807         as float128 built-ins.  Use the KFmode variant as the default.
808         (truncf128_round_to_odd): Likewise.
809         (addf128_round_to_odd): Likewise.
810         (subf128_round_to_odd): Likewise.
811         (mulf128_round_to_odd): Likewise.
812         (divf128_round_to_odd): Likewise.
813         (fmaf128_round_to_odd): Likewise.
814         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
815         support for KFmode and TFmode xststdcqp calls.
816         (rs6000_expand_builtin): If long double is IEEE 128-bit floating
817         point, switch the built-in handlers for the get/set float128
818         exponent, get float128 mantissa, float128 test built-ins, and the
819         float128 round to odd built-in functions.  Eliminate creating the
820         float128 round to odd built-in functions as special built-ins.
821         (rs6000_init_builtins): Eliminate special creation of the float128
822         round to odd built-in functions.
823         * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
824         function insns to support both TFmode and KFmode variants.
825         (xsxsigqp_<mode>): Likewise.
826         (xsiexpqpf_<mode>): Likewise.
827         (xsiexpqp_<mode>): Likewise.
828         (xststdcqp_<mode>): Likewise.
829         (xststdcnegqp_<mode>): Likewise.
830         (xststdcqp_<mode>): Likewise.
832 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
834         * tree-ssa-threadupdate.c (compute_path_counts): Remove
835         unused path_in_freq_ptr parameter.
836         (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
838 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
840         * ipa-inline.c (edge_badness): Dump sreal frequency.
841         (compute_inlined_call_time): Match natural implementaiton ...
842         * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
843         forgotten division by CGRAPH_FREQ_BASE.
845 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
847         * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
848         Solaris 11.  Update comment.
849         * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
850         renaming.
851         * config/sol2.h (STARTFILE_SPEC): Likewise.
852         * configure: Regenerate.
854 2017-11-14  Carl Love  <cel@us.ibm.com>
856         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
857         le_ and be_ prefixes to swap* variables.  Remove
858         if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
859         statements.
861 2017-11-14  Jason Merrill  <jason@redhat.com>
863         Support GTY((cache)) on hash_map.
864         * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
865         (ggc_cache_remove): Override it instead of ggc_mx.
866         * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
867         (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
868         * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
869         (simple_cache_map_traits): Override maybe_mx.
870         * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
871         (hash_map): Friend gt_cleare_cache.
872         (gt_cleare_cache): New.
873         * tree.h (tree_cache_traits): New hash_map traits class.
874         (tree_cache_map): New typedef.
876 2017-11-14  Richard Biener  <rguenther@suse.de>
878         * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
879         paramter and handling.
880         (cleanup_control_flow_bb): Likewise.
881         (cleanup_control_flow_pre): New helper performing a DFS walk
882         to call cleanup_control_flow_bb in PRE order.
883         (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
884         via cleanup_control_flow_pre.
886 2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>
888         * config/aarch64/aarch64-simd.md
889         (aarch64_simd_bsl<mode>_internal): Remove DImode.
890         (*aarch64_simd_bsl<mode>_alt): Likewise.
891         (aarch64_simd_bsldi_internal): New.
892         (aarch64_simd_bsldi_alt): Likewise.
894 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
896         * tracer.c (better_p): Do not compare frequencies.
897         * reg-stack.c (better_edge): Likewise.
898         * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
899         and back.
901 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
903         * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
904         * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
905         * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
906         * lto-streamer-in.c (input_function): Use update_max_bb_count.
907         * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
908         * predict.c (maybe_hot_frequency_p): Inline to ...
909         (maybe_hot_count_p): ... here; rewrite to counts.
910         (counts_to_freqs): Rename to ...
911         (update_max_bb_count): ... this one.
912         (expensive_function_p): Use counts.
913         (estimate_bb_frequencies): Update.
914         (rebuild_frequencies): Update.
915         * predict.h (counts_to_freqs): Rename to ...
916         (update_max_bb_count): ... this one.
917         * profile.c (compute_branch_probabilities): Add debug info
918         * tree-inline.c (expand_call_inline): Update debug info.
919         (optimize_inline_calls): Use update_max_bb_count..
920         (tree_function_versioning): Use update_max_bb_count..
921         * value-prof.c (gimple_value_profile_transformations):
922         Do not use update_max_bb_count.
924 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
926         * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
927         always use frequencies.
929 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
931         * bb-reorder.c: Remove frequencies from comments.
932         (better_edge_p): Use profile counts.
933         (find_traces): Dump profile counts.
934         (rotate_loop): Use profile counts.
935         (find_traces_1_round): Likewise.
936         (connect_better_edge_p): Use counts instead of probabilities for
937         reverse walk.
938         (copy_bb_p): Drop early check for non-0 frequency.
939         (sanitize_hot_paths): Update comments.
941 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
943         * ipa-split.c (struct split_point): Add count.
944         (consider_split): Do not compute incoming frequency; compute incoming
945         count and store it to split_point.
946         (split_function): Set count of the call to split part correctly.
948 2017-11-13  Carl Love  <cel@us.ibm.com>
950         * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
952 2017-11-13  Tom Tromey  <tom@tromey.com>
954         * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
956 2017-11-13  Carl Love  <cel@us.ibm.com>
958         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
959         Add support for builtins:
960         unsigned int vec_first_{,miss}_match_{,or_eos}index,
961         vector {un,}signed {char,int,short},
962         vector {un,}signed {char,int,short}) arguments.
963         * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
964         VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
965         Add BU_P9V_AV_2 expansions for the builtins.
966         * config/rs6000/altivec.h (vec_first_match_index,
967         vec_first_mismatch_index, vec_first_match_or_eos_index,
968         vec_first_mismatch_or_eos_index): Add #defines for the builtins.
969         * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
970         new extern declaration.
971         * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
972         * config/rs6000/vsx.md (first_match_index_<mode>,
973         first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
974         first_mismatch_or_eos_index_<mode>): Add define expand.
975         (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
976         * doc/extend.texi: Update the built-in documenation file for the new
977         built-in functions.
979 2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
981         * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
982         into the min/max operations for _Float<N> and _Float<N>X types.
984 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
986         PR lto/81351
987         * dwarf2out.c (do_eh_frame): New static variable.
988         (dwarf2out_begin_prologue): Set it.
989         (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
991 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
993         * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
995         * tree-ssa-sink.c (select_best_block): Do not use frequencies.
997 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
999         PR lto/81351
1000         * debug.h (dwarf2out_do_eh_frame): Declare.
1001         * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
1002         (dwarf2out_do_frame): Use it.
1003         (dwarf2out_do_cfi_asm): Likewise.
1004         * dwarf2out.c (dwarf2out_frame_finish): Likewise.
1005         (dwarf2out_assembly_start): Likewise.
1006         (dwarf2out_begin_prologue): Fix comment.
1007         * toplev.c (compile_file): Always call dwarf2out_frame_finish
1008         if the target needs either debug or unwind DWARF2 info.
1009         * lto-opts.c (lto_write_options): Do not save -fexceptions,
1010         -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
1011         -ftrapping-math, -ftrapv and -fwrapv.
1013 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
1015         * cgraph.c (cgraph_edge::sreal_frequency): New function.
1016         * cgraph.h (cgraph_edge::sreal_frequency): Declare.
1017         * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
1018         (estimate_edge_size_and_time): Likewise.
1019         (ipa_merge_fn_summary_after_inlining): Likewise.
1020         * ipa-inline.c (cgraph_freq_base_rec): Remove.
1021         (compute_uninlined_call_time): Use sreal_frequency.
1022         (compute_inlined_call_time): Likewise.
1023         (ipa_inline): Do not initialize cgraph_freq_base_rec.
1024         * profile-count.c: Include sreal.h.
1025         (profile_count::to_sreal_scale): New.
1026         * profile-count.h: Forward declare sreal.
1027         (profile_count::to_sreal_scale): Declare.
1029 2017-11-13  Nathan Sidwell  <nathan@acm.org>
1031         * diagnostic.c (maybe_line_and_column): New.
1032         (diagnostic_get_location_text): Use it.
1033         (diagnostic_report_current_module): Likewise.
1034         (test_diagnostic_get_location_text): Add tests.
1036 2017-11-13  Luis Machado  <luis.machado@linaro.org>
1038         * doc/md.texi (Specifying processor pipeline description): Fix
1039         incorrect latency for the div instruction example.
1041 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
1043         PR tree-optimization/78821
1044         * gimple-ssa-store-merging.c (compatible_load_p): Don't require
1045         that bit_not_p is the same.
1046         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
1047         (split_group): Count precisely bit_not_p bits in each statement.
1048         (invert_op): New function.
1049         (imm_store_chain_info::output_merged_store): Use invert_op to
1050         emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
1051         but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
1053 2017-11-13  Martin Liska  <mliska@suse.cz>
1055         * gcov.c (struct coverage_info): Remove typedef of coverage_t.
1056         (struct source_info): Likewise.
1057         (add_branch_counts): Likewise.
1058         (add_line_counts): Likewise.
1059         (function_summary): Likewise.
1060         (output_intermediate_line): Likewise.
1061         (generate_results): Likewise.
1063 2017-11-13  Martin Liska  <mliska@suse.cz>
1065         * gcov.c (struct block_info): Remove typedef for block_t.
1066         (struct line_info): Likewise.
1067         (line_info::has_block): Likewise.
1068         (EXIT_BLOCK): Likewise.
1069         (unblock): Likewise.
1070         (circuit): Likewise.
1071         (get_cycles_count): Likewise.
1072         (process_file): Likewise.
1073         (read_graph_file): Likewise.
1074         (solve_flow_graph): Likewise.
1075         (find_exception_blocks): Likewise.
1076         (add_line_counts): Likewise.
1077         (accumulate_line_info): Likewise.
1078         (output_line_details): Likewise.
1080 2017-11-13  Martin Liska  <mliska@suse.cz>
1082         * gcov.c (struct arc_info): Remove typedef for arc_t.
1083         (struct line_info): Likewise.
1084         (add_branch_counts): Likewise.
1085         (output_branch_count): Likewise.
1086         (function_info::~function_info): Likewise.
1087         (circuit): Likewise.
1088         (output_intermediate_line): Likewise.
1089         (read_graph_file): Likewise.
1090         (solve_flow_graph): Likewise.
1091         (find_exception_blocks): Likewise.
1092         (add_line_counts): Likewise.
1093         (accumulate_line_info): Likewise.
1094         (output_line_details): Likewise.
1095         (output_function_details): Likewise.
1097 2017-11-13  Martin Liska  <mliska@suse.cz>
1099         * gcov.c (struct function_info): Remove typedef for function_t.
1100         (struct source_info): Likewise.
1101         (source_info::get_functions_at_location): Likewise.
1102         (solve_flow_graph): Likewise.
1103         (find_exception_blocks): Likewise.
1104         (add_line_counts): Likewise.
1105         (output_intermediate_file): Likewise.
1106         (process_file): Likewise.
1107         (generate_results): Likewise.
1108         (release_structures): Likewise.
1109         (read_graph_file): Likewise.
1110         (read_count_file): Likewise.
1111         (accumulate_line_counts): Likewise.
1112         (output_lines): Likewise.
1114 2017-11-13  Martin Liska  <mliska@suse.cz>
1116         * gcov.c (function_info::function_info): Remove num_counts
1117         and add vector<gcov_type>.
1118         (function_info::~function_info): Use the vector.
1119         (process_file): Likewise.
1120         (read_graph_file): Likewise.
1121         (read_count_file): Likewise.
1122         (solve_flow_graph): Likewise.
1124 2017-11-13  Martin Liska  <mliska@suse.cz>
1126         * gcov.c (function_info::is_artificial): New function.
1127         (process_file): Erase all artificial early.
1128         (generate_results): Skip as all artificial are already
1129         removed.
1131 2017-11-13  Martin Liska  <mliska@suse.cz>
1133         * gcov.c (read_graph_file): Store to global vector of functions.
1134         (read_count_file): Iterate the vector.
1135         (process_file): Likewise.
1136         (generate_results): Likewise.
1137         (release_structures): Likewise.
1139 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
1141         PR tree-optimization/82954
1142         * gimple-ssa-store-merging.c
1143         (imm_store_chain_info::coalesce_immediate_stores): If
1144         !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
1146 2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>
1148         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
1149         Upddate call to ENDIAN_LANE_N.
1150         (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
1151         (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
1152         (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
1153         and use aarch64_endian_lane_rtx.
1154         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
1156 2017-11-12  Tom de Vries  <tom@codesourcery.com>
1158         * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
1160 2017-11-12  Tom de Vries  <tom@codesourcery.com>
1162         * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
1164 2017-11-12  Tom de Vries  <tom@codesourcery.com>
1166         * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
1167         body.
1168         * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
1169         * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
1170         * defaults.h (ASM_OUTPUT_LABELREF): Same.
1172 2017-11-11  Martin Sebor  <msebor@redhat.com>
1174         PR c/81117
1175         * doc/extend.texi (attribute nonstring): Remove spurious argument.
1177         PR bootstrap/82948
1178         * prefic.c (translate_name): Replace strncpy with memcpy to
1179         avoid -Wstringop-truncation.
1181 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1183         * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
1185 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1187         * predict.c (maybe_hot_frequency_p): Do not use cfun.
1189 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1191         * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
1192         merging.
1194 2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
1196         * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
1197         enable generating XXBRH if the value is in a vector register.
1198         (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
1199         value is in a vector register.
1200         (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
1201         register to register bswap64's instead of doing the GPR sequence
1202         used on previous machines.
1203         (bswapdi2_xxbrd): New insn.
1204         (bswapdi2_reg): Disallow on ISA 3.0.
1205         (register to register bswap64 splitter): Do not split the insn on
1206         ISA 3.0 systems that use XXBRD.
1208 2017-11-10  Martin Sebor  <msebor@redhat.com>
1210         PR c/81117
1211         * config/darwin-c.c (framework_construct_pathname): Replace strncpy
1212         with memcpy.
1213         (find_subframework_file): Same.
1215 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
1217         * auto-profile.c (afdo_indirect_call): Drop frequency.
1218         * cgraph.c (symbol_table::create_edge): Drop frequency argument.
1219         (cgraph_node::create_edge): Drop frequency argument.
1220         (cgraph_node::create_indirect_edge): Drop frequency argument.
1221         (cgraph_edge::make_speculative): Drop frequency arguments.
1222         (cgraph_edge::resolve_speculation): Do not update frequencies
1223         (cgraph_edge::dump_edge_flags): Do not dump frequency.
1224         (cgraph_node::dump): Check consistency in IPA mode.
1225         (cgraph_edge::maybe_hot_p): Use IPA counter.
1226         (cgraph_edge::verify_count_and_frequency): Rename to ...
1227         (cgraph_edge::verify_count): ... this one; drop frequency checking.
1228         (cgraph_node::verify_node): Update.
1229         * cgraph.h (struct cgraph_edge): Drop frequency.
1230         (cgraph_edge::frequency): New function.
1231         * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
1232         frequencies.
1233         (cgraph_edge::rebuild_edges): Likewise.
1234         * cgraphclones.c (cgraph_edge::clone): Scale only counts.
1235         (duplicate_thunk_for_node): Do not pass frequency.
1236         (cgraph_node::create_clone): Scale only counts.
1237         (cgraph_node::create_virtual_clone): Do not pass frequency.
1238         (cgraph_node::create_edge_including_clones): Do not pass frequency.
1239         (cgraph_node::create_version_clone): Do not pass frequency.
1240         * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
1241         (cgraph_node::expand_thunk): Do not pass frequency.
1242         (cgraph_node::create_wrapper): Do not pass frequency.
1243         * gimple-iterator.c (update_call_edge_frequencies): Do not pass
1244         frequency.
1245         * gimple-streamer-in.c (input_bb): Scale only IPA counts.
1246         * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
1247         * ipa-cp.c (ipcp_lattice::print): Use frequency function.
1248         (gather_caller_stats): Use frequency function.
1249         (ipcp_cloning_candidate_p): Use frequency function.
1250         (ipcp_propagate_stage): Use frequency function.
1251         (get_info_about_necessary_edges): Use frequency function.
1252         (update_profiling_info): Update only IPA profile.
1253         (update_specialized_profile): Use frequency functoin.
1254         (perhaps_add_new_callers): Update only IPA profile.
1255         * ipa-devirt.c (ipa_devirt): Use IPA profile.
1256         * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
1257         (dump_ipa_call_summary): Use frequency function.
1258         (estimate_edge_size_and_time): Use frequency function.
1259         (ipa_merge_fn_summary_after_inlining): Use frequency function.
1260         * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
1261         * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
1262         (update_noncloned_counts): ... ths one; scale counts only.
1263         (clone_inlined_nodes): Do not scale frequency.
1264         (inline_call): Do not pass frequency.
1265         * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
1266         (compute_inlined_call_time): Use IPA profile.
1267         (want_inline_small_function_p): Use IPA profile.
1268         (want_inline_self_recursive_call_p): Use IPA profile.
1269         (edge_badness): Use IPA profile.
1270         (lookup_recursive_calls): Use IPA profile.
1271         (recursive_inlining): Do not pass frequency.
1272         (resolve_noninline_speculation): Do not update frequency.
1273         (inline_small_functions): Collect max of IPA profile.
1274         (dump_overall_stats): Dump IPA porfile.
1275         (dump_inline_stats): Dump IPA porfile.
1276         (ipa_inline): Collect IPA stats.
1277         * ipa-inline.h (clone_inlined_nodes): Update prototype.
1278         * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
1279         (ipa_propagate_frequency): Use frequency function.
1280         (ipa_profile): Cleanup.
1281         * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
1282         * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
1283         * lto-cgraph.c (lto_output_edge): Do not stream frequency.
1284         (input_node): Do not stream frequency.
1285         (input_edge): Do not stream frequency.
1286         (merge_profile_summaries): Scale only IPA profiles.
1287         * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
1288         * predict.c (drop_profile): Do not recompute frequency.
1289         * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
1290         (ipa_tm_insert_gettmclone_call): Do not pass frequency.
1291         * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
1292         * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
1293         * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
1294         * tree-inline.c (copy_bb): Do not scale frequency.
1295         (expand_call_inline): Do not scale frequency.
1296         (tree_function_versioning): Do not scale frequency.
1297         * ubsan.c (ubsan_create_edge): Do not pass frequency.
1299 2017-11-10  Julia Koval  <julia.koval@intel.com>
1301         * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
1302         (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
1303         (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
1304         (_mm256_maskz_gf2p8affine_epi64_epi8)
1305         (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
1306         (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
1307         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
1308         (__builtin_ia32_vgf2p8affineqb_v32qi)
1309         (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
1310         * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
1312 2017-11-10  Tamar Christina  <tamar.christina@arm.com>
1314         PR target/82641
1315         * config/arm/arm.c
1316         (arm_option_override): Refactor.
1317         (arm_option_reconfigure_globals): New.
1318         (arm_options_perform_arch_sanity_checks): New.
1319         * config/arm/arm-protos.h (arm_option_reconfigure_globals):
1320         New prototype.
1321         (arm_options_perform_arch_sanity_checks): Likewise
1323 2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>
1325         * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
1326         (power9-qpmul): New.
1327         * rs6000/rs6000.md ("type" attr): Add qmul.
1328         (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
1329         *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
1330         *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
1332 2017-11-10  Martin Sebor  <msebor@redhat.com>
1334         PR c/81117
1335         * builtins.c (compute_objsize): Handle arrays that
1336         compute_builtin_object_size likes to fail for.  Make extern.
1337         * builtins.h (compute_objsize): Declare.
1338         (check_strncpy_sizes): New function.
1339         (expand_builtin_strncpy): Call check_strncpy_sizes.
1340         * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
1341         -Wstringop-truncation.
1342         (gimple_fold_builtin_strncat): Same.
1343         * gimple.c (gimple_build_call_from_tree): Set call location.
1344         * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
1345         (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
1346         (handle_builtin_stxncpy, handle_builtin_strncat): Same.
1347         (handle_builtin_strlen): Use strlen_to_stridx.
1348         (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
1349         stpncpy.
1350         Use strlen_to_stridx.
1351         (pass_strlen::execute): Release strlen_to_stridx.
1352         * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
1353         (-Wstringop-truncation): Document new option.
1355 2017-11-10  Martin Liska  <mliska@suse.cz>
1357         PR gcov-profile/82702
1358         * gcov.c (main): Handle intermediate files in a different
1359         way.
1360         (get_gcov_intermediate_filename): New function.
1361         (output_gcov_file): Remove support of intermediate files.
1362         (generate_results): Allocate intermediate file.
1363         (release_structures): Clean-up properly fn_end.
1364         (output_intermediate_file): Start iterating with line 1.
1366 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
1368         PR tree-optimization/82929
1369         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
1370         ops_swapped_p non-static data member.
1371         (store_immediate_info::store_immediate_info): Clear it.
1372         (imm_store_chain_info::coalesce_immediate_stores): If swapping
1373         ops set ops_swapped_p.
1374         (count_multiple_uses): Handle ops_swapped_p.
1376 2017-11-10  Martin Liska  <mliska@suse.cz>
1378         * coverage.c (coverage_init): Stream information about
1379         support of has_unexecuted_blocks.
1380         * doc/gcov.texi: Document that.
1381         * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
1382         * gcov.c (read_graph_file): Likewise.
1383         (output_line_beginning): Fix a small issue with
1384         color output.
1386 2017-11-10  Bin Cheng  <bin.cheng@arm.com>
1388         * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
1389         reference of trivial component.
1391 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
1393         PR bootstrap/82916
1394         * gimple-ssa-store-merging.c
1395         (pass_store_merging::terminate_all_aliasing_chains): For
1396         gimple_store_p stmts also call refs_output_dependent_p.
1398         PR rtl-optimization/82913
1399         * compare-elim.c (try_merge_compare): Punt if def_insn is not
1400         single set.
1402 2017-11-09  Jeff Law  <law@redhat.com>
1404         * vr-values.h: New file with vr_values class.
1405         * tree-vrp.c: Include vr-values.h
1406         (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
1407         data objects into the vr_values class.
1408         (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
1409         (get_value_range): Make it a member function within vr_values class.
1410         (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
1411         (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
1412         (op_with_constant_singleton_value_range): Likewise.
1413         (extract_range_for_var_from_comparison_expr): Likewise.
1414         (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
1415         (extract_range_from_binary_expr): Likewise.
1416         (extract_range_from_unary_expr): Likewise.
1417         (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
1418         (check_for_binary_op_overflow, extract_range_basic): Likewise.
1419         (extract_range_from_assignment, adjust_range_with_scev): Likewise.
1420         (dump_all_value_ranges, get_vr_for_comparison): Likewise.
1421         (compare_name_with_value, compare_names): Likewise.
1422         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
1423         (vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
1424         (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
1425         (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
1426         (extract_range_from_phi_node): Likewise.
1427         (simplify_truth_ops_using_ranges): Likewise.
1428         (simplify_div_or_mod_using_ranges): Likewise.
1429         (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
1430         (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
1431         (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
1432         (simplify_float_conversion_using_ranges): Likewise.
1433         (simplify_internal_call_using_ranges): Likewise.
1434         (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
1435         (vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
1436         poitner via x_vr_values for calls into gimple folder.
1437         (vrp_initialize_lattice): Make this the vr_values ctor.
1438         (vrp_free_lattice): Make this the vr_values dtor.
1439         (set_vr_value): New function.
1440         (class vrp_prop): Add vr_values data member.  Add various member
1441         functions as well as member functions that delegate to vr_values.
1442         (check_array_ref): Make a member function within vrp_prop class.
1443         (search_for_addr_array, vrp_initialize): Likewise.
1444         (vrp_finalize): Likewise.  Revamp to avoid direct access to
1445         vr_value, values_propagated, etc.
1446         (check_array_bounds): Extract vrp_prop class instance pointer from
1447         walk info structure.  Use it to call member functions.
1448         (check_all_array_refs): Make a member function within vrp_prop class.
1449         Smuggle class instance pointer via walk info structure.
1450         (x_vr_values): New local static.
1451         (vrp_valueize): Use x_vr_values to get class instance.
1452         (vr_valueize_1): Likewise.
1453         (class vrp_folder): Add vr_values data member.  Add various member
1454         functions as well as member functions that delegate to vr_values.
1455         (fold_predicate_in): Make a mber fucntion within vrp_folder class.
1456         (simplify_stmt_for_jump_threading): Extract smuggled vr_values
1457         class instance from vr_values.  Use it to call member functions.
1458         (vrp_dom_walker): Add vr_values data member.
1459         (vrp_dom_walker::after_dom_children): Smuggle vr_values class
1460         instance via x_vr_values.
1461         (identify_jump_threads): Accept vr_values as argument.  Store
1462         it into the walker structure.
1463         (evrp_dom_walker): Add vr_values class data member.  Add various
1464         delegators.
1465         (evrp_dom_walker::try_find_new_range): Use vr_values data
1466         member to access the memory allocator.
1467         (evrp_dom_walker::before_dom_children): Store vr_values class
1468         instance into the vrp_folder class.
1469         (evrp_dom_walker::push_value_range): Rework to avoid direct
1470         access to num_vr_values and vr_value.
1471         (evrp_dom_walker::pop_value_range): Likewise.
1472         (execute_early_vrp): Remove call to vrp_initialize_lattice.
1473         Use vr_values to get to dump_all_value_ranges member function.
1474         Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
1475         and simplify_cond_using_ranges_2 via vrp_prop class instance.
1476         Pass vr_values class instance down to identify_jump_threads.
1477         Remove call to vrp_free_lattice.
1478         (debug_all_value_ranges): Remove.
1480         * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
1481         (vrp_folder): Likewise.
1483         * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
1484         Get it from the existing bitmap instead.
1485         (vrp_intersect_ranges_1): Likewise.
1487 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
1489         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
1490         bit_not_p field.
1491         (store_immediate_info::store_immediate_info): Add bitnotp argument,
1492         set bit_not_p to it.
1493         (imm_store_chain_info::coalesce_immediate_stores): Break group
1494         if bit_not_p is different.
1495         (count_multiple_uses, split_group,
1496         imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
1497         (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
1498         (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
1499         result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
1500         to store_immediate_info ctor.
1502 2017-11-09  Jim Wilson  <jimw@sifive.com>
1504         * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
1505         (scan_prog_file): Likewise.
1507 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
1509         * bb-reorder.c (max_entry_frequency): Remove.
1510         (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
1511         connect_traces, push_to_next_round_p): Remove prototypes.
1512         (find_traces_1_round): Use counts only.
1513         (push_to_next_round_p): Likewise.
1514         (find_traces): Likewise.
1515         (rotate_loop): Likewise.
1516         (find_traces_1_round): Likewise.
1517         (connect_traces): Likewise.
1518         (edge_order): Likewise.
1520 2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1522         * config/arm/arm.c (output_return_instruction): Add comments to
1523         indicate requirement for cmse_nonsecure_entry return to account
1524         for the size of clearing instruction output here.
1525         (thumb_exit): Likewise.
1526         * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
1527         return in hardfloat mode.
1529 2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>
1531         * config/rs6000/rs6000.c (machine_function): Add a bool,
1532         "toc_is_wrapped_separately".
1533         (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
1534         if it wasn't explicitly set or unset, we are optimizing for speed, and
1535         doing separate shrink-wrapping.
1536         (rs6000_get_separate_components): Enable the TOC component if
1537         saving the TOC register in the prologue.
1538         (rs6000_components_for_bb): Handle the TOC component.
1539         (rs6000_emit_prologue_components): Store the TOC register where needed.
1540         (rs6000_set_handled_components): Mark TOC as handled, if handled.
1541         (rs6000_emit_prologue): Don't save the TOC if that is already done.
1543 2017-11-09  Martin Jambor  <mjambor@suse.cz>
1545         * ipa-param-manipulation.c: New file.
1546         * ipa-param-manipulation.h: Likewise.
1547         * Makefile.in (OBJS): Add ipa-param-manipulation.o.
1548         (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
1549         * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
1550         (ipa_parm_adjustment): Likewise.
1551         (ipa_parm_adjustment_vec): Likewise.
1552         (ipa_get_vector_of_formal_parms): Moved declaration to
1553         ipa-param-manipulation.h.
1554         (ipa_get_vector_of_formal_parm_types): Likewise.
1555         (ipa_modify_formal_parameters): Likewise.
1556         (ipa_modify_call_arguments): Likewise.
1557         (ipa_combine_adjustments): Likewise.
1558         (ipa_dump_param_adjustments): Likewise.
1559         (ipa_modify_expr): Likewise.
1560         (ipa_get_adjustment_candidate): Likewise.
1561         * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
1562         ipa-param-manipulation.c.
1563         (ipa_get_vector_of_formal_parm_types): Likewise.
1564         (ipa_modify_formal_parameters): Likewise.
1565         (ipa_modify_call_arguments): Likewise.
1566         (ipa_modify_expr): Likewise.
1567         (get_ssa_base_param): Likewise.
1568         (ipa_get_adjustment_candidate): Likewise.
1569         (index_in_adjustments_multiple_times_p): Likewise.
1570         (ipa_combine_adjustments): Likewise.
1571         (ipa_dump_param_adjustments): Likewise.
1572         * tree-sra.c: Also include ipa-param-manipulation.h
1573         * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
1574         ipa-param.h.
1576 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1577             Alan Hayward  <alan.hayward@arm.com>
1578             David Sherwood  <david.sherwood@arm.com>
1580         * doc/sourcebuild.texi (vect_masked_store): Document.
1582 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1583             Alan Hayward  <alan.hayward@arm.com>
1584             David Sherwood  <david.sherwood@arm.com>
1586         * doc/sourcebuild.texi (vect_align_stack_vars): Document.
1588 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1589             Alan Hayward  <alan.hayward@arm.com>
1590             David Sherwood  <david.sherwood@arm.com>
1592         * doc/sourcebuild.texi (vect_variable_length): Document.
1594 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1595             Alan Hayward  <alan.hayward@arm.com>
1596             David Sherwood  <david.sherwood@arm.com>
1598         * doc/sourcebuild.texi (vect_unaligned_possible): Document.
1600 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1601             Alan Hayward  <alan.hayward@arm.com>
1602             David Sherwood  <david.sherwood@arm.com>
1604         * doc/sourcebuild.texi (vect_element_align_preferred): Document.
1606 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1607             Alan Hayward  <alan.hayward@arm.com>
1608             David Sherwood  <david.sherwood@arm.com>
1610         * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
1611         previously undocumented selectors.
1612         (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
1614 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1616         * doc/rtl.texi (const_vector): Say that elements can be
1617         const_wide_ints too.
1618         * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
1619         * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
1620         (gen_vec_duplicate): Use it instead of CONSTANT_P.
1621         * optabs.c (expand_vector_broadcast): Likewise.
1623 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1624             Alan Hayward  <alan.hayward@arm.com>
1625             David Sherwood  <david.sherwood@arm.com>
1627         * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
1628         scaled index even if the unscaled address was invalid.
1629         Don't increase the complexity of using a scale in that case.
1631 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
1632             Alan Hayward  <alan.hayward@arm.com>
1633             David Sherwood  <david.sherwood@arm.com>
1635         * doc/rtl.texi: Rewrite the subreg rules so that they partition
1636         the inner register into REGMODE_NATURAL_SIZE bytes rather than
1637         UNITS_PER_WORD bytes.
1638         * emit-rtl.c (validate_subreg): Divide subregs into blocks
1639         based on REGMODE_NATURAL_SIZE of the inner mode.
1640         (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
1641         !SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
1642         * expmed.c (lowpart_bit_field_p): Divide the value up into
1643         chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
1644         * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
1645         whether something is likely to occupy more than one register.
1647 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
1649         PR ipa/82879
1650         * ipa-inline-transform.c (update_noncloned_frequencies): Use
1651         profile_count::adjust_for_ipa_scaling.
1652         * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
1653         * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
1654         function.
1655         * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
1657 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
1659         * gimple-ssa-store-merging.c (count_multiple_uses): New function.
1660         (split_group): Add total_orig and total_new arguments, estimate the
1661         number of statements related to the store group without store merging
1662         and with store merging.
1663         (imm_store_chain_info::output_merged_store): Adjust split_group
1664         callers, punt if estimated number of statements with store merging
1665         is not smaller than estimated number of statements without it.
1666         Formatting fix.
1667         (handled_load): Remove has_single_use checks.
1668         (pass_store_merging::process_store): Likewise.
1670 2017-11-09  Richard Biener  <rguenther@suse.de>
1672         PR tree-optimization/82902
1673         * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
1675 2017-11-09  Martin Liska  <mliska@suse.cz>
1677         PR target/82863
1678         * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
1679         uninitialized.
1681 2017-11-09  Martin Liska  <mliska@suse.cz>
1683         PR tree-optimization/82669
1684         * sbitmap.h (bmp_iter_set_init): Remove non needed check.
1686 2017-11-09  Martin Liska  <mliska@suse.cz>
1688         PR gcov-profile/48463
1689         * coverage.c (coverage_begin_function): Output also end locus
1690         of a function and information whether the function is
1691         artificial.
1692         * gcov-dump.c (tag_function): Parse and print the information.
1693         * gcov.c (INCLUDE_MAP): Add include.
1694         (INCLUDE_SET): Likewise.
1695         (struct line_info): Move earlier in the source file because
1696         of vector<line_info> in function_info structure.
1697         (line_info::line_info): Likewise.
1698         (line_info::has_block): Likewise.
1699         (struct source_info): Add new member index.
1700         (source_info::get_functions_at_location): New function.
1701         (function_info::group_line_p): New function.
1702         (output_intermediate_line): New function.
1703         (output_intermediate_file): Use the mentioned function.
1704         (struct function_start): New.
1705         (struct function_start_pair_hash): Likewise.
1706         (process_file): Add code that identifies group functions.
1707         Assign lines either to global or function scope.
1708         (generate_results): Skip artificial functions.
1709         (find_source): Assign index for each source file.
1710         (read_graph_file): Read new flag artificial and end_line.
1711         (add_line_counts): Assign it either to global of function scope.
1712         (accumulate_line_counts): Isolate core of the function to
1713         accumulate_line_info and call it for both function and global
1714         scope lines.
1715         (accumulate_line_info): New function.
1716         (output_line_beginning): Fix GNU coding style.
1717         (print_source_line): New function.
1718         (output_line_details): Likewise.
1719         (output_function_details): Likewise.
1720         (output_lines): Iterate both source (global) scope and function
1721         scope.
1722         (struct function_line_start_cmp): New class.
1723         * doc/gcov.texi: Reflect changes in documentation.
1725 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
1727         PR debug/82837
1728         * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
1729         (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
1730         and similarly for not instead of neg.
1732 2017-11-08  Andi Kleen  <ak@linux.intel.com>
1734         * config/i386/i386.opt: Add -mforce-indirect-call.
1735         * config/i386/predicates.md: Check for flag_force_indirect_call.
1736         * doc/invoke.texi: Document -mforce-indirect-call
1738 2017-11-08  Kito Cheng  <kito.cheng@gmail.com>
1740         * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
1741         New extern.
1742         (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
1743         config/riscv/riscv.c (predict.h): New include.
1744         (riscv_slow_unaligned_access_p): No longer static.
1745         (riscv_block_move_straight): Add require.
1746         config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
1748 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
1750         PR target/82855
1751         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
1752         <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
1753         nonimmediate_operand predicate for operand 1 instead of
1754         register_operand.
1756 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1758         * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
1759         New pattern.
1760         * config/aarch64/constraints.md (Uml): New constraint.
1761         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
1762         predicate.
1764 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1766         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
1767         of two vec_duplicates into a vec_concat.
1769 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1771         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
1772         Simplify vec_merge of vec_duplicate and vec_concat.
1773         * config/aarch64/constraints.md (Utq): New constraint.
1774         * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
1775         define_insn.
1777 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1779         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
1780         Simplify vec_merge of vec_duplicate and const_vector.
1781         * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
1782         New predicate.
1783         * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
1784         mode iterator.  Update predicate on operand 1 to
1785         handle non-const_vec constants.  Delete constraints.
1786         (*aarch64_combinez_be<mode>): Likewise for operand 2.
1788 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
1790         PR tree-optimization/78821
1791         * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
1792         data member.
1793         (store_operand_info::store_operand_info): Initialize it to false.
1794         (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
1795         ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
1796         store in the group, and if chain_info is non-NULL, to ignore altogether
1797         that chain.
1798         (compatible_load_p): Fail if bit_not_p does not match.
1799         (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
1800         (handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
1801         (pass_store_merging::process_store): Adjust
1802         terminate_all_aliasing_chains calls to pass NULL in all current spots,
1803         call terminate_all_aliasing_chains newly when adding a store into
1804         a chain with non-NULL chain_info.
1806 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
1808         * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
1810 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
1812         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
1813         Remove.
1814         (aarch64_layout_frame): Initialise emit_frame_chain.
1815         (aarch64_can_eliminate): Remove omit leaf frame pointer code.
1816         (TARGET_FRAME_POINTER_REQUIRED): Remove define.
1818 2017-11-08  Martin Liska  <mliska@suse.cz>
1820         * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
1821         of gimple_call_internal_p.
1823 2017-11-07  Tom de Vries  <tom@codesourcery.com>
1825         * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
1827 2017-11-07  Tom de Vries  <tom@codesourcery.com>
1829         * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
1830         "do {} while (0)".
1832 2017-11-08  Martin Liska  <mliska@suse.cz>
1834         PR sanitizer/82792
1835         * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
1837 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
1839         * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
1841 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
1843         PR target/82855
1844         * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
1845         (*cmp<mode>_ccz_1): New insn with $k alternative.
1847         PR target/82855
1848         * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
1849         RTX_COMM_COMPARE as commutative as well.
1850         (ix86_binary_operator_ok): Formatting fix.
1851         * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
1852         *<code><mode>3<mask_name><round_saeonly_name>,
1853         *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
1854         *<s>mul<mode>3_highpart<mask_name>,
1855         *vec_widen_umult_even_v16si<mask_name>,
1856         *vec_widen_umult_even_v8si<mask_name>,
1857         *vec_widen_umult_even_v4si<mask_name>,
1858         *vec_widen_smult_even_v16si<mask_name>,
1859         *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
1860         *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
1861         *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
1862         *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
1863         *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
1864         <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
1865         *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
1866         *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
1867         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
1868         !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
1869         ix86_binary_operator_ok.  Formatting fixes.
1870         (*<plusminus_insn><mode>3<mask_name><round_name>,
1871         *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
1872         fixes.
1874 2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
1876         * config/rs6000/rs6000.md (GPR2): New mode_iterator.
1877         ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
1878         eq and ne if TARGET_ISEL.
1879         (cmp): New code_iterator.
1880         (UNS, UNSU_, UNSIK): New code_attrs.
1881         (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
1882         ("eq<mode>3"): New define_expand, rename the define_insn_and_split
1883         to...
1884         ("eq<mode>3"): ... this.
1885         ("ne<mode>3"): New define_expand, rename the define_insn_and_split
1886         to...
1887         ("ne<mode>3"): ... this.
1889 2017-11-07  Julia Koval  <julia.koval@intel.com>
1891         PR target/82812
1892         * common/config/i386/i386-common.c
1893         (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
1894         (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
1895         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
1896         * config/i386/i386.opt: Ditto.
1897         * config/i386/i386.c (ix86_target_string): Ditto.
1898         (ix86_option_override_internal): Ditto.
1899         (ix86_init_mpx_builtins): Move MPX to args2.
1900         (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
1901         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
1902         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
1903         __builtin_ia32_vgf2p8affineinvqb_v32qi,
1904         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
1905         __builtin_ia32_vgf2p8affineinvqb_v16qi,
1906         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
1908 2017-11-07  Uros Bizjak  <ubizjak@gmail.com>
1910         PR target/80425
1911         * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
1912         and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
1913         (zero-extendsidi peephole2): Remove peephole.
1915 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
1917         PR c/53037
1918         * stor-layout.c: Include attribs.h.
1919         (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
1920         explicit lookup of "aligned" attribute.
1922 2017-11-07  Andrew Waterman  <andrew@sifive.com>
1924         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
1925         (riscv_expand_block_move): Likewise.
1926         * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
1927         implementation.
1928         (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
1929         (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
1930         * config/riscv/riscv.c (riscv_block_move_straight): New function.
1931         (riscv_adjust_block_mem): Likewise.
1932         (riscv_block_move_loop): Likewise.
1933         (riscv_expand_block_move): Likewise.
1934         gcc/config/riscv/riscv.md (movmemsi): New pattern.
1936 2017-11-07  Michael Clark  <michaeljclark@mac.com>
1938         * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
1939         (MUSL_DYNAMIC_LINKER): Likewise.
1941 2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>
1943         * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
1944         (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
1945         nonmmory_operand.
1947 2017-11-07  Richard Biener  <rguenther@suse.de>
1949         * match.pd: Fix build.
1951 2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
1952             Jackson Woodruff  <jackson.woodruff@arm.com>
1954         PR tree-optimization/71026
1955         * match.pd: Canonicalize negate in division.
1957 2017-11-07  Sudakshina Das  <sudi.das@arm.com>
1959         PR middle-end/80131
1960         * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
1962 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
1964         * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
1965         (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
1967 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
1969         * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
1970         non-scalar integral types.
1971         * match.pd (negate_expr_p): Handle MINUS_EXPR.
1972         (-(A-B), -(~A)): New transformations.
1974 2017-11-07  Tom de Vries  <tom@codesourcery.com>
1976         * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
1977         semicolon after "do {} while (0)".
1978         * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1979         * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1980         * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1981         * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1982         * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1984 2017-11-07  Tom de Vries  <tom@codesourcery.com>
1986         * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
1987         after "do {} while (0)".
1988         * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1989         * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1990         * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1991         * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1992         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
1994 2017-11-07  Tom de Vries  <tom@codesourcery.com>
1996         PR other/82784
1997         * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
1998         "while {} do (0)".
1999         (arm_rtx_costs_internal): Add missing semicolon after
2000         HANDLE_NARROW_SHIFT_ARITH call.
2002 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
2004         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
2005         disable isel if it was not set explicitly.
2007 2017-11-06  James Bowman  <james.bowman@ftdichip.com>
2009         * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE
2010         qualifiers.
2011         (add_type_attribute) likewise.
2013 2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
2015         * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
2016         of struct ix86_frame.
2017         (ix86_initial_elimination_offset): Likewise.
2018         (ix86_expand_split_stack_prologue): Likewise.
2020 2017-11-06  Marc Glisse  <marc.glisse@inria.fr>
2022         * tree-vrp.h (enum value_range_type): Update stale comment.
2024 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2025             Alan Hayward  <alan.hayward@arm.com>
2026             David Sherwood  <david.sherwood@arm.com>
2028         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
2029         (aarch64_expand_vec_perm_const): Take the number of units too.
2030         * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
2031         (aarch64_expand_vec_perm_const): Likewise.
2032         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
2033         (vec_perm<mode>): Update accordingly.
2035 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2036             Alan Hayward  <alan.hayward@arm.com>
2037             David Sherwood  <david.sherwood@arm.com>
2039         * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
2040         Take the number of units too.
2041         * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
2042         (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
2043         but check for a vector mode before rather than after the call.
2044         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
2045         (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
2046         (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
2047         (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
2048         (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
2049         (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
2050         (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
2051         (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
2052         (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
2053         (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
2054         (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
2055         (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
2056         (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
2057         (aarch64_sqdmull2_n<mode>): Update accordingly.
2059 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2060             Alan Hayward  <alan.hayward@arm.com>
2061             David Sherwood  <david.sherwood@arm.com>
2063         * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
2064         the number of units too.
2065         * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
2066         * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
2067         (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
2068         (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
2069         (vec_store_lanesxi<mode>): Update accordingly.
2071 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2072             Alan Hayward  <alan.hayward@arm.com>
2073             David Sherwood  <david.sherwood@arm.com>
2075         * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
2076         * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
2077         * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
2078         of units rather than the mode.
2079         * config/aarch64/iterators.md (nunits): New mode attribute.
2080         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
2081         Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
2082         * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
2083         (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
2084         (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
2085         (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
2086         (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
2087         (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
2088         (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
2089         (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
2090         (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
2091         (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
2092         (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
2093         (reduc_<maxmin_uns>_scal_<mode>): Likewise.
2094         (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
2095         (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
2096         (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
2097         (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
2098         (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
2099         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
2100         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
2101         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
2102         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
2103         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
2104         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
2105         (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
2106         (aarch64_sqdmull2_lane<mode>_internal): Likewise.
2107         (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
2108         (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
2109         (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
2110         (aarch64_vec_load_lanesci_lane<mode>): Likewise.
2111         (aarch64_vec_store_lanesci_lane<mode>): Likewise.
2112         (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
2113         (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
2114         (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
2115         (aarch64_simd_vec_setv2di): Likewise.
2117 2017-11-06  Carl Love  <cel@us.ibm.com>
2119         * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
2120         definitions.
2121         (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
2122         * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
2123         to power 8.
2124         * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
2125         extern declaration.
2126         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
2127         * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
2128         Add power 8 macro expansions.
2129         (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
2130         * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
2131         power 8 instructions.  (VSX_XXBR): Add iterator.
2133 2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>
2135         * config/arm/arm.md (predicable_short_it): Change default to "no",
2136         improve documentation, remove uses that are identical to the default.
2137         (enabled_for_depr_it): Rename to enabled_for_short_it.
2138         * gcc/config/arm/arm-fixed.md (predicable_short_it):
2139         Remove default uses.
2140         * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
2141         * gcc/config/arm/sync.md (predicable_short_it): Likewise.
2142         * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
2143         * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
2145 2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
2147         PR target/82748
2148         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
2149         float128 helper macros, which are no longer used after deleting
2150         the old 'q' built-in functions, and moving the round to odd
2151         built-in functions to being special built-in functions.
2152         (BU_FLOAT128_2): Likewise.
2153         (BU_FLOAT128_1_HW): Likewise.
2154         (BU_FLOAT128_2_HW): Likewise.
2155         (BU_FLOAT128_3_HW): Likewise.
2156         (FABSQ): Delete old 'q' built-in functions.
2157         (COPYSIGNQ): Likewise.
2158         (SQRTF128_ODD): Move round to odd built-in functions to be
2159         special built-in functions, so that we can handle
2160         -mabi=ieeelongdouble.
2161         (TRUNCF128_ODD): Likewise.
2162         (ADDF128_ODD): Likewise.
2163         (SUBF128_ODD): Likewise.
2164         (MULF128_ODD): Likewise.
2165         (DIVF128_ODD): Likewise.
2166         (FMAF128_ODD): Likewise.
2167         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
2168         built-in names to 'f128'.
2169         * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
2170         old 'q' built-in functions, as the machine independent code for
2171         'f128' built-in functions handles this.
2172         (rs6000_expand_builtin): Add expansion for float128 round to odd
2173         functions, keying off on -mabi=ieeelongdouble of whether to use
2174         the KFmode or TFmode variant.
2175         (rs6000_init_builtins): Initialize the _Float128 round to odd
2176         built-in functions.
2177         * doc/extend.texi (PowerPC Built-in Functions): Document the old
2178         _Float128 'q' built-in functions are now mapped into the new
2179         'f128' built-in functions.
2181 2017-11-06  David Edelsohn  <dje.gcc@gmail.com>
2183         * collect2.c (add_lto_object): Compile for OBJECT_COFF.
2184         (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
2186 2017-11-06  David Malcolm  <dmalcolm@redhat.com>
2188         PR jit/82826
2189         * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
2190         * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
2191         * toplev.c: Include "ipa-fnsummary.h".
2192         (toplev::finalize): Call ipa_fnsummary_c_finalize.
2194 2017-11-06  Jakub Jelinek  <jakub@redhat.com>
2196         PR tree-optimization/82838
2197         * gimple-ssa-store-merging.c
2198         (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
2199         on a separate gimple_seq which is then appended to seq.
2201 2017-11-06  Jeff Law  <law@redhat.com>
2203         PR target/82788
2204         * config/i386/i386.c (PROBE_INTERVAL): Remove.
2205         (get_probe_interval): New functions.
2206         (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
2207         (ix86_adjust_stack_and_probe): Likewise.
2208         (output_adjust_stack_and_probe): Likewise.
2209         (ix86_emit_probe_stack_range): Likewise.
2210         (ix86_expand_prologue): Likewise.
2212 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2214         PR tree-optimization/82816
2215         * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
2216         if the modes of the two types are the same.
2217         (convert_plusminus_to_widen): Likewise.
2219 2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2221         * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
2222         p9_vadu<mode>3.
2223         (usadv16qi): New define_expand.
2224         (usadv8hi): New define_expand.
2226 2017-11-06  Jan Hubicka  <hubicka@ucw.cz>
2228         PR bootstrap/82832
2229         * ipa-inline-transform.c (update_noncloned_frequencies): Always
2230         scale.
2231         (inline_transform): Likewise.
2232         * predict.c (counts_to_freqs): Remove useless conditional.
2233         * profile-count.h (profile_count::apply_scale): Move sanity check.
2234         * tree-inline.c (copy_bb): Always scale.
2235         (copy_cfg_body): Likewise.
2237 2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>
2239         PR target/67591
2240         * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
2241         attribute.
2242         (*cmp_ite0): Add enabled_for_depr_it attribute.
2243         (*cmp_ite1): Likewise.
2245 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
2247         * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
2248         TYPE_MFCRF.
2250 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
2252         * tree-vrp.c (vrp_int_const_binop): Return true on success and
2253         return the value by pointer.
2254         (extract_range_from_multiplicative_op_1): Update accordingly.
2255         Return as soon as an operation fails.
2257 2017-11-05  Tom de Vries  <tom@codesourcery.com>
2259         PR other/82784
2260         * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
2261         (DEF_SANITIZER_BUILTIN): ... here.
2262         (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
2263         DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.
2265 2017-11-05  Tom de Vries  <tom@codesourcery.com>
2267         PR other/82784
2268         * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
2269         macro body.
2270         (ASM_OUTPUT_CASE_LABEL): Add semicolon after
2271         ASM_OUTPUT_BEFORE_CASE_LABEL call.
2272         * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
2273         after macro body.
2274         * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
2275         * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
2276         * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
2278 2017-11-05  Tom de Vries  <tom@codesourcery.com>
2280         PR other/82784
2281         * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
2282         "do {} while (0)".
2284 2017-11-04  Michael Clark  <michaeljclark@mac.com>
2286         * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
2287         config/riscv/riscv.md (addsi3): Use 'i' for immediates.
2288         (adddi3): Likewise.
2289         (*addsi3_extended): Likewise.
2290         (*addsi3_extended2): Likewise.
2291         (<optab>si3): Likewise.
2292         (<optab>di3): Likewise.
2293         (<optab><mode>3): Likewise.
2294         (<*optabe>si3_internal): Likewise.
2295         (zero_extendqi<SUPERQI:mode>2): Likewise.
2296         (*add<mode>hi3): Likewise.
2297         (*xor<mode>hi3): Likewise.
2298         (<optab>di3): Likewise.
2299         (*<optab>si3_extend): Likewise.
2300         (*sge<u>_<X:mode><GPR:mode>): Likewise.
2301         (*slt<u>_<X:mode><GPR:mode>): Likewise.
2302         (*sle<u>_<X:mode><GPR:mode>): Likewise.
2304 2017-11-04  Andrew Waterman  <andrew@sifive.com>
2306         * config/riscv/riscv.c (riscv_option_override): Conditionally set
2307         TARGET_STRICT_ALIGN based upon -mtune argument.
2309 2017-11-04  Andrew Waterman  <andrew@sifive.com>
2311         * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
2313 2017-11-04  Daniel Santos  <daniel.santos@pobox.com>
2315         config/i386/i386.c (choose_basereg): Use optional scratch
2316         register and add assertion.
2317         (x86_emit_outlined_ms2sysv_save): Use scratch register when
2318         needed, and don't allocate stack.
2319         (ix86_expand_prologue): Rearrange where SSE saves/stub call is
2320         emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
2321         (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
2323 2017-11-03  Jeff Law  <law@redhat.com>
2325         * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
2326         (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
2327         to probe at the start of a noreturn function.
2329 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
2331         PR tree-optimization/78821
2332         * gimple-ssa-store-merging.c: Update the file comment.
2333         (MAX_STORE_ALIAS_CHECKS): Define.
2334         (struct store_operand_info): New type.
2335         (store_operand_info::store_operand_info): New constructor.
2336         (struct store_immediate_info): Add rhs_code and ops data members.
2337         (store_immediate_info::store_immediate_info): Add rhscode, op0r
2338         and op1r arguments to the ctor, initialize corresponding data members.
2339         (struct merged_store_group): Add load_align_base and load_align
2340         data members.
2341         (merged_store_group::merged_store_group): Initialize them.
2342         (merged_store_group::do_merge): Update them.
2343         (merged_store_group::apply_stores): Pick the constant for
2344         encode_tree_to_bitpos from one of the two operands, or skip
2345         encode_tree_to_bitpos if neither operand is a constant.
2346         (class pass_store_merging): Add process_store method decl.  Remove
2347         bool argument from terminate_all_aliasing_chains method decl.
2348         (pass_store_merging::terminate_all_aliasing_chains): Remove
2349         var_offset_p argument and corresponding handling.
2350         (stmts_may_clobber_ref_p): New function.
2351         (compatible_load_p): New function.
2352         (imm_store_chain_info::coalesce_immediate_stores): Terminate group
2353         if there is overlap and rhs_code is not INTEGER_CST.  For
2354         non-overlapping stores terminate group if rhs is not mergeable.
2355         (get_alias_type_for_stmts): Change first argument from
2356         auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
2357         BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
2358         instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
2359         alias type.
2360         (get_location_for_stmts): Change first argument from
2361         auto_vec<gimple *> & to vec<gimple *> &.
2362         (struct split_store): Remove orig_stmts data member, add orig_stores.
2363         (split_store::split_store): Create orig_stores rather than orig_stmts.
2364         (find_constituent_stmts): Renamed to ...
2365         (find_constituent_stores): ... this.  Change second argument from
2366         vec<gimple *> * to vec<store_immediate_info *> *, push pointers
2367         to info structures rather than the statements.
2368         (split_group): Rename ALLOW_UNALIGNED argument to
2369         ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
2370         it.  Adjust find_constituent_stores caller.
2371         (imm_store_chain_info::output_merged_store): Handle rhs_code other
2372         than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
2373         get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
2374         MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
2375         (mem_valid_for_store_merging): New function.
2376         (handled_load): New function.
2377         (pass_store_merging::process_store): New method.
2378         (pass_store_merging::execute): Use process_store method.  Adjust
2379         terminate_all_aliasing_chains caller.
2381 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
2383         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
2384         Return true for more constants, symbols and label references.
2385         (aarch64_valid_floating_const): Remove unused function.
2387 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
2389         PR target/82786
2390         * config/aarch64/aarch64.c (aarch64_layout_frame):
2391         Undo forcing of LR at bottom of frame.
2393 2017-11-03  Jeff Law  <law@redhat.com>
2395         PR target/82823
2396         * config/i386/i386.c (ix86_expand_prologue): Tighten assert
2397         for int_registers_saved.
2399         * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
2400         extracted from tree-ssa-dom.c.
2401         * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
2402         * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
2403         (record_equivalences_from_incoming_edge): Add additional argument
2404         to single_pred_edge_ignoring_loop_edges call.
2405         * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
2406         (uncprop_dom_walker::before_dom_children): Add additional argument
2407         to single_pred_edge_ignoring_loop_edges call.
2408         * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
2409         single_pred_edge_ignoring_loop_edges rather than open coding.
2410         * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
2412 2017-11-03  Marc Glisse  <marc.glisse@inria.fr>
2414         * match.pd (-(-A)): Rewrite.
2416 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
2418         * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
2419         (rs6000_emit_int_cmove): New declaration.
2420         * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
2421         (rs6000_emit_sISEL): Delete.
2422         (rs6000_emit_int_cmove): Make non-static.
2423         * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
2424         instead of rs6000_emit_sISEL.
2426 2017-11-03  Jan Hubicka  <hubicka@ucw.cz>
2428         * asan.c (create_cond_insert_point): Maintain profile.
2429         * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
2430         merged.
2431         * basic-block.h (struct basic_block_def): Remove frequency.
2432         (EDGE_FREQUENCY): Use to_frequency
2433         * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
2434         heuristics.
2435         (find_traces): Update to use to_frequency.
2436         (find_traces_1_round): Likewise; use only IPA counts.
2437         (bb_to_key): Likewise.
2438         (connect_traces): Use IPA counts only.
2439         (copy_bb_p): Update to use to_frequency.
2440         (fix_up_crossing_landing_pad): Likewise.
2441         (sanitize_hot_paths): Likewise.
2442         * bt-load.c (basic_block_freq): Likewise.
2443         * cfg.c (init_flow): Set count_max to uninitialized.
2444         (check_bb_profile): Remove frequencies; check counts.
2445         (dump_bb_info): Do not dump frequencies.
2446         (update_bb_profile_for_threading): Update counts only.
2447         (scale_bbs_frequencies_int): Likewise.
2448         (MAX_SAFE_MULTIPLIER): Remove.
2449         (scale_bbs_frequencies_gcov_type): Update counts only.
2450         (scale_bbs_frequencies_profile_count): Update counts only.
2451         (scale_bbs_frequencies): Update counts only.
2452         * cfg.h (struct control_flow_graph): Add count-max.
2453         (update_bb_profile_for_threading): Update prototype.
2454         * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
2455         (find_many_sub_basic_blocks): Likewise.
2456         * cfgcleanup.c (try_forward_edges): Likewise.
2457         (try_crossjump_to_edge): Likewise.
2458         * cfgexpand.c (expand_gimple_cond): Likewise.
2459         (expand_gimple_tailcall): Likewise.
2460         (construct_init_block): Likewise.
2461         (construct_exit_block): Likewise.
2462         * cfghooks.c (verify_flow_info): Check consistency of counts.
2463         (dump_bb_for_graph): Do not dump frequencies.
2464         (split_block_1): Do not update frequencies.
2465         (split_edge): Do not update frequencies.
2466         (make_forwarder_block): Do not update frequencies.
2467         (duplicate_block): Do not update frequencies.
2468         (account_profile_record): Do not update frequencies.
2469         * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
2470         for global heuristics.
2471         * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
2472         (expected_loop_iterations_unbounded): Use counts only.
2473         * cfgloopmanip.c (scale_loop_profile): Simplify.
2474         (create_empty_loop_on_edge): Simplify
2475         (loopify): Simplify
2476         (duplicate_loop_to_header_edge): Simplify
2477         * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
2478         (update_br_prob_note): Take care of removing note when profile
2479         becomes undefined.
2480         (relink_block_chain): Do not dump frequency.
2481         (rtl_account_profile_record): Use to_frequency.
2482         * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
2483         (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
2484         (cgraph_update_edges_for_call_stmt_node): Likewise.
2485         (cgraph_edge::verify_count_and_frequency): Update.
2486         (cgraph_node::verify_node): Temporarily disable frequency verification.
2487         * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
2488         to_cgraph_frequency.
2489         (cgraph_edge::rebuild_edges): Convert to ipa counts.
2490         * cgraphunit.c (init_lowered_empty_function): Do not initialize
2491         frequencies.
2492         (cgraph_node::expand_thunk): Update profile.
2493         * except.c (dw2_build_landing_pads): Do not update frequency.
2494         * final.c (compute_alignments): Use to_frequency.
2495         (dump_basic_block_info): Do not dump frequency.
2496         * gimple-pretty-print.c (dump_profile): Do not dump frequency.
2497         (dump_gimple_bb_header): Do not dump frequency.
2498         * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
2499         do update count.
2500         * gimple-streamer-in.c (input_bb): Do not stream frequency.
2501         * gimple-streamer-out.c (output_bb): Do not stream frequency.
2502         * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
2503         (init_before_recovery): Do not update frequency.
2504         (sched_create_recovery_edges): Do not update frequency.
2505         * hsa-gen.c (convert_switch_statements): Do not update frequency.
2506         * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
2507         (ipa_cp_c_finalize): Set max_count to uninitialized.
2508         * ipa-fnsummary.c (get_minimal_bb): Use counts.
2509         (param_change_prob): Use counts.
2510         * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
2511         local profiles.
2512         * ipa-split.c (consider_split): Use to_frequency.
2513         (split_function): Use to_frequency.
2514         * ira-build.c (loop_compare_func): Likewise.
2515         (mark_loops_for_removal): Likewise.
2516         (mark_all_loops_for_removal): Likewise.
2517         * loop-doloop.c (doloop_modify): Do not update frequency.
2518         * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
2519         frequency.
2520         * lto-streamer-in.c (input_function): Update count_max.
2521         * omp-expand.c (expand_omp_taskreg): Update count_max.
2522         * omp-simd-clone.c (simd_clone_adjust): Update profile.
2523         * predict.c (maybe_hot_frequency_p): Use to_frequency.
2524         (maybe_hot_count_p): Use ipa counts only.
2525         (maybe_hot_bb_p): Simplify.
2526         (maybe_hot_edge_p): Simplify.
2527         (probably_never_executed): Do not take frequency argument.
2528         (probably_never_executed_bb_p): Do not pass frequency.
2529         (probably_never_executed_edge_p): Likewise.
2530         (combine_predictions_for_bb): Check that profile is nonzero.
2531         (propagate_freq): Do not set frequency.
2532         (drop_profile): Simplify.
2533         (counts_to_freqs): Simplify.
2534         (expensive_function_p): Use to_frequency.
2535         (propagate_unlikely_bbs_forward): Simplify.
2536         (determine_unlikely_bbs): Simplify.
2537         (estimate_bb_frequencies): Add hack to silence graphite issues.
2538         (compute_function_frequency): Use ipa counts.
2539         (pass_profile::execute): Update.
2540         (rebuild_frequencies): Use counts only.
2541         (force_edge_cold): Use counts only.
2542         * profile-count.c (profile_count::dump): Dump new count types.
2543         (profile_count::differs_from_p): Check compatiblity.
2544         (profile_count::to_frequency): New function.
2545         (profile_count::to_cgraph_frequency): New function.
2546         * profile-count.h (struct function): Declare.
2547         (enum profile_quality): Add profile_guessed_local and
2548         profile_guessed_global0.
2549         (class profile_proability): Decrease number of bits to 29;
2550         update from_reg_br_prob_note and to_reg_br_prob_note.
2551         (class profile_count: Update comment; decrease number of bits
2552         to 61. Check compatibility.
2553         (profile_count::compatible_p): New private member function.
2554         (profile_count::ipa_p): New member function.
2555         (profile_count::operator<): Handle global zero correctly.
2556         (profile_count::operator>): Handle global zero correctly.
2557         (profile_count::operator<=): Handle global zero correctly.
2558         (profile_count::operator>=): Handle global zero correctly.
2559         (profile_count::nonzero_p): New member function.
2560         (profile_count::force_nonzero): New member function.
2561         (profile_count::max): New member function.
2562         (profile_count::apply_scale): Handle IPA scalling.
2563         (profile_count::guessed_local): New member function.
2564         (profile_count::global0): New member function.
2565         (profile_count::ipa): New member function.
2566         (profile_count::to_frequency): Declare.
2567         (profile_count::to_cgraph_frequency): Declare.
2568         * profile.c (OVERLAP_BASE): Delete.
2569         (compute_frequency_overlap): Delete.
2570         (compute_branch_probabilities): Do not use compute_frequency_overlap.
2571         * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
2572         * sched-ebb.c (rank): Use counts only.
2573         * shrink-wrap.c (handle_simple_exit): Use counts only.
2574         (try_shrink_wrapping): Use counts only.
2575         (place_prologue_for_one_component): Use counts only.
2576         * tracer.c (find_best_predecessor): Use to_frequency.
2577         (find_trace): Use to_frequency.
2578         (tail_duplicate): Use to_frequency.
2579         * trans-mem.c (expand_transaction): Do not update frequency.
2580         * tree-call-cdce.c: Do not update frequency.
2581         * tree-cfg.c (gimple_find_sub_bbs): Likewise.
2582         (gimple_merge_blocks): Likewise.
2583         (gimple_split_edge): Likewise.
2584         (gimple_duplicate_sese_region): Likewise.
2585         (gimple_duplicate_sese_tail): Likewise.
2586         (move_sese_region_to_fn): Likewise.
2587         (gimple_account_profile_record): Likewise.
2588         (insert_cond_bb): Likewise.
2589         * tree-complex.c (expand_complex_div_wide): Likewise.
2590         * tree-eh.c (lower_resx): Update profile.
2591         * tree-inline.c (copy_bb): Simplify count scaling; do not scale
2592         frequencies.
2593         (initialize_cfun): Do not initialize frequencies
2594         (freqs_to_counts): Delete.
2595         (copy_cfg_body): Ignore count parameter.
2596         (copy_body): Update.
2597         (expand_call_inline): Update count_max.
2598         (optimize_inline_calls): Update count_max.
2599         (tree_function_versioning): Update count_max.
2600         * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
2601         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
2602         frequency.
2603         * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
2604         * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
2605         (try_peel_loop): Likewise.
2606         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
2607         to_frequency.
2608         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
2609         (tree_transform_and_unroll_loop): Do not use frequencies
2610         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
2611         Use reliable prediction only.
2612         * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
2613         * tree-ssa-sink.c (select_best_block): Use to_frequency.
2614         * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
2615         probability scaling.
2616         * tree-ssa-threadupdate.c (create_block_for_threading): Do
2617         not update frequency
2618         (any_remaining_duplicated_blocks): Likewise.
2619         (update_profile): Likewise.
2620         (estimated_freqs_path): Delete.
2621         (freqs_to_counts_path): Delete.
2622         (clear_counts_path): Delete.
2623         (ssa_fix_duplicate_block_edges): Likewise.
2624         (duplicate_thread_path): Likewise.
2625         * tree-switch-conversion.c (gen_inbound_check): Use counts.
2626         * tree-tailcall.c (decrease_profile): Do not update frequency.
2627         (eliminate_tail_call): Likewise.
2628         * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
2629         * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
2630         (optimize_mask_stores): Likewise.
2631         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
2632         * ubsan.c (ubsan_expand_null_ifn): Update profile.
2633         (ubsan_expand_ptr_ifn): Update profile.
2634         * value-prof.c (gimple_ic): Simplify.
2635         * value-prof.h (gimple_ic): Update prototype.
2636         * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
2637         * ipa-inline.c (compute_uninlined_call_time): Be sure that
2638         counts are nonzero.
2639         (want_inline_self_recursive_call_p): Likewise.
2640         (resolve_noninline_speculation): Only cummulate defined counts.
2641         (inline_small_functions): Use nonzero_p.
2642         (ipa_inline): Do not access freed node.
2644 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
2646         * config/aarch64/aarch64.c (aarch64_override_options_internal):
2647         Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
2649 2017-11-03  Kito Cheng  <kito.cheng@gmail.com>
2651         * config/riscv/riscv.c (riscv_legitimize_move): Handle
2652         non-legitimate address.
2654 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
2656         * config/rs6000/rs6000.md (*lt0_disi): Delete.
2657         (*lt0_<mode>di, *lt0_<mode>si): New.
2659 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
2661         * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
2662         TARGET_PAIRED_FLOAT.
2664 2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
2665             Jim Wilson  <jim.wilson@linaro.org>
2667         * config/aarch64/aarch64-cores.def (saphira): New CPU.
2668         * config/aarch64/aarch64-tune.md: Regenerated.
2669         * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
2670         * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
2672 2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
2674         * config/arc/arc.c (arc_save_restore): Corrected CFA note.
2675         (arc_expand_prologue): Restore blink for millicode.
2676         * config/arc/linux.h (LINK_EH_SPEC): Defined.
2678 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
2680         PR target/82809
2681         * config/i386/i386.c (ix86_vector_duplicate_value): Use
2682         gen_vec_duplicate after forcing the scalar into a register.
2684 2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>
2686         * combine (try_combine): Print the insns input to try_combine to the
2687         dump file.
2689 2017-11-02  Steve Ellcey  <sellcey@cavium.com>
2691         PR target/79868
2692         * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
2693         Remove second argument from aarch64_process_target_attr call.
2694         * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
2695         Ditto.
2696         * config/aarch64/aarch64.c (aarch64_attribute_info): Change
2697         field type.
2698         (aarch64_handle_attr_arch): Remove second argument.
2699         (aarch64_handle_attr_cpu): Ditto.
2700         (aarch64_handle_attr_tune): Ditto.
2701         (aarch64_handle_attr_isa_flags): Ditto.
2702         (aarch64_process_one_target_attr): Ditto.
2703         (aarch64_process_target_attr): Ditto.
2704         (aarch64_option_valid_attribute_p): Remove second argument.
2705         on aarch64_process_target_attr call.
2707 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
2709         * diagnostic.c: Include "selftest-diagnostic.h".
2710         (selftest::assert_location_text): New function.
2711         (selftest::test_diagnostic_get_location_text): New function.
2712         (selftest::diagnostic_c_tests): Call it.
2714 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
2716         * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
2717         * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
2718         (class selftest::test_diagnostic_context): Move to...
2719         * selftest-diagnostic.c: New file.
2720         * selftest-diagnostic.h: New file.
2722 2017-11-02  James Bowman  <james.bowman@ftdichip.com>
2724         * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
2725         offset range for FT32B.
2726         * config/ft32/ft32.h: option "mcompress" enables relaxation.
2727         * config/ft32/ft32.md: Add TARGET_NOPM.
2728         * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
2729         * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
2731 2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
2733         * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
2735 2017-11-02  Jeff Law  <law@redhat.com>
2737         * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
2738         virtual keyword on FINAL OVERRIDE members.
2740         * tree-ssa-propagate.h (ssa_propagation_engine): Group
2741         virtuals together.  Add virtual destructor.
2742         (substitute_and_fold_engine): Similarly.
2744 2017-11-02  Jan Hubicka  <hubicka@ucw.cz>
2746         * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
2748 2017-11-02  Richard Biener  <rguenther@suse.de>
2750         PR tree-optimization/82795
2751         * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
2753 2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2755         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
2756         gcc_SUN_LD_VERSION.
2757         (gcc_GAS_CHECK_FEATURE): Remove.
2758         * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
2759         gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
2760         * configure: Regenerate.
2762 2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>
2764         * config/arc/arc.c (hwloop_optimize): Account for empty
2765         body loops.
2767 2017-11-02  Richard Biener  <rguenther@suse.de>
2769         PR middle-end/82765
2770         * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
2771         Truncate ARRAY_REF index and element size.
2773 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
2775         * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
2777 2017-11-01  Jeff Law  <law@redhat.com>
2779         * tree-ssa-ccp.c (ccp_folder): New class derived from
2780         substitute_and_fold_engine.
2781         (ccp_folder::get_value): New member function.
2782         (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
2783         (ccp_fold_stmt): Remove prototype.
2784         (ccp_finalize): Call substitute_and_fold from the ccp_class.
2785         * tree-ssa-copy.c (copy_folder): New class derived from
2786         substitute_and_fold_engine.
2787         (copy_folder::get_value): Renamed from get_value.
2788         (fini_copy_prop): Call substitute_and_fold from copy_folder class.
2789         * tree-vrp.c (vrp_folder): New class derived from
2790         substitute_and_fold_engine.
2791         (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
2792         (vrp_folder::get_value): New member function.
2793         (vrp_finalize): Call substitute_and_fold from vrp_folder class.
2794         (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
2795         * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
2796         provide a class interface to folder/substitute routines.
2797         (ssa_prop_fold_stmt_fn): Remove typedef.
2798         (ssa_prop_get_value_fn): Likewise.
2799         (subsitute_and_fold): Remove prototype.
2800         (replace_uses_in): Likewise.
2801         * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
2802         Renamed from replace_uses_in.  Call the virtual member function
2803         (substitute_and_fold_engine::replace_phi_args_in): Similarly.
2804         (substitute_and_fold_dom_walker): Remove initialization of
2805         data member entries for calbacks.  Add substitute_and_fold_engine
2806         member and initialize it.
2807         (substitute_and_fold_dom_walker::before_dom_children0: Use the
2808         member functions for get_value, replace_phi_args_in c
2809         replace_uses_in, and fold_stmt calls.
2810         (substitute_and_fold_engine::substitute_and_fold): Renamed from
2811         substitute_and_fold.  Remove assert.   Update ctor call.
2813         * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
2814         (ssa_prop_visit_phi_fn): Likewise.
2815         (class ssa_propagation_engine): New class to provide an interface
2816         into ssa_propagate.
2817         * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
2818         variable.
2819         (ssa_prop_visit_phi): Likewise.
2820         (ssa_propagation_engine::simulate_stmt): Moved into class.
2821         Call visit_phi/visit_stmt from the class rather than via
2822         file scoped static variables.
2823         (ssa_propagation_engine::simulate_block): Moved into class.
2824         (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
2825         (ssa_propagation_engine::ssa_propagate): Similarly.  No longer
2826         set file scoped statics for the visit_stmt/visit_phi callbacks.
2827         * tree-complex.c (complex_propagate): New class derived from
2828         ssa_propagation_engine.
2829         (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
2830         (complex_propagate::visit_phi): Renamed from complex_visit_phi.
2831         (tree_lower_complex): Call ssa_propagate via the complex_propagate
2832         class.
2833         * tree-ssa-ccp.c: (ccp_propagate): New class derived from
2834         ssa_propagation_engine.
2835         (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
2836         (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
2837         (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
2838         * tree-ssa-copy.c (copy_prop): New class derived from
2839         ssa_propagation_engine.
2840         (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
2841         (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
2842         (execute_copy_prop): Call ssa_propagate from the copy_prop class.
2843         * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
2844         (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
2845         (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
2846         (execute_vrp): Call ssa_propagate from the vrp_prop class.
2848 2017-11-01  Jakub Jelinek  <jakub@redhat.com>
2850         PR rtl-optimization/82778
2851         PR rtl-optimization/82597
2852         * compare-elim.c (struct comparison): Add in_a_setter field.
2853         (find_comparison_dom_walker::before_dom_children): Remove killed
2854         bitmap and df_simulate_find_defs call, instead walk the defs.
2855         Compute last_setter and initialize in_a_setter.  Merge definitions
2856         with first initialization for a few variables.
2857         (try_validate_parallel): Use insn_invalid_p instead of
2858         recog_memoized.  Return insn rather than just the pattern.
2859         (try_merge_compare): Fix up comment.  Don't uselessly test if
2860         in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
2861         chains.
2862         (execute_compare_elim_after_reload): Remove df_chain_add_problem
2863         call.
2865 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2866             Alan Hayward  <alan.hayward@arm.com>
2867             David Sherwood  <david.sherwood@arm.com>
2869         * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
2870         aarch64_hard_regno_nregs to get the number of registers
2871         in a mode.
2873 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2874             Alan Hayward  <alan.hayward@arm.com>
2875             David Sherwood  <david.sherwood@arm.com>
2877         * config/aarch64/constraints.md (Upl): Rename to...
2878         (Uaa): ...this.
2879         * config/aarch64/aarch64.md
2880         (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
2881         Update accordingly.
2883 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2884             Alan Hayward  <alan.hayward@arm.com>
2885             David Sherwood  <david.sherwood@arm.com>
2887         * config/aarch64/aarch64.c (aarch64_add_constant_internal)
2888         (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
2889         earlier in file.
2891 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2892             Alan Hayward  <alan.hayward@arm.com>
2893             David Sherwood  <david.sherwood@arm.com>
2895         * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
2896         (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
2897         (aarch64_evpc_dup): Generate rtl direcly, rather than using
2898         named expanders.
2899         (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
2900         of a single element.
2901         * config/aarch64/iterators.md: Add a comment above the permute
2902         unspecs to say that they are generated directly by
2903         aarch64_expand_vec_perm_const.
2904         * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
2906 2017-11-01  Nathan Sidwell  <nathan@acm.org>
2908         * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
2910 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
2912         * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
2913         and medany code models, and describe what they do.
2915 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2917         Revert accidental duplicate:
2919         * combine.c (can_change_dest_mode): Reject changes in
2920         REGMODE_NATURAL_SIZE.
2922 2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>
2924         PR rtl-optimization/64682
2925         PR rtl-optimization/69567
2926         PR rtl-optimization/69737
2927         PR rtl-optimization/82683
2928         * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
2929         register mentioned in the note, drop the note, unless it came from I3,
2930         in which case it should go to I3 again.
2932 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2934         * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
2935         and return false if not.
2936         (clear_bytes_written_by, live_bytes_read): Update accordingly.
2938 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2940         * tree-ssa-alias.h (ranges_overlap_p): Return false if either
2941         range is known to be empty.
2943 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2944             Alan Hayward  <alan.hayward@arm.com>
2945             David Sherwood  <david.sherwood@arm.com>
2947         * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
2948         and CONST_VECTOR_NUNITS instead of computing the number of units from
2949         the byte sizes of the vector and element.
2950         (simplify_binary_operation_1): Likewise.
2951         (simplify_const_binary_operation): Likewise.
2952         (simplify_ternary_operation): Likewise.
2954 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2955             Alan Hayward  <alan.hayward@arm.com>
2956             David Sherwood  <david.sherwood@arm.com>
2958         * var-tracking.c (INT_MEM_OFFSET): Replace with...
2959         (int_mem_offset): ...this new function.
2960         (var_mem_set, var_mem_delete_and_set, var_mem_delete)
2961         (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
2962         (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
2963         Update accordingly.
2965 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2966             Alan Hayward  <alan.hayward@arm.com>
2967             David Sherwood  <david.sherwood@arm.com>
2969         * lower-subreg.c (interesting_mode_p): New function.
2970         (compute_costs, find_decomposable_subregs, decompose_register)
2971         (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
2972         (resolve_clobber, dump_choices): Use it.
2974 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2975             Alan Hayward  <alan.hayward@arm.com>
2976             David Sherwood  <david.sherwood@arm.com>
2978         * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
2980 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2981             Alan Hayward  <alan.hayward@arm.com>
2982             David Sherwood  <david.sherwood@arm.com>
2984         * alias.c (find_base_value, find_base_term): Only process integer
2985         truncations.  Check the precision rather than the size.
2987 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2988             Alan Hayward  <alan.hayward@arm.com>
2989             David Sherwood  <david.sherwood@arm.com>
2991         * machmode.h (is_narrower_int_mode): New function
2992         * optabs.c (expand_float, expand_fix): Use it.
2993         * dwarf2out.c (rotate_loc_descriptor): Likewise.
2995 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
2996             Alan Hayward  <alan.hayward@arm.com>
2997             David Sherwood  <david.sherwood@arm.com>
2999         * rtl.h (narrower_subreg_mode): New function.
3000         * ira-color.c (update_costs_from_allocno): Use it.
3002 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3003             Alan Hayward  <alan.hayward@arm.com>
3004             David Sherwood  <david.sherwood@arm.com>
3006         * optabs-query.h (convert_optab_p): New function, split out from...
3007         (convert_optab_handler): ...here.
3008         (widening_optab_handler): Delete.
3009         (find_widening_optab_handler): Remove permit_non_widening parameter.
3010         (find_widening_optab_handler_and_mode): Likewise.  Provide an
3011         override that operates on mode class wrappers.
3012         * optabs-query.c (widening_optab_handler): Delete.
3013         (find_widening_optab_handler_and_mode): Remove permit_non_widening
3014         parameter.  Assert that the two modes are the same class and that
3015         the "from" mode is narrower than the "to" mode.  Use
3016         convert_optab_handler instead of widening_optab_handler.
3017         * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
3018         instead of widening_optab_handler.
3019         * expr.c (expand_expr_real_2): Update calls to
3020         find_widening_optab_handler.
3021         * optabs.c (expand_widen_pattern_expr): Likewise.
3022         (expand_binop_directly): Take the insn_code as a parameter.
3023         (expand_binop): Only call find_widening_optab_handler for
3024         conversion optabs; use optab_handler otherwise.  Update calls
3025         to find_widening_optab_handler and expand_binop_directly.
3026         Use convert_optab_handler instead of widening_optab_handler.
3027         * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
3028         find_widening_optab_handler and use scalar_mode rather than
3029         machine_mode.
3030         (convert_plusminus_to_widen): Likewise.
3032 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3033             Alan Hayward  <alan.hayward@arm.com>
3034             David Sherwood  <david.sherwood@arm.com>
3036         * machmode.h (fixed_size_mode): New class.
3037         * rtl.h (get_pool_mode): Return fixed_size_mode.
3038         * gengtype.c (main): Add fixed_size_mode.
3039         * target.def (get_raw_result_mode): Return a fixed_size_mode.
3040         (get_raw_arg_mode): Likewise.
3041         * doc/tm.texi: Regenerate.
3042         * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
3043         * targhooks.c (default_get_reg_raw_mode): Likewise.
3044         * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
3045         * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
3046         * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
3047         (msp430_get_raw_result_mode): Likewise.
3048         * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
3049         * dbxout.c (dbxout_parms): Require fixed-size modes.
3050         * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
3051         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
3052         * omp-low.c (lower_oacc_reductions): Likewise.
3053         * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
3054         (simplify_subreg): Update accordingly.
3055         * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
3056         (force_const_mem): Update accordingly.  Return NULL_RTX for modes
3057         that aren't fixed-size.
3058         (get_pool_mode): Return a fixed_size_mode.
3059         (output_constant_pool_2): Take a fixed_size_mode.
3061 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3062             Alan Hayward  <alan.hayward@arm.com>
3063             David Sherwood  <david.sherwood@arm.com>
3065         * doc/rtl.texi (vec_series): Document.
3066         (const): Say that the operand can be a vec_series.
3067         * rtl.def (VEC_SERIES): New rtx code.
3068         * rtl.h (const_vec_series_p_1): Declare.
3069         (const_vec_series_p): New function.
3070         * emit-rtl.h (gen_const_vec_series): Declare.
3071         (gen_vec_series): Likewise.
3072         * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
3073         (gen_vec_series): Likewise.
3074         * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
3075         * simplify-rtx.c (simplify_unary_operation): Handle negations
3076         of vector series.
3077         (simplify_binary_operation_series): New function.
3078         (simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
3079         (test_vector_ops_series): New function.
3080         (test_vector_ops): Call it.
3081         * config/powerpcspe/altivec.md (altivec_lvsl): Use
3082         gen_const_vec_series.
3083         (altivec_lvsr): Likewise.
3084         * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
3086 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3087             Alan Hayward  <alan.hayward@arm.com>
3088             David Sherwood  <david.sherwood@arm.com>
3090         * doc/rtl.texi (const): Update description of address constants.
3091         Say that vector constants are allowed too.
3092         * common.md (E, F): Use CONSTANT_P instead of checking for
3093         CONST_VECTOR.
3094         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
3095         checking for CONST_VECTOR.
3096         * expmed.c (make_tree): Use build_vector_from_val for a CONST
3097         VEC_DUPLICATE.
3098         * expr.c (expand_expr_real_2): Check for vector modes instead
3099         of checking for CONST_VECTOR.
3100         * rtl.h (const_vec_p): New function.
3101         (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
3102         (unwrap_const_vec_duplicate): Handle them here too.
3104 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3105             David Malcolm  <dmalcolm@redhat.com>
3106             Alan Hayward  <alan.hayward@arm.com>
3107             David Sherwood  <david.sherwood@arm.com>
3109         * rtl.h (vec_duplicate_p): New function.
3110         * selftest-rtl.c (assert_rtx_eq_at): New function.
3111         * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
3112         (assert_rtx_eq_at): Declare.
3113         * selftest.h (selftest::simplify_rtx_c_tests): Declare.
3114         * selftest-run-tests.c (selftest::run_tests): Call it.
3115         * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
3116         (simplify_unary_operation_1): Recursively handle vector duplicates.
3117         (simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
3118         vector duplicates.
3119         (simplify_subreg): Handle subregs of vector duplicates.
3120         (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
3121         (selftest::simplify_rtx_c_tests): New functions.
3123 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3124             Alan Hayward  <alan.hayward@arm.com>
3125             David Sherwood  <david.sherwood@arm.com>
3127         * emit-rtl.h (gen_const_vec_duplicate): Declare.
3128         (gen_vec_duplicate): Likewise.
3129         * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
3130         out from...
3131         (gen_const_vector): ...here.
3132         (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
3133         (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
3134         whose elements are all equal.
3135         * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
3136         * simplify-rtx.c (simplify_const_unary_operation): Likewise.
3137         (simplify_relational_operation): Likewise.
3138         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
3139         Likewise.
3140         (aarch64_simd_dup_constant): Use gen_vec_duplicate.
3141         (aarch64_expand_vector_init): Likewise.
3142         * config/arm/arm.c (neon_vdup_constant): Likewise.
3143         (neon_expand_vector_init): Likewise.
3144         (arm_expand_vec_perm): Use gen_const_vec_duplicate.
3145         (arm_block_set_unaligned_vect): Likewise.
3146         (arm_block_set_aligned_vect): Likewise.
3147         * config/arm/neon.md (neon_copysignf<mode>): Likewise.
3148         * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
3149         (expand_vec_perm_even_odd_pack): Likewise.
3150         (ix86_vector_duplicate_value): Use gen_vec_duplicate.
3151         * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
3152         * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
3153         gen_const_vec_duplicate.
3154         * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
3155         * config/mips/mips.c (mips_gen_const_int_vector): Use
3156         gen_const_vec_duplicate.
3157         (mips_expand_vector_init): Use CONST0_RTX.
3158         * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
3159         (define_split): Use gen_const_vec_duplicate.
3160         * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
3161         (define_split): Use gen_const_vec_duplicate.
3162         * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
3163         (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
3164         * config/spu/spu.c (spu_const): Likewise.
3166 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
3167             Alan Hayward  <alan.hayward@arm.com>
3168             David Sherwood  <david.sherwood@arm.com>
3170         * combine.c (can_change_dest_mode): Reject changes in
3171         REGMODE_NATURAL_SIZE.
3173 2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>
3175         * configure.ac (--enable-libssp): New.
3176         (gcc_cv_libc_provides_ssp): Check for explicit setting before
3177         trying to determine target-specific default.  Adjust indentation.
3178         * configure: Regenerated.
3179         * doc/install.texi (Configuration): Expand --disable-libssp
3180         documentation.
3182 2017-10-31  Daniel Santos  <daniel.santos@pobox.com>
3184         config/i386/i386.c (ix86_expand_epilogue): Correct stack
3185         calculation.
3187 2017-10-31  Martin Jambor  <mjambor@suse.cz>
3189         PR c++/81702
3190         * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
3192 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
3194         * auto-profile.c (autofdo_source_profile::read): Use
3195         UNKNOWN_LOCATION rather than 0.
3196         * diagnostic-core.h (warning_at_rich_loc): Rename to...
3197         (warning_at): ...this overload.
3198         (warning_at_rich_loc_n): Rename to...
3199         (warning_n): ...this overload.
3200         (error_at_rich_loc): Rename to...
3201         (error_at): ...this overload.
3202         (pedwarn_at_rich_loc): Rename to...
3203         (pedwarn): ...this overload.
3204         (permerror_at_rich_loc): Rename to...
3205         (permerror): ...this overload.
3206         (inform_at_rich_loc): Rename to...
3207         (inform): ...this overload.
3208         * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
3209         (diagnostic_n_impl_richloc): Rename to...
3210         (diagnostic_n_impl): ...this rich_location *-based decl.
3211         (inform_at_rich_loc): Rename to...
3212         (inform): ...this, and add an assertion.
3213         (inform_n): Update for removal of location_t-based diagnostic_n_impl.
3214         (warning_at_rich_loc): Rename to...
3215         (warning_at): ...this, and add an assertion.
3216         (warning_at_rich_loc_n): Rename to...
3217         (warning_n): ...this, and add an assertion.
3218         (warning_n): Update location_t-based implementation for removal of
3219         location_t-based diagnostic_n_impl.
3220         (pedwarn_at_rich_loc): Rename to...
3221         (pedwarn): ...this, and add an assertion.
3222         (permerror_at_rich_loc): Rename to...
3223         (permerror): ...this, and add an assertion.
3224         (error_n): Update for removal of location_t-based diagnostic_n_impl.
3225         (error_at_rich_loc): Rename to...
3226         (error_at): ...this, and add an assertion.
3227         * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
3228         (driver::do_spec_on_infiles): Likewise.
3229         * substring-locations.c (format_warning_va): Update for renaming
3230         of inform_at_rich_loc.
3232 2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
3234         * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
3235         _Float<N>X built-in functions so that the variant without the
3236         "__builtin_" prefix is only enabled for the GNU C and Objective C
3237         languages when they are in non-strict ANSI/ISO mode.
3238         (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
3239         * target.def (floatn_builtin_p): Add a target hook to control
3240         whether _Float<N> and _Float<N>X built-in functions without the
3241         "__builtin_" prefix are enabled, and return true for C and
3242         Objective C in the default hook.  Include langhooks.h in
3243         targhooks.c.
3244         * targhooks.h (default_floatn_builtin_p): Likewise.
3245         * targhooks.c (default_floatn_builtin_p): Likewise.
3246         * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
3247         floatn_builtin_p target hook.
3248         * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
3250 2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
3251             Eric Botcazou  <ebotcazou@adacore.com>
3253         PR rtl-optimization/81803
3254         * lra-constraints.c (curr_insn_transform): Also reload the whole
3255         register for a strict subreg no wider than a word if this is for
3256         a WORD_REGISTER_OPERATIONS target.
3258 2017-10-31  Jason Merrill  <jason@redhat.com>
3260         * gdbinit.in: Skip over inlines from timevar.h.
3262 2017-10-31  Martin Liska  <mliska@suse.cz>
3264         * doc/gcov.texi: Document new option.
3265         * gcov.c (print_usage): Likewise print it.
3266         (process_args): Support the argument.
3267         (format_count): New function.
3268         (format_gcov): Use the function.
3270 2017-10-31  Martin Liska  <mliska@suse.cz>
3272         * gcov.c (struct name_map): do not use typedef.
3273         Define operator== and operator<.
3274         (name_search): Remove.
3275         (name_sort): Remove.
3276         (main): Do not allocate names.
3277         (process_file): Add vertical space.
3278         (generate_results): Use std::find.
3279         (release_structures): Do not release memory.
3280         (find_source): Use std::find.
3282 2017-10-31  Martin Liska  <mliska@suse.cz>
3284         * gcov.c (struct line_info): Remove it's typedef.
3285         (line_info::line_info): Add proper ctor.
3286         (line_info::has_block): Do not use a typedef.
3287         (struct source_info): Do not use typedef.
3288         (circuit): Likewise.
3289         (get_cycles_count): Likewise.
3290         (output_intermediate_file): Iterate via vector iterator.
3291         (add_line_counts): Use std::vector methods.
3292         (accumulate_line_counts): Likewise.
3293         (output_lines): Likewise.
3295 2017-10-31  Martin Liska  <mliska@suse.cz>
3297         * gcov.c (struct source_info): Remove typedef.
3298         (source_info::source_info): Add proper ctor.
3299         (accumulate_line_counts): Use struct, not it's typedef.
3300         (output_gcov_file): Likewise.
3301         (output_lines): Likewise.
3302         (main): Do not allocate an array.
3303         (output_intermediate_file): Use size of vector container.
3304         (process_file): Resize the vector.
3305         (generate_results): Do not preallocate, use newly added vector
3306         lines.
3307         (release_structures): Do not release sources.
3308         (find_source): Use vector methods.
3309         (add_line_counts): Do not use typedef.
3311 2017-10-31  Martin Liska  <mliska@suse.cz>
3313         * doc/gcov.texi: Document that.
3314         * gcov.c (add_line_counts): Mark lines with a non-executed
3315         statement.
3316         (output_line_beginning): Handle such lines.
3317         (output_lines): Pass new argument.
3318         (output_intermediate_file): Print it in intermediate format.
3320 2017-10-31  Martin Liska  <mliska@suse.cz>
3322         * color-macros.h: New file.
3323         * diagnostic-color.c: Factor out color related to macros to
3324         color-macros.h.
3325         * doc/gcov.texi: Document -k option.
3326         * gcov.c (INCLUDE_STRING): Include string.h.
3327         (print_usage): Add -k option.
3328         (process_args): Parse it.
3329         (pad_count_string): New function.
3330         (output_line_beginning): Likewise.
3331         (DEFAULT_LINE_START): New macro.
3332         (output_lines): Support color output.
3334 2017-10-31  Martin Liska  <mliska@suse.cz>
3336         PR gcov-profile/82633
3337         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
3338         their interaction with GCOV infrastructure.
3339         * configure.ac: Add -fkeep-{inline,static}-functions to
3340         coverage_flags.
3341         * configure: Regenerate.
3343 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
3345         PR target/82772
3346         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
3348 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
3350         PR target/82674
3351         * config/rs6000/rs6000.md (allocate_stack): Force update interval
3352         into a register if it does not fit into an immediate offset field.
3354 2017-10-31  Olivier Hainque  <hainque@adacore.com>
3356         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
3358 2017-10-31  Julia Koval  <julia.koval@intel.com>
3360         * config.gcc: Add gfniintrin.h.
3361         * config/i386/gfniintrin.h: New.
3362         * config/i386/i386-builtin-types.def
3363         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
3364         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
3365         __builtin_ia32_vgf2p8affineinvqb_v32qi,
3366         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
3367         __builtin_ia32_vgf2p8affineinvqb_v16qi,
3368         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
3369         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
3370         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
3371         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
3372         V64QI_FTYPE_V64QI_V64QI_INT): New types.
3373         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
3374         * config/i386/immintrin.h: Include gfniintrin.h.
3375         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
3377 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
3379         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
3381 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
3383         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
3384         (arm_ashldi3_1bit): Remove pattern.
3385         (ashrdi3): Remove shift by 1 expansion.
3386         (arm_ashrdi3_1bit): Remove pattern.
3387         (lshrdi3): Remove shift by 1 expansion.
3388         (arm_lshrdi3_1bit): Remove pattern.
3389         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
3390         cost of ashldi3 by 1.
3391         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
3392         (<shift>di3_neon): Likewise.
3394 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
3396         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
3397         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
3398         and (*aarch64_simd_mov<VQ:mode>).
3399         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
3400         pattern alternative.
3401         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
3402         attributes to match pattern alternative.
3404 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
3406         * config.gcc (powerpc*-*-*): Add emmintrin.h.
3407         * config/rs6000/emmintrin.h: New file.
3408         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
3410 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
3412         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
3413         * (movdi_vfp_cortexa8): Remove pattern.
3415 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3417         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
3418         etc. reference.
3419         (Specific, alpha*-dec-osf5.1): Remove.
3420         (Specific, mips-sgi-irix5): Remove.
3421         (Specific, mips-sgi-irix6): Remove.
3423 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
3425         PR middle-end/22141
3426         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
3427         arguments to clear_bit_region_be.
3429 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
3431         * gimplify.c: Include memmodel.h.
3433 2017-10-30  Martin Jambor  <mjambor@suse.cz>
3435         * omp-grid.c (grid_attempt_target_gridification): Also insert a
3436         condition whether loop should be executed at all.
3438 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
3440         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3441         gimple folding of vec_madd() intrinsics.
3442         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
3443         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
3444         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
3446 2017-10-30  Richard Biener  <rguenther@suse.de>
3448         PR tree-optimization/82762
3449         Revert
3450         2017-10-23  Richard Biener  <rguenther@suse.de>
3452         PR tree-optimization/82129
3453         Revert
3454         2017-08-01  Richard Biener  <rguenther@suse.de>
3456         PR tree-optimization/81181
3457         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
3458         (compute_antic): ... end of iteration here.
3460 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
3462         * doc/invoke.texi (C Dialect Options): Document -std=c17,
3463         -std=iso9899:2017 and -std=gnu17.
3464         * doc/standards.texi (C Language): Document C17 support.
3465         * doc/cpp.texi (Overview): Mention -std=c17.
3466         (Standard Predefined Macros): Document C11 and C17 values of
3467         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
3468         * doc/extend.texi (Inline): Do not list individual options for
3469         standards newer than C99.
3470         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
3471         "GNU C17".
3472         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
3473         language name.
3475 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
3477         * asan.c (asan_finish_file): Align asan globals array by shadow
3478         granularity.
3480 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
3482         PR middle-end/22141
3483         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
3484         (struct store_immediate_info): Add bitregion_start and bitregion_end
3485         fields.
3486         (store_immediate_info::store_immediate_info): Add brs and bre
3487         arguments and initialize bitregion_{start,end} from those.
3488         (struct merged_store_group): Add bitregion_start, bitregion_end,
3489         align_base and mask fields.  Drop unnecessary struct keyword from
3490         struct store_immediate_info.  Add do_merge method.
3491         (clear_bit_region_be): Use memset instead of loop storing zeros.
3492         (merged_store_group::do_merge): New method.
3493         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
3494         stores as long as the surrounding bitregions have no gaps.
3495         (merged_store_group::merge_overlapping): Use do_merge.
3496         (merged_store_group::apply_stores): Test that bitregion_{start,end}
3497         is byte aligned, rather than requiring that start and width are
3498         byte aligned.  Drop unnecessary struct keyword from
3499         struct store_immediate_info.  Allocate and populate also mask array.
3500         Make start of the arrays relative to bitregion_start rather than
3501         start and size them according to bitregion_{end,start} difference.
3502         (struct imm_store_chain_info): Drop unnecessary struct keyword from
3503         struct store_immediate_info.
3504         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
3505         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
3506         struct keyword from struct store_immediate_info.
3507         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
3508         between stores as long as the surrounding bitregions have no gaps.
3509         Formatting fixes.
3510         (struct split_store): Add orig non-static data member.
3511         (split_store::split_store): Initialize orig to false.
3512         (find_constituent_stmts): Return store_immediate_info *, non-NULL
3513         if there is exactly a single original stmt.  Change stmts argument
3514         to pointer from reference, if NULL, don't push anything to it.  Add
3515         first argument, use it to optimize skipping over orig stmts that
3516         are known to be before bitpos already.  Simplify.
3517         (split_group): Return unsigned int count how many stores are or
3518         would be needed rather than a bool.  Add allow_unaligned argument.
3519         Change split_stores argument from reference to pointer, if NULL,
3520         only do a dry run computing how many stores would be produced.
3521         Rewritten algorithm to use both alignment and misalign if
3522         !allow_unaligned and handle bitfield stores with gaps.
3523         (imm_store_chain_info::output_merged_store): Set start_byte_pos
3524         from bitregion_start instead of start.  Compute allow_unaligned
3525         here, if true, do 2 split_group dry runs to compute which one
3526         produces fewer stores and prefer aligned if equal.  Punt if
3527         new count is bigger or equal than original before emitting any
3528         statements, rather than during that.  Remove no longer needed
3529         new_ssa_names tracking.  Replace num_stmts with
3530         split_stores.length ().  Use 32-bit stack allocated entries
3531         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
3532         if possible.  Handle bitfields with gaps.
3533         (pass_store_merging::execute): Ignore bitsize == 0 stores.
3534         Compute bitregion_{start,end} for the stores and construct
3535         store_immediate_info with that.  Formatting fixes.
3537 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
3539         PR target/82725
3540         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
3541         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
3543 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
3545         * gimplify.c: Include tm_p.h.
3547         * common.opt (gcoff): Re-add as ignored option.
3548         (gcoff1, gcoff2, gcoff3): Likewise.
3550         * Makefile.in (OBJS): Delete sdbout.o.
3551         (GTFILES): Delete $(srcdir)/sdbout.c.
3552         * debug.h: Delete sdb_debug_hooks.
3553         * final.c: Delete sdbout.h include.
3554         (final_scan_insn): Delete SDB_DEBUG check.
3555         (rest_of_clean_state): Likewise.
3556         * output.h: Delete sdb_begin_function_line.
3557         * sdbout.c: Delete.
3558         * sdbout.h: Delete.
3559         * toplev.c: Delete sdbout.h include.
3560         (process_options): Delete SDB_DEBUG check.
3561         * tree-core.h (tree_type_common): Delete pointer field of
3562         tree_type_symtab.
3563         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
3564         TYPE_SYMTAB_POINTER.
3565         * tree.h (TYPE_SYMTAB_POINTER): Delete.
3566         (TYPE_SYMTAB_IS_POINTER): Delete.
3567         (TYPE_SYMTAB_IS_DIE): Renumber.
3568         * xcoffout.c: Refer to former sdbout.c file.
3569         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
3571         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
3572         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
3573         (Debugging Options): Delete -gcoff.
3574         (-gstabs): Delete SDB reference.
3575         (-gcoff): Delete.
3576         (-gcoff@var{level}): Delete.
3577         * doc/passes.texi (Debugging information output): Delete SDB and
3578         sdbout.c references.
3579         * doc/tm.texi: Regenerate.
3580         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
3581         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
3582         references.
3583         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
3584         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
3585         (SDB_DEBUGGING_INFO): Delete.
3586         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
3587         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
3588         * target.def (output_source_filename): Delete COFF reference.
3590         * common.opt (gcoff): Delete.
3591         (gxcoff+): Update Negative chain.
3592         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
3593         SDB_DEBUG.
3594         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
3595         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
3596         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
3597         and SDB references.
3598         (expand_function_start): Change sdb reference to past tense.
3599         (expand_function_end): Change sdb reference to past tense.
3600         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
3601         * opts.c (debug_type_names): Delete coff entry.
3602         (common_handle_option): Delete OPT_gcoff case.
3603         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
3605         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
3606         * config/cris/cris.h: Delete SDB reference in comment.
3607         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
3608         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
3609         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
3610         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
3611         to past tense.
3612         (ix86_expand_prologue): Likewise.
3613         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
3614         * config/ia64/ia64.h: Likewise.
3615         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
3616         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
3617         support.
3618         * config/mmix/mmix.h: Likewise.
3619         * config/nds32/nds32.c: Likewise.
3620         * config/stormy/storym16.h: Likewise.
3621         * config/visium/visium.h: Likewise.
3622         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
3624 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
3626         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
3627         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
3628         FRAME_POINTER_REGNUM point at high end of local var area.
3630 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
3632         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
3633         Move comment around.  Do not reset best_edge for a copiable
3634         destination if the copy would cause a partition change.
3635         (better_edge_p): Remove redundant check.
3637 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
3639         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
3641 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
3643         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
3644         for math functions that have _Float<N> and _Float<N>X variants.
3645         (mathfn_built_in_2): Add support for math functions that have
3646         _Float<N> and _Float<N>X variants.
3647         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
3648         (expand_builtin_mathfn_ternary): Add support for fma with
3649         _Float<N> and _Float<N>X variants.
3650         (expand_builtin): Likewise.
3651         (fold_builtin_3): Likewise.
3652         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
3653         create math function _Float<N> and _Float<N>X variants as external
3654         library builtins.
3655         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
3656         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
3657         the __builtin_ prefix and if not strict ansi, without the prefix.
3658         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
3659         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
3660         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
3661         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
3662         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
3663         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
3664         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
3665         function signatures for fma _Float<N> and _Float<N>X variants.
3666         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
3667         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
3668         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
3669         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
3670         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
3671         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
3672         * gencfn-macros.c (print_case_cfn): Add support for math functions
3673         that have _Float<N> and _Float<N>X variants.
3674         (print_define_operator_list): Likewise.
3675         (fltfn_suffixes): Likewise.
3676         (main): Likewise.
3677         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
3678         for math functions that have _Float<N> and _Float<N>X variants.
3679         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
3680         and _Float<N>X variants.
3681         (COPYSIGN): Likewise.
3682         (FMIN): Likewise.
3683         (FMAX): Likewise.
3684         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
3685         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
3686         variants.
3687         (integer_valued_read_call_p): Likewise.
3688         * fold-const-call.c (fold_const_call_ss): Likewise.
3689         (fold_const_call_sss): Add support for copysign, fmin, and fmax
3690         _Float<N> and _Float<N>X variants.
3691         (fold_const_call_ssss): Add support for fma _Float<N> and
3692         _Float<N>X variants.
3693         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
3694         support for copysign and fma _Float<N> and _Float<N>X variants.
3695         (backprop::process_builtin_call_use): Likewise.
3696         * tree-call-cdce.c (can_test_argument_range); Add support for
3697         sqrt _Float<N> and _Float<N>X variants.
3698         (edom_only_function): Likewise.
3699         (get_no_error_domain): Likewise.
3700         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
3701         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
3702         copysign _Float<N> and _Float<N>X variants.
3703         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
3704         handled by machine independent code.
3705         (FMAF128): Likewise.
3706         * doc/cpp.texi (Common Predefined Macros): Document defining
3707         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
3708         fma _Float<N> and _Float<N>X variants.
3710 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
3712         PR target/82692
3713         * config/i386/i386-modes.def (CCFPU): Remove definition.
3714         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
3715         (ix86_cc_modes_compatible): Ditto.
3716         (ix86_expand_carry_flag_compare): Ditto.
3717         (ix86_expand_int_movcc): Ditto.
3718         (ix86_expand_int_addcc): Ditto.
3719         (ix86_reverse_condition): Ditto.
3720         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
3721         Return true/false for unordered/ordered fp comparisons.
3722         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
3723         (ix86_prepare_fp_compare_args): Update for rename.
3724         (ix86_expand_fp_compare): Update for rename.  Generate unordered
3725         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
3726         (ix86_expand_sse_compare_and_jump): Ditto.
3727         * config/i386/predicates.md (fcmov_comparison_operator):
3728         Remove CCFPU mode handling.
3729         (ix86_comparison_operator): Ditto.
3730         (ix86_carry_flag_operator): Ditto.
3731         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
3732         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
3733         (*cmpu<mode>_cc_i387): Ditto.
3734         (FPCMP): Remove mode iterator.
3735         (unord): Remove mode attribute.
3736         (unord_subst): New define_subst transformation
3737         (unord): New define_subst attribute.
3738         (unordered): Ditto.
3739         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
3740         (*cmpi<unord>xf_i387): Ditto.
3741         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
3742         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
3743         using unord_subst transformation.
3744         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
3745         (round_saeonly): Also handle CCFP mode.
3746         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
3747         Remove UNSPEC_SAHF unspec handling.
3749 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
3751         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
3753 2017-10-27  Jeff Law  <law@redhat.com>
3755         * gimple-ssa-sprintf.c: Include domwalk.h.
3756         (class sprintf_dom_walker): New class, derived from dom_walker.
3757         (sprintf_dom_walker::before_dom_children): New function.
3758         (struct call_info): Moved into sprintf_dom_walker class
3759         (compute_formath_length, handle_gimple_call): Likewise.
3760         (sprintf_length::execute): Call the dominator walker rather
3761         than walking the statements.
3763         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
3764         gimple statement locations.
3765         (check_array_bounds): Corresponding changes.  Get the statement's
3766         location directly from wi->stmt.
3768 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
3770         PR target/82717
3771         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
3773 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
3775         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
3776         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
3778 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
3780         PR target/82703
3781         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
3782         * config/i386/i386.c (maybe_get_pool_constant): Removed.
3783         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
3784         maybe_get_pool_constant.
3785         * config/i386/predicates.md (zero_extended_scalar_load_operand):
3786         Likewise.
3788 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3790         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
3791         2.26 caveat.  Update gas and gld versions.
3792         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
3793         reference.
3795 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
3797         * cgraph.h (set_malloc_flag): Declare.
3798         * cgraph.c (set_malloc_flag_1): New function.
3799         (set_malloc_flag): Likewise.
3800         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
3801         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
3802         false.
3803         (read_ipa_call_summary): Add support for reading is_return_callee.
3804         (write_ipa_call_summary): Stream is_return_callee.
3805         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
3806         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
3807         ipa-prop.h, ipa-fnsummary.h.
3808         (pure_const_names): Change to static.
3809         (malloc_state_e): Define.
3810         (malloc_state_names): Define.
3811         (funct_state_d): Add field malloc_state.
3812         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
3813         (check_retval_uses): New function.
3814         (malloc_candidate_p): Likewise.
3815         (analyze_function): Add support for malloc attribute.
3816         (pure_const_write_summary): Stream malloc_state.
3817         (pure_const_read_summary): Add support for reading malloc_state.
3818         (dump_malloc_lattice): New function.
3819         (propagate_malloc): New function.
3820         (warn_function_malloc): New function.
3821         (ipa_pure_const::execute): Call propagate_malloc and
3822         ipa_free_fn_summary.
3823         (pass_local_pure_const::execute): Add support for malloc attribute.
3824         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
3825         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
3827 2017-10-27  Martin Liska  <mliska@suse.cz>
3829         PR gcov-profile/82457
3830         * doc/invoke.texi: Document that one needs a non-strict ISO mode
3831         for fork-like functions to be properly instrumented.
3833 2017-10-27  Richard Biener  <rguenther@suse.de>
3835         PR middle-end/81659
3836         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
3837         info when we redirected EH.
3839 2017-10-26  Michael Collison  <michael.collison@arm.com>
3841         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
3842         New pattern.
3843         (<optab>_trunchf<GPI:mode>2: New pattern.
3844         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
3845         * config/aarch64/iterators.md (wv): New mode attribute.
3846         (vf, VF): New mode attributes.
3847         (vgp, VGP): New mode attributes.
3848         (s): Update attribute with SImode and DImode prefixes.
3850 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
3852         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
3853         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
3854         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
3855         (nios2_option_overide): Initialize it.  Don't allow R0-relative
3856         addressing with PIC.
3857         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
3858         (nios2_symbolic_constant_p): Likewise.
3859         (nios2_legitimate_address_p): Likewise.
3860         (nios2_r0rel_section_name_p): New.
3861         (nios2_symbol_ref_in_r0rel_data_p): New.
3862         (nios2_emit_move_sequence): Handle r0rel_constant_p.
3863         (r0rel_constant_p): New.
3864         (nios2_print_operand_address): Handle r0rel_constant_p.
3865         (nios2_cdx_narrow_form_p): Likewise.
3866         * config/nios2/nios2.opt (mr0rel-sec=): New option.
3867         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
3868         (Nios II Options): Document -mr0rel-sec.
3870 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
3872         * config/nios2/nios2.c: Include xregex.h.
3873         (nios2_gprel_sec_regex): New.
3874         (nios2_option_overide): Initialize it.  Don't allow GP-relative
3875         addressing with PIC.
3876         (nios2_small_section_name_p): Check for regex match.
3877         * config/nios2/nios2.opt (mgprel-sec=): New option.
3878         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
3879         (Nios II Options): Document -mgprel-sec.
3881 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
3883         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
3885 2017-10-26  Tom de Vries  <tom@codesourcery.com>
3887         PR tree-optimization/82707
3888         * gimple.c (gimple_copy): Fix unsharing of
3889         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
3891 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
3893         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
3894         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
3895         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
3896         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
3897         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
3898         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
3899         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
3900         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
3901         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
3902         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
3903         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
3904         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
3905         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
3906         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
3907         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
3908         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
3909         _mm512_mask_cmpunord_ps_mask): New intrinsics.
3911 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
3913         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
3914         default to IBM.
3915         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
3916         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
3917         warning to rs6000.c.  Remove the Undocumented flag, since it has
3918         been documented.
3919         (-mabi=ibmlongdouble): Likewise.
3920         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
3921         already set, set the default format for long double.
3922         (rs6000_debug_reg_global): Print whether long double is IBM or
3923         IEEE.
3924         (rs6000_option_override_internal): Rework setting long double
3925         format.  Only warn if the user is changing the long double default
3926         and they did not use -Wno-psabi.
3927         * doc/invoke.texi (PowerPC options): Update the documentation for
3928         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
3930 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
3931             Alan Hayward  <alan.hayward@arm.com>
3932             David Sherwood  <david.sherwood@arm.com>
3934         * rtl.h (wider_subreg_mode): New function.
3935         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
3936         rather than an unsigned int *.
3937         * ira-color.c (regno_max_ref_width): Replace with...
3938         (regno_max_ref_mode): ...this new variable.
3939         (coalesced_pseudo_reg_slot_compare): Update accordingly.
3940         Use wider_subreg_mode.
3941         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
3942         rather than an unsigned int *.
3943         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
3944         (process_alt_operands): Likewise.
3945         (invariant_p): Likewise.
3946         * lra-spills.c (assign_mem_slot): Likewise.
3947         (add_pseudo_to_slot): Likewise.
3948         * lra.c (collect_non_operand_hard_regs): Likewise.
3949         (add_regs_to_insn_regno_info): Likewise.
3950         * reload1.c (regno_max_ref_width): Replace with...
3951         (regno_max_ref_mode): ...this new variable.
3952         (reload): Update accordingly.  Update call to
3953         ira_sort_regnos_for_alter_reg.
3954         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
3955         (init_eliminable_invariants): Update to use regno_max_ref_mode.
3956         (scan_paradoxical_subregs): Likewise.
3958 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
3960         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
3961         (aarch64_frame): Add emit_frame_chain boolean.
3962         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
3963         Move eh_return case to aarch64_layout_frame.
3964         (aarch64_layout_frame): Initialize emit_frame_chain.
3965         (aarch64_expand_prologue): Use emit_frame_chain.
3967 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
3969         * config/aarch64/aarch64.c (aarch64_layout_frame):
3970         Ensure LR is always stored at the bottom of the callee-saves.
3971         Remove rarely used frame layout which saves callee-saves at top of
3972         frame, so the store of LR can be used as a valid probe in all cases.
3974 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
3976         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
3977         Improve unaligned TImode/TFmode base/offset split.
3979 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
3980             Alan Hayward  <alan.hayward@arm.com>
3981             David Sherwood  <david.sherwood@arm.com>
3983         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
3984         * combine.c (find_single_use_1): Likewise.
3985         (expand_field_assignment): Likewise.
3986         (move_deaths): Likewise.
3987         * lra-constraints.c (simplify_operand_subreg): Likewise.
3988         (curr_insn_transform): Likewise.
3989         * lra.c (collect_non_operand_hard_regs): Likewise.
3990         (add_regs_to_insn_regno_info): Likewise.
3991         * rtlanal.c (reg_referenced_p): Likewise.
3992         (covers_regno_no_parallel_p): Likewise.
3994 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
3996         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
3997         Don't print any bits outside the precision of the value.
3998         * wide-int.cc (test_printing): Add some new tests.
4000 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4002         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
4003         supports -xbrace_comment option.
4004         * configure: Regenerate.
4005         * config.in: Regenerate.
4006         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
4007         (ASM_CPU_SPEC): Use it.
4009 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
4011         * target.def (static_rtx_alignment): New hook.
4012         * targhooks.h (default_static_rtx_alignment): Declare.
4013         * targhooks.c (default_static_rtx_alignment): New function.
4014         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
4015         * doc/tm.texi: Regenerate.
4016         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
4017         instead of targetm.constant_alignment.  Remove call to
4018         set_mem_attributes.
4019         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4020         (cris_preferred_mininum_alignment): New function, split out from...
4021         (cris_constant_alignment): ...here.
4022         (cris_static_rtx_alignment): New function.
4023         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
4024         split out from...
4025         (ix86_constant_alignment): ...here.
4026         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4027         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4028         (mmix_static_rtx_alignment): New function.
4029         * config/spu/spu.c (spu_static_rtx_alignment): New function.
4030         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
4032 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
4034         PR target/81800
4035         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
4036         Add flag_trapping_math and flag_fp_int_builtin_inexact.
4038 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
4040         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
4041         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
4042         mark as a sign-extending load.
4043         (local_pic_load_u): Define.
4045 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
4047         PR middle-end/82062
4048         * fold-const.c (operand_equal_for_comparison_p): Also return true
4049         if ARG0 is a simple variant of ARG1 with narrower precision.
4050         (fold_ternary_loc): Always pass unstripped operands to the predicate.
4052 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
4054         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
4055         cost correctly.
4056         * i386.h (processor_costs): Add gather_static, gather_per_elt,
4057         scatter_static, scatter_per_elt.
4058         * x86-tune-costs.h: Add new cost entries.
4060 2017-10-25  Richard Biener  <rguenther@suse.de>
4062         * tree-ssa-sccvn.h (vn_eliminate): Declare.
4063         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
4064         class pass_fre): Move to ...
4065         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
4066         class pass_fre): ... here and adjust for statistics.
4068 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
4070         PR libstdc++/81706
4071         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
4072         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
4073         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
4074         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
4075         declarations.
4077 2017-10-25  Richard Biener  <rguenther@suse.de>
4079         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
4080         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
4081         eliminate_push_avail, eliminate_insert): Move inside...
4082         (class eliminate_dom_walker): ... this class in preparation
4083         of move.
4084         (fini_eliminate): Remove by merging with ...
4085         (eliminate): ... this function.  Adjust for class changes.
4086         (pass_pre::execute): Remove fini_eliminate call.
4087         (pass_fre::execute): Likewise.
4089 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
4091         PR target/82460
4092         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
4093         (VPERMI2, VPERMI2I): New mode iterators.
4094         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
4095         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
4096         patterns.
4097         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
4098         mode iterator.  Remove 3 old define_insn patterns.
4099         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
4100         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
4101         VPERMI2 mode iterator, remove the other two expanders.
4102         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
4103         to use VPERMI2 mode iterator, add another alternative for vpermi2*
4104         instructions, remove the other two patterns.
4105         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
4106         mode iterator, remove the other two patterns.
4107         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
4108         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
4109         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
4110         and adjust argument order accordingly.
4111         (ix86_expand_vec_perm): Adjust caller.
4112         (expand_vec_perm_1): Likewise.
4113         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
4114         (expand_vec_perm_vpermt2_vpshub2): ... this.
4115         (ix86_expand_vec_perm_const_1): Adjust caller.
4116         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
4118         PR target/82370
4119         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
4120         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
4121         (vec_shl_<mode>): Remove unused expander.
4122         (avx512bw_<shift_insn><mode>3): New define_insn.
4123         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
4124         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
4126 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
4128         PR c++/82466
4129         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
4130         description.
4132 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
4134         PR rtl-optimization/82396
4135         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
4136         (autopref_multipass_init): Simplify initialization.
4137         (autopref_rank_data): Simplify sort order.
4138         * gcc/sched-int.h (autopref_multipass_data_): Remove
4139         multi_mem_insn_p, min_offset and max_offset.
4141 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
4143         PR middle-end/60580
4144         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
4145         Check special value of flag_omit_frame_pointer.
4146         (aarch64_can_eliminate): Likewise.
4147         (aarch64_override_options_after_change_1): Simplify handling of
4148         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
4150 2017-10-24  Richard Biener  <rguenther@suse.de>
4152         PR tree-optimization/82697
4153         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
4154         zero for conditional load and unconditional store.
4156 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
4158         * doc/install.texi: Document bootstrap-cet.
4160 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
4162         PR target/82659
4163         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
4164         ENDBR instruction at function entrance if function is only
4165         called directly.
4167 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
4169         PR target/82628
4170         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
4171         patterns to better describe from which operation the CF is computed.
4172         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
4173         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
4174         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
4175         is 0, use _0 suffixed expanders instead of emitting a comparison
4176         before it.
4178 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4180         * config/i386/i386.md(*movsf_internal, *movdf_internal):
4181         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
4183 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
4185         PR middle-end/82569
4186         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
4187         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
4188         * loop-iv.c (iv_get_reaching_def): Likewise.
4189         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
4190         variable is promoted and the partition contains undefined values.
4192 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4194         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
4195         reflect reality.
4196         (nios2_address_cost): Define.
4197         (nios2_legitimize_address): Recognize (exp + constant) directly.
4198         (TARGET_ADDRESS_COST): Define.
4200 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4202         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
4203         (nios2_symbolic_memory_operand_p): Declare.
4204         (nios2_split_large_constant): Declare.
4205         (nios2_split_symbolic_memory_operand): Declare.
4206         * config/nios2/nios2.c: Adjust includes.
4207         (nios2_symbolic_constant_allowed): New.
4208         (nios2_symbolic_constant_p): New.
4209         (nios2_plus_symbolic_constant_p): New.
4210         (nios2_valid_addr_expr_p): Recognize addresses involving
4211         symbolic constants.
4212         (nios2_legitimate_address_p): Likewise, also LO_SUM.
4213         (nios2_symbolic_memory_operand_p): New.
4214         (nios2_large_constant_p): New.
4215         (nios2_split_large_constant): New.
4216         (nios2_split_plus_large_constant): New.
4217         (nios2_split_symbolic_memory_operand): New.
4218         (nios2_legitimize_address): Code refactoring.  Handle addresses
4219         involving symbolic constants.
4220         (nios2_emit_move_sequence): Likewise.
4221         (nios2_print_operand): Improve error output.
4222         (nios2_print_operand_address): Handle LO_SUM.
4223         (nios2_cdx_narrow_form_p): Likewise.
4224         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
4225         operands involving symbolic constants.
4226         (movhi_internal, movsi_internal): Likewise.
4227         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
4228         (extendhisi2, extendqi<mode>2): Likewise.
4230 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4232         * tree-pass.h (PROP_rtl_split_insns): Define.
4233         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
4235 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
4237         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
4239 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
4241         PR debug/82630
4242         * target.def (const_not_ok_for_debug_p): Default to
4243         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
4244         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
4245         * targhooks.c (default_const_not_ok_for_debug_p): New function.
4246         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
4247         which targetm.const_not_ok_for_debug_p returned true.
4248         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
4249         for UNSPECs.
4250         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
4251         Likewise.
4252         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
4253         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
4254         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
4255         if !base_term_p.
4256         (ix86_const_not_ok_for_debug_p): New function.
4257         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
4258         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
4260 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
4262         PR bootstrap/82610
4263         * system.h: Conditionally include "unique-ptr.h" if
4264         INCLUDE_UNIQUE_PTR is defined.
4265         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
4266         of defining INCLUDE_UNIQUE_PTR before including "system.h".
4268 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>