1 2018-11-14 Richard Biener <rguenther@suse.de>
3 PR tree-optimization/88019
4 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
5 COND_EXPR arguments to non-trapping overflow.
7 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
9 * config/arc/arc.h (reg_class): Reorder registers classes, remove
10 unused register classes.
11 (REG_CLASS_NAMES): Likewise.
12 (REG_CLASS_CONTENTS): Likewise.
13 (FIXED_REGISTERS): Make lp_count fixed.
14 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
15 (PROGRAM_COUNTER_REGNO): Remove.
16 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
17 register classes, use constants for register numbers, remove
18 reg_class_contents references.
19 (arc_process_double_reg_moves): Add asserts.
20 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
21 lra_in_progress predicate.
22 (arc_init_reg_tables): Remove unused register classes.
23 (arc_register_move_cost): Likewise.
24 (arc_preferred_reload_class): Likewise.
25 (hwloop_optimize): Update rtx patterns involving lp_count
27 (arc_return_address_register): Rename ILINK1, INLINK2 regnums
29 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
30 CHEAP_CORE_REGS. Former one will be used for LRA.
31 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
32 one will be used for LRA.
33 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
34 one will be used for LRA.
35 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
36 Former one will be used for LRA.
37 ("f"): Delete constraint.
40 ("l"): Change it from register constraint to constraint.
41 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
42 (movhi_insn): Likewise.
43 (movsi_insn): Update pattern.
46 (stack_tie): Remove 'b' constraint letter.
48 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
49 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
50 (R57_REG, R59_REG, PCL_REG): Likewise.
51 (ILINK1_REGNUM): Renamed to ILINK1_REG.
52 (ILINK2_REGNUM): Renamed to ILINK2_REG.
55 (Rcw): Remove unused reg classes.
56 * config/arc/predicates.md (dest_reg_operand): Just default on
57 register_operand predicate.
58 (mpy_dest_reg_operand): Likewise.
59 (move_dest_operand): Use macros instead of constants.
60 * config/arc/arc.opt (mlra): Switch to lra as default.
62 2018-11-14 Richard Biener <rguenther@suse.de>
64 PR tree-optimization/87974
65 * tree-vect-loop.c (vectorizable_reduction): When computing
66 the vectorized reduction PHI vector type ignore constant
69 2018-11-14 Jakub Jelinek <jakub@redhat.com>
71 PR tree-optimization/87977
72 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
73 stmt, build a new one and replace the old one with it. Formatting fix.
74 Call release_ssa_name (x) if !has_other_use and !delete_div.
75 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
76 verify lhs of stmt is still def.
78 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
80 PR rtl-optimization/87507
81 * lower-subreg.c (operand_for_swap_move_operator): New function.
82 (simple_move): Strip simple operators.
83 (find_pseudo_copy): Likewise.
84 (resolve_operand_for_swap_move_operator): New function.
85 (resolve_simple_move): Strip simple operators and swap operands.
87 2018-11-13 Jakub Jelinek <jakub@redhat.com>
89 PR tree-optimization/87898
90 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
91 (ipa_simd_modify_function_body): Remove debug stmts where the first
92 argument was changed into a non-decl.
94 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
96 PR rtl-optimization/87899
97 * lra-lives.c (start_living): Update white space in comment.
98 (enum point_type): New.
99 (sparseset_contains_pseudos_p): New function.
100 (update_pseudo_point): Likewise.
101 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
102 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
103 handling. Move early exit after adding conflicts.
104 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
105 if regno is already live. Remove all handling of program points.
106 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
107 after adding conflicts. Remove all handling of program points and
108 ignore_reg_for_conflicts.
109 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
110 and do not guard call to mark_pseudo_live.
111 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
112 and do not guard call to mark_pseudo_dead.
113 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
114 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
115 Use new function update_pseudo_point. Handle register copies by
116 removing the source register from the live set. Handle INOUT operands.
117 Update to the next program point using the unused_set, dead_set and
119 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
121 2018-11-13 David Malcolm <dmalcolm@redhat.com>
123 * builtins.c: Replace "source_location" with "location_t".
124 * diagnostic-show-locus.c: Likewise.
125 * diagnostic.c: Likewise.
126 * dumpfile.c: Likewise.
127 * gcc-rich-location.h: Likewise.
128 * genmatch.c: Likewise.
129 * gimple.h: Likewise.
130 * gimplify.c: Likewise.
132 * input.h: Likewise. Eliminate the typedef.
133 * omp-expand.c: Likewise.
134 * selftest.h: Likewise.
135 * substring-locations.h (get_source_location_for_substring):
137 (get_location_within_string): ...this.
138 * tree-cfg.c: Replace "source_location" with "location_t".
139 * tree-cfgcleanup.c: Likewise.
140 * tree-diagnostic.c: Likewise.
141 * tree-into-ssa.c: Likewise.
142 * tree-outof-ssa.c: Likewise.
143 * tree-parloops.c: Likewise.
144 * tree-phinodes.c: Likewise.
145 * tree-phinodes.h: Likewise.
146 * tree-ssa-loop-ivopts.c: Likewise.
147 * tree-ssa-loop-manip.c: Likewise.
148 * tree-ssa-phiopt.c: Likewise.
149 * tree-ssa-phiprop.c: Likewise.
150 * tree-ssa-threadupdate.c: Likewise.
151 * tree-ssa.c: Likewise.
152 * tree-ssa.h: Likewise.
153 * tree-vect-loop-manip.c: Likewise.
155 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
157 * doc/extend.texi: Fix typo in the weakref description.
159 2018-11-13 Richard Biener <rguenther@suse.de>
161 PR tree-optimization/86991
162 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
163 group building until we have successfully detected the SLP
165 (vect_is_simple_reduction): Remove fixup code here.
167 2018-11-13 David Malcolm <dmalcolm@redhat.com>
169 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
170 (dump_gimple_stmt): Use it.
171 (dump_gimple_stmt_loc): Likewise.
172 (dump_gimple_expr): Likewise.
173 (dump_gimple_expr_loc): Likewise.
174 (dump_generic_expr): Likewise.
175 (dump_generic_expr_loc): Likewise.
176 (dump_printf): Likewise.
177 (dump_printf_loc): Likewise.
178 (dump_dec): Likewise.
179 (dump_dec): Likewise.
180 (dump_hex): Likewise.
181 (dump_symtab_node): Likewise.
182 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
183 Guard dump call with dump_enabled_p.
184 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
185 * graphite-optimize-isl.c (optimize_isl): Likewise.
186 * graphite.c (graphite_transform_loops): Likewise.
187 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
188 * tree-parloops.c (parallelize_loops): Likewise.
189 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
190 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
191 (vect_prune_runtime_alias_test_list): Likewise.
192 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
193 (vect_estimate_min_profitable_iters): Likewise.
194 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
195 (vect_build_slp_tree_2): Likewise.
196 (vect_supported_load_permutation_p): Likewise.
197 (vect_slp_analyze_operations): Likewise.
198 (vect_slp_analyze_bb_1): Likewise.
199 (vect_slp_bb): Likewise.
200 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
201 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
202 (pass_slp_vectorize::execute): Likewise.
203 (increase_alignment): Likewise.
205 2018-11-13 David Malcolm <dmalcolm@redhat.com>
208 * ipa-inline.c (report_inline_failed_reason): Guard calls to
209 cl_target_option_print_diff and cl_optimization_print_diff with
212 2018-11-13 David Malcolm <dmalcolm@redhat.com>
214 * doc/invoke.texi (-fsave-optimization-record): Note that the
215 output is compressed.
216 * optinfo-emit-json.cc: Include <zlib.h>.
217 (optrecord_json_writer::write): Compress the output.
219 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
221 * tree-vrp.c (value_range_base::dump): Dump type.
222 Do not use INF nomenclature for 1-bit types.
223 (dump_value_range): Group all variants to common dumping code.
224 (debug): New overloaded functions for value_ranges.
225 (value_range_base::dump): Remove no argument version.
226 (value_range::dump): Same.
228 2018-11-13 Richard Biener <rguenther@suse.de>
230 PR tree-optimization/87931
231 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
232 nested cycles we support to latch computations vectorizable_reduction
235 2018-11-13 Martin Liska <mliska@suse.cz>
237 PR tree-optimization/87885
238 * cfghooks.c (account_profile_record): Rename
240 (profile_record_check_consistency): ... this.
241 Calculate missing num_mismatched_freq_in.
242 (profile_record_account_profile): New function
243 that calculates time and size of a function.
244 * cfghooks.h (struct profile_record): Remove
246 (struct cfg_hooks): Remove after_pass flag.
247 (account_profile_record): Rename to ...
248 (profile_record_check_consistency): ... this.
249 (profile_record_account_profile): New.
250 * cfgrtl.c (rtl_account_profile_record): Remove
252 * passes.c (check_profile_consistency): Do only
254 (account_profile): Calculate size and time of
256 (pass_manager::dump_profile_report): Reformat
258 (execute_one_ipa_transform_pass): Call
259 consistency check before clean upand call account_profile
260 after a clean up is done.
261 (execute_one_pass): Call check_profile_consistency and
262 account_profile instead of using after_pass flag..
263 * tree-cfg.c (gimple_account_profile_record): Likewise.
265 2018-11-13 Martin Liska <mliska@suse.cz>
268 * config/i386/i386.c (ix86_option_override_internal): Error
269 about usage -mabi=ms and -fsanitize={,kernel-}address.
271 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
273 * config/aarch64/aarch64.c
274 (aarch64_vectorize_preferred_vector_alignment): Change return type to
276 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
277 alignment being a poly int.
278 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
279 return type to poly_uint64.
280 * target.def (default_preferred_vector_alignment): Likewise.
281 * targhooks.c (default_preferred_vector_alignment): Likewise.
282 * targhooks.h (default_preferred_vector_alignment): Likewise.
283 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
284 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
286 (vect_update_misalignment_for_peel): Likewise.
287 (vect_enhance_data_refs_alignment): Likewise.
288 (vect_find_same_alignment_drs): Likewise.
289 (vect_duplicate_ssa_name_ptr_info): Likewise.
290 (vect_setup_realignment): Likewise.
291 (vect_can_force_dr_alignment_p): Change alignment parameter type to
293 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
294 mask with a compile time variable vector alignment.
295 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
297 (vect_do_peeling): Exit early if vector alignment is not constant.
298 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
300 (vectorizable_store): Likewise.
301 (vectorizable_load): Likweise.
302 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
304 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
306 (vect_can_force_dr_alignment_p): Change alignment parameter type to
309 2018-11-13 Richard Biener <rguenther@suse.de>
311 PR tree-optimization/87962
312 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
313 detect outer reduction for disqualifying in-loop uses.
315 2018-11-13 Richard Biener <rguenther@suse.de>
317 PR tree-optimization/87967
318 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
319 for constants for the scalar loop.
321 2018-11-13 Alan Modra <amodra@gmail.com>
323 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
324 integer constants when -mcmodel=medium.
326 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
328 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
329 * config/arc/elf.h (PROFILE_HOOK): Define.
330 * config/arc/linux.h (PROFILE_HOOK): Likewise.
332 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
334 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
335 jump table data in the text section.
337 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
339 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
340 to fit the eh_return pattern.
341 * config/arc/arc.md (eh_return): Define.
342 (VUNSPEC_ARC_EH_RETURN): Likewise.
343 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
345 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
348 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
350 * common/config/arc/arc-common.c (arc_option_optimization_table):
351 Millicode optimization is default on for size optimizations.
352 * config/arc/arc-protos.h (arc_check_multi): New function.
353 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
354 (ENTER_LEAVE_START_REG): Define.
355 (ENTER_LEAVE_END_REG): Likewise.
356 (arc_override_options): Disable millicode when long calls option
358 (arc_frame_info): Change it from int to bool.
359 (arc_compute_frame_size): Clean up.
360 (arc_save_restore): Remove.
361 (frame_save_reg): New function.
362 (frame_restore_reg): Likewise.
363 (arc_enter_leave_p): Likewise.
364 (arc_save_callee_saves): Likewise.
365 (arc_restore_callee_saves): Likewise.
366 (arc_save_callee_enter): Likewise.
367 (arc_restore_callee_leave): Likewise.
368 (arc_save_callee_milli): Likewise.
369 (arc_restore_callee_milli): Likewise.
370 (arc_expand_prologue): Reimplement to emit enter/leave
372 (arc_expand_epilogue): Likewise.
373 (arc_check_multi): New function.
374 * config/arc/arc.md (push_multi_fp): New pattern.
375 (push_multi_fp_blink): Likewise.
376 (pop_multi_fp): Likewise.
377 (pop_multi_fp_blink): Likewise.
378 (pop_multi_fp_ret): Likewise.
379 (pop_multi_fp_blink_ret): Likewise.
380 * config/arc/arc.opt (mmillicode): Update option.
381 (mcode-density-frame): New option.
382 * config/arc/predicates.md (push_multi_operand): New predicate.
383 (pop_multi_operand): Likewise.
384 * doc/invoke.texi (ARC): Update ARC options information.
387 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
389 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
390 * config/arc/arc.c (operands_ok_ldd_std): New function.
391 (mem_ok_for_ldd_std): Likewise.
392 (gen_operands_ldd_std): Likewise.
393 * config/arc/arc.md: Add peephole2 rules for std/ldd.
395 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
397 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
398 test on stack_usage_file.
399 (lang_dependent_init): Do not open the .su file if generating LTO.
401 2018-11-13 Jakub Jelinek <jakub@redhat.com>
403 PR rtl-optimization/87918
404 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
405 simplify_gen_relational rather than simplify_gen_binary.
407 2018-11-13 Richard Biener <rguenther@suse.de>
409 * tree-ssanames.h (set_range_info): Use value_range_base.
410 (get_range_info): Likewise.
411 * tree-ssanames.c (set_range_info): Likewise.
412 (get_range_info): Likewise.
413 * tree-vrp.c (value_range_base::union_helper): Split
414 out common parts of value_range[_base]::union_.
415 (value_range_base::union_): Update.
416 (value_range::union_): Likewise.
417 (determine_value_range_1): Use value_range_base.
418 (determine_value_range): Likewise.
419 * tree-vrp.h (value_range_base::union_helper): Move ...
420 (value_range::union_helper): ... from here.
422 2018-11-13 Alan Modra <amodra@gmail.com>
424 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
426 (rs6000_secondary_reload_gpr): Don't call find_replacement.
428 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
431 * doc/invoke.texi (Optimize Options): Clarify that the
432 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
433 apply to data cache size.
435 2018-11-13 Alan Modra <amodra@gmail.com>
437 * config/rs6000/predicates.md (logical_const_operand),
438 (logical_operand): Correct comment.
439 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
441 2018-11-13 Alan Modra <amodra@gmail.com>
443 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
445 2018-11-13 Alan Modra <amodra@gmail.com>
447 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
449 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
450 covered by alternative.
451 (movcc_internal1): Ignore h for register preference.
452 (mov<mode>_hardfloat64): Likewise.
453 (mov<mode>_softfloat): Ignore c, l, h for register preference.
455 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
457 PR preprocessor/47823
458 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
461 * doc/extend.texi (Pragmas): Note additional pragmas documented
464 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
468 * tree-scalar-evolution.c (expression_expensive_p): Make BUILTIN POPCOUNT
469 as expensive when backend does not define it.
471 2018-11-12 Fredrik Noring <noring@nocrew.org>
473 * config.gcc: Update with-llsc defaults for MIPS r5900.
475 2018-11-12 Martin Liska <mliska@suse.cz>
477 PR gcov-profile/87442
478 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
480 * doc/invoke.texi: Document them.
481 * tree-profile.c (parse_profile_filter): New.
482 (parse_profile_file_filtering): Likewise.
483 (release_profile_file_filtering): Likewise.
484 (include_source_file_for_profile): Likewise.
485 (tree_profiling): Filter source files based on the
488 2018-11-12 Martin Liska <mliska@suse.cz>
491 * doc/extend.texi: Add missing values for __builtin_cpu_is and
492 __builtin_cpu_supports for x86 target.
494 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
497 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
499 (Arithmetic): Likewise for "lo_sum".
501 2018-11-12 Renlin Li <renlin.li@arm.com>
504 * dse.c (get_stored_val): Add check for compile-time constantness
507 2018-11-12 Sudakshina Das <sudi.das@arm.com>
509 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
510 (ARMv8_5a): New fgroup.
511 (armv8.5-a): New arch.
512 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
514 * config/arm/arm-tables.opt: Regenerate.
515 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
516 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
517 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
518 Add matching rules for -march=armv8.5-a and extensions.
519 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
520 Add sb and predres to all armv8-a except armv8.5-a.
522 2018-11-12 Richard Biener <rguenther@suse.de>
524 * tree-vrp.h (value_range[_base]::set): Make public. Provide
525 overload for single value.
526 (value_range[_base]::set_nonnull): New.
527 (value_range[_base]::set_null): Likewise.
528 (value_range): Document bitmap copying behavior, mark
529 copy constructor and assignment operator deleted.
530 (value_range::move): New.
531 (value_range::set_and_canonicalize): Default bitmap to zero.
532 (set_value_range_to_nonnull): Remove.
533 (set_value_range_to_null): Likewise.
534 (set_value_range): Likewise.
535 (set_value_range_to_value): Likewise.
536 (extract_range_from_unary_expr): Work on value_range_base.
537 (extract_range_from_binary_expr_1): Likewise. Rename to...
538 (extract_range_from_binary_expr): ... this.
539 * tree-vrp.c (value_range::update): Clear equiv bitmap
541 (value_range::move): New, move equiv bitmap.
542 (value_range_base::set_undefined): Avoid assignment.
543 (value_range::set_undefined): Likewise.
544 (value_range_base::set_varying): Likewise.
545 (value_range::set_varying): Likewise.
546 (set_value_range): Remove.
547 (value_range_base::set): New overload for value.
548 (value_range::set): Likewise.
549 (set_value_range_to_nonnull): Remove.
550 (value_range_base::set_nonnull): New.
551 (value_range::set_nonnull): Likewise.
552 (set_value_range_to_null): Remove.
553 (value_range_base::set_null): New.
554 (value_range::set_null): Likewise.
555 (range_is_null): Work on value_range_base.
556 (range_is_nonnull): Likewise.
557 (ranges_from_anti_range): Likewise.
558 (extract_range_into_wide_ints): Likewise.
559 (extract_range_from_multiplicative_op): Likewise.
560 (extract_range_from_binary_expr): Likewise. Update for API changes.
561 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
563 (value_range::intersect_helper): Avoid copy and assignment.
564 (value_range::union_helper): Likewise.
565 (determine_value_range_1): Adjust.
566 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
567 Avoid assignment by using move.
568 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
569 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
571 * tree-ssanames.c (get_range_info): Likewise.
572 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
573 * vr-values.c (vr_values::get_value_range): Adjust.
574 (vr_values::update_value_range): Likewise.
575 (symbolic_range_based_on_p): Work on value_range_base.
576 (vr_values::extract_range_from_binary_expr): Use value_range_base.
577 (vr_values::extract_range_from_unary_expr): Likewise.
578 (vr_values::extract_range_from_cond_expr): Avoid assignment.
579 (vr_values::extract_range_from_comparison): Adjust.
580 (vr_values::check_for_binary_op_overflow): Use value_range_base.
581 (vr_values::extract_range_basic): Adjust.
582 (vr_values::adjust_range_with_scev): Likewise.
583 (vr_values::vrp_visit_assignment_or_call): Likewise.
584 (vr_values::get_vr_for_comparison): Change API to avoid
585 assignment and copy construction.
586 (vr_values::compare_name_with_value): Adjust accordingly.
587 (vr_values::compare_names): Likewise.
588 (vr_values::extract_range_from_phi_node): Avoid assignment and
589 bogus in-place modify of equiv bitmap.
590 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
591 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
592 for extract_range_from_unary_expr API change.
593 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
595 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
597 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
599 2018-11-12 Richard Biener <rguenther@suse.de>
601 * tree-vrp.h (value_range_base::symbolic_p,
602 value_range_base::constant_p, value_range_base::zero_p,
603 value_range_base::singleton_p): Move from value_range.
604 (value_range::dump): Add.
605 * gimple-ssa-evrp-analyze.c
606 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
607 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
608 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
610 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
611 (value_range::constant_p): Likewise.
612 (value_range::singleton_p): Likewise.
613 (value_range_base::dump): Add.
614 (set_value_range_to_undefined): Remove.
615 (set_value_range_to_varying): Likewise.
616 (range_int_cst_p): Take value_range_base argument.
617 (range_int_cst_singleton_p): Likewise.
618 (value_range_constant_singleton): Likewise.
619 (vrp_set_zero_nonzero_bits): Likewise.
620 (extract_range_from_multiplicative_op): Use set_varying.
621 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
622 (extract_range_from_unary_expr): Likewise.
623 (dump_value_range_base): Change to overload of dump_value_range.
624 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
625 (vrp_prop::visit_stmt): Likewise.
626 (value_range::intersect_helper): Likewise.
627 (value_range::union_helper): Likewise.
628 (determine_value_range_1): Likewise.
630 2018-11-12 Richard Biener <rguenther@suse.de>
632 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
633 (set_value_range_to_null): Likewise.
634 * vr-values.c (vr_values::extract_range_from_comparison):
635 Clear equiv for constant singleton ranges.
637 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
639 * config/i386/sse.md: Combine VFIXUPIMM* patterns
640 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
641 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
642 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
643 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
644 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
645 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
647 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
650 * doc/extend.texi (Common Type Attributes): For the align type
651 attribute, copy language about decreasing alignment from the
652 corresponding variable attribute.
654 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
656 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
659 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
662 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
663 -frtti and -fno-rtti code.
665 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
668 * doc/extend.texi (Other Builtins): Document probability associated
669 with __builtin_expect.
671 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
674 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
675 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
676 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
677 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
679 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
681 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
683 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
685 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
687 2018-11-11 Richard Biener <rguenther@suse.de>
689 * tree-vrp.h (class value_range_base): New base class for
690 value_range containing all but the m_equiv member.
691 (dump_value_range_base): Add.
692 (range_includes_zero_p): Work on value_range_base.
693 * tree-vrp.c (value_range_base::set): Split out base handling
695 (value_range::set): this.
696 (value_range::set_equiv): New.
697 (value_range_base::value_range_base): New constructors.
698 (value_range_base::check): Split out base handling from...
699 (value_range::check): this.
700 (value_range::equal_p): Refactor in terms of
701 ignore_equivs_equal_p which is now member of the base.
702 (value_range_base::set_undefined): New.
703 (value_range_base::set_varying): Likewise.
704 (value_range_base::dump):Split out base handling from...
705 (value_range::dump): this.
706 (value_range_base::set_and_canonicalize): Split out base handling
708 (value_range::set_and_canonicalize): this.
709 (value_range_base::union_): New.
710 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
712 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
713 instead of value_range everywhere.
714 (ipcp_vr_lattice::print): Use dump_value_range_base.
715 (ipcp_vr_lattice::meet_with): Adjust.
716 (ipcp_vr_lattice::meet_with_1): Likewise.
717 (ipa_vr_operation_and_type_effects): Likewise.
718 (propagate_vr_across_jump_function): Likewise.
719 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
720 (ipa_get_value_range): Likewise.
721 (ipa_set_jfunc_vr): Likewise.
722 (ipa_compute_jump_functions_for_edge): Likewise.
724 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
727 * doc/invoke.texi (Optimize Options): Add @opindex entries
728 for the positive forms of -fno-xxx and -mno-xxx options
729 that were lacking them.
731 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
733 * combine.c (make_more_copies): Only make an intermediate copy if the
734 dest of a move is a pseudo.
736 2018-11-09 Maya Rashish <coypu@sdf.org>
739 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
740 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
742 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
746 * doc/invoke.texi (Optimize Options): Clarify default behavior
747 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
749 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
751 PR tree-optimization/87940
752 * expr.c (string_constant): Don't strip NOPS in subexpressions.
753 Fold PLUS_EXPR correctly.
755 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
758 * config/s390/s390.c (s390_safe_relative_long_p): New function.
759 (annotate_constant_pool_refs): Skip insns which support
761 (annotate_constant_pool_refs_1): New helper function.
762 (find_constant_pool_ref): Skip insns which support relative
764 (find_constant_pool_ref_1): New helper function.
765 (replace_constant_pool_ref): Skip insns which support
767 (replace_constant_pool_ref_1): New helper function.
768 (s390_mainpool_start): Adapt to the new signature.
769 (s390_mainpool_finish): Likewise.
770 (s390_chunkify_start): Likewise.
771 (s390_chunkify_finish): Likewise.
772 (pass_s390_early_mach::execute): Likewise.
773 (s390_prologue_plus_offset): Likewise.
774 (s390_emit_prologue): Likewise.
775 (s390_emit_epilogue): Likewise.
777 2018-11-09 Jakub Jelinek <jakub@redhat.com>
779 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
780 but unsupported lastprivate with conditional modifier.
782 2018-11-09 Jeff Law <law@redhat.com>
784 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
785 unused argument better. Add gcc_unreachable to silence warning.
787 2018-11-09 Martin Sebor <msebor@redhat.com>
790 * attribs.c (has_attribute): New helper function.
791 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
792 * attribs.h (decls_mismatched_attributes): Declare.
793 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
794 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
795 * common.opt (-Wattribute-alias): Take an argument.
796 (-Wno-attribute-alias): New option.
797 * doc/extend.texi (Common Function Attributes): Document copy.
798 (Common Variable Attributes): Same.
799 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
800 (-Wattribute-alias): Document new option argument.
802 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
804 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
805 matching criteria. Remove unused array initializer.
807 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
808 Jinsong Ji <jji@us.ibm.com>
810 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
811 constraints by introducing a new temporary.
812 (_mm_cvtss_si64): Likewise.
814 2018-11-09 Martin Liska <mliska@suse.cz>
816 * common.opt: Add -fipa-stack-alignment flag.
817 * doc/invoke.texi: Document it.
818 * final.c (rest_of_clean_state): Guard stack
821 2018-11-09 Martin Liska <mliska@suse.cz>
823 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
825 (ipa_discover_variable_flags): ... this.
826 * common.opt: Come up with new flag -fipa-reference-addressable.
827 * doc/invoke.texi: Document it.
828 * ipa-reference.c (propagate): Call the renamed fn.
829 * ipa-visibility.c (whole_program_function_and_variable_visibility):
831 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
833 (ipa_discover_variable_flags): ... this. Discover
834 non-addressable variables only with the newly added flag.
835 * opts.c: Enable the newly added flag with -O1 and higher
838 2018-11-09 David Malcolm <dmalcolm@redhat.com>
840 * json.cc (selftest::test_writing_literals): Fix comment.
842 2018-11-09 Martin Liska <mliska@suse.cz>
844 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
845 string to a stack buffer.
846 (aarch64_parse_cpu): Likewise.
847 (aarch64_parse_tune): Likewise.
849 2018-11-09 Richard Biener <rguenther@suse.de>
851 PR tree-optimization/87953
852 * tree-vect-loop.c (vectorizable_reduction): For analysis
853 always pass ops[0] to vectorizable_condition.
855 2018-11-09 Stafford Horne <shorne@gmail.com>
856 Richard Henderson <rth@twiddle.net>
857 Joel Sherrill <joel@rtems.org>
859 * common/config/or1k/or1k-common.c: New file.
860 * config/or1k/*: New.
861 * config.gcc (or1k*-*-*): New.
862 * configure.ac (or1k*-*-*): New test for openrisc tls.
863 * configure: Regenerated.
864 * doc/install.texi: Document OpenRISC triplets.
865 * doc/invoke.texi: Document OpenRISC arguments.
866 * doc/md.texi: Document OpenRISC.
868 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
870 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
871 (arm7tdmi-s): Delete CPU.
872 (arm710t): Add aliases for arm720t and arm740t.
873 (arm720t, arm740t): Delete CPUs.
874 (arm920t): Add aliases for arm920, arm922t and arm940t.
875 (arm920, arm922t, arm940t): Delete CPUs.
876 (arm10tdmi): Add alias for arm1020t.
877 (arm1020t): Delete CPU.
878 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
879 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
880 (arm10e): Add aliases for arm1020e and arm1022e.
881 (arm1020e, arm1022e): Delete CPU.
882 * config/arm/arm.md (generic_sched): Remove entries that are now
884 (generic_vfp): Likewise.
885 * config/arm/arm1020e.md: Simplify tuning selection based on alias
887 * config/arm/arm-tune.md: Regenerated.
888 * config/arm/arm-tables.opt: Regenerated.
890 2018-11-09 Richard Biener <rguenther@suse.de>
892 PR tree-optimization/87621
893 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
894 op with only phi inputs.
895 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
896 (ch_base::copy_headers): Run CSE on copied loop headers.
897 (pass_ch_vect::process_loop_p): Simplify.
899 2018-11-09 Alexandre Oliva <oliva@adacore.com>
901 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
902 for non-w64 x86_64 biarch.
904 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
906 PR rtl-optimization/86438
907 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
908 of in_b for the compare if in_b is SET_DEST.
911 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
914 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
916 * tree-vrp.c (value_range::check): Do not access internals
918 (value_range::singleton_p): Same.
919 (value_range::type): Same.
920 (vrp_finalize): Use value_range API.
922 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
924 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
926 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
928 * vr-values.c (vr_values::get_value_range): Use value_range API
929 instead of piecing together ranges.
930 (vr_values::update_value_range): Same.
932 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
934 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
935 of performing ad-hoc calculations.
936 * tree-ssanames.c (set_range_info): New overloaded function
937 accepting value_range &.
938 (get_range_info): Same.
939 * tree-ssanames.h (set_range_info_raw): Remove.
940 (set_range_info): New prototype.
941 (get_range_info): Same.
942 * tree-vrp.h (value_range::null_p): Rename to zero_p.
943 * tree-vrp.c (value_range::null_p): Same.
945 2018-11-09 Jan Hubicka <jh@suse.cz>
947 * tree.c (fld_type_variant_equal_p): Test user align flag.
948 (flt_type_variant): Copy user align flag.
949 (fld_incomplete_type_of): Clear it.
951 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
953 * config/arm/neon.md (div<mode>3): New pattern.
955 2018-11-08 Andi Kleen <ak@linux.intel.com>
957 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
958 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
959 (ix86_handle_option): Handle OPT_mptwrite.
960 * config/i386/cpuid.h (bit_PTWRITE): Add.
961 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
962 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
963 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
964 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
965 (ix86_option_override_internal): Handle PTA_PTWRITE.
966 (ix86_valid_target_attribute_inner_p): Define ptwrite.
967 (def_builtin2): Force UINT64 to be 64bit only.
968 * config/i386/i386.h (TARGET_PTWRITE): Add.
969 (TARGET_PTWRITE_P): Add.
971 * config/i386/i386.md: Define ptwrite.
972 * config/i386/i386.opt: Add -mptwrite.
973 * config/i386/immintrin.h (_ptwrite64): Add.
975 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
976 * doc/invoke.texi: Document -mptwrite.
978 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
980 PR rtl-optimization/87600
981 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
982 * lra-constraints.c (process_alt_operands): Skip illegal hard
983 register usage. Prefer reloading non hard register operands.
985 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
988 * doc/invoke.texi (Optimize Options): Clarify default behavior
989 for -fno-sched-interblock and -fno-sched-spec.
991 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
993 * collect2.c (linker_select): Add USE_LLD_LD.
994 (ld_suffixes): Add ld.lld.
995 (main): Handle -fuse-ld=lld.
996 * common.opt (-fuse-ld=lld): New option.
997 * doc/invoke.texi (-fuse-ld=lld): Document.
998 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
1000 2018-11-08 Paul Koning <ni1d@arrl.net>
1002 * config/pdp11/constraints.md: Add "Z" series constraints for use
1003 with pre-dec and post-inc addressing.
1004 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
1005 (pdp11_expand_operands): Add int argument (word count).
1006 (pdp11_sp_frame_offset): Delete.
1007 (pdp11_cmp_length): New function.
1008 (pushpop_regeq): New function.
1009 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
1011 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
1013 (pdp11_initial_elimination_offset): Ditto.
1014 (pdp11_expand_operands): Add word count argument. Bugfixes.
1015 (output_move_multiple): Change how pointer adjustment is done.
1016 (pdp11_gen_int_label): Correct format.
1017 (output_ascii): Ditto.
1018 (pdp11_asm_output_var): Add code for DEC assembler case.
1019 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
1021 (legitimate_const_double_p): Ditto.
1022 (pdp11_register_move_cost): Adjust for new register classes.
1023 (pdp11_regno_reg_class): Ditto.
1024 (expand_block_move): Delete.
1025 (pushpop_regeq): New function.
1026 (pdp11_legitimate_address_p): Bugfix in check for constant
1028 (pdp11_sp_frame_offset): Delete.
1029 (pdp11_reg_save_size): New helper function for new frame layout.
1030 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
1031 (pdp11_expand_shift): Bugfix in check for constant shift count.
1032 (pdp11_shift_length): Ditto.
1033 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
1034 (pdp11_cmp_length): New function.
1035 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
1036 some compile options.
1037 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
1038 (CALL_USED_REGISTERS): Ditto.
1039 (ELIMINABLE_REGS): Ditto.
1040 (REGISTER_NAMES): Ditto.
1041 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
1043 (REG_CLASS_NAMES): Ditto.
1044 (REG_CLASS_CONTENTS): Ditto. Also remove
1045 HARD_FRAME_POINTER_REGNUM.
1046 (CPU_REG_CLASS): New macro.
1047 (CLASS_MAX_NREGS): Adjust for new register classes.
1048 (FUNCTION_PROFILER): Make no-op.
1049 (may_call_alloca): Remove unused declaration.
1050 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
1051 (ASM_OUTPUT_SKIP): Fix format.
1052 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
1053 (HARD_FRAME_POINTER_REGNUM): Remove.
1055 (*rts): Rename. Remove epilogue related checks.
1056 (cmpsi, cmpdi): New insn.
1057 (cbranch<mode>4): Change to apply to SI and DI modes as well.
1058 (mov<mode>): Change constraints to enforce that push/pop
1059 destination cannot use the same register as source.
1060 (*mov<mode><cc_cc>): Ditto.
1061 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
1062 at assembly output rather than as RTL expander.
1063 (zero_extendqihi2): Bugfix in check for same registers.
1064 (adddi3_nocc): Bugfix in check for constant operand.
1065 (addsi3_nocc): Ditto.
1066 (subdi3_nocc): Ditto.
1067 (subsi3_nocc): Ditto.
1068 (negdi2_nocc): Copy input to pdp11_expand_operands.
1069 (negsi2_nocc): Ditto.
1070 (bswap2_nocc): Ditto.
1071 * config/pdp11/pdp11.opt (mlra): Fix documentation.
1072 * config/pdp11/t-pdp11: Use -Os.
1074 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
1076 * config/arm/parsecpu.awk (/alias/): New parsing rule.
1077 (/begin cpu/): Check that the cpu name hasn't been previously defined.
1078 (gen_comm_data): Print out CPU alias tables.
1079 (check_cpu): Match aliases when checking the CPU name.
1080 * config/arm/arm-protos.h (cpu_alias): New structure.
1081 (cpu_option): Add entry for aliases.
1082 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
1083 strongarm1100 and strongarm1110.
1084 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
1085 (config/arm/arm-generic.md): Remove redundant references to
1086 strongarm110, strongarm1100 and strongarm1110.
1087 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
1088 Scan aliases for additional hints.
1089 (arm_parse_cpu_option_name): Also match a cpu name against the list
1091 * config/arm/arm-tables.opt: Regenerated.
1092 * config/arm/arm-tune.md: Regenerated.
1094 2018-11-08 Jakub Jelinek <jakub@redhat.com>
1096 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
1097 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
1098 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1099 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
1100 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
1101 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
1102 * gengtype.c (open_base_files): Add omp-general.h.
1103 * gimple.c (gimple_build_omp_critical):
1104 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
1105 gimple_omp_taskgroup_set_clauses.
1106 (gimple_build_omp_atomic_load): Add mo argument, call
1107 gimple_omp_atomic_set_memory_order.
1108 (gimple_build_omp_atomic_store): Likewise.
1109 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
1110 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
1112 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
1113 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
1114 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
1115 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
1116 different value for GF_OMP_ATOMIC_NEED_VALUE.
1117 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
1119 (struct gimple_statement_omp_single_layout): And remove here.
1120 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
1121 than gimple_statement_omp_single_layout.
1122 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
1124 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
1125 (gimple_omp_subcode): Formatting fix.
1126 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
1127 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
1128 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
1129 gimple_omp_teams_host, gimple_omp_teams_set_host,
1130 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
1131 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
1132 gimple_omp_taskgroup_set_clauses): New inline functions.
1133 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
1134 (gimple_build_omp_atomic_store): Likewise.
1135 (gimple_omp_atomic_seq_cst_p): Remove.
1136 (gimple_omp_atomic_memory_order): New function.
1137 (gimple_omp_atomic_set_seq_cst): Remove.
1138 (gimple_omp_atomic_set_memory_order): New function.
1139 (gimple_build_omp_taskgroup): Add clauses argument.
1140 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
1141 (dump_gimple_omp_task): Print taskwait with depend clauses.
1142 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
1143 dump_omp_atomic_memory_order.
1144 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
1145 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
1146 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
1147 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
1148 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
1149 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
1150 ORT_UNTIED_TASKLOOP enumerators.
1151 (enum gimplify_defaultmap_kind): New.
1152 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
1153 target_map_pointers_as_0len_arrays members, add defaultmap.
1154 (new_omp_context): Initialize defaultmap member.
1155 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1156 (maybe_fold_stmt): Don't fold even in host teams regions.
1157 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
1158 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
1159 ctx->omp_firstprivatize_variable.
1160 (omp_add_variable): Don't add private/firstprivate for VLAs in
1162 (omp_default_clause): Print "taskloop" rather than "task" if
1164 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1165 Handle new defaultmap clause kinds.
1166 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
1167 iterator to be lastprivate or private. Fix up diagnostics if linear
1168 is used on collapse>1 simd iterator.
1169 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
1170 (gimplify_omp_depend): New function.
1171 (gimplify_scan_omp_clauses): Add shared clause on parallel for
1172 combined parallel master taskloop{, simd} if taskloop has
1173 firstprivate, lastprivate or reduction clause. Handle
1174 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
1175 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
1176 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
1177 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
1178 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
1180 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
1181 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
1182 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
1183 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1184 (gimplify_omp_task): Handle taskwait with depend clauses.
1185 (gimplify_omp_for): Add shared clause on parallel for combined
1186 parallel master taskloop{, simd} if taskloop has firstprivate,
1187 lastprivate or reduction clause. Use ORT_TASKLOOP or
1188 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
1189 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
1190 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
1191 __for_end and __for_range temporaries on OMP_PARALLEL for
1192 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
1193 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
1194 sandwiched in between two taskloops.
1195 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
1196 instead of ctx->omp_firstprivatize_variable.
1197 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
1198 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
1199 host teams, use gimplify_and_return_first etc. for body like
1200 for target or target data constructs, and at the end call
1201 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
1202 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
1203 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
1204 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
1205 gimple_omp_atomic_set_seq_cst calls.
1206 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
1207 case, handle taskgroup clauses.
1208 * lto-streamer-out.c (hash_tree): Handle
1209 OMP_CLAUSE_{TASK,IN}_REDUCTION.
1210 * Makefile.in (GTFILES): Add omp-general.h.
1211 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
1212 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
1213 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
1214 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
1215 BUILT_IN_GOMP_LOOP_DOACROSS_START,
1216 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
1217 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1218 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
1219 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
1220 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
1221 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
1222 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
1223 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
1224 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
1225 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
1226 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
1227 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
1228 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
1229 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
1230 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
1231 * omp-expand.c (workshare_safe_to_combine_p): Return false for
1232 non-worksharing loops.
1233 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
1234 (determine_parallel_type): Don't combine parallel with worksharing
1235 which has _reductemp_ clause.
1236 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
1237 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
1238 if there is nonmonotonic modifier or if there is no modifier and no
1239 ordered clause. For dynamic and guided schedule without monotonic
1240 and nonmonotonic modifier, default to nonmonotonic.
1241 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
1242 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
1244 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
1245 there are any reduction clauses.
1246 (expand_taskwait_call): New function.
1247 (expand_teams_call): New function.
1248 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
1249 expand_teams_call for it. Formatting fix. Handle taskwait with
1251 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
1252 of worksharing loops with task reductions.
1253 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
1254 expansion of worksharing loops with task reductions.
1255 (expand_omp_sections): Handle expansion of sections with task
1257 (expand_omp_synch): For host teams call expand_omp_taskreg.
1258 (omp_memory_order_to_memmodel): New function.
1259 (expand_omp_atomic_load, expand_omp_atomic_store,
1260 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
1261 instead of gimple_omp_atomic_seq_cst_p.
1262 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
1263 depend clauses as a standalone directive.
1264 * omp-general.c (enum omp_requires): New variable.
1265 (omp_extract_for_data): Initialize have_reductemp member. Allow
1266 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
1267 GT_EXPR loops depending on incr sign. Formatting fixes.
1268 * omp-general.h (struct omp_for_data): Add have_reductemp member.
1269 (enum omp_requires): New enum.
1270 (omp_requires_mask): Declare.
1271 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
1273 * omp-low.c (struct omp_context): Add task_reductions and
1274 task_reduction_map fields.
1275 (is_host_teams_ctx): New function.
1276 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
1277 (use_pointer_for_field): Use is_global_var instead of
1278 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
1280 (build_outer_var_ref): Ignore taskgroup outer contexts.
1281 (delete_omp_context): Release task_reductions and task_reduction_map.
1282 (scan_sharing_clauses): Don't add any fields for reduction clause on
1283 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
1284 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
1285 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
1286 Handle OMP_CLAUSE_NONTEMPORAL.
1287 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
1289 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
1290 clauses with task modifier.
1291 (scan_omp_task): Handle taskwait with depend clauses.
1292 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
1293 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
1294 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
1295 (scan_omp_for): Fix comment formatting.
1296 (scan_omp_teams): Handle host teams constructs.
1297 (check_omp_nesting_restrictions): Allow teams with no outer
1298 OpenMP context. Adjust diagnostics for teams strictly nested into
1299 some explicit OpenMP construct other than target. Allow OpenMP atomics
1300 inside of simd regions.
1301 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
1302 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
1303 taskreg_nesting_level while scanning host teams construct.
1304 (task_reduction_read): New function.
1305 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
1306 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
1307 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
1308 second argument create_tmp_var if it is NULL. Don't ignore shared
1309 clauses in is_host_teams_ctx contexts. Handle
1310 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
1312 (lower_reduction_clauses): Ignore reduction clauses with task
1313 modifier. Remove second argument create_tmp_var if it is NULL.
1314 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
1315 (lower_send_clauses): Ignore reduction clauses with task modifier.
1316 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
1317 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
1318 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
1319 rely that it is the last stmt in body so far. Ignore outer taskgroup
1321 (omp_task_reductions_find_first, omp_task_reduction_iterate,
1322 lower_omp_task_reductions): New functions.
1323 (lower_omp_sections): Handle reduction clauses with taskgroup
1324 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
1325 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
1326 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
1328 (lower_omp_taskgroup): Handle taskgroup reductions.
1329 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
1330 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
1331 (lower_depend_clauses): If there are any
1332 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1333 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
1334 seen, assume lowering is done already and return early. Set kind
1335 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
1336 (lower_omp_taskreg): Handle reduction clauses with task modifier on
1337 parallel construct. Handle reduction clause on taskloop construct.
1338 Handle taskwait with depend clauses.
1339 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
1340 for host teams constructs.
1341 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
1342 nontemporal and _reductemp_ clause entries.
1343 (omp_clause_code_name): Likewise.
1344 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
1345 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
1346 * tree-core.h (enum omp_clause_code): Add
1347 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
1348 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
1349 (struct tree_base): Add omp_atomic_memory_order field into union.
1350 Remove OMP_ATOMIC_SEQ_CST comment.
1351 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
1352 and OMP_CLAUSE_DEPEND_DEPOBJ.
1353 (struct tree_omp_clause): Add subcode.defaultmap_kind.
1354 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
1355 OpenMP constructs with body and clauses operands.
1356 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
1357 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
1358 (OMP_TASKGROUP_CLAUSES): Define.
1359 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
1360 OMP_CLAUSE__LOOPTEMP_.
1361 (OMP_ATOMIC_SEQ_CST): Remove.
1362 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
1363 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
1364 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
1365 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
1366 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
1367 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
1368 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
1369 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
1370 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
1371 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
1373 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
1374 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1375 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
1376 (convert_local_omp_clauses): Likewise. Remove useless test.
1377 * tree-parloops.c (create_call_for_reduction_1): Pass
1378 OMP_MEMORY_ORDER_RELAXED as new argument to
1379 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
1380 * tree-pretty-print.c (dump_omp_iterators): New function.
1381 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
1382 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
1383 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
1384 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
1385 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
1386 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
1387 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
1388 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1389 (dump_omp_atomic_memory_order): New function.
1390 (dump_generic_node): Use it. Print taskgroup clauses. Print
1391 taskwait with depend clauses.
1392 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
1393 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
1394 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
1395 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
1396 write_ts_omp_clause_tree_pointers): Likewise.
1398 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1401 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
1402 "-missed", "-note", and "-all" sub-options.
1403 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
1405 (can_early_inline_edge_p): Likewise.
1406 (want_early_inline_function_p): Likewise.
1407 (want_inline_self_recursive_call_p): Likewise.
1408 (recursive_inlining): Likewise.
1409 (inline_small_functions): Likewise.
1410 (flatten_function): Likewise.
1411 (ipa_inline): Likewise.
1412 (inline_always_inline_functions): Likewise.
1413 (early_inline_small_functions): Likewise.
1414 (early_inliner): Likewise.
1415 * tree-inline.c (expand_call_inline): Likewise.
1417 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1419 * pretty-print.c (pp_format): Handle %f.
1420 (selftest::test_pp_format): Add test of %f.
1421 * pretty-print.h (pp_double): New macro.
1423 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1425 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
1426 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
1427 (dump_pretty_printer::decode_format): Implement "%C" for
1429 (selftest::test_capture_of_dump_calls): Rename "where" to
1430 "stmt_loc". Convert test_decl to a function decl and set its
1431 location. Add a symbol_table_test RAII instance and a
1432 cgraph_node, using it to test "%C" and dump_symtab_node.
1434 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
1437 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
1439 2018-11-08 David Malcolm <dmalcolm@redhat.com>
1441 * cgraph.c: Include "selftest.h".
1442 (saved_symtab): New variable.
1443 (selftest::symbol_table_test::symbol_table_test): New ctor.
1444 (selftest::symbol_table_test::~symbol_table_test): New dtor.
1445 (selftest::test_symbol_table_test): New test.
1446 (selftest::cgraph_c_tests): New.
1447 * cgraph.h (saved_symtab): New decl.
1448 (selftest::symbol_table_test): New class.
1449 * selftest-run-tests.c (selftest::run_tests): Call
1450 selftest::cgraph_c_tests.
1451 * selftest.h (selftest::cgraph_c_tests): New decl.
1453 2018-11-08 Richard Biener <rguenther@suse.de>
1455 * tree-data-ref.h (lambda_int): New typedef.
1456 (lambda_vector_gcd): Adjust.
1457 (lambda_vector_new): Likewise.
1458 (lambda_matrix_new): Likewise.
1459 * tree-data-ref.c (print_lambda_vector): Adjust.
1461 2018-11-08 Richard Biener <rguenther@suse.de>
1463 PR tree-optimization/87929
1464 * tree-complex.c (expand_complex_comparison): Clean EH.
1466 2018-11-08 Martin Liska <mliska@suse.cz>
1468 * doc/extend.texi: Reword.
1469 * predict.c (expr_expected_value_1): Likewise.
1471 2018-11-08 Richard Biener <rguenther@suse.de>
1473 PR tree-optimization/87913
1474 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
1475 of extreme values to ordered comparisons.
1477 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1480 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
1482 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1484 * doc/invoke.texi: Remove leading dash from @opindex entries
1485 throughout the file.
1487 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
1490 * doc/invoke.texi (Option Summary): Add -e and --entry.
1491 (Link Options): Likewise.
1493 2018-11-07 Nathan Sidwell <nathan@acm.org>
1496 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
1497 --disable-checking bootstrap.
1499 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
1501 * configure: Regenerated.
1503 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1506 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
1507 to the mode of the widest field iff the widest field has mode class
1508 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
1511 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
1513 * common.opt: Add -Wattribute-warning.
1514 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
1515 * expr.c (expand_expr_real_1): Add new attribute to warning_at
1516 call to allow user configure behavior of "warning" attribute.
1518 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
1520 * target.def: Put @: after every vs., e.g., and i.e. where it is
1521 followed by whitespace.
1522 * doc/extend.texi: Ditto.
1523 * doc/fragments.texi: Ditto.
1524 * doc/gimple.texi: Ditto.
1525 * doc/implement-c.texi: Ditto.
1526 * doc/install.texi: Ditto.
1527 * doc/invoke.texi: Ditto.
1528 * doc/md.texi: Ditto.
1529 * doc/plugins.texi: Ditto.
1530 * doc/rtl.texi: Ditto.
1531 * doc/sourcebuild.texi: Ditto.
1532 * doc/tm.texi.in: Ditto.
1533 * doc/ux.texi: Ditto.
1534 * doc/tm.texi: Regenerate.
1536 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1538 * config/arm/arm-cpus.in (ares): New entry.
1539 * config/arm/arm-tables.opt: Regenerate.
1540 * config/arm/arm-tune.md: Likewise.
1541 * doc/invoke.texi (ARM Options): Document ares.
1543 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1545 * config/aarch64/aarch64-cores.def (ares): Define.
1546 * config/aarch64/aarch64-tune.md: Regenerate.
1547 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
1549 2018-11-07 Jan Hubicka <jh@suse.cz>
1551 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
1552 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
1553 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
1556 2018-11-07 Richard Biener <rguenther@suse.de>
1558 PR tree-optimization/87914
1559 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
1561 (vectorizable_reduction): Handle shifts and rotates by dispatching
1562 to vectorizable_shift.
1563 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
1564 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
1566 (vectorizable_shift): Export and handle being called as
1568 (vect_analyze_stmt): Call vectorizable_shift after
1569 vectorizable_reduction.
1570 * tree-vectorizer.h (vectorizable_shift): Declare.
1572 2018-11-07 Jan Hubicka <jh@suse.cz>
1574 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
1575 than const decls in TREE_VALUE of enum.
1576 (dump_type_inheritance_graph): Improve duplicate dumping.
1577 (free_enum_values): New.
1578 (build_type_inheritance_graph): Use it.
1579 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
1580 which are not main variants or not ODR types.
1581 (verify_type_variant): Expect variants to have no TYPE_VALUES.
1583 2018-11-07 Richard Biener <rguenther@suse.de>
1585 * ipa-inline.c (want_inline_small_function_p): Compute
1586 big_speedup_p lazily and last.
1588 2018-11-07 Jan Hubicka <jh@suse.cz>
1590 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
1591 building incomplete variant of complete type.
1592 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
1593 variant of complete type.
1595 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1597 * config/mips/mips.c: Fix typo in documentation of
1598 mips_loongson_ext2_prefetch_cookie.
1599 (mips_option_override): fix brain twister logical.
1600 * config/mips/mips.h: Fix typo in documentation of
1601 ISA_HAS_CTZ_CTO and define pattern.
1602 * config/mips/mips.md (prefetch): Hoist EXT2 above
1604 (prefetch_indexed): Hoist EXT2 above the EXT block.
1606 2018-11-07 Jan Hubicka <jh@suse.cz>
1608 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1609 return and parameter types of function and method types.
1610 (free_lang_data_in_cgraph): Update.
1612 2018-11-07 Martin Liska <mliska@suse.cz>
1614 PR rtl-optimization/87868
1615 * postreload-gcse.c (eliminate_partially_redundant_load): Set
1616 threshold to max_count if we would overflow.
1617 * profile-count.h: Make max_count a public constant.
1619 2018-11-07 Martin Liska <mliska@suse.cz>
1621 * mem-stats.h: Fix GNU coding style.
1623 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1625 * config/mips/gs264e.md: New.
1626 * config/mips/mips-cpus.def: Define gs264e.
1627 * config/mips/mips-tables.opt: Regenerate.
1628 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1630 (mips_issue_rate): Add support for gs264e.
1631 (mips_multipass_dfa_lookahead): Likewise.
1632 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1633 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1634 (MIPS_ASE_MSA_SPEC): New.
1635 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1636 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1637 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1638 * config/mips/mips.md: Include gs264e.md.
1639 (processor): Add gs264e.
1640 * config/mips/mips.opt (MSA): Use Mask instead of Var.
1641 * doc/invoke.texi: Add gs264e to supported architectures.
1643 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1645 * config/mips/gs464e.md: New.
1646 * config/mips/mips-cpus.def: Define gs464e.
1647 * config/mips/mips-tables.opt: Regenerate.
1648 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1650 (mips_issue_rate): Add support for gs464e.
1651 (mips_multipass_dfa_lookahead): Likewise.
1652 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1653 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1654 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1655 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1656 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1657 * config/mips/mips.md: Include gs464e.md.
1658 (processor): Add gs464e.
1659 * doc/invoke.texi: Add gs464e to supported architectures.
1661 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1663 * config/mips/loongson3a.md: Rename to ...
1664 * config/mips/gs464.md: ... here.
1665 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1666 as an alias of gs464 processor.
1667 * config/mips/mips-tables.opt: Regenerate.
1668 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1669 instead of PROCESSOR_LOONGSON_3A.
1670 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1672 (mips_option_override): Enable MMI and EXT for gs464.
1673 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1674 Rename TUNE_LOONGSON_3A to TUNE_GS464.
1675 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1676 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1677 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1679 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1680 (processor): Add gs464;
1681 * doc/invoke.texi: Add gs464 to supported architectures.
1683 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1685 * config/mips/mips-protos.h
1686 (mips_loongson_ext2_prefetch_cookie): New prototype.
1687 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1688 (mips_option_override): Enable TARGET_LOONGSON_EXT when
1689 TARGET_LOONGSON_EXT2 is true.
1690 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1691 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1692 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1693 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1694 TARGET_LOONGSON_EXT2.
1695 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1696 (define_insn "ctz<mode>2"): New insn pattern.
1697 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1698 (define_insn "prefetch_indexed_<mode>"): Include
1699 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1700 * config/mips/mips.opt (-mloongson-ext2): Add option.
1701 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1703 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1705 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1706 __mips_loongson_ext.
1707 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1708 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1710 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1711 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1712 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1713 instead of TARGET_LOONGSON_3A.
1714 * config/mips/mips.opt (-mloongson-ext): Add option.
1715 * gcc/doc/invoke.texi (-mloongson-ext): Document.
1717 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
1719 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1720 * config/mips/loongson.md: Move to ...
1721 * config/mips/loongson-mmi.md: here; Adjustment.
1722 * config/mips/loongson.h: Move to ...
1723 State as deprecated. Include loongson-mmiintrin.h for back
1724 compatibility and warning.
1725 * config/mips/loongson-mmiintrin.h: ... here.
1726 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1727 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1728 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1729 (mips_option_override): Make sure MMI use hard float;
1730 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1731 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1732 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1733 TARGET_LOONGSON_VECTORS.
1734 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1735 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1736 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1737 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1739 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1740 TARGET_LOONGSON_VECTORS.
1741 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1742 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1743 (Loongson MMI patterns): Include loongson-mmi.md instead of
1745 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1746 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1748 2018-11-07 Richard Biener <rguenther@suse.de>
1751 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1752 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1754 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
1756 PR rtl-optimization/87874
1757 * lra.c (lra_substitute_pseudo): Do not create a subreg for
1760 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
1762 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1763 if not in indexed or indirect form.
1764 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1765 (bswap<mode>2_store): Ditto.
1767 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
1769 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1772 2018-11-06 Richard Biener <rguenther@suse.de>
1774 PR tree-optimization/86850
1775 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1776 instead of src.m_vec.
1778 2018-11-06 Jan Hubicka <jh@suse.cz>
1780 * tree.c (fld_simplified_type_name): Break out form ...
1781 (free_lang_data_in_type): ... here.
1782 (fld_type_variant_equal_p): Use it.
1784 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1786 * config/default-d.c: Include memmodel.h.
1788 * config/sol2-d.c: New file.
1789 * config/t-sol2 (sol2-d.o): New rule.
1790 * config.gcc <*-*-solaris2*>: Set d_target_objs,
1791 target_has_targetdm.
1793 2018-11-06 Jan Hubicka <jh@suse.cz>
1795 * tree.c (fld_type_variant): Also copy alignment; be sure that
1796 new variant is equal.
1798 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
1801 * config/s390/s390.md: Add relative_long attribute.
1803 2018-11-06 Jan Hubicka <jh@suse.cz>
1805 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1806 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1807 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1808 stream TYPE_NEEDS_CONSTRUCTING.
1809 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1810 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1812 2018-11-06 Richard Biener <rguenther@suse.de>
1814 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1816 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1818 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1820 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1821 REG_CLASS_CONTENTS[GEN_REGS].
1822 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1824 2018-11-06 Jan Hubicka <jh@suse.cz>
1826 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1828 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1831 * config/sol2.h (ASAN_CC1_SPEC): Define.
1832 (LD_WHOLE_ARCHIVE_OPTION): Define.
1833 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1834 (ASAN_REJECT_SPEC): Provide default.
1835 (LIBASAN_EARLY_SPEC): Define.
1836 (LIBTSAN_EARLY_SPEC): Define.
1837 (LIBLSAN_EARLY_SPEC): Define.
1838 * config/i386/sol2.h (CC1_SPEC): Redefine.
1839 (ASAN_REJECT_SPEC): Define.
1841 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1842 (TARGET_ASAN_SHADOW_OFFSET): Define.
1843 (sparc_asan_shadow_offset): New function.
1844 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1845 (ASAN_REJECT_SPEC): Define.
1847 2018-11-06 Jan Hubicka <jh@suse.cz>
1849 * tree.c (fld_type_variant): Copy canonical type.
1850 (fld_incomplete_type_of): Check that canonical types looks sane;
1851 copy canonical type.
1852 (verify_type): Accept when incomplete type has complete canonical type.
1854 2018-11-06 Jan Hubicka <jh@suse.cz>
1856 * tree.c (free_lang_data): Reset overwite_assembler_name,
1857 print_xnode, print_decl, print_type and print_identifier of
1860 2018-11-06 Richard Biener <rguenther@suse.de>
1862 PR tree-optimization/87889
1863 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1864 Do nothing if old and new arg are the same
1866 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
1869 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1870 attributes for operands 3 and 4.
1872 2018-11-06 Richard Biener <rguenther@suse.de>
1875 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1876 matching bitfield insertion.
1878 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
1880 * auto-inc-dec.c: Include valtrack.h. Improve comments.
1881 (reg_next_debug_use): New.
1882 (attempt_change): Propagate adjusted expression into affected
1884 (merge_in_block): Track uses in debug insns.
1885 (pass_inc_dec::execute): Allocate and release
1888 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1890 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1891 (_mm512_fixupimm_round_pd): Update parameters and builtin.
1892 (_mm512_maskz_fixupimm_round_pd): Ditto.
1893 (_mm512_fixupimm_round_ps): Ditto.
1894 (_mm512_maskz_fixupimm_round_ps): Ditto.
1895 (_mm_fixupimm_round_sd): Ditto.
1896 (_mm_maskz_fixupimm_round_sd): Ditto.
1897 (_mm_fixupimm_round_ss): Ditto.
1898 (_mm_maskz_fixupimm_round_ss): Ditto.
1899 (_mm512_fixupimm_pd): Ditto.
1900 (_mm512_maskz_fixupimm_pd): Ditto.
1901 (_mm512_fixupimm_ps): Ditto.
1902 (_mm512_maskz_fixupimm_ps): Ditto.
1903 (_mm_fixupimm_sd): Ditto.
1904 (_mm_maskz_fixupimm_sd): Ditto.
1905 (_mm_fixupimm_ss): Ditto.
1906 (_mm_maskz_fixupimm_ss): Ditto.
1907 (_mm512_mask_fixupimm_round_pd): Update builtin.
1908 (_mm512_mask_fixupimm_round_ps): Ditto.
1909 (_mm_mask_fixupimm_round_sd): Ditto.
1910 (_mm_mask_fixupimm_round_ss): Ditto.
1911 (_mm512_mask_fixupimm_pd): Ditto.
1912 (_mm512_mask_fixupimm_ps): Ditto.
1913 (_mm_mask_fixupimm_sd): Ditto.
1914 (_mm_mask_fixupimm_ss): Ditto.
1915 * config/i386/avx512vlintrin.h:
1916 (_mm256_fixupimm_pd): Update parameters and builtin.
1917 (_mm256_maskz_fixupimm_pd): Ditto.
1918 (_mm256_fixupimm_ps): Ditto.
1919 (_mm256_maskz_fixupimm_ps): Ditto.
1920 (_mm_fixupimm_pd): Ditto.
1921 (_mm_maskz_fixupimm_pd): Ditto.
1922 (_mm_fixupimm_ps): Ditto.
1923 (_mm_maskz_fixupimm_ps): Ditto.
1924 (_mm256_mask_fixupimm_pd): Update builtin.
1925 (_mm256_mask_fixupimm_ps): Ditto.
1926 (_mm_mask_fixupimm_pd): Ditto.
1927 (_mm_mask_fixupimm_ps): Ditto.
1928 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1929 * config/i386/i386-builtin.def: Update builtin definitions.
1930 * config/i386/i386.c: Handle new builtin types and remove useless ones.
1931 * config/i386/sse.md: Update VFIXUPIMM* patterns.
1932 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1933 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1934 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1935 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1936 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1937 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1938 * config/i386/subst.md:
1939 (round_saeonly_sd_mask_operand4): Add new subst_attr.
1940 (round_saeonly_sd_mask_op4): Ditto.
1941 (round_saeonly_expand_operand5): Ditto.
1942 (round_saeonly_expand): Update.
1944 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
1946 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1948 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
1950 PR rtl-optimization/87871
1951 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1953 2018-11-05 Paul Koning <ni1d@arrl.net>
1955 * doc/sourcebuild.texi (target attributes): Document new "inf"
1956 effective target keyword.
1958 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1960 * config/s390/s390.c (s390_register_move_cost): Increase costs for
1961 moves involving the CC reg.
1963 2018-11-05 Richard Biener <rguenther@suse.de>
1965 PR tree-optimization/87873
1966 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1968 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1969 * tree-vect-loop.c (vect_transform_loop): When splitting the
1970 loop exit also create forwarder PHIs for constants.
1971 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1972 Handle constant to_arg, add extra checking we match up the correct
1975 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1977 * config/s390/s390.md: QImode and HImode for load on condition.
1979 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
1981 * config/s390/predicates.md: Fix typo.
1982 * config/s390/s390.md: Allow immediates for load on condition.
1984 2018-11-05 Martin Liska <mliska@suse.cz>
1986 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1987 * bitmap.h (struct bitmap_usage): Likewise.
1988 * ggc-common.c (SCALE): Remove.
1990 (struct ggc_usage): Use SIZE_AMOUNT. And update
1992 * ggc-page.c (SCALE): Remove.
1993 (STAT_LABEL): Remove.
1994 (ggc_print_statistics): Use SIZE_AMOUNT.
1995 * gimple.h (SCALE): Remove.
1997 * input.c (ONE_K): Remove.
2000 (STAT_LABEL): Likewise.
2001 (FORMAT_AMOUNT): Likewise.
2002 (dump_line_table_statistics): Use SIZE_AMOUNT.
2003 * mem-stats.h (struct mem_usage): Likewise.
2004 * rtl.c (dump_rtx_statistics): Likewise.
2005 (rtx_alloc_counts): Change type to size_t.
2006 (rtx_alloc_sizes): Likewise.
2007 (rtx_count_cmp): New.
2008 (dump_rtx_statistics): Sort first based on counts.
2009 * tree.c (tree_nodes_cmp): New.
2010 (tree_codes_cmp): New.
2011 (dump_tree_statistics): Sort first based on counts.
2012 * system.h (ONE_K): New.
2014 (SIZE_SCALE): Likewise.
2015 (SIZE_LABEL): Likewise.
2016 (SIZE_AMOUNT): Likewise.
2017 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
2018 * tree-dfa.c (dump_dfa_stats): Likewise.
2019 * tree-phinodes.c (phinodes_print_statistics): Likewise.
2020 * tree-ssanames.c (ssanames_print_statistics): Likewise.
2021 * tree.c (dump_tree_statistics): Likewise.
2022 * vec.c (struct vec_usage): Likewise.
2023 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
2024 trigger a -Werror=format-overflow with
2025 --enable-gather-detailed-stats.
2027 2018-11-05 Martin Liska <mliska@suse.cz>
2029 * mem-stats.h (mem_alloc_description::release_instance_overhead):
2031 * vec.c (struct vec_usage): Register m_element_size.
2032 (vec_prefix::register_overhead): New arguments: elements and
2034 (vec_prefix::release_overhead): Subtract elements.
2035 * vec.h (struct vec_prefix): Change signature.
2036 (va_heap::reserve): Pass proper arguments.
2037 (va_heap::release): Likewise.
2039 2018-11-05 Martin Liska <mliska@suse.cz>
2041 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
2045 2018-11-05 Richard Biener <rguenther@suse.de>
2047 * tree-scalar-evolution.h (final_value_replacement_loop): Update
2049 * tree-scalar-evolution.c (final_value_replacement_loop): Return
2050 whether anything was done.
2051 (scev_const_prop): Remove constant propagation part, fold
2053 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
2054 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
2057 2018-11-05 Jakub Jelinek <jakub@redhat.com>
2059 PR tree-optimization/87859
2060 * gimple-ssa-store-merging.c (struct merged_store_group): Add
2061 only_constants and first_nonmergeable_order members.
2062 (merged_store_group::merged_store_group): Initialize them.
2063 (merged_store_group::do_merge): Clear only_constants member if
2064 adding something other than INTEGER_CST store.
2065 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
2066 stores with order >= first_nonmergeable_order. Use
2067 merged_store->only_constants instead of always recomputing it.
2068 Set merged_store->first_nonmergeable_order if we've skipped any
2069 stores. Attempt to merge overlapping INTEGER_CST stores that
2070 we would otherwise skip.
2073 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
2075 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
2078 * config/i386/emmintrin.h (__v16qs): New to cope with option
2080 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
2081 (_mm_cmplt_epi8): Likewise.
2082 (_mm_cmpgt_epi8): Likewise.
2084 2018-11-05 Richard Biener <rguenther@suse.de>
2086 PR rtl-optimization/87852
2087 * fwprop.c (use_killed_between): Only consider single-defs of the
2088 use whose definition statement dominates the use.
2090 2018-11-05 Martin Liska <mliska@suse.cz>
2093 * doc/invoke.texi: Remove options that are
2094 not disabled with -Os.
2096 2018-11-05 Martin Liska <mliska@suse.cz>
2099 * doc/extend.texi: Update constrain about the last argument
2100 of __builtin_expect_with_probability.
2102 2018-11-05 Martin Liska <mliska@suse.cz>
2105 * predict.c (expr_expected_value_1): Verify
2106 that last argument is a real constants and emit
2109 2018-11-05 Martin Liska <mliska@suse.cz>
2111 PR gcov-profile/77698
2112 * ipa-profile.c (ipa_profile): Adjust hotness threshold
2115 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2117 PR tree-optimization/86572
2118 * builtins.c (c_strlen): Handle negative offsets in a safe way.
2120 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
2122 PR tree-optimization/87672
2123 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
2124 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
2126 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
2129 * cfgexpand.c (pass_expand::execute): Move the call to
2130 finish_eh_generation in front of the call to expand_stack_alignment.
2132 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
2134 * common/config/i386/i386-common.c (processor_alias_table): Add
2136 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
2137 (case ${target}): Add znver2.
2138 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
2139 -march=native recognize znver2 processors.
2140 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
2141 * config/i386/i386.c (m_znver2): New definition.
2142 (m_ZNVER): New definition.
2143 (m_AMD_MULTIPLE): Includes m_znver2.
2144 (processor_cost_table): Add znver2 entry.
2145 (processor_target_table): Add znver2 entry.
2146 (get_builtin_code_for_version): Set priority for
2148 (processor_model): Add M_AMDFAM17H_ZNVER2.
2149 (arch_names_table): Ditto.
2150 (ix86_reassociation_width): Include znver2.
2151 * config/i386/i386.h (TARGET_znver2): New definition.
2152 (struct ix86_size_cost): Add TARGET_ZNVER2.
2153 (enum processor_type): Add PROCESSOR_ZNVER2.
2154 * config/i386/i386.md (define_attr "cpu"): Add znver2.
2155 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
2156 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
2157 (ix86_adjust_cost): Add znver2.
2158 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
2159 * gcc/doc/extend.texi: Add details about znver2.
2160 * gcc/doc/invoke.texi: Add details about znver2.
2162 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
2166 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
2169 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
2171 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
2172 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
2174 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
2176 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
2177 shrink-wrapping when -mtrack-speculation.
2179 2018-11-02 Richard Biener <rguenther@suse.de>
2181 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
2182 (pop_cost_one_pair): Do not free pair.
2183 (pop_best_coalesce): Likewise.
2184 (create_coalesce_list): Initialize obstack.
2185 (delete_coalesce_list): Free obstack.
2186 (find_coalesce_pair): Obstack-allocate coalesce pairs.
2187 (add_cost_one_coalesce): Likewise.
2188 (struct live_track): Remove bitmap pointer indirections.
2189 (new_live_track): Adjust.
2190 (delete_live_track): Likewise.
2191 (live_track_remove_partition): Likewise.
2192 (live_track_add_partition): Likewise.
2193 (live_track_live_p): Likewise.
2194 (live_track_process_def): Likewise.
2195 (live_track_clear_base_vars): Likewise.
2197 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2199 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
2200 * configure: Regenerate.
2201 * config.in: Regenerate.
2202 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
2203 HAVE_AS_REGISTER_PSEUDO_OP guard.
2204 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
2205 !HAVE_AS_REGISTER_PSEUDO_OP support.
2206 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
2209 2018-11-02 Richard Biener <rguenther@suse.de>
2211 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
2214 2018-11-02 Richard Biener <rguenther@suse.de>
2216 PR tree-optimization/87776
2217 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
2218 executable when iterating but running into rpo-vn-max-loop-depth
2219 and not eliding the iteration.
2221 2018-11-30 Jan Hubicka <jh@suse.cz>
2223 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
2226 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
2228 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
2230 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
2231 Combine with rs6000_address_for_fpconvert.
2232 (rs6000_address_for_fpconvert): Combine with
2233 rs6000_force_indexed_or_indirect_mem.
2234 (rs6000_expand_vector_init): Change function call from
2235 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2236 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
2237 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
2238 (floatsi<mode>2_lfiwax_mem): Ditto.
2239 (floatunssi<mode>2_lfiwzx): Ditto.
2240 (floatunssi<mode>2_lfiwzx_mem): Ditto.
2241 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
2242 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
2243 (fix_trunc<mode>si2_stfiwx): Ditto.
2244 (fixuns_trunc<mode>si2_stfiwx): Ditto.
2245 (float_<mode>si2_hw): Ditto.
2246 (floatuns_<mode>si2_hw): Ditto.
2247 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
2248 (vsx_splat_<mode>): Ditto.
2250 2018-11-01 Joseph Myers <joseph@codesourcery.com>
2252 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
2253 at end of assembler input text.
2254 * configure: Regenerate.
2256 2018-11-01 Jakub Jelinek <jakub@redhat.com>
2258 PR tree-optimization/87826
2259 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
2260 negative or larger or equal to type's precision.
2262 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
2264 * opts.c (default_options_table): Do not enable
2265 OPT_fdelayed_branch at -Og.
2266 * doc/invoke.texi (-fdelayed-branch): Document it.
2268 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2270 * optabs-libfuncs.c (build_libfunc_function_visibility):
2271 New, split out from...
2272 (build_libfunc_function): ... here.
2273 (init_one_libfunc_visibility): New, split out from ...
2274 (init_one_libfunc): ... here.
2276 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
2277 scratch register need not be early-clobber. Document the reason
2278 why we cannot use ST<OP>.
2280 2018-10-31 Joseph Myers <joseph@codesourcery.com>
2283 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
2284 line for second argument of AC_DEFINE_UNQUOTED.
2285 * doc/install.texi (Tools/packages necessary for modifying GCC):
2286 Update to autoconf 2.69 and automake 1.15.1.
2287 * aclocal.m4, config.in, configure: Regenerate.
2289 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
2291 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
2294 2018-10-31 Martin Liska <mliska@suse.cz>
2297 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
2298 Add new argument invalid_extension.
2299 (aarch64_get_all_extension_candidates): New function.
2300 (aarch64_rewrite_selected_cpu): Add NULL to function call.
2301 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
2303 (aarch64_get_all_extension_candidates): New function.
2304 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
2305 argument invalid_extension.
2306 (aarch64_parse_cpu): Likewise.
2307 (aarch64_print_hint_for_extensions): New function.
2308 (aarch64_validate_mcpu): Provide hint about invalid extension.
2309 (aarch64_validate_march): Likewise.
2310 (aarch64_handle_attr_arch): Pass new argument.
2311 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
2312 (aarch64_handle_attr_isa_flags): Likewise.
2314 2018-10-31 Richard Biener <rguenther@suse.de>
2318 * tree-outof-ssa.c (insert_backedge_copies): Restrict
2319 copy generation to useful cases. Place the copy before
2320 the definition of the backedge value when possible.
2322 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2324 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
2325 * config/arc/arc.c (arc_active_insn): New function.
2326 (check_store_cacheline_hazard): Likewise.
2327 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
2328 (arc_override_options): Disable delay slot scheduler for older
2330 (arc_store_addr_hazard_p): New implementation, old one renamed to
2332 (arc_store_addr_hazard_internal_p): Renamed.
2333 (arc_reorg): Don't combine into brcc instructions which are part
2334 of hardware hazard solution.
2335 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
2336 (tune_arc700): Likewise.
2337 * config/arc/arc.opt (arc7xx): New tune value.
2338 * config/arc/arc700.md: Improve A7 scheduler.
2340 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2342 * config/arc/arc.c (arc_override_options): Remove
2343 TARGET_COMPACT_CASESI.
2344 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
2345 (CASE_VECTOR_MODE): Likewise.
2346 (CASE_VECTOR_PC_RELATIVE): Likewise.
2347 (CASE_VECTOR_SHORTEN_MODE): Likewise.
2348 (CASE_VECTOR_SHORTEN_MODE1): Delete.
2349 (ADDR_VEC_ALIGN): Update.
2350 (ASM_OUTPUT_CASE_LABEL): Undefine.
2351 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
2352 (TARGET_BI_BIH): Define.
2353 (DEFAULT_BRANCH_INDEX): Likewise.
2354 * config/arc/arc.md (casesi): Rework to accept BI/BIH
2355 instructions, remove compact_casesi use case.
2356 (casesi_compact_jump): Remove.
2357 (casesi_dispatch): New pattern.
2358 * config/arc/arc.opt: Add mbranch-index option. Deprecate
2359 compact_casesi option.
2360 * doc/invoke.texi: Document mbranch-index option.
2362 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2364 * config/arc/arc.c (arc_get_tp): Remove function.
2365 (arc_emit_call_tls_get_addr): Likewise.
2366 (arc_call_tls_get_addr): New function.
2367 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
2368 * config/arc/arc.md (tls_load_tp_soft): Remove.
2369 (tls_gd_get_addr): Likewise.
2371 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
2373 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
2374 (mulsi3_600_lib): Remove pattern.
2375 (umulsi3_highpart_600_lib_le): Likewise.
2376 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
2377 (umulsidi3): Remove call to umulsidi3_600_lib.
2378 (umulsidi3_600_lib): Remove pattern.
2379 (peephole2): Remove peephole using the above deprecated patterns.
2381 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
2384 * config/arm/arm.c (arm_option_check_internal): Disable the combined
2385 use of -mslow-flash-data and -mword-relocations.
2386 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
2387 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
2389 * doc/invoke.texi (-mword-relocations): Mention conflict with
2391 (-mslow-flash-data): Reciprocally.
2393 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
2395 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
2396 16-byte modes held in GP registers to use an even regno.
2398 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
2399 (aarch64_atomic_ldop_supported_p): Remove.
2400 (aarch64_gen_atomic_ldop): Remove.
2401 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
2402 Fully expand LSE operations here.
2403 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
2404 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
2405 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
2406 and use ATOMIC_LDOP instead; use register_operand for the input;
2407 drop the split and emit insns directly.
2408 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
2409 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
2410 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
2412 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
2413 (aarch64_gen_atomic_ldop): Don't call it.
2414 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
2415 Use aarch64_reg_or_zero.
2416 (aarch64_atomic_exchange<ALLI>): Likewise.
2417 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
2418 operand 0; use aarch64_reg_or_zero for input; merge ...
2419 (@aarch64_atomic_swp<ALLI>): ... this and remove.
2421 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
2422 (aarch64_split_compare_and_swap): Use it.
2423 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
2424 test oldval against the proper predicate.
2425 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
2426 Use nonmemory_operand for expected.
2427 (cas_short_expected_pred): New.
2428 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
2429 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
2430 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
2431 (aarch64_plushi_operand): New.
2433 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
2434 Force oldval into the rval register for TARGET_LSE; emit the compare
2435 during initial expansion so that it may be deleted if unused.
2436 (aarch64_gen_atomic_cas): Remove.
2437 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
2438 Change =&r to +r for operand 0; use match_dup for operand 2;
2439 remove is_weak and mod_f operands as unused. Drop the split
2441 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
2442 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
2443 (@aarch64_atomic_cas<GPI>): Similarly.
2445 2018-10-31 Richard Biener <rguenther@suse.de>
2447 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
2450 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
2452 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
2453 * config/aarch64/aarch64.md: Include saphira.md
2454 * config/aarch64/saphira.md: New file for pipeline description.
2456 2018-10-30 Martin Sebor <msebor@redhat.com>
2459 * gimple-ssa-sprintf.c (format_directive): Use %G to include
2461 (sprintf_dom_walker::compute_format_length):
2462 Avoid setting POSUNDER4K here.
2463 (get_destination_size): Handle null argument values.
2464 (get_user_idx_format): New function.
2465 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
2466 functions, including user-defined with attribute format printf.
2467 Use %G to include inlining context.
2468 Set POSUNDER4K here.
2470 2018-10-30 Jan Hubicka <jh@suse.cz>
2472 * params.def (lto-partitions): Bump from 32 to 128.
2474 2018-10-30 Jan Hubicka <jh@suse.cz>
2477 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
2479 (free_lang_data_in_type): Forward declare.
2480 (fld_type_variant_equal_p): New function.
2481 (fld_type_variant): New function
2482 (fld_incomplete_types): New hash.
2483 (fld_incomplete_type_of): New function
2484 (fld_simplfied-type): New function.
2485 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
2486 (free_lang_data): Allocate and free fld_incomplete_type; update call
2487 of free_lang_data_in_decl.
2489 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
2491 * gcov.c (output_lines): Remove duplicate line.
2493 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
2495 * config/rs6000/rs6000.md (bswapdi2): Force address into register
2496 if not in indexed or indirect form.
2497 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
2498 (bswapdi2_store): Ditto.
2499 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
2501 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
2502 Prototype for helper function.
2504 2018-10-30 Martin Sebor <msebor@redhat.com>
2506 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
2507 (target, pragma GCC optimize, pragma GCC target): Ditto.
2509 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
2511 * doc/extend.texi: Fix prototype and description of
2512 __builtin_expect_with_probability.
2514 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
2516 * cgraph.h (clone_function_name_1): Replaced by new
2517 clone_function_name_numbered that takes name as string; for
2518 privatize_symbol_name_1 use only.
2519 (clone_function_name): Renamed to
2520 clone_function_name_numbered to be explicit about numbering.
2521 (clone_function_name): New two-argument function that does
2522 not number its output.
2523 (clone_function_name): New three-argument function that
2524 takes a number to append to its output.
2525 * cgraphclones.c (duplicate_thunk_for_node):
2526 (clone_function_name_1): Renamed.
2527 (clone_function_name_numbered): Two new functions.
2528 (clone_function_name): Improved documentation.
2529 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
2530 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
2531 * final.c (final_scan_insn_1): Use the new clone_function_name
2533 * multiple_target.c (create_dispatcher_calls): Ditto.
2534 (create_target_clone): Ditto.
2535 * omp-expand.c (grid_expand_target_grid_body): Ditto.
2536 * omp-low.c (create_omp_child_function_name): Ditto.
2537 * omp-simd-clone.c (simd_clone_create): Ditto.
2538 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
2539 new clone_function_name without numbering.
2541 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
2543 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
2544 Assert that the allocation size is not zero.
2546 2018-10-30 Richard Biener <rguenther@suse.de>
2548 PR tree-optimization/87800
2549 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
2550 non-induction or reduction PHIs.
2552 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
2554 * config/aarch64/falkor-tag-collision-avoidance.c
2555 (execute_tag_collision_avoidance): Call df_note_add_problem.
2557 2018-10-30 Martin Liska <mliska@suse.cz>
2559 * doc/extend.texi: Fix typo in documentation
2560 of __builtin_expect_with_probability.
2562 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2565 * input.c (get_substring_ranges_for_loc): Detect if
2566 linemap_resolve_location gives us a NULL map, and reject
2569 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
2571 * config.gcc (xstormy16-*-elf): Set tm_d_file.
2573 2018-10-29 David Malcolm <dmalcolm@redhat.com>
2574 Martin Sebor <msebor@redhat.com>
2575 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
2577 * doc/ux.texi (Quoting): New subsection, adapted from material at
2578 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
2579 MartinSebor and ManuelLopezIbanez.
2580 (Fix-it hints): Note that fix-it hints shouldn't be marked for
2583 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
2586 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
2589 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2591 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
2593 2018-10-29 Paul Koning <ni1d@arrl.net>
2595 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
2597 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
2599 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2600 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2601 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2602 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2603 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2604 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2605 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2606 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2607 Change 'vector' to '__vector'.
2608 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2609 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2610 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2611 _mm_avg_pu16): Likewise. And, whitespace corrections.
2613 2018-10-29 Richard Biener <rguenther@suse.de>
2615 PR tree-optimization/87785
2616 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2619 2018-10-29 Olivier Hainque <hainque@adacore.com>
2621 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2623 2018-10-29 Olivier Hainque <hainque@adacore.com>
2625 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2626 ports configuration macro, defaults to "gnu".
2627 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2628 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2630 2018-10-29 Olivier Hainque <hainque@adacore.com>
2632 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2634 2018-10-29 Richard Biener <rguenther@suse.de>
2636 PR tree-optimization/87790
2637 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2638 (vect_make_slp_decision): Adjust.
2639 (vect_slp_analyze_bb_1): Likewise.
2640 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2643 2018-10-29 Richard Biener <rguenther@suse.de>
2645 PR tree-optimization/87785
2646 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2648 (vect_build_slp_tree): Likewise.
2649 (vect_gather_slp_loads): New function.
2650 (vect_analyze_slp_instance): Gather loads separately from the
2653 2018-10-29 Martin Liska <mliska@suse.cz>
2655 * Makefile.in: Make dependency to json.o.
2656 * doc/gcov.texi: Document new JSON format, remove
2657 old intermediate format documentation.
2658 * gcov.c (struct function_info): Come up with m_name and
2660 (function_info::function_info): Initialize it.
2661 (function_info::~function_info): Release it.
2662 (main): Rename flag_intermediate_format to flag_json_format.
2663 (print_usage): Describe --json-format.
2664 (process_args): Set flag_json_format.
2665 (output_intermediate_line): Remove.
2666 (output_intermediate_json_line): Likewise.
2667 (get_gcov_intermediate_filename): Return new extension
2669 (output_intermediate_file): Implement JSON emission.
2670 (output_json_intermediate_file): Implement JSON emission.
2671 (generate_results): Use ::get_name for function name.
2672 Handle JSON output file.
2673 (read_graph_file): Use ::get_name instead of cplus_demangle.
2674 (read_count_file): Likewise.
2675 (solve_flow_graph): Likewise.
2676 (add_line_counts): Likewise.
2677 (accumulate_line_counts): Use new flag_json_format.
2678 (output_function_details): Use ::get_name instead of cplus_demangle.
2679 (output_lines): Likewise.
2680 * json.cc (test_writing_literals): Add new tests.
2681 * json.h (class literal): Add new boolean constructor.
2683 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
2685 PR rtl-optimization/87701
2686 PR rtl-optimization/87780
2687 * combine.c (make_more_copies): Rewrite.
2689 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
2691 * doc/generic.texi (ABSU_EXPR): Document.
2692 * match.pd (absu(x)*absu(x) -> x*x): Handle.
2693 (absu(absu(X)) -> absu(X)): Likewise.
2694 (absu(-X) -> absu(X)): Likewise.
2695 (absu(X) where X is nonnegative -> X): Likewise.
2697 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
2699 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2700 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2701 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2702 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2703 (s-tm-texi): Also check timestamp on d-target.def.
2704 (generated_files): Add TM_D_H and d-target-hooks-def.h.
2705 (build/genhooks.o): Also depend on D_TARGET_DEF.
2706 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2708 * config/aarch64/aarch64-d.c: New file.
2709 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2711 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2713 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2714 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2715 * config/arm/arm-d.c: New file.
2716 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2717 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2718 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2719 * config/arm/t-arm (arm-d.o): New rule.
2720 * config/default-d.c: New file.
2721 * config/glibc-d.c: New file.
2722 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2723 * config/i386/i386-d.c: New file.
2724 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2725 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2726 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2727 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2728 * config/i386/t-i386 (i386-d.o): New rule.
2729 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2730 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2731 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2732 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2733 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2734 * config/mips/mips-d.c: New file.
2735 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2736 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2737 * config/mips/t-mips (mips-d.o): New rule.
2738 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2739 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2740 * config/powerpcspe/powerpcspe-d.c: New file.
2741 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2743 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2744 Support GNU D by using 0 as the language type.
2745 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2746 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2747 * config/riscv/riscv-d.c: New file.
2748 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2750 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2751 * config/riscv/t-riscv (riscv-d.o): New rule.
2752 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2753 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2754 * config/rs6000/rs6000-d.c: New file.
2755 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2757 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2758 Support GNU D by using 0 as the language type.
2759 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2760 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2761 * config/s390/s390-d.c: New file.
2762 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2763 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2764 * config/s390/t-s390 (s390-d.o): New rule.
2765 * config/sparc/sparc-d.c: New file.
2766 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2768 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2769 * config/sparc/t-sparc (sparc-d.o): New rule.
2770 * config/t-glibc (glibc-d.o): New rule.
2771 * configure: Regenerated.
2772 * configure.ac (tm_d_file): New variable.
2773 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2774 * doc/contrib.texi (Contributors): Add self for the D frontend.
2775 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2776 * doc/install.texi (Configuration): Mention libphobos as an option for
2777 --enable-shared. Mention d as an option for --enable-languages.
2778 (Testing): Mention check-d as a target.
2779 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2780 name suffixes. Mention d as a -x option.
2781 * doc/sourcebuild.texi (Top Level): Mention libphobos.
2782 * doc/standards.texi (Standards): Add section on D language.
2783 * doc/tm.texi: Regenerated.
2784 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2785 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2786 * dwarf2out.c (is_dlang): New function.
2787 (gen_compile_unit_die): Use DW_LANG_D for D.
2788 (declare_in_namespace): Return module die for D, instead of adding
2789 extra declarations into the namespace.
2790 (gen_namespace_die): Generate DW_TAG_module for D.
2791 (gen_decl_die): Handle CONST_DECLSs for D.
2792 (dwarf2out_decl): Likewise.
2793 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2794 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2795 kinds of aggregates.
2796 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2797 * genhooks.c: Include d/d-target.def.
2799 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
2802 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2803 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2804 (STACK_DYNAMIC_OFFSET): Likewise.
2806 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
2809 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2812 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
2814 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2815 return type and other typos.
2817 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
2819 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2820 a shorter sequence with fewer branches.
2821 (emit_final_str_compare_gpr): Ditto.
2823 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2825 * config/rs6000/tmmintrin.h: New file.
2826 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2828 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2830 * config/rs6000/mmintrin.h: Enable 32bit compilation.
2831 * config/rs6000/xmmintrin.h: Likewise.
2833 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
2835 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2837 2018-10-26 Richard Biener <rguenther@suse.de>
2839 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2841 (vect_mark_slp_stmts_relevant): Likewise.
2842 (vect_detect_hybrid_slp_stmts): Likewise.
2843 (vect_bb_slp_scalar_cost): Likewise.
2844 (vect_remove_slp_scalar_calls): Likewise.
2846 2018-10-26 Jan Hubicka <jh@suse.cz>
2848 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2849 (warn_types_mismatch): Fix walk of DECL_NAME.
2850 (odr_types_equivalent_p): Fix overactive assert.
2852 2018-10-26 Richard Biener <rguenther@suse.de>
2854 PR tree-optimization/87105
2855 * tree-vectorizer.h (_slp_tree::refcnt): New member.
2856 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2858 (vect_create_new_slp_node): Initialize refcnt to one.
2860 (scalar_stmts_set_t, bst_fail): Remove.
2861 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2862 (vect_build_slp_tree): Add bst_map argument and lookup
2863 already created SLP nodes.
2864 (vect_print_slp_tree): Handle a SLP graph, print SLP node
2866 (vect_slp_rearrange_stmts): Handle a SLP graph.
2867 (vect_analyze_slp_instance): Adjust and free SLP nodes from
2868 the CSE map. Fix indenting.
2869 (vect_schedule_slp_instance): Add short-cut.
2871 2018-10-26 Martin Liska <mliska@suse.cz>
2874 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2875 addr_expr and not with pointers.
2877 2018-10-26 Jan Hubicka <jh@suse.cz>
2879 * tree.c (free_lang_data_in_type): Only check main variants.
2880 * ipa-devirt.c (warn_odr): Make static.
2881 (types_same_for_odr): Drop strict variant.
2882 (types_odr_comparable): Likewise.
2883 (odr_or_derived_type_p): Look for main variants.
2884 (odr_name_hasher::equal): Cleanup comment.
2885 (odr_subtypes_equivalent): Add warn and warned arguments; check main
2887 (type_variants_equivalent_p): break out from ...
2888 (odr_types_equivalent): ... here; go for main variants where needed.
2889 (warn_odr): ... here; turn static.
2890 (warn_types_mismatch): Compare mangled names of main variants.
2891 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2892 (type_with_linkage_p): Sanity check that we look at main variant.
2893 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2894 * tree.h (types_same_for_odr): Drop strict argument.
2896 2018-10-26 Richard Biener <rguenther@suse.de>
2898 PR tree-optimization/87746
2899 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2900 Simplify and fix WRT strided store groups with size not
2901 equal to step in element count.
2902 (vect_analyze_group_access_1): Dump the whole group.
2904 2018-10-25 Carl Love <cel@us.ibm.com>
2906 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2907 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2908 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
2909 precicion entry for each overloaded builtin.
2910 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2911 VSCEDPUO): Rename overloaded name.
2912 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2913 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2914 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2915 define_expand for xscmpexqp instruction.
2916 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2918 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2919 Jinsong Ji <jji@us.ibm.com>
2921 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2922 function with vec_sl.
2923 (_mm_slli_epi32): Likewise.
2924 (_mm_slli_epi64): Likewise.
2925 (_mm_srai_epi16): Replace deprecated function with vec_sra.
2926 (_mm_srai_epi32): Likewise.
2927 (_mm_srli_epi16): Replace deprecated function with vec_sr.
2928 (_mm_srli_epi32): Likewise.
2929 (_mm_srli_epi64): Likewise.
2930 (_mm_sll_epi16): Replace deprecated function with vec_sl.
2931 (_mm_sll_epi32): Likewise.
2932 (_mm_sll_epi64): Likewise.
2933 (_mm_sra_epi16): Replace deprecated function with vec_sra.
2934 (_mm_sra_epi32): Likewise.
2935 (_mm_srl_epi16): Replace deprecated function with vec_sr.
2936 (_mm_srl_epi32): Likewise.
2937 (_mm_srl_epi64): Likewise.
2939 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2940 Jinsong Ji <jji@us.ibm.com>
2942 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2943 comparison operators with vec_cmp* for compatibility due to
2944 unfortunate history; clean up formatting and use types more
2946 (_mm_sll_epi32): Likewise.
2947 (_mm_sll_epi64): Likewise.
2948 (_mm_srl_epi16): Likewise.
2949 (_mm_srl_epi32): Likewise.
2950 (_mm_srl_epi64): Likewise.
2952 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
2953 Jinsong Ji <jji@us.ibm.com>
2955 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2956 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2957 __vector __bool int. Use vec_cmpgt in preference to deprecated
2958 function vec_vcmpgtfp.
2959 (_mm_max_ps): Likewise.
2961 2018-10-25 Jeff Law <law@redhat.com>
2963 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2966 2018-10-25 Martin Sebor <msebor@redhat.com>
2968 * doc/extend.texi (aligned): Expand attribute description.
2969 (Alignment): Rename section. Discuss function arguments.
2971 2018-10-25 Jan Hubicka <jh@suse.cz>
2973 * ipa-devirt.c (main_odr_variant): Remove.
2974 (hash_odr_name, types_same_for_odr, types_odr_comparable,
2975 odr_name_hasher::equal, odr_subtypes_equivalent_p):
2976 Drop use of main_odr_variant.
2977 (add_type_duplicate): Silence confused warnings on integer types.
2978 (get_odr_type): Always look for main variant.
2979 (register_odr_type): Simplify.
2981 2018-10-25 Richard Biener <rguenther@suse.de>
2983 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2984 Initialize ng to silence error with release checking bootstrap.
2986 2018-10-25 Richard Biener <rguenther@suse.de>
2988 * tree-if-conv.c: Include tree-ssa-sccvn.h.
2989 (tree_if_conversion): Run CSE on the if-converted loop body.
2991 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
2993 * config/s390/constraints.md (ZL): New constraint.
2994 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2996 * config/s390/s390.md (movdi_larl): Remove.
2997 (movdi_64): Add the LARL alternative.
2999 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
3002 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
3003 (RTX_CODE_HWINT_P): New macro.
3004 (rtx_code_size): Use RTX_CODE_HWINT_P ().
3006 2018-10-25 Jan Hubicka <jh@suse.cz>
3008 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
3011 2018-10-25 Richard Biener <rguenther@suse.de>
3013 PR tree-optimization/87665
3014 PR tree-optimization/87745
3015 * tree-vectorizer.h (get_earlier_stmt): Remove.
3016 (get_later_stmt): Pick up UID from the original non-pattern stmt.
3018 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
3020 * options.texi (Deprecated): Move list to Var section.
3022 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
3023 Jinsong Ji <jji@us.ibm.com>
3025 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
3026 __vector long to __vector long long.
3027 (_mm_cvtpd_ps): Likewise.
3028 (_mm_cvttpd_epi32): Likewise.
3029 (_mm_cvtpi32_pd): Likewise.
3030 (_mm_unpackhi_epi64): Likewise.
3031 (_mm_unpacklo_epi64): Likewise.
3033 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
3035 PR rtl-optimization/87720
3036 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
3038 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
3040 * gimple-ssa-isolate-paths.c
3041 (find_implicit_erroneous_behavior): Do not change code if the
3042 pass is running for warnings only.
3043 (find_explicit_erroneous_behavior): Likewise.
3045 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
3047 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
3048 Define as rs6000_mangle_decl_assembler_name.
3049 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
3050 long double to IEEE long double, switch the names of the long
3051 double built-in functions to be <func>f128 instead of <func>l.
3053 2018-10-24 Martin Sebor <msebor@redhat.com>
3055 * doc/extend.texi (nonnull): List no-argument form. Reference
3056 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
3058 2018-10-24 Richard Biener <rguenther@suse.de>
3060 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
3062 2018-10-24 Martin Liska <mliska@suse.cz>
3064 PR tree-optimization/84436
3065 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
3067 (switch_conversion::contains_linear_function_p): New.
3068 (switch_conversion::build_one_array): Support linear
3069 transformation on input.
3070 * tree-switch-conversion.h (struct switch_conversion): Add
3071 contains_linear_function_p declaration.
3073 2018-10-24 Richard Biener <rguenther@suse.de>
3075 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
3076 if its argument is CONSTANT_CLASS_P.
3078 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
3080 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
3081 it is wrong for forward declarations.
3083 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
3085 * config/s390/s390.c (s390_check_qrst_address): Add the missing
3086 SYMBOL_REF_P () check.
3088 2018-10-24 Richard Biener <rguenther@suse.de>
3090 PR tree-optimization/87105
3091 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
3092 dump classification.
3093 (vect_analyze_data_ref_accesses): Handle duplicate loads and
3094 stores by splitting the affected group after the fact.
3095 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
3096 fail the SLP build because of size constraints.
3098 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3100 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
3101 * configure: Regenerate.
3102 * config.in: Regenerate.
3103 * varasm.c (mergeable_string_section): Use readonly_data_section
3104 if linker doesn't support SHF_MERGE with alignment > 8.
3105 (mergeable_constant_section): Likewise.
3107 2018-10-24 Richard Biener <rguenther@suse.de>
3109 PR tree-optimization/84013
3110 * tree-ssa-structalias.c (struct msdi_data): New struct for
3111 marshalling data to walk_stmt_load_store_ops.
3112 (maybe_set_dependence_info): Refactor as callback for
3113 walk_stmt_load_store_ops.
3114 (compute_dependence_clique): Set restrict info on all stmt kinds.
3116 2018-10-24 Martin Liska <mliska@suse.cz>
3118 * cgraph.c (cgraph_node::dump):
3119 Remove reduntant dumps and make tp_first_run dump more compact.
3121 2018-10-24 Richard Biener <rguenther@suse.de>
3123 PR tree-optimization/87665
3124 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
3127 2018-10-12 Jeff Law <law@redhat.com>
3129 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
3132 2018-10-23 Richard Biener <rguenther@suse.de>
3134 * tree-vrp.c (add_assert_info): Guard dump_printf with
3136 * gimple-ssa-evrp-analyze.c
3137 (evrp_range_analyzer::record_ranges_from_incoming_edge):
3138 Use value_range::ignore_equivs_equal_p.
3140 2018-10-23 Richard Biener <rguenther@suse.de>
3142 PR tree-optimization/87105
3143 PR tree-optimization/87608
3144 * passes.def (pass_all_early_optimizations): Add early phi-opt
3146 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
3147 addition to debug stmts.
3148 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
3149 and abs replacement early.
3150 * tree-cfg.c (gimple_empty_block_p): Likewise.
3152 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
3155 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
3156 specified to configure.
3157 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
3159 2018-10-23 Richard Biener <rguenther@suse.de>
3161 PR tree-optimization/87700
3162 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
3164 2018-10-23 Jakub Jelinek <jakub@redhat.com>
3167 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
3168 second argument from __mmask16 to __mmask8.
3169 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
3170 _mm_mask_packs_epi32): Likewise.
3171 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
3173 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
3175 2018-10-23 Richard Biener <rguenther@suse.de>
3177 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
3179 2018-10-23 Richard Biener <rguenther@suse.de>
3181 PR tree-optimization/86144
3182 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
3183 over simd attribute.
3185 2018-10-23 Richard Biener <rguenther@suse.de>
3187 PR tree-optimization/87693
3188 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
3189 the case we do not find the taken edge.
3191 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
3192 Jinsong Ji <jji@us.ibm.com>
3194 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
3195 (_mm_store_pd): Use unaligned vector type for pointer cast.
3196 (_mm_maskmoveu_si128): Likewise.
3197 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
3198 (_mm_store_ps): Use unaligned vector type for pointer cast.
3200 2018-10-22 Paul Koning <ni1d@arrl.net>
3202 * symtab.c (symtab_node::increase_alignment): Correct max
3205 2018-10-22 Yury Gribov <tetra2005@gmail.com>
3207 PR tree-optimization/87633
3208 * match.pd: Do not generate unordered integer comparisons.
3210 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3212 PR rtl-optimization/87600
3213 * combine.c: Add include of expr.h.
3214 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
3215 register to a pseudo.
3216 (make_more_copies): New function, add a copy to a new pseudo after
3217 the moves from hard registers into pseudos.
3218 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
3219 later. Call make_more_copies.
3221 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
3223 * lra-constraints.c (process_alt_operands): New local array,
3224 matching_early_clobber. Check matching_early_clobber before
3225 decrementing reject, and set matching_early_clobber after.
3227 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
3230 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
3231 call output_addr_const and hope for the best.
3233 2018-10-22 Richard Biener <rguenther@suse.de>
3235 * gimple-ssa-evrp-analyze.c
3236 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
3237 smarter about what ranges to use.
3238 * tree-vrp.c (add_assert_info): Dump here.
3239 (register_edge_assert_for_2): Instead of here at multiple but
3242 * gcc.dg/tree-ssa/evrp12.c: New testcase.
3243 * gcc.dg/predict-6.c: Adjust.
3244 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
3245 * gcc.dg/tree-ssa/vrp02.c: Likewise.
3246 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
3248 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
3249 Richard Biener <rguenther@suse.de>
3251 * bitmap.h: Update data structure documentation, including a
3252 description of bitmap views as either linked-lists or splay trees.
3253 (struct bitmap_element_def): Update comments for splay tree bitmaps.
3254 (struct bitmap_head_def): Likewise.
3255 (bitmap_list_view, bitmap_tree_view): New prototypes.
3256 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
3258 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
3259 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
3260 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
3261 released bitmap element here.
3262 (bitmap_element_free): Remove.
3263 (bitmap_elt_clear_from): Work on splay tree bitmaps.
3264 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
3265 this function similar ones such that linked-list bitmap implementation
3266 functions are grouped.
3267 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
3268 and moved for grouping.
3269 (bitmap_list_insert_element_after): Renamed from
3270 bitmap_elt_insert_after, and moved for grouping.
3271 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
3272 (bitmap_tree_link_left, bitmap_tree_link_right,
3273 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
3274 bitmap_tree_link_element, bitmap_tree_unlink_element,
3275 bitmap_tree_find_element): New functions for splay-tree bitmap
3277 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
3278 Renamed and moved, see above entries.
3279 (bitmap_tree_listify_from): New function to convert part of a splay
3280 tree bitmap to a linked-list bitmap.
3281 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
3282 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
3283 (bitmap_find_bit): Remove.
3284 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
3285 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
3286 Handle splay tree bitmaps.
3287 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
3288 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
3289 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
3290 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
3291 bitmap_intersect_compl_p, bitmap_ior_and_compl,
3292 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
3293 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
3294 corresponding changes to use linked-list specific bitmap_element
3295 manipulation functions as applicable for efficiency.
3296 (bitmap_tree_to_vec): New function.
3297 (debug_bitmap_elt_file): New function split out from ...
3298 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
3299 (bitmap_print): Likewise.
3301 PR tree-optimization/63155
3302 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
3304 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
3307 2018-10-22 Martin Liska <mliska@suse.cz>
3309 PR tree-optimization/87686
3311 2018-08-29 Martin Liska <mliska@suse.cz>
3313 * tree-switch-conversion.c (switch_conversion::expand):
3314 Strenghten assumption about gswitch statements.
3316 2018-10-22 Martin Liska <mliska@suse.cz>
3318 * ipa-icf.c (sem_item::compare_attributes): Remove.
3319 (sem_item::compare_referenced_symbol_properties): Use
3320 attribute_list_equal instead.
3321 (sem_function::equals_wpa): Likewise.
3322 * ipa-icf.h: Remove compare_attributes.
3324 2018-10-22 Richard Biener <rguenther@suse.de>
3327 * mem-stats.h (mem_usage::operator==): Fix pasto.
3329 2018-10-22 Richard Biener <rguenther@suse.de>
3331 PR tree-optimization/87640
3332 * tree-vrp.c (set_value_range_with_overflow): Decompose
3334 (extract_range_from_binary_expr_1): Adjust.
3336 2018-10-22 Martin Jambor <mjambor@suse.cz>
3338 * tree-eh.h (stmt_could_throw_p): Add function parameter.
3339 (stmt_can_throw_external): Likewise.
3340 (stmt_can_throw_internal): Likewise.
3341 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
3342 (lower_eh_constructs_2): Likewise.
3343 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
3344 (stmt_can_throw_external): Likewise.
3345 (stmt_can_throw_internal): Likewise.
3346 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
3347 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
3348 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
3349 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
3350 (pass_lower_eh_dispatch::execute): Pass cfun to
3351 stmt_can_throw_external.
3352 (cleanup_empty_eh): Likewise.
3353 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
3354 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
3355 stmt_can_throw_external instead of pushing it to cfun.
3356 (symbol_table::create_edge): Likewise.
3357 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
3358 stmt_can_throw_internal.
3359 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
3360 to stmt_could_throw_p.
3361 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
3362 stmt_can_throw_internal.
3363 (pass_store_merging::execute): Likewise.
3364 * gimple-ssa-strength-reduction.c
3365 (find_candidates_dom_walker::before_dom_children): Pass cfun to
3367 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
3368 stmt_can_throw_internal.
3369 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
3370 to stmt_can_throw_external.
3371 (check_stmt): Pass cfun to stmt_could_throw_p.
3372 (check_stmt): Pass cfun to stmt_can_throw_external.
3373 (pass_nothrow::execute): Likewise.
3374 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
3375 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
3376 stmt_can_throw_internal.
3377 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
3378 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
3379 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
3380 * tree-complex.c (expand_complex_libcall): Pass cfun to
3381 stmt_could_throw_p and to stmt_can_throw_internal.
3382 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
3383 * tree-inline.c (copy_edges_for_bb): Likewise.
3384 (maybe_move_debug_stmts_to_successors): Likewise.
3385 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
3387 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
3388 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
3389 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
3390 stmt_can_throw_internal.
3391 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
3392 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
3394 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
3395 stmt_can_throw_internal.
3396 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
3397 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
3399 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
3400 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
3401 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
3402 (convert_mult_to_fma_1): Likewise.
3403 (convert_to_divmod): Likewise.
3404 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
3405 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
3406 * tree-ssa-propagate.c
3407 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
3408 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
3409 (maybe_optimize_range_tests): Likewise.
3410 (linearize_expr_tree): Likewise.
3411 (reassociate_bb): Likewise.
3412 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3413 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
3414 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
3415 (handle_char_store): Likewise.
3416 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
3417 stmt_can_throw_internal.
3418 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
3420 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
3421 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
3422 (vectorizable_simd_clone_call): Likewise.
3423 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
3424 (gimple_stringop_fixed_value): Likewise.
3426 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
3428 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
3429 literal pool references.
3430 (s390_check_qrst_address): Adapt to the new behavior of
3431 s390_loadrelative_operand_p ().
3433 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3436 * config/i386/sse.md (*andnot<mode>3_bcst): New.
3438 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3441 * config/i386/sse.md (*<code><mode>3_bcst): New.
3443 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
3446 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
3447 V4DI, V16SI and V8DI.
3448 (*sub<mode>3<mask_name>_bcst): New.
3449 (*add<mode>3<mask_name>_bcst): Likewise.
3451 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
3452 Jinsong Ji <jji@us.ibm.com>
3454 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
3455 __m64 with __vector unsigned long long for compatibility.
3456 (_mm_movemask_epi8): Likewise.
3457 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
3458 (_mm_cvttps_pi32): Likewise.
3459 (_mm_cvtpi32_ps): Likewise.
3460 (_mm_cvtps_pi16): Likewise.
3461 (_mm_loadh_pi): Likewise.
3462 (_mm_storeh_pi): Likewise.
3463 (_mm_movehl_ps): Likewise.
3464 (_mm_movelh_ps): Likewise.
3465 (_mm_loadl_pi): Likewise.
3466 (_mm_storel_pi): Likewise.
3467 (_mm_movemask_ps): Likewise.
3468 (_mm_shuffle_pi16): Likewise.
3470 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3473 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
3474 __builtin_ia32_vfnmsubpd512_mask.
3475 (_mm512_mask_fnmsub_round_pd): Likewise.
3476 (_mm512_fnmsub_pd): Likewise.
3477 (_mm512_mask_fnmsub_pd): Likewise.
3478 (_mm512_maskz_fnmsub_round_pd): Use
3479 __builtin_ia32_vfnmsubpd512_maskz.
3480 (_mm512_maskz_fnmsub_pd): Likewise.
3481 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
3482 (_mm512_mask_fnmsub_round_ps): Likewise.
3483 (_mm512_fnmsub_ps): Likewise.
3484 (_mm512_mask_fnmsub_ps): Likewise.
3485 (_mm512_maskz_fnmsub_round_ps): Use
3486 __builtin_ia32_vfnmsubps512_maskz.
3487 (_mm512_maskz_fnmsub_ps): Likewise.
3488 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
3489 __builtin_ia32_vfnmsubpd256_mask.
3490 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
3491 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3492 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
3493 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3494 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
3495 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
3496 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
3497 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
3498 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
3499 __builtin_ia32_vfnmsubpd.
3500 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
3501 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
3502 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
3503 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
3504 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
3505 * config/i386/i386-builtin.def: Add
3506 __builtin_ia32_vfnmsubpd256_mask,
3507 __builtin_ia32_vfnmsubpd256_maskz,
3508 __builtin_ia32_vfnmsubpd128_mask,
3509 __builtin_ia32_vfnmsubpd128_maskz,
3510 __builtin_ia32_vfnmsubps256_mask,
3511 __builtin_ia32_vfnmsubps256_maskz,
3512 __builtin_ia32_vfnmsubps128_mask,
3513 __builtin_ia32_vfnmsubps128_maskz,
3514 __builtin_ia32_vfnmsubpd512_mask,
3515 __builtin_ia32_vfnmsubpd512_maskz,
3516 __builtin_ia32_vfnmsubps512_mask,
3517 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
3518 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
3519 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
3520 __builtin_ia32_vfnmsubpd256.
3521 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
3522 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
3523 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
3525 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
3527 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
3529 (fmai_vmfnmsub_<mode><round_name>): Likewise.
3531 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3534 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
3535 __builtin_ia32_vfnmaddpd512_mask.
3536 (_mm512_mask_fnmadd_round_pd): Likewise.
3537 (_mm512_fnmadd_pd): Likewise.
3538 (_mm512_mask_fnmadd_pd): Likewise.
3539 (_mm512_maskz_fnmadd_round_pd): Use
3540 __builtin_ia32_vfnmaddpd512_maskz.
3541 (_mm512_maskz_fnmadd_pd): Likewise.
3542 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
3543 (_mm512_mask_fnmadd_round_ps): Likewise.
3544 (_mm512_fnmadd_ps): Likewise.
3545 (_mm512_mask_fnmadd_ps): Likewise.
3546 (_mm512_maskz_fnmadd_round_ps): Use
3547 __builtin_ia32_vfnmaddps512_maskz.
3548 (_mm512_maskz_fnmadd_ps): Likewise.
3549 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
3550 __builtin_ia32_vfnmaddpd256_mask.
3551 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
3552 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
3553 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
3554 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3555 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
3556 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
3557 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
3558 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
3559 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
3560 __builtin_ia32_vfnmaddpd.
3561 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
3562 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
3563 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
3564 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
3565 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
3566 * config/i386/i386-builtin.def: Add
3567 __builtin_ia32_vfnmaddpd256_mask,
3568 __builtin_ia32_vfnmaddpd256_maskz,
3569 __builtin_ia32_vfnmaddpd128_mask,
3570 __builtin_ia32_vfnmaddpd128_maskz,
3571 __builtin_ia32_vfnmaddps256_mask,
3572 __builtin_ia32_vfnmaddps256_maskz,
3573 __builtin_ia32_vfnmaddps128_mask,
3574 __builtin_ia32_vfnmaddps128_maskz,
3575 __builtin_ia32_vfnmaddpd512_mask,
3576 __builtin_ia32_vfnmaddpd512_maskz,
3577 __builtin_ia32_vfnmaddps512_mask,
3578 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
3579 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
3580 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
3581 __builtin_ia32_vfnmaddpd256.
3582 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
3583 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
3584 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
3586 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
3588 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
3590 (fmai_vmfnmadd_<mode><round_name>): Likewise.
3592 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3595 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
3596 __builtin_ia32_vfmsubpd512_mask.
3597 (_mm512_mask_fmsub_round_pd): Likewise.
3598 (_mm512_fmsub_pd): Likewise.
3599 (_mm512_mask_fmsub_pd): Likewise.
3600 (_mm512_maskz_fmsub_round_pd): Use
3601 __builtin_ia32_vfmsubpd512_maskz.
3602 (_mm512_maskz_fmsub_pd): Likewise.
3603 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3604 (_mm512_mask_fmsub_round_ps): Likewise.
3605 (_mm512_fmsub_ps): Likewise.
3606 (_mm512_mask_fmsub_ps): Likewise.
3607 (_mm512_maskz_fmsub_round_ps): Use
3608 __builtin_ia32_vfmsubps512_maskz.
3609 (_mm512_maskz_fmsub_ps): Likewise.
3610 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3611 __builtin_ia32_vfmsubpd256_mask.
3612 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3613 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3614 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3615 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3616 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3617 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3618 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3619 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3620 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3621 __builtin_ia32_vfmsubpd.
3622 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3623 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3624 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3625 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3626 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3627 * config/i386/i386-builtin.def: Add
3628 __builtin_ia32_vfmsubpd256_mask,
3629 __builtin_ia32_vfmsubpd256_maskz,
3630 __builtin_ia32_vfmsubpd128_mask,
3631 __builtin_ia32_vfmsubpd128_maskz,
3632 __builtin_ia32_vfmsubps256_mask,
3633 __builtin_ia32_vfmsubps256_maskz,
3634 __builtin_ia32_vfmsubps128_mask,
3635 __builtin_ia32_vfmsubps128_maskz,
3636 __builtin_ia32_vfmsubpd512_mask,
3637 __builtin_ia32_vfmsubpd512_maskz,
3638 __builtin_ia32_vfmsubps512_mask,
3639 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3640 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3641 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3642 __builtin_ia32_vfmsubpd256.
3643 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3644 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3645 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3647 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3649 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3651 (fmai_vmfmsub_<mode><round_name>): Likewise.
3653 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3655 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3656 Remove plus. Renamed to ...
3657 (*sub<mode>3<mask_name>_bcst): This.
3658 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3659 (*add<mode>3<mask_name>_bcst): This.
3661 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3664 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3666 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
3669 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3670 (_mm_or_epi32): Likewise.
3671 (_mm256_xor_epi32): Likewise.
3672 (_mm_xor_epi32): Likewise.
3673 (_mm256_or_epi64): Likewise.
3674 (_mm_or_epi64): Likewise.
3675 (_mm256_xor_epi64): Likewise.
3676 (_mm_xor_epi64): Likewise.
3678 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
3681 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3683 2018-10-20 Jakub Jelinek <jakub@redhat.com>
3686 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3688 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
3690 * doc/ux.texi: Move @section directly after @node.
3692 2018-10-19 Jakub Jelinek <jakub@redhat.com>
3696 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3697 depend closely nested inside of loop with ordered clause with
3700 2018-10-19 David Malcolm <dmalcolm@redhat.com>
3702 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3703 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3704 * doc/ux.texi: New file.
3706 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
3708 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3709 be the first CR field allocated.
3711 2018-10-19 Richard Biener <rguenther@suse.de>
3714 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3715 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3717 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3720 * config/i386/sse.md
3721 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3722 (*add<mode>3<mask_name>_bcst_2): Likewise.
3724 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
3726 * config/i386/sse.md
3727 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3728 Replace nonimmediate_operand with register_operand.
3729 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3731 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3734 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
3736 PR rtl-optimization/87596
3737 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3738 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3739 for instructions in FROM..TO range.
3741 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
3743 * cfgexpand.c (expand_one_var): Use specific wording in error message
3744 for non-local frame variables.
3745 * stor-layout.c (layout_decl): Do not issue a warning for them.
3747 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
3749 * haifa-sched.c (priority): Add force_recompute parameter.
3750 (apply_replacement): Call priority () with force_recompute = true.
3751 (restore_pattern): Likewise.
3753 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3755 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3756 HOST_BITS_PER_WIDE_INT.
3757 (test_vector_ops_duplicate): Likewise.
3759 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3762 * config/i386/sse.md (VF_AVX512): New.
3763 (avx512bcst): Likewise.
3764 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3766 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3768 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3771 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
3773 * doc/invoke.texi (-dumpversion): Improve grammar.
3774 (-dumpfullversion): Make more consistent with -dumpversion.
3776 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
3778 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3779 Set JUMP_LABEL to the jump insn.
3780 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3781 Predict emitted jump and add label to jump insn.
3783 2018-10-18 David Malcolm <dmalcolm@redhat.com>
3785 PR tree-optimization/87562
3786 * input.c (get_substring_ranges_for_loc): Use
3787 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3788 getting the linemap for the endpoint. Verify that it's either
3789 in the same linemap as the start point's spelling location, or
3790 at least in the same file.
3792 2018-10-18 Richard Biener <rguenther@suse.de>
3794 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3795 feed width-specific load/store costs through ix86_vec_cost.
3796 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3797 (k8_cost): Likewise.
3798 (bdver_cost): Likewise.
3799 (znver1_cost): Likewise.
3800 (btver1_cost): Likewise.
3801 (btver2_cost): Likewise.
3803 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3805 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3806 to simplify subreg of vec_merge.
3808 2018-10-18 Richard Biener <rguenther@suse.de>
3810 * config/i386/i386.c: Fix costing of vector FMA.
3812 2018-10-18 Richard Biener <rguenther@suse.de>
3814 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3816 (ix86_builtin_vectorization_cost): For vec_construct properly
3817 cost insertion into SSE regs.
3818 (...): Adjust calls to ix86_vec_cost.
3820 2018-10-18 Richard Biener <rguenther@suse.de>
3824 2018-02-07 Richard Biener <rguenther@suse.de>
3826 PR tree-optimization/84204
3827 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3830 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
3833 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3835 (test_vector_ops_duplicate): Add test for a scalar subreg of a
3836 VEC_MERGE of a VEC_DUPLICATE.
3838 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3840 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3841 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3842 * doc/standards.texi (C Language): Document C2X.
3843 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3844 (rl78_option_override): Handle "GNU C2X" language name.
3846 2018-10-17 Joseph Myers <joseph@codesourcery.com>
3848 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3849 Document C17 as published in 2018.
3851 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
3854 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3855 bail out if both sides do not have the same storage order.
3857 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
3859 * bitmap.c (bitmap_head::dump): New.
3860 * bitmap.h (bitmap_head): Add dump().
3861 * gimple-ssa-evrp-analyze.c
3862 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3863 (evrp_range_analyzer::set_ssa_range_info): Same.
3864 (evrp_range_analyzer::record_ranges_from_phis): Same.
3865 (evrp_range_analyzer::record_ranges_from_stmt): Same.
3866 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3867 * gimple-ssa-sprintf.c (get_int_range): Same.
3868 (format_integer): Same.
3869 (sprintf_dom_walker::handle_gimple_call): Same.
3870 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3871 (ipcp_vr_lattice::top_p): Same.
3872 (ipcp_vr_lattice::bottom_p): Same.
3873 (ipcp_vr_lattice::set_to_bottom): Same.
3874 (ipa_vr_operation_and_type_effects): Same.
3875 (propagate_vr_across_jump_function): Same.
3876 (ipcp_store_vr_results): Same.
3877 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3878 (ipa_print_node_jump_functions_for_edge): Same.
3879 (ipa_get_value_range): Same.
3880 (ipa_compute_jump_functions_for_edge): Same.
3881 (ipa_write_jump_function): Same.
3882 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3883 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3885 * vr-values.c (set_value_range_to_nonnegative): Same.
3886 (set_value_range_to_truthvalue): Same.
3887 (vr_values::get_value_range): Same.
3888 (vr_values::set_defs_to_varying): Same.
3889 (vr_values::update_value_range): Same.
3890 (symbolic_range_based_on_p): Same.
3891 (vr_values::op_with_boolean_value_range_p): Same.
3892 (vr_values::extract_range_for_var_from_comparison_expr): Same.
3893 (vr_values::extract_range_from_ssa_name): Same.
3894 (vr_values::extract_range_from_binary_expr): Same.
3895 (vr_values::extract_range_from_unary_expr): Same.
3896 (vr_values::extract_range_from_cond_expr): Same.
3897 (vr_values::extract_range_from_comparison): Same.
3898 (vr_values::check_for_binary_op_overflow): Same.
3899 (vr_values::extract_range_basic): Same.
3900 (vr_values::extract_range_from_assignment): Same.
3901 (compare_ranges): Same.
3902 (compare_range_with_value): Same.
3903 (vr_values::adjust_range_with_scev): Same.
3904 (vrp_valueize): Same.
3905 (vrp_valueize_1): Same.
3906 (vr_values::get_vr_for_comparison): Same.
3907 (vr_values::compare_name_with_value): Same.
3908 (vr_values::compare_names): Same.
3909 (vr_values::vrp_evaluate_conditional): Same.
3910 (find_case_label_ranges): Same.
3911 (vr_values::vrp_visit_switch_stmt): Same.
3912 (vr_values::extract_range_from_phi_node): Same.
3913 (vr_values::simplify_div_or_mod_using_ranges): Same.
3914 (vr_values::simplify_bit_ops_using_ranges): Same.
3915 (test_for_singularity): Same.
3916 (range_fits_type_p): Same.
3917 (vr_values::simplify_cond_using_ranges_1): Same.
3918 (vr_values::simplify_switch_using_ranges): Same.
3919 (vr_values::simplify_float_conversion_using_ranges): Same.
3920 (vr_values::two_valued_val_range_p): Same.
3921 (vr_values::add_equivalence): Move to value_range::equiv_add.
3922 * vr-values.h (vr_values::add_equivalence): Remove.
3923 (VR_INITIALIZER): Remove.
3924 * tree-vrp.c (value_range::set): New.
3925 (value_range::equiv_add): New.
3926 (value_range::value_range): New.
3927 (value_range::deep_copy): New.
3928 (value_range::check): New.
3929 (value_range::equal_p): New.
3930 (value_range::ignore_equivs_equal_p): New.
3931 (value_range::operator==): New.
3932 (value_range::operator!=): New.
3933 (value_range::symbolic_p): New.
3934 (value_range::numeric_p): New.
3935 (value_range::set_undefined): New.
3936 (value_range::set_varying): New.
3937 (value_range::may_contain_p): New.
3938 (value_range::equiv_clear): New.
3939 (value_range::singleton_p): New.
3940 (value_range::intersect): New.
3941 (value_range::dump): New.
3942 (value_range::set_and_canonicalize): New.
3943 (set_value_range): Adjust for value_range API.
3944 (set_value_range_to_undefined): Same.
3945 (set_value_range_to_varying): Same.
3946 (set_and_canonicalize_value_range): Same.
3947 (set_value_range_to_nonnull): Same.
3948 (set_value_range_to_null): Same.
3949 (range_is_null): Same.
3950 (range_is_nonnull): Same.
3951 (range_int_cst_p): Same.
3952 (range_int_cst_singleton_p): Same.
3953 (symbolic_range_p): Same.
3954 (range_includes_zero_p): Same.
3955 (value_range_constant_singleton): Same.
3956 (vrp_set_zero_nonzero_bits): Same.
3957 (ranges_from_anti_range): Same.
3958 (extract_range_into_wide_ints): Same.
3959 (extract_range_from_multiplicative_op): Same.
3960 (set_value_range_with_overflow): Same.
3961 (extract_range_from_binary_expr_1): Same.
3962 (extract_range_from_unary_expr): Same.
3963 (dump_value_range): Same.
3964 (debug_value_range): Same.
3965 (vrp_prop::check_array_ref): Same.
3966 (vrp_prop::check_mem_ref): Same.
3967 (vrp_prop::vrp_initialize): Same.
3968 (vrp_prop::visit_stmt): Same.
3969 (intersect_ranges): Same.
3970 (vrp_prop::visit_phi): Same.
3971 (vrp_prop::vrp_finalize): Same.
3972 (determine_value_range_1): Same.
3973 (determine_value_range): Same.
3974 (vrp_intersect_ranges_1): Rename to...
3975 (vrp_intersect_1): this.
3976 (vrp_intersect_ranges): Rename to...
3977 (value_range::intersect_helper): ...this.
3978 (vrp_meet_1): Rename to...
3979 (value_range::union_helper): ...this.
3980 (vrp_meet): Rename to...
3981 (value_range::union_): ...this.
3982 (copy_value_range): Remove.
3983 * tree-vrp.h (struct value_range): Rewrite into a proper class.
3984 (value_range::vrtype): New.
3985 (value_range::type): New.
3986 (value_range::equiv): New.
3987 (value_range::min): New.
3988 (value_range::max): New.
3989 (value_range::varying_p): New.
3990 (value_range::undefined_p): New.
3991 (value_range::null_p): New.
3992 (value_range::equiv_add): New.
3993 (copy_value_range): Remove.
3995 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3997 * Makefile.in (SELFTEST_TARGETS): New.
3998 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3999 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
4000 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
4002 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
4003 (selftest-c++-gdb, selftest-c++-valgrind): Move to
4005 * configure: Regenerate.
4006 * configure.ac (selftest_languages): New.
4008 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4010 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
4011 overflow wraps argument.
4012 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
4013 wide_int_range_multiplicative_op.
4014 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
4015 overflow wraps argument.
4016 (wide_int_range_multiplicative_op): Same.
4017 (wide_int_range_lshift): Same.
4018 (wide_int_range_div): Same.
4019 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
4020 (wide_int_range_lshift): Same.
4021 (wide_int_range_div): Same.
4023 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
4025 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
4026 use sign as argument.
4027 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
4028 wide_int_range_shift_undefined_p.
4030 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4032 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
4034 (@despeculate_copy<ALLI_TI:mode>): ... This.
4035 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
4038 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4040 * config.gcc: Obsolete *-*-solaris2.10*.
4041 * doc/install.texi (Specific, *-*-solaris2*): Document it.
4043 2018-10-12 Jeff Law <law@redhat.com>
4045 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
4046 reg + sym +- const_int addressing modes.
4048 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4050 * common.opt (fdiagnostics-minimum-margin-width=): New option.
4051 * diagnostic-show-locus.c (layout::layout): Apply the minimum
4053 (layout::start_annotation_line): Only print up to 3 of the
4054 margin character, to avoid touching the left-hand side.
4055 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
4056 minimum margin width, as set by test_diagnostic_context's ctor.
4057 (selftest::test_fixit_insert_containing_newline): Likewise.
4058 (selftest::test_fixit_insert_containing_newline_2): Likewise.
4059 (selftest::test_line_numbers_multiline_range): Clear
4060 dc.min_margin_width.
4061 * diagnostic.c (diagnostic_initialize): Initialize
4063 * diagnostic.h (struct diagnostic_context): Add field
4065 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
4066 * opts.c (common_handle_option): Handle
4067 OPT_fdiagnostics_minimum_margin_width_.
4068 * selftest-diagnostic.c
4069 (selftest::test_diagnostic_context::test_diagnostic_context):
4070 Initialize min_margin_width to 6.
4071 * toplev.c (general_init): Initialize global_dc->min_margin_width.
4073 2018-10-15 David Malcolm <dmalcolm@redhat.com>
4075 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
4076 Fix usage of "error_at_rich_loc" in the comment.
4078 2018-10-15 Renlin Li <renlin.li@arm.com>
4081 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
4082 if-conversioned loop when it contains ifn with types not
4083 supported by backend.
4084 * internal-fn.c (expand_direct_optab_fn): Add an assert.
4085 (direct_internal_fn_supported_p): New helper function.
4086 * internal-fn.h (direct_internal_fn_supported_p): Declare.
4088 2018-10-15 Jakub Jelinek <jakub@redhat.com>
4091 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4092 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4093 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4095 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
4097 PR tree-optimization/87022
4098 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
4099 bits in dist vector rather than the first one.
4101 2018-10-15 Richard Biener <rguenther@suse.de>
4104 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
4105 (visit_loadstore): When a used restrict tag escaped verify that
4106 the points-to solution of "other" pointers do not include
4108 (compute_dependence_clique): If a used restrict tag escaped
4109 communicated that down to visit_loadstore.
4111 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
4113 * config/s390/s390.c (s390_expand_vec_init): Force vector element
4114 into reg if it isn't a general operand.
4116 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4119 * config/i386/sse.md (*vec_dupv2di): Add register source to
4122 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
4125 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
4126 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
4127 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
4128 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
4130 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
4132 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
4133 (notice_args_size): Set it in the current trace if no insn that can
4134 throw internally has been seen yet.
4135 (connect_traces): When connecting args_size between traces, allow the
4136 incoming values not to match if there is an insn setting it before the
4137 first insn that can throw internally; in that case, force the creation
4138 of a CFI note on this latter insn.
4140 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
4142 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
4143 the base class, because using the injected-class-name was not clearly
4144 specified until DR 176.
4146 2018-10-12 Paul Koning <ni1d@arrl.net>
4148 * config/pdp11/pdp11.md (doloop_end): New expander.
4149 (doloop_end_insn): renamed from "doloop_end".
4150 (addqi3): New pattern.
4151 (subqi3): New pattern.
4152 * config/pdp11/predicates.md (incdec_operand): New predicate.
4154 2018-10-12 Yury Gribov <tetra2005@gmail.com>
4157 * real.c (format_helper::can_represent_integral_type_p): New function
4158 * real.h (format_helper::can_represent_integral_type_p): Ditto.
4159 * match.pd: New pattern.
4161 2018-10-12 Alexandre Oliva <oliva@adacore.com>
4163 * configure.ac: Introduce --enable-large-address-aware
4164 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
4165 * doc/install.texi: Document it.
4166 * configure, config.in: Rebuilt.
4167 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
4168 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
4169 (LINK_SPEC): Insert it.
4170 * config/i386/mingw-w64.h: Likewise.
4172 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
4174 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
4176 PR rtl-optimization/87600
4177 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
4179 2018-10-12 Paul Koning <ni1d@arrl.net>
4181 * doc/md.texi (doloop_end): Document that the pattern code may
4182 need to check operand mode.
4184 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
4186 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
4187 to zero-extend between int and floating-point registers.
4188 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
4189 ldp into floating-point registers. Add type and arch attributes.
4190 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
4191 Use f_loads for type attribute.
4193 2018-10-11 Martin Sebor <msebor@redhat.com>
4195 * doc/extend.texi (attribute packed): Correct typos.
4197 2018-10-11 Martin Sebor <msebor@redhat.com>
4199 * doc/extend.texi (attribute flatten): Mention interaction with
4202 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4205 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
4206 Set new_decl virtual flag to zero.
4208 2018-10-11 Martin Sebor <msebor@redhat.com>
4211 * doc/extend.texi (attribute format_arg): Discuss using multiple
4212 attributes on a single function.
4214 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
4216 PR tree-optimization/86829
4217 * match.pd (sin (atan (x))): New simplification rules.
4218 (cos (atan (x))): Likewise.
4219 * real.c (build_sinatan_real): New function.
4220 * real.h (build_sinatan_real): Prototype.
4222 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
4224 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
4226 (fold_mergeeo_helper): New helper function.
4227 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
4228 intrinsics. Correct some whitespace indentation issues.
4230 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
4233 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
4234 Use HOST_WIDE_INT_1U for shift.
4236 2018-10-11 Doug Rupp <rupp@adacore.com>
4237 Olivier Hainque <hainque@adacore.com>
4239 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
4240 Pass --relax to the linker for RTPs.
4241 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
4243 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
4244 Jan Hubicka <jh@suse.cz>
4245 Martin Jambor <mjambor@suse.cz>
4247 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
4248 the same elements are repeated rather than printing all of them.
4249 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
4250 "repeated" elements.
4251 * read-rtl-function.c (test_loading_repeat): New function.
4252 (read_rtl_function_c_tests): Call test_loading_repeat.
4253 * rtl-tests.c (test_dumping_repeat): New function.
4254 (rtl_tests_c_tests): Call test_dumping_repeat.
4256 2018-10-11 Richard Biener <rguenther@suse.de>
4258 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
4259 bdver?_cost): Unify to ...
4260 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
4261 * config/i386/i386.c (processor_cost_table): Adjust.
4263 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
4266 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
4267 the thunk when expanding to GIMPLE.
4269 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
4271 * varasm.c (mergeable_string_section): Don't try to move zero-length
4272 strings to the merge section.
4274 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
4277 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
4279 2018-10-10 Jakub Jelinek <jakub@redhat.com>
4282 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
4283 to special_args set.
4285 2018-10-10 Richard Biener <rguenther@suse.de>
4287 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
4288 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
4289 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
4290 and recursing and pattern terminating the recursion on SSE
4291 vector width using ix86_expand_reduc.
4292 (reduc_sminmax_scal_<mode>): Split into part reducing to half
4293 width and recursing and SSE2 vector variant doing the final
4294 reduction with ix86_expand_reduc.
4295 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
4296 with terminating the recursion at AVX level, splitting that
4299 2018-10-09 David Malcolm <dmalcolm@redhat.com>
4301 * genmatch.c (error_cb): Rename to...
4302 (diagnostic_cb): ...this, converting int params to enums.
4303 (fatal_at): Update for renaming.
4304 (warning_at): Likewise.
4306 * input.c (selftest::ebcdic_execution_charset::apply):
4307 Update for renaming of...
4308 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
4310 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
4311 converting level and reason to enums.
4312 (class selftest::lexer_error_sink): Rename to...
4313 (class selftest::lexer_test_options): ...this, renaming field
4314 "m_errors" to "m_diagnostics".
4315 (selftest::lexer_test_options::apply): Update for renaming of...
4316 (selftest::lexer_test_options::on_error): ...this, renaming to...
4317 (selftest::lexer_test_options::on_diagnostic): ...this
4318 converting level and reason to enums.
4319 (selftest::test_lexer_string_locations_raw_string_unterminated):
4320 Update for renamings.
4321 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
4324 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
4326 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
4327 * config/rs6000/pmmintrin.h: New file.
4329 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
4331 PR tree-optimization/86659
4332 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
4334 2018-10-09 Richard Biener <rguenther@suse.de>
4336 PR tree-optimization/63155
4337 * tree-ssa-structalias.c: Include tree-ssa.h.
4338 (get_constraint_for_ssa_var): For undefs return nothing_id.
4339 (find_func_aliases): Cleanup PHI handling.
4341 2018-10-09 Richard Biener <rguenther@suse.de>
4343 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
4346 2018-10-09 Martin Liska <mliska@suse.cz>
4348 * asan.c (asan_emit_stack_protection): If a stack variable
4349 is located in a same file as current function, then emit
4350 line info into variable definition string.
4352 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4354 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
4357 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4359 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
4362 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
4364 PR tree-optimization/86659
4365 * gimple-match.h (struct gimple_match_op): Add reverse field.
4366 (gimple_match_op::set_op): New overloaded method.
4367 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
4368 the REF_REVERSE_STORAGE_ORDER flag on the value.
4369 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
4370 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
4372 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
4375 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
4376 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
4378 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
4381 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
4382 Defined with __builtin_ia32_vfmaddsubpd512_mask.
4384 2018-10-08 Richard Biener <rguenther@suse.de>
4386 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
4387 cost the same as AVX128 ones.
4389 2018-10-08 Paul Koning <ni1d@arrl.net>
4391 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
4392 (expand_block_move): New function.
4393 * config/pdp11/pdp11.c (output_block_move): Remove.
4394 (expand_block_move): New function.
4395 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
4396 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
4397 (*movmemhi1): Remove.
4399 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
4401 * config/s390/2827.md: Increase latencies for some FP instructions.
4403 2018-10-08 Richard Biener <rguenther@suse.de>
4405 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4407 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
4408 * tree-vectorizer.h (dump_stmt_cost): Adjust.
4409 (add_stmt_cost): Dump return value of the hook.
4411 2018-10-08 Richard Biener <rguenther@suse.de>
4413 PR tree-optimization/63155
4414 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
4415 (ssa_propagation_engine::ssa_propagate): Remove redundant
4416 bitmap bit clearing.
4418 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
4420 PR rtl-optimization/86939
4421 PR rtl-optimization/87479
4422 * ira.h (non_conflicting_reg_copy_p): New prototype.
4423 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
4424 (make_hard_regno_dead): Don't add conflicts for register
4425 ignore_reg_for_conflicts.
4426 (make_object_dead): Likewise.
4427 (non_conflicting_reg_copy_p): New function.
4428 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
4429 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
4430 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
4431 (make_hard_regno_dead): Don't add conflicts for register
4432 ignore_reg_for_conflicts. Remove special conflict handling of
4433 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
4434 check_pic_pseudo_p and update callers.
4435 (mark_pseudo_dead): Don't add conflicts for register
4436 ignore_reg_for_conflicts.
4437 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
4439 2018-10-05 Andrew Waterman <andrew@sifive.com>
4440 Jim Wilson <jimw@sifive.com>
4442 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
4443 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
4444 new pattern using HONOR_SNANS that emits one extra instruction.
4446 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4448 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
4449 patterns): Merge SI and DI patterns to a GPR pattern.
4450 (unnamed define_insn and define_split for record form of that): Merge
4451 to a single define_insn_and_split pattern.
4453 2018-10-05 David Malcolm <dmalcolm@redhat.com>
4456 * input.c (expand_location_to_spelling_point): Add param "aspect"
4457 and use rather than hardcoding LOCATION_ASPECT_CARET.
4458 (get_substring_ranges_for_loc): Handle the case of a single token
4459 within a macro expansion.
4460 * input.h (expand_location_to_spelling_point): Add "aspect" param,
4461 defaulting to LOCATION_ASPECT_CARET.
4463 2018-10-05 Paul Koning <ni1d@arrl.net>
4465 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
4466 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
4467 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
4468 (pdp11_guard_type): New function.
4470 2018-10-05 Paul Koning <ni1d@arrl.net>
4472 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
4473 * config/pdp11/pdp11.opt (mfloat32): Remove.
4475 * doc/invoke.texi (pdp11 -mfloat32): Remove:
4476 (pdp11 -mfloat64): Remove.
4478 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4480 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
4481 (*cmp<mode>_cc_i387): Ditto.
4482 (*cmpu<mode>_cc_i387): Ditto.
4483 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4484 * config/i386/i386.c (ix86_expand_fp_compare): Remove
4486 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
4487 Emit x86_sahf_1 pattern.
4488 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
4489 (ix86_expand_carry_flag_compare): Ditto.
4491 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4493 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
4494 to reg_or_0_operand. Add "C" constraint.
4495 (*cmpxf_cc_i387): Ditto.
4496 (*cmp<mode>_i387): Change operand 2 predicate
4497 to nonimm_or_0_operand. Add "C" constraint.
4498 (*cmp<mode>_cc_i387): Ditto.
4499 (*cmp<mode>_0_i387): Remove insn pattern.
4500 (*cmp<mode>_0_cc_i387): Ditto.
4502 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
4504 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
4505 * config/i386/predicates.md (nonimm_or_0_operand): Rename
4506 from vector_move_operand. Update all uses.
4508 2018-10-05 Martin Sebor <msebor@redhat.com>
4510 PR tree-optimization/87490
4511 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
4514 2018-10-05 Richard Biener <rguenther@suse.de>
4516 PR tree-optimization/63155
4517 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
4518 vertical space in dumpfiles.
4519 * tree-ssa-propagate.h
4520 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
4521 * tree-ssa-propagate.c (cfg_blocks_back): New global.
4522 (ssa_edge_worklist_back): Likewise.
4523 (curr_order): Likewise.
4524 (cfg_blocks_get): Remove abstraction.
4525 (cfg_blocks_add): Likewise.
4526 (cfg_blocks_empty_p): Likewise.
4527 (add_ssa_edge): Add to current or next worklist based on
4529 (add_control_edge): Likewise.
4530 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
4532 (ssa_propagation_engine::ssa_propagate): ... here. Unify
4533 iteration from CFG and SSA edge worklist so we process
4534 everything in RPO order, prioritizing forward progress
4536 (ssa_prop_init): Allocate new worklists, do not dump
4538 (ssa_prop_fini): Free new worklists.
4540 2018-10-05 Richard Biener <rguenther@suse.de>
4542 * tree-core.h (tree_block::abstract_flag): Remove.
4543 (tree_block::block_num): Make full 32bits.
4544 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
4545 * tree.h (BLOCK_ABSTRACT): Remove.
4546 * dwarf2out.c (gen_lexical_block_die): Remove dead code
4547 resulting from BLOCK_ABSTRACT being always false.
4548 (gen_inlined_subroutine_die): Likewise.
4549 (gen_block_die): Likewise.
4550 * tree.c (block_ultimate_origin): Likewise.
4551 * tree-pretty-print.c (dump_block_node): Remove code dealing
4552 with BLOCK_ABSTRACT.
4553 * tree-ssa-live.c (dump_scope_block): Likewise.
4554 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
4555 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
4557 2018-10-05 Richard Biener <rguenther@suse.de>
4559 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
4560 is asked for initialize mode to the component mode of the
4563 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
4566 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
4567 assembler for -mavx.
4568 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
4570 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
4573 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
4575 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
4576 to be DImode. When using mffscrn, force the operand to a register.
4578 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
4580 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
4581 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
4582 X87MODEF mode iterator.
4583 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
4584 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
4585 X87MODEF mode iterator.
4587 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
4589 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
4590 -Wno-prio-ctor-dtor.
4592 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4594 * Makefile.in (OBJS): Add opt-problem.o.
4595 * dump-context.h: Include "selftest.h.
4596 (selftest::temp_dump_context): New forward decl.
4597 (class dump_context): Make friend of class
4598 selftest::temp_dump_context.
4599 (dump_context::dump_loc_immediate): New decl.
4600 (class dump_pretty_printer): Move here from dumpfile.c.
4601 (class temp_dump_context): Move to namespace selftest.
4602 (temp_dump_context::temp_dump_context): Add param
4603 "forcibly_enable_dumping".
4604 (selftest::verify_dumped_text):
4605 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4606 (selftest::verify_item):
4607 (ASSERT_IS_TEXT): Move here from dumpfile.c.
4608 (ASSERT_IS_TREE): Likewise.
4609 (ASSERT_IS_GIMPLE): Likewise.
4610 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4612 (dump_context::dump_loc_immediate): ...this new function.
4613 (class dump_pretty_printer): Move to dump-context.h.
4614 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4615 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4616 (temp_dump_context::temp_dump_context): Move to "selftest"
4617 namespace. Add param "forcibly_enable_dumping", and use it to
4618 conditionalize the use of m_pp;
4619 (selftest::verify_dumped_text): Make non-static.
4620 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4621 (selftest::verify_item): Make non-static.
4622 (ASSERT_IS_TEXT): Move to dump-context.h.
4623 (ASSERT_IS_TREE): Likewise.
4624 (ASSERT_IS_GIMPLE): Likewise.
4625 (selftest::test_capture_of_dump_calls): Pass "true" for new
4626 param of temp_dump_context.
4627 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4628 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
4630 * opt-problem.cc: New file.
4631 * opt-problem.h: New file.
4632 * optinfo-emit-json.cc
4633 (selftest::test_building_json_from_dump_calls): Pass "true" for
4634 new param of temp_dump_context.
4635 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4636 (optinfo::emit_for_opt_problem): New function.
4637 (optinfo::emit): Clarity which emit_item is used.
4638 * optinfo.h (optinfo::get_dump_location): New accessor.
4639 (optinfo::emit_for_opt_problem): New decl.
4640 (optinfo::emit): Make const.
4641 * selftest-run-tests.c (selftest::run_tests): Call
4642 selftest::opt_problem_cc_tests.
4643 * selftest.h (selftest::opt_problem_cc_tests): New decl.
4644 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4645 bool to opt_result, converting fprintf messages to
4646 opt_result::failure_at calls. Add "stmt" param for use by the
4648 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4649 (runtime_alias_check_p): Convert return type from bool to
4650 opt_result, converting dump_printf calls to
4651 opt_result::failure_at, using the statement DDR_A for their
4653 (find_data_references_in_stmt): Convert return type from bool to
4654 opt_result, converting "return false" to opt_result::failure_at
4656 * tree-data-ref.h: Include "opt-problem.h".
4657 (dr_analyze_innermost): Convert return type from bool to opt_result,
4658 and add a const gimple * param.
4659 (find_data_references_in_stmt): Convert return type from bool to
4661 (runtime_alias_check_p): Likewise.
4662 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4663 dr_analyze_innermost.
4664 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4665 Convert return type from bool to opt_result, adding a message for
4666 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4667 (vect_analyze_data_ref_dependence): Convert return type from bool
4668 to opt_result. Change sense of return type from "false"
4669 effectively meaning "no problems" to "false" meaning a problem,
4670 so that "return false" becomes "return opt_result::success".
4671 Convert "return true" calls to opt_result::failure_at, using
4672 the location of statement A rather than vect_location.
4673 (vect_analyze_data_ref_dependences): Convert return type from bool
4675 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4676 calls to opt_result::failure_at, using the stmt location rather
4678 (vect_verify_datarefs_alignment): Convert return type from bool
4680 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
4681 into multiple more-tightly-scoped copies.
4682 (vect_analyze_data_refs_alignment): Convert return type from bool
4684 (vect_analyze_data_ref_accesses): Likewise, converting a
4685 "return false" to a "return opt_result::failure_at", adding a
4687 (vect_prune_runtime_alias_test_list): Convert return type from
4688 bool to opt_result, converting dump_printf_loc to
4689 opt_result::failure_at. Add a %G to show the pertinent statement,
4690 and use the stmt's location rather than vect_location.
4691 (vect_find_stmt_data_reference): Convert return type from
4692 bool to opt_result, converting dump_printf_loc to
4693 opt_result::failure_at, using stmt's location.
4694 (vect_analyze_data_refs): Convert return type from bool to
4695 opt_result. Convert "return false" to "return
4696 opt_result::failure_at", adding messages as needed.
4697 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4698 type from bool to opt_result.
4699 (vect_determine_vf_for_stmt): Likewise.
4700 (vect_determine_vectorization_factor): Likewise, converting
4701 dump_printf_loc to opt_result::failure_at, using location of phi
4702 rather than vect_location.
4703 (vect_analyze_loop_form_1): Convert return type from bool to
4704 opt_result, converting dump_printf_loc calls, retaining the use of
4706 (vect_analyze_loop_form): Convert return type from loop_vec_info
4707 to opt_loop_vec_info.
4708 (vect_analyze_loop_operations): Convert return type from bool to
4709 opt_result, converting dump_printf_loc calls, using the location
4710 of phi/stmt rather than vect_location where available. Convert
4711 various "return false" to "return opt_result::failure_at" with
4712 "unsupported phi" messages.
4713 (vect_get_datarefs_in_loop): Convert return type from bool to
4714 opt_result. Add a message for the
4715 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4716 (vect_analyze_loop_2): Convert return type from bool to
4717 opt_result. Ensure "ok" is set to a opt_result::failure_at before
4718 each "goto again;", adding new messages where needed.
4719 Add "unsupported grouped {store|load}" messages.
4720 (vect_analyze_loop): Convert return type from loop_vec_info to
4722 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4724 * tree-vect-stmts.c (process_use): Likewise, converting
4725 dump_printf_loc call and using stmt location, rather than
4727 (vect_mark_stmts_to_be_vectorized): Likeise.
4728 (vect_analyze_stmt): Likewise, adding a %G.
4729 (vect_get_vector_types_for_stmt): Convert return type from bool to
4730 opt_result, converting dump_printf_loc calls and using stmt
4731 location, rather than vect_location.
4732 (vect_get_mask_type_for_stmt): Convert return type from tree to
4733 opt_tree, converting dump_printf_loc calls and using stmt location.
4734 * tree-vectorizer.c: Include "opt-problem.h.
4735 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4736 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
4737 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
4738 enabled, use it to report at the top level "couldn't vectorize
4739 loop" followed by the problem.
4740 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4741 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4743 (vect_analyze_stmt): Likewise.
4744 (vect_get_vector_types_for_stmt): Likewise.
4745 (tree vect_get_mask_type_for_stmt): Likewise.
4746 (vect_analyze_data_ref_dependences): Likewise.
4747 (vect_enhance_data_refs_alignment): Likewise.
4748 (vect_analyze_data_refs_alignment): Likewise.
4749 (vect_verify_datarefs_alignment): Likewise.
4750 (vect_analyze_data_ref_accesses): Likewise.
4751 (vect_prune_runtime_alias_test_list): Likewise.
4752 (vect_find_stmt_data_reference): Likewise.
4753 (vect_analyze_data_refs): Likewise.
4754 (vect_analyze_loop): Convert return type from loop_vec_info to
4756 (vect_analyze_loop_form): Likewise.
4757 (vect_analyze_slp): Convert return type from bool to opt_result.
4759 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4761 * doc/invoke.texi (-fopt-info): Document new "internals"
4763 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4764 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4766 (optinfo_verbosity_options): Add "internals".
4767 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4768 (dump_context::apply_dump_filter_p): New member function.
4769 (dump_context::dump_loc): Use apply_dump_filter_p rather than
4770 explicitly masking the dump_kind.
4771 (dump_context::begin_scope): Increment the scope depth first. Use
4772 apply_dump_filter_p rather than explicitly masking the dump_kind.
4773 (dump_context::emit_item): Use apply_dump_filter_p rather than
4774 explicitly masking the dump_kind.
4775 (dump_dec): Likewise.
4776 (dump_hex): Likewise.
4777 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4778 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4779 (opt_info_switch_p): Update handling of default
4780 MSG_OPTIMIZED_LOCATIONS to cope with default of
4781 MSG_PRIORITY_USER_FACING.
4782 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4783 masking the dump_kind.
4784 (selftest::test_capture_of_dump_calls): Update test_dump_context
4785 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4786 than MSG_ALL. Generalize scope test to be run at all four
4787 combinations of with/without MSG_PRIORITY_USER_FACING and
4788 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4789 for each of the two values.
4790 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4791 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
4792 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4793 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4794 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4795 with MSG_PRIORITY_*.
4796 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4797 dump messages as MSG_PRIORITY_USER_FACING.
4798 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4799 about the interaction with MSG_PRIORITY_*.
4801 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
4803 * varasm.c (output_constant): Add new parameter merge_strings.
4804 Make strings properly zero terminated in merge string sections.
4805 (mergeable_string_section): Don't fail if the last char is non-zero.
4806 (assemble_variable_contents): Handle merge string sections.
4807 (assemble_variable): Likewise.
4808 (assemble_constant_contents): Likewise.
4809 (output_constant_def_contents): Likewise.
4810 (output_constructor_array_range,
4811 output_constructor_regular_field): Adjust call to output_constant.
4812 (output_object_block): Adjust call to assemble_constant_contents
4813 and assemble_variable_contents.
4815 2018-10-04 Martin Liska <mliska@suse.cz>
4818 * cgraphunit.c (process_function_and_variable_attributes):
4819 Warn about a function with alias attribute and a body.
4821 2018-10-04 Martin Liska <mliska@suse.cz>
4824 * multiple_target.c (redirect_to_specific_clone): New function.
4825 (ipa_target_clone): Use it.
4826 * tree-inline.c: Fix comment.
4828 2018-10-04 David Malcolm <dmalcolm@redhat.com>
4830 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4832 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4833 (gcc::dump_manager::register_pass): New member function, adapted
4834 from loop body in gcc::pass_manager::register_pass, adding a
4835 call to update_dfi_for_opt_info.
4836 (gcc::dump_manager::opt_info_enable_passes): Store the
4837 -fopt-info options into the new fields. Move the loop
4839 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4841 * dumpfile.h (struct opt_pass): New forward decl.
4842 (gcc::dump_manager::register_pass): New decl.
4843 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4844 (class gcc::dump_manager): Add fields "m_optgroup_flags",
4845 "m_optinfo_flags", and "m_optinfo_filename".
4846 * passes.c (gcc::pass_manager::register_pass): Move all of the
4847 dump-handling code to gcc::dump_manager::register_pass.
4849 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
4851 PR rtl-optimization/87466
4852 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4853 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4854 * doc/tm.texi: Regenerate.
4855 * ira-lives.c (process_bb_node_lives): Use the new target hook.
4856 * lra-lives.c (process_bb_lives): Likewise.
4857 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4860 2018-10-04 Tamar Christina <tamar.christina@arm.com>
4862 * params.c (add_params): Fix initialization.
4864 2018-10-04 Martin Liska <mliska@suse.cz>
4866 PR gcov-profile/84107
4867 * tree-profile.c (init_ic_make_global_vars):
4868 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4869 Come up with new ic_tuple* variables. Emit
4870 __gcov_indirect_call{,_topn} variables.
4871 (gimple_gen_ic_profiler): Access the variable
4873 (gimple_gen_ic_func_profiler): Access
4874 __gcov_indirect_call.callee field.
4875 (gimple_init_gcov_profiler): Use ptr_type_node.
4876 * value-prof.c (gimple_ic): Use ptr_type_node.
4878 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
4880 PR tree-optimization/85787
4881 * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4882 into this function and add support for detecting multiple phis.
4883 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4885 2018-10-04 Martin Liska <mliska@suse.cz>
4888 * ipa-inline.c (inline_to_all_callers_1):
4889 Call ultimate_alias_target for node being inlined.
4891 2018-10-03 Jeff Law <law@redhat.com>
4893 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4895 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4896 * tree.h (get_typenode_from_name): Prototype.
4898 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4900 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4901 Change operand 2 predicate to nonimmediate_operand.
4902 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4904 2018-10-03 Martin Sebor <msebor@redhat.com>
4905 Jeff Law <law@redhat.com>
4907 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4909 (get_string_length): Detect unterminated arrays.
4910 (format_string): Same.
4911 (format_directive): Warn about unterminated arrays.
4912 (handle_gimple_call): Mark statements with no_warning as needed.
4914 2018-10-03 Jim Wilson <jimw@sifive.com>
4916 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4917 also define __riscv_abi_rve. Delete trailing white space.
4919 2018-10-03 Paul Koning <ni1d@arrl.net>
4921 Enable LRA register allocator for PDP11.
4922 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4925 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4926 * config/pdp11/pdp11.opt (-mlra): New option.
4927 * doc/invoke.texi (PDP-11 Options): Document -mlra.
4929 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
4931 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4932 (*<absneg:code>extend<mode>xf2): Ditto.
4934 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4936 PR tree-optimization/87415
4937 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4940 2018-10-02 Jeff Law <law@redhat.com>
4942 * gimple-fold.c (get_range_strlen): Only set *nonstr when
4943 an unterminated string is discovered. Bubble up range
4944 even for unterminated strings.
4945 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4946 indicates the string was not terminated via NONSTR.
4948 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
4950 * tree-vrp.c (extract_range_from_unary_expr): Special case all
4951 pointer conversions.
4952 Do not do anything special for anti-ranges.
4954 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
4956 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4957 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4959 2018-10-03 Martin Liska <mliska@suse.cz>
4961 PR gcov-profile/86109
4962 * coverage.c (coverage_begin_function): Do not
4963 mark lambdas as artificial.
4964 * tree-core.h (struct GTY): Remove tm_clone_flag
4965 and introduce new lambda_function.
4966 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4968 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
4971 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4972 P8_VECTOR and VSX are enabled.
4974 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4976 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4977 0x3907 as CPU model number.
4979 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
4981 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4982 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4983 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4984 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4985 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4986 * config/s390/s390.md: Likewise. Rename also the cpu attribute
4987 value from arch12 to z14.
4989 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4991 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4993 (isinf<mode>2): Ditto.
4995 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
4997 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4998 before emitting fxam. Perform calculations in XFmode.
5000 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5002 * match.pd (((X /[ex] A) +- B) * A): New transformation.
5004 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
5007 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
5008 * tree.c (signed_or_unsigned_type_for): Handle complex.
5010 2018-10-02 Jeff Law <law@redhat.com>
5012 * gimple-fold.c (get_range_strlen): Remove dead code.
5014 2018-10-02 Martin Sebor <msebor@redhat.com>
5015 Jeff Law <law@redhat.com>
5017 * builtins.c (unterminated_array): Add new arguments.
5018 If argument is not terminated, bubble up size and exact
5020 (expand_builtin_strnlen): Detect, avoid expanding
5021 and diagnose unterminated arrays.
5022 (c_strlen): Fill in offset of start of unterminated strings.
5023 * builtins.h (unterminated_array): Update prototype.
5025 2018-10-02 Richard Biener <rguenther@suse.de>
5027 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
5028 of haddv4df, first reduce to SSE width and exploit the fact
5029 that we only need element zero with the reduction result.
5030 (reduc_plus_scal_v2df): Likewise.
5032 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5034 * dojump.h (do_jump): Delete.
5035 (do_jump_1): Likewise.
5036 (split_comparison): Move around.
5037 * dojump.c (do_jump): Make static.
5038 (do_jump_1): Likewise.
5039 (jumpifnot): Move around.
5040 (jumpifnot_1): Likewise.
5042 (jumpif_1): Likewise.
5043 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
5045 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
5047 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
5048 insns in the delay slot and add_insn_after for the jump insn.
5050 2018-10-02 Richard Biener <rguenther@suse.de>
5052 * tree-inline.c (expand_call_inline): Use the location of
5053 the callee declaration for the inline-entry marker.
5054 * final.c (notice_source_line): Remove special-casing of
5055 NOTE_INSN_INLINE_ENTRY.
5057 2018-10-01 Carl Love <cel@us.ibm.com>
5060 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
5061 (__builtin_mtfsb0): New.
5062 (__builtin_mtfsb1): New.
5063 ( __builtin_set_fpscr_rn): New.
5064 (__builtin_set_fpscr_drn): New.
5065 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
5066 (rs6000_expand_set_fpscr_rn_builtin): Add.
5067 (rs6000_expand_set_fpscr_drn_builtin): Add.
5068 (rs6000_expand_builtin): Add case statement entries for
5069 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
5070 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
5071 RS6000_BUILTIN_MFFSL.
5072 (rs6000_init_builtins): Add ftype initialization and def_builtin
5073 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
5074 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
5075 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
5076 rs6000_mffscdrn): Add define_insn.
5077 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
5078 * doc/extend.texi: Add documentation for the builtins.
5080 2018-10-01 Richard Biener <rguenther@suse.de>
5082 PR tree-optimization/87465
5083 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
5084 causing branch miscounts.
5086 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5088 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
5089 aarch64_option_default_param): New.
5090 (params.h): Include.
5091 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
5092 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
5093 stack-clash protection validation code.
5095 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5097 * params.c (validate_param): New.
5098 (add_params): Use it.
5099 (set_param_value): Refactor param validation into validate_param.
5100 (diagnostic.h): Include.
5101 * diagnostic.h (diagnostic_ready_p): New.
5103 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5105 * params.c (set_param_value):
5106 Add index of parameter being validated.
5107 * common/common-target.def (option_validate_param): New.
5108 * common/common-targhooks.h (default_option_validate_param): New.
5109 * common/common-targhooks.c (default_option_validate_param): New.
5110 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
5111 * doc/tm.texi: Regenerate.
5113 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5116 * config/aarch64/aarch64.c (aarch64_override_options_internal):
5117 Add validation for stack-clash parameters and set defaults.
5119 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5122 * configure.ac: Add stack-clash-protection-guard-size.
5123 * doc/install.texi: Document it.
5124 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
5125 * params.def: Update comment for guard-size.
5126 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
5127 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
5128 * configure: Regenerate.
5130 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5133 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
5134 STACK_DYNAMIC_OFFSET): New.
5135 * config/aarch64/aarch64.c (aarch64_layout_frame):
5136 Update outgoing args size.
5137 (aarch64_stack_clash_protection_alloca_probe_range,
5138 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5140 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5143 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
5145 * target.def (stack_clash_protection_alloca_probe_range): New.
5146 (stack_clash_protection_final_dynamic_probe): Remove.
5147 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
5148 (default_stack_clash_protection_final_dynamic_probe): Remove.
5149 * targhooks.c: Likewise.
5150 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
5151 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
5152 * doc/tm.texi: Regenerate.
5154 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5157 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
5158 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
5159 aarch64_clamp_to_uimm12_shift): New.
5160 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
5161 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
5163 2018-10-01 Tamar Christina <tamar.christina@arm.com>
5166 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
5168 2018-10-01 Jeff Law <law@redhat.com>
5169 Richard Sandiford <richard.sandiford@linaro.org>
5170 Tamar Christina <tamar.christina@arm.com>
5173 * config/aarch64/aarch64.md
5174 (probe_stack_range): Add k (SP) constraint.
5175 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
5176 STACK_CLASH_MAX_UNROLL_PAGES): New.
5177 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
5178 stack probes for stack clash.
5179 (aarch64_allocate_and_probe_stack_space): New.
5180 (aarch64_expand_prologue): Use it.
5181 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
5182 (aarch64_sub_sp): Add emit_move_imm optional param.
5184 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
5186 PR tree-optimization/87261
5187 * match.pd: Remove trailing whitespace.
5188 Add (x & y) | ~(x | y) -> ~(x ^ y),
5189 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
5191 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5193 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
5195 (ashlsi3_insn): Update instruction constraints.
5196 (ashrsi3_insn): Likewise.
5197 (rotrsi3): Likewise.
5198 (add_shift): Likewise.
5199 * config/arc/constraints.md (Csz): New 32 bit constraint. It
5200 avoids placing in the limm field small constants which, otherwise,
5201 could end into a small instruction.
5203 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
5205 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
5206 destination register is not odd-even.
5207 (umaddsidi4_split): Likewise.
5209 2018-10-01 Richard Biener <rguenther@suse.de>
5211 * tree-inline.c (expand_call_inline): Store origin of fn
5212 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
5213 * tree.c (block_ultimate_origin): Simplify and do some
5216 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
5218 * config/i386/mmx.md (EMMS): New int iterator.
5219 (emms): New int attribute.
5220 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
5221 EMMS int iterator. Explicitly declare clobbers.
5222 (mmx_emms): Remove expander.
5224 * config/i386/predicates.md (emms_operation): Remove predicate.
5225 (vzeroall_pattern): New predicate.
5226 (vzeroupper_pattern): Rename from vzeroupper_operation.
5227 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
5228 vzeroupper_pattern and vzeroall_pattern predicates.
5230 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
5232 PR rtl-optimization/86939
5233 * ira-lives.c (make_hard_regno_born): Rename from this...
5234 (make_hard_regno_live): ... to this. Remove update to conflict
5235 information. Update function comment.
5236 (make_hard_regno_dead): Add conflict information update. Update
5238 (make_object_born): Rename from this...
5239 (make_object_live): ... to this. Remove update to conflict information.
5240 Update function comment.
5241 (make_object_dead): Add conflict information update. Update function
5243 (mark_pseudo_regno_live): Call make_object_live.
5244 (mark_pseudo_regno_subword_live): Likewise.
5245 (mark_hard_reg_dead): Update function comment.
5246 (mark_hard_reg_live): Call make_hard_regno_live.
5247 (process_bb_node_lives): Likewise.
5248 * lra-lives.c (make_hard_regno_born): Rename from this...
5249 (make_hard_regno_live): ... to this. Remove update to conflict
5250 information. Remove now uneeded check_pic_pseudo_p argument.
5251 Update function comment.
5252 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
5253 to conflict information. Update function comment.
5254 (mark_pseudo_live): Remove update to conflict information. Update
5256 (mark_pseudo_dead): Add conflict information update.
5257 (mark_regno_live): Call make_hard_regno_live.
5258 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
5259 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
5261 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
5264 * config/i386/i386.c (construct_container): Use TImode for
5265 BLKmode values in 2 integer registers.
5267 2018-09-29 Jeff Law <law@redhat.com>
5269 * builtins.c (unterminated_array): Pass in c_strlen_data * to
5270 c_strlen rather than just a tree *.
5271 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
5272 Update recursive calls appropriately. If caller did not provide a
5273 suitable data pointer, create a local one. When a non-terminated
5274 string is discovered, bubble up information about the string via the
5275 c_strlen_data object.
5276 * builtins.h (c_strlen): Update prototype.
5277 (c_strlen_data): New structure.
5278 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
5279 For a type 2 call, if c_strlen indicates a non-terminated string
5280 use the length of the non-terminated string.
5281 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
5283 2018-09-29 Jakub Jelinek <jakub@redhat.com>
5286 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
5287 __m512d type for __A argument rather than __m512.
5289 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
5291 * match.pd (simple_comparison): Don't optimize if either operand is
5292 a function pointer when target needs function pointer canonicalization.
5294 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5296 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
5297 power5 .. power9 to remove indirection.
5298 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
5299 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
5300 ASM_CPU_476_SPEC): Delete.
5301 (ASM_CPU_SPEC): Adjust.
5302 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
5303 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
5305 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5307 * config.in: Delete HAVE_AS_DCI.
5308 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
5309 * config/rs6000/rs6000.h: Ditto.
5310 * configure.ac: Delete HAVE_AS_DCI.
5311 * configure: Regenerate.
5313 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
5315 * config.in (HAVE_AS_LWSYNC): Delete.
5316 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5317 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
5319 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
5320 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
5322 * configure.ac: Delete HAVE_AS_LWSYNC.
5323 * configure: Regenerate.
5325 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5326 Pierre-Marie de Rodat <derodat@adacore.com>
5328 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
5329 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
5330 (cgraph_node::create_thunk): Add indirect_offset parameter.
5331 (thunk_adjust): Likewise.
5332 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
5333 and initialize the corresponding field with it.
5334 (cgraph_node::dump): Dump indirect_offset field.
5335 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
5336 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
5337 (thunk_adjust): Add indirect_offset parameter and deal with it.
5338 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
5339 pass it to thunk_adjust. Do not call the target hook if it's non-zero
5340 or if the thunk is external or local. Fix formatting. Do not chain
5341 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
5342 if any, in the GIMPLE representation.
5343 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
5344 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
5345 (input_node): Read indirect_offset field.
5346 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
5347 call to thunk_adjust.
5348 * tree-nested.c (struct nesting_info): Add thunk_p field.
5349 (create_nesting_tree): Set it.
5350 (convert_all_function_calls): Copy static chain from targets to thunks.
5351 (finalize_nesting_tree_1): Return early for thunks.
5352 (unnest_nesting_tree_1): Do not finalize thunks.
5353 (gimplify_all_functions): Do not gimplify thunks.
5355 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5357 * opt-suggestions.c (option_proposer::build_option_suggestions):
5358 Release "option_values".
5360 2018-09-28 David Malcolm <dmalcolm@redhat.com>
5362 * coverage.c (get_coverage_counts): Convert problem-reporting dump
5363 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
5364 * dumpfile.c (kind_as_string): New function.
5365 (dump_loc): Rather than a hardcoded prefix of "note: ", use
5366 kind_as_string to vary the prefix based on dump_kind.
5367 (selftest::test_capture_of_dump_calls): Update for above.
5369 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5371 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
5372 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
5374 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
5376 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
5377 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
5378 INVALID_REGNUM instead of FPSR_REG.
5379 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
5380 * config/i386/i386.md: Update comment of FP compares.
5381 (fldenv): Do not clobber FPSR_REG.
5383 2018-09-28 Richard Biener <rguenther@suse.de>
5385 * tree.h (BLOCK_ORIGIN): New.
5386 * omp-expand.c (grid_expand_target_grid_body): Assign
5387 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
5388 * tree-inline.c (remap_block): Likewise.
5389 * auto-profile.c (get_function_decl_from_block): Simplify
5390 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
5391 * langhooks.c (lhd_print_error_function): Likewise.
5392 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
5394 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5395 * tree.c (block_nonartificial_location): Likewise.
5396 (block_ultimate_origin): Likewise.
5397 * tree-pretty-print.c (percent_K_format): Likewise. Remove
5398 no longer needed LTO case.
5400 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
5401 Jan Hubicka <jh@suse.cz>
5402 Martin Jambor <mjambor@suse.cz>
5404 * simplify-rtx.c (simplify_merge_mask): New function.
5405 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
5406 same masks are used in op1 or op2.
5407 (test_vec_merge): New function.
5408 (test_vector_ops): Call test_vec_merge.
5410 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
5412 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
5413 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
5414 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
5415 (cypress_costs): Set it.
5416 (supersparc_costs): Likewise.
5417 (hypersparc_costs): Likewise.
5418 (leon_cost): Likewise.
5419 (leon3_costs): Likewise.
5420 (sparclet_costs): Likewise.
5421 (ultrasparc_costs): Likewise.
5422 (ultrasparc_costs): Likewise.
5423 (niagara_costs): Likewise.
5424 (niagara2_costs): Likewise.
5425 (niagara3_costs): Likewise.
5426 (niagara4_costs): Likewise.
5427 (niagara7_costs): Likewise.
5428 (m8_costs): Likewise.
5429 (TARGET_CAN_FOLLOW_JUMP): Define.
5430 (pass_work_around_errata::gate): Minor tweak.
5431 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
5432 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
5433 Automaitcally clear MASK_FSMULD mask for V7 processors.
5434 (sparc_can_follow_jump): New static function.
5435 (output_ubranch): Deal with CROSSING_JUMP_P.
5436 (sparc_use_sched_lookahead): Rewrite using switch statement.
5437 (sparc_issue_rate): Reorder.
5438 (sparc_branch_cost): New function.
5440 2018-09-27 Martin Sebor <msebor@redhat.com>
5442 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
5443 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
5444 (int_fits_type_p): Same.
5446 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
5448 * config/i386/i386.md (FPCR_REG): Remove.
5449 (UNSPEC_FLDCW): Remove.
5450 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
5451 (x86_fldcw_1): Remove insn pattern.
5452 (fnstenv): Do not clobber FPCR_REG.
5454 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
5455 (CALL_USED_REGISTERS): Ditto.
5456 (REG_ALLOC_ORDER): Ditto.
5457 (REG_CLASS_CONTENTS): Ditto.
5458 (HI_REGISTER_NAMES): Ditto.
5459 (ADDITIONAL_REGISTER_NAMES): Use defines instead
5460 of numerical constants.
5461 * config/i386/i386.c (regclass_map): Remove fpsr register.
5462 (dbx_register_map): Ditto.
5463 (dbx64_register_map): Ditto.
5464 (svr4_dbx_register_map): Ditto.
5465 (print_reg): Do not handle FPCR_REG.
5467 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
5470 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
5471 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
5472 Delete, always treat as true.
5473 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
5474 Ditto. Simplify remaining code.
5475 * config/powerpcspe/powerpcspe.h: Ditto.
5476 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
5477 Simplify remaining code.
5478 (rs6000_expand_builtin): Ditto.
5479 * config/rs6000/rs6000.h: Ditto.
5480 * configure.ac: Ditto.
5481 * configure: Regenerate.
5483 2018-09-27 Martin Liska <mliska@suse.cz>
5485 * coverage.c (get_coverage_counts): Revert the formatting
5486 of missing profile opt info.
5488 2018-09-27 Richard Biener <rguenther@suse.de>
5492 * dwarf2out.c (set_block_origin_self): Do not mark outermost
5493 block as we do not output that.
5494 (gen_inlined_subroutine_die): Elide the originally outermost
5495 block, matching what we do for concrete instances.
5496 (decls_for_scope): Add parameter specifying whether to recurse
5499 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
5500 Tom de Vries <tom@codesourcery.com>
5504 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
5505 STORE_FLAG_VALUE == 1.
5507 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
5509 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
5510 constant definitions.
5511 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
5512 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
5513 ("speculation_barrier"): New expander definition.
5515 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
5517 PR gcov-profile/86957
5518 * common.opt: New warning option -Wmissing-profile.
5519 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
5520 * doc/invoke.texi: Document -Wmissing-profile.
5522 2018-09-26 Jim Wilson <jimw@sifive.com>
5524 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
5525 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
5527 2018-09-26 Martin Sebor <msebor@redhat.com>
5529 * tree.c (zerop): Change return type to bool.
5530 (integer_zerop, integer_onep, integer_each_onep): Same.
5531 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5532 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5533 (real_onep, real_minus_onep, chain_index): Same.
5534 (print_type_hash_statistics, type_list_equal): Same.
5535 * tree.h (zerop): Same.
5536 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
5537 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
5538 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
5539 (real_onep, real_minus_onep, chain_index): Same.
5540 (print_type_hash_statistics, type_list_equal): Same.
5542 2018-09-26 Jim Wilson <jimw@sifive.com>
5544 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
5546 2018-09-26 Jakub Jelinek <jakub@redhat.com>
5549 * config/i386/i386.c: Include debug.h and dwarf2out.h.
5550 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
5553 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
5555 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
5557 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5559 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
5560 and FP_SECOND_SSE_REGS.
5561 (REG_CLASS_NAMES): Ditto.
5562 (REG_CLASS_CONTENTS): Ditto.
5563 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
5564 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
5565 (ix86_preferred_output_reload_class): Ditto.
5566 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
5567 clobber constraint to "=&f".
5568 (fix_truncdi_i387): Ditto.
5569 (lrintxfdi2): Ditto.
5570 (fistdi2_<rounding>): Ditto.
5571 (fpremxf4_i387): Change "=u" constraint to "=f".
5572 (fprem1xf4_i387): Ditto.
5574 (fptanxf4_i387): Ditto.
5575 (fxtractxf3_i387): Ditto.
5576 (fscalexf4_i387): Ditto.
5577 (atan2xf3): Change "u" constraint to "f".
5578 (fyl2xxf3_i387): Ditto.
5579 (fyl2xp1xf3_i387): Ditto.
5581 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
5584 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
5585 for removed I387_MASK_PM entity.
5588 2018-09-26 Jeff Law <law@redhat.com>
5590 2018-09-26 Alexey Neyman <stilor@att.net>
5592 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5593 headers are no longer pulled in by <isl/val.h>.
5595 2018-09-26 Richard Biener <rguenther@suse.de>
5598 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5599 or concrete instance DIE to the tree. Create abstract origin
5600 attributes also for concrete instances.
5602 2018-09-26 Alexey Neyman <stilor@att.net>
5604 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5605 headers are no longer pulled in by <isl/val.h>.
5607 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
5609 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5610 Use new helper functions.
5611 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5612 Use new helper functions.
5613 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5614 aarch_mm_needs_release): New declarations.
5615 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5616 aarch_mm_needs_release): New.
5618 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
5620 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5621 (arm32_output_mi_thunk): Deal with long calls.
5623 2018-09-26 Richard Biener <rguenther@suse.de>
5627 * tree-inline.c (expand_call_inline): When the location
5628 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5629 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5630 the inserted BLOCK to make inlined_function_outer_scope_p
5632 * dwarf2out.c (add_call_src_coords_attributes): Do not add
5633 coords for reserved locations.
5635 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5637 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5638 (*call_indirect_nonlocal_sysv<mode>): Ditto.
5639 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5640 (*sibcall_nonlocal_sysv<mode>): Ditto.
5641 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5642 (<bd>_<mode>): Ditto.
5643 (<bd>tf_<mode>): Ditto.
5645 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5647 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5648 control string as a list of templates instead of as C code.
5649 (*altivec_movti): Ditto.
5650 * config/rs6000/darwin.md (movdf_low_di): Ditto.
5652 2018-09-25 Jim Wilson <jimw@sifive.com>
5654 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5655 when target symbol is weak.
5657 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
5660 * builtins.c (unterminated_array): Simplify.
5661 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
5662 where pointer arithmetic is safe.
5664 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
5667 * config/rs6000/altivec.md (altivec_vspltb): Use
5668 const_0_to_15_operand instead of u5bit_cint_operand.
5669 (*altivec_vspltb_internal): Ditto.
5670 (altivec_vspltb_direct): Ditto.
5671 (altivec_vsplth): Use const_0_to_7_operand instead of
5673 (*altivec_vsplth_internal): Ditto.
5674 (altivec_vsplth_direct): Ditto.
5675 (altivec_vspltw): Use const_0_to_3_operand instead of
5677 (*altivec_vspltw_internal): Ditto.
5678 (altivec_vspltw_direct): Ditto.
5679 (altivec_vspltsf): Ditto.
5680 (*altivec_vspltsf_internal): Ditto.
5681 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5682 various splats with the proper size immediate. Reorder the various
5683 cases by ascending size of immediate, and put all such together.
5685 2018-09-25 Richard Biener <rguenther@suse.de>
5688 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5690 (maybe_create_die_with_external_ref): Do not create
5691 DW_TAG_imported_unit here.
5692 (add_abstract_origin_attribute): Handle external BLOCK refs.
5693 (dwarf2out_abstract_function): Simplify LTO case.
5694 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5695 rather than using maybe_create_die_with_external_ref.
5697 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
5700 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5701 (frndintxf2_mask_pm_i387): Ditto.
5702 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5703 Enable for !flag_trapping_math.
5704 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5705 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5706 Change operand 1 predicate to nonimmediate_operand.
5707 (attr "i387_cw"): Remove mask_pm.
5708 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5709 (enum ix86_entity): Remove I387_MASK_PM.
5710 * config/i386/i386.c (ix86_i387_mode_needed): Do not
5711 handle I387_MASK_PM.
5712 (ix86_mode_needed): Ditto.
5713 (ix86_mode_after): Ditto.
5714 (ix86_mode_entry): Ditto.
5715 (ix86_mode_exit): Ditto.
5716 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5718 2018-09-25 Jakub Jelinek <jakub@redhat.com>
5720 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5721 to_update_switch_stmts to vNULL instead of calling create on them
5724 2018-09-25 Richard Biener <rguenther@suse.de>
5726 PR tree-optimization/87402
5727 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5728 (visit_phi): Re-instantiate handling of supposed to be VARYING
5729 but non-VARYING backedge value.
5731 2018-09-25 Richard Biener <rguenther@suse.de>
5734 * dwarf2out.c (struct sym_off_pair): New.
5735 (external_die_map): New global.
5736 (lookup_decl_die): When in LTO create DIEs lazily from the
5738 (lookup_block_die): New function, create DIEs lazily in LTO.
5739 (equate_block_to_die): New function.
5740 (dwarf2out_die_ref_for_decl): During WPA get the association
5741 from the external DIE map.
5742 (dwarf2out_register_external_die): Record mapping into the
5744 (maybe_create_die_with_external_ref): New function split out from
5745 DIE generation part of old dwarf2out_register_external_die.
5746 (add_abstract_origin_attribute): Do not return the DIE. When
5747 in LTO reference externals directly.
5748 (dwarf2out_abstract_function): When in LTO ignore calls for
5749 decls with external DIEs (already present abstract instances).
5750 (gen_call_site_die): Adjust.
5751 (add_high_low_attributes): Likewise.
5752 (gen_lexical_block_die): Likewise.
5753 (gen_inlined_subroutine_die): Likewie.
5754 (gen_block_die): Likewise.
5755 (dwarf2out_inline_entry): Likewise.
5756 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5759 2018-09-25 Martin Liska <mliska@suse.cz>
5761 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5762 integers and not by a float value.
5764 2018-09-25 Martin Liska <mliska@suse.cz>
5767 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5769 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5770 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5771 * godump.c (go_format_type): Remove extra parenthesis.
5773 2018-09-25 Martin Liska <mliska@suse.cz>
5775 * alias.c (set_dest_equal_p): Remove unused function.
5776 * config/i386/i386.c (def_builtin_pure2): Likewise.
5777 * diagnostic-show-locus.c (class layout): Remove
5779 (layout::layout): Likewise here.
5780 * dump-context.h (class temp_dump_context): Likewise.
5781 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5782 (add_AT_loclistsptr): Likewise.
5783 (add_AT_offset): Likewise.
5784 (get_AT_hi_pc): Likewise.
5785 (is_comdat_die): Likewise.
5786 (type_is_enum): Likewise.
5787 (ceiling): Likewise.
5788 (add_AT_vms_delta): Likewise.
5789 (is_class_die): Likewise.
5790 * edit-context.c (class line_event): Remove unused field.
5791 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5793 * ipa-cp.c (ipa_get_vr_lat): Likewise.
5794 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5795 (ok_for_base_p_nonstrict): Likewise.
5796 * tree-chrec.c (is_not_constant_evolution): Likewise.
5797 (chrec_fold_poly_cst): Likewise.
5798 * tree-if-conv.c (has_pred_critical_p): Likewise.
5799 * tree-ssa-coalesce.c (print_exprs): Likewise.
5800 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5801 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5802 * tree-vrp.c (value_ranges_intersect_p): Likewise.
5803 (value_range_nonnegative_p): Likewise.
5805 2018-09-25 Martin Liska <mliska@suse.cz>
5807 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5808 Do not handle "GNU Pascal".
5809 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5811 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5812 from documentation. Likewise.
5813 * dbxout.c (dbxout_range_type): Likewise.
5814 * doc/cpp.texi: Likewise.
5815 * doc/extend.texi: Likewise.
5816 * doc/frontends.texi: Likewise.
5817 * doc/invoke.texi: Remove Pascal entry.
5818 * tree.def (CLEANUP_POINT_EXPR): Likewise.
5819 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5821 2018-09-25 Martin Liska <mliska@suse.cz>
5824 * doc/invoke.texi: Document all parameters and remove default
5827 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
5830 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5831 contains HOST_WIDE_INTs when computing its size.
5833 2018-09-24 Jim Wilson <jimw@sifive.com>
5836 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5838 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5840 2018-09-24 Andrew Pinski <apinski@marvell.com>
5842 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5843 access prev before checking it for NULLness in the
5844 AARCH64_FUSE_CMP_BRANCH case.
5846 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
5849 * config/i386/i386.c (rest_of_insert_endbranch): Set
5850 endbr_queued_at_entrance to true and don't insert ENDBR if
5851 x86_function_profiler will be called.
5852 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5854 * config/i386/i386.h (machine_function): Add
5855 endbr_queued_at_entrance.
5857 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5859 * genattrtab.c (mk_attr_alt): Use alternative_mask.
5860 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5862 (check_attr_test): Use alternative_mask.
5863 (get_attr_value): Likewise.
5864 (compute_alternative_mask): Use alternative_mask and XWINT.
5865 (make_alternative_compare): Use alternative_mask.
5866 (attr_alt_subset_p): Use XWINT.
5867 (attr_alt_subset_of_compl_p): Likewise.
5868 (attr_alt_intersection): Use alternative_mask and XWINT.
5869 (attr_alt_union): Likewise.
5870 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5871 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5872 (simplify_test_exp): Use alternative_mask and XWINT.
5873 (write_test_expr): Use alternative_mask and XWINT, adjust bit
5874 number calculation to support 64 bits. Generate code that
5875 checks 64-bit masks.
5876 (main): Use alternative_mask.
5877 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5879 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
5882 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5883 RETURN+USE when returning via %r14.
5885 2018-09-24 Martin Liska <mliska@suse.cz>
5887 * gcov.c (output_lines): Print colorization legend
5888 for both flag_use_colors and flag_use_hotness_colors.
5891 2018-09-24 Martin Liska <mliska@suse.cz>
5893 * coverage.c (get_coverage_counts): Use warning_at
5894 with current_function_decl location. Use %qD in warning
5897 2018-09-24 Martin Liska <mliska@suse.cz>
5899 * memory-block.h (memory_block_pool::release): Annotate with
5900 valgrind that the memory is not accessible.
5902 2018-09-24 Martin Liska <mliska@suse.cz>
5905 * asan.c: Make asan_handled_variables extern.
5907 * cfgexpand.c (expand_stack_vars): Make sure
5908 a representative is unpoison if another
5909 variable in the partition is handled by
5910 use-after-scope sanitization.
5912 2018-09-24 Richard Biener <rguenther@suse.de>
5914 PR tree-optimization/63155
5915 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5916 the worklist when the edge of the respective argument isn't
5919 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5921 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5922 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5923 (MASK_CLASS_P): Update for rename.
5924 (MAYBE_MASK_CLASS_P): Ditto.
5925 (REG_CLASS_NAMES): Update.
5926 (REG_CLASS_CONTENT): Update.
5927 * config/i386/i386.c (regclass_map): Update for MASK_REG
5928 and ALL_MASK_REGS rename.
5929 * config/i386/constraints.md (Yk): Update for rename.
5932 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5934 * config/i386/i386.h (enum reg_class): Remove
5935 EVEX_SSE_REGS and MOD4_SSE_REGS.
5936 (REG_CLASS_NAMES): Update.
5937 (REG_CLASS_CONTENT): Update.
5938 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5939 registers as ALL_SSE_REGS.
5940 (ix86_additional_allocno_class_p): Remove.
5941 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5942 (ix86_register_priority): Lower priority of EVEX SSE registers.
5943 Use IN_RANGE macro where appropriate.
5944 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5945 AVX-5124VNNIW checks.
5946 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5947 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5948 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5949 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5950 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5951 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5952 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5953 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5954 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5955 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5956 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5957 * config/i386/constraints.md (Yh): Remove.
5959 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
5961 * config/i386/i386.c (regclass_map): Declare integer REX registers
5964 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
5966 * doc/service.texi (Service): Switch the fsf.org link to https.
5968 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
5971 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5972 Define to speculation_safe_value_not_needed.
5974 2018-09-21 Florian Weimer <fweimer@redhat.com>
5977 * doc/extend.texi (Common Function Attributes): Mention that
5978 noreturn suppresses tail call optimization.
5980 2018-09-21 Jeff Law <law@redhat.com>
5982 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5983 vr_values::cleanup_edges_and_switches.
5984 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5986 (identify_jump_threads): Remove EDGE_IGNORE handling.
5987 (execute_vrp): Move handling of to_remove_edges and
5988 to_update_switch_stmts into vr_values class member functions.
5989 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5990 (to_update_switch_stmts): Likewise.
5991 * vr-values.c: Include cfghooks.h.
5992 (vr_values::vr_values): Initialize to_remove_edges and
5993 to_update_switch_stmts.
5994 (vr_values::~vr_values): Verify to_remove_edges and
5995 to_update_switch_stmts are empty.
5996 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5997 (vr_values::cleanup_edges_and_switches): New member function.
5998 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5999 function. Add new data members.
6001 2018-09-21 David Malcolm <dmalcolm@redhat.com>
6003 PR tree-optimization/87309
6004 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
6005 calls with pflags and alt_flags.
6006 (selftest::test_capture_of_dump_calls): Add test of interaction of
6007 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
6009 2018-09-21 Olivier Hainque <hainque@adacore.com>
6011 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
6013 2018-09-21 Olivier Hainque <hainque@adacore.com>
6015 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
6017 2018-09-21 Olivier Hainque <hainque@adacore.com>
6019 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
6020 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
6021 (VXWORKS_LIBS_RTP): Minor reordering.
6023 2018-09-21 Olivier Hainque <hainque@adacore.com>
6025 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
6026 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
6028 2018-09-21 Olivier Hainque <hainque@adacore.com>
6030 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
6031 (PTRDIFF_TYPE): Likewise.
6033 2018-09-21 Olivier Hainque <hainque@adacore.com>
6035 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
6036 triplet, similar to support for VxWorks7.
6037 * config/vxworks-dummy.h: Provide a default definition
6038 of TARGET_VXWORKS64 to 0.
6040 2018-09-21 Olivier Hainque <hainque@adacore.com>
6042 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
6043 * config/vxworks-dummy.h: here.
6045 2018-09-21 Olivier Hainque <hainque@adacore.com>
6047 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
6049 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
6050 Bo Zhou <zbo.zhou@hisilicon.com>
6052 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
6053 * config/aarch64/aarch64-tune.md: Regenerated.
6054 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
6055 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
6056 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
6058 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
6059 Julian Brown <julian@codesourcery.com>
6061 * builtins.c (get_builtin_sync_mem): Handle address spaces.
6063 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6065 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
6066 if the call takes a static chain.
6068 2018-09-21 Martin Liska <mliska@suse.cz>
6070 * auto-profile.c (autofdo_source_profile::read): Do not
6072 (read_profile): Do not add working sets.
6073 (read_autofdo_file): Remove sum_all.
6074 (afdo_callsite_hot_enough_for_early_inline): Remove const
6076 * coverage.c (struct counts_entry): Remove gcov_summary.
6077 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
6078 do not support GCOV_TAG_PROGRAM_SUMMARY.
6079 (get_coverage_counts): Remove summary and expected
6081 * coverage.h (get_coverage_counts): Likewise.
6082 * doc/gcov-dump.texi: Remove -w option.
6083 * gcov-dump.c (dump_working_sets): Remove.
6084 (main): Do not support '-w' option.
6085 (print_usage): Likewise.
6086 (tag_summary): Likewise.
6087 * gcov-io.c (gcov_write_summary): Do not dump
6089 (gcov_read_summary): Likewise.
6090 (gcov_histo_index): Remove.
6091 (gcov_histogram_merge): Likewise.
6092 (compute_working_sets): Likewise.
6093 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
6095 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
6096 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
6097 (GCOV_HISTOGRAM_SIZE): Remove.
6098 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
6099 (struct gcov_summary): Simplify rapidly just
6100 to runs and sum_max fields.
6101 (gcov_histo_index): Remove.
6102 (NUM_GCOV_WORKING_SETS): Likewise.
6103 (compute_working_sets): Likewise.
6104 * gcov-tool.c (print_overlap_usage_message): Remove
6105 trailing empty line.
6106 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
6107 (output_lines): Remove program related line.
6108 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
6109 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
6111 (input_profile_summary): Do not read it.
6112 (merge_profile_summaries): And do not merge it.
6113 (input_symtab): Do not call removed function.
6114 * modulo-sched.c (sms_schedule): Do not print sum_max.
6115 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
6116 removed when histogram method was invented.
6117 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
6119 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
6121 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
6122 and dump selected value.
6123 * profile.c (add_working_set): Remove.
6124 (get_working_sets): Likewise.
6125 (find_working_set): Likewise.
6126 (get_exec_counts): Do not work with working sets.
6127 (read_profile_edge_counts): Do not inform as sum_max is removed.
6128 (compute_branch_probabilities): Likewise.
6129 (compute_value_histograms): Remove argument for call of
6130 get_coverage_counts.
6131 * profile.h: Do not make gcov_summary const.
6133 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
6135 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
6137 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
6139 PR tree-optimization/86990
6140 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
6141 Check that the entire merged store group is made of constants only for
6144 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
6146 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
6147 (VTABLE_VERIFICATION_SPEC): Likewise.
6148 (SANITIZER_EARLY_SPEC): Likewise.
6149 (SANITIZER_SPEC): Likewise.
6150 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
6151 * doc/invoke.texi (Link Options): Document -r.
6153 2018-09-20 Richard Biener <rguenther@suse.de>
6156 * gimplify.c (gimplify_expr): Retain alignment of
6157 addressable lvalue in dereference.
6159 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
6162 * configure.ac: Check for .loc is_stmt support.
6163 * configure, config.in: Rebuilt.
6164 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
6167 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6169 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
6170 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
6173 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
6175 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6177 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
6180 2018-09-20 Marek Polacek <polacek@redhat.com>
6182 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
6184 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6186 PR tree-optimization/87288
6187 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
6188 into account when determining PEELING_FOR_NITERS.
6190 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
6192 PR tree-optimization/86877
6193 * tree-vect-loop.c (vect_analyze_loop_2): Call
6194 vect_verify_datarefs_alignment.
6196 2018-09-19 Marek Polacek <polacek@redhat.com>
6198 * doc/invoke.texi: Document -Wclass-conversion.
6200 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
6202 * config/pa/pa.c (pa_adjust_priority): Delete.
6203 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
6205 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
6206 (atomic_storehi): Likewise.
6207 (atomic_storesi): Likewise.
6208 (atomic_loaddi): Restore compare and swap exchange loop code.
6210 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
6212 PR rtl-optimization/86902
6213 * combine.c (try_combine): When changing the CC mode used, don't change
6214 an unrelated mode in other_insn to that new CC mode.
6216 2018-09-19 David Malcolm <dmalcolm@redhat.com>
6218 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
6219 with %T in place of calls to dump_generic_expr.
6220 (prune_runtime_alias_test_list): Likewise.
6221 (create_runtime_alias_checks): Likewise.
6222 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
6223 (vect_analyze_data_ref_dependence): Likewise.
6224 (vect_slp_analyze_data_ref_dependence): Likewise.
6225 (vect_record_base_alignment): Likewise. Use %G in place of call
6226 to dump_gimple_stmt.
6227 (vect_compute_data_ref_alignment): Likewise.
6228 (verify_data_ref_alignment): Likewise.
6229 (vect_find_same_alignment_drs): Likewise.
6230 (vect_analyze_group_access_1): Likewise.
6231 (vect_analyze_data_ref_accesses): Likewise.
6232 (dependence_distance_ge_vf): Likewise.
6233 (dump_lower_bound): Likewise.
6234 (vect_prune_runtime_alias_test_list): Likewise.
6235 (vect_find_stmt_data_reference): Likewise.
6236 (vect_analyze_data_refs): Likewise.
6237 (vect_create_addr_base_for_vector_ref): Likewise.
6238 (vect_create_data_ref_ptr): Likewise.
6239 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
6240 (vect_can_advance_ivs_p): Likewise.
6241 (vect_update_ivs_after_vectorizer): Likewise.
6242 (vect_gen_prolog_loop_niters): Likewise.
6243 (vect_prepare_for_masked_peels): Likewise.
6244 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
6245 (vect_determine_vectorization_factor): Likewise.
6246 (vect_is_simple_iv_evolution): Likewise.
6247 (vect_analyze_scalar_cycles_1): Likewise.
6248 (vect_analyze_loop_operations): Likewise.
6249 (report_vect_op): Likewise.
6250 (vect_is_slp_reduction): Likewise.
6251 (check_reduction_path): Likewise.
6252 (vect_is_simple_reduction): Likewise.
6253 (vect_create_epilog_for_reduction): Likewise.
6254 (vect_finalize_reduction:): Likewise.
6255 (vectorizable_induction): Likewise.
6256 (vect_transform_loop_stmt): Likewise.
6257 (vect_transform_loop): Likewise.
6258 (optimize_mask_stores): Likewise.
6259 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
6260 (vect_split_statement): Likewise.
6261 (vect_recog_over_widening_pattern): Likewise.
6262 (vect_recog_average_pattern): Likewise.
6263 (vect_determine_min_output_precision_1): Likewise.
6264 (vect_determine_precisions_from_range): Likewise.
6265 (vect_determine_precisions_from_users): Likewise.
6266 (vect_mark_pattern_stmts): Likewise.
6267 (vect_pattern_recog_1): Likewise.
6268 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
6269 (vect_record_max_nunits): Likewise.
6270 (vect_build_slp_tree_1): Likewise.
6271 (vect_build_slp_tree_2): Likewise.
6272 (vect_print_slp_tree): Likewise.
6273 (vect_analyze_slp_instance): Likewise.
6274 (vect_detect_hybrid_slp_stmts): Likewise.
6275 (vect_detect_hybrid_slp_1): Likewise.
6276 (vect_slp_analyze_operations): Likewise.
6277 (vect_slp_analyze_bb_1): Likewise.
6278 (vect_transform_slp_perm_load): Likewise.
6279 (vect_schedule_slp_instance): Likewise.
6280 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
6281 (vect_mark_stmts_to_be_vectorized): Likewise.
6282 (vect_init_vector_1): Likewise.
6283 (vect_get_vec_def_for_operand): Likewise.
6284 (vect_finish_stmt_generation_1): Likewise.
6285 (vect_check_load_store_mask): Likewise.
6286 (vectorizable_call): Likewise.
6287 (vectorizable_conversion): Likewise.
6288 (vectorizable_operation): Likewise.
6289 (vectorizable_load): Likewise.
6290 (vect_analyze_stmt): Likewise.
6291 (vect_is_simple_use): Likewise.
6292 (vect_get_vector_types_for_stmt): Likewise.
6293 (vect_get_mask_type_for_stmt): Likewise.
6294 * tree-vectorizer.c (increase_alignment): Likewise.
6296 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
6298 * doc/rtl.texi: Adjust vec_select description.
6299 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
6300 non-constant selectors.
6302 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
6304 * config/aarch64/aarch64-protos.h
6305 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
6306 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
6307 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
6308 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
6309 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
6310 (AARCH64_FL_PROFILE): Move index so flags are ordered.
6311 (AARCH64_ISA_RCPC8_4): New flag.
6312 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
6313 to aarch64_offset_9bit_signed_unscaled_p.
6314 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
6316 * config/aarch64/constraints.md (Ust): New constraint.
6317 * config/aarch64/predicates.md.
6318 (aarch64_9bit_offset_memory_operand): New predicate.
6319 (aarch64_rcpc_memory_operand): New predicate.
6321 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
6323 PR rtl-optimization/87361
6324 * rtlanal.c (nonzero_bits1): Revert accidental change.
6326 2018-09-19 Richard Biener <rguenther@suse.de>
6328 PR tree-optimization/87349
6329 PR tree-optimization/87342
6330 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
6332 2018-09-18 Marek Polacek <polacek@redhat.com>
6334 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
6335 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
6337 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6339 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
6341 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
6343 PR rtl-optimization/86882
6344 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
6346 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
6348 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
6349 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
6351 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
6354 * doc/invoke.texi (Link Options): Fix formatting and grammar.
6356 2018-09-18 Richard Biener <rguenther@suse.de>
6359 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
6360 (compute_samebase_partition_bases): Likewise.
6361 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
6362 (gimple_can_coalesce_p): Simplify.
6364 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
6366 Handle a library implementation of ffs calling __builtin_ffs.
6367 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
6368 (mmix_init_libfuncs): New function: make __builtin_ffs expand
6371 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6373 * diagnostic-show-locus.c (class layout_range): Add field
6375 (layout_range::layout_range): Add "original_idx" param and use it
6376 to initialize new field.
6377 (make_range): Use 0 for original_idx.
6378 (layout::layout): Pass in index to calls to
6379 maybe_add_location_range.
6380 (layout::maybe_add_location_range): Add param "original_idx" and
6381 pass it on to layout_range.
6382 (layout::print_any_labels): Pass on range->m_original_idx to
6384 (gcc_rich_location::add_location_if_nearby): Use 0 for
6386 * gcc-rich-location.h (text_range_label::get_text): Update for new
6388 (range_label_for_type_mismatch::get_text): Likewise.
6390 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6392 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
6394 2018-09-17 David Malcolm <dmalcolm@redhat.com>
6396 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
6397 format_string_diagnostic_t.
6398 (fmtwarn_n): Likewise.
6399 * substring-locations.c
6400 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
6401 (format_warning_n_va): Convert to...
6402 (format_string_diagnostic_t::emit_warning_n_va): ...this.
6403 (format_warning_va): Convert to...
6404 (format_string_diagnostic_t::emit_warning_va): ...this.
6405 (format_warning_at_substring): Convert to...
6406 (format_string_diagnostic_t::emit_warning): ...this.
6407 (format_warning_at_substring_n): Convert to...
6408 (format_string_diagnostic_t::emit_warning_n): ...this.
6409 * substring-locations.h (class format_string_diagnostic_t): New
6411 (format_warning_va): Convert to
6412 format_string_diagnostic_t::emit_warning_va.
6413 (format_warning_n_va): Convert to
6414 format_string_diagnostic_t::emit_warning_n_va.
6415 (format_warning_at_substring): Convert to
6416 format_string_diagnostic_t::emit_warning.
6417 (format_warning_at_substring_n): Convert to
6418 format_string_diagnostic_t::emit_warning_n.
6420 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
6421 Bernd Schmidt <bernds_cb1@t-online.de>
6423 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
6426 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
6428 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
6429 operand 0 predicate to nonimmediate operand.
6430 (rint<mode>2_frndint): Remove insn pattern.
6431 (rint<mode>2): Change operand 1 predicate to general_operand.
6432 Extend operand 1 to XFmode and generate rintxf2 insn.
6433 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
6434 Do not use X87MODEF mode macro.
6435 (frndintxf2_<rounding>_i387): Rename from
6436 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
6437 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
6438 to XFmode and generate significandxf3 insn.
6440 2018-09-17 Richard Biener <rguenther@suse.de>
6442 PR tree-optimization/87328
6443 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
6444 visiting unexecutable backedges when not iterating.
6445 (do_rpo_vn): Mark all edges not executable even when not
6448 2018-09-17 Martin Jambor <mjambor@suse.cz>
6451 * doc/invoke.texi (Warning Options): Likewise.
6453 2018-09-17 Richard Biener <rguenther@suse.de>
6455 PR tree-optimization/87301
6456 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
6457 clean EH info from leftover copy assignments.
6459 2018-09-17 Martin Liska <mliska@suse.cz>
6461 PR gcov-profile/85871
6462 * gcov.c (output_intermediate_file): Fix out of bounds
6465 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
6467 * config/arc/arc.c: Object attributes for core4 not reflected
6469 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
6472 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
6474 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
6476 2018-09-17 Martin Liska <mliska@suse.cz>
6478 * doc/gcov.texi: Document new option --use-hotness-colors.
6479 * gcov.c (struct source_info): Declare new field.
6480 (source_info::source_info): Set default for maximum_count.
6481 (print_usage): Add new -q option.
6482 (process_args): Process it.
6483 (accumulate_line_info): Save src->maximum_count.
6484 (output_line_beginning): Make color line number if
6485 flag_use_hotness_colors is set.
6486 (output_line_details): Pass default argument value.
6487 (output_lines): Pass src->maximum_count.
6489 2018-09-17 Martin Liska <mliska@suse.cz>
6491 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
6492 Use processor_names table.
6493 * config/i386/i386.c (ix86_default_align): Use
6494 processor_cost_table for alignment values.
6495 (ix86_option_override_internal): Use processor_names.
6496 (ix86_function_specific_print): Likewise.
6497 * config/i386/i386.h (struct processor_costs):
6498 Add alignment values.
6499 (struct ptt): Remove and replace with const char *.
6500 * config/i386/x86-tune-costs.h (struct processor_costs):
6501 Declare default alignments for all costs.
6503 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
6505 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
6506 symbolics or VR_VARYING ranges for ABS_EXPR.
6507 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
6508 when range will wrap.
6510 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
6513 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
6514 before and after a JUMP_TABLE_DATA.
6516 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
6519 * dojump.c (do_compare_and_jump): Canonicalize function pointers
6520 when one operand is a function pointer. Use POINTER_TYPE_P and
6521 FUNC_OR_METHOD_TYPE_P.
6522 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
6523 * fold-const.c (build_range_check): Likewise.
6524 * match.pd (simple_comparison): Likewise.
6526 2018-09-14 David Malcolm <dmalcolm@redhat.com>
6529 * spellcheck.c (get_edit_distance_cutoff): New function.
6530 (selftest::test_edit_distance_unit_test_oneway): Rename to...
6531 (selftest::test_get_edit_distance_one_way): ...this.
6532 (selftest::test_get_edit_distance_unit): Rename to...
6533 (selftest::test_get_edit_distance_both_ways): ...this.
6534 (selftest::test_edit_distances): Move tests to this new function,
6535 and test some more pairs of strings. Update for above renaming.
6536 (selftest::get_old_cutoff): New function.
6537 (selftest::test_get_edit_distance_cutoff): New function.
6538 (selftest::assert_suggested_for): New function.
6539 (ASSERT_SUGGESTED_FOR): New macro.
6540 (selftest::assert_not_suggested_for): New function.
6541 (ASSERT_NOT_SUGGESTED_FOR): New macro.
6542 (selftest::test_suggestions): New function.
6543 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
6544 tests to selftest::test_edit_distances and call it. Add calls to
6545 selftest::test_get_edit_distance_cutoff and
6546 selftest::test_suggestions.
6547 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
6548 (best_match::consider): Replace hard-coded cutoff calculation with
6550 (best_match::get_cutoff): New declaration.
6551 (best_match::get_best_meaningful_candidate): Likewise.
6553 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6555 * builtins.c (fold_builtin_strlen): Remove TODO comment.
6557 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6560 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
6562 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
6563 terminated string literal.
6565 2018-09-14 Martin Sebor <msebor@redhat.com>
6567 * builtins.c (unterminated_array): Handle ARRAY_REF.
6568 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
6569 * builtins.h (unterminated_array): Declare extern.
6570 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
6572 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
6575 2018-09-14 Martin Sebor <msebor@redhat.com>
6576 Jeff Law <law@redhat.com>
6578 * builtins.c (unterminated_array): New.
6579 (expand_builtin_strcpy): Adjust.
6580 (expand_builtin_strcpy_args): Detect unterminated arrays.
6581 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
6582 unterminated arrays.
6583 * gimple-fold.h (get_maxval_strlen): Add argument.
6584 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
6586 * gimple-fold.c (get_range_strlen): Add argument.
6587 (get_maxval_strlen): Adjust.
6588 * gimple-fold.h (get_range_strlen): Add argument.
6590 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
6592 * config/i386/movdirintrin.h: Fix copyright year.
6594 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
6596 * reg-stack.c: Include regs.h.
6597 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6598 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6599 FIRST_STACK_REG, not DFmode.
6600 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6601 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
6602 (change stack): Default register mode to the reg_raw_mode of
6603 FIRST_STACK_REG, not DFmode.
6604 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6605 (*swapxf): Rename from swapxf.
6607 2018-09-14 Carl Love <cel@us.ibm.com>
6609 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6610 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6612 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
6615 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6618 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
6621 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6623 2018-09-14 Jason Merrill <jason@redhat.com>
6625 Fix --enable-gather-detailed-mem-stats.
6626 * hash-table.c (hash_table_usage): Change from variable to function.
6627 * hash-table.h: Adjust.
6628 * Makefile.in: Add missing dependencies on hash-table.h.
6630 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6632 PR tree-optimization/87259
6634 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6635 execute_cse_reciprocals_1 has tried transforming.
6637 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
6639 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6640 VR_VARYING for PLUS/MINUS_EXPR.
6642 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
6644 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6647 2018-09-14 Richard Biener <rguenther@suse.de>
6650 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6651 bits for the merged partition.
6653 2018-09-13 Martin Sebor <msebor@redhat.com>
6654 Bernd Edlinger <bernd.edlinger@hotmail.de>
6656 * builtins.h (c_srlen): Add argument.
6657 * builtins.c (warn_string_no_nul): New function.
6658 (c_strlen): Add argument and use it. Update recursive calls.
6659 Pass DECL argument to string_constant to get info on non
6660 terminated strings. Update *NONSTR as needed.
6661 (fold_builtin_strlen): Add argument to calls to c_strlen.
6662 Warn for unterminated arrays.
6663 (warn_string_no_null): Add prototype.
6664 * expr.c (string_constant): Update arguments. Update recursive
6665 calls appropriately. Detect missing NUL terminator and outermost
6666 declaration its missing in.
6667 Improve checks for arrays with nonzero lower bound or elements
6668 that are not a single byte. Simplify offset computation.
6669 Simplify checks for non-NUL terminated strings.
6670 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6671 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6673 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
6675 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6677 * fold-const.c (c_getstr): Fix function comment. Remove unused third
6678 argument. Fix range checks.
6679 * fold-const.h (c_getstr): Adjust protoype.
6680 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6681 string is constant but contains no NUL byte.
6683 * expr.c (string_constant): Adjust function comment.
6684 Remove bogus check for zero termination.
6686 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6688 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6689 (get_constant_size): Don't make STRING_CSTs larger than they are.
6690 (check_string_literal): New check function for STRING_CSTs.
6691 (output_constant): Use it.
6693 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
6696 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6698 2018-09-13 Richard Biener <rguenther@suse.de>
6700 PR tree-optimization/87263
6701 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6702 (struct unwind_state): Add max_rpo field.
6703 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6704 Compute max_rpo, the max RPO number a block can be backwards reached
6705 from. Re-write non-iterating mode to a RPO ordered worklist approach,
6706 separating it from the iterating mode.
6708 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6710 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6711 (rfs_decision): New scheduling decision.
6713 2018-09-13 Richard Biener <rguenther@suse.de>
6716 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6717 (vn_nary_op_insert_pieces_predicated): Do not write useless
6718 valid_dominated_by_p entry outside of the allocated storage.
6720 2018-09-13 Omar Sandoval <osandov@osandov.com>
6721 Tom de Vries <tdevries@suse.de>
6724 * dwarf2out.c (is_c): New function.
6725 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6727 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
6730 * config/aarch64/aarch64.md (*aarch64_bfxil):
6732 * config/aarch64/constraints.md (Ulc): Define.
6733 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6735 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6738 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
6740 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6741 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6742 aarch64_layout_frame call.
6743 (aarch64_expand_epilogue): Likewise.
6744 (aarch64_initial_elimination_offset): Likewise.
6745 (aarch64_get_separate_components): Likewise.
6746 (aarch64_use_return_insn_p): Likewise.
6747 (aarch64_layout_frame): Remove unneeded check.
6749 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6751 * configure.ac: Only append
6752 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6753 gcc_config_arguments if it was never reconfigured or last reconfigure
6754 was with different arguments.
6755 * configure: Regenerated.
6757 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6758 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6761 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6762 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6764 2018-09-13 Jakub Jelinek <jakub@redhat.com>
6766 PR tree-optimization/87287
6767 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6768 X % C == 0 to X % (unsigned) C == 0 optimization to ...
6769 * match.pd (X % C == 0): ... here. New optimization.
6771 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6774 * expr.h (maybe_optimize_mod_cmp): Declare.
6775 * expr.c (mod_inv): New function.
6776 (maybe_optimize_mod_cmp): New function.
6777 (do_store_flag): Use it.
6778 * cfgexpand.c (expand_gimple_cond): Likewise.
6780 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
6781 Julian Brown <julian@codesourcery.com>
6784 * gimplify.c (gimplify_scan_omp_clauses): Set
6785 target_firstprivatize_array_bases in OpenACC parallel and kernels
6786 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6787 OpenACC data regions.
6789 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
6791 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6792 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6794 2018-09-12 Richard Biener <rguenther@suse.de>
6796 PR tree-optimization/87280
6797 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6798 edge but unreachable target.
6799 (do_rpo_vn): For conservatively handling a PHI only mark
6800 the backedge executable but not the block reachable.
6802 2018-09-12 Richard Biener <rguenther@suse.de>
6804 PR tree-optimization/87266
6805 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6808 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
6810 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6812 ("trunc<BFP:mode><DFP_ALL:mode>2")
6813 ("trunc<DFP_ALL:mode><BFP:mode>2")
6814 ("extend<BFP:mode><DFP_ALL:mode>2")
6815 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6816 according to the target operand type.
6818 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6819 Andreas Krebbel <krebbel@linux.ibm.com>
6821 PR tree-optimization/86844
6822 * gimple-ssa-store-merging.c
6823 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6824 there are any overlapping stores in between them, make sure they are
6825 also coalesced or we give up completely.
6827 2018-09-12 Jakub Jelinek <jakub@redhat.com>
6830 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6831 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
6833 2018-09-12 Tom de Vries <tdevries@suse.de>
6835 * common.opt (gdescribe-dies): Add option.
6836 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6837 attribute for artifical and nameless decls.
6838 (dwarf2out_register_external_die): Add description attribute to
6839 external reference die.
6840 (add_desc_attribute): New functions.
6841 (gen_subprogram_die): Add description attribute to
6842 DW_TAG_call_site_parameter.
6843 * tree-pretty-print.c (print_generic_expr_to_str): New function.
6844 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6845 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6847 (@item -gdescribe-dies): Add.
6849 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6851 * tree-vrp.c (vrp_shift_undefined_p): Remove.
6852 (extract_range_from_binary_expr_1: Call
6853 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6854 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6857 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
6859 * gimple-ssa-warn-alloca.c
6860 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6861 field for ALLOCA_BOUND_*_LARGE.
6863 2018-09-11 Nathan Sidwell <nathan@acm.org>
6865 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6867 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6869 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6870 for clobbers. Remove obsolete comment.
6872 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6874 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6875 mpxchk, mpxld and mpxst types.
6876 (define_attr length_immediate): Remove all processing of mpx types.
6877 (define_attr prefix_0f): Ditto.
6878 (define_attr memory): Ditto.
6880 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
6882 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6883 (log<mode>2): Change operand 1 predicate to general_operand.
6884 Extend operand 1 to XFmode and generate logxf3 insn.
6885 (log10<mode>2): Change operand 1 predicate to general_operand.
6886 Extend operand 1 to XFmode and generate log10xf3 insn.
6887 (log2<mode>2): Change operand 1 predicate to general_operand.
6888 Extend operand 1 to XFmode and generate log2xf3 insn.
6889 (fyl2xp1_extend<mode>xf3_i387): Remove.
6890 (log1p<mode>2): Change operand 1 predicate to general_operand.
6891 Extend operand 1 to XFmode and generate log1pxf3 insn.
6892 (fxtract_extend<mode>xf3_i387): Remove.
6893 (logb<mode>2): Change operand 1 predicate to general_operand.
6894 Extend operand 1 to XFmode and generate logbxf3 insn.
6895 (ilogb<mode>2): Change operand 1 predicate to general_operand.
6896 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6897 (significand<mode>2): Change operand 1 predicate to general_operand.
6898 Extend operand 1 to XFmode and generate significandxf3 insn.
6900 2018-09-11 Nathan Sidwell <nathan@acm.org>
6902 * gcc.c (perror_with_name, pfatal_with_name): Delete.
6903 (load_specs): Use fatal_error.
6904 (DELETE_IF_ORDINARY, process_command): Use error.
6905 (execute, run_attempt): Use fatal_error.
6907 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
6909 * diagnostic-core.h (sorry_at): New prototype.
6910 * diagnostic.c (sorry_at): New function.
6912 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
6914 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6915 by zero as VR_UNDEFINED.
6917 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6919 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6920 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6921 (<sincos>mode2): New expander.
6922 (sincos_extend<mode>xf3_i387): Remove insn pattern.
6923 (sincos -> sin, cos splitters): Remove splitter patterns.
6924 (sincos<mode>3): Change operand 2 predicate to general_operand.
6925 Extend operand 2 to XFmode and generate sincosxf3 insn.
6926 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6927 Change operand 3 predicate to const1_operand.
6928 (fptan_extend<mode>xf4_i387): Remove insn pattern.
6929 (tanxf2): Update operands in the call to fptanxf4_i387.
6930 (tan<mode>2): Change operand 1 predicate to general_operand.
6931 Extend operand 1 to XFmode and generate tanxf3 insn.
6932 (atan2xf3): Rename from *fpatanxf3_i387.
6933 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6934 (atan2xf3): Remove expander.
6935 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
6936 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6937 (atan<mode>2): Change operand 1 predicate to general_operand.
6938 Extend operand 1 to XFmode and generate atanxf3 insn.
6940 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
6942 * config/i386/i386.md (x87/SSE constant load splitter): Use
6943 memory_operand instead of nonimmediate_operand for input operand
6946 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
6948 * config/i386/i386.md (float partial SSE register stall splitter): Move
6949 splitter near its instruction pattern.
6950 (float_extend partial SSE register stall splitter): Ditto.
6951 (float_truncate partial SSE register stall splitter): Ditto.
6953 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
6956 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6957 to speculation_safe_value_not_needed.
6960 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6961 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6962 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6963 leaf_function_p, instead use has_hard_reg_initial_val.
6965 2018-09-09 Nathan Sidwell <nathan@acm.org>
6967 * gcc.h (pfatal_with_name): Don't declare here.
6968 * gcc.c (pfatal_with_name): Make static.
6970 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
6972 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6975 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
6977 PR rtl-optimization/85458
6978 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6979 priority hook to reduce the priority of EXPR.
6981 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
6983 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6984 DImode for x87 on 32bit targets. Conditionally disable x87 modes
6985 with X87_ENABLE_FLOAT. Remove preparation code.
6986 (*float<SWI48:mode><MODEF:mode>2): Rename from
6987 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
6988 math using "enabled" attribute.
6989 (*floatdi<MODEF:mode>2_i387): Rename from
6990 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
6991 enable for 32bit targets only.
6992 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6994 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6995 as operand 1 predicate. Rewrite as define_insn_and_split.
6996 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6998 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7000 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
7001 to fallthru to FLOAT case.
7003 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7006 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
7007 around folding of vec_sl to handle out of range shift values.
7009 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
7011 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
7012 Update callers to gen_fix_trunc<mode>_i387_fisttp
7013 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
7014 nonimmediate_operand.
7015 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
7016 and corresponding splitters.
7017 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
7018 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
7019 (fix_truncdi_i387_with_temp): Remove insn pattern
7020 and corresponding splitters.
7021 (fix_trunc<mode>_i387): Change operand 0 predicate to
7022 nonimmediate_operand.
7023 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
7024 and corresponding splitters.
7025 (*fistdi2_1): Remove.
7027 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
7028 (lrintxfdi2): Remove expander. Reimplement as define_insn.
7029 (*fist<mode>2_1): Remove.
7030 (fist<mode>2): Ditto.
7031 (fist<mode>2_with_temp): Remove insn pattern and corresponding
7033 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
7034 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
7035 (fistdi2_<rounding>): Change operand 0 predicate to
7036 nonimmediate_operand.
7037 (fistdi2_<rounding>_with_temp): Remove insn pattern
7038 and corresponding splitters.
7039 (fist<mode>2_<rounding>): Change operand 0 predicate to
7040 nonimmediate_operand.
7041 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
7042 and corresponding splitters.
7044 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
7046 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
7048 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
7051 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7053 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
7054 early gimple folding of vec_splat().
7055 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
7056 * gimple-fold.h: Add an extern define for tree_vec_extract().
7058 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
7060 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
7061 wrappers around TREE_TYPE comparisons.
7063 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7066 * config/s390/predicates.md: Add nonsym_memory_operand.
7067 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
7068 contains a SYMBOL_REF, load it into an intermediate pseudo.
7069 (s390_emit_compare_and_swap): Legitimize operand.
7070 * config/s390/s390.md: Use the new nonsym_memory_operand
7071 with UNSPECV_CAS patterns.
7073 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7076 * config/s390/s390-passes.def: New file.
7077 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
7079 (make_pass_s390_early_mach): Add declaration.
7080 * config/s390/s390.c (make_pass_s390_early_mach):
7081 (s390_option_override): Remove dynamic registration.
7082 * config/s390/t-s390: Add s390-passes.def.
7084 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
7086 * config/s390/s390.c (s390_decompose_constant_pool_ref):
7087 Remove UNSPEC_LTREL_BASE check.
7088 (annotate_constant_pool_refs): Likewise.
7089 (find_constant_pool_ref): Likewise.
7090 (find_ltrel_base): Removed.
7091 (replace_ltrel_base): Removed.
7092 (s390_mainpool_finish): Remove replace_ltrel_base call.
7093 (s390_chunkify_start): Remove pending LTREL_BASE logic.
7094 (s390_chunkify_finish): Remove replace_ltrel_base call.
7095 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
7097 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
7100 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
7101 to speculation_safe_value_not_needed.
7103 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
7104 Bernd Schmidt <bernds_cb1@t-online.de>
7106 * config/nvptx/nvptx-opts.h: New file.
7107 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
7108 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
7110 (TARGET_SM35): New macro.
7111 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
7113 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
7115 (misa=): New option.
7116 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
7118 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
7120 * config/i386/i386.md (truncdfsf2): Remove expander.
7121 (truncdfsf2_with_temp): Ditto.
7122 (truncxf<mode>2): Ditto.
7123 (*truncdfsf_fast_mixed): Remove insn pattern.
7124 (*truncdfsf_fast_i387): Ditto.
7125 (*truncdfsf_mixed): Ditto.
7126 (*truncdfsf_i387): Ditto.
7127 (*truncdfsf2_i387_1): Ditto.
7128 (*truncxfsf2_mixed): Ditto.
7129 (*truncxfdf2_mixed): Ditto.
7130 (*truncxf<mode>2_i387_noop): Ditto. Update callers
7131 to call gen_truncxf<mode>2 instead.
7132 (*truncxf<mode>2_i387): Remove.
7133 (reg->reg splitters): Remove splitter pattern.
7134 (reg->mem splitters): Ditto.
7136 (truncdfsf2): New insn pattern.
7137 (truncxf<mode>2): Ditto.
7139 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7141 * tree-ssa-math-opts.c (is_mult_by): New function.
7142 (is_square_of): Use the above.
7143 (optimize_recip_sqrt): New function.
7144 (pass_cse_reciprocals::execute): Use the above.
7146 2018-09-05 Richard Biener <rguenther@suse.de>
7149 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
7150 to zero-init the emplaced vec.
7152 2018-09-05 Martin Liska <mliska@suse.cz>
7154 PR tree-optimization/87205
7155 * tree-switch-conversion.c (pass_lower_switch::execute):
7156 Group cases for switch statements.
7158 2018-09-05 Richard Biener <rguenther@suse.de>
7160 PR tree-optimization/87217
7161 * tree-ssa-sccvn.c (vuse_valueize): New.
7162 (vn_reference_lookup_pieces): Use it.
7163 (vn_reference_lookup): Likewise.
7165 2018-09-05 Nathan Sidwell <nathan@acm.org>
7168 * stor-layout.c (place_field): Scan forwards to check last
7169 bitfield when ms_bitfield_placement is in effect.
7171 2018-09-05 Richard Biener <rguenther@suse.de>
7174 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
7177 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
7178 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
7180 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
7181 * config.gcc (extra_objs): Build it.
7182 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
7184 * config/aarch64/aarch64-passes.def
7185 (pass_tag_collision_avoidance): New pass.
7186 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
7187 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
7188 (aarch64_classify_address): Remove static qualifier.
7189 (aarch64_address_info, aarch64_address_type): Move to...
7190 * config/aarch64/aarch64-protos.h: ... here.
7191 (make_pass_tag_collision_avoidance): New function.
7192 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
7195 2018-09-05 Martin Liska <mliska@suse.cz>
7197 * doc/gcov.texi: Update documentation of humar
7199 * gcov.c (format_count): Print one decimal place, it provides
7200 more fine number of situations like '1G' vs. '1.4G'.
7202 2018-09-05 Martin Liska <mliska@suse.cz>
7205 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
7206 * optc-gen.awk: Allow 'Var' for Deprecated options in order
7207 to generate a MASK value.
7209 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
7212 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
7213 if frame pointer isn't used.
7214 (compute_frame_pointer_to_fb_displacement): Likewise.
7216 2018-09-04 Jakub Jelinek <jakub@redhat.com>
7219 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
7220 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
7221 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
7222 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
7223 and OPTION_MASK_ISA_XSAVEC_UNSET.
7225 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
7227 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
7228 XOR operations in NAND case.
7230 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7232 * wide-int-range.cc (wide_int_range_convert): New.
7233 * wide-int-range.h (wide_int_range_convert): New.
7234 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
7235 code into wide_int_range_convert.
7236 (extract_range_into_wide_ints): Do not munge anti range constants
7237 into the entire domain. Just return the range back.
7239 2018-09-04 Martin Liska <mliska@suse.cz>
7241 * genmatch.c (output_line_directive): Add new argument
7243 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
7245 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7247 * doc/invoke.texi (Option Summary): Add whitespace.
7249 * doc/invoke.texi (Option Summary): Add -Waligned-new.
7251 2018-09-04 Richard Biener <rguenther@suse.de>
7253 PR tree-optimization/87211
7254 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
7255 backedge value we're supposed to treat as VARYING also number
7256 the PHI to VARYING in case it got a different value-number already.
7258 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
7260 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
7261 (extract_range_from_binary_expr_1): Do not call
7262 vrp_can_optimize_bit_op.
7263 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
7265 (wide_int_range_get_mask_and_bounds): New.
7266 (wide_int_range_optimize_bit_op): New.
7267 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
7268 (wide_int_range_bit_and): Same.
7269 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
7270 (wide_int_range_optimize_bit_op): New.
7271 (wide_int_range_get_mask_and_bounds): New.
7273 2018-09-04 Richard Biener <rguenther@suse.de>
7275 PR tree-optimization/87176
7276 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
7277 variable. When value-numbering a virtual PHI node make sure
7278 to not value-number to the backedge value.
7280 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
7282 * doc/extend.texi (Long Long, Hex Floats): Document support for
7283 long long and hex floats in more recent versions of ISO C++.
7285 2018-09-03 Richard Biener <rguenther@suse.de>
7287 PR tree-optimization/87177
7288 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
7291 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7293 * bb-reorder.c (edge_order): Convert to C-qsort-style
7294 tri-state comparator.
7295 (reorder_basic_blocks_simple): Change std::stable_sort to
7298 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7300 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
7301 tri-state comparator.
7302 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
7304 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7306 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
7307 (mergesort): ... here as maximum count for using netsort.
7308 (gcc_qsort): Set nlim to 3 if stable sort is requested.
7309 (gcc_stablesort): New.
7310 * system.h (gcc_stablesort): Declare.
7312 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
7314 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
7315 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
7316 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
7318 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
7320 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
7321 lxsdx and stxsdx alternatives.
7322 (*mov<mode>_hardfloat64): Ditto.
7323 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
7325 2018-09-03 Richard Biener <rguenther@suse.de>
7327 PR tree-optimization/87200
7328 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
7331 2018-09-03 Martin Liska <mliska@suse.cz>
7333 PR tree-optimization/87201
7334 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7335 Fix parenthesis in an expression.
7337 2018-09-03 Richard Biener <rguenther@suse.de>
7339 PR tree-optimization/87197
7340 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
7341 visited. CSE the VN_INFO hashtable lookup.
7343 PR tree-optimization/87169
7344 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
7345 iterating make sure there's no extra backedges from irreducible
7346 regions feeding the header. Mark the destination block
7349 2018-09-03 Martin Liska <mliska@suse.cz>
7352 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
7353 * common/common-targhooks.c (default_get_valid_option_values):
7355 * common/common-targhooks.h (default_get_valid_option_values):
7357 * common/config/i386/i386-common.c: Move processor_target_table
7359 (ix86_get_valid_option_values): New function.
7360 (TARGET_GET_VALID_OPTION_VALUES): New macro.
7361 * config/i386/i386.c (struct ptt): Move to i386-common.c.
7362 (PTA_*): Move all defined masks into i386-common.c.
7363 (ix86_function_specific_restore): Use new processor_cost_table.
7364 * config/i386/i386.h (struct ptt): Moved from i386.c.
7365 (struct pta): Likewise.
7366 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
7367 * doc/tm.texi.in: Likewise.
7368 * opt-suggestions.c (option_proposer::suggest_option):
7369 Pass prefix to build_option_suggestions.
7370 (option_proposer::get_completions): Likewise.
7371 (option_proposer::build_option_suggestions): Use the new target
7373 * opts.c (struct option_help_tuple): New struct.
7374 (print_filtered_help): Use the new target hook.
7376 2018-09-03 Martin Liska <mliska@suse.cz>
7379 * predict.c (set_even_probabilities): Add likely_edges
7380 argument and handle cases where we have precisely one
7382 (combine_predictions_for_bb): Catch also likely_edges.
7383 (tree_predict_by_opcode): Handle gswitch statements.
7384 * tree-cfg.h (find_case_label_for_value): New declaration.
7385 (find_taken_edge_switch_expr): Likewise.
7386 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
7387 Find pivot in decision tree based on probabily, not by number of
7390 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
7392 * doc/standards.texi (Standards): Update Objective-C reference.
7394 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7396 * doc/install.texi (Prerequisites): Update link for MPC.
7398 2018-09-01 Michael Matz <matz@suse.de>
7400 PR tree-optimization/87074
7401 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
7402 PHIs for outer-loop uses.
7404 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7406 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
7407 * doc/invoke.texi (C Dialect Options): Ditto.
7409 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
7411 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
7413 2018-08-31 Richard Biener <rguenther@suse.de>
7415 PR tree-optimization/87168
7416 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
7417 (rpo_elim::eliminate_avail): When OP was not visited it must
7420 2018-08-31 David Malcolm <dmalcolm@redhat.com>
7422 * tree-vrp.c (copy_value_range): Convert param "from" from
7423 "value_range *" to "const value_range *".
7424 (range_is_null): Likewise for param "vr".
7425 (range_int_cst_p): Likewise.
7426 (range_int_cst_singleton_p): Likewise.
7427 (symbolic_range_p): Likewise.
7428 (value_ranges_intersect_p): Likewise for both params.
7429 (value_range_nonnegative_p): Likewise for param "vr".
7430 (value_range_constant_singleton): Likewise.
7431 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
7432 (extract_range_into_wide_ints): Likewise for param "vr".
7433 (extract_range_from_multiplicative_op): Likewise for params "vr0"
7435 (vrp_can_optimize_bit_op): Likewise.
7436 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
7438 (extract_range_from_unary_expr): Likewise.
7439 (debug_value_range): Likewise for param "vr".
7440 (value_range::dump): Add "const" qualifier.
7441 (vrp_prop::check_array_ref): Convert local "vr" from
7442 "value_range *" to "const value_range *".
7443 (vrp_prop::check_mem_ref): Likewise.
7444 (vrp_prop::visit_stmt): Likewise for local "old_vr".
7445 (vrp_intersect_ranges_1): Likewise for param "vr_1".
7446 (vrp_intersect_ranges): Likewise.
7447 (simplify_stmt_for_jump_threading): Likewise for local "vr".
7448 (vrp_prop::vrp_finalize): Likewise.
7449 * tree-vrp.h (value_range::dump): Add "const" qualifier.
7450 (vrp_intersect_ranges): Add "const" qualifier to params as above.
7451 (extract_range_from_unary_expr): Likewise.
7452 (value_range_constant_singleton): Likewise.
7453 (symbolic_range_p): Likewise.
7454 (copy_value_range): Likewise.
7455 (extract_range_from_binary_expr_1): Likewise.
7456 (range_int_cst_p): Likewise.
7457 (vrp_set_zero_nonzero_bits): Likewise.
7458 (range_int_cst_singleton_p): Likewise.
7460 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
7462 * config/aarch64/arm_neon.h (vabsd_s64): New.
7463 (vnegd_s64): Likewise.
7465 2018-08-31 Martin Jambor <mjambor@suse.cz>
7467 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
7469 2018-08-31 Martin Liska <mliska@suse.cz>
7471 * ipa-icf.c (sem_item::add_type): Use
7472 sem_item::m_type_hash_cache.
7473 * ipa-icf.h: Move the cache from sem_item_optimizer
7476 2018-08-31 Nathan Sidwell <nathan@acm.org>
7478 * doc/extend.texi (Backwards Compatibility): Remove implicit
7479 extern C leeway of () being (...).
7481 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7483 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
7485 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
7489 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
7491 2018-08-31 Jakub Jelinek <jakub@redhat.com>
7494 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
7495 gen_int_mode. Formatting fixes.
7497 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
7499 * target.def (custom_function_descriptors): Improve documentation.
7500 * doc/tm.texi.in (Trampolines): Expand discussion of function
7501 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
7502 beginning of the section.
7503 * doc/tm.texi: Regenerated.
7505 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
7507 * cfg.h (class auto_edge_flag): Spell out the template-id of the
7508 base class in the initializer list. This is a workaround for
7509 building with older GCC.
7510 (class auto_bb_flag): Likewise.
7512 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
7514 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
7515 (altivec_vcmpequ<VI_char>_p): Remove star.
7516 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
7518 (expand_strncmp_vec_sequence): New function.
7519 (emit_final_str_compare_vec): New function.
7520 (expand_strn_compare): Add support for vector strncmp.
7521 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
7522 length specification to bytes.
7523 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
7524 (vcmpnezb_p): New pattern.
7525 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
7526 for option -mstring-compare-inline-limit.
7528 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
7530 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
7531 (PTA_SKYLAKE): Add PTA_AES.
7532 (PTA_GOLDMONT): Likewise.
7534 2018-08-29 Jan Hubicka <jh@suse.cz>
7537 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
7538 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
7540 2018-08-29 Jan Hubicka <jh@suse.cz>
7542 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
7544 (hash_tree): Do not visit TYPE_STUB_DECL.
7545 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
7546 stream TYPE_STUB_DECL.
7547 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
7548 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
7549 after free_lang_data.
7550 (type_in_anonymous_namespace_p): Likewise.
7552 2018-08-29 Jan Hubicka <jh@suse.cz>
7554 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7555 comment that it has to be even number.
7556 (class sreal): Change m_sig type to int32_t.
7557 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7558 int64_t for temporary calculations.
7559 (sreal_verify_basics): Drop one bit from minimum and maximum.
7561 2018-08-30 Richard Biener <rguenther@suse.de>
7563 PR tree-optimization/87147
7564 * tree-ssa-sccvn.c (SSA_VISITED): New function.
7565 (visit_phi): When the degenerate result is from the backedge and
7566 we didn't visit its definition yet drop to VARYING.
7567 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
7569 2018-08-29 Jan Hubicka <jh@suse.cz>
7571 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
7573 (hash_tree): Likewise.
7575 2018-08-29 Jan Hubicka <jh@suse.cz>
7577 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
7578 and TYPE_NEXT_REF_TO.
7580 2018-08-29 Jan Hubicka <jh@suse.cz>
7582 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
7583 comment that it has to be even number.
7584 (class sreal): Change m_sig type to int32_t.
7585 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
7586 int64_t for temporary calculations.
7587 (sreal_verify_basics): Drop one bit from minimum and maximum.
7589 2018-08-30 Tamar Christina <tamar.christina@arm.com>
7591 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
7593 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
7596 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
7597 if to_add is negative.
7599 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
7602 * builtins.c (c_strlen): Improve range checks.
7604 2018-08-29 Martin Sebor <msebor@redhat.com>
7605 Jeff Law <law@redhat.com>
7607 PR tree-optimization/86714
7608 PR tree-optimization/86711
7609 * builtins.c (c_strlen): Add arguments to call to string_constant.
7610 * expr.c (string_constant): Add argument. Detect missing nul
7611 terminator and outermost declaration it's missing in.
7612 * expr.h (string_constant): Add argument.
7613 * fold-const.c (read_from_constant_string): Add arguments to call to
7615 (c_getstr): Likewise.
7616 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7618 * tree-ssa-strlen.c (get_stridx): Likewise.
7620 2018-08-29 Jan Hubicka <jh@suse.cz>
7622 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7623 Do not stream DECL_VINDEX.
7624 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7625 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7626 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7628 2018-08-29 Richard Biener <rguenther@suse.de>
7630 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7631 virtual operands that are not default defs to honor region
7633 (rpo_vn_valueize): Remove ineffective code here.
7635 2018-08-29 Richard Biener <rguenther@suse.de>
7637 PR tree-optimization/87132
7638 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7639 when skipping defs reachable over backedges.
7641 2018-08-29 Richard Biener <rguenther@suse.de>
7643 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7644 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7645 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7646 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7647 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7648 (vn_reference_lookup_3): Remove use of const_parms.
7649 (free_rpo_vn): Do not free const_parms.
7650 (do_rpo_vn): Do not call init_const_parms.
7651 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7652 SSA_NAME_POINTS_TO_READONLY_MEMORY.
7653 (call_may_clobber_ref_p_1): Likewise.
7655 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
7658 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7660 (-ftree-scev-cprop): Document.
7662 2018-08-29 Jan Hubicka <jh@suse.cz>
7664 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7666 (sreal constructor): Update.
7667 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7668 sreal:operator/): Update.
7670 2018-08-29 Martin Liska <mliska@suse.cz>
7672 * tree-switch-conversion.c (switch_conversion::expand):
7673 Strenghten assumption about gswitch statements.
7675 2018-08-29 Richard Biener <rguenther@suse.de>
7677 PR tree-optimization/87117
7678 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7679 re-value-number released SSA VDEFs.
7681 2018-08-29 Richard Biener <rguenther@suse.de>
7683 PR tree-optimization/87126
7684 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7686 2018-08-28 Jim Wilson <jimw@sifive.com>
7688 * config/riscv/pic.md: Rewrite.
7689 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7691 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7692 (SOFTF, default_load, softload, softstore): New.
7694 2018-08-28 Jeff Law <law@redhat.com>
7696 * fold-const.c (fold_binary_loc): Remove recently added assert.
7698 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
7700 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7701 to OP parmeter of generated function.
7703 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
7705 PR tree-optimization/87009
7706 * match.pd: Add boolean optimizations.
7708 2018-08-28 Martin Sebor <msebor@redhat.com>
7711 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7712 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7713 (pass_walloca::gate): Use it.
7714 (alloca_call_type): Same.
7715 (pass_walloca::execute): Same.
7716 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7718 2018-08-28 David Malcolm <dmalcolm@redhat.com>
7720 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7721 GCC_VERSION for usage of "__gcc_dump_printf__" format from
7724 2018-08-28 Richard Biener <rguenther@suse.de>
7726 PR tree-optimization/87124
7727 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7728 constants before looking up avail.
7730 2018-08-28 Jakub Jelinek <jakub@redhat.com>
7733 * calls.c (maybe_warn_nonstring_arg): Punt early if
7734 warn_stringop_overflow is zero. Don't call get_range_strlen
7735 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7736 Swap comparison operands to have constants on rhs. Only use
7737 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
7738 increment lenrng[0].
7740 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
7742 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7743 use of tree_to_shwi. Remove duplicated test for the size being
7744 a whole number of bytes.
7746 2018-08-28 Richard Biener <rguenther@suse.de>
7748 PR tree-optimization/87117
7749 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7750 Handle removed stmt without LHS (GIMPLE_NOP).
7752 2018-08-28 Richard Biener <rguenther@suse.de>
7754 PR tree-optimization/87117
7755 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7756 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7758 2018-08-28 Richard Biener <rguenther@suse.de>
7760 PR tree-optimization/87117
7761 * tree-ssa-pre.c (compute_avail): Do not make expressions
7762 with predicated values available.
7763 (get_expr_value_id): Assert we do not run into predicated value
7766 2018-08-28 Richard Biener <rguenther@suse.de>
7768 PR tree-optimization/87117
7769 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7770 get virtual operands.
7771 (get_expr_operands): Handle STRING_CST like other decls.
7773 2018-08-28 Martin Liska <mliska@suse.cz>
7775 * tree.h: Update documentation of fndecl_built_in_p
7779 2018-08-27 Jeff Law <law@redhat.com>
7780 PR tree-optimization/87110
7781 * tree-ssa-dse.c (compute_trims): Handle non-constant
7784 2018-08-27 Martin Sebor <msebor@redhat.com>
7786 PR tree-optimization/86914
7787 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7789 2018-08-27 Martin Sebor <msebor@redhat.com>
7791 PR tree-optimization/87112
7792 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7793 the type of the bound argument.
7795 2018-08-27 Jeff Law <law@redhat.com>
7797 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7798 type does not have a TYPE_SIZE_UNIT.
7800 2018-08-27 Steve Ellcey <sellcey@cavium.com>
7802 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7803 with include of backend.h.
7805 2018-08-27 Richard Biener <rguenther@suse.de>
7807 PR tree-optimization/86927
7808 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7809 use const cond reduction code.
7811 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
7813 PR tree-optimization/85758
7814 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7816 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7819 * diagnostic-show-locus.c (class layout_range): Update for
7820 conversion of show_caret_p to a tri-state.
7821 (layout_range::layout_range): Likewise.
7822 (make_range): Likewise.
7823 (layout::maybe_add_location_range): Likewise.
7824 (layout::should_print_annotation_line_p): Don't show annotation
7825 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7826 (layout::get_state_at_point): Update for conversion of
7827 show_caret_p to a tri-state. Bail out early for
7828 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7829 underlining or source colorization.
7830 (gcc_rich_location::add_location_if_nearby): Update for conversion
7831 of show_caret_p to a tri-state.
7832 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7833 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7835 (selftest::test_one_liner_labels): Likewise.
7836 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7837 conversion of show_caret_p to a tri-state.
7838 * pretty-print.c (text_info::set_location): Likewise.
7839 * pretty-print.h (text_info::set_location): Likewise.
7840 * substring-locations.c (format_warning_n_va): Likewise.
7841 * tree-diagnostic.c (default_tree_printer): Likewise.
7842 * tree-pretty-print.c (newline_and_indent): Likewise.
7844 2018-08-27 David Malcolm <dmalcolm@redhat.com>
7847 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7848 line above for line-insertion fix-it hints.
7849 (selftest::test_fixit_insert_containing_newline): Update the
7850 expected results, and add a test with line-numbering enabled.
7852 2018-08-27 Martin Liska <mliska@suse.cz>
7855 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7856 params with DECL_HAS_VALUE_EXPR_P.
7858 2018-08-27 Martin Liska <mliska@suse.cz>
7860 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7861 selected expansion strategy.
7863 2018-08-27 Martin Liska <mliska@suse.cz>
7865 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7866 * builtins.c (is_builtin_fn): Likewise.
7867 * attribs.c (diag_attr_exclusions): Use new function
7868 fndecl_built_in_p and remove check for FUNCTION_DECL if
7870 (builtin_mathfn_code): Likewise.
7871 (fold_builtin_expect): Likewise.
7872 (fold_call_expr): Likewise.
7873 (fold_builtin_call_array): Likewise.
7874 (fold_call_stmt): Likewise.
7875 (set_builtin_user_assembler_name): Likewise.
7876 (is_simple_builtin): Likewise.
7877 * calls.c (gimple_alloca_call_p): Likewise.
7878 (maybe_warn_nonstring_arg): Likewise.
7879 * cfgexpand.c (expand_call_stmt): Likewise.
7880 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7881 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7882 (cgraph_node::verify_node): Likewise.
7883 * cgraphclones.c (build_function_decl_skip_args): Likewise.
7884 (cgraph_node::create_clone): Likewise.
7885 * config/arm/arm.c (arm_insert_attributes): Likewise.
7886 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7887 * dse.c (scan_insn): Likewise.
7888 * expr.c (expand_expr_real_1): Likewise.
7889 * fold-const.c (operand_equal_p): Likewise.
7890 (fold_binary_loc): Likewise.
7891 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7892 * gimple-low.c (lower_stmt): Likewise.
7893 * gimple-pretty-print.c (dump_gimple_call): Likewise.
7894 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7896 * gimple.c (gimple_build_call_from_tree): Likewise.
7897 (gimple_call_builtin_p): Likewise.
7898 (gimple_call_combined_fn): Likewise.
7899 * gimplify.c (gimplify_call_expr): Likewise.
7900 (gimple_boolify): Likewise.
7901 (gimplify_modify_expr): Likewise.
7902 (gimplify_addr_expr): Likewise.
7903 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7904 * ipa-cp.c (determine_versionability): Likewise.
7905 * ipa-fnsummary.c (compute_fn_summary): Likewise.
7906 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7907 * ipa-split.c (visit_bb): Likewise.
7908 (split_function): Likewise.
7909 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7910 * lto-cgraph.c (input_node): Likewise.
7911 * lto-streamer-out.c (write_symbol): Likewise.
7912 * omp-low.c (setjmp_or_longjmp_p): Likewise.
7913 (lower_omp_1): Likewise.
7914 * predict.c (strip_predict_hints): Likewise.
7915 * print-tree.c (print_node): Likewise.
7916 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7917 * trans-mem.c (is_tm_irrevocable): Likewise.
7918 (is_tm_load): Likewise.
7919 (is_tm_simple_load): Likewise.
7920 (is_tm_store): Likewise.
7921 (is_tm_simple_store): Likewise.
7922 (is_tm_abort): Likewise.
7923 (tm_region_init_1): Likewise.
7924 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7925 * tree-cfg.c (verify_gimple_call): Likewise.
7926 (move_stmt_r): Likewise.
7927 (stmt_can_terminate_bb_p): Likewise.
7928 * tree-eh.c (lower_eh_constructs_2): Likewise.
7929 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7930 * tree-inline.c (remap_gimple_stmt): Likewise.
7931 (copy_bb): Likewise.
7932 (estimate_num_insns): Likewise.
7933 (fold_marked_statements): Likewise.
7934 * tree-sra.c (scan_function): Likewise.
7935 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7936 (optimize_stack_restore): Likewise.
7937 (pass_fold_builtins::execute): Likewise.
7938 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7939 (mark_all_reaching_defs_necessary_1): Likewise.
7940 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7941 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7942 (pass_forwprop::execute): Likewise.
7943 * tree-ssa-loop-im.c (stmt_cost): Likewise.
7944 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7945 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7946 * tree-ssa-strlen.c (get_string_length): Likewise.
7947 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7948 (find_func_aliases_for_call): Likewise.
7949 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7950 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7951 * tree-tailcall.c (find_tail_calls): Likewise.
7952 * tree.c (need_assembler_name_p): Likewise.
7953 (free_lang_data_in_decl): Likewise.
7954 (get_call_combined_fn): Likewise.
7955 * ubsan.c (is_ubsan_builtin_p): Likewise.
7956 * varasm.c (incorporeal_function_p): Likewise.
7957 * tree.h (DECL_BUILT_IN): Remove and replace with
7959 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7960 (fndecl_built_in_p): New.
7962 2018-08-27 Martin Liska <mliska@suse.cz>
7964 PR tree-optimization/86847
7965 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7966 Dump also subtree probability.
7967 (switch_decision_tree::do_jump_if_equal): New function.
7968 (switch_decision_tree::emit_case_nodes): Handle special
7969 situations in balanced tree that can be emitted much simpler.
7970 Fix calculation of probabilities that happen in tree expansion.
7971 * tree-switch-conversion.h (struct cluster): Add
7973 (struct simple_cluster): Likewise.
7974 (struct case_tree_node): Add new function has_child.
7975 (do_jump_if_equal): New.
7977 2018-08-27 Martin Liska <mliska@suse.cz>
7979 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7980 Add new argument to bit_test_cluster constructor.
7981 (bit_test_cluster::emit): Set bits really number of values
7983 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7984 probability argument.
7985 * tree-switch-conversion.h (struct bit_test_cluster):
7986 Add m_handles_entire_switch.
7988 2018-08-27 Martin Liska <mliska@suse.cz>
7990 PR tree-optimization/86702
7991 * tree-switch-conversion.c (jump_table_cluster::emit):
7992 Make probabilities even for values in jump table
7993 according to number of cases handled.
7994 (switch_decision_tree::compute_cases_per_edge): Pass
7995 argument to reset_out_edges_aux function.
7996 (switch_decision_tree::analyze_switch_statement): Likewise.
7997 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
8000 2018-08-27 Martin Liska <mliska@suse.cz>
8002 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
8003 cfun argument explicitly.
8004 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
8005 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
8006 function gimple_switch_default_bb.
8007 (convert_switch_statements):
8009 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
8010 * stmt.c (label_to_block_fn): Use label_to_block and pass
8011 cfun argument explicitly and use gimple_switch_label_bb.
8012 (expand_case): Likewise.
8013 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
8014 cfun argument explicitly. Likewise.
8015 (make_edges_bb): Likewise.
8016 (make_cond_expr_edges): Likewise.
8017 (get_cases_for_edge): Likewise.
8018 (make_gimple_switch_edges): Likewise.
8019 (label_to_block_fn): Likewise.
8020 (label_to_block): Likewise.
8021 (make_goto_expr_edges): Likewise.
8022 (make_gimple_asm_edges): Likewise.
8023 (main_block_label): Likewise.
8024 (group_case_labels_stmt): Likewise.
8025 (find_taken_edge_computed_goto): Likewise.
8026 (find_taken_edge_switch_expr): Likewise.
8027 (gimple_verify_flow_info): Likewise.
8028 (gimple_redirect_edge_and_branch): Likewise.
8029 (gimple_switch_label_bb): New function.
8030 (gimple_switch_default_bb): Likewise.
8031 (gimple_switch_edge): Likewise.
8032 (gimple_switch_default_edge): Likewise.
8033 * tree-cfg.h (label_to_block_fn): Remove and replace ...
8034 (label_to_block): ... with this.
8035 (gimple_switch_label_bb): New.
8036 (gimple_switch_default_bb): Likewise.
8037 (gimple_switch_edge): Likewise.
8038 (gimple_switch_default_edge): Likewise.
8039 * tree-cfgcleanup.c (convert_single_case_switch): Use
8040 new gimple functions and pass new argument to label_to_block.
8041 (cleanup_control_flow_bb):
8042 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
8043 cfun argument explicitly.
8044 (make_eh_edges): Likewise.
8045 (redirect_eh_dispatch_edge): Likewise.
8046 (lower_resx): Likewise.
8047 (lower_eh_dispatch): Likewise.
8048 (maybe_remove_unreachable_handlers): Likewise.
8049 (unsplit_eh): Likewise.
8050 (cleanup_empty_eh): Likewise.
8051 (verify_eh_edges): Likewise.
8052 (verify_eh_dispatch_edge): Likewise.
8053 * tree-ssa-dom.c (record_edge_info): Likewise.
8054 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
8055 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
8056 (thread_through_normal_block): Likewise.
8057 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
8058 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
8059 * tree-switch-conversion.c (switch_conversion::collect): Use new
8061 (switch_conversion::check_final_bb): Likewise.
8062 (switch_conversion::gather_default_values): Pass new argument
8064 (switch_conversion::build_constructors): Likewise.
8065 (switch_decision_tree::compute_cases_per_edge): Use new
8066 gimple_switch_edge function.
8067 (switch_decision_tree::analyze_switch_statement): Pass new argument
8069 (switch_decision_tree::try_switch_expansion): Use
8070 gimple_switch_default_edge.
8071 * tree-vrp.c (find_switch_asserts): Pass new argument
8073 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
8074 (vr_values::simplify_switch_using_ranges): Likewise.
8076 2018-08-27 Richard Biener <rguenther@suse.de>
8078 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
8079 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
8081 * tree-ssa-sccvn.h (struct vn_pval): New structure.
8082 (struct vn_nary_op_s): Add unwind_to member. Add
8083 predicated_values flag and put result into a union together
8084 with a linked list of vn_pval.
8085 (struct vn_ssa_aux): Add name member to make maintaining
8086 a map of SSA name to vn_ssa_aux possible. Remove no longer
8087 needed info, dfsnum, low, visited, on_sccstack, use_processed
8088 and range_info_anti_range_p members.
8089 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
8090 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
8092 (vn_valueize): New global.
8093 (vn_context_bb): Likewise.
8094 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
8095 VN_INFO_PTR_INFO): Remove.
8096 * tree-ssa-sccvn.c: ... (rewrite)
8097 (pass_fre::execute): For -O2+ initialize loops and run
8098 RPO VN in optimistic mode (iterating). For -O1 and -Og
8099 run RPO VN in non-optimistic mode.
8100 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
8101 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
8102 * doc/invoke.texi (sccvn-max-scc-size): Remove.
8103 (rpo-vn-max-loop-depth): Document.
8104 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
8105 when valuezing the VUSE signals we walked out of the region.
8106 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
8107 (phi_translate): Set VN context block to use for availability
8109 (compute_avail): Likewise.
8110 (pre_valueize): New function.
8111 (pass_pre::execute): Adjust to the RPO VN API.
8113 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
8114 (propagate_constants_for_unrolling): Remove.
8115 (tree_unroll_loops_completely): Perform value-numbering
8116 on the unrolled bodies loop parent.
8118 2018-08-27 Richard Biener <rguenther@suse.de>
8120 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
8121 for partial antic compute.
8123 2018-08-27 Jakub Jelinek <jakub@redhat.com>
8125 PR rtl-optimization/87065
8126 * combine.c (simplify_if_then_else): Formatting fix.
8127 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
8129 (known_cond): Don't return const_true_rtx for vector modes. Use
8130 CONST0_RTX instead of const0_rtx. Formatting fixes.
8132 2018-08-27 Martin Liska <mliska@suse.cz>
8134 PR gcov-profile/87069
8135 * gcov.c (process_file): Record files already processed
8136 and warn about a file being processed multiple times.
8138 2018-08-27 Martin Liska <mliska@suse.cz>
8141 * config/aarch64/aarch64.c (aarch64_override_options_internal):
8142 Set default values for x_aarch64_*_string strings.
8143 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
8144 prefix. For -mabi do not print '=ABI' in help and use
8145 <option_value> format for -msve-vector-bits and -moverride
8148 2018-08-26 Jeff Law <law@redhat.com>
8150 * config/mips/frame-header-opt.c: Include "backend.h" rather than
8153 2018-08-26 Marek Polacek <polacek@redhat.com>
8155 PR c++/87029, Implement -Wredundant-move.
8156 * doc/invoke.texi: Document -Wredundant-move.
8158 2018-08-25 Martin Sebor <msebor@redhat.com>
8160 PR tree-optimization/87059
8161 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
8162 to the same type as the other.
8163 * fold-const.c (fold_binary_loc): Assert expectation.
8165 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
8167 * config/darwin.c (machopic_legitimize_pic_address): Clean up
8168 extraneous parentheses, dead code section and formatting.
8170 2018-08-24 David Malcolm <dmalcolm@redhat.com>
8173 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
8174 wide enough for jumps in the line-numbering to be visible.
8175 (layout::print_gap_in_line_numbering): New member function.
8176 (layout::calculate_line_spans): When using line numbering, merge
8177 line spans that are only 1 line apart.
8178 (diagnostic_show_locus): When printing line numbers, show gaps in
8179 line numbering directly, rather than printing headers.
8180 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
8181 line-numbering with multiple line spans.
8182 (selftest::test_fixit_insert_containing_newline_2): Add test of
8183 line-numbering, in which the spans are close enough to be merged.
8185 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8187 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
8188 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
8189 * tree-vrp.c (range_is_nonnull): Remove.
8190 (range_includes_zero_p): Accept value_range instead of min/max.
8191 (extract_range_from_binary_expr_1): Do not early bail on
8193 Use range_includes_zero_p instead of range_is_nonnull.
8194 (extract_range_from_unary_expr): Use range_includes_zero_p instead
8195 of range_is_nonnull.
8196 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
8197 special case VR_ANTI_RANGE.
8198 (vrp_finalize): Same.
8199 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
8201 (range_is_nonnull): Remove.
8202 * vr-values.c (vrp_stmt_computes_nonzero): Use
8203 range_includes_zero_p instead of range_is_nonnull.
8204 (extract_range_basic): Pass value_range to range_includes_zero_p
8205 instead of range_is_nonnull.
8207 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
8209 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
8210 * emit-rtl.h (rtl_data): Remove return_bnd.
8211 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
8212 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
8213 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
8214 (POINTER_BOUNDS_MODE): Remove definition.
8215 (make_pointer_bounds_mode): Remove.
8216 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
8217 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
8218 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
8219 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
8220 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
8221 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
8222 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
8224 * config/i386/i386-modes.def (BND32, BND64): Remove.
8225 * config/i386/i386.c (dbx_register_map): Remove bound registers.
8226 (dbx64_register_map): Ditto.
8227 (svr4_dbx_register_map): Ditto.
8228 (indirect_thunk_bnd_needed): Remove.
8229 (indirect_thunks_bnd_used): Ditto.
8230 (indirect_return_bnd_needed): Ditto.
8231 (indirect_return_via_cx_bnd): Ditto.
8232 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
8233 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
8234 (output_indirect_thunk): Ditto. Remove need_prefix argument.
8235 (output_indirect_thunk_function): Remove handling of
8236 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
8237 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
8238 (ix86_save_reg): Remove handling of crtl->return_bnd.
8239 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
8240 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
8241 and UNSPEC_BNDLX_ADDR.
8242 (ix86_output_indirect_branch_via_reg): Remove handling of
8243 indirect_thunk_prefix_bnd.
8244 (ix86_output_indirect_branch_via_push): Ditto.
8245 (ix86_output_function_return): Ditto.
8246 (ix86_output_indirect_function_return): Ditto.
8247 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
8248 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
8249 (CALL_USED_REGISTERS): Ditto.
8250 (REG_ALLOC_ORDER): Update for removal of bound registers.
8251 (HI_REGISTER_NAMES): Ditto.
8252 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
8253 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
8254 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
8255 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
8256 (FIRST_PSEUDO_REG): Update.
8257 (BND): Remove mode iterator.
8258 * config/i386/predicates.md (bnd_mem_operator): Remove.
8260 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8262 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
8265 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
8267 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
8268 the case in which the permute needs only a single element and
8269 repeats for every vector of the result. Extend that case to
8270 handle variable-length vectors.
8271 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
8273 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
8276 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
8277 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
8279 2018-08-24 Richard Biener <rguenther@suse.de>
8281 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
8282 bb_flags_allocated members.
8283 (auto_flag): New RAII class for allocating flags.
8284 (auto_edge_flag): New RAII class for allocating edge flags.
8285 (auto_bb_flag): New RAII class for allocating bb flags.
8286 * cfgloop.c (verify_loop_structure): Allocate temporary edge
8288 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
8289 in favor of temporarily allocated BB flag.
8290 * hsa-brig.c: Re-order includes.
8291 * hsa-dump.c: Likewise.
8292 * hsa-regalloc.c: Likewise.
8293 * print-rtl.c: Likewise.
8294 * profile-count.c: Likewise.
8296 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
8299 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
8302 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
8305 * wide-int-range.cc (wide_int_range_div): Do not ignore result
8306 from wide_int_range_multiplicative_op.
8308 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
8310 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
8313 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
8315 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
8318 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
8320 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
8321 full GENERIC expression used for replacement.
8323 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
8325 * tree-vrp.c (abs_extent_range): Remove.
8326 (extract_range_into_wide_ints): Pass wide ints by reference.
8327 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
8328 Pass wide ints by reference in all calls to
8329 extract_range_into_wide_ints.
8330 * wide-int-range.cc (wide_int_range_div): New.
8331 * wide-int-range.h (wide_int_range_div): New.
8332 (wide_int_range_includes_zero_p): New.
8333 (wide_int_range_zero_p): New.
8335 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
8337 * config/aarch64/aarch64.md (arches): New enum.
8338 (arch): New enum attr.
8339 (arch_enabled): New attr.
8340 (enabled): Now uses arch_enabled only.
8341 (simd, sve, fp16): Removed attribute.
8342 (fp): Attr now defined in terms of 'arch'.
8343 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
8344 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
8345 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
8346 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
8347 attributes into 'arch'.
8348 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
8349 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
8350 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
8351 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
8352 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
8353 'simd' attribute into 'arch'.
8354 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
8355 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
8356 Convert use of 'fp' attribute to 'arch'.
8357 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
8358 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
8360 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
8361 (different modes) Merge 'fp' and 'simd' into 'arch'.
8362 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
8365 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
8367 PR rtl-optimization/87026
8368 * expmed.c (canonicalize_comparison): If we can no longer create
8369 pseudoregisters, don't.
8371 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
8374 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
8376 * config/arm/arm.c (speculation_barrier_libfunc): New static
8378 (arm_init_libfuncs): Initialize it.
8379 (arm_emit_speculation_barrier): New function.
8380 * config/arm/arm.md (speculation_barrier): Call
8381 arm_emit_speculation_barrier for architectures that do not have
8383 (speculation_barrier_insn): Only match on Armv7 or later.
8385 2018-08-23 Richard Biener <rguenther@suse.de>
8388 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
8391 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8393 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
8394 of single-vector TBLs.
8395 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
8398 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
8401 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
8402 aarch64_evpc_tbl guard.
8404 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
8406 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
8409 2018-08-22 Martin Sebor <msebor@redhat.com>
8412 * tree-pretty-print.c (pretty_print_string): Add argument.
8413 (dump_generic_node): Call to pretty_print_string with string size.
8415 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
8417 PR rtl-optimization/86771
8418 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
8419 of two SETs into those two SETs, one to be placed at i2, if that SETs
8420 destination is modified between i2 and i3.
8422 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8424 PR tree-optimization/86725
8425 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
8427 (vect_analyze_scalar_cycles_1): Check it.
8429 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8431 PR tree-optimization/86725
8432 * tree-vect-loop.c (vect_is_simple_reduction): When treating
8433 an outer loop phi as a double reduction, make sure that the
8434 single user of the phi result is an inner loop phi.
8436 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8438 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
8439 grouped stores with gaps to a strided group.
8441 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
8443 * tree-vect-stmts.c (get_group_load_store_type)
8444 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
8445 first statement in a group.
8447 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8449 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
8450 the sequence used in gcc/gcc.c.
8452 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8455 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
8458 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8460 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
8461 Darwin10-specific unwinder-shim.
8462 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
8463 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
8464 New to cater for Darwin10 Rosetta.
8466 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8468 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
8469 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
8471 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
8476 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
8477 (dwarf2out_switch_text_section): Generate a local label for the
8478 second function sub-section and apply it as the second FDE start
8480 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
8481 second sub-section start.
8483 2018-08-22 Richard Biener <rguenther@suse.de>
8485 PR tree-optimization/86988
8486 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
8488 2018-08-22 Richard Biener <rguenther@suse.de>
8490 PR tree-optimization/86945
8491 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
8493 2018-08-22 Alexandre Oliva <oliva@adacore.com>
8495 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
8496 a comment about how uses of r2 for .sdata2 come about.
8498 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
8500 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
8502 2018-08-21 Marek Polacek <polacek@redhat.com>
8504 PR c++/86981, Implement -Wpessimizing-move.
8505 * doc/invoke.texi: Document -Wpessimizing-move.
8507 2018-08-21 Jan Hubicka <jh@suse.cz>
8509 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
8510 * tree.h (is_redundant_typedef): Remove.
8511 * dwarf2out.c (is_redundant_typedef): Turn into static function.
8513 2018-08-21 Jan Hubicka <jh@suse.cz>
8515 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
8518 2018-08-21 Tamar Christina <tamar.christina@arm.com>
8520 * expmed.c (extract_low_bits): Reject invalid subregs early.
8522 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8525 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
8528 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8530 * config/vxworks.h: Guard vxworks_asm_out_constructor and
8531 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
8532 * config/vxworks.c: Likewise.
8534 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8536 * config/vxworks.c: Set targetm.have_ctors_dtors
8537 if HAVE_INITFINI_ARRAY_SUPPORT.
8538 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
8539 if HAVE_INITFINI_ARRAY_SUPPORT.
8541 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
8543 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
8544 default search path for VxWorks < 7.
8546 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
8548 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
8549 (get_format_string): Refer to c_getstr.
8551 2018-08-21 Tom de Vries <tdevries@suse.de>
8553 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8554 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8555 (debuginfo_early_stop): Declare.
8556 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
8557 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
8558 (debuginfo_early_stop): New function.
8559 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
8560 and debuginfo_early_stop.
8561 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
8562 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
8563 (general_init): Call debuginfo_early_init.
8564 (finalize): Call debuginfo_fini.
8565 (do_compile): Call debuginfo_init.
8566 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
8568 (@item -fdump-debug, @item -fdump-earlydebug): Add.
8570 2018-08-21 Tom de Vries <tdevries@suse.de>
8572 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
8573 flag_dump_noaddr and flag_dump_unnumbered.
8575 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
8577 * wide-int-range.cc (wide_int_range_abs): New.
8578 (wide_int_range_order_set): Rename from wide_int_range_min_max.
8579 * wide-int-range.h (wide_int_range_abs): New.
8580 (wide_int_range_min_max): New.
8581 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
8582 case to call wide_int_range_abs.
8583 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
8584 (extract_range_from_abs_expr): Delete.
8586 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
8589 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
8590 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
8593 2018-08-20 Nathan Sidwell <nathan@acm.org>
8594 Jeff Law <law@redhat.com>
8596 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
8597 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8599 2018-08-20 David Malcolm <dmalcolm@redhat.com>
8602 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8603 (decl_attributes): Likewise.
8604 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8606 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8607 * diagnostic-core.h (class auto_diagnostic_group): New class.
8608 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8609 (diagnostic_report_diagnostic): Handle the first diagnostics within
8611 (emit_diagnostic): Add auto_diagnostic_group instance.
8613 (inform_n): Likewise.
8614 (warning): Likewise.
8615 (warning_at): Likewise.
8616 (warning_n): Likewise.
8617 (pedwarn): Likewise.
8618 (permerror): Likewise.
8620 (error_n): Likewise.
8621 (error_at): Likewise.
8623 (fatal_error): Likewise.
8624 (internal_error): Likewise.
8625 (internal_error_no_backtrace): Likewise.
8626 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8627 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8628 * diagnostic.h (struct diagnostic_context): Add fields
8629 "diagnostic_group_nesting_depth",
8630 "diagnostic_group_emission_count", "begin_group_cb",
8632 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8633 Add auto_diagnostic_group instance(s).
8634 (find_explicit_erroneous_behavior): Likewise.
8635 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8636 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8637 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8638 (gimplify_va_arg_expr): Likewise.
8639 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8640 (HSA_SORRY_AT): Likewise.
8641 * ipa-devirt.c (compare_virtual_tables): Likewise.
8642 (warn_odr): Likewise.
8643 * multiple_target.c (expand_target_clones): Likewise.
8644 * opts-common.c (cmdline_handle_error): Likewise.
8645 * reginfo.c (globalize_reg): Likewise.
8646 * substring-locations.c (format_warning_n_va): Likewise.
8647 * tree-inline.c (expand_call_inline): Likewise.
8648 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8649 * tree-ssa-loop-niter.c
8650 (do_warn_aggressive_loop_optimizations): Likewise.
8651 * tree-ssa-uninit.c (warn_uninit): Likewise.
8652 * tree.c (warn_deprecated_use): Likewise.
8654 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
8657 * config/i386/i386.md (eh_return): Always update EH return
8658 address in word_mode.
8660 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
8662 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8663 TARGET_SPLIT_COMPLEX_ARG is defined.
8665 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8667 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8669 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
8672 * expr.c (expand_assignment): Assert that bitpos is positive.
8673 (store_field): Likewise
8674 (expand_expr_real_1): Make sure that bitpos is positive.
8675 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8678 2018-08-20 Nathan Sidwell <nathan@acm.org>
8680 * Makefile.in (CPP_ID_DATA_H): Delete.
8681 (CPP_INTERNAL_H): Don't add it.
8682 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8683 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8685 2018-08-20 Richard Biener <rguenther@suse.de>
8687 PR tree-optimization/78655
8688 * tree-vrp.c (extract_range_from_binary_expr_1): Make
8689 pointer + offset nonnull if either operand is nonnull work.
8691 2018-08-20 Tom de Vries <tdevries@suse.de>
8693 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8694 unless the referenced die describes the added property using
8695 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
8696 Otherwise, add a DW_AT_location to the referenced die.
8698 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
8701 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8702 register_operand when calling ix86_set_reg_reg_cost.
8703 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8704 Set *total to 0 for operands that satisfy x86_64_immediate_operand
8705 predicate and to 1 otherwise.
8707 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
8709 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8710 emit a diagnostic that it is not supported and reset the option.
8711 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8712 supported and consume the option. (ASM_FINAL_SPEC): New.
8714 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8716 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8719 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
8721 C-SKY port: Documentation
8723 * doc/extend.texi (C-SKY Function Attributes): New section.
8724 * doc/invoke.texi (Option Summary): Add C-SKY options.
8725 (C-SKY Options): New section.
8726 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8728 2018-08-17 Jojo <jijie_rong@c-sky.com>
8729 Huibin Wang <huibin_wang@c-sky.com>
8730 Sandra Loosemore <sandra@codesourcery.com>
8731 Chung-Lin Tang <cltang@codesourcery.com>
8733 C-SKY port: Backend implementation
8735 * config/csky/*: New.
8736 * common/config/csky/*: New.
8738 2018-08-17 Jojo <jijie_rong@c-sky.com>
8739 Huibin Wang <huibin_wang@c-sky.com>
8740 Sandra Loosemore <sandra@codesourcery.com>
8741 Chung-Lin Tang <cltang@codesourcery.com>
8742 Andrew Jenner <andrew@codesourcery.com>
8744 C-SKY port: Configury
8746 * config.gcc (csky-*-*): New.
8747 * configure.ac: Add csky to targets for dwarf2 debug_line support.
8748 * configure: Regenerated.
8750 2018-08-17 David Malcolm <dmalcolm@redhat.com>
8752 * dump-context.h: Include "dumpfile.h".
8753 (dump_context::dump_printf_va): Convert final param from va_list
8754 to va_list *. Convert from ATTRIBUTE_PRINTF to
8755 ATTRIBUTE_GCC_DUMP_PRINTF.
8756 (dump_context::dump_printf_loc_va): Likewise.
8757 * dumpfile.c: Include "stringpool.h".
8758 (make_item_for_dump_printf_va): Delete.
8759 (make_item_for_dump_printf): Delete.
8760 (class dump_pretty_printer): New class.
8761 (dump_pretty_printer::dump_pretty_printer): New ctor.
8762 (dump_pretty_printer::emit_items): New member function.
8763 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8765 (dump_pretty_printer::emit_item): New member function.
8766 (dump_pretty_printer::stash_item): New member function.
8767 (dump_pretty_printer::format_decoder_cb): New member function.
8768 (dump_pretty_printer::decode_format): New member function.
8769 (dump_context::dump_printf_va): Reimplement in terms of
8770 dump_pretty_printer.
8771 (dump_context::dump_printf_loc_va): Convert final param from va_list
8773 (dump_context::begin_scope): Reimplement call to
8774 make_item_for_dump_printf.
8775 (dump_printf): Update for change to dump_printf_va.
8776 (dump_printf_loc): Likewise.
8777 (selftest::test_capture_of_dump_calls): Convert "stmt" from
8778 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
8779 with %T, %E, and %G.
8780 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8781 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8782 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8783 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8784 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8785 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8786 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8787 within a dump_printf_loc call to "%wu".
8788 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8789 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
8790 missing space after "=".
8791 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8792 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8793 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8794 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8795 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
8796 duplicate "vectorized" from message.
8798 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
8800 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8801 polyNxK_t element's TYPE_STRING_FLAG.
8803 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
8805 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8806 (they were unnamed before). Fix comments.
8808 2018-08-17 Nathan Sidwell <nathan@acm.org>
8810 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8812 2018-08-17 Richard Biener <rguenther@suse.de>
8814 PR tree-optimization/86841
8815 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8817 2018-08-17 Martin Liska <mliska@suse.cz>
8819 * common.opt: Remove Warn, Init and Report for options with
8820 Ignore/Deprecated flag. Warning is done automatically for
8822 * config/i386/i386.opt: Likewise.
8823 * config/ia64/ia64.opt: Likewise.
8824 * config/rs6000/rs6000.opt: Likewise.
8825 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8826 Remove usage of flag_check_pointer_bounds.
8827 * lto-wrapper.c (merge_and_complain): Do not handle
8828 OPT_fcheck_pointer_bounds.
8829 (append_compiler_options): Likewise.
8830 * opt-functions.awk: Do not handle Deprecated.
8831 * optc-gen.awk: Check that Var, Report and Init are not
8832 used for an option with Ignore/Deprecated flag.
8833 * opts-common.c (decode_cmdline_option): Do not report
8835 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8837 * opts.h (struct cl_option): Remove cl_deprecated flag.
8838 (CL_ERR_DEPRECATED): Remove error enum value.
8840 2018-08-17 Richard Biener <rguenther@suse.de>
8843 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8844 across a va-arg-pack using call adjust its return value accordingly.
8846 2018-08-16 Martin Sebor <msebor@redhat.com>
8848 PR tree-optimization/86853
8849 * gimple-ssa-sprintf.c (struct format_result): Rename member.
8850 (struct fmtresult): Add member and initialize it in ctors.
8851 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
8852 (format_string): Handle %S the same as %ls. Set MAYFAIL.
8853 (format_directive): Set POSUNDER4K when MAYFAIL is set.
8854 (parse_directive): Handle %C same as %c.
8855 (sprintf_dom_walker::compute_format_length): Adjust.
8856 (is_call_safe): Adjust.
8858 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
8860 * builtins.c (c_strlen): Add new parameter eltsize. Use it
8861 for determining how to count the elements.
8862 * builtins.h (c_strlen): Adjust prototype.
8863 * expr.c (string_constant): Add new parameter mem_size.
8864 Set *mem_size appropriately.
8865 * expr.h (string_constant): Adjust protoype.
8866 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8867 * gimple-fold.h (get_range_strlen): Adjust prototype.
8868 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8869 (format_string): Call get_string_length with eltsize.
8871 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8873 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8874 to emit the span, rather than setting it as the prefix.
8876 2018-08-16 David Malcolm <dmalcolm@redhat.com>
8878 * diagnostic-show-locus.c (layout::start_annotation_line): Add
8879 "margin_char" parameter, defaulting to space. Use it in place
8880 of pp_space for the initial part of the margin.
8881 (layout::print_leading_fixits): Use '+' when filling the margin
8882 of line-insertion fix-it hints.
8884 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8886 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8889 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8891 * config/rs6000/altivec.md: Don't set length attribute to the default
8893 * config/rs6000/darwin.md: Ditto.
8894 * config/rs6000/dfp.md: Ditto.
8895 * config/rs6000/htm.md: Ditto.
8896 * config/rs6000/rs6000.md: Ditto.
8897 * config/rs6000/sync.md: Ditto.
8898 * config/rs6000/vsx.md: Ditto.
8900 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8902 * config/rs6000/altivec.md: Don't set length attribute to the default
8903 value, for branch instructions.
8904 * config/rs6000/darwin.md: Ditto.
8905 * config/rs6000/rs6000.md: Ditto.
8907 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
8909 * config/rs6000/rs6000.md (length): Always define as const_int 4.
8910 (unnamed conditional branch define_insn): Set length to 4 or 8
8911 depending on offset.
8912 (<bd>_<mode>): Similar, for alternative 0.
8913 (<bd>tf_<mode>): Ditto.
8915 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8917 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8919 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
8921 * doc/rtl.texi: Replace old RTX class names with new names.
8924 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
8926 * expmed.h (canonicalize_comparison): New declaration.
8927 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8928 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8929 * optabs.c (prepare_cmp_insn): Likewise.
8930 * rtl.h (unsigned_condition_p): New function which checks if a
8931 comparison operator is unsigned.
8933 2018-08-16 Nathan Sidwell <nathan@acm.org>
8935 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8936 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8938 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8941 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8942 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8943 (mov<mov>): ..this and enable unconditionally.
8945 2018-08-16 Tamar Christina <tamar.christina@arm.com>
8947 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8949 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
8951 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8952 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8953 "Common" with "Target".
8955 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8957 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8958 * doc/invoke.texi (mmitigate-rop): Remove.
8959 * config/i386/i386.c: Do not include "regrename.h".
8960 (ix86_rop_should_change_byte_p, reg_encoded_number)
8961 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8963 (ix86_reorg): Remove call to ix86_mitigate_rop.
8964 * config/i386/i386.md (attr "modrm_class"): Remove.
8965 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8966 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8967 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8969 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
8971 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8972 allow folding of mergeh() and mergel() for the float and double types.
8973 (fold_mergehl_helper): Rework to handle building a permute tree
8976 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
8978 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8981 2018-08-15 David Malcolm <dmalcolm@redhat.com>
8983 * common.opt (fdiagnostics-show-labels): New option.
8984 * diagnostic-show-locus.c (class layout_range): Add field
8986 (class layout): Add field "m_show_labels_p".
8987 (layout_range::layout_range): Add param "label" and use it to
8989 (make_range): Pass in NULL for new "label" param of layout_range's
8991 (layout::layout): Initialize m_show_labels_p.
8992 (layout::maybe_add_location_range): Pass in loc_range->m_label
8993 when constructing layout_range instances.
8994 (struct line_label): New struct.
8995 (layout::print_any_labels): New member function.
8996 (layout::print_line): Call it if label-printing is enabled.
8997 (selftest::test_one_liner_labels): New test.
8998 (selftest::test_diagnostic_show_locus_one_liner): Call it.
8999 * diagnostic.c (diagnostic_initialize): Initialize
9000 context->show_labels_p.
9001 * diagnostic.h (struct diagnostic_context): Add field
9003 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9004 -fno-diagnostics-show-labels.
9005 * dwarf2out.c (gen_producer_string): Add
9006 OPT_fdiagnostics_show_labels to the ignored options.
9007 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
9009 (gcc_rich_location::maybe_add_expr): Likewise.
9010 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
9011 label" param, defaulting to NULL.
9012 (gcc_rich_location::add_expr): Add "label" param.
9013 (gcc_rich_location::maybe_add_expr): Likewise.
9014 (class text_range_label): New class.
9015 (class range_label_for_type_mismatch): New class.
9016 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
9017 of format_warning_va.
9018 (fmtwarn_n): Likewise for new params of format_warning_n_va.
9019 * lto-wrapper.c (merge_and_complain): Add
9020 OPT_fdiagnostics_show_labels to the "pick one setting" options.
9021 (append_compiler_options): Likewise to the dropped options.
9022 (append_diag_options): Likewise to the passed-on options.
9023 * opts.c (common_handle_option): Handle the new option.
9024 * selftest-diagnostic.c
9025 (test_diagnostic_context::test_diagnostic_context): Enable
9027 * substring-locations.c: Include "gcc-rich-location.h".
9028 (format_warning_n_va): Add "fmt_label" and "param_label" params
9029 and use them as appropriate.
9030 (format_warning_va): Add "fmt_label" and "param_label" params,
9031 passing them on to format_warning_n_va.
9032 (format_warning_at_substring): Likewise.
9033 (format_warning_at_substring_n): Likewise.
9034 * substring-locations.h (format_warning_va): Add "fmt_label" and
9035 "param_label" params.
9036 (format_warning_n_va): Likewise.
9037 (format_warning_at_substring): Likewise.
9038 (format_warning_at_substring_n): Likewise.
9039 * toplev.c (general_init): Initialize global_dc->show_labels_p.
9041 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
9044 * builtins.c (expand_builtin_memcmp): Do not expand the call
9045 when overflow is detected.
9047 2018-08-15 Martin Sebor <msebor@redhat.com>
9049 PR tree-optimization/71625
9050 * config/aarch64/aarch64-builtins.c
9051 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
9053 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
9055 * config/s390/s390.c (s390_reorg): Remove loop.
9057 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9060 (darwin_function_switched_text_sections): Delete.
9061 * gcc/config/darwin.h
9062 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
9064 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
9067 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
9068 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
9069 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
9071 2018-08-15 Martin Liska <mliska@suse.cz>
9073 PR tree-optimization/86925
9074 * predict.c (expr_expected_value_1): When taking
9075 later predictor, assign also probability.
9076 Use fold_build2_initializer_loc in order to fold
9077 the expression in -frounding-math.
9079 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
9081 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
9083 (expand_vec_perm_1): Try the new method.
9085 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
9088 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
9089 Check whether lra_live_max_point is 0 before dividing.
9091 2018-08-14 Martin Sebor <msebor@redhat.com>
9093 PR tree-optimization/86650
9094 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
9095 (vrp_prop::check_mem_ref): Same.
9097 2018-08-13 Liu Hao <lh_mouse@126.com>
9099 * pretty-print.c (eat_esc_sequence): Swap the foreground and
9100 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
9101 and clear it thereafter, as it only works for DBCS.
9103 2018-08-13 Liu Hao <lh_mouse@126.com>
9105 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
9106 handle returned by _get_osf_handle().
9108 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9110 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
9111 for folding vec_perm.
9113 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9115 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
9116 Add support for gimple-folding of vec_pack() and vec_unpack()
9119 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
9121 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
9122 vec_xst variants to the list.
9123 (rs6000_gimple_fold_builtin): Add support for folding unaligned
9124 vector loads and stores.
9126 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
9128 * config.gcc (rs6000-ibm-aix4.x): Delete.
9129 (rs6000-ibm-aix5.1): Delete.
9130 (rs6000-ibm-aix5.2): Delete.
9131 (rs6000-ibm-aix5.3): Delete.
9132 * config/rs6000/aix43.h: Delete.
9133 * config/rs6000/aix51.h: Delete.
9134 * config/rs6000/aix52.h: Delete.
9135 * config/rs6000/t-aix43: Delete.
9137 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
9139 * config/s390/s390.c (s390_decompose_constant_pool_ref):
9141 (s390_decompose_address): Factor out constant pool ref
9144 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9146 * config/nds32/nds32-predicates.c
9147 (nds32_can_use_bclr_p): Change return type as bool.
9148 (nds32_can_use_bset_p): Ditto.
9149 (nds32_can_use_btgl_p): Ditto.
9150 (nds32_can_use_bitci_p): Ditto.
9151 * config/nds32/nds32-protos.h
9152 (nds32_can_use_bclr_p): Change declaration.
9153 (nds32_can_use_bset_p): Ditto.
9154 (nds32_can_use_btgl_p): Ditto.
9155 (nds32_can_use_bitci_p): Ditto.
9157 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9159 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
9160 Support -msched-prolog-epilog option.
9161 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
9163 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9165 * common/config/nds32/nds32-common.c
9166 (nds32_option_optimization_table): Enalbe -malways-align.
9168 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
9170 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
9172 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
9173 OPT_misr_secure_ case.
9174 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
9175 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
9176 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
9178 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
9179 (nds32_isr_info): New field security_level.
9180 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
9181 * config/nds32/nds32.md (return_internal): Consider critical attribute.
9182 * config/nds32/nds32.opt (misr-secure): New option.
9183 * config/nds32/nds32_init.inc: New file.
9184 * config/nds32/nds32_isr.h: New file.
9186 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
9188 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
9189 Update comment for atomic instructions.
9190 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
9191 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
9193 (atomic_loaddi): Revise fence expansion to only emit fence prior to
9194 load for __ATOMIC_SEQ_CST model.
9195 (atomic_loaddi_1): Remove float register target.
9196 (atomic_storedi): Handle CONST_INT values.
9197 (atomic_storedi_1): Remove float register source. Add special case
9199 (memory_barrier): New expander and insn.
9201 2018-08-11 Jakub Jelinek <jakub@redhat.com>
9203 PR tree-optimization/86835
9204 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
9205 new_stmt after def_gsi, make sure to insert new_square_stmt after
9206 that stmt, not 2 stmts before it.
9208 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
9211 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
9214 2018-08-10 Martin Liska <mliska@suse.cz>
9217 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
9219 * builtins.c (expand_builtin_expect_with_probability):
9221 (expand_builtin_expect_with_probability): New function.
9222 (build_builtin_expect_predicate): Add new argumnet probability
9223 for BUILT_IN_EXPECT_WITH_PROBABILITY.
9224 (fold_builtin_expect):
9227 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
9228 * builtins.h (fold_builtin_expect): Set new argument.
9229 * doc/extend.texi: Document __builtin_expect_with_probability.
9230 * doc/invoke.texi: Likewise.
9231 * gimple-fold.c (gimple_fold_call): Pass new argument.
9232 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
9233 also BUILT_IN_EXPECT_WITH_PROBABILITY.
9234 * predict.c (get_predictor_value): New function.
9235 (expr_expected_value): Add new argument probability. Assume
9236 that predictor and probability are always non-null.
9237 (expr_expected_value_1): Likewise. For __builtin_expect and
9238 __builtin_expect_with_probability set probability. Handle
9239 combination in binary expressions.
9240 (tree_predict_by_opcode): Simplify code by simply calling
9241 get_predictor_value.
9242 (pass_strip_predict_hints::execute): Add handling of
9243 BUILT_IN_EXPECT_WITH_PROBABILITY.
9244 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
9246 * tree.h (DECL_BUILT_IN_P): New function.
9248 2018-08-10 Martin Liska <mliska@suse.cz>
9250 PR tree-optimization/85799
9251 * passes.def: Add argument for pass_strip_predict_hints.
9252 * predict.c (class pass_strip_predict_hints): Add new argument
9254 (strip_predictor_early): New function.
9255 (pass_strip_predict_hints::execute): Call the function to
9257 (strip_predict_hints): New function.
9258 * predict.def: Fix comment.
9260 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
9262 * Makefile.in: Clarify which tm.texi to copy over to assert the
9263 right to grant a GFDL license for all.
9265 2018-08-09 Jeff Law <law@redhat.com>
9267 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
9270 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
9272 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
9275 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9277 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
9278 reductions for variable-length vectors.
9280 2018-08-09 David Malcolm <dmalcolm@redhat.com>
9283 * common.opt (fdiagnostics-show-line-numbers): New option.
9284 * diagnostic-show-locus.c (class layout): Add fields
9285 "m_show_line_numbers_p" and "m_linenum_width";
9286 (num_digits): New function.
9287 (test_num_digits): New function.
9288 (layout::layout): Initialize new fields. Update m_x_offset
9289 logic to handle any left margin.
9290 (layout::print_source_line): Print line number when requested.
9291 (layout::start_annotation_line): New member function.
9292 (layout::print_annotation_line): Call it.
9293 (layout::print_leading_fixits): Likewise.
9294 (layout::print_trailing_fixits): Likewise. Update calls to
9295 move_to_column for new parameter.
9296 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
9297 it to potentially call start_annotation_line.
9298 (layout::show_ruler): Call start_annotation_line.
9299 (selftest::test_line_numbers_multiline_range): New selftest.
9300 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
9301 and selftest::test_line_numbers_multiline_range.
9302 * diagnostic.c (diagnostic_initialize): Initialize
9303 show_line_numbers_p.
9304 * diagnostic.h (struct diagnostic_context): Add field
9305 "show_line_numbers_p".
9306 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
9307 -fno-diagnostics-show-line-numbers.
9308 * dwarf2out.c (gen_producer_string): Add
9309 OPT_fdiagnostics_show_line_numbers to the ignored options.
9310 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
9311 one setting" options.
9312 (append_compiler_options): Likewise to the dropped options.
9313 (append_diag_options): Likewise to the passed-on options.
9314 * opts.c (common_handle_option): Handle the new option.
9315 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
9317 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
9319 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
9320 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
9321 third argument of type "const signed char" to descriptions of
9322 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
9323 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
9324 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
9325 __builtin_bcdsub_ov functions.
9327 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9329 PR tree-optimization/86858
9330 * tree-vect-loop.c (vect_is_simple_reduction): Restore
9331 flow_bb_inside_loop_p calls.
9333 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
9335 PR tree-optimization/86871
9336 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
9337 instead of gimple_assign_lhs.
9339 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
9342 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
9343 register constraint to operand 0.
9344 (add<mode>3_carryinC): Likewise.
9345 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
9347 2018-08-09 Martin Liska <mliska@suse.cz>
9350 * common.opt: Remove extra line.
9352 2018-08-09 Martin Liska <mliska@suse.cz>
9354 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
9355 at the end of a line, make first letter capital and end up
9356 a sentence with a dot.
9357 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
9358 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
9359 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
9360 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
9361 (PARAM_MAX_ISL_OPERATIONS): Likewise.
9362 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
9363 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
9364 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
9365 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
9366 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
9367 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
9368 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
9369 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
9370 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
9371 (PARAM_TREE_REASSOC_WIDTH): Likewise.
9372 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
9373 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
9374 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
9376 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
9379 * config/s390/s390.c (s390_option_override_internal): Reduce the
9380 stack-clash-protection-probe-interval param if it would be too big
9383 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
9386 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
9387 * config/m68k/m68k.c (handle_move_double): Don't call
9388 m68k_final_prescan_insn.
9389 (m68k_adjust_decorated_operand): Renamed from
9390 m68k_final_prescan_insn, remove first and third operand and
9392 (print_operand): Call it.
9393 (print_operand_address): Call it.
9395 2018-08-08 Nathan Sidwell <nathan@acm.org>
9397 * diagnostic.c (diagnostic_report_current_module): Use
9398 linemap_included_from & linemap_included_from_linemap.
9400 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
9402 * config/aarch64/aarch64-cores.def: Add phecda core.
9403 * config/aarch64/aarch64-tune.md: Regenerate.
9404 * doc/invoke.texi: Add phecda core.
9406 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9409 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
9411 * config/s390/s390.md ("movti"): Add more alternatives for
9412 constant to GPR copies.
9414 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
9416 * config/s390/s390.c: Fix whitespace damage throughout the file.
9417 * config/s390/s390.h: Likewise.
9418 * config/s390/tpf.h: Likewise.
9420 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9422 * config/s390/s390.c (s390_loadrelative_operand_p):
9423 Remove TARGET_CPU_ZARCH usages.
9424 (s390_rtx_costs): Likewise.
9425 (s390_legitimate_constant_p): Likewise.
9426 (s390_cannot_force_const_mem): Likewise.
9427 (legitimate_reload_constant_p): Likewise.
9428 (s390_preferred_reload_class): Likewise.
9429 (legitimize_pic_address): Likewise.
9430 (legitimize_tls_address): Likewise.
9431 (s390_split_branches): Removed.
9432 (s390_add_execute): Removed.
9433 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
9434 (s390_mainpool_start): Likewise.
9435 (s390_mainpool_finish): Likewise.
9436 (s390_mainpool_cancel): Removed.
9437 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
9438 (s390_chunkify_cancel): Likewise.
9439 (s390_return_addr_rtx): Likewise.
9440 (s390_register_info): Remove split_branches_pending_p uages.
9441 (s390_optimize_register_info): Likewise.
9442 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
9443 split_branches_pending_p usages.
9444 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
9445 (s390_load_got): Likewise.
9446 (s390_expand_split_stack_prologue): Likewise.
9447 (output_asm_nops): Likewise.
9448 (s390_function_profiler): Likewise.
9449 (s390_emit_call): Likewise.
9450 (s390_conditional_register_usage): Likewise.
9451 (s390_optimize_prologue): Likewise.
9452 (s390_reorg): Remove TARGET_CPU_ZARCH and
9453 split_branches_pending_p usages.
9454 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
9456 (s390_output_indirect_thunk_function): Likewise.
9457 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
9458 (TARGET_CPU_ZARCH_P): Removed.
9459 (struct machine_function): Remove split_branches_pending_p.
9460 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
9462 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
9464 * common/config/s390/s390-common.c (processor_flags_table):
9466 * config.gcc: Remove with_arch/with_tune support.
9467 * config/s390/2064.md: Remove cpu attribute comparisons.
9468 * config/s390/driver-native.c (s390_host_detect_local_cpu):
9470 * config/s390/linux.h (ASM_SPEC):
9471 Remove -march support.
9472 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
9473 Use a table to get an arch level.
9474 * config/s390/s390-opts.h (enum processor_type):
9476 * config/s390/s390.c
9477 (processor_table): Remove entries, add arch_level values.
9478 (s390_issue_rate): Remove cases.
9479 (s390_option_override): Adjust
9480 s390_option_override_internal() call.
9481 (s390_option_override_internal): Remove deprecation warning.
9482 (s390_valid_target_attribute_tree): Adjust
9483 s390_option_override_internal() call.
9484 * config/s390/s390.h (struct s390_processor):
9485 Share with s390-c.c, add arch_level field.
9486 * config/s390/s390.md:
9487 Remove occurrences in cpu attribute.
9488 * config/s390/s390.opt: Remove -march/-mtune support.
9489 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
9490 * doc/invoke.texi: Remove deprecation warning.
9492 2018-08-08 Luis Machado <luis.machado@linaro.org>
9494 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
9496 (qdf24xx_tunings): Set vector cost structure to
9497 qdf24xx_vector_cost.
9499 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
9500 <register_sextend>: Set to 3.
9502 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
9505 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
9506 * config/aarch64/aarch64-simd.md
9507 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
9508 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
9509 (aarch64_frecpx<mode>): ...this new pattern.
9510 * config/aarch64/aarch64-simd-builtins.def: Remove comment
9511 about aarch64_frecp<FRECP:frecp_suffix><mode>.
9513 2018-08-07 Martin Liska <mliska@suse.cz>
9516 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
9517 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
9518 * predict.def (PRED_MALLOC_NONNULL): New predictor.
9519 * doc/extend.texi: Document that malloc attribute adds
9522 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
9525 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9526 Define to speculation_safe_value_not_needed.
9528 2018-08-06 Jeff Law <law@redhat.com>
9530 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
9531 the vr_values instance to cprop_into_stmt.
9532 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
9533 (cprop_operand): Also query EVRP to determine if OP is a constant.
9535 2018-08-06 Nathan Sidwell <nathan@acm.org>
9537 * diagnostic.c (diagnostic_report_current_module): Reroll
9538 included-at loop. Translate text.
9540 2018-08-06 David Malcolm <dmalcolm@redhat.com>
9542 * function-tests.c (selftest::test_expansion_to_rtl): Call
9543 free_after_compilation.
9545 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9547 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
9549 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
9551 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
9552 loops with memory block operations from getting unrolled.
9554 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
9557 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9558 Define to speculation_safe_value_not_needed.
9560 2018-08-06 Jeff Law <law@redhat.com>
9562 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
9565 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
9568 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
9569 with all enabled __intN types.
9571 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
9573 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9575 * alias.c (record_set): Check for clobber high.
9576 * cfgexpand.c (expand_gimple_stmt): Likewise.
9577 * combine-stack-adj.c (single_set_for_csa): Likewise.
9578 * combine.c (find_single_use_1): Likewise.
9579 (set_nonzero_bits_and_sign_copies): Likewise.
9580 (get_combine_src_dest): Likewise.
9581 (is_parallel_of_n_reg_sets): Likewise.
9582 (try_combine): Likewise.
9583 (record_dead_and_set_regs_1): Likewise.
9584 (reg_dead_at_p_1): Likewise.
9585 (reg_dead_at_p): Likewise.
9586 * dce.c (deletable_insn_p): Likewise.
9587 (mark_nonreg_stores_1): Likewise.
9588 (mark_nonreg_stores_2): Likewise.
9589 * df-scan.c (df_find_hard_reg_defs): Likewise.
9590 (df_uses_record): Likewise.
9591 (df_get_call_refs): Likewise.
9592 * dwarf2out.c (mem_loc_descriptor): Likewise.
9593 * haifa-sched.c (haifa_classify_rtx): Likewise.
9594 * ira-build.c (create_insn_allocnos): Likewise.
9595 * ira-costs.c (scan_one_insn): Likewise.
9596 * ira.c (equiv_init_movable_p): Likewise.
9597 (rtx_moveable_p): Likewise.
9598 (interesting_dest_for_shprep): Likewise.
9599 * jump.c (mark_jump_label_1): Likewise.
9600 * postreload-gcse.c (record_opr_changes): Likewise.
9601 * postreload.c (reload_cse_simplify): Likewise.
9602 (struct reg_use): Add source expr.
9603 (reload_combine): Check for clobber high.
9604 (reload_combine_note_use): Likewise.
9605 (reload_cse_move2add): Likewise.
9606 (move2add_note_store): Likewise.
9607 * print-rtl.c (print_pattern): Likewise.
9608 * recog.c (decode_asm_operands): Likewise.
9609 (store_data_bypass_p): Likewise.
9610 (if_test_bypass_p): Likewise.
9611 * regcprop.c (kill_clobbered_value): Likewise.
9612 (kill_set_value): Likewise.
9613 * reginfo.c (reg_scan_mark_refs): Likewise.
9614 * reload1.c (maybe_fix_stack_asms): Likewise.
9615 (eliminate_regs_1): Likewise.
9616 (elimination_effects): Likewise.
9617 (mark_not_eliminable): Likewise.
9618 (scan_paradoxical_subregs): Likewise.
9619 (forget_old_reloads_1): Likewise.
9620 * reorg.c (find_end_label): Likewise.
9621 (try_merge_delay_insns): Likewise.
9622 (redundant_insn): Likewise.
9623 (own_thread_p): Likewise.
9624 (fill_simple_delay_slots): Likewise.
9625 (fill_slots_from_thread): Likewise.
9626 (dbr_schedule): Likewise.
9627 * resource.c (update_live_status): Likewise.
9628 (mark_referenced_resources): Likewise.
9629 (mark_set_resources): Likewise.
9630 * rtl.c (copy_rtx): Likewise.
9631 * rtlanal.c (reg_referenced_p): Likewise.
9632 (single_set_2): Likewise.
9633 (noop_move_p): Likewise.
9634 (note_stores): Likewise.
9635 * sched-deps.c (sched_analyze_reg): Likewise.
9636 (sched_analyze_insn): Likewise.
9638 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9640 * cse.c (invalidate_reg): New function extracted from...
9641 (invalidate): ...here.
9642 (canonicalize_insn): Check for clobber high.
9643 (invalidate_from_clobbers): invalidate clobber highs.
9644 (invalidate_from_sets_and_clobbers): Likewise.
9645 (count_reg_usage): Check for clobber high.
9646 (insn_live_p): Likewise.
9647 * cselib.c (cselib_expand_value_rtx_1):Likewise.
9648 (cselib_invalidate_regno): Check for clobber in setter.
9649 (cselib_invalidate_rtx): Pass through setter.
9650 (cselib_invalidate_rtx_note_stores):
9651 (cselib_process_insn): Check for clobber high.
9652 * cselib.h (cselib_invalidate_rtx): Add operand.
9654 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9656 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9657 (mark_not_eliminable): Likewise.
9658 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9659 * lra-lives.c (process_bb_lives): Check for clobber high.
9660 * lra.c (new_insn_reg): Remember clobber highs.
9661 (collect_non_operand_hard_regs): Check for clobber high.
9662 (lra_set_insn_recog_data): Likewise.
9663 (add_regs_to_insn_regno_info): Likewise.
9664 (lra_update_insn_regno_info): Likewise.
9666 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9668 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9669 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9671 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9673 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9674 (copy_insn_1): Likewise.
9675 (gen_hard_reg_clobber_high): New gen function.
9676 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9677 * genemit.c (gen_exp): Likewise.
9678 (gen_emit_seq): Pass through info.
9679 (gen_insn): Check for CLOBBER_HIGH.
9680 (gen_expand): Pass through info.
9681 (gen_split): Likewise.
9682 (output_add_clobbers): Likewise.
9683 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9684 (remove_clobbers): Likewise.
9685 * rtl.h (gen_hard_reg_clobber_high): New declaration.
9687 2018-08-06 Alan Hayward <alan.hayward@arm.com>
9689 * doc/rtl.texi (clobber_high): Add.
9690 (parallel): Add in clobber high
9691 * rtl.c (rtl_check_failed_code3): Add function.
9692 * rtl.def (CLOBBER_HIGH): Add expression.
9693 * rtl.h (RTL_CHECKC3): Add macro.
9694 (rtl_check_failed_code3): Add declaration.
9695 (XC3EXP): Add macro.
9697 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
9700 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9701 cfun->machine->max_used_stack_alignment if needed.
9703 2018-08-04 Martin Sebor <msebor@redhat.com>
9705 PR tree-optimization/86571
9706 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9709 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
9712 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9715 2018-08-03 Jeff Law <law@redhat.com>
9718 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9719 Define to speculation_safe_value_not_needed.
9721 2018-08-03 David Malcolm <dmalcolm@redhat.com>
9723 * doc/gcov.texi (-x): Remove duplicate "to".
9724 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9725 (-Wif-not-aligned): Remove duplicate "is".
9726 (-flto): Remove duplicate "the".
9727 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9728 duplicate "v5.00.b".
9729 (MSP430 Options): Remove duplicate "and" from the description
9730 of "-mgprel-sec=regexp".
9731 (x86 Options): Remove duplicate copies of "vmldLog102" and
9732 vmlsLog104 from description of "-mveclibabi=type".
9734 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
9736 * internal-fn.h (first_commutative_argument): Declare.
9737 * internal-fn.c (first_commutative_argument): New function.
9738 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9739 restrictions for pattern statements. Use first_commutative_argument
9740 to look for commutative operands in calls to internal functions.
9742 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
9744 * Makefile.in (wide-int-range.o): New.
9745 * tree-vrp.c: Move all the wide_int_* functions to...
9746 * wide-int-range.cc: ...here.
9747 * tree-vrp.h: Move all the wide_int_* prototypes to...
9748 * wide-int-range.h: ...here.
9750 2018-08-03 Tom de Vries <tdevries@suse.de>
9752 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9754 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9755 * except.c (output_function_exception_table): Do early exit if
9756 targetm_common.except_unwind_info (&global_options) == UI_NONE.
9758 2018-08-03 Martin Liska <mliska@suse.cz>
9760 * predict.c (dump_prediction): Change to 2 digits
9763 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
9765 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9767 (falkor_am_1_gtov_gtov): ... a new insn reservation.
9769 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
9771 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9772 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9773 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9774 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9775 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9777 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9779 * diagnostic-show-locus.c (diagnostic_show_locus): Use
9780 pp_take_prefix when saving the existing prefix.
9781 * diagnostic.c (diagnostic_append_note): Likewise.
9782 * langhooks.c (lhd_print_error_function): Likewise.
9783 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9784 param's type. Free the existing prefix.
9785 (pp_take_prefix): New function.
9786 (pretty_printer::pretty_printer): Drop the prefix parameter.
9787 Rename the length parameter to match the comment.
9788 (pretty_printer::~pretty_printer): Free the prefix.
9789 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9791 (struct pretty_printer): Drop the "const" from "prefix" field's
9792 type and clarify memory management.
9793 (pp_set_prefix): Drop the "const" from the 2nd param.
9794 (pp_take_prefix): New decl.
9796 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
9798 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9799 for word_mode_ok here instead of passing as argument.
9800 (expand_block_compare): Change select_block_compare_mode() call.
9801 (expand_strncmp_gpr_sequence): New function.
9802 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9804 2018-08-02 Jeff Law <law@redhat.com>
9807 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9808 Define to speculation_safe_value_not_needed.
9811 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9812 Define to speculation_safe_value_not_needed.
9814 2018-08-02 Tom de Vries <tdevries@suse.de>
9817 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9818 function. Return UI_TARGET unconditionally.
9819 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9820 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9822 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9824 * genemit.c (print_overload_test): Fix typo.
9826 2018-08-02 Richard Biener <rguenther@suse.de>
9828 PR tree-optimization/86816
9829 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9830 which checks for value availability before querying it.
9831 (gvn_uses_equal): Use it.
9832 (same_succ_hash): Likewise.
9833 (gimple_equal_p): Likewise.
9835 2018-08-02 Nick Clifton <nickc@redhat.com>
9838 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9839 Define to speculation_safe_value_not_needed.
9842 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9843 Define to speculation_safe_value_not_needed.
9846 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9847 Define to speculation_safe_value_not_needed.
9850 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9851 Define to speculation_safe_value_not_needed.
9854 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9855 Define to speculation_safe_value_not_needed.
9858 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9859 Define to speculation_safe_value_not_needed.
9862 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9863 Define to speculation_safe_value_not_needed.
9866 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9867 Define to speculation_safe_value_not_needed.
9870 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9871 speculation_safe_value_not_needed.
9874 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9875 to speculation_safe_value_not_needed.
9877 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9879 * doc/md.texi: Expand the documentation of instruction names
9880 to mention port-local uses. Document '@' in pattern names.
9881 * read-md.h (overloaded_instance, overloaded_name): New structs.
9883 (md_reader::handle_overloaded_name): New member function.
9884 (md_reader::get_overloads): Likewise.
9885 (md_reader::m_first_overload): New member variable.
9886 (md_reader::m_next_overload_ptr): Likewise.
9887 (md_reader::m_overloads_htab): Likewise.
9888 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9889 m_next_overload_ptr and m_overloads_htab.
9890 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9891 (get_mode_token, get_code_token, get_int_token): New functions.
9892 (map_attr_string): Add an optional argument that passes back
9893 the associated iterator.
9894 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9895 (md_reader::handle_overloaded_name, add_overload_instance): New
9897 (apply_iterators): Handle '@' names. Report an error if '@'
9898 is used without iterators.
9899 (initialize_iterators): Initialize the new iterator_group fields.
9900 * genopinit.c (handle_overloaded_code_for)
9901 (handle_overloaded_gen): New functions.
9902 (main): Use them to print declarations of maybe_code_for_* and
9903 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9904 * genemit.c (print_overload_arguments, print_overload_test)
9905 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9906 (main): Use it to print definitions of maybe_code_for_* and
9907 maybe_gen_* functions.
9908 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9909 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9910 instead of explicit mode checks.
9911 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9912 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9913 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9914 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9915 (aarch64_expand_compare_and_swap): Likewise
9916 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9917 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9918 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9919 (aarch64_constant_pool_reload_icode): Delete.
9920 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9921 instead of aarch64_constant_pool_reload_icode. Use
9922 code_for_aarch64_reload_mov instead of explicit mode checks.
9923 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9924 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9925 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9926 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9927 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9928 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9929 (aarch64_atomic_load_op_code): Delete.
9930 (aarch64_emit_atomic_load_op): Likewise.
9931 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9932 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
9933 instead of aarch64_emit_atomic_load_op.
9934 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9935 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9936 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9937 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9938 character before the pattern name.
9939 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9940 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9941 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9942 (aarch64_frecps<mode>): Likewise.
9943 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9944 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9945 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9946 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9947 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9949 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
9951 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9952 Allow HFmode constants if TARGET_FP_F16INST.
9954 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
9957 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9958 No longer check last store for clobber of address register.
9960 2018-08-02 Martin Liska <mliska@suse.cz>
9962 PR gcov-profile/86817
9963 * gcov.c (process_all_functions): New function.
9965 (process_file): Move functions processing to
9966 process_all_functions.
9968 2018-08-02 David Malcolm <dmalcolm@redhat.com>
9970 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9971 "const" to the "gimple *" and "rtx_insn *" parameters.
9972 * dumpfile.h (dump_user_location_t::dump_user_location_t):
9974 (dump_location_t::dump_location_t): Likewise.
9976 2018-08-01 Martin Sebor <msebor@redhat.com>
9978 PR tree-optimization/86650
9979 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9980 rather than a "gcall *". Directly pass the data of interest
9981 to percent_K_format, rather than building a temporary CALL_EXPR
9983 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9984 (gimple_fold_builtin_strncat): Adjust.
9985 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9986 gcall* argument with gimple*.
9987 * gimple-ssa-warn-restrict.c (check_call): Same.
9988 (wrestrict_dom_walker::before_dom_children): Same.
9989 (builtin_access::builtin_access): Same.
9990 (check_bounds_or_overlap): Same
9991 (maybe_diag_overlap): Same.
9992 (maybe_diag_offset_bounds): Same.
9993 * tree-diagnostic.c (default_tree_printer): Move usage of
9994 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9996 * tree-pretty-print.c (percent_K_format): Add argument.
9997 * tree-pretty-print.h: Add argument.
9998 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9999 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
10000 (maybe_diag_stxncpy_trunc): Same.
10001 (handle_builtin_stxncpy): Same.
10002 (handle_builtin_strcat): Same.
10004 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10006 * match.pd: Optimise pointer range checks.
10008 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10010 PR tree-optimization/86758
10011 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
10012 to remove pattern statements.
10014 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10016 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
10017 result of dfs_enumerate_from when constructing stmt_vec_infos,
10018 instead of additionally calling get_loop_body.
10020 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10022 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
10024 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
10025 When creating an iv, assert that the step is not known to be zero.
10026 (vect_setup_realignment): Update call accordingly.
10027 * tree-vect-stmts.c (vectorizable_store): Likewise.
10028 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
10030 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10032 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
10033 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
10034 (vectorizable_reduction): Likewise.
10035 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10036 (vect_detect_hybrid_slp_stmts): Likewise.
10037 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10039 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
10041 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
10042 (wide_int_set_zero_nonzero_bits): ...this.
10043 (zero_nonzero_bits_from_vr): Rename to...
10044 (vrp_set_zero_nonzero_bits): ...this.
10045 (extract_range_from_multiplicative_op_1): Abstract wide int
10047 (wide_int_range_multiplicative_op): ...here.
10048 (extract_range_from_binary_expr_1): Extract wide int binary
10049 operations into their own functions.
10050 (wide_int_range_lshift): New.
10051 (wide_int_range_can_optimize_bit_op): New.
10052 (wide_int_range_shift_undefined_p): New.
10053 (wide_int_range_bit_xor): New.
10054 (wide_int_range_bit_ior): New.
10055 (wide_int_range_bit_and): New.
10056 (wide_int_range_trunc_mod): New.
10057 (extract_range_into_wide_ints): New.
10058 (vrp_shift_undefined_p): New.
10059 (extract_range_from_multiplicative_op): New.
10060 (vrp_can_optimize_bit_op): New.
10061 * tree-vrp.h (value_range::dump): New.
10062 (wide_int_range_multiplicative_op): New.
10063 (wide_int_range_lshift):New.
10064 (wide_int_range_shift_undefined_p): New.
10065 (wide_int_range_bit_xor): New.
10066 (wide_int_range_bit_ior): New.
10067 (wide_int_range_bit_and): New.
10068 (wide_int_range_trunc_mod): New.
10069 (zero_nonzero_bits_from_bounds): Rename to...
10070 (wide_int_set_zero_nonzero_bits): ...this.
10071 (zero_nonzero_bits_from_vr): Rename to...
10072 (vrp_set_zero_nonzero_bits): ...this.
10073 (range_easy_mask_min_max): Rename to...
10074 (wide_int_range_can_optimize_bit_op): this.
10075 * vr-values.c (simplify_bit_ops_using_ranges): Rename
10076 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
10078 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10080 * tree-vectorizer.h (vect_orig_stmt): New function.
10081 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
10082 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
10083 (vect_create_epilog_for_reduction): Likewise.
10084 (vectorizable_live_operation): Likewise.
10085 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10086 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
10087 * tree-vect-stmts.c (vectorizable_call): Likewise.
10088 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
10090 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10092 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
10094 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
10095 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
10096 (vect_transform_loop): Likewise.
10097 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10099 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10101 * tree-vectorizer.h (vect_schedule_slp): Return void.
10102 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
10103 (vect_schedule_slp): Likewise.
10105 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10107 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
10109 (vect_transform_loop): Update calls accordingly. Schedule SLP
10110 instances before the main loop, if any exist.
10112 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
10114 PR tree-optimization/86749
10115 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
10116 If the lhs is used in a COND_EXPR, check that it is being used
10117 as the "then" or "else" value.
10119 2018-08-01 Tom de Vries <tdevries@suse.de>
10122 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
10123 speculation_safe_value_not_needed.
10125 2018-08-01 Richard Biener <rguenther@suse.de>
10127 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
10128 as base and offset.
10130 2018-08-01 Martin Liska <mliska@suse.cz>
10132 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
10133 format how successful transformation is dumped.
10134 (gimple_mod_pow2_value_transform): Likewise.
10135 (gimple_mod_subtract_transform): Likewise.
10136 (gimple_stringops_transform): Likewise.
10138 2018-08-01 Martin Liska <mliska@suse.cz>
10140 PR value-prof/35543
10141 * value-prof.c (interesting_stringop_to_profile_p):
10142 Simplify the code and add BUILT_IN_MEMMOVE.
10143 (gimple_stringops_transform): Likewise.
10145 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
10147 * config/aarch64/aarch64-simd.md
10148 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
10149 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
10150 use GPI iterator instead of SI mode.
10152 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10154 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
10155 rs6000_speculation_barrier.
10156 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
10157 new barrier pattern name.
10159 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
10161 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
10162 (speculation_barrier): New insn.
10164 2018-08-01 Richard Biener <rguenther@suse.de>
10167 * graphite.h: Include isl/id.h and isl/space.h to allow build
10170 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
10173 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
10174 mode for COFF targets.
10175 * defaults.h (TARGET_COFF): Define.
10176 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
10177 TARGET_COFF): Define.
10178 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
10179 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
10180 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
10182 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10184 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
10185 * gimple-streamer-out.c (output_bb): Save it.
10186 * lto-streamer-in.c (input_struct_function_base): Restore
10187 instance discriminator if available. Create map on demand.
10188 * lto-streamer-out.c (output_struct_function_base): Save it if
10190 * final.c (decl_to_instance_map): Document LTO strategy.
10192 2018-07-31 Alexandre Oliva <oliva@adacore.com>
10193 Olivier Hainque <hainque@adacore.com>
10195 * debug.h (decl_to_instance_map_t): New type.
10196 (decl_to_instance_map): Declare.
10197 (maybe_create_decl_to_instance_map): New inline function.
10198 * final.c (bb_discriminator, last_bb_discriminator): New statics,
10199 to track basic block discriminators.
10200 (final_start_function_1): Initialize them.
10201 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
10203 (decl_to_instance_map): New variable.
10204 (map_decl_to_instance, maybe_set_discriminator): New functions.
10205 (notice_source_line): Set discriminator.
10207 2018-07-31 Ian Lance Taylor <iant@golang.org>
10209 * targhooks.c (default_have_speculation_safe_value): Add
10212 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10214 * dump-context.h: Include "pretty-print.h".
10215 (dump_context::refresh_dumps_are_enabled): New decl.
10216 (dump_context::emit_item): New decl.
10217 (class dump_context): Add fields "m_test_pp" and
10219 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10220 (temp_dump_context::get_dumped_text): New decl.
10221 (class temp_dump_context): Add field "m_pp".
10222 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
10223 (dump_context::refresh_dumps_are_enabled): ...and add a test for
10225 (set_dump_file): Update for above change.
10226 (set_alt_dump_file): Likewise.
10227 (dump_loc): New overload, taking a pretty_printer *.
10228 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
10229 to any test pretty-printer.
10230 (make_item_for_dump_gimple_stmt): New function, adapted from
10231 optinfo::add_gimple_stmt.
10232 (dump_context::dump_gimple_stmt): Call it, and use the result,
10233 eliminating the direct usage of dump_file and alt_dump_file in
10234 favor of indirectly using them via emit_item.
10235 (make_item_for_dump_gimple_expr): New function, adapted from
10236 optinfo::add_gimple_expr.
10237 (dump_context::dump_gimple_expr): Call it, and use the result,
10238 eliminating the direct usage of dump_file and alt_dump_file in
10239 favor of indirectly using them via emit_item.
10240 (make_item_for_dump_generic_expr): New function, adapted from
10242 (dump_context::dump_generic_expr): Call it, and use the result,
10243 eliminating the direct usage of dump_file and alt_dump_file in
10244 favor of indirectly using them via emit_item.
10245 (make_item_for_dump_printf_va): New function, adapted from
10246 optinfo::add_printf_va.
10247 (make_item_for_dump_printf): New function.
10248 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
10249 and use the result, eliminating the direct usage of dump_file and
10250 alt_dump_file in favor of indirectly using them via emit_item.
10251 (make_item_for_dump_dec): New function.
10252 (dump_context::dump_dec): Call it, and use the result,
10253 eliminating the direct usage of dump_file and alt_dump_file in
10254 favor of indirectly using them via emit_item.
10255 (make_item_for_dump_symtab_node): New function, adapted from
10256 optinfo::add_symtab_node.
10257 (dump_context::dump_symtab_node): Call it, and use the result,
10258 eliminating the direct usage of dump_file and alt_dump_file in
10259 favor of indirectly using them via emit_item.
10260 (dump_context::begin_scope): Reimplement, avoiding direct usage
10261 of dump_file and alt_dump_file in favor of indirectly using them
10263 (dump_context::emit_item): New member function.
10264 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
10265 Set up test pretty-printer on the underlying context. Call
10266 refresh_dumps_are_enabled.
10267 (temp_dump_context::~temp_dump_context): Call
10268 refresh_dumps_are_enabled.
10269 (temp_dump_context::get_dumped_text): New member function.
10270 (selftest::verify_dumped_text): New function.
10271 (ASSERT_DUMPED_TEXT_EQ): New macro.
10272 (selftest::test_capture_of_dump_calls): Run all tests twice, with
10273 and then without optinfo enabled. Add uses of
10274 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
10275 * dumpfile.h: Update comment for the dump_* API.
10276 * optinfo-emit-json.cc
10277 (selftest::test_building_json_from_dump_calls): Update for new
10278 param for temp_dump_context ctor.
10279 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
10280 and "m_owned" field.
10281 (optinfo_item::~optinfo_item): Likewise.
10282 (optinfo::add_item): New member function.
10283 (optinfo::emit): Update comment.
10284 (optinfo::add_string): Delete.
10285 (optinfo::add_printf): Delete.
10286 (optinfo::add_printf_va): Delete.
10287 (optinfo::add_gimple_stmt): Delete.
10288 (optinfo::add_gimple_expr): Delete.
10289 (optinfo::add_tree): Delete.
10290 (optinfo::add_symtab_node): Delete.
10291 (optinfo::add_dec): Delete.
10292 * optinfo.h (class dump_context): New forward decl.
10293 (optinfo::add_item): New decl.
10294 (optinfo::add_string): Delete.
10295 (optinfo::add_printf): Delete.
10296 (optinfo::add_printf_va): Delete.
10297 (optinfo::add_gimple_stmt): Delete.
10298 (optinfo::add_gimple_expr): Delete.
10299 (optinfo::add_tree): Delete.
10300 (optinfo::add_symtab_node): Delete.
10301 (optinfo::add_dec): Delete.
10302 (optinfo::add_poly_int): Delete.
10303 (optinfo_item::optinfo_item): Remove "owned" param.
10304 (class optinfo_item): Remove field "m_owned".
10306 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
10308 PR middle-end/86705
10309 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
10310 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
10311 requested variable alignment.
10312 (expand_one_ssa_partition): Likewise.
10313 (expand_one_var): Likewise.
10315 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10317 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
10318 to speculation_safe_value_not_needed.
10320 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10322 * targhooks.h (speculation_safe_value_not_needed): New prototype.
10323 * targhooks.c (speculation_safe_value_not_needed): New function.
10324 * target.def (have_speculation_safe_value): Update documentation.
10325 * doc/tm.texi: Regenerated.
10327 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10329 * config/aarch64/iterators.md (ALLI_TI): New iterator.
10330 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
10332 (despeculate_copy<ALLI:mode>_insn): New insn.
10333 (despeculate_copyti_insn): New insn.
10334 (despeculate_simple<ALLI:mode>): New insn
10335 (despeculate_simpleti): New insn.
10336 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
10338 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
10339 aarch64_speculation_safe_value.
10340 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
10342 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10344 * config/aarch64/aarch64-speculation.cc: New file.
10345 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
10346 before pass_reorder_blocks.
10347 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
10349 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
10350 X14 and X15 when tracking speculation.
10351 * config/aarch64/aarch64.md (register name constants): Add
10352 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
10353 (unspec): Add UNSPEC_SPECULATION_TRACKER.
10354 (speculation_barrier): New insn attribute.
10355 (cmp<mode>): Allow SP in comparisons.
10356 (speculation_tracker): New insn.
10357 (speculation_barrier): Add speculation_barrier attribute.
10358 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
10359 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
10360 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
10362 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10364 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
10365 aarch64_track_speculation is true.
10366 (tb<optab><mode>1): Likewise.
10367 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
10368 generate CB[N]Z when tracking speculation.
10369 (aarch64_split_compare_and_swap): Likewise.
10370 (aarch64_split_atomic_op): Likewise.
10372 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10374 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
10376 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10378 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
10379 (speculation_barrier): New insn.
10381 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10383 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
10384 * config/arm/arm.md (speculation_barrier): New expand.
10385 (speculation_barrier_insn): New pattern.
10387 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
10389 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
10390 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
10391 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
10392 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
10394 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
10395 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
10396 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
10397 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
10398 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
10399 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
10400 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
10401 * builtins.c (expand_speculation_safe_value): New function.
10402 (expand_builtin): Call it.
10403 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
10404 * doc/extend.texi: Document __builtin_speculation_safe_value.
10405 * doc/md.texi: Document "speculation_barrier" pattern.
10406 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
10407 TARGET_HAVE_SPECULATION_SAFE_VALUE.
10408 * doc/tm.texi: Regenerated.
10409 * target.def (have_speculation_safe_value, speculation_safe_value): New
10411 * targhooks.c (default_have_speculation_safe_value): New function.
10412 (default_speculation_safe_value): New function.
10413 * targhooks.h (default_have_speculation_safe_value): Add prototype.
10414 (default_speculation_safe_value): Add prototype.
10416 2018-07-31 David Malcolm <dmalcolm@redhat.com>
10418 * dump-context.h (dump_context::dump_loc): New decl.
10419 * dumpfile.c (dump_context::dump_loc): New member function.
10420 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
10421 and dump_gimple_stmt.
10422 (dump_context::dump_gimple_expr_loc): Likewise, using
10424 (dump_context::dump_generic_expr_loc): Likewise, using
10426 (dump_context::dump_printf_loc_va): Likewise, using
10428 (dump_context::begin_scope): Explicitly using the global function
10429 "dump_loc", rather than the member function.
10431 2018-07-31 Martin Sebor <msebor@redhat.com>
10433 PR tree-optimization/86741
10434 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
10436 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
10438 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
10439 depend on whether prefetch instructions will be emitted or not.
10440 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
10441 will be emitted or not.
10442 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
10443 (TARGET_SETMEM_PFD): New macros.
10445 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10447 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
10448 (NULL_STMT_VEC_INFO): Delete.
10449 (stmt_vec_info::operator*): Likewise.
10450 (stmt_vec_info::operator gimple *): Likewise.
10451 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
10452 of NULL_STMT_VEC_INFO.
10453 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10454 (vect_reassociating_reduction_p): Likewise.
10455 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10456 (vectorizable_store): Likewise.
10457 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
10458 (vec_info::free_stmt_vec_infos): Likewise.
10460 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10462 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
10463 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
10465 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10467 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
10468 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10469 (vec_info::free_stmt_vec_info): New private member functions.
10470 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
10471 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
10472 * tree-parloops.c (gather_scalar_reductions): Remove calls to
10473 set_stmt_vec_info_vec and free_stmt_vec_infos.
10474 * tree-vect-loop.c (_loop_vec_info): Remove call to
10475 set_stmt_vec_info_vec.
10476 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
10477 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
10478 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
10479 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
10480 (vec_info::free_stmt_vec_info): ...these new functions. Remove
10481 assignments in {vec_info::,}new_stmt_vec_info that are redundant
10482 with the clearing in the xcalloc.
10483 (stmt_vec_info_vec): Delete.
10484 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
10485 (vectorize_loops): Likewise.
10486 (vec_info::~vec_info): Remove argument from call to
10487 free_stmt_vec_infos.
10488 (vec_info::add_stmt): Remove vinfo argument from call to
10491 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10493 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
10494 rather than a gimple stmt.
10495 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
10496 information for pattern statements when passed the original
10497 statement; instead wait to be passed the pattern statement itself.
10498 Don't call set_vinfo_for_stmt here.
10499 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
10500 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
10501 stmt_vec_infos here.
10502 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
10503 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
10504 stmt_vec_infos entry.
10506 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10508 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
10509 * tree-vectorizer.c (vec_info::replace_stmt): New function.
10510 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
10511 * tree-vect-stmts.c (vectorizable_call): Likewise.
10512 (vectorizable_simd_clone_call): Likewise.
10514 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10516 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
10517 * tree-vectorizer.c (vec_info::remove_stmt): New function.
10518 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
10519 * tree-vect-loop.c (vect_transform_loop): Likewise.
10520 * tree-vect-slp.c (vect_schedule_slp): Likewise.
10521 * tree-vect-stmts.c (vect_remove_stores): Likewise.
10523 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10525 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
10526 (vect_dr_stmt): Delete.
10527 * tree-vectorizer.c (vec_info::lookup_dr): New function.
10528 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
10530 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
10531 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
10532 (vect_verify_datarefs_alignment, vect_peeling_supportable)
10533 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10534 (vect_analyze_data_refs): Likewise.
10535 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
10537 (vect_find_same_alignment_drs): Likewise.
10538 (vect_slp_analyze_node_dependences): Update calls accordingly.
10539 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10540 instead of DR_VECT_AUX.
10541 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
10542 of a vector data references. Use vec_info::lookup_dr instead of
10544 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
10545 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
10546 instead of DR_VECT_AUX.
10548 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10550 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
10552 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10554 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10555 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10556 (vect_gen_prolog_loop_niters): Likewise.
10558 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10560 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
10561 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
10562 (vect_known_alignment_in_bytes, vect_dr_behavior)
10563 (vect_get_scalar_dr_size): Take references as dr_vec_infos
10564 instead of data_references. Update calls to other routines for
10565 which the same change has been made.
10566 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
10567 dr_vec_infos instead of stmt_vec_infos.
10568 (vect_analyze_data_ref_dependence): Update call accordingly.
10569 (vect_slp_analyze_data_ref_dependence)
10570 (vect_record_base_alignments): Use DR_VECT_AUX.
10571 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
10572 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
10573 (vector_alignment_reachable_p, vect_get_data_access_cost)
10574 (vect_peeling_supportable, vect_analyze_group_access_1)
10575 (vect_analyze_group_access, vect_analyze_data_ref_access)
10576 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
10577 (vect_compile_time_alias, vect_small_gap_p)
10578 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
10579 (vect_supportable_dr_alignment): Take references as dr_vec_infos
10580 instead of data_references. Update calls to other routines for
10581 which the same change has been made.
10582 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
10583 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10584 (vect_slp_analyze_and_verify_node_alignment)
10585 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
10586 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10587 (vect_setup_realignment): Use dr_vec_infos. Update calls after
10589 (_vect_peel_info::dr): Replace with...
10590 (_vect_peel_info::dr_info): ...this new field.
10591 (vect_peeling_hash_get_most_frequent)
10592 (vect_peeling_hash_choose_best_peeling): Update accordingly.
10593 (vect_peeling_hash_get_lowest_cost):
10594 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
10595 routines for which the same change has been made.
10596 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
10598 * tree-vect-loop-manip.c (get_misalign_in_elems)
10599 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
10601 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10602 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10603 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10604 (get_group_load_store_type, get_negative_load_store_type)
10605 (vect_get_data_ptr_increment, vectorizable_store)
10606 (vectorizable_load): Likewise.
10607 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10608 Update calls to other routines for which the same change has been made.
10610 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10612 * tree-vectorizer.h (vec_info::move_dr): New member function.
10613 (dataref_aux): Rename to...
10614 (dr_vec_info): ...this and add "dr" and "stmt" fields.
10615 (_stmt_vec_info::dr_aux): Update accordingly.
10616 (_stmt_vec_info::data_ref_info): Delete.
10617 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10618 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10619 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10620 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10622 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
10623 (STMT_VINFO_DR_INFO): New macro.
10624 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10625 (set_dr_misalignment): Update after rename of dataref_aux.
10626 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
10627 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10628 initialization of STMT_VINFO_DATA_REF.
10629 * tree-vectorizer.c (vec_info::move_dr): New function.
10630 * tree-vect-patterns.c (vect_recog_bool_pattern)
10631 (vect_recog_mask_conversion_pattern)
10632 (vect_recog_gather_scatter_pattern): Use it.
10633 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10634 the "dr" and "stmt" fields of dr_vec_info instead of
10635 STMT_VINFO_DATA_REF.
10637 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10639 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10640 (is_pattern_stmt_p): Use it.
10641 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10642 on pattern statements.
10644 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10646 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10647 original stmt as a stmt_vec_info rather than a gimple stmt.
10648 (vect_pattern_recog_1): Take the statement directly as a
10649 stmt_vec_info, rather than via a gimple_stmt_iterator.
10650 Update call to vect_mark_pattern_stmts.
10651 (vect_pattern_recog): Update calls accordingly.
10653 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10655 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10656 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10657 a vect_def_type for the first argument.
10658 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10659 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
10660 operand if it isn't defined by a vectorized statement.
10661 (vect_build_gather_load_calls): Remove the mask_dt argument and
10662 update calls to vect_get_vec_def_for_stmt_copy.
10663 (vectorizable_bswap): Likewise the dt argument.
10664 (vectorizable_call): Update calls to vectorizable_bswap and
10665 vect_get_vec_def_for_stmt_copy.
10666 (vectorizable_simd_clone_call, vectorizable_assignment)
10667 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10668 (vectorizable_comparison): Update calls to
10669 vect_get_vec_def_for_stmt_copy.
10670 (vectorizable_store): Likewise. Remove now-unnecessary calls to
10671 vect_is_simple_use.
10672 (vect_get_loop_based_defs): Remove dt argument and update call
10673 to vect_get_vec_def_for_stmt_copy.
10674 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10675 and vect_get_vec_def_for_stmt_copy.
10676 (vectorizable_load): Update calls to vect_build_gather_load_calls
10677 and vect_get_vec_def_for_stmt_copy.
10678 * tree-vect-loop.c (vect_create_epilog_for_reduction)
10679 (vectorizable_reduction, vectorizable_live_operation): Update calls
10680 to vect_get_vec_def_for_stmt_copy.
10682 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10684 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10685 and gimple stmt arguments with a stmt_vec_info.
10686 (vect_record_base_alignments): Update calls accordingly.
10687 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10688 and gimple stmt arguments with a stmt_vec_info.
10689 (vect_build_slp_tree_1): Remove vinfo argument and update call
10690 to vect_record_max_nunits.
10691 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10692 and vect_record_max_nunits.
10694 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10696 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10697 file and take a stmt_vec_info instead of a gimple stmt.
10698 (supportable_widening_operation, vect_finish_replace_stmt)
10699 (vect_finish_stmt_generation, vect_get_store_rhs)
10700 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10701 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10702 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10703 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10704 (vect_create_data_ref_ptr, bump_vector_ptr)
10705 (vect_permute_store_chain, vect_setup_realignment)
10706 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10707 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10708 (vectorizable_reduction, vectorizable_induction)
10709 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10710 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10711 than gimple stmts as arguments.
10712 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10713 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10714 (can_group_stmts_p, vect_check_gather_scatter)
10715 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10716 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10717 (vect_permute_load_chain, vect_shift_permute_load_chain)
10718 (vect_transform_grouped_load)
10719 (vect_record_grouped_load_vectors): Likewise.
10720 * tree-vect-loop.c (vect_fixup_reduc_chain)
10721 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10722 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10723 (vectorizable_reduction, vectorizable_induction)
10724 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10725 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10726 (vect_get_load_store_mask): Likewise.
10727 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10728 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10729 * tree-vect-stmts.c (vect_mark_relevant)
10730 (is_simple_and_all_uses_invariant)
10731 (exist_non_indexing_operands_for_use_p, process_use)
10732 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10733 (vect_get_vec_def_for_operand, vect_get_vec_defs)
10734 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10735 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10736 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10737 (get_negative_load_store_type, get_load_store_type)
10738 (vect_check_load_store_mask, vect_check_store_rhs)
10739 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10740 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10741 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10742 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10743 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10744 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10745 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10746 (supportable_widening_operation): Likewise.
10748 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10750 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10751 a stmt_vec_info instead of a gcall.
10752 (vect_check_gather_scatter): Update call accordingly.
10753 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10755 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10756 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10757 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10758 instead of a gimple stmt.
10759 (vect_transform_loop): Update calls accordingly.
10760 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10761 stmt_vec_infos instead of gimple stmts.
10762 (vect_analyze_slp_instance): Update use accordingly.
10763 * tree-vect-stmts.c (read_vector_array, write_vector_array)
10764 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10765 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10766 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10767 (vect_gen_widened_results_half, vect_get_loop_based_defs)
10768 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10769 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10770 down to subroutines.
10772 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10774 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10775 of the worklist from a vector of gimple stmts to a vector of
10777 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10778 (vect_mark_stmts_to_be_vectorized): Likewise
10780 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10782 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10783 statement before passing it to vect_analyze_stmt.
10784 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10785 the chain of phi vector definitions. Track the exit phi via its
10787 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10788 STMT_VINFO_REDUC_DEF.
10789 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10790 stmt_vec_infos to handle the statement chains.
10791 (vect_get_slp_defs): Record the first statement in the node
10792 using a stmt_vec_info.
10793 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10794 statements here and pass their stmt_vec_info down to subroutines.
10795 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10796 down to vect_finish_stmt_generation.
10797 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10798 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10799 stmt_vec_infos to subroutines.
10800 (vect_remove_stores): Use stmt_vec_infos to handle the statement
10803 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10805 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10806 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10807 (vect_permute_store_chain, vect_setup_realignment)
10808 (vect_permute_load_chain, vect_shift_permute_load_chain)
10809 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10810 stmts internally, and when passing values to other vectorizer routines.
10811 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10812 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10813 (vect_analyze_loop_operations, get_initial_def_for_reduction)
10814 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10815 (vectorizable_reduction, vectorizable_induction)
10816 (vectorizable_live_operation, vect_transform_loop_stmt)
10817 (vect_transform_loop): Likewise.
10818 * tree-vect-patterns.c (vect_reassociating_reduction_p)
10819 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10820 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10821 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10822 (vect_slp_analyze_node_operations_1): Likewise.
10823 * tree-vect-stmts.c (vect_mark_relevant, process_use)
10824 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10825 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10826 (vect_finish_stmt_generation_1, get_group_load_store_type)
10827 (get_load_store_type, vect_build_gather_load_calls)
10828 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10829 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10830 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10831 (vectorizable_store, vectorizable_load, vectorizable_condition)
10832 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10833 (supportable_widening_operation): Likewise.
10834 (vect_get_vector_types_for_stmt): Likewise.
10835 * tree-vectorizer.h (vect_dr_behavior): Likewise.
10837 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10839 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10840 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10841 (vect_permute_store_chain, vect_permute_load_chain)
10842 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10843 repeated stmt_vec_info lookups.
10844 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10845 (vect_update_ivs_after_vectorizer): Likewise.
10846 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10847 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10848 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10849 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10850 (vect_bb_slp_scalar_cost): Likewise.
10851 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10853 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10855 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10856 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10857 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10858 to get gassigns and gcalls, rather than operating on generc gimple
10860 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10861 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10862 (vectorizable_load, vect_analyze_stmt): Likewise.
10863 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10865 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10867 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10868 return stmt_vec_infos rather than gimple stmts. Do not accept
10870 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10872 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10873 Update use of get_later_stmt.
10874 (vect_get_constant_vectors): Update call accordingly.
10875 (vect_schedule_slp_instance): Likewise
10876 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10877 (vect_slp_analyze_instance_dependence): Likewise.
10878 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10880 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10882 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10883 (stmt_info_for_cost::stmt_info): ...this new field.
10884 (add_stmt_costs): Update accordingly.
10885 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10886 (vect_get_known_peeling_cost): Likewise.
10887 (vect_estimate_min_profitable_iters): Likewise.
10888 * tree-vect-stmts.c (record_stmt_cost): Likewise.
10890 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10892 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10893 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10894 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10896 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10898 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10900 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10901 a gimple stmt to a stmt_vec_info.
10902 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10904 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10906 * tree-vectorizer.h (vec_info::grouped_stores): Change from
10907 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10908 (_loop_vec_info::reduction_chains): Likewise.
10909 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10911 * tree-vect-slp.c (vect_analyze_slp): Likewise.
10913 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10915 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10916 a gimple stmt to a stmt_vec_info.
10917 (_stmt_vec_info::next_element): Likewise.
10918 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10919 (vect_slp_analyze_and_verify_node_alignment)
10920 (vect_analyze_group_access_1, vect_analyze_group_access)
10921 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10922 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10923 (vect_supportable_dr_alignment): Update accordingly.
10924 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10925 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10926 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10927 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10928 * tree-vect-slp.c (vect_build_slp_tree_1)
10929 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10930 (vect_split_slp_store_group, vect_analyze_slp_instance)
10931 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10932 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10933 (get_group_load_store_type, get_load_store_type)
10934 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10935 (vect_transform_stmt, vect_remove_stores): Likewise.
10937 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10939 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10940 than a gimple stmt.
10941 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10942 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10943 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10944 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10945 (vector_alignment_reachable_p, vect_get_data_access_cost)
10946 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10947 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10948 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10949 (vect_analyze_group_access_1, vect_analyze_group_access)
10950 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10951 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10952 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10953 result of vect_dr_stmt and use the stmt_vec_info instead of
10954 the associated gimple stmt.
10955 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10956 (vect_gen_prolog_loop_niters): Likewise.
10957 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10959 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
10961 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10962 to a vec<stmt_vec_info>.
10963 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10964 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10965 vec<stmt_vec_info>.
10966 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10967 to a vec<stmt_vec_info>.
10968 (bst_traits::value_type, bst_traits::value_type): Likewise.
10969 (bst_traits::hash): Update accordingly.
10970 (vect_get_and_check_slp_defs): Change the stmts parameter from
10971 a vec<gimple *> to a vec<stmt_vec_info>.
10972 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10973 (vect_build_slp_tree): Likewise.
10974 (vect_build_slp_tree_2): Likewise. Update uses of
10975 SLP_TREE_SCALAR_STMTS.
10976 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10977 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10978 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10979 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10980 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10981 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10982 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10983 (vect_get_constant_vectors, vect_get_slp_defs)
10984 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10985 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10986 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10987 instead of gimple stmts.
10988 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10989 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10990 (vect_slp_analyze_instance_dependence): Update uses of
10991 SLP_TREE_SCALAR_STMTS.
10992 (vect_slp_analyze_and_verify_node_alignment): Likewise.
10993 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10994 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10995 (get_initial_defs_for_reduction): Likewise.
10996 (vect_create_epilog_for_reduction): Likewise.
10997 (vectorize_fold_left_reduction): Likewise.
10998 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10999 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
11000 (can_vectorize_live_stmts): Likewise.
11002 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11004 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
11005 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
11006 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
11008 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
11010 (gather_scalar_reductions): Update after above interface changes.
11011 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
11012 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
11014 (vect_force_simple_reduction): Likewise.
11015 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
11016 LOOP_VINFO_REDUCTIONS.
11017 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11019 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11021 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
11022 a gimple stmt to a stmt_vec_info.
11023 * tree-vect-loop.c (vect_active_double_reduction_p)
11024 (vect_force_simple_reduction, vectorizable_reduction): Update
11027 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11029 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
11030 vec<gimple *> to a vec<stmt_vec_info>.
11031 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
11032 the reduction_phis argument from a vec<gimple *> to a
11033 vec<stmt_vec_info>.
11034 (vectorizable_reduction): Likewise the phis local variable that
11035 is passed to vect_create_epilog_for_reduction. Update for new type
11036 of SLP_TREE_VEC_STMTS.
11037 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
11038 (vectorizable_live_operation): Likewise.
11039 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
11040 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
11042 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11044 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
11045 a gimple stmt to a stmt_vec_info.
11046 (vectorizable_condition, vectorizable_live_operation)
11047 (vectorizable_reduction, vectorizable_induction): Pass back the
11048 vectorized statement as a stmt_vec_info.
11049 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
11050 use of STMT_VINFO_VEC_STMT.
11051 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
11052 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
11053 as stmt_vec_infos rather than gimple stmts.
11054 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
11055 to a stmt_vec_info.
11056 (vectorizable_live_operation): Likewise.
11057 (vectorizable_reduction, vectorizable_induction): Likewise,
11058 updating use of STMT_VINFO_VEC_STMT.
11059 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
11060 of STMT_VINFO_VEC_STMT.
11061 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
11062 (vectorizable_simd_clone_call, vectorizable_conversion)
11063 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11064 (vectorizable_store, vectorizable_load, vectorizable_condition)
11065 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
11066 from a gimple stmt to a stmt_vec_info.
11067 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
11068 pointer to a stmt_vec_info to the vectorizable_* routines.
11070 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11072 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
11073 a gimple stmt to a stmt_vec_info.
11074 (is_pattern_stmt_p): Update accordingly.
11075 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
11076 (vect_record_grouped_load_vectors): Likewise.
11077 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
11078 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
11079 (vect_model_reduction_cost): Likewise.
11080 (vect_create_epilog_for_reduction): Likewise.
11081 (vectorizable_reduction, vectorizable_induction): Likewise.
11082 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11083 Return the stmt_vec_info for the pattern statement.
11084 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
11085 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
11086 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11087 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
11088 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
11089 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
11090 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
11091 (free_stmt_vec_info, vect_is_simple_use): Likewise.
11093 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11095 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
11096 (vect_finish_stmt_generation): Likewise.
11097 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11098 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
11099 (vect_build_gather_load_calls): Use the return value of the above
11100 functions instead of a separate call to vinfo_for_stmt. Use narrow
11101 scopes for the input gimple stmt and wider scopes for the associated
11102 stmt_vec_info. Use vec_info::lookup_def when setting these
11103 stmt_vec_infos from an SSA_NAME definition.
11104 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11105 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11106 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11107 (vectorizable_store, vectorizable_load, vectorizable_condition)
11108 (vectorizable_comparison): Likewise.
11109 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
11110 (vectorizable_reduction): Likewise.
11112 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11114 * tree-vectorizer.h (vect_is_simple_use): Add an optional
11115 stmt_vec_info * parameter before the optional gimple **.
11116 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11117 (process_use, vect_get_vec_def_for_operand_1): Update callers.
11118 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
11119 * tree-vect-loop.c (vectorizable_reduction): Likewise.
11120 (vectorizable_live_operation): Likewise.
11121 * tree-vect-patterns.c (type_conversion_p): Likewise.
11122 (vect_look_through_possible_promotion): Likewise.
11123 (vect_recog_rotate_pattern): Likewise.
11124 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
11126 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11128 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
11129 a typedef to a wrapper class.
11130 (NULL_STMT_VEC_INFO): New macro.
11131 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
11132 (stmt_vec_info::operator*): New function.
11133 (stmt_vec_info::operator gimple *): Likewise.
11134 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
11135 (add_stmt_costs): Likewise.
11136 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
11137 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
11138 (vect_get_known_peeling_cost): Likewise.
11139 (vect_estimate_min_profitable_iters): Likewise.
11140 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11141 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
11142 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11143 (vectorizable_store, free_stmt_vec_infos): Likewise.
11144 (new_stmt_vec_info): Change return type of xcalloc to
11147 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11149 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
11150 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
11151 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
11152 a single_imm_use-based sequence.
11153 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
11155 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11157 * tree-vectorizer.h (vec_info::lookup_def): Declare.
11158 * tree-vectorizer.c (vec_info::lookup_def): New function.
11159 * tree-vect-patterns.c (vect_get_internal_def): Use it.
11160 (vect_widened_op_tree): Likewise.
11161 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11162 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
11163 (vectorizable_reduction): Likewise.
11164 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
11166 (vect_is_slp_reduction): Update calls accordingly. Use
11167 vec_info::lookup_def.
11168 (vect_is_simple_reduction): Likewise
11169 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
11171 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11173 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
11174 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
11175 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
11177 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
11178 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
11179 (vect_update_vf_for_slp, vect_analyze_loop_operations)
11180 (vect_is_slp_reduction, vectorizable_induction)
11181 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
11182 * tree-vect-patterns.c (vect_init_pattern_stmt):
11183 (vect_determine_min_output_precision_1, vect_determine_precisions)
11184 (vect_pattern_recog): Likewise.
11185 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
11186 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
11187 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
11188 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
11189 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
11190 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
11191 info field from a loop to a loop_vec_info.
11193 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11195 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
11196 (vec_info::add_stmt): Declare.
11197 * tree-vectorizer.c (vec_info::add_stmt): New function.
11198 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
11199 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
11200 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
11201 (vectorizable_induction): Likewise.
11202 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
11203 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
11204 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
11205 (vectorizable_load): Likewise.
11206 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11207 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
11208 (vect_recog_gather_scatter_pattern): Likewise.
11209 (append_pattern_def_seq): Likewise. Remove a check that is
11210 performed by add_stmt itself.
11212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11214 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
11215 which make_ssa_name was called with new_stmt before new_stmt
11218 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11220 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
11222 (vect_is_slp_reduction): ...here...
11223 (vect_is_simple_reduction): ...and here. Remove repetition of tests
11224 that are already known to be false.
11226 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11228 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
11229 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
11230 STMT_VINFO_NUM_SLP_USES when it's true.
11231 (vect_free_slp_instance): Add a final_p parameter and pass it to
11232 vect_free_slp_tree.
11233 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
11234 (vect_analyze_slp_instance): Likewise.
11235 (vect_slp_analyze_operations): Likewise.
11236 (vect_slp_analyze_bb_1): Likewise.
11237 * tree-vectorizer.c (vec_info): Likewise.
11238 * tree-vect-loop.c (vect_transform_loop): Likewise.
11240 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11242 * tree-vect-loop.c (vectorizable_reduction): Assert that the
11243 function is not called for second and subsequent members of
11246 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
11248 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
11249 cases for nested loops from here to ...
11250 (vect_create_epilog_for_reduction): ...here. Only call
11251 vect_is_simple_use for inner-loop reductions.
11253 2018-07-31 Martin Liska <mliska@suse.cz>
11255 PR gcov-profile/85338
11256 PR gcov-profile/85350
11257 PR gcov-profile/85372
11258 * profile.c (struct location_triplet): New.
11259 (struct location_triplet_hash): Likewise.
11260 (output_location): Do not output a BB that
11261 is already recorded for a line.
11262 (branch_prob): Use streamed_locations.
11264 2018-07-31 Martin Liska <mliska@suse.cz>
11266 PR gcov-profile/85370
11267 * coverage.c (coverage_begin_function): Do not mark target
11268 clones as artificial functions.
11270 2018-07-31 Martin Liska <mliska@suse.cz>
11272 PR gcov-profile/83813
11273 PR gcov-profile/84758
11274 PR gcov-profile/85217
11275 PR gcov-profile/85332
11276 * profile.c (branch_prob): Do not record GOTO expressions
11277 for GIMPLE statements which locations are already streamed.
11279 2018-07-31 Olivier Hainque <hainque@adacore.com>
11281 * gcc.c (handle_spec_function): Accept a soft_matched_part
11282 argument, as do_spec_1. Pass it down to ...
11283 (eval_spec_function): Accept a soft_matched_part argument,
11284 and pass it down to ...
11285 (do_spec_2): Accept a soft_matched_part argument, and pass
11286 it down to do_spec_1.
11287 (do_spec_1): Pass soft_matched_part to handle_spec_function.
11288 (handle_braces): Update call to handle_spec_function.
11289 (driver::set_up_specs): Update calls to do_spec_2.
11290 (compare_debug_dump_opt_spec_function): Likewise.
11291 (compare_debug_self_opt_spec_function): Likewise.
11293 2018-07-31 Olivier Hainque <hainque@adacore.com>
11295 * common.opt (nolibc): New option.
11296 * doc/invoke.texi (Link Options): Document it.
11297 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
11298 * config/alpha/linux.h: Likewise.
11299 * config/arc/elf.h: Likewise.
11300 * config/arm/uclinux-elf.h: Likewise.
11301 * config/arm/unknown-elf.h: Likewise.
11302 * config/avr/avrlibc.h: Likewise.
11303 * config/bfin/bfin.h: Likewise.
11304 * config/bfin/linux.h: Likewise.
11305 * config/bfin/uclinux.h: Likewise.
11306 * config/darwin.h: Likewise.
11307 * config/darwin10.h: Likewise.
11308 * config/darwin12.h: Likewise.
11309 * config/gnu-user.h: Likewise.
11310 * config/lm32/uclinux-elf.h: Likewise.
11311 * config/pa/pa-hpux11.h: Likewise.
11312 * config/pa/pa64-hpux.h: Likewise.
11313 * config/sparc/sparc.h: Likewise.
11315 2018-07-31 Olivier Hainque <hainque@adacore.com>
11317 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
11318 undefined variables.
11320 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11323 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
11324 instead of GEN_INT.
11326 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
11328 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
11329 terminated string literal.
11331 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
11333 PR rtl-optimization/85160
11334 * combine.c (is_just_move): New function.
11335 (try_combine): Allow combining two instructions into two if neither of
11336 the original instructions was a move.
11338 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
11341 * doc/extend.texi (Global Register Variables): Discourage use of type
11343 (Local Register Variables): Likewise.
11345 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
11347 PR tree-optimization/86506
11348 * hwint.h (ceil_log2): Resync with hwint.c implementation.
11350 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
11353 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
11354 hard_regno, make sure no insn between `from` and `to` clobbers it.
11356 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
11357 Tom de Vries <tdevries@suse.de>
11359 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
11360 (PTX_DEFAULT_RUNTIME_DIM): ... this.
11361 (nvptx_goacc_validate_dims): Set default worker and gang dims to
11362 PTX_DEFAULT_RUNTIME_DIM.
11363 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
11365 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
11367 * config/pa/pa.c (pa_output_addr_vec): Align address table.
11368 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
11369 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
11371 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
11373 * config/rs6000/constraints.md (wG constraint): Delete, no longer
11375 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
11376 predicate to reflect toc fusion has been deleted.
11377 (toc_fusion_mem_raw): Delete, no longer used.
11378 (toc_fusion_mem_wrapped): Likewise.
11379 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
11381 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
11382 Delete, no longer used.
11383 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
11384 meant to be used for toc fusion.
11385 (rs6000_debug_print_mode): Delete toc fusion debugging.
11386 (rs6000_debug_reg_global): Likewise.
11387 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
11388 fusion and secondary reload support that were never used.
11389 (rs6000_option_override_internal): Delete TOC fusion, that was only
11390 partially defined, and it did not work unless you also used the
11392 (rs6000_legitimate_address_p): Delete TOC fusion support.
11393 (rs6000_opt_masks): Likewise.
11394 (fusion_wrap_memory_address): Delete function, no longer used.
11395 (fusion_split_address); Delete TOC fusion support.
11396 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
11397 longer used with toc fusion being deleted.
11398 (TARGET_TOC_FUSION_FP): Likewise.
11399 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
11401 (toc fusion spliter): Delete TOC fusion support.
11402 (toc_fusionload_<mode>): Likewise.
11403 (toc_fusionload_di): Likewise.
11404 (fusion_gpr_load_<mode>): Delete generator function, this insn no
11405 longer needs to be named. Rename predicate to delete TOC fusion.
11406 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11407 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11408 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
11409 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
11410 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
11412 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
11414 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
11415 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
11416 __int128 in built-in function prototypes.
11417 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
11418 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
11420 2018-07-27 Martin Sebor <msebor@redhat.com>
11422 PR tree-optimization/86696
11423 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
11424 types, including enums.
11425 (handle_char_store): Be prepared for the above function to fail.
11427 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
11429 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
11430 when optimization level is lower than 2 or optimize for size.
11432 2018-07-26 Martin Sebor <msebor@redhat.com>
11434 PR tree-optimization/86043
11435 PR tree-optimization/86042
11436 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
11437 (get_string_cst_length): Rename...
11438 (get_min_string_length): ...to this. Add argument.
11439 (handle_char_store): Extend to handle multi-character stores by
11441 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
11442 * tree.h (initializer_zerop): Add argument.
11444 2018-07-26 Jakub Jelinek <jakub@redhat.com>
11446 PR middle-end/86660
11447 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
11448 declare target to variables if they have always,{to,from,tofrom} map
11451 2018-07-26 Martin Liska <mliska@suse.cz>
11454 * lto-wrapper.c: Add linker_output as prefix
11455 for ltrans_output_file.
11457 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
11459 PR rtl-optimization/85805
11460 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
11461 value for hard registers if that was written in the same mode.
11463 2018-07-26 Martin Liska <mliska@suse.cz>
11465 PR gcov-profile/86536
11466 * gcov.c (format_gcov): Use printf format %.*f directly
11467 and do not handle special values.
11469 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11471 * common/config/arc/arc-common.c (arc_option_optimization_table):
11472 Update default optimizations for size.
11474 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11476 * config/arc/arc.md (movsf_insn): Add short instruction selection.
11477 * config/arc/constraints.md (CfZ): New constraint.
11478 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
11479 (subsf3_fpu): Likewise.
11480 (cmpsf_fpu): Likewise.
11481 (cmpsf_fpu_uneq): Likewise.
11483 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11485 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
11487 (arc_is_uncached_mem_p): uncached applies to both the variable and
11490 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
11492 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
11495 2018-07-25 David Malcolm <dmalcolm@redhat.com>
11497 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
11498 field "m_scopes" from vec to auto_vec.
11500 2018-07-25 Martin Liska <mliska@suse.cz>
11502 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
11505 2018-07-25 Richard Biener <rguenther@suse.de>
11508 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
11509 special wrt context_die late.
11510 (gen_subprogram_die): Re-use DIEs in local scope.
11512 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
11514 PR tree-optimization/86644
11515 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
11517 2018-07-25 Martin Liska <mliska@suse.cz>
11519 PR middle-end/86645
11520 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
11521 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
11523 2018-07-25 Martin Liska <mliska@suse.cz>
11526 * params.def: Explain ASan abbreviation and provide
11527 a documentation link.
11529 2018-07-24 Martin Sebor <msebor@redhat.com>
11531 PR tree-optimization/86622
11532 PR tree-optimization/86532
11533 * builtins.h (string_length): Declare.
11534 * builtins.c (c_strlen): Correct handling of non-constant offsets.
11535 (check_access): Be prepared for non-constant length ranges.
11536 (string_length): Make extern.
11537 * expr.c (string_constant): Only handle the minor non-constant
11538 array index. Use string_constant to compute the length of
11539 a generic string constant.
11541 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
11543 PR tree-optimization/86618
11544 * tree-vect-stmts.c (vectorizable_call): Don't take the address
11545 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
11547 2018-07-24 David Malcolm <dmalcolm@redhat.com>
11549 PR tree-optimization/86636
11550 * json.cc (json::object::set): Fix comment. Add assertions.
11551 (json::array::append): Move here from json.h. Add comment and an
11553 (json::string::string): Likewise.
11554 * json.h (json::array::append): Move to json.cc.
11555 (json::string::string): Likewise.
11556 * optinfo-emit-json.cc
11557 (optrecord_json_writer::impl_location_to_json): Assert that we
11558 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
11559 wrapper around it. Expand the location once, rather than three
11561 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
11562 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
11564 (optrecord_json_writer::optinfo_to_json): Likewise, in four
11565 places. Fix some overlong lines.
11567 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
11569 * config/aarch64/aarch64-simd.md
11570 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
11571 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
11572 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
11573 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
11574 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
11575 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
11576 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
11577 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
11578 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
11580 2018-07-24 Jakub Jelinek <jakub@redhat.com>
11582 PR middle-end/86627
11583 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
11584 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
11585 and abs_d == d, do the power of two handling if profitable.
11587 2018-07-24 Richard Biener <rguenther@suse.de>
11589 * match.pd: Add BIT_FIELD_REF canonicalizations.
11591 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11594 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
11596 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11598 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11599 terminated STRING_CST object.
11601 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
11603 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11605 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11607 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11608 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11609 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11610 the elements into a register.
11611 (rs6000_split_v4si_init_di_reg): Delete.
11612 (rs6000_split_v4si_init): Delete.
11613 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11614 (vsx_init_v4si): Rewrite as a define_expand.
11616 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
11618 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11619 zero_extend argument from memory): New.
11621 2018-07-22 Martin Sebor <msebor@redhat.com>
11624 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11625 diagnosing calls with unknown arguments unless -Walloca-larger-than
11626 is restricted to less than PTRDIFF_MAX bytes.
11628 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
11630 * doc/gcov.texi (Invoking Gcov): Editorial changes.
11632 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11634 * pretty-print.c (text_info::set_location): Remove redundant
11635 "line_table" parameter from call to rich_location::set_range.
11637 2018-07-20 Martin Sebor <msebor@redhat.com>
11639 PR middle-end/82063
11640 * builtins.c (expand_builtin_alloca): Adjust.
11641 * calls.c (alloc_max_size): Simplify.
11642 * cgraphunit.c (cgraph_node::expand): Adjust.
11643 * common.opt (larger_than_size, warn_frame_larger_than): Remove
11645 (frame_larger_than_size): Same.
11646 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11647 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11649 * doc/invoke.texi (GCC Command Options): Document option arguments.
11650 Explain byte-size arguments and suffixes.
11651 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11652 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11653 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11654 * doc/options.texi (UInteger): Expand.
11655 (Host_Wide_Int, ByteSize): Document new properties.
11656 * final.c (final_start_function_1): Include sizes in an error message.
11657 * function.c (frame_offset_overflow): Same.
11658 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11659 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11660 Diagnose unbounded alloca calls only for limits of less than
11662 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
11663 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
11665 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
11666 only for limits of less than PTRDIFF_MAX.
11667 * langhooks-def.h (lhd_handle_option): Change function argument
11669 * langhooks.c (lhd_handle_option): Same.
11670 * langhooks.h (handle_option): Same.
11671 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11673 (var_type, var_type_struct): Same.
11674 (var_set): Handle ByteSize flag.
11675 * optc-gen.awk: Add comments to output to ease debugging. Make
11676 use of HOST_WIDE_INT where appropriate.
11677 * opts-gen-save.awk: Use %lx to format unsigned long.
11678 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11679 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11680 arguments. Parse bytes-size suffixes.
11681 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11682 (enum_value_to_arg): Same.
11683 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
11684 (handle_option): Adjust.
11685 (generate_option): Change function argument to HOST_WIDE_INT.
11686 (cmdline_handle_error): Adjust.
11687 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11688 (set_option): Change function argument to HOST_WIDE_INT.
11689 (option_enabled): Handle cl_host_wide_int.
11690 (get_option_state): Handle CLVC_SIZE.
11691 (control_warning_option): Same.
11692 * opts.c (common_handle_option): Change function argument to
11693 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
11694 OPT_Wvla_larger_than_.
11695 * opts.h (enum cl_var_type): Add an enumerator.
11696 * stor-layout.c (layout_decl): Print a more meaningful warning.
11697 * toplev.c (output_stack_usage): Adjust.
11699 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
11701 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11702 call to inline_expand_builtin_string_cmp.
11703 (expand_builtin_strcmp): Likewise.
11704 (expand_builtin_strncmp): Likewise.
11705 (inline_string_cmp): Delete the last parameter, change char_type_node
11706 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11708 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11709 the inlining expansion on target where the type of the call has same or
11710 narrower precision than unsigned char.
11712 2018-07-20 David Malcolm <dmalcolm@redhat.com>
11714 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11715 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11716 * common.opt (fsave-optimization-record): New option.
11717 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11718 * doc/invoke.texi (-fsave-optimization-record): New option.
11719 * dumpfile.c: Include "optinfo-emit-json.h".
11720 (struct kv_pair): Move to coretypes.h.
11721 (optgroup_options): Make non-static.
11722 (dump_context::end_scope): Call
11723 optimization_records_maybe_pop_dump_scope.
11724 * dumpfile.h (optgroup_options): New decl.
11725 * json.cc: New file.
11726 * json.h: New file.
11727 * optinfo-emit-json.cc: New file.
11728 * optinfo-emit-json.h: New file.
11729 * optinfo.cc: Include "optinfo-emit-json.h".
11730 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11731 (optinfo_enabled_p): Check optimization_records_enabled_p.
11732 (optinfo_wants_inlining_info_p): Likewise.
11733 * optinfo.h: Update comment.
11734 * profile-count.c (profile_quality_as_string): New function.
11735 * profile-count.h (profile_quality_as_string): New decl.
11736 (profile_count::quality): New accessor.
11737 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11738 and optinfo_emit_json_cc_tests.
11739 * selftest.h (selftest::json_cc_tests): New decl.
11740 (selftest::optinfo_emit_json_cc_tests): New decl.
11741 * toplev.c: Include "optinfo-emit-json.h".
11742 (compile_file): Call optimization_records_finish.
11743 (do_compile): Call optimization_records_start.
11744 * tree-ssa-live.c: Include optinfo.h.
11745 (remove_unused_scope_block_p): Retain inlining information if
11746 optinfo_wants_inlining_info_p returns true.
11748 2018-07-20 Richard Biener <rguenther@suse.de>
11751 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11752 to cover -flto-partition=none.
11754 2018-07-20 Martin Liska <mliska@suse.cz>
11756 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11757 (get_decl_source_range): Remove unused function.
11759 2018-07-20 Richard Biener <rguenther@suse.de>
11761 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11762 (struct vn_phi_s): Likewise.
11763 (struct vn_reference_s): Likewise.
11764 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11765 for searching the slot of an entry known to be in the hash itself.
11766 (vn_phi_hasher::equal): Likewise.
11767 (vn_reference_hasher::equal): Likewise.
11768 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11770 (optimistic_info, current_info): Remove, keeping only valid_info.
11771 (vn_reference_lookup_1): Remove fallback lookup.
11772 (vn_reference_lookup_2): Likewise.
11773 (vn_nary_op_lookup_1): Likewise.
11774 (vn_phi_lookup): Likewise.
11775 (vn_nary_build_or_lookup_1): Make sure to not chain the built
11777 (vn_reference_insert): Adjust, chain the inserted hash element
11778 at last_inserted_ref.
11779 (vn_reference_insert_pieces): Likewise.
11780 (visit_reference_op_call): Likewise.
11781 (vn_nary_op_insert_into): Chain the inserted hash element at
11782 last_inserted_nary.
11783 (vn_nary_op_insert_pieces): Adjust.
11784 (vn_nary_op_insert): Likewise.
11785 (vn_nary_op_insert_stmt): Likewise.
11786 (vn_phi_insert): Adjust, chain the inserted hash element at
11788 (process_scc): Remove clearing and copying the optimistic
11789 table. Instead remove elements inserted during an optimistic
11790 iteration from the single table we maintain.
11791 (init_scc_vn): Adjust.
11792 (free_scc_vn): Likewise.
11793 (sccvn_dom_walker::record_cond): Likewise.
11794 (sccvn_dom_walker::after_dom_children): Likewise.
11796 2018-07-19 Martin Sebor <msebor@redhat.com>
11798 PR tree-optimization/84047
11799 PR tree-optimization/83776
11800 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11801 (check_array_bounds): Call it.
11803 2018-07-19 Martin Sebor <msebor@redhat.com>
11805 * align.h (align_flags): Use member initialization.
11807 2018-07-19 David Malcolm <dmalcolm@redhat.com>
11809 * Makefile.in (OBJS): Add optinfo.o.
11810 * coretypes.h (class symtab_node): New forward decl.
11811 (struct cgraph_node): New forward decl.
11812 (class varpool_node): New forward decl.
11813 * dump-context.h: New file.
11814 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11816 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11817 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11818 (set_alt_dump_file): Likewise.
11819 (dump_context::~dump_context): New dtor.
11820 (dump_gimple_stmt): Move implementation to...
11821 (dump_context::dump_gimple_stmt): ...this new member function.
11822 Add the stmt to any pending optinfo, creating one if need be.
11823 (dump_gimple_stmt_loc): Move implementation to...
11824 (dump_context::dump_gimple_stmt_loc): ...this new member function.
11825 Start a new optinfo and add the stmt to it.
11826 (dump_gimple_expr): Move implementation to...
11827 (dump_context::dump_gimple_expr): ...this new member function.
11828 Add the stmt to any pending optinfo, creating one if need be.
11829 (dump_gimple_expr_loc): Move implementation to...
11830 (dump_context::dump_gimple_expr_loc): ...this new member function.
11831 Start a new optinfo and add the stmt to it.
11832 (dump_generic_expr): Move implementation to...
11833 (dump_context::dump_generic_expr): ...this new member function.
11834 Add the tree to any pending optinfo, creating one if need be.
11835 (dump_generic_expr_loc): Move implementation to...
11836 (dump_context::dump_generic_expr_loc): ...this new member
11837 function. Add the tree to any pending optinfo, creating one if
11839 (dump_printf): Move implementation to...
11840 (dump_context::dump_printf_va): ...this new member function. Add
11841 the text to any pending optinfo, creating one if need be.
11842 (dump_printf_loc): Move implementation to...
11843 (dump_context::dump_printf_loc_va): ...this new member function.
11844 Start a new optinfo and add the stmt to it.
11845 (dump_dec): Move implementation to...
11846 (dump_context::dump_dec): ...this new member function. Add the
11847 value to any pending optinfo, creating one if need be.
11848 (dump_context::dump_symtab_node): New member function.
11849 (dump_context::get_scope_depth): New member function.
11850 (dump_context::begin_scope): New member function.
11851 (dump_context::end_scope): New member function.
11852 (dump_context::ensure_pending_optinfo): New member function.
11853 (dump_context::begin_next_optinfo): New member function.
11854 (dump_context::end_any_optinfo): New member function.
11855 (dump_context::s_current): New global.
11856 (dump_context::s_default): New global.
11857 (dump_scope_depth): Delete global.
11858 (dumpfile_ensure_any_optinfo_are_flushed): New function.
11859 (dump_symtab_node): New function.
11860 (get_dump_scope_depth): Reimplement in terms of dump_context.
11861 (dump_begin_scope): Likewise.
11862 (dump_end_scope): Likewise.
11863 (selftest::temp_dump_context::temp_dump_context): New ctor.
11864 (selftest::temp_dump_context::~temp_dump_context): New dtor.
11865 (selftest::verify_item): New function.
11866 (ASSERT_IS_TEXT): New macro.
11867 (ASSERT_IS_TREE): New macro.
11868 (ASSERT_IS_GIMPLE): New macro.
11869 (selftest::test_capture_of_dump_calls): New test.
11870 (selftest::dumpfile_c_tests): Call it.
11871 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11872 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11873 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11874 descriptive comment.
11875 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11876 (dump_node, dump_bb): Move these unrelated decls.
11877 (class dump_manager): Add leading comment.
11878 * optinfo.cc: New file.
11879 * optinfo.h: New file.
11881 2018-07-19 Michael Collison <michael.collison@arm.com>
11882 Richard Henderson <rth@redhat.com>
11884 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11885 (subti): Handle op1 zero.
11886 (subvti4, usub4ti4): New.
11887 (*sub<GPI>3_compare1_imm): New.
11888 (sub<GPI>3_carryinCV): New.
11889 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11890 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11892 2018-07-19 Michael Collison <michael.collison@arm.com>
11893 Richard Henderson <rth@redhat.com>
11895 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11896 (addti3): Create simpler code if low part is already known to be 0.
11897 (addvti4, uaddvti4): New.
11898 (*add<GPI>3_compareC_cconly_imm): New.
11899 (*add<GPI>3_compareC_cconly): New.
11900 (*add<GPI>3_compareC_imm): New.
11901 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11902 handle constants within this pattern..
11903 (*add<GPI>3_compareV_cconly_imm): New.
11904 (*add<GPI>3_compareV_cconly): New.
11905 (*add<GPI>3_compareV_imm): New.
11906 (add<GPI>3_compareV): New.
11907 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11908 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11909 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11910 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11911 with 'comparison' operator.
11912 (*add<GPI>3_compareV_cconly_imm): Ditto.
11913 (*add<GPI>3_compareV_cconly): Ditto.
11914 (*add<GPI>3_compareV_imm): Ditto.
11915 (add<GPI>3_compareV): Ditto.
11916 (add<mode>3_carryinC): Ditto.
11917 (*add<mode>3_carryinC_zero): Ditto.
11918 (*add<mode>3_carryinC): Ditto.
11919 (add<mode>3_carryinV): Ditto.
11920 (*add<mode>3_carryinV_zero): Ditto.
11921 (*add<mode>3_carryinV): Ditto.
11923 2018-07-19 Michael Collison <michael.collison@arm.com>
11924 Richard Henderson <rth@redhat.com>
11926 * config/aarch64/aarch64-modes.def (CC_V): New.
11927 * config/aarch64/aarch64-protos.h
11928 (aarch64_addti_scratch_regs): Declare
11929 (aarch64_subvti_scratch_regs): Declare.
11930 (aarch64_expand_subvti): Declare.
11931 (aarch64_gen_unlikely_cbranch): Declare
11932 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11933 for signed overflow using CC_Vmode.
11934 (aarch64_get_condition_code_1): Handle CC_Vmode.
11935 (aarch64_gen_unlikely_cbranch): New function.
11936 (aarch64_addti_scratch_regs): New function.
11937 (aarch64_subvti_scratch_regs): New function.
11938 (aarch64_expand_subvti): New function.
11940 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11942 * config/aarch64/aarch64-option-extensions.def: New entry for profile
11944 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11945 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11948 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11951 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11952 address check not strict.
11954 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
11956 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11958 (store_pair_lanes<mode>): Likewise.
11959 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11960 enum value 'ADDR_QUERY_LDP_STP_N'.
11961 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11962 (aarch64_print_address_internal): Add declaration.
11963 (aarch64_print_ldpstp_address): Remove.
11964 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11965 (aarch64_print_operand): Change printing of 'y'.
11966 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11967 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11968 'true' rather than '1'.
11969 * config/aarch64/constraints.md (Uml): Likewise.
11970 (Uml): Rename to Umn.
11973 2018-07-19 Richard Biener <rguenther@suse.de>
11975 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11977 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11978 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11979 (vn_reference_hasher): Likewise.
11980 (struct vn_tables_s): Remove obstack and alloc-pool members.
11981 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11982 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11983 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11984 (vn_reference_insert_pieces): Likewise.
11985 (alloc_vn_nary_op_noinit): Adjust.
11986 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11987 (vn_phi_eq): Adjust.
11988 (shared_lookup_phiargs): Remove.
11989 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11990 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11991 (visit_reference_op_call): Likewise.
11992 (copy_nary, copy_phi, copy_reference): Remove.
11993 (process_scc): Rewind the obstack when iterating. Do not
11994 copy the elements to valid_info but just move them from one
11995 hashtable to the other.
11996 (allocate_vn_table): Adjust.
11997 (free_vn_table): Likewise.
11998 (init_scc_vn): Likewise.
11999 (free_scc_vn): Likewise.
12001 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
12004 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
12005 indirect_return as function type attribute.
12006 (ix86_attribute_table): Change indirect_return to function
12008 * doc/extend.texi: Update indirect_return attribute.
12010 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
12012 * wide-int.h (widest2_int): New.
12013 * gimple-fold.c (arith_overflowed_p): Use it.
12014 * tree.h (widest2_int_cst): New.
12015 * tree-vrp.c (wide_int_binop_overflow): Rename from
12016 vrp_int_const_binop.
12017 Rewrite to work on trees.
12018 (extract_range_from_multiplicative_op_1): Abstract code to...
12019 (wide_int_range_min_max): ...here.
12020 (wide_int_range_cross_product): ...and here.
12021 (extract_range_from_binary_expr_1): Abstract overflow code to...
12022 (wide_int_range_mult_wrapping): ...here.
12023 * tree-vrp.h (wide_int_range_cross_product): New.
12024 (wide_int_range_mult_wrapping): New.
12026 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
12027 Julia Koval <julia.koval@intel.com>
12029 * config/i386/x86-tune-costs.h (skylake_memcpy,
12030 skylake_memset): Replace rep_prefix with unrolling for size 512.
12032 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
12034 PR middle-end/86544
12035 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
12036 comparision with EQ_EXPR in last stmt.
12038 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
12040 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
12041 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
12042 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
12043 previously known as "PowerPC AltiVec Built-in Functions". Move
12044 some material to new subsubsections "PowerPC AltiVec Built-in
12045 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
12047 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
12048 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
12049 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
12050 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
12052 2018-07-18 Richard Biener <rguenther@suse.de>
12054 PR tree-optimization/86557
12055 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
12058 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
12060 * config/s390/s390.c (s390_function_profiler): Generate CFI.
12062 2018-07-17 Jeff Law <law@redhat.com>
12064 * config/arm/arm.c (get_label_padding): Update for recent
12065 changes to label_to_alignment.
12067 PR tree-optimization/86010
12068 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
12070 * config/mips/mips.c (vr4130_align_insns): Update for recent
12071 changes to label_to_alignment.
12073 * config/frv/frv.c (frv_label_align): Update for recent changes
12074 to label_to_alignment.
12076 * config/nios2/nios2.c (nios2_label_align): Update for recent
12077 changes which dropped ALIGN_LABELS_LOG.
12079 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
12081 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
12082 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
12084 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
12086 * config/arc/arc.c (arc_label_align): Use align_labels instead of
12087 deprecated align_labels_log.
12089 2018-07-17 Richard Biener <rguenther@suse.de>
12092 * dwarf2out.c (init_sections_and_labels): Always generate
12093 a debug_line_str_section for early LTO debug.
12094 (dwarf2out_finish): Reset debug_line_str_hash output early.
12095 Bump counter for extra dwarf5 .debug_loc labels to not conflict
12097 (dwarf2out_early_finish): Output debug_line_str.
12099 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12101 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
12102 index register on z196 or later.
12104 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
12106 * config/s390/s390.c (s390_default_align): Set default function
12108 (s390_override_options_after_change): Call s390_default align.
12109 (s390_option_override_internal): Call s390_default_align.
12110 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
12112 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12114 PR middle-end/86542
12115 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
12116 to _looptemp_ clauses, other than the first two.
12118 2018-07-17 Martin Liska <mliska@suse.cz>
12120 * opts.c: Do not enable OPT_falign_* for -Os.
12122 2018-07-17 Martin Liska <mliska@suse.cz>
12124 * align.h (MAX_CODE_ALIGN): New.
12125 (MAX_CODE_ALIGN_VALUE): New.
12126 * common/config/i386/i386-common.c (ix86_handle_option):
12127 (MAX_CODE_ALIGN): Moved to align.h.
12128 * final.c (MAX_CODE_ALIGN): Likewise.
12129 * opts.c (parse_and_check_align_values):
12130 (MAX_CODE_ALIGN): Likewise.
12131 (MAX_CODE_ALIGN_VALUE): Likewise.
12133 2018-07-17 Martin Liska <mliska@suse.cz>
12135 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
12136 in order to fulfil coding style.
12137 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
12138 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12139 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12140 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
12141 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
12142 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
12143 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
12144 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
12145 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12147 2018-07-17 Martin Liska <mliska@suse.cz>
12149 * align.h: New file.
12150 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
12152 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
12153 align_flags of label_to_alignment.
12154 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
12156 * config/m68k/m68k.c: Do not use removed align_labels_value and
12158 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
12159 (LOOP_ALIGN): Likewise.
12160 (LABEL_ALIGN): Likewise.
12161 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12162 Remove not used macro.
12163 (rs6000_loop_align): Change return type to align_flags.
12164 (rs6000_loop_align_max_skip): Remove.
12165 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
12166 Change return type to align_flags.
12167 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
12168 Remove not used macro.
12169 (rs6000_loop_align): Change return type to align_flags.
12170 (rs6000_loop_align_max_skip): Remove.
12171 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
12172 * config/rx/rx-protos.h (rx_align_for_label): Make it
12174 * config/rx/rx.c (rx_align_for_label): Change return type
12176 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
12178 into align_flags class.
12179 (LABEL_ALIGN): Likewise.
12180 (LOOP_ALIGN): Likewise.
12181 * config/s390/s390.c (s390_label_align): Use align_flags
12183 (s390_asm_output_function_label): Likewise.
12184 * config/sh/sh.c (sh_override_options_after_change):
12185 Use align_flags class directly without macros.
12186 (find_barrier): Likewise.
12187 (barrier_align): Likewise.
12188 (sh_loop_align): Likewise.
12189 * config/spu/spu.c (spu_option_override):
12190 Use align_flags_tuple::get_value instead of removed macros.
12191 (spu_sched_init): Likewise.
12192 * config/spu/spu.h (GTY): Likewise.
12193 * config/visium/visium.c (visium_option_override):
12194 Set "8" as default secondary alignment.
12195 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
12196 in order to guarantee secondary alignment of 8.
12197 * coretypes.h: Include align.h header file.
12198 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
12199 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
12200 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
12201 * doc/tm.texi.in: Likewise.
12202 * final.c (struct label_alignment): Remove not used structure.
12203 (LABEL_ALIGN): Change type to align_flags.
12204 (LOOP_ALIGN): Likewise.
12205 (JUMP_ALIGN): Likewise.
12206 (default_loop_align_max_skip): Remove.
12207 (default_label_align_max_skip): Likewise.
12208 (default_jump_align_max_skip): Likewise.
12209 (default_label_align_after_barrier_max_skip):
12210 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
12211 (LABEL_TO_MAX_SKIP): Remove.
12212 (label_to_alignment): Return align_flags type instead of integer.
12213 (label_to_max_skip): Remove.
12214 (align_fuzz): Use align_flags type.
12215 (compute_alignments): Use align_flags type and use align_flags::max
12216 to combine multiple alignments.
12217 (grow_label_align): Grow vec instead of C array.
12218 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
12219 (shorten_branches): Use align_flags type and use align_flags::max
12220 to combine multiple alignments.
12221 (final_scan_insn_1): Remove usage of secondary alignment that comes
12222 from label alignment, but instead use proper secondary alignment
12223 which is computed in grow_label_align.
12224 * flags.h (struct align_flags_tuple): Move to align.h.
12225 (struct align_flags): Likewise.
12226 (state_align_loops): Rename to align_loops.
12227 (state_align_jumps): Rename to align_jumps.
12228 (state_align_labels): Rename to align_labels.
12229 (state_align_functions): Rename to align_functions.
12230 (align_loops_log): Remove.
12231 (align_jumps_log): Remove.
12232 (align_labels_log): Remove.
12233 (align_functions_log): Remove.
12234 (align_loops_max_skip): Remove.
12235 (align_jumps_max_skip): Remove.
12236 (align_labels_max_skip): Remove.
12237 (align_functions_max_skip): Remove.
12238 (align_loops_value): Remove.
12239 (align_jumps_value): Remove.
12240 (align_labels_value): Remove.
12241 (align_functions_value): Remove.
12242 * output.h (label_to_alignment): Change return type to align_flags.
12243 (label_to_max_skip): Remove.
12244 * target.def: Remove loop_align_max_skip, label_align_max_skip,
12245 jump_align_max_skip macros.
12246 * targhooks.h (default_loop_align_max_skip): Remove.
12247 (default_label_align_max_skip): Likewise.
12248 (default_jump_align_max_skip): Likewise.
12249 (default_label_align_after_barrier_max_skip): Remove.
12250 * toplev.c (read_log_maxskip): Use ::normalize function.
12251 (parse_N_M): Remove not used argument and also call ::normalize.
12252 (parse_alignment_opts): Do not pass unused arguments.
12253 * varasm.c (assemble_start_function): Use directly align_functions
12254 instead of removed macros.
12255 * system.h: Do not poison removed macros.
12257 2018-07-17 Jakub Jelinek <jakub@redhat.com>
12259 PR middle-end/86539
12260 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
12261 and cond temporaries don't have reference type if iterator has
12262 pointer type. For init use &for_pre_body instead of pre_p if
12263 for_pre_body is non-empty.
12265 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12267 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
12268 double-double modes to SFmode directly directly.
12269 (trunc<mode>sf2_fprs): Delete.
12271 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12273 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
12274 for conversions between IFmode and the decimal floating point modes.
12275 (init_float128_ieee): Use the correct names for conversions between
12276 KFmode and the decimal floating point modes.
12278 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
12280 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
12281 for the conversions between TDmode and IFmode.
12282 (init_float128_ieee): Use more correct names for the conversions
12283 between TDmode and KFmode.
12285 2018-07-16 Jakub Jelinek <jakub@redhat.com>
12287 PR tree-optimization/86526
12288 * builtins.c (expand_builtin_memcmp): Formatting fixes.
12289 (inline_expand_builtin_string_cmp): Likewise.
12290 (inline_string_cmp): Likewise. Use c_readstr instead of
12291 builtin_memcpy_read_str. Add unit_mode temporary.
12293 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
12295 PR middle-end/86528
12296 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
12297 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
12299 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
12301 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
12302 Alphabetize prototypes of built-in functions, separating out
12303 built-in functions that are listed in this section but should be
12304 described elsewhere.
12306 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
12309 * expmed.c (emit_store_flag): Do not emit setcc followed by a
12310 conditional move when trapping comparison was split to a
12311 non-trapping one (and vice versa).
12313 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12315 * config/s390/s390.c (s390_function_profiler): Generate nops
12316 instead of profiler call sequences.
12317 * config/s390/s390.opt: Add the new option.
12319 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12321 * config/s390/s390.c (s390_function_profiler): Generate
12322 __mcount_loc section.
12323 * config/s390/s390.opt: Add the new option.
12325 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
12327 * common.opt: Add the new warning.
12328 * config/s390/s390.c (s390_function_profiler): Emit "brasl
12329 %r0,__fentry__" when -mfentry is specified.
12330 (s390_option_override_internal): Disallow -mfentry for 31-bit
12332 * config/s390/s390.opt: Add the new option.
12334 2018-07-16 Richard Biener <rguenther@suse.de>
12337 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
12338 for function-local FUNCTION_DECL and RESULT_DECL immediately.
12340 2018-07-16 Martin Liska <mliska@suse.cz>
12343 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
12346 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12348 * config/arc/arcHS.md: Update ARCHS scheduling rules.
12350 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
12352 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
12354 * config/arc/arc-cpus.def (hs4x): New cpu.
12356 * config/arc/arc-tables.opt: Regenerate.
12357 * config/arc/arc.c (arc_sched_issue_rate): New function.
12358 (TARGET_SCHED_ISSUE_RATE): Define.
12359 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
12360 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
12362 (attr tune): Add ARCHS4x tune values.
12363 (attr tune_dspmpy): Define.
12364 (*tst): Correct instruction type.
12365 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
12366 * config/arc/arcHS4x.md: New file.
12367 * config/arc/fpu.md: Update instruction type attributes.
12368 * config/arc/t-multilib: Regenerate.
12370 2018-07-16 Tom de Vries <tdevries@suse.de>
12373 * var-tracking.c (vt_initialize): Fix pre_dec handling.
12375 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12377 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
12380 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
12382 PR tree-optimization/86514
12383 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
12384 conversion to a boolean type from a type with greater precision.
12386 2018-07-16 Tom de Vries <tdevries@suse.de>
12388 * var-tracking.c (vt_initialize): Print adjusted insn slim if
12389 dump_flags request TDF_SLIM.
12391 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
12393 * fold-const.c (int_const_binop_1): Abstract...
12394 (wide_int_binop): ...wide int code here.
12395 (poly_int_binop): ...poly int code here.
12396 Abstract the rest of int_const_binop_1 into int_const_binop.
12397 * fold-const.h (wide_int_binop): New.
12398 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
12399 Remove useless PLUS/MINUS_EXPR case.
12400 (zero_nonzero_bits_from_vr): Move wide int code...
12401 (zero_nonzero_bits_from_bounds): ...here.
12402 (extract_range_from_binary_expr_1): Move mask optimization code...
12403 (range_easy_mask_min_max): ...here.
12404 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
12405 (range_easy_mask_min_max): New.
12407 2018-07-15 Jeff Law <law@redhat.com>
12410 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
12413 2018-07-14 Jim Wilson <jimw@sifive.com>
12415 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
12417 2018-07-14 Paul Koning <ni1d@arrl.net>
12419 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
12421 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
12423 * lto-streamer-out.c (copy_function_or_variable): Dump info about
12426 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
12427 Steve Munroe <munroesj52@gmail.com>
12429 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
12430 (_mm_andnot_si128): Likewise.
12431 (_mm_or_si128): Likewise.
12432 (_mm_xor_si128): Likewise.
12434 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
12436 PR middle-end/78809
12437 * builtins.c (expand_builtin_memcmp): Inline the calls first
12438 when result_eq is false.
12439 (expand_builtin_strcmp): Inline the calls first.
12440 (expand_builtin_strncmp): Likewise.
12441 (inline_string_cmp): New routine. Expand a string compare
12442 call by using a sequence of char comparison.
12443 (inline_expand_builtin_string_cmp): New routine. Inline expansion
12444 a call to str(n)cmp/memcmp.
12445 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
12447 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
12449 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
12451 * config/arm/driver-arm.c: Include arm-native.h.
12452 (host_detect_local_cpu): Use auto-generated data tables.
12453 (vendors, arm_cpu_table): Delete. Move part information to ...
12454 * config/arm/arm-cpus.in: ... here.
12455 * config/arm/parsecpu.awk (gen_native): New function.
12456 (vendor, part): New CPU fields.
12457 (END): Add support for building the native CPU detection tables.
12458 * config/arm/t-arm (arm-native.h): Add build rule.
12459 (driver-arm.o): Add dependency on arm-native.h.
12461 2018-07-13 Richard Biener <rguenther@suse.de>
12463 PR middle-end/85974
12464 * match.pd (addr1 - addr2): Allow either of the operand to
12467 2018-07-13 Tom de Vries <tdevries@suse.de>
12469 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
12472 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
12474 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
12475 arrays instead of numbered variables.
12477 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
12479 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
12480 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
12482 2018-07-13 Richard Biener <rguenther@suse.de>
12485 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
12486 instead of get_context_die.
12488 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
12489 Richard Biener <rguenther@suse.de>
12491 PR middle-end/86489
12492 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
12493 that the loop latch destination where phi is defined.
12495 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
12497 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
12498 (riscv_expand_epilogue): Add assertion to check interrupt mode.
12499 (riscv_set_current_function): Extract getting interrupt type to new
12501 (riscv_get_interrupt_type): New function.
12502 (riscv_merge_decl_attributes): New function, checking interrupt type is
12504 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
12506 2018-07-12 Paul Koning <ni1d@arrl.net>
12508 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
12511 2018-07-12 Paul Koning <ni1d@arrl.net>
12513 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
12514 zero reference, add doloop_end instead.
12515 * doc/md.texi (decrement_and_branch_until_zero): Remove.
12516 (Looping patterns): Remove decrement_and_branch_until_zero. Add
12517 detail for doloop_end.
12519 2018-07-12 Martin Sebor <msebor@redhat.com>
12522 * attribs.c (decl_attributes): Reject conflicting attributes before
12523 calling attribute handlers.
12525 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12527 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
12529 (gcc::dump_manager::get_dump_file_name): likewise.
12530 (dump_begin): Likewise.
12531 * dumpfile.h (dump_begin): Update prototype.
12532 (gcc::dump_manager::get_dump_file_name,
12533 gcc::dump_manager::get_dump_file_name): Update prototype.
12535 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12537 * internal-fn.h (vectorizable_internal_fn_p): New function.
12538 * tree-vect-slp.c (compatible_calls_p): Likewise.
12539 (vect_build_slp_tree_1): Remove nops argument. Handle calls
12540 to internal functions.
12541 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
12543 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12545 * fold-const.h (inverse_conditions_p): Declare.
12546 * fold-const.c (inverse_conditions_p): New function.
12547 * match.pd: Use inverse_conditions_p. Add folds of view_converts
12548 that test the inverse condition of a conditional internal function.
12549 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
12550 * internal-fn.c (internal_fn_mask_index): Handle conditional
12551 internal functions.
12552 (vectorized_internal_fn_supported_p): New function.
12553 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
12554 (any_pred_load_store): Replace with...
12555 (need_to_predicate): ...this new variable.
12556 (redundant_ssa_names): New variable.
12557 (ifcvt_can_use_mask_load_store): Move initial checks to...
12558 (ifcvt_can_predicate): ...this new function. Handle tree codes
12559 for which a conditional internal function exists.
12560 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
12561 instead of ifcvt_can_use_mask_load_store. Update after variable
12563 (predicate_load_or_store): New function, split out from
12564 predicate_mem_writes.
12565 (check_redundant_cond_expr): New function.
12566 (value_available_p): Likewise.
12567 (predicate_rhs_code): Likewise.
12568 (predicate_mem_writes): Rename to...
12569 (predicate_statements): ...this. Use predicate_load_or_store
12570 and predicate_rhs_code.
12571 (combine_blocks, tree_if_conversion): Update after above name changes.
12572 (ifcvt_local_dce): Handle redundant_ssa_names.
12573 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
12574 general conditional functions.
12575 * tree-vect-stmts.c (vectorizable_call): Likewise.
12577 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12578 Alan Hayward <alan.hayward@arm.com>
12579 David Sherwood <david.sherwood@arm.com>
12581 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
12582 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
12583 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
12584 plus and minus and convert them into IFN_COND_FMA-based sequences.
12585 (convert_mult_to_fma): Handle conditional plus and minus.
12587 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12589 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
12590 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
12591 (cond_fnms_optab): New optabs.
12592 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
12593 internal functions.
12594 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
12595 * internal-fn.h (get_conditional_internal_fn): Declare.
12596 (get_unconditional_internal_fn): Likewise.
12597 * internal-fn.c (cond_ternary_direct): New macro.
12598 (expand_cond_ternary_optab_fn): Likewise.
12599 (direct_cond_ternary_optab_supported_p): Likewise.
12600 (FOR_EACH_COND_FN_PAIR): Likewise.
12601 (get_conditional_internal_fn): New function.
12602 (get_unconditional_internal_fn): Likewise.
12603 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12604 (gimple_match_op::gimple_match_op): Add a new overload for 5
12606 (gimple_match_op::set_op): Likewise.
12607 (gimple_resimplify5): Declare.
12608 * genmatch.c (decision_tree::gen): Generate simplifications for
12610 * gimple-match-head.c (gimple_simplify): Define an overload for
12611 5 operands. Handle calls with 5 arguments in the top-level overload.
12612 (convert_conditional_op): Handle conversions from unconditional
12613 internal functions to conditional ones.
12614 (gimple_resimplify5): New function.
12615 (build_call_internal): Pass a fifth operand.
12616 (maybe_push_res_to_seq): Likewise.
12617 (try_conditional_simplification): Try converting conditional
12618 internal functions to unconditional internal functions.
12619 Handle 3-operand unconditional forms.
12620 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12621 Define ternary equivalents of the current rules for binary conditional
12622 internal functions.
12623 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12624 ternary operations.
12625 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12626 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12627 (optab): Handle them.
12628 (SVE_COND_FP_TERNARY): New int iterator.
12629 (sve_fmla_op, sve_fmad_op): New int attributes.
12630 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12631 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12632 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12634 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
12636 * target.def (preferred_else_value): New target hook.
12637 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12638 * doc/tm.texi: Regenerate.
12639 * targhooks.h (default_preferred_else_value): Declare.
12640 * targhooks.c (default_preferred_else_value): New function.
12641 * internal-fn.h (conditional_internal_fn_code): Declare.
12642 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12643 (get_conditional_internal_fn): Use it.
12644 (conditional_internal_fn_code): New function.
12645 * gimple-match.h (gimple_match_cond): New struct.
12646 (gimple_match_op): Add a cond member function.
12647 (gimple_match_op::gimple_match_op): Update all forms to take a
12649 * genmatch.c (expr::gen_transform): Use the same condition as res_op
12650 for the suboperation, but don't specify a particular else_value.
12651 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12652 (visit_nary_op, visit_reference_op_load): Pass
12653 gimple_match_cond::UNCOND to the gimple_match_op constructor.
12654 * gimple-match-head.c: Include tree-eh.h
12655 (convert_conditional_op): New function.
12656 (maybe_resimplify_conditional_op): Likewise.
12657 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12658 (gimple_resimplify2): Likewise.
12659 (gimple_resimplify3): Likewise.
12660 (gimple_resimplify4): Likewise.
12661 (maybe_push_res_to_seq): Return null for conditional operations.
12662 (try_conditional_simplification): New function.
12663 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
12665 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12667 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12669 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12671 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
12673 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12675 (hash_tree): Do not hash DECL_FCONTEXT
12676 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12677 Do not stream DECL_FCONTEXT.
12678 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12679 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12681 2018-07-12 Richard Biener <rguenther@suse.de>
12684 * dwarf2out.c (gen_block_die): Only output blocks when they have
12685 at least one !DECL_IGNORED_P variable.
12687 2018-07-12 Richard Biener <rguenther@suse.de>
12690 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12691 Remove -mieee-fp handling.
12693 2018-07-12 Richard Biener <rguenther@suse.de>
12695 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12696 left-over from last patch.
12698 2018-07-12 Jakub Jelinek <jakub@redhat.com>
12700 PR tree-optimization/86492
12701 * gimple-ssa-store-merging.c
12702 (imm_store_chain_info::coalesce_immediate_stores): Call
12703 check_no_overlap even for the merge_overlapping case. Formatting fix.
12705 2018-07-12 Richard Biener <rguenther@suse.de>
12707 PR middle-end/86479
12708 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12709 move possibly trapping operations into the conditional.
12711 2018-07-12 Richard Biener <rguenther@suse.de>
12713 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12714 (vn_lookup_simplify_result): Remove recursion limit applied
12716 (vn_nary_build_or_lookup_1): Adjust.
12717 (try_to_simplify): Likewise.
12718 * gimple-match-head.c (gimple_resimplify1): Instead apply one
12720 (gimple_resimplify2): Likewise.
12721 (gimple_resimplify3): Likewise.
12722 (gimple_resimplify4): Likewise.
12724 2018-07-11 Jakub Jelinek <jakub@redhat.com>
12726 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12727 Use __mmask64 type instead of __mmask8 for __M argument.
12728 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12729 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12731 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12732 __mmask16 for __M argument.
12733 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12734 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12735 to __mmask16 instead of __mmask8.
12736 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12737 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12738 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12739 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12740 instead of __mmask16 for __U argument.
12741 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12742 __mmask16 instead of __mmask8 for __U argument.
12743 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12745 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12747 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12749 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12751 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12753 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12755 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12757 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12759 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12761 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12763 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12764 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12765 return type as well as __M argument type and all casts from __mmask8
12767 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12768 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12769 return type as well as __M argument type and all casts from __mmask8
12771 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12772 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12773 return type as well as __M argument type and all casts from __mmask8
12775 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12776 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12777 return type as well as __M argument type and all casts from __mmask8
12779 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12780 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12783 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
12785 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12786 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12789 2018-07-11 Paul Koning <ni1d@arrl.net>
12791 * doc/md.texi (define_subst): Document how multiple occurrences of
12792 the same argument in the replacement pattern are handled.
12794 2018-07-11 Paul Koning <ni1d@arrl.net>
12796 * doc/extend.texi (Common Variable Attributes): Move "mode" into
12797 alphabetical order.
12798 (Common Type Attributes): Add "mode" attribute.
12800 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
12802 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12803 stream DECL_ORIGINAL_TYPE.
12804 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12805 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12806 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12807 Do not walk original type.
12808 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12810 (write_ts_decl_non_common_tree_pointers): Do not stream
12812 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12813 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12815 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12817 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12818 thread twice from the same starting edge.
12820 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
12822 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12823 * gimple.c (gimple_call_nonnull_result_p): ...here...
12824 (gimple_call_nonnull_arg): ...and here.
12825 * gimple.h (gimple_call_nonnull_result_p): New.
12826 (gimple_call_nonnull_arg): New.
12828 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
12830 * config/arm/arm-cpus.in: Move information from fpu field of each
12831 cpu definition to the isa field.
12832 * config/arm/parsecpu.awk (fpu): Delete match rule.
12833 (gen_comm_data): Don't add bits from the CPU's FPU entry.
12835 2018-07-11 Richard Biener <rguenther@suse.de>
12838 * dwarf2out.c (init_sections_and_labels): Use
12839 output_asm_line_debug_info consistently.
12840 (dwarf2out_early_finish): Likewise.
12841 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12844 2018-07-11 Richard Biener <rguenther@suse.de>
12846 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12847 Rework father_bb setting in a way to avoid propagating constants
12848 multiple times on a loop body.
12850 2018-07-10 Mark Wielaard <mark@klomp.org>
12853 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12855 2018-07-10 Richard Biener <rguenther@suse.de>
12857 * hash-map.h (hash_map::iterator::operator*): Return
12858 references to key and value.
12860 2018-07-10 Jakub Jelinek <jakub@redhat.com>
12863 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12864 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12865 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12866 (gimplify_omp_for): For composite loops, move outer
12867 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12868 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
12869 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
12870 TREE_LIST for both the original class iterator and the "last" helper
12871 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
12872 loop, remember has_decl_expr from outer composite loops for the
12873 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12875 2018-07-09 Martin Sebor <msebor@redhat.com>
12877 PR middle-end/77357
12878 PR middle-end/86428
12879 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12880 accessing implicitly initialized array elements.
12881 * expr.c (string_constant): Handle string initializers of
12882 character arrays within aggregates.
12883 * gimple-fold.c (fold_array_ctor_reference): Add argument.
12884 Store element offset. As a special case, handle zero size.
12885 (fold_nonarray_ctor_reference): Same.
12886 (fold_ctor_reference): Add argument. Store subobject offset.
12887 * gimple-fold.h (fold_ctor_reference): Add argument.
12889 2018-07-09 Paul Koning <ni1d@arrl.net>
12891 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12892 (pdp11_insn_cost): New function.
12893 (pdp11_md_asm_adjust): New function.
12894 (TARGET_INVALID_WITHIN_DOLOOP): Define.
12895 (pdp11_rtx_costs): Update to match machine better.
12896 (output_addr_const_pdp11): Correct format mismatch warnings.
12897 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12898 * config/pdp11/pdp11.md: General change to add base_cost and/or
12899 length attributes for use by new pdp11_insn_cost function.
12900 (MIN_BRANCH): Correct definition.
12902 (doloop_end): Use standard pattern name for looping pattern.
12903 (doloop_end_nocc): New.
12904 (movsf): Add another constraint alternative.
12905 (zero_extendqihi2): Add constraint alternatives for not in place
12907 (zero_extendhisi2): Remove.
12908 (shift patterns): Add CC handling variants.
12912 (define_peephole2): New peephole to recognize mov that sets CC for
12915 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12917 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12918 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12921 2018-07-09 Jakub Jelinek <jakub@redhat.com>
12924 * real.c (real_nextafter): Return true if result is denormal.
12926 2018-07-09 Martin Liska <mliska@suse.cz>
12928 * common.opt: Add back wrongly removed attribute.
12930 2018-07-09 Richard Biener <rguenther@suse.de>
12933 * dwarf2out.c (gen_block_die): For an early generated DIE
12934 always output high/low PC attributes.
12936 2018-07-09 Tom de Vries <tdevries@suse.de>
12938 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12939 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12940 onto VAR_DECL with abstract origin.
12942 2018-07-07 Jim Wilson <jimw@sifive.com>
12944 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12946 2018-07-07 Tom de Vries <tdevries@suse.de>
12948 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12950 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
12952 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12954 (combine_bound): Use wide-int overflow calculation instead of
12956 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12958 * fold-const.c (int_const_binop_2): Same.
12959 (extract_muldiv_1): Same.
12960 (fold_div_compare): Same.
12961 (fold_abs_const): Same.
12963 * poly-int.h (add): Same.
12967 * predict.c (predict_iv_comparison): Same.
12968 * profile-count.c (slow_safe_scale_64bit): Same.
12969 * simplify-rtx.c (simplify_const_binary_operation): Same.
12970 * tree-chrec.c (tree_fold_binomial): Same.
12971 * tree-data-ref.c (split_constant_offset_1): Same.
12972 * tree-if-conv.c (idx_within_array_bound): Same.
12973 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12974 * tree-ssa-phiopt.c (minmax_replacement): Same.
12975 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12976 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12977 * vr-values.c (vr_values::adjust_range_with_scev): Same.
12978 * wide-int.cc (wi::add_large): Same.
12979 (wi::mul_internal): Same.
12980 (wi::sub_large): Same.
12981 (wi::divmod_internal): Same.
12982 * wide-int.h: Change overflow type to overflow_type for neg, add,
12983 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12984 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12985 mul_internal, divmod_internal.
12986 (overflow_type): New enum.
12987 (accumulate_overflow): New.
12989 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
12991 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12992 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12994 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
12996 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12997 argument is checked for zero before entering loop, avoid checking again.
12999 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
13001 * gimplify.h (generic_expr_could_trap_p): Set as global function.
13002 * gimplify.h (generic_expr_could_trap_p): Likwise.
13003 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
13005 2018-07-06 Jakub Jelinek <jakub@redhat.com>
13007 PR tree-optimization/86401
13008 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
13009 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
13010 (fold_bit_and_mask): ... here. New helper function for match.pd.
13011 * fold-const.h (fold_bit_and_mask): Declare.
13012 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
13014 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
13017 * target.def (translate_mode_attribute): New hook.
13018 * targhooks.h (default_translate_mode_attribute): Declare.
13019 * targhooks.c (default_translate_mode_attribute): New function.
13020 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
13021 * doc/tm.texi: Regenerate.
13022 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
13023 (rs6000_translate_mode_attribute): New function.
13025 2018-07-06 Paul Koning <ni1d@arrl.net>
13027 * doc/md.texi (define_split): Document DONE and FAIL.
13028 (define_peephole2): Ditto.
13030 2018-07-05 Jeff Law <law@redhat.com>
13032 PR tree-optimization/86010
13033 * tree-ssa-dse.c (compute_trims): More aggressively trim at
13034 both the head and tail of mem* and str* calls.
13036 2018-07-05 Jim Wilson <jimw@sifive.com>
13038 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
13040 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
13042 * config/aarch64/aarch64-simd.md: correct flags text for
13043 MIN_EXPR replacement.
13045 2018-07-05 James Clarke <jrtc27@jrtc27.com>
13047 * configure: Regenerated.
13049 2018-07-05 Carl Love <cel@us.ibm.com>
13051 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
13052 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
13053 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
13054 VSX_BUILTIN_DOUBLEL_V4SF.
13056 2018-07-05 Martin Sebor <msebor@redhat.com>
13059 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
13060 than its domain to compute its the upper bound of a char array.
13062 2018-07-05 Nathan Sidwell <nathan@acm.org>
13064 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
13065 * doc/cpp.texi: Update comment.
13066 * doc/tm.texi: Rebuilt.
13067 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
13068 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
13069 * doc/extend.texi (Backwards Compatibility): Clarify it is system
13070 headers affected by extern "C".
13071 * system.h: Poison NO_IMPLICIT_EXTERN_C.
13072 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
13073 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
13074 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
13075 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
13076 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
13077 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
13078 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
13079 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
13080 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
13081 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
13082 config/sparc/sp64-elf.h, config/spu/spu.h,
13083 config/stormy16/stormy16.h, config/v850/v850.h,
13084 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
13085 define NO_IMPLICIT_EXTERN_C.
13086 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
13088 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13091 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
13092 instead of GET_MODE_SIZE when comparing Units.
13094 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13097 * rtlanal.c (set_noop_p): Constrain on mode change,
13098 include hard-reg-set.h
13100 2018-07-05 Tamar Christina <tamar.christina@arm.com>
13102 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
13104 2018-07-05 Jakub Jelinek <jakub@redhat.com>
13107 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13110 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13112 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13114 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
13117 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
13119 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
13121 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
13123 PR middle-end/86380
13124 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
13126 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
13128 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
13129 neg_*_op* variables.
13131 2018-07-04 Martin Liska <mliska@suse.cz>
13133 * tree-switch-conversion.c: Define
13134 max_ratio_for_speed and max_ratio_for_size constants.
13136 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13137 Martin Liska <mliska@suse.cz>
13139 PR middle-end/66240
13142 * common.opt: Rename align options with 'str_' prefix.
13143 * common/config/i386/i386-common.c (set_malign_value): New
13145 (ix86_handle_option): Use it to set -falign-* options/
13146 * config/aarch64/aarch64-protos.h (struct tune_params): Change
13147 type from int to string.
13148 * config/aarch64/aarch64.c: Update default values from int
13150 * config/alpha/alpha.c (alpha_override_options_after_change):
13152 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
13153 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13154 max skip conditionally.
13155 * config/i386/freebsd.h (SUBALIGN_LOG): New.
13156 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13157 max skip conditionally.
13158 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13159 max skip conditionally.
13160 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
13161 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13162 max skip conditionally.
13163 * config/i386/i386.c (struct ptt): Change type from int to
13165 (ix86_default_align): Set default values.
13166 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
13167 max skip conditionally.
13168 * config/i386/iamcu.h (SUBALIGN_LOG): New.
13169 (ASM_OUTPUT_MAX_SKIP_ALIGN):
13170 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
13171 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13172 max skip conditionally.
13173 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
13174 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
13175 * config/i386/x86-64.h (SUBALIGN_LOG): New.
13176 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
13177 max skip conditionally.
13178 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13179 * config/ia64/ia64.c (ia64_option_override): Set default values
13180 for alignment options.
13181 * config/m68k/m68k.c: Handle new str_align_* options.
13182 * config/mips/mips.c (mips_set_compression_mode): Change
13184 (mips_option_override): Set default values for options.
13185 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
13187 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13189 * config/rx/rx.c (rx_option_override): Likewise.
13190 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
13191 (LABEL_ALIGN): Use align_labels_log.
13192 (LOOP_ALIGN): Use align_loops_align.
13193 * config/s390/s390.c (s390_asm_output_function_label): Use new
13195 * config/sh/sh.c (sh_override_options_after_change):
13196 Change type of constants.
13197 * config/spu/spu.c (spu_sched_init): Likewise.
13198 * config/sparc/sparc.c (sparc_option_override): Set default
13199 values for options.
13200 * config/visium/visium.c (visium_option_override): Likewise.
13201 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
13202 emit p2align format with last argument if it's not needed.
13203 * doc/invoke.texi: Document extended format of -falign-*.
13204 * final.c: Use align_labels alignment.
13205 * flags.h (struct target_flag_state): Change type to use
13207 (struct align_flags_tuple): New.
13208 (struct align_flags): Likewise.
13209 (align_loops_log): Redefine macro to use new types.
13210 (align_loops_max_skip): Redefine macro to use new types.
13211 (align_jumps_log): Redefine macro to use new types.
13212 (align_jumps_max_skip): Redefine macro to use new types.
13213 (align_labels_log): Redefine macro to use new types.
13214 (align_labels_max_skip): Redefine macro to use new types.
13215 (align_functions_log): Redefine macro to use new types.
13216 (align_loops): Redefine macro to use new types.
13217 (align_jumps): Redefine macro to use new types.
13218 (align_labels): Redefine macro to use new types.
13219 (align_functions): Redefine macro to use new types.
13220 (align_functions_max_skip): Redefine macro to use new types.
13221 (align_loops_value): New macro.
13222 (align_jumps_value): New macro.
13223 (align_labels_value): New macro.
13224 (align_functions_value): New macro.
13225 * function.c (invoke_set_current_function_hook): Propagate
13226 alignment values from flags to global variables default in
13228 * ipa-icf.c (sem_function::equals_wpa): Use
13229 cl_optimization_option_eq instead of memcmp.
13230 * lto-streamer.h (cl_optimization_stream_out): Support streaming
13232 (cl_optimization_stream_in): Likewise.
13233 * optc-save-gen.awk: Support strings in cl_optimization.
13234 * opth-gen.awk: Likewise.
13235 * opts.c (finish_options): Remove error checking of invalid
13237 (MAX_CODE_ALIGN): Remove.
13238 (MAX_CODE_ALIGN_VALUE): Likewise.
13239 (parse_and_check_align_values): New function.
13240 (check_alignment_argument): Likewise.
13241 (common_handle_option): Use check_alignment_argument.
13242 * opts.h (parse_and_check_align_values): Declare.
13243 * toplev.c (init_alignments): Remove.
13244 (read_log_maxskip): New.
13245 (parse_N_M): Likewise.
13246 (parse_alignment_opts): Likewise.
13247 (backend_init_target): Remove usage of init_alignments.
13248 * toplev.h (parse_alignment_opts): Declare.
13249 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
13251 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
13252 * tree.c (cl_option_hasher::equal): New.
13253 * varasm.c: Use new global macros.
13255 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
13257 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
13258 Use a simpler align directive also if MAXSKIP = ALIGN-1.
13259 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13260 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13261 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13262 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13263 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
13264 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
13265 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
13266 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13267 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13268 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13269 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13271 2018-07-04 Martin Liska <mliska@suse.cz>
13272 Jonathan Wakely <jwakely@redhat.com>
13274 * coverage.c: Use correct type.
13275 * doc/invoke.texi: Language correction.
13277 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
13280 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
13281 ENDBRANCH for non-tail call which may return via indirect branch.
13282 * doc/extend.texi: Document indirect_return attribute.
13284 2018-07-03 Martin Sebor <msebor@redhat.com>
13286 PR tree-optimization/86274
13287 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
13289 (format_floating): Correct handling of infinities and NaNs.
13291 2018-07-03 Martin Sebor <msebor@redhat.com>
13293 * print-tree.c (print_real_cst): New function.
13294 (print_node_brief): Call it.
13295 (print_node): Ditto.
13297 2018-07-03 Jeff Law <law@redhat.com>
13299 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
13300 into a single pattern.
13302 * config/h8300/h8300.md (ors code_iterator): New.
13303 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
13304 a single pattern and single splitter.
13305 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
13306 (iorqi3_1, xorqi3_1): Likewise.
13307 (iorqi3, xorqi3 expanders): Similarly.
13309 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
13310 (movmd_internal) into a single pattern using the P mode iterator.
13311 (movmd splitters): Similarly.
13312 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
13313 (movsd splitters): Similarly.
13315 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
13316 ADDB, ADDW and ADDL into a single ADD attribute which selects the
13317 right table based on the size of the operand.
13318 * config/h8300/h8300.md (length_table): Corresponding changes. All
13319 references to "addb", "addw" and "addl" changed to "add".
13320 (btst patterns): Merge two variants into a single pattern.
13321 (tstqi, tsthi): Likewise.
13322 (addhi3_incdec, addsi3_incdec): Likewise.
13323 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
13324 (mulhi3, mulsi3): Likewise.
13325 (udivhi3, udivsi3): Likewise.
13326 (divhi3, divsi3): Likewise.
13327 (andorqi3, andorhi3, andorsi3): Likewise.
13329 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
13332 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
13333 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
13335 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13337 PR tree-optimization/85694
13338 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
13339 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
13341 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
13342 (<u>avg<mode>3_ceil): New patterns.
13344 2018-07-03 David Malcolm <dmalcolm@redhat.com>
13346 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
13347 scan-tree-dump directive.
13348 * gcc.dg/vect/slp-perm-2.c: Likewise.
13349 * gcc.dg/vect/slp-perm-3.c: Likewise.
13350 * gcc.dg/vect/slp-perm-5.c: Likewise.
13351 * gcc.dg/vect/slp-perm-6.c: Likewise.
13352 * gcc.dg/vect/slp-perm-7.c: Likewise.
13353 * gcc.dg/vect/slp-perm-8.c: Likewise.
13355 2018-07-03 Marek Polacek <polacek@redhat.com>
13357 PR middle-end/86202
13358 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
13360 2018-07-03 Richard Biener <rguenther@suse.de>
13363 * tree-ssa-structalias.c (find_func_clobbers): Properly
13364 handle indirect calls.
13366 2018-07-03 Jeff Law <law@redhat.com>
13368 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
13369 (shifts): New code iterator.
13370 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
13371 expander. Fix HImode handling on H8/SX.
13372 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
13373 (subqi3, subhi3, subsi3 expanders): Likewise.
13374 (andqi3, andhi3, andsi3 expanders): Likewise.
13375 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
13376 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
13377 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
13378 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
13379 (zero_extendqihi2, zero_extendqisi2): Likewise.
13380 (extendqihi2, extendqisi2): Likewise.
13381 (rotlqi3, rotlhi3, rotlsi3): Likewise.
13382 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
13383 (rotlqi3_1, rotlhi3_1): Likewise.
13384 (logicalhi3_sn, logicalsi3_sn): Likewise.
13385 (logicalhi3, logicalsi3): Likewise.
13387 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13389 * tree-vect-patterns.c (vect_recog_rotate_pattern)
13390 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13391 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
13392 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
13393 type to append_pattern_def_seq instead of creating a stmt_vec_info
13395 (build_mask_conversion): Likewise. Remove vinfo argument.
13396 (vect_add_conversion_to_patterm): Likewise, renaming to...
13397 (vect_add_conversion_to_pattern): ...this.
13398 (vect_recog_mask_conversion_pattern): Update call to
13399 build_mask_conversion. Pass the vector type to
13400 append_pattern_def_seq here too.
13401 (vect_recog_gather_scatter_pattern): Update call to
13402 vect_add_conversion_to_pattern.
13404 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13406 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
13407 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13408 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
13409 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
13410 STMT_VINFO_PATTERN_DEF_SEQ to null here.
13411 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
13412 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
13413 append_pattern_def_seq instead of new_pattern_def_seq.
13414 (vect_recog_divmod_pattern): Do both of the above.
13415 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
13418 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13420 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
13421 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
13422 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
13423 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
13424 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
13425 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13426 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
13427 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
13428 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
13429 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
13430 parameter with a single stmt_vec_info.
13431 (vect_recog_func_ptr): Likewise.
13432 (vect_recog_gather_scatter_pattern): Likewise, folding in...
13433 (vect_try_gather_scatter_pattern): ...this.
13434 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
13435 the stmt_vec_info of the statement to be matched. Don't clear
13436 STMT_VINFO_RELATED_STMT.
13437 (vect_pattern_recog): Update call accordingly.
13439 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13441 PR tree-optimization/85694
13442 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
13443 (uavgM3_ceil): Document new optabs.
13444 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
13445 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
13447 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
13448 (savg_ceil_optab): New optabs.
13449 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
13450 (vect_vect_recog_func_ptrs): Add it.
13451 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
13452 constant directly from the associated lhs.
13454 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13456 * tree-vect-patterns.c (vect_split_statement): New function.
13457 (vect_convert_input): Use it to try to split an existing cast.
13459 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13461 * poly-int.h (print_hex): New function.
13462 * dumpfile.h (dump_dec, dump_hex): Declare.
13463 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
13464 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
13465 min_input_precision, operation_precision and operation_sign.
13466 * tree-vect-patterns.c (vect_get_range_info): New function.
13467 (vect_same_loop_or_bb_p, vect_single_imm_use)
13468 (vect_operation_fits_smaller_type): Delete.
13469 (vect_look_through_possible_promotion): Add an optional
13470 single_use_p parameter.
13471 (vect_recog_over_widening_pattern): Rewrite to use new
13472 stmt_vec_info infomration. Handle one operation at a time.
13473 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
13474 (vect_truncatable_operation_p, vect_set_operation_type)
13475 (vect_set_min_input_precision): New functions.
13476 (vect_determine_min_output_precision_1): Likewise.
13477 (vect_determine_min_output_precision): Likewise.
13478 (vect_determine_precisions_from_range): Likewise.
13479 (vect_determine_precisions_from_users): Likewise.
13480 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
13481 (vect_vect_recog_func_ptrs): Put over_widening first.
13483 (vect_pattern_recog): Call vect_determine_precisions.
13485 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
13487 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
13488 statements that have been replaced by further pattern statements.
13489 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
13491 2018-07-03 Richard Biener <rguenther@suse.de>
13493 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
13494 always set *dt. Dump vectype in vectype overload.
13495 * dumpfile.h (dump_gimple_expr): New function.
13496 (dump_gimple_expr_loc): Likewise.
13497 * dumpfile.c (dump_gimple_expr): New function.
13498 (dump_gimple_expr_loc): Likewise.
13500 2018-07-02 Jeff Law <law@redhat.com>
13502 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
13503 the H8/300, H8/300H and H8/S variants into a single pattern.
13504 (movhi_h8300, movqi_h8300hs): Similarly.
13505 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
13506 (QHI mode iterator): New.
13508 * config/h8300/h8300.md: Remove trailing whitespace.
13510 2018-07-02 Jim Wilson <jimw@sifive.com>
13512 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
13513 instead of emit_insn for interrupt returns.
13514 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
13515 (riscv_sret, riscv_uret): Likewise.
13517 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13519 * pretty-print.c (selftest::test_pp_format): Move save and restore
13520 of quotes to class auto_fix_quotes, and add an instance.
13521 * selftest.c: Include "intl.h".
13522 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
13523 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
13524 * selftest.h (selftest::auto_fix_quotes): New class.
13526 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
13528 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
13529 (aarch64_sve_prepare_conditional_op): Remove.
13530 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
13531 Allow aarch64_simd_reg_or_zero as select operand; remove
13532 the aarch64_sve_prepare_conditional_op call.
13533 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
13534 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13535 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
13536 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
13537 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
13538 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
13539 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
13540 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
13541 and a splitters to match all of the *_any patterns.
13542 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
13544 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
13545 (SVE_COND_FP_BINARY_REV): Remove.
13546 (sve_int_op_rev, sve_fp_op_rev): New.
13547 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
13548 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
13549 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
13550 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
13551 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
13552 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
13553 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
13554 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
13555 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
13557 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
13558 Remove match_dup 1 from the inner unspec.
13559 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
13561 * config/aarch64/aarch64.md (movprfx): New attr.
13562 (length): Default movprfx to 8.
13563 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
13564 (*madd<SVE_I>, *msub<SVE_I): Likewise.
13565 (*<su>mul<SVE_I>3_highpart): Likewise.
13566 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
13567 (*v<ASHIFT><SVE_I>3): Likewise.
13568 (*<su><MAXMIN><SVE_I>3): Likewise.
13569 (*<su><MAXMIN><SVE_F>3): Likewise.
13570 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
13571 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
13572 (*div<SVE_F>4): Likewise.
13574 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
13576 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
13579 2018-07-02 Richard Biener <rguenther@suse.de>
13581 PR tree-optimization/86363
13582 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
13583 memset argument refers to a non-variable address.
13585 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13587 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
13588 {PLUS,MINUS}_EXPR code to...
13589 (adjust_symbolic_bound): ...here,
13590 (combine_bound): ...here,
13591 (set_value_range_with_overflow): ...and here.
13593 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
13595 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
13597 (extract_range_from_abs_expr): ...here.
13599 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
13601 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13602 -fno-omit-frame-pointer when not optimizing.
13604 2018-07-02 Martin Liska <mliska@suse.cz>
13607 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13608 (propagate_nothrow): Likewise.
13610 2018-07-02 Martin Liska <mliska@suse.cz>
13613 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13615 2018-07-02 David Malcolm <dmalcolm@redhat.com>
13617 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13618 function in r262149, changing "loc" param from source_location to
13619 const dump_location_t &.
13620 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13621 declaration, as above.
13623 2018-07-01 Paul Koning <ni1d@arrl.net>
13625 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13626 -munit-asm, -mgnu-asm, -mdec-asm.
13627 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13628 (pdp11_output_labelref): New.
13629 (pdp11_output_def): New.
13630 (pdp11_output_addr_vec_elt): New.
13631 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
13632 %# and %@ format codes.
13633 (pdp11_option_override): New.
13634 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13635 (pdp11_output_ident): New.
13636 (pdp11_asm_named_section): New.
13637 (pdp11_asm_init_sections): New.
13638 (pdp11_file_start): New.
13639 (pdp11_file_end): New.
13640 (output_ascii): Use .ascii/.asciz for -mdec-asm.
13641 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
13642 %o, like %c but octal.
13643 (pdp11_option_override): New.
13644 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13646 (DATA_SECTION_ASM_OP): Ditto.
13647 (READONLY_DATA_SECTION_ASM_OP): New.
13648 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13649 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13650 (ASM_OUTPUT_LABELREF): Ditto.
13651 (ASM_OUTPUT_DEF): Ditto.
13652 (ASM_OUTPUT_EXTERNAL): New.
13653 (ASM_OUTPUT_SOURCE_FILENAME): New.
13654 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13655 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13656 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
13657 %# and %@ format codes.
13658 * config/pdp11/pdp11.opt (mgnu-asm): New.
13659 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13660 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13661 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13663 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
13665 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13666 dereferencing path[] beyond its length.
13668 (debug_all_paths): New.
13669 (rewire_first_differing_edge): New.
13670 (adjust_paths_after_duplication): New.
13671 (duplicate_thread_path): Call adjust_paths_after_duplication.
13673 (thread_through_all_blocks): Add new argument to
13674 duplicate_thread_path.
13676 2018-06-30 Jim Wilson <jimw@sifive.com>
13678 * config/riscv/predicates.md (p2m1_shift_operand): New.
13679 (high_mask_shift_operand): New.
13680 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13681 pattern using p2m1_shift_operand.
13682 (lshsi3_zero_extend_3+2): New combiner pattern using
13683 high_mask_shift_operand.
13685 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13687 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13689 (vect_recog_rotate_pattern): ...here.
13690 (vect_convert_input): Try to insert casts of invariants in the
13692 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13693 preheader to be empty.
13695 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13697 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13698 vector type. If given, install it in the new statement's
13699 STMT_VINFO_VECTYPE.
13700 (vect_element_precision): New function.
13701 (vect_unpromoted_value): New struct.
13702 (vect_unpromoted_value::vect_unpromoted_value): New function.
13703 (vect_unpromoted_value::set_op): Likewise.
13704 (vect_look_through_possible_promotion): Likewise.
13705 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13706 (vect_widened_op_tree, vect_convert_input): Likewise.
13707 (vect_convert_inputs, vect_convert_output): Likewise.
13708 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13709 to handle the optional cast of the multiplication result and
13710 vect_widened_op_tree to detect the widened multiplication itself.
13711 Do not require the input and output of promotion casts to have
13712 the same sign, but base the signedness of the operation on the
13713 input rather than the result. If the pattern includes two
13714 promotions, check that those promotions have the same sign.
13715 Do not restrict the MULT_EXPR handling to a double-width result;
13716 handle quadruple-width results and wider. Use vect_convert_inputs
13717 to convert the inputs to the common type.
13718 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
13719 to handle the optional cast of the ABS result. Also allow a sign
13720 change or a sign extension between the ABS and MINUS.
13721 Use vect_widened_op_tree to detect the widened subtraction and use
13722 vect_convert_inputs to convert the inputs to the common type.
13723 (vect_handle_widen_op_by_const): Delete.
13724 (vect_recog_widen_op_pattern): New function.
13725 (vect_recog_widen_mult_pattern): Use it.
13726 (vect_recog_widen_shift_pattern): Likewise.
13727 (vect_recog_widen_sum_pattern): Use
13728 vect_look_through_possible_promotion to handle the promoted
13731 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13733 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13734 the containing gimple_seq *.
13735 * gimple-iterator.h (gsi_for_stmt): Declare it.
13736 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13737 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13738 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13739 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13740 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13742 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13744 (vect_mark_pattern_stmts): ...here. Handle cases in which the
13745 statement being replaced is part of an existing pattern
13746 definition sequence, inserting the new pattern statements before
13748 (vect_pattern_recog_1): Don't return a bool. If the statement
13749 is already part of a pattern, instead apply pattern matching
13750 to the pattern definition statements. Don't clear the
13751 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13752 (vect_pattern_recog): Don't break after the first match;
13753 continue processing the pattern definition statements instead.
13754 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13756 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13758 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13759 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13760 (vect_recog_widen_sum_pattern): Use it.
13762 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13764 * tree-vect-loop.c (vectorizable_reduction): Assert that the
13765 phi is not a pattern statement and has not been replaced by
13766 a pattern statement.
13767 * tree-vect-patterns.c (type_conversion_p): Don't check
13768 STMT_VINFO_IN_PATTERN_P.
13769 (vect_recog_vector_vector_shift_pattern): Likewise.
13770 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13771 the pattern statement rather than the original statement; check
13772 directly for a WIDEN_MULT_EXPR here.
13773 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13774 vect_is_simple_use to return the pattern statement rather
13775 than the original statement; use is_pattern_stmt_p to check
13776 for such a pattern statement.
13777 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13778 to return the pattern statement rather than the original statement;
13779 don't do the same transformation here.
13780 (vect_is_simple_use): If the defining statement has been replaced
13781 by a pattern statement, return the pattern statement instead.
13782 Remove the corresponding (local) transformation from the vectype
13785 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
13787 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13788 end and default to null.
13789 * tree-vect-loop.c (vect_create_epilog_for_reduction)
13790 (vectorizable_reduction): Update calls accordingly, dropping the
13791 gimple ** argument if the passed-back statement isn't needed.
13792 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13793 (vect_recog_rotate_pattern): Likewise.
13794 (vect_recog_mask_conversion_pattern): Likewise.
13795 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13796 (vect_mask_constant_operand_p): Likewise.
13797 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13798 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13799 (get_group_load_store_type, get_load_store_type): Likewise.
13800 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13801 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13802 (vectorizable_conversion, vectorizable_assignment): Likewise.
13803 (vectorizable_shift, vectorizable_operation): Likewise.
13804 (vectorizable_store, vect_is_simple_cond): Likewise.
13805 (vectorizable_condition, vectorizable_comparison): Likewise.
13806 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13807 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13808 and move it to the end. Cope with null def_stmt_outs.
13810 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
13812 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13814 2018-06-29 Jeff Law <law@redhat.com>
13816 * config/v850/v850.c (v850_legitimate_address_p): Handle large
13817 displacements for TARGET_V850E2V3 and newer.
13818 (TARGET_LRA_P): Remove. Defaults to LRA now.
13819 * config/v850/v850.md (sign23byte_load): Remove.
13820 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13821 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13823 2018-06-29 Martin Liska <mliska@suse.cz>
13826 * coverage.c (coverage_init): Mangle full path name.
13827 * doc/invoke.texi: Document the change.
13828 * gcov-io.c (mangle_path): New.
13829 * gcov-io.h (mangle_path): Likewise.
13830 * gcov.c (mangle_name): Use mangle_path for path mangling.
13832 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13834 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13835 if starting source register is not even.
13837 2018-06-29 Martin Liska <mliska@suse.cz>
13839 PR tree-optimization/86263
13840 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13841 Make edge redirection.
13843 2018-06-29 David Malcolm <dmalcolm@redhat.com>
13845 * dumpfile.c (dump_loc): Add indentation based on scope depth.
13846 (dump_scope_depth): New variable.
13847 (get_dump_scope_depth): New function.
13848 (dump_begin_scope): New function.
13849 (dump_end_scope): New function.
13850 * dumpfile.h (get_dump_scope_depth): New declaration.
13851 (dump_begin_scope): New declaration.
13852 (dump_end_scope): New declaration.
13853 (class auto_dump_scope): New class.
13854 (AUTO_DUMP_SCOPE): New macro.
13855 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13858 2018-06-29 Richard Biener <rguenther@suse.de>
13860 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13861 compute_all_dependences succeeds.
13862 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13863 exceed --param loop-max-datarefs-for-datadeps.
13865 2018-06-29 Jakub Jelinek <jakub@redhat.com>
13867 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13869 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
13872 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13873 alternative 0 in preferred_for_speed attribute.
13875 2018-06-28 Paul Koning <ni1d@arrl.net>
13877 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13878 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13879 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13880 * config/pdp11/pdp11.md: Correct "length" attribute calculation
13881 for shift insn patterns.
13883 2018-06-28 David Malcolm <dmalcolm@redhat.com>
13885 * cgraph.c (cgraph_node::get_body): Replace assignments to
13886 "dump_file" with calls to set_dump_file.
13887 * dumpfile.c (alt_dump_file): Make static, and group with...
13888 (alt_flags): ...this definition.
13889 (dumps_are_enabled): New variable.
13890 (refresh_dumps_are_enabled): New function.
13891 (set_dump_file): New function.
13892 (set_alt_dump_file): New function.
13893 (gcc::dump_manager::dump_start): Replace assignments to
13894 "dump_file" and "alt_dump_file" with calls to set_dump_file and
13896 (gcc::dump_manager::dump_finish): Likewise.
13897 * dumpfile.h (alt_dump_file): Delete decl.
13898 (dumps_are_enabled): New variable decl.
13899 (set_dump_file): New function decl.
13900 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13902 * tree-nested.c (lower_nested_functions): Replace assignments to
13903 "dump_file" with calls to set_dump_file.
13905 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
13907 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13908 goto_locus of each outgoing edge of each basic block.
13910 2018-06-28 Richard Biener <rguenther@suse.de>
13912 * dwarf2out.c (decl_scope_table): Remove.
13913 (push_decl_scope): Likewise.
13914 (pop_decl_scope): Likewise.
13915 (gen_type_die_for_member): Do not call push/pop_decl_scope.
13916 (gen_struct_or_union_type_die): Likewise.
13917 (gen_tagged_type_die): Likewise.
13918 (dwarf2out_init): Do not initialize decl_scope_table.
13919 (dwarf2out_c_finalize): Do not free it.
13921 2018-06-28 Richard Biener <rguenther@suse.de>
13923 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13924 deciding whether to not re-use a DIE.
13926 2018-06-28 Richard Biener <rguenther@suse.de>
13928 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13929 DW_AT_abstract_origin attribute.
13931 2018-06-28 Martin Liska <mliska@suse.cz>
13933 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13934 Use newly introduced constants.
13935 * tree-switch-conversion.h (struct jump_table_cluster):
13936 Define max_ratio_for_size and max_ratio_for_speed.
13938 2018-06-28 Martin Liska <mliska@suse.cz>
13940 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13941 Add new checking assert to catch invalid state.
13942 (jump_table_cluster::can_be_handled): Handle single case
13944 (jump_table_cluster::is_beneficial): Bail out for such case.
13945 (bit_test_cluster::find_bit_tests):
13946 Add new checking assert to catch invalid state.
13947 (bit_test_cluster::can_be_handled): Handle single case
13949 (bit_test_cluster::is_beneficial): Bail out for such case.
13950 (switch_decision_tree::analyze_switch_statement):
13953 2018-06-28 Martin Liska <mliska@suse.cz>
13955 * common.opt: Introduce -completion option.
13956 * gcc.c (driver_handle_option): Handle it.
13957 (driver::main): Print completions if completion
13959 * opt-suggestions.c (option_proposer::get_completions):
13961 (option_proposer::suggest_completion): Likewise.
13962 (option_proposer::find_param_completions): Likewise.
13963 (verify_autocompletions): Likewise.
13964 (test_completion_valid_options): Likewise.
13965 (test_completion_valid_params): Likewise.
13966 (in_completion_p): Likewise.
13967 (empty_completion_p): Likewise.
13968 (test_completion_partial_match): Likewise.
13969 (test_completion_garbage): Likewise.
13970 (opt_proposer_c_tests): Likewise.
13971 * opt-suggestions.h: Declare new functions.
13972 * opts.c (common_handle_option): Handle OPT__completion_.
13973 * selftest-run-tests.c (selftest::run_tests): Add
13974 opt_proposer_c_tests.
13975 * selftest.c (assert_str_startswith): New.
13976 * selftest.h (assert_str_startswith): Likewise.
13977 (opt_proposer_c_tests): New.
13978 (ASSERT_STR_STARTSWITH): Likewise.
13980 2018-06-28 Martin Liska <mliska@suse.cz>
13982 * Makefile.in: Add opt-suggestions.o.
13983 * gcc-main.c: Include opt-suggestions.h.
13984 * gcc.c (driver::driver): Likewise.
13985 (driver::~driver): Remove m_option_suggestions.
13986 (driver::build_option_suggestions): Moved to option_proposer.
13987 (driver::suggest_option): Likewise.
13988 (driver::handle_unrecognized_options): Use option_proposer.
13989 * gcc.h (class driver): Add new memver m_option_proposer.
13990 * opt-suggestions.c: New file.
13991 * opt-suggestions.h: New file.
13993 2018-06-28 Martin Liska <mliska@suse.cz>
13995 * vec.h (class auto_string_vec): New (moved from auto_argvec).
13996 (auto_string_vec::~auto_string_vec): Likewise.
13998 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
14000 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
14001 prevent_decl_creation_for_types fields up and add reset_location field.
14002 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
14003 statement if id->reset_location is true.
14004 (copy_edges_for_bb): Do not set goto_locus on the new edges if
14005 id->reset_location is true.
14006 (copy_phis_for_bb): Force input_location on the arguments if
14007 id->reset_location is true.
14008 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
14009 is set on the function to be inlined.
14011 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
14013 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
14015 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
14017 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
14018 registers for Pmode.
14019 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
14020 hard registers for the clobbered pseudo.
14022 2018-06-27 Paul Koning <ni1d@arrl.net>
14024 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14025 mutually exclusive options.
14026 * config/pdp11/constraints.md (h): New constraint.
14027 (O): Update definition to match shift code generation.
14028 (D): New constraint.
14029 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
14031 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
14033 (output_jump): Change arguments.
14034 (pdp11_fixed_cc_regs): New function.
14035 (pdp11_cc_mode): Ditto.
14036 (pdp11_expand_shift): Ditto.
14037 (pdp11_assemble_shift): Ditto.
14038 (pdp11_small_shift): Ditto.
14039 (pdp11_branch_cost): Remove.
14040 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
14042 (pdp11_register_move_cost): Update for CC registers.
14043 (pdp11_rtx_costs): Add case for LSHIFTRT.
14044 (pdp11_output_jump): Add CCNZ mode conditional branches.
14045 (notice_update_cc_on_set): Remove.
14046 (pdp11_cc_mode): New function.
14047 (simple_memory_operand): Correct pre/post decrement case.
14048 (no_side_effect_operand): New function.
14049 (pdp11_regno_reg_class): Add CC_REGS class.
14050 (pdp11_fixed_cc_regs): New function.
14051 (pdp11_small_shift): New function.
14052 (pdp11_expand_shift): New function to expand shift insns.
14053 (pdp11_assemble_shift): New function to output shifts.
14054 (pdp11_branch_cost): Remove.
14055 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
14056 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
14057 (WCHAR_TYPE): Ditto.
14058 (PTRDIFF_TYPE): Ditto.
14059 (ADJUST_INSN_LENGTH): New macro.
14060 (FIXED_REGISTERS): Add CC registers.
14061 (CALL_USED_REGISTERS): Ditto.
14062 (reg_class): Ditto.
14063 (REG_CLASS_NAMES): Ditto.
14064 (REG_CLASS_CONTENTS): Ditto.
14065 (SELECT_CC_MODE): Use new function.
14066 (TARGET_FLAGS_REGNUM): New macro.
14067 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
14068 (cc0_reg_rtx): Remove.
14069 (CC_STATUS_MDEP): Remove.
14070 (CC_STATUS_MDEFP_INIT): Remove.
14071 (CC_IN_FPU): Remove.
14072 (NOTICE_UPDATE_CC): Remove.
14073 (REGISTER_NAMES): Add CC registers.
14074 (BRANCH_COST): Change to constant 1.
14075 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
14077 * config/pdp11/pdp11.opt (mbcopy): Remove.
14078 (mbcopy-builtin): Remove.
14079 (mbranch-cheap): Remove.
14080 (mbranch-expensive): Remove.
14081 * config/pdp11/predicates.md (expand_shift_operand): Update to
14082 match shift code generation.
14083 (ccnz_operator): New predicate.
14084 * doc/invoke.texi (PDP-11 Options): Remove deleted options
14085 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
14086 Remove non-existent option -mabshi, -mno-abshi. Document mutually
14088 * doc/md.texi (PDP-11): Document new D and h constraints. Update
14089 description of O constraint.
14091 2018-06-27 Jeff Law <law@redhat.com>
14092 Austin Law <austinklaw@gmail.com>
14094 * config/v850/v850.md (addsi3_set_flags): New pattern.
14095 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
14096 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
14097 (zero_extendhisi2_v850_set_flags): Likewise.
14098 (zero_extendqisi2_v850_set_flags): Likewise.
14099 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
14100 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
14101 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
14103 * config/v850/v850-protos.h (notice_update_cc): Remove.
14104 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
14105 (v850_print_operand): Handle 'D' and "d".
14106 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
14107 Add handling of arithmetic/logical operations compared against zero.
14108 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
14109 Do not look at v850_compare_op, instead get mode from last argument.
14110 (v850_gen_compare): Remove
14111 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
14112 after reload for prologue insns.
14113 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
14115 (construct_save_jarl): Likewise.
14116 (TARGET_FLAGS_REGNUM): Define.
14117 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
14118 (NOTICE_UPDATE_CC): Remove.
14119 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
14120 than cc0. Conditionalize on reload_completed.
14121 (cmpsi_insn, setfcc_insn): Likewise.
14122 (tst1 splitter): Turn into define_and_split which sets the flags
14124 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
14125 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
14126 (cstoresf4, cstoredf4): Clobber the flags.
14127 (cmpsi, cmpsf, cmpdf): Remove expanders.
14128 (setf_insn): Remove pattern.
14129 (addsi3): Turn into define_and_split which clobbers the flags after
14130 reload and a suitable pattern (addsi3_clobber_flags) for use after
14132 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
14133 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
14134 (ashrsi3, ashrsi3_v850e2): Likewise.
14135 (bins): Clobber the flags.
14136 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
14137 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
14138 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
14139 (call_value_internal_short, call_value_internal_long): Likewise.
14140 (callt_save_interrupt, callt_return_interrupt): Likewise.
14141 (save_interrupt, return_interrupt): Likewise.
14142 (callt_save_all_interrupt, save_all_interrupt): Likewise.
14143 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
14144 (restore_all_interrupt, _restore_all_interrupt): Likewise.
14145 (All FP comparisons): Only allow after reload has completed.
14147 (divh, divhu): Tweak output template.
14148 (branch_z_normal, branch_z_invert): Remove
14149 (branch_nz_normal, branch_nz_invert): Likewise.
14150 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
14152 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
14153 * config/v850/v850.c (notice_update_cc): Remove.
14154 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
14155 (CC_NO_CARRY): Likewise.
14156 (NOTICE_UPDATE_CC): Define to nothing.
14157 * config/v850/v850.md: Remove block comment on cc0 handling
14158 Remove "cc" attribute from all patterns. Remove cc_status handling
14159 from all patterns. Minor formatting fixes.
14161 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14163 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
14164 (cortex-a76.cortex-a55): Likewise.
14165 * config/aarch64/aarch64-tune.md: Regenerate.
14166 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
14167 cortex-a76.cortex-a55.
14169 2018-06-27 Jeff Law <law@redhat.com>
14171 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
14172 (MULTILIB_DIRNAMES): Similarly.
14174 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
14176 * gimple.h (gimple_return_retbnd): Delete.
14177 (gimple_return_set_retbnd): Likewise.
14178 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
14179 gimple_return_set_retbnd.
14180 * gimple-pretty-print.c (dump_gimple_return): Remove call to
14181 gimple_return_retbnd and adjust.
14182 * tree-inline.h (struct copy_body_data): Remove retbnd field.
14183 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
14184 Explicitly return NULL in a couple more cases. Move assertion
14185 on debug statements and remove unreachable code.
14186 (reset_debug_binding): Do not test id->retbnd.
14187 (expand_call_inline): Do not set it.
14189 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
14191 * configure.ac: Add --disable-gcov option.
14192 * configure: Regenerate.
14193 * Makefile.in: Honour @enable_gcov@.
14194 * doc/install.texi: Document --disable-gcov.
14196 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14198 * config/arm/arm-cpus.in (cortex-a76): New entry.
14199 (cortex-a76.cortex-a55): Likewise.
14200 * config/arm/arm-tables.opt: Regenerate.
14201 * config/arm/arm-tune.md: Likewise.
14202 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
14203 * doc/invoke.texi (ARM Options): Document cortex-a76 and
14204 cortex-a76.cortex-a55.
14206 2018-06-27 Tamar Christina <tamar.christina@arm.com>
14209 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
14211 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
14213 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
14215 (EPILOGUE_USES): Likewise.
14217 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
14219 * tree-inline.c (remap_location): New function extracted from...
14220 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
14221 (copy_phis_for_bb): ...here. Call remap_location.
14222 (copy_cfg_body): Adjust call to copy_edges_for_bb.
14224 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
14226 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
14227 unaligned vsx for 16B memset.
14229 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
14232 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
14233 ieee128_float_type_node to long_double_type_node unless
14234 TARGET_LONG_DOUBLE_128 is set.
14236 2018-06-26 David Malcolm <dmalcolm@redhat.com>
14238 * cfgloop.c (get_loop_location): Convert return type from
14239 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
14240 by implicit construction from rtx_insn *, and using
14241 dump_user_location_t::from_function_decl for the fallback case.
14242 * cfgloop.h (get_loop_location): Convert return type from
14243 location_t to dump_user_location_t.
14244 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
14245 dump_printf_loc to pass in a dump_location_t rather than a
14246 location_t, via the gimple stmt.
14247 * coverage.c (get_coverage_counts): Update calls to
14248 dump_printf_loc to pass in dump_location_t rather than a
14250 * doc/optinfo.texi (Dump types): Convert example of
14251 dump_printf_loc from taking "locus" to taking "insn". Update
14252 description of the "_loc" calls to cover dump_location_t.
14253 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
14255 (dump_user_location_t::dump_user_location_t): New constructors,
14256 from gimple *stmt and rtx_insn *.
14257 (dump_user_location_t::from_function_decl): New function.
14258 (dump_loc): Make static.
14259 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
14260 const dump_location_t &.
14261 (dump_generic_expr_loc): Delete.
14262 (dump_printf_loc): Convert param "loc" from location_t to
14263 const dump_location_t &.
14264 (selftest::test_impl_location): New function.
14265 (selftest::dumpfile_c_tests): New function.
14266 * dumpfile.h: Include "profile-count.h".
14267 (class dump_user_location_t): New class.
14268 (struct dump_impl_location_t): New struct.
14269 (class dump_location_t): New class.
14270 (dump_printf_loc): Convert 2nd param from source_location to
14271 const dump_location_t &.
14272 (dump_generic_expr_loc): Delete.
14273 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
14274 const dump_location_t &.
14275 * gimple-fold.c (fold_gimple_assign): Update call to
14276 dump_printf_loc to pass in a dump_location_t rather than a
14277 location_t, via the gimple stmt.
14278 (gimple_fold_call): Likewise.
14279 * gimple-loop-interchange.cc
14280 (loop_cand::analyze_iloop_reduction_var): Update for change to
14281 check_reduction_path.
14282 (tree_loop_interchange::interchange): Update for change to
14283 find_loop_location.
14284 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
14285 change in return-type of find_loop_location.
14286 (graphite_regenerate_ast_isl): Likewise.
14287 * graphite-optimize-isl.c (optimize_isl): Likewise.
14288 * graphite.c (graphite_transform_loops): Likewise.
14289 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
14290 pass in a dump_location_t rather than a location_t, via the
14292 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14293 * ipa.c (walk_polymorphic_call_targets): Likewise.
14294 * loop-unroll.c (report_unroll): Convert "locus" param from
14295 location_t to dump_location_t.
14296 (decide_unrolling): Update for change to get_loop_location's
14298 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
14299 location_t to dump_user_location_t.
14300 (grid_find_single_omp_among_assignments_1): Updates calls to
14301 dump_printf_loc to pass in a dump_location_t rather than a
14302 location_t, via the gimple stmt.
14303 (grid_parallel_clauses_gridifiable): Convert "tloc" from
14304 location_t to dump_location_t. Updates calls to dump_printf_loc
14305 to pass in a dump_location_t rather than a location_t, via the
14307 (grid_inner_loop_gridifiable_p): Likewise.
14308 (grid_dist_follows_simple_pattern): Likewise.
14309 (grid_gfor_follows_tiling_pattern): Likewise.
14310 (grid_target_follows_gridifiable_pattern): Likewise.
14311 (grid_attempt_target_gridification): Convert initialization
14312 of local "grid" from memset to zero-initialization; FIXME: does
14313 this require C++11? Update call to dump_printf_loc to pass in a
14314 optinfo_location rather than a location_t, via the gimple stmt.
14315 * profile.c (read_profile_edge_counts): Updates call to
14316 dump_printf_loc to pass in a dump_location_t rather than a
14318 (compute_branch_probabilities): Likewise.
14319 * selftest-run-tests.c (selftest::run_tests): Call
14321 * selftest.h (dumpfile_c_tests): New decl.
14322 * tree-loop-distribution.c (pass_loop_distribution::execute):
14323 Update for change in return type of find_loop_location.
14324 * tree-parloops.c (parallelize_loops): Likewise.
14325 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
14326 "locus" from location_t to dump_user_location_t.
14327 (canonicalize_loop_induction_variables): Likewise.
14328 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
14329 for change in return type of find_loop_location.
14330 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
14331 to dump_printf_loc to pass in a dump_location_t rather than a
14332 location_t, via the stmt.
14333 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
14335 * tree-vect-loop-manip.c (find_loop_location): Convert return
14336 type from source_location to dump_user_location_t.
14337 (vect_do_peeling): Update for above change.
14338 (vect_loop_versioning): Update for change in type of
14340 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
14341 from location_t to dump_user_location_t.
14342 (vect_estimate_min_profitable_iters): Update for change in type
14344 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
14345 location_t to dump_location_t.
14346 (vect_slp_bb): Update for change in type of vect_location.
14347 * tree-vectorizer.c (vect_location): Convert from source_location
14348 to dump_user_location_t.
14349 (try_vectorize_loop_1): Update for change in vect_location's type.
14350 (vectorize_loops): Likewise.
14351 (increase_alignment): Likewise.
14352 * tree-vectorizer.h (vect_location): Convert from source_location
14353 to dump_user_location_t.
14354 (find_loop_location): Convert return type from source_location to
14355 dump_user_location_t.
14356 (check_reduction_path): Convert 1st param from location_t to
14357 dump_user_location_t.
14358 * value-prof.c (check_counter): Update call to dump_printf_loc to
14359 pass in a dump_user_location_t rather than a location_t; update
14360 call to error_at for change in type of "locus".
14361 (check_ic_target): Update call to dump_printf_loc to
14362 pass in a dump_user_location_t rather than a location_t, via the
14365 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
14367 * config/s390/s390.h (enum processor_flags): Do not use
14368 default tune parameter when -march was specified.
14370 2018-06-26 Jakub Jelinek <jakub@redhat.com>
14373 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
14374 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
14377 2018-06-26 Richard Biener <rguenther@suse.de>
14379 PR tree-optimization/86287
14381 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
14382 (vect_analyze_loop): Initialize n_stmts.
14384 2018-06-26 Richard Biener <rguenther@suse.de>
14386 PR middle-end/86271
14387 * fold-const.c (fold_convertible_p): Pointer extension
14390 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
14393 * dwarf2out.c (loc_list_has_views): Adjust comments.
14394 (dw_loc_list): Split single cross-partition range with
14397 2018-06-25 Jeff Law <law@redhat.com>
14399 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
14400 on -mbig-switch by default.
14402 * config/v850/predicates.md (const_float_1_operand): Fix match_code
14404 (const_float_0_operand): Remove unused predicate.
14405 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
14406 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
14407 (recipsf2): New expander. Original pattern now called
14409 (recipdf2, recipdf2_insn): Similarly.
14410 (rsqrtsf2, rsqrtsf2_insn): Similarly
14411 (rsqrtdf2, rsqrtdf2_insn): Similarly
14413 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
14415 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
14416 Simplify logic for FreeBSD (twice).
14418 2018-06-25 Martin Sebor <msebor@redhat.com>
14420 PR tree-optimization/86204
14421 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
14422 a strnlen result if it's less than the length of the string.
14424 2018-06-25 Martin Sebor <msebor@redhat.com>
14426 PR tree-optimization/85700
14427 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
14428 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
14429 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
14431 2018-06-25 Martin Sebor <msebor@redhat.com>
14433 * doc/extend.texi (Zero-length arrays): Update and clarify.
14435 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
14437 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
14438 added IEEE/IBM long double multilib support on PowerPC little
14439 endian Linux systems.
14440 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
14441 (MULTILIB_DEFAULTS): Likewise.
14442 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14444 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
14445 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
14446 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
14448 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
14450 PR middle-end/86311
14451 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
14452 (REORDER_45): Likewise.
14454 2018-06-25 Jeff Law <law@redhat.com>
14456 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
14457 dividend to 32 bits. Adjust length.
14458 (udivmodhi4): Cleanup output template. Fix length.
14460 2018-06-25 Carl Love <cel@us.ibm.com>
14462 * config/rs6000/vsx.md: Change word selector to prefered location.
14464 2018-06-25 Richard Biener <rguenther@suse.de>
14466 PR tree-optimization/86304
14467 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
14468 epilogue-if-converted loops as well.
14470 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
14472 * lto-section-out.c (lto_begin_section): Do not print section
14473 name for noaddr and unnumbered dumps.
14475 2018-06-25 Richard Biener <rguenther@suse.de>
14477 * tree-vectorizer.h (struct vec_info_shared): New structure
14478 with parts split out from struct vec_info and loop_nest from
14479 struct _loop_vec_info.
14480 (struct vec_info): Adjust accordingly.
14481 (struct _loop_vec_info): Likewise.
14482 (LOOP_VINFO_LOOP_NEST): Adjust.
14483 (LOOP_VINFO_DATAREFS): Likewise.
14484 (LOOP_VINFO_DDRS): Likewise.
14485 (struct _bb_vec_info): Likewise.
14486 (BB_VINFO_DATAREFS): Likewise.
14487 (BB_VINFO_DDRS): Likewise.
14488 (struct _stmt_vec_info): Add dr_aux member.
14489 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
14490 (DR_MISALIGNMENT_UNINITIALIZED): New.
14491 (set_dr_misalignment): Adjust.
14492 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
14493 (vect_analyze_loop): Adjust prototype.
14494 (vect_analyze_loop_form): Likewise.
14495 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14496 Compute dependences lazily.
14497 (vect_record_base_alignments): Use shared datarefs/ddrs.
14498 (vect_verify_datarefs_alignment): Likewise.
14499 (vect_analyze_data_refs_alignment): Likewise.
14500 (vect_analyze_data_ref_accesses): Likewise.
14501 (vect_analyze_data_refs): Likewise.
14502 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
14503 constructor parameter for shared part.
14504 (vect_analyze_loop_form): Pass in shared part and adjust.
14505 (vect_analyze_loop_2): Pass in storage for the number of
14506 stmts. Move loop nest finding to the caller. Compute
14508 (vect_analyze_loop): Pass in shared part.
14509 (vect_transform_loop): Verify shared datarefs are unchanged.
14510 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
14511 constructor parameter for shared part.
14512 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
14513 (vect_slp_bb): Verify shared datarefs are unchanged before
14515 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
14517 (new_stmt_vec_info): Initialize DR_AUX misalignment to
14518 DR_MISALIGNMENT_UNINITIALIZED.
14519 * tree-vectorizer.c (vec_info::vec_info): Add constructor
14520 parameter for shared part.
14521 (vec_info::~vec_info): Adjust.
14522 (vec_info_shared::vec_info_shared): New.
14523 (vec_info_shared::~vec_info_shared): Likewise.
14524 (vec_info_shared::save_datarefs): Likewise.
14525 (vec_info_shared::check_datarefs): Likewise.
14526 (try_vectorize_loop_1): Construct shared part live for analyses
14527 of a single loop for multiple vector sizes.
14528 * tree-parloops.c (gather_scalar_reductions): Adjust.
14530 2018-06-25 Richard Biener <rguenther@suse.de>
14532 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
14533 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
14534 (vect_analyze_data_refs): Remove similar code from here and
14535 simplify accordingly.
14537 2018-06-25 Richard Biener <rguenther@suse.de>
14539 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
14540 for reverse storage order accesses rather than asserting
14541 they cannot happen here.
14543 2018-06-25 Tom de Vries <tdevries@suse.de>
14546 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
14547 Use data16 instead of .byte for insn prefix.
14549 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
14552 * parser.c (make_char_string_pack): Pass this literal chars
14553 through cpp_interpret_string.
14554 (cp_parser_userdef_numeric_literal): Check the result of
14555 make_char_string_pack.
14557 2018-06-24 Maya Rashish <coypu@sdf.org>
14559 * ginclude/stddef.h: Simplify conditions around avoiding
14560 re-definition of __size_t.
14562 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14564 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
14565 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
14567 2018-06-22 Maya Rashish <coypu@sdf.org>
14569 * doc/invoke.texi (mno-fancy-math-387): Update for changes
14570 made to OpenBSD and NetBSD through the years.
14572 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
14574 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14575 behavior of vec_pack (vector double, vector double) to match
14576 behavior of vec_float2 (vector double, vector double).
14578 2018-06-22 Olivier Hainque <hainque@adacore.com>
14580 * gimplify.c (gimplify_function_tree): Prevent creation
14581 of a trampoline for the address of the current function
14582 passed to entry/exit instrumentation hooks.
14584 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
14587 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
14590 2018-06-22 Martin Liska <mliska@suse.cz>
14592 PR tree-optimization/86263
14593 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14594 Bail out if is_enabled is false.
14595 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
14597 (jump_table_cluster::is_enabled): New function.
14599 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14601 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14602 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14603 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14604 (lto_input_ts_binfo_tree_pointers): Likewise.
14605 * tree-streamer-out.c (streamer_write_tree_bitfields,
14606 write_ts_binfo_tree_pointers): Likewise.
14607 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14609 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
14611 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14613 2018-06-22 Martin Liska <mliska@suse.cz>
14615 * symbol-summary.h (get): Make it pure and inline move
14616 functionality from ::get function.
14617 (get): Remove and inline into ::get and ::get_create.
14618 (get_create): Move code from ::get function.
14620 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14623 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14624 -x assembler-with-cpp.
14626 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14628 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14629 _FILE_OFFSET_BITS=64 for C++.
14631 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
14633 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14634 conversion insn that shows up when pr85657-3.c is compiled using
14635 IEEE 128-bit long double.
14636 (neg<mode>2_internal): Use the correct mode to check whether the
14637 mode is IBM extended.
14638 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14639 multiply and divide external functions from being created more
14642 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14644 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14646 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
14647 the edge can be forwarded.
14648 (cfg_layout_merge_blocks): Likewise.
14650 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14652 * except.c (finish_eh_generation): Commit edge insertions only after
14653 the EH edges have been redirected from post-landing to landing pads.
14655 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14657 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14658 create_tmp_var_for to create the FRAME decl.
14659 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14661 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
14663 * tree-inline.c (copy_edges_for_bb): Minor tweak.
14664 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14665 debug statement when resetting its value.
14666 (expand_call_inline): Copy the locus of the call onto the assignment
14667 of the return value, if any. Use local variable in more cases.
14669 2018-06-21 Martin Liska <mliska@suse.cz>
14671 * ipa-pure-const.c (propagate_nothrow): Use
14672 funct_state_summaries->get.
14673 (dump_malloc_lattice): Likewise.
14674 (propagate_malloc): Likewise.
14676 2018-06-21 Richard Biener <rguenther@suse.de>
14678 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14679 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14680 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14682 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14683 BLOCK_ABSTRACT_ORIGIN unconditionally.
14685 2018-06-21 David Malcolm <dmalcolm@redhat.com>
14687 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14689 * ipa-reference.c (ipa_reference_c_finalize): Delete
14690 ipa_ref_opt_sum_summaries and set it to NULL.
14692 2018-06-21 Tom de Vries <tdevries@suse.de>
14694 PR tree-optimization/85859
14695 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14696 test with comment from bb_no_side_effects_p.
14698 2018-06-21 Richard Biener <rguenther@suse.de>
14700 PR tree-optimization/86232
14701 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14702 max for constant niter.
14704 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14706 * config/aarch64/aarch64-simd.md
14707 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14709 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
14711 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14712 Make opernads of the unspec commutative.
14714 2018-06-21 Richard Biener <rguenther@suse.de>
14716 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14717 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14718 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14719 (vect_analyze_data_ref_dependence): Re-order checks to deal with
14721 (vect_record_base_alignments): Do not record base alignment
14722 for gathers or scatters.
14723 (vect_compute_data_ref_alignment): Drop return value that is always
14724 true. Bail out early for gathers or scatters.
14725 (vect_enhance_data_refs_alignment): Bail out early for gathers
14727 (vect_find_same_alignment_drs): Likewise.
14728 (vect_analyze_data_refs_alignment): Remove dead code.
14729 (vect_slp_analyze_and_verify_node_alignment): Likewise.
14730 (vect_analyze_data_refs): For possible gathers or scatters do
14731 not create an alternate DR, just check their possible validity
14732 and mark them. Adjust DECL_NONALIASED handling to not rely
14733 on DR_BASE_ADDRESS.
14734 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14735 update inits of gathers or scatters.
14736 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14737 Also copy gather/scatter flag to pattern vinfo.
14739 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
14741 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14742 behavior of vec_packsu (vector unsigned long long, vector unsigned
14743 long long) to match behavior of vec_packs with same signature.
14745 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
14746 Thomas Schwinge <thomas@codesourcery.com>
14747 Cesar Philippidis <cesar@codesourcery.com>
14749 * gimplify.c (gimplify_scan_omp_clauses): Add support for
14750 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14751 (gimplify_adjust_omp_clauses): Likewise.
14752 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14753 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14754 (gimplify_omp_target_update): Update handling of acc update and
14756 * omp-low.c (install_var_field): Remove unused parameter
14757 base_pointers_restrict.
14758 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14759 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14761 (omp_target_base_pointers_restrict_p): Delete.
14762 (scan_omp_target): Update call to scan_sharing_clauses.
14763 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14765 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14766 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14767 (convert_local_omp_clauses): Likewise.
14768 * tree-pretty-print.c (dump_omp_clause): Likewise.
14769 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
14771 (omp_clause_code_name): Likewise.
14773 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14776 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14779 PR tree-optimization/86231
14780 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
14781 anti-range don't overwrite *vr0min before using it to compute *vr0max.
14783 2018-06-20 Tom de Vries <tdevries@suse.de>
14785 PR tree-optimization/86097
14786 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14787 iv type if signedness of iv type is not the same as that of *nit.
14789 2018-06-20 Jakub Jelinek <jakub@redhat.com>
14791 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
14792 EDGE_EH edges, verify they are all EDGE_EH.
14794 2018-06-20 Maya Rashish <coypu@sdf.org>
14796 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14798 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14800 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14801 * config/aarch64/aarch64.c (xgene1_tunings): Add
14802 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14803 (aarch64_mode_valid_for_sched_fusion_p):
14804 Allow 16-byte modes.
14805 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14806 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14808 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14810 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14811 * config/aarch64/iterators.md (VQ2): New mode iterator.
14813 2018-06-20 Martin Liska <mliska@suse.cz>
14815 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14816 Change default ratio from 10 to 8.
14818 2018-06-20 Martin Liska <mliska@suse.cz>
14820 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14822 (bit_test_cluster::find_bit_tests): Likewise.
14823 (switch_decision_tree::analyze_switch_statement): Find clusters.
14824 * tree-switch-conversion.h (struct jump_table_cluster): Document
14827 2018-06-20 Martin Liska <mliska@suse.cz>
14829 * tree-switch-conversion.c (switch_conversion::collect):
14830 Record m_uniq property.
14831 (switch_conversion::expand): Bail out for special conditions.
14832 (group_cluster::~group_cluster): New.
14833 (group_cluster::group_cluster): Likewise.
14834 (group_cluster::dump): Likewise.
14835 (jump_table_cluster::emit): New.
14836 (switch_decision_tree::fix_phi_operands_for_edges): New.
14837 (struct case_node): Remove struct.
14838 (jump_table_cluster::can_be_handled): New.
14839 (case_values_threshold): Moved to header.
14840 (reset_out_edges_aux): Likewise.
14841 (jump_table_cluster::is_beneficial): New.
14842 (bit_test_cluster::can_be_handled): Likewise.
14843 (add_case_node): Remove.
14844 (bit_test_cluster::is_beneficial): New.
14845 (case_bit_test::cmp): New.
14846 (bit_test_cluster::emit): New.
14847 (expand_switch_as_decision_tree_p): Remove.
14848 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14849 (fix_phi_operands_for_edge): Likewise.
14850 (switch_decision_tree::analyze_switch_statement): New.
14851 (compute_cases_per_edge): Move ...
14852 (switch_decision_tree::compute_cases_per_edge): ... here.
14853 (try_switch_expansion): Likewise.
14854 (switch_decision_tree::try_switch_expansion): Likewise.
14855 (record_phi_operand_mapping): Likewise.
14856 (switch_decision_tree::record_phi_operand_mapping): Likewise.
14857 (emit_case_decision_tree): Likewise.
14858 (switch_decision_tree::emit): Likewise.
14859 (balance_case_nodes): Likewise.
14860 (switch_decision_tree::balance_case_nodes): Likewise.
14861 (dump_case_nodes): Likewise.
14862 (switch_decision_tree::dump_case_nodes): Likewise.
14863 (emit_jump): Likewise.
14864 (switch_decision_tree::emit_jump): Likewise.
14865 (emit_cmp_and_jump_insns): Likewise.
14866 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14867 (emit_case_nodes): Likewise.
14868 (switch_decision_tree::emit_case_nodes): Likewise.
14869 (conditional_probability): Remove.
14870 * tree-switch-conversion.h (enum cluster_type): New.
14872 (struct cluster): Likewise.
14873 (cluster::cluster): Likewise.
14874 (struct simple_cluster): Likewise.
14875 (simple_cluster::simple_cluster): Likewise.
14876 (struct group_cluster): Likewise.
14877 (struct jump_table_cluster): Likewise.
14878 (struct bit_test_cluster): Likewise.
14879 (struct min_cluster_item): Likewise.
14880 (struct case_tree_node): Likewise.
14881 (case_tree_node::case_tree_node): Likewise.
14882 (jump_table_cluster::case_values_threshold): Likewise.
14883 (struct case_bit_test): Likewise.
14884 (struct switch_decision_tree): Likewise.
14885 (struct switch_conversion): Likewise.
14886 (switch_decision_tree::reset_out_edges_aux): Likewise.
14888 2018-06-20 Martin Liska <mliska@suse.cz>
14890 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14891 (hoist_edge_and_branch_if_true): Likewise.
14892 (expand_switch_using_bit_tests_p): Likewise.
14893 (struct case_bit_test): Likewise.
14894 (case_bit_test_cmp): Likewise.
14895 (emit_case_bit_tests): Likewise.
14896 (switch_conversion::switch_conversion): New class.
14897 (struct switch_conv_info): Remove old struct.
14898 (collect_switch_conv_info): More to ...
14899 (switch_conversion::collect): ... this.
14900 (check_range): Likewise.
14901 (switch_conversion::check_range): Likewise.
14902 (check_all_empty_except_final): Likewise.
14903 (switch_conversion::check_all_empty_except_final): Likewise.
14904 (check_final_bb): Likewise.
14905 (switch_conversion::check_final_bb): Likewise.
14906 (create_temp_arrays): Likewise.
14907 (switch_conversion::create_temp_arrays): Likewise.
14908 (free_temp_arrays): Likewise.
14909 (gather_default_values): Likewise.
14910 (switch_conversion::gather_default_values): Likewise.
14911 (build_constructors): Likewise.
14912 (switch_conversion::build_constructors): Likewise.
14913 (constructor_contains_same_values_p): Likewise.
14914 (switch_conversion::contains_same_values_p): Likewise.
14915 (array_value_type): Likewise.
14916 (switch_conversion::array_value_type): Likewise.
14917 (build_one_array): Likewise.
14918 (switch_conversion::build_one_array): Likewise.
14919 (build_arrays): Likewise.
14920 (switch_conversion::build_arrays): Likewise.
14921 (gen_def_assigns): Likewise.
14922 (switch_conversion::gen_def_assigns): Likewise.
14923 (prune_bbs): Likewise.
14924 (switch_conversion::prune_bbs): Likewise.
14925 (fix_phi_nodes): Likewise.
14926 (switch_conversion::fix_phi_nodes): Likewise.
14927 (gen_inbound_check): Likewise.
14928 (switch_conversion::gen_inbound_check): Likewise.
14929 (process_switch): Use the newly created class.
14930 (switch_conversion::expand): New.
14931 (switch_conversion::~switch_conversion): New.
14932 * tree-switch-conversion.h: New file.
14934 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14936 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14937 tree-vect-patterns.c.
14938 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14939 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
14940 (vect_recog_sad_pattern): Likewise.
14941 (vect_recog_widen_sum_pattern): Likewise.
14942 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
14943 (vect_recog_widen_shift_pattern): Remove the type_in argument.
14944 (vect_recog_rotate_pattern): Likewise.
14945 (vect_recog_mult_pattern): Likewise.
14946 (vect_recog_vector_vector_shift_pattern): Likewise.
14947 (vect_recog_divmod_pattern): Likewise.
14948 (vect_recog_mixed_size_cond_pattern): Likewise.
14949 (vect_recog_bool_pattern): Likewise.
14950 (vect_recog_mask_conversion_pattern): Likewise.
14951 (vect_try_gather_scatter_pattern): Likewise.
14952 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
14953 (vect_recog_over_widening_pattern): Likewise.
14954 (vect_recog_gather_scatter_pattern): Likewise.
14955 (vect_recog_func_ptr): Move from tree-vectorizer.h
14956 (vect_vect_recog_func_ptrs): Move further down the file.
14957 (vect_recog_func): Likewise. Remove the third argument.
14958 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14959 (vect_pattern_recog_1): Expect the pattern function to do any
14960 necessary target tests. Also expect it to provide a vector type.
14961 Remove the type_in handling.
14963 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14965 * tree-vect-patterns.c (vect_pattern_detected): New function.
14966 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14967 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14968 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14969 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14970 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14971 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14972 (vect_recog_mask_conversion_pattern)
14973 (vect_try_gather_scatter_pattern): Likewise.
14975 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14977 * tree-vect-patterns.c (vect_get_internal_def): New function.
14978 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14979 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14980 (search_type_for_mask_1): Use it.
14982 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14984 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14985 redundant WIDEN_SUM_EXPR handling.
14986 (vect_recog_sad_pattern): Likewise.
14988 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14990 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14991 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14992 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14993 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14994 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14996 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
14998 * tree-vect-stmts.c (vectorizable_call): Make sure that we
14999 use the stmt_vec_info of the original bb statement for the
15000 new zero assignment, even if the call is part of a pattern.
15002 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15004 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
15005 that the sequence is attached to the original statement rather
15006 than the pattern statement.
15007 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
15008 PATTERN_DEF_SEQ from the original statement rather than
15009 the main pattern statement.
15010 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
15011 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
15012 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
15014 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
15016 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
15017 definition statements before the early exit for statements that aren't
15019 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
15021 (vect_transform_loop): ...here. Process pattern definition
15022 statements without first checking whether the main pattern
15023 statement is live or relevant.
15025 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15027 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
15028 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
15030 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
15032 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
15033 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
15034 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
15035 (expand_block_compare): Change select_block_compare_mode call.
15036 (expand_strncmp_align_check): Use new functions, fix comment.
15037 (emit_final_str_compare_gpr): New function.
15038 (expand_strn_compare): Refactor and clean up code.
15039 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
15041 2018-06-19 Tony Reix <tony.reix@atos.com>
15042 Damien Bergamini <damien.bergamini@atos.com>
15043 David Edelsohn <dje.gcc@gmail.com>
15045 * collect2.c (static_obj): New variable.
15046 (static_libs): New variable.
15047 (is_in_list): Uncomment declaration.
15048 (main): Track AIX libraries linked statically.
15049 (is_in_list): Uncomment definition.
15050 (scan_prog_file): Don't add AIX shared libraries initializer
15051 to constructor list if linking statically.
15053 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
15055 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
15057 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
15059 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
15061 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
15064 2018-06-19 Martin Liska <mliska@suse.cz>
15066 * config/i386/i386.c (ix86_can_inline_p): Do not use
15067 ipa_fn_summaries::get_create.
15068 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
15070 (devirtualization_time_bonus): Likewise.
15071 (ipcp_propagate_stage): Likewise.
15072 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15073 (edge_set_predicate): Likewise.
15074 (evaluate_conditions_for_known_args): Likewise.
15075 (evaluate_properties_for_edge): Likewise.
15076 (ipa_call_summary::reset): Tranform to ...
15077 (ipa_call_summary::~ipa_call_summary): ... this.
15078 (ipa_fn_summary::reset): Transform to ...
15079 (ipa_fn_summary::~ipa_fn_summary): ... this.
15080 (ipa_fn_summary_t::remove): Rename to ...
15081 (ipa_fn_summary_t::remove_callees): ... this.
15082 (ipa_fn_summary_t::duplicate): Use placement new
15083 instead of memory copy.
15084 (ipa_call_summary_t::duplicate): Likewise.
15085 (ipa_call_summary_t::remove): Remove.
15086 (dump_ipa_call_summary): Change get_create to get.
15087 (ipa_dump_fn_summary): Dump only when summary exists.
15088 (analyze_function_body): Use symbol_summary::get instead
15090 (compute_fn_summary): Likewise.
15091 (estimate_edge_devirt_benefit): Likewise.
15092 (estimate_edge_size_and_time): Likewise.
15093 (inline_update_callee_summaries): Likewise.
15094 (remap_edge_change_prob): Likewise.
15095 (remap_edge_summaries): Likewise.
15096 (ipa_merge_fn_summary_after_inlining): Likewise.
15097 (write_ipa_call_summary): Likewise.
15098 (ipa_fn_summary_write): Likewise.
15099 (ipa_free_fn_summary): Likewise.
15100 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
15101 (struct ipa_call_summary): Likewise.
15102 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
15104 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
15105 (estimate_size_after_inlining): Likewise.
15106 (estimate_growth): Likewise.
15107 (growth_likely_positive): Likewise.
15108 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15109 (inline_call): Likewise.
15110 * ipa-inline.c (caller_growth_limits): Likewise.
15111 (can_inline_edge_p): Likewise.
15112 (can_inline_edge_by_limits_p): Likewise.
15113 (compute_uninlined_call_time): Likewise.
15114 (compute_inlined_call_time): Likewise.
15115 (want_inline_small_function_p): Likewise.
15116 (edge_badness): Likewise.
15117 (update_caller_keys): Likewise.
15118 (update_callee_keys): Likewise.
15119 (inline_small_functions): Likewise.
15120 (inline_to_all_callers_1): Likewise.
15121 (dump_overall_stats): Likewise.
15122 (early_inline_small_functions): Likewise.
15123 (early_inliner): Likewise.
15124 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15125 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15126 * ipa-pure-const.c (malloc_candidate_p): Likewise.
15127 * ipa-split.c (execute_split_functions): Likewise.
15128 * symbol-summary.h: Likewise.
15129 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15131 2018-06-19 Richard Biener <rguenther@suse.de>
15133 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
15134 (vectorize_loops): ... here. Fix dbgcnt handling.
15135 (try_vectorize_loop): Wrap try_vectorize_loop_1.
15137 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
15140 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
15141 ieee128 argument takes up only one (vector) register, not two (floating
15144 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
15146 * gimplify.c (gimplify_init_constructor): Really never clear for an
15147 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
15149 2018-06-19 Richard Biener <rguenther@suse.de>
15151 PR tree-optimization/86179
15152 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
15153 after failed recognition.
15155 2018-06-18 Martin Sebor <msebor@redhat.com>
15157 PR middle-end/85602
15158 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
15159 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
15160 Handle integer subtraction.
15161 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
15162 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
15164 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15166 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
15167 param from rtx to rtx_insn *.
15168 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
15170 (frv_ifcvt_modify_insn): Likwise.
15171 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
15172 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
15173 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
15174 as_a <rtx_insn *> cast to local "unprotected_region" once
15175 it's been established that it's not NULL or pc_rtx.
15176 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
15177 param "sethi" from rtx to rtx_insn *.
15178 (nds32_group_float_insns): Likewise for param "insn".
15179 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
15181 (vax_output_int_subtract): Likewise.
15182 * config/vax/vax.c (vax_output_int_add): Likewise for param
15184 (vax_output_int_subtract): Likewise.
15185 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
15186 (emit_pattern_after): Likewise for param "after".
15187 (emit_insn_after): Likewise.
15188 (emit_jump_insn_after): Likewise.
15189 (emit_call_insn_after): Likewise.
15190 (emit_debug_insn_after): Likewise.
15191 (emit_pattern_before): Likewise for param "before".
15192 (emit_insn_before): Likewise.
15193 (emit_jump_insn_before): Likewise.
15194 * final.c (get_insn_template): Likewise for param "insn", removing
15196 * output.h (get_insn_template): Likewise for 2nd param.
15197 * rtl.h (emit_insn_before): Likewise.
15198 (emit_jump_insn_before): Likewise.
15199 (emit_debug_insn_before_noloc): Likewise.
15200 (emit_insn_after): Likewise.
15201 (emit_jump_insn_after): Likewise.
15202 (emit_call_insn_after): Likewise.
15203 (emit_debug_insn_after): Likewise.
15204 (set_insn_deleted): Likewise for param.
15206 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
15209 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
15210 floating point modes, so that IFmode is numerically greater than
15211 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
15212 to declare the ordering. This prevents IFmode from being
15213 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
15214 machine. Include rs6000-modes.h to share the fractional values
15215 between genmodes* and the rest of the compiler.
15216 (IFmode): Likewise.
15217 (KFmode): Likewise.
15218 (TFmode): Likewise.
15219 * config/rs6000/rs6000-modes.h: New file.
15220 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
15221 meaning of rs6000_long_double_size so that 126..128 selects an
15222 appropriate 128-bit floating point type.
15223 (rs6000_option_override_internal): Likewise.
15224 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
15225 (TARGET_LONG_DOUBLE_128): Change the meaning of
15226 rs6000_long_double_size so that 126..128 selects an appropriate
15227 128-bit floating point type.
15228 (LONG_DOUBLE_TYPE_SIZE): Update comment.
15229 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
15230 source and destination to match the standard usage.
15231 (truncifkf2): Likewise.
15232 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
15233 ISA 2.07 to use an explicit clobber, instead of passing in a
15235 (copysign<mode>3_soft): Likewise.
15237 2018-06-18 David Malcolm <dmalcolm@redhat.com>
15239 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15240 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
15241 (vect_slp_analyze_instance_dependence): Likewise.
15242 (vect_enhance_data_refs_alignment): Likewise.
15243 (vect_analyze_data_refs_alignment): Likewise.
15244 (vect_slp_analyze_and_verify_instance_alignment
15245 (vect_analyze_data_ref_accesses): Likewise.
15246 (vect_prune_runtime_alias_test_list): Likewise.
15247 (vect_analyze_data_refs): Likewise.
15248 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
15249 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
15250 (vect_analyze_scalar_cycles_1): Likewise.
15251 (vect_get_loop_niters): Likewise.
15252 (vect_analyze_loop_form_1): Likewise.
15253 (vect_update_vf_for_slp): Likewise.
15254 (vect_analyze_loop_operations): Likewise.
15255 (vect_analyze_loop): Likewise.
15256 (vectorizable_induction): Likewise.
15257 (vect_transform_loop): Likewise.
15258 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
15259 * tree-vect-slp.c (vect_analyze_slp): Likewise.
15260 (vect_make_slp_decision): Likewise.
15261 (vect_detect_hybrid_slp): Likewise.
15262 (vect_slp_analyze_operations): Likewise.
15263 (vect_slp_bb): Likewise.
15264 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
15265 (vectorizable_bswap): Likewise.
15266 (vectorizable_call): Likewise.
15267 (vectorizable_simd_clone_call): Likewise.
15268 (vectorizable_conversion): Likewise.
15269 (vectorizable_assignment): Likewise.
15270 (vectorizable_shift): Likewise.
15271 (vectorizable_operation): Likewise.
15272 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
15274 2018-06-18 Martin Sebor <msebor@redhat.com>
15276 PR tree-optimization/81384
15277 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
15278 * builtins.c (expand_builtin_strnlen): New function.
15279 (expand_builtin): Call it.
15280 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
15281 * builtins.def (BUILT_IN_STRNLEN): New.
15282 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
15283 Warn for bounds in excess of maximum object size.
15284 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
15285 single-value ranges. Handle strnlen.
15286 (handle_builtin_strlen): Handle strnlen.
15287 (strlen_check_and_optimize_stmt): Same.
15288 * doc/extend.texi (Other Builtins): Document strnlen.
15290 2018-06-18 Maya Rashish <coypu@sdf.org>
15292 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
15293 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
15294 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
15296 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
15298 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
15300 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
15302 * tree.c (escaped_string::escape): Replace cast to char * by
15303 const_cast<char *> (unescaped).
15305 2018-06-18 Nick Clifton <nickc@redhat.com>
15308 * tree.c (escaped_string): New class. Converts an unescaped
15309 string into its escaped equivalent.
15310 (warn_deprecated_use): Use the new class to convert the
15311 deprecation message, if present.
15312 (test_escaped_strings): New self test.
15313 (test_c_tests): Add test_escaped_strings.
15314 * doc/extend.texi (deprecated): Add a note that the
15315 deprecation message is affected by the -fmessage-length
15316 option, and that control characters will be escaped.
15317 (#pragma GCC error): Document this pragma.
15318 (#pragma GCC warning): Likewise.
15319 * doc/invoke.texi (-fmessage-length): Document this option's
15320 effect on the #warning and #error preprocessor directives and
15321 the deprecated attribute.
15323 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
15325 * tree.c (decl_value_expr_lookup): Revert latest change.
15326 (decl_value_expr_insert): Likewise.
15328 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
15330 * gimplify.c (nonlocal_vlas): Delete.
15331 (nonlocal_vla_vars): Likewise.
15332 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
15334 (gimplify_body): Do not create and destroy nonlocal_vlas.
15335 * tree-nested.c: Include diagnostic.h.
15336 (use_pointer_in_frame): Tweak.
15337 (lookup_field_for_decl): Add assertion and declare the transformation.
15338 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
15339 internal error when the reference is in a wrong context. Do not
15340 create a debug decl by default.
15341 (note_nonlocal_block_vlas): Delete.
15342 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
15343 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
15344 create a debug decl by default.
15345 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
15346 call is in a wrong context.
15347 (fixup_vla_decls): New function.
15348 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
15349 debug variables were created.
15350 * tree.c (decl_value_expr_lookup): Add checking assertion.
15351 (decl_value_expr_insert): Likewise.
15353 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15355 PR middle-end/82479
15356 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
15357 * tree-scalar-evolution.c (interpret_expr): Likewise.
15358 (expression_expensive_p): Likewise.
15359 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
15360 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
15361 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
15362 (ssa_defined_by_minus_one_stmt_p): New.
15364 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
15366 PR middle-end/64946
15367 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
15368 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
15369 * dojump.c (do_jump): Likewise.
15370 * expr.c (expand_expr_real_2): Check operand type's sign.
15371 * fold-const.c (const_unop): Handle ABSU_EXPR.
15372 (fold_abs_const): Likewise.
15373 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
15374 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
15375 (strip_sign_op_1): Likesise.
15376 * match.pd: Add new pattern to generate ABSU_EXPR.
15377 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
15378 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
15379 * tree-eh.c (operation_could_trap_helper_p): Likewise.
15380 * tree-inline.c (estimate_operator_cost): Likewise.
15381 * tree-pretty-print.c (dump_generic_node): Likewise.
15382 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
15383 * tree.def (ABSU_EXPR): New.
15385 2018-06-16 Jakub Jelinek <jakub@redhat.com>
15387 PR middle-end/86095
15388 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
15389 documented as preserved for backward compatibility only.
15390 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
15392 PR rtl-optimization/86108
15393 * bb-reorder.c (create_forwarder_block): Renamed to ...
15394 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
15395 jump from new landing pad to the second part.
15396 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
15399 2018-06-15 Jakub Jelinek <jakub@redhat.com>
15401 PR middle-end/85878
15402 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
15403 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
15404 Only call store_expr for halves if the mode is the same.
15406 PR middle-end/86123
15407 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
15408 Fix up comment formatting.
15410 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
15412 * typed-splay-tree.h (typed_splay_tree::remove): New function.
15413 (typed_splay_tree::closure,
15414 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
15415 (typed_splay_tree::typed_splay_tree,
15416 typed_splay_tree::operator =): Declared private.
15417 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
15418 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
15419 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
15420 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
15421 typed_splay_tree::splay_tree_splay,
15422 typed_splay_tree::splay_tree_foreach_helper,
15423 typed_splay_tree::splay_tree_insert,
15424 typed_splay_tree::splay_tree_remove,
15425 typed_splay_tree::splay_tree_lookup,
15426 typed_splay_tree::splay_tree_predecessor,
15427 typed_splay_tree::splay_tree_successor,
15428 typed_splay_tree::splay_tree_min,
15429 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
15430 (typed_splay_tree::root, typed_splay_tree::comp,
15431 typed_splay_tree::delete_key,
15432 typed_splay_tree::delete_value): New data members.
15433 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
15434 typed_splay_tree::remove.
15436 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
15438 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
15439 -mginv and -mno-ginv to the assembler.
15440 * config/mips/mips.opt (-mcrc): New option.
15441 (-mginv): Likewise.
15442 * doc/invoke.text (-mcrc): Document.
15443 (-mginv): Likewise.
15445 2018-06-15 Nick Clifton <nickc@redhat.com>
15448 * tree.c (escaped_string): New class. Converts an unescaped
15449 string into its escaped equivalent.
15450 (warn_deprecated_use): Use the new class to convert the
15451 deprecation message, if present.
15452 (test_escaped_strings): New self test.
15453 (test_c_tests): Add test_escaped_strings.
15454 * doc/extend.texi (deprecated): Add a note that the
15455 deprecation message is affected by the -fmessage-length
15456 option, and that control characters will be escaped.
15457 (#pragma GCC error): Document this pragma.
15458 (#pragma GCC warning): Likewise.
15459 * doc/invoke.texi (-fmessage-length): Document this option's
15460 effect on the #warning and #error preprocessor directives and
15461 the deprecated attribute.
15463 2018-06-15 Richard Biener <rguenther@suse.de>
15465 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
15466 here, also noting vector size used.
15467 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
15468 size used in MSG_OPTIMIZED_LOCATIONS dump.
15469 (pass_slp_vectorize::execute): Adjust.
15471 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
15474 * config/arc/arc.c (arc_return_address_register): Fix
15477 2018-06-15 Richard Biener <rguenther@suse.de>
15479 PR middle-end/86159
15480 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
15481 leave useless conversion stripping to force_gimple_operand_gsi.
15482 (gimplify_build2): Likewise.
15483 (gimplify_build1): Likewise.
15485 2018-06-15 Richard Biener <rguenther@suse.de>
15487 PR middle-end/86076
15488 * tree-cfg.c (move_stmt_op): unshare invariant addresses
15489 before adjusting their block.
15491 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
15493 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
15494 multilibs for *-*-rtems*.
15495 * config/riscv/t-rtems: New file.
15497 2018-06-14 Jakub Jelinek <jakub@redhat.com>
15499 PR middle-end/86122
15500 * match.pd ((A +- CST1) +- CST2): Punt if last resort
15501 unsigned_type_for returns NULL.
15504 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
15505 subregs of multi-word pseudos unless the float mode has word size.
15507 2018-06-14 Richard Biener <rguenther@suse.de>
15509 PR middle-end/86139
15510 * tree-vect-generic.c (build_word_mode_vector_type): Remove
15511 duplicate and harmful type_hash_canon.
15512 * tree.c (type_hash_canon): Assert we didn't find ourselves.
15514 2018-06-14 Richard Biener <rguenther@suse.de>
15517 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
15520 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
15522 * config/rtems.h (STDINT_LONG32): Define.
15524 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
15525 Prachi Godbole <prachi.godbole@imgtec.com>
15527 * config/mips/mips-cpus.def: Define P6600.
15528 * config/mips/mips-tables.opt: Regenerate.
15529 * config/mips/mips.c (mips_ucbranch_type): New enum.
15530 (mips_rtx_cost_data): Add support for P6600.
15531 (mips_issue_rate): Likewise.
15532 (mips_multipass_dfa_lookahead): Likewise.
15533 (mips_avoid_hazard): Likewise.
15534 (mips_reorg_process_insns): Likewise.
15535 (mips_classify_branch_p6600): New function.
15536 * config/mips/mips.h (TUNE_P6600): New define.
15537 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
15538 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
15539 * config/mips/mips.md: Include p6600.md.
15540 (processor): Add p6600.
15541 * config/mips/p6600.md: New file.
15542 * doc/invoke.texi: Add p6600 to supported architectures.
15544 2018-06-13 Martin Sebor <msebor@redhat.com>
15546 PR tree-optimization/86114
15547 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
15549 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
15551 2018-06-13 Richard Biener <rguenther@suse.de>
15553 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
15554 Properly set vector type of the intermediate stmt.
15555 * tree-vect-stmts.c (vectorizable_operation): The destination
15556 var always has vectype_out type.
15558 2018-06-13 Jeff Law <law@redhat.com>
15560 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
15561 integer 0 for argument to print_rtl_with_bb.
15562 (rl78_reorg): Likewise.
15564 2018-06-13 David Malcolm <dmalcolm@redhat.com>
15566 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
15567 from rtx to rtx_insn *.
15568 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
15570 (add_sched_insns_for_speculation): Likewise for local "target",
15571 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15572 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
15573 from rtx_insn ** to rtx_code_label **.
15574 (reorg_emit_nops): Likewise.
15575 (c6x_reorg): Likewise for local "call_labels".
15576 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
15578 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
15579 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
15580 the loops over LABEL_REFS.
15581 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
15583 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
15584 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
15585 (split_branches): Strengthen local "olabel" from rtx to
15586 rtx_insn *, adding a safe_as_a cast.
15587 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
15589 (add_insn_after): Likewise for first two params.
15590 (add_insn_before): Likewise.
15591 (remove_insn): Likewise for param.
15592 (emit_pattern_before_noloc): Likewise for second and third params.
15593 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
15594 (emit_call_insn_before_noloc): Likewise.
15595 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
15597 (emit_barrier_before): Likewise.
15598 (emit_label_before): Strengthen "label" param from "rtx" to
15599 "rtx_code_label *". Strengthen "before" param from "rtx" to
15601 (emit_insn_after_1): Strengthen "after" param from "rtx" to
15603 (emit_pattern_after_noloc): Likewise.
15604 (emit_insn_after_noloc): Likewise.
15605 (emit_jump_insn_after_noloc): Likewise.
15606 (emit_call_insn_after_noloc): Likewise.
15607 (emit_debug_insn_after_noloc): Likewise.
15608 (emit_barrier_after): Likewise.
15609 (emit_label_after): Likewise for both params.
15610 (emit_pattern_after_setloc): Likewise for "after" param. Convert
15611 "loc" param from "int" to "location_t".
15612 (emit_insn_after_setloc): Likewise.
15613 (emit_jump_insn_after_setloc): Likewise.
15614 (emit_call_insn_after_setloc): Likewise.
15615 (emit_debug_insn_after_setloc): Likewise.
15616 (emit_pattern_before_setloc): Likewise for "before" param. Convert
15617 "loc" param from "int" to "location_t".
15618 (emit_pattern_before): Convert NULL_RTX to NULL.
15619 (emit_insn_before_setloc): Convert "loc" param from "int" to
15621 (emit_jump_insn_before_setloc): Likewise.
15622 (emit_call_insn_before_setloc): Likewise.
15623 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15624 rtx_insn *. Convert "loc" param from "int" to "location_t".
15625 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15626 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15627 Convert 3rd param from "int" to "location_t".
15628 (emit_barrier_before, emit_barrier_after, next_real_insn):
15629 Strengthen param from rtx to rtx_insn *.
15630 (emit_label_before): Strengthen 1st param from "rtx" to
15631 "rtx_code_label *". Strengthen 2nd param from "rtx" to
15633 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15634 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15635 Strengthen 2nd param from "rtx" to "rtx_insn *".
15636 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15637 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15638 Likewise. Convert 3rd param from "int" to "location_t".
15639 (emit_label_after): Strengthen 1st param from "rtx" to
15640 "rtx_code_label *".
15641 (next_real_insn, remove_insn): Strengthen param from "rtx" to
15643 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15644 from "rtx" to "rtx_insn *".
15646 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
15648 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15649 bodies streamed in with -Q.
15650 * dumpfile.c (dump_files): Add lto-stream-out dump file.
15651 * dumpfile.h (tree_dump_index): Add lto_stream_out.
15652 * gimple-streamer-out.c: Include gimple-pretty-print.h
15653 (output_bb): Dump stmts streamed.
15654 * lto-section-out.c: Include print-tree.h
15655 (lto_begin_section): Dump sections created.
15656 (lto_output_decl_index): Dump decl encoded.
15657 * lto-streamer-out.c: Include print-tree.h
15658 (create_output_block): Dump output block created.
15659 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15660 (output_function): Dump function output.
15661 (output_constructor): Dump constructor streamed.
15662 (write_global_stream): Output indexes encoded.
15663 (produce_asm_for_decls): Dump streams encoded.
15664 * lto-streamer.c (streamer_dump_file): New global var.
15665 * lto-streamer.h (streamer_dump_file): Declare.
15666 * passes.c (ipa_write_summaries): Initialize streamer dump.
15667 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15670 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
15673 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15674 offsets for register save directives. Emit a second batch of save
15675 directives, if need be, when the function accesses prior frames.
15677 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15679 * config/arc/fpu.md (fmasf4): Force operand to register.
15680 (fnmasf4): Likewise.
15682 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15684 * config/arc/arc-protos.h (arc_pad_return): Remove.
15685 * config/arc/arc.c (machine_function): Remove force_short_suffix
15687 (arc_print_operand): Adjust printing of '&'.
15688 (arc_verify_short): Remove conditional printing of short suffix.
15689 (arc_final_prescan_insn): Remove reference to size_reason.
15690 (pad_return): New function.
15691 (arc_reorg): Call pad_return.
15692 (arc_pad_return): Remove.
15693 (arc_init_machine_status): Remove reference to force_short_suffix.
15694 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15695 (attr length): When attribute iscompact is true force to 2
15696 regardless; in the case of maybe check if we want to force the
15697 instruction to have 4 bytes length.
15698 (nopv): Change it to generate 4 byte long nop as well.
15699 (blockage): New pattern.
15700 (simple_return): Remove call to arc_pad_return.
15701 (p_return_i): Likewise.
15703 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15705 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15707 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15709 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15712 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15714 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15715 for ARC700 and ARCv2.
15717 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
15720 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15721 operands[2] instead of operands[1].
15724 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15726 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15727 case, check whether the outer register overlaps an unallocatable
15728 register, not just whether it fits the required class.
15730 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
15732 * poly-int.h (can_div_trunc_p): Add new overload in which all values
15734 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15735 (memrefs_conflict_p): Likewise.
15736 (init_alias_analysis): Likewise.
15737 * cfgexpand.c (expand_debug_expr): Likewise.
15738 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15739 * cse.c (fold_rtx): Likewise.
15740 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15741 * expr.c (emit_block_move_hints): Likewise.
15742 (clear_storage_hints, push_block, emit_push_insn): Likewise.
15743 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15744 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15745 (emit_group_store): Likewise.
15746 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
15747 to read the PRE/POST_MODIFY increment.
15748 * calls.c (store_one_arg): Use strip_offset.
15749 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15751 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15753 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15754 (simplify_binary_operation_1): Extend CONST_INT handling to
15756 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15757 than a HOST_WIDE_INT.
15758 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15760 (adjust_mems, add_stores): Update accodingly.
15761 (vt_canonicalize_addr): Track polynomial offsets.
15762 (emit_note_insn_var_location): Likewise.
15763 (vt_add_function_parameter): Likewise.
15764 (vt_initialize): Likewise.
15766 2018-06-12 Jeff Law <law@redhat.com>
15768 * config.gcc (alpha*-*-freebsd*): Remove.
15769 * config/alpha/freebsd.h: Remove.
15771 2018-06-12 David Malcolm <dmalcolm@redhat.com>
15774 * spellcheck-tree.c (levenshtein_distance): Rename to...
15775 (get_edit_distance): ...this, and update for underlying renaming.
15776 * spellcheck-tree.h (levenshtein_distance): Rename to...
15777 (get_edit_distance): ...this.
15778 * spellcheck.c (levenshtein_distance): Rename to...
15779 (get_edit_distance): ...this. Convert from Levenshtein distance
15780 to Damerau-Levenshtein distance by supporting transpositions of
15781 adjacent characters. Rename "v1" to "v_next" and "v0" to
15783 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15784 (selftest::test_edit_distance_unit_test_oneway): ...this, and
15785 update for underlying renaming.
15786 (selftest::levenshtein_distance_unit_test): Rename to...
15787 (selftest::test_get_edit_distance_unit): ...this, and update for
15788 underlying renaming.
15789 (selftest::test_find_closest_string): Add example from PR 69968
15790 where transposition helps
15791 (selftest::test_metric_conditions): Update for renaming.
15792 (selftest::test_metric_conditions): Likewise.
15793 (selftest::spellcheck_c_tests): Likewise.
15794 * spellcheck.h (levenshtein_distance): Rename both overloads to...
15795 (get_edit_distance): ...this.
15796 (best_match::consider): Update for renaming.
15798 2018-06-12 Martin Sebor <msebor@redhat.com>
15800 PR tree-optimization/85259
15801 * builtins.c (compute_objsize): Handle constant offsets.
15802 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15803 true iff a warning has been issued.
15804 * gimple.h (gimple_nonartificial_location): New function.
15805 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15806 gimple_nonartificial_location and handle -Wno-system-headers.
15807 (handle_builtin_stxncpy): Same.
15809 2018-06-12 Martin Sebor <msebor@redhat.com>
15812 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15814 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
15816 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15817 BUILTIN_VEC_XST entries for pointer to double and long long.
15819 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
15822 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15824 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15827 2018-06-12 Martin Liska <mliska@suse.cz>
15829 * doc/options.texi: Document IntegerRange.
15831 2018-06-12 Martin Liska <mliska@suse.cz>
15833 * config/i386/i386.opt: Make MPX-related options as Deprecated.
15834 * opt-functions.awk: Handle Deprecated flag.
15835 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15837 (read_cmdline_option): Report warning for a deprecated option.
15838 * opts.h (struct cl_option): Add new field cl_deprecated.
15839 (CL_ERR_DEPRECATED): New.
15841 2018-06-12 Martin Liska <mliska@suse.cz>
15843 * doc/options.texi: Document Deprecated option flag.
15845 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15847 * config/arc/arc-arch.h (arc_extras): New enum.
15848 (arc_cpu_t):Add field extra.
15849 (arc_cpu_types): Consider the extras.
15850 * config/arc/arc-cpus.def: Add extras info.
15851 * config/arc/arc-opts.h (processor_type): Consider extra field.
15852 * config/arc/arc.c (arc_override_options): Handle extra field.
15854 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
15856 * config/arc/arc-arch.h: Update ARC_OPTX macro.
15857 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15859 * config/arc/arc.c (arc_init): Update pic warning.
15860 (irq_range): Update irq range parsing warnings.
15861 (arc_override_options): Update various warning messages.
15862 (arc_handle_aux_attribute): Likewise.
15864 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
15866 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15868 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
15870 * doc/sourcebuild.texi: Document usage of line number 0 in verify
15871 compiler messages directives.
15873 2018-06-12 Matthew Fortune <mfortune@gmail.com>
15875 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15876 * config/mips/mips-tables.opt: Regenerate.
15877 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15879 * doc/invoke.texi: Document -march=i6500.
15881 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
15883 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15884 (i6400_gpmul): Add cpu_unit.
15885 (i6400_gpdiv): Likewise.
15886 (i6400_msa_add_d): Update reservations.
15887 (i6400_msa_int_add) Likewise.
15888 (i6400_msa_short_logic3) Likewise.
15889 (i6400_msa_short_logic2) Likewise.
15890 (i6400_msa_short_logic) Likewise.
15891 (i6400_msa_move) Likewise.
15892 (i6400_msa_cmp) Likewise.
15893 (i6400_msa_short_float2) Likewise.
15894 (i6400_msa_div_d) Likewise.
15895 (i6400_msa_long_logic1) Likewise.
15896 (i6400_msa_long_logic2) Likewise.
15897 (i6400_msa_mult) Likewise.
15898 (i6400_msa_long_float2) Likewise.
15899 (i6400_msa_long_float4) Likewise.
15900 (i6400_msa_long_float5) Likewise.
15901 (i6400_msa_long_float8) Likewise.
15902 (i6400_fpu_fadd): Include frint type.
15903 (i6400_fpu_store): New define_insn_reservation.
15904 (i6400_fpu_load): Likewise.
15905 (i6400_fpu_move): Likewise.
15906 (i6400_fpu_fcmp): Likewise.
15907 (i6400_fpu_fmadd): Likewise.
15908 (i6400_int_mult): Include imul3nc type and update reservation.
15909 (i6400_int_div): Include idiv3 type and update reservation.
15910 (i6400_int_load): Update to check type not move_type.
15911 (i6400_int_store): Likewise.
15912 (i6400_int_prefetch): Set zero latency.
15914 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
15916 * gcc.c: Document new %@{...} sequence.
15917 (LINK_COMMAND_SPEC): Use it for the -L switches.
15918 (cpp_unique_options): Use it for the -I switches.
15919 (at_file_argbuf): New global variable.
15920 (in_at_file): Likewise.
15921 (alloc_args): Create at_file_argbuf.
15922 (clear_args): Truncate at_file_argbuf.
15923 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15924 (open_at_file): New function.
15925 (close_at_file): Likewise.
15926 (create_at_file): Delete.
15927 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15930 (validate_switches_from_spec): Deal with %@{...} sequence.
15931 (validate_switches): Likewise.
15932 (driver::finalize): Call clear_args.
15934 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
15936 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15938 2018-06-11 Martin Sebor <msebor@redhat.com>
15940 * doc/invoke.texi (-Wall): List -Wc++17-compat.
15941 (Wno-class-memaccess): Add @opindex.
15942 (Wno-templates, Wno-multiple-inheritance): Same.
15943 (Wno-virtual-inheritance, Wno-namespaces): Same.
15944 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15945 (Wno-format-overflow, Wno-format-truncation): Same.
15946 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15947 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15948 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15949 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15950 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15951 (Wno-misspelled-isr): Same.
15953 2018-06-11 Martin Sebor <msebor@redhat.com>
15955 * PR tree-optimization/86083
15956 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15958 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
15960 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15962 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
15965 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15966 on the correct operand.
15967 (*movdi_internal64): Ditto.
15969 2018-06-11 Martin Liska <mliska@suse.cz>
15971 PR tree-optimization/86089
15972 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15974 2018-06-11 Julia Koval <julia.koval@intel.com>
15976 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15977 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15978 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15980 2018-06-11 Olivier Hainque <hainque@adacore.com>
15982 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15983 for Ada with strict dwarf2.
15985 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
15988 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15991 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
15993 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15995 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
15997 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
16000 2018-06-08 Martin Liska <mliska@suse.cz>
16002 * tree-cfg.h (debug_function): Fix argument type to match
16005 2018-06-08 Martin Liska <mliska@suse.cz>
16007 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
16008 Remove usage of MPX-related (and removed) fields.
16009 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
16011 2018-06-08 David Malcolm <dmalcolm@redhat.com>
16013 * cfg.c (debug): Use TDF_NONE rather than 0.
16014 * cfghooks.c (debug): Likewise.
16015 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
16016 (struct dump_option_value_info): Convert to...
16017 (struct kv_pair): ...this template type.
16018 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
16020 (optinfo_verbosity_options): Likewise.
16021 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
16023 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
16024 than int for "optgroup_flags" param.
16025 (dump_generic_expr_loc): Use dump_flags_t rather than int for
16027 (dump_dec): Likewise.
16028 (dump_finish): Use TDF_NONE rather than 0.
16029 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
16030 rather than int for "optgroup_flags" param. Use TDF_NONE rather
16031 than 0. Update for change to option_ptr.
16032 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
16033 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
16034 0. Update for changes to optinfo_verbosity_options and
16036 (opt_info_switch_p): Convert optgroup_flags from int to
16038 (dump_basic_block): Use dump_flags_t rather than int
16039 for "dump_kind" param.
16040 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
16041 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
16042 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
16043 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
16044 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
16045 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
16046 TDF_NONE): Convert from macros to...
16047 (enum dump_flag): ...this new enum.
16048 (dump_flags_t): Update to use enum.
16049 (operator|, operator&, operator~, operator|=, operator&=):
16050 Implement for dump_flags_t.
16051 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
16052 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
16053 Convert from macros to...
16054 (enum optgroup_flag): ...this new enum.
16055 (optgroup_flags_t): New typedef.
16056 (operator|, operator|=): Implement for optgroup_flags_t.
16057 (struct dump_file_info): Convert field "alt_flags" to
16058 dump_flags_t. Convert field "optgroup_flags" to
16060 (dump_basic_block): Use dump_flags_t rather than int for param.
16061 (dump_generic_expr_loc): Likewise.
16062 (dump_dec): Likewise.
16063 (dump_register): Convert param "optgroup_flags" to
16065 (opt_info_enable_passes): Likewise.
16066 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
16068 * gimple-pretty-print.c (debug): Likewise.
16069 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
16070 (merged_store_group::apply_stores): Likewise.
16071 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
16072 * gimple.c (verify_gimple_pp): Likewise.
16073 * graphite-poly.c (print_pbb_body): Likewise.
16074 * passes.c (pass_manager::register_one_dump_file): Convert
16075 local "optgroup_flags" to optgroup_flags_t.
16076 * print-tree.c (print_node): Use TDF_NONE rather than 0.
16078 (debug_body): Likewise.
16079 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
16080 to optgroup_flags_t.
16081 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
16083 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
16084 (convert_mult_to_fma): Likewise.
16085 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
16086 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
16087 * tree-vect-data-refs.c (dump_lower_bound): Convert param
16088 "dump_kind" to dump_flags_t.
16090 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16092 * config/rs6000/rs6000.c (min, max): Delete.
16094 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
16096 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
16097 -mabi=spe and -mabi=no-spe.
16099 2018-06-08 Martin Liska <mliska@suse.cz>
16101 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
16102 where we expect an existing summary.
16104 2018-06-08 Martin Liska <mliska@suse.cz>
16106 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
16107 * ipa-inline.h (estimate_edge_growth): Likewise.
16109 2018-06-08 Martin Liska <mliska@suse.cz>
16111 * cgraph.c (function_version_hasher::hash): Use
16112 cgraph_node::get_uid ().
16113 (function_version_hasher::equal):
16114 * cgraph.h (cgraph_node::get_uid): New method.
16115 * ipa-inline.c (update_caller_keys): Use
16116 cgraph_node::get_uid ().
16117 (update_callee_keys): Likewise.
16118 * ipa-utils.c (searchc): Likewise.
16119 (ipa_reduced_postorder): Likewise.
16120 * lto-cgraph.c (input_node): Likewise.
16121 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
16122 * symbol-summary.h (symtab_insertion): Likewise.
16123 (symtab_removal): Likewise.
16124 (symtab_duplication): Likewise.
16125 * tree-pretty-print.c (dump_function_header): Likewise.
16126 * tree-sra.c (convert_callers_for_node): Likewise.
16128 2018-06-08 Martin Liska <mliska@suse.cz>
16130 * cgraph.c (symbol_table::create_edge): Always assign a new
16132 (symbol_table::free_edge): Do not recycle numbers.
16133 * cgraph.h (cgraph_edge::get): New method.
16134 * symbol-summary.h (symtab_removal): Use it.
16135 (symtab_duplication): Likewise.
16136 (call_summary::hashable_uid): Remove.
16138 2018-06-08 Martin Liska <mliska@suse.cz>
16140 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
16141 (initialize_growth_caches): Remove.
16142 (free_growth_caches): Likewise.
16143 (do_estimate_edge_time): Use edge_growth_cache.
16144 (do_estimate_edge_size): Likewise.
16145 (do_estimate_edge_hints): Likewise.
16146 * ipa-inline.c (reset_edge_caches): Likewise.
16147 (recursive_inlining): Likewise.
16148 (inline_small_functions): Likewise.
16149 * ipa-inline.h (initialize_growth_caches): Remove.
16150 (estimate_edge_size): Likewise.
16151 (estimate_edge_time): Likewise.
16152 (estimate_edge_hints): Likewise.
16153 (reset_edge_growth_cache): Likewise.
16154 * symbol-summary.h (call_summary::remove): New method.
16156 2018-06-08 Martin Liska <mliska@suse.cz>
16158 * ipa-cp.c (class edge_clone_summary): New summary.
16159 (grow_edge_clone_vectors): Remove.
16160 (ipcp_edge_duplication_hook): Remove.
16161 (class edge_clone_summary_t): New call_summary class.
16162 (ipcp_edge_removal_hook): Remove.
16163 (edge_clone_summary_t::duplicate): New function.
16164 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
16165 (create_specialized_node): Likewise.
16166 (ipcp_driver): Initialize edge_clone_summaries and do not
16169 2018-06-08 Martin Liska <mliska@suse.cz>
16171 * symbol-summary.h (get): New function.
16172 (call_summary::m_initialize_when_cloning): New class member.
16174 2018-06-08 Martin Liska <mliska@suse.cz>
16176 * cgraph.c (cgraph_node::remove): Do not recycle uid.
16177 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
16178 (symbol_table::allocate_cgraph_symbol): Do not set uid.
16179 * passes.c (uid_hash_t): Record removed_nodes by their uids.
16180 (remove_cgraph_node_from_order): Use the removed_nodes set.
16181 (do_per_function_toporder): Likwise.
16182 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
16183 instead of summary_uid.
16184 (symtab_removal): Likewise.
16185 (symtab_duplication): Likewise.
16187 2018-06-08 Martin Liska <mliska@suse.cz>
16189 * ipa-cp.c (ipcp_store_bits_results): Use
16190 ipcp_transformation_sum.
16191 (ipcp_store_vr_results): Likewise.
16192 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
16194 (ipcp_transformation_initialize): ... this.
16195 (ipa_set_node_agg_value_chain):
16196 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
16197 (write_ipcp_transformation_info): Likewise.
16198 (read_ipcp_transformation_info): Likewise.
16199 (ipcp_update_bits): Likewise.
16200 (ipcp_update_vr): Likewise.
16201 (ipcp_transform_function): Likewise.
16202 * ipa-prop.h: Rename ipcp_transformation_summary to
16203 ipcp_transformation.
16204 (class ipcp_transformation_t): New function summary.
16205 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
16206 (ipa_get_agg_replacements_for_node): Likewise.
16208 2018-06-08 Martin Liska <mliska@suse.cz>
16210 * ipa-pure-const.c (struct funct_state_d): Do it class instead
16212 (class funct_state_summary_t): New function_summary class.
16213 (has_function_state): Remove.
16214 (get_function_state): Likewise.
16215 (set_function_state): Likewise.
16216 (add_new_function): Likewise.
16217 (funct_state_summary_t::insert): New function.
16218 (duplicate_node_data): Remove.
16219 (remove_node_data): Remove.
16220 (funct_state_summary_t::duplicate): New function.
16221 (register_hooks): Create new funct_state_summaries.
16222 (pure_const_generate_summary): Use it.
16223 (pure_const_write_summary): Likewise.
16224 (pure_const_read_summary): Likewise.
16225 (propagate_pure_const): Likewise.
16226 (propagate_nothrow): Likewise.
16227 (dump_malloc_lattice): Likewise.
16228 (propagate_malloc): Likewise.
16229 (execute): Do not register hooks, just remove summary
16231 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
16234 2018-06-08 Martin Liska <mliska@suse.cz>
16236 * ipa-reference.c (remove_node_data): Remove.
16237 (duplicate_node_data): Likewise.
16238 (class ipa_ref_var_info_summary_t): New class.
16239 (class ipa_ref_opt_summary_t): Likewise.
16240 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
16241 (get_reference_optimization_summary): Use
16242 ipa_ref_opt_sum_summaries.
16243 (set_reference_vars_info): Remove.
16244 (set_reference_optimization_summary): Likewise.
16245 (ipa_init): Create summaries.
16246 (init_function_info): Use function summary.
16247 (ipa_ref_opt_summary_t::duplicate): New function.
16248 (ipa_ref_opt_summary_t::remove): New function.
16249 (get_read_write_all_from_node): Fix GNU coding style.
16250 (propagate): Use function summary.
16251 (write_node_summary_p): Fix GNU coding style.
16252 (stream_out_bitmap): Likewise.
16253 (ipa_reference_read_optimization_summary): Use function summary.
16254 (ipa_reference_c_finalize): Do not release hooks.
16256 2018-06-08 Martin Liska <mliska@suse.cz>
16258 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
16259 (analyze_function_body): Extract multiple calls of get_create.
16260 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16261 * ipa-inline.c (recursive_inlining): Use ::get method.
16262 * ipa-inline.h (estimate_edge_growth): Likewise.
16264 2018-06-08 Martin Liska <mliska@suse.cz>
16266 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
16268 (hsa_function_summary::hsa_function_summary): Use the new enum
16270 (hsa_gpu_implementation_p): Use hsa_summaries::get.
16271 * hsa-gen.c (hsa_get_host_function): Likewise.
16272 (get_brig_function_name): Likewise.
16273 * ipa-hsa.c (process_hsa_functions): Likewise.
16274 (ipa_hsa_write_summary): Likewise.
16275 * symbol-summary.h (symtab_duplication): Use ::get function/
16276 (get): New function.
16278 2018-06-08 Martin Liska <mliska@suse.cz>
16280 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
16282 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
16283 (hsa_register_kernel): Likewise.
16284 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
16285 * hsa-gen.c (hsa_get_host_function): Likewise.
16286 (get_brig_function_name): Likewise.
16287 (generate_hsa): Likewise.
16288 (pass_gen_hsail::execute): Likewise.
16289 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
16290 (devirtualization_time_bonus): Likewise.
16291 (ipcp_propagate_stage): Likewise.
16292 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16293 (edge_set_predicate): Likewise.
16294 (evaluate_conditions_for_known_args): Likewise.
16295 (evaluate_properties_for_edge): Likewise.
16296 (ipa_fn_summary::reset): Likewise.
16297 (ipa_fn_summary_t::duplicate): Likewise.
16298 (dump_ipa_call_summary): Likewise.
16299 (ipa_dump_fn_summary): Likewise.
16300 (analyze_function_body): Likewise.
16301 (compute_fn_summary): Likewise.
16302 (estimate_edge_devirt_benefit): Likewise.
16303 (estimate_edge_size_and_time): Likewise.
16304 (estimate_calls_size_and_time): Likewise.
16305 (estimate_node_size_and_time): Likewise.
16306 (inline_update_callee_summaries): Likewise.
16307 (remap_edge_change_prob): Likewise.
16308 (remap_edge_summaries): Likewise.
16309 (ipa_merge_fn_summary_after_inlining): Likewise.
16310 (ipa_update_overall_fn_summary): Likewise.
16311 (read_ipa_call_summary): Likewise.
16312 (inline_read_section): Likewise.
16313 (write_ipa_call_summary): Likewise.
16314 (ipa_fn_summary_write): Likewise.
16315 (ipa_free_fn_summary): Likewise.
16316 * ipa-hsa.c (process_hsa_functions): Likewise.
16317 (ipa_hsa_write_summary): Likewise.
16318 (ipa_hsa_read_section): Likewise.
16319 * ipa-icf.c (sem_function::merge): Likewise.
16320 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
16321 (do_estimate_edge_time): Likewise.
16322 (estimate_size_after_inlining): Likewise.
16323 (estimate_growth): Likewise.
16324 (growth_likely_positive): Likewise.
16325 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16326 (inline_call): Likewise.
16327 * ipa-inline.c (caller_growth_limits): Likewise.
16328 (can_inline_edge_p): Likewise.
16329 (can_inline_edge_by_limits_p): Likewise.
16330 (compute_uninlined_call_time): Likewise.
16331 (compute_inlined_call_time): Likewise.
16332 (want_inline_small_function_p): Likewise.
16333 (edge_badness): Likewise.
16334 (update_caller_keys): Likewise.
16335 (update_callee_keys): Likewise.
16336 (recursive_inlining): Likewise.
16337 (inline_small_functions): Likewise.
16338 (inline_to_all_callers_1): Likewise.
16339 (dump_overall_stats): Likewise.
16340 (early_inline_small_functions): Likewise.
16341 (early_inliner): Likewise.
16342 * ipa-inline.h (estimate_edge_growth): Likewise.
16343 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16344 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16345 * ipa-prop.h (IPA_NODE_REF): Likewise.
16346 (IPA_EDGE_REF): Likewise.
16347 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16348 (propagate_malloc): Likewise.
16349 * ipa-split.c (execute_split_functions): Likewise.
16350 * symbol-summary.h: Rename get to get_create.
16352 (get_create): Likewise.
16353 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16355 2018-06-08 Martin Liska <mliska@suse.cz>
16357 * symbol-summary.h (release): Move definition out of class
16359 (symtab_removal): Likewise.
16360 (symtab_duplication): Likewise.
16362 2018-06-08 Martin Liska <mliska@suse.cz>
16364 * symbol-summary.h (function_summary): Move constructor
16365 implementation out of class declaration.
16366 (release): Likewise.
16367 (symtab_insertion): Likewise.
16368 (symtab_removal): Likewise.
16369 (symtab_duplication): Likewise.
16372 2018-06-08 Martin Liska <mliska@suse.cz>
16374 * Makefile.in: Remove support for MPX (macros, related functions,
16375 fields in cgraph_node, ...).
16376 * builtin-types.def (BT_BND): Likewise.
16377 (BT_FN_BND_CONST_PTR): Likewise.
16378 (BT_FN_CONST_PTR_BND): Likewise.
16379 (BT_FN_VOID_PTR_BND): Likewise.
16380 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
16381 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
16382 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
16383 (expand_builtin_mempcpy_with_bounds): Likewise.
16384 (expand_builtin_memset_with_bounds): Likewise.
16385 (expand_builtin_memset_args): Likewise.
16386 (std_expand_builtin_va_start): Likewise.
16387 (expand_builtin): Likewise.
16388 (expand_builtin_with_bounds): Likewise.
16389 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
16390 (DEF_LIB_BUILTIN_CHKP): Likewise.
16391 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
16392 (DEF_CHKP_BUILTIN): Likewise.
16393 (BUILT_IN_MEMCPY): Likewise.
16394 (BUILT_IN_MEMMOVE): Likewise.
16395 (BUILT_IN_MEMPCPY): Likewise.
16396 (BUILT_IN_MEMSET): Likewise.
16397 (BUILT_IN_STPCPY): Likewise.
16398 (BUILT_IN_STRCAT): Likewise.
16399 (BUILT_IN_STRCHR): Likewise.
16400 (BUILT_IN_STRCPY): Likewise.
16401 (BUILT_IN_STRLEN): Likewise.
16402 (BUILT_IN_MEMCPY_CHK): Likewise.
16403 (BUILT_IN_MEMMOVE_CHK): Likewise.
16404 (BUILT_IN_MEMPCPY_CHK): Likewise.
16405 (BUILT_IN_MEMSET_CHK): Likewise.
16406 (BUILT_IN_STPCPY_CHK): Likewise.
16407 (BUILT_IN_STRCAT_CHK): Likewise.
16408 (BUILT_IN_STRCPY_CHK): Likewise.
16409 * calls.c (store_bounds): Likewise.
16410 (emit_call_1): Likewise.
16411 (special_function_p): Likewise.
16412 (maybe_warn_nonstring_arg): Likewise.
16413 (initialize_argument_information): Likewise.
16414 (finalize_must_preallocate): Likewise.
16415 (compute_argument_addresses): Likewise.
16416 (expand_call): Likewise.
16417 * cfgexpand.c (expand_call_stmt): Likewise.
16418 (expand_return): Likewise.
16419 (expand_gimple_stmt_1): Likewise.
16420 (pass_expand::execute): Likewise.
16421 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
16422 (cgraph_node::remove): Likewise.
16423 (cgraph_node::dump): Likewise.
16424 (cgraph_node::verify_node): Likewise.
16425 * cgraph.h (chkp_function_instrumented_p): Likewise.
16426 (symtab_node::get_alias_target): Likewise.
16427 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
16428 (cgraph_local_p): Likewise.
16429 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
16430 (cgraph_edge::rebuild_references): Likewise.
16431 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
16432 (walk_polymorphic_call_targets): Likewise.
16433 (cgraph_node::expand_thunk): Likewise.
16434 (symbol_table::output_weakrefs): Likewise.
16435 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
16436 (ix86_handle_option): Likewise.
16437 * config/i386/constraints.md: Likewise.
16438 * config/i386/i386-builtin-types.def (BND): Likewise.
16442 * config/i386/i386-builtin.def (BDESC_END): Likewise.
16443 (BDESC_FIRST): Likewise.
16445 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
16446 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
16447 * config/i386/i386.c (enum reg_class): Likewise.
16448 (ix86_target_string): Likewise.
16449 (ix86_option_override_internal): Likewise.
16450 (ix86_conditional_register_usage): Likewise.
16451 (ix86_valid_target_attribute_inner_p): Likewise.
16452 (ix86_set_indirect_branch_type): Likewise.
16453 (ix86_set_current_function): Likewise.
16454 (ix86_function_arg_regno_p): Likewise.
16455 (init_cumulative_args): Likewise.
16456 (ix86_function_arg_advance): Likewise.
16457 (ix86_function_arg): Likewise.
16458 (ix86_pass_by_reference): Likewise.
16459 (ix86_function_value_regno_p): Likewise.
16460 (ix86_function_value_1): Likewise.
16461 (ix86_function_value_bounds): Likewise.
16462 (ix86_return_in_memory): Likewise.
16463 (ix86_setup_incoming_vararg_bounds): Likewise.
16464 (ix86_va_start): Likewise.
16465 (indirect_thunk_need_prefix): Likewise.
16466 (print_reg): Likewise.
16467 (ix86_print_operand): Likewise.
16468 (ix86_expand_call): Likewise.
16469 (ix86_output_function_return): Likewise.
16470 (reg_encoded_number): Likewise.
16471 (BDESC_VERIFYS): Likewise.
16472 (ix86_init_mpx_builtins): Likewise.
16473 (ix86_init_builtins): Likewise.
16474 (ix86_emit_cmove): Likewise.
16475 (ix86_emit_move_max): Likewise.
16476 (ix86_expand_builtin): Likewise.
16477 (ix86_builtin_mpx_function): Likewise.
16478 (ix86_get_arg_address_for_bt): Likewise.
16479 (ix86_load_bounds): Likewise.
16480 (ix86_store_bounds): Likewise.
16481 (ix86_load_returned_bounds): Likewise.
16482 (ix86_store_returned_bounds): Likewise.
16483 (ix86_class_likely_spilled_p): Likewise.
16484 (ix86_hard_regno_mode_ok): Likewise.
16485 (x86_order_regs_for_local_alloc): Likewise.
16486 (ix86_mitigate_rop): Likewise.
16487 (ix86_bnd_prefixed_insn_p): Likewise.
16488 (ix86_mpx_bound_mode): Likewise.
16489 (ix86_make_bounds_constant): Likewise.
16490 (ix86_initialize_bounds): Likewise.
16491 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
16492 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
16493 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
16494 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
16495 (TARGET_CHKP_BOUND_MODE): Likewise.
16496 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
16497 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
16498 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
16499 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
16500 * config/i386/i386.h (TARGET_MPX): Likewise.
16501 (TARGET_MPX_P): Likewise.
16502 (VALID_BND_REG_MODE): Likewise.
16503 (FIRST_BND_REG): Likewise.
16504 (LAST_BND_REG): Likewise.
16505 (enum reg_class): Likewise.
16506 (BND_REG_P): Likewise.
16507 (BND_REGNO_P): Likewise.
16508 (BNDmode): Likewise.
16509 (ADJUST_INSN_LENGTH): Likewise.
16510 * config/i386/i386.md: Likewise.
16511 * config/i386/i386.opt: Likewise.
16512 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
16513 (defined): Likewise.
16514 (LINK_MPX): Likewise.
16515 (MPX_SPEC): Likewise.
16516 (LIBMPX_SPEC): Likewise.
16517 (LIBMPXWRAPPERS_SPEC): Likewise.
16518 (CHKP_SPEC): Likewise.
16519 * config/i386/predicates.md: Likewise.
16520 * dbxout.c (dbxout_type): Likewise.
16521 * doc/extend.texi: Likewise.
16522 * doc/invoke.texi: Likewise.
16523 * doc/md.texi: Likewise.
16524 * doc/tm.texi: Likewise.
16525 * doc/tm.texi.in: Likewise.
16526 * dwarf2out.c (is_base_type): Likewise.
16527 (gen_formal_types_die): Likewise.
16528 (gen_subprogram_die): Likewise.
16529 (gen_type_die_with_usage): Likewise.
16530 (gen_decl_die): Likewise.
16531 (dwarf2out_late_global_decl): Likewise.
16532 * expr.c (expand_assignment): Likewise.
16533 (emit_storent_insn): Likewise.
16534 (store_expr_with_bounds): Likewise.
16535 (store_expr): Likewise.
16536 (expand_expr_real_1): Likewise.
16537 * expr.h (store_expr_with_bounds): Likewise.
16538 * function.c (use_register_for_decl): Likewise.
16539 (struct bounds_parm_data): Likewise.
16540 (assign_parms_augmented_arg_list): Likewise.
16541 (assign_parm_find_entry_rtl): Likewise.
16542 (assign_parm_is_stack_parm): Likewise.
16543 (assign_parm_load_bounds): Likewise.
16544 (assign_bounds): Likewise.
16545 (assign_parms): Likewise.
16546 (expand_function_start): Likewise.
16547 * gcc.c (CHKP_SPEC): Likewise.
16548 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
16549 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
16550 (wrestrict_dom_walker::check_call): Likewise.
16551 * gimple.c (gimple_build_call_from_tree): Likewise.
16552 * gimple.h (enum gf_mask): Likewise.
16553 (gimple_call_with_bounds_p): Likewise.
16554 (gimple_call_set_with_bounds): Likewise.
16555 * gimplify.c (gimplify_init_constructor): Likewise.
16556 * ipa-cp.c (initialize_node_lattices): Likewise.
16557 (propagate_constants_across_call): Likewise.
16558 (find_more_scalar_values_for_callers_subset): Likewise.
16559 * ipa-hsa.c (process_hsa_functions): Likewise.
16560 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
16561 * ipa-icf.c (sem_function::merge): Likewise.
16562 * ipa-inline.c (early_inliner): Likewise.
16563 * ipa-pure-const.c (warn_function_noreturn): Likewise.
16564 (warn_function_cold): Likewise.
16565 (propagate_pure_const): Likewise.
16566 * ipa-ref.h (enum GTY): Likewise.
16567 * ipa-split.c (find_retbnd): Likewise.
16568 (consider_split): Likewise.
16569 (split_function): Likewise.
16570 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
16571 * ipa.c (walk_polymorphic_call_targets): Likewise.
16572 (symbol_table::remove_unreachable_nodes): Likewise.
16573 (process_references): Likewise.
16574 (cgraph_build_static_cdtor_1): Likewise.
16575 * lto-cgraph.c (lto_output_node): Likewise.
16576 (output_refs): Likewise.
16577 (compute_ltrans_boundary): Likewise.
16578 (input_overwrite_node): Likewise.
16579 (input_node): Likewise.
16580 (input_cgraph_1): Likewise.
16581 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
16582 * passes.c (pass_manager::execute_early_local_passes): Likewise.
16583 (class pass_chkp_instrumentation_passes): Likewise.
16584 (make_pass_chkp_instrumentation_passes): Likewise.
16585 * passes.def: Likewise.
16586 * rtl.h (struct GTY): Likewise.
16587 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
16588 * stor-layout.c (layout_type): Likewise.
16589 * symtab.c: Likewise.
16590 * target.def: Likewise.
16591 * targhooks.c (default_chkp_bound_type): Likewise.
16592 (default_chkp_bound_mode): Likewise.
16593 (default_builtin_chkp_function): Likewise.
16594 (default_chkp_function_value_bounds): Likewise.
16595 (default_chkp_make_bounds_constant): Likewise.
16596 (default_chkp_initialize_bounds): Likewise.
16597 * targhooks.h (default_chkp_bound_type): Likewise.
16598 (default_chkp_bound_mode): Likewise.
16599 (default_builtin_chkp_function): Likewise.
16600 (default_chkp_function_value_bounds): Likewise.
16601 (default_chkp_make_bounds_constant): Likewise.
16602 (default_chkp_initialize_bounds): Likewise.
16603 * toplev.c (compile_file): Likewise.
16604 (process_options): Likewise.
16605 * tree-core.h (DEF_BUILTIN): Likewise.
16606 (DEF_BUILTIN_CHKP): Likewise.
16607 * tree-inline.c (declare_return_variable): Likewise.
16608 (remap_gimple_stmt): Likewise.
16609 (copy_bb): Likewise.
16610 (initialize_inlined_parameters): Likewise.
16611 (expand_call_inline): Likewise.
16612 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16613 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16614 (make_pass_ipa_chkp_produce_thunks): Likewise.
16615 (make_pass_chkp): Likewise.
16616 (make_pass_chkp_opt): Likewise.
16617 (make_pass_chkp_instrumentation_passes): Likewise.
16618 * tree-pretty-print.c (dump_generic_node): Likewise.
16619 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16620 * tree-ssa-dce.c (propagate_necessity): Likewise.
16621 (eliminate_unnecessary_stmts): Likewise.
16622 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16623 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16624 * tree-ssa-sccvn.h: Likewise.
16625 * tree-ssa-strlen.c (get_string_length): Likewise.
16626 (valid_builtin_call): Likewise.
16627 (adjust_last_stmt): Likewise.
16628 (handle_builtin_strchr): Likewise.
16629 (handle_builtin_strcpy): Likewise.
16630 (handle_builtin_stxncpy): Likewise.
16631 (handle_builtin_memcpy): Likewise.
16632 (handle_builtin_strcat): Likewise.
16633 (strlen_check_and_optimize_stmt): Likewise.
16634 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16635 * tree-streamer-in.c: Likewise.
16636 * tree-streamer.c (record_common_node): Likewise.
16637 * tree.c (tree_code_size): Likewise.
16638 (wide_int_to_tree_1): Likewise.
16639 (type_contains_placeholder_1): Likewise.
16640 (build_common_tree_nodes): Likewise.
16641 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16642 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16643 (POINTER_BOUNDS_P): Likewise.
16644 (BOUNDED_TYPE_P): Likewise.
16645 (BOUNDED_P): Likewise.
16646 (CALL_WITH_BOUNDS_P): Likewise.
16647 (pointer_bounds_type_node): Likewise.
16648 * value-prof.c (gimple_ic): Likewise.
16649 * var-tracking.c (vt_add_function_parameters): Likewise.
16650 * varasm.c (make_decl_rtl): Likewise.
16651 (assemble_start_function): Likewise.
16652 (output_constant): Likewise.
16653 (maybe_assemble_visibility): Likewise.
16654 * varpool.c (ctor_for_folding): Likewise.
16655 * chkp-builtins.def: Remove.
16656 * ipa-chkp.c: Remove.
16657 * ipa-chkp.h: Remove.
16658 * rtl-chkp.c: Remove.
16659 * rtl-chkp.h: Remove.
16660 * tree-chkp-opt.c: Remove.
16661 * tree-chkp.c: Remove.
16662 * tree-chkp.h: Remove.
16664 2018-06-07 Carl Love <cel@us.ibm.com>
16666 * config/rs6000/vsx.md (vextract_fp_from_shorth,
16667 vextract_fp_from_shortl): Add BE support.
16669 2018-06-07 Paul Koning <ni1d@arrl.net>
16671 * compare-elim.c (try_merge_compare): Don't merge compare if
16672 address contains a side effect.
16673 (try_eliminate_compare): Likewise.
16675 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
16677 * config.gcc: Support "tremont".
16678 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16679 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16681 * config/i386/i386.c (m_TREMONT): Define.
16682 (processor_target_table): Add "tremont".
16683 (PTA_TREMONT): Define.
16684 (ix86_lea_outperforms): Add TARGET_TREMONT.
16685 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16686 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16687 and M_INTEL_GOLDMONT_PLUS.
16688 (fold_builtin_cpu): Add "tremont".
16689 (ix86_add_stmt_cost): Add TARGET_TREMONT.
16690 (ix86_option_override_internal): Add "tremont".
16691 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16692 (processor_type): Add PROCESSOR_TREMONT.
16693 * config/i386/x86-tune.def: Add m_TREMONT.
16694 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16696 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16698 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16699 symbol defined for msp430i* devices to be lower case.
16701 2018-06-07 Richard Biener <rguenther@suse.de>
16703 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16704 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
16705 Properly wrap signed arithmetic if overflow wraps.
16707 2018-06-07 Jakub Jelinek <jakub@redhat.com>
16709 PR tree-optimization/69615
16710 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16711 of a cast from a same precision integral SSA_NAME in a bb dominated
16712 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
16713 cast to utype if rhs2 has already a compatible type.
16715 2018-06-07 Richard Biener <rguenther@suse.de>
16717 PR tree-optimization/85935
16718 * graphite-scop-detection.c (find_params_in_bb): Analyze
16719 condition operands with respect to the correct loop. Assert
16720 the analysis doesn't fail.
16722 2018-06-04 Carl Love <cel@us.ibm.com>
16724 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16725 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
16726 as it is slightly cheaper.
16727 (first_match_or_eos_index_<mode>):
16728 Calculate index using natural element order.
16729 (first_match_index_<mode>):
16730 Calculate index using natural element order.
16731 (first_match_or_eos_index_<mode>):
16732 Calculate index using natural order.
16733 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16734 for BE and LE modes.
16735 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16736 P9V_BUILTIN_VCLZLSBB_V16QI.
16737 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16740 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16742 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16743 indentation and line wrap for many prototypes. Add missing
16744 @smallexample directives around block of prototypes for vec_xl and
16747 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
16749 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16750 track if we pass or return IEEE 128-bit floating point.
16751 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16752 C++ mangling that is compatible with GCC 8.1.
16753 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16754 (init_cumulative_args): Note if we pass or return IEEE 128-bit
16755 floating point types.
16756 (rs6000_function_arg_advance_1): Likewise.
16757 (rs6000_mangle_type): Optionally generate mangled names that match
16758 what GCC 8.1 generated for IEEE 128-bit floating point types.
16759 (rs6000_globalize_decl_name): If we have an external function that
16760 passes or returns IEEE 128-bit types, generate a weak reference
16761 from the mangled name used in GCC 8.1 to the current mangled
16763 (rs6000_init_builtins): Make __ibm128 use the long double type if
16764 long double is IBM extended double. Make __float128 use the long
16765 double type if long double is IEEE 128-bit.
16768 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16769 macro for __ibm128 built-in functions.
16770 (PACK_IF): Add __ibm128 pack/unpack functions.
16771 (UNPACK_IF): Likewise.
16772 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16773 enable long double built-in functions if long double is IEEE
16774 128-bit floating point.
16775 (rs6000_invalid_builtin): Update long double built-in function
16777 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16778 functions, adjust the built-in function to use the long double
16779 built-in function if __ibm128 and long double are the same type.
16780 * doc/extend.texi (PowerPC builtins): Update documention for
16781 __builtin_{,un}pack_longdouble. Add documentation for
16782 __builtin_{,un}pack_ibm128.
16784 2018-06-06 Jim Wilson <jimw@sifive.com>
16786 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16787 (struct machine_function): New field interrupt_mode.
16788 (riscv_handle_type_attribute): New function. Add forward declaration.
16789 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16790 (riscv_expand_epilogue): Check interrupt_mode field.
16791 (riscv_set_current_function): Check interrupt attribute args and
16792 set interrupt_mode field.
16793 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16794 (riscv_sret, riscv_uret): New.
16795 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16796 new arguments to interrupt attribute.
16798 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
16801 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16802 Don't handle -mcpu=power8 if -mpower9-vector is also used.
16804 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
16806 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16807 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16808 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16809 several redundant entries.
16811 2018-06-06 David Malcolm <dmalcolm@redhat.com>
16813 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16814 type from "rtx" to "rtx_insn *".
16815 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16816 for local "call_insn", removing cast.
16817 (ix86_expand_call): Likewise, introducing a "call_insn" local.
16819 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
16821 PR tree-optimization/86066
16822 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16823 for BIT_INSERT_EXPR stores.
16825 2018-06-06 Richard Biener <rguenther@suse.de>
16827 PR tree-optimization/86062
16828 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16829 component refs ontop
16830 of to be offsetted base.
16832 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
16834 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16835 to be static and remove check on interrupt attribute name.
16837 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
16839 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16840 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16842 2018-06-05 Steve Ellcey <sellcey@cavium.com>
16845 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16847 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16848 Remove second argument, change how error is called.
16849 (aarch64_layout_arg): Remove second argument from
16850 aarch64_err_no_fpadvsimd call.
16851 (aarch64_init_cumulative_args): Ditto.
16852 (aarch64_gimplify_va_arg_expr): Ditto.
16853 * config/aarch64/aarch64.md (mov<mode>): Ditto.
16855 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
16857 * config/i386/i386.md (simple_return_indirect_internal): New expander.
16858 (*simple_return_indirect_internal<mode>): Rename from
16859 simple_return_indirect_internal. Use W mode iterator.
16860 (rstorssp): New expander.
16861 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
16862 (clrssbsy): New expander.
16863 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
16865 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
16867 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16869 (cmse_check_pointed_object): Likewise.
16871 2018-06-05 Martin Liska <mliska@suse.cz>
16873 PR gcov-profile/47618
16874 * doc/invoke.texi: Document how -fprofile-dir format
16877 2018-06-05 Richard Biener <rguenther@suse.de>
16879 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16880 removal pretend DOM info isn't available so we do not update
16881 it and only remove edges, not dominated blocks. Actually free
16882 DOM info in case we removed something. Remove unreachable blocks.
16883 (mfb_keep_latches): Work with either DOM info or marked backedges.
16884 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16885 first. Mark backedges if DOM info isn't available.
16886 (Re-)compute DOM info after cleanup_control_flow_pre.
16888 2018-06-05 Richard Biener <rguenther@suse.de>
16890 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16891 (locus_discrim_hasher::hash): Adjust.
16892 (locus_discrim_hasher::equal): Likewise.
16893 (next_discriminator_for_locus): Work on line directly.
16894 (same_line_p): Pass in expanded locus1 as well.
16895 (assign_discriminators): Avoid redundant location expansions.
16897 2018-06-05 Richard Biener <rguenther@suse.de>
16899 PR tree-optimization/86046
16900 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16901 if required after clearing TREE_ADDRESSABLE.
16903 2018-06-05 Richard Biener <rguenther@suse.de>
16905 PR tree-optimization/86047
16906 * tree-ssa-loop.c (for_each_index): Glob handling of all
16907 decls and constants and really handle all of them.
16909 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16912 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16913 qualifier_void_pointer and qualifier_const_void_pointer.
16914 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16915 (arm_init_builtins): Handle the above.
16916 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16917 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16918 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16921 2018-06-05 Martin Liska <mliska@suse.cz>
16923 * auto-profile.c (read_autofdo_file): Do not use
16924 gcov_ctr_summary struct.
16925 (afdo_callsite_hot_enough_for_early_inline): Likewise.
16926 * coverage.c (struct counts_entry): Likewise.
16927 (read_counts_file): Read just single summary entry.
16928 (get_coverage_counts): Use gcov_summary struct.
16929 * coverage.h (get_coverage_counts): Likewise.
16930 * gcov-dump.c (dump_working_sets): Likewise.
16931 (tag_summary): Dump just single summary.
16932 * gcov-io.c (gcov_write_summary): Write just histogram
16934 (gcov_read_summary): Read just single summary.
16935 (compute_working_sets): Use gcov_summary struct.
16936 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16937 of GCOV_COUNTERS_SUMMABLE.
16938 (GCOV_COUNTERS_SUMMABLE): Remove.
16939 (GCOV_FIRST_VALUE_COUNTER): Replace with
16940 GCOV_COUNTER_V_INTERVAL.
16941 (struct gcov_ctr_summary): Remove.
16942 (struct gcov_summary): Directly use fields of former
16944 (compute_working_sets): Use gcov_summary struct.
16945 * gcov.c (read_count_file): Do not use ctrs fields.
16946 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16948 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16950 * profile.c: Likewise.
16951 * profile.h: Likewise.
16953 2018-06-05 Martin Liska <mliska@suse.cz>
16955 PR gcov-profile/84846
16956 * gcov.c (output_lines): Print working directory only
16957 in intermediate format.
16959 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
16961 * config/s390/s390-builtin-types.def: Add void function type.
16962 * config/s390/s390-builtins.def: Use the function type for the
16965 2018-06-04 Jim Wilson <jimw@sifive.com>
16967 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16969 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16970 and maybe_eh_return. Change regno to unsigned int. Use new args to
16971 handle EH_RETURN_DATA_REGNO registers properly.
16972 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16973 (riscv_expand_epilogue): Update comment. Change argument name and
16974 type. Update code to use new name and type. Pass new args to
16975 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
16977 * config/riscv/riscv.md (NORMAL_RETURN): New.
16978 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16979 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16980 (eh_return): Call gen_eh_return_internal and emit barrier.
16981 (eh_return_internal): Call riscv_expand_epilogue.
16983 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
16985 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16986 bit_insertion field and declare can_be_merged_into method.
16987 (merged_store_group::can_be_merged_into): New method.
16988 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16989 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
16990 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16992 2018-06-04 Richard Biener <rguenther@suse.de>
16994 PR tree-optimization/85955
16995 * builtins.c (fold_builtin_sincos): Convert pointers to
16996 destination to appropriate type before dereferencing.
16998 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
17000 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
17002 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
17004 * expr.c (expand_expr_real_1): Force the operand into memory if
17005 its TYPE_MODE is BLKmode and if there is no integer mode for
17006 the number of bits being extracted.
17008 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17012 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17013 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
17015 2018-06-04 Richard Biener <rguenther@suse.de>
17017 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
17018 (cleanup_tree_cfg_noloop): ... single caller. Do
17019 start_recording_case_labels later.
17021 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
17023 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
17024 to _IMMINTRIN_H_INCLUDED.
17025 * config/i386/pconfigintrin.h: Ditto.
17026 * config/i386/waitpkgintrin.h: Ditto.
17027 * config/i386/immintrin.h: Add includes for sgxintrin.h,
17028 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
17029 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
17030 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
17031 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
17032 waitpkgintrin.h and cldemoteintrin.h.
17034 2018-06-04 Richard Biener <rguenther@suse.de>
17036 PR tree-optimization/86038
17037 * tracer.c (find_best_successor): Check probability for
17038 being initialized, bail out if not.
17040 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
17043 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
17044 of bits to ignore when comparing architectures.
17046 2018-06-04 Jakub Jelinek <jakub@redhat.com>
17048 PR tree-optimization/69615
17049 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
17050 maximum or minimum of the type, try to merge it also as if
17051 range1 is + [-, x - 1] or + [x + 1, -].
17054 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
17056 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
17058 PR tree-optimization/86034
17059 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
17060 the unsigned bitfield type in a bit insertion sequence if it does not
17061 have a larger precision than the bitfield size.
17062 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
17064 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
17066 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
17068 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17070 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
17071 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
17072 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
17073 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
17075 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
17077 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
17078 Disable -fdelete-null-pointer-checks for ELF toolchain.
17080 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17081 Kito Cheng <kito.cheng@gmail.com>
17083 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
17084 (nds32le-*-*, nds32be-*-*): Integrate checking process.
17085 (nds32*-*-*): Add glibc and uclibc conditions.
17086 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
17087 (TARGET_EXCEPT_UNWIND_INFO): Define.
17088 * config/nds32/elf.h: New file.
17089 * config/nds32/linux.h: New file.
17090 * config/nds32/nds32-elf.opt: New file.
17091 * config/nds32/nds32-linux.opt: New file.
17092 * config/nds32/nds32-fp-as-gp.c
17093 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
17094 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
17096 (nds32_asm_file_end): Ditto.
17097 (nds32_print_operand): Ditto.
17098 (nds32_insert_attributes): Ditto.
17099 (nds32_init_libfuncs): New function.
17100 (TARGET_HAVE_TLS): Define.
17101 (TARGET_INIT_LIBFUNCS): Define.
17102 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
17104 (TARGET_ELF): Apply different mcmodel setting.
17105 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
17106 been migrated into elf.h and linux.h files.
17107 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
17108 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
17109 (mcmodel): The content has been migrated into nds32-elf.opt and
17110 nds32-linux.opt files.
17111 * config/nds32/t-elf: New file.
17112 * config/nds32/t-linux: New file.
17114 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
17115 Shiva Chen <shiva0217@gmail.com>
17117 * config/nds32/constants.md (unspec_volatile_element): Add
17118 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
17119 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
17121 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
17122 (make_pass_nds32_fp_as_gp): Declare.
17123 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
17125 (nds32_asm_function_end_prologue): Remove unused asm output.
17126 (nds32_asm_function_begin_epilogue): Remove unused asm output.
17127 (nds32_asm_file_start): Output necessary fp_as_gp information.
17128 (nds32_option_override): Adjust register usage.
17129 (nds32_expand_prologue): Consider fp_as_gp situation.
17130 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
17131 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
17134 (simple_return): Ditto.
17135 (omit_fp_begin): Output special directive for fp_as_gp.
17136 (omit_fp_end): Output special directive for fp_as_gp.
17137 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
17138 mforbid-fp-as-gp): New options.
17140 2018-06-01 Mark Wielaard <mark@klomp.org>
17142 * dwarf2out.c (dwarf2out_finish): Remove generation of
17143 DW_AT_loclists_base.
17145 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
17147 * gimple-ssa-store-merging.c: Include gimple-fold.h.
17148 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
17149 (struct merged_store_group): Add bit_insertion field.
17150 (dump_char_array): Use standard hexadecimal format.
17151 (merged_store_group::merged_store_group): Set bit_insertion to false.
17152 (merged_store_group::apply_stores): Use optimal buffer size. Deal
17153 with BIT_INSERT_EXPR stores. Move up code updating the mask and
17154 also print the mask in the dump file.
17155 (pass_store_merging::gate): Minor tweak.
17156 (imm_store_chain_info::coalesce_immediate): Fix wrong association
17157 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
17158 stores with INTEGER_CST stores.
17159 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
17160 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
17161 and use it throughout. Generate bit insertion sequences if need be.
17162 (pass_store_merging::process_store): Remove redundant condition.
17163 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
17165 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
17167 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
17168 the 128-bit floating point types. Fix function comment.
17170 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17172 * config/aarch64/aarch64-simd.md
17173 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
17175 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
17178 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17180 PR tree-optimization/85989
17181 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
17183 (backprop::intersect_uses): Check it when deciding whether this
17184 is a backedge reference.
17185 (backprop::process_block): Add each phi to m_visited_phis
17186 after visiting it, then clear it at the end.
17188 2018-06-01 Richard Biener <rguenther@suse.de>
17190 * tree-vectorizer.h (vect_dr_stmt): New function.
17191 (vect_get_load_cost): Adjust.
17192 (vect_get_store_cost): Likewise.
17193 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
17194 Use vect_dr_stmt instead of DR_SMTT.
17195 (vect_record_base_alignments): Likewise.
17196 (vect_calculate_target_alignment): Likewise.
17197 (vect_compute_data_ref_alignment): Likewise and make static.
17198 (vect_update_misalignment_for_peel): Likewise.
17199 (vect_verify_datarefs_alignment): Likewise.
17200 (vector_alignment_reachable_p): Likewise.
17201 (vect_get_data_access_cost): Likewise. Pass down
17202 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
17203 (vect_get_peeling_costs_all_drs): Likewise.
17204 (vect_peeling_hash_get_lowest_cost): Likewise.
17205 (vect_enhance_data_refs_alignment): Likewise.
17206 (vect_find_same_alignment_drs): Likewise.
17207 (vect_analyze_data_refs_alignment): Likewise.
17208 (vect_analyze_group_access_1): Likewise.
17209 (vect_analyze_group_access): Likewise.
17210 (vect_analyze_data_ref_access): Likewise.
17211 (vect_analyze_data_ref_accesses): Likewise.
17212 (vect_vfa_segment_size): Likewise.
17213 (vect_small_gap_p): Likewise.
17214 (vectorizable_with_step_bound_p): Likewise.
17215 (vect_prune_runtime_alias_test_list): Likewise.
17216 (vect_analyze_data_refs): Likewise.
17217 (vect_supportable_dr_alignment): Likewise.
17218 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
17219 (vect_gen_prolog_loop_niters): Likewise.
17220 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
17221 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
17223 (vect_recog_mask_conversion_pattern): Likewise.
17224 (vect_try_gather_scatter_pattern): Likewise.
17225 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
17226 to vect_get_store_cost.
17227 (vect_get_store_cost): Get stmt_info instead of DR.
17228 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
17229 (vect_get_load_cost): Get stmt_info instead of DR.
17231 2018-06-01 Richard Biener <rguenther@suse.de>
17233 PR middle-end/86017
17234 * gimple-fold.c (var_decl_component_p): Also allow offsetted
17235 vars wrapped in MEM_REFs.
17237 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
17239 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17240 Fix subreg tests so that we only return a choice between
17241 GENERAL_REGS and FP_REGS if the original classes included both.
17243 2018-06-01 Richard Biener <rguenther@suse.de>
17246 * tree-ssa-structalias.c (get_function_part_constraint):
17247 Handle NULL fi->decl.
17248 (find_func_aliases_for_call): Properly handle indirect
17249 fi from direct call.
17250 (find_func_clobbers): Likewise.
17251 (ipa_pta_execute): Likewise.
17252 (create_variable_info_for): For functions that are ifunc_resolver
17253 resolve to a varinfo that contains the result of the resolver call.
17254 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
17257 2018-05-31 Michael Collison <michael.collison@arm.com>
17259 * config/aarch64/aarch64.md:
17260 (*fix_to_zero_extenddfdi2): New pattern.
17261 * gcc.target/aarch64/fix_extend1.c: New testcase.
17263 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
17265 PR middle-end/78809
17266 PR middle-end/83026
17267 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
17268 and BUILT_IN_STRNCMP_EQ.
17269 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
17270 BUILT_IN_STRNCMP_EQ.
17271 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
17272 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17273 (gimple_fold_builtin): Likewise.
17274 * tree-ssa-strlen.c (compute_string_length): New function.
17275 (determine_min_obsize): New function.
17276 (handle_builtin_string_cmp): New function to handle calls to
17277 string compare functions.
17278 (strlen_optimize_stmt): Add handling to builtin string compare
17280 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
17281 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
17282 * tree.c (build_common_builtin_nodes): Add new defines of
17283 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
17285 2018-05-31 Jakub Jelinek <jakub@redhat.com>
17288 * bb-reorder.c (pass_partition_blocks::gate): Return false for
17289 functions with naked attribute.
17291 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
17293 * config/i386/sse.md (avx_vec_concat<mode>):
17294 Substitute concat_tg_mode mode attribute with xtg_mode.
17295 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
17296 (concat_tg_mode): Remove mode attribute.
17298 2018-05-31 Martin Sebor <msebor@redhat.com>
17301 * calls.c (alloc_max_size): Correct a logic error/typo.
17302 Treat excessive arguments as infinite. Warn for invalid arguments.
17303 * doc/invoke.texi (-Walloc-size-larger-than): Update.
17305 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
17308 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
17309 and movx for Haswell.
17311 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
17312 Cesar Philippidis <cesar@codesourcery.com>
17314 PR middle-end/85879
17315 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
17316 when emitting error on private/firstprivate reductions.
17317 * omp-low.c (lower_omp_target): Avoid reference-type processing
17318 on pointers for firstprivate clause.
17320 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17322 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
17325 * config/aarch64/aarch64-simd.md
17326 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
17327 (aarch64_ld1_x3_<mode>): Likewise
17328 (aarch64_st1x2<VALLDIF:mode>): Likewise
17329 (aarch64_st1_x2_<mode>): Likewise
17330 (aarch64_st1x3<VALLDIF:mode>): Likewise
17331 (aarch64_st1_x3_<mode>): Likewise
17332 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
17333 (vld1_s8_x3): Likewise.
17334 (vld1_u16_x3): Likewise.
17335 (vld1_s16_x3): Likewise.
17336 (vld1_u32_x3): Likewise.
17337 (vld1_s32_x3): Likewise.
17338 (vld1_u64_x3): Likewise.
17339 (vld1_s64_x3): Likewise.
17340 (vld1_f16_x3): Likewise.
17341 (vld1_f32_x3): Likewise.
17342 (vld1_f64_x3): Likewise.
17343 (vld1_p8_x3): Likewise.
17344 (vld1_p16_x3): Likewise.
17345 (vld1_p64_x3): Likewise.
17346 (vld1q_u8_x3): Likewise.
17347 (vld1q_s8_x3): Likewise.
17348 (vld1q_u16_x3): Likewise.
17349 (vld1q_s16_x3): Likewise.
17350 (vld1q_u32_x3): Likewise.
17351 (vld1q_s32_x3): Likewise.
17352 (vld1q_u64_x3): Likewise.
17353 (vld1q_s64_x3): Likewise.
17354 (vld1q_f16_x3): Likewise.
17355 (vld1q_f32_x3): Likewise.
17356 (vld1q_f64_x3): Likewise.
17357 (vld1q_p8_x3): Likewise.
17358 (vld1q_p16_x3): Likewise.
17359 (vld1q_p64_x3): Likewise.
17360 (vst1_s64_x2): Likewise.
17361 (vst1_u64_x2): Likewise.
17362 (vst1_f64_x2): Likewise.
17363 (vst1_s8_x2): Likewise.
17364 (vst1_p8_x2): Likewise.
17365 (vst1_s16_x2): Likewise.
17366 (vst1_p16_x2): Likewise.
17367 (vst1_s32_x2): Likewise.
17368 (vst1_u8_x2): Likewise.
17369 (vst1_u16_x2): Likewise.
17370 (vst1_u32_x2): Likewise.
17371 (vst1_f16_x2): Likewise.
17372 (vst1_f32_x2): Likewise.
17373 (vst1_p64_x2): Likewise.
17374 (vst1q_s8_x2): Likewise.
17375 (vst1q_p8_x2): Likewise.
17376 (vst1q_s16_x2): Likewise.
17377 (vst1q_p16_x2): Likewise.
17378 (vst1q_s32_x2): Likewise.
17379 (vst1q_s64_x2): Likewise.
17380 (vst1q_u8_x2): Likewise.
17381 (vst1q_u16_x2): Likewise.
17382 (vst1q_u32_x2): Likewise.
17383 (vst1q_u64_x2): Likewise.
17384 (vst1q_f16_x2): Likewise.
17385 (vst1q_f32_x2): Likewise.
17386 (vst1q_f64_x2): Likewise.
17387 (vst1q_p64_x2): Likewise.
17388 (vst1_s64_x3): Likewise.
17389 (vst1_u64_x3): Likewise.
17390 (vst1_f64_x3): Likewise.
17391 (vst1_s8_x3): Likewise.
17392 (vst1_p8_x3): Likewise.
17393 (vst1_s16_x3): Likewise.
17394 (vst1_p16_x3): Likewise.
17395 (vst1_s32_x3): Likewise.
17396 (vst1_u8_x3): Likewise.
17397 (vst1_u16_x3): Likewise.
17398 (vst1_u32_x3): Likewise.
17399 (vst1_f16_x3): Likewise.
17400 (vst1_f32_x3): Likewise.
17401 (vst1_p64_x3): Likewise.
17402 (vst1q_s8_x3): Likewise.
17403 (vst1q_p8_x3): Likewise.
17404 (vst1q_s16_x3): Likewise.
17405 (vst1q_p16_x3): Likewise.
17406 (vst1q_s32_x3): Likewise.
17407 (vst1q_s64_x3): Likewise.
17408 (vst1q_u8_x3): Likewise.
17409 (vst1q_u16_x3): Likewise.
17410 (vst1q_u32_x3): Likewise.
17411 (vst1q_u64_x3): Likewise.
17412 (vst1q_f16_x3): Likewise.
17413 (vst1q_f32_x3): Likewise.
17414 (vst1q_f64_x3): Likewise.
17415 (vst1q_p64_x3): Likewise.
17417 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17419 * config/msp430/msp430.c (msp430_output_labelref): Prepend
17420 user_label_prefix to name.
17422 * tree-core.h: Update comment about the format of NAME string
17423 passed to handler in attribute_spec.
17425 * config/msp430/msp430.md: Remove erroneous subreg expression from
17426 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
17427 zero_extend{q,h}isi2.
17429 2018-05-30 Borislav Petkov <bp@suse.de>
17431 * doc/extend.texi: Document some architecture specific
17432 constraints and sort entries.
17434 2018-05-30 Martin Sebor <msebor@redhat.com>
17436 PR middle-end/85369
17437 * builtins.c (expand_builtin_stpcpy_1): New function.
17438 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
17439 only if the former succeeds.
17441 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
17443 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
17446 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17448 * doc/invoke.texi (-flinker-output): Document
17450 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17452 * passes.c (ipa_write_summaries): Only modify statements if body
17454 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
17455 incrementally linking.
17456 (ipa_passes): Likewise.
17457 * lto-cgraph.c (lto_output_node): When incrementally linking do not
17458 pass down resolution info.
17459 * common.opt (flag_incremental_link): Update info.
17460 * gcc.c (plugin specs): Turn flinker-output=* to
17461 -plugin-opt=-linker-output-known
17462 * toplev.c (compile_file): Also cut compilation when doing incremental
17464 * flag-types. (enum lto_partition_model): Add
17465 LTO_LINKER_OUTPUT_NOLTOREL.
17466 (invoke.texi): Add -flinker-output docs.
17467 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
17468 link same way as WPA; do not stream in dead initializers.
17470 * dwarf2out.c (dwarf2out_die_ref_for_decl,
17471 darf2out_register_external_decl): Support incremental link.
17473 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17475 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
17477 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
17479 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
17480 it down to simple_object_copy_lto_debug_sections.
17481 (run_gcc): Determine incremental LTO link time and configure
17482 lto1 into non-wpa mode, disable renaming of debug sections.
17484 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
17486 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
17487 descriptions of various incorrectly documented functions.
17489 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
17492 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17493 address check not strict.
17495 2018-05-30 Richard Biener <rguenther@suse.de>
17497 PR tree-optimization/85964
17498 * tracer.c (better_p): Drop initialized count check, we only
17499 call the function with initialized counts now.
17500 (find_best_successor): Do find a best edge if one
17501 has uninitialized count.
17502 (find_best_predecessor): Likewise. Do BB frequency check only
17503 if count is initialized.
17505 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
17507 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
17508 (aarch64_ldrstr_offset_compare): New.
17509 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
17510 load/store orderings.
17511 (aarch64_gen_adjusted_ldpstp): Likewise.
17513 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
17515 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
17516 Check for subset of GENERAL_REGS and FP_REGS.
17517 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
17520 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
17522 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
17523 and wi::to_poly_offset. Add the current offset and then check
17524 whether the sum fits, rather than using an unchecked addition of
17525 a checked term. Check for a shwi rather than a uhwi.
17526 * expr.c (get_bit_range): Use tree_to_poly_uint64.
17527 (store_constructor): Use poly_int_tree_p.
17528 (expand_expr_real_1): Likewise.
17529 * function.c (assign_temp): Likewise.
17530 * fold-const.c (const_binop): Use poly_int_tree_p and
17531 wi::to_poly_offset.
17532 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
17534 * ipa-icf-gimple.c (func_checker::compare_operand): Use
17535 to_poly_offset for MEM offsets.
17536 * ipa-icf.c (sem_variable::equals): Likewise.
17537 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
17538 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
17539 wi::to_poly_offset for BIT_FIELD_REF offsets.
17540 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
17541 wi::to_poly_offset.
17542 * var-tracking.c (emit_note_insn_var_location): Use
17543 tree_to_poly_uint64.
17545 2018-05-29 Jim Wilson <jimw@sifive.com>
17547 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
17549 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
17552 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
17553 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
17555 (sse4_1_round<mode>2): Use nonimmediate_operand
17556 for operand 1 predicate.
17558 2018-05-29 Martin Sebor <msebor@redhat.com>
17559 Richard Biener <rguenther@suse.de>
17562 * calls.c (get_size_range): Call determine_value_range instead
17563 of get_value_range..
17564 * tree-vrp.h (determine_value_range): Declared new function.
17565 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
17567 2018-05-29 Richard Biener <rguenther@suse.de>
17569 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
17570 sure to use non-pattern stmts for get_earlier_stmt arguments.
17571 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
17572 called on pattern stmts.
17573 (get_later_stmt): Likewise.
17575 2018-05-29 Martin Liska <mliska@suse.cz>
17577 PR gcov-profile/85759
17578 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
17581 2018-05-29 Jakub Jelinek <jakub@redhat.com>
17583 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
17585 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
17589 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17590 VEC_PACK_FLOAT_EXPR): New tree codes.
17591 * tree-pretty-print.c (op_code_prio): Handle
17592 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17593 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17594 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17595 * tree-inline.c (estimate_operator_cost): Likewise.
17596 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
17597 * fold-const.c (const_binop): Likewise.
17598 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17599 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17600 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17601 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17602 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17603 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17604 * expr.c (expand_expr_real_2): Likewise.
17605 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17606 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17607 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17609 * optabs.c (expand_widen_pattern_expr): For
17610 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17611 sign from result type rather than operand's type.
17612 (expand_binop_directly): For vec_packu_float_optab and
17613 vec_packs_float_optab allow result type to be different from operand's
17615 * optabs-tree.c (optab_for_tree_code): Handle
17616 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17617 VEC_PACK_FLOAT_EXPR. Formatting fixes.
17618 * tree-vect-generic.c (expand_vector_operations_1): Handle
17619 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17620 VEC_PACK_FLOAT_EXPR.
17621 * tree-vect-stmts.c (supportable_widening_operation): Handle
17623 (supportable_narrowing_operation): Handle FLOAT_EXPR.
17624 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17625 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17626 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
17627 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17629 (vec_pack<floatprefix>_float_<mode>): New expander.
17630 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17632 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17633 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17634 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17635 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17636 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17638 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17639 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17640 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17641 VEC_PACK_FLOAT_EXPR): Document.
17643 2018-05-29 Richard Biener <rguenther@suse.de>
17645 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17647 (stmt_vec_info_vec): Make pointer.
17648 (init_stmt_vec_info_vec): Remove.
17649 (free_stmt_vec_info_vec): Likewise.
17650 (set_stmt_vec_info_vec): New function.
17651 (free_stmt_vec_infos): Likewise.
17652 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17653 (set_vinfo_for_stmt): Likewise.
17654 (get_earlier_stmt): Likewise.
17655 (get_later_stmt): Likewise.
17656 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17657 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17658 (vec_info::~vec_info): Free stmt_vec_infos.
17659 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17660 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17661 (pass_slp_vectorize::execute): Likewise.
17662 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17663 (free_stmt_vec_info_vec): Likewise.
17664 (set_stmt_vec_info_vec): New function.
17665 (free_stmt_vec_infos): Likewise.
17666 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17667 the global stmt_vec_info_vec.
17668 * tree-parloops.c (gather_scalar_reductions): Use
17669 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17672 2018-05-29 Richard Biener <rguenther@suse.de>
17674 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17676 2018-05-29 Martin Liska <mliska@suse.cz>
17677 David Malcolm <dmalcolm@redhat.com>
17679 * vec.c (test_reverse): New.
17680 (vec_c_tests): Add new test.
17681 * vec.h (vl_ptr>::reverse): New function.
17683 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
17685 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17687 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17690 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
17692 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17694 2018-05-28 Richard Biener <rguenther@suse.de>
17696 PR tree-optimization/85933
17697 * tree-vect-data-refs.c (vect_record_base_alignments): Only
17698 look at stmts marked as vectorizable.
17700 2018-05-28 Richard Biener <rguenther@suse.de>
17702 PR tree-optimization/85934
17703 * tree-vect-generic.c (expand_vector_operations_1): Hoist
17704 vector boolean check before scalar optimization.
17706 2018-05-28 Jakub Jelinek <jakub@redhat.com>
17708 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17711 2018-05-28 Mark Wielaard <mark@klomp.org>
17713 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17714 if it is an expression containing a minus sign.
17716 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
17718 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17720 2018-05-27 Paul Koning <ni1d@arrl.net>
17722 * config/pdp11/pdp11.md (truncsihi2): Remove.
17724 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
17725 Chung-Ju Wu <jasonwucj@gmail.com>
17727 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17729 (unaligned_store_dw): Ditto.
17730 * config/nds32/nds32-memory-manipulation.c
17731 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17732 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17733 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17734 (emit_setmem_word_loop): Rename to ...
17735 (emit_setmem_doubleword_loop): ... this.
17736 (nds32_gen_dup_4_byte_to_word_value): New function.
17737 (nds32_gen_dup_8_byte_to_double_word_value): New function.
17738 (nds32_expand_setmem_loop): Refine implementation.
17739 (nds32_expand_setmem_loop_v3m): Ditto.
17740 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17743 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17745 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17747 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
17749 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17750 (nds32_init_machine_status): Initialize machine->attr_naked_p and
17751 machine->attr_no_prologue_p.
17752 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17753 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17754 (nds32_expand_epilogue): Consider attr_naked_p.
17755 (nds32_expand_epilogue_v3pop): Likewise.
17756 (nds32_can_use_return_insn): Likewise.
17757 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17758 attr_no_prologue_p fields.
17759 * config/nds32/nds32.opt (mret-in-naked-func): New option.
17761 2018-05-27 Jakub Jelinek <jakub@redhat.com>
17764 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17766 * config/i386/sse.md
17767 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17769 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17771 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17773 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17775 (*<floatsuffix>floatv2div2sf2): Rename to ...
17776 (*float<floatunssuffix>v2div2sf2): ... this.
17777 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17778 (float<floatunssuffix>v2div2sf2_mask): ... this.
17779 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17780 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17781 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17783 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17785 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17787 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17789 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17791 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17793 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17794 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17795 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17796 gen_ufix_truncv8dfv8si2.
17797 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17798 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17799 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17800 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17801 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17802 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17803 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17804 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17806 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
17810 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17812 2018-05-25 Jim Wilson <jimw@sifive.com>
17814 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17815 * config/riscv/riscv.c (struct machine_function): Add
17816 interrupt_handler_p and attribute_checked_p fields.
17817 (riscv_attribute_table): Add interrupt.
17818 (riscv_interrupt_type_p): New.
17819 (riscv_save_reg_p): Save extra regs for interrupt handler.
17820 (riscv_use_save_libcall): Return false for interrupt handler.
17821 (riscv_first_stack_step): Add forward declaration.
17822 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
17823 for interrupt handler with large frame. Use it for saved reg list.
17824 (riscv_expand_prologue): Move flag_stack_usage_info support to
17825 eliminate duplication.
17826 (riscv_expand_epilogue): Generate mret for interrupt handler.
17827 (riscv_epilogue_uses): New.
17828 (riscv_can_use_return_insn): Return false for interrupt handler.
17829 (riscv_function_ok_for_sibcall): Likewise.
17830 (riscv_set_current_function): Add interrupt handler support.
17831 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17832 * config/riscv/riscv.md (UNSPECV_MRET): New.
17834 (riscv_frflags, riscv_fsflags): Use tab after opcode.
17836 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17838 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
17840 PR tree-optimization/85712
17841 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17842 this candidate has already been replaced in-situ by a copy.
17844 2018-05-25 Jason Merrill <jason@redhat.com>
17846 PR c++/80485 - inline function non-zero address.
17847 * symtab.c (nonzero_address): Check DECL_COMDAT.
17849 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
17852 * config/alpha/alpha.md (ashlsi3): New insn pattern.
17853 (*ashlsi_se): Rename from *ashldi_se. Define as sign
17854 extension of SImode operation. Use const123_operand predicate.
17855 (*saddsi_1): Remove.
17856 (*saddl_se_1): Ditto.
17857 (*ssubsi_1): Ditto.
17858 (*ssubl_se_1): Ditto.
17859 * config/alpha/predicates.md (const123_operand): New predicate.
17860 * config/alpha/constraints.md (P): Use IN_RANGE.
17862 2018-05-25 Richard Biener <rguenther@suse.de>
17864 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17866 (ref_maybe_used_by_stmt_p): Likewise.
17867 (stmt_may_clobber_ref_p): Likewise.
17868 (stmt_may_clobber_ref_p_1): Likewise.
17869 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17871 (ref_maybe_used_by_stmt_p): Likewise.
17872 (stmt_may_clobber_ref_p): Likewise.
17873 (stmt_may_clobber_ref_p_1): Likewise.
17874 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17875 the alias oracle to disambiguate DRs with stmts DR analysis
17877 (vect_analyze_data_refs): Do not give up on not analyzable
17878 DRs for BB vectorization. Remove code truncating the dataref
17881 2018-05-25 Jakub Jelinek <jakub@redhat.com>
17884 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17885 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
17886 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17888 2018-05-25 Richard Biener <rguenther@suse.de>
17890 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17891 function, combining stmt data ref gathering and fatal analysis
17893 (vect_analyze_data_refs): Remove now redudnant code and simplify.
17894 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17895 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17896 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17897 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17899 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17901 PR tree-optimization/85720
17902 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17903 SCC if all partitions are builtins.
17904 (version_loop_by_alias_check): New parameter. Generate cancelable
17905 runtime alias check if all partitions are builtins.
17906 (distribute_loop): Update call to above function.
17908 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17910 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17911 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17912 (parm_default_def_partition_arg): Ditto.
17913 (set_parm_default_def_partition): Ditto.
17914 (get_parm_default_def_partitions): Ditto and make it static.
17915 (get_undefined_value_partitions): Ditto and make it static.
17916 (remove_ssa_form): Refactor call to init_var_map here.
17917 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17918 computation for loop region.
17919 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17920 (register_default_def): Delete.
17921 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17922 (parm_default_def_partition_arg): Ditto.
17923 (set_parm_default_def_partition): Ditto.
17924 (get_parm_default_def_partitions): Ditto and make it static.
17925 (get_undefined_value_partitions): Ditto and make it static.
17926 (coalesce_with_default, coalesce_with_default): Update comment.
17927 (create_coalesce_list_for_region): New func factored out from
17928 create_outofssa_var_map.
17929 (populate_coalesce_list_for_outofssa): New func factored out from
17930 create_outofssa_var_map and coalesce_ssa_name.
17931 (create_outofssa_var_map): Delete.
17932 (coalesce_ssa_name): Refactor to support live range computation.
17933 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17934 (get_parm_default_def_partitions): Delete.
17935 (get_undefined_value_partitions): Ditto.
17936 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17937 computation for loop region.
17938 (new_tree_live_info, loe_visit_block): Ditto.
17939 (live_worklist, set_var_live_on_entry): Ditto.
17940 (calculate_live_on_exit, verify_live_on_entry): Ditto.
17941 * tree-ssa-live.h (struct _var_map): New fields.
17942 (init_var_map): Change decl.
17943 (region_contains_p): New.
17945 2018-05-25 Bin Cheng <bin.cheng@arm.com>
17947 * tree-ssa-live.h (live_merge_and_clear): Delete.
17949 2018-05-25 Richard Biener <rguenther@suse.de>
17952 * tree-dump.c (dequeue_and_dump): Remove access to removed
17953 operand 2 of a SWITCH_EXPR.
17955 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17957 * doc/sourcebuild.texi (vect_double_cond_arith): Include
17958 multiplication and division.
17959 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17960 (cond_udiv@var{m}, cond_umod@var{m}): Document.
17961 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17962 (cond_udiv_optab, cond_umod_optab): New optabs.
17963 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17964 (IFN_COND_RDIV): New internal functions.
17965 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17966 TRUNC_MOD_EXPR and RDIV_EXPR.
17967 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17968 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17970 (SVE_INT_BINARY): Include mult.
17971 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17972 (optab, sve_int_op): Handle mult.
17973 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17975 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17976 for SVE_INT_BINARY_SD.
17978 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17980 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17981 (optab, sve_int_op): Handle div and udiv.
17982 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17983 for SVE_INT_BINARY_SD.
17984 (*<optab><mode>3): New insn for the same.
17986 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17988 * tree-vect-patterns.c: Include predict.h.
17989 (vect_recog_divmod_pattern): Restrict check for division support
17990 to when optimizing for size.
17992 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
17994 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17995 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17996 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17997 (gimple_match_op::set_op): Likewise.
17998 (gimple_resimplify4): Declare.
17999 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
18000 (expr::gen_transform): Likewise.
18001 (decision_tree::gen): Generate a simplification routine for 4 operands.
18002 * gimple-match-head.c (gimple_simplify): Add an overload for
18003 4 operands. In the top-level function, handle up to 4 call
18004 arguments and call gimple_resimplify4.
18005 (gimple_resimplify4): New function.
18006 (build_call_internal): Pass a fourth operand.
18007 (maybe_push_to_seq): Likewise.
18008 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
18009 Fold VEC_COND_EXPRs of an operation and a default value into
18010 an IFN_COND_* function if possible.
18011 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
18013 (SVE_COND_FP_BINARY): Include them.
18014 (optab, sve_fp_op): Handle them.
18015 (SVE_INT_BINARY_REV): New code iterator.
18016 (SVE_COND_FP_BINARY_REV): New int iterator.
18017 (commutative): New int attribute.
18018 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
18020 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
18022 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
18023 (*cond_<optab><mode>): New patterns for reversed operands.
18025 2018-05-25 Richard Biener <rguenther@suse.de>
18027 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
18028 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
18029 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
18030 (STMT_VINFO_GROUPED_ACCESS): Adjust.
18031 * tree-vect-data-refs.c (everywhere): Adjust users.
18032 * tree-vect-loop.c (everywhere): Likewise.
18033 * tree-vect-slp.c (everywhere): Likewise.
18034 * tree-vect-stmts.c (everywhere): Likewise.
18035 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
18037 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
18039 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
18041 (gcc_cv_as_section_exclude): ... this.
18042 Try Solaris as #exclude syntax.
18043 * configure: Regenerate.
18044 * config.in: Regenerate.
18045 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
18047 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
18048 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
18050 * varasm.c (default_elf_asm_named_section): Don't check if
18051 HAVE_GAS_SECTION_EXCLUDE is defined.
18053 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18055 * doc/md.texi: Update the documentation of the cond_* optabs
18056 to mention the new final operand. Fix GET_MODE_NUNITS call.
18057 Describe the scalar case too.
18058 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
18059 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
18061 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
18062 (get_conditional_internal_fn): Update comment.
18063 * tree-vect-loop.c (vectorizable_reduction): Pass the original
18064 accumulator value as a final argument to conditional functions.
18065 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
18066 a define_expand and add an "else" operand. Assert for now that
18067 the else operand is equal to operand 2. Use SVE_INT_BINARY and
18068 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
18069 (*cond_<optab><mode>): New patterns.
18070 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
18071 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
18072 (UNSPEC_COND_EOR): Delete.
18073 (optab): Remove associated mappings.
18074 (SVE_INT_BINARY): New code iterator.
18075 (sve_int_op): Remove int attribute and add "minus" to the code
18077 (SVE_COND_INT_OP): Delete.
18078 (SVE_COND_FP_OP): Rename to...
18079 (SVE_COND_FP_BINARY): ...this.
18081 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
18083 * optabs.c (can_reuse_operands_p): New function.
18084 (maybe_legitimize_operands): Try to reuse the results for
18087 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18089 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
18090 Add {q} suffix to insn mnemonic.
18092 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18094 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
18095 (msp430_warn_func_return): New.
18097 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
18099 * fold-const.c (tree_nonzero_bits): New function.
18100 * fold-const.h (tree_nonzero_bits): Likewise.
18101 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
18102 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
18104 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
18108 * varasm.c (assemble_alias): Check ifunc_resolver only on
18111 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
18114 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
18115 when memory input operand is handled.
18117 2018-05-24 Luis Machado <luis.machado@linaro.org>
18119 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
18121 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
18123 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18125 * match.pd: Delay FMA folds until after vectorization.
18127 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
18130 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18131 address check not strict.
18133 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
18135 * gimple-match.h (gimple_match_op): New class.
18136 (mprts_hook): Replace parameters with a gimple_match_op *.
18137 (maybe_build_generic_op): Likewise.
18138 (gimple_simplified_result_is_gimple_val): Replace parameters with
18139 a const gimple_match_op *.
18140 (gimple_simplify): Replace code_helper * and tree * parameters with
18141 a gimple_match_op * parameter.
18142 (gimple_resimplify1): Replace code_helper *, tree and tree *
18143 parameters with a gimple_match_op * parameter.
18144 (gimple_resimplify2): Likewise.
18145 (gimple_resimplify3): Likewise.
18146 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
18147 parameters with a gimple_match_op * parameter.
18148 * gimple-match-head.c (gimple_simplify): Change prototypes of
18149 auto-generated functions to take a gimple_match_op * instead of
18150 separate code_helper * and tree * parameters. Make the same
18151 change in the top-level overload and update calls to the
18152 gimple_resimplify routines. Update calls to the auto-generated
18153 functions and to maybe_push_res_to_seq in the publicly-facing
18154 operation-specific gimple_simplify overloads.
18155 (gimple_match_op::MAX_NUM_OPS): Define.
18156 (gimple_resimplify1): Replace rcode and ops with a single res_op
18157 parameter. Update call to gimple_simplify.
18158 (gimple_resimplify2): Likewise.
18159 (gimple_resimplify3): Likewise.
18160 (mprts_hook): Replace parameters with a gimple_match_op *.
18161 (maybe_build_generic_op): Likewise.
18162 (build_call_internal): Replace type, nargs and ops with
18163 a gimple_match_op *.
18164 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
18165 with a single gimple_match_op *. Update calls to mprts_hook,
18166 build_call_internal and gimple_simplified_result_is_gimple_val.
18167 Factor out code that is common to the tree_code and combined_fn cases.
18168 * genmatch.c (expr::gen_transform): Replace tem_code and
18169 tem_ops with a gimple_match_op called tem_op. Update calls
18170 to the gimple_resimplify functions and maybe_push_res_to_seq.
18171 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
18172 res_ops. Update call to the gimple_resimplify functions.
18173 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
18174 (decision_tree::gen): Make the functions take a gimple_match_op *
18175 called res_op instead of separate res_code and res_ops parameters.
18176 Update call accordingly.
18177 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
18178 and ops with a single res_op parameter. Update calls to
18179 maybe_build_generic_op and maybe_push_res_to_seq.
18180 (fold_stmt_1): Update calls to gimple_simplify and
18181 replace_stmt_with_simplification.
18182 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
18183 and gimple_simplified_result_is_gimple_val.
18184 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
18186 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
18187 with a gimple_match_op *.
18188 (vn_nary_build_or_lookup): Likewise. Update call to
18189 vn_nary_build_or_lookup_1.
18190 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
18191 gimple_match_op *. Update calls to the gimple_resimplify routines
18192 and to gimple_simplified_result_is_gimple_val.
18193 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
18194 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
18195 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
18196 (visit_nary_op): Likewise.
18197 (visit_reference_op_load): Likewise.
18199 2018-05-23 Luis Machado <luis.machado@linaro.org>
18201 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
18202 modifier for printing the step amount.
18204 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
18207 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
18210 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
18212 * doc/sourcebuild.texi (Endianness): New subsubsection.
18214 2018-05-23 Luis Machado <luis.machado@linaro.org>
18216 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18217 <prefetch_dynamic_strides>: New const bool field.
18218 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18219 prefetch_dynamic_strides.
18220 (exynosm1_prefetch_tune): Likewise.
18221 (thunderxt88_prefetch_tune): Likewise.
18222 (thunderx_prefetch_tune): Likewise.
18223 (thunderx2t99_prefetch_tune): Likewise.
18224 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
18226 (aarch64_override_options_internal): Update to set
18227 PARAM_PREFETCH_DYNAMIC_STRIDES.
18228 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
18229 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
18230 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
18231 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
18232 prefetch-dynamic-strides setting.
18234 2018-05-23 Luis Machado <luis.machado@linaro.org>
18236 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
18237 <minimum_stride>: New const int field.
18238 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
18239 minimum_stride field defaulting to -1.
18240 (exynosm1_prefetch_tune): Likewise.
18241 (thunderxt88_prefetch_tune): Likewise.
18242 (thunderx_prefetch_tune): Likewise.
18243 (thunderx2t99_prefetch_tune): Likewise.
18244 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
18245 <default_opt_level>: Set to 3.
18246 (aarch64_override_options_internal): Update to set
18247 PARAM_PREFETCH_MINIMUM_STRIDE.
18248 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
18249 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
18250 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
18251 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
18252 stride is constant and is below the minimum stride threshold.
18254 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18256 * config/arm/arm-cpus.in (mode26): Delete.
18257 (armv4): Delete mode26 reference.
18258 * config/arm/arm.c (arm_configure_build_target): Delete use of
18261 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18263 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
18265 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
18266 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
18268 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
18269 (floatunsdidf2): Ditto.
18271 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
18273 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
18274 (fixuns_trunc<mode>si2_avx512f): Ditto.
18275 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
18276 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
18277 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
18279 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18281 PR rtl-optimization/79985
18282 * df-scan.c (df_insn_refs_collect): Remove special case for
18283 global registers and asm statements.
18285 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
18287 * extend.texi (Global Register Variables): Rewrite the bullet list.
18288 Note that the register is available for allocation. Note that access
18289 via inline asm must use constraints. Add note about async-signal
18290 handlers. Remove paragraph about automagic register selection.
18292 2018-05-23 Richard Biener <rguenther@suse.de>
18294 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
18295 of fixed offset from memset VN.
18297 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
18299 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
18300 first_interp field.
18301 (alloc_cand_and_find_basis): Initialize first_interp field.
18302 (slsr_process_mul): Modify first_interp field.
18303 (slsr_process_add): Likewise.
18304 (slsr_process_cast): Modify first_interp field for each new
18306 (slsr_process_copy): Likewise.
18307 (dump_candidate): Dump first_interp field.
18308 (replace_mult_candidate): Process all interpretations, not just
18310 (replace_rhs_if_not_dup): Likewise.
18311 (replace_one_candidate): Likewise.
18313 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
18315 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
18317 (aarch64_needs_frame_chain): New function.
18318 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
18320 2018-05-23 Sudakshina Das <sudi.das@arm.com>
18323 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
18324 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
18325 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
18326 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
18327 as true for strict-align.
18328 (aarch64_can_inline_p): Perform checks even when callee has no
18329 attributes to check for strict alignment.
18330 * doc/extend.texi (AArch64 Function Attributes): Document
18332 * doc/invoke.texi: (AArch64 Options): Likewise.
18334 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
18336 PR tree-optimization/85853
18337 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
18338 the handling of the root of the node to...
18339 (vect_slp_analyze_node_operations_1): ...this new function,
18340 and run the whole thing with the child nodes' def types
18341 set according to their SLP node's def type.
18343 2018-05-23 Richard Biener <rguenther@suse.de>
18345 PR middle-end/85874
18346 * tree-data-ref.c (create_runtime_alias_checks): Defer
18347 and ignore overflow warnings.
18349 2018-05-23 Yury Gribov <tetra2005@gmail.com>
18351 PR tree-optimization/85822
18352 * tree-vrp.c (is_masked_range_test): Fix handling of negative
18355 2018-05-23 Richard Biener <rguenther@suse.de>
18357 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18358 memset constants via native_interpret_expr.
18360 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
18363 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
18365 (cgraph_node::create_alias): Likewise.
18366 (cgraph_node::get_availability): Check ifunc_resolver instead
18367 of looking up ifunc attribute.
18368 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
18369 * varasm.c (do_assemble_alias): Likewise.
18370 (assemble_alias): Likewise.
18371 (default_binds_local_p_3): Likewise.
18372 * cgraph.h (cgraph_node): Add ifunc_resolver.
18373 (cgraph_node::only_called_directly_or_aliased_p): Return false
18374 for IFUNC resolver.
18375 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
18377 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
18378 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
18379 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
18380 instead of looking up ifunc attribute.
18382 2018-05-22 Luis Machado <luis.machado@linaro.org>
18384 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
18386 2018-05-22 Martin Sebor <msebor@redhat.com>
18388 PR middle-end/85359
18389 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
18390 only when expasion succeeds.
18391 (expand_builtin_strcmp): Same.
18392 (expand_builtin_strncmp): Same.
18394 2018-05-22 Martin Sebor <msebor@redhat.com>
18396 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
18398 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18399 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18401 * config/aarch64/aarch64-ldpstp.md: Replace uses of
18402 aarch64_mem_pair_operand with memory_operand and delete operand swapping
18404 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18405 Add check for legitimate_address.
18406 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
18407 (aarch64_swap_ldrstr_operands): New.
18408 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
18411 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
18412 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18414 * config/aarch64/aarch64.md: New patterns to generate stp
18416 (store_pair_sw, store_pair_dw): New patterns to generate stp for
18417 single words and double words.
18418 (load_pair_sw, load_pair_dw): Likewise.
18419 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
18421 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
18423 * config/aarch64/aarch64-ldpstp.md: Modify peephole
18424 for different mode ldpstp and add peephole for merged zero stores.
18425 Likewise for loads.
18426 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
18428 (aarch64_gen_store_pair): Rename calls to match new patterns.
18429 (aarch64_gen_load_pair): Rename calls to match new patterns.
18430 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
18431 (load_pair<DREG:mode><DREG2:mode>): ... This.
18432 (store_pair<mode>): Rename to...
18433 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
18434 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
18435 New mode iterators.
18436 (V_INT_EQUIV): Handle SImode.
18437 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
18440 2018-05-22 Martin Sebor <msebor@redhat.com>
18443 * calls.c (maybe_warn_nonstring_arg): Use string length to set
18444 or ajust the presumed bound on an operation to avoid unnecessary
18447 2018-05-22 Martin Sebor <msebor@redhat.com>
18449 PR tree-optimization/85826
18450 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
18451 assuming that a DECL necesarily has a constant size.
18453 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
18455 PR middle-end/85862
18456 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
18458 2018-05-22 Richard Biener <rguenther@suse.de>
18460 PR tree-optimization/85834
18461 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
18462 non-constant and non-zero memset arguments.
18464 2018-05-22 Martin Liska <mliska@suse.cz>
18467 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
18469 2018-05-22 Richard Biener <rguenther@suse.de>
18471 PR tree-optimization/85863
18472 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
18473 comparisons when vectype is specified.
18474 (vectorizable_condition): Do not specify vectype for
18475 vect_is_simple_cond when SLP vectorizing.
18477 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
18480 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
18481 define __ibm128 as long double.
18482 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
18483 as a distinct type when IEEE 128-bit support is enabled.
18484 (init_float128_ieee): Fix up conversions between IFmode and IEEE
18485 128-bit types to use the correct functions.
18486 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
18487 convert between 128-bit floating point types that have different
18488 modes but the same representation, instead of using gen_lowpart to
18490 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
18492 (IFKF_reg): New attributes to give the register constraints for
18494 (extend<mode>tf2_internal): New insns to mark an explicit
18495 conversion between 128-bit floating point types that have a
18496 different mode but share the same representation.
18498 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
18500 PR tree-optimization/85814
18501 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
18502 a null return from get_strinfo when unsharing the next
18503 strinfo in the chain.
18505 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
18508 * varasm.c (weak_finish): Clean up weak_decls.
18510 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18512 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
18513 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
18514 UNSPEC_UADALP values.
18515 * config/aarch64/iterators.md (ABAL): New int iterator.
18518 (sur): Add mappings for the above.
18519 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
18521 (aarch64_<sur>abal<mode>_4): Likewise.
18522 (aarch64_<sur>adalp<mode>_3): Likewise.
18523 (<sur>sadv16qi): New define_expand.
18525 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
18527 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
18528 (*movdf_internal): Ditto.
18529 (*rcpsf2_sse): Ditto.
18530 (*rsqrtsf2_sse): Ditto.
18531 (*sqrt<mode>2_sse): Ditto.
18533 2018-05-21 Tamar Christina <tamar.christina@arm.com>
18535 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
18537 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
18538 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
18539 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
18540 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
18542 * config/aarch64/arm_neon.h: Likewise.
18543 * config/aarch64/iterators.md (VQ_I): New.
18545 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
18547 * config.gcc: Add arc/t-multilib-linux to tmake_file for
18549 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
18552 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18554 * config/nds32/constraints.md (S): New constraint.
18555 * config/nds32/nds32.md (call_internal): Use constraint S.
18556 (call_value_internal): Likewise.
18557 (sibcall_internal): Likewise.
18558 (sibcall_value_internal): Likewise.
18560 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18561 Chung-Ju Wu <jasonwucj@gmail.com>
18563 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
18564 into consideration.
18566 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
18567 Chung-Ju Wu <jasonwucj@gmail.com>
18569 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
18570 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
18571 (nds32_rtx_costs_impl): Simplify.
18572 (nds32_address_cost_impl): Simplify.
18573 (nds32_init_rtx_costs): New function.
18574 (nds32_rtx_costs_speed_prefer): Likewise.
18575 (nds32_rtx_costs_size_prefer): Likewise.
18576 (nds32_address_cost_speed_prefer): Likewise.
18577 (nds32_address_cost_speed_fwprop): Likewise.
18578 (nds32_address_cost_size_prefer): Likewise.
18579 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
18580 * config/nds32/nds32.c (nds32_option_override): Use
18581 nds32_init_rtx_costs function.
18583 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
18585 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
18586 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
18587 (TARGET_PIPELINE_N8): Likewise.
18588 (TARGET_PIPELINE_N10): Likewise.
18589 (TARGET_PIPELINE_N13): Likewise.
18590 (TARGET_PIPELINE_GRAYWOLF): Likewise.
18592 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
18594 * config/nds32/nds32-fpu.md: Update copyright year.
18596 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18598 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18600 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18602 * config/nds32/nds32.c
18603 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18604 * config/nds32/nds32.opt (minline-asm-r15): New option.
18606 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18608 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18610 * config/nds32/nds32.md (abssi2): New pattern.
18612 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
18614 * config/i386/i386.md (rex64namesuffix): New mode attribute.
18615 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18616 Merge insn pattern from sse_cvtsi2ss<round_name> and
18617 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18618 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18619 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18620 using SWI48 mode iterator.
18621 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18622 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18623 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18624 pattern from sse_cvttss2si<round_saeonly_name>
18625 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18626 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18627 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18628 using SWI48 mode iterator.
18629 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18630 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18631 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18632 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18633 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18634 using SWI48 mode iterator.
18635 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18636 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18637 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18638 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18639 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18640 SWI48 mode iterator.
18641 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18642 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18643 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18644 pattern from sse_cvttsd2si<round_saeonly_name>
18645 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18647 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18649 * config/nds32/nds32-md-auxiliary.c
18650 (nds32_valid_smw_lwm_base_p): Refine.
18651 (nds32_output_smw_single_word): Refine.
18652 (nds32_output_smw_double_word): New.
18653 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18655 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18657 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18658 (nds32_output_stack_pop): Refine.
18659 (nds32_expand_unaligned_load): Refine.
18660 (nds32_expand_unaligned_store): Refine.
18662 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18663 Chung-Ju Wu <jasonwucj@gmail.com>
18665 * config/nds32/constants.md: Add TP_REGNUM constant.
18666 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18667 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18669 * config/nds32/nds32-doubleword.md: Consider flag_pic.
18670 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18671 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18672 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18673 and PIC code generation.
18674 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18676 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18678 * config/nds32/nds32.md: Support TLS and PIC.
18679 * config/nds32/nds32.c: Support TLS and PIC.
18680 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18681 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18684 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
18686 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18687 mode with E_ prefix.
18689 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
18690 Chung-Ju Wu <jasonwucj@gmail.com>
18692 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18693 * config/nds32/nds32-md-auxiliary.c
18694 (symbolic_reference_mentioned_p): New.
18695 (nds32_legitimize_ict_address): New.
18696 (nds32_expand_ict_move): New.
18697 (nds32_indirect_call_referenced_p): New.
18698 (nds32_symbol_binds_local_p): Delete.
18699 (nds32_long_call_p): Modify.
18700 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18701 * config/nds32/nds32-protos.h
18702 (symbolic_reference_mentioned_p): Declare.
18703 (nds32_legitimize_ict_address): Declare.
18704 (nds32_expand_ict_move): Declare.
18705 (nds32_indirect_call_referenced_p): Declare.
18706 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18707 (nds32_relax_group): Use nds32_ict_const_p as condition.
18708 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18709 (nds32_asm_file_start): Output ict_model directive in asm code.
18710 (nds32_legitimate_address_p): Consider indirect call.
18711 (nds32_print_operand): Consider indirect call.
18712 (nds32_print_operand_address): Consider indirect call.
18713 (nds32_insert_attributes): Handle "indirect_call" attribute.
18714 (TARGET_LEGITIMATE_ADDRESS_P): Define.
18715 (TARGET_LEGITIMATE_CONSTANT_P): Define.
18716 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18717 (TARGET_DELEGITIMIZE_ADDRESS): Define.
18718 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18719 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18720 (TARGET_ICT_MODEL_SMALL): Define.
18721 (TARGET_ICT_MODEL_LARGE): Define.
18722 * config/nds32/nds32.md (movsi): Consider ict model.
18723 (call, call_value): Consider ict model.
18724 (sibcall, sibcall_value): Consider ict model.
18725 * config/nds32/nds32.opt (mict-model): New option.
18726 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18729 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
18730 Monk Chiang <sh.chiang04@gmail.com>
18731 Jim Wilson <jimw@sifive.com>
18733 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18734 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
18735 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18736 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18737 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
18738 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18739 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18740 compute save_libcall_adjustment properly.
18741 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18742 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18743 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18744 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18745 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18746 (ABI_SPEC): Handle mabi=ilp32e.
18747 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18748 (RVE): Add RVE mask.
18749 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18750 <-march>: Add rv32e as an example.
18752 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
18755 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18756 (intra_create_variable_infos): Handle C++ constructors.
18758 2018-05-18 Martin Liska <mliska@suse.cz>
18760 * passes.def: Remove a redundant pass.
18762 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
18765 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18767 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18769 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18771 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18773 (armv2, armv2a, armv3, armv3m): Delete architectures.
18774 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18775 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18776 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18778 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18779 (*mulsidi3adddi): Likewise.
18780 (mulsidi3): Likewise.
18781 (*mulsidi3_nov6): Likewise.
18782 (umulsidi3): Likewise.
18783 (umulsidi3_nov6): Likewise.
18784 (umaddsidi4): Likewise.
18785 (*umulsidi3adddi): Likewise.
18786 (smulsi3_highpart): Likewise.
18787 (*smulsi3_highpart_nov6): Likewise.
18788 (umulsi3_highpart): Likewise.
18789 (*umulsi3_highpart_nov6): Likewise.
18790 * config/arm/arm.h (arm_arch3m): Delete.
18791 * config/arm/arm.c (arm_arch3m): Delete.
18792 (arm_option_override_internal): Update armv3-related comment.
18793 (arm_configure_build_target): Delete use of isa_bit_mode32.
18794 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18795 (arm_rtx_costs_internal): Delete check of arm_arch3m.
18796 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18797 (mulsa3): Likewise.
18798 (mulusa3): Likewise.
18799 * config/arm/arm-protos.h (arm_arch3m): Delete.
18800 * config/arm/arm-tables.opt: Regenerate.
18801 * config/arm/arm-tune.md: Likewise.
18802 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18803 deleted architectures.
18805 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18807 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18808 (armv5t, armv5te): New features.
18809 (ARMv5, ARMv5e): Delete fgroups.
18810 (ARMv5t, ARMv5te): Adjust for above changes.
18811 (ARMv6m): Likewise.
18812 (armv5, armv5e): Delete arches.
18813 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18815 (*call_reg_arm): Likewise.
18816 (*call_value_reg_armv5): Likewise.
18817 (*call_value_reg_arm): Likewise.
18818 (*call_symbol): Likewise.
18819 (*call_value_symbol): Likewise.
18820 (*sibcall_insn): Likewise.
18821 (*sibcall_value_insn): Likewise.
18822 (clzsi2): Likewise.
18823 (prefetch): Likewise.
18824 (define_split and define_peephole2 dependent on arm_arch5):
18826 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18828 (TARGET_ARM_QBIT): Likewise.
18829 (TARGET_DSP_MULTIPLY): Likewise.
18830 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18831 (arm_arch5, arm_arch5e): Delete.
18832 (arm_arch5t, arm_arch5te): Declare.
18833 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18834 (arm_arch5t): Declare.
18835 (arm_option_reconfigure_globals): Update for the above.
18836 (arm_options_perform_arch_sanity_checks): Update comment, replace
18837 use of arm_arch5 with arm_arch5t.
18838 (use_return_insn): Likewise.
18839 (arm_emit_call_insn): Likewise.
18840 (output_return_instruction): Likewise.
18841 (arm_final_prescan_insn): Likewise.
18842 (arm_coproc_builtin_available): Likewise.
18843 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18844 arm_arch5e with arm_arch5t and arm_arch5te.
18845 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18846 (arm_arch5t, arm_arch5te): Declare.
18847 * config/arm/arm-tables.opt: Regenerate.
18848 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18849 * config/arm/t-multilib: Likewise.
18850 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18851 instead of arm_arch5.
18852 (*call_reg_thumb1): Likewise.
18853 (*call_value_reg_thumb1_v5): Likewise.
18854 (*call_value_reg_thumb1): Likewise.
18855 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18857 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18859 2018-05-18 Martin Liska <mliska@suse.cz>
18861 PR gcov-profile/84846
18862 * doc/gcov.texi: Document -t option of gcov tool.
18864 2018-05-18 Martin Liska <mliska@suse.cz>
18866 PR gcov-profile/84846
18867 * gcov.c (print_usage): Add new -t option.
18868 (process_args): Handle the option.
18869 (generate_results): Use stdout as output when requested by
18872 2018-05-18 Martin Liska <mliska@suse.cz>
18874 PR gcov-profile/84846
18875 * coverage.c (coverage_init): Write PWD to .gcno file.
18876 * doc/gcov.texi: Document how working directory is printed.
18877 * gcov-dump.c (dump_gcov_file): Print PWD.
18878 * gcov.c (output_intermediate_file): Likewise.
18879 (read_graph_file): Read PWD string.
18880 (output_lines): Print PWD.
18882 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18884 PR middle-end/85817
18885 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18886 for retval and return false if all args to phi are zero.
18888 2018-05-18 Richard Biener <rguenther@suse.de>
18890 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18892 (evrp_dom_walker::before_dom_children): Call it.
18894 2018-05-18 Richard Biener <rguenther@suse.de>
18896 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18897 results when processing array refs with variable index.
18899 2018-05-18 Toon Moene <toon@moene.org>
18901 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18902 directly after that of -floop-interchange. Indicate that both
18903 options are enabled by default when specifying -O3.
18905 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18907 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18908 iterator. Delete separate integer-mode vec_set<mode> expander.
18909 (aarch64_simd_vec_setv2di): Delete.
18910 (vec_setv2di): Delete.
18911 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18912 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
18913 the "w, r" alternative.
18915 2018-05-18 Martin Liska <mliska@suse.cz>
18917 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18918 * tree-pass.h (make_pass_lower_switch_O0): New function.
18919 * tree-switch-conversion.c (node_has_low_bound): Remove.
18920 (node_has_high_bound): Likewise.
18921 (node_is_bounded): Likewise.
18922 (class pass_lower_switch): Make it a template type and create
18924 (pass_lower_switch::execute): Add template argument.
18925 (make_pass_lower_switch): New function.
18926 (make_pass_lower_switch_O0): New function.
18927 (do_jump_if_equal): Remove.
18928 (emit_case_nodes): Simplify to just handle all 3 cases and leave
18929 all the hard work to tree optimization passes.
18931 2018-05-18 Martin Liska <mliska@suse.cz>
18933 * dbgcnt.c (limit_low): Renamed from limit.
18934 (limit_high): New variable.
18935 (dbg_cnt_is_enabled): Check for upper limit.
18936 (dbg_cnt): Adjust dumping.
18937 (dbg_cnt_set_limit_by_index): Add new argument for high
18939 (dbg_cnt_set_limit_by_name): Likewise.
18940 (dbg_cnt_process_single_pair): Parse new format.
18941 (dbg_cnt_process_opt): Use strtok.
18942 (dbg_cnt_list_all_counters): Remove 'value' and add
18944 * doc/invoke.texi: Document changes.
18946 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
18948 * doc/sourcebuild.texi (scalar_all_fma): Document.
18949 * tree.def (FMA_EXPR): Delete.
18950 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18951 * internal-fn.c (ternary_direct): New macro.
18952 (expand_ternary_optab_fn): Likewise.
18953 (direct_ternary_optab_supported_p): Likewise.
18954 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18955 * builtins.c (fold_builtin_fma): Delete.
18956 (fold_builtin_3): Don't call it.
18957 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18958 * expr.c (expand_expr_real_2): Likewise.
18959 * fold-const.c (operand_equal_p): Likewise.
18960 (fold_ternary_loc): Likewise.
18961 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18962 * gimple.c (DEFTREECODE): Likewise.
18963 * gimplify.c (gimplify_expr): Likewise.
18964 * optabs-tree.c (optab_for_tree_code): Likewise.
18965 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18966 * tree-eh.c (operation_could_trap_p): Likewise.
18967 (stmt_could_throw_1_p): Likewise.
18968 * tree-inline.c (estimate_operator_cost): Likewise.
18969 * tree-pretty-print.c (dump_generic_node): Likewise.
18970 (op_code_prio): Likewise.
18971 * tree-ssa-loop-im.c (stmt_cost): Likewise.
18972 * tree-ssa-operands.c (get_expr_operands): Likewise.
18973 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18974 * fold-const-call.h (fold_fma): Delete.
18975 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18976 CFN_FNMA and CFN_FNMS.
18977 (fold_fma): Delete.
18978 * genmatch.c (combined_fn): New enum.
18979 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18980 (commutative_op): New function.
18981 (commutate): Use it. Handle more than 2 operands.
18982 (dt_operand::gen_gimple_expr): Use commutative_op.
18983 (parser::parse_expr): Allow :c to be used with non-binary
18984 operators if the commutative operand is known.
18985 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18986 CFN_FMS, CFN_FNMA and CFN_FNMS.
18987 (backprop::process_assign_use): Remove FMA_EXPR handling.
18988 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18989 (gen_hsa_fma): New function.
18990 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18991 IFN_FNMA and IFN_FNMS.
18992 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18993 * gimple-fold.h (follow_all_ssa_edges): Declare.
18994 * gimple-fold.c (follow_all_ssa_edges): New function.
18995 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18996 gimple_build interface and use follow_all_ssa_edges to fold the result.
18997 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18998 instead of checking for optabs directly.
18999 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
19000 rather than FMA_EXPRs.
19001 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
19002 call to IFN_FMA instead of an FMA_EXPR.
19004 2018-05-17 Jim Wilson <jimw@sifive.com>
19006 * expr.c (do_tablejump): When converting index to Pmode, if we have a
19007 sign extended promoted subreg, and the range does not have the sign bit
19008 set, then do a sign extend.
19010 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
19011 test, check for sign extended subreg and/or constant operands, and
19012 do a sign extend in that case.
19014 2018-05-17 Steve Ellcey <sellcey@cavium.com>
19016 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
19017 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
19019 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
19020 Change logics_shift_reg to logics_shift_imm.
19021 (thunderx2t99_fp_loadpair_basic): Delete.
19022 (thunderx2t99_fp_storepair_basic): Delete.
19023 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
19024 (thunderx2t99_asimd_polynomial): Delete.
19025 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
19026 and neon_fp_mul_d_scalar_q.
19027 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
19028 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
19029 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
19030 (thunderx2t99_asimd_lut): Add missing tbl types.
19031 (thunderx2t99_asimd_ext): Delete.
19032 (thunderx2t99_asimd_load1_1_mult): Delete.
19033 (thunderx2t99_asimd_load1_2_mult): Delete.
19034 (thunderx2t99_asimd_load1_ldp): New.
19035 (thunderx2t99_asimd_load1): New.
19036 (thunderx2t99_asimd_load2): Add missing *load2* types.
19037 (thunderx2t99_asimd_load3): New.
19038 (thunderx2t99_asimd_load4): New.
19039 (thunderx2t99_asimd_store1_1_mult): Delete.
19040 (thunderx2t99_asimd_store1_2_mult): Delete.
19041 (thunderx2t99_asimd_store2_mult): Delete.
19042 (thunderx2t99_asimd_store2_onelane): Delete.
19043 (thunderx2t99_asimd_store_stp): New.
19044 (thunderx2t99_asimd_store1): New.
19045 (thunderx2t99_asimd_store2): New.
19046 (thunderx2t99_asimd_store3): New.
19047 (thunderx2t99_asimd_store4): New.
19049 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
19051 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
19052 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
19054 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
19055 Segher Boessenkool <segher@kernel.crashing.org>
19058 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
19061 2018-05-17 Richard Biener <rguenther@suse.de>
19063 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
19064 for pruning loop and prune defs feeding only already visited PHIs.
19066 2018-05-17 Richard Biener <rguenther@suse.de>
19068 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
19070 2018-05-17 Bin Cheng <bin.cheng@arm.com>
19071 Richard Biener <rguenther@suse.de>
19073 PR tree-optimization/85793
19074 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
19075 for VMAT_ELEMENTWISE.
19077 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19079 * internal-fn.h (lookup_internal_fn): Declare
19080 * internal-fn.c (lookup_internal_fn): New function.
19081 * gimple.c (gimple_build_call_from_tree): Handle calls to
19082 internal functions.
19083 * gimple-pretty-print.c (dump_gimple_call): Print "." before
19084 internal function names.
19085 * tree-pretty-print.c (dump_generic_node): Likewise.
19086 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
19088 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
19090 * gimple-fold.h (gimple_build): Make the function forms take
19091 combined_fn rather than built_in_function.
19092 (gimple_simplify): Likewise.
19093 * gimple-match-head.c (gimple_simplify): Likewise.
19094 * gimple-fold.c (gimple_build): Likewise.
19095 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
19096 rather than gimple_build_call_internal.
19097 (get_initial_defs_for_reduction): Likewise.
19098 (vect_create_epilog_for_reduction): Likewise.
19099 (vectorizable_live_operation): Likewise.
19101 2018-05-17 Martin Liska <mliska@suse.cz>
19103 * gimple-ssa-sprintf.c (format_directive): Do not use
19104 space in between 'G_' and '('.
19106 2018-05-17 Jakub Jelinek <jakub@redhat.com>
19109 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
19110 even if the mask is not all ones.
19113 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
19115 (ix86_gimple_fold_builtin): Likewise.
19118 * config/i386/i386.c: Include tree-vector-builder.h.
19119 (ix86_vector_shift_count): New function.
19120 (ix86_fold_builtin): Fold shift builtins by scalar count.
19121 (ix86_gimple_fold_builtin): Likewise.
19123 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
19124 _mm512_setzero): New intrinsics.
19126 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
19127 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19129 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
19130 code generation for cases where splatting a value is not useful.
19131 * simplify-rtx.c (simplify_ternary_operation): Simplify
19132 vec_merge across a vec_duplicate and a paradoxical subreg forming
19133 a vector mode to a vec_concat.
19135 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
19137 * config.gcc: Support "goldmont-plus".
19138 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19140 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19141 PROCESSOR_GOLDMONT_PLUS.
19142 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
19143 (processor_target_table): Add "goldmont-plus".
19144 (PTA_GOLDMONT_PLUS): Define.
19145 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
19146 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
19147 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
19148 (fold_builtin_cpu): Add "goldmont-plus".
19149 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
19150 (ix86_option_override_internal): Add "goldmont-plus".
19151 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
19152 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
19153 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
19154 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
19156 2018-05-17 Richard Biener <rguenther@suse.de>
19158 PR tree-optimization/85757
19159 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
19160 remove defs that only feed that PHI from further processing.
19162 2018-05-16 Jim Wilson <jimw@sifive.com>
19164 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
19166 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
19168 2018-05-16 Mark Wielaard <mark@klomp.org>
19170 * dwarf2out.c (count_index_strings): New function.
19171 (output_indirect_strings): Call count_index_strings and generate
19172 header for dwarf_version >= 5.
19174 2018-05-16 Mark Wielaard <mark@klomp.org>
19176 * dwarf2out.c (dwarf_FORM): New function.
19177 (set_indirect_string): Use dwarf_FORM.
19178 (reset_indirect_string): Likewise.
19179 (size_of_die): Likewise.
19180 (value_format): Likewise.
19181 (output_die): Likewise.
19182 (add_skeleton_AT_string): Likewise.
19183 (output_macinfo_op): Likewise.
19184 (index_string): Likewise.
19185 (output_index_string_offset): Likewise.
19186 (output_index_string): Likewise.
19187 (count_index_strings): Likewise.
19189 2018-05-16 Carl Love <cel@us.ibm.com>
19191 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19192 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
19194 2018-05-16 Martin Jambor <mjambor@suse.cz>
19196 * ipa-prop.c (ipa_free_all_edge_args): Remove.
19197 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
19199 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
19201 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
19202 (fnma<mode>4): Likewise.
19203 (fms<mode>4): Likewise.
19204 (fnms<mode>4): Likewise.
19205 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
19206 (aarch64_fnma<mode>4): Likewise.
19207 (aarch64_fms<mode>4): Likewise.
19208 (aarch64_fnms<mode>4): Likewise.
19209 (aarch64_fnmadd<mode>4): Likewise.
19211 2018-05-16 Jason Merrill <jason@redhat.com>
19213 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
19215 2018-05-16 Richard Biener <rguenther@suse.de>
19217 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
19218 (dump_stmt_cost): Declare.
19219 (add_stmt_cost): Dump cost we add.
19220 (add_stmt_costs): New function.
19221 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
19222 No longer exported.
19223 (vect_analyze_stmt): Adjust prototype.
19224 (vectorizable_condition): Likewise.
19225 (vectorizable_live_operation): Likewise.
19226 (vectorizable_reduction): Likewise.
19227 (vectorizable_induction): Likewise.
19228 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
19229 cost vector to pass to vectorizable_ and record afterwards.
19230 (vect_model_reduction_cost): Take cost vector argument and adjust.
19231 (vect_model_induction_cost): Likewise.
19232 (vectorizable_reduction): Likewise.
19233 (vectorizable_induction): Likewise.
19234 (vectorizable_live_operation): Likewise.
19235 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
19236 SLP_TREE_NUMBER_OF_VEC_STMTS.
19237 (vect_analyze_slp_cost_1): Remove.
19238 (vect_analyze_slp_cost): Likewise.
19239 (vect_slp_analyze_node_operations): Take visited args and
19240 a target cost vector. Avoid processing already visited stmt sets.
19241 (vect_slp_analyze_operations): Use a local cost vector to gather
19242 costs and register those of non-discarded instances.
19243 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
19244 (vect_schedule_slp_instance): Remove copying of
19245 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
19247 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
19248 adding cost. Record cost entry location.
19249 (vect_prologue_cost_for_slp_op): Function to compute cost of
19250 a constant or invariant generated for SLP vect in the prologue,
19251 split out from vect_analyze_slp_cost_1.
19252 (vect_model_simple_cost): Make static. Adjust for SLP costing.
19253 (vect_model_promotion_demotion_cost): Likewise.
19254 (vect_model_store_cost): Likewise, make static.
19255 (vect_model_load_cost): Likewise.
19256 (vectorizable_bswap): Add cost vector arg and adjust.
19257 (vectorizable_call): Likewise.
19258 (vectorizable_simd_clone_call): Likewise.
19259 (vectorizable_conversion): Likewise.
19260 (vectorizable_assignment): Likewise.
19261 (vectorizable_shift): Likewise.
19262 (vectorizable_operation): Likewise.
19263 (vectorizable_store): Likewise.
19264 (vectorizable_load): Likewise.
19265 (vectorizable_condition): Likewise.
19266 (vectorizable_comparison): Likewise.
19267 (can_vectorize_live_stmts): Likewise.
19268 (vect_analyze_stmt): Likewise.
19269 (vect_transform_stmt): Adjust calls to vectorizable_*.
19270 * tree-vectorizer.c: Include gimple-pretty-print.h.
19271 (dump_stmt_cost): New function.
19273 2018-05-16 Richard Biener <rguenther@suse.de>
19275 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
19276 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
19277 * tree-ssa-dse.c: Include tree-ssa-loop.h.
19278 (check_name): New callback.
19279 (dse_classify_store): Track cycles via a visited bitmap of PHI
19280 defs and simplify handling of in-loop and across loop dead stores
19281 and properly fail for loop-variant refs. Handle byte-tracking with
19282 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
19285 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
19287 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
19288 (vect_get_mask_type_for_stmt): Likewise.
19289 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
19291 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
19292 to determine the statement's vector type and the vector type that
19293 should be used for calculating nunits. Deal with cases in which
19294 the type has to be deferred.
19295 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
19296 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
19297 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
19298 (vect_determine_vf_for_stmt): New functions, split out from...
19299 (vect_determine_vectorization_factor): ...here.
19300 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
19301 (vect_get_mask_type_for_stmt): New functions, split out from
19302 vect_determine_vectorization_factor.
19304 2018-05-16 Richard Biener <rguenther@suse.de>
19306 * tree-cfg.c (verify_gimple_assign_ternary): Properly
19307 verify the [VEC_]COND_EXPR embedded comparison.
19309 2018-05-15 Martin Sebor <msebor@redhat.com>
19311 PR tree-optimization/85753
19312 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
19313 RECORD_TYPE in addition to ARRAY_TYPE.
19315 2018-05-15 Martin Sebor <msebor@redhat.com>
19317 PR middle-end/85643
19318 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
19320 2018-05-15 Richard Biener <rguenther@suse.de>
19322 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
19323 add by_clobber_p one. Change algorithm to collect all defs
19324 representing uses we need to walk and try reducing them to
19325 a single one before failing.
19326 (dse_dom_walker::dse_optimize_stmt): Adjust.
19328 2018-05-13 Mark Wielaard <mark@klomp.org>
19330 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
19331 (size_of_loc_descr): Likewise.
19332 (output_loc_operands): Likewise.
19333 (output_loc_operands_raw): Likewise.
19334 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
19335 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
19336 (hash_loc_operands): Likewise.
19337 (compare_loc_operands): Likewise.
19339 2018-05-14 Mark Wielaard <mark@klomp.org>
19341 * dwarf2out.c (count_index_addrs): New function.
19342 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
19344 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19346 PR tree-optimization/83648
19347 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
19348 return value as malloc candidate.
19350 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
19353 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
19354 param as true in call to suggest_attribute.
19356 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
19358 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
19359 -mreadonly-in-sdata.
19361 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19363 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
19365 (aarch64_crypto_aesd_fused): Likewise.
19367 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
19369 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
19370 (movsi_aarch64): Likewise.
19371 (load_pairsi): Likewise.
19372 (load_pairdi): Likewise.
19373 (store_pairsi): Likewise.
19374 (store_pairdi): Likewise.
19375 (load_pairsf): Likewise.
19376 (load_pairdf): Likewise.
19377 (store_pairsf): Likewise.
19378 (store_pairdf): Likewise.
19379 (zero_extend): Likewise.
19380 (trunc): Swap alternatives.
19381 (fcvt_target): Add '?' to prefer w over r.
19383 2018-05-14 Jakub Jelinek <jakub@redhat.com>
19386 * config/i386/i386.md: Disallow non-commutative arithmetics in
19387 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
19388 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
19389 in the peephole2 before it.
19391 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
19393 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
19394 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
19395 (ix86_handle_option): Handle -mcldemote.
19396 * config.gcc: New header.
19397 * config/i386/cldemoteintrin.h: New file.
19398 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
19399 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
19401 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19402 OPTION_MASK_ISA_CLDEMOTE.
19403 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
19404 (ix86_valid_target_attribute_inner_p): Ditto.
19405 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
19406 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
19407 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
19408 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
19409 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
19411 * config/i386/i386.opt: Add -mcldemote.
19412 * config/i386/x86intrin.h: New header.
19413 * doc/invoke.texi: Add -mcldemote.
19415 2018-05-14 Richard Biener <rguenther@suse.de>
19417 * doc/match-and-simplify.texi: Adjust :s documentation.
19419 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
19421 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
19422 intended memcpy size.
19423 (REORDER_45): Likewise.
19425 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
19427 * sort.cc: New file.
19428 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
19429 * vec.c (qsort_chk): Use gcc_qsort.
19430 * Makefile.in (OBJS-libcommon): Add sort.o.
19431 (build/sort.o): New target. Use it...
19432 (BUILD_RTL): ... here, and...
19433 (build/gencfn-macros): ... here, and...
19434 (build/genmatch): ... here.
19436 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19437 Chung-Ju Wu <jasonwucj@gmail.com>
19439 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
19440 * config/nds32/nds32-graywolf.md: New file.
19441 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
19442 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
19444 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
19445 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
19446 * config/nds32/nds32.md (pipeline_model): Add graywolf.
19447 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
19448 * config/nds32/pipelines.md: Include n15 settings.
19450 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19451 Chung-Ju Wu <jasonwucj@gmail.com>
19453 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
19454 * config/nds32/nds32-n13.md: New file.
19455 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
19456 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
19458 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
19459 * config/nds32/nds32.md (pipeline_model): Add n13.
19460 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
19461 * config/nds32/pipelines.md: Include n13 settings.
19463 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
19464 Chung-Ju Wu <jasonwucj@gmail.com>
19466 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
19467 * config/nds32/nds32-n10.md: New file.
19468 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
19469 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
19471 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
19472 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
19473 * config/nds32/nds32.md (pipeline_model): Add n10.
19474 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
19475 * config/nds32/pipelines.md: Include n10 settings.
19477 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
19478 Kito Cheng <kito.cheng@gmail.com>
19479 Chung-Ju Wu <jasonwucj@gmail.com>
19481 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
19482 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
19483 Add enum values for DSP extension instructions.
19484 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
19486 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
19487 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
19488 New code iterators.
19489 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
19490 * config/nds32/nds32-dspext.md: New file for DSP implementation.
19491 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
19492 * config/nds32/nds32-intrinsic.md: Likewise.
19493 * config/nds32/nds32_intrinsic.h: Likewise.
19494 * config/nds32/nds32-md-auxiliary.c: Likewise.
19495 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
19496 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
19497 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
19498 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
19499 * config/nds32/nds32-protos.h: New declarations for DSP extension.
19500 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
19501 TYPE_DMAC in switch statement.
19502 * config/nds32/nds32.c: New checking and implementation for DSP
19503 extension instructions.
19504 * config/nds32/nds32.h: Likewise.
19505 * config/nds32/nds32.md: Likewise.
19506 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
19507 * config/nds32/predicates.md: Implement new predicates for DSP
19510 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
19512 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
19513 Reformat alternatives and attributes so it is easier to identify
19514 which constraints/attributes go with which instruction.
19515 (mov<mode>_hardfloat32, FMOVE64): Likewise.
19516 (mov<mode>_softfloat32, FMOVE64): Likewise.
19517 (mov<mode>_hardfloat64, FMOVE64): Likewise.
19518 (mov<mode>_softfloat64, FMOVE64): Likewise.
19520 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
19522 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19524 (Basic PowerPC Built-in Functions): The new name of the
19525 subsection previously known as "PowerPC Built-in Functions".
19526 (Basic PowerPC Built-in Functions Available on all Configurations):
19528 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
19529 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
19530 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
19531 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
19533 2018-05-11 Martin Jambor <mjambor@suse.cz>
19536 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
19539 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19542 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
19544 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
19546 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
19547 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
19548 (ix86_handle_option): Handle -mwaitpkg.
19549 * config.gcc: New header.
19550 * config/i386/cpuid.h (bit_WAITPKG): New bit.
19551 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
19552 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
19554 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19555 OPTION_MASK_ISA_WAITPKG.
19556 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
19557 (ix86_option_override_internal): Add PTA_WAITPKG.
19558 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
19559 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
19560 IX86_BUILTIN_TPAUSE.
19561 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
19562 __builtin_ia32_umwait and __builtin_ia32_tpause.
19563 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
19564 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
19565 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
19566 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
19567 UNSPECV_TPAUSE): New.
19568 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
19569 * config/i386/i386.opt: Add -mwaitpkg.
19570 * config/i386/waitpkgintrin.h: New file.
19571 * config/i386/x86intrin.h: New header.
19572 * doc/invoke.texi: Add -mwaitpkg.
19574 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
19577 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
19579 (cortex-m0): Use armv6s-m isa.
19580 (cortex-m0plus): Likewise.
19581 (cortex-m1): Likewise.
19582 (cortex-m0.small-multiply): Likewise.
19583 (cortex-m0plus.small-multiply): Likewise.
19584 (cortex-m1.small-multiply): Likewise.
19586 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
19587 Jakub Jelinek <jakub@redhat.com>
19589 PR tree-optimization/85692
19590 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
19591 source permute as well.
19593 2018-05-11 Martin Liska <mliska@suse.cz>
19596 * doc/extend.texi: Document LLVM style format for no_sanitize
19599 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
19601 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19602 mode_supports_vsx_dform_quad to mode_supports_dq_form.
19603 (mode_supports_vsx_dform_quad): Likewise.
19604 (mode_supports_vmx_dform): Move these functions to be next to the
19605 other mode_supports functions.
19606 (mode_supports_dq_form): Likewise.
19607 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19608 mode_supports_dq_form.
19609 (reg_offset_addressing_ok_p): Likewise.
19610 (offsettable_ok_by_alignment): Likewise.
19611 (rs6000_legitimate_offset_address_p): Likewise.
19612 (legitimate_lo_sum_address_p): Likewise.
19613 (rs6000_legitimize_address): Likewise.
19614 (rs6000_legitimize_reload_address): Likewise.
19615 (rs6000_secondary_reload_inner): Likewise.
19616 (rs6000_preferred_reload_class): Likewise.
19617 (rs6000_output_move_128bit): Likewise.
19619 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19621 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19622 Generate SImode target register for null target.
19623 <case IX86_BUILTIN_XGETBV>: Ditto.
19624 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19625 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19627 2018-05-10 Carl Love <cel@us.ibm.com>
19629 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19630 dcbtt and dcbtstt if operands[2] is 0.
19632 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
19635 * config/i386/sse.md (usadv64qi): New expander.
19637 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
19639 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19640 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19641 -maltivec=be support.
19642 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19643 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19644 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19645 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19646 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19647 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19648 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19649 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19650 altivec_vsumsws): Adjust.
19651 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19652 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19653 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19655 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19656 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19657 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19658 (altivec_lve<VI_char>x): Delete expand.
19659 (*altivec_lve<VI_char>x_internal): Rename to...
19660 (altivec_lve<VI_char>x): ... this.
19661 (altivec_lvxl_<mode>): Delete expand.
19662 (*altivec_lvxl_<mode>_internal): Rename to ...
19663 (altivec_lvxl_<mode>): ... this.
19664 (altivec_stvxl_<mode>): Delete expand.
19665 (*altivec_stvxl_<mode>_internal): Rename to ...
19666 (altivec_stvxl_<mode>): ... this.
19667 (altivec_stve<VI_char>x): Delete expand.
19668 (*altivec_stve<VI_char>x_internal): Rename to ...
19669 (altivec_stve<VI_char>x): ... this.
19670 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19671 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19672 reduc_plus_scal_<mode>): Adjust.
19673 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19675 (rs6000_cpu_cpp_builtins): Adjust.
19676 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19677 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19678 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19679 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19680 -maltivec=be support.
19681 (rs6000_split_vec_extract_var): Adjust.
19682 (rs6000_split_v4si_init): Adjust.
19683 (swap_selector_for_mode): Delete.
19684 (altivec_expand_lvx_be, altivec_expand_stvx_be,
19685 altivec_expand_stvex_be): Delete.
19686 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19687 -maltivec=be support.
19688 (rs6000_gimple_fold_builtin): Ditto.
19689 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19691 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19692 (TARGET_DIRECT_MOVE_64BIT): Adjust.
19693 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19694 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19695 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19696 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19697 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19698 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19699 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19700 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19701 anonymous split): Adjust.
19702 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19703 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19705 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
19707 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19708 when --with-gxx-include-dir is also specified.
19709 * configure: Regenerate.
19711 2018-05-09 Jim Wilson <jimw@sifive.com>
19714 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19715 * config/riscv/t-withmultilib: New.
19716 * config/riscv/withmultilib.h: New.
19717 * doc/install.texi: Document RISC-V --with-multilib-list support.
19719 2018-05-09 Richard Biener <rguenther@suse.de>
19721 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19723 (vect_bb_vectorization_profitable_p): Adjust. Compute
19724 actual scalar cost using the cost vector and the add_stmt_cost
19727 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19729 PR rtl-optimization/85645
19730 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19731 in the REG_CFA_REGISTER note for LR, don't leave it empty.
19733 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19735 PR rtl-optimization/85645
19736 * shrink-wrap.c (spread_components): Return a boolean saying if
19737 anything was changed.
19738 (try_shrink_wrapping_separate): Iterate spread_components until
19739 nothing changes anymore.
19741 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19743 PR rtl-optimization/85645
19744 * regrename.c (build_def_use): Also kill the chains that include the
19745 destination of a REG_CFA_REGISTER note.
19747 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
19749 PR rtl-optimization/85645
19750 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19751 insn that has a REG_CFA_REGISTER note.
19753 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
19755 * cfgexpand.c (expand_clobber): New function.
19756 (expand_gimple_stmt_1): Use it.
19757 * tree-vect-stmts.c (vect_clobber_variable): New function,
19759 (vectorizable_simd_clone_call): ...here.
19760 (vectorizable_store): Emit a clobber either side of an
19761 IFN_STORE_LANES sequence.
19762 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19764 2018-05-09 Tom de Vries <tom@codesourcery.com>
19767 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19768 (define_insn "trap_if_false"): Add exit after trap.
19770 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
19772 PR rtl-optimization/85638
19773 * bb-reorder.c: Include common/common-target.h.
19774 (create_forwarder_block): New function extracted from...
19775 (fix_up_crossing_landing_pad): ...here. Rename into...
19776 (dw2_fix_up_crossing_landing_pad): ...this.
19777 (sjlj_fix_up_crossing_landing_pad): New function.
19778 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19779 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19780 from both partitions and exit the loop after one iteration.
19782 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19785 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19787 (Basic PowerPC Built-in Functions): The new name of the
19788 subsection previously known as "PowerPC Built-in Functions".
19789 (Basic PowerPC Built-in Functions Available on all Configurations):
19791 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19793 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19795 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19797 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19800 2018-05-08 Jim Wilson <jimw@sifive.com>
19802 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19803 (LD_EMUL_SUFFIX): New.
19804 (LINK_SPEC): Use it.
19806 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
19808 * doc/extend.texi (PowerPC Built-in Functions): Rename this
19810 (Basic PowerPC Built-in Functions): The new name of the
19811 subsection previously known as "PowerPC Built-in Functions".
19812 (Basic PowerPC Built-in Functions Available on all Configurations):
19814 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19816 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19818 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19820 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19823 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19826 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19827 after cmpelim optimization.
19829 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
19831 * config.gcc: Support "goldmont".
19832 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19833 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19834 PROCESSOR_GOLDMONT.
19835 * config/i386/i386.c (m_GOLDMONT): Define.
19836 (processor_target_table): Add "goldmont".
19837 (PTA_GOLDMONT): Define.
19838 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19839 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19840 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19841 (fold_builtin_cpu): Add "goldmont".
19842 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19843 (ix86_option_override_internal): Add "goldmont".
19844 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19845 (processor_type): Add PROCESSOR_GOLDMONT.
19846 * config/i386/i386.md: Add CPU "glm".
19847 * config/i386/glm.md: New file.
19848 * config/i386/x86-tune.def: Add m_GOLDMONT.
19849 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19851 2018-05-08 Jakub Jelinek <jakub@redhat.com>
19854 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19856 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19857 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
19858 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
19861 * config/i386/i386.c (ix86_fold_builtin): Handle
19862 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19865 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19866 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19868 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
19871 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19872 (check_arch): Likewise.
19873 (check_fpu): Return the result rather than printing it.
19874 (end arch): Fix operator precedence.
19875 (end cpu): Likewise.
19876 (END): Print the result from check_fpu.
19878 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19879 Alan Hayward <alan.hayward@arm.com>
19880 David Sherwood <david.sherwood@arm.com>
19882 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19883 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19884 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19885 (*fcmuo<mode>_and): New patterns.
19887 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
19889 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19890 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19891 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19892 (cmp_op, sve_imm_con): New code attributes.
19893 (SVE_COND_INT_CMP, imm_con): Delete.
19894 (cmp_op): Remove above unspecs from int attribute.
19895 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19897 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
19898 comparison-specific unspecs.
19899 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19900 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19901 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19902 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19903 (*vec_fcm<cmp_op><mode>): Rename to...
19904 (*fcm<cmp_op><mode>): ...this and adjust likewise.
19905 (*vec_fcmuo<mode>): Rename to...
19906 (*fcmuo<mode>): ...this and adjust likewise.
19907 (*pred_fcm<cmp_op><mode>): New pattern.
19908 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19909 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19911 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19913 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19914 (aarch64_emit_sve_predicated_cond): New function.
19915 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19916 (aarch64_emit_unspec_cond_or): Replace with...
19917 (aarch64_emit_sve_or_conds): ...this new function. Use
19918 aarch64_emit_sve_ptrue_op for the individual comparisons and
19919 aarch64_emit_binop to OR them together.
19920 (aarch64_emit_inverted_unspec_cond): Replace with...
19921 (aarch64_emit_sve_inverted_cond): ...this new function. Use
19922 aarch64_emit_sve_ptrue_op for the comparison and
19923 aarch64_emit_unop to invert the result.
19924 (aarch64_expand_sve_vec_cmp_float): Update after the above
19925 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
19927 2018-05-07 Nathan Sidwell <nathan@acm.org>
19929 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19930 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19931 (Backwards Compatibility): Likewise.
19933 2018-05-07 Luis Machado <luis.machado@linaro.org>
19937 2018-05-07 Luis Machado <luis.machado@linaro.org>
19939 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19940 <prefetch_dynamic_strides>: New const bool field.
19941 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19942 prefetch_dynamic_strides.
19943 (exynosm1_prefetch_tune): Likewise.
19944 (thunderxt88_prefetch_tune): Likewise.
19945 (thunderx_prefetch_tune): Likewise.
19946 (thunderx2t99_prefetch_tune): Likewise.
19947 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19949 (aarch64_override_options_internal): Update to set
19950 PARAM_PREFETCH_DYNAMIC_STRIDES.
19951 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19952 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19953 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19954 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19955 prefetch-dynamic-strides setting.
19957 2018-05-07 Luis Machado <luis.machado@linaro.org>
19959 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19960 <minimum_stride>: New const int field.
19961 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19962 minimum_stride field.
19963 (exynosm1_prefetch_tune): Likewise.
19964 (thunderxt88_prefetch_tune): Likewise.
19965 (thunderx_prefetch_tune): Likewise.
19966 (thunderx2t99_prefetch_tune): Likewise.
19967 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19968 (aarch64_override_options_internal): Update to set
19969 PARAM_PREFETCH_MINIMUM_STRIDE.
19970 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19971 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19972 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19973 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19974 stride is constant and is below the minimum stride threshold.
19976 2018-05-07 Luis Machado <luis.machado@linaro.org>
19978 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19981 2018-05-07 Luis Machado <luis.machado@linaro.org>
19983 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19984 <prefetch_dynamic_strides>: New const bool field.
19985 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19986 prefetch_dynamic_strides.
19987 (exynosm1_prefetch_tune): Likewise.
19988 (thunderxt88_prefetch_tune): Likewise.
19989 (thunderx_prefetch_tune): Likewise.
19990 (thunderx2t99_prefetch_tune): Likewise.
19991 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19993 (aarch64_override_options_internal): Update to set
19994 PARAM_PREFETCH_DYNAMIC_STRIDES.
19995 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19996 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19997 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19998 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19999 prefetch-dynamic-strides setting.
20001 2018-05-07 Luis Machado <luis.machado@linaro.org>
20003 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
20004 <minimum_stride>: New const int field.
20005 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
20006 minimum_stride field.
20007 (exynosm1_prefetch_tune): Likewise.
20008 (thunderxt88_prefetch_tune): Likewise.
20009 (thunderx_prefetch_tune): Likewise.
20010 (thunderx2t99_prefetch_tune): Likewise.
20011 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
20012 (aarch64_override_options_internal): Update to set
20013 PARAM_PREFETCH_MINIMUM_STRIDE.
20014 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
20015 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
20016 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
20017 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
20018 stride is constant and is below the minimum stride threshold.
20020 2018-05-06 Jakub Jelinek <jakub@redhat.com>
20023 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
20024 the type is addressable. Don't force op into register if it has
20027 2018-05-05 Roland McGrath <mcgrathr@google.com>
20030 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
20031 any section for which we don't know a specific type it should have,
20032 regardless of name. Previously this was done only for the exact
20033 names ".init_array", ".fini_array", and ".preinit_array".
20034 (default_elf_asm_named_section): Add comment about
20035 relationship with default_section_type_flags and SECTION_NOTYPE.
20036 (get_section): Don't consider it a type conflict if one side has
20037 SECTION_NOTYPE and the other doesn't, as long as neither has the
20038 SECTION_BSS et al used in the default_section_type_flags logic.
20040 2018-05-05 Tom de Vries <tom@codesourcery.com>
20043 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
20044 (workaround_barsyncs): New function.
20045 (nvptx_reorg): Use workaround_barsyncs.
20046 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
20047 (define_expand "nvptx_membar_cta"): New define_expand.
20048 (define_insn "*nvptx_membar_cta"): New insn.
20050 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
20052 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
20053 To improve optimization opportunities.
20054 * builtin-types.def: The new needed builtin types for the above.
20056 2018-05-04 Richard Biener <rguenther@suse.de>
20058 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
20059 * gimple-ssa-store-merging.c
20060 (imm_store_chain_info::output_merged_store): Remove redundant create,
20061 release split_store vector contents on failure.
20062 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
20063 scalar stmt vector on cache hit.
20065 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
20067 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
20069 * config.gcc (powerpc-xilinx-eabi*): Remove.
20070 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
20072 (fusion_addis_mem_combo_load): Ditto.
20073 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
20075 (rs6000_cpu_cpp_builtins): Ditto.
20076 * config/rs6000/rs6000-linux.c
20077 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
20078 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
20079 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
20081 (rs6000_setup_reg_addr_masks): Ditto.
20082 (rs6000_init_hard_regno_mode_ok): Ditto.
20083 (rs6000_option_override_internal): Ditto.
20084 (legitimate_lo_sum_address_p): Ditto.
20085 (rs6000_legitimize_address): Ditto.
20086 (rs6000_legitimize_reload_address): Ditto.
20087 (rs6000_legitimate_address_p): Ditto.
20088 (abi_v4_pass_in_fpr): Ditto.
20089 (setup_incoming_varargs): Ditto.
20090 (rs6000_gimplify_va_arg): Ditto.
20091 (rs6000_split_multireg_move): Ditto.
20092 (rs6000_savres_strategy): Ditto.
20093 (rs6000_emit_prologue_components): Ditto.
20094 (rs6000_emit_epilogue_components): Ditto.
20095 (rs6000_emit_prologue): Ditto.
20096 (rs6000_emit_epilogue): Ditto.
20097 (rs6000_elf_file_end): Ditto.
20098 (rs6000_function_value): Ditto.
20099 (rs6000_libcall_value): Ditto.
20100 * config/rs6000/rs6000.h: Ditto.
20101 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
20102 (TARGET_MINMAX): ... this. New.
20103 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
20104 * config/rs6000/rs6000.md: Remove Xilinx FP support.
20105 (*movsi_internal1_single): Delete.
20106 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
20107 mfpu=, mxilinx-fpu): Delete.
20108 * config/rs6000/singlefp.h: Delete.
20109 * config/rs6000/sysv4.h: Remove Xilinx FP support.
20110 * config/rs6000/t-rs6000: Ditto.
20111 * config/rs6000/t-xilinx: Delete.
20112 * config/rs6000/titan.md: Adjust for fp_type removal.
20113 * config/rs6000/vsx.md: Remove Xilinx FP support.
20114 (VStype_simple): Delete.
20115 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
20116 * config/rs6000/xfpu.h: Delete.
20117 * config/rs6000/xfpu.md: Delete.
20118 * config/rs6000/xilinx.h: Delete.
20119 * config/rs6000/xilinx.opt: Delete.
20120 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
20121 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
20123 2018-05-04 Tom de Vries <tom@codesourcery.com>
20126 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
20129 2018-05-04 Richard Biener <rguenther@suse.de>
20131 PR middle-end/85627
20132 * tree-complex.c (update_complex_assignment): We are always in SSA form.
20133 (expand_complex_div_wide): Likewise.
20134 (expand_complex_operations_1): Likewise.
20135 (expand_complex_libcall): Preserve EH info of the original stmt.
20136 (tree_lower_complex): Handle removed blocks.
20137 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
20138 on complex multiplication and division libcall builtins.
20140 2018-05-04 Richard Biener <rguenther@suse.de>
20142 PR middle-end/85574
20143 * fold-const.c (negate_expr_p): Restrict negation of operand
20144 zero of a division to when we know that can happen without
20146 (fold_negate_expr_1): Likewise.
20148 2018-05-04 Jakub Jelinek <jakub@redhat.com>
20151 * real.h (real_nextafter): Declare.
20152 * real.c (real_nextafter): New function.
20153 * fold-const-call.c (fold_const_nextafter): New function.
20154 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
20155 CASE_CFN_NEXTTOWARD.
20156 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
20157 even when arg1_mode is different from arg0_mode.
20159 2018-05-03 Nathan Sidwell <nathan@acm.org>
20161 * doc/extend.texi (Deprecated Features): Remove
20162 -ffriend-injection.
20163 (Backwards Compatibility): Likewise.
20164 * doc/invoke.texi (C++ Language Options): Likewise.
20165 (C++ Dialect Options): Likewise.
20167 2018-05-03 Jakub Jelinek <jakub@redhat.com>
20170 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
20171 _mm512_mask_mullox_epi64): New intrinsics.
20173 2018-05-03 Tom de Vries <tom@codesourcery.com>
20176 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20177 dump files): Add offload-tree.
20179 2018-05-03 Richard Biener <rguenther@suse.de>
20181 PR tree-optimization/85615
20182 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
20183 to loops not nested in BBs loop father to avoid creating multi-entry
20186 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20188 PR tree-optimization/70291
20189 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
20190 arguments. Change return type to tree. Emit libcall as a new
20191 statement rather than replacing existing one when inplace_p is true.
20192 (expand_complex_multiplication_components): New function.
20193 (expand_complex_multiplication): Expand floating-point complex
20194 multiplication using the above.
20195 (expand_complex_division): Rename inner_type parameter to type.
20196 Update expand_complex_libcall call-site.
20197 (expand_complex_operations_1): Update expand_complex_multiplication
20198 and expand_complex_division call-sites.
20200 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20203 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20204 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20205 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
20206 the highest significant bit of the shift count mask is clear. In
20207 check whether and[sq]i3 is needed verify that all significant bits
20208 of the shift count other than the highest are set.
20210 2018-05-02 Tom de Vries <tom@codesourcery.com>
20213 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
20214 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
20215 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
20216 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
20217 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
20218 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
20219 __builtin_goacc_parlevel_size.
20221 2018-05-02 Richard Biener <rguenther@suse.de>
20223 PR tree-optimization/85597
20224 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
20225 do not use split vect_get_vec_defs call but call vect_get_slp_defs
20228 2018-05-02 Tom de Vries <tom@codesourcery.com>
20231 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20232 dump files): Add ltrans-tree.
20234 2018-05-02 Tom de Vries <tom@codesourcery.com>
20237 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
20238 dump files): Add wpa-ipa.
20240 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
20242 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
20243 powerpc*-*-linux*paired* target.
20244 * config/rs6000/750cl.h: Delete.
20245 * config/rs6000/paired.h: Delete.
20246 * config/rs6000/paired.md: Delete.
20247 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
20249 * config/rs6000/rs6000-builtin.def: Remove paired float support.
20250 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
20251 comment. Remove paired float support.
20252 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
20253 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
20255 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
20256 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
20258 * config/rs6000/rs6000.c: Remove paired float support.
20259 (paired_expand_vector_init, paired_expand_vector_move,
20260 paired_emit_vector_compare, paired_emit_vector_cond_expr,
20261 (paired_expand_lv_builtin, paired_expand_stv_builtin,
20262 paired_expand_builtin, paired_expand_predicate_builtin,
20263 paired_init_builtins): Delete.
20264 * config/rs6000/rs6000.h: Remove paired float support.
20265 * config/rs6000/rs6000.md: Remove paired float support.
20266 (move_from_CR_ov_bit): Delete.
20267 * config/rs6000/rs6000.opt (mpaired): Delete.
20268 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
20269 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
20271 2018-05-02 Richard Biener <rguenther@suse.de>
20273 PR middle-end/85567
20274 * gimplify.c (gimplify_save_expr): When in SSA form allow
20275 SAVE_EXPRs to compute to SSA vars.
20277 2018-05-02 Jakub Jelinek <jakub@redhat.com>
20280 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
20281 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
20282 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
20283 clobber operands[2], instead use a new pseudo. Formatting fixes.
20285 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
20287 PR tree-optimization/85586
20288 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
20289 exit early for statements in the same group if the accesses are
20292 2018-05-02 Tom de Vries <tom@codesourcery.com>
20295 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
20298 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
20300 PR tree-optimization/85143
20301 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
20303 2018-05-01 Tom de Vries <tom@codesourcery.com>
20306 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
20307 not found" error message.
20309 2018-05-01 Tom de Vries <tom@codesourcery.com>
20312 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
20313 * vec.c (test_ordered_remove_if): New function.
20314 (vec_c_tests): Call test_ordered_remove_if.
20315 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
20316 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
20317 * tree-vect-patterns.c (vect_pattern_recog_1): Use
20318 VEC_ORDERED_REMOVE_IF.
20320 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20322 PR tree-optimization/82665
20323 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
20324 pointer subtraction where arguments come from a memchr call.
20326 2018-05-01 Jakub Jelinek <jakub@redhat.com>
20328 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
20329 --push-state --as-needed and --pop-state instead of --as-needed and
20330 --no-as-needed if ld supports it.
20331 * configure: Regenerated.
20334 * doc/install.texi2html: Replace _002d with - and _002a with * in
20335 generated html files using sed.
20337 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20340 * gcc-rich-location.c (blank_line_before_p): New function.
20341 (use_new_line): New function.
20342 (gcc_rich_location::add_fixit_insert_formatted): New function.
20343 * gcc-rich-location.h
20344 (gcc_rich_location::add_fixit_insert_formatted): New function.
20346 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20348 * selftest.c (assert_streq): Rename "expected" and "actual" to
20349 "val1" and "val2". Extend NULL-handling to cover both inputs
20350 symmetrically, while still requiring both to be non-NULL for a pass.
20351 * selftest.h (assert_streq): Rename "expected" and "actual" to
20353 (ASSERT_EQ): Likewise.
20354 (ASSERT_EQ_AT): Likewise.
20355 (ASSERT_KNOWN_EQ): Likewise.
20356 (ASSERT_KNOWN_EQ_AT): Likewise.
20357 (ASSERT_NE): Likewise.
20358 (ASSERT_MAYBE_NE): Likewise.
20359 (ASSERT_MAYBE_NE_AT): Likewise.
20360 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
20361 the assertion to pass.
20362 (ASSERT_STREQ_AT): Likewise.
20364 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20366 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
20367 interaction with -pie.
20369 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20371 * selftest.h: Fix alphabetization of per-source-file selftest
20374 2018-04-30 Jason Merrill <jason@redhat.com>
20376 PR c++/61982 - dead stores to destroyed objects.
20377 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
20380 2018-04-30 Jason Merrill <jason@redhat.com>
20382 * tree.c (build_clobber): New.
20383 * tree.h: Declare it.
20384 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
20386 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20388 * diagnostic-show-locus.c (layout::layout): Update for
20389 location_get_source_line returning a char_span.
20390 (struct char_span): Move to input.h.
20391 (struct correction): Update for fields in char_span becoming
20393 (struct source_line): Update for location_get_source_line
20394 returning a char_span.
20395 (layout::print_line): Likewise.
20396 * edit-context.c (edited_file::print_content): Likewise.
20397 (edited_file::print_diff_hunk): Likewise.
20398 (edited_file::print_run_of_changed_lines): Likewise.
20399 (edited_file::get_num_lines): Likewise.
20400 (edited_line::edited_line): Likewise.
20401 * final.c (asm_show_source): Likewise.
20402 * input.c (location_get_source_line): Convert return type
20403 from const char * to char_span, losing the final "line_len"
20405 (dump_location_info): Update for the above.
20406 (get_substring_ranges_for_loc): Likewise. Use a char_span
20407 when handling the literal within the line.
20408 (test_reading_source_line): Update for location_get_source_line
20409 returning a char_span.
20410 * input.h (class char_span): Move here from
20411 diagnostic-show-locus.c, converting from a struct to a class.
20412 Make data members private.
20413 (char_span::operator bool): New.
20414 (char_span::length): New.
20415 (char_span::get_buffer): New.
20416 (char_span::operator[]): New.
20417 (char_span::subspan): Make const.
20418 (char_span::xstrdup): New.
20419 (location_get_source_line): Convert return type from const char *
20420 to char_span, losing the final "line_size" param.
20422 2018-04-30 Jan Hubicka <jh@suse.cz>
20424 * lto-wrapper.c (ltrans_priorities): New static var.
20425 (cmp_priority): New.
20426 (run_gcc): Read priorities and if doing parallel build order
20427 the Makefile by them.
20429 2018-04-30 David Malcolm <dmalcolm@redhat.com>
20431 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
20433 2018-04-30 Richard Biener <rguenther@suse.de>
20435 * tree-cfg.c (verify_address): Remove base argument, add
20436 flag whether to check TREE_ADDRESSABLE and do that.
20437 (verify_expr): Remove.
20438 (verify_types_in_gimple_reference): Add pieces from verify_expr.
20439 (verify_gimple_assign_single): Likewise.
20440 (verify_gimple_switch): Likewise.
20441 (verify_expr_location_1): Dereference tp once. Add (disabled)
20442 piece from verify_expr.
20443 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
20445 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20447 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
20449 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20451 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
20452 (small_data_pattern): Likewise.
20453 (arc_rewrite_small_data): Likewise.
20454 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
20455 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
20456 (get_symbol_alignment): New function.
20457 (legitimate_small_data_address_p): Likewise.
20458 (legitimate_scaled_address): Update, call
20459 legitimate_small_data_address_p.
20460 (output_sdata): New static variable.
20461 (arc_print_operand): Update how we handle small data operands.
20462 (arc_print_operand_address): Likewise.
20463 (arc_legitimate_address_p): Update, use
20464 legitimate_small_data_address_p.
20465 (arc_rewrite_small_data_p): Remove.
20466 (arc_rewrite_small_data_1): Likewise.
20467 (arc_rewrite_small_data): Likewise.
20468 (small_data_pattern): Likewise.
20469 (compact_sda_memory_operand): Update to use
20470 legitimate_small_data_address_p and get_symbol_alignment.
20471 (prepare_move_operands): Don't rewite sdata pattern.
20472 (prepare_extend_operands): Remove.
20473 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
20475 (zero_extendqisi2): Likewise.
20476 (zero_extendhisi2): Likewise.
20477 (extendqihi2): Likewise.
20478 (extendqisi2): Likewise.
20479 (extendhisi2): Likewise.
20480 (addsi3): Likewise.
20481 (subsi3): Likewise.
20482 (andsi3): Likewise.
20483 * config/arc/constraints.md (Usd): Change it to memory constraint.
20485 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
20487 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
20488 as source of std instructions.
20489 * config/arc/arc.md (movsi_insn): Update pattern predicate to
20490 allow 6-bit constants as source for store instructions.
20491 (movdi_insn): Update instruction pattern to allow 6-bit constants
20492 as source for store instructions.
20494 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
20496 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
20498 2018-04-30 Nathan Sidwell <nathan@acm.org>
20499 Sandra Loosemore <sandra@codesourcery.com>
20501 * dumpfile.c (dump_open): Allow '-' for stdout.
20502 * doc/invoke.texi (Developer Options): Document dump filename
20503 determination early. Document stdin/stdout selection.
20505 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
20507 Microblaze Target: PIC data text relative
20509 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
20510 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
20512 * config/microblaze/microblaze.h (microblaze_constant_address_p):
20513 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
20514 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
20515 New addressing mode for data-text relative position indepenedent code.
20516 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
20517 'ADDRESS_SYMBOLIC_TXT_REL'.
20518 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
20519 (microblaze_legitimate_pic_operand): Exclude function calls from
20520 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
20521 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
20523 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20524 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
20525 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
20526 for 'address + offset'.
20527 (microblaze_expand_prologue): Add new function prologue call for
20529 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
20530 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
20531 table in case of TARGET_PIC_DATA_TEXT_REL.
20532 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
20533 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
20534 Add new macros 'UNSPEC_TEXT',
20535 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
20536 + exclude function calls from 'UNSPEC_PLT' in case of data text
20538 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20539 new target hook for generating address diff vector tables in case of
20541 * doc/tm.texi : Regenerate.
20542 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
20543 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
20544 of addr diff vector generation.
20545 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
20546 target hook definition.
20547 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
20548 Add default function for generate_pic_addr_diff_vec -> flag_pic.
20549 * doc/invoke.texi (Add new pic option): Add new microblaze pic
20550 option for data text relative.
20552 2018-04-30 Richard Biener <rguenther@suse.de>
20554 * tree-chrec.h (evolution_function_is_constant_p): Remove
20556 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
20558 2018-04-30 Richard Biener <rguenther@suse.de>
20561 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
20563 2018-04-30 Richard Biener <rguenther@suse.de>
20565 PR tree-optimization/28364
20566 PR tree-optimization/85275
20567 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
20568 copying first exit test.
20570 2018-04-28 Mark Wielaard <mark@klomp.org>
20572 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
20573 dwarf_version >= 5.
20574 (dwarf_AT): Handle DW_AT_addr_base.
20575 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
20577 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
20580 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
20581 (*ashl<dwi>3_doubleword_mask_1): Ditto.
20582 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
20583 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
20585 2018-04-28 Richard Biener <rguenther@suse.de>
20587 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
20588 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
20589 to reflect use. Only add interesting stmts.
20591 2018-04-27 Martin Jambor <mjambor@suse.cz>
20594 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
20595 the jump function allows for passing through aggregate values.
20597 2018-04-27 David Malcolm <dmalcolm@redhat.com>
20599 * input.h (in_system_header_at): Convert from macro to inline
20601 (from_macro_expansion_at): Likewise.
20602 (from_macro_definition_at): Likewise.
20604 2018-04-27 Jeff Law <law@redhat.com>
20606 * config.gcc: Mark tile* targets as deprecated/obsolete.
20608 2018-04-27 Richard Biener <rguenther@suse.de>
20610 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20613 2018-04-27 Richard Biener <rguenther@suse.de>
20615 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20617 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
20619 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20620 with Yd constraint. Set "preferred_for_speed" attribute from
20621 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20622 with Yd constraint.
20623 (*movdi_internal): Ditto.
20624 (movti_interunit splitters): Remove
20625 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20626 (movdi_interunit splitters): Ditto.
20627 * config/i386/constraints.md (Ye): Remove.
20628 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20630 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20633 * config/aarch64/constraints.md (Usg): Limit to 31.
20634 (Usj): Limit to 63.
20636 2018-04-27 Jakub Jelinek <jakub@redhat.com>
20638 PR tree-optimization/85529
20639 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20640 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20641 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20642 zero extension or masking of the MSB bit.
20643 (optimize_range_tests): Add FIRST_BB argument, pass it through
20644 to optimize_range_tests_var_bound.
20645 (maybe_optimize_range_tests, reassociate_bb): Adjust
20646 optimize_range_tests callers.
20648 2018-04-26 Richard Biener <rguenther@suse.de>
20649 Jakub Jelinek <jakub@redhat.com>
20651 * cgraph.h (symbol_table): Just declare debug method here.
20652 * symtab.c (symbol_table::debug): Define.
20654 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
20656 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20658 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
20660 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20661 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20662 (*movdi_internal): Substitute Yi and Yj constraint with x
20663 and Ym and Yn constraint with y constraint. Update "isa"
20664 attribute and set "preferred_for_speed" attribute from
20665 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20666 (*movsi_internal): Ditto.
20667 (*movdf_internal): Ditto.
20668 (*movsf_internal): Ditto.
20669 (*zero_extendsidi2): Ditto.
20670 * config/i386/sse.md (vec_set<mode>_0): Ditto.
20671 (sse2_loadld): Ditto.
20672 (*vec_extract<ssevecmodelower>_0): Ditto.
20673 (*vec_extractv4si_0_zext_sse4): Ditto.
20674 (vec_concatv2di): Ditto.
20675 (*vec_dup<mode>): Ditto.
20676 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20677 * config/i386/constraints.md (Yi): Remove.
20682 2018-04-26 Nathan Sidwell <nathan@acm.org>
20684 * dumpfile.c (dump_open): New.
20685 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20686 (dump_finish): Detect stdio/stderr by value not name.
20688 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
20690 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20692 2018-04-26 Tom de Vries <tom@codesourcery.com>
20695 * config/nvptx/nvptx.c (verify_neutering_jumps)
20696 (verify_neutering_labels): New function
20697 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20699 2018-04-26 Tom de Vries <tom@codesourcery.com>
20702 * config/nvptx/nvptx.c (needs_neutering_p): New function.
20703 (nvptx_single): Use needs_neutering_p to skip over insns that do not
20706 2018-04-26 Richard Biener <rguenther@suse.de>
20707 Tom de Vries <tom@codesourcery.com>
20710 * lto-streamer-out.c (output_function): Fixup loops if required to match
20711 discovery done in the reader.
20713 2018-04-26 Richard Biener <rguenther@suse.de>
20715 PR tree-optimization/85116
20716 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20717 have a loop exit from the single latch predecessor. Remove
20718 case of header with just condition.
20719 (ch_base::copy_headers): Exclude infinite loops from any
20721 (pass_ch::execute): Record exits.
20723 2018-04-26 Richard Biener <rguenther@suse.de>
20725 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20726 prologue cost vector and pass it to vect_get_load_cost.
20727 (vect_get_peeling_costs_all_drs): Likewise.
20728 (vect_peeling_hash_get_lowest_cost): Likewise.
20729 (vect_enhance_data_refs_alignment): Likewise.
20731 2018-04-26 Richard Biener <rguenther@suse.de>
20733 PR middle-end/85450
20734 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20735 checking of integer<->pointer conversions.
20736 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20737 sign-/zero-extending pointer types.
20738 (expand_omp_for_static_chunk): Likewise.
20740 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
20741 Jean Lee <xiaoyur347@gmail.com>
20743 * config/mips/mips.c (mips_asan_shadow_offset): New function.
20744 (TARGET_ASAN_SHADOW_OFFSET): Define.
20745 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20746 true for -fsanitize=address.
20748 2018-04-25 Mark Wielaard <mark@klomp.org>
20750 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20753 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20755 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20756 than "alu", remove explicit "memory" and "imm_disp" attributes.
20757 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20759 PR middle-end/85414
20760 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20761 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20762 gen_lowpart_no_emit.
20764 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
20767 * config/i386/i386.c (ix86_expand_builtin): Change memory
20768 operand to XI, extend p0 to Pmode.
20769 * config/i386/i386.md: Change unspec volatile and operand
20770 1 mode to XI, change operand 0 mode to P.
20772 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20774 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20775 GET_MODE_MASK before any checking.
20776 (nds32_can_use_bset_p): Likewise.
20777 (nds32_can_use_btgl_p): Likewise.
20779 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20781 * config/nds32/nds32-doubleword.md: New define_split pattern for
20782 illegal register number.
20784 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20786 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20788 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
20790 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20792 2018-04-25 Richard Biener <rguenther@suse.de>
20794 * lto-streamer.h (LTO_major_version): Bump to 8.
20796 2018-04-25 Jakub Jelinek <jakub@redhat.com>
20798 * BASE-VER: Set to 9.0.0.
20800 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
20802 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20803 in __abskf2 and __powikf2.
20805 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20808 * config/aarch64/constraints.md (Usg, Usj): New constraints.
20809 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20810 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20811 Use the above on operand 2. Reindent.
20812 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20814 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20817 * common/config/i386/i386-common.c (ix86_handle_option): Don't
20819 * config/i386/i386.opt (mcet): Removed.
20820 * doc/install.texi: Remove -mcet documentation.
20821 * doc/invoke.texi: Likewise.
20823 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
20826 * doc/install.texi: Remove -mcet from bootstrap-cet.
20828 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20831 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20832 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20836 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20837 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20838 containing a CONST_VECTOR.
20840 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
20842 * doc/install.texi: Update newlib dependency for nvptx.
20844 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20847 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20848 instead of INTVAL when shifting x left.
20850 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
20852 PR tree-optimization/85478
20853 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20854 vect_grouped_store_supported for single element vectors.
20856 2018-04-24 Richard Biener <rguenther@suse.de>
20859 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20860 load cost increase to the case of non-constant step.
20862 2018-04-24 Jakub Jelinek <jakub@redhat.com>
20865 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20866 destination if any_malformed_asm.
20868 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
20870 PR middle-end/85496
20871 * expr.c (store_field): In the bitfield case, if the value comes from
20872 a function call and is returned in registers by means of a PARALLEL,
20873 do not change the mode of the temporary unless BLKmode and VOIDmode.
20875 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
20877 PR rtl-optimization/85423
20878 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20879 dependencies to debug insns when the previous insn is non-debug.
20881 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20883 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20884 enums into a single definition.
20885 (fls): Fix predicates and printing.
20888 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
20890 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20891 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20892 and short u6 immediate.
20893 (check_if_valid_sleep_operand): Remove.
20894 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20896 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20898 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20899 flag_always_save_lp condition.
20900 * config/nds32/nds32.opt (malways-save-lp): New option.
20902 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20904 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20905 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20906 * config/nds32/nds32.h
20907 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20908 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20910 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20912 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20913 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20915 2018-04-22 Shiva Chen <shiva0217@gmail.com>
20916 Chung-Ju Wu <jasonwucj@gmail.com>
20918 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20920 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20921 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20923 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20925 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20927 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20929 * config/nds32/nds32-protos.h (nds32_data_alignment,
20930 nds32_local_alignment): Declare.
20931 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20932 nds32_local_alignment): New functions.
20933 (TARGET_CONSTANT_ALIGNMENT): Define.
20934 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20936 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20938 * config/nds32/nds32.c
20939 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20940 (TARGET_MODES_TIEABLE_P): Likewise.
20942 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
20944 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20945 level Ofast and Og.
20947 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
20948 Chung-Ju Wu <jasonwucj@gmail.com>
20950 * config/nds32/constants.md (unspec_volatile_element): Add enum values
20951 for unaligned access.
20952 * config/nds32/nds32-intrinsic.c: Implementation of expanding
20954 * config/nds32/nds32-intrinsic.md: Likewise.
20955 * config/nds32/nds32_intrinsic.h: Likewise.
20956 * config/nds32/nds32.h (nds32_builtins): Likewise.
20957 * config/nds32/nds32.opt (munaligned-access): New option.
20958 * config/nds32/nds32.c (nds32_asm_file_start): Display
20959 flag_unaligned_access status.
20961 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20963 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20964 -mno-relax is present.
20965 * config/riscv/linux.h (LINK_SPEC): Ditto.
20967 2018-04-20 Martin Sebor <msebor@redhat.com>
20970 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20972 (gimple_fold_builtin_stxcpy_chk): Same.
20973 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20975 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
20978 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20979 __powikf2 when long double is IEEE 128-bit.
20981 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
20983 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20984 step to make sure stack always aligned.
20986 2018-04-20 Carl Love <cel@us.ibm.com>
20989 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20990 size check for arg0.
20992 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
20993 Tom de Vries <tom@codesourcery.com>
20996 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20997 Emit insns for calls too.
20998 (nvptx_find_par): Always look for worker-level predecessor insn.
20999 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
21001 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
21002 (nvptx_process_pars): Propagate frames for calls.
21004 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
21007 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
21009 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
21010 (ix86_handle_option): Don't handle OPT_mibt.
21011 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
21013 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
21015 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
21016 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
21017 (ix86_target_macros): Define __CET__ with flag_cf_protection
21018 for -fcf-protection.
21019 * config/i386/i386.c (isa2_opts): Remove -mibt.
21020 * config/i386/i386.h (TARGET_IBT): Removed.
21021 (TARGET_IBT_P): Likewise.
21022 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
21023 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
21024 * config/i386/i386.opt (mcet): Update help message.
21025 (mshstk): Likewise.
21027 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
21028 -mcet as an alias for -mshstk.
21030 2018-04-20 Richard Biener <rguenther@suse.de>
21032 PR middle-end/85475
21033 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
21034 complexity by forcing a single use of the multiply operand.
21036 2018-04-20 Martin Jambor <mjambor@suse.cz>
21039 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
21040 recursion dependency to only apply to non-clones.
21042 2018-04-20 Martin Jambor <mjambor@suse.cz>
21045 * ipa-cp.c (create_specialized_node): Check that clones of
21046 self-recursive edges exist during IPA-CP.
21048 2018-04-19 Toon Moene <toon@moene.org>
21050 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
21053 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21055 PR tree-optimization/85467
21056 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
21057 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
21058 VECTOR_CST element to type.
21060 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21063 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
21064 * config/i386/i386.md (builtin_setjmp_setup): Removed.
21065 (builtin_longjmp): Likewise.
21066 (save_stack_nonlocal): New pattern.
21067 (restore_stack_nonlocal): Likewise.
21069 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21072 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21073 Replace ASM_OUTPUT_LABEL with fprintf.
21075 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
21078 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
21079 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
21080 * config/i386/i386-c.c (ix86_target_macros_internal): Also
21081 define __IBT__ and __SHSTK__ for -fcf-protection.
21082 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
21084 (ix86_trampoline_init): Likewise.
21085 (x86_output_mi_thunk): Likewise.
21086 (ix86_notrack_prefixed_insn_p): Likewise.
21087 (ix86_option_override_internal): Don't disallow -fcf-protection.
21088 * config/i386/i386.md (rdssp<mode>): Also enable for
21090 (incssp<mode>): Likewise.
21091 (nop_endbr): Likewise.
21092 * config/i386/i386.opt (mcet): Change help message to built-in
21095 (mshstk): Likewise.
21096 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
21097 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
21098 enable CET built-in functions.
21100 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
21102 * common/config/i386/i386-common.c
21103 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
21104 OPTION_MASK_ISA_MOVDIRI_UNSET,
21105 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
21106 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
21107 * config.gcc (movdirintrin.h): New header.
21108 * config/i386/cpuid.h (bit_MOVDIRI,
21109 bit_MOVDIR64B): New bits.
21110 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
21112 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
21113 (VOID, PVOID, PCVOID)): New function types.
21114 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
21115 __builtin_ia32_directstoreu_u64,
21116 __builtin_ia32_movdir64b): New builtins.
21117 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
21118 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
21120 (ix86_valid_target_attribute_inner_p): Ditto.
21121 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
21122 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
21123 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
21124 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
21125 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
21126 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
21127 (movdiri<mode>, movdir64b_<mode>): New.
21128 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
21129 * config/i386/immintrin.h: Include movdirintrin.h.
21130 * config/i386/movdirintrin.h: New file.
21131 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
21133 2018-04-19 Richard Biener <rguenther@suse.de>
21135 PR middle-end/85455
21136 * cfg.c (clear_bb_flags): When loop state says we have
21137 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
21139 2018-04-19 Richard Biener <rguenther@suse.de>
21141 PR tree-optimization/84737
21142 * tree-vect-data-refs.c (vect_copy_ref_info): New function
21143 copying restrict info.
21144 (vect_setup_realignment): Use it.
21145 * tree-vectorizer.h (vect_copy_ref_info): Declare.
21146 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
21147 the first DR to all generated stores.
21148 (vectorizable_load): Likewise for loads.
21150 2018-04-19 Jakub Jelinek <jakub@redhat.com>
21152 PR tree-optimization/85446
21153 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
21154 the integral and pointer types to have the same precision.
21156 * doc/install.texi: Document --disable-cet being the default and
21159 2018-04-18 Martin Liska <mliska@suse.cz>
21161 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
21164 2018-04-18 Martin Liska <mliska@suse.cz>
21167 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
21170 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
21171 arguments if they are comparable.
21173 2018-04-18 Martin Liska <mliska@suse.cz>
21176 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
21179 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
21182 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
21185 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
21186 ENDBR after calling __morestack.
21188 2018-04-18 David Malcolm <dmalcolm@redhat.com>
21191 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
21192 by using gcc_base_ver to generate a gcc_driver_version, and use
21193 it when generating GCC_DRIVER_NAME.
21194 * configure: Regenerate.
21196 2018-04-18 Jakub Jelinek <jakub@redhat.com>
21199 * config.gcc: Obsolete powerpc*-*-*spe*.
21201 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21204 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
21205 (stabstr_D): Change type of unum from unsigned int to
21206 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
21209 2018-04-17 Jim Wilson <jimw@sifive.com>
21212 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
21213 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
21214 Set arg_pointer_offset after using pretend_args_size.
21216 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21218 PR rtl-optimization/85431
21219 * dse.c (record_store): Ignore zero width stores.
21222 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
21223 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
21224 __builtin_stack_restore rather than after it.
21225 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
21226 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
21227 argument instead of virtual_dynamic_stack_rtx.
21229 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
21231 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
21233 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21234 Add note to error message to explain internal mapping of overloaded
21235 built-in function name to non-overloaded built-in function name.
21236 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
21239 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
21242 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
21243 where the inputs overlap with the output.
21245 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21247 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
21248 (=v, v) alternative and explicit "memory" attribute.
21249 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
21250 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21252 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
21253 "sselog1" type instead of "sselog".
21254 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
21255 "sselog". Remove explicit "memory" attribute.
21256 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
21257 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21259 (vec_extract_hi_v32hi): Merge all alternatives into one, use
21260 "sselog1" type instead of "sselog". Remove explicit "memory"
21262 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
21263 use "sselog1" type instead of "sselog". Remove explicit "memory"
21265 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
21266 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
21268 (vec_extract_hi_v64qi): Merge all alternatives into one, use
21269 "sselog1" type instead of "sselog". Remove explicit "memory"
21271 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
21272 use "sselog1" type instead of "sselog". Remove explicit "memory"
21276 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
21278 PR middle-end/85414
21279 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
21282 2018-04-17 Martin Jambor <mjambor@suse.cz>
21285 * ipa-cp.c (create_specialized_node): Call
21286 expand_all_artificial_thunks if necessary.
21288 2018-04-17 Martin Liska <mliska@suse.cz>
21291 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
21292 in message, remote space in between '_G' and '('.
21294 2018-04-17 Jakub Jelinek <jakub@redhat.com>
21297 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
21298 avx512f_vmcmp<mode>3<round_saeonly_name>,
21299 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
21300 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
21301 avx512f_rndscale<mode><round_saeonly_name>,
21302 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
21303 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
21304 Use %<iptr>2 instead of %2 for -masm=intel.
21305 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
21306 avx512f_vcvttss2usi<round_saeonly_name>,
21307 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
21309 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
21310 avx512f_vcvttsd2usi<round_saeonly_name>,
21311 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
21312 Use %q1 instead of %1 for -masm=intel.
21313 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
21314 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
21315 of %3 for -masm=intel.
21316 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
21318 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
21320 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
21322 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
21323 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
21325 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
21327 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
21328 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
21329 %g1 and one with %0 and %1.
21330 (avx512er_vmrcp28<mode><round_saeonly_name>,
21331 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
21332 %1 for -masm=intel.
21333 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
21334 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
21335 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
21336 of %0 and %{%4%} for -masm=intel.
21337 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
21338 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
21339 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
21340 order of %0 and %{%5%}%{z%} for -masm=intel.
21342 2018-04-17 Jan Hubicka <jh@suse.cz>
21345 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
21347 2018-04-17 Martin Liska <mliska@suse.cz>
21350 * multiple_target.c (create_dispatcher_calls): Set apostrophes
21351 for target_clone error message. Make default implementation
21352 clone to be a local declaration.
21353 (separate_attrs): Add new argument and check for an empty
21355 (expand_target_clones): Handle it.
21356 (ipa_target_clone): Make redirection just for target_clones
21359 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
21360 Tom de Vries <tom@codesourcery.com>
21362 PR middle-end/84955
21363 * omp-expand.c (expand_oacc_for): Add dummy false branch for
21364 tiled basic blocks without omp continue statements.
21366 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
21369 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
21370 vec_extract expression as having side effects to make sure it gets
21373 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
21376 * config/i386/i386.c (get_builtin_code_for_version): Check
21379 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
21382 * config.gcc: Support "skylake".
21383 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21385 * config/i386/i386.c (m_SKYLAKE): Define.
21386 (processor_target_table): Add "skylake".
21387 (ix86_option_override_internal): Add "skylake".
21388 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
21389 PROCESSOR_CANNONLAKE.
21390 (get_builtin_code_for_version): Fix priority for
21391 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
21392 PROCESSOR_SKYLAKE-AVX512.
21393 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
21394 (processor_type): Add PROCESSOR_SKYLAKE.
21396 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
21397 Jason Merrill <jason@redhat.com>
21400 * convert.c (convert_to_integer_1): Use direct recursion for
21401 enumeral types and types with a precision less than the number
21402 of bits in their mode.
21404 2018-04-16 Julia Koval <julia.koval@intel.com>
21407 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
21408 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
21410 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
21413 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
21414 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
21415 and -mno-direct-move.
21417 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
21420 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
21421 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
21422 Ensure negative shifts result in {0}.
21424 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
21426 PR rtl-optimization/79916
21427 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
21428 regs (if any) to define how to gnerate SD moves when LRA is in
21431 2018-04-13 Jakub Jelinek <jakub@redhat.com>
21433 PR rtl-optimization/85393
21434 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
21435 * except.c (expand_dw2_landing_pad_for_region): Make static.
21436 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
21437 a label and unconditional jump to old_bb, rather than
21438 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
21441 PR rtl-optimization/85376
21442 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
21443 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
21444 instead of a specific value.
21446 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21447 Bin Cheng <bin.cheng@arm.com>
21449 PR tree-optimization/82965
21450 PR tree-optimization/83991
21451 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
21452 by_profile_only parameter.
21453 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
21454 information if the loop was predicted to iterate too many times.
21455 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
21457 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
21460 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
21463 2018-04-13 Martin Liska <mliska@suse.cz>
21464 Jakub Jelinek <jakub@redhat.com>
21466 PR middle-end/81657
21467 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
21468 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
21469 * builtins.c (expand_builtin_memory_copy_args): Use
21470 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
21471 handle dest_addr == pc_rtx.
21473 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
21476 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
21477 asked to not generate direct moves.
21478 (fix_trunc<mode>si2_stfiwx): Similar.
21479 (fix_trunc<mode>si2_internal): Similar.
21481 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21484 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
21485 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
21486 lookup if dest in some wider mode is known to be const0_rtx and
21487 if so, record permanent equivalence for it to be ZERO_EXTEND of
21488 the narrower mode destination.
21490 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21492 * lto-streamer-out.c (output_function): Revert 259346.
21493 * omp-expand.c (expand_oacc_for): Likewise.
21495 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
21497 PR rtl-optimization/85354
21498 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
21499 * sel-sched.c (sel_global_init): ... here.
21501 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
21504 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
21505 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
21506 mode for PE-COFF targets.
21507 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
21508 (i386_pe_asm_lto_end): Likewise.
21509 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
21510 (TARGET_ASM_LTO_END): Likewise.
21511 * config/i386/winnt.c (saved_debug_info_level): New static variable.
21512 (i386_pe_asm_lto_start): New function.
21513 (i386_pe_asm_lto_end): Likewise.
21515 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
21516 Richard Biener <rguenther@suse.de>
21518 PR middle-end/84955
21519 * lto-streamer-out.c (output_function): Fix CFG loop state before
21521 * omp-expand.c (expand_oacc_for): Handle calls to internal
21522 functions like regular functions.
21524 2018-04-12 Richard Biener <rguenther@suse.de>
21527 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
21528 for the early LTO debug to properly generate references to it
21529 during DIE emission. Do not re-use that for the skeleton for
21531 (dwarf2out_early_finish): Likewise.
21533 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21536 * config/i386/sse.md
21537 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
21538 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
21539 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
21540 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
21541 and output is a reg, avoid creating invalid lowpart subreg, but
21542 instead split into a 512-bit move. Don't split if not AVX512VL,
21543 input is xmm16+ reg and output is a mem.
21544 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
21545 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
21546 xmm16+ reg and output is a mem.
21548 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
21550 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
21551 also for flag_dwarf2_cfi_asm.
21553 2018-04-12 Jakub Jelinek <jakub@redhat.com>
21555 PR rtl-optimization/85342
21556 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
21557 a bool scalar var inside of the loop instead. Don't try to update
21558 recog_data.operand after failed apply_change_group.
21560 2018-04-12 Tom de Vries <tom@codesourcery.com>
21563 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
21564 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
21565 array with flexible array member as array without given dimension.
21566 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
21567 argument for undefined param to true.
21569 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
21572 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21573 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
21574 from PowerPC section.
21575 * config/rs6000/sysv4.opt (mcall-): Improve help text.
21576 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
21577 help text that is too long.
21578 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
21579 help text that is too long.
21580 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
21581 help text that is too long.
21583 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
21585 * config/alpha/alpha.md (stack_probe_internal): Rename
21586 from "probe_stack". Update all callers.
21588 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21590 PR rtl-optimization/84566
21591 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
21592 sched_macro_fuse_insns.
21594 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21597 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21598 (compute_block_dependences): ... from here.
21600 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21602 PR tree-optimization/85331
21603 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21604 from int to HOST_WIDE_INT.
21606 2018-04-11 Martin Jambor <mjambor@suse.cz>
21609 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21610 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21611 not the same as the source val.
21612 (cgraph_edge_brings_value_p): New parameter.
21613 (gather_edges_for_value): Pass destination value to
21614 cgraph_edge_brings_value_p.
21615 (perhaps_add_new_callers): Likewise.
21616 (get_info_about_necessary_edges): Likewise and exclude values brought
21617 only by self-recursive edges.
21618 (create_specialized_node): Redirect only clones of self-calling edges.
21619 (+self_recursive_pass_through_p): New function.
21620 (find_more_scalar_values_for_callers_subset): Use it.
21621 (find_aggregate_values_for_callers_subset): Likewise.
21622 (known_aggs_to_agg_replacement_list): Removed.
21623 (decide_whether_version_node): Re-calculate known constants for all
21624 remaining context clones.
21626 2018-04-11 Richard Biener <rguenther@suse.de>
21629 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21630 from early DWARF output.
21631 (dwarf2out_early_finish): Output line info unconditionally into
21632 early DWARF and add reference to it.
21634 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21637 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21638 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21639 other than V2DFmode using iptr mode attribute.
21640 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21642 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
21644 PR rtl-optimization/84659
21645 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21647 2018-04-11 Jakub Jelinek <jakub@redhat.com>
21650 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21652 (output_loc_list): Pass address of a dummy size variable even in the
21653 locview handling loop.
21654 (index_location_lists): Add comment on why skip_loc_list_entry can't
21657 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
21660 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21663 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
21666 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21667 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21668 and -mstring-compare-inline-limit.
21670 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21673 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21674 for stack clash protection in a register whenever we need it to be in
21677 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21679 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21680 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21682 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
21685 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21687 (mlong-double-): Ditto.
21688 * config/rs6000/sysv4.opt (msdata=): Ditto.
21689 (mtls-size=): Ditto.
21691 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
21693 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21694 erroneous entries for
21695 "vector int vec_ldl (int, long int *)", and
21696 "vector unsigned int vec_ldl (int, unsigned long int *)".
21697 Add comments and entries for
21698 "vector bool char vec_ldl (int, bool char *)",
21699 "vector bool short vec_ldl (int, bool short *)",
21700 "vector bool int vec_ldl (int, bool int *)",
21701 "vector bool long long vec_ldl (int, bool long long *)",
21702 "vector pixel vec_ldl (int, pixel *)",
21703 "vector long long vec_ldl (int, long long *)",
21704 "vector unsigned long long vec_ldl (int, unsigned long long *)".
21705 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21706 type tree bool_long_long_type_node and correct definition of
21707 bool_V2DI_type_node to make reference to this new type tree.
21708 (rs6000_mangle_type): Replace erroneous reference to
21709 bool_long_type_node with bool_long_long_type_node.
21710 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21711 comments to emphasize sign distinctions for char and int types and
21712 replace RS6000_BTI_bool_long constant with
21713 RS6000_BTI_bool_long_long constant. Also add comment to restrict
21714 use of RS6000_BTI_pixel.
21715 (bool_long_type_node): Remove this macro definition.
21716 (bool_long_long_type_node): New macro definition
21718 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21720 PR rtl-optimization/85300
21721 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21722 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21723 simplify_unary_operation fails.
21725 2018-04-10 Martin Liska <mliska@suse.cz>
21727 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21728 cgraph_edge and ipa_ref.
21730 2018-04-10 Jakub Jelinek <jakub@redhat.com>
21734 * config/i386/sse.md
21735 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21736 computation of the VEC_MERGE selector from mask.
21737 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21738 Fix decoding of the VEC_MERGE selector into mask.
21740 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21742 PR tree-optimization/85286
21743 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21745 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
21747 * final.c (final_1): Set insn_last_address as well as
21748 insn_current_address.
21750 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21753 * explow.c (emit_stack_probe): Call validize_mem on memory location
21754 before passing it to gen_probe_stack. Create address operand and
21755 legitimize it for the probe_stack_address case.
21757 2018-04-09 Jan Hubicka <jh@suse.cz>
21760 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21761 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21762 * tree.c (free_lang_data_in_type): Fix handling of binfos;
21764 (free_lang_data): Rebuild type inheritance graph.
21766 2018-04-09 Martin Sebor <msebor@redhat.com>
21768 * invoke.texi (-finline-small-functions): Mention other optimization
21770 (-findirect-inlining, -fpartial-inlining): Same.
21771 (-finline-functions-called-once): Same.
21772 (-freorder-blocks-and-partition): Same.
21774 2018-04-09 Jan Hubicka <jh@suse.cz>
21777 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21778 jumps; choose last target that matches the criteria (i.e.
21779 no partition changes for non-crossing jumps).
21780 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21781 support for redirecting crossing jumps to non-crossing.
21783 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
21785 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21786 also for naked functions.
21788 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
21790 * config/arc/arc.md (add_shift): New pattern.
21791 (add_shift2): Likewise.
21792 (sub_shift): Likewise.
21793 (sub_shift_cmp0_noout): Likewise.
21794 (compare_si_ashiftsi): Likewise.
21795 (xbfu_cmp0_noout): New combine pattern.
21796 (xbfu_cmp0"): Likewise.
21797 (movsi_set_cc_insn): Place the predicable variant first.
21798 (commutative_binary_cmp0_noout): Remove clobber.
21799 (commutative_binary_cmp0): New pattern.
21800 (noncommutative_binary_cmp0): Likewise.
21801 (noncommutative_binary_cmp0_noout): Likewise.
21802 (noncommutative_binary_comparison_result_used): Removed.
21803 (rsub_cmp0): New pattern.
21804 (rsub_cmp0_noout): Likewise.
21805 (extzvsi): Changed, keep only meaningful variants.
21806 (SQH, SEZ): New iterators.
21807 (SQH_postfix): New mode attribute.
21808 (SEZ_prefix): New code attribute.
21809 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21810 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21811 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21812 of numerical value.
21813 (noncommutative_operator): Check the availability of barrel
21816 2018-04-09 Richard Biener <rguenther@suse.de>
21818 PR tree-optimization/85284
21819 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21820 Only use the niter constraining form of simple_iv when the exit
21821 is always executed.
21823 2018-04-09 Tom de Vries <tom@codesourcery.com>
21826 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21827 (define_expand "*memory_barrier"): New define_expand.
21828 (define_insn "memory_barrier"): New insn.
21830 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21832 PR rtl-optimization/80463
21833 PR rtl-optimization/83972
21834 PR rtl-optimization/83480
21836 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21837 correct producer for the insn.
21838 (tidy_control_flow): Fixup seqnos in case of debug insns.
21840 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21842 PR rtl-optimization/83913
21844 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21845 different sched-times when merging exprs.
21847 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21849 PR rtl-optimization/83962
21851 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21852 tidy_fallthru_edge and tidy_control_flow.
21854 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
21856 PR rtl-optimization/83530
21858 * sel-sched.c (force_next_insn): New global variable.
21859 (remove_insn_for_debug): When force_next_insn is true, also leave only
21860 next insn in the ready list.
21861 (sel_sched_region): When the region wasn't scheduled, make another pass
21862 over it with force_next_insn set to 1.
21864 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21866 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21868 * config/nds32/constants.md (unspec_volatile_element): Add enum values
21869 for interrupt control.
21870 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21871 functions for interrupt control.
21872 * config/nds32/nds32-intrinsic.md: Likewise.
21873 * config/nds32/nds32_intrinsic.h: Likewise.
21874 * config/nds32/nds32.h (nds32_builtins): Likewise.
21876 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21878 * config/nds32/nds32.c (nds32_init_machine_status,
21879 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21880 strict_aligned_p field.
21881 (nds32_expand_to_rtl_hook): New function.
21882 (TARGET_EXPAND_TO_RTL_HOOK): Define.
21883 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21885 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21886 Chung-Ju Wu <jasonwucj@gmail.com>
21888 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21889 * config/nds32/nds32-n7.md: New file.
21890 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21891 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21893 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21894 * config/nds32/nds32.md (pipeline_model): Add n7.
21895 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21896 * config/nds32/pipelines.md: Include n7 settings.
21898 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21899 Chung-Ju Wu <jasonwucj@gmail.com>
21901 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21902 * config/nds32/nds32-e8.md: New file.
21903 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21904 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21906 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21907 * config/nds32/nds32.md (pipeline_model): Add e8.
21908 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21909 * config/nds32/pipelines.md: Include e8 settings.
21911 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21912 Chung-Ju Wu <jasonwucj@gmail.com>
21914 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21915 * config/nds32/nds32-n8.md: New file.
21916 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21917 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21919 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21920 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21921 * config/nds32/nds32.md (pipeline_model): Add n8.
21922 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21923 * config/nds32/pipelines.md: Include n8 settings.
21925 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
21926 Chung-Ju Wu <jasonwucj@gmail.com>
21928 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21929 * config/nds32/nds32-n9-2r1w.md: New file.
21930 * config/nds32/nds32-n9-3r2w.md: New file.
21931 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21932 nds32_register_ports): New or modify for cpu n9.
21933 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21935 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21936 * config/nds32/nds32-utils.c: New file.
21937 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21938 TARGET_MUL_SLOW): Define.
21939 * config/nds32/nds32.md (pipeline_model): New attribute.
21940 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21941 New options that support cpu n9.
21942 * config/nds32/pipelines.md: Include n9 settings.
21943 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21945 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
21947 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21948 information if necessary.
21949 (output_cond_branch_compare_zero): Likewise.
21950 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21951 (nds32_target_alignment): Refine for alignment.
21952 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21953 (FUNCTION_BOUNDARY): Modify.
21954 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21956 * config/nds32/nds32.opt (malways-align, malign-functions): New.
21958 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
21960 * config/nds32/constants.md (unspec_volatile_element): Add values for
21961 TLB operation and data prefetch.
21962 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21963 functions for TLB operation and data prefetch.
21964 * config/nds32/nds32-intrinsic.md: Likewise.
21965 * config/nds32/nds32_intrinsic.h: Likewise.
21966 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21967 (nds32_print_operand): Likewise.
21968 * config/nds32/nds32.h (nds32_builtins): Likewise.
21970 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
21971 Andrew Pinski <pinsika@gcc.gnu.org>
21973 PR middle-end/82976
21974 * match.pd: Use constant_boolean_node of correct type instead of
21975 boolean_true_node or boolean_false_node for simplifying
21976 pointer comparisons to zero.
21978 2018-04-07 Jakub Jelinek <jakub@redhat.com>
21980 PR tree-optimization/80021
21981 * tree.c (verify_type_variant): Make error call in verify_variant_match
21982 translatable and remove final full stop.
21984 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
21986 * config/nds32/constants.md (unspec_volatile_element): Add
21987 UNSPEC_VOLATILE_EH_RETURN.
21988 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21989 nds32_output_stack_pop): Support dwarf exception handling process.
21990 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21991 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21992 exception handling process.
21993 (nds32_compute_stack_frame): Likewise.
21994 (nds32_return_addr_rtx): Likewise.
21995 (nds32_initial_elimination_offset): Likewise.
21996 (nds32_expand_prologue): Likewise.
21997 (nds32_expand_epilogue): Likewise.
21998 (nds32_dynamic_chain_address): New function.
21999 * config/nds32/nds32.h (machine_function): Add fields for dwarf
22000 exception handling.
22001 (DYNAMIC_CHAIN_ADDRESS): Define.
22002 (EH_RETURN_DATA_REGNO): Define.
22003 (EH_RETURN_STACKADJ_RTX): Define.
22004 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
22005 patterns for dwarf exception handling.
22007 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22009 * config/nds32/nds32.h: Clean up obsolete macros.
22011 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22013 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22014 Add enum values for particular instructions.
22015 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22016 particular intrinsic functions.
22017 * config/nds32/nds32-intrinsic.md: Likewise.
22018 * config/nds32/nds32_intrinsic.h: Likewise.
22019 * config/nds32/nds32.h (nds32_builtins): Likewise.
22020 * config/nds32/nds32.md (type): Add pbsad and pbsada.
22021 (btst, ave): New patterns for particular instructions.
22023 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22025 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
22026 Add enum values for atomic load/store and memory sync.
22027 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
22029 * config/nds32/nds32-intrinsic.md: Likewise.
22030 * config/nds32/nds32_intrinsic.h: Likewise.
22031 * config/nds32/nds32.h (nds32_builtins): Likewise.
22033 2018-04-07 Jakub Jelinek <jakub@redhat.com>
22035 PR tree-optimization/85257
22036 * fold-const.c (native_encode_vector): If not all elts could fit
22037 and off is -1, return 0 rather than offset.
22038 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
22039 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
22040 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
22041 adjust buffer in native_interpret_expr call.
22043 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22045 * config/nds32/constants.md (unspec_volatile_element): Add cache
22046 control enum values.
22047 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
22048 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
22049 * config/nds32/nds32.c (nds32_cctl_names): New.
22050 (nds32_print_operand): Handle cache control register names.
22051 * config/nds32/nds32.h (nds32_builtins): New enum values.
22052 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
22054 * config/nds32/nds32.md (type): Add mmu.
22055 * config/nds32/pipelines.md (simple_insn): Add mmu.
22057 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22059 * config/nds32/nds32.md (type): Remove call.
22060 * config/nds32/pipelines.md (simple_insn): Likewise.
22062 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22064 * config/nds32/constants.md (unspec_volatile_element): Add
22065 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
22066 UNSPEC_VOLATILE_FMFCFG.
22067 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
22068 description for fmfcfg and fmfcsr.
22069 (bdesc_1arg): Add fmtcsr.
22070 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
22071 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
22072 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
22073 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
22074 unspec_fmfcfg): New patterns.
22075 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
22076 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
22077 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
22078 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
22079 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
22080 __nds32__fmfcfg): Define.
22082 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
22084 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
22085 intrinsic register names.
22086 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
22087 intrinsic register enum values and macros.
22089 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
22091 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
22092 for load/store addressing form.
22093 (nds32_print_operand_address): Likewise.
22095 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
22098 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
22099 based on LABEL_REF. Remove useless assertion.
22100 (pic_address_needs_scratch): Fix formatting.
22101 (sparc_legitimize_pic_address): Minor tweaks.
22102 (sparc_delegitimize_address): Adjust assertion accordingly.
22103 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
22104 into symbolic_operand.
22105 (movsi_high_pic_label_ref): Likewise.
22106 (movsi_lo_sum_pic_label_ref): Likewise.
22107 (movdi_pic_label_ref): Likewise.
22108 (movdi_high_pic_label_ref): Likewise.
22109 (movdi_lo_sum_pic_label_ref): Likewise.
22111 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
22113 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
22114 custom LIB_SPEC setup.
22116 2018-04-06 Ruslan Bukin <br@bsdpad.com>
22117 Kito Cheng <kito.cheng@gmail.com>
22119 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
22120 * config/riscv/freebsd.h: New.
22122 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22124 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
22125 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
22128 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22129 Kito Cheng <kito.cheng@gmail.com>
22131 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
22132 nds32_output_call, nds32_symbol_binds_local_p): New functions.
22133 * config/nds32/nds32-protos.h (nds32_output_call,
22134 nds32_output_return): Declare.
22135 * config/nds32/nds32.md: Refine all the call and return patterns.
22137 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22140 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
22141 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
22143 PR rtl-optimization/84872
22144 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
22145 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
22146 EDGE_CROSSING edge.
22148 2018-04-06 Tamar Christina <tamar.christina@arm.com>
22150 * expr.c (copy_blkmode_to_reg): Revert 254862.
22151 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
22153 2018-04-06 Richard Biener <rguenther@suse.de>
22155 PR middle-end/85244
22156 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
22157 after seeing a component reference with an adjacent field. Treat
22158 refs to arrays at struct end of external decls similar to
22159 refs to unconstrained commons.
22161 2018-04-06 Jakub Jelinek <jakub@redhat.com>
22164 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
22165 look through SAVE_EXPRs with non-side-effects argument. Adjust
22167 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
22170 2018-04-06 Richard Biener <rguenther@suse.de>
22172 PR middle-end/85180
22173 * alias.c (find_base_term): New wrapper around find_base_term
22174 unwinding CSELIB_VAL_PTR changes.
22175 (find_base_term): Do not restore CSELIB_VAL_PTR during the
22178 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
22180 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
22182 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
22183 constant definitions.
22184 ("nop"): lr 0,0 -> nopr r0
22185 ("nop_lr0", "nop_lr1"): New insn definitions.
22187 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
22189 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
22190 NDS32_V3PUSH_AVAILABLE_P macro.
22192 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
22193 Chung-Ju Wu <jasonwucj@gmail.com>
22195 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
22196 (nds32*-*-*): Add float and fpu_config into supported_defaults.
22197 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
22198 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
22199 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
22200 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
22201 * config/nds32/constraints.md: New constraints and checking for hard
22202 float configuration.
22203 * config/nds32/iterators.md: New mode iterator and attribute for hard
22204 float configuration.
22205 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
22207 * config/nds32/nds32-fpu.md: New file.
22208 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
22209 deal with hard float code generation.
22210 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
22212 (abi_type, float_reg_number): New enum type.
22213 * config/nds32/nds32-predicates.c: New predicates for hard float.
22214 * config/nds32/nds32-protos.h: Declare functions for hard float.
22215 * config/nds32/nds32.c: Implementation for hard float configuration.
22216 * config/nds32/nds32.h: Definitions for hard float configuration.
22217 * config/nds32/nds32.md: Include hard float machine description and
22218 modify patterns for hard float configuration.
22219 * config/nds32/nds32.opt: New options for hard float configuration.
22220 * config/nds32/predicates.md: New predicates for hard float
22223 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22225 * common/config/nds32/nds32-common.c
22226 (nds32_option_optimization_table): Enable -mreleax-hint by default.
22228 2018-04-05 Jakub Jelinek <jakub@redhat.com>
22230 PR middle-end/85195
22231 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
22232 CONSTRUCTOR_ELT (ctor, ...)->value.
22234 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
22237 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
22239 2018-04-05 Tom de Vries <tom@codesourcery.com>
22242 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
22245 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22246 Kito Cheng <kito.cheng@gmail.com>
22248 * config/nds32/constraints.md (U33): Fine-tune checking condition.
22249 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
22250 * config/nds32/nds32.h (nds32_16bit_address_type): Add
22251 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
22253 2018-04-05 Shiva Chen <shiva0217@gmail.com>
22254 Kito Cheng <kito.cheng@gmail.com>
22256 * config/nds32/constraints.md (Ufe): New memory constraint.
22257 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
22258 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
22259 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
22261 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
22262 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
22264 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22266 * config/nds32/nds32.md: Use optimize_size in the condition for
22267 alu-shift instructions.
22269 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22271 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
22273 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22275 * config/nds32/nds32.md (negsi2): Refine pattern.
22277 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22278 Chung-Ju Wu <jasonwucj@gmail.com>
22280 * config/nds32/iterators.md (shift_rotate): New code iterator.
22281 (shift): New code attribute.
22282 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
22283 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
22284 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
22285 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
22286 bit-wise operations.
22287 (andsi3, *andsi3): Ditto.
22288 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
22289 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
22290 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
22291 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
22292 nds32_ior_operand, nds32_xor_operand): New predicates.
22294 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22296 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
22297 (addsi3, subsi3): ... this.
22299 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22301 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
22303 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22305 * config/nds32/nds32.md: Adjust indention.
22307 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
22309 * config/nds32/nds32.md (feature): New attribute.
22311 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
22313 * config/nds32/nds32.md (subtype): New attribute.
22315 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
22318 * config/arm/arm-builtins.c (arm_expand_builtin): Change
22319 expansion to perform a bitwise AND of the argument followed by a
22320 boolean negation of the result.
22322 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
22324 PR rtl-optimization/84878
22325 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
22326 the basic block. Assert the use reference is not artificial and that
22327 it has an associated insn.
22329 2018-04-04 Michael Matz <matz@suse.de>
22331 * builtins.c (compute_objsize): Pass correct operand
22332 to array_at_struct_end_p.
22334 2018-04-04 Richard Biener <rguenther@suse.de>
22337 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
22338 from contexts for DINFO_LEVEL_TERSE and below.
22340 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22342 * config/nds32/nds32-doubleword.md (move_<mode>): Require
22343 resiter_operand condition.
22344 * config/nds32/nds32.md (*move<mode>): Ditto.
22346 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22347 Monk Chiang <sh.chiang04@gmail.com>
22349 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
22351 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22353 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
22355 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22356 Kito Cheng <kito.cheng@gmail.com>
22358 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
22359 nds32_cond_code_str, output_cond_branch,
22360 output_cond_branch_compare_zero, nds32_expand_cbranch,
22361 nds32_expand_cstore, nds32_expand_movcc,
22362 nds32_output_cbranchsi4_equality_zero,
22363 nds32_output_cbranchsi4_equality_reg,
22364 nds32_output_cbranchsi4_equality_reg_or_const_int,
22365 nds32_output_cbranchsi4_greater_less_zero: New functions.
22366 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
22367 nds32_expand_cstore, nds32_expand_movcc,
22368 nds32_output_cbranchsi4_equality_zero,
22369 nds32_output_cbranchsi4_equality_reg,
22370 nds32_output_cbranchsi4_equality_reg_or_const_int,
22371 nds32_output_cbranchsi4_greater_less_zero): Declare.
22372 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
22373 nds32_rimm11s_operand): New predicates.
22374 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
22375 * config/nds32/nds32.md: Rewrite all the branch and conditional move
22378 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
22380 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
22381 * config/nds32/nds32.md: Ditto.
22382 * config/nds32/pipelines.md: Ditto.
22384 2018-04-04 Richard Biener <rguenther@suse.de>
22386 PR tree-optimization/85168
22387 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
22388 propagating abnormals.
22390 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22392 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
22394 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
22395 Kito Cheng <kito.cheng@gmail.com>
22397 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
22398 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
22399 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
22400 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
22401 * config/nds32/nds32.md (sibcall_internal): New.
22402 (sibcall_register): Remove.
22403 (sibcall_immediate): Remove.
22404 (sibcall_value_internal): New.
22405 (sibcall_value_register): Remove.
22406 (sibcall_value_immediate): Remove.
22407 * config/nds32/predicates.md (nds32_general_register_operand): New.
22408 (nds32_call_address_operand): New.
22410 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22412 PR rtl-optimization/85167
22413 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
22414 bb_defs if *split_p, instead preinitialize it to NULL.
22416 PR tree-optimization/85156
22417 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
22418 evaluating the argument multiple times.
22420 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
22422 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
22424 (_mm_cvtpd_ps): Likewise.
22425 (_mm_cvttpd_epi32): Likewise.
22426 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
22427 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
22428 vector, pixel, and bool following altivec.h include.
22430 2018-04-03 Martin Sebor <msebor@redhat.com>
22432 * doc/extend.texi (Common Function Attributes): Clarify.
22433 (const attribute): Likewise.
22434 (pure attribute): Likewise.
22436 2018-04-03 Jakub Jelinek <jakub@redhat.com>
22439 * config/i386/i386.c (ix86_expand_vector_set): Use
22440 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
22442 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
22444 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
22445 instructions when changing rounding bits to preserve precision bits
22446 in the x87 control word.
22448 2018-04-03 Martin Liska <mliska@suse.cz>
22450 PR tree-optimization/82491
22451 * rtl.h (strip_offset_and_add): Replace += suboffset with
22452 poly_uint64 () + suboffset.
22454 2018-03-29 Martin Liska <mliska@suse.cz>
22455 Martin Jambor <mjambor@suse.cz>
22458 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
22459 param_type is not an integral or pointer type.
22461 2018-04-03 Richard Biener <rguenther@suse.de>
22463 * sese.h (recompute_all_dominators): Remove.
22465 2018-04-02 Martin Sebor <msebor@redhat.com>
22467 * doc/invoke.texi (-Wrestrict): Fix typos.
22469 2018-04-02 Jim Wilson <jimw@sifive.com>
22471 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
22472 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
22473 (<optab>di3, <optab>si3_extend): Likewise.
22474 (<optab>si3_mask, <optab>si3_mask_1): New.
22475 (<optab>di3_mask, <optab>di3_mask_1): New.
22476 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
22477 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
22478 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
22480 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
22482 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
22485 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
22487 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
22488 (nds32_canonicalize_comparison): New function.
22490 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22491 Kito Cheng <kito.cheng@gmail.com>
22492 Kuan-Lin Chen <kuanlinchentw@gmail.com>
22494 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
22495 * config/nds32/constants.md (unspec_volatile_element): Add
22496 UNSPEC_VOLATILE_RELAX_GROUP.
22497 * config/nds32/nds32-relax-opt.c: New file.
22498 * config/nds32/nds32-predicates.c
22499 (nds32_symbol_load_store_p): New function.
22500 * config/nds32/nds32-protos.h
22501 (nds32_symbol_load_store_p): Declare function.
22502 (make_pass_nds32_relax_opt): Declare new rtl pass function.
22503 * config/nds32/nds32.c
22504 (nds32_register_pass): New function to register pass.
22505 (nds32_register_passes): New function to register passes.
22506 * config/nds32/nds32.md (relax_group): New pattern.
22507 * config/nds32/nds32.opt (mrelax-hint): New option.
22508 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
22510 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
22512 * config/nds32/t-nds32: Modify files dependency.
22514 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22516 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
22517 (PROFILE_HOOK): Define its implementation.
22519 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
22521 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
22522 type and 32-bit size.
22524 2018-04-01 Jakub Jelinek <jakub@redhat.com>
22526 PR middle-end/85090
22527 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
22528 (V_128_256): New mode iterator.
22529 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
22530 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
22531 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
22533 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
22534 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
22536 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
22539 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
22540 NaN inputs correctly.
22542 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
22545 * config/rs6000/vsx.md (??r): New mode attribute.
22546 (*vsx_mov<mode>_64bit): Use it.
22547 (*vsx_mov<mode>_32bit): Likewise.
22549 2018-03-30 Martin Sebor <msebor@redhat.com>
22551 PR tree-optimization/84818
22552 * builtins.c (check_access): Use warning_n.
22554 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
22557 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
22559 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
22562 2018-03-30 Julia Koval <julia.koval@intel.com>
22565 * x86-tune.def (movx, partial_reg_dependency): Enable for
22568 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
22570 PR inline-asm/84985
22571 * lra-constraints.c (process_alt_operands): Move setting
22572 this_alternative_matches below.
22574 2018-03-29 Martin Liska <mliska@suse.cz>
22577 * doc/invoke.texi: Document how LTO works with debug info.
22578 Describe auto-load support of binutils. Mention 'x86-64'
22579 as valid option value of -march option.
22581 2018-03-29 Jakub Jelinek <jakub@redhat.com>
22583 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
22586 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
22587 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
22588 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
22591 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22594 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
22595 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
22596 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
22597 for RS6000_BTM_POWERPC64.
22598 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22599 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22600 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22603 (DIVDEU): Likewise.
22605 2018-03-28 Carl Love <cel@us.ibm.com>
22608 2017-09-27 Carl Love <cel@us.ibm.com>
22610 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22611 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22612 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22615 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
22617 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22618 instead of __vector bool.
22619 (_mm_max_pu8): Likewise.
22620 (_mm_min_pi16): Likewise.
22622 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
22625 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22626 (DIVWEUO): Likewise.
22627 (DIVDEO): Likewise.
22628 (DIVDEUO): Likewise.
22629 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22630 DIVWEUO and DIVDEUO.
22631 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22632 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22633 (div_extend): Likewise.
22634 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22636 (__builtin_divweuo): Likewise.
22637 (__builtin_divdeo): Likewise.
22638 (__builtin_divdeuo): Likewise.
22640 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22643 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22644 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22646 PR tree-optimization/82004
22647 * gimple-match-head.c (optimize_pow_to_exp): New function.
22648 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22649 Don't fold to exp if optimize_pow_to_exp is false.
22651 2018-03-28 Martin Liska <mliska@suse.cz>
22654 * calls.c (initialize_argument_information): Fix trailing space.
22655 * common.opt: Fix typo and provide better explanation for
22656 -fsanitize-coverage option.
22657 * config/i386/i386.opt: Fix typo.
22659 2018-03-28 Jakub Jelinek <jakub@redhat.com>
22660 Martin Liska <mliska@suse.cz>
22663 * gimplify.c (asan_poison_variable): Don't do the check for
22664 gimplify_omp_ctxp here.
22665 (gimplify_decl_expr): Do it here.
22666 (gimplify_target_expr): Likewise.
22668 2018-03-28 Martin Liska <mliska@suse.cz>
22671 * config/i386/i386.c (ix86_function_arg_advance): Do not call
22672 chkp_type_bounds_count if MPX is not enabled.
22674 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
22676 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22678 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
22681 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22682 function to create the function decl for complex long double
22683 multiply and divide for -mabi=ieeelongdouble.
22684 (init_float128_ieee): Call it.
22686 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
22689 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22690 -fcf-protection=branch -mibt.
22691 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22693 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22696 * config/arm/arm.c (arm_valid_symbolic_address): Handle
22697 arm_word_relocations.
22699 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
22702 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22703 extern array declarations.
22705 2018-03-27 Richard Biener <rguenther@suse.de>
22707 PR middle-end/84067
22708 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22709 explicit single_use checks.
22711 2018-03-27 Richard Biener <rguenther@suse.de>
22713 PR tree-optimization/85082
22714 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22717 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
22719 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22720 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22721 Turn on fasynchronous-unwind-tables and funwind-tables.
22723 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
22726 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22727 (*bmi_blsr_<mode>_ccz): Ditto.
22729 2018-03-26 Tom de Vries <tom@codesourcery.com>
22731 PR tree-optimization/85063
22732 * omp-general.c (offloading_function_p): New function. Factor out
22734 * omp-offload.c (pass_omp_target_link::gate): ... here.
22735 * omp-general.h (offloading_function_p): Declare.
22736 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22737 with attribute omp declare target for offloading functions.
22739 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
22741 PR tree-optimization/84005
22742 * tree-data-ref.h (get_base_for_alignment): Declare.
22743 * tree-data-ref.c (get_base_for_alignment_1): New function.
22744 (get_base_for_alignment): Likewise.
22745 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22746 get_base_for_alignment to find a suitable base object, instead
22747 of always using drb->base_address.
22749 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22751 PR inline-asm/85022
22752 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22753 known size by default.
22755 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
22757 PR inline-asm/85030
22758 * lra-constraints.c (process_alt_operands): Don't match BLKmode
22759 and non BLKmode operands.
22761 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22764 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22765 Clean up attributes.
22767 2018-03-23 Richard Biener <rguenther@suse.de>
22770 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22771 we are going to emit early debug for LTO.
22773 2018-03-23 Jakub Jelinek <jakub@redhat.com>
22775 PR inline-asm/85034
22776 * function.c (match_asm_constraints_1): Don't optimize if input
22777 doesn't satisfy general_operand predicate for output's mode.
22779 PR inline-asm/85022
22780 * alias.c (write_dependence_p): Don't require for x_canonicalized
22781 non-VOIDmode if x has VOIDmode.
22784 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22785 just don't try to optimize it rather than assert it never happens.
22787 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22789 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22790 macro expansions for definition of ST_INTERNAL_<mode> and
22791 LD_INTERNAL_<mode> builtins.
22792 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22794 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22796 (altivec_expand_st_builtin): Likewise.
22797 (altivec_expand_builtin): Remove calls to deleted functions.
22798 (rs6000_address_for_altivec): Delete this function.
22799 * config/rs6000/vector.md: Remove expands for
22800 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22802 2018-03-22 Sudakshina Das <sudi.das@arm.com>
22805 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22806 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22807 re-computing once computed.
22808 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22809 (arm_init_machine_status): Initialize
22810 machine->static_chain_stack_bytes.
22812 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
22815 * doc/extend.texi: Add four new prototypes for vec_ld.
22816 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22817 definitions for more logical presentation.
22818 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22819 entries for V1TI variants of __builtin_altivec_ld builtin.
22820 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22821 handling of V1TI variant of LVX icode pattern.
22822 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22823 (rs6000_gimple_fold_builtin): Likewise.
22824 (altivec_init_builtins): Add code to define
22825 __builtin_altivec_lvx_v1ti function.
22827 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22829 PR inline-asm/84941
22830 * function.c (match_asm_constraints_1): Don't do the optimization
22831 if input isn't a REG, SUBREG, MEM or constant.
22833 2018-03-22 Tom de Vries <tom@codesourcery.com>
22835 PR tree-optimization/84956
22836 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22837 bb_has_abnormal_pred.
22839 2018-03-22 Jakub Jelinek <jakub@redhat.com>
22842 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22843 DECL_INITIAL (decl) to decl at the end.
22844 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22845 adjust the comment.
22847 2018-03-21 Joseph Myers <joseph@codesourcery.com>
22849 * doc/extend.texi (__builtin_tgmath): Document when complex
22850 integer types are treated as _Complex _Float64.
22852 2018-03-21 Tom de Vries <tom@codesourcery.com>
22854 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22856 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22858 PR tree-optimization/84960
22859 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22860 if it is ENTRY block, move them into single succ of ENTRY in that case.
22862 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
22864 PR tree-optimization/84811
22865 * poly-int.h (poly_span_traits): Remove the T3 parameter and
22866 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22867 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22868 (known_subrange_p): Update accordingly. Cast each value involved
22869 in the size comparison, rather than casting the result of the
22872 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22874 PR tree-optimization/84982
22875 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22876 by flipping the least significant bit rather than all bits from
22877 bitpos to bitpos + bitsize - 1.
22879 2018-03-21 Nathan Sidwell <nathan@acm.org>
22881 * doc/extend.texi (Deprecated Features): Remove mention of
22882 long-deleted deprecations.
22884 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
22887 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22888 * configure: Regenerate.
22890 2018-03-21 Tom de Vries <tom@codesourcery.com>
22892 PR tree-optimization/83126
22893 * tree-parloops.c (num_phis): New function.
22894 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22896 2018-03-21 Nathan Sidwell <nathan@acm.org>
22898 * doc/extend.texi (Deprecated Features): Update deprecated flags,
22899 mention anon-struct/union members and trailing attributes.
22901 2018-03-21 Bin Cheng <bin.cheng@arm.com>
22903 PR tree-optimization/84969
22904 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22905 builtin memset partitions if they set different rhs values.
22907 2018-03-21 Jakub Jelinek <jakub@redhat.com>
22909 PR rtl-optimization/84989
22910 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22911 VEC_DUPLICATE with scalar result mode.
22913 2018-03-21 Martin Liska <mliska@suse.cz>
22916 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22917 not intended return statement.
22919 2018-03-21 Martin Liska <mliska@suse.cz>
22922 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22923 (chkp_find_bound_slots_1): Limit number of iterations.
22925 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
22928 * Minor grammar fixes for x86 options.
22930 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22933 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22934 holding REG_CFA_RESTORE notes, instead turn them into a USE.
22936 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
22939 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22940 (altivec_lvx_<mode>_1op): Likewise.
22941 (altivec_stvx_<mode>_2op): Likewise.
22942 (altivec_stvx_<mode>_1op): Likewise.
22943 (altivec_lvx_<VM2:mode>): New define_expand.
22944 (altivec_stvx_<VM2:mode>): Likewise.
22945 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22946 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22947 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22948 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22949 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22950 (rs6000_gen_lvx): Likewise.
22951 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22952 (altivec_expand_stv_builtin): Likewise.
22953 (altivec_expand_builtin): Likewise.
22954 * config/rs6000/vector.md: Likewise.
22956 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22959 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22962 2018-03-20 Richard Biener <rguenther@suse.de>
22965 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22966 sign-conversions as zero, fall back to standard scalar_stmt
22969 2018-03-20 Martin Liska <mliska@suse.cz>
22972 * predict.c (rebuild_frequencies): Handle case when we have
22973 PROFILE_ABSENT, but flag_guess_branch_prob is false.
22975 2018-03-20 Jakub Jelinek <jakub@redhat.com>
22978 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22979 flag_section_anchors.
22980 * varasm.c (use_blocks_for_decl_p): Remove hack for
22981 dw2_force_const_mem.
22984 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22986 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
22987 be created, use lowpart_subreg of operands[0] rather than operands[0]
22989 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22990 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22991 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22992 and n constraint instead of aarch64_shift_imm_di and Usd.
22993 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22994 (*aarch64_<optab>_reg_minus<mode>3): ... this.
22996 2018-03-20 Sudakshina Das <sudi.das@arm.com>
22999 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
23000 to favor GPR over NEON registers.
23001 (<shift>di3_neon): Likewise.
23003 2018-03-20 Tom de Vries <tom@codesourcery.com>
23006 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
23007 (nvptx_process_pars): Emit bar.sync asap and alap.
23009 2018-03-20 Tom de Vries <tom@codesourcery.com>
23012 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
23013 seen_label if seen_label is already set.
23015 2018-03-20 Jakub Jelinek <jakub@redhat.com>
23018 * config/i386/i386.c (fold_builtin_cpu): For features above 31
23019 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
23020 Use 1U instead of 1. Formatting fixes.
23023 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
23024 instead of TREE_TYPE (s1) for the return value.
23026 2018-03-19 Jakub Jelinek <jakub@redhat.com>
23028 PR tree-optimization/84946
23029 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
23030 bitsize + bitsize in poly_uint64 rather than poly_int64.
23033 * dwarf2asm.c: Include fold-const.c.
23034 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
23035 of decl rather than decl itself.
23037 PR rtl-optimization/84643
23038 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
23040 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
23043 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
23044 calling assemble_variable.
23046 2018-03-19 Sudakshina Das <sudi.das@arm.com>
23049 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
23050 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
23052 2018-03-19 Jim Wilson <jimw@sifive.com>
23055 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
23056 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
23057 (riscv_first_stack_step): Likewise.
23058 (riscv_option_override): Use STACK_BOUNDARY instead of
23059 MIN_STACK_BOUNDARY.
23060 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
23061 MIN_STACK_BOUNDARY.
23062 (BIGGEST_ALIGNMENT): Set to 128.
23063 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
23064 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
23067 2018-03-19 Richard Biener <rguenther@suse.de>
23069 PR tree-optimization/84933
23070 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
23071 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
23073 2018-03-19 Richard Biener <rguenther@suse.de>
23075 PR tree-optimization/84859
23076 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
23077 (cond_if_else_store_replacement): Perform sinking operation on
23078 single-store BBs regardless of MAX_STORES_TO_SINK setting.
23079 Generalize what a BB with a single eligible store is.
23081 2018-03-19 Richard Biener <rguenther@suse.de>
23083 PR tree-optimization/84929
23084 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
23085 chrec_is_positive against non-chrec arg.
23087 2018-03-19 Tamar Christina <tamar.christina@arm.com>
23090 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
23092 2018-03-18 Martin Liska <mliska@suse.cz>
23094 PR rtl-optimization/84635
23095 * regrename.c (build_def_use): Use matches_mode only when
23098 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
23100 PR tree-optimization/84913
23101 * tree-vect-loop.c (vectorizable_reduction): Don't try to
23102 vectorize chains of COND_EXPRs.
23104 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23106 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
23108 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23110 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
23112 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
23114 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
23116 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23117 Kito Cheng <kito.cheng@gmail.com>
23119 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
23120 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
23121 (nds32_adjust_reg_alloc_order): New function.
23122 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
23124 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
23126 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
23127 nds32_print_operand, nds32_print_operand_address): Use
23128 HOST_WIDE_INT_PRINT_DEC instead.
23130 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
23132 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
23134 2018-03-17 Jakub Jelinek <jakub@redhat.com>
23137 * config/i386/i386.c (initial_ix86_tune_features,
23138 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
23139 unsigned long long.
23140 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
23141 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
23142 rather than 1u << ix86_tune. Formatting fix.
23143 (ix86_option_override_internal): Change ix86_arch_mask from
23144 unsigned int to unsigned HOST_WIDE_INT, initialize to
23145 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
23146 (ix86_function_specific_restore): Likewise.
23148 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23151 * postreload.c (reload_combine_recognize_pattern): Perform
23152 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
23153 truncate_int_for_mode the result for the destination's mode.
23156 * hsa-gen.c (mem_type_for_type): Fix comment typo.
23157 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
23159 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23162 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
23165 * lra-assigns.c (lra_split_hard_reg_for): Don't use
23166 regno_allocno_class_array and sorted_pseudos.
23167 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
23168 insns where regno is used.
23170 2018-03-16 Martin Liska <mliska@suse.cz>
23173 * multiple_target.c (create_dispatcher_calls): Redirect
23174 reference in the symbol table.
23176 2018-03-16 Martin Liska <mliska@suse.cz>
23179 * multiple_target.c (create_dispatcher_calls): Redirect also
23182 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23186 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
23187 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
23188 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
23190 2018-03-16 Julia Koval <julia.koval@intel.com>
23192 * doc/invoke.texi (Skylake Server): Add CLWB.
23193 Cannonlake): Remove CLWB.
23195 2018-03-16 Jakub Jelinek <jakub@redhat.com>
23197 PR tree-optimization/84841
23198 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
23200 (FLOAT_ONE_CONST_TYPE): Define.
23201 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
23202 (sort_by_operand_rank): Put entries with higher constant_type last
23203 rather than first to match comments.
23205 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
23207 * config/nios2/nios2.md (movsi_internal): Fix thinko in
23210 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23213 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
23214 check and use address of target always.
23216 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
23219 * config/i386/i386.c (indirect_thunk_needed): Update comments.
23220 (indirect_thunk_bnd_needed): Likewise.
23221 (indirect_thunks_used): Likewise.
23222 (indirect_thunks_bnd_used): Likewise.
23223 (indirect_return_needed): New.
23224 (indirect_return_bnd_needed): Likewise.
23225 (output_indirect_thunk_function): Add a bool argument for
23227 (output_indirect_thunk_function): Don't generate alias for
23228 function return thunk.
23229 (ix86_code_end): Call output_indirect_thunk_function to generate
23230 function return thunks.
23231 (ix86_output_function_return): Set indirect_return_bnd_needed
23232 and indirect_return_needed instead of indirect_thunk_bnd_needed
23233 and indirect_thunk_needed.
23235 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
23237 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
23238 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
23239 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
23241 2018-03-15 David Malcolm <dmalcolm@redhat.com>
23242 Paul Hua <paul.hua.gm@gmail.com>
23245 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
23247 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
23249 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
23250 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
23251 resp. SFmode cases.
23253 2018-03-15 Tamar Christina <tamar.christina@arm.com>
23256 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
23257 instead of GET_MODE_SIZE when comparing Units.
23259 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
23262 * varasm.c (hash_section): Return an unchangeble hash value
23263 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
23264 Return !aarch64_can_use_per_function_literal_pools_p ().
23266 2018-03-15 Jakub Jelinek <jakub@redhat.com>
23269 * optabs.c (emit_conditional_move): Pass address of cmode's copy
23270 rather than address of cmode as last argument to prepare_cmp_insn.
23272 2018-03-15 Julia Koval <julia.koval@intel.com>
23274 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
23275 F_AVX512VNNI, F_AVX512BITALG): New.
23277 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
23280 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
23281 insn for floating-point loads and stores.
23283 2018-03-14 Carl Love <cel@us.ibm.com>
23285 * config/rs6000/rs6000-c.c: Add macro definitions for
23286 ALTIVEC_BUILTIN_VEC_PERMXOR.
23287 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
23288 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
23289 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
23290 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
23292 * config/doc/extend.texi: Add prototypes for vec_permxor.
23294 2018-03-14 David Malcolm <dmalcolm@redhat.com>
23297 * diagnostic-show-locus.c (class layout_point): Convert m_line
23298 from int to linenum_type.
23299 (line_span::comparator): Use linenum "compare" function when
23300 comparing line numbers.
23301 (test_line_span): New function.
23302 (layout_range::contains_point): Convert param "row" from int to
23304 (layout_range::intersects_line_p): Likewise.
23305 (layout::will_show_line_p): Likewise.
23306 (layout::print_source_line): Likewise.
23307 (layout::should_print_annotation_line_p): Likewise.
23308 (layout::print_annotation_line): Likewise.
23309 (layout::print_leading_fixits): Likewise.
23310 (layout::annotation_line_showed_range_p): Likewise.
23311 (struct line_corrections): Likewise for field m_row.
23312 (line_corrections::line_corrections): Likewise for param "row".
23313 (layout::print_trailing_fixits): Likewise.
23314 (layout::get_state_at_point): Likewise.
23315 (layout::get_x_bound_for_row): Likewise.
23316 (layout::print_line): Likewise.
23317 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
23318 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
23319 * input.c (selftest::test_linenum_comparisons): New function.
23320 (selftest::input_c_tests): Call it.
23321 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
23322 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
23323 * selftest.h (ASSERT_GT): New macro.
23324 (ASSERT_GT_AT): New macro.
23325 (ASSERT_LT): New macro.
23326 (ASSERT_LT_AT): New macro.
23328 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
23330 PR rtl-optimization/84780
23331 * combine.c (distribute_links): Don't make a link based on pc_rtx.
23333 2018-03-14 Martin Liska <mliska@suse.cz>
23335 * tree.c (record_node_allocation_statistics): Use
23336 get_stats_node_kind.
23337 (get_stats_node_kind): New function extracted from
23338 record_node_allocation_statistics.
23339 (free_node): Use get_stats_node_kind.
23341 2018-03-14 Richard Biener <rguenther@suse.de>
23343 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
23344 that the value-set of ANTIC_IN doesn't grow.
23347 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23349 (BB_VISITED_WITH_VISITED_SUCCS): New define.
23350 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23352 2018-03-14 Julia Koval <julia.koval@intel.com>
23354 * config.gcc (icelake-client, icelake-server): New.
23356 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
23357 (initial_ix86_arch_features): Ditto.
23358 (PTA_SKYLAKE): Add SGX.
23359 (PTA_ICELAKE): Remove.
23360 (PTA_ICELAKE_CLIENT): New.
23361 (PTA_ICELAKE_SERVER): New.
23362 (ix86_option_override_internal): Split up icelake on icelake client and
23364 (get_builtin_code_for_version): Ditto.
23365 (fold_builtin_cpu): Ditto.
23366 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
23367 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
23368 * config/i386/i386.h (processor_type): Ditto.
23369 * doc/invoke.texi: Ditto.
23371 2018-03-14 Jakub Jelinek <jakub@redhat.com>
23374 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
23375 INTEGER_CST offset, add it together with bitpos / 8 and
23376 sign extend based on POINTER_SIZE.
23380 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
23383 * config/i386/constraints.md (Yc): New register constraint.
23384 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
23385 Use Yc constraint for alternative 2 of operand 0. Remove
23386 preferred_for_speed attribute.
23388 2018-03-14 Richard Biener <rguenther@suse.de>
23390 PR tree-optimization/84830
23391 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
23392 with the old one to avoid oscillations.
23394 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
23397 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
23399 (assign_by_spills): Return a flag of reload assignment failure.
23400 Do not process the reload assignment failures. Do not spill other
23401 reload pseudos if they has the same reg class. Update n if
23403 (lra_assign): Add a return arg. Set up from the result of
23404 assign_by_spills call.
23405 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23406 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23407 usage_insns if it is not NULL.
23408 (spill_hard_reg_in_range): New function.
23409 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23410 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23411 function prototypes.
23412 (lra_assign): Change prototype.
23413 * lra.c (lra): Add code to deal with fails by splitting hard reg
23416 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
23418 * config/riscv/riscv.opt (mrelax): New option.
23419 * config/riscv/riscv.c (riscv_file_start): Emit ".option
23420 "norelax" when riscv_mrelax is disabled.
23421 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
23423 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
23426 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
23427 reassociation for int modes.
23429 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23431 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
23432 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
23434 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
23435 * config/aarch64/aarch64-sve.md
23436 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
23437 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
23438 (*extend<mode><Vwide>2): Rename to...
23439 (aarch64_sve_extend<mode><Vwide>2): ...this.
23440 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
23441 renaming the old pattern to...
23442 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
23444 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
23445 define_expand, renaming the old pattern to...
23446 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
23447 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
23448 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
23449 account when deciding which SVE instruction the optab should use.
23450 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
23452 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23454 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
23455 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
23456 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
23457 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
23458 (tlsdesc_small_<mode>): Turn a define_expand and use
23459 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
23460 (tlsdesc_small_advsimd_<mode>): ...this.
23461 (tlsdesc_small_sve_<mode>): New pattern.
23463 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
23465 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
23466 (UNSPEC_UMUL_HIGHPART): New constants.
23467 (MUL_HIGHPART): New int iteraor.
23468 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
23469 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
23471 (*<su>mul<mode>3_highpart): New define_insn.
23473 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
23476 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
23479 2018-03-13 Martin Liska <mliska@suse.cz>
23482 * (sem_item_optimizer::sem_item_optimizer): Initialize new
23484 (sem_item_optimizer::~sem_item_optimizer): Release it.
23485 (sem_item_optimizer::merge_classes): Register variable aliases.
23486 (sem_item_optimizer::fixup_pt_set): New function.
23487 (sem_item_optimizer::fixup_points_to_sets): Likewise.
23488 * ipa-icf.h: Declare new variables and functions.
23490 2018-03-13 Jakub Jelinek <jakub@redhat.com>
23492 PR middle-end/84834
23493 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
23494 integer_pow2p@2 and test integer_pow2p in condition.
23495 (A < 0 ? C : 0): Similarly for @1.
23497 PR middle-end/84831
23498 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
23499 characters starting at p contain '\0' character, don't look beyond
23503 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
23504 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
23507 * reg-stack.c (change_stack): Change update_end var from int to
23508 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
23509 also call set_block_for_insn on the newly added insns and rescan.
23512 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
23513 on the last operand.
23516 * tree.c (stabilize_reference_1): Return save_expr (e) for
23517 STATEMENT_LIST even if it doesn't have side-effects.
23519 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
23521 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
23523 2018-03-12 Renlin Li <renlin.li@arm.com>
23525 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
23526 aarch64_output_scalar_simd_mov_immediate.
23528 2018-03-12 Martin Sebor <msebor@redhat.com>
23530 PR tree-optimization/83456
23531 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
23532 for perfectly overlapping calls to memcpy.
23533 (gimple_fold_builtin_memory_chk): Same.
23534 (gimple_fold_builtin_strcpy): Handle no-warning.
23535 (gimple_fold_builtin_stxcpy_chk): Same.
23536 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
23538 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23540 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
23541 parameter. Use it for SFmode.
23542 (rs6000_function_arg_advance_1): Adjust.
23543 (rs6000_function_arg): Adjust.
23544 (rs6000_gimplify_va_arg): Pass false for that new parameter.
23546 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
23548 PR rtl-optimization/84169
23549 PR rtl-optimization/84780
23550 * combine.c (can_combine_p): Check for a 2-insn combination whether
23551 the destination register is used between the two insns, too.
23553 2018-03-12 Richard Biener <rguenther@suse.de>
23555 PR tree-optimization/84803
23556 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
23557 for refs DR analysis didn't process.
23559 2018-03-12 Richard Biener <rguenther@suse.de>
23561 PR tree-optimization/84777
23562 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
23563 force-vectorize loops ignore whether we are optimizing for size.
23565 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
23567 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
23568 (TARGET_MD_ASM_ADJUST): Define.
23570 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
23571 Kito Cheng <kito.cheng@gmail.com>
23572 Chung-Ju Wu <jasonwucj@gmail.com>
23574 * config/nds32/nds32.c (nds32_compute_stack_frame,
23575 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
23576 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
23577 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
23578 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
23579 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
23580 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
23581 * config/nds32/nds32.md (prologue, epilogue): Use macro
23582 NDS32_V3PUSH_AVAILABLE_P to do checking.
23584 2018-03-11 Jakub Jelinek <jakub@redhat.com>
23587 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
23588 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
23589 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
23590 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
23591 addition of most attributes on !orig_type_die or the attribute not
23592 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
23594 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23595 Chung-Ju Wu <jasonwucj@gmail.com>
23597 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23598 __NDS32_VH__ macro.
23599 * config/nds32/nds32.opt (mvh): New option.
23601 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23602 Chung-Ju Wu <jasonwucj@gmail.com>
23604 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23606 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23607 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23610 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
23611 Chung-Ju Wu <jasonwucj@gmail.com>
23613 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23615 * config/nds32/nds32-multiple.md (strlensi): New pattern.
23616 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23618 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
23619 Kito Cheng <kito.cheng@gmail.com>
23620 Chung-Ju Wu <jasonwucj@gmail.com>
23622 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23623 UNSPEC_FFMISM and UNSPEC_FLMISM.
23624 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23625 for ffb, ffmism and flmism.
23626 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23627 (unspec_ffmism): Ditto.
23628 (unspec_flmism): Ditto.
23629 (nds32_expand_builtin_impl): Check if string extension is available.
23630 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23631 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23633 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
23636 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23639 * lra-assigns.c (assign_by_spills): Return a flag of reload
23640 assignment failure. Do not process the reload assignment
23641 failures. Do not spill other reload pseudos if they has the same
23643 (lra_assign): Add a return arg. Set up from the result of
23644 assign_by_spills call.
23645 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23646 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23647 usage_insns if it is not NULL.
23648 (spill_hard_reg_in_range): New function.
23649 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23650 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23651 function prototypes.
23652 (lra_assign): Change prototype.
23653 * lra.c (lra): Add code to deal with fails by splitting hard reg
23656 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
23659 * config/i386/i386.opt: Replace Enforcment with Enforcement.
23661 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
23664 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23665 (dw_val_node): Add val_symbolic_view.
23666 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23667 (symview_upper_bound): New.
23668 (new_line_info_table): Initialize symviews_since_reset.
23669 (dwarf2out_source_line): Count symviews_since_reset and set
23670 symview_upper_bound.
23671 (dw_val_equal_p): Handle symview.
23672 (add_AT_symview): New.
23673 (print_dw_val): Handle symview.
23674 (attr_checksum, attr_checksum_ordered): Likewise.
23675 (same_dw_val_p, size_of_die): Likewise.
23676 (value_format, output_die): Likewise.
23677 (add_high_low_attributes): Use add_AT_symview for entry_view.
23678 (dwarf2out_finish): Reset symview_upper_bound, clear
23681 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
23684 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23685 Add strict argument and use it.
23686 (rs6000_split_multireg_move): Update for new strict argument.
23687 (mem_operand_gpr): Disallow all non-offsettable addresses.
23688 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23690 2018-03-09 Jakub Jelinek <jakub@redhat.com>
23693 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23694 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23695 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23698 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23699 decl, use remap_type if we want to use the type.
23701 2018-03-09 Martin Sebor <msebor@redhat.com>
23703 PR tree-optimization/84526
23704 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23706 (builtin_access::generic_overlap): Be prepared to handle non-array
23709 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
23711 PR rtl-optimization/84682
23712 * lra-constraints.c (process_address_1): Check is_address flag
23713 for address constraints.
23714 (process_alt_operands): Likewise.
23715 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23716 preprocess_constraints.
23717 * recog.h (preprocess_constraints): Add oploc parameter.
23719 * recog.c (preprocess_constraints): Test address_operand for
23720 CT_ADDRESS constraints.
23722 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
23725 * lra-assigns.c (assign_by_spills): Return a flag of reload
23726 assignment failure. Do not process the reload assignment
23727 failures. Do not spill other reload pseudos if they has the same
23729 (lra_assign): Add a return arg. Set up from the result of
23730 assign_by_spills call.
23731 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23732 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
23733 usage_insns if it is not NULL.
23734 (spill_hard_reg_in_range): New function.
23735 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23736 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23737 function prototypes.
23738 (lra_assign): Change prototype.
23739 * lra.c (lra): Add code to deal with fails by splitting hard reg
23742 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23745 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23746 Accept complain bool parameter. Only emit errors if it is true.
23747 (arm_parse_cpu_option_name): Likewise.
23748 (arm_target_thumb_only): Adjust callers of the above.
23749 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23750 prototype to take a default true bool parameter.
23751 (arm_parse_arch_option_name): Likewise.
23753 2018-03-09 David Malcolm <dmalcolm@redhat.com>
23754 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
23758 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23759 * configure: Regenerate.
23760 * configure.ac ("linker --version-script option"): New.
23761 ("linker soname option"): New.
23763 2018-03-09 Richard Biener <rguenther@suse.de>
23765 PR tree-optimization/84775
23766 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23767 immediate uses of predicate stmts and mark them modified.
23770 PR tree-optimization/84178
23771 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23773 (version_loop_for_if_conversion): Delay update_ssa call.
23774 (tree_if_conversion): Delay update_ssa until after predicate
23777 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
23780 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23781 when the function accesses prior frames.
23783 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23786 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23787 gen_llsym, otherwise call maybe_gen_llsym.
23789 PR inline-asm/84742
23790 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23791 has ',' character inside of it.
23793 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23796 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23797 as clobbering CC_REGNUM.
23799 2018-03-08 Richard Biener <rguenther@suse.de>
23801 PR middle-end/84552
23802 * tree-scalar-evolution.c: Include tree-into-ssa.h.
23803 (follow_copies_to_constant): Do not follow SSA names registered
23806 2018-03-08 Richard Biener <rguenther@suse.de>
23808 PR tree-optimization/84178
23809 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23811 (version_loop_for_if_conversion): Delay update_ssa call.
23812 (tree_if_conversion): Delay update_ssa until after predicate
23815 2018-03-08 David Malcolm <dmalcolm@redhat.com>
23817 PR tree-optimization/84178
23818 * tree-if-conv.c (release_bb_predicate): Remove the
23819 the assertion that the stmts have NULL use_ops.
23820 Discard the statements, asserting that they haven't
23821 yet been added to a BB.
23823 2018-03-08 Richard Biener <rguenther@suse.de>
23825 PR tree-optimization/84746
23826 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23827 (phi_translate): Pass in destination ANTIC_OUT set.
23828 (phi_translate_1): Likewise. For a simplified result lookup
23829 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23830 (phi_translate_set): Adjust.
23831 (do_pre_regular_insertion): Likewise.
23832 (do_pre_partial_partial_insertion): Likewise.
23834 2018-03-08 Martin Liska <mliska@suse.cz>
23836 PR gcov-profile/84735
23837 * doc/gcov.texi: Document usage of profile files.
23838 * gcov-io.h: Document changes in the format.
23840 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
23844 * dwarf2out.c (struct dw_line_info_table): Update comments for
23846 (FORCE_RESET_NEXT_VIEW): New.
23847 (FORCE_RESETTING_VIEW_P): New.
23848 (RESETTING_VIEW_P): Check for -1 too.
23849 (ZERO_VIEW_P): Likewise.
23850 (new_line_info_table): Force-reset next view.
23851 (dwarf2out_begin_function): Likewise.
23852 (dwarf2out_source_line): Simplify zero_view_p initialization.
23853 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23854 view directly. Omit view when omitting .loc at line 0.
23856 2018-03-08 Jakub Jelinek <jakub@redhat.com>
23858 PR tree-optimization/84740
23859 * tree-switch-conversion.c (process_switch): Call build_constructors
23860 only if info.phi_count is non-zero.
23862 PR tree-optimization/84739
23863 * tree-tailcall.c (find_tail_calls): Check call arguments against
23864 DECL_ARGUMENTS (current_function_decl) rather than
23865 DECL_ARGUMENTS (func) when checking for tail recursion.
23867 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23869 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23870 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23871 Volker Reichelt's entry and add entries for people that perform
23872 GCC fuzzy testing and report numerous bugs.
23874 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
23877 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23878 readonly data in sdata, if that is disabled.
23879 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23880 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23881 -mreadonly-in-sdata option.
23883 2018-03-07 Martin Sebor <msebor@redhat.com>
23885 PR tree-optimization/84468
23886 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23887 basic block when looking for nul assignment.
23889 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
23892 * except.h (output_function_exception_table): Adjust prototype.
23893 * except.c (output_function_exception_table): Remove FNNAME parameter
23894 and add SECTION parameter. Ouput one part of the table at a time.
23895 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23896 the first part of the exception table and emit unwind directives.
23897 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23898 (i386_pe_seh_cold_init): Likewise.
23899 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23900 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23901 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23902 (ix86_output_call_insn): Emit a nop in one more case for SEH.
23903 * config/i386/winnt.c: Include except.h.
23904 (struct seh_frame_state): Add reg_offset, after_prologue and
23905 in_cold_section fields.
23906 (i386_pe_seh_end_prologue): Set seh->after_prologue.
23907 (i386_pe_seh_cold_init): New function.
23908 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23909 to seh->in_cold_section.
23910 (seh_emit_push): Record the offset of the push.
23911 (seh_emit_save): Record the offet of the save.
23912 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23913 Test seh->after_prologue to disregard the epilogue.
23914 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23915 (i386_pe_end_cold_function): New function.
23917 2018-03-07 Jakub Jelinek <jakub@redhat.com>
23920 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23921 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23924 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23926 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23927 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23929 PR middle-end/84723
23930 * multiple_target.c: Include tree-inline.h and intl.h.
23931 (expand_target_clones): Diagnose and fail if node->definition and
23932 !tree_versionable_function_p (node->decl).
23934 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
23936 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23938 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23939 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23940 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23942 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23945 * combine.c (try_combine): Use reg_or_subregno instead of handling
23946 just paradoxical SUBREGs and REGs.
23948 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
23950 * config/arc/arc.c (arc_finalize_pic): Remove function.
23951 (arc_must_save_register): We use single base PIC register, remove
23952 checks to save/restore the PIC register.
23953 (arc_expand_prologue): Likewise.
23954 * config/arc/arc-protos.h (arc_set_default_type_attributes):
23956 (arc_verify_short): Likewise.
23957 (arc_attr_type): Likewise.
23958 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23959 (walk_stores): Likewise.
23960 (arc_address_cost): Make it static.
23961 (arc_verify_short): Likewise.
23962 (branch_dest): Likewise.
23963 (arc_attr_type): Likewise.
23964 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23965 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23966 (arc_final_prescan_insn): Remove inserting the nops due to
23967 hardware hazards. It is done in reorg step.
23968 (insn_length_variant_t): Remove.
23969 (insn_length_parameters_t): Likewise.
23970 (arc_insn_length_parameters): Likewise.
23971 (arc_get_insn_variants): Likewise.
23972 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23974 2018-03-06 Jakub Jelinek <jakub@redhat.com>
23976 PR inline-asm/84683
23977 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23980 PR tree-optimization/84687
23981 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23983 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23985 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
23987 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23988 Rename to ppc_speculation_barrier.
23989 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23990 __builtin_ppc_speculation_barrier.
23992 2018-03-05 Jakub Jelinek <jakub@redhat.com>
23995 * combine.c (combine_simplify_rtx): Don't try to simplify if
23996 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23999 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
24001 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
24002 to 32 bytes when compiling for POWER9.
24004 2018-03-05 Jakub Jelinek <jakub@redhat.com>
24007 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
24008 regparm >= 3 with no arg reg available also for calls with
24009 flag_force_indirect_call. Pass decl to ix86_function_regparm.
24012 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
24014 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
24016 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
24019 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
24021 2018-03-05 Richard Biener <rguenther@suse.de>
24023 PR tree-optimization/84486
24024 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
24025 When inserting a __builtin_assume_aligned call set the LHS
24026 SSA name alignment info accordingly.
24028 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
24030 PR tree-optimization/84114
24031 * config/aarch64/aarch64.c (aarch64_reassociation_width)
24032 Avoid reassociation of FLOAT_MODE addition.
24034 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
24036 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
24037 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
24038 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
24039 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
24040 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
24041 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
24042 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
24044 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
24045 __builtin_ia32_wbinvd): New builtins.
24046 (SPECIAL_ARGS2): New.
24047 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
24048 (SPECIAL_ARGS2): New.
24049 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
24050 (ix86_valid_target_attribute_inner_p): Ditto.
24051 (ix86_init_mmx_sse_builtins): Add special_args2.
24052 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
24053 TARGET_WBNOINVD_P): New.
24054 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
24055 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
24056 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
24057 * config/i386/immintrin.h (_wbinvd): New intrinsic.
24058 * config/i386/pconfigintrin.h: New file.
24059 * config/i386/wbnoinvdintrin.h: Ditto.
24060 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
24062 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
24064 2018-03-05 Richard Biener <rguenther@suse.de>
24066 PR tree-optimization/84670
24067 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24069 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24070 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24071 (compute_antic_aux): Only assert the number of values in ANTIC_IN
24072 doesn't grow if all successors (recursively) were visited at least
24075 2018-03-05 Richard Biener <rguenther@suse.de>
24077 PR tree-optimization/84650
24078 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
24079 if executed in the loop pipeline.
24081 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
24083 * doc/configfiles.texi (Configuration Files): Move info about
24084 conditionalizing $target-protos.h to...
24085 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
24086 differs from $target-protos.h.
24088 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
24089 Chung-Ju Wu <jasonwucj@gmail.com>
24091 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
24092 * config/nds32/nds32-multiple.md (setmemsi): Define.
24093 * config/nds32/nds32-memory-manipulation.c
24094 (nds32_gen_dup_4_byte_to_word_value): New.
24095 (emit_setmem_word_loop): New.
24096 (emit_setmem_byte_loop): New.
24097 (nds32_expand_setmem_loop): New.
24098 (nds32_expand_setmem_loop_v3m): New.
24099 (nds32_expand_setmem_unroll): New.
24100 (nds32_expand_setmem): New.
24102 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24103 Chung-Ju Wu <jasonwucj@gmail.com>
24105 * config/nds32/nds32-memory-manipulation.c
24106 (nds32_emit_load_store): New.
24107 (nds32_emit_post_inc_load_store): New.
24108 (nds32_emit_mem_move): New.
24109 (nds32_emit_mem_move_block): New.
24110 (nds32_expand_movmemsi_loop_unknown_size): New.
24111 (nds32_expand_movmemsi_loop_known_size): New.
24112 (nds32_expand_movmemsi_loop): New.
24113 (nds32_expand_movmemsi_unroll): New.
24114 (nds32_expand_movmemqi): Rename ...
24115 (nds32_expand_movmemsi): ... to this.
24116 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
24117 (movmemsi): ... to this.
24118 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
24119 (nds32_expand_movmemsi): ... to this.
24121 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24122 Monk Chiang <sh.chiang04@gmail.com>
24123 Chung-Ju Wu <jasonwucj@gmail.com>
24125 * config/nds32/nds32-protos.h
24126 (nds32_expand_load_multiple): New arguments.
24127 (nds32_expand_store_multiple): Ditto.
24128 (nds32_valid_multiple_load_store): Rename ...
24129 (nds32_valid_multiple_load_store_p): ... to this.
24130 * config/nds32/nds32-memory-manipulation.c
24131 (nds32_expand_load_multiple): Refine implementation.
24132 (nds32_expand_store_multiple): Ditto.
24133 * config/nds32/nds32-multiple.md
24134 (load_multiple): Update nds32_expand_load_multiple interface.
24135 (store_multiple): Update nds32_expand_store_multiple interface.
24136 * config/nds32/nds32-predicates.c
24137 (nds32_valid_multiple_load_store): Rename ...
24138 (nds32_valid_multiple_load_store_p): ... to this and refine
24140 * config/nds32/predicates.md
24141 (nds32_load_multiple_and_update_address_operation): New predicate.
24142 (nds32_store_multiple_and_update_address_operation): New predicate.
24144 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
24145 Chung-Ju Wu <jasonwucj@gmail.com>
24147 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
24148 (combo): New attribute.
24149 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
24151 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
24153 * config/nds32/nds32.opt: Change -mcmodel= default value.
24155 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
24156 Monk Chiang <sh.chiang04@gmail.com>
24157 Chung-Ju Wu <jasonwucj@gmail.com>
24159 * config/nds32/constants.md (unspec_element): New enum.
24160 * config/nds32/constraints.md (Umw): New constraint.
24161 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
24162 * config/nds32/nds32-intrinsic.md: Likewise.
24163 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
24164 (nds32_valid_smw_lwm_base_p): New.
24165 (nds32_output_smw_single_word): New.
24166 (nds32_output_lmw_single_word): New.
24167 (nds32_expand_unaligned_load): New.
24168 (nds32_expand_unaligned_store): New.
24169 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
24170 (nds32_output_smw_single_word): Declare.
24171 (nds32_output_lmw_single_word): Declare.
24172 (nds32_expand_unaligned_load): Declare.
24173 (nds32_expand_unaligned_store): Declare.
24174 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
24175 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
24176 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
24177 NDS32_BUILTIN_UASTORE_DW.
24178 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
24181 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
24182 Kito Cheng <kito.cheng@gmail.com>
24183 Chung-Ju Wu <jasonwucj@gmail.com>
24185 * config/nds32/nds32-intrinsic.c
24186 (nds32_expand_builtin_null_ftype_reg): Delete.
24187 (nds32_expand_builtin_reg_ftype_imm): Ditto.
24188 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
24189 (nds32_read_argument): New.
24190 (nds32_legitimize_target): Ditto.
24191 (nds32_legitimize_argument): Ditto.
24192 (nds32_check_constant_argument): Ditto.
24193 (nds32_expand_unop_builtin): Ditto.
24194 (nds32_expand_unopimm_builtin): Ditto.
24195 (nds32_expand_binop_builtin): Ditto.
24196 (nds32_builtin_decl_impl): Ditto.
24197 (builtin_description): Ditto.
24198 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
24199 (nds32_init_builtins_impl): Ditto.
24200 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
24201 (nds32_builtin_decl): New.
24202 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
24203 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
24205 2018-03-02 Jeff Law <law@redhat.com>
24207 * reorg.c (stop_search_p): Handle DEBUG_INSN.
24208 (redundant_insn, fill_simple_delay_slots): Likewise.
24209 (fill_slots_from_thread): Likewise.
24210 * resource.c (mark_referenced_resources): Likewise.
24211 (mark_set_resources, find_dead_or_set_registers): Likewise.
24213 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24215 * substring-locations.h (format_warning_va): Formatting fix for
24216 ATTRIBUTE_GCC_DIAG.
24217 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
24219 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
24220 * substring-locations.c: Include intl.h.
24221 (format_warning_va): Turned into small wrapper around
24222 format_warning_n_va, renamed to ...
24223 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
24224 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
24226 (format_warning_at_substring_n): New function.
24227 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
24228 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
24229 format_warning_at_substring with just a shorter name instead of
24230 const function pointer.
24231 (fmtwarn_n): New function.
24232 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
24233 appropriate, get rid of all the fmtstr temporaries, move conditionals
24234 with G_() wrapped string literals directly into fmtwarn arguments,
24235 cast dir.len to (int), formatting fixes.
24237 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
24239 * doc/invoke.texi: Remove "Cilk Plus" references.
24241 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24242 Richard Biener <rguenther@suse.de>
24245 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
24246 for error or warning attributes if CALL_FROM_THUNK_P is set.
24249 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24252 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
24253 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
24256 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
24257 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
24259 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
24260 instead of -1U in last predictors element's probability member.
24262 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
24265 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
24266 arguments if they are comparable.
24268 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24270 PR tree-optimization/84634
24271 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
24272 masks and masked_loop_p with a single loop_masks, making sure it's
24273 null for bb vectorization.
24275 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
24277 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
24278 (vect_analyze_data_ref_access): Use loop->safe_len rather than
24279 loop->force_vectorize to check whether there is no alias.
24281 2018-03-02 Jakub Jelinek <jakub@redhat.com>
24284 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
24286 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
24288 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
24289 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
24290 instead of a loop around prev_real_insn.
24291 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
24294 PR inline-asm/84625
24295 * config/i386/i386.c (ix86_print_operand): Use conditional
24296 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
24299 2018-03-02 Richard Biener <rguenther@suse.de>
24301 PR tree-optimization/84427
24302 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
24303 (bitmap_set_subtract_values): Rewrite to handle multiple
24306 (prune_clobbered_mems): Likewise.
24307 (phi_translate): Take edge instead of pred/phiblock.
24308 (phi_translate_1): Likewise.
24309 (phi_translate_set): Likewise. Insert all translated
24310 exprs for a value into the set, keeping possibly multiple
24311 expressions per value.
24312 (compute_antic_aux): Adjust for phi_translate changes.
24313 When intersecting union the expressions and prune those
24314 not in the final value set, keeping possibly multiple
24315 expressions per value. Do not use value-insertion
24316 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
24317 all expressions. Add verification that the value-sets
24318 only shrink during iteration.
24319 (compute_partial_antic_aux): Adjust for the phi_translate changes.
24320 (do_pre_regular_insertion): Likewise.
24321 (do_pre_partial_partial_insertion): Likewise.
24323 2018-03-02 Richard Biener <rguenther@suse.de>
24326 * config/darwin.c (saved_debug_info_level): New static global.
24327 (darwin_asm_lto_start): Disable debug info generation for LTO out.
24328 (darwin_asm_lto_end): Restore debug info generation settings.
24330 2018-03-01 Martin Liska <mliska@suse.cz>
24333 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
24334 volatile arguments.
24336 2018-03-01 Richard Biener <rguenther@suse.de>
24339 * dwarf2out.c (gen_variable_die): Properly handle late VLA
24340 type annotation with LTO when debug was disabled at compile-time.
24342 2018-03-01 Matthew Fortune <mfortune@gmail.com>
24344 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
24346 (mips_final_postscan_insn): Likewise.
24348 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
24350 PR rtl-optimization/84528
24351 * alias.c (init_alias_target): Add commentary.
24352 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
24353 a unique base value if the frame pointer is not eliminated
24354 to the stack pointer.
24356 2018-03-01 Tom de Vries <tom@codesourcery.com>
24358 PR rtl-optimization/83327
24359 * lra-int.h (hard_regs_spilled_into): Declare.
24360 * lra.c (hard_regs_spilled_into): Define.
24361 (init_reg_info): Init hard_regs_spilled_into.
24362 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
24363 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
24364 (process_bb_lives): Handle hard_regs_spilled_into.
24365 (lra_create_live_ranges_1): Before doing liveness propagation, clear
24366 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
24368 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
24370 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
24371 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
24372 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
24373 * config/rs6000/aix72.h: New file.
24375 2018-02-28 Jakub Jelinek <jakub@redhat.com>
24377 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
24378 instead of warning_at with conditional singular and plural messages
24382 * stor-layout.c (update_alignment_for_field): For
24383 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
24384 && !DECL_PACKED (field), do the alignment update, just use
24385 only desired_align instead of MAX (type_align, desired_align)
24387 (place_field): Don't do known_align < desired_align handling
24388 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
24389 is non-NULL, instead do it after rli->prev_field handling and
24390 only if not within a bitfield word. For DECL_PACKED (field)
24391 use type_align of BITS_PER_UNIT.
24393 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
24395 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
24396 superfluous parentheses and trailing spaces.
24398 2018-02-28 Richard Biener <rguenther@suse.de>
24400 PR tree-optimization/84584
24401 * graphite-scop-detection.c (scop_detection::add_scop): Discard
24402 SCoPs with fake exit edge.
24404 2018-02-28 Martin Liska <mliska@suse.cz>
24407 * timevar.c (timer::print): Fix format to properly print 100%
24410 2018-02-28 Richard Biener <rguenther@suse.de>
24412 PR middle-end/84607
24413 * genmatch.c (capture_info::walk_match): Do not mark
24414 captured expressions without operands as expr_p given
24415 they act more like predicates and should be subject to
24416 "lost tail" side-effect preserving.
24418 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
24420 PR rtl-optimization/81611
24421 * auto-inc-dec.c (attempt_change): Move dead note from
24422 mem_insn if it's the next use of regno
24423 (find_address): Take address use of reg holding
24424 non-incremented value. Add parm to limit search to the named
24426 (merge_in_block): Attempt to use a mem insn that is the next
24427 use of the original regno.
24429 2018-02-27 Martin Sebor <msebor@redhat.com>
24432 * doc/invoke.texi (-Wmissing-attributes): New option.
24433 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
24435 2018-02-27 Martin Sebor <msebor@redhat.com>
24437 PR translation/84207
24438 * diagnostic-core.h (warning_n, error_n, inform_n): Change
24439 n argument to unsigned HOST_WIDE_INT.
24440 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
24441 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
24442 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
24443 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
24445 2018-02-27 Richard Biener <rguenther@suse.de>
24447 PR tree-optimization/84512
24448 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
24449 Do not use the estimate returned from record_stmt_cost for
24450 the scalar iteration cost but sum properly using add_stmt_cost.
24452 2018-02-27 Richard Biener <rguenther@suse.de>
24454 PR tree-optimization/84466
24455 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24456 Adjust last change to less strictly validate use operands.
24458 2018-02-27 Martin Liska <mliska@suse.cz>
24460 PR gcov-profile/84548
24461 * gcov.c (process_file): Allow partial overlap and consider it
24462 also as group functions.
24463 (output_lines): Properly calculate range of lines for a group.
24465 2018-02-27 Martin Liska <mliska@suse.cz>
24467 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
24468 'ggc' suffixes. Change first column width.
24469 (timer::print): Fix formatting of the column.
24471 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
24473 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
24474 preserve inline entry blocks for the sake of debug inline
24475 entry point markers alone.
24476 (remove_unused_locals): Suggest in comments a better place to
24477 force the preservation of inline entry blocks that are
24478 otherwise unused, but do not preserve them.
24480 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24482 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
24484 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24487 * config/i386/constraints.md (Bs): Replace
24488 ix86_indirect_branch_register with
24489 TARGET_INDIRECT_BRANCH_REGISTER.
24491 * config/i386/i386.md (indirect_jump): Likewise.
24492 (tablejump): Likewise.
24493 (*sibcall_memory): Likewise.
24494 (*sibcall_value_memory): Likewise.
24495 Peepholes of indirect call and jump via memory: Likewise.
24496 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
24497 (*sibcall_value_GOT_32): Likewise.
24498 * config/i386/predicates.md (indirect_branch_operand): Likewise.
24499 (GOT_memory_operand): Likewise.
24500 (call_insn_operand): Likewise.
24501 (sibcall_insn_operand): Likewise.
24502 (GOT32_symbol_operand): Likewise.
24503 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
24505 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24507 PR rtl-optimization/83496
24508 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
24509 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
24510 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
24511 redundant insn, if any.
24512 (relax_delay_slots): Likewise.
24513 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
24515 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
24517 PR tree-optimization/83965
24518 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
24519 that grouped statements are part of a reduction chain. Return
24520 true if the statement is not marked as a reduction itself but
24521 is part of a group.
24522 (vect_recog_dot_prod_pattern): Don't check whether the statement
24523 is part of a group here.
24524 (vect_recog_sad_pattern): Likewise.
24525 (vect_recog_widen_sum_pattern): Likewise.
24527 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
24530 * final.c (rest_of_clean_state): Also look for calls inside sequences.
24532 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
24535 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
24537 (ix86_output_indirect_function_return): New prototype.
24538 (ix86_split_simple_return_pop_internal): Likewise.
24539 * config/i386/i386.c (indirect_return_via_cx): New.
24540 (indirect_return_via_cx_bnd): Likewise.
24541 (indirect_thunk_name): Handle return va CX_REG.
24542 (output_indirect_thunk_function): Create alias for
24543 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
24544 (ix86_output_indirect_jmp): Remove the bool argument.
24545 (ix86_output_indirect_function_return): New function.
24546 (ix86_split_simple_return_pop_internal): Likewise.
24547 * config/i386/i386.md (*indirect_jump): Don't pass false
24548 to ix86_output_indirect_jmp.
24549 (*tablejump_1): Likewise.
24550 (simple_return_pop_internal): Change it to define_insn_and_split.
24551 Call ix86_split_simple_return_pop_internal to split it for
24552 -mfunction-return=.
24553 (simple_return_indirect_internal): Call
24554 ix86_output_indirect_function_return instead of
24555 ix86_output_indirect_jmp.
24557 2018-02-26 Jakub Jelinek <jakub@redhat.com>
24560 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
24561 memset and value initialization afterwards.
24563 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
24565 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
24567 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24570 * common/config/aarch64/aarch64-common.c
24571 (aarch_option_optimization_table[]): Switch
24572 off fomit-frame-pointer
24574 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24575 Chung-Ju Wu <jasonwucj@gmail.com>
24577 * config/nds32/nds32-multiple.md (load_multiple): Disallow
24579 (store_multiple): Ditto.
24581 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
24583 * config.gcc: Add --with-cpu support for nds32 target.
24584 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
24585 * config/nds32/nds32.opt: Add -mcpu= option.
24587 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
24589 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
24590 isel=yes): Warn for these deprecated options.
24592 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
24594 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
24595 ISA_2_5_MASKS_EMBEDDED.
24597 2018-02-23 Jakub Jelinek <jakub@redhat.com>
24599 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24600 p->max as pointers rather than using iterative_hash_expr.
24602 2018-02-23 Carl Love <cel@us.ibm.com>
24604 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24605 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24607 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24608 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24609 P8V_BUILTIN_VEC_VUNSIGNED2.
24611 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
24614 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24615 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24617 * lra-constraints.c (curr_insn_transform): Set up
24618 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
24620 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24621 * lra-eliminations.c (spill_pseudos): Ditto.
24622 (process_insn_for_elimination): Ditto.
24623 * lra-lives.c (reg_early_clobber_p): Use the new macros.
24624 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24625 LRA_NON_CLOBBERED_ALT.
24627 2018-02-22 Martin Sebor <msebor@redhat.com>
24629 PR tree-optimization/84480
24630 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24631 to maybe_diag_stxncpy_trunc. Call it.
24632 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24633 from gimple_fold_builtin_strcpy. Print inlining stack.
24634 (handle_builtin_stxncpy): Print inlining stack.
24635 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24637 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
24640 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24641 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24642 and -fcheck-pointer-bounds are used together.
24643 (indirect_thunk_prefix): New enum.
24644 (indirect_thunk_need_prefix): New function.
24645 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
24646 "_nt" instead of "_bnd" for NOTRACK prefix.
24647 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24648 (output_indirect_thunk_function): Likewise.
24650 (ix86_code_end): Update output_indirect_thunk_function calls.
24651 (ix86_output_indirect_branch_via_reg): Replace
24652 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24653 (ix86_output_indirect_branch_via_push): Likewise.
24654 (ix86_output_function_return): Likewise.
24655 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24656 incompatible with -fcf-protection=branch and
24657 -fcheck-pointer-bounds.
24659 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24662 * config/aarch64/aarch64.c (aarch64_print_address_internal):
24663 Change gcc_assert call to output_operand_lossage.
24665 2018-02-22 Steve Ellcey <sellcey@cavium.com>
24667 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24669 2018-02-22 DJ Delorie <dj@redhat.com>
24670 Sebastian Perta <sebastian.perta@renesas.com>
24671 Oleg Endo <olegendo@gcc.gnu.org>
24673 * config/rx/rx.c (rx_rtx_costs): New function.
24674 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24676 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
24678 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24680 2018-02-22 Martin Liska <mliska@suse.cz>
24683 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24684 Add "native" as a possible value.
24686 2018-02-22 Martin Liska <mliska@suse.cz>
24689 * config/i386/i386.c (ix86_option_override_internal):
24690 Add "native" as a possible value for -march and -mtune.
24692 2018-02-22 Jakub Jelinek <jakub@redhat.com>
24695 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24696 to all type variants.
24698 PR tree-optimization/84503
24699 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24700 width as info->bitpos + info->bitsize - start.
24701 (merged_store_group::merge_overlapping): Simplify width computation.
24702 (check_no_overlap): New function.
24703 (imm_store_chain_info::try_coalesce_bswap): Compute expected
24704 start + width and last_order of the group, fail if check_no_overlap
24706 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24707 to group if check_no_overlap fails.
24709 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24711 * config/rs6000/altivec.md: Delete contraint arguments to
24712 define_expand, define_split, and define_peephole2, and in
24713 define_insn_and_split if always unused.
24714 * config/rs6000/darwin.md: Ditto.
24715 * config/rs6000/dfp.md: Ditto.
24716 * config/rs6000/rs6000.md: Ditto.
24717 * config/rs6000/sync.md: Ditto.
24718 * config/rs6000/vector.md: Ditto.
24719 * config/rs6000/vsx.md: Ditto.
24721 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
24723 * config/rs6000/altivec.md: Write output control strings as braced
24724 blocks instead of double-quoted strings.
24725 * config/rs6000/darwin.md: Ditto.
24726 * config/rs6000/rs6000.md: Ditto.
24727 * config/rs6000/vector.md: Ditto.
24728 * config/rs6000/vsx.md: Ditto.
24730 2018-02-21 Jason Merrill <jason@redhat.com>
24732 PR c++/84314 - ICE with templates and fastcall attribute.
24733 * attribs.c (build_type_attribute_qual_variant): Remove assert.
24735 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24737 * ipa-cp.c (determine_versionability): Fix comment typos.
24739 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
24742 * ipa-cp.c (determine_versionability): Do not version functions caling
24745 2018-02-21 Martin Liska <mliska@suse.cz>
24748 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24749 Add "native" as a possible value.
24750 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
24751 the macro when native cpu detection is available.
24753 2018-02-21 Martin Liska <mliska@suse.cz>
24756 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24757 Add "native" as a possible value.
24758 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24759 when native cpu detection is available.
24761 2018-02-21 Jakub Jelinek <jakub@redhat.com>
24762 Martin Sebor <msebor@redhat.com>
24764 PR tree-optimization/84478
24765 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24767 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24768 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24769 support which is conservatively correct, for 2 only stay conservative
24770 for maxlen. Formatting and comment capitalization fixes. Add STRICT
24771 argument to the 2 argument get_range_strlen, adjust 6 arg
24772 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24774 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24775 (gimple_fold_builtin_strlen): Pass true as last argument to
24778 2018-02-20 Martin Sebor <msebor@redhat.com>
24780 PR middle-end/84095
24781 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24782 (builtin_memref::set_base_and_offset): Same. Handle inner references.
24783 (builtin_memref::builtin_memref): Factor out parts into
24784 set_base_and_offset and call it.
24786 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24788 PR middle-end/84406
24789 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24790 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24791 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
24792 search at the associated MODE_INT.
24794 2018-02-20 Jeff Law <law@redhat.com>
24796 PR middle-end/82123
24797 PR tree-optimization/81592
24798 PR middle-end/79257
24799 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24800 for range data rather than using global data.
24801 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24802 range data rather than using global data.
24803 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24804 pass it to children as needed.
24805 (struct directive::fmtresult): Similarly.
24806 (struct directive::set_width): Similarly.
24807 (struct directive::set_precision): Similarly.
24808 (format_integer, format_directive, parse_directive): Similarly.
24809 (format_none): Accept unnamed vr_values parameter.
24810 (format_percent, format_floating, format_character): Similarly.
24811 (format_string, format_plain): Similarly.
24812 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24813 the EVRP range analyzer for range data rather than using global data.
24814 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24815 gimple-ssa-evrp-analyze.h
24816 (class sprintf_dom_walker): Add after_dom_children member function.
24817 Add evrp_range_analyzer member.
24818 (sprintf_dom_walker::before_dom_children): Call into the EVRP
24819 range analyzer as needed.
24820 (sprintf_dom_walker::after_dom_children): New member function.
24821 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24823 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24824 (evrp_range_analyzer::pop_to_marker): Likewise.
24826 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
24828 PR tree-optimization/84419
24829 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24830 with the required type if its current type is compatible but
24833 2018-02-20 Jakub Jelinek <jakub@redhat.com>
24835 PR middle-end/82004
24836 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24837 after vectorization.
24839 2018-02-20 Martin Liska <mliska@suse.cz>
24842 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24843 possible values if we don't have a hint.
24845 2018-02-20 Martin Liska <mliska@suse.cz>
24849 * final.c (shorten_branches): Build align_tab array with one
24851 * opts.c (finish_options): Add alignment option limit check.
24852 (MAX_CODE_ALIGN): Likewise.
24853 (MAX_CODE_ALIGN_VALUE): Likewise.
24854 * doc/invoke.texi: Document maximum allowed option value for
24855 all -falign-* options.
24857 2018-02-19 Jakub Jelinek <jakub@redhat.com>
24860 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24861 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24862 * var-tracking.c (emit_note_insn_var_location): Remove all references
24863 to NOTE_INSN_CALL_ARG_LOCATION.
24864 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24865 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24866 Use copy_rtx_if_shared.
24867 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24868 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24869 (dwarf2out_var_location): Remove handling of
24870 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24872 * final.c (final_scan_insn): Remove all references to
24873 NOTE_INSN_CALL_ARG_LOCATION.
24874 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
24875 before dumping final insns.
24876 * except.c (emit_note_eh_region_end): Remove all references to
24877 NOTE_INSN_CALL_ARG_LOCATION.
24878 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24879 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24880 * config/arc/arc.c (hwloop_optimize): Likewise.
24881 * config/arm/arm.c (create_fix_barrier): Likewise.
24882 * config/s390/s390.c (s390_chunkify_start): Likewise.
24883 * config/sh/sh.c (find_barrier): Likewise.
24884 * config/i386/i386.c (rest_of_insert_endbranch,
24885 ix86_seh_fixup_eh_fallthru): Likewise.
24886 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24887 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24888 * config/frv/frv.c (frv_function_prologue): Likewise.
24889 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
24891 (note_outside_basic_block_p): Remove all references to
24892 NOTE_INSN_CALL_ARG_LOCATION.
24893 * gengtype.c (adjust_field_rtx_def): Likewise.
24894 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24896 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24897 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24900 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24903 PR tree-optimization/84452
24904 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24905 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24908 2018-02-19 Martin Liska <mliska@suse.cz>
24911 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24913 2018-02-19 Martin Liska <mliska@suse.cz>
24914 Richard Sandiford <richard.sandiford@linaro.org>
24916 PR tree-optimization/82491
24917 * gimple-fold.c (get_base_constructor): Make earlier bail out
24920 2018-02-19 Carl Love <cel@us.ibm.com>
24922 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24923 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24925 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24926 P8V_BUILTIN_VEC_NEG.
24928 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
24930 * config/rl78/rl78.md (movdf): New define expand.
24932 2018-02-19 Martin Liska <mliska@suse.cz>
24935 * doc/invoke.texi: Fix typo.
24936 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24938 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
24940 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24941 handle rs6000_single_float and rs6000_double_float specially for
24944 2018-02-16 Jeff Law <law@redhat.com>
24946 * config/rx/rx.c (add_pop_cfi_notes): New function.;
24947 (pop_regs): Use it.
24949 2018-02-16 Jakub Jelinek <jakub@redhat.com>
24952 * ipa-inline.c (inline_small_functions): Fix a typo.
24954 2018-02-16 Nathan Sidwell <nathan@acm.org>
24956 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24958 2018-02-16 Carl Love <cel@us.ibm.com>
24960 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24961 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24962 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24963 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24964 expansion to P8V_BUILTIN_VEC_FLOAT2.
24966 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
24968 PR rtl-optimization/70023
24969 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24970 src_regno into account.
24972 2018-02-16 Carl Love <cel@us.ibm.com>
24974 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24975 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24976 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24977 * config/rs6000/rs6000.c: Remove case statements for
24978 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24979 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24980 and P9V_BUILTIN_VEC_VINSERT4B.
24981 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24982 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24983 * config/rs6000/vsx.md:
24984 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24987 2018-02-16 Carl Love <cel@us.ibm.com>
24989 * config/rs6000/altivec.h: Add builtin names vec_extract4b
24991 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24993 * config/rs6000/rs6000-c.c: Add the definitions for
24994 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24995 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24996 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24997 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
24998 definition for insert4b and define insn *insert3b_internal.
24999 * doc/extend.texi: Add documentation for vec_extract4b.
25001 2018-02-16 Nathan Sidwell <nathan@acm.org>
25003 * doc/extend.texi (Backwards Compatibility): Mention friend
25004 injection. Note for-scope is deprecated.
25005 * doc/invoke.texi (-ffriend-injection): Deprecate.
25007 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
25009 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
25010 that moved to I2, also allow destinations that are a paradoxical
25011 subreg (instead of a normal reg).
25013 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
25016 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
25019 2018-02-16 Richard Biener <rguenther@suse.de>
25021 PR tree-optimization/84037
25022 PR tree-optimization/84016
25024 * config/i386/i386.c (ix86_builtin_vectorization_cost):
25025 Adjust vec_construct for the fact we need additional higher latency
25026 128bit inserts for AVX256 and AVX512 vector builds.
25027 (ix86_add_stmt_cost): Scale vector construction cost for
25030 2018-02-16 Richard Biener <rguenther@suse.de>
25032 PR tree-optimization/84417
25033 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
25034 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
25035 (non_rewritable_lvalue_p): Likewise, use poly-ints.
25037 2018-02-16 Martin Liska <mliska@suse.cz>
25040 * internal-fn.def (ASAN_CHECK): Set proper flags.
25041 (ASAN_MARK): Likewise.
25043 2018-02-16 Julia Koval <julia.koval@intel.com>
25045 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
25046 from PTA_CANNONLAKE.
25048 2018-02-16 Jakub Jelinek <jakub@redhat.com>
25051 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
25052 Use ++iter rather than iter++ for std::list iterators.
25053 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
25054 defer deleting them until all nodes in the forest are processed. Do
25055 free even leaf nodes. Change to_process into auto_vec.
25058 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
25059 * vec.h (vec_default_construct): Use memset instead of placement new
25060 if BROKEN_VALUE_INITIALIZATION is defined.
25061 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
25062 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
25065 PR rtl-optimization/83723
25066 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
25067 * lra.c (lra_substitute_pseudo): Likewise. If true, use
25068 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
25070 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
25072 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
25074 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
25076 PR rtl-optimization/81443
25077 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
25078 from inner REGs to paradoxical SUBREGs.
25080 2018-02-16 Richard Biener <rguenther@suse.de>
25082 PR tree-optimization/84399
25083 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25084 For operands we can analyze at their definition make sure we can
25085 analyze them at each use as well.
25087 2018-02-16 Richard Biener <rguenther@suse.de>
25089 PR tree-optimization/84190
25090 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
25091 volatile accesses if the decl isn't volatile.
25093 2018-02-15 Jason Merrill <jason@redhat.com>
25095 PR c++/84314 - ICE with templates and fastcall attribute.
25096 * attribs.c (build_type_attribute_qual_variant): Don't clobber
25097 TYPE_CANONICAL on an existing type.
25099 2018-02-15 Jakub Jelinek <jakub@redhat.com>
25101 PR tree-optimization/84383
25102 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
25103 dstoff nor call operand_equal_p if dstbase is NULL.
25105 PR tree-optimization/84334
25106 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
25107 also a CONSTANT_CLASS_P, punt.
25109 2018-02-14 Jim Wilson <jimw@sifive.com>
25111 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
25112 first SMALL_OPERAND check. New local min_second_step. Move assert
25113 to where locals are set. Add TARGET_RVC support.
25114 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
25116 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
25118 * doc/invoke.texi: Correct -Wformat-overflow code sample.
25120 2018-02-14 Martin Sebor <msebor@redhat.com>
25122 PR tree-optimization/83698
25123 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
25124 arrays constrain the offset range to their bounds.
25125 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
25126 (builtin_access::overlap): Avoid setting the size of overlap if it's
25128 (maybe_diag_overlap): Also consider arrays when deciding what values
25129 of offsets to include in diagnostics.
25131 2018-02-14 Martin Sebor <msebor@redhat.com>
25134 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
25135 that correspond to the kind of a declaration.
25137 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
25140 * config/pa/pa.md: Load address of PIC label using the linkage table
25141 if the label is nonlocal.
25143 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
25145 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
25146 warning message if user requests -maltivec=be.
25147 * doc/invoke.texi: Document deprecation of -maltivec=be.
25149 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
25152 * config/rs6000/rs6000-c.c: Update definitions for
25153 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
25154 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
25156 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
25159 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
25160 add _get_ssp intrinsics. Remove argument from
25161 __builtin_ia32_rdssp[d|q].
25162 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
25163 * config/i386/i386-builtin.def: Remove argument from
25164 __builtin_ia32_rdssp[d|q].
25165 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
25166 ix86_expand_special_args_builtin for _rdssp[d|q].
25167 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
25168 Clear register before usage.
25169 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
25170 Add documentation for new _get_ssp and _inc_ssp intrinsics.
25172 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
25174 PR tree-optimization/84357
25175 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
25176 operand 1 of an ARRAY_REF too.
25178 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
25181 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
25182 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25184 (set_of_reg): New struct.
25185 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
25186 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
25187 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
25189 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
25190 Split into bitclr, bitset, bitinvert patterns if appropriate.
25191 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
25192 use rx_fuse_in_memory_bitop.
25193 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
25194 to named insn, correct maximum insn length.
25196 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
25199 * machmode.def: Define a complex mode for PARTIAL_INT.
25200 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
25202 * doc/rtl.texi: Document CSPImode.
25203 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
25205 (msp430_hard_regno_nregs_with_padding): Likewise.
25207 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
25210 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
25212 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
25214 PR rtl-optimization/84169
25215 * combine.c (try_combine): New variable split_i2i3. Set it to true if
25216 we generated a parallel as new i3 and we split that to new i2 and i3
25217 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
25218 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
25219 those to i2, not i1. Partially rewrite this scan code.
25221 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25224 * stor-layout.c (place_field): For variable length fields, adjust
25225 offset_align afterwards not just based on the field's alignment,
25226 but also on the size.
25228 PR middle-end/84309
25229 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
25230 of exps and logs in the use_exp2 case.
25232 2018-02-13 Jeff Law <law@redhat.com>
25234 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
25235 entry for "vector".
25237 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
25240 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
25244 * common.opt (gas-loc-support, gas-locview-support): New.
25245 (ginline-points, ginternal-reset-location-views): New.
25246 * doc/invoke.texi: Document them. Use @itemx where intended.
25247 (gvariable-location-views): Adjust.
25248 * target.def (reset_location_view): New.
25249 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
25250 (TARGET_RESET_LOCATION_VIEW): New.
25251 * doc/tm.texi: Rebuilt.
25252 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
25253 (dwarf2out_default_as_locview_support): New.
25254 (output_asm_line_debug_info): Use option variables.
25255 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
25256 (output_loc_list): Likewise.
25257 (add_high_low_attributes): Check option variables.
25258 Don't output entry view attribute in strict mode.
25259 (gen_inlined_subroutine_die): Check option variables.
25260 (dwarf2out_inline_entry): Likewise.
25261 (init_sections_and_labels): Likewise.
25262 (dwarf2out_early_finish): Likewise.
25263 (maybe_reset_location_view): New, from...
25264 (dwarf2out_var_location): ... here. Call it.
25265 * debug.h (dwarf2out_default_as_loc_support): Declare.
25266 (dwarf2out_default_as_locview_support): Declare.
25267 * hooks.c (hook_int_rtx_insn_0): New.
25268 * hooks.h (hook_int_rtx_insn_0): Declare.
25269 * toplev.c (process_options): Take -gas-loc-support and
25270 -gas-locview-support from dwarf2out. Enable
25271 -gvariable-location-views by default only with locview
25272 assembler support. Enable -ginternal-reset-location-views by
25273 default only if the target defines the corresponding hook.
25274 Enable -ginline-points by default if location views are
25275 enabled; force it disabled if statement frontiers are
25277 * tree-inline.c (expand_call_inline): Check option variables.
25278 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
25280 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
25282 PR tree-optimization/84321
25283 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
25284 handling. Also check whether the anti-range contains any values
25285 that satisfy the mask; switch to a VR_RANGE if not.
25287 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
25290 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
25292 2018-02-13 Martin Jambor <mjambor@suse.cz>
25295 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
25296 of call statements, also set location of a load to a temporary.
25298 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
25300 * config/rl78/rl78.c (add_vector_labels): New function.
25301 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
25302 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
25303 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
25304 which checks that no arguments are passed.
25305 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
25306 * doc/extend.texi: Documentation for the new attribute.
25308 2018-02-13 Andreas Schwab <schwab@suse.de>
25310 * config/riscv/linux.h (CPP_SPEC): Define.
25312 2018-02-13 Jakub Jelinek <jakub@redhat.com>
25315 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
25316 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
25317 OPTION_MASK_ISA_AES as first argument to def_builtin_const
25318 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
25319 instead of OPTION_MASK_ISA_PCLMUL as first argument to
25320 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
25321 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
25322 temporarily for AES and PCLMUL builtins.
25324 PR tree-optimization/84339
25325 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
25326 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
25329 PR middle-end/84309
25330 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
25331 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
25332 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
25334 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
25336 * omp-simd-clone.h: New file.
25337 * omp-simd-clone.c: Include omp-simd-clone.h.
25338 (expand_simd_clones): No longer static.
25339 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
25340 cgraph.h and omp-simd-clone.h.
25341 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
25342 (vect_recog_widen_shift_pattern): Formatting fix.
25343 (vect_pattern_recog_1): Don't check optab for calls.
25346 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
25347 operands[2] into a REG before using gen_lowpart on it.
25349 2018-02-12 Jeff Law <law@redhat.com>
25352 * config/sh/sh.c (find_barrier): Consider a sibling call
25355 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
25356 successfully back substituting a reg.
25358 2018-02-12 Richard Biener <rguenther@suse.de>
25360 PR tree-optimization/84037
25361 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
25362 parameter, move visited init to caller.
25363 (vect_slp_analyze_operations): Separate cost from validity
25364 check, initialize visited once for all instances.
25365 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
25367 * tree-vect-stmts.c (vect_model_simple_cost): Make early
25369 (vect_model_promotion_demotion_cost): Likewise.
25370 (vectorizable_bswap): Guard cost modeling with !slp_node
25371 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
25373 (vectorizable_call): Likewise.
25374 (vectorizable_conversion): Likewise.
25375 (vectorizable_assignment): Likewise.
25376 (vectorizable_shift): Likewise.
25377 (vectorizable_operation): Likewise.
25378 (vectorizable_store): Likewise.
25379 (vectorizable_load): Likewise.
25380 (vectorizable_condition): Likewise.
25381 (vectorizable_comparison): Likewise.
25383 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
25386 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
25387 (ASAN_MARK): Fix fnspec to account for return value, change pointer
25388 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
25390 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25392 PR middle-end/83665
25393 * params.def (inline-min-speedup): Increase from 8 to 15.
25394 (max-inline-insns-auto): Decrease from 40 to 30.
25395 * ipa-split.c (consider_split): Add some buffer for function to
25396 be considered inlining candidate.
25397 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
25400 2018-02-12 Richard Biener <rguenther@suse.de>
25402 PR tree-optimization/84037
25403 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
25404 matched stmts if we cannot swap the non-matched ones.
25406 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25408 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
25409 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
25410 _mm_maskz_scalef_round_ss): New intrinsics.
25411 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
25412 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
25413 __builtin_ia32_scalefss_round): Remove.
25414 (__builtin_ia32_scalefsd_mask_round,
25415 __builtin_ia32_scalefss_mask_round): New intrinsics.
25416 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
25417 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
25418 ((match_operand:VF_128 2 "<round_nimm_predicate>"
25419 "<round_constraint>")): Changed to ...
25420 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
25421 "<round_scalar_constraint>")): ... this.
25422 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
25423 %0, %1, %2<round_op3>}"): Changed to ...
25424 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
25425 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
25426 %2<round_scalar_mask_op3>}"): ... this.
25427 * config/i386/subst.md (round_scalar_nimm_predicate): New.
25429 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
25431 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
25432 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
25433 (_mm_maskz_sqrt_round_ss): New intrinsics.
25434 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
25435 (__builtin_ia32_sqrtsd_mask_round)
25436 (__builtin_ia32_sqrtss_mask_round): New builtins.
25437 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
25438 (__builtin_ia32_sqrtss_round): Remove.
25439 (__builtin_ia32_sqrtsd_mask_round)
25440 (__builtin_ia32_sqrtss_mask_round): New builtins.
25441 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
25442 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
25443 ((match_operand:VF_128 1 "vector_operand"
25444 "xBm,<round_constraint>")): Changed to ...
25445 ((match_operand:VF_128 1 "vector_operand"
25446 "xBm,<round_scalar_constraint>")): ... this.
25447 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
25448 %0, %2, %<iptr>1<round_op3>}): Changed to ...
25449 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
25450 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
25451 %<iptr>1<round_scalar_mask_op3>}): ... this.
25452 ((set_attr "prefix" "<round_prefix>")): Changed to ...
25453 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
25455 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
25458 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
25459 Cast vec_cmpeq result to correct type.
25460 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
25461 Cast vec_cmpgt result to correct type.
25463 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
25465 * final.c (final_scan_insn_1): Renamed from...
25466 (final_scan_insn): ... this. New wrapper, to recover
25467 seen from the outermost call in recursive ones.
25468 * config/sparc/sparc.c (output_return): Drop seen from call.
25469 (output_sibcall): Likewise.
25470 * config/visium/visium.c (output_branch): Likewise.
25472 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
25474 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
25477 2018-02-10 Alan Modra <amodra@gmail.com>
25480 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
25481 Specify LR as an input.
25483 2018-02-10 Jakub Jelinek <jakub@redhat.com>
25486 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
25487 remove_member_access_dummy_vars): New functions.
25488 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
25489 lower_omp_1, execute_lower_omp): Use them.
25491 PR rtl-optimization/84308
25492 * shrink-wrap.c (spread_components): Release todo vector.
25494 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
25496 PR rtl-optimization/57193
25497 * ira-color.c (struct allocno_color_data): Add member
25498 conflict_allocno_hard_prefs.
25499 (update_conflict_allocno_hard_prefs): New.
25500 (bucket_allocno_compare_func): Add a preference based on
25501 conflict_allocno_hard_prefs.
25502 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
25503 (color_allocnos): Remove a dead code. Initiate
25504 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
25506 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25509 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
25510 constraint from =wa to wa. Avoid a subreg on the output operand,
25511 instead use a pseudo and subreg it in a move.
25512 (p9_xxbrd_<mode>): Changed to ...
25513 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
25514 (p9_xxbrd_v2df): New expander.
25515 (p9_xxbrw_<mode>): Changed to ...
25516 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
25517 (p9_xxbrw_v4sf): New expander.
25519 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25521 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
25523 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
25526 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
25527 multiply in 32-bit mode.
25528 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
25529 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
25532 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
25534 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
25535 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
25536 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
25537 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
25539 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
25542 * dwarf2out.c (is_trivial_indirect_ref): New function.
25543 (dwarf2out_late_global_decl): Do not generate a location
25544 attribute for variables that have a non-trivial DECL_VALUE_EXPR
25545 and that are not defined in the current unit.
25547 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25549 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
25550 instead of a libcall for UNORDERED.
25552 2018-02-09 Tamar Christina <tamar.christina@arm.com>
25555 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
25556 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
25558 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25561 * config/s390/s390.c (s390_set_current_function): Invoke
25562 s390_indirect_branch_settings also if fndecl didn't change.
25564 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25566 * config/rs6000/rs6000.md (blockage): Set length to zero.
25568 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
25570 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
25572 2018-02-09 Jakub Jelinek <jakub@redhat.com>
25575 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
25576 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
25580 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
25581 PARALLEL incoming that failed vt_get_decl_and_offset check.
25583 PR middle-end/84237
25584 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
25585 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
25587 (get_variable_section): For decls in named .bss* sections pass true as
25588 second argument to bss_initializer_p.
25590 2018-02-09 Marek Polacek <polacek@redhat.com>
25591 Jakub Jelinek <jakub@redhat.com>
25594 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
25595 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
25596 Sync some changes from cxx_fold_indirect_ref.
25598 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
25600 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25602 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25603 (BLOCK_INLINE_ENTRY_LABEL): New.
25604 (dwarf2out_var_location): Disregard inline entry markers.
25605 (inline_entry_data): New struct.
25606 (inline_entry_data_hasher): New hashtable type.
25607 (inline_entry_data_hasher::hash): New.
25608 (inline_entry_data_hasher::equal): New.
25609 (inline_entry_data_table): New variable.
25610 (add_high_low_attributes): Add DW_AT_entry_pc and
25611 DW_AT_GNU_entry_view attributes if a pending entry is found
25612 in inline_entry_data_table. Add old entry_pc attribute only
25613 if debug nonbinding markers are disabled.
25614 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25615 markers are enabled.
25616 (block_within_block_p, dwarf2out_inline_entry): New.
25617 (dwarf2out_finish): Check that no entries remained in
25618 inline_entry_data_table.
25619 * final.c (reemit_insn_block_notes): Handle inline entry notes.
25620 (final_scan_insn, notice_source_line): Likewise.
25621 (rest_of_clean_state): Skip inline entry markers.
25622 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25624 * gimple.c (gimple_build_debug_inline_entry): New.
25625 * gimple.h (enum gimple_debug_subcode): Add
25626 GIMPLE_DEBUG_INLINE_ENTRY.
25627 (gimple_build_debug_inline_entry): Declare.
25628 (gimple_debug_inline_entry_p): New.
25629 (gimple_debug_nonbind_marker_p): Adjust.
25630 * insn-notes.def (INLINE_ENTRY): New.
25631 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25632 inline entry marker notes.
25633 (print_insn): Likewise.
25634 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25635 (INSN_DEBUG_MARKER_KIND): Likewise.
25636 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25637 * tree-inline.c (expand_call_inline): Build and insert
25638 debug_inline_entry stmt.
25639 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25640 inline entry blocks early, if nonbind markers are enabled.
25641 (dump_scope_block): Dump fragment info.
25642 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25643 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25644 (gimple_build_debug_inline_entry): New.
25645 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25646 Enable/disable inline entry points too.
25647 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25648 (DEBUG_INSN): Describe inline entry markers.
25650 * common.opt (gvariable-location-views): New.
25651 (gvariable-location-views=incompat5): New.
25652 * config.in: Rebuilt.
25653 * configure: Rebuilt.
25654 * configure.ac: Test assembler for view support.
25655 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25656 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25657 * dwarf2out.c (var_loc_view): New typedef.
25658 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25659 (dwarf2out_locviews_in_attribute): New.
25660 (dwarf2out_locviews_in_loclist): New.
25661 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25662 (enum dw_line_info_opcode): Add LI_adv_address.
25663 (struct dw_line_info_table): Add view.
25664 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25665 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25666 (zero_view_p): New variable.
25667 (ZERO_VIEW_P): New macro.
25668 (output_asm_line_debug_info): New.
25669 (struct var_loc_node): Add view.
25670 (add_AT_view_list, AT_loc_list): New.
25671 (add_var_loc_to_decl): Add view param. Test it against last.
25672 (new_loc_list): Add view params. Record them.
25673 (AT_loc_list_ptr): Handle loc and view lists.
25674 (view_list_to_loc_list_val_node): New.
25675 (print_dw_val): Handle dw_val_class_view_list.
25676 (size_of_die): Likewise.
25677 (value_format): Likewise.
25678 (loc_list_has_views): New.
25679 (gen_llsym): Set vl_symbol too.
25680 (maybe_gen_llsym, skip_loc_list_entry): New.
25681 (dwarf2out_maybe_output_loclist_view_pair): New.
25682 (output_loc_list): Output view list or entries too.
25683 (output_view_list_offset): New.
25684 (output_die): Handle dw_val_class_view_list.
25685 (output_dwarf_version): New.
25686 (output_compilation_unit_header): Use it.
25687 (output_skeleton_debug_sections): Likewise.
25688 (output_rnglists, output_line_info): Likewise.
25689 (output_pubnames, output_aranges): Update version comments.
25690 (output_one_line_info_table): Output view numbers in asm comments.
25691 (dw_loc_list): Determine current endview, pass it to new_loc_list.
25692 Call maybe_gen_llsym.
25693 (loc_list_from_tree_1): Adjust.
25694 (add_AT_location_description): Create view list attribute if
25695 needed, check it's absent otherwise.
25696 (convert_cfa_to_fb_loc_list): Adjust.
25697 (maybe_emit_file): Call output_asm_line_debug_info for test.
25698 (dwarf2out_var_location): Reset views as needed. Precompute
25699 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
25700 attribute. Set view.
25701 (new_line_info_table): Reset next view.
25702 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25703 (dwarf2out_source_line): Likewise. Output view resets and labels to
25704 the assembler, or select appropriate line info opcodes.
25705 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25706 (optimize_string_length): Catch it. Adjust.
25707 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
25708 dw_val_class_view_list, and remove it if no longer needed.
25709 (hash_loc_list): Hash view numbers.
25710 (loc_list_hasher::equal): Compare them.
25711 (optimize_location_lists): Check whether a view list symbol is
25712 needed, and whether the locview attribute is present, and
25713 whether they match. Remove the locview attribute if no longer
25715 (index_location_lists): Call skip_loc_list_entry for test.
25716 (dwarf2out_finish): Call output_asm_line_debug_info for test.
25717 Use output_dwarf_version.
25718 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25719 (struct dw_val_node): Add val_view_list.
25720 * final.c (SEEN_NEXT_VIEW): New.
25721 (set_next_view_needed): New.
25722 (clear_next_view_needed): New.
25723 (maybe_output_next_view): New.
25724 (final_start_function): Rename to...
25725 (final_start_function_1): ... this. Take pointer to FIRST,
25726 add SEEN parameter. Emit param bindings in the initial view.
25727 (final_start_function): Reintroduce SEEN-less interface.
25728 (final): Rename to...
25729 (final_1): ... this. Take SEEN parameter. Output final pending
25730 next view at the end.
25731 (final): Reintroduce seen-less interface.
25732 (final_scan_insn): Output pending next view before switching
25733 sections or ending a block. Mark the next view as needed when
25734 outputting variable locations. Notify debug backend of section
25735 changes, and of location view changes.
25736 (rest_of_handle_final): Adjust.
25737 * toplev.c (process_options): Autodetect value for debug variable
25738 location views option. Warn on incompat5 without -gdwarf-5.
25739 * doc/invoke.texi (gvariable-location-views): New.
25740 (gvariable-location-views=incompat5): New.
25741 (gno-variable-location-views): New.
25743 2018-02-08 David Malcolm <dmalcolm@redhat.com>
25745 PR tree-optimization/84136
25746 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25747 that the result of find_edge is non-NULL.
25749 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25752 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25753 storing integer register in SImode. Fix cost of 256 and 512
25754 byte aligned SSE register store.
25756 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
25758 * config/i386/i386.c (ix86_multiplication_cost): Fix
25759 multiplication cost for TARGET_AVX512DQ.
25761 2018-02-08 Marek Polacek <polacek@redhat.com>
25763 PR tree-optimization/84238
25764 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25767 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25769 PR tree-optimization/84265
25770 * tree-vect-stmts.c (vectorizable_store): Don't treat
25771 VMAT_CONTIGUOUS accesses as grouped.
25772 (vectorizable_load): Likewise.
25774 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25776 PR tree-optimization/81635
25777 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25778 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25779 (test_round_for_mask): New functions.
25780 (wide_int_cc_tests): Call test_round_for_mask.
25781 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25782 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25783 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25784 range returned by get_range_info.
25786 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
25789 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25790 * symtab.c: Include builtins.h
25791 (symtab_node::output_to_lto_symbol_table_p): Move here
25792 from lto-streamer-out.c:output_symbol_p.
25793 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25794 (output_symbol_p): Move all logic to symtab.c
25795 (produce_symtab): Update.
25797 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
25799 * config/s390/s390-opts.h (enum indirect_branch): Define.
25800 * config/s390/s390-protos.h (s390_return_addr_from_memory)
25801 (s390_indirect_branch_via_thunk)
25802 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25803 (enum s390_indirect_branch_type): Define.
25804 * config/s390/s390.c (struct s390_frame_layout, struct
25805 machine_function): Remove.
25806 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25807 (indirect_branch_table_label_no, indirect_branch_table_name):
25809 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25810 (enum s390_indirect_branch_option): Define.
25811 (s390_return_addr_from_memory): New function.
25812 (s390_handle_string_attribute): New function.
25813 (s390_attribute_table): Add new attribute handler.
25814 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25815 (s390_indirect_branch_via_thunk): New function.
25816 (s390_indirect_branch_via_inline_thunk): New function.
25817 (s390_function_ok_for_sibcall): When jumping via thunk disallow
25818 sibling call optimization for non z10 compiles.
25819 (s390_emit_call): Force indirect branch target to be a single
25820 register. Add r1 clobber for non-z10 compiles.
25821 (s390_emit_epilogue): Emit return jump via return_use expander.
25822 (s390_reorg): Handle JUMP_INSNs as execute targets.
25823 (s390_option_override_internal): Perform validity checks for the
25824 new command line options.
25825 (s390_indirect_branch_attrvalue): New function.
25826 (s390_indirect_branch_settings): New function.
25827 (s390_set_current_function): Invoke s390_indirect_branch_settings.
25828 (s390_output_indirect_thunk_function): New function.
25829 (s390_code_end): Implement target hook.
25830 (s390_case_values_threshold): Implement target hook.
25831 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25833 * config/s390/s390.h (struct s390_frame_layout)
25834 (struct machine_function): Move here from s390.c.
25835 (TARGET_INDIRECT_BRANCH_NOBP_RET)
25836 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25837 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25838 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25839 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25840 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25841 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25842 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25843 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25844 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25845 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25846 (mnemonic attribute): Add values which aren't recognized
25848 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25849 pattern for branch conversion. Fix mnemonic attribute.
25850 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25851 indirect branch via thunk if requested.
25852 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25853 ("*indirect_jump"): Disable for branch conversion using out of
25855 ("indirect_jump_via_thunk<mode>_z10")
25856 ("indirect_jump_via_thunk<mode>")
25857 ("indirect_jump_via_inlinethunk<mode>_z10")
25858 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25859 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25860 ("casesi_jump_via_inlinethunk<mode>_z10")
25861 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25862 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25863 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25864 ("*indirect2_jump"): Disable for branch conversion.
25865 ("casesi_jump"): Turn into expander and expand patterns for branch
25867 ("return_use"): New expander.
25868 ("*return"): Emit return via thunk and rename it to ...
25869 ("*return<mode>"): ... this one.
25870 * config/s390/s390.opt: Add new options and and enum for the
25873 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
25875 * lra-constraints.c (match_reload): Unconditionally use
25876 gen_lowpart_SUBREG, rather than selecting between that
25877 and equivalent gen_rtx_SUBREG code.
25879 2018-02-08 Richard Biener <rguenther@suse.de>
25881 PR tree-optimization/84233
25882 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25883 changed flag instead of boguously re-using phi_inserted.
25885 2018-02-08 Martin Jambor <mjambor@suse.cz>
25887 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25888 static local variables.
25890 2018-02-08 Richard Biener <rguenther@suse.de>
25892 PR tree-optimization/84278
25893 * tree-vect-stmts.c (vectorizable_store): When looking for
25894 smaller vector types to perform grouped strided loads/stores
25895 make sure the mode is supported by the target.
25896 (vectorizable_load): Likewise.
25898 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25900 * config/aarch64/aarch64.c (aarch64_components_for_bb):
25901 Increase LDP/STP opportunities by adding adjacent callee-saves.
25903 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
25905 PR rtl-optimization/84068
25906 PR rtl-optimization/83459
25907 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25909 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
25911 PR tree-optimization/84224
25912 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25913 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25914 non-zero arguments.
25916 2018-02-07 Iain Sandoe <iain@codesourcery.com>
25919 * config/rs6000/altivec.md (*restore_world): Remove LR use.
25920 * config/rs6000/predicates.md (restore_world_operation): Adjust op
25921 count, remove one USE.
25923 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
25925 * doc/install.texi (Configuration): Document the
25926 --with-long-double-format={ibm,ieee} PowerPC configuration
25930 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25931 Convert from define_expand to be define_insn_and_split. Rework
25932 float/double/_Float128 conversions to QI/HI/SImode to work with
25933 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
25934 conversions to QI/HImode types did a store and then a load to
25935 truncate the value. For conversions to VSX registers, don't split
25936 the insn, instead emit the code directly. Use the code iterator
25937 any_fix to combine signed and unsigned conversions.
25938 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25939 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25940 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25941 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25942 (fix_<mode>di2_hw): Likewise.
25943 (fixuns_<mode>di2_hw): Likewise.
25944 (fix_<mode>si2_hw): Likewise.
25945 (fixuns_<mode>si2_hw): Likewise.
25946 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25947 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25948 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25949 fix<uns>_trunc<SFDF:mode>si2_p8.
25950 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25951 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25952 (fix<uns>_<mode>_mem): Likewise.
25953 (fctiw<u>z_<mode>_mem): Likewise.
25954 (fix<uns>_<mode>_mem): Likewise.
25955 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25956 the register allocator from doing a direct move to the GPRs to do
25957 a store, and instead use the ISA 3.0 store byte/half-word from
25958 vector register instruction. For IEEE 128-bit floating point,
25959 also optimize stores of 32-bit ints.
25960 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25962 2018-02-07 Alan Hayward <alan.hayward@arm.com>
25964 * genextract.c (push_pathstr_operand): New function to support
25966 (walk_rtx): Call push_pathstr_operand.
25967 (print_path): Support [a-zA-Z].
25969 2018-02-07 Richard Biener <rguenther@suse.de>
25971 PR tree-optimization/84037
25972 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25973 (cse_and_gimplify_to_preheader): Declare.
25974 (vect_get_place_in_interleaving_chain): Likewise.
25975 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25977 (_loop_vec_info::~_loop_vec_info): Delete it.
25978 (cse_and_gimplify_to_preheader): New function.
25979 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25980 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25981 (vectorizable_load): Likewise. For grouped stores always base
25982 the IV on the first element.
25983 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25984 condition before gimplifying.
25986 2018-02-07 Jakub Jelinek <jakub@redhat.com>
25988 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25989 *DIV_EXPR and *MOD_EXPR.
25991 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
25994 * config/i386/i386.c (ix86_option_override_internal): Mask out
25995 the CF_SET bit when checking -fcf-protection.
25997 2018-02-07 Tom de Vries <tom@codesourcery.com>
26000 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
26003 2018-02-07 Richard Biener <rguenther@suse.de>
26005 PR tree-optimization/84204
26006 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
26009 PR tree-optimization/84205
26010 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
26011 special-case isl_ast_op_zdiv_r.
26013 PR tree-optimization/84223
26014 * graphite-scop-detection.c (gather_bbs::before_dom_children):
26015 Only add conditions from within the region.
26016 (gather_bbs::after_dom_children): Adjust.
26018 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
26021 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
26022 * config/avr/avr.md: Only post-reload split REG-REG moves if
26023 either register is GENERAL_REG_P.
26025 2018-02-07 Jakub Jelinek <jakub@redhat.com>
26027 PR tree-optimization/84235
26028 * tree-ssa-scopedtables.c
26029 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
26030 if the subtraction is performed in floating point type where NaNs are
26031 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
26032 build 1. Formatting fix.
26034 2018-02-06 Jakub Jelinek <jakub@redhat.com>
26037 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
26038 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
26039 and skip it regardless of bb boundaries. Use CALL_P macro,
26040 don't test INSN_P (insn) together with CALL_P or JUMP_P check
26041 unnecessarily, formatting fix.
26043 2018-02-06 Michael Collison <michael.collison@arm.com>
26045 * config/arm/thumb2.md:
26046 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
26047 (*thumb_mov_notscc): Ditto.
26049 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
26052 * config/rs6000/rs6000.md (su code attribute): Use "u" for
26053 unsigned_fix, not "s".
26055 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26057 * configure.ac (gcc_fn_eh_frame_ro): New function.
26058 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
26059 correct .eh_frame permissions.
26060 * configure: Regenerate.
26062 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
26064 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
26065 irrelevant options.
26067 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26069 * config/rs6000/rs6000.c (rs6000_option_override_internal):
26070 Display warning message for -mno-speculate-indirect-jumps.
26072 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
26074 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
26076 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
26078 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
26080 PR tree-optimization/84225
26081 * tree-eh.c (find_trapping_overflow): Only call
26082 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
26084 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26087 * config/i386/i386.c: Reimplement the check of possible options
26088 -mibt/-mshstk conbination. Change error messages.
26089 * doc/invoke.texi: Fix a typo: remove extra '='.
26091 2018-02-06 Marek Polacek <polacek@redhat.com>
26093 PR tree-optimization/84228
26094 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
26096 2018-02-06 Tamar Christina <tamar.christina@arm.com>
26099 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
26100 emitted arch directives.
26101 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
26102 __ARM_FEATURE_COPROC before changing architectures.
26104 2018-02-06 Richard Biener <rguenther@suse.de>
26106 * config/i386/i386.c (print_reg): Fix typo.
26107 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
26109 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
26111 * configure: Regenerate.
26113 2018-02-05 Martin Sebor <msebor@redhat.com>
26115 PR tree-optimization/83369
26116 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
26119 2018-02-05 Martin Liska <mliska@suse.cz>
26121 * doc/invoke.texi: Cherry-pick upstream r323995.
26123 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
26125 * ira.c (ira_init_register_move_cost): Adjust comment.
26127 2018-02-05 Martin Liska <mliska@suse.cz>
26129 PR gcov-profile/84137
26130 * doc/gcov.texi: Fix typo in documentation.
26132 2018-02-05 Martin Liska <mliska@suse.cz>
26134 PR gcov-profile/83879
26135 * doc/gcov.texi: Document necessity of --dynamic-list-data when
26136 using dlopen functionality.
26138 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
26140 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
26141 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
26142 _mm_maskz_range_ss, _mm_mask_range_round_ss,
26143 _mm_maskz_range_round_ss): New intrinsics.
26144 (__builtin_ia32_rangesd128_round)
26145 (__builtin_ia32_rangess128_round): Remove.
26146 (__builtin_ia32_rangesd128_mask_round,
26147 __builtin_ia32_rangess128_mask_round): New builtins.
26148 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
26149 __builtin_ia32_rangess128_round): Remove.
26150 (__builtin_ia32_rangesd128_mask_round,
26151 __builtin_ia32_rangess128_mask_round): New builtins.
26152 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
26153 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
26154 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
26155 "<round_saeonly_constraint>")): Changed to ...
26156 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
26157 "<round_saeonly_scalar_constraint>")): ... this.
26158 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
26159 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
26160 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
26161 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
26162 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
26164 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
26166 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
26168 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
26169 Remove all values except native, 8540 and 8548.
26171 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
26173 * config/i386/i386.c (ix86_output_function_return): Pass
26174 INVALID_REGNUM, instead of -1, as invalid register number to
26175 indirect_thunk_name and output_indirect_thunk.
26177 2018-02-02 Julia Koval <julia.koval@intel.com>
26179 * config.gcc: Add -march=icelake.
26180 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
26181 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
26182 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
26183 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
26184 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
26185 (processor_target_table): Add icelake.
26186 (ix86_option_override_internal): Handle new PTAs.
26187 (get_builtin_code_for_version): Handle icelake.
26188 (M_INTEL_COREI7_ICELAKE): New.
26189 (fold_builtin_cpu): Handle icelake.
26190 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
26191 * doc/invoke.texi: Add -march=icelake.
26193 2018-02-02 Julia Koval <julia.koval@intel.com>
26195 * config/i386/i386.c (ix86_option_override_internal): Change flags type
26196 to wide_int_bitmask.
26197 * wide-int-bitmask.h: New.
26199 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26202 * config/i386/i386.md: Replace Pmode with word_mode in
26203 builtin_setjmp_setup and builtin_longjmp to support x32.
26205 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
26209 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
26211 (rs6000_supported_cpu_names): New static variable.
26212 (linux_cpu_translation_table): Likewise.
26213 (elf_platform) <cpu>: Define new static variable and use it.
26214 Translate kernel AT_PLATFORM name to canonical name if needed.
26215 Error if platform name is unknown.
26217 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
26220 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
26222 2018-02-01 Jeff Law <law@redhat.com>
26225 * config/i386/i386.c (release_scratch_register_on_entry): Add new
26226 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
26227 the scratch if RELEASE_VIA_POP is false.
26228 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
26229 If we have to save a temporary register, decrement SIZE appropriately.
26230 Pass new arguments to release_scratch_register_on_entry.
26231 (ix86_adjust_stack_and_probe): Likewise.
26232 (ix86_emit_probe_stack_range): Pass new arguments to
26233 release_scratch_register_on_entry.
26235 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
26237 PR rtl-optimization/84157
26238 * combine.c (change_zero_ext): Use REG_P predicate in
26239 front of HARD_REGISTER_P predicate.
26241 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
26243 * config/avr/avr.c (avr_option_override): Move disabling of
26244 -fdelete-null-pointer-checks to...
26245 * common/config/avr/avr-common.c (avr_option_optimization_table):
26248 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26250 PR tree-optimization/81635
26251 * tree-data-ref.c (split_constant_offset_1): For types that
26252 wrap on overflow, try to use range info to prove that wrapping
26255 2018-02-01 Renlin Li <renlin.li@arm.com>
26258 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
26259 TAILCALL_ADDR_REGS.
26260 (aarch64_register_move_cost): Likewise.
26261 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
26262 TAILCALL_ADDR_REGS.
26263 (REG_CLASS_NAMES): Likewise.
26264 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
26265 TAILCALL_ADDR_REGS. Remove IP registers.
26266 * config/aarch64/aarch64.md (Ucs): Update register constraint.
26268 2018-02-01 Richard Biener <rguenther@suse.de>
26270 * domwalk.h (dom_walker::dom_walker): Add additional constructor
26271 for specifying RPO order and allow NULL for that.
26272 * domwalk.c (dom_walker::dom_walker): Likewise.
26273 (dom_walker::walk): Handle NULL RPO order.
26274 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
26276 (rewrite_update_dom_walker): Likewise.
26277 (mark_def_dom_walker): Likewise.
26279 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26281 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
26282 (aarch64_maybe_expand_sve_subreg_move): Declare.
26283 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
26284 * config/aarch64/predicates.md (aarch64_any_register_operand): New
26286 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
26287 that are semantically a reverse operation.
26288 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
26289 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
26290 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
26292 (aarch64_can_change_mode_class): For big-endian, forbid changes
26293 between two SVE modes if they have different element sizes.
26295 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26297 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
26298 the TImode handling for big-endian targets.
26300 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26302 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
26303 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
26305 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
26306 Remove BSWAP handing for big-endian targets and use the form of
26307 LD1RQ appropariate for the mode.
26309 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26311 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
26312 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
26313 duplicated element.
26315 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
26318 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
26319 check for operands that need to go through aarch64_sve_reload_be.
26321 2018-02-01 Jakub Jelinek <jakub@redhat.com>
26323 PR tree-optimization/81661
26324 PR tree-optimization/84117
26325 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
26326 * tree-eh.c: Include gimplify.h.
26327 (find_trapping_overflow, replace_trapping_overflow,
26328 rewrite_to_non_trapping_overflow): New functions.
26329 * tree-vect-loop.c: Include tree-eh.h.
26330 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
26331 * tree-data-ref.c: Include tree-eh.h.
26332 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
26334 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
26336 PR rtl-optimization/84123
26337 * combine.c (change_zero_ext): Check if hard register satisfies
26338 can_change_dest_mode before calling gen_lowpart_SUBREG.
26340 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
26343 * ira.c (ira_init_register_move_cost): Remove assert.
26345 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26347 PR rtl-optimization/84071
26348 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
26349 * doc/tm.texi: Regenerate.
26351 2018-01-31 Richard Biener <rguenther@suse.de>
26353 PR tree-optimization/84132
26354 * tree-data-ref.c (analyze_miv_subscript): Properly
26355 check whether evolution_function_is_affine_multivariate_p
26356 before calling gcd_of_steps_may_divide_p.
26358 2018-01-31 Julia Koval <julia.koval@intel.com>
26361 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
26362 * config/i386/i386.md (rdpid_rex64) New.
26363 (rdpid): Make 32bit only.
26365 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
26368 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
26369 an IDENTIFIER_NODE for FUNCTION_TYPE's.
26371 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26374 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
26376 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
26378 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
26380 PR rtl-optimization/84071
26381 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
26382 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
26384 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26386 * config/arc/arc.c (arc_handle_aux_attribute): New function.
26387 (arc_attribute_table): Add 'aux' attribute.
26388 (arc_in_small_data_p): Consider aux like variables.
26389 (arc_is_aux_reg_p): New function.
26390 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
26391 (arc_get_aux_arg): New function.
26392 (prepare_move_operands): Handle aux-register access.
26393 (arc_handle_aux_attribute): New function.
26394 * doc/extend.texi (ARC Variable attributes): Add subsection.
26396 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
26398 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
26399 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
26400 (arc_attribute_table): Add 'uncached' attribute.
26401 (arc_print_operand): Print '.di' flag for uncached memory
26403 (arc_in_small_data_p): Do not consider for small data the uncached
26405 (arc_is_uncached_mem_p): New function.
26406 * config/arc/predicates.md (compact_store_memory_operand): Check
26407 for uncached memory accesses.
26408 (nonvol_nonimm_operand): Likewise.
26409 * doc/extend.texi (ARC Type Attribute): New subsection.
26411 2018-01-31 Jakub Jelinek <jakub@redhat.com>
26414 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
26415 falign-loops=): Add Optimization flag.
26417 2018-01-30 Jeff Law <law@redhat.com>
26420 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
26421 INT_REGISTERS_SAVED. Check it prior to calling
26422 get_scratch_register_on_entry.
26423 (ix86_adjust_stack_and_probe): Similarly.
26424 (ix86_emit_probe_stack_range): Similarly.
26425 (ix86_expand_prologue): Corresponding changes.
26427 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26430 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
26431 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
26433 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
26436 * lra-constraints.c (curr_insn_transform): Process AND in the
26439 2018-01-30 Jakub Jelinek <jakub@redhat.com>
26441 PR rtl-optimization/83986
26442 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
26443 dependence against last_pending_memory_flush in addition to
26444 pending_jump_insns.
26446 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
26448 PR tree-optimization/81611
26449 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
26452 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
26455 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
26458 2018-01-30 Richard Biener <rguenther@suse.de>
26459 Jakub Jelinek <jakub@redhat.com>
26461 PR tree-optimization/84111
26462 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
26463 inner loops added during recursion, as they don't have up-to-date
26466 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26469 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
26470 (can_inline_edge_by_limits_p): ... here.
26471 (can_early_inline_edge_p, check_callers,
26472 update_caller_keys, update_callee_keys, recursive_inlining,
26473 add_new_edges_to_heap, speculation_useful_p,
26474 inline_small_functions,
26475 inline_small_functions, flatten_function,
26476 inline_to_all_callers_1): Update.
26478 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
26480 * profile-count.c (profile_count::combine_with_ipa_count): Handle
26483 2018-01-30 Richard Biener <rguenther@suse.de>
26485 PR tree-optimization/83008
26486 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
26487 invariant and constant vector uses in stmts when they need
26488 more than one stmt.
26490 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26493 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
26494 * configure: Regenerate.
26496 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26498 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
26500 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
26501 Use gen_rtx_REG rather than gen_lowpart.
26503 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26505 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
26506 rather than 0 when creating partial subregs.
26508 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
26510 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
26513 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
26516 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
26517 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
26518 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
26519 flags. This restores the settings used before the 2017-07-24.
26520 Turning off pre increment/decrement/modify allows IVOPTS to
26521 optimize DF/SF loops where the index is an int.
26523 2018-01-29 Richard Biener <rguenther@suse.de>
26524 Kelvin Nilsen <kelvin@gcc.gnu.org>
26527 * tree-vect-stmts.c (vectorizable_call): Don't call
26528 targetm.vectorize_builtin_md_vectorized_function if callee is
26531 2018-01-22 Carl Love <cel@us.ibm.com>
26533 * doc/extend.tex: Fix typo in second arg in
26534 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
26536 2018-01-29 Richard Biener <rguenther@suse.de>
26538 PR tree-optimization/84086
26539 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
26540 (flush_ssaname_freelist): When SSA names were released reset
26541 the SCEV hash table.
26543 2018-01-29 Richard Biener <rguenther@suse.de>
26545 PR tree-optimization/84057
26546 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
26547 removed paths when removing edges.
26549 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
26551 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
26552 -mfunction-return=@var{choice}.
26554 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
26556 PR diagnostic/84034
26557 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
26558 Handle CR like TAB.
26559 (layout::print_source_line): Likewise.
26560 (test_get_line_width_without_trailing_whitespace): Add test cases.
26562 2018-01-27 Jakub Jelinek <jakub@redhat.com>
26564 PR middle-end/84040
26565 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
26568 2018-01-26 Jim Wilson <jimw@sifive.com>
26570 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
26572 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
26575 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
26577 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
26578 and CMP + SUB-immediate -> SUBS.
26580 2018-01-26 Martin Sebor <msebor@redhat.com>
26582 PR tree-optimization/83896
26583 * tree-ssa-strlen.c (get_string_len): Rename...
26584 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
26585 Avoid assuming length is constant.
26586 (handle_char_store): Use HOST_WIDE_INT for string length.
26588 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
26591 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
26592 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
26594 2018-01-26 Richard Biener <rguenther@suse.de>
26596 PR rtl-optimization/84003
26597 * dse.c (record_store): Only record redundant stores when
26598 the earlier store aliases at least all accesses the later one does.
26600 2018-01-26 Jakub Jelinek <jakub@redhat.com>
26602 PR rtl-optimization/83985
26603 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26604 REG_CFA_RESTORE insns.
26605 (delete_unmarked_insns): Don't ignore separate shrink wrapping
26606 REG_CFA_RESTORE insns here.
26609 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26610 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26612 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26614 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26615 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26616 (arc_init): Likewise.
26617 (arc_override_options): Likewise.
26618 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26620 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26622 * config/arc/arc.h (TARGET_DBNZ): Define.
26623 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26624 properly set the tune attribute.
26625 (dbnz): Use TARGET_DBNZ guard.
26626 * config/arc/arc.opt (mtune): Add core3 option.
26628 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26630 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26631 recognize new pic like addresses.
26632 (arc_delegitimize_address): Clean up.
26634 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26636 * config/arc/arc-arches.def: Option mrf16 valid for all
26638 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26639 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26640 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26641 * config/arc/arc-tables.opt: Regenerate.
26642 * config/arc/arc.c (arc_conditional_register_usage): Handle
26643 reduced register file case.
26644 (arc_file_start): Set must have build attributes.
26645 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26646 mrf16 option value.
26647 * config/arc/arc.opt (mrf16): Add new option.
26648 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26649 * config/arc/genmultilib.awk: Handle new mrf16 option.
26650 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26651 * config/arc/t-multilib: Regenerate.
26652 * doc/invoke.texi (ARC Options): Document mrf16 option.
26654 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26656 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26657 * config/arc/arc.c (arc_handle_secure_attribute): New function.
26658 (arc_attribute_table): Add 'secure_call' attribute.
26659 (arc_print_operand): Print secure call operand.
26660 (arc_function_ok_for_sibcall): Don't optimize tail calls when
26662 (arc_is_secure_call_p): New function. * config/arc/arc.md
26663 (call_i): Add support for sjli instruction.
26664 (call_value_i): Likewise.
26665 * config/arc/constraints.md (Csc): New constraint.
26667 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
26668 John Eric Martin <John.Martin@emmicro-us.com>
26670 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26671 * config/arc/arc.c (_arc_jli_section): New struct.
26672 (arc_jli_section): New type.
26673 (rc_jli_sections): New static variable.
26674 (arc_handle_jli_attribute): New function.
26675 (arc_attribute_table): Add jli_always and jli_fixed attribute.
26676 (arc_file_end): New function.
26677 (TARGET_ASM_FILE_END): Define.
26678 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26679 (arc_add_jli_section): New function.
26680 (jli_call_scan): Likewise.
26681 (arc_reorg): Call jli_call_scan.
26682 (arc_output_addsi): Remove 'S' from printing asm operand.
26683 (arc_is_jli_call_p): New function.
26684 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26686 (movhi_insn): Likewise.
26687 (movsi_insn): Likewise.
26688 (movsi_set_cc_insn): Likewise.
26689 (loadqi_update): Likewise.
26690 (load_zeroextendqisi_update): Likewise.
26691 (load_signextendqisi_update): Likewise.
26692 (loadhi_update): Likewise.
26693 (load_zeroextendhisi_update): Likewise.
26694 (load_signextendhisi_update): Likewise.
26695 (loadsi_update): Likewise.
26696 (loadsf_update): Likewise.
26697 (movsicc_insn): Likewise.
26698 (bset_insn): Likewise.
26699 (bxor_insn): Likewise.
26700 (bclr_insn): Likewise.
26701 (bmsk_insn): Likewise.
26702 (bicsi3_insn): Likewise.
26703 (cmpsi_cc_c_insn): Likewise.
26704 (movsi_ne): Likewise.
26705 (movsi_cond_exec): Likewise.
26706 (clrsbsi2): Likewise.
26707 (norm_f): Likewise.
26717 (call_i): Remove 'S' asm letter, add jli instruction.
26718 (call_value_i): Likewise.
26719 * config/arc/arc.op (mjli-always): New option.
26720 * config/arc/constraints.md (Cji): New constraint.
26721 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26723 (subsf3_fpx): Likewise.
26724 (mulsf3_fpx): Likewise.
26725 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26727 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26728 function attrbutes.
26729 * doc/invoke.texi (ARC): Document mjli-always option.
26731 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
26733 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26734 avoid addition with 0 and use incw and decw where possible.
26736 2018-01-26 Richard Biener <rguenther@suse.de>
26738 PR tree-optimization/81082
26739 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26740 association if it requires casting to unsigned.
26741 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26742 from fold_plusminus_mult_expr to catch important cases late when
26743 range info is available.
26745 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
26747 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26748 * configure.ac (hidden_linkonce): New test.
26749 * configure: Regenerate.
26750 * config.in: Regenerate.
26752 2018-01-26 Julia Koval <julia.koval@intel.com>
26754 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26755 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26756 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26757 _mm_mask_bitshuffle_epi64_mask): Fix type.
26758 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26759 USI_FTYPE_V4DI_V4DI_USI): Remove.
26760 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26761 __builtin_ia32_vpshufbitqmb256_mask,
26762 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26763 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26764 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26766 2018-01-26 Alan Modra <amodra@gmail.com>
26769 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26770 UNSPEC_VBPERMQ. Sort other unspecs.
26772 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
26774 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26776 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
26778 PR middle-end/83055
26779 * predict.c (drop_profile): Do not push/pop cfun; update also
26781 (handle_missing_profiles): Fix logic looking for zero profiles.
26783 2018-01-25 Jakub Jelinek <jakub@redhat.com>
26785 PR middle-end/83977
26786 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26787 on functions with #pragma omp declare simd or functions with simd
26789 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26790 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26791 Remove trailing \n from warning_at calls.
26793 2018-01-25 Tom de Vries <tom@codesourcery.com>
26796 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26797 for neutered workers.
26799 2018-01-24 Joseph Myers <joseph@codesourcery.com>
26802 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26803 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26805 2018-01-24 Jeff Law <law@redhat.com>
26808 * i386.c (get_probe_interval): Move to earlier point.
26809 (ix86_compute_frame_layout): If -fstack-clash-protection and
26810 the frame is larger than the probe interval, then use pushes
26811 to save registers rather than reg->mem moves.
26812 (ix86_expand_prologue): Remove conditional for int_registers_saved
26815 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
26818 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26819 min/max for never referenced object.
26821 2018-01-24 Jakub Jelinek <jakub@redhat.com>
26823 PR middle-end/83977
26824 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26826 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26827 attributes from DECL_ATTRIBUTES (decl) without affecting
26828 DECL_ATTRIBUTES (current_function_decl).
26829 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26830 functions with non-NULL DECL_ABSTRACT_ORIGIN.
26832 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
26834 PR tree-optimization/83979
26835 * fold-const.c (fold_comparison): Use constant_boolean_node
26836 instead of boolean_{true,false}_node.
26838 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
26840 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26843 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
26845 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26846 Simplify the clause that sets the length attribute.
26847 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26848 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26849 clause that sets the length attribute.
26850 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26852 2018-01-24 Tom de Vries <tom@codesourcery.com>
26855 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26856 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26857 Add strict parameter.
26858 (prevent_branch_around_nothing): Insert dummy insn between branch to
26859 label and label with no ptx insn inbetween.
26860 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26862 2018-01-24 Tom de Vries <tom@codesourcery.com>
26865 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26866 for neutered threads in warp.
26867 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26869 2018-01-24 Richard Biener <rguenther@suse.de>
26871 PR tree-optimization/83176
26872 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26875 2018-01-24 Richard Biener <rguenther@suse.de>
26877 PR tree-optimization/82819
26878 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26879 code generating pluses that are no-ops in the target precision.
26881 2018-01-24 Richard Biener <rguenther@suse.de>
26883 PR middle-end/84000
26884 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26886 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
26888 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26889 to merge probabilities.
26890 * predict.c (probably_never_executed): Also mark as cold functions
26891 with global 0 profile and guessed local profile.
26892 * profile-count.c (profile_probability::combine_with_count): New
26894 * profile-count.h (profile_probability::operator*,
26895 profile_probability::operator*=, profile_probability::operator/,
26896 profile_probability::operator/=): Reduce precision to adjusted
26897 and set value to guessed on contradictory divisions.
26898 (profile_probability::combine_with_freq): Remove.
26899 (profile_probability::combine_wiht_count): Declare.
26900 (profile_count::force_nonzero):: Set to adjusted.
26901 (profile_count::probability_in):: Set quality to adjusted.
26902 * tree-ssa-tail-merge.c (replace_block_by): Use
26903 combine_with_count.
26905 2018-01-23 Andrew Waterman <andrew@sifive.com>
26906 Jim Wilson <jimw@sifive.com>
26908 * config/riscv/riscv.c (riscv_stack_boundary): New.
26909 (riscv_option_override): Set riscv_stack_boundary. Handle
26910 riscv_preferred_stack_boundary_arg.
26911 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26912 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26913 (STACK_BOUNDARY): Set to riscv_stack_boundary.
26914 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26915 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26916 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26918 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
26921 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26922 of struct ix86_frame.
26923 (ix86_expand_epilogue): Likewise. Add a local variable for
26924 the reg_save_offset field in struct ix86_frame.
26926 2018-01-23 Bin Cheng <bin.cheng@arm.com>
26928 PR tree-optimization/82604
26929 * tree-loop-distribution.c (enum partition_kind): New enum item
26930 PKIND_PARTIAL_MEMSET.
26931 (partition_builtin_p): Support above new enum item.
26932 (generate_code_for_partition): Ditto.
26933 (compute_access_range): Differentiate cases that equality can be
26934 proven at all loops, the innermost loops or no loops.
26935 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26936 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
26937 (finalize_partitions, distribute_loop): Don't fuse partition of
26938 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26939 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26940 parloop is enabled.
26942 2018-01-23 Martin Liska <mliska@suse.cz>
26944 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26945 order to ignore the predictor.
26946 (PRED_POLYMORPHIC_CALL): Likewise.
26947 (PRED_RECURSIVE_CALL): Likewise.
26949 2018-01-23 Martin Liska <mliska@suse.cz>
26951 * tree-profile.c (tree_profiling): Print function header to
26952 aware reader which function we are working on.
26953 * value-prof.c (gimple_find_values_to_profile): Do not print
26954 not interesting value histograms.
26956 2018-01-23 Martin Liska <mliska@suse.cz>
26958 * profile-count.h (enum profile_quality): Add
26959 profile_uninitialized as the first value. Do not number values
26960 as they are zero based.
26961 (profile_count::verify): Update sanity check.
26962 (profile_probability::verify): Likewise.
26964 2018-01-23 Nathan Sidwell <nathan@acm.org>
26966 * doc/invoke.texi (ffor-scope): Deprecate.
26968 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26970 PR tree-optimization/83510
26971 * domwalk.c (set_all_edges_as_executable): New function.
26972 (dom_walker::dom_walker): Convert bool param
26973 "skip_unreachable_blocks" to enum reachability. Move setup of
26974 edge flags to set_all_edges_as_executable and only do it when
26975 reachability is REACHABLE_BLOCKS.
26976 * domwalk.h (enum dom_walker::reachability): New enum.
26977 (dom_walker::dom_walker): Convert bool param
26978 "skip_unreachable_blocks" to enum reachability.
26979 (set_all_edges_as_executable): New decl.
26980 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
26981 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26983 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26984 but converting true to REACHABLE_BLOCKS.
26985 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26987 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26988 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26989 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26991 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26992 if check_all_array_refs will be called.
26994 2018-01-23 David Malcolm <dmalcolm@redhat.com>
26996 * tree.c (selftest::test_location_wrappers): Add more test
26999 2018-01-23 David Malcolm <dmalcolm@redhat.com>
27001 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
27002 (selftest::test_bit_in_range): Likewise.
27004 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27007 * doc/sourcebuild.texi (vect_float): Say that the selector
27008 only describes the situation when -funsafe-math-optimizations is on.
27009 (vect_float_strict): Document.
27011 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
27013 PR tree-optimization/83965
27014 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
27015 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
27016 instead of checking only for a reduction.
27017 (vect_recog_widen_sum_pattern): Likewise.
27019 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27021 * predict.c (probably_never_executed): Only use precise profile info.
27022 (compute_function_frequency): Skip after inlining hack since we now
27023 have quality checking.
27025 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
27027 * profile-count.h (profile_probability::very_unlikely,
27028 profile_probability::unlikely, profile_probability::even): Set
27029 precision to guessed.
27031 2018-01-23 Richard Biener <rguenther@suse.de>
27033 PR tree-optimization/83963
27034 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
27035 Properly terminate dominator walk when crossing the exit edge not
27036 when visiting its source block.
27038 2018-01-23 Jakub Jelinek <jakub@redhat.com>
27041 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
27042 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
27044 2018-01-22 Jakub Jelinek <jakub@redhat.com>
27046 PR tree-optimization/83957
27047 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
27048 semicolon after for body surrounded by braces.
27050 PR tree-optimization/83081
27051 * profile-count.h (profile_probability::split): New method.
27052 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
27053 Use profile_probability::split.
27054 (do_compare_rtx_and_jump): Fix adjustment of probabilities
27055 when splitting a single conditional jump into 2.
27057 2018-01-22 David Malcolm <dmalcolm@redhat.com>
27059 PR tree-optimization/69452
27060 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
27063 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27065 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
27066 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
27067 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
27069 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27071 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
27073 * config/rl78/rl78.md (movdi): New define_expand.
27074 * config/rl78/rl78.c (rl78_split_movdi): New function.
27076 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
27079 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
27081 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
27082 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
27083 128-bit to produce an UNSPEC move to get the double word with the
27084 signbit and then a shift directly to do signbit.
27085 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
27086 implementation with a new version that just does either a direct
27087 move or a regular move. Move memory interface to separate insns.
27088 Move insns so they are next to the expander.
27089 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
27090 with signbit move. Split big and little endian case.
27091 (signbit<mode>2_dm_mem_le): Likewise.
27092 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
27093 (signbit<mode>2_dm2): Likewise.
27095 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27097 * config/rl78/rl78.md (anddi3): New define_expand.
27099 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27101 * config/rl78/rl78.md (umindi3): New define_expand.
27103 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27105 * config/rl78/rl78.md (smindi3): New define_expand.
27107 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27109 * config/rl78/rl78.md (smaxdi3): New define_expand.
27111 2018-01-22 Carl Love <cel@us.ibm.com>
27113 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
27114 LVX_V1TI): Add macro expansion.
27115 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
27116 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
27117 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
27118 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
27119 Change check to determine if the instruction is a byte reversing
27120 entry. Fix typo in comment.
27121 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
27122 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
27123 Add def_builtin calls for new builtins.
27124 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
27125 Add define_insn expansion.
27127 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27129 * config/rl78/rl78.md (umaxdi3): New define_expand.
27131 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
27133 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
27134 for non-QImode registers.
27136 2018-01-22 Richard Biener <rguenther@suse.de>
27138 PR tree-optimization/83963
27139 * graphite-scop-detection.c (scop_detection::get_sese): Delay
27140 including the loop exit block.
27141 (scop_detection::merge_sese): Likewise.
27142 (scop_detection::add_scop): Do it here instead.
27144 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27146 * doc/sourcebuild.texi (arm_softfloat): Document.
27148 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
27151 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
27152 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
27153 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
27155 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27156 David Edelsohn <dje.gcc@gmail.com>
27159 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27160 Change "crset eq" to "crset 2".
27161 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27162 (*call_indirect_aix<mode>_nospec): Likewise.
27163 (*call_value_indirect_aix<mode>_nospec): Likewise.
27164 (*call_indirect_elfv2<mode>_nospec): Likewise.
27165 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
27166 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
27167 change assembly output from . to $.
27168 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27169 (indirect_jump<mode>_nospec): Change assembly output from . to $.
27170 (*tablejump<mode>_internal1_nospec): Likewise.
27172 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
27175 * config/sh/sh_optimize_sett_clrt.cc:
27176 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
27178 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
27180 PR tree-optimization/83940
27181 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
27182 offset_dt to vect_constant_def rather than vect_unknown_def_type.
27183 (vect_check_load_store_mask): Add a mask_dt_out parameter and
27184 use it to pass back the definition type.
27185 (vect_check_store_rhs): Likewise rhs_dt_out.
27186 (vect_build_gather_load_calls): Add a mask_dt argument and use
27187 it instead of a call to vect_is_simple_use.
27188 (vectorizable_store): Update calls to vect_check_load_store_mask
27189 and vect_check_store_rhs. Use the dt returned by the latter instead
27190 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
27191 instead of calls to vect_is_simple_use. Pass the scalar rather
27192 than the vector operand to vect_is_simple_use when handling
27193 second and subsequent copies of an rhs value.
27194 (vectorizable_load): Update calls to vect_check_load_store_mask
27195 and vect_build_gather_load_calls. Use the cached mask_dt and
27196 gs_info.offset_dt instead of calls to vect_is_simple_use.
27198 2018-01-20 Jakub Jelinek <jakub@redhat.com>
27200 PR middle-end/83945
27201 * tree-emutls.c: Include gimplify.h.
27202 (lower_emutls_2): New function.
27203 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
27204 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
27205 it before further processing.
27208 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
27209 UINTVAL (trueop1) instead of INTVAL (op1).
27211 2018-01-19 Jakub Jelinek <jakub@redhat.com>
27215 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
27216 INCOMING_FRAME_SP_OFFSET if not defined.
27217 (scan_trace): Add ENTRY argument. If true and
27218 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
27219 emit a note to adjust the CFA offset.
27220 (create_cfi_notes): Adjust scan_trace callers.
27221 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
27222 INCOMING_FRAME_SP_OFFSET in the CIE.
27223 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
27224 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
27226 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
27227 * doc/tm.texi: Regenerated.
27229 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27231 PR rtl-optimization/83147
27232 * lra-constraints.c (remove_inheritance_pseudos): Use
27233 lra_substitute_pseudo_within_insn.
27235 2018-01-19 Tom de Vries <tom@codesourcery.com>
27236 Cesar Philippidis <cesar@codesourcery.com>
27239 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
27241 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
27244 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
27245 spaces for function labels.
27247 2018-01-19 Martin Liska <mliska@suse.cz>
27249 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
27250 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
27251 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
27252 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
27253 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
27254 (PRED_CONST_RETURN): Change from 69 to 65.
27255 (PRED_NULL_RETURN): Change from 91 to 71.
27256 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
27257 (PRED_LOOP_GUARD): Change from 66 to 73.
27259 2018-01-19 Martin Liska <mliska@suse.cz>
27261 * predict.c (predict_insn_def): Add new assert.
27262 (struct branch_predictor): Change type to signed integer.
27263 (test_prediction_value_range): Amend test to cover
27264 PROB_UNINITIALIZED.
27265 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
27266 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
27267 (PRED_LOOP_ITERATIONS_MAX): Likewise.
27268 (PRED_LOOP_IV_COMPARE): Likewise.
27269 * predict.h (PROB_UNINITIALIZED): Define new constant.
27271 2018-01-19 Martin Liska <mliska@suse.cz>
27273 * predict.c (dump_prediction): Add new format for
27274 analyze_brprob.py script which is enabled with -details
27276 * profile-count.h (precise_p): New function.
27278 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27280 PR tree-optimization/83922
27281 * tree-vect-loop.c (vect_verify_full_masking): Return false if
27282 there are no statements that need masking.
27283 (vect_active_double_reduction_p): New function.
27284 (vect_analyze_loop_operations): Use it when handling phis that
27285 are not in the loop header.
27287 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
27289 PR tree-optimization/83914
27290 * tree-vect-loop.c (vectorizable_induction): Don't convert
27291 init_expr or apply the peeling adjustment for inductions
27292 that are nested within the vectorized loop.
27294 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27296 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
27299 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27303 * function.h (gimplify_parameters): Add gimple_seq * argument.
27304 * function.c: Include gimple.h and options.h.
27305 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
27306 for the added local temporaries if needed.
27307 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
27308 if there are any parameter cleanups, wrap whole body into a
27309 try/finally with the cleanups.
27311 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
27314 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
27315 Use GET_MODE_CLASS for scalar floating point.
27317 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27321 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
27322 Fix call of call_cgraph_insertion_hooks.
27324 2018-01-18 Martin Sebor <msebor@redhat.com>
27326 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
27328 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
27331 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
27334 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
27337 * common.opt: (-ffile-prefix-map): New option.
27338 * opts.c (common_handle_option): Defer it.
27339 * opts-global.c (handle_common_deferred_options): Handle it.
27340 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
27341 * file-prefix-map.h: New file.
27342 (remap_debug_filename, add_debug_prefix_map): ...here.
27343 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
27344 * final.c (debug_prefix_map, add_debug_prefix_map
27345 remap_debug_filename): Move to...
27346 * file-prefix-map.c: New file.
27347 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
27348 generalize, get rid of alloca(), use strrchr() instead of strchr().
27349 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
27350 Implement in terms of add_prefix_map().
27351 (remap_macro_filename, remap_debug_filename): Implement in term of
27353 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
27354 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
27355 * dbxout.c: Include file-prefix-map.h.
27356 * varasm.c: Likewise.
27357 * vmsdbgout.c: Likewise.
27358 * xcoffout.c: Likewise.
27359 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
27360 * doc/cppopts.texi (-fmacro-prefix-map): Document.
27361 * doc/invoke.texi (-ffile-prefix-map): Document.
27362 (-fdebug-prefix-map): Update description.
27364 2018-01-18 Martin Liska <mliska@suse.cz>
27366 * config/i386/i386.c (indirect_thunk_name): Document that also
27368 (output_indirect_thunk): Document why both instructions
27369 (pause and lfence) are generated.
27371 2018-01-18 Richard Biener <rguenther@suse.de>
27373 PR tree-optimization/83887
27374 * graphite-scop-detection.c
27375 (scop_detection::get_nearest_dom_with_single_entry): Remove.
27376 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
27377 (scop_detection::merge_sese): Re-implement with a flood-fill
27378 algorithm that properly finds a SESE region if it exists.
27380 2018-01-18 Jakub Jelinek <jakub@redhat.com>
27383 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
27384 pointer_diff optimizations use view_convert instead of convert.
27386 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27388 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
27389 Generate different code for -mno-speculate-indirect-jumps.
27390 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
27391 (*call_indirect_aix<mode>): Disable for
27392 -mno-speculate-indirect-jumps.
27393 (*call_indirect_aix<mode>_nospec): New define_insn.
27394 (*call_value_indirect_aix<mode>): Disable for
27395 -mno-speculate-indirect-jumps.
27396 (*call_value_indirect_aix<mode>_nospec): New define_insn.
27397 (*sibcall_nonlocal_sysv<mode>): Generate different code for
27398 -mno-speculate-indirect-jumps.
27399 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
27401 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
27403 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
27404 long double type, set the flags for noting the default long double
27405 type, even if we don't pass or return a long double type.
27407 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
27410 * ipa-inline.c (flatten_function): Do not overwrite final inlining
27413 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
27415 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
27416 support for merge[hl].
27417 (fold_mergehl_helper): New helper function.
27418 (tree-vector-builder.h): New #include for tree_vector_builder usage.
27419 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
27420 (altivec_vmrglw_direct): Add xxmrglw insn.
27422 2018-01-17 Andrew Waterman <andrew@sifive.com>
27424 * config/riscv/riscv.c (riscv_conditional_register_usage): If
27425 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
27427 2018-01-17 David Malcolm <dmalcolm@redhat.com>
27430 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
27431 call the lto_location_cache before reading the
27432 DECL_SOURCE_LOCATION of the types.
27434 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
27435 Richard Sandiford <richard.sandiford@linaro.org>
27437 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
27438 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
27439 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
27440 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
27441 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
27443 * config/aarch64/constraints.md (aarch64_movti_operand):
27445 * config/aarch64/predicates.md (Uti): Add new constraint.
27447 2018-01-17 Carl Love <cel@us.ibm.com>
27449 * config/rs6000/vsx.md (define_expand xl_len_r,
27450 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
27451 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
27453 (define_expand, define_insn): Move the shift left from the
27454 define_insn to the define_expand for lxvl and stxvl instructions.
27455 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
27456 and XL_LEN_R definitions to PURE.
27458 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
27460 * config/i386/i386.c (indirect_thunk_name): Declare regno
27461 as unsigned int. Compare regno with INVALID_REGNUM.
27462 (output_indirect_thunk): Ditto.
27463 (output_indirect_thunk_function): Ditto.
27464 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
27465 in the call to output_indirect_thunk_function.
27467 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
27469 PR middle-end/83884
27470 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
27471 rather than the size of inner_type to determine the stack slot size
27472 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
27474 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
27477 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
27480 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
27482 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
27483 endian Linux systems to optionally enable multilibs for selecting
27484 the long double type if the user configured an explicit type.
27485 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
27486 have no long double multilibs if not defined.
27487 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
27488 warn if the user used -mabi={ieee,ibm}longdouble and we built
27489 multilibs for long double.
27490 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
27491 appropriate multilib option.
27492 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
27494 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
27495 for building long double multilibs.
27496 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
27498 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
27500 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
27503 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
27505 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
27508 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
27511 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
27514 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27516 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
27517 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
27519 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
27521 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
27522 different rtl trees depending on TARGET_64BIT.
27523 (rs6000_gen_lvx): Likewise.
27525 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
27527 * config/visium/visium.md (nop): Tweak comment.
27528 (hazard_nop): Likewise.
27530 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27532 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
27533 -mspeculate-indirect-jumps.
27534 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
27535 for -mno-speculate-indirect-jumps.
27536 (*call_indirect_elfv2<mode>_nospec): New define_insn.
27537 (*call_value_indirect_elfv2<mode>): Disable for
27538 -mno-speculate-indirect-jumps.
27539 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
27540 (indirect_jump): Emit different RTL for
27541 -mno-speculate-indirect-jumps.
27542 (*indirect_jump<mode>): Disable for
27543 -mno-speculate-indirect-jumps.
27544 (*indirect_jump<mode>_nospec): New define_insn.
27545 (tablejump): Emit different RTL for
27546 -mno-speculate-indirect-jumps.
27547 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
27548 (tablejumpsi_nospec): New define_expand.
27549 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
27550 (tablejumpdi_nospec): New define_expand.
27551 (*tablejump<mode>_internal1): Disable for
27552 -mno-speculate-indirect-jumps.
27553 (*tablejump<mode>_internal1_nospec): New define_insn.
27554 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
27557 2018-01-16 Artyom Skrobov tyomitch@gmail.com
27559 * caller-save.c (insert_save): Drop unnecessary parameter. All
27562 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27563 Richard Biener <rguenth@suse.de>
27566 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
27567 return early, inline manually is_gimple_sizepos. Make sure if we
27568 call gimplify_expr we don't end up with a gimple constant.
27569 * tree.c (variably_modified_type_p): Don't return true for
27570 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
27571 * gimplify.h (is_gimple_sizepos): Remove.
27573 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27575 PR tree-optimization/83857
27576 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
27577 vectorizable_live_operation for pure SLP statements.
27578 (vectorizable_live_operation): Handle PHIs.
27580 2018-01-16 Richard Biener <rguenther@suse.de>
27582 PR tree-optimization/83867
27583 * tree-vect-stmts.c (vect_transform_stmt): Precompute
27584 nested_in_vect_loop_p since the scalar stmt may get invalidated.
27586 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27589 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
27590 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
27591 If off is not INTEGER_CST, issue a may not be aligned warning
27592 rather than isn't aligned. Use isn%'t rather than isn't.
27593 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
27595 <case MULT_EXPR>: Improve the case when bottom and one of the
27596 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
27597 operand, in that case check if the other operand is multiple of
27598 bottom divided by the INTEGER_CST operand.
27600 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27603 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27604 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27605 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27606 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27607 * config/pa/pa.c (pa_function_arg_advance): Likewise.
27608 (pa_function_arg, pa_arg_partial_bytes): Likewise.
27609 (pa_function_arg_size): New function.
27611 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27613 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27614 in a separate statement.
27616 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
27618 PR tree-optimization/83847
27619 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27620 group gathers and scatters.
27622 2018-01-16 Jakub Jelinek <jakub@redhat.com>
27624 PR rtl-optimization/86620
27625 * params.def (max-sched-ready-insns): Bump minimum value to 1.
27627 PR rtl-optimization/83213
27628 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27629 to last if both are JUMP_INSNs.
27631 PR tree-optimization/83843
27632 * gimple-ssa-store-merging.c
27633 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27634 store_immediate_info for bswap/nop orig_stores.
27636 2018-01-15 Andrew Waterman <andrew@sifive.com>
27638 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27640 <UDIV>: Increase cost if !TARGET_DIV.
27642 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
27644 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27645 (define_attr "cr_logical_3op"): New.
27646 (cceq_ior_compare): Adjust.
27647 (cceq_ior_compare_complement): Adjust.
27648 (*cceq_rev_compare): Adjust.
27649 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27650 (is_cracked_insn): Adjust.
27651 (insn_must_be_first_in_group): Adjust.
27652 * config/rs6000/40x.md: Adjust.
27653 * config/rs6000/440.md: Adjust.
27654 * config/rs6000/476.md: Adjust.
27655 * config/rs6000/601.md: Adjust.
27656 * config/rs6000/603.md: Adjust.
27657 * config/rs6000/6xx.md: Adjust.
27658 * config/rs6000/7450.md: Adjust.
27659 * config/rs6000/7xx.md: Adjust.
27660 * config/rs6000/8540.md: Adjust.
27661 * config/rs6000/cell.md: Adjust.
27662 * config/rs6000/e300c2c3.md: Adjust.
27663 * config/rs6000/e500mc.md: Adjust.
27664 * config/rs6000/e500mc64.md: Adjust.
27665 * config/rs6000/e5500.md: Adjust.
27666 * config/rs6000/e6500.md: Adjust.
27667 * config/rs6000/mpc.md: Adjust.
27668 * config/rs6000/power4.md: Adjust.
27669 * config/rs6000/power5.md: Adjust.
27670 * config/rs6000/power6.md: Adjust.
27671 * config/rs6000/power7.md: Adjust.
27672 * config/rs6000/power8.md: Adjust.
27673 * config/rs6000/power9.md: Adjust.
27674 * config/rs6000/rs64.md: Adjust.
27675 * config/rs6000/titan.md: Adjust.
27677 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27679 * config/i386/predicates.md (indirect_branch_operand): Rewrite
27680 ix86_indirect_branch_register logic.
27682 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27684 * config/i386/constraints.md (Bs): Update
27685 ix86_indirect_branch_register check. Don't check
27686 ix86_indirect_branch_register with GOT_memory_operand.
27688 * config/i386/predicates.md (GOT_memory_operand): Don't check
27689 ix86_indirect_branch_register here.
27690 (GOT32_symbol_operand): Likewise.
27692 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27694 * config/i386/predicates.md (constant_call_address_operand):
27695 Rewrite ix86_indirect_branch_register logic.
27696 (sibcall_insn_operand): Likewise.
27698 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27700 * config/i386/constraints.md (Bs): Replace
27701 ix86_indirect_branch_thunk_register with
27702 ix86_indirect_branch_register.
27704 * config/i386/i386.md (indirect_jump): Likewise.
27705 (tablejump): Likewise.
27706 (*sibcall_memory): Likewise.
27707 (*sibcall_value_memory): Likewise.
27708 Peepholes of indirect call and jump via memory: Likewise.
27709 * config/i386/i386.opt: Likewise.
27710 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27711 (GOT_memory_operand): Likewise.
27712 (call_insn_operand): Likewise.
27713 (sibcall_insn_operand): Likewise.
27714 (GOT32_symbol_operand): Likewise.
27716 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27718 PR middle-end/83837
27719 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27720 type rather than type addr's type points to.
27721 (expand_omp_atomic_mutex): Likewise.
27722 (expand_omp_atomic): Likewise.
27724 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
27727 * config/i386/i386.c (output_indirect_thunk_function): Use
27728 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27729 for __x86_return_thunk.
27731 2018-01-15 Richard Biener <rguenther@suse.de>
27733 PR middle-end/83850
27734 * expmed.c (extract_bit_field_1): Fix typo.
27736 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
27739 * config/arm/iterators.md (VF): New mode iterator.
27740 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27741 Remove integer-related logic from pattern.
27742 (neon_vabd<mode>_3): Likewise.
27744 2018-01-15 Jakub Jelinek <jakub@redhat.com>
27746 PR middle-end/82694
27747 * common.opt (fstrict-overflow): No longer an alias.
27748 (fwrapv-pointer): New option.
27749 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27750 also for pointer types based on flag_wrapv_pointer.
27751 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27752 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27753 opts->x_flag_wrapv got set.
27754 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27755 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27756 POINTER_TYPE_OVERFLOW_UNDEFINED.
27757 * match.pd: Likewise in address comparison pattern.
27758 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27760 2018-01-15 Richard Biener <rguenther@suse.de>
27763 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27764 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
27765 Reset type names to their identifier if their TYPE_DECL doesn't
27766 have linkage (and thus is used for ODR and devirt).
27767 (save_debug_info_for_decl): Remove.
27768 (save_debug_info_for_type): Likewise.
27769 (add_tree_to_fld_list): Adjust.
27770 * tree-pretty-print.c (dump_generic_node): Make dumping of
27771 type names more robust.
27773 2018-01-15 Richard Biener <rguenther@suse.de>
27775 * BASE-VER: Bump to 8.0.1.
27777 2018-01-14 Martin Sebor <msebor@redhat.com>
27780 * builtins.c (check_access): Avoid warning when the no-warning bit
27783 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
27785 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27786 * ira-color (allocno_hard_regs_compare): Likewise.
27788 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
27791 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27792 Use .pushsection/.popsection.
27794 2018-01-14 Martin Sebor <msebor@redhat.com>
27797 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27799 2018-01-14 Jakub Jelinek <jakub@redhat.com>
27801 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27802 entry from extra_headers.
27803 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27804 extra_headers, make the list bitwise identical to the i?86-*-* one.
27806 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27808 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27809 -mcmodel=large with -mindirect-branch=thunk,
27810 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27811 -mfunction-return=thunk-extern.
27812 * doc/invoke.texi: Document -mcmodel=large is incompatible with
27813 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27814 -mfunction-return=thunk and -mfunction-return=thunk-extern.
27816 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27818 * config/i386/i386.c (print_reg): Print the name of the full
27819 integer register without '%'.
27820 (ix86_print_operand): Handle 'V'.
27821 * doc/extend.texi: Document 'V' modifier.
27823 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27825 * config/i386/constraints.md (Bs): Disallow memory operand for
27826 -mindirect-branch-register.
27828 * config/i386/predicates.md (indirect_branch_operand): Likewise.
27829 (GOT_memory_operand): Likewise.
27830 (call_insn_operand): Likewise.
27831 (sibcall_insn_operand): Likewise.
27832 (GOT32_symbol_operand): Likewise.
27833 * config/i386/i386.md (indirect_jump): Call convert_memory_address
27834 for -mindirect-branch-register.
27835 (tablejump): Likewise.
27836 (*sibcall_memory): Likewise.
27837 (*sibcall_value_memory): Likewise.
27838 Disallow peepholes of indirect call and jump via memory for
27839 -mindirect-branch-register.
27840 (*call_pop): Replace m with Bw.
27841 (*call_value_pop): Likewise.
27842 (*sibcall_pop_memory): Replace m with Bs.
27843 * config/i386/i386.opt (mindirect-branch-register): New option.
27844 * doc/invoke.texi: Document -mindirect-branch-register option.
27846 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27848 * config/i386/i386-protos.h (ix86_output_function_return): New.
27849 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27850 set function_return_type.
27851 (indirect_thunk_name): Add ret_p to indicate thunk for function
27853 (output_indirect_thunk_function): Pass false to
27854 indirect_thunk_name.
27855 (ix86_output_indirect_branch_via_reg): Likewise.
27856 (ix86_output_indirect_branch_via_push): Likewise.
27857 (output_indirect_thunk_function): Create alias for function
27858 return thunk if regno < 0.
27859 (ix86_output_function_return): New function.
27860 (ix86_handle_fndecl_attribute): Handle function_return.
27861 (ix86_attribute_table): Add function_return.
27862 * config/i386/i386.h (machine_function): Add
27863 function_return_type.
27864 * config/i386/i386.md (simple_return_internal): Use
27865 ix86_output_function_return.
27866 (simple_return_internal_long): Likewise.
27867 * config/i386/i386.opt (mfunction-return=): New option.
27868 (indirect_branch): Mention -mfunction-return=.
27869 * doc/extend.texi: Document function_return function attribute.
27870 * doc/invoke.texi: Document -mfunction-return= option.
27872 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
27874 * config/i386/i386-opts.h (indirect_branch): New.
27875 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27876 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27877 with local indirect jump when converting indirect call and jump.
27878 (ix86_set_indirect_branch_type): New.
27879 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27880 (indirectlabelno): New.
27881 (indirect_thunk_needed): Likewise.
27882 (indirect_thunk_bnd_needed): Likewise.
27883 (indirect_thunks_used): Likewise.
27884 (indirect_thunks_bnd_used): Likewise.
27885 (INDIRECT_LABEL): Likewise.
27886 (indirect_thunk_name): Likewise.
27887 (output_indirect_thunk): Likewise.
27888 (output_indirect_thunk_function): Likewise.
27889 (ix86_output_indirect_branch_via_reg): Likewise.
27890 (ix86_output_indirect_branch_via_push): Likewise.
27891 (ix86_output_indirect_branch): Likewise.
27892 (ix86_output_indirect_jmp): Likewise.
27893 (ix86_code_end): Call output_indirect_thunk_function if needed.
27894 (ix86_output_call_insn): Call ix86_output_indirect_branch if
27896 (ix86_handle_fndecl_attribute): Handle indirect_branch.
27897 (ix86_attribute_table): Add indirect_branch.
27898 * config/i386/i386.h (machine_function): Add indirect_branch_type
27899 and has_local_indirect_jump.
27900 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27902 (tablejump): Likewise.
27903 (*indirect_jump): Use ix86_output_indirect_jmp.
27904 (*tablejump_1): Likewise.
27905 (simple_return_indirect_internal): Likewise.
27906 * config/i386/i386.opt (mindirect-branch=): New option.
27907 (indirect_branch): New.
27910 (thunk-inline): Likewise.
27911 (thunk-extern): Likewise.
27912 * doc/extend.texi: Document indirect_branch function attribute.
27913 * doc/invoke.texi: Document -mindirect-branch= option.
27915 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
27918 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27920 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
27922 * ipa-inline.c (want_inline_small_function_p): Return false if
27923 inlining has already failed with CIF_FINAL_ERROR.
27924 (update_caller_keys): Call want_inline_small_function_p before
27926 (update_callee_keys): Likewise.
27928 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
27930 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27932 (rs6000_quadword_masked_address_p): Likewise.
27933 (quad_aligned_load_p): Likewise.
27934 (quad_aligned_store_p): Likewise.
27935 (const_load_sequence_p): Add comment to describe the outer-most loop.
27936 (mimic_memory_attributes_and_flags): New function.
27937 (rs6000_gen_stvx): Likewise.
27938 (replace_swapped_aligned_store): Likewise.
27939 (rs6000_gen_lvx): Likewise.
27940 (replace_swapped_aligned_load): Likewise.
27941 (replace_swapped_load_constant): Capitalize argument name in
27942 comment describing this function.
27943 (rs6000_analyze_swaps): Add a third pass to search for vector loads
27944 and stores that access quad-word aligned addresses and replace
27945 with stvx or lvx instructions when appropriate.
27946 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27947 New function prototype.
27948 (rs6000_quadword_masked_address_p): Likewise.
27949 (rs6000_gen_lvx): Likewise.
27950 (rs6000_gen_stvx): Likewise.
27951 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27952 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27953 when memory address is aligned.
27954 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27955 this split to select lvx instruction when memory address is aligned.
27956 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27957 instruction when memory address is aligned.
27958 (*vsx_le_perm_load_v16qi): Likewise.
27959 (four unnamed splitters): Modify to select the stvx instruction
27960 when memory is aligned.
27962 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
27964 * predict.c (determine_unlikely_bbs): Handle correctly BBs
27965 which appears in the queue multiple times.
27967 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
27968 Alan Hayward <alan.hayward@arm.com>
27969 David Sherwood <david.sherwood@arm.com>
27971 * tree-vectorizer.h (vec_lower_bound): New structure.
27972 (_loop_vec_info): Add check_nonzero and lower_bounds.
27973 (LOOP_VINFO_CHECK_NONZERO): New macro.
27974 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27975 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27976 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27977 fields. Make seg_len the distance travelled, not including the
27979 (dr_direction_indicator): Declare.
27980 (dr_zero_step_indicator): Likewise.
27981 (dr_known_forward_stride_p): Likewise.
27982 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27984 (runtime_alias_check_p): Allow runtime alias checks with
27986 (operator ==): Compare access_size and align.
27987 (prune_runtime_alias_test_list): Rework for new distinction between
27988 the access_size and seg_len.
27989 (create_intersect_range_checks_index): Likewise. Cope with polynomial
27991 (get_segment_min_max): New function.
27992 (create_intersect_range_checks): Use it.
27993 (dr_step_indicator): New function.
27994 (dr_direction_indicator): Likewise.
27995 (dr_zero_step_indicator): Likewise.
27996 (dr_known_forward_stride_p): Likewise.
27997 * tree-loop-distribution.c (data_ref_segment_size): Return
27998 DR_STEP * (niters - 1).
27999 (compute_alias_check_pairs): Update call to the dr_with_seg_len
28001 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
28002 (vect_preserves_scalar_order_p): New function, split out from...
28003 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
28004 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
28005 (vect_vfa_access_size): New function.
28006 (vect_vfa_align): Likewise.
28007 (vect_compile_time_alias): Take access_size_a and access_b arguments.
28008 (dump_lower_bound): New function.
28009 (vect_check_lower_bound): Likewise.
28010 (vect_small_gap_p): Likewise.
28011 (vectorizable_with_step_bound_p): Likewise.
28012 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
28013 depencies if the vectorization factor is 1. Convert the checks
28014 for nonzero steps into checks on the bounds of DR_STEP. Try using
28015 a bunds check for variable steps if the minimum required step is
28016 relatively small. Update calls to the dr_with_seg_len
28017 constructor and to vect_compile_time_alias.
28018 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
28020 (vect_loop_versioning): Call it.
28021 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
28023 (vect_estimate_min_profitable_iters): Account for any bounds checks.
28025 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28026 Alan Hayward <alan.hayward@arm.com>
28027 David Sherwood <david.sherwood@arm.com>
28029 * doc/sourcebuild.texi (vect_scatter_store): Document.
28030 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
28032 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
28034 * genopinit.c (main): Add supports_vec_scatter_store and
28035 supports_vec_scatter_store_cached to target_optabs.
28036 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
28037 IFN_MASK_SCATTER_STORE.
28038 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
28040 * internal-fn.h (internal_store_fn_p): Declare.
28041 (internal_fn_stored_value_index): Likewise.
28042 * internal-fn.c (scatter_store_direct): New macro.
28043 (expand_scatter_store_optab_fn): New function.
28044 (direct_scatter_store_optab_supported_p): New macro.
28045 (internal_store_fn_p): New function.
28046 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
28047 IFN_MASK_SCATTER_STORE.
28048 (internal_fn_mask_index): Likewise.
28049 (internal_fn_stored_value_index): New function.
28050 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
28051 for scatter stores.
28052 * optabs-query.h (supports_vec_scatter_store_p): Declare.
28053 * optabs-query.c (supports_vec_scatter_store_p): New function.
28054 * tree-vectorizer.h (vect_get_store_rhs): Declare.
28055 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
28056 true for scatter stores.
28057 (vect_gather_scatter_fn_p): Handle scatter stores too.
28058 (vect_check_gather_scatter): Consider using scatter stores if
28059 supports_vec_scatter_store_p.
28060 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
28061 scatter stores too.
28062 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28063 internal_fn_stored_value_index.
28064 (check_load_store_masking): Handle scatter stores too.
28065 (vect_get_store_rhs): Make public.
28066 (vectorizable_call): Use internal_store_fn_p.
28067 (vectorizable_store): Handle scatter store internal functions.
28068 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
28069 when deciding whether the end of the group has been reached.
28070 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
28071 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
28072 (mask_scatter_store<mode>): New insns.
28074 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28075 Alan Hayward <alan.hayward@arm.com>
28076 David Sherwood <david.sherwood@arm.com>
28078 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
28079 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
28080 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
28082 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
28083 Use vect_truncate_gather_scatter_offset if we can't treat the
28084 operation as a normal gather load or scatter store.
28085 (get_group_load_store_type): Take the gather_scatter_info
28086 as argument. Try using a gather load or scatter store for
28087 single-element groups.
28088 (get_load_store_type): Update calls to get_group_load_store_type
28089 and vect_use_strided_gather_scatters_p.
28091 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28092 Alan Hayward <alan.hayward@arm.com>
28093 David Sherwood <david.sherwood@arm.com>
28095 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
28096 optional tree argument.
28097 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
28099 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
28100 but continue to use the current value as a fallback.
28101 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
28102 to compare the updates.
28103 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
28104 (get_load_store_type): Use it when handling a strided access.
28105 (vect_get_strided_load_store_ops): New function.
28106 (vect_get_data_ptr_increment): Likewise.
28107 (vectorizable_load): Handle strided gather loads. Always pass
28108 a step to vect_create_data_ref_ptr and bump_vector_ptr.
28110 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28111 Alan Hayward <alan.hayward@arm.com>
28112 David Sherwood <david.sherwood@arm.com>
28114 * doc/md.texi (gather_load@var{m}): Document.
28115 (mask_gather_load@var{m}): Likewise.
28116 * genopinit.c (main): Add supports_vec_gather_load and
28117 supports_vec_gather_load_cached to target_optabs.
28118 * optabs-tree.c (init_tree_optimization_optabs): Use
28119 ggc_cleared_alloc to allocate target_optabs.
28120 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
28121 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
28123 * internal-fn.h (internal_load_fn_p): Declare.
28124 (internal_gather_scatter_fn_p): Likewise.
28125 (internal_fn_mask_index): Likewise.
28126 (internal_gather_scatter_fn_supported_p): Likewise.
28127 * internal-fn.c (gather_load_direct): New macro.
28128 (expand_gather_load_optab_fn): New function.
28129 (direct_gather_load_optab_supported_p): New macro.
28130 (direct_internal_fn_optab): New function.
28131 (internal_load_fn_p): Likewise.
28132 (internal_gather_scatter_fn_p): Likewise.
28133 (internal_fn_mask_index): Likewise.
28134 (internal_gather_scatter_fn_supported_p): Likewise.
28135 * optabs-query.c (supports_at_least_one_mode_p): New function.
28136 (supports_vec_gather_load_p): Likewise.
28137 * optabs-query.h (supports_vec_gather_load_p): Declare.
28138 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
28139 and memory_type field.
28140 (NUM_PATTERNS): Bump to 15.
28141 * tree-vect-data-refs.c: Include internal-fn.h.
28142 (vect_gather_scatter_fn_p): New function.
28143 (vect_describe_gather_scatter_call): Likewise.
28144 (vect_check_gather_scatter): Try using internal functions for
28145 gather loads. Recognize existing calls to a gather load function.
28146 (vect_analyze_data_refs): Consider using gather loads if
28147 supports_vec_gather_load_p.
28148 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
28149 (vect_get_gather_scatter_offset_type): Likewise.
28150 (vect_convert_mask_for_vectype): Likewise.
28151 (vect_add_conversion_to_patterm): Likewise.
28152 (vect_try_gather_scatter_pattern): Likewise.
28153 (vect_recog_gather_scatter_pattern): New pattern recognizer.
28154 (vect_vect_recog_func_ptrs): Add it.
28155 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
28156 internal_fn_mask_index and internal_gather_scatter_fn_p.
28157 (check_load_store_masking): Take the gather_scatter_info as an
28158 argument and handle gather loads.
28159 (vect_get_gather_scatter_ops): New function.
28160 (vectorizable_call): Check internal_load_fn_p.
28161 (vectorizable_load): Likewise. Handle gather load internal
28163 (vectorizable_store): Update call to check_load_store_masking.
28164 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
28165 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
28166 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
28167 (aarch64_gather_scale_operand_d): New predicates.
28168 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
28169 (mask_gather_load<mode>): New insns.
28171 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28172 Alan Hayward <alan.hayward@arm.com>
28173 David Sherwood <david.sherwood@arm.com>
28175 * optabs.def (fold_left_plus_optab): New optab.
28176 * doc/md.texi (fold_left_plus_@var{m}): Document.
28177 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
28178 * internal-fn.c (fold_left_direct): Define.
28179 (expand_fold_left_optab_fn): Likewise.
28180 (direct_fold_left_optab_supported_p): Likewise.
28181 * fold-const-call.c (fold_const_fold_left): New function.
28182 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
28183 * tree-parloops.c (valid_reduction_p): New function.
28184 (gather_scalar_reductions): Use it.
28185 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
28186 (vect_finish_replace_stmt): Declare.
28187 * tree-vect-loop.c (fold_left_reduction_fn): New function.
28188 (needs_fold_left_reduction_p): New function, split out from...
28189 (vect_is_simple_reduction): ...here. Accept reductions that
28190 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
28191 (vect_force_simple_reduction): Also store the reduction type in
28192 the assignment's STMT_VINFO_REDUC_TYPE.
28193 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
28194 (merge_with_identity): New function.
28195 (vect_expand_fold_left): Likewise.
28196 (vectorize_fold_left_reduction): Likewise.
28197 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
28198 scalar phi in place for it. Check for target support and reject
28199 cases that would reassociate the operation. Defer the transform
28200 phase to vectorize_fold_left_reduction.
28201 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
28202 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
28203 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
28205 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28207 * tree-if-conv.c (predicate_mem_writes): Remove redundant
28208 call to ifc_temp_var.
28210 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28211 Alan Hayward <alan.hayward@arm.com>
28212 David Sherwood <david.sherwood@arm.com>
28214 * target.def (legitimize_address_displacement): Take the original
28215 offset as a poly_int.
28216 * targhooks.h (default_legitimize_address_displacement): Update
28218 * targhooks.c (default_legitimize_address_displacement): Likewise.
28219 * doc/tm.texi: Regenerate.
28220 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
28221 as an argument, moving assert of ad->disp == ad->disp_term to...
28222 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
28223 Try calling targetm.legitimize_address_displacement before expanding
28224 the address rather than afterwards, and adjust for the new interface.
28225 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
28226 Match the new hook interface. Handle SVE addresses.
28227 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
28228 new hook interface.
28230 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28232 * Makefile.in (OBJS): Add early-remat.o.
28233 * target.def (select_early_remat_modes): New hook.
28234 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
28235 * doc/tm.texi: Regenerate.
28236 * targhooks.h (default_select_early_remat_modes): Declare.
28237 * targhooks.c (default_select_early_remat_modes): New function.
28238 * timevar.def (TV_EARLY_REMAT): New timevar.
28239 * passes.def (pass_early_remat): New pass.
28240 * tree-pass.h (make_pass_early_remat): Declare.
28241 * early-remat.c: New file.
28242 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
28244 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
28246 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28247 Alan Hayward <alan.hayward@arm.com>
28248 David Sherwood <david.sherwood@arm.com>
28250 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
28251 vfm1 with a bound_epilog parameter.
28252 (vect_do_peeling): Update calls accordingly, and move the prologue
28253 call earlier in the function. Treat the base bound_epilog as 0 for
28254 fully-masked loops and retain vf - 1 for other loops. Add 1 to
28255 this base when peeling for gaps.
28256 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
28257 with fully-masked loops.
28258 (vect_estimate_min_profitable_iters): Handle the single peeled
28259 iteration in that case.
28261 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28262 Alan Hayward <alan.hayward@arm.com>
28263 David Sherwood <david.sherwood@arm.com>
28265 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
28266 single-element interleaving even if the size is not a power of 2.
28267 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
28268 accesses for single-element interleaving if the group size is
28271 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28272 Alan Hayward <alan.hayward@arm.com>
28273 David Sherwood <david.sherwood@arm.com>
28275 * doc/md.texi (fold_extract_last_@var{m}): Document.
28276 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
28277 * optabs.def (fold_extract_last_optab): New optab.
28278 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
28279 * internal-fn.c (fold_extract_direct): New macro.
28280 (expand_fold_extract_optab_fn): Likewise.
28281 (direct_fold_extract_optab_supported_p): Likewise.
28282 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
28283 * tree-vect-loop.c (vect_model_reduction_cost): Handle
28284 EXTRACT_LAST_REDUCTION.
28285 (get_initial_def_for_reduction): Do not create an initial vector
28286 for EXTRACT_LAST_REDUCTION reductions.
28287 (vectorizable_reduction): Leave the scalar phi in place for
28288 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
28289 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
28290 epilogue code for EXTRACT_LAST_REDUCTION and defer the
28291 transform phase to vectorizable_condition.
28292 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
28294 (vect_finish_stmt_generation): ...here.
28295 (vect_finish_replace_stmt): New function.
28296 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
28297 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
28299 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
28301 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28302 Alan Hayward <alan.hayward@arm.com>
28303 David Sherwood <david.sherwood@arm.com>
28305 * doc/md.texi (extract_last_@var{m}): Document.
28306 * optabs.def (extract_last_optab): New optab.
28307 * internal-fn.def (EXTRACT_LAST): New internal function.
28308 * internal-fn.c (cond_unary_direct): New macro.
28309 (expand_cond_unary_optab_fn): Likewise.
28310 (direct_cond_unary_optab_supported_p): Likewise.
28311 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
28312 loops using EXTRACT_LAST.
28313 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
28314 (extract_last_<mode>): ...this optab.
28315 (vec_extract<mode><Vel>): Update accordingly.
28317 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28318 Alan Hayward <alan.hayward@arm.com>
28319 David Sherwood <david.sherwood@arm.com>
28321 * target.def (empty_mask_is_expensive): New hook.
28322 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
28323 * doc/tm.texi: Regenerate.
28324 * targhooks.h (default_empty_mask_is_expensive): Declare.
28325 * targhooks.c (default_empty_mask_is_expensive): New function.
28326 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
28327 if the target says that empty masks are expensive.
28328 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
28330 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
28332 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28333 Alan Hayward <alan.hayward@arm.com>
28334 David Sherwood <david.sherwood@arm.com>
28336 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
28337 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
28338 (vect_use_loop_mask_for_alignment_p): New function.
28339 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
28340 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
28341 niters_skip argument. Make sure that the first niters_skip elements
28342 of the first iteration are inactive.
28343 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
28344 Update call to vect_set_loop_masks_directly.
28345 (get_misalign_in_elems): New function, split out from...
28346 (vect_gen_prolog_loop_niters): ...here.
28347 (vect_update_init_of_dr): Take a code argument that specifies whether
28348 the adjustment should be added or subtracted.
28349 (vect_update_init_of_drs): Likewise.
28350 (vect_prepare_for_masked_peels): New function.
28351 (vect_do_peeling): Skip prologue peeling if we're using a mask
28352 instead. Update call to vect_update_inits_of_drs.
28353 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28355 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
28356 alignment. Do not include the number of peeled iterations in
28357 the minimum threshold in that case.
28358 (vectorizable_induction): Adjust the start value down by
28359 LOOP_VINFO_MASK_SKIP_NITERS iterations.
28360 (vect_transform_loop): Call vect_prepare_for_masked_peels.
28361 Take the number of skipped iterations into account when calculating
28363 * tree-vect-stmts.c (vect_gen_while_not): New function.
28365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28366 Alan Hayward <alan.hayward@arm.com>
28367 David Sherwood <david.sherwood@arm.com>
28369 * doc/sourcebuild.texi (vect_fully_masked): Document.
28370 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
28371 default value to 0.
28372 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
28374 (vect_analyze_loop_2): ...here. Don't check the vectorization
28375 factor against the number of loop iterations if the loop is
28378 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28379 Alan Hayward <alan.hayward@arm.com>
28380 David Sherwood <david.sherwood@arm.com>
28382 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
28383 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
28384 (dump_groups): Update accordingly.
28385 (iv_use::mem_type): New member variable.
28386 (address_p): New function.
28387 (record_use): Add a mem_type argument and initialize the new
28389 (record_group_use): Add a mem_type argument. Use address_p.
28390 Remove obsolete null checks of base_object. Update call to record_use.
28391 (find_interesting_uses_op): Update call to record_group_use.
28392 (find_interesting_uses_cond): Likewise.
28393 (find_interesting_uses_address): Likewise.
28394 (get_mem_type_for_internal_fn): New function.
28395 (find_address_like_use): Likewise.
28396 (find_interesting_uses_stmt): Try find_address_like_use before
28397 calling find_interesting_uses_op.
28398 (addr_offset_valid_p): Use the iv mem_type field as the type
28399 of the addressed memory.
28400 (add_autoinc_candidates): Likewise.
28401 (get_address_cost): Likewise.
28402 (split_small_address_groups_p): Use address_p.
28403 (split_address_groups): Likewise.
28404 (add_iv_candidate_for_use): Likewise.
28405 (autoinc_possible_for_pair): Likewise.
28406 (rewrite_groups): Likewise.
28407 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
28408 (determine_group_iv_cost): Update after split of USE_ADDRESS.
28409 (get_alias_ptr_type_for_ptr_address): New function.
28410 (rewrite_use_address): Rewrite address uses in calls that were
28411 identified by find_address_like_use.
28413 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28414 Alan Hayward <alan.hayward@arm.com>
28415 David Sherwood <david.sherwood@arm.com>
28417 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
28419 * gimple-expr.h (is_gimple_addressable: Likewise.
28420 * gimple-expr.c (is_gimple_address): Likewise.
28421 * internal-fn.c (expand_call_mem_ref): New function.
28422 (expand_mask_load_optab_fn): Use it.
28423 (expand_mask_store_optab_fn): Likewise.
28425 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28426 Alan Hayward <alan.hayward@arm.com>
28427 David Sherwood <david.sherwood@arm.com>
28429 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
28430 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
28431 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
28432 (cond_umax@var{mode}): Document.
28433 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
28434 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
28435 (cond_umin_optab, cond_umax_optab): New optabs.
28436 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
28437 (COND_IOR, COND_XOR): New internal functions.
28438 * internal-fn.h (get_conditional_internal_fn): Declare.
28439 * internal-fn.c (cond_binary_direct): New macro.
28440 (expand_cond_binary_optab_fn): Likewise.
28441 (direct_cond_binary_optab_supported_p): Likewise.
28442 (get_conditional_internal_fn): New function.
28443 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
28444 Cope with reduction statements that are vectorized as calls rather
28446 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
28447 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
28448 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
28449 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
28450 (UNSPEC_COND_EOR): New unspecs.
28451 (optab): Add mappings for them.
28452 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
28453 (sve_int_op, sve_fp_op): New int attributes.
28455 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28456 Alan Hayward <alan.hayward@arm.com>
28457 David Sherwood <david.sherwood@arm.com>
28459 * optabs.def (while_ult_optab): New optab.
28460 * doc/md.texi (while_ult@var{m}@var{n}): Document.
28461 * internal-fn.def (WHILE_ULT): New internal function.
28462 * internal-fn.h (direct_internal_fn_supported_p): New override
28463 that takes two types as argument.
28464 * internal-fn.c (while_direct): New macro.
28465 (expand_while_optab_fn): New function.
28466 (convert_optab_supported_p): Likewise.
28467 (direct_while_optab_supported_p): New macro.
28468 * wide-int.h (wi::udiv_ceil): New function.
28469 * tree-vectorizer.h (rgroup_masks): New structure.
28470 (vec_loop_masks): New typedef.
28471 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
28472 and fully_masked_p.
28473 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
28474 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
28475 (vect_max_vf): New function.
28476 (slpeel_make_loop_iterate_ntimes): Delete.
28477 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
28478 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
28479 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
28480 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
28481 internal-fn.h, stor-layout.h and optabs-query.h.
28482 (vect_set_loop_mask): New function.
28483 (add_preheader_seq): Likewise.
28484 (add_header_seq): Likewise.
28485 (interleave_supported_p): Likewise.
28486 (vect_maybe_permute_loop_masks): Likewise.
28487 (vect_set_loop_masks_directly): Likewise.
28488 (vect_set_loop_condition_masked): Likewise.
28489 (vect_set_loop_condition_unmasked): New function, split out from
28490 slpeel_make_loop_iterate_ntimes.
28491 (slpeel_make_loop_iterate_ntimes): Rename to..
28492 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
28493 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
28494 (vect_do_peeling): Update call accordingly.
28495 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
28497 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
28498 mask_compare_type, can_fully_mask_p and fully_masked_p.
28499 (release_vec_loop_masks): New function.
28500 (_loop_vec_info): Use it to free the loop masks.
28501 (can_produce_all_loop_masks_p): New function.
28502 (vect_get_max_nscalars_per_iter): Likewise.
28503 (vect_verify_full_masking): Likewise.
28504 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
28505 retries, and free the mask rgroups before retrying. Check loop-wide
28506 reasons for disallowing fully-masked loops. Make the final decision
28507 about whether use a fully-masked loop or not.
28508 (vect_estimate_min_profitable_iters): Do not assume that peeling
28509 for the number of iterations will be needed for fully-masked loops.
28510 (vectorizable_reduction): Disable fully-masked loops.
28511 (vectorizable_live_operation): Likewise.
28512 (vect_halve_mask_nunits): New function.
28513 (vect_double_mask_nunits): Likewise.
28514 (vect_record_loop_mask): Likewise.
28515 (vect_get_loop_mask): Likewise.
28516 (vect_transform_loop): Handle the case in which the final loop
28517 iteration might handle a partial vector. Call vect_set_loop_condition
28518 instead of slpeel_make_loop_iterate_ntimes.
28519 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
28520 (check_load_store_masking): New function.
28521 (prepare_load_store_mask): Likewise.
28522 (vectorizable_store): Handle fully-masked loops.
28523 (vectorizable_load): Likewise.
28524 (supportable_widening_operation): Use vect_halve_mask_nunits for
28526 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
28527 (vect_gen_while): New function.
28528 * config/aarch64/aarch64.md (umax<mode>3): New expander.
28529 (aarch64_uqdec<mode>): New insn.
28531 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28532 Alan Hayward <alan.hayward@arm.com>
28533 David Sherwood <david.sherwood@arm.com>
28535 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
28536 (reduc_xor_scal_optab): New optabs.
28537 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
28538 (reduc_xor_scal_@var{m}): Document.
28539 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
28540 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
28541 internal functions.
28542 * fold-const-call.c (fold_const_call): Handle them.
28543 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
28544 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
28545 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
28546 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
28547 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
28548 (UNSPEC_XORV): New unspecs.
28549 (optab): Add entries for them.
28550 (BITWISEV): New int iterator.
28551 (bit_reduc_op): New int attributes.
28553 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28554 Alan Hayward <alan.hayward@arm.com>
28555 David Sherwood <david.sherwood@arm.com>
28557 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
28558 * internal-fn.def (VEC_SHL_INSERT): New internal function.
28559 * optabs.def (vec_shl_insert_optab): New optab.
28560 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
28561 (duplicate_and_interleave): Likewise.
28562 * tree-vect-loop.c: Include internal-fn.h.
28563 (neutral_op_for_slp_reduction): New function, split out from
28564 get_initial_defs_for_reduction.
28565 (get_initial_def_for_reduction): Handle option 2 for variable-length
28566 vectors by loading the neutral value into a vector and then shifting
28567 the initial value into element 0.
28568 (get_initial_defs_for_reduction): Replace the code argument with
28569 the neutral value calculated by neutral_op_for_slp_reduction.
28570 Use gimple_build_vector for constant-length vectors.
28571 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
28572 but the first group_size elements have a neutral value.
28573 Use duplicate_and_interleave otherwise.
28574 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
28575 Update call to get_initial_defs_for_reduction. Handle SLP
28576 reductions for variable-length vectors by creating one vector
28577 result for each scalar result, with the elements associated
28578 with other scalar results stubbed out with the neutral value.
28579 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
28580 Require IFN_VEC_SHL_INSERT for double reductions on
28581 variable-length vectors, or SLP reductions that have
28582 a neutral value. Require can_duplicate_and_interleave_p
28583 support for variable-length unchained SLP reductions if there
28584 is no neutral value, such as for MIN/MAX reductions. Also require
28585 the number of vector elements to be a multiple of the number of
28586 SLP statements when doing variable-length unchained SLP reductions.
28587 Update call to vect_create_epilog_for_reduction.
28588 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
28589 and remove initial values.
28590 (duplicate_and_interleave): Make public.
28591 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
28592 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
28594 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28595 Alan Hayward <alan.hayward@arm.com>
28596 David Sherwood <david.sherwood@arm.com>
28598 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28599 (can_duplicate_and_interleave_p): New function.
28600 (vect_get_and_check_slp_defs): Take the vector of statements
28601 rather than just the current one. Remove excess parentheses.
28602 Restriction rejectinon of vect_constant_def and vect_external_def
28603 for variable-length vectors to boolean types, or types for which
28604 can_duplicate_and_interleave_p is false.
28605 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28606 (duplicate_and_interleave): New function.
28607 (vect_get_constant_vectors): Use gimple_build_vector for
28608 constant-length vectors and suitable variable-length constant
28609 vectors. Use duplicate_and_interleave for other variable-length
28610 vectors. Don't defer the update when inserting new statements.
28612 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28613 Alan Hayward <alan.hayward@arm.com>
28614 David Sherwood <david.sherwood@arm.com>
28616 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28617 min_profitable_iters doesn't go negative.
28619 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28620 Alan Hayward <alan.hayward@arm.com>
28621 David Sherwood <david.sherwood@arm.com>
28623 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28624 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28625 * optabs.def (vec_mask_load_lanes_optab): New optab.
28626 (vec_mask_store_lanes_optab): Likewise.
28627 * internal-fn.def (MASK_LOAD_LANES): New internal function.
28628 (MASK_STORE_LANES): Likewise.
28629 * internal-fn.c (mask_load_lanes_direct): New macro.
28630 (mask_store_lanes_direct): Likewise.
28631 (expand_mask_load_optab_fn): Handle masked operations.
28632 (expand_mask_load_lanes_optab_fn): New macro.
28633 (expand_mask_store_optab_fn): Handle masked operations.
28634 (expand_mask_store_lanes_optab_fn): New macro.
28635 (direct_mask_load_lanes_optab_supported_p): Likewise.
28636 (direct_mask_store_lanes_optab_supported_p): Likewise.
28637 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28639 (vect_load_lanes_supported): Likewise.
28640 * tree-vect-data-refs.c (strip_conversion): New function.
28641 (can_group_stmts_p): Likewise.
28642 (vect_analyze_data_ref_accesses): Use it instead of checking
28643 for a pair of assignments.
28644 (vect_store_lanes_supported): Take a masked_p parameter.
28645 (vect_load_lanes_supported): Likewise.
28646 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28647 vect_store_lanes_supported and vect_load_lanes_supported.
28648 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28649 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28650 parameter. Don't allow gaps for masked accesses.
28651 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
28652 and vect_load_lanes_supported.
28653 (get_load_store_type): Take a masked_p parameter and update
28654 call to get_group_load_store_type.
28655 (vectorizable_store): Update call to get_load_store_type.
28656 Handle IFN_MASK_STORE_LANES.
28657 (vectorizable_load): Update call to get_load_store_type.
28658 Handle IFN_MASK_LOAD_LANES.
28660 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28661 Alan Hayward <alan.hayward@arm.com>
28662 David Sherwood <david.sherwood@arm.com>
28664 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28666 * config/aarch64/aarch64-protos.h
28667 (aarch64_sve_struct_memory_operand_p): Declare.
28668 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28669 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28670 (VPRED, vpred): Handle SVE structure modes.
28671 * config/aarch64/constraints.md (Utx): New constraint.
28672 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28673 (aarch64_sve_struct_nonimmediate_operand): New predicates.
28674 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28675 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28676 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28677 structure modes. Split into pieces after RA.
28678 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28679 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28681 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28682 SVE structure modes.
28683 (aarch64_classify_address): Likewise.
28684 (sizetochar): Move earlier in file.
28685 (aarch64_print_operand): Handle SVE register lists.
28686 (aarch64_array_mode): New function.
28687 (aarch64_sve_struct_memory_operand_p): Likewise.
28688 (TARGET_ARRAY_MODE): Redefine.
28690 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28691 Alan Hayward <alan.hayward@arm.com>
28692 David Sherwood <david.sherwood@arm.com>
28694 * target.def (array_mode): New target hook.
28695 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28696 * doc/tm.texi: Regenerate.
28697 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28698 * hooks.c (hook_optmode_mode_uhwi_none): New function.
28699 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28700 targetm.array_mode.
28701 * stor-layout.c (mode_for_array): Likewise. Support polynomial
28704 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28705 Alan Hayward <alan.hayward@arm.com>
28706 David Sherwood <david.sherwood@arm.com>
28708 * fold-const.c (fold_binary_loc): Check the argument types
28709 rather than the result type when testing for a vector operation.
28711 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28713 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28714 * doc/tm.texi: Regenerate.
28716 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
28717 Alan Hayward <alan.hayward@arm.com>
28718 David Sherwood <david.sherwood@arm.com>
28720 * doc/invoke.texi (-msve-vector-bits=): Document new option.
28721 (sve): Document new AArch64 extension.
28722 * doc/md.texi (w): Extend the description of the AArch64
28723 constraint to include SVE vectors.
28724 (Upl, Upa): Document new AArch64 predicate constraints.
28725 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28727 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28728 (msve-vector-bits=): New option.
28729 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28730 SVE when these are disabled.
28731 (sve): New extension.
28732 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28733 modes. Adjust their number of units based on aarch64_sve_vg.
28734 (MAX_BITSIZE_MODE_ANY_MODE): Define.
28735 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28736 aarch64_addr_query_type.
28737 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28738 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28739 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28740 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28741 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28742 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28743 (aarch64_simd_imm_zero_p): Delete.
28744 (aarch64_check_zero_based_sve_index_immediate): Declare.
28745 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28746 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28747 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28748 (aarch64_sve_float_mul_immediate_p): Likewise.
28749 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28750 rather than an rtx.
28751 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28752 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28753 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28754 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28755 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28756 (aarch64_regmode_natural_size): Likewise.
28757 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28758 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28760 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28761 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28762 for VG and the SVE predicate registers.
28763 (V_ALIASES): Add a "z"-prefixed alias.
28764 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28765 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28766 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28767 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28768 (REG_CLASS_NAMES): Add entries for them.
28769 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
28770 and the predicate registers.
28771 (aarch64_sve_vg): Declare.
28772 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28773 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28774 (REGMODE_NATURAL_SIZE): Define.
28775 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28777 * config/aarch64/aarch64.c: Include cfgrtl.h.
28778 (simd_immediate_info): Add a constructor for series vectors,
28779 and an associated step field.
28780 (aarch64_sve_vg): New variable.
28781 (aarch64_dbx_register_number): Handle VG and the predicate registers.
28782 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28783 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28784 (VEC_ANY_DATA, VEC_STRUCT): New constants.
28785 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28786 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28787 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28788 (aarch64_get_mask_mode): New functions.
28789 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28790 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28791 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
28792 predicate modes and predicate registers. Explicitly restrict
28793 GPRs to modes of 16 bytes or smaller. Only allow FP registers
28794 to store a vector mode if it is recognized by
28795 aarch64_classify_vector_mode.
28796 (aarch64_regmode_natural_size): New function.
28797 (aarch64_hard_regno_caller_save_mode): Return the original mode
28799 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28800 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28801 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28802 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28804 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
28805 does not overlap dest if the function is frame-related. Handle
28807 (aarch64_split_add_offset): New function.
28808 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28809 them aarch64_add_offset.
28810 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28811 and update call to aarch64_sub_sp.
28812 (aarch64_add_cfa_expression): New function.
28813 (aarch64_expand_prologue): Pass extra temporary registers to the
28814 functions above. Handle the case in which we need to emit new
28815 DW_CFA_expressions for registers that were originally saved
28816 relative to the stack pointer, but now have to be expressed
28817 relative to the frame pointer.
28818 (aarch64_output_mi_thunk): Pass extra temporary registers to the
28820 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
28821 IP0 and IP1 values for SVE frames.
28822 (aarch64_expand_vec_series): New function.
28823 (aarch64_expand_sve_widened_duplicate): Likewise.
28824 (aarch64_expand_sve_const_vector): Likewise.
28825 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28826 Handle SVE constants. Use emit_move_insn to move a force_const_mem
28827 into the register, rather than emitting a SET directly.
28828 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28829 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28830 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28831 (offset_9bit_signed_scaled_p): New functions.
28832 (aarch64_replicate_bitmask_imm): New function.
28833 (aarch64_bitmask_imm): Use it.
28834 (aarch64_cannot_force_const_mem): Reject expressions involving
28835 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
28836 (aarch64_classify_index): Handle SVE indices, by requiring
28837 a plain register index with a scale that matches the element size.
28838 (aarch64_classify_address): Handle SVE addresses. Assert that
28839 the mode of the address is VOIDmode or an integer mode.
28840 Update call to aarch64_classify_symbol.
28841 (aarch64_classify_symbolic_expression): Update call to
28842 aarch64_classify_symbol.
28843 (aarch64_const_vec_all_in_range_p): New function.
28844 (aarch64_print_vector_float_operand): Likewise.
28845 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
28846 "vN" for FP registers with SVE modes. Handle (const ...) vectors
28847 and the FP immediates 1.0 and 0.5.
28848 (aarch64_print_address_internal): Handle SVE addresses.
28849 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28850 (aarch64_regno_regclass): Handle predicate registers.
28851 (aarch64_secondary_reload): Handle big-endian reloads of SVE
28853 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28854 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28855 (aarch64_convert_sve_vector_bits): New function.
28856 (aarch64_override_options): Use it to handle -msve-vector-bits=.
28857 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28858 rather than an rtx.
28859 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28860 Handle SVE vector and predicate modes. Accept VL-based constants
28861 that need only one temporary register, and VL offsets that require
28862 no temporary registers.
28863 (aarch64_conditional_register_usage): Mark the predicate registers
28864 as fixed if SVE isn't available.
28865 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28866 Return true for SVE vector and predicate modes.
28867 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28868 rather than an unsigned int. Handle SVE modes.
28869 (aarch64_preferred_simd_mode): Update call accordingly. Handle
28871 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28873 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28874 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28875 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28876 (aarch64_sve_float_mul_immediate_p): New functions.
28877 (aarch64_sve_valid_immediate): New function.
28878 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28879 Explicitly reject structure modes. Check for INDEX constants.
28880 Handle PTRUE and PFALSE constants.
28881 (aarch64_check_zero_based_sve_index_immediate): New function.
28882 (aarch64_simd_imm_zero_p): Delete.
28883 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28884 vector modes. Accept constants in the range of CNT[BHWD].
28885 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28886 ask for an Advanced SIMD mode.
28887 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28888 (aarch64_simd_vector_alignment): Handle SVE predicates.
28889 (aarch64_vectorize_preferred_vector_alignment): New function.
28890 (aarch64_simd_vector_alignment_reachable): Use it instead of
28892 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28893 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28895 (MAX_VECT_LEN): Delete.
28896 (expand_vec_perm_d): Add a vec_flags field.
28897 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28898 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28899 (aarch64_evpc_ext): Don't apply a big-endian lane correction
28901 (aarch64_evpc_rev): Rename to...
28902 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
28903 (aarch64_evpc_rev_global): New function.
28904 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28905 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28907 (aarch64_evpc_sve_tbl): New function.
28908 (aarch64_expand_vec_perm_const_1): Update after rename of
28909 aarch64_evpc_rev. Handle SVE permutes too, trying
28910 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28911 than aarch64_evpc_tbl.
28912 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28913 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28914 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28915 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28916 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28917 (aarch64_expand_sve_vcond): New functions.
28918 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28919 of aarch64_vector_mode_p.
28920 (aarch64_dwarf_poly_indeterminate_value): New function.
28921 (aarch64_compute_pressure_classes): Likewise.
28922 (aarch64_can_change_mode_class): Likewise.
28923 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28924 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28925 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28926 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28927 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28928 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28929 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28930 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28932 (Dn, Dl, Dr): Accept const as well as const_vector.
28933 (Dz): Likewise. Compare against CONST0_RTX.
28934 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28935 of "vector" where appropriate.
28936 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28937 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28938 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28939 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28940 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28941 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28942 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28943 (v_int_equiv): Extend to SVE modes.
28944 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28946 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28947 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28948 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28949 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28950 (SVE_COND_FP_CMP): New int iterators.
28951 (perm_hilo): Handle the new unpack unspecs.
28952 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28954 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28955 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28956 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28957 (aarch64_equality_operator, aarch64_constant_vector_operand)
28958 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28959 (aarch64_sve_nonimmediate_operand): Likewise.
28960 (aarch64_sve_general_operand): Likewise.
28961 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28962 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28963 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28964 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28965 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28966 (aarch64_sve_float_arith_immediate): Likewise.
28967 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28968 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28969 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28970 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28971 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28972 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28973 (aarch64_sve_float_arith_operand): Likewise.
28974 (aarch64_sve_float_arith_with_sub_operand): Likewise.
28975 (aarch64_sve_float_mul_operand): Likewise.
28976 (aarch64_sve_vec_perm_operand): Likewise.
28977 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28978 (aarch64_mov_operand): Accept const_poly_int and const_vector.
28979 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28980 as well as const_vector.
28981 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28982 in file. Use CONST0_RTX and CONSTM1_RTX.
28983 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
28984 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28985 Use aarch64_simd_imm_zero.
28986 * config/aarch64/aarch64-sve.md: New file.
28987 * config/aarch64/aarch64.md: Include it.
28988 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28989 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28990 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28991 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28992 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28993 (sve): New attribute.
28994 (enabled): Disable instructions with the sve attribute unless
28996 (movqi, movhi): Pass CONST_POLY_INT operaneds through
28997 aarch64_expand_mov_immediate.
28998 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28999 CNT[BHSD] immediates.
29000 (movti): Split CONST_POLY_INT moves into two halves.
29001 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
29002 Split additions that need a temporary here if the destination
29003 is the stack pointer.
29004 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
29005 (*add<mode>3_poly_1): New instruction.
29006 (set_clobber_cc): New expander.
29008 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29010 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
29011 parameter and use it instead of GET_MODE_SIZE (innermode). Use
29012 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
29013 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
29014 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
29015 Change innermode from fixed_mode_size to machine_mode.
29016 (simplify_subreg): Update call accordingly. Handle a constant-sized
29017 subreg of a variable-length CONST_VECTOR.
29019 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29020 Alan Hayward <alan.hayward@arm.com>
29021 David Sherwood <david.sherwood@arm.com>
29023 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
29024 (add_offset_to_base): New function, split out from...
29025 (create_mem_ref): ...here. When handling a scale other than 1,
29026 check first whether the address is valid without the offset.
29027 Add it into the base if so, leaving the index and scale as-is.
29029 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29032 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
29033 fold_for_warn before checking if arg2 is INTEGER_CST.
29035 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
29037 * config/rs6000/predicates.md (load_multiple_operation): Delete.
29038 (store_multiple_operation): Delete.
29039 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
29040 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
29041 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
29042 guarded by TARGET_STRING.
29043 (rs6000_output_load_multiple): Delete.
29044 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29045 OPTION_MASK_STRING / TARGET_STRING handling.
29046 (print_operand) <'N', 'O'>: Add comment that these are unused now.
29047 (const rs6000_opt_masks) <"string">: Change mask to 0.
29048 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
29049 (MASK_STRING): Delete.
29050 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
29052 (load_multiple): Delete.
29059 (store_multiple): Delete.
29066 (movmemsi_8reg): Delete.
29067 (corresponding unnamed define_insn): Delete.
29068 (movmemsi_6reg): Delete.
29069 (corresponding unnamed define_insn): Delete.
29070 (movmemsi_4reg): Delete.
29071 (corresponding unnamed define_insn): Delete.
29072 (movmemsi_2reg): Delete.
29073 (corresponding unnamed define_insn): Delete.
29074 (movmemsi_1reg): Delete.
29075 (corresponding unnamed define_insn): Delete.
29076 * config/rs6000/rs6000.opt (mno-string): New.
29077 (mstring): Replace by deprecation warning stub.
29078 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
29080 2018-01-12 Jakub Jelinek <jakub@redhat.com>
29082 * regrename.c (regrename_do_replace): If replacing the same
29083 reg multiple times, try to reuse last created gen_raw_REG.
29086 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
29087 main to workaround a bug in GDB.
29089 2018-01-12 Tom de Vries <tom@codesourcery.com>
29092 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
29094 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
29096 PR rtl-optimization/80481
29097 * ira-color.c (get_cap_member): New function.
29098 (allocnos_conflict_by_live_ranges_p): Use it.
29099 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
29100 (setup_slot_coalesced_allocno_live_ranges): Ditto.
29102 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
29105 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
29106 (*saddl_se_1): Ditto.
29107 (*ssubsi_1): Ditto.
29108 (*ssubl_se_1): Ditto.
29110 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29112 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
29113 rather than wi::to_widest for DR_INITs.
29114 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
29115 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
29116 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
29118 (vect_analyze_group_access_1): Note that here.
29120 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29122 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
29123 polynomial type sizes.
29125 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
29127 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
29128 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
29129 (gimple_add_tmp_var): Likewise.
29131 2018-01-12 Martin Liska <mliska@suse.cz>
29133 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
29134 (gimple_alloc_sizes): Likewise.
29135 (dump_gimple_statistics): Use PRIu64 in printf format.
29136 * gimple.h: Change uint64_t to int.
29138 2018-01-12 Martin Liska <mliska@suse.cz>
29140 * tree-core.h: Use uint64_t instead of int.
29141 * tree.c (tree_node_counts): Likewise.
29142 (tree_node_sizes): Likewise.
29143 (dump_tree_statistics): Use PRIu64 in printf format.
29145 2018-01-12 Martin Liska <mliska@suse.cz>
29147 * Makefile.in: As qsort_chk is implemented in vec.c, add
29148 vec.o to linkage of gencfn-macros.
29149 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
29150 passing the info to record_node_allocation_statistics.
29151 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
29153 * ggc-common.c (struct ggc_usage): Add operator== and use
29154 it in operator< and compare function.
29155 * mem-stats.h (struct mem_usage): Likewise.
29156 * vec.c (struct vec_usage): Remove operator< and compare
29157 function. Can be simply inherited.
29159 2018-01-12 Martin Jambor <mjambor@suse.cz>
29162 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
29163 * tree-ssa-math-opts.c: Include domwalk.h.
29164 (convert_mult_to_fma_1): New function.
29165 (fma_transformation_info): New type.
29166 (fma_deferring_state): Likewise.
29167 (cancel_fma_deferring): New function.
29168 (result_of_phi): Likewise.
29169 (last_fma_candidate_feeds_initial_phi): Likewise.
29170 (convert_mult_to_fma): Added deferring logic, split actual
29171 transformation to convert_mult_to_fma_1.
29172 (math_opts_dom_walker): New type.
29173 (math_opts_dom_walker::after_dom_children): New method, body moved
29174 here from pass_optimize_widening_mul::execute, added deferring logic
29176 (pass_optimize_widening_mul::execute): Moved most of code to
29177 math_opts_dom_walker::after_dom_children.
29178 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
29179 * config/i386/i386.c (ix86_option_override_internal): Added
29180 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
29182 2018-01-12 Richard Biener <rguenther@suse.de>
29185 * dwarf2out.c (gen_variable_die): Do not reset old_die for
29186 inline instance vars.
29188 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
29191 * config/rx/rx.c (rx_is_restricted_memory_address):
29192 Handle SUBREG case.
29194 2018-01-12 Richard Biener <rguenther@suse.de>
29196 PR tree-optimization/80846
29197 * target.def (split_reduction): New target hook.
29198 * targhooks.c (default_split_reduction): New function.
29199 * targhooks.h (default_split_reduction): Declare.
29200 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
29201 target requests first reduce vectors by combining low and high
29203 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
29204 (get_vectype_for_scalar_type_and_size): Export.
29205 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
29206 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
29207 * doc/tm.texi: Regenerate.
29208 * config/i386/i386.c (ix86_split_reduction): Implement
29209 TARGET_VECTORIZE_SPLIT_REDUCTION.
29211 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29214 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
29215 in PIC mode except for TARGET_VXWORKS_RTP.
29216 * config/sparc/sparc.c: Include cfgrtl.h.
29217 (TARGET_INIT_PIC_REG): Define.
29218 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
29219 (sparc_pic_register_p): New predicate.
29220 (sparc_legitimate_address_p): Use it.
29221 (sparc_legitimize_pic_address): Likewise.
29222 (sparc_delegitimize_address): Likewise.
29223 (sparc_mode_dependent_address_p): Likewise.
29224 (gen_load_pcrel_sym): Remove 4th parameter.
29225 (load_got_register): Adjust call to above. Remove obsolete stuff.
29226 (sparc_expand_prologue): Do not call load_got_register here.
29227 (sparc_flat_expand_prologue): Likewise.
29228 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
29229 (sparc_use_pseudo_pic_reg): New function.
29230 (sparc_init_pic_reg): Likewise.
29231 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
29232 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
29234 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
29236 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
29237 Add item for branch_cost.
29239 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
29241 PR rtl-optimization/83565
29242 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
29243 not extend the result to a larger mode for rotate operations.
29244 (num_sign_bit_copies1): Likewise.
29246 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
29249 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
29251 Use values-Xc.o for -pedantic.
29252 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
29254 2018-01-12 Martin Liska <mliska@suse.cz>
29257 * ipa-devirt.c (final_warning_record::grow_type_warnings):
29259 (possible_polymorphic_call_targets): Use it.
29260 (ipa_devirt): Likewise.
29262 2018-01-12 Martin Liska <mliska@suse.cz>
29264 * profile-count.h (enum profile_quality): Use 0 as invalid
29265 enum value of profile_quality.
29267 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
29269 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
29270 -mext-string options.
29272 2018-01-12 Richard Biener <rguenther@suse.de>
29274 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
29275 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
29276 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
29278 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
29280 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
29282 * configure.ac (--with-long-double-format): Add support for the
29283 configuration option to change the default long double format on
29285 * config.gcc (powerpc*-linux*-*): Likewise.
29286 * configure: Regenerate.
29287 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
29288 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
29289 used without modification.
29291 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29293 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
29294 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
29295 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
29296 MISC_BUILTIN_SPEC_BARRIER.
29297 (rs6000_init_builtins): Likewise.
29298 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
29300 (speculation_barrier): New define_insn.
29301 * doc/extend.texi: Document __builtin_speculation_barrier.
29303 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29306 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
29307 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
29308 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
29310 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
29311 integral modes instead of "ss" and "sd".
29312 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
29313 vectors with 32-bit and 64-bit elements.
29314 (vecdupssescalarmodesuffix): New mode attribute.
29315 (vec_dup<mode>): Use it.
29317 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
29320 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
29321 frame if argument is passed on stack.
29323 2018-01-11 Jakub Jelinek <jakub@redhat.com>
29326 * ree.c (combine_reaching_defs): Optimize also
29327 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
29328 reg2=any_extend(exp); reg1=reg2;, formatting fix.
29330 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29332 PR middle-end/83189
29333 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
29335 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
29337 PR middle-end/83718
29338 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
29339 after they are computed.
29341 2018-01-11 Bin Cheng <bin.cheng@arm.com>
29343 PR tree-optimization/83695
29344 * gimple-loop-linterchange.cc
29345 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
29346 reset cached scev information after interchange.
29347 (pass_linterchange::execute): Remove call to scev_reset_htab.
29349 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29351 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
29352 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
29353 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
29354 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
29355 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
29356 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
29357 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
29358 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
29359 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
29360 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
29361 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
29362 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
29363 (V_lane_reg): Likewise.
29364 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
29366 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
29367 (vfmal_lane_low<mode>_intrinsic,
29368 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
29369 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
29370 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
29371 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
29372 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
29373 vfmsl_lane_high<mode>_intrinsic): New define_insns.
29375 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29377 * config/arm/arm-cpus.in (fp16fml): New feature.
29378 (ALL_SIMD): Add fp16fml.
29379 (armv8.2-a): Add fp16fml as an option.
29380 (armv8.3-a): Likewise.
29381 (armv8.4-a): Add fp16fml as part of fp16.
29382 * config/arm/arm.h (TARGET_FP16FML): Define.
29383 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
29385 * config/arm/arm-modes.def (V2HF): Define.
29386 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
29387 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
29388 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
29389 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
29390 vfmsl_low, vfmsl_high): New set of builtins.
29391 * config/arm/iterators.md (PLUSMINUS): New code iterator.
29392 (vfml_op): New code attribute.
29393 (VFMLHALVES): New int iterator.
29394 (VFML, VFMLSEL): New mode attributes.
29395 (V_reg): Define mapping for V2HF.
29396 (V_hi, V_lo): New mode attributes.
29397 (VF_constraint): Likewise.
29398 (vfml_half, vfml_half_selector): New int attributes.
29399 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
29401 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
29402 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
29404 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
29405 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
29406 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
29407 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
29409 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
29410 Document new effective target and option set.
29412 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29414 * config/arm/arm-cpus.in (armv8_4): New feature.
29415 (ARMv8_4a): New fgroup.
29416 (armv8.4-a): New arch.
29417 * config/arm/arm-tables.opt: Regenerate.
29418 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
29419 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
29420 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
29421 Add matching rules for -march=armv8.4-a and extensions.
29422 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
29424 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
29427 * config/rx/rx.md (BW): New mode attribute.
29428 (sync_lock_test_and_setsi): Add mode suffix to insn output.
29430 2018-01-11 Richard Biener <rguenther@suse.de>
29432 PR tree-optimization/83435
29433 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
29434 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
29435 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
29437 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29438 Alan Hayward <alan.hayward@arm.com>
29439 David Sherwood <david.sherwood@arm.com>
29441 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
29443 (aarch64_classify_address): Initialize it. Track polynomial offsets.
29444 (aarch64_print_address_internal): Use it to check for a zero offset.
29446 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29447 Alan Hayward <alan.hayward@arm.com>
29448 David Sherwood <david.sherwood@arm.com>
29450 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
29451 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
29452 Return a poly_int64 rather than a HOST_WIDE_INT.
29453 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
29454 rather than a HOST_WIDE_INT.
29455 * config/aarch64/aarch64.h (aarch64_frame): Protect with
29456 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
29457 hard_fp_offset, frame_size, initial_adjust, callee_offset and
29458 final_offset from HOST_WIDE_INT to poly_int64.
29459 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
29460 to_constant when getting the number of units in an Advanced SIMD
29462 (aarch64_builtin_vectorized_function): Check for a constant number
29464 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
29466 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
29467 attribute instead of GET_MODE_NUNITS.
29468 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
29469 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
29470 GET_MODE_SIZE for fixed-size registers.
29471 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
29472 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
29473 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
29474 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
29475 (aarch64_print_operand, aarch64_print_address_internal)
29476 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
29477 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
29478 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
29479 Handle polynomial GET_MODE_SIZE.
29480 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
29481 wider than SImode without modification.
29482 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
29483 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
29484 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
29485 passing and returning SVE modes.
29486 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
29487 rather than GEN_INT.
29488 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
29489 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
29490 (aarch64_allocate_and_probe_stack_space): Likewise.
29491 (aarch64_layout_frame): Cope with polynomial offsets.
29492 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
29493 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
29494 polynomial offsets.
29495 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
29496 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
29497 poly_int64 rather than a HOST_WIDE_INT.
29498 (aarch64_get_separate_components, aarch64_process_components)
29499 (aarch64_expand_prologue, aarch64_expand_epilogue)
29500 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
29501 (aarch64_anchor_offset): New function, split out from...
29502 (aarch64_legitimize_address): ...here.
29503 (aarch64_builtin_vectorization_cost): Handle polynomial
29504 TYPE_VECTOR_SUBPARTS.
29505 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
29507 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
29508 number of elements from the PARALLEL rather than the mode.
29509 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
29510 rather than GET_MODE_BITSIZE.
29511 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
29512 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
29513 (aarch64_expand_vec_perm_const_1): Handle polynomial
29514 d->perm.length () and d->perm elements.
29515 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
29516 Apply to_constant to d->perm elements.
29517 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
29518 polynomial CONST_VECTOR_NUNITS.
29519 (aarch64_move_pointer): Take amount as a poly_int64 rather
29521 (aarch64_progress_pointer): Avoid temporary variable.
29522 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
29523 the mode attribute instead of GET_MODE.
29525 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29526 Alan Hayward <alan.hayward@arm.com>
29527 David Sherwood <david.sherwood@arm.com>
29529 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
29530 x exists before using it.
29531 (aarch64_add_constant_internal): Rename to...
29532 (aarch64_add_offset_1): ...this. Replace regnum with separate
29533 src and dest rtxes. Handle the case in which they're different,
29534 including when the offset is zero. Replace scratchreg with an rtx.
29535 Use 2 additions if there is no spare register into which we can
29536 move a 16-bit constant.
29537 (aarch64_add_constant): Delete.
29538 (aarch64_add_offset): Replace reg with separate src and dest
29539 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
29540 Use aarch64_add_offset_1.
29541 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
29542 an rtx rather than an int. Take the delta as a poly_int64
29543 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
29544 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
29545 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
29546 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
29547 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
29548 and aarch64_add_sp.
29549 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
29550 aarch64_add_constant.
29552 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29554 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
29555 Use scalar_float_mode.
29557 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29559 * config/aarch64/aarch64-simd.md
29560 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
29561 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
29562 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
29563 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
29564 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
29565 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
29566 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
29567 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
29568 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
29569 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
29571 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29574 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
29575 targ_options->x_arm_arch_string is non NULL.
29577 2018-01-11 Tamar Christina <tamar.christina@arm.com>
29579 * config/aarch64/aarch64.h
29580 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
29582 2018-01-11 Sudakshina Das <sudi.das@arm.com>
29585 * expmed.c (emit_store_flag_force): Swap if const op0
29586 and change VOIDmode to mode of op0.
29588 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
29590 PR rtl-optimization/83761
29591 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
29592 than bytes to mode_for_size.
29594 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29596 PR middle-end/83189
29597 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29598 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29601 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29603 PR middle-end/83575
29604 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29605 when in layout mode.
29606 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29607 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29610 2018-01-10 Michael Collison <michael.collison@arm.com>
29612 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29613 * config/aarch64/aarch64-option-extension.def: Add
29614 AARCH64_OPT_EXTENSION of 'fp16fml'.
29615 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29616 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29617 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29618 * config/aarch64/constraints.md (Ui7): New constraint.
29619 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29620 (VFMLA_SEL_W): Ditto.
29623 (VFMLA16_LOW): New int iterator.
29624 (VFMLA16_HIGH): Ditto.
29625 (UNSPEC_FMLAL): New unspec.
29626 (UNSPEC_FMLSL): Ditto.
29627 (UNSPEC_FMLAL2): Ditto.
29628 (UNSPEC_FMLSL2): Ditto.
29629 (f16mac): New code attribute.
29630 * config/aarch64/aarch64-simd-builtins.def
29631 (aarch64_fmlal_lowv2sf): Ditto.
29632 (aarch64_fmlsl_lowv2sf): Ditto.
29633 (aarch64_fmlalq_lowv4sf): Ditto.
29634 (aarch64_fmlslq_lowv4sf): Ditto.
29635 (aarch64_fmlal_highv2sf): Ditto.
29636 (aarch64_fmlsl_highv2sf): Ditto.
29637 (aarch64_fmlalq_highv4sf): Ditto.
29638 (aarch64_fmlslq_highv4sf): Ditto.
29639 (aarch64_fmlal_lane_lowv2sf): Ditto.
29640 (aarch64_fmlsl_lane_lowv2sf): Ditto.
29641 (aarch64_fmlal_laneq_lowv2sf): Ditto.
29642 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29643 (aarch64_fmlalq_lane_lowv4sf): Ditto.
29644 (aarch64_fmlsl_lane_lowv4sf): Ditto.
29645 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29646 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29647 (aarch64_fmlal_lane_highv2sf): Ditto.
29648 (aarch64_fmlsl_lane_highv2sf): Ditto.
29649 (aarch64_fmlal_laneq_highv2sf): Ditto.
29650 (aarch64_fmlsl_laneq_highv2sf): Ditto.
29651 (aarch64_fmlalq_lane_highv4sf): Ditto.
29652 (aarch64_fmlsl_lane_highv4sf): Ditto.
29653 (aarch64_fmlalq_laneq_highv4sf): Ditto.
29654 (aarch64_fmlsl_laneq_highv4sf): Ditto.
29655 * config/aarch64/aarch64-simd.md:
29656 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29657 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29658 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29659 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29660 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29661 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29662 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29663 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29664 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29665 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29666 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29667 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29668 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29669 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29670 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29671 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29672 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29673 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29674 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29675 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29676 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29677 (vfmlsl_low_u32): Ditto.
29678 (vfmlalq_low_u32): Ditto.
29679 (vfmlslq_low_u32): Ditto.
29680 (vfmlal_high_u32): Ditto.
29681 (vfmlsl_high_u32): Ditto.
29682 (vfmlalq_high_u32): Ditto.
29683 (vfmlslq_high_u32): Ditto.
29684 (vfmlal_lane_low_u32): Ditto.
29685 (vfmlsl_lane_low_u32): Ditto.
29686 (vfmlal_laneq_low_u32): Ditto.
29687 (vfmlsl_laneq_low_u32): Ditto.
29688 (vfmlalq_lane_low_u32): Ditto.
29689 (vfmlslq_lane_low_u32): Ditto.
29690 (vfmlalq_laneq_low_u32): Ditto.
29691 (vfmlslq_laneq_low_u32): Ditto.
29692 (vfmlal_lane_high_u32): Ditto.
29693 (vfmlsl_lane_high_u32): Ditto.
29694 (vfmlal_laneq_high_u32): Ditto.
29695 (vfmlsl_laneq_high_u32): Ditto.
29696 (vfmlalq_lane_high_u32): Ditto.
29697 (vfmlslq_lane_high_u32): Ditto.
29698 (vfmlalq_laneq_high_u32): Ditto.
29699 (vfmlslq_laneq_high_u32): Ditto.
29700 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29701 (AARCH64_FL_FOR_ARCH8_4): New.
29702 (AARCH64_ISA_F16FML): New ISA flag.
29703 (TARGET_F16FML): New feature flag for fp16fml.
29704 (doc/invoke.texi): Document new fp16fml option.
29706 2018-01-10 Michael Collison <michael.collison@arm.com>
29708 * config/aarch64/aarch64-builtins.c:
29709 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29710 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29711 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29712 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29713 (AARCH64_ISA_SHA3): New ISA flag.
29714 (TARGET_SHA3): New feature flag for sha3.
29715 * config/aarch64/iterators.md (sha512_op): New int attribute.
29716 (CRYPTO_SHA512): New int iterator.
29717 (UNSPEC_SHA512H): New unspec.
29718 (UNSPEC_SHA512H2): Ditto.
29719 (UNSPEC_SHA512SU0): Ditto.
29720 (UNSPEC_SHA512SU1): Ditto.
29721 * config/aarch64/aarch64-simd-builtins.def
29722 (aarch64_crypto_sha512hqv2di): New builtin.
29723 (aarch64_crypto_sha512h2qv2di): Ditto.
29724 (aarch64_crypto_sha512su0qv2di): Ditto.
29725 (aarch64_crypto_sha512su1qv2di): Ditto.
29726 (aarch64_eor3qv8hi): Ditto.
29727 (aarch64_rax1qv2di): Ditto.
29728 (aarch64_xarqv2di): Ditto.
29729 (aarch64_bcaxqv8hi): Ditto.
29730 * config/aarch64/aarch64-simd.md:
29731 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29732 (aarch64_crypto_sha512su0qv2di): Ditto.
29733 (aarch64_crypto_sha512su1qv2di): Ditto.
29734 (aarch64_eor3qv8hi): Ditto.
29735 (aarch64_rax1qv2di): Ditto.
29736 (aarch64_xarqv2di): Ditto.
29737 (aarch64_bcaxqv8hi): Ditto.
29738 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29739 (vsha512h2q_u64): Ditto.
29740 (vsha512su0q_u64): Ditto.
29741 (vsha512su1q_u64): Ditto.
29742 (veor3q_u16): Ditto.
29743 (vrax1q_u64): Ditto.
29744 (vxarq_u64): Ditto.
29745 (vbcaxq_u16): Ditto.
29746 * config/arm/types.md (crypto_sha512): New type attribute.
29747 (crypto_sha3): Ditto.
29748 (doc/invoke.texi): Document new sha3 option.
29750 2018-01-10 Michael Collison <michael.collison@arm.com>
29752 * config/aarch64/aarch64-builtins.c:
29753 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29754 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29755 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29756 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29757 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29758 (AARCH64_ISA_SM4): New ISA flag.
29759 (TARGET_SM4): New feature flag for sm4.
29760 * config/aarch64/aarch64-simd-builtins.def
29761 (aarch64_sm3ss1qv4si): Ditto.
29762 (aarch64_sm3tt1aq4si): Ditto.
29763 (aarch64_sm3tt1bq4si): Ditto.
29764 (aarch64_sm3tt2aq4si): Ditto.
29765 (aarch64_sm3tt2bq4si): Ditto.
29766 (aarch64_sm3partw1qv4si): Ditto.
29767 (aarch64_sm3partw2qv4si): Ditto.
29768 (aarch64_sm4eqv4si): Ditto.
29769 (aarch64_sm4ekeyqv4si): Ditto.
29770 * config/aarch64/aarch64-simd.md:
29771 (aarch64_sm3ss1qv4si): Ditto.
29772 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29773 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29774 (aarch64_sm4eqv4si): Ditto.
29775 (aarch64_sm4ekeyqv4si): Ditto.
29776 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29777 (sm3part_op): Ditto.
29778 (CRYPTO_SM3TT): Ditto.
29779 (CRYPTO_SM3PART): Ditto.
29780 (UNSPEC_SM3SS1): New unspec.
29781 (UNSPEC_SM3TT1A): Ditto.
29782 (UNSPEC_SM3TT1B): Ditto.
29783 (UNSPEC_SM3TT2A): Ditto.
29784 (UNSPEC_SM3TT2B): Ditto.
29785 (UNSPEC_SM3PARTW1): Ditto.
29786 (UNSPEC_SM3PARTW2): Ditto.
29787 (UNSPEC_SM4E): Ditto.
29788 (UNSPEC_SM4EKEY): Ditto.
29789 * config/aarch64/constraints.md (Ui2): New constraint.
29790 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29791 * config/arm/types.md (crypto_sm3): New type attribute.
29792 (crypto_sm4): Ditto.
29793 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29794 (vsm3tt1aq_u32): Ditto.
29795 (vsm3tt1bq_u32): Ditto.
29796 (vsm3tt2aq_u32): Ditto.
29797 (vsm3tt2bq_u32): Ditto.
29798 (vsm3partw1q_u32): Ditto.
29799 (vsm3partw2q_u32): Ditto.
29800 (vsm4eq_u32): Ditto.
29801 (vsm4ekeyq_u32): Ditto.
29802 (doc/invoke.texi): Document new sm4 option.
29804 2018-01-10 Michael Collison <michael.collison@arm.com>
29806 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29807 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29808 (AARCH64_FL_FOR_ARCH8_4): New.
29809 (AARCH64_FL_V8_4): New flag.
29810 (doc/invoke.texi): Document new armv8.4-a option.
29812 2018-01-10 Michael Collison <michael.collison@arm.com>
29814 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29815 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29816 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29817 * config/aarch64/aarch64-option-extension.def: Add
29818 AARCH64_OPT_EXTENSION of 'sha2'.
29819 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29820 (crypto): Disable sha2 and aes if crypto disabled.
29821 (crypto): Enable aes and sha2 if enabled.
29822 (simd): Disable sha2 and aes if simd disabled.
29823 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29825 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29826 (TARGET_SHA2): New feature flag for sha2.
29827 (TARGET_AES): New feature flag for aes.
29828 * config/aarch64/aarch64-simd.md:
29829 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29830 conditional on TARGET_AES.
29831 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29832 (aarch64_crypto_sha1hsi): Make pattern conditional
29834 (aarch64_crypto_sha1hv4si): Ditto.
29835 (aarch64_be_crypto_sha1hv4si): Ditto.
29836 (aarch64_crypto_sha1su1v4si): Ditto.
29837 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29838 (aarch64_crypto_sha1su0v4si): Ditto.
29839 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29840 (aarch64_crypto_sha256su0v4si): Ditto.
29841 (aarch64_crypto_sha256su1v4si): Ditto.
29842 (doc/invoke.texi): Document new aes and sha2 options.
29844 2018-01-10 Martin Sebor <msebor@redhat.com>
29846 PR tree-optimization/83781
29847 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29850 2018-01-11 Martin Sebor <msebor@gmail.com>
29851 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
29853 PR tree-optimization/83501
29854 PR tree-optimization/81703
29856 * tree-ssa-strlen.c (get_string_cst): Rename...
29857 (get_string_len): ...to this. Handle global constants.
29858 (handle_char_store): Adjust.
29860 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
29861 Jim Wilson <jimw@sifive.com>
29863 * config/riscv/riscv-protos.h (riscv_output_return): New.
29864 * config/riscv/riscv.c (struct machine_function): New naked_p field.
29865 (riscv_attribute_table, riscv_output_return),
29866 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29867 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29868 (riscv_compute_frame_info): Only compute frame->mask if not a naked
29870 (riscv_expand_prologue): Add early return for naked function.
29871 (riscv_expand_epilogue): Likewise.
29872 (riscv_function_ok_for_sibcall): Return false for naked function.
29873 (riscv_set_current_function): New.
29874 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29875 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29876 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29877 * doc/extend.texi (RISC-V Function Attributes): New.
29879 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
29881 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29882 check for 128-bit long double before checking TCmode.
29883 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29884 128-bit long doubles before checking TFmode or TCmode.
29885 (FLOAT128_IBM_P): Likewise.
29887 2018-01-10 Martin Sebor <msebor@redhat.com>
29889 PR tree-optimization/83671
29890 * builtins.c (c_strlen): Unconditionally return zero for the empty
29892 Use -Warray-bounds for warnings.
29893 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29894 for non-constant array indices with COMPONENT_REF, arrays of
29895 arrays, and pointers to arrays.
29896 (gimple_fold_builtin_strlen): Determine and set length range for
29897 non-constant character arrays.
29899 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
29901 PR middle-end/81897
29902 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29905 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
29907 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29909 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29912 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29913 VECTOR_MEM_ALTIVEC_OR_VSX_P.
29914 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29915 indexed_or_indirect_operand predicate.
29916 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29917 (*vsx_le_perm_load_v8hi): Likewise.
29918 (*vsx_le_perm_load_v16qi): Likewise.
29919 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29920 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29921 (*vsx_le_perm_store_v8hi): Likewise.
29922 (*vsx_le_perm_store_v16qi): Likewise.
29923 (eight unnamed splitters): Likewise.
29925 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
29927 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29928 * config/rs6000/emmintrin.h: Likewise.
29929 * config/rs6000/mmintrin.h: Likewise.
29930 * config/rs6000/xmmintrin.h: Likewise.
29932 2018-01-10 David Malcolm <dmalcolm@redhat.com>
29935 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29937 * tree.c (tree_nop_conversion): Return true for location wrapper
29939 (maybe_wrap_with_location): New function.
29940 (selftest::check_strip_nops): New function.
29941 (selftest::test_location_wrappers): New function.
29942 (selftest::tree_c_tests): Call it.
29943 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29944 (maybe_wrap_with_location): New decl.
29945 (EXPR_LOCATION_WRAPPER_P): New macro.
29946 (location_wrapper_p): New inline function.
29947 (tree_strip_any_location_wrapper): New inline function.
29949 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
29952 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29953 stack_realign_offset for the largest alignment of stack slot
29955 (ix86_find_max_used_stack_alignment): New function.
29956 (ix86_finalize_stack_frame_flags): Use it. Set
29957 max_used_stack_alignment if we don't realign stack.
29958 * config/i386/i386.h (machine_function): Add
29959 max_used_stack_alignment.
29961 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
29963 * config/arm/arm.opt (-mbranch-cost): New option.
29964 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29967 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
29970 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29971 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29973 2018-01-10 Richard Biener <rguenther@suse.de>
29976 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29977 early out so it also covers the case where we have a non-NULL
29980 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
29982 PR tree-optimization/83753
29983 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29984 for non-strided grouped accesses if the number of elements is 1.
29986 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
29989 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29990 * i386.h (TARGET_USE_GATHER): Define.
29991 * x86-tune.def (X86_TUNE_USE_GATHER): New.
29993 2018-01-10 Martin Liska <mliska@suse.cz>
29996 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29997 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29999 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
30000 CLEANUP_NO_PARTITIONING is not set.
30002 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
30004 * doc/rtl.texi: Remove documentation of (const ...) wrappers
30005 for vectors, as a partial revert of r254296.
30006 * rtl.h (const_vec_p): Delete.
30007 (const_vec_duplicate_p): Don't test for vector CONSTs.
30008 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
30009 * expmed.c (make_tree): Likewise.
30012 * common.md (E, F): Use CONSTANT_P instead of checking for
30014 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
30015 checking for CONST_VECTOR.
30017 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30019 PR middle-end/83575
30020 * predict.c (force_edge_cold): Handle in more sane way edges
30021 with no prediction.
30023 2018-01-09 Carl Love <cel@us.ibm.com>
30025 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
30027 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
30028 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
30029 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
30030 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
30031 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
30032 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
30033 * config/rs6000/rs6000-protos.h: Add extern defition for
30034 rs6000_generate_float2_double_code.
30035 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
30037 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
30038 (float2_v2df): Add define_expand.
30040 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
30043 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
30044 op_mode in the force_to_mode call.
30046 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30048 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
30049 instead of checking each element individually.
30050 (aarch64_evpc_uzp): Likewise.
30051 (aarch64_evpc_zip): Likewise.
30052 (aarch64_evpc_ext): Likewise.
30053 (aarch64_evpc_rev): Likewise.
30054 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
30055 instead of checking each element individually. Return true without
30057 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
30058 whether all selected elements come from the same input, instead of
30059 checking each element individually. Remove calls to gen_rtx_REG,
30060 start_sequence and end_sequence and instead assert that no rtl is
30063 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30065 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
30066 order of HIGH and CONST checks.
30068 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
30070 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
30071 if the destination isn't an SSA_NAME.
30073 2018-01-09 Richard Biener <rguenther@suse.de>
30075 PR tree-optimization/83668
30076 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
30078 (canonicalize_loop_form): ... here, renamed from ...
30079 (canonicalize_loop_closed_ssa_form): ... this and amended to
30080 swap successor edges for loop exit blocks to make us use
30081 the RPO order we need for initial schedule generation.
30083 2018-01-09 Joseph Myers <joseph@codesourcery.com>
30085 PR tree-optimization/64811
30086 * match.pd: When optimizing comparisons with Inf, avoid
30087 introducing or losing exceptions from comparisons with NaN.
30089 2018-01-09 Martin Liska <mliska@suse.cz>
30092 * asan.c (shadow_mem_size): Add gcc_assert.
30094 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
30096 Don't save registers in main().
30099 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
30100 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
30101 * config/avr/avr.c (avr_set_current_function): Don't error if
30102 naked, OS_task or OS_main are specified at the same time.
30103 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
30105 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
30107 * common/config/avr/avr-common.c (avr_option_optimization_table):
30108 Switch on -mmain-is-OS_task for optimizing compilations.
30110 2018-01-09 Richard Biener <rguenther@suse.de>
30112 PR tree-optimization/83572
30113 * graphite.c: Include cfganal.h.
30114 (graphite_transform_loops): Connect infinite loops to exit
30115 and remove fake edges at the end.
30117 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30119 * ipa-inline.c (edge_badness): Revert accidental checkin.
30121 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
30124 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
30125 symbols; not inline clones.
30127 2018-01-09 Jakub Jelinek <jakub@redhat.com>
30130 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
30131 hard registers. Formatting fixes.
30133 PR preprocessor/83722
30134 * gcc.c (try_generate_repro): Pass
30135 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
30136 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
30139 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
30140 Kito Cheng <kito.cheng@gmail.com>
30142 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
30143 (riscv_leaf_function_p): Delete.
30144 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
30146 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30148 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
30150 (do_ifelse): New function.
30151 (do_isel): New function.
30152 (do_sub3): New function.
30153 (do_add3): New function.
30154 (do_load_mask_compare): New function.
30155 (do_overlap_load_compare): New function.
30156 (expand_compare_loop): New function.
30157 (expand_block_compare): Call expand_compare_loop() when appropriate.
30158 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
30159 option description.
30160 (-mblock-compare-inline-loop-limit): New option.
30162 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30165 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
30166 Reverse order of second and third operands in first alternative.
30167 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
30168 of first and second elements in UNSPEC_VPERMR vector.
30169 (altivec_expand_vec_perm_le): Likewise.
30171 2018-01-08 Jeff Law <law@redhat.com>
30173 PR rtl-optimizatin/81308
30174 * tree-switch-conversion.c (cfg_altered): New file scoped static.
30175 (process_switch): If group_case_labels makes a change, then set
30177 (pass_convert_switch::execute): If a switch is converted, then
30178 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
30180 PR rtl-optimization/81308
30181 * recog.c (split_all_insns): Conditionally cleanup the CFG after
30184 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
30186 PR target/83663 - Revert r255946
30187 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
30188 generation for cases where splatting a value is not useful.
30189 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
30190 across a vec_duplicate and a paradoxical subreg forming a vector
30191 mode to a vec_concat.
30193 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30195 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
30196 -march=armv8.3-a variants.
30197 * config/arm/t-multilib: Likewise.
30198 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
30200 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
30202 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
30204 (cceq_ior_compare_complement): Give it a name so I can use it, and
30205 change boolean_or_operator predicate to boolean_operator so it can
30206 be used to generate a crand.
30207 (eqne): New code iterator.
30208 (bd/bd_neg): New code_attrs.
30209 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
30210 a single define_insn.
30211 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
30212 decrement (bdnzt/bdnzf/bdzt/bdzf).
30213 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
30214 with the new names of the branch decrement patterns, and added the
30215 names of the branch decrement conditional patterns.
30217 2018-01-08 Richard Biener <rguenther@suse.de>
30219 PR tree-optimization/83563
30220 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
30223 2018-01-08 Richard Biener <rguenther@suse.de>
30225 PR middle-end/83713
30226 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
30228 2018-01-08 Richard Biener <rguenther@suse.de>
30230 PR tree-optimization/83685
30231 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
30232 references to abnormals.
30234 2018-01-08 Richard Biener <rguenther@suse.de>
30237 * dwarf2out.c (output_indirect_strings): Handle empty
30238 skeleton_debug_str_hash.
30239 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
30241 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30243 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
30244 (emit_store_direct): Likewise.
30245 (arc_trampoline_adjust_address): Likewise.
30246 (arc_asm_trampoline_template): New function.
30247 (arc_initialize_trampoline): Use asm_trampoline_template.
30248 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
30249 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
30250 * config/arc/arc.md (flush_icache): Delete pattern.
30252 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
30254 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
30255 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
30258 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30261 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
30262 by not USED_FOR_TARGET.
30263 (make_pass_resolve_sw_modes): Likewise.
30265 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
30267 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
30270 2018-01-08 Richard Biener <rguenther@suse.de>
30272 PR middle-end/83580
30273 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
30275 2018-01-08 Richard Biener <rguenther@suse.de>
30277 PR middle-end/83517
30278 * match.pd ((t * 2) / 2) -> t): Add missing :c.
30280 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
30282 PR middle-end/81897
30283 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
30284 basic blocks with a small number of successors.
30285 (convert_control_dep_chain_into_preds): Improve handling of
30287 (dump_predicates): Split apart into...
30288 (dump_pred_chain): ...here...
30289 (dump_pred_info): ...and here.
30290 (can_one_predicate_be_invalidated_p): Add debugging printfs.
30291 (can_chain_union_be_invalidated_p): Improve check for invalidation
30293 (uninit_uses_cannot_happen): Avoid unnecessary if
30294 convert_control_dep_chain_into_preds yielded nothing.
30296 2018-01-06 Martin Sebor <msebor@redhat.com>
30298 PR tree-optimization/83640
30299 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
30300 subtracting negative offset from size.
30301 (builtin_access::overlap): Adjust offset bounds of the access to fall
30302 within the size of the object if possible.
30304 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
30306 PR rtl-optimization/83699
30307 * expmed.c (extract_bit_field_1): Restrict the vector usage of
30308 extract_bit_field_as_subreg to cases in which the extracted
30309 value is also a vector.
30311 * lra-constraints.c (process_alt_operands): Test for the equivalence
30312 substitutions when detecting a possible reload cycle.
30314 2018-01-06 Jakub Jelinek <jakub@redhat.com>
30317 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
30318 by default if flag_selective_schedling{,2}. Formatting fixes.
30320 PR rtl-optimization/83682
30321 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
30322 if it has non-VECTOR_MODE element mode.
30323 (vec_duplicate_p): Likewise.
30325 PR middle-end/83694
30326 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
30327 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
30329 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30332 * config/i386/i386-builtin.def
30333 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
30334 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
30335 Require also OPTION_MASK_ISA_AVX512F in addition to
30336 OPTION_MASK_ISA_GFNI.
30337 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
30338 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
30339 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
30340 to OPTION_MASK_ISA_GFNI.
30341 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
30342 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
30343 OPTION_MASK_ISA_AVX512BW.
30344 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
30345 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
30346 addition to OPTION_MASK_ISA_GFNI.
30347 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
30348 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
30349 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
30350 to OPTION_MASK_ISA_GFNI.
30351 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
30352 a requirement for all ISAs rather than any of them with a few
30354 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
30356 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
30357 bitmasks to be enabled with 3 exceptions, instead of requiring any
30358 enabled ISA with lots of exceptions.
30359 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
30360 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
30361 Change avx512bw in isa attribute to avx512f.
30362 * config/i386/sgxintrin.h: Add license boilerplate.
30363 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
30364 to __AVX512F__ and __AVX512VL to __AVX512VL__.
30365 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
30366 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
30368 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
30369 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
30370 temporarily sse2 rather than sse if not enabled already.
30373 * config/i386/sse.md (VI248_VLBW): Rename to ...
30374 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
30375 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
30376 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
30377 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
30378 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
30379 mode iterator instead of VI248_VLBW.
30381 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
30383 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
30384 (record_modified): Skip clobbers; add debug output.
30385 (param_change_prob): Use sreal frequencies.
30387 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30389 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
30390 punt for user-aligned variables.
30392 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
30394 * tree-chrec.c (chrec_contains_symbols): Return true for
30397 2018-01-05 Sudakshina Das <sudi.das@arm.com>
30400 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
30401 of (x|y) == x for BICS pattern.
30403 2018-01-05 Jakub Jelinek <jakub@redhat.com>
30405 PR tree-optimization/83605
30406 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
30407 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
30410 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
30412 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
30413 * config/epiphany/rtems.h: New file.
30415 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30416 Uros Bizjak <ubizjak@gmail.com>
30419 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
30420 QIreg_operand instead of register_operand predicate.
30421 * config/i386/i386.c (ix86_rop_should_change_byte_p,
30422 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
30423 comments instead of -fmitigate[-_]rop.
30425 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30428 * cgraphunit.c (symbol_table::compile): Switch to text_section
30429 before calling assembly_start debug hook.
30430 * run-rtl-passes.c (run_rtl_passes): Likewise.
30433 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30435 * tree-vrp.c (extract_range_from_binary_expr_1): Check
30436 range_int_cst_p rather than !symbolic_range_p before calling
30437 extract_range_from_multiplicative_op_1.
30439 2018-01-04 Jeff Law <law@redhat.com>
30441 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
30442 redundant test in assertion.
30444 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30446 * doc/rtl.texi: Document machine_mode wrapper classes.
30448 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30450 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
30451 using tree_to_uhwi.
30453 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30455 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
30456 the VEC_PERM_EXPR fold to fail.
30458 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30461 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
30462 to switched_sections.
30464 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30467 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
30468 test for d.testing.
30470 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
30473 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
30474 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
30476 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30479 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
30480 is BLKmode and bitpos not zero or mode change is needed.
30482 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
30485 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
30488 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
30491 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
30492 instead of MULT rtx. Update all corresponding splitters.
30493 (*saddl_se): Ditto.
30494 (*ssub<modesuffix>): Ditto.
30495 (*ssubl_se): Ditto.
30496 (*cmp_sadd_di): Update split patterns.
30497 (*cmp_sadd_si): Ditto.
30498 (*cmp_sadd_sidi): Ditto.
30499 (*cmp_ssub_di): Ditto.
30500 (*cmp_ssub_si): Ditto.
30501 (*cmp_ssub_sidi): Ditto.
30502 * config/alpha/predicates.md (const23_operand): New predicate.
30503 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
30504 Look for ASHIFT, not MULT inner operand.
30505 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
30507 2018-01-04 Martin Liska <mliska@suse.cz>
30509 PR gcov-profile/83669
30510 * gcov.c (output_intermediate_file): Add version to intermediate
30512 * doc/gcov.texi: Document new field 'version' in intermediate
30513 file format. Fix location of '-k' option of gcov command.
30515 2018-01-04 Martin Liska <mliska@suse.cz>
30518 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
30520 2018-01-04 Jakub Jelinek <jakub@redhat.com>
30522 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
30524 2018-01-03 Martin Sebor <msebor@redhat.com>
30526 PR tree-optimization/83655
30527 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
30528 checking calls with invalid arguments.
30530 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30532 * tree-vect-stmts.c (vect_get_store_rhs): New function.
30533 (vectorizable_mask_load_store): Delete.
30534 (vectorizable_call): Return false for masked loads and stores.
30535 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
30536 instead of gimple_assign_rhs1.
30537 (vectorizable_load): Handle IFN_MASK_LOAD.
30538 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
30540 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30542 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
30544 (vectorizable_mask_load_store): ...here.
30545 (vectorizable_load): ...and here.
30547 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30549 * tree-vect-stmts.c (vect_build_all_ones_mask)
30550 (vect_build_zero_merge_argument): New functions, split out from...
30551 (vectorizable_load): ...here.
30553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30555 * tree-vect-stmts.c (vect_check_store_rhs): New function,
30557 (vectorizable_mask_load_store): ...here.
30558 (vectorizable_store): ...and here.
30560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30562 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
30564 (vectorizable_mask_load_store): ...here.
30566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30568 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
30569 (vect_model_store_cost): Take a vec_load_store_type instead of a
30571 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
30572 (vect_model_store_cost): Take a vec_load_store_type instead of a
30574 (vectorizable_mask_load_store): Update accordingly.
30575 (vectorizable_store): Likewise.
30576 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
30578 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30580 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
30581 IFN_MASK_LOAD calls here rather than...
30582 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
30584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30585 Alan Hayward <alan.hayward@arm.com>
30586 David Sherwood <david.sherwood@arm.com>
30588 * expmed.c (extract_bit_field_1): For vector extracts,
30589 fall back to extract_bit_field_as_subreg if vec_extract
30592 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30593 Alan Hayward <alan.hayward@arm.com>
30594 David Sherwood <david.sherwood@arm.com>
30596 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
30597 they are variable or constant sized.
30598 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30599 slots for constant-sized data.
30601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30602 Alan Hayward <alan.hayward@arm.com>
30603 David Sherwood <david.sherwood@arm.com>
30605 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30606 handling COND_EXPRs with boolean comparisons, try to find a better
30607 basis for the mask type than the boolean itself.
30609 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30611 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30612 is calculated and how it can be overridden.
30613 * genmodes.c (max_bitsize_mode_any_mode): New variable.
30614 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30616 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30619 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30620 Alan Hayward <alan.hayward@arm.com>
30621 David Sherwood <david.sherwood@arm.com>
30623 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30624 Remove the mode argument.
30625 (aarch64_simd_valid_immediate): Remove the mode and inverse
30627 * config/aarch64/iterators.md (bitsize): New iterator.
30628 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30629 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30630 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30631 aarch64_simd_valid_immediate.
30632 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30633 (aarch64_reg_or_bic_imm): Likewise.
30634 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30635 with an insn_type enum and msl with a modifier_type enum.
30636 Replace element_width with a scalar_mode. Change the shift
30637 to unsigned int. Add constructors for scalar_float_mode and
30638 scalar_int_mode elements.
30639 (aarch64_vect_float_const_representable_p): Delete.
30640 (aarch64_can_const_movi_rtx_p)
30641 (aarch64_simd_scalar_immediate_valid_for_move)
30642 (aarch64_simd_make_constant): Update call to
30643 aarch64_simd_valid_immediate.
30644 (aarch64_advsimd_valid_immediate_hs): New function.
30645 (aarch64_advsimd_valid_immediate): Likewise.
30646 (aarch64_simd_valid_immediate): Remove mode and inverse
30647 arguments. Rewrite to use the above. Use const_vec_duplicate_p
30648 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30649 and aarch64_float_const_representable_p on the result.
30650 (aarch64_output_simd_mov_immediate): Remove mode argument.
30651 Update call to aarch64_simd_valid_immediate and use of
30652 simd_immediate_info.
30653 (aarch64_output_scalar_simd_mov_immediate): Update call
30656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30657 Alan Hayward <alan.hayward@arm.com>
30658 David Sherwood <david.sherwood@arm.com>
30660 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30661 (mode_nunits): Likewise CONST_MODE_NUNITS.
30662 * machmode.def (ADJUST_NUNITS): Document.
30663 * genmodes.c (mode_data::need_nunits_adj): New field.
30664 (blank_mode): Update accordingly.
30665 (adj_nunits): New variable.
30666 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30668 (emit_mode_size_inline): Set need_bytesize_adj for all modes
30669 listed in adj_nunits.
30670 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30671 listed in adj_nunits. Don't emit case statements for such modes.
30672 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30673 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
30674 nothing if adj_nunits is nonnull.
30675 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30676 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30677 (emit_mode_fbit): Update use of print_maybe_const_decl.
30678 (emit_move_size): Likewise. Treat the array as non-const
30680 (emit_mode_adjustments): Handle adj_nunits.
30682 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30684 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30685 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30686 (VECTOR_MODES): Use it.
30687 (make_vector_modes): Take the prefix as an argument.
30689 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30690 Alan Hayward <alan.hayward@arm.com>
30691 David Sherwood <david.sherwood@arm.com>
30693 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30694 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30695 for MODE_VECTOR_BOOL.
30696 * machmode.def (VECTOR_BOOL_MODE): Document.
30697 * genmodes.c (VECTOR_BOOL_MODE): New macro.
30698 (make_vector_bool_mode): New function.
30699 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30701 * lto-streamer-in.c (lto_input_mode_table): Likewise.
30702 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30704 * stor-layout.c (int_mode_for_mode): Likewise.
30705 * tree.c (build_vector_type_for_mode): Likewise.
30706 * varasm.c (output_constant_pool_2): Likewise.
30707 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30708 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
30709 for MODE_VECTOR_BOOL.
30710 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30711 of mode class checks.
30712 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30713 instead of a list of mode class checks.
30714 (expand_vector_scalar_condition): Likewise.
30715 (type_for_widest_vector_mode): Handle BImode as an inner mode.
30717 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30718 Alan Hayward <alan.hayward@arm.com>
30719 David Sherwood <david.sherwood@arm.com>
30721 * machmode.h (mode_size): Change from unsigned short to
30723 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30724 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30725 or if measurement_type is not polynomial.
30726 (fixed_size_mode::includes_p): Check for constant-sized modes.
30727 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30728 return a poly_uint16 rather than an unsigned short.
30729 (emit_mode_size): Change the type of mode_size from unsigned short
30730 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
30731 (emit_mode_adjustments): Cope with polynomial vector sizes.
30732 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30734 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30736 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30737 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30738 * caller-save.c (setup_save_areas): Likewise.
30739 (replace_reg_with_saved_mem): Likewise.
30740 * calls.c (emit_library_call_value_1): Likewise.
30741 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30742 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30743 (gen_lowpart_for_combine): Likewise.
30744 * convert.c (convert_to_integer_1): Likewise.
30745 * cse.c (equiv_constant, cse_insn): Likewise.
30746 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30747 (cselib_subst_to_values): Likewise.
30748 * dce.c (word_dce_process_block): Likewise.
30749 * df-problems.c (df_word_lr_mark_ref): Likewise.
30750 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30751 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30752 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30753 (rtl_for_decl_location): Likewise.
30754 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30755 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30756 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30757 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30758 (expand_expr_real_1): Likewise.
30759 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30760 (pad_below): Likewise.
30761 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30762 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30763 * ira.c (get_subreg_tracking_sizes): Likewise.
30764 * ira-build.c (ira_create_allocno_objects): Likewise.
30765 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30766 (ira_sort_regnos_for_alter_reg): Likewise.
30767 * ira-costs.c (record_operand_costs): Likewise.
30768 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30769 (resolve_simple_move): Likewise.
30770 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30771 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30772 (lra_constraints): Likewise.
30773 (CONST_POOL_OK_P): Reject variable-sized modes.
30774 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30775 (add_pseudo_to_slot, lra_spill): Likewise.
30776 * omp-low.c (omp_clause_aligned_alignment): Likewise.
30777 * optabs-query.c (get_best_extraction_insn): Likewise.
30778 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30779 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30780 (expand_mult_highpart, valid_multiword_target_p): Likewise.
30781 * recog.c (offsettable_address_addr_space_p): Likewise.
30782 * regcprop.c (maybe_mode_change): Likewise.
30783 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30784 * regrename.c (build_def_use): Likewise.
30785 * regstat.c (dump_reg_info): Likewise.
30786 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30787 (find_reloads, find_reloads_subreg_address): Likewise.
30788 * reload1.c (eliminate_regs_1): Likewise.
30789 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30790 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30791 (simplify_binary_operation_1, simplify_subreg): Likewise.
30792 * targhooks.c (default_function_arg_padding): Likewise.
30793 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30794 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30795 (verify_gimple_assign_ternary): Likewise.
30796 * tree-inline.c (estimate_move_cost): Likewise.
30797 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30798 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30799 (get_address_cost_ainc): Likewise.
30800 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30801 (vect_supportable_dr_alignment): Likewise.
30802 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30803 (vectorizable_reduction): Likewise.
30804 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30805 (vectorizable_operation, vectorizable_load): Likewise.
30806 * tree.c (build_same_sized_truth_vector_type): Likewise.
30807 * valtrack.c (cleanup_auto_inc_dec): Likewise.
30808 * var-tracking.c (emit_note_insn_var_location): Likewise.
30809 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30810 (ADDR_VEC_ALIGN): Likewise.
30812 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30813 Alan Hayward <alan.hayward@arm.com>
30814 David Sherwood <david.sherwood@arm.com>
30816 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30818 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30819 or if measurement_type is polynomial.
30820 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30821 * combine.c (make_extraction): Likewise.
30822 * dse.c (find_shift_sequence): Likewise.
30823 * dwarf2out.c (mem_loc_descriptor): Likewise.
30824 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30825 (extract_bit_field, extract_low_bits): Likewise.
30826 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30827 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30828 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30829 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30830 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30831 * reload.c (find_reloads): Likewise.
30832 * reload1.c (alter_reg): Likewise.
30833 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30834 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30835 * tree-if-conv.c (predicate_mem_writes): Likewise.
30836 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30837 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30838 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30839 * valtrack.c (dead_debug_insert_temp): Likewise.
30840 * varasm.c (mergeable_constant_section): Likewise.
30841 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30844 Alan Hayward <alan.hayward@arm.com>
30845 David Sherwood <david.sherwood@arm.com>
30847 * expr.c (expand_assignment): Cope with polynomial mode sizes
30848 when assigning to a CONCAT.
30850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30851 Alan Hayward <alan.hayward@arm.com>
30852 David Sherwood <david.sherwood@arm.com>
30854 * machmode.h (mode_precision): Change from unsigned short to
30856 (mode_to_precision): Return a poly_uint16 rather than an unsigned
30858 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30859 or if measurement_type is not polynomial.
30860 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
30861 in which the mode is already known to be a scalar_int_mode.
30862 * genmodes.c (emit_mode_precision): Change the type of mode_precision
30863 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
30865 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30866 for GET_MODE_PRECISION.
30867 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30868 for GET_MODE_PRECISION.
30869 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30871 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30872 (expand_field_assignment, make_extraction): Likewise.
30873 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30874 (get_last_value): Likewise.
30875 * convert.c (convert_to_integer_1): Likewise.
30876 * cse.c (cse_insn): Likewise.
30877 * expr.c (expand_expr_real_1): Likewise.
30878 * lra-constraints.c (simplify_operand_subreg): Likewise.
30879 * optabs-query.c (can_atomic_load_p): Likewise.
30880 * optabs.c (expand_atomic_load): Likewise.
30881 (expand_atomic_store): Likewise.
30882 * ree.c (combine_reaching_defs): Likewise.
30883 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30884 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30885 * tree.h (type_has_mode_precision_p): Likewise.
30886 * ubsan.c (instrument_si_overflow): Likewise.
30888 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30889 Alan Hayward <alan.hayward@arm.com>
30890 David Sherwood <david.sherwood@arm.com>
30892 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30893 polynomial numbers of units.
30894 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30895 (valid_vector_subparts_p): New function.
30896 (build_vector_type): Remove temporary shim and take the number
30897 of units as a poly_uint64 rather than an int.
30898 (build_opaque_vector_type): Take the number of units as a
30899 poly_uint64 rather than an int.
30900 * tree.c (build_vector_from_ctor): Handle polynomial
30901 TYPE_VECTOR_SUBPARTS.
30902 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30903 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30904 (build_vector_from_val): If the number of units is variable,
30905 use build_vec_duplicate_cst for constant operands and
30906 VEC_DUPLICATE_EXPR otherwise.
30907 (make_vector_type): Remove temporary is_constant ().
30908 (build_vector_type, build_opaque_vector_type): Take the number of
30909 units as a poly_uint64 rather than an int.
30910 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30912 * cfgexpand.c (expand_debug_expr): Likewise.
30913 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30914 (store_constructor, expand_expr_real_1): Likewise.
30915 (const_scalar_mask_from_tree): Likewise.
30916 * fold-const-call.c (fold_const_reduction): Likewise.
30917 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30918 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30919 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30920 (fold_relational_const): Likewise.
30921 (native_interpret_vector): Likewise. Change the size from an
30922 int to an unsigned int.
30923 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30924 TYPE_VECTOR_SUBPARTS.
30925 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30926 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30927 duplicating a non-constant operand into a variable-length vector.
30928 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30929 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30930 * ipa-icf.c (sem_variable::equals): Likewise.
30931 * match.pd: Likewise.
30932 * omp-simd-clone.c (simd_clone_subparts): Likewise.
30933 * print-tree.c (print_node): Likewise.
30934 * stor-layout.c (layout_type): Likewise.
30935 * targhooks.c (default_builtin_vectorization_cost): Likewise.
30936 * tree-cfg.c (verify_gimple_comparison): Likewise.
30937 (verify_gimple_assign_binary): Likewise.
30938 (verify_gimple_assign_ternary): Likewise.
30939 (verify_gimple_assign_single): Likewise.
30940 * tree-pretty-print.c (dump_generic_node): Likewise.
30941 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30942 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30943 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30944 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30945 (vect_shift_permute_load_chain): Likewise.
30946 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30947 (expand_vector_condition, optimize_vector_constructor): Likewise.
30948 (lower_vec_perm, get_compute_type): Likewise.
30949 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30950 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30951 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30952 (vect_recog_mask_conversion_pattern): Likewise.
30953 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30954 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30955 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30956 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30957 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30958 (vectorizable_shift, vectorizable_operation, vectorizable_store)
30959 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30960 (supportable_widening_operation): Likewise.
30961 (supportable_narrowing_operation): Likewise.
30962 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30964 * varasm.c (output_constant): Likewise.
30966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30967 Alan Hayward <alan.hayward@arm.com>
30968 David Sherwood <david.sherwood@arm.com>
30970 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30971 so that both the length == 3 and length != 3 cases set up their
30972 own permute vectors. Add comments explaining why we know the
30973 number of elements is constant.
30974 (vect_permute_load_chain): Likewise.
30976 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
30977 Alan Hayward <alan.hayward@arm.com>
30978 David Sherwood <david.sherwood@arm.com>
30980 * machmode.h (mode_nunits): Change from unsigned char to
30982 (ONLY_FIXED_SIZE_MODES): New macro.
30983 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30984 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30985 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30987 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30988 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30989 or if measurement_type is not polynomial.
30990 * genmodes.c (ZERO_COEFFS): New macro.
30991 (emit_mode_nunits_inline): Make mode_nunits_inline return a
30993 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30994 Use ZERO_COEFFS when emitting initializers.
30995 * data-streamer.h (bp_pack_poly_value): New function.
30996 (bp_unpack_poly_value): Likewise.
30997 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30998 for GET_MODE_NUNITS.
30999 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31000 for GET_MODE_NUNITS.
31001 * tree.c (make_vector_type): Remove temporary shim and make
31002 the real function take the number of units as a poly_uint64
31003 rather than an int.
31004 (build_vector_type_for_mode): Handle polynomial nunits.
31005 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
31006 * emit-rtl.c (const_vec_series_p_1): Likewise.
31007 (gen_rtx_CONST_VECTOR): Likewise.
31008 * fold-const.c (test_vec_duplicate_folding): Likewise.
31009 * genrecog.c (validate_pattern): Likewise.
31010 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
31011 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
31012 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
31013 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
31014 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
31015 * rtlanal.c (subreg_get_info): Likewise.
31016 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31017 (vect_grouped_load_supported): Likewise.
31018 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
31019 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
31020 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
31021 (simplify_const_unary_operation, simplify_binary_operation_1)
31022 (simplify_const_binary_operation, simplify_ternary_operation)
31023 (test_vector_ops_duplicate, test_vector_ops): Likewise.
31024 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
31025 instead of CONST_VECTOR_NUNITS.
31026 * varasm.c (output_constant_pool_2): Likewise.
31027 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
31028 explicit-encoded elements in the XVEC for variable-length vectors.
31030 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31032 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
31034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31035 Alan Hayward <alan.hayward@arm.com>
31036 David Sherwood <david.sherwood@arm.com>
31038 * coretypes.h (fixed_size_mode): Declare.
31039 (fixed_size_mode_pod): New typedef.
31040 * builtins.h (target_builtins::x_apply_args_mode)
31041 (target_builtins::x_apply_result_mode): Change type to
31042 fixed_size_mode_pod.
31043 * builtins.c (apply_args_size, apply_result_size, result_vector)
31044 (expand_builtin_apply_args_1, expand_builtin_apply)
31045 (expand_builtin_return): Update accordingly.
31047 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31049 * cse.c (hash_rtx_cb): Hash only the encoded elements.
31050 * cselib.c (cselib_hash_rtx): Likewise.
31051 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
31052 CONST_VECTOR encoding.
31054 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31055 Jeff Law <law@redhat.com>
31058 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
31059 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
31060 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
31061 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
31064 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
31065 explicitly probe *sp in a noreturn function if there were any callee
31066 register saves or frame pointer is needed.
31068 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31071 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
31072 BLKmode for ternary, binary or unary expressions.
31075 * var-tracking.c (delete_vta_debug_insn): New inline function.
31076 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
31077 insns from get_insns () to NULL instead of each bb separately.
31078 Use delete_vta_debug_insn. No longer static.
31079 (vt_debug_insns_local, variable_tracking_main_1): Adjust
31080 delete_vta_debug_insns callers.
31081 * rtl.h (delete_vta_debug_insns): Declare.
31082 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
31083 instead of variable_tracking_main.
31085 2018-01-03 Martin Sebor <msebor@redhat.com>
31087 PR tree-optimization/83603
31088 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
31089 arguments past the endof the argument list in functions declared
31090 without a prototype.
31091 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
31092 Avoid checking when arguments are null.
31094 2018-01-03 Martin Sebor <msebor@redhat.com>
31097 * doc/extend.texi (attribute const): Fix a typo.
31098 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
31099 issuing -Wsuggest-attribute for void functions.
31101 2018-01-03 Martin Sebor <msebor@redhat.com>
31103 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
31104 offset_int::from instead of wide_int::to_shwi.
31105 (maybe_diag_overlap): Remove assertion.
31106 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
31107 * gimple-ssa-sprintf.c (format_directive): Same.
31108 (parse_directive): Same.
31109 (sprintf_dom_walker::compute_format_length): Same.
31110 (try_substitute_return_value): Same.
31112 2018-01-03 Jeff Law <law@redhat.com>
31114 PR middle-end/83654
31115 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
31116 non-constant residual for zero at runtime and avoid probing in
31117 that case. Reorganize code for trailing problem to mirror handling
31120 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31122 PR tree-optimization/83501
31123 * tree-ssa-strlen.c (get_string_cst): New.
31124 (handle_char_store): Call get_string_cst.
31126 2018-01-03 Martin Liska <mliska@suse.cz>
31128 PR tree-optimization/83593
31129 * tree-ssa-strlen.c: Include tree-cfg.h.
31130 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
31131 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
31132 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
31134 (strlen_dom_walker::before_dom_children): Call
31135 gimple_purge_dead_eh_edges. Dump tranformation with details
31137 (strlen_dom_walker::before_dom_children): Update call by adding
31138 new argument cleanup_eh.
31139 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
31141 2018-01-03 Martin Liska <mliska@suse.cz>
31144 * cif-code.def (VARIADIC_THUNK): New enum value.
31145 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
31148 2018-01-03 Jan Beulich <jbeulich@suse.com>
31150 * sse.md (mov<mode>_internal): Tighten condition for when to use
31151 vmovdqu<ssescalarsize> for TI and OI modes.
31153 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31155 Update copyright years.
31157 2018-01-03 Martin Liska <mliska@suse.cz>
31160 * ipa-visibility.c (function_and_variable_visibility): Skip
31161 functions with noipa attribure.
31163 2018-01-03 Jakub Jelinek <jakub@redhat.com>
31165 * gcc.c (process_command): Update copyright notice dates.
31166 * gcov-dump.c (print_version): Ditto.
31167 * gcov.c (print_version): Ditto.
31168 * gcov-tool.c (print_version): Ditto.
31169 * gengtype.c (create_file): Ditto.
31170 * doc/cpp.texi: Bump @copying's copyright year.
31171 * doc/cppinternals.texi: Ditto.
31172 * doc/gcc.texi: Ditto.
31173 * doc/gccint.texi: Ditto.
31174 * doc/gcov.texi: Ditto.
31175 * doc/install.texi: Ditto.
31176 * doc/invoke.texi: Ditto.
31178 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31180 * vector-builder.h (vector_builder::m_full_nelts): Change from
31181 unsigned int to poly_uint64.
31182 (vector_builder::full_nelts): Update prototype accordingly.
31183 (vector_builder::new_vector): Likewise.
31184 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
31185 (vector_builder::operator ==): Likewise.
31186 (vector_builder::finalize): Likewise.
31187 * int-vector-builder.h (int_vector_builder::int_vector_builder):
31188 Take the number of elements as a poly_uint64 rather than an
31190 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
31191 from unsigned int to poly_uint64.
31192 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
31193 (vec_perm_indices::new_vector): Likewise.
31194 (vec_perm_indices::length): Likewise.
31195 (vec_perm_indices::nelts_per_input): Likewise.
31196 (vec_perm_indices::input_nelts): Likewise.
31197 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
31198 number of elements per input as a poly_uint64 rather than an
31199 unsigned int. Use the original encoding for variable-length
31200 vectors, rather than clamping each individual element.
31201 For the second and subsequent elements in each pattern,
31202 clamp the step and base before clamping their sum.
31203 (vec_perm_indices::series_p): Handle polynomial element counts.
31204 (vec_perm_indices::all_in_range_p): Likewise.
31205 (vec_perm_indices_to_tree): Likewise.
31206 (vec_perm_indices_to_rtx): Likewise.
31207 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
31208 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
31209 (tree_vector_builder::new_binary_operation): Handle polynomial
31210 element counts. Return false if we need to know the number
31211 of elements at compile time.
31212 * fold-const.c (fold_vec_perm): Punt if the number of elements
31213 isn't known at compile time.
31215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31217 * vec-perm-indices.h (vec_perm_builder): Change element type
31218 from HOST_WIDE_INT to poly_int64.
31219 (vec_perm_indices::element_type): Update accordingly.
31220 (vec_perm_indices::clamp): Handle polynomial element_types.
31221 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31222 (vec_perm_indices::all_in_range_p): Likewise.
31223 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
31225 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
31226 polynomial vec_perm_indices element types.
31227 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
31228 * fold-const.c (fold_vec_perm): Likewise.
31229 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
31230 * tree-vect-generic.c (lower_vec_perm): Likewise.
31231 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31232 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
31233 element type to HOST_WIDE_INT.
31235 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31236 Alan Hayward <alan.hayward@arm.com>
31237 David Sherwood <david.sherwood@arm.com>
31239 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
31240 rather than an int. Use plus_constant.
31241 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
31242 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
31244 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31245 Alan Hayward <alan.hayward@arm.com>
31246 David Sherwood <david.sherwood@arm.com>
31248 * calls.c (emit_call_1, expand_call): Change struct_value_size from
31249 a HOST_WIDE_INT to a poly_int64.
31251 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31252 Alan Hayward <alan.hayward@arm.com>
31253 David Sherwood <david.sherwood@arm.com>
31255 * calls.c (load_register_parameters): Cope with polynomial
31256 mode sizes. Require a constant size for BLKmode parameters
31257 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
31258 forces a parameter to be padded at the lsb end in order to
31259 fill a complete number of words, require the parameter size
31260 to be ordered wrt UNITS_PER_WORD.
31262 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31263 Alan Hayward <alan.hayward@arm.com>
31264 David Sherwood <david.sherwood@arm.com>
31266 * reload1.c (spill_stack_slot_width): Change element type
31267 from unsigned int to poly_uint64_pod.
31268 (alter_reg): Treat mode sizes as polynomial.
31270 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31271 Alan Hayward <alan.hayward@arm.com>
31272 David Sherwood <david.sherwood@arm.com>
31274 * reload.c (complex_word_subreg_p): New function.
31275 (reload_inner_reg_of_subreg, push_reload): Use it.
31277 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31278 Alan Hayward <alan.hayward@arm.com>
31279 David Sherwood <david.sherwood@arm.com>
31281 * lra-constraints.c (process_alt_operands): Reject matched
31282 operands whose sizes aren't ordered.
31283 (match_reload): Refer to this check here.
31285 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31286 Alan Hayward <alan.hayward@arm.com>
31287 David Sherwood <david.sherwood@arm.com>
31289 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
31290 that the mode size is in the set {1, 2, 4, 8, 16}.
31292 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31293 Alan Hayward <alan.hayward@arm.com>
31294 David Sherwood <david.sherwood@arm.com>
31296 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
31297 Use plus_constant instead of gen_rtx_PLUS.
31299 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31300 Alan Hayward <alan.hayward@arm.com>
31301 David Sherwood <david.sherwood@arm.com>
31303 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
31304 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
31305 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
31306 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
31307 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
31308 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
31309 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
31310 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
31311 * config/i386/i386.c (ix86_push_rounding): ...this new function.
31312 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
31314 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
31315 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
31316 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
31317 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
31318 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
31319 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
31320 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
31321 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
31322 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
31323 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
31325 * expr.c (emit_move_resolve_push): Treat the input and result
31326 of PUSH_ROUNDING as a poly_int64.
31327 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
31328 (emit_push_insn): Likewise.
31329 * lra-eliminations.c (mark_not_eliminable): Likewise.
31330 * recog.c (push_operand): Likewise.
31331 * reload1.c (elimination_effects): Likewise.
31332 * rtlanal.c (nonzero_bits1): Likewise.
31333 * calls.c (store_one_arg): Likewise. Require the padding to be
31334 known at compile time.
31336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31337 Alan Hayward <alan.hayward@arm.com>
31338 David Sherwood <david.sherwood@arm.com>
31340 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
31341 Use plus_constant instead of gen_rtx_PLUS.
31343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31344 Alan Hayward <alan.hayward@arm.com>
31345 David Sherwood <david.sherwood@arm.com>
31347 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
31348 rather than an int.
31350 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31351 Alan Hayward <alan.hayward@arm.com>
31352 David Sherwood <david.sherwood@arm.com>
31354 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
31355 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
31356 via stack temporaries. Treat the mode size as polynomial too.
31358 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31359 Alan Hayward <alan.hayward@arm.com>
31360 David Sherwood <david.sherwood@arm.com>
31362 * expr.c (expand_expr_real_2): When handling conversions involving
31363 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
31364 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
31365 as a poly_uint64 too.
31367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31368 Alan Hayward <alan.hayward@arm.com>
31369 David Sherwood <david.sherwood@arm.com>
31371 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
31373 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31374 Alan Hayward <alan.hayward@arm.com>
31375 David Sherwood <david.sherwood@arm.com>
31377 * combine.c (can_change_dest_mode): Handle polynomial
31378 REGMODE_NATURAL_SIZE.
31379 * expmed.c (store_bit_field_1): Likewise.
31380 * expr.c (store_constructor): Likewise.
31381 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
31382 and polynomial REGMODE_NATURAL_SIZE.
31383 (gen_lowpart_common): Likewise.
31384 * reginfo.c (record_subregs_of_mode): Likewise.
31385 * rtlanal.c (read_modify_subreg_p): Likewise.
31387 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31388 Alan Hayward <alan.hayward@arm.com>
31389 David Sherwood <david.sherwood@arm.com>
31391 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
31392 numbers of elements.
31394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31395 Alan Hayward <alan.hayward@arm.com>
31396 David Sherwood <david.sherwood@arm.com>
31398 * match.pd: Cope with polynomial numbers of vector elements.
31400 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31401 Alan Hayward <alan.hayward@arm.com>
31402 David Sherwood <david.sherwood@arm.com>
31404 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
31405 in a POINTER_PLUS_EXPR.
31407 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31408 Alan Hayward <alan.hayward@arm.com>
31409 David Sherwood <david.sherwood@arm.com>
31411 * omp-simd-clone.c (simd_clone_subparts): New function.
31412 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
31413 (ipa_simd_modify_function_body): Likewise.
31415 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31416 Alan Hayward <alan.hayward@arm.com>
31417 David Sherwood <david.sherwood@arm.com>
31419 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
31420 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
31421 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
31422 (expand_vector_condition, vector_element): Likewise.
31423 (subparts_gt): New function.
31424 (get_compute_type): Use subparts_gt.
31425 (count_type_subparts): Delete.
31426 (expand_vector_operations_1): Use subparts_gt instead of
31427 count_type_subparts.
31429 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31430 Alan Hayward <alan.hayward@arm.com>
31431 David Sherwood <david.sherwood@arm.com>
31433 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
31434 (vect_compile_time_alias): ...this new function. Do the calculation
31435 on poly_ints rather than trees.
31436 (vect_prune_runtime_alias_test_list): Update call accordingly.
31438 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31439 Alan Hayward <alan.hayward@arm.com>
31440 David Sherwood <david.sherwood@arm.com>
31442 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
31444 (vect_schedule_slp_instance): Likewise.
31446 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31447 Alan Hayward <alan.hayward@arm.com>
31448 David Sherwood <david.sherwood@arm.com>
31450 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
31451 constant and extern definitions for variable-length vectors.
31452 (vect_get_constant_vectors): Note that the number of units
31453 is known to be constant.
31455 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31456 Alan Hayward <alan.hayward@arm.com>
31457 David Sherwood <david.sherwood@arm.com>
31459 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
31460 of units as polynomial. Choose between WIDE and NARROW based
31463 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31464 Alan Hayward <alan.hayward@arm.com>
31465 David Sherwood <david.sherwood@arm.com>
31467 * tree-vect-stmts.c (simd_clone_subparts): New function.
31468 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
31470 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31471 Alan Hayward <alan.hayward@arm.com>
31472 David Sherwood <david.sherwood@arm.com>
31474 * tree-vect-stmts.c (vectorizable_call): Treat the number of
31475 vectors as polynomial. Use build_index_vector for
31476 IFN_GOMP_SIMD_LANE.
31478 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31479 Alan Hayward <alan.hayward@arm.com>
31480 David Sherwood <david.sherwood@arm.com>
31482 * tree-vect-stmts.c (get_load_store_type): Treat the number of
31483 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
31484 for variable-length vectors.
31485 (vectorizable_mask_load_store): Treat the number of units as
31486 polynomial, asserting that it is constant if the condition has
31487 already been enforced.
31488 (vectorizable_store, vectorizable_load): Likewise.
31490 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31491 Alan Hayward <alan.hayward@arm.com>
31492 David Sherwood <david.sherwood@arm.com>
31494 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
31495 of units as polynomial. Punt if we can't tell at compile time
31496 which vector contains the final result.
31498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31499 Alan Hayward <alan.hayward@arm.com>
31500 David Sherwood <david.sherwood@arm.com>
31502 * tree-vect-loop.c (vectorizable_induction): Treat the number
31503 of units as polynomial. Punt on SLP inductions. Use an integer
31504 VEC_SERIES_EXPR for variable-length integer reductions. Use a
31505 cast of such a series for variable-length floating-point
31508 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31509 Alan Hayward <alan.hayward@arm.com>
31510 David Sherwood <david.sherwood@arm.com>
31512 * tree.h (build_index_vector): Declare.
31513 * tree.c (build_index_vector): New function.
31514 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
31515 of units as polynomial, forcibly converting it to a constant if
31516 vectorizable_reduction has already enforced the condition.
31517 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
31518 to create a {1,2,3,...} vector.
31519 (vectorizable_reduction): Treat the number of units as polynomial.
31520 Choose vectype_in based on the largest scalar element size rather
31521 than the smallest number of units. Enforce the restrictions
31524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31525 Alan Hayward <alan.hayward@arm.com>
31526 David Sherwood <david.sherwood@arm.com>
31528 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
31529 number of units as polynomial.
31531 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31532 Alan Hayward <alan.hayward@arm.com>
31533 David Sherwood <david.sherwood@arm.com>
31535 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
31536 * target.def (autovectorize_vector_sizes): Return the vector sizes
31537 by pointer, using vector_sizes rather than a bitmask.
31538 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
31539 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
31540 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
31542 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
31543 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
31544 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
31545 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
31546 * omp-general.c (omp_max_vf): Likewise.
31547 * omp-low.c (omp_clause_aligned_alignment): Likewise.
31548 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
31549 * tree-vect-loop.c (vect_analyze_loop): Likewise.
31550 * tree-vect-slp.c (vect_slp_bb): Likewise.
31551 * doc/tm.texi: Regenerate.
31552 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
31554 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
31555 the vector size as a poly_uint64 rather than an unsigned int.
31556 (current_vector_size): Change from an unsigned int to a poly_uint64.
31557 (get_vectype_for_scalar_type): Update accordingly.
31558 * tree.h (build_truth_vector_type): Take the size and number of
31559 units as a poly_uint64 rather than an unsigned int.
31560 (build_vector_type): Add a temporary overload that takes
31561 the number of units as a poly_uint64 rather than an unsigned int.
31562 * tree.c (make_vector_type): Likewise.
31563 (build_truth_vector_type): Take the number of units as a poly_uint64
31564 rather than an unsigned int.
31566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31567 Alan Hayward <alan.hayward@arm.com>
31568 David Sherwood <david.sherwood@arm.com>
31570 * target.def (get_mask_mode): Take the number of units and length
31571 as poly_uint64s rather than unsigned ints.
31572 * targhooks.h (default_get_mask_mode): Update accordingly.
31573 * targhooks.c (default_get_mask_mode): Likewise.
31574 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
31575 * doc/tm.texi: Regenerate.
31577 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31578 Alan Hayward <alan.hayward@arm.com>
31579 David Sherwood <david.sherwood@arm.com>
31581 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
31582 * omp-general.c (omp_max_vf): Likewise.
31583 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
31584 (expand_omp_simd): Handle polynomial safelen.
31585 * omp-low.c (omplow_simd_context): Add a default constructor.
31586 (omplow_simd_context::max_vf): Change from int to poly_uint64.
31587 (lower_rec_simd_input_clauses): Update accordingly.
31588 (lower_rec_input_clauses): Likewise.
31590 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31591 Alan Hayward <alan.hayward@arm.com>
31592 David Sherwood <david.sherwood@arm.com>
31594 * tree-vectorizer.h (vect_nunits_for_cost): New function.
31595 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
31596 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
31597 (vect_analyze_slp_cost): Likewise.
31598 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31599 (vect_model_load_cost): Likewise.
31601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31602 Alan Hayward <alan.hayward@arm.com>
31603 David Sherwood <david.sherwood@arm.com>
31605 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31606 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31607 from an unsigned int * to a poly_uint64_pod *.
31608 (calculate_unrolling_factor): New function.
31609 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
31611 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31612 Alan Hayward <alan.hayward@arm.com>
31613 David Sherwood <david.sherwood@arm.com>
31615 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31616 from an unsigned int to a poly_uint64.
31617 (_loop_vec_info::slp_unrolling_factor): Likewise.
31618 (_loop_vec_info::vectorization_factor): Change from an int
31620 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31621 (vect_get_num_vectors): New function.
31622 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31623 (vect_get_num_copies): Use vect_get_num_vectors.
31624 (vect_analyze_data_ref_dependences): Change max_vf from an int *
31625 to an unsigned int *.
31626 (vect_analyze_data_refs): Change min_vf from an int * to a
31628 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31629 than an unsigned HOST_WIDE_INT.
31630 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31631 (vect_analyze_data_ref_dependence): Change max_vf from an int *
31632 to an unsigned int *.
31633 (vect_analyze_data_ref_dependences): Likewise.
31634 (vect_compute_data_ref_alignment): Handle polynomial vf.
31635 (vect_enhance_data_refs_alignment): Likewise.
31636 (vect_prune_runtime_alias_test_list): Likewise.
31637 (vect_shift_permute_load_chain): Likewise.
31638 (vect_supportable_dr_alignment): Likewise.
31639 (dependence_distance_ge_vf): Take the vectorization factor as a
31640 poly_uint64 rather than an unsigned HOST_WIDE_INT.
31641 (vect_analyze_data_refs): Change min_vf from an int * to a
31643 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31644 vfm1 as a poly_uint64 rather than an int. Make the same change
31645 for the returned bound_scalar.
31646 (vect_gen_vector_loop_niters): Handle polynomial vf.
31647 (vect_do_peeling): Likewise. Update call to
31648 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31649 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31651 * tree-vect-loop.c (vect_determine_vectorization_factor)
31652 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31653 (vect_get_known_peeling_cost): Likewise.
31654 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31655 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31656 (vect_transform_loop): Likewise. Use the lowest possible VF when
31657 updating the upper bounds of the loop.
31658 (vect_min_worthwhile_factor): Make static. Return an unsigned int
31659 rather than an int.
31660 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31661 polynomial unroll factors.
31662 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31663 (vect_make_slp_decision): Likewise.
31664 (vect_supported_load_permutation_p): Likewise, and polynomial
31666 (vect_analyze_slp_cost): Handle polynomial vf.
31667 (vect_slp_analyze_node_operations): Likewise.
31668 (vect_slp_analyze_bb_1): Likewise.
31669 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31670 than an unsigned HOST_WIDE_INT.
31671 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31672 (vectorizable_load): Handle polynomial vf.
31673 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31675 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31677 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31678 Alan Hayward <alan.hayward@arm.com>
31679 David Sherwood <david.sherwood@arm.com>
31681 * match.pd: Handle bit operations involving three constants
31682 and try to fold one pair.
31684 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
31686 * tree-vect-loop-manip.c: Include gimple-fold.h.
31687 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31688 niters_maybe_zero parameters. Handle other cases besides a step of 1.
31689 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31690 Add a path that uses a step of VF instead of 1, but disable it
31692 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31693 and niters_no_overflow parameters. Update calls to
31694 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31695 Create a new SSA name if the latter choses to use a ste other
31696 than zero, and return it via niters_vector_mult_vf_var.
31697 * tree-vect-loop.c (vect_transform_loop): Update calls to
31698 vect_do_peeling, vect_gen_vector_loop_niters and
31699 slpeel_make_loop_iterate_ntimes.
31700 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31701 (vect_gen_vector_loop_niters): Update declarations after above changes.
31703 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
31705 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31706 128-bit round to integer instructions.
31707 (ceil<mode>2): Likewise.
31708 (btrunc<mode>2): Likewise.
31709 (round<mode>2): Likewise.
31711 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31713 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31714 unaligned VSX load/store on P8/P9.
31715 (expand_block_clear): Allow the use of unaligned VSX
31716 load/store on P8/P9.
31718 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31720 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31722 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31723 swap associated with both a load and a store.
31725 2018-01-02 Andrew Waterman <andrew@sifive.com>
31727 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31728 * config/riscv/riscv.md (clear_cache): Use it.
31730 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
31732 * web.c: Remove out-of-date comment.
31734 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31736 * expr.c (fixup_args_size_notes): Check that any existing
31737 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31738 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31739 (emit_single_push_insn): ...here.
31741 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31743 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31744 (const_vector_encoded_nelts): New function.
31745 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31746 (const_vector_int_elt, const_vector_elt): Declare.
31747 * emit-rtl.c (const_vector_int_elt_1): New function.
31748 (const_vector_elt): Likewise.
31749 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31750 of CONST_VECTOR_ELT.
31752 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31754 * expr.c: Include rtx-vector-builder.h.
31755 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31756 directly on the tree encoding.
31757 (const_vector_from_tree): Likewise.
31758 * optabs.c: Include rtx-vector-builder.h.
31759 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31760 sequence of "u" values.
31761 * vec-perm-indices.c: Include rtx-vector-builder.h.
31762 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31763 directly on the vec_perm_indices encoding.
31765 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31767 * doc/rtl.texi (const_vector): Describe new encoding scheme.
31768 * Makefile.in (OBJS): Add rtx-vector-builder.o.
31769 * rtx-vector-builder.h: New file.
31770 * rtx-vector-builder.c: Likewise.
31771 * rtl.h (rtx_def::u2): Add a const_vector field.
31772 (CONST_VECTOR_NPATTERNS): New macro.
31773 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31774 (CONST_VECTOR_DUPLICATE_P): Likewise.
31775 (CONST_VECTOR_STEPPED_P): Likewise.
31776 (CONST_VECTOR_ENCODED_ELT): Likewise.
31777 (const_vec_duplicate_p): Check for a duplicated vector encoding.
31778 (unwrap_const_vec_duplicate): Likewise.
31779 (const_vec_series_p): Check for a non-duplicated vector encoding.
31780 Say that the function only returns true for integer vectors.
31781 * emit-rtl.c: Include rtx-vector-builder.h.
31782 (gen_const_vec_duplicate_1): Delete.
31783 (gen_const_vector): Call gen_const_vec_duplicate instead of
31784 gen_const_vec_duplicate_1.
31785 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31786 (gen_const_vec_duplicate): Use rtx_vector_builder.
31787 (gen_const_vec_series): Likewise.
31788 (gen_rtx_CONST_VECTOR): Likewise.
31789 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31790 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31791 Build a new vector rather than modifying a CONST_VECTOR in-place.
31792 (handle_special_swappables): Update call accordingly.
31793 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31794 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31795 Build a new vector rather than modifying a CONST_VECTOR in-place.
31796 (handle_special_swappables): Update call accordingly.
31798 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31800 * simplify-rtx.c (simplify_const_binary_operation): Use
31801 CONST_VECTOR_ELT instead of XVECEXP.
31803 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31805 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31806 the selector elements to be different from the data elements
31807 if the selector is a VECTOR_CST.
31808 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31809 ssizetype for the selector.
31811 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31813 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31814 before testing each element individually.
31815 * tree-vect-generic.c (lower_vec_perm): Likewise.
31817 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31819 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31820 * selftest-run-tests.c (selftest::run_tests): Call it.
31821 * vector-builder.h (vector_builder::operator ==): New function.
31822 (vector_builder::operator !=): Likewise.
31823 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31824 (vec_perm_indices::all_from_input_p): New function.
31825 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31826 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31827 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31828 instead of reading the VECTOR_CST directly. Detect whether both
31829 vector inputs are the same before constructing the vec_perm_indices,
31830 and update the number of inputs argument accordingly. Use the
31831 utility functions added above. Only construct sel2 if we need to.
31833 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31835 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31836 the broadcast of the low byte.
31837 (expand_mult_highpart): Use an explicit encoding for the permutes.
31838 * optabs-query.c (can_mult_highpart_p): Likewise.
31839 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31840 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31841 (vectorizable_bswap): Likewise.
31842 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31843 explicit encoding for the power-of-2 permutes.
31844 (vect_permute_store_chain): Likewise.
31845 (vect_grouped_load_supported): Likewise.
31846 (vect_permute_load_chain): Likewise.
31848 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31850 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31851 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31852 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31853 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31854 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31855 (vect_gen_perm_mask_any): Likewise.
31857 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31859 * int-vector-builder.h: New file.
31860 * vec-perm-indices.h: Include int-vector-builder.h.
31861 (vec_perm_indices): Redefine as an int_vector_builder.
31862 (auto_vec_perm_indices): Delete.
31863 (vec_perm_builder): Redefine as a stand-alone class.
31864 (vec_perm_indices::vec_perm_indices): New function.
31865 (vec_perm_indices::clamp): Likewise.
31866 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31867 (vec_perm_indices::new_vector): New function.
31868 (vec_perm_indices::new_expanded_vector): Update for new
31869 vec_perm_indices class.
31870 (vec_perm_indices::rotate_inputs): New function.
31871 (vec_perm_indices::all_in_range_p): Operate directly on the
31872 encoded form, without computing elided elements.
31873 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31874 encoding. Update for new vec_perm_indices class.
31875 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31876 the given vec_perm_builder.
31877 (expand_vec_perm_var): Update vec_perm_builder constructor.
31878 (expand_mult_highpart): Use vec_perm_builder instead of
31879 auto_vec_perm_indices.
31880 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31881 vec_perm_indices instead of auto_vec_perm_indices. Use a single
31882 or double series encoding as appropriate.
31883 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31884 vec_perm_indices instead of auto_vec_perm_indices.
31885 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31886 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31887 (vect_permute_store_chain): Likewise.
31888 (vect_grouped_load_supported): Likewise.
31889 (vect_permute_load_chain): Likewise.
31890 (vect_shift_permute_load_chain): Likewise.
31891 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31892 (vect_transform_slp_perm_load): Likewise.
31893 (vect_schedule_slp_instance): Likewise.
31894 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31895 (vectorizable_mask_load_store): Likewise.
31896 (vectorizable_bswap): Likewise.
31897 (vectorizable_store): Likewise.
31898 (vectorizable_load): Likewise.
31899 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31900 vec_perm_indices instead of auto_vec_perm_indices. Use
31901 tree_to_vec_perm_builder to read the vector from a tree.
31902 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31903 vec_perm_builder instead of a vec_perm_indices.
31904 (have_whole_vector_shift): Use vec_perm_builder and
31905 vec_perm_indices instead of auto_vec_perm_indices. Leave the
31906 truncation to calc_vec_perm_mask_for_shift.
31907 (vect_create_epilog_for_reduction): Likewise.
31908 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31909 from auto_vec_perm_indices to vec_perm_indices.
31910 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31911 instead of changing individual elements.
31912 (aarch64_vectorize_vec_perm_const): Use new_vector to install
31913 the vector in d.perm.
31914 * config/arm/arm.c (expand_vec_perm_d::perm): Change
31915 from auto_vec_perm_indices to vec_perm_indices.
31916 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31917 instead of changing individual elements.
31918 (arm_vectorize_vec_perm_const): Use new_vector to install
31919 the vector in d.perm.
31920 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31921 Update vec_perm_builder constructor.
31922 (rs6000_expand_interleave): Likewise.
31923 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31924 (rs6000_expand_interleave): Likewise.
31926 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31928 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31929 to qimode could truncate the indices.
31930 * optabs.c (expand_vec_perm_var): Likewise.
31932 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
31934 * Makefile.in (OBJS): Add vec-perm-indices.o.
31935 * vec-perm-indices.h: New file.
31936 * vec-perm-indices.c: Likewise.
31937 * target.h (vec_perm_indices): Replace with a forward class
31939 (auto_vec_perm_indices): Move to vec-perm-indices.h.
31940 * optabs.h: Include vec-perm-indices.h.
31941 (expand_vec_perm): Delete.
31942 (selector_fits_mode_p, expand_vec_perm_var): Declare.
31943 (expand_vec_perm_const): Declare.
31944 * target.def (vec_perm_const_ok): Replace with...
31945 (vec_perm_const): ...this new hook.
31946 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31947 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31948 * doc/tm.texi: Regenerate.
31949 * optabs.def (vec_perm_const): Delete.
31950 * doc/md.texi (vec_perm_const): Likewise.
31951 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31952 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31953 expand_vec_perm for constant permutation vectors. Assert that
31954 the mode of variable permutation vectors is the integer equivalent
31955 of the mode that is being permuted.
31956 * optabs-query.h (selector_fits_mode_p): Declare.
31957 * optabs-query.c: Include vec-perm-indices.h.
31958 (selector_fits_mode_p): New function.
31959 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31960 is defined, instead of checking whether the vec_perm_const_optab
31961 exists. Use targetm.vectorize.vec_perm_const instead of
31962 targetm.vectorize.vec_perm_const_ok. Check whether the indices
31963 fit in the vector mode before using a variable permute.
31964 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31965 vec_perm_indices instead of an rtx.
31966 (expand_vec_perm): Replace with...
31967 (expand_vec_perm_const): ...this new function. Take the selector
31968 as a vec_perm_indices rather than an rtx. Also take the mode of
31969 the selector. Update call to shift_amt_for_vec_perm_mask.
31970 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31971 Use vec_perm_indices::new_expanded_vector to expand the original
31972 selector into bytes. Check whether the indices fit in the vector
31973 mode before using a variable permute.
31974 (expand_vec_perm_var): Make global.
31975 (expand_mult_highpart): Use expand_vec_perm_const.
31976 * fold-const.c: Includes vec-perm-indices.h.
31977 * tree-ssa-forwprop.c: Likewise.
31978 * tree-vect-data-refs.c: Likewise.
31979 * tree-vect-generic.c: Likewise.
31980 * tree-vect-loop.c: Likewise.
31981 * tree-vect-slp.c: Likewise.
31982 * tree-vect-stmts.c: Likewise.
31983 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31985 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31986 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31987 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31988 (aarch64_vectorize_vec_perm_const): ...this new function.
31989 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31990 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31991 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31992 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31993 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31994 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31995 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31997 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
31998 check for NEON modes.
31999 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
32000 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
32001 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
32002 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
32004 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
32005 the old VEC_PERM_CONST conditions.
32006 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
32007 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
32008 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
32009 (ia64_vectorize_vec_perm_const_ok): Merge into...
32010 (ia64_vectorize_vec_perm_const): ...this new function.
32011 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
32012 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
32013 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
32014 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
32015 * config/mips/mips.c (mips_expand_vec_perm_const)
32016 (mips_vectorize_vec_perm_const_ok): Merge into...
32017 (mips_vectorize_vec_perm_const): ...this new function.
32018 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
32019 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
32020 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
32021 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
32022 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
32023 (rs6000_expand_vec_perm_const): Delete.
32024 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
32026 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32027 (altivec_expand_vec_perm_const_le): Take each operand individually.
32028 Operate on constant selectors rather than rtxes.
32029 (altivec_expand_vec_perm_const): Likewise. Update call to
32030 altivec_expand_vec_perm_const_le.
32031 (rs6000_expand_vec_perm_const): Delete.
32032 (rs6000_vectorize_vec_perm_const_ok): Delete.
32033 (rs6000_vectorize_vec_perm_const): New function.
32034 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32035 an element count and rtx array.
32036 (rs6000_expand_extract_even): Update call accordingly.
32037 (rs6000_expand_interleave): Likewise.
32038 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
32039 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
32040 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
32041 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
32042 (rs6000_expand_vec_perm_const): Delete.
32043 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
32044 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32045 (altivec_expand_vec_perm_const_le): Take each operand individually.
32046 Operate on constant selectors rather than rtxes.
32047 (altivec_expand_vec_perm_const): Likewise. Update call to
32048 altivec_expand_vec_perm_const_le.
32049 (rs6000_expand_vec_perm_const): Delete.
32050 (rs6000_vectorize_vec_perm_const_ok): Delete.
32051 (rs6000_vectorize_vec_perm_const): New function. Remove stray
32052 reference to the SPE evmerge intructions.
32053 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
32054 an element count and rtx array.
32055 (rs6000_expand_extract_even): Update call accordingly.
32056 (rs6000_expand_interleave): Likewise.
32057 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
32058 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
32060 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
32062 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32064 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
32065 vector mode and that that mode matches the mode of the data
32067 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
32068 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
32069 directly using expand_vec_perm_1 when forcing selectors into
32071 (expand_vec_perm_var): New function, split out from expand_vec_perm.
32073 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32075 * optabs-query.h (can_vec_perm_p): Delete.
32076 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
32077 * optabs-query.c (can_vec_perm_p): Split into...
32078 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
32079 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
32080 particular selector is valid.
32081 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32082 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32083 (vect_grouped_load_supported): Likewise.
32084 (vect_shift_permute_load_chain): Likewise.
32085 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
32086 (vect_transform_slp_perm_load): Likewise.
32087 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32088 (vectorizable_bswap): Likewise.
32089 (vect_gen_perm_mask_checked): Likewise.
32090 * fold-const.c (fold_ternary_loc): Likewise. Don't take
32091 implementations of variable permutation vectors into account
32092 when deciding which selector to use.
32093 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
32094 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
32095 with a false third argument.
32096 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
32097 to test whether the constant selector is valid and can_vec_perm_var_p
32098 to test whether a variable selector is valid.
32100 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32102 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
32103 * optabs-query.c (can_vec_perm_p): Likewise.
32104 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
32105 instead of vec_perm_indices.
32106 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
32107 (vect_gen_perm_mask_checked): Likewise,
32108 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
32109 (vect_gen_perm_mask_checked): Likewise,
32111 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
32113 * optabs-query.h (qimode_for_vec_perm): Declare.
32114 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
32115 (qimode_for_vec_perm): ...this new function.
32116 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
32118 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
32120 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
32121 does not have a conditional at the top.
32123 2018-01-02 Richard Biener <rguenther@suse.de>
32125 * ipa-inline.c (big_speedup_p): Fix expression.
32127 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32130 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
32133 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
32137 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
32138 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
32139 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
32140 cond_taken_branch_cost 3->4.
32142 2018-01-01 Jakub Jelinek <jakub@redhat.com>
32144 PR tree-optimization/83581
32145 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
32146 TODO_cleanup_cfg if any changes have been made.
32148 PR middle-end/83608
32149 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
32150 convert_modes if target mode has the right side, but different mode
32153 PR middle-end/83609
32154 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
32155 last argument when extracting from CONCAT. If either from_real or
32156 from_imag is NULL, use expansion through memory. If result is not
32157 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
32158 the parts directly to inner mode, if even that fails, use expansion
32161 PR middle-end/83623
32162 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
32163 check for bswap in mode rather than HImode and use that in expand_unop
32166 Copyright (C) 2018 Free Software Foundation, Inc.
32168 Copying and distribution of this file, with or without modification,
32169 are permitted in any medium without royalty provided the copyright
32170 notice and this notice are preserved.