1 2018-11-28 Alan Modra <amodra@gmail.com>
3 * xcoffout.c (do_block): Signed/unsigned warning fix.
5 2018-11-28 Richard Biener <rguenther@suse.de>
7 PR tree-optimization/79351
8 * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
9 empty CONSTRUCTORs ensure the store is at a constant position.
11 2018-11-28 Richard Biener <rguenther@suse.de>
13 PR tree-optimization/88229
14 * tree-ssa.c (non_rewritable_mem_ref_base): Check DECL_SIZE_UNIT
15 is an INTEGER_CST before accessing it so.
17 2018-11-28 Sam Tebbs <sam.tebbs@arm.com>
19 * doc/invoke.texi (-mtune=): Remove obsolete CPU names.
21 2018-11-28 Jakub Jelinek <jakub@redhat.com>
24 * config/i386/i386.c (ix86_expand_sse_movcc): Handle DFmode and
25 SFmode using sse4_1_blendvs[sd] with TARGET_SSE4_1. Formatting fixes.
26 * config/i386/sse.md (sse4_1_blendv<ssemodesuffix>): New pattern.
28 2018-11-27 Martin Liska <mliska@suse.cz>
30 * gcov.c (generate_results): Append current_working_directory
33 2018-11-27 Mike Gulick <mgulick@mathworks.com>
36 * input.c (dump_location_info): Dump reason and included_from
37 fields from line_map_ordinary struct. Fix indentation when
39 * diagnostic-show-locus.c (num_digits, num_digits): Move to
40 diagnostic.c to allow it to be utilized by input.c.
41 * diagnostic.c (num_digits, selftest::test_num_digits): Moved
43 (selftest::diagnostic_c_tests): Run selftest::test_num_digits.
44 * diagnostic.h (num_digits): Add extern definition.
46 2018-11-27 Fredrik Noring <noring@nocrew.org>
48 * config/mips/mips.c (mips_reorg_process_insns)
49 (mips_option_override): Handle `-mfix-r5900'.
50 * config/mips/mips.h (ASM_SPEC): Add `mfix-r5900' and
52 * config/mips/mips.opt (mfix-r5900): New option.
53 * doc/invoke.texi: Document the `r5900' processor name, and
54 `-mfix-r5900' and `-mno-fix-r5900' options.
56 2018-11-27 Jakub Jelinek <jakub@redhat.com>
59 * config/rs6000/rs6000.c (print_operand) <case 'D'>: Use
60 output_operand_lossage instead of gcc_assert.
63 <case 'V'>: Use output_operand_lossage instead of gcc_unreachable.
65 2018-11-27 Jeff Law <law@redhat.com>
67 * config/riscv/riscv (riscv_block_mvoe_straight): Use RETURN_BEGIN
68 in call to move_by_pieces.
70 * config/sh/sh-mem.c (expand_block_move): Use RETURN_BEGIN in call
73 * config/lm32/lm32.c (lm32_block_move_inline): Use RETURN_BEGIN in
74 call to move_by_pieces.
76 * config/mips/mips.c (mips_block_move_straight): Use RETURN_BEGIN
77 in call to move_by_pieces.
79 * config/microblaze/microblaze.c (microblaze_block_move_straight): Use
80 RETURN_BEGIN in call to move_by_pieces.
81 (microblaze_expand_block_move): Likewise.
83 2018-11-27 Tamar Christina <tamar.christina@arm.com>
85 * doc/md.texi (xorsign): Document it.
87 2018-11-27 Martin Liska <mliska@suse.cz>
89 * config/gnu-user.h (TARGET_F951_OPTIONS): New.
90 * gcc.c (find_fortran_preinclude_file): New function
91 to handle Fortran pre-include.
93 2018-11-27 Martin Liska <mliska@suse.cz>
95 * asan.c (asan_emit_stack_protection): Use new enum values
96 instead of int constants.
97 * builtins.c (expand_builtin_memory_copy_args): Replace int
98 type with memop_ret enum type.
99 (expand_builtin_mempcpy_args): Likewise.
100 (expand_builtin_memcpy): Use new enum values
101 instead of int constants. Likewise.
102 (expand_builtin_mempcpy): Likewise.
103 (expand_movstr): Likewise.
104 (expand_builtin_strcpy_args): Likewise.
105 (expand_builtin_stpcpy_1): Likewise.
106 (expand_builtin_strncpy): Likewise.
107 (expand_builtin_memset_args): Likewise.
108 * expr.c (move_by_pieces_d::finish_endp): Rename to ...
109 (move_by_pieces_d::finish_retmode): ... this.
110 (move_by_pieces): Change last argument type to memop_ret.
111 (store_by_pieces): Use new enum values
112 instead of int constants.
113 (emit_block_move_hints): Likewise.
114 (emit_push_insn): Likewise.
115 (store_expr): Likewise.
116 * expr.h (store_by_pieces): Change int to newly added enum
118 * rtl.h (enum memop_ret): Define.
119 (move_by_pieces): Use the enum type.
121 2018-11-27 Alan Modra <amodra@gmail.com>
123 * config/rs6000/aix71.h (ASM_SPEC): Don't select default -maix64
125 (ASM_CPU_SPEC): Do so here. Rewrite using if .. else if .. specs
126 form. Error on missing -mcpu case.
127 * config/rs6000/driver-rs6000.c (asm_names <_AIX>): Update NULL case.
128 (asm_names <!_AIX>): Add missing cpus. Update NULL case. Apply
129 PR63177 fix for -mcpu=power8 and -mcpu=powerpc64le.
130 * config/rs6000/rs6000.h (ASM_CPU_SPEC): Rewrite using if ..
131 else if .. specs form. Error on missing -mcpu case. Don't output
132 duplicate -maltivec. Apply PR63177 fix for -mcpu=powerpc64le.
134 2018-11-26 David Malcolm <dmalcolm@redhat.com>
136 * dump-context.h (dump_context::dump_loc): Convert 1st param from
137 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
138 const dump_location_t & to const dump_user_location_t &.
139 (dump_context::dump_loc_immediate): Convert 2nd param from
140 const dump_location_t & to const dump_user_location_t &.
141 (dump_context::dump_gimple_stmt): Convert 1st param from
142 dump_flags_t to const dump_metadata_t &.
143 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
144 2nd param from const dump_location_t & to
145 const dump_user_location_t &.
146 (dump_context::dump_gimple_expr): Convert 1st param from
147 dump_flags_t to const dump_metadata_t &.
148 (dump_context::dump_gimple_expr_loc): Likewise; convert
149 2nd param from const dump_location_t & to
150 const dump_user_location_t &.
151 (dump_context::dump_generic_expr): Convert 1st param from
152 dump_flags_t to const dump_metadata_t &.
153 (dump_context::dump_generic_expr_loc): Likewise; convert
154 2nd param from const dump_location_t & to
155 const dump_user_location_t &.
156 (dump_context::dump_printf_va): Convert 1st param from
157 dump_flags_t to const dump_metadata_t &.
158 (dump_context::dump_printf_loc_va): Likewise; convert
159 2nd param from const dump_location_t & to
160 const dump_user_location_t &.
161 (dump_context::dump_dec): Convert 1st param from
162 dump_flags_t to const dump_metadata_t &.
163 (dump_context::dump_symtab_node): Likewise.
164 (dump_context::begin_scope): Split out 2nd param into
165 user and impl locations.
166 (dump_context::ensure_pending_optinfo): Add metadata param.
167 (dump_context::begin_next_optinfo): Replace dump_location_t param
168 with metadata and user location.
169 * dumpfile.c (dump_context::dump_loc): Convert 1st param from
170 dump_flags_t to const dump_metadata_t &. Convert 2nd param from
171 const dump_location_t & to const dump_user_location_t &.
172 (dump_context::dump_loc_immediate): Convert 2nd param from
173 const dump_location_t & to const dump_user_location_t &.
174 (dump_context::dump_gimple_stmt): Convert 1st param from
175 dump_flags_t to const dump_metadata_t &.
176 (dump_context::void dump_gimple_stmt_loc): Likewise; convert
177 2nd param from const dump_location_t & to
178 const dump_user_location_t &.
179 (dump_context::dump_gimple_expr): Convert 1st param from
180 dump_flags_t to const dump_metadata_t &.
181 (dump_context::dump_gimple_expr_loc): Likewise; convert
182 2nd param from const dump_location_t & to
183 const dump_user_location_t &.
184 (dump_context::dump_generic_expr): Convert 1st param from
185 dump_flags_t to const dump_metadata_t &.
186 (dump_context::dump_generic_expr_loc): Likewise; convert
187 2nd param from const dump_location_t & to
188 const dump_user_location_t &.
189 (dump_context::dump_printf_va): Convert 1st param from
190 dump_flags_t to const dump_metadata_t &.
191 (dump_context::dump_printf_loc_va): Likewise; convert
192 2nd param from const dump_location_t & to
193 const dump_user_location_t &.
194 (dump_context::dump_dec): Convert 1st param from
195 dump_flags_t to const dump_metadata_t &.
196 (dump_context::dump_symtab_node): Likewise.
197 (dump_context::begin_scope): Split out 2nd param into
198 user and impl locations.
199 (dump_context::ensure_pending_optinfo): Add metadata param.
200 (dump_context::begin_next_optinfo): Replace dump_location_t param
201 with metadata and user location.
202 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
203 const dump_metadata_t &.
204 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
205 const dump_location_t & to const dump_user_location_t &.
206 (dump_gimple_expr): Convert 1st param from dump_flags_t to
207 const dump_metadata_t &.
208 (dump_gimple_expr_loc): Likewise; convert 2nd param from
209 const dump_location_t & to const dump_user_location_t &.
210 (dump_generic_expr): Convert 1st param from dump_flags_t to
211 const dump_metadata_t &.
212 (dump_generic_expr_loc): Likewise; convert 2nd param from
213 const dump_location_t & to const dump_user_location_t &.
214 (dump_printf): Convert 1st param from dump_flags_t to
215 const dump_metadata_t &.
216 (dump_printf_loc): Likewise; convert 2nd param from
217 const dump_location_t & to const dump_user_location_t &.
218 (dump_dec): Convert 1st param from dump_flags_t to
219 const dump_metadata_t &.
220 (dump_symtab_node): Likewise.
221 (dump_begin_scope): Split out 2nd param into user and impl
223 (selftest::assert_impl_location_eq): New function.
224 (ASSERT_IMPL_LOCATION_EQ): New macro.
225 (selftest::test_impl_location): Update to use
226 ASSERT_IMPL_LOCATION_EQ.
227 (selftest::test_capture_of_dump_calls): Convert "loc" to
228 dump_user_location_t. Add ASSERT_IMPL_LOCATION_EQ throughout,
229 verifying line numbers of dump emissions.
230 * dumpfile.h (class dump_metadata_t): New class.
231 (dump_printf): Convert 1st param from dump_flags_t to
232 const dump_metadata_t &.
233 (dump_printf_loc): Likewise; convert 2nd param from
234 const dump_location_t & to const dump_user_location_t &.
235 (dump_generic_expr_loc): Likewise.
236 (dump_generic_expr): Convert 1st param from dump_flags_t to
237 const dump_metadata_t &.
238 (dump_gimple_stmt_loc): Likewise; convert 2nd param from
239 const dump_location_t & to const dump_user_location_t &.
240 (dump_gimple_stmt): Convert 1st param from dump_flags_t to
241 const dump_metadata_t &.
242 (dump_gimple_expr_loc): Likewise; convert 2nd param from
243 const dump_location_t & to const dump_user_location_t &.
244 (dump_gimple_expr): Convert 1st param from dump_flags_t to
245 const dump_metadata_t &.
246 (dump_symtab_node): Likewise.
247 (dump_dec): Likewise.
248 (dump_begin_scope): Split out 2nd param into user and impl
250 (auto_dump_scope::auto_dump_scope): Split "loc" param into a user
251 location and impl_location, and capture the impl_location.
252 (AUTO_DUMP_SCOPE): Rename param from LOC to USER_LOC.
253 * loop-unroll.c (report_unroll): Update for changes to
254 dump_printf_loc and dump_printf.
255 * opt-problem.cc (opt_problem::opt_problem): Update for change to
257 * optinfo-emit-json.cc
258 (selftest::test_building_json_from_dump_calls): Convert "loc" from
259 dump_location_t to dump_user_location_t.
260 * optinfo.cc (optinfo::emit_for_opt_problem): Update for change in
262 * profile.c (compute_branch_probabilities): Update for change to
264 * selftest.h (ASSERT_STR_CONTAINS_AT): New macro.
265 * tree-vect-slp.c (vect_print_slp_tree): Update for change to
268 2018-11-27 Jozef Lawrynowicz <jozef.l@mittosystems.com>
270 * doc/sourcebuild.texi: Document check_effective_target_int_eq_float
271 and check_effective_target_ptr_eq_long.
273 2018-11-27 Alan Modra <amodra@gmail.com>
275 * config.gcc (powerpc*-*-freebsd*, powerpc-*-netbsd*),
276 (powerpc-*-eabisimaltivec*, powerpc-*-eabisim*, powerpc-*-elf*),
277 (powerpc-*-eabialtivec*, powerpc-*-eabi*, powerpc-*-rtems*),
278 (powerpc-wrs-vxworks*, powerpc-*-lynxos*, powerpcle-*-elf*),
279 (powerpcle-*-eabisim*, powerpcle-*-eabi*): Add gnu-user.h to tm_file.
280 * config/rs6000/freebsd.h (CPLUSPLUS_CPP_SPEC),
281 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
282 (ASM_APP_ON, ASM_APP_OFF): Don't define.
283 * config/rs6000/freebsd64.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
284 * config/rs6000/lynx.h (ASM_APP_ON, ASM_APP_OFF): Don't define.
285 * config/rs6000/linux64.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
286 * config/rs6000/netbsd.h (CPLUSPLUS_CPP_SPEC),
287 (LINK_GCC_C_SEQUENCE_SPEC): Undef.
288 * config/rs6000/rtems.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
289 * config/rs6000/sysv4.h (GNU_USER_TARGET_CRTI): Redefine.
290 (GNU_USER_TARGET_CRTN): Redefine.
291 (CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC.
292 (LIB_LINUX_SPEC): Use GNU_USER_TARGET_LIB_SPEC.
293 (CRTOFFLOADBEGIN, CRTOFFLOADEND): Don't define.
294 (STARTFILE_LINUX_SPEC): Define as GNU_USER_TARGET_STARTFILE_SPEC.
295 (ENDFILE_LINUX_SPEC): Define as GNU_USER_TARGET_ENDFILE_SPEC.
296 (UCLIBC_DYNAMIC_LINKER, CHOOSE_DYNAMIC_LINKER): Don't define.
297 (LINK_EH_SPEC): Don't define.
299 2018-11-26 Martin Sebor <msebor@redhat.com>
302 * expr.c (string_constant): Handle top-level decls of all character
303 types and subobjects of narrow character type.
305 2018-11-27 Alan Modra <amodra@gmail.com>
307 * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
308 * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
309 GNU_USER_TARGET_OS_CPP_BUILTINS.
310 (RS6000_ABI_NAME): Define.
311 * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
312 GNU_USER_TARGET_OS_CPP_BUILTINS.
313 (MUSL_DYNAMIC_LINKER32): Undef before defining.
314 (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
315 (CHOOSE_DYNAMIC_LINKER): Don't define.
316 (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
317 * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
318 (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
320 (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
321 TARGET_OS_CPP_BUILTINS.
323 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
325 * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
327 2018-11-26 Jakub Jelinek <jakub@redhat.com>
330 * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
331 and !TARGET_64BIT, return NULL_TREE.
334 * dwarf2out.c (secname_for_decl): For functions with
335 DECL_SECTION_NAME if in_cold_section_p, try to return
336 current_function_section's name if it is a named section.
338 2018-11-26 Maya Rashish <coypu@sdf.org>
341 * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
342 * config/x-netbsd: New file.
343 * config/host-netbsd: New file.
345 2018-11-26 Jozef Lawrynowicz <jozef.l@mittosystems.com>
347 * doc/sourcebuild.texi: Document check_effective_target_size20plus.
348 Clarify documentation for check_effective_target_size32plus.
350 2018-11-26 Aaron Sawdey <acsawdey@linux.ibm.com>
352 * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
353 and modify expand_strncmp_vec_sequence.
354 (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
355 (generate_6432_conversion): New function.
356 (expand_block_compare): Add support for vsx.
357 (expand_block_compare_gpr): New function.
358 * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
359 default limit to 63 because of more compact vsx code.
361 2018-11-26 Uros Bizjak <ubizjak@gmail.com>
364 * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
365 for registers for which no debug information can be generated.
366 Use INVALID_REGNUM for non-existent registers.
367 (dbx64_register_map): Ditto.
368 (svr4_dbx_register_map): Ditto.
370 2018-11-26 Sandra Loosemore <sandra@codesourcery.com>
373 * doc/invoke.texi (Optimize Options): Document that
374 -freorder-functions also uses "hot" and "cold" attributes.
376 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
378 * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
380 2018-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
382 * config/arm/types.md (mul64): Rename to...
383 (widen_mul64): ... This.
384 * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
385 * config/arm/cortex-a15.md: Likewise.
386 * config/arm/cortex-a5.md: Likewise.
387 * config/arm/cortex-a53.md: Likewise.
388 * config/arm/cortex-a57.md: Likewise.
389 * config/arm/cortex-a7.md: Likewise.
390 * config/arm/cortex-m4.md: Likewise.
391 * config/arm/exynos-m1.md: Likewise.
392 * config/arm/marvell-pj4.md: Likewise.
393 * config/arm/xgene1.md: Likewise.
395 2018-11-26 Richard Biener <rguenther@suse.de>
397 PR tree-optimization/88182
398 * tree-vect-loop.c (vectorizable_reduction): Pick up single
399 correct reduc_def_info.
400 * tree-vect-slp.c (vect_analyze_slp_instance): Set
401 STMT_VINFO_REDUC_DEF of the first stmt.
403 2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
405 * doc/invoke.texi: Document z14/arch12 -march option.
407 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
410 * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
411 (Warning Options): Likewise.
413 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
416 * doc/extend.texi (Common Function Attributes): Clarify that
417 functions with "const" attribute can read const global variables.
419 2018-11-26 Alan Modra <amodra@gmail.com>
421 * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
423 2018-11-25 Sandra Loosemore <sandra@codesourcery.com>
426 * doc/extend.texi (Common Variable Attributes): Use preferred
427 placement of type attributes in examples, plus whitespace fixes.
428 (Type Attributes): Clarify why placement of attributes
429 immediately after struct/union/enum keyword is preferred.
430 (Common Type Attributes): Use preferred placement of type
431 attributes in examples, plus more whitespace fixes.
433 2018-11-25 Paul Koning <ni1d@arrl.net>
435 * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
437 2018-11-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
439 * doc/sourcebuild.texi (Effective-Target Keywords, Environment
440 attributes): Document d_runtime.
442 2018-11-25 Vladimir Makarov <vmakarov@redhat.com>
445 * ira-costs.c (record_operand_costs): Initiate register move cost
448 2018-11-23 Jeff Law <law@redhat.com>
450 PR rtl-optimization/87468
451 * tree-ssa-threadupdate.c (create_block_for_threading): Clear
452 EDGE_IGNORE on all outgoing edges of the duplicate block.
454 2018-11-23 Vladimir Makarov <vmakarov@redhat.com>
457 * ira-costs.c (record_operand_costs): Use bigger hard reg class if
458 its mode does not fit to the original class.
460 2018-11-23 Martin Sebor <msebor@redhat.com>
462 PR tree-optimization/87756
463 * expr.c (string_constant): Synthesize a string literal from
464 the address of a constant character.
465 * tree.c (build_string_literal): Add an argument.
466 * tree.h (build_string_literal): Same.
468 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
470 * config/aarch64/aarch64-cores.def: Define emag.
471 * config/aarch64/aarch64-tune.md: Regenerated with emag.
472 * config/aarch64/aarch64.c (emag_tunings): New struct.
473 * doc/invoke.texi: Document mtune value.
475 2018-11-23 Christoph Muellner <christoph.muellner@theobroma-systems.com>
476 Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
478 * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
480 * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
482 * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
484 * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
487 2018-11-23 Richard Biener <rguenther@suse.de>
489 PR tree-optimization/88149
490 * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
491 the case where there are two different def types for the
492 same operand at different operand position in the same stmt.
494 2018-23-11 Mihail Ionescu <mihail.ionescu@arm.com>
496 * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
497 gen_atomic_compare_swap_1.
498 (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
499 (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
500 (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
501 (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
502 (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
504 * config/arm/arm.md (neon_vext<mode>),
505 (neon_vrev64<mode>, neon_vrev32<mode>),
506 (neon_vrev16<mode>, neon_vtrn<mode>_internal),
507 (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
508 before the pattern name.
509 * config/arm/sync.md:
510 (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
511 (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
513 2018-11-23 Jakub Jelinek <jakub@redhat.com>
515 PR tree-optimization/86614
516 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
517 if TREE_NO_WARNING is set on ref.ref.
519 2018-11-22 Sandra Loosemore <sandra@codesourcery.com>
520 Alan Coopersmith <alan.coopersmith@oracle.com>
523 * doc/extend.texi (Designated Inits): Clarify handling of multiple
524 initializers for unions.
526 2018-11-22 Jan Hubicka <jh@suse.cz>
529 * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
530 parameters; do not warn here.
531 (odr_subtypes_equivalent_p): Likewise.
532 (warn_odr): Fix typo.
533 (warn_types_mismatch): Do not output confused warnings on integer types.
534 (odr_types_equivalent_p): Update.
536 2018-11-22 Jakub Jelinek <jakub@redhat.com>
538 * config/i386/i386.c (ix86_option_override_internal,
539 ix86_can_inline_p, classify_argument, construct_container,
540 ix86_expand_prologue, ix86_expand_split_stack_prologue,
541 ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
542 expand_setmem_epilogue_via_loop, promote_duplicated_reg,
543 ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
546 * config/i386/i386.c (ix86_option_override_internal): For
547 stack_protector_guard related options, use opts_set->x_ instead
548 of global_options_set. and prefix options with opts->x_ . Move
549 defaults for offset and reg into else block.
551 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
553 * config/i386/i386.c (ix86_check_avx_upper_register):
554 Return true for all SSE registers with mode bitsize > 128.
556 2018-11-22 Vladimir Makarov <vmakarov@redhat.com>
558 PR rtl-optimization/87718
559 * ira-costs.c: Remove trailing white-spaces.
560 (record_operand_costs): Add a special treatment for moves
561 involving a hard register.
563 2018-11-22 Uros Bizjak <ubizjak@gmail.com>
565 * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
566 (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
568 2018-11-22 Martin Liska <mliska@suse.cz>
570 * common/config/i386/i386-common.c (processor_names): Add
571 static assert and add missing "znver2".
572 (ix86_get_valid_option_values): Add checking assert for null
573 values and add "native" value if feasible.
574 * config/i386/i386.h: Do not declare size of processor_names.
575 * common/config/i386/i386-common.c:
576 * config/i386/i386.c: Add static assert for size
577 of processor_cost_table.
579 2018-11-22 Thomas Preud'homme <thomas.preudhomme@linaro.org>
581 * target-insns.def (stack_protect_combined_set): Define new standard
583 (stack_protect_combined_test): Likewise.
584 * cfgexpand.c (stack_protect_prologue): Try new
585 stack_protect_combined_set pattern first.
586 * function.c (stack_protect_epilogue): Try new
587 stack_protect_combined_test pattern first.
588 * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
589 parameters to control which register to use as PIC register and force
590 reloading PIC register respectively. Insert in the stream of insns if
592 (legitimize_pic_address): Expose above new parameters in prototype and
593 adapt recursive calls accordingly. Use pic_reg if non null instead of
595 (arm_load_pic_register): Add pic_reg parameter and use it if non null.
596 (arm_legitimize_address): Adapt to new legitimize_pic_address
598 (thumb_legitimize_address): Likewise.
599 (arm_emit_call_insn): Adapt to require_pic_register prototype change.
600 (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
601 (thumb1_expand_prologue): Likewise.
602 * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
604 (arm_load_pic_register): Likewise.
605 * config/arm/predicated.md (guard_addr_operand): New predicate.
606 (guard_operand): New predicate.
607 * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
609 (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
611 (stack_protect_combined_set): New expander..
612 (stack_protect_combined_set_insn): New insn_and_split pattern.
613 (stack_protect_set_insn): New insn pattern.
614 (stack_protect_combined_test): New expander.
615 (stack_protect_combined_test_insn): New insn_and_split pattern.
616 (arm_stack_protect_test_insn): New insn pattern.
617 * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
618 * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
619 (UNSPEC_SP_TEST): Likewise.
620 * doc/md.texi (stack_protect_combined_set): Document new standard
622 (stack_protect_set): Clarify that the operand for guard's address is
624 (stack_protect_combined_test): Document new standard pattern name.
625 (stack_protect_test): Clarify that the operand for guard's address is
628 2018-11-22 Richard Biener <rguenther@suse.de>
630 PR tree-optimization/88148
631 * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
632 valueization callback parameter and handle it.
633 * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
634 * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
636 2018-11-22 Richard Biener <rguenther@suse.de>
640 * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
641 which can appear in size expressions.
642 * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
643 CALL_EXPR_BY_DESCRIPTOR.
644 (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
645 * tree-streamer-out.c (pack_ts_base_value_fields): Stream
646 CALL_EXPR_BY_DESCRIPTOR.
647 (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
651 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
654 2018-11-22 Richard Biener <rguenther@suse.de>
656 PR tree-optimization/88069
657 * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
658 apply to default defs.
660 2018-11-22 Jakub Jelinek <jakub@redhat.com>
664 * config/i386/i386.c (ix86_option_override_internal): Default
665 ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
667 * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
668 stack_protect_test, stack_protect_test_<mode>): Use empty condition
669 instead of TARGET_SSP_TLS_GUARD.
671 2018-11-22 Martin Liska <mliska@suse.cz>
674 * config/i386/i386.c (ix86_option_override_internal): Error
675 about usage -mabi=ms and -fsanitize=thread.
677 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
680 2013-10-26 Vladimir Makarov <vmakarov@redhat.com>
683 2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
685 * lra-spills.c (lra_final_code_change): Remove useless move insns.
687 2018-11-21 Uros Bizjak <ubizjak@gmail.com>
690 * function.c (expand_function_end): Do not emit extra blockage insn.
692 2018-11-21 Lokesh Janghel <lokeshjanghel91@gmail.com>
695 * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
696 of FIRST_SSE_REG for 4 or 8 byte modes.
698 2018-11-21 Jan Hubicka <jh@suse.cz>
701 * tree.c (fld_decl_context): Break out from ...
702 (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
703 DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
704 (fld_incomplete_type_of): Build copy of TYP_DECL.
705 * ipa-devirt.c (free_enum_values): Rename to ...
706 (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
707 and TREE_TYPEs of TYPE_DECLs.
708 (get_odr_type): Initialize odr_vtable_hash if needed.
710 2018-11-21 Alexandre Oliva <oliva@adacore.com>
712 * final.c (compute_discriminator): Declare. Renamed from...
713 (maybe_set_discriminator): ... this. Set and return a local.
714 (override_discriminator): New.
715 (final_scan_insn_1): Set it.
716 (notice_source_line): Adjust. Always set discriminator.
718 2018-11-21 Jakub Jelinek <jakub@redhat.com>
721 * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
722 rIJ constraint for aarch64_plus_operand rather than rn.
724 2018-11-21 Renlin Li <renlin.li@arm.com>
727 * explow.h (get_dynamic_stack_size): Declare it as external.
728 * explow.c (record_new_stack_level): Remove function static attribute.
729 * function.c (assign_stack_local_1): Dynamically align the stack slot
730 addr for parameter copy on the stack.
732 2018-11-21 Richard Biener <rguenther@suse.de>
735 * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
736 * Makefile.in (bitmap.o-warn): Remove again.
738 2018-11-20 Jeff Law <law@redhat.com>
740 PR tree-optimization/88069
741 * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
742 degenerate virtual PHIs.
744 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
747 * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
748 nonimmediate_operand with register_operand.
749 (avx2_<code>v8qiv8si2<mask_name>): Likewise.
750 (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
751 (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
752 (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
753 (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
754 (avx2_<code>v4qiv4di2<mask_name>): Likewise.
755 (avx2_<code>v4hiv4di2<mask_name>): Likewise.
756 (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
757 (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
758 (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
759 (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
760 (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
761 (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
762 (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
763 (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
764 (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
765 (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
766 (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
767 (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
768 (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
769 (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
770 (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
771 (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
772 (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
773 (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
774 (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
775 (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
777 2018-11-21 H.J. Lu <hongjiu.lu@intel.com>
779 * read-rtl.c (apply_subst_iterator): Handle define_split and
780 define_insn_and_split.
782 2018-11-21 Jakub Jelinek <jakub@redhat.com>
784 PR rtl-optimization/87817
785 * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
786 *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
787 in the pattern to avoid triggering UB when operands[2] is zero.
788 (tbm_bextri_<mode>): New expander. Renamed the old define_insn to ...
789 (*tbm_bextri_<mode>): ... this.
791 2018-11-21 Tom de Vries <tdevries@suse.de>
794 * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
797 2018-11-21 Andreas Krebbel <krebbel@linux.ibm.com>
799 * configure.ac: Add check for Binutils to determine whether vector
800 load/store alignments hints are being supported.
801 * config.in: Regenerate.
802 * configure: Regenerate.
803 * config/s390/s390.c (print_operand): Support new output
805 * config/s390/s390.md ("movti"): Append alignment hint output
806 using the new output modifier 'A'.
807 * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
808 ("*vec_ti_to_v1ti"): Likewise.
810 2018-11-20 Martin Sebor <msebor@redhat.com>
812 * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
814 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
817 * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
820 2018-11-20 Jakub Jelinek <jakub@redhat.com>
822 PR tree-optimization/87895
823 * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
824 or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
825 (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
826 redirects edges to EXIT to edges to incr_bb, iterate while EXIT
827 has any preds and always use EDGE_PRED (, 0).
829 2018-11-20 Uros Bizjak <ubizjak@gmail.com>
832 * mode-switching.c (create_pre_exit): After reload, always split the
833 fallthrough edge to the exit block.
835 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
837 * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
838 * tree.c (build_array_type_1): Forward declare.
839 (fld_type_variant_equal_p): Add INNER_TYPE parameter.
840 (fld_type_variant): Likewise.
841 (fld_simplified_types): New hash.
842 (fld_process_array_type): New function.
843 (fld_incomplete_type_of): Handle array and enumeration types.
844 (fld_simplified_type): Handle simplification of arrays.
845 (free_lang_data): Allocate and free simplified types hash.
847 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
850 * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
851 when sybtype already violates ODR.
852 (get_odr_type): Do not ICE when insert is false and type duplicate
853 is not registered yet.
854 (register_odr_type): Be sure to register subtypes first.
856 2018-11-20 Andreas Krebbel <krebbel@linux.ibm.com>
858 * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
859 DImode parts of the target operand.
861 2018-11-20 Nathan Sidwell <nathan@acm.org>
864 * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
866 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
869 * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
871 (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
873 2018-11-20 Jan Hubicka <hubicka@ucw.cz>
876 * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
877 * ipa.c (possible_inline_candidate_p): Break out from ..
878 (process_references): ... here ; drop before_inlining_p;
879 cleanup handling of alises.
880 (walk_polymorphic_call_targets): Likewise.
881 (symbol_table::remove_unreachable_nodes): Likewise.
882 * passes.c (pass_data_ipa_remove_symbols): New structure.
883 (pass_ipa_remove_symbols): New pass.
884 (make_pass_ipa_remove_symbols): New function.
885 * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
886 * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
888 2018-11-20 Richard Biener <rguenther@suse.de>
890 * tree-vect-stmts.c (vectorizable_condition): Do not get
891 at else_clause vect def for EXTRACT_LAST_REDUCTION. Remove
892 pointless vect_is_simple_use calls.
894 2018-11-20 Richard Biener <rguenther@suse.de>
896 PR tree-optimization/88074
897 * tree-ssa-dom.c (pass_dominator::execute): Do not walk
900 2018-11-20 Richard Biener <rguenther@suse.de>
902 PR tree-optimization/88069
903 * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
904 virtual PHI arguments.
906 2018-11-20 Ilya Leoshkevich <iii@linux.ibm.com>
909 * config/s390/s390.md: Skip LT(G) peephole when literal pool is
911 * rtl.h (contains_constant_pool_address_p): New function.
912 * rtlanal.c (contains_constant_pool_address_p): Likewise.
914 2018-11-20 Richard Biener <rguenther@suse.de>
917 * alias.c (component_uses_parent_alias_set_from): Remove
918 alias-set zero and TYPE_TYPELESS_STORAGE case both already
919 handled in other ways.
921 2018-11-20 Richard Biener <rguenther@suse.de>
923 PR tree-optimization/88087
924 * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
926 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
929 2018-11-20 Richard Biener <rguenther@suse.de>
932 * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
934 2018-11-19 Jan Hubicka <hubicka@ucw.cz>
937 * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
939 2018-11-19 Sandra Loosemore <sandra@codesourcery.com>
942 * doc/invoke.texi (Link Options): Mention shared libraries
943 in documentation for the -l option. Simplify discussion and
944 point to the system linker documentation for details.
946 2018-11-19 Peter Bergner <bergner@linux.ibm.com>
948 PR rtl-optimization/88033
949 * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
950 to itself. Use HARD_REGISTER_NUM_P.
952 2018-11-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
954 * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
955 of the loop if vf is non-constant.
957 2018-11-19 David Malcolm <dmalcolm@redhat.com>
959 PR tree-optimization/87025
960 * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
961 immediately after creating the scope optinfo.
962 (selftest::test_pr87025): New function.
963 (selftest::dumpfile_c_tests): Call it.
964 * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
965 that we're not popping the top-level records array.
966 * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
967 not changing the kind of a "scope" optinfo.
969 2018-11-19 David Malcolm <dmalcolm@redhat.com>
971 PR tree-optimization/87025
972 * dump-context.h: Include "optinfo.h".
973 (class optrecord_json_writer): New forward decl.
974 (dump_context::forcibly_enable_optinfo_p): Delete.
975 (dump_context::optinfo_enabled_p): New member function.
976 (dump_context::optimization_records_enabled_p): New member
978 (dump_context::set_json_writer): New member function.
979 (dump_context::emit_optinfo): New member function.
980 (dump_context::m_forcibly_enable_optinfo): Delete.
981 (dump_context::m_json_writer): New member data.
982 * dumpfile.c (dump_context::set_json_writer): New member function.
983 (dump_context::finish_any_json_writer): New member function.
984 (dump_context::end_scope): Replace call to
985 optimization_records_maybe_pop_dump_scope with call to
986 m_json_writer->pop_scope.
987 (dump_context::optinfo_enabled_p): New member function.
988 (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
989 to dump_context::emit_optinfo.
990 (dump_context::emit_optinfo): New member function.
991 (temp_dump_context::temp_dump_context): Replace
992 m_forcibly_enable_optinfo with call to set_json_writer.
993 (temp_dump_context::~temp_dump_context): Clean up any json writer.
994 * optinfo-emit-json.cc (class optrecord_json_writer): Move to
996 (the_json_writer): Delete.
997 (optimization_records_start): Delete.
998 (optimization_records_finish): Delete.
999 (optimization_records_enabled_p): Delete, in favor of
1000 dump_context::optimization_records_enabled_p.
1001 (optimization_records_maybe_record_optinfo): Delete.
1002 (optimization_records_maybe_pop_dump_scope): Delete.
1003 * optinfo-emit-json.h: Include "json.h". Delete forward
1005 (optimization_records_start): Delete.
1006 (optimization_records_finish): Delete.
1007 (optimization_records_enabled_p): Delete.
1008 (optimization_records_maybe_record_optinfo): Delete.
1009 (optimization_records_maybe_pop_dump_scope): Delete.
1010 (class optrecord_json_writer): Move here from
1011 optinfo-emit-json.cc.
1012 * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
1013 to optinfo::emit with call to dump_context::emit_optinfo.
1014 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1015 (optinfo_enabled_p): Delete, in favor of
1016 dump_context::optinfo_enabled_p.
1017 (optinfo_wants_inlining_info_p): Update for conversion o
1018 optimization_records_enabled_p to a member function of
1020 * optinfo.h (optinfo_enabled_p): Delete, in favor of
1021 dump_context::optinfo_enabled_p.
1022 (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
1023 * toplev.c: Include "dump-context.h".
1024 (compile_file): Replace call to optimization_records_finish with
1025 dump_context::finish_any_json_writer.
1026 (do_compile): Replace call to optimization_records_start with
1027 conditionally creating a optrecord_json_writer for the
1030 2018-11-19 Jakub Jelinek <jakub@redhat.com>
1032 PR tree-optimization/88071
1033 * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
1034 of false as last argument to gsi_remove.
1035 * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
1036 false as last argument to gsi_replace.
1039 * omp-expand.c: Don't include debug.h.
1040 (adjust_context_and_scope): Add REGION argument. Find DECL_CONTEXT
1041 from innermost outer parallel, task, teams or target that has a
1042 child_fn set, or, if there is no such outer region, use
1043 current_function_decl. Do the DECL_CONTEXT adjustment regardless of
1044 whether a suitable BLOCK is found or not.
1045 (expand_parallel_call, expand_teams_call): Don't call
1046 adjust_context_and_scope here.
1047 (grid_expand_target_grid_body): Revert 2017-01-25 changes.
1048 (expand_omp_taskreg, expand_omp_target): Likewise. Call
1049 adjust_context_and_scope.
1050 * dwarf2out.c (dwarf2out_early_global_decl): For
1051 decl_function_context recurse instead of calling dwarf2out_decl.
1053 2018-11-20 Eric Botcazou <ebotcazou@adacore.com>
1055 PR rtl-optimization/85925
1056 * rtl.h (word_register_operation_p): New predicate.
1057 * combine.c (record_dead_and_set_regs_1): Only apply specific handling
1058 for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
1059 * rtlanal.c (nonzero_bits1): Likewise. Adjust couple of comments.
1060 (num_sign_bit_copies1): Likewise.
1062 2018-11-19 Richard Biener <rguenther@suse.de>
1065 * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
1068 2018-11-19 Eric Botcazou <ebotcazou@adacore.com>
1070 * compare-elim.c (struct comparison): Add not_in_a field.
1071 (is_not): New static function.
1072 (strip_not): Likewise.
1073 (conforming_compare): Handle a NOT in the first operand.
1074 (can_eliminate_compare): Likewise.
1075 (find_comparison_dom_walker::before_dom_children): Likewise.
1076 (try_eliminate_compare): Likewise.
1077 * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
1078 (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
1080 2018-11-19 Jonathan Wakely <jwakely@redhat.com>
1082 * doc/extend.texi (Common Type Attributes): Fix typos.
1084 2018-11-19 Martin Liska <mliska@suse.cz>
1086 PR gcov-profile/88045
1087 * coverage.c (coverage_begin_function): Add assert.
1089 2018-11-18 Sandra Loosemore <sandra@codesourcery.com>
1092 * doc/extend.texi (Common Function Attributes): Document that
1093 no_instrument_function applies to -p and -pg, too.
1094 * doc/invoke.texi (Instrumentation Options): Add cross-references
1095 to docs for -p, -pg, and -finstrument-functions.
1097 2018-11-18 Alan Modra <amodra@gmail.com>
1099 * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
1100 (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
1101 (GNU_USER_TARGET_CRTN): Define.
1102 (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
1103 (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
1105 2018-11-18 Alan Modra <amodra@gmail.com>
1107 * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
1108 !HAVE_LD_PIE variant.
1109 (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
1111 2018-11-17 Nick Clifton <nickc@redhat.com>
1112 Sandra Loosemore <sandra@codesourcery.com>
1115 * doc/invoke.texi (Overall Options): Document that --help and
1116 --help=<value> options cannot be combined.
1118 2018-11-17 Jim Wilson <jimw@sifive.com>
1120 * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
1121 (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
1122 epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
1123 (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset. Set it
1124 to step2 if frame_pointer_needed and step1 is 0.
1126 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
1129 * doc/cpp.texi (System Headers): Add note about implicit
1130 extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
1132 2018-11-17 Sandra Loosemore <sandra@codesourcery.com>
1135 * doc/invoke.texi (C++ Dialect Options): Clarify usage of
1136 -fno-implicit-templates.
1138 2018-11-17 Jakub Jelinek <jakub@redhat.com>
1140 PR tree-optimization/87546
1141 * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
1142 min_precision variable, initially set it to orig_precision, only does
1143 something if op_type's precision is <= min_precision and update
1144 min_precision whenever calling set_op.
1146 2018-11-16 Jan Hubicka <hubicka@ucw.cz>
1149 * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
1151 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
1153 * doc/invoke.texi (Option Summary): Fix whitespace and line
1154 breaks in @gccoptlist environments.
1155 (Warning Options): Likewise.
1156 (Optimize Options): Likewise.
1157 (PowerPC SPE Options): Likewise.
1158 (RS/6000 and PowerPC Options): Likewise.
1160 2018-11-16 Jeff Law <law@redhat.com>
1162 * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
1165 2018-11-16 Sandra Loosemore <sandra@codesourcery.com>
1168 * doc/invoke.texi (Optimize Options): Update options enabled by
1169 fprofile-generate, -fprofile-use, and -fauto-profile.
1171 2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
1174 * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
1175 Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
1176 * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
1178 * target.h: Add psi, pdi, pti to struct asm_int_op definition.
1179 * targhooks.c (default_print_patchable_function_entry): Assert
1180 asm_int_op does not return a NULL string.
1181 * varasm.c (integer_asm_op): Return the op for a partial int type
1182 when the requested size does not correspond to an integer type.
1183 * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
1184 * doc/tm.texi: Regenerate.
1186 2018-11-12 Jason Merrill <jason@redhat.com>
1188 * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
1190 2018-11-16 Michael Meissner <meissner@linux.ibm.com>
1192 * config/rs6000/constraints.md (wF constraint): Remove power9
1193 fusion documentation. Just document wF's use for power8 fusion.
1194 * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
1195 (fusion_gpr_addis): Delete power9 fusion support. Change power8
1196 fusion support to require the upper 12 bits to be all 0's or all
1198 (fusion_gpr_mem_load): Add comment.
1199 (fusion_addis_mem_combo_load): Remove power9 fusion support.
1200 (fusion_addis_mem_combo_store): Delete.
1201 (fusion_offsettable_mem_operand): Delete.
1202 * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
1204 (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
1205 (POWERPC_MASKS): Delete power9 fusion.
1206 * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
1207 (fusion_p9_p): Delete.
1208 (expand_fusion_p9_load): Delete.
1209 (expand_fusion_p9_store): Delete.
1210 (emit_fusion_p9_load): Delete.
1211 (emit_fusion_p9_store): Delete.
1212 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
1214 (rs6000_option_override_internal): Set power8 fusion based on
1215 whether we are tuning for power8. Delete power9 fusion support.
1216 (rs6000_opt_masks): Delete -mpower9-fusion switch.
1217 (emit_fusion_load): Rename emit_fusion_load_store to
1218 emit_fusion_load, and drop fusion store support. Update callers.
1219 (emit_fusion_load_store): Likewise.
1220 (emit_fusion_gpr_load): Likewise.
1221 (fusion_p9_p): Delete.
1222 (expand_fusion_p9_load): Delete.
1223 (expand_fusion_p9_store): Delete.
1224 (emit_fusion_p9_load): Delete.
1225 (emit_fusion_p9_store): Delete.
1226 * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
1227 (GPR_FUSION): Delete.
1228 (FPR_FUSION): Delete.
1229 (power9 fusion peephole2s): Delete.
1230 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
1231 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
1232 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
1233 (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
1234 (fusion_p9_<mode>_constant): Delete.
1235 * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
1236 power9 fusion switch.
1237 * doc/md.texi (PowerPC constraints): Update wF constraint
1238 documentation for power8 fusion only.
1240 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1242 PR rtl-optimization/87475
1243 * cfgrtl.c (patch_jump_insn): Allow redirection failure for
1244 CROSSING_JUMP_P insns.
1245 (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
1247 2018-11-16 Uros Bizjak <ubizjak@gmail.com>
1250 * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
1251 * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
1252 (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
1254 2018-11-16 Jakub Jelinek <jakub@redhat.com>
1257 * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
1258 is VOIDmode, in which case use int_mode. Similarly for op1_mode.
1260 2018-11-16 Eric Botcazou <ebotcazou@adacore.com>
1262 * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
1263 location_t parameter.
1264 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
1265 (switch_decision_tree::do_jump_if_equal): Likewise.
1266 * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
1267 of switch statement to emit_case_nodes.
1268 (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
1269 set it on the newly built GIMPLE comparison statement.
1270 (switch_decision_tree::do_jump_if_equal): Likewise.
1271 (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
1272 in calls to do_jump_if_equal as well as recursive calls.
1274 2018-11-16 Andi Kleen <ak@linux.intel.com>
1276 * config/i386/i386.md: Allow memory operands to ptwrite.
1278 2018-11-16 Michael Matz <matz@suse.de>
1280 * system.h (PRsa): New macro.
1281 (SIZE_AMOUNT): Cast number to uint64_t.
1282 * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
1283 (pool_usage::dump_footer): Likewise and also use PRIu64.
1284 * bitmap.h (bitmap_usage::dump): Likewise.
1285 * ggc-common.c (ggc_usage::dump): Likewise.
1286 * ggc-page.c (ggc_print_statistics): Likewise.
1287 * input.c (dump_line_table_statistics): Likewise.
1288 * mem-stats.h (mem_usage::dump): Likewise.
1289 (mem_usage::dump_footer): Likewise.
1290 * rtl.c (dump_rtx_statistics): Likewise.
1291 * tree-cfg.c (dump_cfg_stats): Likewise.
1292 * tree-dfa.c (dump_dfa_stats): Likewise.
1293 * tree-phinodes.c (phinodes_print_statistics): Likewise.
1294 * tree-ssanames (ssanames_print_statistics): Likewise.
1295 * vec.c (vec_usage::dump): Likewise.
1296 (vec_usage::dump_footer): Likewise.
1298 2018-11-16 Richard Biener <rguenther@suse.de>
1300 PR tree-optimization/88011
1301 * tree-vrp.c (extract_range_from_binary_expr): Fix error in
1302 replacing set_value_range_to_undefined and
1303 set_value_range_to_varying with method calls.
1305 2018-11-16 Ilya Leoshkevich <iii@linux.ibm.com>
1307 * config/s390/s390.md
1308 (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
1310 (*r<noxa>sbg_<mode>_sll): Likewise.
1311 (*r<noxa>sbg_<mode>_srl): Likewise.
1312 (*r<noxa>sbg_sidi_srl): New pattern.
1314 2018-11-16 Jerome Lambourg <lambourg@adacore.com>
1316 * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
1317 Default to TARGET_VXWORKS_RTP.
1318 (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1319 of TARGET_VXWORKS_RTP.
1320 * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
1321 * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1322 of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
1324 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
1327 * doc/extend.texi (Common Type Attributes): Make it explicit
1328 that attribute "packed" can apply to C++ classes.
1330 2018-11-15 Martin Sebor <msebor@redhat.com>
1334 * tree.c (type_argument_type): New function.
1335 * tree.h (type_argument_type): Declare it.
1336 * gcc/doc/extend.texi (alloc_align): Update and clarify.
1337 (alloc_size, nonnull, sentinel): Same.
1339 2018-11-15 Andrew Stubbs <ams@codesourcery.com>
1340 Kwok Cheung Yeung <kcy@codesourcery.com>
1342 * tree-vect-stmts.c (vectorizable_store): Don't ICE when
1343 int_mode_for_size fails.
1344 (vectorizable_load): Likewise.
1346 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1348 * doc/ux.texi (Group logically-related diagnostics): Move
1349 discussion of auto_diagnostic_group into this new subsection.
1350 Give an example of where this grouping is used.
1352 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1355 * Makefile.in (OBJS): Move json.o to...
1356 (OBJS-libcommon): ...here and add diagnostic-format-json.o.
1357 * common.opt (fdiagnostics-format=): New option.
1358 (diagnostics_output_format): New enum.
1359 * diagnostic-format-json.cc: New file.
1360 * diagnostic.c (default_diagnostic_final_cb): New function, taken
1361 from start of diagnostic_finish.
1362 (diagnostic_initialize): Initialize final_cb to
1363 default_diagnostic_final_cb.
1364 (diagnostic_finish): Move "being treated as errors" messages to
1365 default_diagnostic_final_cb. Call any final_cb.
1366 (default_diagnostic_finalizer): Add diagnostic_t param.
1367 (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
1368 diagnostic_finalizer callback.
1369 * diagnostic.h (enum diagnostics_output_format): New enum.
1370 (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
1371 (struct diagnostic_context): Add "final_cb".
1372 (default_diagnostic_finalizer): Add diagnostic_t param.
1373 (diagnostic_output_format_init): New decl.
1374 * doc/invoke.texi (-fdiagnostics-format): New option.
1375 * dwarf2out.c (gen_producer_string): Ignore
1376 OPT_fdiagnostics_format_.
1377 * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
1378 * lto-wrapper.c (append_diag_options): Ignore it.
1379 * opts.c (common_handle_option): Handle it.
1381 2018-11-15 David Malcolm <dmalcolm@redhat.com>
1383 PR tree-optimization/88015
1384 * graphite-isl-ast-to-gimple.c
1385 (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
1387 * graphite-sese-to-poly.c (build_poly_scop): Likewise.
1389 2018-11-15 Richard Biener <rguenther@suse.de>
1392 * gimple.c (gimple_call_flags): Union flags from decl, type
1394 * trans-mem.c (is_tm_pure_call): Simplify.
1396 2018-11-15 Richard Biener <rguenther@suse.de>
1398 PR tree-optimization/88031
1399 * tree-vect-loop.c (vectorizable_reduction): Move check
1400 for multiple types earlier so we get the expected dump.
1401 Simplify calls to vectorizable_condition.
1402 * tree-vect-stmts.h (vectorizable_condition): Update prototype.
1403 * tree-vect-stmts.c (vectorizable_condition): Instead of
1404 reduc_def and reduc_index take just a flag. Simplify
1405 code-generation now that we can rely on the defs being set up.
1406 (vectorizable_comparison): Remove unused argument.
1408 2018-11-15 Richard Biener <rguenther@suse.de>
1410 PR tree-optimization/88030
1411 * tree-complex.c (need_eh_cleanup): New global.
1412 (update_complex_assignment): Mark blocks that need EH update.
1413 (expand_complex_comparison): Likewise.
1414 (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1415 perform EH cleanup and schedule CFG cleanup if that did anything.
1417 2018-11-15 Jakub Jelinek <jakub@redhat.com>
1419 PR rtl-optimization/88018
1420 * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
1421 on the presence of fallthru edge, rather than if it is a USE or not.
1423 2018-11-15 Richard Biener <rguenther@suse.de>
1426 * tree-data-ref.c (analyze_miv_subscript): Guard calls to
1427 analyze_subscript_affine_affine properly.
1429 2018-11-15 Xianmiao Qu <xianmiao_qu@c-sky.com>
1431 * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
1432 (GLIBC_DYNAMIC_LINKER): Define.
1433 (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
1435 2018-11-15 Bin Cheng <bin.cheng@linux.alibaba.com>
1437 PR tree-optimization/84648
1438 * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
1439 (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
1440 by calling adjust_cond_for_loop_until_wrap.
1442 2018-11-15 Sandra Loosemore <sandra@codesourcery.com>
1445 * doc/extend.texi (Common Function Attributes): Clarify linker
1446 restrictions on "aligned" attribute.
1447 (Common Variable Attributes): Likewise. Mention that linker
1448 restrictions don't apply to stack-allocated variables.
1450 2018-11-15 Joern Rennecke <joern.rennecke@riscy-ip.com>
1452 * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
1455 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
1459 * doc/invoke.texi (Optimize Options): Remove bad example about
1460 interaction between -flto and -O. Replace it with a note that
1461 you need to compile with -O and not just link. Copy-edit -flto
1462 discussion to reduce verbiage and improve flow.
1464 2018-11-14 Sandra Loosemore <sandra@codesourcery.com>
1467 * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
1468 also suppress many optimizations. Alphabetize option lists for
1469 -O1, -O2, and -Os. Add list of options disabled with -Og, and
1470 correct documentation for those options to say that.
1471 * opts.c (default_options_table): Sort table by level and option
1472 name, to make it easier to correlate to the manual.
1474 2018-11-14 Uros Bizjak <ubizjak@gmail.com>
1476 * config/i386/i386.c (ix86_print_operand_address_as): Simplify
1477 printing of the names of segment registers.
1479 2018-11-14 Nathan Sidwell <nathan@acm.org>
1483 * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
1486 2018-11-14 David Malcolm <dmalcolm@redhat.com>
1488 * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
1490 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1492 P1236R1 - Signed integers are two's complement
1493 * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
1496 * hash-map.h (hash_map::iterator::reference_pair): New class.
1497 (hash_map::iterator::operator*): Return it rather than std::pair.
1499 2018-11-14 Jeff Law <law@redhat.com>
1501 * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
1502 iff the operand is a constant.
1504 2018-11-14 Aldy Hernandez <aldyh@redhat.com>
1506 * gimple-ssa-evrp-analyze.c
1507 (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
1508 ignore_equivs_equal_p to equal_p.
1509 * ipa-cp.c (meet_with_1): Use equal_p instead of
1510 ignore_equivs_equal_p.
1511 * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
1512 * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
1513 (value_range::operator==): Remove.
1514 (value_range::operator!=): Remove.
1515 (vrp_prop::visit_stmt): Use equal_p.
1516 * tree-vrp.h (value_range): Remove operator==, operator!=,
1517 ignore_equivs_equal_p.
1518 * vr-values.c (update_value_range): Use equal_p.
1520 2018-11-14 Michael Matz <matz@suse.de>
1523 * gimplify.c (collect_fallthrough_labels): Add new argument,
1524 return location via that, don't modify statements.
1525 (warn_implicit_fallthrough_r): Adjust call, don't use
1526 statement location directly.
1528 2018-11-14 Richard Biener <rguenther@suse.de>
1531 * tree-data-ref.c (split_constant_offset): Add wrapper
1532 allocating a cache hash-map.
1533 (split_constant_offset_1): Cache results of expanding
1534 expressions from SSA def stmts.
1536 2018-11-14 Richard Biener <rguenther@suse.de>
1539 * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
1541 (lambda_vector_mult_const): Likewise.
1542 (lambda_matrix_right_hermite): Use lambda_int temporaries.
1544 2018-11-14 Wilco Dijkstra <wdijkstr@arm.com>
1545 Jackson Woodruff <jackson.woodruff@arm.com>
1547 PR 71026/tree-optimization
1548 * match.pd: Simplify floating point comparisons.
1550 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1552 PR rtl-optimization/87817
1553 * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
1554 last argument has low 8 bits clear, fold to 0.
1556 2018-11-14 Iain Sandoe <iain@sandoe.co.uk>
1558 * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
1559 MAX_OFILE_ALIGNMENT as needed.
1561 2018-11-14 Richard Biener <rguenther@suse.de>
1563 PR tree-optimization/88019
1564 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
1565 COND_EXPR arguments to non-trapping overflow.
1567 2018-11-14 Claudiu Zissulescu <claziss@synopsys.com>
1569 * config/arc/arc.h (reg_class): Reorder registers classes, remove
1570 unused register classes.
1571 (REG_CLASS_NAMES): Likewise.
1572 (REG_CLASS_CONTENTS): Likewise.
1573 (FIXED_REGISTERS): Make lp_count fixed.
1574 (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
1575 (PROGRAM_COUNTER_REGNO): Remove.
1576 * config/arc/arc.c (arc_conditional_register_usage): Remove unused
1577 register classes, use constants for register numbers, remove
1578 reg_class_contents references.
1579 (arc_process_double_reg_moves): Add asserts.
1580 (arc_secondary_reload): Remove LPCOUNT_REG reference, use
1581 lra_in_progress predicate.
1582 (arc_init_reg_tables): Remove unused register classes.
1583 (arc_register_move_cost): Likewise.
1584 (arc_preferred_reload_class): Likewise.
1585 (hwloop_optimize): Update rtx patterns involving lp_count register.
1586 (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
1587 * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
1588 CHEAP_CORE_REGS. Former one will be used for LRA.
1589 ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS. Former
1590 one will be used for LRA.
1591 ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS. Former
1592 one will be used for LRA.
1593 ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
1594 Former one will be used for LRA.
1595 ("f"): Delete constraint.
1598 ("l"): Change it from register constraint to constraint.
1599 * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
1600 (movhi_insn): Likewise.
1601 (movsi_insn): Update pattern.
1604 (stack_tie): Remove 'b' constraint letter.
1606 (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
1607 (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
1608 (R57_REG, R59_REG, PCL_REG): Likewise.
1609 (ILINK1_REGNUM): Renamed to ILINK1_REG.
1610 (ILINK2_REGNUM): Renamed to ILINK2_REG.
1612 (SP_REGS): Likewise.
1613 (Rcw): Remove unused reg classes.
1614 * config/arc/predicates.md (dest_reg_operand): Just default on
1615 register_operand predicate.
1616 (mpy_dest_reg_operand): Likewise.
1617 (move_dest_operand): Use macros instead of constants.
1618 * config/arc/arc.opt (mlra): Switch to lra as default.
1620 2018-11-14 Richard Biener <rguenther@suse.de>
1622 PR tree-optimization/87974
1623 * tree-vect-loop.c (vectorizable_reduction): When computing
1624 the vectorized reduction PHI vector type ignore constant
1627 2018-11-14 Jakub Jelinek <jakub@redhat.com>
1629 PR tree-optimization/87977
1630 * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
1631 stmt, build a new one and replace the old one with it. Formatting fix.
1632 Call release_ssa_name (x) if !has_other_use and !delete_div.
1633 (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
1634 verify lhs of stmt is still def.
1636 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
1638 PR rtl-optimization/87507
1639 * lower-subreg.c (operand_for_swap_move_operator): New function.
1640 (simple_move): Strip simple operators.
1641 (find_pseudo_copy): Likewise.
1642 (resolve_operand_for_swap_move_operator): New function.
1643 (resolve_simple_move): Strip simple operators and swap operands.
1645 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1647 PR tree-optimization/87898
1648 * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
1649 (ipa_simd_modify_function_body): Remove debug stmts where the first
1650 argument was changed into a non-decl.
1652 2018-11-13 Peter Bergner <bergner@linux.ibm.com>
1654 PR rtl-optimization/87899
1655 * lra-lives.c (start_living): Update white space in comment.
1656 (enum point_type): New.
1657 (sparseset_contains_pseudos_p): New function.
1658 (update_pseudo_point): Likewise.
1659 (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
1660 (make_hard_regno_dead): Likewise. Remove ignore_reg_for_conflicts
1661 handling. Move early exit after adding conflicts.
1662 (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro. Add early exit
1663 if regno is already live. Remove all handling of program points.
1664 (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro. Add early exit
1665 after adding conflicts. Remove all handling of program points and
1666 ignore_reg_for_conflicts.
1667 (mark_regno_live): Use HARD_REGISTER_NUM_P macro. Remove return value
1668 and do not guard call to mark_pseudo_live.
1669 (mark_regno_dead): Use HARD_REGISTER_NUM_P macro. Remove return value
1670 and do not guard call to mark_pseudo_dead.
1671 (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
1672 (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
1673 Use new function update_pseudo_point. Handle register copies by
1674 removing the source register from the live set. Handle INOUT operands.
1675 Update to the next program point using the unused_set, dead_set and
1677 (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
1679 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1681 * builtins.c: Replace "source_location" with "location_t".
1682 * diagnostic-show-locus.c: Likewise.
1683 * diagnostic.c: Likewise.
1684 * dumpfile.c: Likewise.
1685 * gcc-rich-location.h: Likewise.
1686 * genmatch.c: Likewise.
1687 * gimple.h: Likewise.
1688 * gimplify.c: Likewise.
1689 * input.c: Likewise.
1690 * input.h: Likewise. Eliminate the typedef.
1691 * omp-expand.c: Likewise.
1692 * selftest.h: Likewise.
1693 * substring-locations.h (get_source_location_for_substring):
1695 (get_location_within_string): ...this.
1696 * tree-cfg.c: Replace "source_location" with "location_t".
1697 * tree-cfgcleanup.c: Likewise.
1698 * tree-diagnostic.c: Likewise.
1699 * tree-into-ssa.c: Likewise.
1700 * tree-outof-ssa.c: Likewise.
1701 * tree-parloops.c: Likewise.
1702 * tree-phinodes.c: Likewise.
1703 * tree-phinodes.h: Likewise.
1704 * tree-ssa-loop-ivopts.c: Likewise.
1705 * tree-ssa-loop-manip.c: Likewise.
1706 * tree-ssa-phiopt.c: Likewise.
1707 * tree-ssa-phiprop.c: Likewise.
1708 * tree-ssa-threadupdate.c: Likewise.
1709 * tree-ssa.c: Likewise.
1710 * tree-ssa.h: Likewise.
1711 * tree-vect-loop-manip.c: Likewise.
1713 2018-11-13 Michael Ploujnikov <michael.ploujnikov@oracle.com>
1715 * doc/extend.texi: Fix typo in the weakref description.
1717 2018-11-13 Richard Biener <rguenther@suse.de>
1719 PR tree-optimization/86991
1720 * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
1721 group building until we have successfully detected the SLP
1723 (vect_is_simple_reduction): Remove fixup code here.
1725 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1727 * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
1728 (dump_gimple_stmt): Use it.
1729 (dump_gimple_stmt_loc): Likewise.
1730 (dump_gimple_expr): Likewise.
1731 (dump_gimple_expr_loc): Likewise.
1732 (dump_generic_expr): Likewise.
1733 (dump_generic_expr_loc): Likewise.
1734 (dump_printf): Likewise.
1735 (dump_printf_loc): Likewise.
1736 (dump_dec): Likewise.
1737 (dump_dec): Likewise.
1738 (dump_hex): Likewise.
1739 (dump_symtab_node): Likewise.
1740 * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
1741 Guard dump call with dump_enabled_p.
1742 * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
1743 * graphite-optimize-isl.c (optimize_isl): Likewise.
1744 * graphite.c (graphite_transform_loops): Likewise.
1745 * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
1746 * tree-parloops.c (parallelize_loops): Likewise.
1747 * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
1748 * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
1749 (vect_prune_runtime_alias_test_list): Likewise.
1750 * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
1751 (vect_estimate_min_profitable_iters): Likewise.
1752 * tree-vect-slp.c (vect_record_max_nunits): Likewise.
1753 (vect_build_slp_tree_2): Likewise.
1754 (vect_supported_load_permutation_p): Likewise.
1755 (vect_slp_analyze_operations): Likewise.
1756 (vect_slp_analyze_bb_1): Likewise.
1757 (vect_slp_bb): Likewise.
1758 * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
1759 * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
1760 (pass_slp_vectorize::execute): Likewise.
1761 (increase_alignment): Likewise.
1763 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1766 * ipa-inline.c (report_inline_failed_reason): Guard calls to
1767 cl_target_option_print_diff and cl_optimization_print_diff with
1770 2018-11-13 David Malcolm <dmalcolm@redhat.com>
1772 * doc/invoke.texi (-fsave-optimization-record): Note that the
1773 output is compressed.
1774 * optinfo-emit-json.cc: Include <zlib.h>.
1775 (optrecord_json_writer::write): Compress the output.
1777 2018-11-13 Aldy Hernandez <aldyh@redhat.com>
1779 * tree-vrp.c (value_range_base::dump): Dump type.
1780 Do not use INF nomenclature for 1-bit types.
1781 (dump_value_range): Group all variants to common dumping code.
1782 (debug): New overloaded functions for value_ranges.
1783 (value_range_base::dump): Remove no argument version.
1784 (value_range::dump): Same.
1786 2018-11-13 Richard Biener <rguenther@suse.de>
1788 PR tree-optimization/87931
1789 * tree-vect-loop.c (vect_is_simple_reduction): Restrict
1790 nested cycles we support to latch computations vectorizable_reduction
1793 2018-11-13 Martin Liska <mliska@suse.cz>
1795 PR tree-optimization/87885
1796 * cfghooks.c (account_profile_record): Rename
1798 (profile_record_check_consistency): ... this.
1799 Calculate missing num_mismatched_freq_in.
1800 (profile_record_account_profile): New function
1801 that calculates time and size of a function.
1802 * cfghooks.h (struct profile_record): Remove
1804 (struct cfg_hooks): Remove after_pass flag.
1805 (account_profile_record): Rename to ...
1806 (profile_record_check_consistency): ... this.
1807 (profile_record_account_profile): New.
1808 * cfgrtl.c (rtl_account_profile_record): Remove
1810 * passes.c (check_profile_consistency): Do only
1812 (account_profile): Calculate size and time of
1814 (pass_manager::dump_profile_report): Reformat
1816 (execute_one_ipa_transform_pass): Call
1817 consistency check before clean upand call account_profile
1818 after a clean up is done.
1819 (execute_one_pass): Call check_profile_consistency and
1820 account_profile instead of using after_pass flag..
1821 * tree-cfg.c (gimple_account_profile_record): Likewise.
1823 2018-11-13 Martin Liska <mliska@suse.cz>
1826 * config/i386/i386.c (ix86_option_override_internal): Error
1827 about usage -mabi=ms and -fsanitize={,kernel-}address.
1829 2018-11-13 Andre Vieira <andre.simoesdiasvieira@arm.com>
1831 * config/aarch64/aarch64.c
1832 (aarch64_vectorize_preferred_vector_alignment): Change return type to
1834 (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
1835 alignment being a poly int.
1836 * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
1837 return type to poly_uint64.
1838 * target.def (default_preferred_vector_alignment): Likewise.
1839 * targhooks.c (default_preferred_vector_alignment): Likewise.
1840 * targhooks.h (default_preferred_vector_alignment): Likewise.
1841 * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
1842 (vect_compute_data_ref_alignment): Adapt to vector alignment being a
1844 (vect_update_misalignment_for_peel): Likewise.
1845 (vect_enhance_data_refs_alignment): Likewise.
1846 (vect_find_same_alignment_drs): Likewise.
1847 (vect_duplicate_ssa_name_ptr_info): Likewise.
1848 (vect_setup_realignment): Likewise.
1849 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1851 * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
1852 mask with a compile time variable vector alignment.
1853 (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
1855 (vect_do_peeling): Exit early if vector alignment is not constant.
1856 * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
1858 (vectorizable_store): Likewise.
1859 (vectorizable_load): Likweise.
1860 * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
1862 (vect_known_alignment_in_bytes): Adapt to vector alignment being a
1864 (vect_can_force_dr_alignment_p): Change alignment parameter type to
1867 2018-11-13 Richard Biener <rguenther@suse.de>
1869 PR tree-optimization/87962
1870 * tree-vect-loop.c (vect_is_simple_reduction): More reliably
1871 detect outer reduction for disqualifying in-loop uses.
1873 2018-11-13 Richard Biener <rguenther@suse.de>
1875 PR tree-optimization/87967
1876 * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
1877 for constants for the scalar loop.
1879 2018-11-13 Alan Modra <amodra@gmail.com>
1881 * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
1882 integer constants when -mcmodel=medium.
1884 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1886 * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
1887 * config/arc/elf.h (PROFILE_HOOK): Define.
1888 * config/arc/linux.h (PROFILE_HOOK): Likewise.
1890 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1892 * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
1893 jump table data in the text section.
1895 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1897 * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
1898 to fit the eh_return pattern.
1899 * config/arc/arc.md (eh_return): Define.
1900 (VUNSPEC_ARC_EH_RETURN): Likewise.
1901 * config/arc/arc-protos.h (arc_eh_return_address_location): Match
1903 * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
1906 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1908 * common/config/arc/arc-common.c (arc_option_optimization_table):
1909 Millicode optimization is default on for size optimizations.
1910 * config/arc/arc-protos.h (arc_check_multi): New function.
1911 * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
1912 (ENTER_LEAVE_START_REG): Define.
1913 (ENTER_LEAVE_END_REG): Likewise.
1914 (arc_override_options): Disable millicode when long calls option
1916 (arc_frame_info): Change it from int to bool.
1917 (arc_compute_frame_size): Clean up.
1918 (arc_save_restore): Remove.
1919 (frame_save_reg): New function.
1920 (frame_restore_reg): Likewise.
1921 (arc_enter_leave_p): Likewise.
1922 (arc_save_callee_saves): Likewise.
1923 (arc_restore_callee_saves): Likewise.
1924 (arc_save_callee_enter): Likewise.
1925 (arc_restore_callee_leave): Likewise.
1926 (arc_save_callee_milli): Likewise.
1927 (arc_restore_callee_milli): Likewise.
1928 (arc_expand_prologue): Reimplement to emit enter/leave
1930 (arc_expand_epilogue): Likewise.
1931 (arc_check_multi): New function.
1932 * config/arc/arc.md (push_multi_fp): New pattern.
1933 (push_multi_fp_blink): Likewise.
1934 (pop_multi_fp): Likewise.
1935 (pop_multi_fp_blink): Likewise.
1936 (pop_multi_fp_ret): Likewise.
1937 (pop_multi_fp_blink_ret): Likewise.
1938 * config/arc/arc.opt (mmillicode): Update option.
1939 (mcode-density-frame): New option.
1940 * config/arc/predicates.md (push_multi_operand): New predicate.
1941 (pop_multi_operand): Likewise.
1942 * doc/invoke.texi (ARC): Update ARC options information.
1945 2018-11-13 Claudiu Zissulescu <claziss@synopsys.com>
1947 * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
1948 * config/arc/arc.c (operands_ok_ldd_std): New function.
1949 (mem_ok_for_ldd_std): Likewise.
1950 (gen_operands_ldd_std): Likewise.
1951 * config/arc/arc.md: Add peephole2 rules for std/ldd.
1953 2018-11-13 Eric Botcazou <ebotcazou@adacore.com>
1955 * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
1956 test on stack_usage_file.
1957 (lang_dependent_init): Do not open the .su file if generating LTO.
1959 2018-11-13 Jakub Jelinek <jakub@redhat.com>
1961 PR rtl-optimization/87918
1962 * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
1963 simplify_gen_relational rather than simplify_gen_binary.
1965 2018-11-13 Richard Biener <rguenther@suse.de>
1967 * tree-ssanames.h (set_range_info): Use value_range_base.
1968 (get_range_info): Likewise.
1969 * tree-ssanames.c (set_range_info): Likewise.
1970 (get_range_info): Likewise.
1971 * tree-vrp.c (value_range_base::union_helper): Split
1972 out common parts of value_range[_base]::union_.
1973 (value_range_base::union_): Update.
1974 (value_range::union_): Likewise.
1975 (determine_value_range_1): Use value_range_base.
1976 (determine_value_range): Likewise.
1977 * tree-vrp.h (value_range_base::union_helper): Move ...
1978 (value_range::union_helper): ... from here.
1980 2018-11-13 Alan Modra <amodra@gmail.com>
1982 * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
1984 (rs6000_secondary_reload_gpr): Don't call find_replacement.
1986 2018-11-13 Sandra Loosemore <sandra@codesourcery.com>
1989 * doc/invoke.texi (Optimize Options): Clarify that the
1990 l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
1991 apply to data cache size.
1993 2018-11-13 Alan Modra <amodra@gmail.com>
1995 * config/rs6000/predicates.md (logical_const_operand),
1996 (logical_operand): Correct comment.
1997 * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
1999 2018-11-13 Alan Modra <amodra@gmail.com>
2001 * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
2003 2018-11-13 Alan Modra <amodra@gmail.com>
2005 * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
2007 * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
2008 covered by alternative.
2009 (movcc_internal1): Ignore h for register preference.
2010 (mov<mode>_hardfloat64): Likewise.
2011 (mov<mode>_softfloat): Ignore c, l, h for register preference.
2013 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
2015 PR preprocessor/47823
2016 * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
2019 * doc/extend.texi (Pragmas): Note additional pragmas documented
2022 2018-11-13 Kugan Vivekanandarajah <kuganv@linaro.org>
2026 * tree-scalar-evolution.c (expression_expensive_p): Make
2027 BUILTIN POPCOUNT as expensive when backend does not define it.
2029 2018-11-12 Fredrik Noring <noring@nocrew.org>
2031 * config.gcc: Update with-llsc defaults for MIPS r5900.
2033 2018-11-12 Martin Liska <mliska@suse.cz>
2035 PR gcov-profile/87442
2036 * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
2038 * doc/invoke.texi: Document them.
2039 * tree-profile.c (parse_profile_filter): New.
2040 (parse_profile_file_filtering): Likewise.
2041 (release_profile_file_filtering): Likewise.
2042 (include_source_file_for_profile): Likewise.
2043 (tree_profiling): Filter source files based on the
2044 newly added options.
2046 2018-11-12 Martin Liska <mliska@suse.cz>
2049 * doc/extend.texi: Add missing values for __builtin_cpu_is and
2050 __builtin_cpu_supports for x86 target.
2052 2018-11-12 Sandra Loosemore <sandra@codesourcery.com>
2055 * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
2057 (Arithmetic): Likewise for "lo_sum".
2059 2018-11-12 Renlin Li <renlin.li@arm.com>
2062 * dse.c (get_stored_val): Add check for compile-time constantness
2065 2018-11-12 Sudakshina Das <sudi.das@arm.com>
2067 * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
2068 (ARMv8_5a): New fgroup.
2069 (armv8.5-a): New arch.
2070 (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
2072 * config/arm/arm-tables.opt: Regenerate.
2073 * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
2074 * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
2075 * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
2076 Add matching rules for -march=armv8.5-a and extensions.
2077 * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
2078 Add sb and predres to all armv8-a except armv8.5-a.
2080 2018-11-12 Richard Biener <rguenther@suse.de>
2082 * tree-vrp.h (value_range[_base]::set): Make public. Provide
2083 overload for single value.
2084 (value_range[_base]::set_nonnull): New.
2085 (value_range[_base]::set_null): Likewise.
2086 (value_range): Document bitmap copying behavior, mark
2087 copy constructor and assignment operator deleted.
2088 (value_range::move): New.
2089 (value_range::set_and_canonicalize): Default bitmap to zero.
2090 (set_value_range_to_nonnull): Remove.
2091 (set_value_range_to_null): Likewise.
2092 (set_value_range): Likewise.
2093 (set_value_range_to_value): Likewise.
2094 (extract_range_from_unary_expr): Work on value_range_base.
2095 (extract_range_from_binary_expr_1): Likewise. Rename to...
2096 (extract_range_from_binary_expr): ... this.
2097 * tree-vrp.c (value_range::update): Clear equiv bitmap
2099 (value_range::move): New, move equiv bitmap.
2100 (value_range_base::set_undefined): Avoid assignment.
2101 (value_range::set_undefined): Likewise.
2102 (value_range_base::set_varying): Likewise.
2103 (value_range::set_varying): Likewise.
2104 (set_value_range): Remove.
2105 (value_range_base::set): New overload for value.
2106 (value_range::set): Likewise.
2107 (set_value_range_to_nonnull): Remove.
2108 (value_range_base::set_nonnull): New.
2109 (value_range::set_nonnull): Likewise.
2110 (set_value_range_to_null): Remove.
2111 (value_range_base::set_null): New.
2112 (value_range::set_null): Likewise.
2113 (range_is_null): Work on value_range_base.
2114 (range_is_nonnull): Likewise.
2115 (ranges_from_anti_range): Likewise.
2116 (extract_range_into_wide_ints): Likewise.
2117 (extract_range_from_multiplicative_op): Likewise.
2118 (extract_range_from_binary_expr): Likewise. Update for API changes.
2119 (extract_range_from_unary_expr): Likewise. Remove OBJ_TYPE_REF
2121 (value_range::intersect_helper): Avoid copy and assignment.
2122 (value_range::union_helper): Likewise.
2123 (determine_value_range_1): Adjust.
2124 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
2125 Avoid assignment by using move.
2126 (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
2127 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2129 * tree-ssanames.c (get_range_info): Likewise.
2130 * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
2131 * vr-values.c (vr_values::get_value_range): Adjust.
2132 (vr_values::update_value_range): Likewise.
2133 (symbolic_range_based_on_p): Work on value_range_base.
2134 (vr_values::extract_range_from_binary_expr): Use value_range_base.
2135 (vr_values::extract_range_from_unary_expr): Likewise.
2136 (vr_values::extract_range_from_cond_expr): Avoid assignment.
2137 (vr_values::extract_range_from_comparison): Adjust.
2138 (vr_values::check_for_binary_op_overflow): Use value_range_base.
2139 (vr_values::extract_range_basic): Adjust.
2140 (vr_values::adjust_range_with_scev): Likewise.
2141 (vr_values::vrp_visit_assignment_or_call): Likewise.
2142 (vr_values::get_vr_for_comparison): Change API to avoid
2143 assignment and copy construction.
2144 (vr_values::compare_name_with_value): Adjust accordingly.
2145 (vr_values::compare_names): Likewise.
2146 (vr_values::extract_range_from_phi_node): Avoid assignment and
2147 bogus in-place modify of equiv bitmap.
2148 (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
2149 * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
2150 for extract_range_from_unary_expr API change.
2151 * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
2153 2018-11-12 Eric Botcazou <ebotcazou@adacore.com>
2155 * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
2157 2018-11-12 Richard Biener <rguenther@suse.de>
2159 * tree-vrp.h (value_range_base::symbolic_p,
2160 value_range_base::constant_p, value_range_base::zero_p,
2161 value_range_base::singleton_p): Move from value_range.
2162 (value_range::dump): Add.
2163 * gimple-ssa-evrp-analyze.c
2164 (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
2165 * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
2166 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
2168 * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
2169 (value_range::constant_p): Likewise.
2170 (value_range::singleton_p): Likewise.
2171 (value_range_base::dump): Add.
2172 (set_value_range_to_undefined): Remove.
2173 (set_value_range_to_varying): Likewise.
2174 (range_int_cst_p): Take value_range_base argument.
2175 (range_int_cst_singleton_p): Likewise.
2176 (value_range_constant_singleton): Likewise.
2177 (vrp_set_zero_nonzero_bits): Likewise.
2178 (extract_range_from_multiplicative_op): Use set_varying.
2179 (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
2180 (extract_range_from_unary_expr): Likewise.
2181 (dump_value_range_base): Change to overload of dump_value_range.
2182 (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
2183 (vrp_prop::visit_stmt): Likewise.
2184 (value_range::intersect_helper): Likewise.
2185 (value_range::union_helper): Likewise.
2186 (determine_value_range_1): Likewise.
2188 2018-11-12 Richard Biener <rguenther@suse.de>
2190 * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
2191 (set_value_range_to_null): Likewise.
2192 * vr-values.c (vr_values::extract_range_from_comparison):
2193 Clear equiv for constant singleton ranges.
2195 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
2197 * config/i386/sse.md: Combine VFIXUPIMM* patterns
2198 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2199 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2200 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
2201 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
2202 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
2203 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
2205 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2208 * doc/extend.texi (Common Type Attributes): For the align type
2209 attribute, copy language about decreasing alignment from the
2210 corresponding variable attribute.
2212 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2214 * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
2217 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2220 * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
2221 -frtti and -fno-rtti code.
2223 2018-11-11 Sandra Loosemore <sandra@codesourcery.com>
2226 * doc/extend.texi (Other Builtins): Document probability associated
2227 with __builtin_expect.
2229 2018-11-11 Uros Bizjak <ubizjak@gmail.com>
2232 * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
2233 instead of (TARGET_64BIT && ix86_abi == MS_ABI).
2234 * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
2235 * config/i386/cygming.h (STACK_BOUNDARY): Remove.
2237 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2239 * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
2241 2018-11-11 Xianmiao Qu <xianmiao_qu@c-sky.com>
2243 * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
2245 2018-11-11 Richard Biener <rguenther@suse.de>
2247 * tree-vrp.h (class value_range_base): New base class for
2248 value_range containing all but the m_equiv member.
2249 (dump_value_range_base): Add.
2250 (range_includes_zero_p): Work on value_range_base.
2251 * tree-vrp.c (value_range_base::set): Split out base handling
2253 (value_range::set): this.
2254 (value_range::set_equiv): New.
2255 (value_range_base::value_range_base): New constructors.
2256 (value_range_base::check): Split out base handling from...
2257 (value_range::check): this.
2258 (value_range::equal_p): Refactor in terms of
2259 ignore_equivs_equal_p which is now member of the base.
2260 (value_range_base::set_undefined): New.
2261 (value_range_base::set_varying): Likewise.
2262 (value_range_base::dump):Split out base handling from...
2263 (value_range::dump): this.
2264 (value_range_base::set_and_canonicalize): Split out base handling
2266 (value_range::set_and_canonicalize): this.
2267 (value_range_base::union_): New.
2268 * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
2270 * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
2271 instead of value_range everywhere.
2272 (ipcp_vr_lattice::print): Use dump_value_range_base.
2273 (ipcp_vr_lattice::meet_with): Adjust.
2274 (ipcp_vr_lattice::meet_with_1): Likewise.
2275 (ipa_vr_operation_and_type_effects): Likewise.
2276 (propagate_vr_across_jump_function): Likewise.
2277 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
2278 (ipa_get_value_range): Likewise.
2279 (ipa_set_jfunc_vr): Likewise.
2280 (ipa_compute_jump_functions_for_edge): Likewise.
2282 2018-11-10 Sandra Loosemore <sandra@codesourcery.com>
2285 * doc/invoke.texi (Optimize Options): Add @opindex entries
2286 for the positive forms of -fno-xxx and -mno-xxx options
2287 that were lacking them.
2289 2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
2291 * combine.c (make_more_copies): Only make an intermediate copy if the
2292 dest of a move is a pseudo.
2294 2018-11-09 Maya Rashish <coypu@sdf.org>
2297 * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
2298 (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
2300 2018-11-09 Sandra Loosemore <sandra@codesourcery.com>
2304 * doc/invoke.texi (Optimize Options): Clarify default behavior
2305 for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
2307 2018-11-09 Bernd Edlinger <bernd.edlinger@hotmail.de>
2309 PR tree-optimization/87940
2310 * expr.c (string_constant): Don't strip NOPS in subexpressions.
2311 Fold PLUS_EXPR correctly.
2313 2018-11-09 Ilya Leoshkevich <iii@linux.ibm.com>
2316 * config/s390/s390.c (s390_safe_relative_long_p): New function.
2317 (annotate_constant_pool_refs): Skip insns which support
2318 relative addressing.
2319 (annotate_constant_pool_refs_1): New helper function.
2320 (find_constant_pool_ref): Skip insns which support relative
2322 (find_constant_pool_ref_1): New helper function.
2323 (replace_constant_pool_ref): Skip insns which support
2324 relative addressing.
2325 (replace_constant_pool_ref_1): New helper function.
2326 (s390_mainpool_start): Adapt to the new signature.
2327 (s390_mainpool_finish): Likewise.
2328 (s390_chunkify_start): Likewise.
2329 (s390_chunkify_finish): Likewise.
2330 (pass_s390_early_mach::execute): Likewise.
2331 (s390_prologue_plus_offset): Likewise.
2332 (s390_emit_prologue): Likewise.
2333 (s390_emit_epilogue): Likewise.
2335 2018-11-09 Jakub Jelinek <jakub@redhat.com>
2337 * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
2338 but unsupported lastprivate with conditional modifier.
2340 2018-11-09 Jeff Law <law@redhat.com>
2342 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
2343 unused argument better. Add gcc_unreachable to silence warning.
2345 2018-11-09 Martin Sebor <msebor@redhat.com>
2348 * attribs.c (has_attribute): New helper function.
2349 (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
2350 * attribs.h (decls_mismatched_attributes): Declare.
2351 * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
2352 (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
2353 * common.opt (-Wattribute-alias): Take an argument.
2354 (-Wno-attribute-alias): New option.
2355 * doc/extend.texi (Common Function Attributes): Document copy.
2356 (Common Variable Attributes): Same.
2357 * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
2358 (-Wattribute-alias): Document new option argument.
2360 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
2362 * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
2363 matching criteria. Remove unused array initializer.
2365 2018-11-09 Bill Schmidt <wschmidt@linux.ibm.com>
2366 Jinsong Ji <jji@us.ibm.com>
2368 * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
2369 constraints by introducing a new temporary.
2370 (_mm_cvtss_si64): Likewise.
2372 2018-11-09 Martin Liska <mliska@suse.cz>
2374 * common.opt: Add -fipa-stack-alignment flag.
2375 * doc/invoke.texi: Document it.
2376 * final.c (rest_of_clean_state): Guard stack
2377 shrinking with flag.
2379 2018-11-09 Martin Liska <mliska@suse.cz>
2381 * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
2383 (ipa_discover_variable_flags): ... this.
2384 * common.opt: Come up with new flag -fipa-reference-addressable.
2385 * doc/invoke.texi: Document it.
2386 * ipa-reference.c (propagate): Call the renamed fn.
2387 * ipa-visibility.c (whole_program_function_and_variable_visibility):
2389 * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
2391 (ipa_discover_variable_flags): ... this. Discover
2392 non-addressable variables only with the newly added flag.
2393 * opts.c: Enable the newly added flag with -O1 and higher
2396 2018-11-09 David Malcolm <dmalcolm@redhat.com>
2398 * json.cc (selftest::test_writing_literals): Fix comment.
2400 2018-11-09 Martin Liska <mliska@suse.cz>
2402 * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
2403 string to a stack buffer.
2404 (aarch64_parse_cpu): Likewise.
2405 (aarch64_parse_tune): Likewise.
2407 2018-11-09 Richard Biener <rguenther@suse.de>
2409 PR tree-optimization/87953
2410 * tree-vect-loop.c (vectorizable_reduction): For analysis
2411 always pass ops[0] to vectorizable_condition.
2413 2018-11-09 Stafford Horne <shorne@gmail.com>
2414 Richard Henderson <rth@twiddle.net>
2415 Joel Sherrill <joel@rtems.org>
2417 * common/config/or1k/or1k-common.c: New file.
2418 * config/or1k/*: New.
2419 * config.gcc (or1k*-*-*): New.
2420 * configure.ac (or1k*-*-*): New test for openrisc tls.
2421 * configure: Regenerated.
2422 * doc/install.texi: Document OpenRISC triplets.
2423 * doc/invoke.texi: Document OpenRISC arguments.
2424 * doc/md.texi: Document OpenRISC.
2426 2018-11-09 Richard Earnshaw <rearnsha@arm.com>
2428 * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
2429 (arm7tdmi-s): Delete CPU.
2430 (arm710t): Add aliases for arm720t and arm740t.
2431 (arm720t, arm740t): Delete CPUs.
2432 (arm920t): Add aliases for arm920, arm922t and arm940t.
2433 (arm920, arm922t, arm940t): Delete CPUs.
2434 (arm10tdmi): Add alias for arm1020t.
2435 (arm1020t): Delete CPU.
2436 (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
2437 (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
2438 (arm10e): Add aliases for arm1020e and arm1022e.
2439 (arm1020e, arm1022e): Delete CPU.
2440 * config/arm/arm.md (generic_sched): Remove entries that are now
2442 (generic_vfp): Likewise.
2443 * config/arm/arm1020e.md: Simplify tuning selection based on alias
2445 * config/arm/arm-tune.md: Regenerated.
2446 * config/arm/arm-tables.opt: Regenerated.
2448 2018-11-09 Richard Biener <rguenther@suse.de>
2450 PR tree-optimization/87621
2451 * tree-vect-loop.c (vectorizable_reduction): Handle reduction
2452 op with only phi inputs.
2453 * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
2454 (ch_base::copy_headers): Run CSE on copied loop headers.
2455 (pass_ch_vect::process_loop_p): Simplify.
2457 2018-11-09 Alexandre Oliva <oliva@adacore.com>
2459 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
2460 for non-w64 x86_64 biarch.
2462 2018-11-09 Alexandre Oliva <aoliva@redhat.com>
2464 PR rtl-optimization/86438
2465 * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
2466 of in_b for the compare if in_b is SET_DEST.
2469 * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
2470 non-toplevel UNSPEC.
2472 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2474 * tree-vrp.c (value_range::check): Do not access internals
2476 (value_range::singleton_p): Same.
2477 (value_range::type): Same.
2478 (vrp_finalize): Use value_range API.
2480 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2482 * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
2484 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2486 * vr-values.c (vr_values::get_value_range): Use value_range API
2487 instead of piecing together ranges.
2488 (vr_values::update_value_range): Same.
2490 2018-11-08 Aldy Hernandez <aldyh@redhat.com>
2492 * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
2493 of performing ad-hoc calculations.
2494 * tree-ssanames.c (set_range_info): New overloaded function
2495 accepting value_range &.
2496 (get_range_info): Same.
2497 * tree-ssanames.h (set_range_info_raw): Remove.
2498 (set_range_info): New prototype.
2499 (get_range_info): Same.
2500 * tree-vrp.h (value_range::null_p): Rename to zero_p.
2501 * tree-vrp.c (value_range::null_p): Same.
2503 2018-11-09 Jan Hubicka <jh@suse.cz>
2505 * tree.c (fld_type_variant_equal_p): Test user align flag.
2506 (flt_type_variant): Copy user align flag.
2507 (fld_incomplete_type_of): Clear it.
2509 2018-11-09 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2511 * config/arm/neon.md (div<mode>3): New pattern.
2513 2018-11-08 Andi Kleen <ak@linux.intel.com>
2515 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
2516 (OPTION_MASK_ISA_PTWRITE_UNSET): New.
2517 (ix86_handle_option): Handle OPT_mptwrite.
2518 * config/i386/cpuid.h (bit_PTWRITE): Add.
2519 * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
2520 * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
2521 * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
2522 * config/i386/i386.c (ix86_target_string): Handle ptwrite.
2523 (ix86_option_override_internal): Handle PTA_PTWRITE.
2524 (ix86_valid_target_attribute_inner_p): Define ptwrite.
2525 (def_builtin2): Force UINT64 to be 64bit only.
2526 * config/i386/i386.h (TARGET_PTWRITE): Add.
2527 (TARGET_PTWRITE_P): Add.
2529 * config/i386/i386.md: Define ptwrite.
2530 * config/i386/i386.opt: Add -mptwrite.
2531 * config/i386/immintrin.h (_ptwrite64): Add.
2533 * doc/extend.texi: Document __builtin_ia32_ptwrite*.
2534 * doc/invoke.texi: Document -mptwrite.
2536 2018-11-08 Peter Bergner <bergner@linux.ibm.com>
2538 PR rtl-optimization/87600
2539 * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
2540 * lra-constraints.c (process_alt_operands): Skip illegal hard
2541 register usage. Prefer reloading non hard register operands.
2543 2018-11-08 Sandra Loosemore <sandra@codesourcery.com>
2546 * doc/invoke.texi (Optimize Options): Clarify default behavior
2547 for -fno-sched-interblock and -fno-sched-spec.
2549 2018-11-08 Roman Geissler <roman.geissler@amadeus.com>
2551 * collect2.c (linker_select): Add USE_LLD_LD.
2552 (ld_suffixes): Add ld.lld.
2553 (main): Handle -fuse-ld=lld.
2554 * common.opt (-fuse-ld=lld): New option.
2555 * doc/invoke.texi (-fuse-ld=lld): Document.
2556 * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2558 2018-11-08 Paul Koning <ni1d@arrl.net>
2560 * config/pdp11/constraints.md: Add "Z" series constraints for use
2561 with pre-dec and post-inc addressing.
2562 * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
2563 (pdp11_expand_operands): Add int argument (word count).
2564 (pdp11_sp_frame_offset): Delete.
2565 (pdp11_cmp_length): New function.
2566 (pushpop_regeq): New function.
2567 * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
2569 (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
2571 (pdp11_initial_elimination_offset): Ditto.
2572 (pdp11_expand_operands): Add word count argument. Bugfixes.
2573 (output_move_multiple): Change how pointer adjustment is done.
2574 (pdp11_gen_int_label): Correct format.
2575 (output_ascii): Ditto.
2576 (pdp11_asm_output_var): Add code for DEC assembler case.
2577 (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
2579 (legitimate_const_double_p): Ditto.
2580 (pdp11_register_move_cost): Adjust for new register classes.
2581 (pdp11_regno_reg_class): Ditto.
2582 (expand_block_move): Delete.
2583 (pushpop_regeq): New function.
2584 (pdp11_legitimate_address_p): Bugfix in check for constant
2586 (pdp11_sp_frame_offset): Delete.
2587 (pdp11_reg_save_size): New helper function for new frame layout.
2588 (output_addr_const_pdp11): Remove CONST_DOUBLE case.
2589 (pdp11_expand_shift): Bugfix in check for constant shift count.
2590 (pdp11_shift_length): Ditto.
2591 (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
2592 (pdp11_cmp_length): New function.
2593 * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
2594 some compile options.
2595 (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
2596 (CALL_USED_REGISTERS): Ditto.
2597 (ELIMINABLE_REGS): Ditto.
2598 (REGISTER_NAMES): Ditto.
2599 (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
2601 (REG_CLASS_NAMES): Ditto.
2602 (REG_CLASS_CONTENTS): Ditto. Also remove
2603 HARD_FRAME_POINTER_REGNUM.
2604 (CPU_REG_CLASS): New macro.
2605 (CLASS_MAX_NREGS): Adjust for new register classes.
2606 (FUNCTION_PROFILER): Make no-op.
2607 (may_call_alloca): Remove unused declaration.
2608 (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
2609 (ASM_OUTPUT_SKIP): Fix format.
2610 * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
2611 (HARD_FRAME_POINTER_REGNUM): Remove.
2613 (*rts): Rename. Remove epilogue related checks.
2614 (cmpsi, cmpdi): New insn.
2615 (cbranch<mode>4): Change to apply to SI and DI modes as well.
2616 (mov<mode>): Change constraints to enforce that push/pop
2617 destination cannot use the same register as source.
2618 (*mov<mode><cc_cc>): Ditto.
2619 (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
2620 at assembly output rather than as RTL expander.
2621 (zero_extendqihi2): Bugfix in check for same registers.
2622 (adddi3_nocc): Bugfix in check for constant operand.
2623 (addsi3_nocc): Ditto.
2624 (subdi3_nocc): Ditto.
2625 (subsi3_nocc): Ditto.
2626 (negdi2_nocc): Copy input to pdp11_expand_operands.
2627 (negsi2_nocc): Ditto.
2628 (bswap2_nocc): Ditto.
2629 * config/pdp11/pdp11.opt (mlra): Fix documentation.
2630 * config/pdp11/t-pdp11: Use -Os.
2632 2018-11-08 Richard Earnshaw <rearnsha@arm.com>
2634 * config/arm/parsecpu.awk (/alias/): New parsing rule.
2635 (/begin cpu/): Check that the cpu name hasn't been previously defined.
2636 (gen_comm_data): Print out CPU alias tables.
2637 (check_cpu): Match aliases when checking the CPU name.
2638 * config/arm/arm-protos.h (cpu_alias): New structure.
2639 (cpu_option): Add entry for aliases.
2640 * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
2641 strongarm1100 and strongarm1110.
2642 (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
2643 (config/arm/arm-generic.md): Remove redundant references to
2644 strongarm110, strongarm1100 and strongarm1110.
2645 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
2646 Scan aliases for additional hints.
2647 (arm_parse_cpu_option_name): Also match a cpu name against the list
2649 * config/arm/arm-tables.opt: Regenerated.
2650 * config/arm/arm-tune.md: Regenerated.
2652 2018-11-08 Jakub Jelinek <jakub@redhat.com>
2654 * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2655 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2656 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2657 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2658 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2659 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2660 * gengtype.c (open_base_files): Add omp-general.h.
2661 * gimple.c (gimple_build_omp_critical):
2662 (gimple_build_omp_taskgroup): Add CLAUSES argument. Call
2663 gimple_omp_taskgroup_set_clauses.
2664 (gimple_build_omp_atomic_load): Add mo argument, call
2665 gimple_omp_atomic_set_memory_order.
2666 (gimple_build_omp_atomic_store): Likewise.
2667 (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
2668 * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
2670 (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
2671 of GSS_OMP_SINGLE_LAYOUT, adjust comments.
2672 * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
2673 and GF_OMP_ATOMIC_MEMORY_ORDER. Remove GF_OMP_ATOMIC_SEQ_CST, use
2674 different value for GF_OMP_ATOMIC_NEED_VALUE.
2675 (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
2677 (struct gimple_statement_omp_single_layout): And remove here.
2678 (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
2679 than gimple_statement_omp_single_layout.
2680 (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
2682 (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
2683 (gimple_omp_subcode): Formatting fix.
2684 (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
2685 gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
2686 gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
2687 gimple_omp_teams_host, gimple_omp_teams_set_host,
2688 gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
2689 gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
2690 gimple_omp_taskgroup_set_clauses): New inline functions.
2691 (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
2692 (gimple_build_omp_atomic_store): Likewise.
2693 (gimple_omp_atomic_seq_cst_p): Remove.
2694 (gimple_omp_atomic_memory_order): New function.
2695 (gimple_omp_atomic_set_seq_cst): Remove.
2696 (gimple_omp_atomic_set_memory_order): New function.
2697 (gimple_build_omp_taskgroup): Add clauses argument.
2698 * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
2699 (dump_gimple_omp_task): Print taskwait with depend clauses.
2700 (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
2701 dump_omp_atomic_memory_order.
2702 (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
2703 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
2704 GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
2705 (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
2706 renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
2707 ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
2708 ORT_UNTIED_TASKLOOP enumerators.
2709 (enum gimplify_defaultmap_kind): New.
2710 (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
2711 target_map_pointers_as_0len_arrays members, add defaultmap.
2712 (new_omp_context): Initialize defaultmap member.
2713 (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2714 (maybe_fold_stmt): Don't fold even in host teams regions.
2715 (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
2716 ORT_WORKSHARE. Test ctx->defaultmap[GDMK_SCALAR] instead of
2717 ctx->omp_firstprivatize_variable.
2718 (omp_add_variable): Don't add private/firstprivate for VLAs in
2720 (omp_default_clause): Print "taskloop" rather than "task" if
2722 (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2723 Handle new defaultmap clause kinds.
2724 (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE. Allow simd
2725 iterator to be lastprivate or private. Fix up diagnostics if linear
2726 is used on collapse>1 simd iterator.
2727 (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2728 (gimplify_omp_depend): New function.
2729 (gimplify_scan_omp_clauses): Add shared clause on parallel for
2730 combined parallel master taskloop{, simd} if taskloop has
2731 firstprivate, lastprivate or reduction clause. Handle
2732 OMP_CLAUSE_REDUCTION_TASK diagnostics. Adjust tests for
2733 ORT_COMBINED_TEAMS. Gimplify depend clauses with iterators. Handle
2734 cancel and simd OMP_CLAUSE_IF_MODIFIERs. Handle
2735 OMP_CLAUSE_NONTEMPORAL. Handle new defaultmap clause kinds. Handle
2736 OMP_CLAUSE_{TASK,IN}_REDUCTION. Diagnose invalid conditional
2738 (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL. Handle
2739 GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
2740 (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL. Handle
2741 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2742 (gimplify_omp_task): Handle taskwait with depend clauses.
2743 (gimplify_omp_for): Add shared clause on parallel for combined
2744 parallel master taskloop{, simd} if taskloop has firstprivate,
2745 lastprivate or reduction clause. Use ORT_TASKLOOP or
2746 ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK. Adjust
2747 tests for ORT_COMBINED_TEAMS. Handle C++ range for loops with
2748 NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS. Firstprivatize
2749 __for_end and __for_range temporaries on OMP_PARALLEL for
2750 distribute parallel for{, simd}. Move OMP_CLAUSE_REDUCTION
2751 and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
2752 sandwiched in between two taskloops.
2753 (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
2754 instead of ctx->omp_firstprivatize_variable.
2755 (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
2756 ORT_COMBINED_HOST_TEAMS if not inside of target construct. If
2757 host teams, use gimplify_and_return_first etc. for body like
2758 for target or target data constructs, and at the end call
2759 gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
2760 (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
2761 of OMP_ATOMIC_SEQ_CST, pass it as new argument to
2762 gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
2763 gimple_omp_atomic_set_seq_cst calls.
2764 (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
2765 case, handle taskgroup clauses.
2766 * lto-streamer-out.c (hash_tree): Handle
2767 OMP_CLAUSE_{TASK,IN}_REDUCTION.
2768 * Makefile.in (GTFILES): Add omp-general.h.
2769 * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
2770 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
2771 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
2772 BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
2773 BUILT_IN_GOMP_LOOP_DOACROSS_START,
2774 BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
2775 BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2776 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
2777 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
2778 BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
2779 BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
2780 BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
2781 BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2782 BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
2783 BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
2784 BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
2785 BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
2786 BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
2787 BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
2788 BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
2789 * omp-expand.c (workshare_safe_to_combine_p): Return false for
2790 non-worksharing loops.
2791 (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
2792 (determine_parallel_type): Don't combine parallel with worksharing
2793 which has _reductemp_ clause.
2794 (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
2795 GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
2796 if there is nonmonotonic modifier or if there is no modifier and no
2797 ordered clause. For dynamic and guided schedule without monotonic
2798 and nonmonotonic modifier, default to nonmonotonic.
2799 (expand_omp_for): Likewise. Adjust expand_omp_for_generic caller, use
2800 GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
2802 (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
2803 there are any reduction clauses.
2804 (expand_taskwait_call): New function.
2805 (expand_teams_call): New function.
2806 (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
2807 expand_teams_call for it. Formatting fix. Handle taskwait with
2809 (expand_omp_for_generic): Add SCHED_ARG argument. Handle expansion
2810 of worksharing loops with task reductions.
2811 (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
2812 expansion of worksharing loops with task reductions.
2813 (expand_omp_sections): Handle expansion of sections with task
2815 (expand_omp_synch): For host teams call expand_omp_taskreg.
2816 (omp_memory_order_to_memmodel): New function.
2817 (expand_omp_atomic_load, expand_omp_atomic_store,
2818 expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
2819 instead of gimple_omp_atomic_seq_cst_p.
2820 (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
2821 depend clauses as a standalone directive.
2822 * omp-general.c (enum omp_requires): New variable.
2823 (omp_extract_for_data): Initialize have_reductemp member. Allow
2824 NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
2825 GT_EXPR loops depending on incr sign. Formatting fixes.
2826 * omp-general.h (struct omp_for_data): Add have_reductemp member.
2827 (enum omp_requires): New enum.
2828 (omp_requires_mask): Declare.
2829 * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
2831 * omp-low.c (struct omp_context): Add task_reductions and
2832 task_reduction_map fields.
2833 (is_host_teams_ctx): New function.
2834 (is_taskreg_ctx): Return true also if is_host_teams_ctx.
2835 (use_pointer_for_field): Use is_global_var instead of
2836 TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
2838 (build_outer_var_ref): Ignore taskgroup outer contexts.
2839 (delete_omp_context): Release task_reductions and task_reduction_map.
2840 (scan_sharing_clauses): Don't add any fields for reduction clause on
2841 taskloop. Handle OMP_CLAUSE__REDUCTEMP_. Handle
2842 OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
2843 modifier. Don't ignore shared clauses in is_host_teams_ctx contexts.
2844 Handle OMP_CLAUSE_NONTEMPORAL.
2845 (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
2847 (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
2848 clauses with task modifier.
2849 (scan_omp_task): Handle taskwait with depend clauses.
2850 (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
2851 first. Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
2852 Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
2853 (scan_omp_for): Fix comment formatting.
2854 (scan_omp_teams): Handle host teams constructs.
2855 (check_omp_nesting_restrictions): Allow teams with no outer
2856 OpenMP context. Adjust diagnostics for teams strictly nested into
2857 some explicit OpenMP construct other than target. Allow OpenMP atomics
2858 inside of simd regions.
2859 (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
2860 (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
2861 taskreg_nesting_level while scanning host teams construct.
2862 (task_reduction_read): New function.
2863 (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
2864 construct. Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
2865 clauses. Handle OMP_CLAUSE_REDUCTION with task modifier. Remove
2866 second argument create_tmp_var if it is NULL. Don't ignore shared
2867 clauses in is_host_teams_ctx contexts. Handle
2868 OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
2870 (lower_reduction_clauses): Ignore reduction clauses with task
2871 modifier. Remove second argument create_tmp_var if it is NULL.
2872 Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
2873 (lower_send_clauses): Ignore reduction clauses with task modifier.
2874 Handle OMP_CLAUSE__REDUCTEMP_. Don't send anything for
2875 OMP_CLAUSE_REDUCTION on taskloop. Handle OMP_CLAUSE_IN_REDUCTION.
2876 (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
2877 rely that it is the last stmt in body so far. Ignore outer taskgroup
2879 (omp_task_reductions_find_first, omp_task_reduction_iterate,
2880 lower_omp_task_reductions): New functions.
2881 (lower_omp_sections): Handle reduction clauses with taskgroup
2882 modifiers. Adjust maybe_add_implicit_barrier_cancel caller.
2883 (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
2884 (lower_omp_for): Likewise. Handle reduction clauses with taskgroup
2886 (lower_omp_taskgroup): Handle taskgroup reductions.
2887 (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
2888 Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
2889 (lower_depend_clauses): If there are any
2890 OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2891 depend clauses, use a new array format. If OMP_CLAUSE_DEPEND_LAST is
2892 seen, assume lowering is done already and return early. Set kind
2893 on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
2894 (lower_omp_taskreg): Handle reduction clauses with task modifier on
2895 parallel construct. Handle reduction clause on taskloop construct.
2896 Handle taskwait with depend clauses.
2897 (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
2898 for host teams constructs.
2899 * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
2900 nontemporal and _reductemp_ clause entries.
2901 (omp_clause_code_name): Likewise.
2902 (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
2903 OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
2904 * tree-core.h (enum omp_clause_code): Add
2905 OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
2906 (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
2907 (struct tree_base): Add omp_atomic_memory_order field into union.
2908 Remove OMP_ATOMIC_SEQ_CST comment.
2909 (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2910 and OMP_CLAUSE_DEPEND_DEPOBJ.
2911 (struct tree_omp_clause): Add subcode.defaultmap_kind.
2912 * tree.def (OMP_TASKGROUP): Add another operand, move next to other
2913 OpenMP constructs with body and clauses operands.
2914 * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
2915 (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
2916 (OMP_TASKGROUP_CLAUSES): Define.
2917 (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
2918 OMP_CLAUSE__LOOPTEMP_.
2919 (OMP_ATOMIC_SEQ_CST): Remove.
2920 (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
2921 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
2922 (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
2923 OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
2924 OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
2925 OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
2926 OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
2927 (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
2928 OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
2929 OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
2931 * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
2932 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2933 OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
2934 (convert_local_omp_clauses): Likewise. Remove useless test.
2935 * tree-parloops.c (create_call_for_reduction_1): Pass
2936 OMP_MEMORY_ORDER_RELAXED as new argument to
2937 dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
2938 * tree-pretty-print.c (dump_omp_iterators): New function.
2939 (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
2940 OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION. Print
2941 reduction modifiers. Handle OMP_CLAUSE_DEPEND_DEPOBJ and
2942 OMP_CLAUSE_DEPEND_MUTEXINOUTSET. Print iterators in depend clauses.
2943 Print __internal__ for OMP_CLAUSE_DEPEND_LAST. Handle cancel and
2944 simd OMP_CLAUSE_IF_MODIFIERs. Handle new kinds of
2945 OMP_CLAUSE_DEFAULTMAP. Print conditional: for
2946 OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2947 (dump_omp_atomic_memory_order): New function.
2948 (dump_generic_node): Use it. Print taskgroup clauses. Print
2949 taskwait with depend clauses.
2950 * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
2951 * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
2952 Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
2953 * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
2954 write_ts_omp_clause_tree_pointers): Likewise.
2956 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2959 * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
2960 "-missed", "-note", and "-all" sub-options.
2961 * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
2963 (can_early_inline_edge_p): Likewise.
2964 (want_early_inline_function_p): Likewise.
2965 (want_inline_self_recursive_call_p): Likewise.
2966 (recursive_inlining): Likewise.
2967 (inline_small_functions): Likewise.
2968 (flatten_function): Likewise.
2969 (ipa_inline): Likewise.
2970 (inline_always_inline_functions): Likewise.
2971 (early_inline_small_functions): Likewise.
2972 (early_inliner): Likewise.
2973 * tree-inline.c (expand_call_inline): Likewise.
2975 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2977 * pretty-print.c (pp_format): Handle %f.
2978 (selftest::test_pp_format): Add test of %f.
2979 * pretty-print.h (pp_double): New macro.
2981 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2983 * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
2984 * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
2985 (dump_pretty_printer::decode_format): Implement "%C" for
2987 (selftest::test_capture_of_dump_calls): Rename "where" to
2988 "stmt_loc". Convert test_decl to a function decl and set its
2989 location. Add a symbol_table_test RAII instance and a
2990 cgraph_node, using it to test "%C" and dump_symtab_node.
2992 2018-11-08 Eric Botcazou <ebotcazou@adacore.com>
2995 * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
2997 2018-11-08 David Malcolm <dmalcolm@redhat.com>
2999 * cgraph.c: Include "selftest.h".
3000 (saved_symtab): New variable.
3001 (selftest::symbol_table_test::symbol_table_test): New ctor.
3002 (selftest::symbol_table_test::~symbol_table_test): New dtor.
3003 (selftest::test_symbol_table_test): New test.
3004 (selftest::cgraph_c_tests): New.
3005 * cgraph.h (saved_symtab): New decl.
3006 (selftest::symbol_table_test): New class.
3007 * selftest-run-tests.c (selftest::run_tests): Call
3008 selftest::cgraph_c_tests.
3009 * selftest.h (selftest::cgraph_c_tests): New decl.
3011 2018-11-08 Richard Biener <rguenther@suse.de>
3013 * tree-data-ref.h (lambda_int): New typedef.
3014 (lambda_vector_gcd): Adjust.
3015 (lambda_vector_new): Likewise.
3016 (lambda_matrix_new): Likewise.
3017 * tree-data-ref.c (print_lambda_vector): Adjust.
3019 2018-11-08 Richard Biener <rguenther@suse.de>
3021 PR tree-optimization/87929
3022 * tree-complex.c (expand_complex_comparison): Clean EH.
3024 2018-11-08 Martin Liska <mliska@suse.cz>
3026 * doc/extend.texi: Reword.
3027 * predict.c (expr_expected_value_1): Likewise.
3029 2018-11-08 Richard Biener <rguenther@suse.de>
3031 PR tree-optimization/87913
3032 * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
3033 of extreme values to ordered comparisons.
3035 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3038 * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
3040 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3042 * doc/invoke.texi: Remove leading dash from @opindex entries
3043 throughout the file.
3045 2018-11-07 Sandra Loosemore <sandra@codesourcery.com>
3048 * doc/invoke.texi (Option Summary): Add -e and --entry.
3049 (Link Options): Likewise.
3051 2018-11-07 Nathan Sidwell <nathan@acm.org>
3054 * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
3055 --disable-checking bootstrap.
3057 2018-11-07 Hafiz Abid Qadeer <abidh@codesourcery.com>
3059 * configure: Regenerated.
3061 2018-11-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3064 * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
3065 to the mode of the widest field iff the widest field has mode class
3066 MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
3069 2018-11-07 Nikolai Merinov <n.merinov@inango-systems.com>
3071 * common.opt: Add -Wattribute-warning.
3072 * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
3073 * expr.c (expand_expr_real_1): Add new attribute to warning_at
3074 call to allow user configure behavior of "warning" attribute.
3076 2018-11-07 Segher Boessenkool <segher@kernel.crashing.org>
3078 * target.def: Put @: after every vs., e.g., and i.e. where it is
3079 followed by whitespace.
3080 * doc/extend.texi: Ditto.
3081 * doc/fragments.texi: Ditto.
3082 * doc/gimple.texi: Ditto.
3083 * doc/implement-c.texi: Ditto.
3084 * doc/install.texi: Ditto.
3085 * doc/invoke.texi: Ditto.
3086 * doc/md.texi: Ditto.
3087 * doc/plugins.texi: Ditto.
3088 * doc/rtl.texi: Ditto.
3089 * doc/sourcebuild.texi: Ditto.
3090 * doc/tm.texi.in: Ditto.
3091 * doc/ux.texi: Ditto.
3092 * doc/tm.texi: Regenerate.
3094 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3096 * config/arm/arm-cpus.in (ares): New entry.
3097 * config/arm/arm-tables.opt: Regenerate.
3098 * config/arm/arm-tune.md: Likewise.
3099 * doc/invoke.texi (ARM Options): Document ares.
3101 2018-11-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3103 * config/aarch64/aarch64-cores.def (ares): Define.
3104 * config/aarch64/aarch64-tune.md: Regenerate.
3105 * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
3107 2018-11-07 Jan Hubicka <jh@suse.cz>
3109 * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
3110 (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
3111 functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
3114 2018-11-07 Richard Biener <rguenther@suse.de>
3116 PR tree-optimization/87914
3117 * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
3119 (vectorizable_reduction): Handle shifts and rotates by dispatching
3120 to vectorizable_shift.
3121 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
3122 in-loop uses of vect_nested_cycle defs. Merge cycle and internal
3124 (vectorizable_shift): Export and handle being called as
3126 (vect_analyze_stmt): Call vectorizable_shift after
3127 vectorizable_reduction.
3128 * tree-vectorizer.h (vectorizable_shift): Declare.
3130 2018-11-07 Jan Hubicka <jh@suse.cz>
3132 * ipa-devirt.c (odr_types_equivalent_p): Expect constants
3133 than const decls in TREE_VALUE of enum.
3134 (dump_type_inheritance_graph): Improve duplicate dumping.
3135 (free_enum_values): New.
3136 (build_type_inheritance_graph): Use it.
3137 * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
3138 which are not main variants or not ODR types.
3139 (verify_type_variant): Expect variants to have no TYPE_VALUES.
3141 2018-11-07 Richard Biener <rguenther@suse.de>
3143 * ipa-inline.c (want_inline_small_function_p): Compute
3144 big_speedup_p lazily and last.
3146 2018-11-07 Jan Hubicka <jh@suse.cz>
3148 * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
3149 building incomplete variant of complete type.
3150 (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
3151 variant of complete type.
3153 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3155 * config/mips/mips.c: Fix typo in documentation of
3156 mips_loongson_ext2_prefetch_cookie.
3157 (mips_option_override): fix brain twister logical.
3158 * config/mips/mips.h: Fix typo in documentation of
3159 ISA_HAS_CTZ_CTO and define pattern.
3160 * config/mips/mips.md (prefetch): Hoist EXT2 above
3162 (prefetch_indexed): Hoist EXT2 above the EXT block.
3164 2018-11-07 Jan Hubicka <jh@suse.cz>
3166 * tree.c (free_lang_data_in_type): Add fld parameter; simplify
3167 return and parameter types of function and method types.
3168 (free_lang_data_in_cgraph): Update.
3170 2018-11-07 Martin Liska <mliska@suse.cz>
3172 PR rtl-optimization/87868
3173 * postreload-gcse.c (eliminate_partially_redundant_load): Set
3174 threshold to max_count if we would overflow.
3175 * profile-count.h: Make max_count a public constant.
3177 2018-11-07 Martin Liska <mliska@suse.cz>
3179 * mem-stats.h: Fix GNU coding style.
3181 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3183 * config/mips/gs264e.md: New.
3184 * config/mips/mips-cpus.def: Define gs264e.
3185 * config/mips/mips-tables.opt: Regenerate.
3186 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3188 (mips_issue_rate): Add support for gs264e.
3189 (mips_multipass_dfa_lookahead): Likewise.
3190 * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
3191 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
3192 (MIPS_ASE_MSA_SPEC): New.
3193 (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
3194 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
3195 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
3196 * config/mips/mips.md: Include gs264e.md.
3197 (processor): Add gs264e.
3198 * config/mips/mips.opt (MSA): Use Mask instead of Var.
3199 * doc/invoke.texi: Add gs264e to supported architectures.
3201 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3203 * config/mips/gs464e.md: New.
3204 * config/mips/mips-cpus.def: Define gs464e.
3205 * config/mips/mips-tables.opt: Regenerate.
3206 * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
3208 (mips_issue_rate): Add support for gs464e.
3209 (mips_multipass_dfa_lookahead): Likewise.
3210 (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
3211 * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
3212 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
3213 (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
3214 (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
3215 * config/mips/mips.md: Include gs464e.md.
3216 (processor): Add gs464e.
3217 * doc/invoke.texi: Add gs464e to supported architectures.
3219 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3221 * config/mips/loongson3a.md: Rename to ...
3222 * config/mips/gs464.md: ... here.
3223 * config/mips/mips-cpus.def: Define gs464; Add loongson3a
3224 as an alias of gs464 processor.
3225 * config/mips/mips-tables.opt: Regenerate.
3226 * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
3227 instead of PROCESSOR_LOONGSON_3A.
3228 (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
3230 (mips_option_override): Enable MMI and EXT for gs464.
3231 * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
3232 Rename TUNE_LOONGSON_3A to TUNE_GS464.
3233 (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
3234 (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
3235 ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
3237 * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
3238 (processor): Add gs464;
3239 * doc/invoke.texi: Add gs464 to supported architectures.
3241 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3243 * config/mips/mips-protos.h
3244 (mips_loongson_ext2_prefetch_cookie): New prototype.
3245 * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
3246 (mips_option_override): Enable TARGET_LOONGSON_EXT when
3247 TARGET_LOONGSON_EXT2 is true.
3248 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
3249 __mips_loongson_ext2, __mips_loongson_ext_rev=2.
3250 (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
3251 (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
3252 TARGET_LOONGSON_EXT2.
3253 (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
3254 (define_insn "ctz<mode>2"): New insn pattern.
3255 (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
3256 (define_insn "prefetch_indexed_<mode>"): Include
3257 TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
3258 * config/mips/mips.opt (-mloongson-ext2): Add option.
3259 * gcc/doc/invoke.texi (-mloongson-ext2): Document.
3261 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3263 * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
3264 __mips_loongson_ext.
3265 (MIPS_ASE_LOONGSON_EXT_SPEC): New.
3266 (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
3268 (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
3269 * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
3270 <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
3271 instead of TARGET_LOONGSON_3A.
3272 * config/mips/mips.opt (-mloongson-ext): Add option.
3273 * gcc/doc/invoke.texi (-mloongson-ext): Document.
3275 2018-11-07 Chenghua Xu <paul.hua.gm@gmail.com>
3277 * config.gcc (extra_headers): Add loongson-mmiintrin.h.
3278 * config/mips/loongson.md: Move to ...
3279 * config/mips/loongson-mmi.md: here; Adjustment.
3280 * config/mips/loongson.h: Move to ...
3281 State as deprecated. Include loongson-mmiintrin.h for back
3282 compatibility and warning.
3283 * config/mips/loongson-mmiintrin.h: ... here.
3284 * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
3285 mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
3286 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3287 (mips_option_override): Make sure MMI use hard float;
3288 (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
3289 mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
3290 mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
3291 TARGET_LOONGSON_VECTORS.
3292 * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
3293 (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
3294 (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
3295 (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
3297 (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
3298 TARGET_LOONGSON_VECTORS.
3299 * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
3300 TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
3301 (Loongson MMI patterns): Include loongson-mmi.md instead of
3303 * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
3304 * gcc/doc/invoke.texi (-mloongson-mmi): Document.
3306 2018-11-07 Richard Biener <rguenther@suse.de>
3309 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
3310 BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
3312 2018-11-07 Alexandre Oliva <aoliva@redhat.com>
3314 PR rtl-optimization/87874
3315 * lra.c (lra_substitute_pseudo): Do not create a subreg for
3318 2018-11-06 Aaron Sawdey <acsawdey@linux.ibm.com>
3320 * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
3321 if not in indexed or indirect form.
3322 (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
3323 (bswap<mode>2_store): Ditto.
3325 2018-11-06 Richard Earnshaw <rearnsha@arm.com>
3327 * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
3330 2018-11-06 Richard Biener <rguenther@suse.de>
3332 PR tree-optimization/86850
3333 * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
3334 instead of src.m_vec.
3336 2018-11-06 Jan Hubicka <jh@suse.cz>
3338 * tree.c (fld_simplified_type_name): Break out form ...
3339 (free_lang_data_in_type): ... here.
3340 (fld_type_variant_equal_p): Use it.
3342 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3344 * config/default-d.c: Include memmodel.h.
3346 * config/sol2-d.c: New file.
3347 * config/t-sol2 (sol2-d.o): New rule.
3348 * config.gcc <*-*-solaris2*>: Set d_target_objs,
3349 target_has_targetdm.
3351 2018-11-06 Jan Hubicka <jh@suse.cz>
3353 * tree.c (fld_type_variant): Also copy alignment; be sure that
3354 new variant is equal.
3356 2018-11-06 Ilya Leoshkevich <iii@linux.ibm.com>
3359 * config/s390/s390.md: Add relative_long attribute.
3361 2018-11-06 Jan Hubicka <jh@suse.cz>
3363 * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
3364 * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
3365 * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
3366 stream TYPE_NEEDS_CONSTRUCTING.
3367 * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
3368 * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
3370 2018-11-06 Richard Biener <rguenther@suse.de>
3372 * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
3374 (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
3376 2018-11-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3378 * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
3379 REG_CLASS_CONTENTS[GEN_REGS].
3380 (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
3382 2018-11-06 Jan Hubicka <jh@suse.cz>
3384 * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
3386 2018-11-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3389 * config/sol2.h (ASAN_CC1_SPEC): Define.
3390 (LD_WHOLE_ARCHIVE_OPTION): Define.
3391 (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
3392 (ASAN_REJECT_SPEC): Provide default.
3393 (LIBASAN_EARLY_SPEC): Define.
3394 (LIBTSAN_EARLY_SPEC): Define.
3395 (LIBLSAN_EARLY_SPEC): Define.
3396 * config/i386/sol2.h (CC1_SPEC): Redefine.
3397 (ASAN_REJECT_SPEC): Define.
3399 * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
3400 (TARGET_ASAN_SHADOW_OFFSET): Define.
3401 (sparc_asan_shadow_offset): New function.
3402 * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
3403 (ASAN_REJECT_SPEC): Define.
3405 2018-11-06 Jan Hubicka <jh@suse.cz>
3407 * tree.c (fld_type_variant): Copy canonical type.
3408 (fld_incomplete_type_of): Check that canonical types looks sane;
3409 copy canonical type.
3410 (verify_type): Accept when incomplete type has complete canonical type.
3412 2018-11-06 Jan Hubicka <jh@suse.cz>
3414 * tree.c (free_lang_data): Reset overwite_assembler_name,
3415 print_xnode, print_decl, print_type and print_identifier of
3418 2018-11-06 Richard Biener <rguenther@suse.de>
3420 PR tree-optimization/87889
3421 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3422 Do nothing if old and new arg are the same
3424 2018-11-06 Andreas Krebbel <krebbel@linux.ibm.com>
3427 * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
3428 attributes for operands 3 and 4.
3430 2018-11-06 Richard Biener <rguenther@suse.de>
3433 * simplify-rtx.c (simplify_binary_operation_1): Add pattern
3434 matching bitfield insertion.
3436 2018-11-06 Alexandre Oliva <aoliva@redhat.com>
3438 * auto-inc-dec.c: Include valtrack.h. Improve comments.
3439 (reg_next_debug_use): New.
3440 (attempt_change): Propagate adjusted expression into affected
3442 (merge_in_block): Track uses in debug insns.
3443 (pass_inc_dec::execute): Allocate and release
3446 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
3448 * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
3449 (_mm512_fixupimm_round_pd): Update parameters and builtin.
3450 (_mm512_maskz_fixupimm_round_pd): Ditto.
3451 (_mm512_fixupimm_round_ps): Ditto.
3452 (_mm512_maskz_fixupimm_round_ps): Ditto.
3453 (_mm_fixupimm_round_sd): Ditto.
3454 (_mm_maskz_fixupimm_round_sd): Ditto.
3455 (_mm_fixupimm_round_ss): Ditto.
3456 (_mm_maskz_fixupimm_round_ss): Ditto.
3457 (_mm512_fixupimm_pd): Ditto.
3458 (_mm512_maskz_fixupimm_pd): Ditto.
3459 (_mm512_fixupimm_ps): Ditto.
3460 (_mm512_maskz_fixupimm_ps): Ditto.
3461 (_mm_fixupimm_sd): Ditto.
3462 (_mm_maskz_fixupimm_sd): Ditto.
3463 (_mm_fixupimm_ss): Ditto.
3464 (_mm_maskz_fixupimm_ss): Ditto.
3465 (_mm512_mask_fixupimm_round_pd): Update builtin.
3466 (_mm512_mask_fixupimm_round_ps): Ditto.
3467 (_mm_mask_fixupimm_round_sd): Ditto.
3468 (_mm_mask_fixupimm_round_ss): Ditto.
3469 (_mm512_mask_fixupimm_pd): Ditto.
3470 (_mm512_mask_fixupimm_ps): Ditto.
3471 (_mm_mask_fixupimm_sd): Ditto.
3472 (_mm_mask_fixupimm_ss): Ditto.
3473 * config/i386/avx512vlintrin.h:
3474 (_mm256_fixupimm_pd): Update parameters and builtin.
3475 (_mm256_maskz_fixupimm_pd): Ditto.
3476 (_mm256_fixupimm_ps): Ditto.
3477 (_mm256_maskz_fixupimm_ps): Ditto.
3478 (_mm_fixupimm_pd): Ditto.
3479 (_mm_maskz_fixupimm_pd): Ditto.
3480 (_mm_fixupimm_ps): Ditto.
3481 (_mm_maskz_fixupimm_ps): Ditto.
3482 (_mm256_mask_fixupimm_pd): Update builtin.
3483 (_mm256_mask_fixupimm_ps): Ditto.
3484 (_mm_mask_fixupimm_pd): Ditto.
3485 (_mm_mask_fixupimm_ps): Ditto.
3486 * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
3487 * config/i386/i386-builtin.def: Update builtin definitions.
3488 * config/i386/i386.c: Handle new builtin types and remove useless ones.
3489 * config/i386/sse.md: Update VFIXUPIMM* patterns.
3490 (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3491 (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3492 (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
3493 (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3494 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3495 (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
3496 * config/i386/subst.md:
3497 (round_saeonly_sd_mask_operand4): Add new subst_attr.
3498 (round_saeonly_sd_mask_op4): Ditto.
3499 (round_saeonly_expand_operand5): Ditto.
3500 (round_saeonly_expand): Update.
3502 2018-11-05 Max Filippov <jcmvbkbc@gmail.com>
3504 * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
3506 2018-11-05 Segher Boessenkool <segher@kernel.crashing.org>
3508 PR rtl-optimization/87871
3509 * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
3511 2018-11-05 Paul Koning <ni1d@arrl.net>
3513 * doc/sourcebuild.texi (target attributes): Document new "inf"
3514 effective target keyword.
3516 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3518 * config/s390/s390.c (s390_register_move_cost): Increase costs for
3519 moves involving the CC reg.
3521 2018-11-05 Richard Biener <rguenther@suse.de>
3523 PR tree-optimization/87873
3524 * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
3526 * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
3527 * tree-vect-loop.c (vect_transform_loop): When splitting the
3528 loop exit also create forwarder PHIs for constants.
3529 * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3530 Handle constant to_arg, add extra checking we match up the correct
3533 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3535 * config/s390/s390.md: QImode and HImode for load on condition.
3537 2018-11-05 Robin Dapp <rdapp@linux.ibm.com>
3539 * config/s390/predicates.md: Fix typo.
3540 * config/s390/s390.md: Allow immediates for load on condition.
3542 2018-11-05 Martin Liska <mliska@suse.cz>
3544 * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
3545 * bitmap.h (struct bitmap_usage): Likewise.
3546 * ggc-common.c (SCALE): Remove.
3548 (struct ggc_usage): Use SIZE_AMOUNT. And update
3550 * ggc-page.c (SCALE): Remove.
3551 (STAT_LABEL): Remove.
3552 (ggc_print_statistics): Use SIZE_AMOUNT.
3553 * gimple.h (SCALE): Remove.
3555 * input.c (ONE_K): Remove.
3558 (STAT_LABEL): Likewise.
3559 (FORMAT_AMOUNT): Likewise.
3560 (dump_line_table_statistics): Use SIZE_AMOUNT.
3561 * mem-stats.h (struct mem_usage): Likewise.
3562 * rtl.c (dump_rtx_statistics): Likewise.
3563 (rtx_alloc_counts): Change type to size_t.
3564 (rtx_alloc_sizes): Likewise.
3565 (rtx_count_cmp): New.
3566 (dump_rtx_statistics): Sort first based on counts.
3567 * tree.c (tree_nodes_cmp): New.
3568 (tree_codes_cmp): New.
3569 (dump_tree_statistics): Sort first based on counts.
3570 * system.h (ONE_K): New.
3572 (SIZE_SCALE): Likewise.
3573 (SIZE_LABEL): Likewise.
3574 (SIZE_AMOUNT): Likewise.
3575 * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
3576 * tree-dfa.c (dump_dfa_stats): Likewise.
3577 * tree-phinodes.c (phinodes_print_statistics): Likewise.
3578 * tree-ssanames.c (ssanames_print_statistics): Likewise.
3579 * tree.c (dump_tree_statistics): Likewise.
3580 * vec.c (struct vec_usage): Likewise.
3581 * trans-mem.c (tm_mangle): Enlarge buffer in order to not
3582 trigger a -Werror=format-overflow with
3583 --enable-gather-detailed-stats.
3585 2018-11-05 Martin Liska <mliska@suse.cz>
3587 * mem-stats.h (mem_alloc_description::release_instance_overhead):
3589 * vec.c (struct vec_usage): Register m_element_size.
3590 (vec_prefix::register_overhead): New arguments: elements and
3592 (vec_prefix::release_overhead): Subtract elements.
3593 * vec.h (struct vec_prefix): Change signature.
3594 (va_heap::reserve): Pass proper arguments.
3595 (va_heap::release): Likewise.
3597 2018-11-05 Martin Liska <mliska@suse.cz>
3599 * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
3603 2018-11-05 Richard Biener <rguenther@suse.de>
3605 * tree-scalar-evolution.h (final_value_replacement_loop): Update
3607 * tree-scalar-evolution.c (final_value_replacement_loop): Return
3608 whether anything was done.
3609 (scev_const_prop): Remove constant propagation part, fold
3611 * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
3612 (pass_data_scev_cprop): TODO_cleanup_cfg is now done
3615 2018-11-05 Jakub Jelinek <jakub@redhat.com>
3617 PR tree-optimization/87859
3618 * gimple-ssa-store-merging.c (struct merged_store_group): Add
3619 only_constants and first_nonmergeable_order members.
3620 (merged_store_group::merged_store_group): Initialize them.
3621 (merged_store_group::do_merge): Clear only_constants member if
3622 adding something other than INTEGER_CST store.
3623 (imm_store_chain_info::coalesce_immediate_stores): Don't merge
3624 stores with order >= first_nonmergeable_order. Use
3625 merged_store->only_constants instead of always recomputing it.
3626 Set merged_store->first_nonmergeable_order if we've skipped any
3627 stores. Attempt to merge overlapping INTEGER_CST stores that
3628 we would otherwise skip.
3631 * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
3633 2018-11-05 Xuepeng Guo <xuepeng.guo@intel.com>
3636 * config/i386/emmintrin.h (__v16qs): New to cope with option
3638 (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
3639 (_mm_cmplt_epi8): Likewise.
3640 (_mm_cmpgt_epi8): Likewise.
3642 2018-11-05 Richard Biener <rguenther@suse.de>
3644 PR rtl-optimization/87852
3645 * fwprop.c (use_killed_between): Only consider single-defs of the
3646 use whose definition statement dominates the use.
3648 2018-11-05 Martin Liska <mliska@suse.cz>
3651 * doc/invoke.texi: Remove options that are
3652 not disabled with -Os.
3654 2018-11-05 Martin Liska <mliska@suse.cz>
3657 * doc/extend.texi: Update constrain about the last argument
3658 of __builtin_expect_with_probability.
3660 2018-11-05 Martin Liska <mliska@suse.cz>
3663 * predict.c (expr_expected_value_1): Verify
3664 that last argument is a real constants and emit
3667 2018-11-05 Martin Liska <mliska@suse.cz>
3669 PR gcov-profile/77698
3670 * ipa-profile.c (ipa_profile): Adjust hotness threshold
3673 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3675 PR tree-optimization/86572
3676 * builtins.c (c_strlen): Handle negative offsets in a safe way.
3678 2018-11-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
3680 PR tree-optimization/87672
3681 * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
3682 * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
3684 2018-11-04 Uros Bizjak <ubizjak@gmail.com>
3687 * cfgexpand.c (pass_expand::execute): Move the call to
3688 finish_eh_generation in front of the call to expand_stack_alignment.
3690 2018-11-04 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
3692 * common/config/i386/i386-common.c (processor_alias_table): Add
3694 * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
3695 (case ${target}): Add znver2.
3696 * config/i386/driver-i386.c: (host_detect_local_cpu): Let
3697 -march=native recognize znver2 processors.
3698 * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
3699 * config/i386/i386.c (m_znver2): New definition.
3700 (m_ZNVER): New definition.
3701 (m_AMD_MULTIPLE): Includes m_znver2.
3702 (processor_cost_table): Add znver2 entry.
3703 (processor_target_table): Add znver2 entry.
3704 (get_builtin_code_for_version): Set priority for
3706 (processor_model): Add M_AMDFAM17H_ZNVER2.
3707 (arch_names_table): Ditto.
3708 (ix86_reassociation_width): Include znver2.
3709 * config/i386/i386.h (TARGET_znver2): New definition.
3710 (struct ix86_size_cost): Add TARGET_ZNVER2.
3711 (enum processor_type): Add PROCESSOR_ZNVER2.
3712 * config/i386/i386.md (define_attr "cpu"): Add znver2.
3713 * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
3714 * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
3715 (ix86_adjust_cost): Add znver2.
3716 * config/i386/x86-tune.def: Replace m_ZNVER1 by m_ZNVER.
3717 * gcc/doc/extend.texi: Add details about znver2.
3718 * gcc/doc/invoke.texi: Add details about znver2.
3720 2018-11-03 Sandra Loosemore <sandra@codesourcery.com>
3724 * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
3727 2018-11-02 Aaron Sawdey <acsawdey@linux.ibm.com>
3729 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
3730 attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
3732 2018-11-02 Richard Earnshaw <rearnsha@arm.com>
3734 * config/aarch64/aarch64.c ((aarch64_override_options): Disable
3735 shrink-wrapping when -mtrack-speculation.
3737 2018-11-02 Richard Biener <rguenther@suse.de>
3739 * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
3740 (pop_cost_one_pair): Do not free pair.
3741 (pop_best_coalesce): Likewise.
3742 (create_coalesce_list): Initialize obstack.
3743 (delete_coalesce_list): Free obstack.
3744 (find_coalesce_pair): Obstack-allocate coalesce pairs.
3745 (add_cost_one_coalesce): Likewise.
3746 (struct live_track): Remove bitmap pointer indirections.
3747 (new_live_track): Adjust.
3748 (delete_live_track): Likewise.
3749 (live_track_remove_partition): Likewise.
3750 (live_track_add_partition): Likewise.
3751 (live_track_live_p): Likewise.
3752 (live_track_process_def): Likewise.
3753 (live_track_clear_base_vars): Likewise.
3755 2018-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3757 * configure.ac (gcc_cv_as_sparc_register_op): Remove.
3758 * configure: Regenerate.
3759 * config.in: Regenerate.
3760 * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
3761 HAVE_AS_REGISTER_PSEUDO_OP guard.
3762 * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
3763 !HAVE_AS_REGISTER_PSEUDO_OP support.
3764 (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
3767 2018-11-02 Richard Biener <rguenther@suse.de>
3769 * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
3772 2018-11-02 Richard Biener <rguenther@suse.de>
3774 PR tree-optimization/87776
3775 * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
3776 executable when iterating but running into rpo-vn-max-loop-depth
3777 and not eliding the iteration.
3779 2018-11-30 Jan Hubicka <jh@suse.cz>
3781 * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
3784 2018-11-01 Aaron Sawdey <acsawdey@linux.ibm.com>
3786 * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
3788 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
3789 Combine with rs6000_address_for_fpconvert.
3790 (rs6000_address_for_fpconvert): Combine with
3791 rs6000_force_indexed_or_indirect_mem.
3792 (rs6000_expand_vector_init): Change function call from
3793 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3794 * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
3795 rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3796 (floatsi<mode>2_lfiwax_mem): Ditto.
3797 (floatunssi<mode>2_lfiwzx): Ditto.
3798 (floatunssi<mode>2_lfiwzx_mem): Ditto.
3799 (float<QHI:mode><FP_ISA3:mode>2): Ditto.
3800 (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
3801 (fix_trunc<mode>si2_stfiwx): Ditto.
3802 (fixuns_trunc<mode>si2_stfiwx): Ditto.
3803 (float_<mode>si2_hw): Ditto.
3804 (floatuns_<mode>si2_hw): Ditto.
3805 * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
3806 (vsx_splat_<mode>): Ditto.
3808 2018-11-01 Joseph Myers <joseph@codesourcery.com>
3810 * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
3811 at end of assembler input text.
3812 * configure: Regenerate.
3814 2018-11-01 Jakub Jelinek <jakub@redhat.com>
3816 PR tree-optimization/87826
3817 * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
3818 negative or larger or equal to type's precision.
3820 2018-10-31 Alexandre Oliva <aoliva@redhat.com>
3822 * opts.c (default_options_table): Do not enable
3823 OPT_fdelayed_branch at -Og.
3824 * doc/invoke.texi (-fdelayed-branch): Document it.
3826 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3828 * optabs-libfuncs.c (build_libfunc_function_visibility):
3829 New, split out from...
3830 (build_libfunc_function): ... here.
3831 (init_one_libfunc_visibility): New, split out from ...
3832 (init_one_libfunc): ... here.
3834 * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
3835 scratch register need not be early-clobber. Document the reason
3836 why we cannot use ST<OP>.
3838 2018-10-31 Joseph Myers <joseph@codesourcery.com>
3841 * configure.ac: Remove AC_PREREQ. Use AC_LANG_SOURCE. Use single
3842 line for second argument of AC_DEFINE_UNQUOTED.
3843 * doc/install.texi (Tools/packages necessary for modifying GCC):
3844 Update to autoconf 2.69 and automake 1.15.1.
3845 * aclocal.m4, config.in, configure: Regenerate.
3847 2018-10-31 Pat Haugen <pthaugen@us.ibm.com>
3849 * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
3852 2018-10-31 Martin Liska <mliska@suse.cz>
3855 * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
3856 Add new argument invalid_extension.
3857 (aarch64_get_all_extension_candidates): New function.
3858 (aarch64_rewrite_selected_cpu): Add NULL to function call.
3859 * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
3861 (aarch64_get_all_extension_candidates): New function.
3862 * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
3863 argument invalid_extension.
3864 (aarch64_parse_cpu): Likewise.
3865 (aarch64_print_hint_for_extensions): New function.
3866 (aarch64_validate_mcpu): Provide hint about invalid extension.
3867 (aarch64_validate_march): Likewise.
3868 (aarch64_handle_attr_arch): Pass new argument.
3869 (aarch64_handle_attr_cpu): Provide hint about invalid extension.
3870 (aarch64_handle_attr_isa_flags): Likewise.
3872 2018-10-31 Richard Biener <rguenther@suse.de>
3876 * tree-outof-ssa.c (insert_backedge_copies): Restrict
3877 copy generation to useful cases. Place the copy before
3878 the definition of the backedge value when possible.
3880 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3882 * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
3883 * config/arc/arc.c (arc_active_insn): New function.
3884 (check_store_cacheline_hazard): Likewise.
3885 (workaround_arc_anomaly): Use check_store_cacheline_hazard.
3886 (arc_override_options): Disable delay slot scheduler for older
3888 (arc_store_addr_hazard_p): New implementation, old one renamed to
3890 (arc_store_addr_hazard_internal_p): Renamed.
3891 (arc_reorg): Don't combine into brcc instructions which are part
3892 of hardware hazard solution.
3893 * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
3894 (tune_arc700): Likewise.
3895 * config/arc/arc.opt (arc7xx): New tune value.
3896 * config/arc/arc700.md: Improve A7 scheduler.
3898 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3900 * config/arc/arc.c (arc_override_options): Remove
3901 TARGET_COMPACT_CASESI.
3902 * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
3903 (CASE_VECTOR_MODE): Likewise.
3904 (CASE_VECTOR_PC_RELATIVE): Likewise.
3905 (CASE_VECTOR_SHORTEN_MODE): Likewise.
3906 (CASE_VECTOR_SHORTEN_MODE1): Delete.
3907 (ADDR_VEC_ALIGN): Update.
3908 (ASM_OUTPUT_CASE_LABEL): Undefine.
3909 (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
3910 (TARGET_BI_BIH): Define.
3911 (DEFAULT_BRANCH_INDEX): Likewise.
3912 * config/arc/arc.md (casesi): Rework to accept BI/BIH
3913 instructions, remove compact_casesi use case.
3914 (casesi_compact_jump): Remove.
3915 (casesi_dispatch): New pattern.
3916 * config/arc/arc.opt: Add mbranch-index option. Deprecate
3917 compact_casesi option.
3918 * doc/invoke.texi: Document mbranch-index option.
3920 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3922 * config/arc/arc.c (arc_get_tp): Remove function.
3923 (arc_emit_call_tls_get_addr): Likewise.
3924 (arc_call_tls_get_addr): New function.
3925 (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
3926 * config/arc/arc.md (tls_load_tp_soft): Remove.
3927 (tls_gd_get_addr): Likewise.
3929 2018-10-31 Claudiu Zissulescu <claziss@synopsys.com>
3931 * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
3932 (mulsi3_600_lib): Remove pattern.
3933 (umulsi3_highpart_600_lib_le): Likewise.
3934 (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
3935 (umulsidi3): Remove call to umulsidi3_600_lib.
3936 (umulsidi3_600_lib): Remove pattern.
3937 (peephole2): Remove peephole using the above deprecated patterns.
3939 2018-10-31 Thomas Preud'homme <thomas.preudhomme@linaro.org>
3942 * config/arm/arm.c (arm_option_check_internal): Disable the combined
3943 use of -mslow-flash-data and -mword-relocations.
3944 (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
3945 * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
3947 * doc/invoke.texi (-mword-relocations): Mention conflict with
3949 (-mslow-flash-data): Reciprocally.
3951 2018-10-31 Richard Henderson <richard.henderson@linaro.org>
3953 * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
3954 16-byte modes held in GP registers to use an even regno.
3956 * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
3957 (aarch64_atomic_ldop_supported_p): Remove.
3958 (aarch64_gen_atomic_ldop): Remove.
3959 * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
3960 Fully expand LSE operations here.
3961 (atomic_fetch_<atomic_optab><ALLI>): Likewise.
3962 (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
3963 (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
3964 and use ATOMIC_LDOP instead; use register_operand for the input;
3965 drop the split and emit insns directly.
3966 (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
3967 (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
3968 (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
3970 * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
3971 (aarch64_gen_atomic_ldop): Don't call it.
3972 * config/aarch64/atomics.md (atomic_exchange<ALLI>):
3973 Use aarch64_reg_or_zero.
3974 (aarch64_atomic_exchange<ALLI>): Likewise.
3975 (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
3976 operand 0; use aarch64_reg_or_zero for input; merge ...
3977 (@aarch64_atomic_swp<ALLI>): ... this and remove.
3979 * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
3980 (aarch64_split_compare_and_swap): Use it.
3981 (aarch64_expand_compare_and_swap): Likewise. Remove convert_modes;
3982 test oldval against the proper predicate.
3983 * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
3984 Use nonmemory_operand for expected.
3985 (cas_short_expected_pred): New.
3986 (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
3987 (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
3988 * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
3989 (aarch64_plushi_operand): New.
3991 * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
3992 Force oldval into the rval register for TARGET_LSE; emit the compare
3993 during initial expansion so that it may be deleted if unused.
3994 (aarch64_gen_atomic_cas): Remove.
3995 * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
3996 Change =&r to +r for operand 0; use match_dup for operand 2;
3997 remove is_weak and mod_f operands as unused. Drop the split
3999 (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
4000 (@aarch64_compare_and_swap<GPI>_lse): Similarly.
4001 (@aarch64_atomic_cas<GPI>): Similarly.
4003 2018-10-31 Richard Biener <rguenther@suse.de>
4005 * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
4008 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4010 * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
4011 * config/aarch64/aarch64.md: Include saphira.md
4012 * config/aarch64/saphira.md: New file for pipeline description.
4014 2018-10-30 Martin Sebor <msebor@redhat.com>
4017 * gimple-ssa-sprintf.c (format_directive): Use %G to include
4019 (sprintf_dom_walker::compute_format_length):
4020 Avoid setting POSUNDER4K here.
4021 (get_destination_size): Handle null argument values.
4022 (get_user_idx_format): New function.
4023 (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
4024 functions, including user-defined with attribute format printf.
4025 Use %G to include inlining context.
4026 Set POSUNDER4K here.
4028 2018-10-30 Jan Hubicka <jh@suse.cz>
4030 * params.def (lto-partitions): Bump from 32 to 128.
4032 2018-10-30 Jan Hubicka <jh@suse.cz>
4035 (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
4037 (free_lang_data_in_type): Forward declare.
4038 (fld_type_variant_equal_p): New function.
4039 (fld_type_variant): New function
4040 (fld_incomplete_types): New hash.
4041 (fld_incomplete_type_of): New function
4042 (fld_simplfied-type): New function.
4043 (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
4044 (free_lang_data): Allocate and free fld_incomplete_type; update call
4045 of free_lang_data_in_decl.
4047 2018-10-30 Eric Botcazou <ebotcazou@adacore.com>
4049 * gcov.c (output_lines): Remove duplicate line.
4051 2018-10-30 Aaron Sawdey <acsawdey@linux.ibm.com>
4053 * config/rs6000/rs6000.md (bswapdi2): Force address into register
4054 if not in indexed or indirect form.
4055 (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
4056 (bswapdi2_store): Ditto.
4057 * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
4059 * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
4060 Prototype for helper function.
4062 2018-10-30 Martin Sebor <msebor@redhat.com>
4064 * doc/extend.texi (optimize): Clarify/expand attribute documentation.
4065 (target, pragma GCC optimize, pragma GCC target): Ditto.
4067 2018-10-30 Jonathan Wakely <jwakely@redhat.com>
4069 * doc/extend.texi: Fix prototype and description of
4070 __builtin_expect_with_probability.
4072 2018-10-30 Michael Ploujnikov <michael.ploujnikov@oracle.com>
4074 * cgraph.h (clone_function_name_1): Replaced by new
4075 clone_function_name_numbered that takes name as string; for
4076 privatize_symbol_name_1 use only.
4077 (clone_function_name): Renamed to
4078 clone_function_name_numbered to be explicit about numbering.
4079 (clone_function_name): New two-argument function that does
4080 not number its output.
4081 (clone_function_name): New three-argument function that
4082 takes a number to append to its output.
4083 * cgraphclones.c (duplicate_thunk_for_node):
4084 (clone_function_name_1): Renamed.
4085 (clone_function_name_numbered): Two new functions.
4086 (clone_function_name): Improved documentation.
4087 (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
4088 * config/rs6000/rs6000.c (make_resolver_func): Ditto.
4089 * final.c (final_scan_insn_1): Use the new clone_function_name
4091 * multiple_target.c (create_dispatcher_calls): Ditto.
4092 (create_target_clone): Ditto.
4093 * omp-expand.c (grid_expand_target_grid_body): Ditto.
4094 * omp-low.c (create_omp_child_function_name): Ditto.
4095 * omp-simd-clone.c (simd_clone_create): Ditto.
4096 * symtab.c (simd_symtab_node::noninterposable_alias): Use the
4097 new clone_function_name without numbering.
4099 2018-10-30 Richard Earnshaw <rearnsha@arm.com>
4101 * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
4102 Assert that the allocation size is not zero.
4104 2018-10-30 Richard Biener <rguenther@suse.de>
4106 PR tree-optimization/87800
4107 * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
4108 non-induction or reduction PHIs.
4110 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
4112 * config/aarch64/falkor-tag-collision-avoidance.c
4113 (execute_tag_collision_avoidance): Call df_note_add_problem.
4115 2018-10-30 Martin Liska <mliska@suse.cz>
4117 * doc/extend.texi: Fix typo in documentation
4118 of __builtin_expect_with_probability.
4120 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4123 * input.c (get_substring_ranges_for_loc): Detect if
4124 linemap_resolve_location gives us a NULL map, and reject
4127 2018-10-29 Iain Buclaw <ibuclaw@gdcproject.org>
4129 * config.gcc (xstormy16-*-elf): Set tm_d_file.
4131 2018-10-29 David Malcolm <dmalcolm@redhat.com>
4132 Martin Sebor <msebor@redhat.com>
4133 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
4135 * doc/ux.texi (Quoting): New subsection, adapted from material at
4136 https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
4137 MartinSebor and ManuelLopezIbanez.
4138 (Fix-it hints): Note that fix-it hints shouldn't be marked for
4141 2018-10-29 Kugan Vivekanandarajah <kuganv@linaro.org>
4144 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
4147 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
4149 * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
4151 2018-10-29 Paul Koning <ni1d@arrl.net>
4153 * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
4155 2018-10-29 Paul A. Clarke <pc@us.ibm.com>
4157 * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
4158 _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
4159 _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
4160 _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
4161 _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
4162 _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
4163 _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
4164 _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
4165 Change 'vector' to '__vector'.
4166 * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
4167 _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
4168 _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
4169 _mm_avg_pu16): Likewise. And, whitespace corrections.
4171 2018-10-29 Richard Biener <rguenther@suse.de>
4173 PR tree-optimization/87785
4174 * tree-vect-slp.c (vect_gather_slp_loads): Only gather
4177 2018-10-29 Olivier Hainque <hainque@adacore.com>
4179 * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
4181 2018-10-29 Olivier Hainque <hainque@adacore.com>
4183 * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
4184 ports configuration macro, defaults to "gnu".
4185 (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
4186 TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
4188 2018-10-29 Olivier Hainque <hainque@adacore.com>
4190 * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
4192 2018-10-29 Richard Biener <rguenther@suse.de>
4194 PR tree-optimization/87790
4195 * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
4196 (vect_make_slp_decision): Adjust.
4197 (vect_slp_analyze_bb_1): Likewise.
4198 (vect_detect_hybrid_slp_stmts): Properly union SLP type over
4201 2018-10-29 Richard Biener <rguenther@suse.de>
4203 PR tree-optimization/87785
4204 * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
4206 (vect_build_slp_tree): Likewise.
4207 (vect_gather_slp_loads): New function.
4208 (vect_analyze_slp_instance): Gather loads separately from the
4211 2018-10-29 Martin Liska <mliska@suse.cz>
4213 * Makefile.in: Make dependency to json.o.
4214 * doc/gcov.texi: Document new JSON format, remove
4215 old intermediate format documentation.
4216 * gcov.c (struct function_info): Come up with m_name and
4218 (function_info::function_info): Initialize it.
4219 (function_info::~function_info): Release it.
4220 (main): Rename flag_intermediate_format to flag_json_format.
4221 (print_usage): Describe --json-format.
4222 (process_args): Set flag_json_format.
4223 (output_intermediate_line): Remove.
4224 (output_intermediate_json_line): Likewise.
4225 (get_gcov_intermediate_filename): Return new extension
4227 (output_intermediate_file): Implement JSON emission.
4228 (output_json_intermediate_file): Implement JSON emission.
4229 (generate_results): Use ::get_name for function name.
4230 Handle JSON output file.
4231 (read_graph_file): Use ::get_name instead of cplus_demangle.
4232 (read_count_file): Likewise.
4233 (solve_flow_graph): Likewise.
4234 (add_line_counts): Likewise.
4235 (accumulate_line_counts): Use new flag_json_format.
4236 (output_function_details): Use ::get_name instead of cplus_demangle.
4237 (output_lines): Likewise.
4238 * json.cc (test_writing_literals): Add new tests.
4239 * json.h (class literal): Add new boolean constructor.
4241 2018-10-29 Segher Boessenkool <segher@kernel.crashing.org>
4243 PR rtl-optimization/87701
4244 PR rtl-optimization/87780
4245 * combine.c (make_more_copies): Rewrite.
4247 2018-10-28 Kugan Vivekanandarajah <kuganv@linaro.org>
4249 * doc/generic.texi (ABSU_EXPR): Document.
4250 * match.pd (absu(x)*absu(x) -> x*x): Handle.
4251 (absu(absu(X)) -> absu(X)): Likewise.
4252 (absu(-X) -> absu(X)): Likewise.
4253 (absu(X) where X is nonnegative -> X): Likewise.
4255 2018-10-28 Iain Buclaw <ibuclaw@gdcproject.org>
4257 * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
4258 (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
4259 (tm_d.h, cs-tm_d.h, default-d.o): New rules.
4260 (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
4261 (s-tm-texi): Also check timestamp on d-target.def.
4262 (generated_files): Add TM_D_H and d-target-hooks-def.h.
4263 (build/genhooks.o): Also depend on D_TARGET_DEF.
4264 * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
4266 * config/aarch64/aarch64-d.c: New file.
4267 * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
4269 * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
4271 * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
4272 * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
4273 * config/arm/arm-d.c: New file.
4274 * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
4275 * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
4276 * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4277 * config/arm/t-arm (arm-d.o): New rule.
4278 * config/default-d.c: New file.
4279 * config/glibc-d.c: New file.
4280 * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4281 * config/i386/i386-d.c: New file.
4282 * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
4283 * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
4284 * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4285 (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
4286 * config/i386/t-i386 (i386-d.o): New rule.
4287 * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4288 * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4289 * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
4290 * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4291 * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
4292 * config/mips/mips-d.c: New file.
4293 * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
4294 * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
4295 * config/mips/t-mips (mips-d.o): New rule.
4296 * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4297 * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4298 * config/powerpcspe/powerpcspe-d.c: New file.
4299 * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
4301 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
4302 Support GNU D by using 0 as the language type.
4303 * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
4304 * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
4305 * config/riscv/riscv-d.c: New file.
4306 * config/riscv/riscv-protos.h (riscv_d_target_versions): New
4308 * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
4309 * config/riscv/t-riscv (riscv-d.o): New rule.
4310 * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4311 * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4312 * config/rs6000/rs6000-d.c: New file.
4313 * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
4315 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4316 Support GNU D by using 0 as the language type.
4317 * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
4318 * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
4319 * config/s390/s390-d.c: New file.
4320 * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
4321 * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
4322 * config/s390/t-s390 (s390-d.o): New rule.
4323 * config/sparc/sparc-d.c: New file.
4324 * config/sparc/sparc-protos.h (sparc_d_target_versions): New
4326 * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
4327 * config/sparc/t-sparc (sparc-d.o): New rule.
4328 * config/t-glibc (glibc-d.o): New rule.
4329 * configure: Regenerated.
4330 * configure.ac (tm_d_file): New variable.
4331 (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
4332 * doc/contrib.texi (Contributors): Add self for the D frontend.
4333 * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
4334 * doc/install.texi (Configuration): Mention libphobos as an option for
4335 --enable-shared. Mention d as an option for --enable-languages.
4336 (Testing): Mention check-d as a target.
4337 * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
4338 name suffixes. Mention d as a -x option.
4339 * doc/sourcebuild.texi (Top Level): Mention libphobos.
4340 * doc/standards.texi (Standards): Add section on D language.
4341 * doc/tm.texi: Regenerated.
4342 * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
4343 TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
4344 * dwarf2out.c (is_dlang): New function.
4345 (gen_compile_unit_die): Use DW_LANG_D for D.
4346 (declare_in_namespace): Return module die for D, instead of adding
4347 extra declarations into the namespace.
4348 (gen_namespace_die): Generate DW_TAG_module for D.
4349 (gen_decl_die): Handle CONST_DECLSs for D.
4350 (dwarf2out_decl): Likewise.
4351 (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
4352 (prune_unused_types_walk): Handle DW_tag_interface_type same as other
4353 kinds of aggregates.
4354 * gcc.c (default_compilers): Add entries for .d, .dd and .di.
4355 * genhooks.c: Include d/d-target.def.
4357 2018-10-28 Iain Sandoe <iain@sandoe.co.uk>
4360 * config/rs6000/darwin.h (STACK_BOUNDARY): New.
4361 (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
4362 (STACK_DYNAMIC_OFFSET): Likewise.
4364 2018-10-27 Sandra Loosemore <sandra@codesourcery.com>
4367 * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
4370 2018-10-26 Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
4372 * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
4373 return type and other typos.
4375 2018-10-26 Aaron Sawdey <acsawdey@linux.ibm.com>
4377 * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
4378 a shorter sequence with fewer branches.
4379 (emit_final_str_compare_gpr): Ditto.
4381 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4383 * config/rs6000/tmmintrin.h: New file.
4384 * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
4386 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4388 * config/rs6000/mmintrin.h: Enable 32bit compilation.
4389 * config/rs6000/xmmintrin.h: Likewise.
4391 2018-10-26 Paul A. Clarke <pc@us.ibm.com>
4393 * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
4395 2018-10-26 Richard Biener <rguenther@suse.de>
4397 * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
4399 (vect_mark_slp_stmts_relevant): Likewise.
4400 (vect_detect_hybrid_slp_stmts): Likewise.
4401 (vect_bb_slp_scalar_cost): Likewise.
4402 (vect_remove_slp_scalar_calls): Likewise.
4404 2018-10-26 Jan Hubicka <jh@suse.cz>
4406 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
4407 (warn_types_mismatch): Fix walk of DECL_NAME.
4408 (odr_types_equivalent_p): Fix overactive assert.
4410 2018-10-26 Richard Biener <rguenther@suse.de>
4412 PR tree-optimization/87105
4413 * tree-vectorizer.h (_slp_tree::refcnt): New member.
4414 * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
4416 (vect_create_new_slp_node): Initialize refcnt to one.
4418 (scalar_stmts_set_t, bst_fail): Remove.
4419 (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
4420 (vect_build_slp_tree): Add bst_map argument and lookup
4421 already created SLP nodes.
4422 (vect_print_slp_tree): Handle a SLP graph, print SLP node
4424 (vect_slp_rearrange_stmts): Handle a SLP graph.
4425 (vect_analyze_slp_instance): Adjust and free SLP nodes from
4426 the CSE map. Fix indenting.
4427 (vect_schedule_slp_instance): Add short-cut.
4429 2018-10-26 Martin Liska <mliska@suse.cz>
4432 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
4433 addr_expr and not with pointers.
4435 2018-10-26 Jan Hubicka <jh@suse.cz>
4437 * tree.c (free_lang_data_in_type): Only check main variants.
4438 * ipa-devirt.c (warn_odr): Make static.
4439 (types_same_for_odr): Drop strict variant.
4440 (types_odr_comparable): Likewise.
4441 (odr_or_derived_type_p): Look for main variants.
4442 (odr_name_hasher::equal): Cleanup comment.
4443 (odr_subtypes_equivalent): Add warn and warned arguments; check main
4445 (type_variants_equivalent_p): break out from ...
4446 (odr_types_equivalent): ... here; go for main variants where needed.
4447 (warn_odr): ... here; turn static.
4448 (warn_types_mismatch): Compare mangled names of main variants.
4449 * ipa-utils.h (types_odr_comparable): Drop strict parameter.
4450 (type_with_linkage_p): Sanity check that we look at main variant.
4451 * lto.c (lto_read_decls): Only consider main variant to be ODR type.
4452 * tree.h (types_same_for_odr): Drop strict argument.
4454 2018-10-26 Richard Biener <rguenther@suse.de>
4456 PR tree-optimization/87746
4457 * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
4458 Simplify and fix WRT strided store groups with size not
4459 equal to step in element count.
4460 (vect_analyze_group_access_1): Dump the whole group.
4462 2018-10-25 Carl Love <cel@us.ibm.com>
4464 * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
4465 P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
4466 P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name. Add quad
4467 precicion entry for each overloaded builtin.
4468 * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
4469 VSCEDPUO): Rename overloaded name.
4470 (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
4471 VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
4472 * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
4473 define_expand for xscmpexqp instruction.
4474 (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
4476 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4477 Jinsong Ji <jji@us.ibm.com>
4479 * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
4480 function with vec_sl.
4481 (_mm_slli_epi32): Likewise.
4482 (_mm_slli_epi64): Likewise.
4483 (_mm_srai_epi16): Replace deprecated function with vec_sra.
4484 (_mm_srai_epi32): Likewise.
4485 (_mm_srli_epi16): Replace deprecated function with vec_sr.
4486 (_mm_srli_epi32): Likewise.
4487 (_mm_srli_epi64): Likewise.
4488 (_mm_sll_epi16): Replace deprecated function with vec_sl.
4489 (_mm_sll_epi32): Likewise.
4490 (_mm_sll_epi64): Likewise.
4491 (_mm_sra_epi16): Replace deprecated function with vec_sra.
4492 (_mm_sra_epi32): Likewise.
4493 (_mm_srl_epi16): Replace deprecated function with vec_sr.
4494 (_mm_srl_epi32): Likewise.
4495 (_mm_srl_epi64): Likewise.
4497 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4498 Jinsong Ji <jji@us.ibm.com>
4500 * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
4501 comparison operators with vec_cmp* for compatibility due to
4502 unfortunate history; clean up formatting and use types more
4504 (_mm_sll_epi32): Likewise.
4505 (_mm_sll_epi64): Likewise.
4506 (_mm_srl_epi16): Likewise.
4507 (_mm_srl_epi32): Likewise.
4508 (_mm_srl_epi64): Likewise.
4510 2018-10-25 Bill Schmidt <wschmidt@linux.ibm.com>
4511 Jinsong Ji <jji@us.ibm.com>
4513 * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
4514 * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
4515 __vector __bool int. Use vec_cmpgt in preference to deprecated
4516 function vec_vcmpgtfp.
4517 (_mm_max_ps): Likewise.
4519 2018-10-25 Jeff Law <law@redhat.com>
4521 * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
4524 2018-10-25 Martin Sebor <msebor@redhat.com>
4526 * doc/extend.texi (aligned): Expand attribute description.
4527 (Alignment): Rename section. Discuss function arguments.
4529 2018-10-25 Jan Hubicka <jh@suse.cz>
4531 * ipa-devirt.c (main_odr_variant): Remove.
4532 (hash_odr_name, types_same_for_odr, types_odr_comparable,
4533 odr_name_hasher::equal, odr_subtypes_equivalent_p):
4534 Drop use of main_odr_variant.
4535 (add_type_duplicate): Silence confused warnings on integer types.
4536 (get_odr_type): Always look for main variant.
4537 (register_odr_type): Simplify.
4539 2018-10-25 Richard Biener <rguenther@suse.de>
4541 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
4542 Initialize ng to silence error with release checking bootstrap.
4544 2018-10-25 Richard Biener <rguenther@suse.de>
4546 * tree-if-conv.c: Include tree-ssa-sccvn.h.
4547 (tree_if_conversion): Run CSE on the if-converted loop body.
4549 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4551 * config/s390/constraints.md (ZL): New constraint.
4552 * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
4554 * config/s390/s390.md (movdi_larl): Remove.
4555 (movdi_64): Add the LARL alternative.
4557 2018-10-25 Ilya Leoshkevich <iii@linux.ibm.com>
4560 * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
4561 (RTX_CODE_HWINT_P): New macro.
4562 (rtx_code_size): Use RTX_CODE_HWINT_P ().
4564 2018-10-25 Jan Hubicka <jh@suse.cz>
4566 * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
4569 2018-10-25 Richard Biener <rguenther@suse.de>
4571 PR tree-optimization/87665
4572 PR tree-optimization/87745
4573 * tree-vectorizer.h (get_earlier_stmt): Remove.
4574 (get_later_stmt): Pick up UID from the original non-pattern stmt.
4576 2018-10-25 Sam Tebbs <sam.tebbs@arm.com>
4578 * options.texi (Deprecated): Move list to Var section.
4580 2018-10-24 Bill Schmidt <wschmidt@linux.ibm.com>
4581 Jinsong Ji <jji@us.ibm.com>
4583 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
4584 __vector long to __vector long long.
4585 (_mm_cvtpd_ps): Likewise.
4586 (_mm_cvttpd_epi32): Likewise.
4587 (_mm_cvtpi32_pd): Likewise.
4588 (_mm_unpackhi_epi64): Likewise.
4589 (_mm_unpacklo_epi64): Likewise.
4591 2018-10-24 Segher Boessenkool <segher@kernel.crashing.org>
4593 PR rtl-optimization/87720
4594 * combine.c (make_more_copies): Skip if the dest is pc_rtx.
4596 2018-10-24 Alexandre Oliva <aoliva@redhat.com>
4598 * gimple-ssa-isolate-paths.c
4599 (find_implicit_erroneous_behavior): Do not change code if the
4600 pass is running for warnings only.
4601 (find_explicit_erroneous_behavior): Likewise.
4603 2018-10-24 Michael Meissner <meissner@linux.ibm.com>
4605 * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
4606 Define as rs6000_mangle_decl_assembler_name.
4607 (rs6000_mangle_decl_assembler_name): If the user switched from IBM
4608 long double to IEEE long double, switch the names of the long
4609 double built-in functions to be <func>f128 instead of <func>l.
4611 2018-10-24 Martin Sebor <msebor@redhat.com>
4613 * doc/extend.texi (nonnull): List no-argument form. Reference
4614 -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
4616 2018-10-24 Richard Biener <rguenther@suse.de>
4618 * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
4620 2018-10-24 Martin Liska <mliska@suse.cz>
4622 PR tree-optimization/84436
4623 * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
4625 (switch_conversion::contains_linear_function_p): New.
4626 (switch_conversion::build_one_array): Support linear
4627 transformation on input.
4628 * tree-switch-conversion.h (struct switch_conversion): Add
4629 contains_linear_function_p declaration.
4631 2018-10-24 Richard Biener <rguenther@suse.de>
4633 * varasm.c (const_hash_1): Return hash of ADDR_EXPR
4634 if its argument is CONSTANT_CLASS_P.
4636 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
4638 * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
4639 it is wrong for forward declarations.
4641 2018-10-24 Ilya Leoshkevich <iii@linux.ibm.com>
4643 * config/s390/s390.c (s390_check_qrst_address): Add the missing
4644 SYMBOL_REF_P () check.
4646 2018-10-24 Richard Biener <rguenther@suse.de>
4648 PR tree-optimization/87105
4649 * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
4650 dump classification.
4651 (vect_analyze_data_ref_accesses): Handle duplicate loads and
4652 stores by splitting the affected group after the fact.
4653 * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
4654 fail the SLP build because of size constraints.
4656 2018-10-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4658 * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
4659 * configure: Regenerate.
4660 * config.in: Regenerate.
4661 * varasm.c (mergeable_string_section): Use readonly_data_section
4662 if linker doesn't support SHF_MERGE with alignment > 8.
4663 (mergeable_constant_section): Likewise.
4665 2018-10-24 Richard Biener <rguenther@suse.de>
4667 PR tree-optimization/84013
4668 * tree-ssa-structalias.c (struct msdi_data): New struct for
4669 marshalling data to walk_stmt_load_store_ops.
4670 (maybe_set_dependence_info): Refactor as callback for
4671 walk_stmt_load_store_ops.
4672 (compute_dependence_clique): Set restrict info on all stmt kinds.
4674 2018-10-24 Martin Liska <mliska@suse.cz>
4676 * cgraph.c (cgraph_node::dump):
4677 Remove reduntant dumps and make tp_first_run dump more compact.
4679 2018-10-24 Richard Biener <rguenther@suse.de>
4681 PR tree-optimization/87665
4682 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
4685 2018-10-12 Jeff Law <law@redhat.com>
4687 * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
4690 2018-10-23 Richard Biener <rguenther@suse.de>
4692 * tree-vrp.c (add_assert_info): Guard dump_printf with
4694 * gimple-ssa-evrp-analyze.c
4695 (evrp_range_analyzer::record_ranges_from_incoming_edge):
4696 Use value_range::ignore_equivs_equal_p.
4698 2018-10-23 Richard Biener <rguenther@suse.de>
4700 PR tree-optimization/87105
4701 PR tree-optimization/87608
4702 * passes.def (pass_all_early_optimizations): Add early phi-opt
4704 * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
4705 addition to debug stmts.
4706 (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
4707 and abs replacement early.
4708 * tree-cfg.c (gimple_empty_block_p): Likewise.
4710 2018-10-23 Richard Earnshaw <rearnsha@arm.com>
4713 * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
4714 specified to configure.
4715 (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
4717 2018-10-23 Richard Biener <rguenther@suse.de>
4719 PR tree-optimization/87700
4720 * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
4722 2018-10-23 Jakub Jelinek <jakub@redhat.com>
4725 * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
4726 second argument from __mmask16 to __mmask8.
4727 * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
4728 _mm_mask_packs_epi32): Likewise.
4729 * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
4731 (_mm512_mask_prefetch_i64scatter_pd): Likewise. Formatting fix.
4733 2018-10-23 Richard Biener <rguenther@suse.de>
4735 * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
4737 2018-10-23 Richard Biener <rguenther@suse.de>
4739 PR tree-optimization/86144
4740 * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
4741 over simd attribute.
4743 2018-10-23 Richard Biener <rguenther@suse.de>
4745 PR tree-optimization/87693
4746 * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
4747 the case we do not find the taken edge.
4749 2018-10-22 Bill Schmidt <wschmidt@linux.ibm.com>
4750 Jinsong Ji <jji@us.ibm.com>
4752 * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
4753 (_mm_store_pd): Use unaligned vector type for pointer cast.
4754 (_mm_maskmoveu_si128): Likewise.
4755 * config/rs6000/xmmintrin.h (__m128_u): New typedef.
4756 (_mm_store_ps): Use unaligned vector type for pointer cast.
4758 2018-10-22 Paul Koning <ni1d@arrl.net>
4760 * symtab.c (symtab_node::increase_alignment): Correct max
4763 2018-10-22 Yury Gribov <tetra2005@gmail.com>
4765 PR tree-optimization/87633
4766 * match.pd: Do not generate unordered integer comparisons.
4768 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4770 PR rtl-optimization/87600
4771 * combine.c: Add include of expr.h.
4772 (cant_combine_insn_p): Do not combine moves from any hard non-fixed
4773 register to a pseudo.
4774 (make_more_copies): New function, add a copy to a new pseudo after
4775 the moves from hard registers into pseudos.
4776 (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
4777 later. Call make_more_copies.
4779 2018-10-22 Andrew Stubbs <ams@codesourcery.com>
4781 * lra-constraints.c (process_alt_operands): New local array,
4782 matching_early_clobber. Check matching_early_clobber before
4783 decrementing reject, and set matching_early_clobber after.
4785 2018-10-22 Segher Boessenkool <segher@kernel.crashing.org>
4788 * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
4789 call output_addr_const and hope for the best.
4791 2018-10-22 Richard Biener <rguenther@suse.de>
4793 * gimple-ssa-evrp-analyze.c
4794 (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
4795 smarter about what ranges to use.
4796 * tree-vrp.c (add_assert_info): Dump here.
4797 (register_edge_assert_for_2): Instead of here at multiple but
4800 * gcc.dg/tree-ssa/evrp12.c: New testcase.
4801 * gcc.dg/predict-6.c: Adjust.
4802 * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
4803 * gcc.dg/tree-ssa/vrp02.c: Likewise.
4804 * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
4806 2018-10-22 Steven Bosscher <steven@gcc.gnu.org>
4807 Richard Biener <rguenther@suse.de>
4809 * bitmap.h: Update data structure documentation, including a
4810 description of bitmap views as either linked-lists or splay trees.
4811 (struct bitmap_element_def): Update comments for splay tree bitmaps.
4812 (struct bitmap_head_def): Likewise.
4813 (bitmap_list_view, bitmap_tree_view): New prototypes.
4814 (bitmap_initialize_stat): Initialize a bitmap_head's indx and
4816 (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
4817 (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
4818 * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
4819 released bitmap element here.
4820 (bitmap_element_free): Remove.
4821 (bitmap_elt_clear_from): Work on splay tree bitmaps.
4822 (bitmap_list_link_element): Renamed from bitmap_element_link. Move
4823 this function similar ones such that linked-list bitmap implementation
4824 functions are grouped.
4825 (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
4826 and moved for grouping.
4827 (bitmap_list_insert_element_after): Renamed from
4828 bitmap_elt_insert_after, and moved for grouping.
4829 (bitmap_list_find_element): New function spliced from bitmap_find_bit.
4830 (bitmap_tree_link_left, bitmap_tree_link_right,
4831 bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
4832 bitmap_tree_link_element, bitmap_tree_unlink_element,
4833 bitmap_tree_find_element): New functions for splay-tree bitmap
4835 (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
4836 Renamed and moved, see above entries.
4837 (bitmap_tree_listify_from): New function to convert part of a splay
4838 tree bitmap to a linked-list bitmap.
4839 (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
4840 (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
4841 (bitmap_find_bit): Remove.
4842 (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
4843 bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
4844 Handle splay tree bitmaps.
4845 (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
4846 bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
4847 bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
4848 bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
4849 bitmap_intersect_compl_p, bitmap_ior_and_compl,
4850 bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
4851 bitmap_hash): Reject trying to act on splay tree bitmaps. Make
4852 corresponding changes to use linked-list specific bitmap_element
4853 manipulation functions as applicable for efficiency.
4854 (bitmap_tree_to_vec): New function.
4855 (debug_bitmap_elt_file): New function split out from ...
4856 (debug_bitmap_file): ... here. Handle splay tree bitmaps.
4857 (bitmap_print): Likewise.
4859 PR tree-optimization/63155
4860 * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
4862 * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
4865 2018-10-22 Martin Liska <mliska@suse.cz>
4867 PR tree-optimization/87686
4869 2018-08-29 Martin Liska <mliska@suse.cz>
4871 * tree-switch-conversion.c (switch_conversion::expand):
4872 Strenghten assumption about gswitch statements.
4874 2018-10-22 Martin Liska <mliska@suse.cz>
4876 * ipa-icf.c (sem_item::compare_attributes): Remove.
4877 (sem_item::compare_referenced_symbol_properties): Use
4878 attribute_list_equal instead.
4879 (sem_function::equals_wpa): Likewise.
4880 * ipa-icf.h: Remove compare_attributes.
4882 2018-10-22 Richard Biener <rguenther@suse.de>
4885 * mem-stats.h (mem_usage::operator==): Fix pasto.
4887 2018-10-22 Richard Biener <rguenther@suse.de>
4889 PR tree-optimization/87640
4890 * tree-vrp.c (set_value_range_with_overflow): Decompose
4892 (extract_range_from_binary_expr_1): Adjust.
4894 2018-10-22 Martin Jambor <mjambor@suse.cz>
4896 * tree-eh.h (stmt_could_throw_p): Add function parameter.
4897 (stmt_can_throw_external): Likewise.
4898 (stmt_can_throw_internal): Likewise.
4899 * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
4900 (lower_eh_constructs_2): Likewise.
4901 (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
4902 (stmt_can_throw_external): Likewise.
4903 (stmt_can_throw_internal): Likewise.
4904 (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
4905 (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
4906 (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
4907 (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
4908 (pass_lower_eh_dispatch::execute): Pass cfun to
4909 stmt_can_throw_external.
4910 (cleanup_empty_eh): Likewise.
4911 (verify_eh_edges): Pass cfun to stmt_could_throw_p.
4912 * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
4913 stmt_can_throw_external instead of pushing it to cfun.
4914 (symbol_table::create_edge): Likewise.
4915 * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
4916 stmt_can_throw_internal.
4917 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
4918 to stmt_could_throw_p.
4919 * gimple-ssa-store-merging.c (handled_load): Pass cfun to
4920 stmt_can_throw_internal.
4921 (pass_store_merging::execute): Likewise.
4922 * gimple-ssa-strength-reduction.c
4923 (find_candidates_dom_walker::before_dom_children): Pass cfun to
4925 * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
4926 stmt_can_throw_internal.
4927 * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
4928 to stmt_can_throw_external.
4929 (check_stmt): Pass cfun to stmt_could_throw_p.
4930 (check_stmt): Pass cfun to stmt_can_throw_external.
4931 (pass_nothrow::execute): Likewise.
4932 * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
4933 * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
4934 stmt_can_throw_internal.
4935 (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
4936 (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
4937 (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
4938 * tree-complex.c (expand_complex_libcall): Pass cfun to
4939 stmt_could_throw_p and to stmt_can_throw_internal.
4940 (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
4941 * tree-inline.c (copy_edges_for_bb): Likewise.
4942 (maybe_move_debug_stmts_to_successors): Likewise.
4943 * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
4945 * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
4946 * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
4947 * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
4948 stmt_can_throw_internal.
4949 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
4950 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
4952 (mark_aliased_reaching_defs_necessary_1): Pass cfun to
4953 stmt_can_throw_internal.
4954 * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
4955 * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
4957 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
4958 (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
4959 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4960 (convert_mult_to_fma_1): Likewise.
4961 (convert_to_divmod): Likewise.
4962 * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
4963 * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
4964 * tree-ssa-propagate.c
4965 (substitute_and_fold_dom_walker::before_dom_children): Likewise.
4966 * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
4967 (maybe_optimize_range_tests): Likewise.
4968 (linearize_expr_tree): Likewise.
4969 (reassociate_bb): Likewise.
4970 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4971 * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
4972 * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
4973 (handle_char_store): Likewise.
4974 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
4975 stmt_can_throw_internal.
4976 * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
4978 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4979 (vectorizable_call): Pass cfun to stmt_can_throw_internal.
4980 (vectorizable_simd_clone_call): Likewise.
4981 * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
4982 (gimple_stringop_fixed_value): Likewise.
4984 2018-10-22 Ilya Leoshkevich <iii@linux.ibm.com>
4986 * config/s390/s390.c (s390_loadrelative_operand_p): Accept
4987 literal pool references.
4988 (s390_check_qrst_address): Adapt to the new behavior of
4989 s390_loadrelative_operand_p ().
4991 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4994 * config/i386/sse.md (*andnot<mode>3_bcst): New.
4996 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
4999 * config/i386/sse.md (*<code><mode>3_bcst): New.
5001 2018-10-22 H.J. Lu <hongjiu.lu@intel.com>
5004 * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
5005 V4DI, V16SI and V8DI.
5006 (*sub<mode>3<mask_name>_bcst): New.
5007 (*add<mode>3<mask_name>_bcst): Likewise.
5009 2018-10-21 Bill Schmidt <wschmidt@linux.ibm.com>
5010 Jinsong Ji <jji@us.ibm.com>
5012 * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
5013 __m64 with __vector unsigned long long for compatibility.
5014 (_mm_movemask_epi8): Likewise.
5015 * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
5016 (_mm_cvttps_pi32): Likewise.
5017 (_mm_cvtpi32_ps): Likewise.
5018 (_mm_cvtps_pi16): Likewise.
5019 (_mm_loadh_pi): Likewise.
5020 (_mm_storeh_pi): Likewise.
5021 (_mm_movehl_ps): Likewise.
5022 (_mm_movelh_ps): Likewise.
5023 (_mm_loadl_pi): Likewise.
5024 (_mm_storel_pi): Likewise.
5025 (_mm_movemask_ps): Likewise.
5026 (_mm_shuffle_pi16): Likewise.
5028 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5031 * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
5032 __builtin_ia32_vfnmsubpd512_mask.
5033 (_mm512_mask_fnmsub_round_pd): Likewise.
5034 (_mm512_fnmsub_pd): Likewise.
5035 (_mm512_mask_fnmsub_pd): Likewise.
5036 (_mm512_maskz_fnmsub_round_pd): Use
5037 __builtin_ia32_vfnmsubpd512_maskz.
5038 (_mm512_maskz_fnmsub_pd): Likewise.
5039 (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
5040 (_mm512_mask_fnmsub_round_ps): Likewise.
5041 (_mm512_fnmsub_ps): Likewise.
5042 (_mm512_mask_fnmsub_ps): Likewise.
5043 (_mm512_maskz_fnmsub_round_ps): Use
5044 __builtin_ia32_vfnmsubps512_maskz.
5045 (_mm512_maskz_fnmsub_ps): Likewise.
5046 * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
5047 __builtin_ia32_vfnmsubpd256_mask.
5048 (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
5049 (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5050 (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
5051 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5052 (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
5053 (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
5054 (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
5055 (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
5056 * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
5057 __builtin_ia32_vfnmsubpd.
5058 (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
5059 (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
5060 (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
5061 (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
5062 (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
5063 * config/i386/i386-builtin.def: Add
5064 __builtin_ia32_vfnmsubpd256_mask,
5065 __builtin_ia32_vfnmsubpd256_maskz,
5066 __builtin_ia32_vfnmsubpd128_mask,
5067 __builtin_ia32_vfnmsubpd128_maskz,
5068 __builtin_ia32_vfnmsubps256_mask,
5069 __builtin_ia32_vfnmsubps256_maskz,
5070 __builtin_ia32_vfnmsubps128_mask,
5071 __builtin_ia32_vfnmsubps128_maskz,
5072 __builtin_ia32_vfnmsubpd512_mask,
5073 __builtin_ia32_vfnmsubpd512_maskz,
5074 __builtin_ia32_vfnmsubps512_mask,
5075 __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
5076 __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
5077 __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
5078 __builtin_ia32_vfnmsubpd256.
5079 * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
5080 (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
5081 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
5083 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
5085 (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
5087 (fmai_vmfnmsub_<mode><round_name>): Likewise.
5089 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5092 * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
5093 __builtin_ia32_vfnmaddpd512_mask.
5094 (_mm512_mask_fnmadd_round_pd): Likewise.
5095 (_mm512_fnmadd_pd): Likewise.
5096 (_mm512_mask_fnmadd_pd): Likewise.
5097 (_mm512_maskz_fnmadd_round_pd): Use
5098 __builtin_ia32_vfnmaddpd512_maskz.
5099 (_mm512_maskz_fnmadd_pd): Likewise.
5100 (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
5101 (_mm512_mask_fnmadd_round_ps): Likewise.
5102 (_mm512_fnmadd_ps): Likewise.
5103 (_mm512_mask_fnmadd_ps): Likewise.
5104 (_mm512_maskz_fnmadd_round_ps): Use
5105 __builtin_ia32_vfnmaddps512_maskz.
5106 (_mm512_maskz_fnmadd_ps): Likewise.
5107 * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
5108 __builtin_ia32_vfnmaddpd256_mask.
5109 (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
5110 (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
5111 (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
5112 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5113 (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
5114 (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
5115 (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
5116 (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
5117 * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
5118 __builtin_ia32_vfnmaddpd.
5119 (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
5120 (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
5121 (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
5122 (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
5123 (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
5124 * config/i386/i386-builtin.def: Add
5125 __builtin_ia32_vfnmaddpd256_mask,
5126 __builtin_ia32_vfnmaddpd256_maskz,
5127 __builtin_ia32_vfnmaddpd128_mask,
5128 __builtin_ia32_vfnmaddpd128_maskz,
5129 __builtin_ia32_vfnmaddps256_mask,
5130 __builtin_ia32_vfnmaddps256_maskz,
5131 __builtin_ia32_vfnmaddps128_mask,
5132 __builtin_ia32_vfnmaddps128_maskz,
5133 __builtin_ia32_vfnmaddpd512_mask,
5134 __builtin_ia32_vfnmaddpd512_maskz,
5135 __builtin_ia32_vfnmaddps512_mask,
5136 __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
5137 __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
5138 __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
5139 __builtin_ia32_vfnmaddpd256.
5140 * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
5141 (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
5142 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
5144 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
5146 (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
5148 (fmai_vmfnmadd_<mode><round_name>): Likewise.
5150 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5153 * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
5154 __builtin_ia32_vfmsubpd512_mask.
5155 (_mm512_mask_fmsub_round_pd): Likewise.
5156 (_mm512_fmsub_pd): Likewise.
5157 (_mm512_mask_fmsub_pd): Likewise.
5158 (_mm512_maskz_fmsub_round_pd): Use
5159 __builtin_ia32_vfmsubpd512_maskz.
5160 (_mm512_maskz_fmsub_pd): Likewise.
5161 (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
5162 (_mm512_mask_fmsub_round_ps): Likewise.
5163 (_mm512_fmsub_ps): Likewise.
5164 (_mm512_mask_fmsub_ps): Likewise.
5165 (_mm512_maskz_fmsub_round_ps): Use
5166 __builtin_ia32_vfmsubps512_maskz.
5167 (_mm512_maskz_fmsub_ps): Likewise.
5168 * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
5169 __builtin_ia32_vfmsubpd256_mask.
5170 (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
5171 (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
5172 (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
5173 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5174 (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
5175 (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
5176 (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
5177 (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
5178 * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
5179 __builtin_ia32_vfmsubpd.
5180 (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
5181 (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
5182 (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
5183 (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
5184 (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
5185 * config/i386/i386-builtin.def: Add
5186 __builtin_ia32_vfmsubpd256_mask,
5187 __builtin_ia32_vfmsubpd256_maskz,
5188 __builtin_ia32_vfmsubpd128_mask,
5189 __builtin_ia32_vfmsubpd128_maskz,
5190 __builtin_ia32_vfmsubps256_mask,
5191 __builtin_ia32_vfmsubps256_maskz,
5192 __builtin_ia32_vfmsubps128_mask,
5193 __builtin_ia32_vfmsubps128_maskz,
5194 __builtin_ia32_vfmsubpd512_mask,
5195 __builtin_ia32_vfmsubpd512_maskz,
5196 __builtin_ia32_vfmsubps512_mask,
5197 __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
5198 __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
5199 __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
5200 __builtin_ia32_vfmsubpd256.
5201 * config/i386/sse.md (fma4i_fmsub_<mode>): New.
5202 (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
5203 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
5205 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
5207 (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
5209 (fmai_vmfmsub_<mode><round_name>): Likewise.
5211 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5213 * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
5214 Remove plus. Renamed to ...
5215 (*sub<mode>3<mask_name>_bcst): This.
5216 (*add<mode>3<mask_name>_bcst_2): Renamede to ...
5217 (*add<mode>3<mask_name>_bcst): This.
5219 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5222 * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
5224 2018-10-21 H.J. Lu <hongjiu.lu@intel.com>
5227 * i386/avx512vlintrin.h (_mm256_or_epi32): New.
5228 (_mm_or_epi32): Likewise.
5229 (_mm256_xor_epi32): Likewise.
5230 (_mm_xor_epi32): Likewise.
5231 (_mm256_or_epi64): Likewise.
5232 (_mm_or_epi64): Likewise.
5233 (_mm256_xor_epi64): Likewise.
5234 (_mm_xor_epi64): Likewise.
5236 2018-10-20 H.J. Lu <hongjiu.lu@intel.com>
5239 * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
5241 2018-10-20 Jakub Jelinek <jakub@redhat.com>
5244 * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
5246 2018-10-20 Andreas Schwab <schwab@linux-m68k.org>
5248 * doc/ux.texi: Move @section directly after @node.
5250 2018-10-19 Jakub Jelinek <jakub@redhat.com>
5254 * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
5255 depend closely nested inside of loop with ordered clause with
5258 2018-10-19 David Malcolm <dmalcolm@redhat.com>
5260 * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
5261 * doc/gccint.texi: Include ux.texi and use it in top-level menu.
5262 * doc/ux.texi: New file.
5264 2018-10-19 Segher Boessenkool <segher@kernel.crashing.org>
5266 * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
5267 be the first CR field allocated.
5269 2018-10-19 Richard Biener <rguenther@suse.de>
5272 * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
5273 TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
5275 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
5278 * config/i386/sse.md
5279 (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
5280 (*add<mode>3<mask_name>_bcst_2): Likewise.
5282 2018-10-19 H.J. Lu <hongjiu.lu@intel.com>
5284 * config/i386/sse.md
5285 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5286 Replace nonimmediate_operand with register_operand.
5287 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5289 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5292 2018-10-19 Ilya Leoshkevich <iii@linux.ibm.com>
5294 PR rtl-optimization/87596
5295 * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
5296 lra_get_insn_recog_data () instead of lra_insn_recog_data[]
5297 for instructions in FROM..TO range.
5299 2018-10-19 Eric Botcazou <ebotcazou@adacore.com>
5301 * cfgexpand.c (expand_one_var): Use specific wording in error message
5302 for non-local frame variables.
5303 * stor-layout.c (layout_decl): Do not issue a warning for them.
5305 2018-10-19 Robin Dapp <rdapp@linux.ibm.com>
5307 * haifa-sched.c (priority): Add force_recompute parameter.
5308 (apply_replacement): Call priority () with force_recompute = true.
5309 (restore_pattern): Likewise.
5311 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5313 * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
5314 HOST_BITS_PER_WIDE_INT.
5315 (test_vector_ops_duplicate): Likewise.
5317 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5320 * config/i386/sse.md (VF_AVX512): New.
5321 (avx512bcst): Likewise.
5322 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5324 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5326 (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5329 2018-10-18 Jonathan Wakely <jwakely@redhat.com>
5331 * doc/invoke.texi (-dumpversion): Improve grammar.
5332 (-dumpfullversion): Make more consistent with -dumpversion.
5334 2018-10-18 Uros Bizjak <ubizjak@gmail.com>
5336 * config/i386/i386.c (ix86_emit_fp_unordered_jump):
5337 Set JUMP_LABEL to the jump insn.
5338 (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
5339 Predict emitted jump and add label to jump insn.
5341 2018-10-18 David Malcolm <dmalcolm@redhat.com>
5343 PR tree-optimization/87562
5344 * input.c (get_substring_ranges_for_loc): Use
5345 LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
5346 getting the linemap for the endpoint. Verify that it's either
5347 in the same linemap as the start point's spelling location, or
5348 at least in the same file.
5350 2018-10-18 Richard Biener <rguenther@suse.de>
5352 * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
5353 feed width-specific load/store costs through ix86_vec_cost.
5354 * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
5355 (k8_cost): Likewise.
5356 (bdver_cost): Likewise.
5357 (znver1_cost): Likewise.
5358 (btver1_cost): Likewise.
5359 (btver2_cost): Likewise.
5361 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5363 * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
5364 to simplify subreg of vec_merge.
5366 2018-10-18 Richard Biener <rguenther@suse.de>
5368 * config/i386/i386.c: Fix costing of vector FMA.
5370 2018-10-18 Richard Biener <rguenther@suse.de>
5372 * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
5374 (ix86_builtin_vectorization_cost): For vec_construct properly
5375 cost insertion into SSE regs.
5376 (...): Adjust calls to ix86_vec_cost.
5378 2018-10-18 Richard Biener <rguenther@suse.de>
5382 2018-02-07 Richard Biener <rguenther@suse.de>
5384 PR tree-optimization/84204
5385 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
5388 2018-10-18 H.J. Lu <hongjiu.lu@intel.com>
5391 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
5393 (test_vector_ops_duplicate): Add test for a scalar subreg of a
5394 VEC_MERGE of a VEC_DUPLICATE.
5396 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5398 * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
5399 * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
5400 * doc/standards.texi (C Language): Document C2X.
5401 * dwarf2out.c (highest_c_language), config/rl78/rl78.c
5402 (rl78_option_override): Handle "GNU C2X" language name.
5404 2018-10-17 Joseph Myers <joseph@codesourcery.com>
5406 * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
5407 Document C17 as published in 2018.
5409 2018-10-17 Eric Botcazou <ebotcazou@adacore.com>
5412 * fold-const.c (fold_truth_andor_1): If the right side is not constant,
5413 bail out if both sides do not have the same storage order.
5415 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5417 * bitmap.c (bitmap_head::dump): New.
5418 * bitmap.h (bitmap_head): Add dump().
5419 * gimple-ssa-evrp-analyze.c
5420 (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
5421 (evrp_range_analyzer::set_ssa_range_info): Same.
5422 (evrp_range_analyzer::record_ranges_from_phis): Same.
5423 (evrp_range_analyzer::record_ranges_from_stmt): Same.
5424 * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
5425 * gimple-ssa-sprintf.c (get_int_range): Same.
5426 (format_integer): Same.
5427 (sprintf_dom_walker::handle_gimple_call): Same.
5428 * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
5429 (ipcp_vr_lattice::top_p): Same.
5430 (ipcp_vr_lattice::bottom_p): Same.
5431 (ipcp_vr_lattice::set_to_bottom): Same.
5432 (ipa_vr_operation_and_type_effects): Same.
5433 (propagate_vr_across_jump_function): Same.
5434 (ipcp_store_vr_results): Same.
5435 * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
5436 (ipa_print_node_jump_functions_for_edge): Same.
5437 (ipa_get_value_range): Same.
5438 (ipa_compute_jump_functions_for_edge): Same.
5439 (ipa_write_jump_function): Same.
5440 * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
5441 * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
5443 * vr-values.c (set_value_range_to_nonnegative): Same.
5444 (set_value_range_to_truthvalue): Same.
5445 (vr_values::get_value_range): Same.
5446 (vr_values::set_defs_to_varying): Same.
5447 (vr_values::update_value_range): Same.
5448 (symbolic_range_based_on_p): Same.
5449 (vr_values::op_with_boolean_value_range_p): Same.
5450 (vr_values::extract_range_for_var_from_comparison_expr): Same.
5451 (vr_values::extract_range_from_ssa_name): Same.
5452 (vr_values::extract_range_from_binary_expr): Same.
5453 (vr_values::extract_range_from_unary_expr): Same.
5454 (vr_values::extract_range_from_cond_expr): Same.
5455 (vr_values::extract_range_from_comparison): Same.
5456 (vr_values::check_for_binary_op_overflow): Same.
5457 (vr_values::extract_range_basic): Same.
5458 (vr_values::extract_range_from_assignment): Same.
5459 (compare_ranges): Same.
5460 (compare_range_with_value): Same.
5461 (vr_values::adjust_range_with_scev): Same.
5462 (vrp_valueize): Same.
5463 (vrp_valueize_1): Same.
5464 (vr_values::get_vr_for_comparison): Same.
5465 (vr_values::compare_name_with_value): Same.
5466 (vr_values::compare_names): Same.
5467 (vr_values::vrp_evaluate_conditional): Same.
5468 (find_case_label_ranges): Same.
5469 (vr_values::vrp_visit_switch_stmt): Same.
5470 (vr_values::extract_range_from_phi_node): Same.
5471 (vr_values::simplify_div_or_mod_using_ranges): Same.
5472 (vr_values::simplify_bit_ops_using_ranges): Same.
5473 (test_for_singularity): Same.
5474 (range_fits_type_p): Same.
5475 (vr_values::simplify_cond_using_ranges_1): Same.
5476 (vr_values::simplify_switch_using_ranges): Same.
5477 (vr_values::simplify_float_conversion_using_ranges): Same.
5478 (vr_values::two_valued_val_range_p): Same.
5479 (vr_values::add_equivalence): Move to value_range::equiv_add.
5480 * vr-values.h (vr_values::add_equivalence): Remove.
5481 (VR_INITIALIZER): Remove.
5482 * tree-vrp.c (value_range::set): New.
5483 (value_range::equiv_add): New.
5484 (value_range::value_range): New.
5485 (value_range::deep_copy): New.
5486 (value_range::check): New.
5487 (value_range::equal_p): New.
5488 (value_range::ignore_equivs_equal_p): New.
5489 (value_range::operator==): New.
5490 (value_range::operator!=): New.
5491 (value_range::symbolic_p): New.
5492 (value_range::numeric_p): New.
5493 (value_range::set_undefined): New.
5494 (value_range::set_varying): New.
5495 (value_range::may_contain_p): New.
5496 (value_range::equiv_clear): New.
5497 (value_range::singleton_p): New.
5498 (value_range::intersect): New.
5499 (value_range::dump): New.
5500 (value_range::set_and_canonicalize): New.
5501 (set_value_range): Adjust for value_range API.
5502 (set_value_range_to_undefined): Same.
5503 (set_value_range_to_varying): Same.
5504 (set_and_canonicalize_value_range): Same.
5505 (set_value_range_to_nonnull): Same.
5506 (set_value_range_to_null): Same.
5507 (range_is_null): Same.
5508 (range_is_nonnull): Same.
5509 (range_int_cst_p): Same.
5510 (range_int_cst_singleton_p): Same.
5511 (symbolic_range_p): Same.
5512 (range_includes_zero_p): Same.
5513 (value_range_constant_singleton): Same.
5514 (vrp_set_zero_nonzero_bits): Same.
5515 (ranges_from_anti_range): Same.
5516 (extract_range_into_wide_ints): Same.
5517 (extract_range_from_multiplicative_op): Same.
5518 (set_value_range_with_overflow): Same.
5519 (extract_range_from_binary_expr_1): Same.
5520 (extract_range_from_unary_expr): Same.
5521 (dump_value_range): Same.
5522 (debug_value_range): Same.
5523 (vrp_prop::check_array_ref): Same.
5524 (vrp_prop::check_mem_ref): Same.
5525 (vrp_prop::vrp_initialize): Same.
5526 (vrp_prop::visit_stmt): Same.
5527 (intersect_ranges): Same.
5528 (vrp_prop::visit_phi): Same.
5529 (vrp_prop::vrp_finalize): Same.
5530 (determine_value_range_1): Same.
5531 (determine_value_range): Same.
5532 (vrp_intersect_ranges_1): Rename to...
5533 (vrp_intersect_1): this.
5534 (vrp_intersect_ranges): Rename to...
5535 (value_range::intersect_helper): ...this.
5536 (vrp_meet_1): Rename to...
5537 (value_range::union_helper): ...this.
5538 (vrp_meet): Rename to...
5539 (value_range::union_): ...this.
5540 (copy_value_range): Remove.
5541 * tree-vrp.h (struct value_range): Rewrite into a proper class.
5542 (value_range::vrtype): New.
5543 (value_range::type): New.
5544 (value_range::equiv): New.
5545 (value_range::min): New.
5546 (value_range::max): New.
5547 (value_range::varying_p): New.
5548 (value_range::undefined_p): New.
5549 (value_range::null_p): New.
5550 (value_range::equiv_add): New.
5551 (copy_value_range): Remove.
5553 2018-10-17 David Malcolm <dmalcolm@redhat.com>
5555 * Makefile.in (SELFTEST_TARGETS): New.
5556 (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5557 (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
5558 (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
5560 (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
5561 (selftest-c++-gdb, selftest-c++-valgrind): Move to
5563 * configure: Regenerate.
5564 * configure.ac (selftest_languages): New.
5566 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5568 * tree-vrp.c (extract_range_from_multiplicative_op): Remove
5569 overflow wraps argument.
5570 (extract_range_from_binary_expr_1): Do not pass overflow wraps to
5571 wide_int_range_multiplicative_op.
5572 * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
5573 overflow wraps argument.
5574 (wide_int_range_multiplicative_op): Same.
5575 (wide_int_range_lshift): Same.
5576 (wide_int_range_div): Same.
5577 * wide-int-range.h (wide_int_range_multiplicative_op): Same.
5578 (wide_int_range_lshift): Same.
5579 (wide_int_range_div): Same.
5581 2018-10-17 Aldy Hernandez <aldyh@redhat.com>
5583 * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
5584 use sign as argument.
5585 * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
5586 wide_int_range_shift_undefined_p.
5588 2018-10-16 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5590 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
5592 (@despeculate_copy<ALLI_TI:mode>): ... This.
5593 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
5596 2018-10-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5598 * config.gcc: Obsolete *-*-solaris2.10*.
5599 * doc/install.texi (Specific, *-*-solaris2*): Document it.
5601 2018-10-12 Jeff Law <law@redhat.com>
5603 * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
5604 reg + sym +- const_int addressing modes.
5606 2018-10-15 David Malcolm <dmalcolm@redhat.com>
5608 * common.opt (fdiagnostics-minimum-margin-width=): New option.
5609 * diagnostic-show-locus.c (layout::layout): Apply the minimum
5611 (layout::start_annotation_line): Only print up to 3 of the
5612 margin character, to avoid touching the left-hand side.
5613 (selftest::test_diagnostic_show_locus_fixit_lines): Update for
5614 minimum margin width, as set by test_diagnostic_context's ctor.
5615 (selftest::test_fixit_insert_containing_newline): Likewise.
5616 (selftest::test_fixit_insert_containing_newline_2): Likewise.
5617 (selftest::test_line_numbers_multiline_range): Clear
5618 dc.min_margin_width.
5619 * diagnostic.c (diagnostic_initialize): Initialize
5621 * diagnostic.h (struct diagnostic_context): Add field
5623 * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
5624 * opts.c (common_handle_option): Handle
5625 OPT_fdiagnostics_minimum_margin_width_.
5626 * selftest-diagnostic.c
5627 (selftest::test_diagnostic_context::test_diagnostic_context):
5628 Initialize min_margin_width to 6.
5629 * toplev.c (general_init): Initialize global_dc->min_margin_width.
5631 2018-10-15 David Malcolm <dmalcolm@redhat.com>
5633 * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
5634 Fix usage of "error_at_rich_loc" in the comment.
5636 2018-10-15 Renlin Li <renlin.li@arm.com>
5639 * tree-vectorizer.c (try_vectorize_loop_1): Don't use
5640 if-conversioned loop when it contains ifn with types not
5641 supported by backend.
5642 * internal-fn.c (expand_direct_optab_fn): Add an assert.
5643 (direct_internal_fn_supported_p): New helper function.
5644 * internal-fn.h (direct_internal_fn_supported_p): Declare.
5646 2018-10-15 Jakub Jelinek <jakub@redhat.com>
5649 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5650 Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5651 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5653 2018-10-15 Bin Cheng <bin.cheng@linux.alibaba.com>
5655 PR tree-optimization/87022
5656 * tree-loop-distribution.c (pg_add_dependence_edges): Check all
5657 bits in dist vector rather than the first one.
5659 2018-10-15 Richard Biener <rguenther@suse.de>
5662 * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
5663 (visit_loadstore): When a used restrict tag escaped verify that
5664 the points-to solution of "other" pointers do not include
5666 (compute_dependence_clique): If a used restrict tag escaped
5667 communicated that down to visit_loadstore.
5669 2018-10-15 Andreas Krebbel <krebbel@linux.ibm.com>
5671 * config/s390/s390.c (s390_expand_vec_init): Force vector element
5672 into reg if it isn't a general operand.
5674 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
5677 * config/i386/sse.md (*vec_dupv2di): Add register source to
5680 2018-10-14 H.J. Lu <hongjiu.lu@intel.com>
5683 * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5684 Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
5685 OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5686 OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5688 2018-10-13 Eric Botcazou <ebotcazou@adacore.com>
5690 * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
5691 (notice_args_size): Set it in the current trace if no insn that can
5692 throw internally has been seen yet.
5693 (connect_traces): When connecting args_size between traces, allow the
5694 incoming values not to match if there is an insn setting it before the
5695 first insn that can throw internally; in that case, force the creation
5696 of a CFI note on this latter insn.
5698 2018-10-13 Jonathan Wakely <jwakely@redhat.com>
5700 * opt-problem.h (opt_wrapper): Use template-argument-list when naming
5701 the base class, because using the injected-class-name was not clearly
5702 specified until DR 176.
5704 2018-10-12 Paul Koning <ni1d@arrl.net>
5706 * config/pdp11/pdp11.md (doloop_end): New expander.
5707 (doloop_end_insn): renamed from "doloop_end".
5708 (addqi3): New pattern.
5709 (subqi3): New pattern.
5710 * config/pdp11/predicates.md (incdec_operand): New predicate.
5712 2018-10-12 Yury Gribov <tetra2005@gmail.com>
5715 * real.c (format_helper::can_represent_integral_type_p): New function
5716 * real.h (format_helper::can_represent_integral_type_p): Ditto.
5717 * match.pd: New pattern.
5719 2018-10-12 Alexandre Oliva <oliva@adacore.com>
5721 * configure.ac: Introduce --enable-large-address-aware
5722 to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
5723 * doc/install.texi: Document it.
5724 * configure, config.in: Rebuilt.
5725 * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
5726 based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
5727 (LINK_SPEC): Insert it.
5728 * config/i386/mingw-w64.h: Likewise.
5730 * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
5732 2018-10-12 Peter Bergner <bergner@linux.ibm.com>
5734 PR rtl-optimization/87600
5735 * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
5737 2018-10-12 Paul Koning <ni1d@arrl.net>
5739 * doc/md.texi (doloop_end): Document that the pattern code may
5740 need to check operand mode.
5742 2018-10-12 Wilco Dijkstra <wdijkstr@arm.com>
5744 * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
5745 to zero-extend between int and floating-point registers.
5746 (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
5747 ldp into floating-point registers. Add type and arch attributes.
5748 (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
5749 Use f_loads for type attribute.
5751 2018-10-11 Martin Sebor <msebor@redhat.com>
5753 * doc/extend.texi (attribute packed): Correct typos.
5755 2018-10-11 Martin Sebor <msebor@redhat.com>
5757 * doc/extend.texi (attribute flatten): Mention interaction with
5760 2018-10-11 Jan Hubicka <hubicka@ucw.cz>
5763 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5764 Set new_decl virtual flag to zero.
5766 2018-10-11 Martin Sebor <msebor@redhat.com>
5769 * doc/extend.texi (attribute format_arg): Discuss using multiple
5770 attributes on a single function.
5772 2018-10-11 Giuliano Belinassi <giuliano.belinassi@usp.br>
5774 PR tree-optimization/86829
5775 * match.pd (sin (atan (x))): New simplification rules.
5776 (cos (atan (x))): Likewise.
5777 * real.c (build_sinatan_real): New function.
5778 * real.h (build_sinatan_real): Prototype.
5780 2018-10-11 Will Schmidt <will_schmidt@vnet.ibm.com>
5782 * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
5784 (fold_mergeeo_helper): New helper function.
5785 (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
5786 intrinsics. Correct some whitespace indentation issues.
5788 2018-10-11 Wilco Dijkstra <wdijkstr@arm.com>
5791 * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
5792 Use HOST_WIDE_INT_1U for shift.
5794 2018-10-11 Doug Rupp <rupp@adacore.com>
5795 Olivier Hainque <hainque@adacore.com>
5797 * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
5798 Pass --relax to the linker for RTPs.
5799 (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
5801 2018-10-11 Andrew Stubbs <ams@codesourcery.com>
5802 Jan Hubicka <jh@suse.cz>
5803 Martin Jambor <mjambor@suse.cz>
5805 * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
5806 the same elements are repeated rather than printing all of them.
5807 * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
5808 "repeated" elements.
5809 * read-rtl-function.c (test_loading_repeat): New function.
5810 (read_rtl_function_c_tests): Call test_loading_repeat.
5811 * rtl-tests.c (test_dumping_repeat): New function.
5812 (rtl_tests_c_tests): Call test_dumping_repeat.
5814 2018-10-11 Richard Biener <rguenther@suse.de>
5816 * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
5817 bdver?_cost): Unify to ...
5818 (bdver_memcpy, bdver_memset, bdver_cost): ... this.
5819 * config/i386/i386.c (processor_cost_table): Adjust.
5821 2018-10-10 Eric Botcazou <ebotcazou@adacore.com>
5824 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
5825 the thunk when expanding to GIMPLE.
5827 2018-10-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
5829 * varasm.c (mergeable_string_section): Don't try to move zero-length
5830 strings to the merge section.
5832 2018-10-10 Uros Bizjak <ubizjak@gmail.com>
5835 * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
5837 2018-10-10 Jakub Jelinek <jakub@redhat.com>
5840 * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
5841 to special_args set.
5843 2018-10-10 Richard Biener <rguenther@suse.de>
5845 * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
5846 reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
5847 reduc_plus_scal_v4sf): Merge into pattern reducing to half width
5848 and recursing and pattern terminating the recursion on SSE
5849 vector width using ix86_expand_reduc.
5850 (reduc_sminmax_scal_<mode>): Split into part reducing to half
5851 width and recursing and SSE2 vector variant doing the final
5852 reduction with ix86_expand_reduc.
5853 (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
5854 with terminating the recursion at AVX level, splitting that
5857 2018-10-09 David Malcolm <dmalcolm@redhat.com>
5859 * genmatch.c (error_cb): Rename to...
5860 (diagnostic_cb): ...this, converting int params to enums.
5861 (fatal_at): Update for renaming.
5862 (warning_at): Likewise.
5864 * input.c (selftest::ebcdic_execution_charset::apply):
5865 Update for renaming of...
5866 (selftest::ebcdic_execution_charset::on_error): ...this, renaming
5868 (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
5869 converting level and reason to enums.
5870 (class selftest::lexer_error_sink): Rename to...
5871 (class selftest::lexer_test_options): ...this, renaming field
5872 "m_errors" to "m_diagnostics".
5873 (selftest::lexer_test_options::apply): Update for renaming of...
5874 (selftest::lexer_test_options::on_error): ...this, renaming to...
5875 (selftest::lexer_test_options::on_diagnostic): ...this
5876 converting level and reason to enums.
5877 (selftest::test_lexer_string_locations_raw_string_unterminated):
5878 Update for renamings.
5879 * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
5882 2018-10-09 Paul A. Clarke <pc@us.ibm.com>
5884 * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
5885 * config/rs6000/pmmintrin.h: New file.
5887 2018-10-09 Eric Botcazou <ebotcazou@adacore.com>
5889 PR tree-optimization/86659
5890 * gimple-match.h (gimple_match_op constructors): Initialize reverse.
5892 2018-10-09 Richard Biener <rguenther@suse.de>
5894 PR tree-optimization/63155
5895 * tree-ssa-structalias.c: Include tree-ssa.h.
5896 (get_constraint_for_ssa_var): For undefs return nothing_id.
5897 (find_func_aliases): Cleanup PHI handling.
5899 2018-10-09 Richard Biener <rguenther@suse.de>
5901 * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
5904 2018-10-09 Martin Liska <mliska@suse.cz>
5906 * asan.c (asan_emit_stack_protection): If a stack variable
5907 is located in a same file as current function, then emit
5908 line info into variable definition string.
5910 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5912 * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
5915 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5917 * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
5920 2018-10-08 Eric Botcazou <ebotcazou@adacore.com>
5922 PR tree-optimization/86659
5923 * gimple-match.h (struct gimple_match_op): Add reverse field.
5924 (gimple_match_op::set_op): New overloaded method.
5925 * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
5926 the REF_REVERSE_STORAGE_ORDER flag on the value.
5927 (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
5928 REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
5930 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
5933 * gimple-ssa-backprop.c (backprop::intersect_uses): Use
5934 FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
5936 2018-10-08 H.J. Lu <hongjiu.lu@intel.com>
5939 * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
5940 Defined with __builtin_ia32_vfmaddsubpd512_mask.
5942 2018-10-08 Richard Biener <rguenther@suse.de>
5944 * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
5945 cost the same as AVX128 ones.
5947 2018-10-08 Paul Koning <ni1d@arrl.net>
5949 * config/pdp11/pdp11-protos.h (output_block_move): Remove.
5950 (expand_block_move): New function.
5951 * config/pdp11/pdp11.c (output_block_move): Remove.
5952 (expand_block_move): New function.
5953 * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
5954 * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
5955 (*movmemhi1): Remove.
5957 2018-10-08 Robin Dapp <rdapp@linux.ibm.com>
5959 * config/s390/2827.md: Increase latencies for some FP instructions.
5961 2018-10-08 Richard Biener <rguenther@suse.de>
5963 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5965 * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
5966 * tree-vectorizer.h (dump_stmt_cost): Adjust.
5967 (add_stmt_cost): Dump return value of the hook.
5969 2018-10-08 Richard Biener <rguenther@suse.de>
5971 PR tree-optimization/63155
5972 * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
5973 (ssa_propagation_engine::ssa_propagate): Remove redundant
5974 bitmap bit clearing.
5976 2018-10-05 Peter Bergner <bergner@linux.ibm.com>
5978 PR rtl-optimization/86939
5979 PR rtl-optimization/87479
5980 * ira.h (non_conflicting_reg_copy_p): New prototype.
5981 * ira-lives.c (ignore_reg_for_conflicts): New static variable.
5982 (make_hard_regno_dead): Don't add conflicts for register
5983 ignore_reg_for_conflicts.
5984 (make_object_dead): Likewise.
5985 (non_conflicting_reg_copy_p): New function.
5986 (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
5987 Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
5988 * lra-lives.c (ignore_reg_for_conflicts): New static variable.
5989 (make_hard_regno_dead): Don't add conflicts for register
5990 ignore_reg_for_conflicts. Remove special conflict handling of
5991 REAL_PIC_OFFSET_TABLE_REGNUM. Remove now unused argument
5992 check_pic_pseudo_p and update callers.
5993 (mark_pseudo_dead): Don't add conflicts for register
5994 ignore_reg_for_conflicts.
5995 (process_bb_lives): Set ignore_reg_for_conflicts for copies.
5997 2018-10-05 Andrew Waterman <andrew@sifive.com>
5998 Jim Wilson <jimw@sifive.com>
6000 * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
6001 Add define_expand. Add ! HONOR_SNANS check to current pattern. Add
6002 new pattern using HONOR_SNANS that emits one extra instruction.
6004 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
6006 * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
6007 patterns): Merge SI and DI patterns to a GPR pattern.
6008 (unnamed define_insn and define_split for record form of that): Merge
6009 to a single define_insn_and_split pattern.
6011 2018-10-05 David Malcolm <dmalcolm@redhat.com>
6014 * input.c (expand_location_to_spelling_point): Add param "aspect"
6015 and use rather than hardcoding LOCATION_ASPECT_CARET.
6016 (get_substring_ranges_for_loc): Handle the case of a single token
6017 within a macro expansion.
6018 * input.h (expand_location_to_spelling_point): Add "aspect" param,
6019 defaulting to LOCATION_ASPECT_CARET.
6021 2018-10-05 Paul Koning <ni1d@arrl.net>
6023 * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
6024 (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
6025 (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
6026 (pdp11_guard_type): New function.
6028 2018-10-05 Paul Koning <ni1d@arrl.net>
6030 * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
6031 * config/pdp11/pdp11.opt (mfloat32): Remove.
6033 * doc/invoke.texi (pdp11 -mfloat32): Remove:
6034 (pdp11 -mfloat64): Remove.
6036 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6038 * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
6039 (*cmp<mode>_cc_i387): Ditto.
6040 (*cmpu<mode>_cc_i387): Ditto.
6041 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6042 * config/i386/i386.c (ix86_expand_fp_compare): Remove
6044 <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
6045 Emit x86_sahf_1 pattern.
6046 (ix86_expand_compare): Update call to ix86_expand_fp_compare.
6047 (ix86_expand_carry_flag_compare): Ditto.
6049 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6051 * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
6052 to reg_or_0_operand. Add "C" constraint.
6053 (*cmpxf_cc_i387): Ditto.
6054 (*cmp<mode>_i387): Change operand 2 predicate
6055 to nonimm_or_0_operand. Add "C" constraint.
6056 (*cmp<mode>_cc_i387): Ditto.
6057 (*cmp<mode>_0_i387): Remove insn pattern.
6058 (*cmp<mode>_0_cc_i387): Ditto.
6060 2018-10-05 Uros Bizjak <ubizjak@gmail.com>
6062 * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
6063 * config/i386/predicates.md (nonimm_or_0_operand): Rename
6064 from vector_move_operand. Update all uses.
6066 2018-10-05 Martin Sebor <msebor@redhat.com>
6068 PR tree-optimization/87490
6069 * builtins.c (expand_builtin_strnlen): Handle a null data.decl
6072 2018-10-05 Richard Biener <rguenther@suse.de>
6074 PR tree-optimization/63155
6075 * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
6076 vertical space in dumpfiles.
6077 * tree-ssa-propagate.h
6078 (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
6079 * tree-ssa-propagate.c (cfg_blocks_back): New global.
6080 (ssa_edge_worklist_back): Likewise.
6081 (curr_order): Likewise.
6082 (cfg_blocks_get): Remove abstraction.
6083 (cfg_blocks_add): Likewise.
6084 (cfg_blocks_empty_p): Likewise.
6085 (add_ssa_edge): Add to current or next worklist based on
6087 (add_control_edge): Likewise.
6088 (ssa_propagation_engine::process_ssa_edge_worklist): Fold
6090 (ssa_propagation_engine::ssa_propagate): ... here. Unify
6091 iteration from CFG and SSA edge worklist so we process
6092 everything in RPO order, prioritizing forward progress
6094 (ssa_prop_init): Allocate new worklists, do not dump
6096 (ssa_prop_fini): Free new worklists.
6098 2018-10-05 Richard Biener <rguenther@suse.de>
6100 * tree-core.h (tree_block::abstract_flag): Remove.
6101 (tree_block::block_num): Make full 32bits.
6102 * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
6103 * tree.h (BLOCK_ABSTRACT): Remove.
6104 * dwarf2out.c (gen_lexical_block_die): Remove dead code
6105 resulting from BLOCK_ABSTRACT being always false.
6106 (gen_inlined_subroutine_die): Likewise.
6107 (gen_block_die): Likewise.
6108 * tree.c (block_ultimate_origin): Likewise.
6109 * tree-pretty-print.c (dump_block_node): Remove code dealing
6110 with BLOCK_ABSTRACT.
6111 * tree-ssa-live.c (dump_scope_block): Likewise.
6112 * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
6113 * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
6115 2018-10-05 Richard Biener <rguenther@suse.de>
6117 * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
6118 is asked for initialize mode to the component mode of the
6121 2018-10-05 H.J. Lu <hongjiu.lu@intel.com>
6124 * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
6125 assembler for -mavx.
6126 * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
6128 2018-10-05 Segher Boessenkool <segher@kernel.crashing.org>
6131 * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
6133 * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
6134 to be DImode. When using mffscrn, force the operand to a register.
6136 2018-10-04 Uros Bizjak <ubizjak@gmail.com>
6138 * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
6139 from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
6140 X87MODEF mode iterator.
6141 (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
6142 *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
6143 X87MODEF mode iterator.
6145 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
6147 * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
6148 -Wno-prio-ctor-dtor.
6150 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6152 * Makefile.in (OBJS): Add opt-problem.o.
6153 * dump-context.h: Include "selftest.h.
6154 (selftest::temp_dump_context): New forward decl.
6155 (class dump_context): Make friend of class
6156 selftest::temp_dump_context.
6157 (dump_context::dump_loc_immediate): New decl.
6158 (class dump_pretty_printer): Move here from dumpfile.c.
6159 (class temp_dump_context): Move to namespace selftest.
6160 (temp_dump_context::temp_dump_context): Add param
6161 "forcibly_enable_dumping".
6162 (selftest::verify_dumped_text):
6163 (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
6164 (selftest::verify_item):
6165 (ASSERT_IS_TEXT): Move here from dumpfile.c.
6166 (ASSERT_IS_TREE): Likewise.
6167 (ASSERT_IS_GIMPLE): Likewise.
6168 * dumpfile.c (dump_context::dump_loc): Move immediate dumping
6170 (dump_context::dump_loc_immediate): ...this new function.
6171 (class dump_pretty_printer): Move to dump-context.h.
6172 (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
6173 (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
6174 (temp_dump_context::temp_dump_context): Move to "selftest"
6175 namespace. Add param "forcibly_enable_dumping", and use it to
6176 conditionalize the use of m_pp;
6177 (selftest::verify_dumped_text): Make non-static.
6178 (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
6179 (selftest::verify_item): Make non-static.
6180 (ASSERT_IS_TEXT): Move to dump-context.h.
6181 (ASSERT_IS_TREE): Likewise.
6182 (ASSERT_IS_GIMPLE): Likewise.
6183 (selftest::test_capture_of_dump_calls): Pass "true" for new
6184 param of temp_dump_context.
6185 * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
6186 it to MSG_ALL_PRIORITIES. Update values of TDF_COMPARE_DEBUG and
6188 * opt-problem.cc: New file.
6189 * opt-problem.h: New file.
6190 * optinfo-emit-json.cc
6191 (selftest::test_building_json_from_dump_calls): Pass "true" for
6192 new param of temp_dump_context.
6193 * optinfo.cc (optinfo_kind_to_dump_flag): New function.
6194 (optinfo::emit_for_opt_problem): New function.
6195 (optinfo::emit): Clarity which emit_item is used.
6196 * optinfo.h (optinfo::get_dump_location): New accessor.
6197 (optinfo::emit_for_opt_problem): New decl.
6198 (optinfo::emit): Make const.
6199 * selftest-run-tests.c (selftest::run_tests): Call
6200 selftest::opt_problem_cc_tests.
6201 * selftest.h (selftest::opt_problem_cc_tests): New decl.
6202 * tree-data-ref.c (dr_analyze_innermost): Convert return type from
6203 bool to opt_result, converting fprintf messages to
6204 opt_result::failure_at calls. Add "stmt" param for use by the
6206 (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
6207 (runtime_alias_check_p): Convert return type from bool to
6208 opt_result, converting dump_printf calls to
6209 opt_result::failure_at, using the statement DDR_A for their
6211 (find_data_references_in_stmt): Convert return type from bool to
6212 opt_result, converting "return false" to opt_result::failure_at
6214 * tree-data-ref.h: Include "opt-problem.h".
6215 (dr_analyze_innermost): Convert return type from bool to opt_result,
6216 and add a const gimple * param.
6217 (find_data_references_in_stmt): Convert return type from bool to
6219 (runtime_alias_check_p): Likewise.
6220 * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
6221 dr_analyze_innermost.
6222 * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
6223 Convert return type from bool to opt_result, adding a message for
6224 the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
6225 (vect_analyze_data_ref_dependence): Convert return type from bool
6226 to opt_result. Change sense of return type from "false"
6227 effectively meaning "no problems" to "false" meaning a problem,
6228 so that "return false" becomes "return opt_result::success".
6229 Convert "return true" calls to opt_result::failure_at, using
6230 the location of statement A rather than vect_location.
6231 (vect_analyze_data_ref_dependences): Convert return type from bool
6233 (verify_data_ref_alignment): Likewise, converting dump_printf_loc
6234 calls to opt_result::failure_at, using the stmt location rather
6236 (vect_verify_datarefs_alignment): Convert return type from bool
6238 (vect_enhance_data_refs_alignment): Likewise. Split local "stat"
6239 into multiple more-tightly-scoped copies.
6240 (vect_analyze_data_refs_alignment): Convert return type from bool
6242 (vect_analyze_data_ref_accesses): Likewise, converting a
6243 "return false" to a "return opt_result::failure_at", adding a
6245 (vect_prune_runtime_alias_test_list): Convert return type from
6246 bool to opt_result, converting dump_printf_loc to
6247 opt_result::failure_at. Add a %G to show the pertinent statement,
6248 and use the stmt's location rather than vect_location.
6249 (vect_find_stmt_data_reference): Convert return type from
6250 bool to opt_result, converting dump_printf_loc to
6251 opt_result::failure_at, using stmt's location.
6252 (vect_analyze_data_refs): Convert return type from bool to
6253 opt_result. Convert "return false" to "return
6254 opt_result::failure_at", adding messages as needed.
6255 * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
6256 type from bool to opt_result.
6257 (vect_determine_vf_for_stmt): Likewise.
6258 (vect_determine_vectorization_factor): Likewise, converting
6259 dump_printf_loc to opt_result::failure_at, using location of phi
6260 rather than vect_location.
6261 (vect_analyze_loop_form_1): Convert return type from bool to
6262 opt_result, converting dump_printf_loc calls, retaining the use of
6264 (vect_analyze_loop_form): Convert return type from loop_vec_info
6265 to opt_loop_vec_info.
6266 (vect_analyze_loop_operations): Convert return type from bool to
6267 opt_result, converting dump_printf_loc calls, using the location
6268 of phi/stmt rather than vect_location where available. Convert
6269 various "return false" to "return opt_result::failure_at" with
6270 "unsupported phi" messages.
6271 (vect_get_datarefs_in_loop): Convert return type from bool to
6272 opt_result. Add a message for the
6273 PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
6274 (vect_analyze_loop_2): Convert return type from bool to
6275 opt_result. Ensure "ok" is set to a opt_result::failure_at before
6276 each "goto again;", adding new messages where needed.
6277 Add "unsupported grouped {store|load}" messages.
6278 (vect_analyze_loop): Convert return type from loop_vec_info to
6280 * tree-vect-slp.c (vect_analyze_slp): Convert return type from
6282 * tree-vect-stmts.c (process_use): Likewise, converting
6283 dump_printf_loc call and using stmt location, rather than
6285 (vect_mark_stmts_to_be_vectorized): Likeise.
6286 (vect_analyze_stmt): Likewise, adding a %G.
6287 (vect_get_vector_types_for_stmt): Convert return type from bool to
6288 opt_result, converting dump_printf_loc calls and using stmt
6289 location, rather than vect_location.
6290 (vect_get_mask_type_for_stmt): Convert return type from tree to
6291 opt_tree, converting dump_printf_loc calls and using stmt location.
6292 * tree-vectorizer.c: Include "opt-problem.h.
6293 (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
6294 MSG_PRIORITY_INTERNALS. Convert local "loop_vinfo" from
6295 loop_vec_info to opt_loop_vec_info. If if fails, and dumping is
6296 enabled, use it to report at the top level "couldn't vectorize
6297 loop" followed by the problem.
6298 * tree-vectorizer.h (opt_loop_vec_info): New typedef.
6299 (vect_mark_stmts_to_be_vectorized): Convert return type from bool
6301 (vect_analyze_stmt): Likewise.
6302 (vect_get_vector_types_for_stmt): Likewise.
6303 (tree vect_get_mask_type_for_stmt): Likewise.
6304 (vect_analyze_data_ref_dependences): Likewise.
6305 (vect_enhance_data_refs_alignment): Likewise.
6306 (vect_analyze_data_refs_alignment): Likewise.
6307 (vect_verify_datarefs_alignment): Likewise.
6308 (vect_analyze_data_ref_accesses): Likewise.
6309 (vect_prune_runtime_alias_test_list): Likewise.
6310 (vect_find_stmt_data_reference): Likewise.
6311 (vect_analyze_data_refs): Likewise.
6312 (vect_analyze_loop): Convert return type from loop_vec_info to
6314 (vect_analyze_loop_form): Likewise.
6315 (vect_analyze_slp): Convert return type from bool to opt_result.
6317 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6319 * doc/invoke.texi (-fopt-info): Document new "internals"
6321 * dump-context.h (dump_context::apply_dump_filter_p): New decl.
6322 * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
6324 (optinfo_verbosity_options): Add "internals".
6325 (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
6326 (dump_context::apply_dump_filter_p): New member function.
6327 (dump_context::dump_loc): Use apply_dump_filter_p rather than
6328 explicitly masking the dump_kind.
6329 (dump_context::begin_scope): Increment the scope depth first. Use
6330 apply_dump_filter_p rather than explicitly masking the dump_kind.
6331 (dump_context::emit_item): Use apply_dump_filter_p rather than
6332 explicitly masking the dump_kind.
6333 (dump_dec): Likewise.
6334 (dump_hex): Likewise.
6335 (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
6336 (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
6337 (opt_info_switch_p): Update handling of default
6338 MSG_OPTIMIZED_LOCATIONS to cope with default of
6339 MSG_PRIORITY_USER_FACING.
6340 (dump_basic_block): Use apply_dump_filter_p rather than explicitly
6341 masking the dump_kind.
6342 (selftest::test_capture_of_dump_calls): Update test_dump_context
6343 instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
6344 than MSG_ALL. Generalize scope test to be run at all four
6345 combinations of with/without MSG_PRIORITY_USER_FACING and
6346 MSG_PRIORITY_INTERNALS, adding examples of explicit priority
6347 for each of the two values.
6348 * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
6349 Rename MSG_ALL to MSG_ALL_KINDS. Add MSG_PRIORITY_USER_FACING,
6350 MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
6351 values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
6352 (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
6353 with MSG_PRIORITY_*.
6354 * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
6355 dump messages as MSG_PRIORITY_USER_FACING.
6356 * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
6357 about the interaction with MSG_PRIORITY_*.
6359 2018-10-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
6361 * varasm.c (output_constant): Add new parameter merge_strings.
6362 Make strings properly zero terminated in merge string sections.
6363 (mergeable_string_section): Don't fail if the last char is non-zero.
6364 (assemble_variable_contents): Handle merge string sections.
6365 (assemble_variable): Likewise.
6366 (assemble_constant_contents): Likewise.
6367 (output_constant_def_contents): Likewise.
6368 (output_constructor_array_range,
6369 output_constructor_regular_field): Adjust call to output_constant.
6370 (output_object_block): Adjust call to assemble_constant_contents
6371 and assemble_variable_contents.
6373 2018-10-04 Martin Liska <mliska@suse.cz>
6376 * cgraphunit.c (process_function_and_variable_attributes):
6377 Warn about a function with alias attribute and a body.
6379 2018-10-04 Martin Liska <mliska@suse.cz>
6382 * multiple_target.c (redirect_to_specific_clone): New function.
6383 (ipa_target_clone): Use it.
6384 * tree-inline.c: Fix comment.
6386 2018-10-04 David Malcolm <dmalcolm@redhat.com>
6388 * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
6390 (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
6391 (gcc::dump_manager::register_pass): New member function, adapted
6392 from loop body in gcc::pass_manager::register_pass, adding a
6393 call to update_dfi_for_opt_info.
6394 (gcc::dump_manager::opt_info_enable_passes): Store the
6395 -fopt-info options into the new fields. Move the loop
6397 (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
6399 * dumpfile.h (struct opt_pass): New forward decl.
6400 (gcc::dump_manager::register_pass): New decl.
6401 (gcc::dump_manager::update_dfi_for_opt_info): New decl.
6402 (class gcc::dump_manager): Add fields "m_optgroup_flags",
6403 "m_optinfo_flags", and "m_optinfo_filename".
6404 * passes.c (gcc::pass_manager::register_pass): Move all of the
6405 dump-handling code to gcc::dump_manager::register_pass.
6407 2018-10-04 Peter Bergner <bergner@linux.ibm.com>
6409 PR rtl-optimization/87466
6410 * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
6411 * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
6412 * doc/tm.texi: Regenerate.
6413 * ira-lives.c (process_bb_node_lives): Use the new target hook.
6414 * lra-lives.c (process_bb_lives): Likewise.
6415 * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
6418 2018-10-04 Tamar Christina <tamar.christina@arm.com>
6420 * params.c (add_params): Fix initialization.
6422 2018-10-04 Martin Liska <mliska@suse.cz>
6424 PR gcov-profile/84107
6425 * tree-profile.c (init_ic_make_global_vars):
6426 Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
6427 Come up with new ic_tuple* variables. Emit
6428 __gcov_indirect_call{,_topn} variables.
6429 (gimple_gen_ic_profiler): Access the variable
6431 (gimple_gen_ic_func_profiler): Access
6432 __gcov_indirect_call.callee field.
6433 (gimple_init_gcov_profiler): Use ptr_type_node.
6434 * value-prof.c (gimple_ic): Use ptr_type_node.
6436 2018-10-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6438 PR tree-optimization/85787
6439 * ipa-pure-const.c (malloc_candidate_p_1): Move most of
6440 malloc_candidate_p into this function and add support for
6441 detecting multiple phis.
6442 (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
6444 2018-10-04 Martin Liska <mliska@suse.cz>
6447 * ipa-inline.c (inline_to_all_callers_1):
6448 Call ultimate_alias_target for node being inlined.
6450 2018-10-03 Jeff Law <law@redhat.com>
6452 * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
6454 * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
6455 * tree.h (get_typenode_from_name): Prototype.
6457 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
6459 * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
6460 Change operand 2 predicate to nonimmediate_operand.
6461 (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6463 2018-10-03 Martin Sebor <msebor@redhat.com>
6464 Jeff Law <law@redhat.com>
6466 * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
6468 (get_string_length): Detect unterminated arrays.
6469 (format_string): Same.
6470 (format_directive): Warn about unterminated arrays.
6471 (handle_gimple_call): Mark statements with no_warning as needed.
6473 2018-10-03 Jim Wilson <jimw@sifive.com>
6475 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
6476 also define __riscv_abi_rve. Delete trailing white space.
6478 2018-10-03 Paul Koning <ni1d@arrl.net>
6480 Enable LRA register allocator for PDP11.
6481 * config/pdp11/constraints.md (Q): Use define_memory_constraint.
6484 * config/pdp11/pdp11.c (pdp11_lra_p): New function.
6485 * config/pdp11/pdp11.opt (-mlra): New option.
6486 * doc/invoke.texi (PDP-11 Options): Document -mlra.
6488 2018-10-03 Uros Bizjak <ubizjak@gmail.com>
6490 * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
6491 (*<absneg:code>extend<mode>xf2): Ditto.
6493 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6495 PR tree-optimization/87415
6496 * tree-vrp.c (set_value_range_with_overflow): Special case one bit
6499 2018-10-02 Jeff Law <law@redhat.com>
6501 * gimple-fold.c (get_range_strlen): Only set *nonstr when
6502 an unterminated string is discovered. Bubble up range
6503 even for unterminated strings.
6504 (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
6505 indicates the string was not terminated via NONSTR.
6507 2018-10-03 Aldy Hernandez <aldyh@redhat.com>
6509 * tree-vrp.c (extract_range_from_unary_expr): Special case all
6510 pointer conversions.
6511 Do not do anything special for anti-ranges.
6513 2018-10-03 Jérôme Lambourg <lambourg@adacore.com>
6515 * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
6516 DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
6518 2018-10-03 Martin Liska <mliska@suse.cz>
6520 PR gcov-profile/86109
6521 * coverage.c (coverage_begin_function): Do not
6522 mark lambdas as artificial.
6523 * tree-core.h (struct GTY): Remove tm_clone_flag
6524 and introduce new lambda_function.
6525 * tree.h (DECL_LAMBDA_FUNCTION): New macro.
6527 2018-10-02 Aaron Sawdey <acsawdey@linux.ibm.com>
6530 * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
6531 P8_VECTOR and VSX are enabled.
6533 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6535 * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
6536 0x3907 as CPU model number.
6538 2018-10-02 Andreas Krebbel <krebbel@linux.ibm.com>
6540 * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
6541 * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
6542 PF_Z14. Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
6543 TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
6544 TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
6545 * config/s390/s390.md: Likewise. Rename also the cpu attribute
6546 value from arch12 to z14.
6548 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6550 * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
6552 (isinf<mode>2): Ditto.
6554 2018-10-02 Uros Bizjak <ubizjak@gmail.com>
6556 * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
6557 before emitting fxam. Perform calculations in XFmode.
6559 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6561 * match.pd (((X /[ex] A) +- B) * A): New transformation.
6563 2018-10-02 Marc Glisse <marc.glisse@inria.fr>
6566 * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
6567 * tree.c (signed_or_unsigned_type_for): Handle complex.
6569 2018-10-02 Jeff Law <law@redhat.com>
6571 * gimple-fold.c (get_range_strlen): Remove dead code.
6573 2018-10-02 Martin Sebor <msebor@redhat.com>
6574 Jeff Law <law@redhat.com>
6576 * builtins.c (unterminated_array): Add new arguments.
6577 If argument is not terminated, bubble up size and exact
6579 (expand_builtin_strnlen): Detect, avoid expanding
6580 and diagnose unterminated arrays.
6581 (c_strlen): Fill in offset of start of unterminated strings.
6582 * builtins.h (unterminated_array): Update prototype.
6584 2018-10-02 Richard Biener <rguenther@suse.de>
6586 * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
6587 of haddv4df, first reduce to SSE width and exploit the fact
6588 that we only need element zero with the reduction result.
6589 (reduc_plus_scal_v2df): Likewise.
6591 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
6593 * dojump.h (do_jump): Delete.
6594 (do_jump_1): Likewise.
6595 (split_comparison): Move around.
6596 * dojump.c (do_jump): Make static.
6597 (do_jump_1): Likewise.
6598 (jumpifnot): Move around.
6599 (jumpifnot_1): Likewise.
6601 (jumpif_1): Likewise.
6602 * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
6604 2018-10-02 Eric Botcazou <ebotcazou@adacore.com>
6606 * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
6607 insns in the delay slot and add_insn_after for the jump insn.
6609 2018-10-02 Richard Biener <rguenther@suse.de>
6611 * tree-inline.c (expand_call_inline): Use the location of
6612 the callee declaration for the inline-entry marker.
6613 * final.c (notice_source_line): Remove special-casing of
6614 NOTE_INSN_INLINE_ENTRY.
6616 2018-10-01 Carl Love <cel@us.ibm.com>
6619 * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
6620 (__builtin_mtfsb0): New.
6621 (__builtin_mtfsb1): New.
6622 ( __builtin_set_fpscr_rn): New.
6623 (__builtin_set_fpscr_drn): New.
6624 * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
6625 (rs6000_expand_set_fpscr_rn_builtin): Add.
6626 (rs6000_expand_set_fpscr_drn_builtin): Add.
6627 (rs6000_expand_builtin): Add case statement entries for
6628 RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
6629 RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
6630 RS6000_BUILTIN_MFFSL.
6631 (rs6000_init_builtins): Add ftype initialization and def_builtin
6632 calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
6633 __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
6634 * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
6635 rs6000_mffscdrn): Add define_insn.
6636 (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
6637 * doc/extend.texi: Add documentation for the builtins.
6639 2018-10-01 Richard Biener <rguenther@suse.de>
6641 PR tree-optimization/87465
6642 * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
6643 causing branch miscounts.
6645 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6647 * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
6648 aarch64_option_default_param): New.
6649 (params.h): Include.
6650 (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
6651 * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
6652 stack-clash protection validation code.
6654 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6656 * params.c (validate_param): New.
6657 (add_params): Use it.
6658 (set_param_value): Refactor param validation into validate_param.
6659 (diagnostic.h): Include.
6660 * diagnostic.h (diagnostic_ready_p): New.
6662 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6664 * params.c (set_param_value):
6665 Add index of parameter being validated.
6666 * common/common-target.def (option_validate_param): New.
6667 * common/common-targhooks.h (default_option_validate_param): New.
6668 * common/common-targhooks.c (default_option_validate_param): New.
6669 * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
6670 * doc/tm.texi: Regenerate.
6672 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6675 * config/aarch64/aarch64.c (aarch64_override_options_internal):
6676 Add validation for stack-clash parameters and set defaults.
6678 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6681 * configure.ac: Add stack-clash-protection-guard-size.
6682 * doc/install.texi: Document it.
6683 * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
6684 * params.def: Update comment for guard-size.
6685 (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
6686 PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
6687 * configure: Regenerate.
6689 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6692 * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
6693 STACK_DYNAMIC_OFFSET): New.
6694 * config/aarch64/aarch64.c (aarch64_layout_frame):
6695 Update outgoing args size.
6696 (aarch64_stack_clash_protection_alloca_probe_range,
6697 TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6699 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6702 * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
6704 * target.def (stack_clash_protection_alloca_probe_range): New.
6705 (stack_clash_protection_final_dynamic_probe): Remove.
6706 * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
6707 (default_stack_clash_protection_final_dynamic_probe): Remove.
6708 * targhooks.c: Likewise.
6709 * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6710 (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
6711 * doc/tm.texi: Regenerate.
6713 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6716 * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
6717 * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
6718 aarch64_clamp_to_uimm12_shift): New.
6719 (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
6720 * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
6722 2018-10-01 Tamar Christina <tamar.christina@arm.com>
6725 * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
6727 2018-10-01 Jeff Law <law@redhat.com>
6728 Richard Sandiford <richard.sandiford@linaro.org>
6729 Tamar Christina <tamar.christina@arm.com>
6732 * config/aarch64/aarch64.md
6733 (probe_stack_range): Add k (SP) constraint.
6734 * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
6735 STACK_CLASH_MAX_UNROLL_PAGES): New.
6736 * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
6737 stack probes for stack clash.
6738 (aarch64_allocate_and_probe_stack_space): New.
6739 (aarch64_expand_prologue): Use it.
6740 (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
6741 (aarch64_sub_sp): Add emit_move_imm optional param.
6743 2018-10-01 MCC CS <deswurstes@users.noreply.github.com>
6745 PR tree-optimization/87261
6746 * match.pd: Remove trailing whitespace.
6747 Add (x & y) | ~(x | y) -> ~(x ^ y),
6748 (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
6750 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6752 * config/arc/arc.md (*add_n): Clean up pattern, update instruction
6754 (ashlsi3_insn): Update instruction constraints.
6755 (ashrsi3_insn): Likewise.
6756 (rotrsi3): Likewise.
6757 (add_shift): Likewise.
6758 * config/arc/constraints.md (Csz): New 32 bit constraint. It
6759 avoids placing in the limm field small constants which, otherwise,
6760 could end into a small instruction.
6762 2018-10-01 Claudiu Zissulescu <claziss@synopsys.com>
6764 * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
6765 destination register is not odd-even.
6766 (umaddsidi4_split): Likewise.
6768 2018-10-01 Richard Biener <rguenther@suse.de>
6770 * tree-inline.c (expand_call_inline): Store origin of fn
6771 in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
6772 * tree.c (block_ultimate_origin): Simplify and do some
6775 2018-09-30 Uros Bizjak <ubizjak@gmail.com>
6777 * config/i386/mmx.md (EMMS): New int iterator.
6778 (emms): New int attribute.
6779 (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
6780 EMMS int iterator. Explicitly declare clobbers.
6781 (mmx_emms): Remove expander.
6783 * config/i386/predicates.md (emms_operation): Remove predicate.
6784 (vzeroall_pattern): New predicate.
6785 (vzeroupper_pattern): Rename from vzeroupper_operation.
6786 * config/i386/i386.c (ix86_avx_u128_mode_after): Use
6787 vzeroupper_pattern and vzeroall_pattern predicates.
6789 2018-09-30 Peter Bergner <bergner@linux.ibm.com>
6791 PR rtl-optimization/86939
6792 * ira-lives.c (make_hard_regno_born): Rename from this...
6793 (make_hard_regno_live): ... to this. Remove update to conflict
6794 information. Update function comment.
6795 (make_hard_regno_dead): Add conflict information update. Update
6797 (make_object_born): Rename from this...
6798 (make_object_live): ... to this. Remove update to conflict information.
6799 Update function comment.
6800 (make_object_dead): Add conflict information update. Update function
6802 (mark_pseudo_regno_live): Call make_object_live.
6803 (mark_pseudo_regno_subword_live): Likewise.
6804 (mark_hard_reg_dead): Update function comment.
6805 (mark_hard_reg_live): Call make_hard_regno_live.
6806 (process_bb_node_lives): Likewise.
6807 * lra-lives.c (make_hard_regno_born): Rename from this...
6808 (make_hard_regno_live): ... to this. Remove update to conflict
6809 information. Remove now uneeded check_pic_pseudo_p argument.
6810 Update function comment.
6811 (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
6812 to conflict information. Update function comment.
6813 (mark_pseudo_live): Remove update to conflict information. Update
6815 (mark_pseudo_dead): Add conflict information update.
6816 (mark_regno_live): Call make_hard_regno_live.
6817 (mark_regno_dead): Call make_hard_regno_dead with new arguement.
6818 (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
6820 2018-09-29 H.J. Lu <hongjiu.lu@intel.com>
6823 * config/i386/i386.c (construct_container): Use TImode for
6824 BLKmode values in 2 integer registers.
6826 2018-09-29 Jeff Law <law@redhat.com>
6828 * builtins.c (unterminated_array): Pass in c_strlen_data * to
6829 c_strlen rather than just a tree *.
6830 (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
6831 Update recursive calls appropriately. If caller did not provide a
6832 suitable data pointer, create a local one. When a non-terminated
6833 string is discovered, bubble up information about the string via the
6834 c_strlen_data object.
6835 * builtins.h (c_strlen): Update prototype.
6836 (c_strlen_data): New structure.
6837 * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
6838 For a type 2 call, if c_strlen indicates a non-terminated string
6839 use the length of the non-terminated string.
6840 (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
6842 2018-09-29 Jakub Jelinek <jakub@redhat.com>
6845 * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
6846 __m512d type for __A argument rather than __m512.
6848 2018-09-28 John David Anglin <danglin@gcc.gnu.org>
6850 * match.pd (simple_comparison): Don't optimize if either operand is
6851 a function pointer when target needs function pointer canonicalization.
6853 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6855 * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
6856 power5 .. power9 to remove indirection.
6857 * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
6858 ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
6859 ASM_CPU_476_SPEC): Delete.
6860 (ASM_CPU_SPEC): Adjust.
6861 (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
6862 asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
6864 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6866 * config.in: Delete HAVE_AS_DCI.
6867 * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
6868 * config/rs6000/rs6000.h: Ditto.
6869 * configure.ac: Delete HAVE_AS_DCI.
6870 * configure: Regenerate.
6872 2018-09-28 Segher Boessenkool <segher@kernel.crashing.org>
6874 * config.in (HAVE_AS_LWSYNC): Delete.
6875 * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6876 * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
6878 * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6879 * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
6881 * configure.ac: Delete HAVE_AS_LWSYNC.
6882 * configure: Regenerate.
6884 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6885 Pierre-Marie de Rodat <derodat@adacore.com>
6887 * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
6888 * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
6889 (cgraph_node::create_thunk): Add indirect_offset parameter.
6890 (thunk_adjust): Likewise.
6891 * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
6892 and initialize the corresponding field with it.
6893 (cgraph_node::dump): Dump indirect_offset field.
6894 * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
6895 * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
6896 (thunk_adjust): Add indirect_offset parameter and deal with it.
6897 (cgraph_node::expand_thunk): Deal with the indirect_offset field and
6898 pass it to thunk_adjust. Do not call the target hook if it's non-zero
6899 or if the thunk is external or local. Fix formatting. Do not chain
6900 the RESULT_DECL to BLOCK_VARS. Pass the static chain to the target,
6901 if any, in the GIMPLE representation.
6902 * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
6903 * lto-cgraph.c (lto_output_node): Write indirect_offset field.
6904 (input_node): Read indirect_offset field.
6905 * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
6906 call to thunk_adjust.
6907 * tree-nested.c (struct nesting_info): Add thunk_p field.
6908 (create_nesting_tree): Set it.
6909 (convert_all_function_calls): Copy static chain from targets to thunks.
6910 (finalize_nesting_tree_1): Return early for thunks.
6911 (unnest_nesting_tree_1): Do not finalize thunks.
6912 (gimplify_all_functions): Do not gimplify thunks.
6914 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6916 * opt-suggestions.c (option_proposer::build_option_suggestions):
6917 Release "option_values".
6919 2018-09-28 David Malcolm <dmalcolm@redhat.com>
6921 * coverage.c (get_coverage_counts): Convert problem-reporting dump
6922 messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
6923 * dumpfile.c (kind_as_string): New function.
6924 (dump_loc): Rather than a hardcoded prefix of "note: ", use
6925 kind_as_string to vary the prefix based on dump_kind.
6926 (selftest::test_capture_of_dump_calls): Update for above.
6928 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6930 * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
6931 (GET_SSE_REGNO): Rename from SSE_REGNO. Update all uses for rename.
6933 2018-09-28 Uros Bizjak <ubizjak@gmail.com>
6935 * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
6936 * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
6937 INVALID_REGNUM instead of FPSR_REG.
6938 (ix86_md_asm_adjust): Do not clobber FPSR_REG.
6939 * config/i386/i386.md: Update comment of FP compares.
6940 (fldenv): Do not clobber FPSR_REG.
6942 2018-09-28 Richard Biener <rguenther@suse.de>
6944 * tree.h (BLOCK_ORIGIN): New.
6945 * omp-expand.c (grid_expand_target_grid_body): Assign
6946 BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
6947 * tree-inline.c (remap_block): Likewise.
6948 * auto-profile.c (get_function_decl_from_block): Simplify
6949 by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
6950 * langhooks.c (lhd_print_error_function): Likewise.
6951 * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
6953 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6954 * tree.c (block_nonartificial_location): Likewise.
6955 (block_ultimate_origin): Likewise.
6956 * tree-pretty-print.c (percent_K_format): Likewise. Remove
6957 no longer needed LTO case.
6959 2018-09-28 Andrew Stubbs <ams@codesourcery.com>
6960 Jan Hubicka <jh@suse.cz>
6961 Martin Jambor <mjambor@suse.cz>
6963 * simplify-rtx.c (simplify_merge_mask): New function.
6964 (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
6965 same masks are used in op1 or op2.
6966 (test_vec_merge): New function.
6967 (test_vector_ops): Call test_vec_merge.
6969 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
6971 * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
6972 * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
6973 * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
6974 (cypress_costs): Set it.
6975 (supersparc_costs): Likewise.
6976 (hypersparc_costs): Likewise.
6977 (leon_cost): Likewise.
6978 (leon3_costs): Likewise.
6979 (sparclet_costs): Likewise.
6980 (ultrasparc_costs): Likewise.
6981 (ultrasparc_costs): Likewise.
6982 (niagara_costs): Likewise.
6983 (niagara2_costs): Likewise.
6984 (niagara3_costs): Likewise.
6985 (niagara4_costs): Likewise.
6986 (niagara7_costs): Likewise.
6987 (m8_costs): Likewise.
6988 (TARGET_CAN_FOLLOW_JUMP): Define.
6989 (pass_work_around_errata::gate): Minor tweak.
6990 (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
6991 Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
6992 Automaitcally clear MASK_FSMULD mask for V7 processors.
6993 (sparc_can_follow_jump): New static function.
6994 (output_ubranch): Deal with CROSSING_JUMP_P.
6995 (sparc_use_sched_lookahead): Rewrite using switch statement.
6996 (sparc_issue_rate): Reorder.
6997 (sparc_branch_cost): New function.
6999 2018-09-27 Martin Sebor <msebor@redhat.com>
7001 * tree.h (tree_to_shwi): Add attribute nonnull and pure.
7002 (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
7003 (int_fits_type_p): Same.
7005 2018-09-27 Uros Bizjak <ubizjak@gmail.com>
7007 * config/i386/i386.md (FPCR_REG): Remove.
7008 (UNSPEC_FLDCW): Remove.
7009 (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
7010 (x86_fldcw_1): Remove insn pattern.
7011 (fnstenv): Do not clobber FPCR_REG.
7013 * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
7014 (CALL_USED_REGISTERS): Ditto.
7015 (REG_ALLOC_ORDER): Ditto.
7016 (REG_CLASS_CONTENTS): Ditto.
7017 (HI_REGISTER_NAMES): Ditto.
7018 (ADDITIONAL_REGISTER_NAMES): Use defines instead
7019 of numerical constants.
7020 * config/i386/i386.c (regclass_map): Remove fpsr register.
7021 (dbx_register_map): Ditto.
7022 (dbx64_register_map): Ditto.
7023 (svr4_dbx_register_map): Ditto.
7024 (print_reg): Do not handle FPCR_REG.
7026 2018-09-27 Segher Boessenkool <segher@kernel.crashing.org>
7029 * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
7030 HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
7031 Delete, always treat as true.
7032 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
7033 Ditto. Simplify remaining code.
7034 * config/powerpcspe/powerpcspe.h: Ditto.
7035 * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
7036 Simplify remaining code.
7037 (rs6000_expand_builtin): Ditto.
7038 * config/rs6000/rs6000.h: Ditto.
7039 * configure.ac: Ditto.
7040 * configure: Regenerate.
7042 2018-09-27 Martin Liska <mliska@suse.cz>
7044 * coverage.c (get_coverage_counts): Revert the formatting
7045 of missing profile opt info.
7047 2018-09-27 Richard Biener <rguenther@suse.de>
7051 * dwarf2out.c (set_block_origin_self): Do not mark outermost
7052 block as we do not output that.
7053 (gen_inlined_subroutine_die): Elide the originally outermost
7054 block, matching what we do for concrete instances.
7055 (decls_for_scope): Add parameter specifying whether to recurse
7058 2018-09-27 Andrew Stubbs <ams@codesourcery.com>
7059 Tom de Vries <tom@codesourcery.com>
7063 * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
7064 STORE_FLAG_VALUE == 1.
7066 2018-09-27 Andreas Krebbel <krebbel@linux.ibm.com>
7068 * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
7069 constant definitions.
7070 ("tx_assist"): Replace magic number with PPA_TX_ABORT.
7071 ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
7072 ("speculation_barrier"): New expander definition.
7074 2018-09-26 Indu Bhagat <indu.bhagat@oracle.com>
7076 PR gcov-profile/86957
7077 * common.opt: New warning option -Wmissing-profile.
7078 * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
7079 * doc/invoke.texi: Document -Wmissing-profile.
7081 2018-09-26 Jim Wilson <jimw@sifive.com>
7083 * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
7084 (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
7086 2018-09-26 Martin Sebor <msebor@redhat.com>
7088 * tree.c (zerop): Change return type to bool.
7089 (integer_zerop, integer_onep, integer_each_onep): Same.
7090 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7091 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7092 (real_onep, real_minus_onep, chain_index): Same.
7093 (print_type_hash_statistics, type_list_equal): Same.
7094 * tree.h (zerop): Same.
7095 (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
7096 (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
7097 (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
7098 (real_onep, real_minus_onep, chain_index): Same.
7099 (print_type_hash_statistics, type_list_equal): Same.
7101 2018-09-26 Jim Wilson <jimw@sifive.com>
7103 * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
7105 2018-09-26 Jakub Jelinek <jakub@redhat.com>
7108 * config/i386/i386.c: Include debug.h and dwarf2out.h.
7109 (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
7112 2018-09-25 Andrew Stubbs <ams@codesourcery.com>
7114 * builtins.c (get_builtin_sync_mem): Force address mode conversion.
7116 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
7118 * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
7119 and FP_SECOND_SSE_REGS.
7120 (REG_CLASS_NAMES): Ditto.
7121 (REG_CLASS_CONTENTS): Ditto.
7122 * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
7123 FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
7124 (ix86_preferred_output_reload_class): Ditto.
7125 * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
7126 clobber constraint to "=&f".
7127 (fix_truncdi_i387): Ditto.
7128 (lrintxfdi2): Ditto.
7129 (fistdi2_<rounding>): Ditto.
7130 (fpremxf4_i387): Change "=u" constraint to "=f".
7131 (fprem1xf4_i387): Ditto.
7133 (fptanxf4_i387): Ditto.
7134 (fxtractxf3_i387): Ditto.
7135 (fscalexf4_i387): Ditto.
7136 (atan2xf3): Change "u" constraint to "f".
7137 (fyl2xxf3_i387): Ditto.
7138 (fyl2xp1xf3_i387): Ditto.
7140 2018-09-26 Uros Bizjak <ubizjak@gmail.com>
7143 * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
7144 for removed I387_MASK_PM entity.
7147 2018-09-26 Jeff Law <law@redhat.com>
7149 2018-09-26 Alexey Neyman <stilor@att.net>
7151 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7152 headers are no longer pulled in by <isl/val.h>.
7154 2018-09-26 Richard Biener <rguenther@suse.de>
7157 * dwarf2out.c (gen_lexical_block_die): Do not equate inline
7158 or concrete instance DIE to the tree. Create abstract origin
7159 attributes also for concrete instances.
7161 2018-09-26 Alexey Neyman <stilor@att.net>
7163 * graphite.h: Include <isl/id.h> and <isl/space.h>; these
7164 headers are no longer pulled in by <isl/val.h>.
7166 2018-09-26 Matthew Malcomson <matthew.malcomson@arm.com>
7168 * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
7169 Use new helper functions.
7170 * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
7171 Use new helper functions.
7172 * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
7173 aarch_mm_needs_release): New declarations.
7174 * config/arm/aarch-common.c (aarch_mm_needs_acquire,
7175 aarch_mm_needs_release): New.
7177 2018-09-26 Eric Botcazou <ebotcazou@adacore.com>
7179 * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
7180 (arm32_output_mi_thunk): Deal with long calls.
7182 2018-09-26 Richard Biener <rguenther@suse.de>
7186 * tree-inline.c (expand_call_inline): When the location
7187 of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
7188 or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
7189 the inserted BLOCK to make inlined_function_outer_scope_p
7191 * dwarf2out.c (add_call_src_coords_attributes): Do not add
7192 coords for reserved locations.
7194 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7196 * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
7197 (*call_indirect_nonlocal_sysv<mode>): Ditto.
7198 (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
7199 (*sibcall_nonlocal_sysv<mode>): Ditto.
7200 (*sibcall_value_nonlocal_sysv<mode>): Ditto.
7201 (<bd>_<mode>): Ditto.
7202 (<bd>tf_<mode>): Ditto.
7204 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7206 * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
7207 control string as a list of templates instead of as C code.
7208 (*altivec_movti): Ditto.
7209 * config/rs6000/darwin.md (movdf_low_di): Ditto.
7211 2018-09-25 Jim Wilson <jimw@sifive.com>
7213 * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
7214 when target symbol is weak.
7216 2018-09-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
7219 * builtins.c (unterminated_array): Simplify.
7220 * expr.c (string_constant): Handle SSA_NAME. Add more exceptions
7221 where pointer arithmetic is safe.
7223 2018-09-25 Segher Boessenkool <segher@kernel.crashing.org>
7226 * config/rs6000/altivec.md (altivec_vspltb): Use
7227 const_0_to_15_operand instead of u5bit_cint_operand.
7228 (*altivec_vspltb_internal): Ditto.
7229 (altivec_vspltb_direct): Ditto.
7230 (altivec_vsplth): Use const_0_to_7_operand instead of
7232 (*altivec_vsplth_internal): Ditto.
7233 (altivec_vsplth_direct): Ditto.
7234 (altivec_vspltw): Use const_0_to_3_operand instead of
7236 (*altivec_vspltw_internal): Ditto.
7237 (altivec_vspltw_direct): Ditto.
7238 (altivec_vspltsf): Ditto.
7239 (*altivec_vspltsf_internal): Ditto.
7240 * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
7241 various splats with the proper size immediate. Reorder the various
7242 cases by ascending size of immediate, and put all such together.
7244 2018-09-25 Richard Biener <rguenther@suse.de>
7247 * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
7249 (maybe_create_die_with_external_ref): Do not create
7250 DW_TAG_imported_unit here.
7251 (add_abstract_origin_attribute): Handle external BLOCK refs.
7252 (dwarf2out_abstract_function): Simplify LTO case.
7253 (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
7254 rather than using maybe_create_die_with_external_ref.
7256 2018-09-25 Uros Bizjak <ubizjak@gmail.com>
7259 * config/i386/i386.md (frndintxf2_mask_pm): Remove.
7260 (frndintxf2_mask_pm_i387): Ditto.
7261 (nearbyintxf2): Rewrite expander pattern to match rintxf2.
7262 Enable for !flag_trapping_math.
7263 (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
7264 Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
7265 Change operand 1 predicate to nonimmediate_operand.
7266 (attr "i387_cw"): Remove mask_pm.
7267 * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
7268 (enum ix86_entity): Remove I387_MASK_PM.
7269 * config/i386/i386.c (ix86_i387_mode_needed): Do not
7270 handle I387_MASK_PM.
7271 (ix86_mode_needed): Ditto.
7272 (ix86_mode_after): Ditto.
7273 (ix86_mode_entry): Ditto.
7274 (ix86_mode_exit): Ditto.
7275 (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
7277 2018-09-25 Jakub Jelinek <jakub@redhat.com>
7279 * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
7280 to_update_switch_stmts to vNULL instead of calling create on them
7283 2018-09-25 Richard Biener <rguenther@suse.de>
7285 PR tree-optimization/87402
7286 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
7287 (visit_phi): Re-instantiate handling of supposed to be VARYING
7288 but non-VARYING backedge value.
7290 2018-09-25 Richard Biener <rguenther@suse.de>
7293 * dwarf2out.c (struct sym_off_pair): New.
7294 (external_die_map): New global.
7295 (lookup_decl_die): When in LTO create DIEs lazily from the
7297 (lookup_block_die): New function, create DIEs lazily in LTO.
7298 (equate_block_to_die): New function.
7299 (dwarf2out_die_ref_for_decl): During WPA get the association
7300 from the external DIE map.
7301 (dwarf2out_register_external_die): Record mapping into the
7303 (maybe_create_die_with_external_ref): New function split out from
7304 DIE generation part of old dwarf2out_register_external_die.
7305 (add_abstract_origin_attribute): Do not return the DIE. When
7306 in LTO reference externals directly.
7307 (dwarf2out_abstract_function): When in LTO ignore calls for
7308 decls with external DIEs (already present abstract instances).
7309 (gen_call_site_die): Adjust.
7310 (add_high_low_attributes): Likewise.
7311 (gen_lexical_block_die): Likewise.
7312 (gen_inlined_subroutine_die): Likewie.
7313 (gen_block_die): Likewise.
7314 (dwarf2out_inline_entry): Likewise.
7315 (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
7318 2018-09-25 Martin Liska <mliska@suse.cz>
7320 * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
7321 integers and not by a float value.
7323 2018-09-25 Martin Liska <mliska@suse.cz>
7326 * dbgcnt.c (dbg_cnt_process_single_pair): Return false
7328 * dumpfile.c (dump_enable_all): Remove extra parenthesis.
7329 * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
7330 * godump.c (go_format_type): Remove extra parenthesis.
7332 2018-09-25 Martin Liska <mliska@suse.cz>
7334 * alias.c (set_dest_equal_p): Remove unused function.
7335 * config/i386/i386.c (def_builtin_pure2): Likewise.
7336 * diagnostic-show-locus.c (class layout): Remove
7338 (layout::layout): Likewise here.
7339 * dump-context.h (class temp_dump_context): Likewise.
7340 * dwarf2out.c (add_AT_fde_ref): Remove unused function.
7341 (add_AT_loclistsptr): Likewise.
7342 (add_AT_offset): Likewise.
7343 (get_AT_hi_pc): Likewise.
7344 (is_comdat_die): Likewise.
7345 (type_is_enum): Likewise.
7346 (ceiling): Likewise.
7347 (add_AT_vms_delta): Likewise.
7348 (is_class_die): Likewise.
7349 * edit-context.c (class line_event): Remove unused field.
7350 * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
7352 * ipa-cp.c (ipa_get_vr_lat): Likewise.
7353 * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
7354 (ok_for_base_p_nonstrict): Likewise.
7355 * tree-chrec.c (is_not_constant_evolution): Likewise.
7356 (chrec_fold_poly_cst): Likewise.
7357 * tree-if-conv.c (has_pred_critical_p): Likewise.
7358 * tree-ssa-coalesce.c (print_exprs): Likewise.
7359 * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
7360 * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
7361 * tree-vrp.c (value_ranges_intersect_p): Likewise.
7362 (value_range_nonnegative_p): Likewise.
7364 2018-09-25 Martin Liska <mliska@suse.cz>
7366 * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
7367 Do not handle "GNU Pascal".
7368 * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
7370 * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
7371 from documentation. Likewise.
7372 * dbxout.c (dbxout_range_type): Likewise.
7373 * doc/cpp.texi: Likewise.
7374 * doc/extend.texi: Likewise.
7375 * doc/frontends.texi: Likewise.
7376 * doc/invoke.texi: Remove Pascal entry.
7377 * tree.def (CLEANUP_POINT_EXPR): Likewise.
7378 * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
7380 2018-09-25 Martin Liska <mliska@suse.cz>
7383 * doc/invoke.texi: Document all parameters and remove default
7386 2018-09-25 Ilya Leoshkevich <iii@linux.ibm.com>
7389 * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
7390 contains HOST_WIDE_INTs when computing its size.
7392 2018-09-24 Jim Wilson <jimw@sifive.com>
7395 * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
7397 (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
7399 2018-09-24 Andrew Pinski <apinski@marvell.com>
7401 * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
7402 access prev before checking it for NULLness in the
7403 AARCH64_FUSE_CMP_BRANCH case.
7405 2018-09-24 H.J. Lu <hongjiu.lu@intel.com>
7408 * config/i386/i386.c (rest_of_insert_endbranch): Set
7409 endbr_queued_at_entrance to true and don't insert ENDBR if
7410 x86_function_profiler will be called.
7411 (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
7413 * config/i386/i386.h (machine_function): Add
7414 endbr_queued_at_entrance.
7416 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
7418 * genattrtab.c (mk_attr_alt): Use alternative_mask.
7419 (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
7421 (check_attr_test): Use alternative_mask.
7422 (get_attr_value): Likewise.
7423 (compute_alternative_mask): Use alternative_mask and XWINT.
7424 (make_alternative_compare): Use alternative_mask.
7425 (attr_alt_subset_p): Use XWINT.
7426 (attr_alt_subset_of_compl_p): Likewise.
7427 (attr_alt_intersection): Use alternative_mask and XWINT.
7428 (attr_alt_union): Likewise.
7429 (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
7430 (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
7431 (simplify_test_exp): Use alternative_mask and XWINT.
7432 (write_test_expr): Use alternative_mask and XWINT, adjust bit
7433 number calculation to support 64 bits. Generate code that
7434 checks 64-bit masks.
7435 (main): Use alternative_mask.
7436 * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
7438 2018-09-24 Ilya Leoshkevich <iii@linux.ibm.com>
7441 * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
7442 RETURN+USE when returning via %r14.
7444 2018-09-24 Martin Liska <mliska@suse.cz>
7446 * gcov.c (output_lines): Print colorization legend
7447 for both flag_use_colors and flag_use_hotness_colors.
7450 2018-09-24 Martin Liska <mliska@suse.cz>
7452 * coverage.c (get_coverage_counts): Use warning_at
7453 with current_function_decl location. Use %qD in warning
7456 2018-09-24 Martin Liska <mliska@suse.cz>
7458 * memory-block.h (memory_block_pool::release): Annotate with
7459 valgrind that the memory is not accessible.
7461 2018-09-24 Martin Liska <mliska@suse.cz>
7464 * asan.c: Make asan_handled_variables extern.
7466 * cfgexpand.c (expand_stack_vars): Make sure
7467 a representative is unpoison if another
7468 variable in the partition is handled by
7469 use-after-scope sanitization.
7471 2018-09-24 Richard Biener <rguenther@suse.de>
7473 PR tree-optimization/63155
7474 * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
7475 the worklist when the edge of the respective argument isn't
7478 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7480 * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
7481 ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
7482 (MASK_CLASS_P): Update for rename.
7483 (MAYBE_MASK_CLASS_P): Ditto.
7484 (REG_CLASS_NAMES): Update.
7485 (REG_CLASS_CONTENT): Update.
7486 * config/i386/i386.c (regclass_map): Update for MASK_REG
7487 and ALL_MASK_REGS rename.
7488 * config/i386/constraints.md (Yk): Update for rename.
7491 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7493 * config/i386/i386.h (enum reg_class): Remove
7494 EVEX_SSE_REGS and MOD4_SSE_REGS.
7495 (REG_CLASS_NAMES): Update.
7496 (REG_CLASS_CONTENT): Update.
7497 * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
7498 registers as ALL_SSE_REGS.
7499 (ix86_additional_allocno_class_p): Remove.
7500 (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
7501 (ix86_register_priority): Lower priority of EVEX SSE registers.
7502 Use IN_RANGE macro where appropriate.
7503 (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
7504 AVX-5124VNNIW checks.
7505 (ix86_modes_tieable_p): Tie 512-bit SSE modes.
7506 * config/i386/sse.md (avx5124fmaddps_4fmaddps)
7507 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
7508 (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
7509 (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
7510 (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
7511 (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
7512 (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
7513 (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
7514 (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
7515 (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
7516 * config/i386/constraints.md (Yh): Remove.
7518 2018-09-23 Uros Bizjak <ubizjak@gmail.com>
7520 * config/i386/i386.c (regclass_map): Declare integer REX registers
7523 2018-09-23 Gerald Pfeifer <gerald@pfeifer.com>
7525 * doc/service.texi (Service): Switch the fsf.org link to https.
7527 2018-09-22 Chung-Ju Wu <jasonwucj@gmail.com>
7530 * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7531 Define to speculation_safe_value_not_needed.
7533 2018-09-21 Florian Weimer <fweimer@redhat.com>
7536 * doc/extend.texi (Common Function Attributes): Mention that
7537 noreturn suppresses tail call optimization.
7539 2018-09-21 Jeff Law <law@redhat.com>
7541 * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
7542 vr_values::cleanup_edges_and_switches.
7543 * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
7545 (identify_jump_threads): Remove EDGE_IGNORE handling.
7546 (execute_vrp): Move handling of to_remove_edges and
7547 to_update_switch_stmts into vr_values class member functions.
7548 * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
7549 (to_update_switch_stmts): Likewise.
7550 * vr-values.c: Include cfghooks.h.
7551 (vr_values::vr_values): Initialize to_remove_edges and
7552 to_update_switch_stmts.
7553 (vr_values::~vr_values): Verify to_remove_edges and
7554 to_update_switch_stmts are empty.
7555 (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
7556 (vr_values::cleanup_edges_and_switches): New member function.
7557 * vr-values.h (vr_values): Add cleanup_edges_and_switches member
7558 function. Add new data members.
7560 2018-09-21 David Malcolm <dmalcolm@redhat.com>
7562 PR tree-optimization/87309
7563 * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
7564 calls with pflags and alt_flags.
7565 (selftest::test_capture_of_dump_calls): Add test of interaction of
7566 MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
7568 2018-09-21 Olivier Hainque <hainque@adacore.com>
7570 * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
7572 2018-09-21 Olivier Hainque <hainque@adacore.com>
7574 * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
7576 2018-09-21 Olivier Hainque <hainque@adacore.com>
7578 * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
7579 Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
7580 (VXWORKS_LIBS_RTP): Minor reordering.
7582 2018-09-21 Olivier Hainque <hainque@adacore.com>
7584 * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
7585 (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
7587 2018-09-21 Olivier Hainque <hainque@adacore.com>
7589 * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
7590 (PTRDIFF_TYPE): Likewise.
7592 2018-09-21 Olivier Hainque <hainque@adacore.com>
7594 * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
7595 triplet, similar to support for VxWorks7.
7596 * config/vxworks-dummy.h: Provide a default definition
7597 of TARGET_VXWORKS64 to 0.
7599 2018-09-21 Olivier Hainque <hainque@adacore.com>
7601 * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
7602 * config/vxworks-dummy.h: here.
7604 2018-09-21 Olivier Hainque <hainque@adacore.com>
7606 * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
7608 2018-09-21 Shaokun Zhang <zhangshaokun@hisilicon.com>
7609 Bo Zhou <zbo.zhou@hisilicon.com>
7611 * config/aarch64/aarch64-cores.def (tsv110): New CPU.
7612 * config/aarch64/aarch64-tune.md: Regenerated.
7613 * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
7614 * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
7615 * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
7617 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
7618 Julian Brown <julian@codesourcery.com>
7620 * builtins.c (get_builtin_sync_mem): Handle address spaces.
7622 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
7624 * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
7625 if the call takes a static chain.
7627 2018-09-21 Martin Liska <mliska@suse.cz>
7629 * auto-profile.c (autofdo_source_profile::read): Do not
7631 (read_profile): Do not add working sets.
7632 (read_autofdo_file): Remove sum_all.
7633 (afdo_callsite_hot_enough_for_early_inline): Remove const
7635 * coverage.c (struct counts_entry): Remove gcov_summary.
7636 (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
7637 do not support GCOV_TAG_PROGRAM_SUMMARY.
7638 (get_coverage_counts): Remove summary and expected
7640 * coverage.h (get_coverage_counts): Likewise.
7641 * doc/gcov-dump.texi: Remove -w option.
7642 * gcov-dump.c (dump_working_sets): Remove.
7643 (main): Do not support '-w' option.
7644 (print_usage): Likewise.
7645 (tag_summary): Likewise.
7646 * gcov-io.c (gcov_write_summary): Do not dump
7648 (gcov_read_summary): Likewise.
7649 (gcov_histo_index): Remove.
7650 (gcov_histogram_merge): Likewise.
7651 (compute_working_sets): Likewise.
7652 * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
7654 (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
7655 (GCOV_TAG_SUMMARY_LENGTH): Adjust.
7656 (GCOV_HISTOGRAM_SIZE): Remove.
7657 (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
7658 (struct gcov_summary): Simplify rapidly just
7659 to runs and sum_max fields.
7660 (gcov_histo_index): Remove.
7661 (NUM_GCOV_WORKING_SETS): Likewise.
7662 (compute_working_sets): Likewise.
7663 * gcov-tool.c (print_overlap_usage_message): Remove
7664 trailing empty line.
7665 * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
7666 (output_lines): Remove program related line.
7667 * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
7668 * lto-cgraph.c (output_profile_summary): Do not stream GCOV
7670 (input_profile_summary): Do not read it.
7671 (merge_profile_summaries): And do not merge it.
7672 (input_symtab): Do not call removed function.
7673 * modulo-sched.c (sms_schedule): Do not print sum_max.
7674 * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
7675 removed when histogram method was invented.
7676 (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
7678 * postreload-gcse.c (eliminate_partially_redundant_load): Fix
7680 * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
7681 and dump selected value.
7682 * profile.c (add_working_set): Remove.
7683 (get_working_sets): Likewise.
7684 (find_working_set): Likewise.
7685 (get_exec_counts): Do not work with working sets.
7686 (read_profile_edge_counts): Do not inform as sum_max is removed.
7687 (compute_branch_probabilities): Likewise.
7688 (compute_value_histograms): Remove argument for call of
7689 get_coverage_counts.
7690 * profile.h: Do not make gcov_summary const.
7692 2018-09-21 Monk Chiang <sh.chiang04@gmail.com>
7694 * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
7696 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
7698 PR tree-optimization/86990
7699 * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
7700 Check that the entire merged store group is made of constants only for
7703 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
7705 * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
7706 (VTABLE_VERIFICATION_SPEC): Likewise.
7707 (SANITIZER_EARLY_SPEC): Likewise.
7708 (SANITIZER_SPEC): Likewise.
7709 * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
7710 * doc/invoke.texi (Link Options): Document -r.
7712 2018-09-20 Richard Biener <rguenther@suse.de>
7715 * gimplify.c (gimplify_expr): Retain alignment of
7716 addressable lvalue in dereference.
7718 2018-09-20 Alexandre Oliva <aoliva@redhat.com>
7721 * configure.ac: Check for .loc is_stmt support.
7722 * configure, config.in: Rebuilt.
7723 * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
7726 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7728 * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
7729 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
7732 2018-09-20 Segher Boessenkool <segher@kernel.crashing.org>
7734 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7736 * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
7739 2018-09-20 Marek Polacek <polacek@redhat.com>
7741 * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
7743 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7745 PR tree-optimization/87288
7746 * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
7747 into account when determining PEELING_FOR_NITERS.
7749 2018-09-20 Richard Sandiford <richard.sandiford@arm.com>
7751 PR tree-optimization/86877
7752 * tree-vect-loop.c (vect_analyze_loop_2): Call
7753 vect_verify_datarefs_alignment.
7755 2018-09-19 Marek Polacek <polacek@redhat.com>
7757 * doc/invoke.texi: Document -Wclass-conversion.
7759 2018-09-19 John David Anglin <danglin@gcc.gnu.org>
7761 * config/pa/pa.c (pa_adjust_priority): Delete.
7762 (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
7764 * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
7765 (atomic_storehi): Likewise.
7766 (atomic_storesi): Likewise.
7767 (atomic_loaddi): Restore compare and swap exchange loop code.
7769 2018-09-19 Segher Boessenkool <segher@kernel.crashing.org>
7771 PR rtl-optimization/86902
7772 * combine.c (try_combine): When changing the CC mode used, don't change
7773 an unrelated mode in other_insn to that new CC mode.
7775 2018-09-19 David Malcolm <dmalcolm@redhat.com>
7777 * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
7778 with %T in place of calls to dump_generic_expr.
7779 (prune_runtime_alias_test_list): Likewise.
7780 (create_runtime_alias_checks): Likewise.
7781 * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
7782 (vect_analyze_data_ref_dependence): Likewise.
7783 (vect_slp_analyze_data_ref_dependence): Likewise.
7784 (vect_record_base_alignment): Likewise. Use %G in place of call
7785 to dump_gimple_stmt.
7786 (vect_compute_data_ref_alignment): Likewise.
7787 (verify_data_ref_alignment): Likewise.
7788 (vect_find_same_alignment_drs): Likewise.
7789 (vect_analyze_group_access_1): Likewise.
7790 (vect_analyze_data_ref_accesses): Likewise.
7791 (dependence_distance_ge_vf): Likewise.
7792 (dump_lower_bound): Likewise.
7793 (vect_prune_runtime_alias_test_list): Likewise.
7794 (vect_find_stmt_data_reference): Likewise.
7795 (vect_analyze_data_refs): Likewise.
7796 (vect_create_addr_base_for_vector_ref): Likewise.
7797 (vect_create_data_ref_ptr): Likewise.
7798 * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
7799 (vect_can_advance_ivs_p): Likewise.
7800 (vect_update_ivs_after_vectorizer): Likewise.
7801 (vect_gen_prolog_loop_niters): Likewise.
7802 (vect_prepare_for_masked_peels): Likewise.
7803 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7804 (vect_determine_vectorization_factor): Likewise.
7805 (vect_is_simple_iv_evolution): Likewise.
7806 (vect_analyze_scalar_cycles_1): Likewise.
7807 (vect_analyze_loop_operations): Likewise.
7808 (report_vect_op): Likewise.
7809 (vect_is_slp_reduction): Likewise.
7810 (check_reduction_path): Likewise.
7811 (vect_is_simple_reduction): Likewise.
7812 (vect_create_epilog_for_reduction): Likewise.
7813 (vect_finalize_reduction:): Likewise.
7814 (vectorizable_induction): Likewise.
7815 (vect_transform_loop_stmt): Likewise.
7816 (vect_transform_loop): Likewise.
7817 (optimize_mask_stores): Likewise.
7818 * tree-vect-patterns.c (vect_pattern_detected): Likewise.
7819 (vect_split_statement): Likewise.
7820 (vect_recog_over_widening_pattern): Likewise.
7821 (vect_recog_average_pattern): Likewise.
7822 (vect_determine_min_output_precision_1): Likewise.
7823 (vect_determine_precisions_from_range): Likewise.
7824 (vect_determine_precisions_from_users): Likewise.
7825 (vect_mark_pattern_stmts): Likewise.
7826 (vect_pattern_recog_1): Likewise.
7827 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7828 (vect_record_max_nunits): Likewise.
7829 (vect_build_slp_tree_1): Likewise.
7830 (vect_build_slp_tree_2): Likewise.
7831 (vect_print_slp_tree): Likewise.
7832 (vect_analyze_slp_instance): Likewise.
7833 (vect_detect_hybrid_slp_stmts): Likewise.
7834 (vect_detect_hybrid_slp_1): Likewise.
7835 (vect_slp_analyze_operations): Likewise.
7836 (vect_slp_analyze_bb_1): Likewise.
7837 (vect_transform_slp_perm_load): Likewise.
7838 (vect_schedule_slp_instance): Likewise.
7839 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7840 (vect_mark_stmts_to_be_vectorized): Likewise.
7841 (vect_init_vector_1): Likewise.
7842 (vect_get_vec_def_for_operand): Likewise.
7843 (vect_finish_stmt_generation_1): Likewise.
7844 (vect_check_load_store_mask): Likewise.
7845 (vectorizable_call): Likewise.
7846 (vectorizable_conversion): Likewise.
7847 (vectorizable_operation): Likewise.
7848 (vectorizable_load): Likewise.
7849 (vect_analyze_stmt): Likewise.
7850 (vect_is_simple_use): Likewise.
7851 (vect_get_vector_types_for_stmt): Likewise.
7852 (vect_get_mask_type_for_stmt): Likewise.
7853 * tree-vectorizer.c (increase_alignment): Likewise.
7855 2018-09-19 Andrew Stubbs <ams@codesourcery.com>
7857 * doc/rtl.texi: Adjust vec_select description.
7858 * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
7859 non-constant selectors.
7861 2018-09-19 Matthew Malcomson <matthew.malcomson@arm.com>
7863 * config/aarch64/aarch64-protos.h
7864 (aarch64_offset_9bit_signed_unscaled_p): New declaration.
7865 * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
7866 (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
7867 * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
7868 (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
7869 (AARCH64_FL_PROFILE): Move index so flags are ordered.
7870 (AARCH64_ISA_RCPC8_4): New flag.
7871 * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
7872 to aarch64_offset_9bit_signed_unscaled_p.
7873 * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
7875 * config/aarch64/constraints.md (Ust): New constraint.
7876 * config/aarch64/predicates.md.
7877 (aarch64_9bit_offset_memory_operand): New predicate.
7878 (aarch64_rcpc_memory_operand): New predicate.
7880 2018-09-19 Eric Botcazou <ebotcazou@adacore.com>
7882 PR rtl-optimization/87361
7883 * rtlanal.c (nonzero_bits1): Revert accidental change.
7885 2018-09-19 Richard Biener <rguenther@suse.de>
7887 PR tree-optimization/87349
7888 PR tree-optimization/87342
7889 * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
7891 2018-09-18 Marek Polacek <polacek@redhat.com>
7893 P1064R0 - Allowing Virtual Function Calls in Constant Expressions
7894 * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
7896 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7898 * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
7900 2018-09-18 Segher Boessenkool <segher@kernel.crashing.org>
7902 PR rtl-optimization/86882
7903 * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
7905 2018-09-18 Uros Bizjak <ubizjak@gmail.com>
7907 * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
7908 *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
7910 2018-09-18 Jonathan Wakely <jwakely@redhat.com>
7913 * doc/invoke.texi (Link Options): Fix formatting and grammar.
7915 2018-09-18 Richard Biener <rguenther@suse.de>
7918 * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
7919 (compute_samebase_partition_bases): Likewise.
7920 (coalesce_ssa_name): Always use compute_optimized_partition_bases.
7921 (gimple_can_coalesce_p): Simplify.
7923 2018-09-18 Hans-Peter Nilsson <hp@bitrange.com>
7925 Handle a library implementation of ffs calling __builtin_ffs.
7926 * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
7927 (mmix_init_libfuncs): New function: make __builtin_ffs expand
7930 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7932 * diagnostic-show-locus.c (class layout_range): Add field
7934 (layout_range::layout_range): Add "original_idx" param and use it
7935 to initialize new field.
7936 (make_range): Use 0 for original_idx.
7937 (layout::layout): Pass in index to calls to
7938 maybe_add_location_range.
7939 (layout::maybe_add_location_range): Add param "original_idx" and
7940 pass it on to layout_range.
7941 (layout::print_any_labels): Pass on range->m_original_idx to
7943 (gcc_rich_location::add_location_if_nearby): Use 0 for
7945 * gcc-rich-location.h (text_range_label::get_text): Update for new
7947 (range_label_for_type_mismatch::get_text): Likewise.
7949 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7951 * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
7953 2018-09-17 David Malcolm <dmalcolm@redhat.com>
7955 * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
7956 format_string_diagnostic_t.
7957 (fmtwarn_n): Likewise.
7958 * substring-locations.c
7959 (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
7960 (format_warning_n_va): Convert to...
7961 (format_string_diagnostic_t::emit_warning_n_va): ...this.
7962 (format_warning_va): Convert to...
7963 (format_string_diagnostic_t::emit_warning_va): ...this.
7964 (format_warning_at_substring): Convert to...
7965 (format_string_diagnostic_t::emit_warning): ...this.
7966 (format_warning_at_substring_n): Convert to...
7967 (format_string_diagnostic_t::emit_warning_n): ...this.
7968 * substring-locations.h (class format_string_diagnostic_t): New
7970 (format_warning_va): Convert to
7971 format_string_diagnostic_t::emit_warning_va.
7972 (format_warning_n_va): Convert to
7973 format_string_diagnostic_t::emit_warning_n_va.
7974 (format_warning_at_substring): Convert to
7975 format_string_diagnostic_t::emit_warning.
7976 (format_warning_at_substring_n): Convert to
7977 format_string_diagnostic_t::emit_warning_n.
7979 2018-09-17 Cesar Philippidis <cesar@codesourcery.com>
7980 Bernd Schmidt <bernds_cb1@t-online.de>
7982 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
7985 2018-09-17 Uros Bizjak <ubizjak@gmail.com>
7987 * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
7988 operand 0 predicate to nonimmediate operand.
7989 (rint<mode>2_frndint): Remove insn pattern.
7990 (rint<mode>2): Change operand 1 predicate to general_operand.
7991 Extend operand 1 to XFmode and generate rintxf2 insn.
7992 (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
7993 Do not use X87MODEF mode macro.
7994 (frndintxf2_<rounding>_i387): Rename from
7995 frndint<mode>2_<rounding>_i387. Do not use X87MODEF mode macro.
7996 (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
7997 to XFmode and generate significandxf3 insn.
7999 2018-09-17 Richard Biener <rguenther@suse.de>
8001 PR tree-optimization/87328
8002 * tree-ssa-sccvn.c (process_bb): Remove assertion about not
8003 visiting unexecutable backedges when not iterating.
8004 (do_rpo_vn): Mark all edges not executable even when not
8007 2018-09-17 Martin Jambor <mjambor@suse.cz>
8010 * doc/invoke.texi (Warning Options): Likewise.
8012 2018-09-17 Richard Biener <rguenther@suse.de>
8014 PR tree-optimization/87301
8015 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
8016 clean EH info from leftover copy assignments.
8018 2018-09-17 Martin Liska <mliska@suse.cz>
8020 PR gcov-profile/85871
8021 * gcov.c (output_intermediate_file): Fix out of bounds
8024 2018-09-17 Vineet Gupta <vgupta@synopsys.com>
8026 * config/arc/arc.c: Object attributes for core4 not reflected
8028 * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
8031 2018-09-17 Alexey Brodkin <abrodkin@synopsys.com>
8033 * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
8035 2018-09-17 Martin Liska <mliska@suse.cz>
8037 * doc/gcov.texi: Document new option --use-hotness-colors.
8038 * gcov.c (struct source_info): Declare new field.
8039 (source_info::source_info): Set default for maximum_count.
8040 (print_usage): Add new -q option.
8041 (process_args): Process it.
8042 (accumulate_line_info): Save src->maximum_count.
8043 (output_line_beginning): Make color line number if
8044 flag_use_hotness_colors is set.
8045 (output_line_details): Pass default argument value.
8046 (output_lines): Pass src->maximum_count.
8048 2018-09-17 Martin Liska <mliska@suse.cz>
8050 * common/config/i386/i386-common.c (ix86_get_valid_option_values):
8051 Use processor_names table.
8052 * config/i386/i386.c (ix86_default_align): Use
8053 processor_cost_table for alignment values.
8054 (ix86_option_override_internal): Use processor_names.
8055 (ix86_function_specific_print): Likewise.
8056 * config/i386/i386.h (struct processor_costs):
8057 Add alignment values.
8058 (struct ptt): Remove and replace with const char *.
8059 * config/i386/x86-tune-costs.h (struct processor_costs):
8060 Declare default alignments for all costs.
8062 2018-09-17 Aldy Hernandez <aldyh@redhat.com>
8064 * tree-vrp.c (extract_range_from_unary_expr): Do not special case
8065 symbolics or VR_VARYING ranges for ABS_EXPR.
8066 * wide-int-range.cc (wide_int_range_abs): Return positive numbers
8067 when range will wrap.
8069 2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
8072 * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
8073 before and after a JUMP_TABLE_DATA.
8075 2018-09-14 John David Anglin <danglin@gcc.gnu.org>
8078 * dojump.c (do_compare_and_jump): Canonicalize function pointers
8079 when one operand is a function pointer. Use POINTER_TYPE_P and
8080 FUNC_OR_METHOD_TYPE_P.
8081 * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
8082 * fold-const.c (build_range_check): Likewise.
8083 * match.pd (simple_comparison): Likewise.
8085 2018-09-14 David Malcolm <dmalcolm@redhat.com>
8088 * spellcheck.c (get_edit_distance_cutoff): New function.
8089 (selftest::test_edit_distance_unit_test_oneway): Rename to...
8090 (selftest::test_get_edit_distance_one_way): ...this.
8091 (selftest::test_get_edit_distance_unit): Rename to...
8092 (selftest::test_get_edit_distance_both_ways): ...this.
8093 (selftest::test_edit_distances): Move tests to this new function,
8094 and test some more pairs of strings. Update for above renaming.
8095 (selftest::get_old_cutoff): New function.
8096 (selftest::test_get_edit_distance_cutoff): New function.
8097 (selftest::assert_suggested_for): New function.
8098 (ASSERT_SUGGESTED_FOR): New macro.
8099 (selftest::assert_not_suggested_for): New function.
8100 (ASSERT_NOT_SUGGESTED_FOR): New macro.
8101 (selftest::test_suggestions): New function.
8102 (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
8103 tests to selftest::test_edit_distances and call it. Add calls to
8104 selftest::test_get_edit_distance_cutoff and
8105 selftest::test_suggestions.
8106 * spellcheck.h (get_edit_distance_cutoff): New function declaration.
8107 (best_match::consider): Replace hard-coded cutoff calculation with
8109 (best_match::get_cutoff): New declaration.
8110 (best_match::get_best_meaningful_candidate): Likewise.
8112 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8114 * builtins.c (fold_builtin_strlen): Remove TODO comment.
8116 2018-09-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8119 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
8121 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
8122 terminated string literal.
8124 2018-09-14 Martin Sebor <msebor@redhat.com>
8126 * builtins.c (unterminated_array): Handle ARRAY_REF.
8127 (expand_builtin_stpcpy_1): Detect unterminated char arrays.
8128 * builtins.h (unterminated_array): Declare extern.
8129 * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
8131 (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
8134 2018-09-14 Martin Sebor <msebor@redhat.com>
8135 Jeff Law <law@redhat.com>
8137 * builtins.c (unterminated_array): New.
8138 (expand_builtin_strcpy): Adjust.
8139 (expand_builtin_strcpy_args): Detect unterminated arrays.
8140 * gimple-fold.c (get_maxval_strlen): Add argument. Detect
8141 unterminated arrays.
8142 * gimple-fold.h (get_maxval_strlen): Add argument.
8143 (gimple_fold_builtin_strcpy): Detec unterminated arrays.
8145 * gimple-fold.c (get_range_strlen): Add argument.
8146 (get_maxval_strlen): Adjust.
8147 * gimple-fold.h (get_range_strlen): Add argument.
8149 2018-09-14 Wei Xiao <wei3.xiao@intel.com>
8151 * config/i386/movdirintrin.h: Fix copyright year.
8153 2018-09-14 Uros Bizjak <ubizjak@gmail.com>
8155 * reg-stack.c: Include regs.h.
8156 (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
8157 (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
8158 FIRST_STACK_REG, not DFmode.
8159 (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
8160 FIRST_STACK_REG, not XFmode. Explicitly construct swap RTX.
8161 (change stack): Default register mode to the reg_raw_mode of
8162 FIRST_STACK_REG, not DFmode.
8163 * config/i386/i386.md (*swap<mode>): Remove insn pattern.
8164 (*swapxf): Rename from swapxf.
8166 2018-09-14 Carl Love <cel@us.ibm.com>
8168 * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
8169 * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
8171 2018-09-14 Segher Boessenkool <segher@kernel.crashing.org>
8174 * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
8177 2018-09-14 Sam Tebbs <sam.tebbs@arm.com>
8180 * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
8182 2018-09-14 Jason Merrill <jason@redhat.com>
8184 Fix --enable-gather-detailed-mem-stats.
8185 * hash-table.c (hash_table_usage): Change from variable to function.
8186 * hash-table.h: Adjust.
8187 * Makefile.in: Add missing dependencies on hash-table.h.
8189 2018-09-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8191 PR tree-optimization/87259
8193 (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
8194 execute_cse_reciprocals_1 has tried transforming.
8196 2018-09-14 Aldy Hernandez <aldyh@redhat.com>
8198 * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
8199 VR_VARYING for PLUS/MINUS_EXPR.
8201 2018-09-14 Ilya Leoshkevich <iii@linux.ibm.com>
8203 * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
8206 2018-09-14 Richard Biener <rguenther@suse.de>
8209 * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
8210 bits for the merged partition.
8212 2018-09-13 Martin Sebor <msebor@redhat.com>
8213 Bernd Edlinger <bernd.edlinger@hotmail.de>
8215 * builtins.h (c_srlen): Add argument.
8216 * builtins.c (warn_string_no_nul): New function.
8217 (c_strlen): Add argument and use it. Update recursive calls.
8218 Pass DECL argument to string_constant to get info on non
8219 terminated strings. Update *NONSTR as needed.
8220 (fold_builtin_strlen): Add argument to calls to c_strlen.
8221 Warn for unterminated arrays.
8222 (warn_string_no_null): Add prototype.
8223 * expr.c (string_constant): Update arguments. Update recursive
8224 calls appropriately. Detect missing NUL terminator and outermost
8225 declaration its missing in.
8226 Improve checks for arrays with nonzero lower bound or elements
8227 that are not a single byte. Simplify offset computation.
8228 Simplify checks for non-NUL terminated strings.
8229 * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
8230 * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
8232 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
8234 * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
8236 * fold-const.c (c_getstr): Fix function comment. Remove unused third
8237 argument. Fix range checks.
8238 * fold-const.h (c_getstr): Adjust protoype.
8239 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
8240 string is constant but contains no NUL byte.
8242 * expr.c (string_constant): Adjust function comment.
8243 Remove bogus check for zero termination.
8245 * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
8247 * varasm.c (compare_constant): Compare type size of STRING_CSTs.
8248 (get_constant_size): Don't make STRING_CSTs larger than they are.
8249 (check_string_literal): New check function for STRING_CSTs.
8250 (output_constant): Use it.
8252 2018-09-13 Eric Botcazou <ebotcazou@adacore.com>
8255 * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
8257 2018-09-13 Richard Biener <rguenther@suse.de>
8259 PR tree-optimization/87263
8260 * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
8261 (struct unwind_state): Add max_rpo field.
8262 (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
8263 Compute max_rpo, the max RPO number a block can be backwards reached
8264 from. Re-write non-iterating mode to a RPO ordered worklist approach,
8265 separating it from the iterating mode.
8267 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
8269 * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
8270 (rfs_decision): New scheduling decision.
8272 2018-09-13 Richard Biener <rguenther@suse.de>
8275 * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
8276 (vn_nary_op_insert_pieces_predicated): Do not write useless
8277 valid_dominated_by_p entry outside of the allocated storage.
8279 2018-09-13 Omar Sandoval <osandov@osandov.com>
8280 Tom de Vries <tdevries@suse.de>
8283 * dwarf2out.c (is_c): New function.
8284 (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
8286 2018-09-13 Sam Tebbs <sam.tebbs@arm.com>
8289 * config/aarch64/aarch64.md (*aarch64_bfxil):
8291 * config/aarch64/constraints.md (Ulc): Define.
8292 * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
8294 * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
8297 2018-09-13 Vlad Lazar <vlad.lazar@arm.com>
8299 * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
8300 * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
8301 aarch64_layout_frame call.
8302 (aarch64_expand_epilogue): Likewise.
8303 (aarch64_initial_elimination_offset): Likewise.
8304 (aarch64_get_separate_components): Likewise.
8305 (aarch64_use_return_insn_p): Likewise.
8306 (aarch64_layout_frame): Remove unneeded check.
8308 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8310 * configure.ac: Only append
8311 " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
8312 gcc_config_arguments if it was never reconfigured or last reconfigure
8313 was with different arguments.
8314 * configure: Regenerated.
8316 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8317 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8320 * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
8321 (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
8323 2018-09-13 Jakub Jelinek <jakub@redhat.com>
8325 PR tree-optimization/87287
8326 * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
8327 X % C == 0 to X % (unsigned) C == 0 optimization to ...
8328 * match.pd (X % C == 0): ... here. New optimization.
8330 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8333 * expr.h (maybe_optimize_mod_cmp): Declare.
8334 * expr.c (mod_inv): New function.
8335 (maybe_optimize_mod_cmp): New function.
8336 (do_store_flag): Use it.
8337 * cfgexpand.c (expand_gimple_cond): Likewise.
8339 2018-09-09 Cesar Philippidis <cesar@codesourcery.com>
8340 Julian Brown <julian@codesourcery.com>
8343 * gimplify.c (gimplify_scan_omp_clauses): Set
8344 target_firstprivatize_array_bases in OpenACC parallel and kernels
8345 region contexts. Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
8346 OpenACC data regions.
8348 2018-09-12 Uros Bizjak <ubizjak@gmail.com>
8350 * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
8351 (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
8353 2018-09-12 Richard Biener <rguenther@suse.de>
8355 PR tree-optimization/87280
8356 * tree-ssa-sccvn.c (process_bb): Handle the case of executable
8357 edge but unreachable target.
8358 (do_rpo_vn): For conservatively handling a PHI only mark
8359 the backedge executable but not the block reachable.
8361 2018-09-12 Richard Biener <rguenther@suse.de>
8363 PR tree-optimization/87266
8364 * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
8367 2018-09-12 Andreas Krebbel <krebbel@linux.ibm.com>
8369 * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
8371 ("trunc<BFP:mode><DFP_ALL:mode>2")
8372 ("trunc<DFP_ALL:mode><BFP:mode>2")
8373 ("extend<BFP:mode><DFP_ALL:mode>2")
8374 ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
8375 according to the target operand type.
8377 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8378 Andreas Krebbel <krebbel@linux.ibm.com>
8380 PR tree-optimization/86844
8381 * gimple-ssa-store-merging.c
8382 (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
8383 there are any overlapping stores in between them, make sure they are
8384 also coalesced or we give up completely.
8386 2018-09-12 Jakub Jelinek <jakub@redhat.com>
8389 * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
8390 BIT_AND_EXPR's second operand is a power of two. Formatting fix.
8392 2018-09-12 Tom de Vries <tdevries@suse.de>
8394 * common.opt (gdescribe-dies): Add option.
8395 * dwarf2out.c (add_name_and_src_coords_attributes): Add description
8396 attribute for artifical and nameless decls.
8397 (dwarf2out_register_external_die): Add description attribute to
8398 external reference die.
8399 (add_desc_attribute): New functions.
8400 (gen_subprogram_die): Add description attribute to
8401 DW_TAG_call_site_parameter.
8402 * tree-pretty-print.c (print_generic_expr_to_str): New function.
8403 * tree-pretty-print.h (print_generic_expr_to_str): Declare.
8404 * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
8406 (@item -gdescribe-dies): Add.
8408 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
8410 * tree-vrp.c (vrp_shift_undefined_p): Remove.
8411 (extract_range_from_binary_expr_1: Call
8412 wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
8413 * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
8416 2018-09-12 Aldy Hernandez <aldyh@redhat.com>
8418 * gimple-ssa-warn-alloca.c
8419 (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
8420 field for ALLOCA_BOUND_*_LARGE.
8422 2018-09-11 Nathan Sidwell <nathan@acm.org>
8424 * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
8426 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8428 * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
8429 for clobbers. Remove obsolete comment.
8431 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8433 * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
8434 mpxchk, mpxld and mpxst types.
8435 (define_attr length_immediate): Remove all processing of mpx types.
8436 (define_attr prefix_0f): Ditto.
8437 (define_attr memory): Ditto.
8439 2018-09-11 Uros Bizjak <ubizjak@gmail.com>
8441 * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
8442 (log<mode>2): Change operand 1 predicate to general_operand.
8443 Extend operand 1 to XFmode and generate logxf3 insn.
8444 (log10<mode>2): Change operand 1 predicate to general_operand.
8445 Extend operand 1 to XFmode and generate log10xf3 insn.
8446 (log2<mode>2): Change operand 1 predicate to general_operand.
8447 Extend operand 1 to XFmode and generate log2xf3 insn.
8448 (fyl2xp1_extend<mode>xf3_i387): Remove.
8449 (log1p<mode>2): Change operand 1 predicate to general_operand.
8450 Extend operand 1 to XFmode and generate log1pxf3 insn.
8451 (fxtract_extend<mode>xf3_i387): Remove.
8452 (logb<mode>2): Change operand 1 predicate to general_operand.
8453 Extend operand 1 to XFmode and generate logbxf3 insn.
8454 (ilogb<mode>2): Change operand 1 predicate to general_operand.
8455 Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
8456 (significand<mode>2): Change operand 1 predicate to general_operand.
8457 Extend operand 1 to XFmode and generate significandxf3 insn.
8459 2018-09-11 Nathan Sidwell <nathan@acm.org>
8461 * gcc.c (perror_with_name, pfatal_with_name): Delete.
8462 (load_specs): Use fatal_error.
8463 (DELETE_IF_ORDINARY, process_command): Use error.
8464 (execute, run_attempt): Use fatal_error.
8466 2018-09-11 Andrew Stubbs <ams@codesourcery.com>
8468 * diagnostic-core.h (sorry_at): New prototype.
8469 * diagnostic.c (sorry_at): New function.
8471 2018-09-11 Aldy Hernandez <aldyh@redhat.com>
8473 * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
8474 by zero as VR_UNDEFINED.
8476 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
8478 * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
8479 (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
8480 (<sincos>mode2): New expander.
8481 (sincos_extend<mode>xf3_i387): Remove insn pattern.
8482 (sincos -> sin, cos splitters): Remove splitter patterns.
8483 (sincos<mode>3): Change operand 2 predicate to general_operand.
8484 Extend operand 2 to XFmode and generate sincosxf3 insn.
8485 (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
8486 Change operand 3 predicate to const1_operand.
8487 (fptan_extend<mode>xf4_i387): Remove insn pattern.
8488 (tanxf2): Update operands in the call to fptanxf4_i387.
8489 (tan<mode>2): Change operand 1 predicate to general_operand.
8490 Extend operand 1 to XFmode and generate tanxf3 insn.
8491 (atan2xf3): Rename from *fpatanxf3_i387.
8492 (fpatan_extend<mode>xf3_i387): Remove insn pattern.
8493 (atan2xf3): Remove expander.
8494 (atan2<mode<3): Change operand 1 and 2 predicates to general_operand.
8495 Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
8496 (atan<mode>2): Change operand 1 predicate to general_operand.
8497 Extend operand 1 to XFmode and generate atanxf3 insn.
8499 2018-09-10 Uros Bizjak <ubizjak@gmail.com>
8501 * config/i386/i386.md (x87/SSE constant load splitter): Use
8502 memory_operand instead of nonimmediate_operand for input operand
8505 2018-09-09 Uros Bizjak <ubizjak@gmail.com>
8507 * config/i386/i386.md (float partial SSE register stall splitter): Move
8508 splitter near its instruction pattern.
8509 (float_extend partial SSE register stall splitter): Ditto.
8510 (float_truncate partial SSE register stall splitter): Ditto.
8512 2018-09-09 Hans-Peter Nilsson <hp@bitrange.com>
8515 * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8516 to speculation_safe_value_not_needed.
8519 * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
8520 non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
8521 (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
8522 leaf_function_p, instead use has_hard_reg_initial_val.
8524 2018-09-09 Nathan Sidwell <nathan@acm.org>
8526 * gcc.h (pfatal_with_name): Don't declare here.
8527 * gcc.c (pfatal_with_name): Make static.
8529 2018-09-09 Xianmiao Qu <xianmiao_qu@c-sky.com>
8531 * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
8534 2018-09-08 John David Anglin <danglin@gcc.gnu.org>
8536 PR rtl-optimization/85458
8537 * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
8538 priority hook to reduce the priority of EXPR.
8540 2018-09-07 Uros Bizjak <ubizjak@gmail.com>
8542 * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
8543 DImode for x87 on 32bit targets. Conditionally disable x87 modes
8544 with X87_ENABLE_FLOAT. Remove preparation code.
8545 (*float<SWI48:mode><MODEF:mode>2): Rename from
8546 *float<SWI48:mode><MODEF:mode>2_mixed. Handle x87, SSE and mixed
8547 math using "enabled" attribute.
8548 (*floatdi<MODEF:mode>2_i387): Rename from
8549 *float<SWI48x:mode><MODEF:mode>2_i387. Handle only DImode and
8550 enable for 32bit targets only.
8551 (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
8553 (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
8554 as operand 1 predicate. Rewrite as define_insn_and_split.
8555 (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
8557 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8559 * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
8560 to fallthru to FLOAT case.
8562 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8565 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
8566 around folding of vec_sl to handle out of range shift values.
8568 2018-09-06 Uros Bizjak <ubizjak@gmail.com>
8570 * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
8571 Update callers to gen_fix_trunc<mode>_i387_fisttp
8572 (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
8573 nonimmediate_operand.
8574 (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
8575 and corresponding splitters.
8576 (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
8577 (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
8578 (fix_truncdi_i387_with_temp): Remove insn pattern
8579 and corresponding splitters.
8580 (fix_trunc<mode>_i387): Change operand 0 predicate to
8581 nonimmediate_operand.
8582 (fix_trunc<mode>_i387_with_temp): Remove insn pattern
8583 and corresponding splitters.
8584 (*fistdi2_1): Remove.
8586 (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
8587 (lrintxfdi2): Remove expander. Reimplement as define_insn.
8588 (*fist<mode>2_1): Remove.
8589 (fist<mode>2): Ditto.
8590 (fist<mode>2_with_temp): Remove insn pattern and corresponding
8592 (lrintxf<mode>2): Remove expander. Reimplement as define_insn.
8593 (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
8594 (fistdi2_<rounding>): Change operand 0 predicate to
8595 nonimmediate_operand.
8596 (fistdi2_<rounding>_with_temp): Remove insn pattern
8597 and corresponding splitters.
8598 (fist<mode>2_<rounding>): Change operand 0 predicate to
8599 nonimmediate_operand.
8600 (fist<mode>2_<rounding>_with_temp): Remove insn pattern
8601 and corresponding splitters.
8603 (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
8605 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
8607 * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
8610 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8612 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
8613 early gimple folding of vec_splat().
8614 * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
8615 * gimple-fold.h: Add an extern define for tree_vec_extract().
8617 2018-09-06 Will Schmidt <will_schmidt@vnet.ibm.com>
8619 * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
8620 wrappers around TREE_TYPE comparisons.
8622 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8625 * config/s390/predicates.md: Add nonsym_memory_operand.
8626 * config/s390/s390.c (s390_legitimize_cs_operand): If operand
8627 contains a SYMBOL_REF, load it into an intermediate pseudo.
8628 (s390_emit_compare_and_swap): Legitimize operand.
8629 * config/s390/s390.md: Use the new nonsym_memory_operand
8630 with UNSPECV_CAS patterns.
8632 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8635 * config/s390/s390-passes.def: New file.
8636 * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
8638 (make_pass_s390_early_mach): Add declaration.
8639 * config/s390/s390.c (make_pass_s390_early_mach):
8640 (s390_option_override): Remove dynamic registration.
8641 * config/s390/t-s390: Add s390-passes.def.
8643 2018-09-06 Ilya Leoshkevich <iii@linux.ibm.com>
8645 * config/s390/s390.c (s390_decompose_constant_pool_ref):
8646 Remove UNSPEC_LTREL_BASE check.
8647 (annotate_constant_pool_refs): Likewise.
8648 (find_constant_pool_ref): Likewise.
8649 (find_ltrel_base): Removed.
8650 (replace_ltrel_base): Removed.
8651 (s390_mainpool_finish): Remove replace_ltrel_base call.
8652 (s390_chunkify_start): Remove pending LTREL_BASE logic.
8653 (s390_chunkify_finish): Remove replace_ltrel_base call.
8654 * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
8656 2018-09-06 Hans-Peter Nilsson <hp@axis.com>
8659 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8660 to speculation_safe_value_not_needed.
8662 2018-09-05 Cesar Philippidis <cesar@codesourcery.com>
8663 Bernd Schmidt <bernds_cb1@t-online.de>
8665 * config/nvptx/nvptx-opts.h: New file.
8666 * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
8667 * config/nvptx/nvptx.h: Include "nvptx-opts.h".
8669 (TARGET_SM35): New macro.
8670 * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
8672 * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
8674 (misa=): New option.
8675 * doc/invoke.texi (Nvidia PTX Options): Document -misa.
8677 2018-09-05 Uros Bizjak <ubizjak@gmail.com>
8679 * config/i386/i386.md (truncdfsf2): Remove expander.
8680 (truncdfsf2_with_temp): Ditto.
8681 (truncxf<mode>2): Ditto.
8682 (*truncdfsf_fast_mixed): Remove insn pattern.
8683 (*truncdfsf_fast_i387): Ditto.
8684 (*truncdfsf_mixed): Ditto.
8685 (*truncdfsf_i387): Ditto.
8686 (*truncdfsf2_i387_1): Ditto.
8687 (*truncxfsf2_mixed): Ditto.
8688 (*truncxfdf2_mixed): Ditto.
8689 (*truncxf<mode>2_i387_noop): Ditto. Update callers
8690 to call gen_truncxf<mode>2 instead.
8691 (*truncxf<mode>2_i387): Remove.
8692 (reg->reg splitters): Remove splitter pattern.
8693 (reg->mem splitters): Ditto.
8695 (truncdfsf2): New insn pattern.
8696 (truncxf<mode>2): Ditto.
8698 2018-09-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8700 * tree-ssa-math-opts.c (is_mult_by): New function.
8701 (is_square_of): Use the above.
8702 (optimize_recip_sqrt): New function.
8703 (pass_cse_reciprocals::execute): Use the above.
8705 2018-09-05 Richard Biener <rguenther@suse.de>
8708 * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
8709 to zero-init the emplaced vec.
8711 2018-09-05 Martin Liska <mliska@suse.cz>
8713 PR tree-optimization/87205
8714 * tree-switch-conversion.c (pass_lower_switch::execute):
8715 Group cases for switch statements.
8717 2018-09-05 Richard Biener <rguenther@suse.de>
8719 PR tree-optimization/87217
8720 * tree-ssa-sccvn.c (vuse_valueize): New.
8721 (vn_reference_lookup_pieces): Use it.
8722 (vn_reference_lookup): Likewise.
8724 2018-09-05 Nathan Sidwell <nathan@acm.org>
8727 * stor-layout.c (place_field): Scan forwards to check last
8728 bitfield when ms_bitfield_placement is in effect.
8730 2018-09-05 Richard Biener <rguenther@suse.de>
8733 * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
8736 2018-09-05 Siddhesh Poyarekar <siddhesh@sourceware.org>
8737 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
8739 * config/aarch64/falkor-tag-collision-avoidance.c: New file.
8740 * config.gcc (extra_objs): Build it.
8741 * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
8743 * config/aarch64/aarch64-passes.def
8744 (pass_tag_collision_avoidance): New pass.
8745 * config/aarch64/aarch64.c (qdf24xx_tunings): Add
8746 AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
8747 (aarch64_classify_address): Remove static qualifier.
8748 (aarch64_address_info, aarch64_address_type): Move to...
8749 * config/aarch64/aarch64-protos.h: ... here.
8750 (make_pass_tag_collision_avoidance): New function.
8751 * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
8754 2018-09-05 Martin Liska <mliska@suse.cz>
8756 * doc/gcov.texi: Update documentation of humar
8758 * gcov.c (format_count): Print one decimal place, it provides
8759 more fine number of situations like '1G' vs. '1.4G'.
8761 2018-09-05 Martin Liska <mliska@suse.cz>
8764 * config/rs6000/rs6000.opt: Mark the option as Deprecated.
8765 * optc-gen.awk: Allow 'Var' for Deprecated options in order
8766 to generate a MASK value.
8768 2018-09-04 H.J. Lu <hongjiu.lu@intel.com>
8771 * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
8772 if frame pointer isn't used.
8773 (compute_frame_pointer_to_fb_displacement): Likewise.
8775 2018-09-04 Jakub Jelinek <jakub@redhat.com>
8778 * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
8779 OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
8780 OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
8781 (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
8782 and OPTION_MASK_ISA_XSAVEC_UNSET.
8784 2018-09-04 Max Filippov <jcmvbkbc@gmail.com>
8786 * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
8787 XOR operations in NAND case.
8789 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8791 * wide-int-range.cc (wide_int_range_convert): New.
8792 * wide-int-range.h (wide_int_range_convert): New.
8793 * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
8794 code into wide_int_range_convert.
8795 (extract_range_into_wide_ints): Do not munge anti range constants
8796 into the entire domain. Just return the range back.
8798 2018-09-04 Martin Liska <mliska@suse.cz>
8800 * genmatch.c (output_line_directive): Add new argument
8802 (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
8804 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8806 * doc/invoke.texi (Option Summary): Add whitespace.
8808 * doc/invoke.texi (Option Summary): Add -Waligned-new.
8810 2018-09-04 Richard Biener <rguenther@suse.de>
8812 PR tree-optimization/87211
8813 * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
8814 backedge value we're supposed to treat as VARYING also number
8815 the PHI to VARYING in case it got a different value-number already.
8817 2018-09-04 Aldy Hernandez <aldyh@redhat.com>
8819 * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
8820 (extract_range_from_binary_expr_1): Do not call
8821 vrp_can_optimize_bit_op.
8822 * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
8824 (wide_int_range_get_mask_and_bounds): New.
8825 (wide_int_range_optimize_bit_op): New.
8826 (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
8827 (wide_int_range_bit_and): Same.
8828 * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
8829 (wide_int_range_optimize_bit_op): New.
8830 (wide_int_range_get_mask_and_bounds): New.
8832 2018-09-04 Richard Biener <rguenther@suse.de>
8834 PR tree-optimization/87176
8835 * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
8836 variable. When value-numbering a virtual PHI node make sure
8837 to not value-number to the backedge value.
8839 2018-09-04 Jonathan Wakely <jwakely@redhat.com>
8841 * doc/extend.texi (Long Long, Hex Floats): Document support for
8842 long long and hex floats in more recent versions of ISO C++.
8844 2018-09-03 Richard Biener <rguenther@suse.de>
8846 PR tree-optimization/87177
8847 * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
8850 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8852 * bb-reorder.c (edge_order): Convert to C-qsort-style
8853 tri-state comparator.
8854 (reorder_basic_blocks_simple): Change std::stable_sort to
8857 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8859 * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
8860 tri-state comparator.
8861 (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
8863 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8865 * sort.cc (struct sort_ctx): New field 'nlim'. Use it...
8866 (mergesort): ... here as maximum count for using netsort.
8867 (gcc_qsort): Set nlim to 3 if stable sort is requested.
8868 (gcc_stablesort): New.
8869 * system.h (gcc_stablesort): Declare.
8871 2018-09-03 Alexander Monakov <amonakov@ispras.ru>
8873 * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
8874 * system.h (qsort): Always redirect to gcc_qsort. Update comment.
8875 * vec.c (qsort_chk): Do not call gcc_qsort. Update comment.
8877 2018-09-03 Segher Boessenkool <segher@kernel.crashing.org>
8879 * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
8880 lxsdx and stxsdx alternatives.
8881 (*mov<mode>_hardfloat64): Ditto.
8882 * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
8884 2018-09-03 Richard Biener <rguenther@suse.de>
8886 PR tree-optimization/87200
8887 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
8890 2018-09-03 Martin Liska <mliska@suse.cz>
8892 PR tree-optimization/87201
8893 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8894 Fix parenthesis in an expression.
8896 2018-09-03 Richard Biener <rguenther@suse.de>
8898 PR tree-optimization/87197
8899 * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
8900 visited. CSE the VN_INFO hashtable lookup.
8902 PR tree-optimization/87169
8903 * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
8904 iterating make sure there's no extra backedges from irreducible
8905 regions feeding the header. Mark the destination block
8908 2018-09-03 Martin Liska <mliska@suse.cz>
8911 * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
8912 * common/common-targhooks.c (default_get_valid_option_values):
8914 * common/common-targhooks.h (default_get_valid_option_values):
8916 * common/config/i386/i386-common.c: Move processor_target_table
8918 (ix86_get_valid_option_values): New function.
8919 (TARGET_GET_VALID_OPTION_VALUES): New macro.
8920 * config/i386/i386.c (struct ptt): Move to i386-common.c.
8921 (PTA_*): Move all defined masks into i386-common.c.
8922 (ix86_function_specific_restore): Use new processor_cost_table.
8923 * config/i386/i386.h (struct ptt): Moved from i386.c.
8924 (struct pta): Likewise.
8925 * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
8926 * doc/tm.texi.in: Likewise.
8927 * opt-suggestions.c (option_proposer::suggest_option):
8928 Pass prefix to build_option_suggestions.
8929 (option_proposer::get_completions): Likewise.
8930 (option_proposer::build_option_suggestions): Use the new target
8932 * opts.c (struct option_help_tuple): New struct.
8933 (print_filtered_help): Use the new target hook.
8935 2018-09-03 Martin Liska <mliska@suse.cz>
8938 * predict.c (set_even_probabilities): Add likely_edges
8939 argument and handle cases where we have precisely one
8941 (combine_predictions_for_bb): Catch also likely_edges.
8942 (tree_predict_by_opcode): Handle gswitch statements.
8943 * tree-cfg.h (find_case_label_for_value): New declaration.
8944 (find_taken_edge_switch_expr): Likewise.
8945 * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8946 Find pivot in decision tree based on probabily, not by number of
8949 2018-09-02 Gerald Pfeifer <gerald@pfeifer.com>
8951 * doc/standards.texi (Standards): Update Objective-C reference.
8953 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8955 * doc/install.texi (Prerequisites): Update link for MPC.
8957 2018-09-01 Michael Matz <matz@suse.de>
8959 PR tree-optimization/87074
8960 * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
8961 PHIs for outer-loop uses.
8963 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8965 * doc/generic.texi (OpenMP): Adjust link to openmp.org.
8966 * doc/invoke.texi (C Dialect Options): Ditto.
8968 2018-09-01 Gerald Pfeifer <gerald@pfeifer.com>
8970 * doc/install.texi (Prerequisites): Adjust link mpfr.org.
8972 2018-08-31 Richard Biener <rguenther@suse.de>
8974 PR tree-optimization/87168
8975 * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
8976 (rpo_elim::eliminate_avail): When OP was not visited it must
8979 2018-08-31 David Malcolm <dmalcolm@redhat.com>
8981 * tree-vrp.c (copy_value_range): Convert param "from" from
8982 "value_range *" to "const value_range *".
8983 (range_is_null): Likewise for param "vr".
8984 (range_int_cst_p): Likewise.
8985 (range_int_cst_singleton_p): Likewise.
8986 (symbolic_range_p): Likewise.
8987 (value_ranges_intersect_p): Likewise for both params.
8988 (value_range_nonnegative_p): Likewise for param "vr".
8989 (value_range_constant_singleton): Likewise.
8990 (vrp_set_zero_nonzero_bits): Likewise for param "ar".
8991 (extract_range_into_wide_ints): Likewise for param "vr".
8992 (extract_range_from_multiplicative_op): Likewise for params "vr0"
8994 (vrp_can_optimize_bit_op): Likewise.
8995 (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
8997 (extract_range_from_unary_expr): Likewise.
8998 (debug_value_range): Likewise for param "vr".
8999 (value_range::dump): Add "const" qualifier.
9000 (vrp_prop::check_array_ref): Convert local "vr" from
9001 "value_range *" to "const value_range *".
9002 (vrp_prop::check_mem_ref): Likewise.
9003 (vrp_prop::visit_stmt): Likewise for local "old_vr".
9004 (vrp_intersect_ranges_1): Likewise for param "vr_1".
9005 (vrp_intersect_ranges): Likewise.
9006 (simplify_stmt_for_jump_threading): Likewise for local "vr".
9007 (vrp_prop::vrp_finalize): Likewise.
9008 * tree-vrp.h (value_range::dump): Add "const" qualifier.
9009 (vrp_intersect_ranges): Add "const" qualifier to params as above.
9010 (extract_range_from_unary_expr): Likewise.
9011 (value_range_constant_singleton): Likewise.
9012 (symbolic_range_p): Likewise.
9013 (copy_value_range): Likewise.
9014 (extract_range_from_binary_expr_1): Likewise.
9015 (range_int_cst_p): Likewise.
9016 (vrp_set_zero_nonzero_bits): Likewise.
9017 (range_int_cst_singleton_p): Likewise.
9019 2018-08-31 Vlad Lazar <vlad.lazar@arm.com>
9021 * config/aarch64/arm_neon.h (vabsd_s64): New.
9022 (vnegd_s64): Likewise.
9024 2018-08-31 Martin Jambor <mjambor@suse.cz>
9026 * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
9028 2018-08-31 Martin Liska <mliska@suse.cz>
9030 * ipa-icf.c (sem_item::add_type): Use
9031 sem_item::m_type_hash_cache.
9032 * ipa-icf.h: Move the cache from sem_item_optimizer
9035 2018-08-31 Nathan Sidwell <nathan@acm.org>
9037 * doc/extend.texi (Backwards Compatibility): Remove implicit
9038 extern C leeway of () being (...).
9040 2018-08-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9042 * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
9044 2018-08-31 Segher Boessenkool <segher@kernel.crashing.org>
9048 * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
9050 2018-08-31 Jakub Jelinek <jakub@redhat.com>
9053 * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
9054 gen_int_mode. Formatting fixes.
9056 2018-08-30 Sandra Loosemore <sandra@codesourcery.com>
9058 * target.def (custom_function_descriptors): Improve documentation.
9059 * doc/tm.texi.in (Trampolines): Expand discussion of function
9060 descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
9061 beginning of the section.
9062 * doc/tm.texi: Regenerated.
9064 2018-08-30 Jose E. Marchesi <jose.marchesi@oracle.com>
9066 * cfg.h (class auto_edge_flag): Spell out the template-id of the
9067 base class in the initializer list. This is a workaround for
9068 building with older GCC.
9069 (class auto_bb_flag): Likewise.
9071 2018-08-30 Aaron Sawdey <acsawdey@linux.ibm.com>
9073 * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
9074 (altivec_vcmpequ<VI_char>_p): Remove star.
9075 * config/rs6000/rs6000-string.c (do_load_for_compare): Support
9077 (expand_strncmp_vec_sequence): New function.
9078 (emit_final_str_compare_vec): New function.
9079 (expand_strn_compare): Add support for vector strncmp.
9080 * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
9081 length specification to bytes.
9082 * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
9083 (vcmpnezb_p): New pattern.
9084 * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
9085 for option -mstring-compare-inline-limit.
9087 2018-08-30 Thiago Macieira <thiago.macieira@intel.com>
9089 * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
9090 (PTA_SKYLAKE): Add PTA_AES.
9091 (PTA_GOLDMONT): Likewise.
9093 2018-08-29 Jan Hubicka <jh@suse.cz>
9096 * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
9097 * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
9099 2018-08-29 Jan Hubicka <jh@suse.cz>
9101 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
9103 (hash_tree): Do not visit TYPE_STUB_DECL.
9104 * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
9105 stream TYPE_STUB_DECL.
9106 * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
9107 * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
9108 after free_lang_data.
9109 (type_in_anonymous_namespace_p): Likewise.
9111 2018-08-29 Jan Hubicka <jh@suse.cz>
9113 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9114 comment that it has to be even number.
9115 (class sreal): Change m_sig type to int32_t.
9116 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9117 int64_t for temporary calculations.
9118 (sreal_verify_basics): Drop one bit from minimum and maximum.
9120 2018-08-30 Richard Biener <rguenther@suse.de>
9122 PR tree-optimization/87147
9123 * tree-ssa-sccvn.c (SSA_VISITED): New function.
9124 (visit_phi): When the degenerate result is from the backedge and
9125 we didn't visit its definition yet drop to VARYING.
9126 (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
9128 2018-08-29 Jan Hubicka <jh@suse.cz>
9130 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
9132 (hash_tree): Likewise.
9134 2018-08-29 Jan Hubicka <jh@suse.cz>
9136 * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
9137 and TYPE_NEXT_REF_TO.
9139 2018-08-29 Jan Hubicka <jh@suse.cz>
9141 * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
9142 comment that it has to be even number.
9143 (class sreal): Change m_sig type to int32_t.
9144 * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
9145 int64_t for temporary calculations.
9146 (sreal_verify_basics): Drop one bit from minimum and maximum.
9148 2018-08-30 Tamar Christina <tamar.christina@arm.com>
9150 * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
9152 2018-08-30 Vlad Lazar <vlad.lazar@arm.com>
9155 * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
9156 if to_add is negative.
9158 2018-08-29 Bernd Edlinger <bernd.edlinger@hotmail.de>
9161 * builtins.c (c_strlen): Improve range checks.
9163 2018-08-29 Martin Sebor <msebor@redhat.com>
9164 Jeff Law <law@redhat.com>
9166 PR tree-optimization/86714
9167 PR tree-optimization/86711
9168 * builtins.c (c_strlen): Add arguments to call to string_constant.
9169 * expr.c (string_constant): Add argument. Detect missing nul
9170 terminator and outermost declaration it's missing in.
9171 * expr.h (string_constant): Add argument.
9172 * fold-const.c (read_from_constant_string): Add arguments to call to
9174 (c_getstr): Likewise.
9175 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9177 * tree-ssa-strlen.c (get_stridx): Likewise.
9179 2018-08-29 Jan Hubicka <jh@suse.cz>
9181 * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
9182 Do not stream DECL_VINDEX.
9183 * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
9184 * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
9185 (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
9187 2018-08-29 Richard Biener <rguenther@suse.de>
9189 * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
9190 virtual operands that are not default defs to honor region
9192 (rpo_vn_valueize): Remove ineffective code here.
9194 2018-08-29 Richard Biener <rguenther@suse.de>
9196 PR tree-optimization/87132
9197 * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
9198 when skipping defs reachable over backedges.
9200 2018-08-29 Richard Biener <rguenther@suse.de>
9202 * tree-core.h: Document use of deprecated_flag in SSA_NAME.
9203 * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
9204 * tree-into-ssa.c (pass_build_ssa::execute): Initialize
9205 function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
9206 * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
9207 (vn_reference_lookup_3): Remove use of const_parms.
9208 (free_rpo_vn): Do not free const_parms.
9209 (do_rpo_vn): Do not call init_const_parms.
9210 * tree-ssa-alias.c (refs_may_alias_p_1): Honor
9211 SSA_NAME_POINTS_TO_READONLY_MEMORY.
9212 (call_may_clobber_ref_p_1): Likewise.
9214 2018-08-29 Alexander Monakov <amonakov@ispras.ru>
9217 * invoke.texi (Optimization Options): List -ftree-scev-cprop.
9219 (-ftree-scev-cprop): Document.
9221 2018-08-29 Jan Hubicka <jh@suse.cz>
9223 * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
9225 (sreal constructor): Update.
9226 * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
9227 sreal:operator/): Update.
9229 2018-08-29 Martin Liska <mliska@suse.cz>
9231 * tree-switch-conversion.c (switch_conversion::expand):
9232 Strenghten assumption about gswitch statements.
9234 2018-08-29 Richard Biener <rguenther@suse.de>
9236 PR tree-optimization/87117
9237 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
9238 re-value-number released SSA VDEFs.
9240 2018-08-29 Richard Biener <rguenther@suse.de>
9242 PR tree-optimization/87126
9243 * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
9245 2018-08-28 Jim Wilson <jimw@sifive.com>
9247 * config/riscv/pic.md: Rewrite.
9248 * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
9250 * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
9251 (SOFTF, default_load, softload, softstore): New.
9253 2018-08-28 Jeff Law <law@redhat.com>
9255 * fold-const.c (fold_binary_loc): Remove recently added assert.
9257 2018-08-28 Joern Rennecke <joern.rennecke@riscy-ip.com>
9259 * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
9260 to OP parmeter of generated function.
9262 2018-08-28 MCC CS <deswurstes@users.noreply.github.com>
9264 PR tree-optimization/87009
9265 * match.pd: Add boolean optimizations.
9267 2018-08-28 Martin Sebor <msebor@redhat.com>
9270 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
9271 * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
9272 (pass_walloca::gate): Use it.
9273 (alloca_call_type): Same.
9274 (pass_walloca::execute): Same.
9275 * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
9277 2018-08-28 David Malcolm <dmalcolm@redhat.com>
9279 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
9280 GCC_VERSION for usage of "__gcc_dump_printf__" format from
9283 2018-08-28 Richard Biener <rguenther@suse.de>
9285 PR tree-optimization/87124
9286 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
9287 constants before looking up avail.
9289 2018-08-28 Jakub Jelinek <jakub@redhat.com>
9292 * calls.c (maybe_warn_nonstring_arg): Punt early if
9293 warn_stringop_overflow is zero. Don't call get_range_strlen
9294 on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
9295 Swap comparison operands to have constants on rhs. Only use
9296 lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly
9297 increment lenrng[0].
9299 2018-08-28 Richard Sandiford <richard.sandiford@arm.com>
9301 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
9302 use of tree_to_shwi. Remove duplicated test for the size being
9303 a whole number of bytes.
9305 2018-08-28 Richard Biener <rguenther@suse.de>
9307 PR tree-optimization/87117
9308 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
9309 Handle removed stmt without LHS (GIMPLE_NOP).
9311 2018-08-28 Richard Biener <rguenther@suse.de>
9313 PR tree-optimization/87117
9314 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
9315 void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
9317 2018-08-28 Richard Biener <rguenther@suse.de>
9319 PR tree-optimization/87117
9320 * tree-ssa-pre.c (compute_avail): Do not make expressions
9321 with predicated values available.
9322 (get_expr_value_id): Assert we do not run into predicated value
9325 2018-08-28 Richard Biener <rguenther@suse.de>
9327 PR tree-optimization/87117
9328 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
9329 get virtual operands.
9330 (get_expr_operands): Handle STRING_CST like other decls.
9332 2018-08-28 Martin Liska <mliska@suse.cz>
9334 * tree.h: Update documentation of fndecl_built_in_p
9338 2018-08-27 Jeff Law <law@redhat.com>
9339 PR tree-optimization/87110
9340 * tree-ssa-dse.c (compute_trims): Handle non-constant
9343 2018-08-27 Martin Sebor <msebor@redhat.com>
9345 PR tree-optimization/86914
9346 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
9348 2018-08-27 Martin Sebor <msebor@redhat.com>
9350 PR tree-optimization/87112
9351 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
9352 the type of the bound argument.
9354 2018-08-27 Jeff Law <law@redhat.com>
9356 * tree-ssa-dse.c (compute_trims): Handle case where the reference's
9357 type does not have a TYPE_SIZE_UNIT.
9359 2018-08-27 Steve Ellcey <sellcey@cavium.com>
9361 * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
9362 with include of backend.h.
9364 2018-08-27 Richard Biener <rguenther@suse.de>
9366 PR tree-optimization/86927
9367 * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
9368 use const cond reduction code.
9370 2018-08-27 Alexander Monakov <amonakov@ispras.ru>
9372 PR tree-optimization/85758
9373 * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
9375 2018-08-27 David Malcolm <dmalcolm@redhat.com>
9378 * diagnostic-show-locus.c (class layout_range): Update for
9379 conversion of show_caret_p to a tri-state.
9380 (layout_range::layout_range): Likewise.
9381 (make_range): Likewise.
9382 (layout::maybe_add_location_range): Likewise.
9383 (layout::should_print_annotation_line_p): Don't show annotation
9384 lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
9385 (layout::get_state_at_point): Update for conversion of
9386 show_caret_p to a tri-state. Bail out early for
9387 SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
9388 underlining or source colorization.
9389 (gcc_rich_location::add_location_if_nearby): Update for conversion
9390 of show_caret_p to a tri-state.
9391 (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
9392 (selftest::test_one_liner_fixit_replace_equal_secondary_range):
9394 (selftest::test_one_liner_labels): Likewise.
9395 * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
9396 conversion of show_caret_p to a tri-state.
9397 * pretty-print.c (text_info::set_location): Likewise.
9398 * pretty-print.h (text_info::set_location): Likewise.
9399 * substring-locations.c (format_warning_n_va): Likewise.
9400 * tree-diagnostic.c (default_tree_printer): Likewise.
9401 * tree-pretty-print.c (newline_and_indent): Likewise.
9403 2018-08-27 David Malcolm <dmalcolm@redhat.com>
9406 * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
9407 line above for line-insertion fix-it hints.
9408 (selftest::test_fixit_insert_containing_newline): Update the
9409 expected results, and add a test with line-numbering enabled.
9411 2018-08-27 Martin Liska <mliska@suse.cz>
9414 * sanopt.c (sanitize_rewrite_addressable_params): Ignore
9415 params with DECL_HAS_VALUE_EXPR_P.
9417 2018-08-27 Martin Liska <mliska@suse.cz>
9419 * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
9420 selected expansion strategy.
9422 2018-08-27 Martin Liska <mliska@suse.cz>
9424 * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
9425 * builtins.c (is_builtin_fn): Likewise.
9426 * attribs.c (diag_attr_exclusions): Use new function
9427 fndecl_built_in_p and remove check for FUNCTION_DECL if
9429 (builtin_mathfn_code): Likewise.
9430 (fold_builtin_expect): Likewise.
9431 (fold_call_expr): Likewise.
9432 (fold_builtin_call_array): Likewise.
9433 (fold_call_stmt): Likewise.
9434 (set_builtin_user_assembler_name): Likewise.
9435 (is_simple_builtin): Likewise.
9436 * calls.c (gimple_alloca_call_p): Likewise.
9437 (maybe_warn_nonstring_arg): Likewise.
9438 * cfgexpand.c (expand_call_stmt): Likewise.
9439 * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
9440 (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
9441 (cgraph_node::verify_node): Likewise.
9442 * cgraphclones.c (build_function_decl_skip_args): Likewise.
9443 (cgraph_node::create_clone): Likewise.
9444 * config/arm/arm.c (arm_insert_attributes): Likewise.
9445 * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
9446 * dse.c (scan_insn): Likewise.
9447 * expr.c (expand_expr_real_1): Likewise.
9448 * fold-const.c (operand_equal_p): Likewise.
9449 (fold_binary_loc): Likewise.
9450 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
9451 * gimple-low.c (lower_stmt): Likewise.
9452 * gimple-pretty-print.c (dump_gimple_call): Likewise.
9453 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
9455 * gimple.c (gimple_build_call_from_tree): Likewise.
9456 (gimple_call_builtin_p): Likewise.
9457 (gimple_call_combined_fn): Likewise.
9458 * gimplify.c (gimplify_call_expr): Likewise.
9459 (gimple_boolify): Likewise.
9460 (gimplify_modify_expr): Likewise.
9461 (gimplify_addr_expr): Likewise.
9462 * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
9463 * ipa-cp.c (determine_versionability): Likewise.
9464 * ipa-fnsummary.c (compute_fn_summary): Likewise.
9465 * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
9466 * ipa-split.c (visit_bb): Likewise.
9467 (split_function): Likewise.
9468 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9469 * lto-cgraph.c (input_node): Likewise.
9470 * lto-streamer-out.c (write_symbol): Likewise.
9471 * omp-low.c (setjmp_or_longjmp_p): Likewise.
9472 (lower_omp_1): Likewise.
9473 * predict.c (strip_predict_hints): Likewise.
9474 * print-tree.c (print_node): Likewise.
9475 * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
9476 * trans-mem.c (is_tm_irrevocable): Likewise.
9477 (is_tm_load): Likewise.
9478 (is_tm_simple_load): Likewise.
9479 (is_tm_store): Likewise.
9480 (is_tm_simple_store): Likewise.
9481 (is_tm_abort): Likewise.
9482 (tm_region_init_1): Likewise.
9483 * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
9484 * tree-cfg.c (verify_gimple_call): Likewise.
9485 (move_stmt_r): Likewise.
9486 (stmt_can_terminate_bb_p): Likewise.
9487 * tree-eh.c (lower_eh_constructs_2): Likewise.
9488 * tree-if-conv.c (if_convertible_stmt_p): Likewise.
9489 * tree-inline.c (remap_gimple_stmt): Likewise.
9490 (copy_bb): Likewise.
9491 (estimate_num_insns): Likewise.
9492 (fold_marked_statements): Likewise.
9493 * tree-sra.c (scan_function): Likewise.
9494 * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
9495 (optimize_stack_restore): Likewise.
9496 (pass_fold_builtins::execute): Likewise.
9497 * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9498 (mark_all_reaching_defs_necessary_1): Likewise.
9499 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
9500 * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9501 (pass_forwprop::execute): Likewise.
9502 * tree-ssa-loop-im.c (stmt_cost): Likewise.
9503 * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
9504 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
9505 * tree-ssa-strlen.c (get_string_length): Likewise.
9506 * tree-ssa-structalias.c (handle_lhs_call): Likewise.
9507 (find_func_aliases_for_call): Likewise.
9508 * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
9509 * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
9510 * tree-tailcall.c (find_tail_calls): Likewise.
9511 * tree.c (need_assembler_name_p): Likewise.
9512 (free_lang_data_in_decl): Likewise.
9513 (get_call_combined_fn): Likewise.
9514 * ubsan.c (is_ubsan_builtin_p): Likewise.
9515 * varasm.c (incorporeal_function_p): Likewise.
9516 * tree.h (DECL_BUILT_IN): Remove and replace with
9518 (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
9519 (fndecl_built_in_p): New.
9521 2018-08-27 Martin Liska <mliska@suse.cz>
9523 PR tree-optimization/86847
9524 * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
9525 Dump also subtree probability.
9526 (switch_decision_tree::do_jump_if_equal): New function.
9527 (switch_decision_tree::emit_case_nodes): Handle special
9528 situations in balanced tree that can be emitted much simpler.
9529 Fix calculation of probabilities that happen in tree expansion.
9530 * tree-switch-conversion.h (struct cluster): Add
9532 (struct simple_cluster): Likewise.
9533 (struct case_tree_node): Add new function has_child.
9534 (do_jump_if_equal): New.
9536 2018-08-27 Martin Liska <mliska@suse.cz>
9538 * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
9539 Add new argument to bit_test_cluster constructor.
9540 (bit_test_cluster::emit): Set bits really number of values
9542 (bit_test_cluster::hoist_edge_and_branch_if_true): Add
9543 probability argument.
9544 * tree-switch-conversion.h (struct bit_test_cluster):
9545 Add m_handles_entire_switch.
9547 2018-08-27 Martin Liska <mliska@suse.cz>
9549 PR tree-optimization/86702
9550 * tree-switch-conversion.c (jump_table_cluster::emit):
9551 Make probabilities even for values in jump table
9552 according to number of cases handled.
9553 (switch_decision_tree::compute_cases_per_edge): Pass
9554 argument to reset_out_edges_aux function.
9555 (switch_decision_tree::analyze_switch_statement): Likewise.
9556 * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
9559 2018-08-27 Martin Liska <mliska@suse.cz>
9561 * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
9562 cfun argument explicitly.
9563 * gimple-pretty-print.c (dump_gimple_switch): Likewise.
9564 * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
9565 function gimple_switch_default_bb.
9566 (convert_switch_statements):
9568 * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
9569 * stmt.c (label_to_block_fn): Use label_to_block and pass
9570 cfun argument explicitly and use gimple_switch_label_bb.
9571 (expand_case): Likewise.
9572 * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
9573 cfun argument explicitly. Likewise.
9574 (make_edges_bb): Likewise.
9575 (make_cond_expr_edges): Likewise.
9576 (get_cases_for_edge): Likewise.
9577 (make_gimple_switch_edges): Likewise.
9578 (label_to_block_fn): Likewise.
9579 (label_to_block): Likewise.
9580 (make_goto_expr_edges): Likewise.
9581 (make_gimple_asm_edges): Likewise.
9582 (main_block_label): Likewise.
9583 (group_case_labels_stmt): Likewise.
9584 (find_taken_edge_computed_goto): Likewise.
9585 (find_taken_edge_switch_expr): Likewise.
9586 (gimple_verify_flow_info): Likewise.
9587 (gimple_redirect_edge_and_branch): Likewise.
9588 (gimple_switch_label_bb): New function.
9589 (gimple_switch_default_bb): Likewise.
9590 (gimple_switch_edge): Likewise.
9591 (gimple_switch_default_edge): Likewise.
9592 * tree-cfg.h (label_to_block_fn): Remove and replace ...
9593 (label_to_block): ... with this.
9594 (gimple_switch_label_bb): New.
9595 (gimple_switch_default_bb): Likewise.
9596 (gimple_switch_edge): Likewise.
9597 (gimple_switch_default_edge): Likewise.
9598 * tree-cfgcleanup.c (convert_single_case_switch): Use
9599 new gimple functions and pass new argument to label_to_block.
9600 (cleanup_control_flow_bb):
9601 * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
9602 cfun argument explicitly.
9603 (make_eh_edges): Likewise.
9604 (redirect_eh_dispatch_edge): Likewise.
9605 (lower_resx): Likewise.
9606 (lower_eh_dispatch): Likewise.
9607 (maybe_remove_unreachable_handlers): Likewise.
9608 (unsplit_eh): Likewise.
9609 (cleanup_empty_eh): Likewise.
9610 (verify_eh_edges): Likewise.
9611 (verify_eh_dispatch_edge): Likewise.
9612 * tree-ssa-dom.c (record_edge_info): Likewise.
9613 * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
9614 * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
9615 (thread_through_normal_block): Likewise.
9616 * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
9617 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
9618 * tree-switch-conversion.c (switch_conversion::collect): Use new
9620 (switch_conversion::check_final_bb): Likewise.
9621 (switch_conversion::gather_default_values): Pass new argument
9623 (switch_conversion::build_constructors): Likewise.
9624 (switch_decision_tree::compute_cases_per_edge): Use new
9625 gimple_switch_edge function.
9626 (switch_decision_tree::analyze_switch_statement): Pass new argument
9628 (switch_decision_tree::try_switch_expansion): Use
9629 gimple_switch_default_edge.
9630 * tree-vrp.c (find_switch_asserts): Pass new argument
9632 * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
9633 (vr_values::simplify_switch_using_ranges): Likewise.
9635 2018-08-27 Richard Biener <rguenther@suse.de>
9637 * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
9638 * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
9640 * tree-ssa-sccvn.h (struct vn_pval): New structure.
9641 (struct vn_nary_op_s): Add unwind_to member. Add
9642 predicated_values flag and put result into a union together
9643 with a linked list of vn_pval.
9644 (struct vn_ssa_aux): Add name member to make maintaining
9645 a map of SSA name to vn_ssa_aux possible. Remove no longer
9646 needed info, dfsnum, low, visited, on_sccstack, use_processed
9647 and range_info_anti_range_p members.
9648 (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
9649 (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
9651 (vn_valueize): New global.
9652 (vn_context_bb): Likewise.
9653 (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
9654 VN_INFO_PTR_INFO): Remove.
9655 * tree-ssa-sccvn.c: ... (rewrite)
9656 (pass_fre::execute): For -O2+ initialize loops and run
9657 RPO VN in optimistic mode (iterating). For -O1 and -Og
9658 run RPO VN in non-optimistic mode.
9659 * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
9660 (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
9661 * doc/invoke.texi (sccvn-max-scc-size): Remove.
9662 (rpo-vn-max-loop-depth): Document.
9663 * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
9664 when valuezing the VUSE signals we walked out of the region.
9665 * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
9666 (phi_translate): Set VN context block to use for availability
9668 (compute_avail): Likewise.
9669 (pre_valueize): New function.
9670 (pass_pre::execute): Adjust to the RPO VN API.
9672 * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
9673 (propagate_constants_for_unrolling): Remove.
9674 (tree_unroll_loops_completely): Perform value-numbering
9675 on the unrolled bodies loop parent.
9677 2018-08-27 Richard Biener <rguenther@suse.de>
9679 * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
9680 for partial antic compute.
9682 2018-08-27 Jakub Jelinek <jakub@redhat.com>
9684 PR rtl-optimization/87065
9685 * combine.c (simplify_if_then_else): Formatting fix.
9686 (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
9688 (known_cond): Don't return const_true_rtx for vector modes. Use
9689 CONST0_RTX instead of const0_rtx. Formatting fixes.
9691 2018-08-27 Martin Liska <mliska@suse.cz>
9693 PR gcov-profile/87069
9694 * gcov.c (process_file): Record files already processed
9695 and warn about a file being processed multiple times.
9697 2018-08-27 Martin Liska <mliska@suse.cz>
9700 * config/aarch64/aarch64.c (aarch64_override_options_internal):
9701 Set default values for x_aarch64_*_string strings.
9702 * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
9703 prefix. For -mabi do not print '=ABI' in help and use
9704 <option_value> format for -msve-vector-bits and -moverride
9707 2018-08-26 Jeff Law <law@redhat.com>
9709 * config/mips/frame-header-opt.c: Include "backend.h" rather than
9712 2018-08-26 Marek Polacek <polacek@redhat.com>
9714 PR c++/87029, Implement -Wredundant-move.
9715 * doc/invoke.texi: Document -Wredundant-move.
9717 2018-08-25 Martin Sebor <msebor@redhat.com>
9719 PR tree-optimization/87059
9720 * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
9721 to the same type as the other.
9722 * fold-const.c (fold_binary_loc): Assert expectation.
9724 2018-08-25 Iain Sandoe <iain@sandoe.co.uk>
9726 * config/darwin.c (machopic_legitimize_pic_address): Clean up
9727 extraneous parentheses, dead code section and formatting.
9729 2018-08-24 David Malcolm <dmalcolm@redhat.com>
9732 * diagnostic-show-locus.c (layout::layout): Ensure the margin is
9733 wide enough for jumps in the line-numbering to be visible.
9734 (layout::print_gap_in_line_numbering): New member function.
9735 (layout::calculate_line_spans): When using line numbering, merge
9736 line spans that are only 1 line apart.
9737 (diagnostic_show_locus): When printing line numbers, show gaps in
9738 line numbering directly, rather than printing headers.
9739 (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
9740 line-numbering with multiple line spans.
9741 (selftest::test_fixit_insert_containing_newline_2): Add test of
9742 line-numbering, in which the spans are close enough to be merged.
9744 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9746 * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
9747 to range_includes_zero_p. Do not special case VR_ANTI_RANGE.
9748 * tree-vrp.c (range_is_nonnull): Remove.
9749 (range_includes_zero_p): Accept value_range instead of min/max.
9750 (extract_range_from_binary_expr_1): Do not early bail on
9752 Use range_includes_zero_p instead of range_is_nonnull.
9753 (extract_range_from_unary_expr): Use range_includes_zero_p instead
9754 of range_is_nonnull.
9755 (vrp_meet_1): Pass value_range to range_includes_zero_p. Do not
9756 special case VR_ANTI_RANGE.
9757 (vrp_finalize): Same.
9758 * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
9760 (range_is_nonnull): Remove.
9761 * vr-values.c (vrp_stmt_computes_nonzero): Use
9762 range_includes_zero_p instead of range_is_nonnull.
9763 (extract_range_basic): Pass value_range to range_includes_zero_p
9764 instead of range_is_nonnull.
9766 2018-08-24 Uros Bizjak <ubizjak@gmail.com>
9768 * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
9769 * emit-rtl.h (rtl_data): Remove return_bnd.
9770 * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
9771 * function.c (diddle_return_value): Do not handle crtl->return_bnd.
9772 * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
9773 (POINTER_BOUNDS_MODE): Remove definition.
9774 (make_pointer_bounds_mode): Remove.
9775 (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
9776 * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
9777 (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
9778 * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
9779 * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
9780 * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
9781 * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
9783 * config/i386/i386-modes.def (BND32, BND64): Remove.
9784 * config/i386/i386.c (dbx_register_map): Remove bound registers.
9785 (dbx64_register_map): Ditto.
9786 (svr4_dbx_register_map): Ditto.
9787 (indirect_thunk_bnd_needed): Remove.
9788 (indirect_thunks_bnd_used): Ditto.
9789 (indirect_return_bnd_needed): Ditto.
9790 (indirect_return_via_cx_bnd): Ditto.
9791 (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
9792 (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
9793 (output_indirect_thunk): Ditto. Remove need_prefix argument.
9794 (output_indirect_thunk_function): Remove handling of
9795 indirect_return_bnd_needed, indirect_return_via_cx_bnd,
9796 indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
9797 (ix86_save_reg): Remove handling of crtl->return_bnd.
9798 (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
9799 (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
9800 and UNSPEC_BNDLX_ADDR.
9801 (ix86_output_indirect_branch_via_reg): Remove handling of
9802 indirect_thunk_prefix_bnd.
9803 (ix86_output_indirect_branch_via_push): Ditto.
9804 (ix86_output_function_return): Ditto.
9805 (ix86_output_indirect_function_return): Ditto.
9806 (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
9807 * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
9808 (CALL_USED_REGISTERS): Ditto.
9809 (REG_ALLOC_ORDER): Update for removal of bound registers.
9810 (HI_REGISTER_NAMES): Ditto.
9811 * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
9812 (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
9813 (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
9814 (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
9815 (FIRST_PSEUDO_REG): Update.
9816 (BND): Remove mode iterator.
9817 * config/i386/predicates.md (bnd_mem_operator): Remove.
9819 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9821 * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
9824 2018-08-24 Richard Sandiford <richard.sandiford@arm.com>
9826 * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
9827 the case in which the permute needs only a single element and
9828 repeats for every vector of the result. Extend that case to
9829 handle variable-length vectors.
9830 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9832 2018-08-24 H.J. Lu <hongjiu.lu@intel.com>
9835 * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
9836 on DW_MACINFO_start_file for -gsplit-dwarf -g3.
9838 2018-08-24 Richard Biener <rguenther@suse.de>
9840 * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
9841 bb_flags_allocated members.
9842 (auto_flag): New RAII class for allocating flags.
9843 (auto_edge_flag): New RAII class for allocating edge flags.
9844 (auto_bb_flag): New RAII class for allocating bb flags.
9845 * cfgloop.c (verify_loop_structure): Allocate temporary edge
9847 * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
9848 in favor of temporarily allocated BB flag.
9849 * hsa-brig.c: Re-order includes.
9850 * hsa-dump.c: Likewise.
9851 * hsa-regalloc.c: Likewise.
9852 * print-rtl.c: Likewise.
9853 * profile-count.c: Likewise.
9855 2018-08-24 Segher Boessenkool <segher@kernel.crashing.org>
9858 * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
9861 2018-08-24 Aldy Hernandez <aldyh@redhat.com>
9864 * wide-int-range.cc (wide_int_range_div): Do not ignore result
9865 from wide_int_range_multiplicative_op.
9867 2018-08-23 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
9869 * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
9872 2018-08-23 Giuliano Belinassi <giuliano.belinassi@usp.br>
9874 * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
9877 2018-08-23 Alexander Monakov <amonakov@ispras.ru>
9879 * tree-scalar-evolution.c (final_value_replacement_loop): Dump
9880 full GENERIC expression used for replacement.
9882 2018-08-23 Aldy Hernandez <aldyh@redhat.com>
9884 * tree-vrp.c (abs_extent_range): Remove.
9885 (extract_range_into_wide_ints): Pass wide ints by reference.
9886 (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
9887 Pass wide ints by reference in all calls to
9888 extract_range_into_wide_ints.
9889 * wide-int-range.cc (wide_int_range_div): New.
9890 * wide-int-range.h (wide_int_range_div): New.
9891 (wide_int_range_includes_zero_p): New.
9892 (wide_int_range_zero_p): New.
9894 2018-08-23 Matthew Malcomson <matthew.malcomson@arm.com>
9896 * config/aarch64/aarch64.md (arches): New enum.
9897 (arch): New enum attr.
9898 (arch_enabled): New attr.
9899 (enabled): Now uses arch_enabled only.
9900 (simd, sve, fp16): Removed attribute.
9901 (fp): Attr now defined in terms of 'arch'.
9902 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
9903 *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
9904 <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
9905 <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
9906 attributes into 'arch'.
9907 (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
9908 subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
9909 *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
9910 *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
9911 *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
9912 'simd' attribute into 'arch'.
9913 (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
9914 store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
9915 Convert use of 'fp' attribute to 'arch'.
9916 * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
9917 move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
9919 (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
9920 (different modes) Merge 'fp' and 'simd' into 'arch'.
9921 (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
9924 2018-08-23 Segher Boessenkool <segher@kernel.crashing.org>
9926 PR rtl-optimization/87026
9927 * expmed.c (canonicalize_comparison): If we can no longer create
9928 pseudoregisters, don't.
9930 2018-08-23 Richard Earnshaw <rearnsha@arm.com>
9933 * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
9935 * config/arm/arm.c (speculation_barrier_libfunc): New static
9937 (arm_init_libfuncs): Initialize it.
9938 (arm_emit_speculation_barrier): New function.
9939 * config/arm/arm.md (speculation_barrier): Call
9940 arm_emit_speculation_barrier for architectures that do not have
9942 (speculation_barrier_insn): Only match on Armv7 or later.
9944 2018-08-23 Richard Biener <rguenther@suse.de>
9947 * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
9950 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9952 * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
9953 of single-vector TBLs.
9954 (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
9957 2018-08-23 Richard Sandiford <richard.sandiford@arm.com>
9960 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
9961 aarch64_evpc_tbl guard.
9963 2018-08-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
9965 * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
9968 2018-08-22 Martin Sebor <msebor@redhat.com>
9971 * tree-pretty-print.c (pretty_print_string): Add argument.
9972 (dump_generic_node): Call to pretty_print_string with string size.
9974 2018-08-22 Segher Boessenkool <segher@kernel.crashing.org>
9976 PR rtl-optimization/86771
9977 * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
9978 of two SETs into those two SETs, one to be placed at i2, if that SETs
9979 destination is modified between i2 and i3.
9981 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9983 PR tree-optimization/86725
9984 * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
9986 (vect_analyze_scalar_cycles_1): Check it.
9988 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9990 PR tree-optimization/86725
9991 * tree-vect-loop.c (vect_is_simple_reduction): When treating
9992 an outer loop phi as a double reduction, make sure that the
9993 single user of the phi result is an inner loop phi.
9995 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
9997 * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
9998 grouped stores with gaps to a strided group.
10000 2018-08-22 Richard Sandiford <richard.sandiford@arm.com>
10002 * tree-vect-stmts.c (get_group_load_store_type)
10003 (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
10004 first statement in a group.
10006 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10008 * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
10009 the sequence used in gcc/gcc.c.
10011 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10014 * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
10017 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10019 * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
10020 Darwin10-specific unwinder-shim.
10021 * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
10022 * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
10023 New to cater for Darwin10 Rosetta.
10025 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10027 * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
10028 specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
10030 2018-08-22 Iain Sandoe <iain@sandoe.co.uk>
10035 * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
10036 (dwarf2out_switch_text_section): Generate a local label for the
10037 second function sub-section and apply it as the second FDE start
10039 * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
10040 second sub-section start.
10042 2018-08-22 Richard Biener <rguenther@suse.de>
10044 PR tree-optimization/86988
10045 * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
10047 2018-08-22 Richard Biener <rguenther@suse.de>
10049 PR tree-optimization/86945
10050 * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
10052 2018-08-22 Alexandre Oliva <oliva@adacore.com>
10054 * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
10055 a comment about how uses of r2 for .sdata2 come about.
10057 2018-08-22 Alexandre Oliva <aoliva@redhat.com>
10059 * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
10061 2018-08-21 Marek Polacek <polacek@redhat.com>
10063 PR c++/86981, Implement -Wpessimizing-move.
10064 * doc/invoke.texi: Document -Wpessimizing-move.
10066 2018-08-21 Jan Hubicka <jh@suse.cz>
10068 * tree.c (find_decls_types_r): Do not check for redundant typedefs.
10069 * tree.h (is_redundant_typedef): Remove.
10070 * dwarf2out.c (is_redundant_typedef): Turn into static function.
10072 2018-08-21 Jan Hubicka <jh@suse.cz>
10074 * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
10077 2018-08-21 Tamar Christina <tamar.christina@arm.com>
10079 * expmed.c (extract_low_bits): Reject invalid subregs early.
10081 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
10083 PR middle-end/86121
10084 * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
10087 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10089 * config/vxworks.h: Guard vxworks_asm_out_constructor and
10090 vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
10091 * config/vxworks.c: Likewise.
10093 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10095 * config/vxworks.c: Set targetm.have_ctors_dtors
10096 if HAVE_INITFINI_ARRAY_SUPPORT.
10097 * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
10098 if HAVE_INITFINI_ARRAY_SUPPORT.
10100 2018-08-21 Rasmus Villemoes <rv@rasmusvillemoes.dk>
10102 * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
10103 default search path for VxWorks < 7.
10105 2018-08-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
10107 * gimple-ssa-sprintf.c (decl_constant_value): Remove.
10108 (get_format_string): Refer to c_getstr.
10110 2018-08-21 Tom de Vries <tdevries@suse.de>
10112 * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10113 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10114 (debuginfo_early_stop): Declare.
10115 * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
10116 (debuginfo_start, debuginfo_stop, debuginfo_early_start)
10117 (debuginfo_early_stop): New function.
10118 (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
10119 and debuginfo_early_stop.
10120 * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
10121 * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
10122 (general_init): Call debuginfo_early_init.
10123 (finalize): Call debuginfo_fini.
10124 (do_compile): Call debuginfo_init.
10125 * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
10126 -fdump-early-debug.
10127 (@item -fdump-debug, @item -fdump-earlydebug): Add.
10129 2018-08-21 Tom de Vries <tdevries@suse.de>
10131 * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
10132 flag_dump_noaddr and flag_dump_unnumbered.
10134 2018-08-21 Aldy Hernandez <aldyh@redhat.com>
10136 * wide-int-range.cc (wide_int_range_abs): New.
10137 (wide_int_range_order_set): Rename from wide_int_range_min_max.
10138 * wide-int-range.h (wide_int_range_abs): New.
10139 (wide_int_range_min_max): New.
10140 * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
10141 case to call wide_int_range_abs.
10142 Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
10143 (extract_range_from_abs_expr): Delete.
10145 2018-08-20 Michael Meissner <meissner@linux.ibm.com>
10148 * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
10149 from 'Y' to 'YZ' to enable the LWAX instruction to be generated
10152 2018-08-20 Nathan Sidwell <nathan@acm.org>
10153 Jeff Law <law@redhat.com>
10155 * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
10156 * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
10158 2018-08-20 David Malcolm <dmalcolm@redhat.com>
10161 * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
10162 (decl_attributes): Likewise.
10163 * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
10165 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
10166 * diagnostic-core.h (class auto_diagnostic_group): New class.
10167 * diagnostic.c (diagnostic_initialize): Initialize the new fields.
10168 (diagnostic_report_diagnostic): Handle the first diagnostics within
10170 (emit_diagnostic): Add auto_diagnostic_group instance.
10171 (inform): Likewise.
10172 (inform_n): Likewise.
10173 (warning): Likewise.
10174 (warning_at): Likewise.
10175 (warning_n): Likewise.
10176 (pedwarn): Likewise.
10177 (permerror): Likewise.
10179 (error_n): Likewise.
10180 (error_at): Likewise.
10182 (fatal_error): Likewise.
10183 (internal_error): Likewise.
10184 (internal_error_no_backtrace): Likewise.
10185 (auto_diagnostic_group::auto_diagnostic_group): New ctor.
10186 (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
10187 * diagnostic.h (struct diagnostic_context): Add fields
10188 "diagnostic_group_nesting_depth",
10189 "diagnostic_group_emission_count", "begin_group_cb",
10191 * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
10192 Add auto_diagnostic_group instance(s).
10193 (find_explicit_erroneous_behavior): Likewise.
10194 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
10195 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
10196 * gimplify.c (warn_implicit_fallthrough_r): Likewise.
10197 (gimplify_va_arg_expr): Likewise.
10198 * hsa-gen.c (HSA_SORRY_ATV): Likewise.
10199 (HSA_SORRY_AT): Likewise.
10200 * ipa-devirt.c (compare_virtual_tables): Likewise.
10201 (warn_odr): Likewise.
10202 * multiple_target.c (expand_target_clones): Likewise.
10203 * opts-common.c (cmdline_handle_error): Likewise.
10204 * reginfo.c (globalize_reg): Likewise.
10205 * substring-locations.c (format_warning_n_va): Likewise.
10206 * tree-inline.c (expand_call_inline): Likewise.
10207 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
10208 * tree-ssa-loop-niter.c
10209 (do_warn_aggressive_loop_optimizations): Likewise.
10210 * tree-ssa-uninit.c (warn_uninit): Likewise.
10211 * tree.c (warn_deprecated_use): Likewise.
10213 2018-08-20 H.J. Lu <hongjiu.lu@intel.com>
10216 * config/i386/i386.md (eh_return): Always update EH return
10217 address in word_mode.
10219 2018-08-20 Chung-Lin Tang <cltang@codesourcery.com>
10221 * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
10222 TARGET_SPLIT_COMPLEX_ARG is defined.
10224 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
10226 * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
10228 2018-08-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
10231 * expr.c (expand_assignment): Assert that bitpos is positive.
10232 (store_field): Likewise
10233 (expand_expr_real_1): Make sure that bitpos is positive.
10234 * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
10237 2018-08-20 Nathan Sidwell <nathan@acm.org>
10239 * Makefile.in (CPP_ID_DATA_H): Delete.
10240 (CPP_INTERNAL_H): Don't add it.
10241 (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
10242 * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
10244 2018-08-20 Richard Biener <rguenther@suse.de>
10246 PR tree-optimization/78655
10247 * tree-vrp.c (extract_range_from_binary_expr_1): Make
10248 pointer + offset nonnull if either operand is nonnull work.
10250 2018-08-20 Tom de Vries <tdevries@suse.de>
10252 * dwarf2out.c (add_scalar_info): Don't add reference to existing die
10253 unless the referenced die describes the added property using
10254 DW_AT_location or DW_AT_const_value. Fall back to exprloc case.
10255 Otherwise, add a DW_AT_location to the referenced die.
10257 2018-08-19 Uros Bizjak <ubizjak@gmail.com>
10260 * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
10261 register_operand when calling ix86_set_reg_reg_cost.
10262 [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
10263 Set *total to 0 for operands that satisfy x86_64_immediate_operand
10264 predicate and to 1 otherwise.
10266 2018-08-18 Iain Sandoe <iain@sandoe.co.uk>
10268 * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
10269 emit a diagnostic that it is not supported and reset the option.
10270 * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
10271 supported and consume the option. (ASM_FINAL_SPEC): New.
10273 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
10275 * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
10278 2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
10280 C-SKY port: Documentation
10282 * doc/extend.texi (C-SKY Function Attributes): New section.
10283 * doc/invoke.texi (Option Summary): Add C-SKY options.
10284 (C-SKY Options): New section.
10285 * doc/md.texi (Machine Constraints): Document C-SKY constraints.
10287 2018-08-17 Jojo <jijie_rong@c-sky.com>
10288 Huibin Wang <huibin_wang@c-sky.com>
10289 Sandra Loosemore <sandra@codesourcery.com>
10290 Chung-Lin Tang <cltang@codesourcery.com>
10292 C-SKY port: Backend implementation
10294 * config/csky/*: New.
10295 * common/config/csky/*: New.
10297 2018-08-17 Jojo <jijie_rong@c-sky.com>
10298 Huibin Wang <huibin_wang@c-sky.com>
10299 Sandra Loosemore <sandra@codesourcery.com>
10300 Chung-Lin Tang <cltang@codesourcery.com>
10301 Andrew Jenner <andrew@codesourcery.com>
10303 C-SKY port: Configury
10305 * config.gcc (csky-*-*): New.
10306 * configure.ac: Add csky to targets for dwarf2 debug_line support.
10307 * configure: Regenerated.
10309 2018-08-17 David Malcolm <dmalcolm@redhat.com>
10311 * dump-context.h: Include "dumpfile.h".
10312 (dump_context::dump_printf_va): Convert final param from va_list
10313 to va_list *. Convert from ATTRIBUTE_PRINTF to
10314 ATTRIBUTE_GCC_DUMP_PRINTF.
10315 (dump_context::dump_printf_loc_va): Likewise.
10316 * dumpfile.c: Include "stringpool.h".
10317 (make_item_for_dump_printf_va): Delete.
10318 (make_item_for_dump_printf): Delete.
10319 (class dump_pretty_printer): New class.
10320 (dump_pretty_printer::dump_pretty_printer): New ctor.
10321 (dump_pretty_printer::emit_items): New member function.
10322 (dump_pretty_printer::emit_any_pending_textual_chunks): New member
10324 (dump_pretty_printer::emit_item): New member function.
10325 (dump_pretty_printer::stash_item): New member function.
10326 (dump_pretty_printer::format_decoder_cb): New member function.
10327 (dump_pretty_printer::decode_format): New member function.
10328 (dump_context::dump_printf_va): Reimplement in terms of
10329 dump_pretty_printer.
10330 (dump_context::dump_printf_loc_va): Convert final param from va_list
10332 (dump_context::begin_scope): Reimplement call to
10333 make_item_for_dump_printf.
10334 (dump_printf): Update for change to dump_printf_va.
10335 (dump_printf_loc): Likewise.
10336 (selftest::test_capture_of_dump_calls): Convert "stmt" from
10337 greturn * to gimple *. Add a test_decl. Add tests of dump_printf
10338 with %T, %E, and %G.
10339 * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
10340 (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
10341 ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
10342 (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
10343 ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
10344 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
10345 use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
10346 within a dump_printf_loc call to "%wu".
10347 (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
10348 converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a
10349 missing space after "=".
10350 * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
10351 call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
10352 * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
10353 convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
10354 * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove
10355 duplicate "vectorized" from message.
10357 2018-08-17 Szabolcs Nagy <szabolcs.nagy@arm.com>
10359 * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
10360 polyNxK_t element's TYPE_STRING_FLAG.
10362 2018-08-17 Segher Boessenkool <segher@kernel.crashing.org>
10364 * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
10365 (they were unnamed before). Fix comments.
10367 2018-08-17 Nathan Sidwell <nathan@acm.org>
10369 * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
10371 2018-08-17 Richard Biener <rguenther@suse.de>
10373 PR tree-optimization/86841
10374 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
10376 2018-08-17 Martin Liska <mliska@suse.cz>
10378 * common.opt: Remove Warn, Init and Report for options with
10379 Ignore/Deprecated flag. Warning is done automatically for
10381 * config/i386/i386.opt: Likewise.
10382 * config/ia64/ia64.opt: Likewise.
10383 * config/rs6000/rs6000.opt: Likewise.
10384 * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
10385 Remove usage of flag_check_pointer_bounds.
10386 * lto-wrapper.c (merge_and_complain): Do not handle
10387 OPT_fcheck_pointer_bounds.
10388 (append_compiler_options): Likewise.
10389 * opt-functions.awk: Do not handle Deprecated.
10390 * optc-gen.awk: Check that Var, Report and Init are not
10391 used for an option with Ignore/Deprecated flag.
10392 * opts-common.c (decode_cmdline_option): Do not report
10394 (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
10396 * opts.h (struct cl_option): Remove cl_deprecated flag.
10397 (CL_ERR_DEPRECATED): Remove error enum value.
10399 2018-08-17 Richard Biener <rguenther@suse.de>
10401 PR middle-end/86505
10402 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
10403 across a va-arg-pack using call adjust its return value accordingly.
10405 2018-08-16 Martin Sebor <msebor@redhat.com>
10407 PR tree-optimization/86853
10408 * gimple-ssa-sprintf.c (struct format_result): Rename member.
10409 (struct fmtresult): Add member and initialize it in ctors.
10410 (format_character): Handle %C. Extend range to NUL. Set MAYFAIL.
10411 (format_string): Handle %S the same as %ls. Set MAYFAIL.
10412 (format_directive): Set POSUNDER4K when MAYFAIL is set.
10413 (parse_directive): Handle %C same as %c.
10414 (sprintf_dom_walker::compute_format_length): Adjust.
10415 (is_call_safe): Adjust.
10417 2018-08-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
10419 * builtins.c (c_strlen): Add new parameter eltsize. Use it
10420 for determining how to count the elements.
10421 * builtins.h (c_strlen): Adjust prototype.
10422 * expr.c (string_constant): Add new parameter mem_size.
10423 Set *mem_size appropriately.
10424 * expr.h (string_constant): Adjust protoype.
10425 * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
10426 * gimple-fold.h (get_range_strlen): Adjust prototype.
10427 * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
10428 (format_string): Call get_string_length with eltsize.
10430 2018-08-16 David Malcolm <dmalcolm@redhat.com>
10432 * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
10433 to emit the span, rather than setting it as the prefix.
10435 2018-08-16 David Malcolm <dmalcolm@redhat.com>
10437 * diagnostic-show-locus.c (layout::start_annotation_line): Add
10438 "margin_char" parameter, defaulting to space. Use it in place
10439 of pp_space for the initial part of the margin.
10440 (layout::print_leading_fixits): Use '+' when filling the margin
10441 of line-insertion fix-it hints.
10443 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10445 * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
10448 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10450 * config/rs6000/altivec.md: Don't set length attribute to the default
10452 * config/rs6000/darwin.md: Ditto.
10453 * config/rs6000/dfp.md: Ditto.
10454 * config/rs6000/htm.md: Ditto.
10455 * config/rs6000/rs6000.md: Ditto.
10456 * config/rs6000/sync.md: Ditto.
10457 * config/rs6000/vsx.md: Ditto.
10459 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10461 * config/rs6000/altivec.md: Don't set length attribute to the default
10462 value, for branch instructions.
10463 * config/rs6000/darwin.md: Ditto.
10464 * config/rs6000/rs6000.md: Ditto.
10466 2018-08-16 Segher Boessenkool <segher@kernel.crashing.org>
10468 * config/rs6000/rs6000.md (length): Always define as const_int 4.
10469 (unnamed conditional branch define_insn): Set length to 4 or 8
10470 depending on offset.
10471 (<bd>_<mode>): Similar, for alternative 0.
10472 (<bd>tf_<mode>): Ditto.
10474 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10476 * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
10478 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com>
10480 * doc/rtl.texi: Replace old RTX class names with new names.
10483 2018-08-16 Vlad Lazar <vlad.lazar@arm.com>
10485 * expmed.h (canonicalize_comparison): New declaration.
10486 * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
10487 * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
10488 * optabs.c (prepare_cmp_insn): Likewise.
10489 * rtl.h (unsigned_condition_p): New function which checks if a
10490 comparison operator is unsigned.
10492 2018-08-16 Nathan Sidwell <nathan@acm.org>
10494 * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
10495 * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
10497 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10500 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
10501 * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
10502 (mov<mov>): ..this and enable unconditionally.
10504 2018-08-16 Tamar Christina <tamar.christina@arm.com>
10506 * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
10508 2018-08-16 Sam Tebbs <sam.tebbs@arm.com>
10510 * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
10511 (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
10512 "Common" with "Target".
10514 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10516 * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
10517 * doc/invoke.texi (mmitigate-rop): Remove.
10518 * config/i386/i386.c: Do not include "regrename.h".
10519 (ix86_rop_should_change_byte_p, reg_encoded_number)
10520 (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
10522 (ix86_reorg): Remove call to ix86_mitigate_rop.
10523 * config/i386/i386.md (attr "modrm_class"): Remove.
10524 (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
10525 (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
10526 (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
10528 2018-08-15 Will Schmidt <will_schmidt@vnet.ibm.com>
10530 * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
10531 allow folding of mergeh() and mergel() for the float and double types.
10532 (fold_mergehl_helper): Rework to handle building a permute tree
10535 2018-08-15 Uros Bizjak <ubizjak@gmail.com>
10537 * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
10540 2018-08-15 David Malcolm <dmalcolm@redhat.com>
10542 * common.opt (fdiagnostics-show-labels): New option.
10543 * diagnostic-show-locus.c (class layout_range): Add field
10545 (class layout): Add field "m_show_labels_p".
10546 (layout_range::layout_range): Add param "label" and use it to
10547 initialize m_label.
10548 (make_range): Pass in NULL for new "label" param of layout_range's
10550 (layout::layout): Initialize m_show_labels_p.
10551 (layout::maybe_add_location_range): Pass in loc_range->m_label
10552 when constructing layout_range instances.
10553 (struct line_label): New struct.
10554 (layout::print_any_labels): New member function.
10555 (layout::print_line): Call it if label-printing is enabled.
10556 (selftest::test_one_liner_labels): New test.
10557 (selftest::test_diagnostic_show_locus_one_liner): Call it.
10558 * diagnostic.c (diagnostic_initialize): Initialize
10559 context->show_labels_p.
10560 * diagnostic.h (struct diagnostic_context): Add field
10562 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10563 -fno-diagnostics-show-labels.
10564 * dwarf2out.c (gen_producer_string): Add
10565 OPT_fdiagnostics_show_labels to the ignored options.
10566 * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
10568 (gcc_rich_location::maybe_add_expr): Likewise.
10569 * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
10570 label" param, defaulting to NULL.
10571 (gcc_rich_location::add_expr): Add "label" param.
10572 (gcc_rich_location::maybe_add_expr): Likewise.
10573 (class text_range_label): New class.
10574 (class range_label_for_type_mismatch): New class.
10575 * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
10576 of format_warning_va.
10577 (fmtwarn_n): Likewise for new params of format_warning_n_va.
10578 * lto-wrapper.c (merge_and_complain): Add
10579 OPT_fdiagnostics_show_labels to the "pick one setting" options.
10580 (append_compiler_options): Likewise to the dropped options.
10581 (append_diag_options): Likewise to the passed-on options.
10582 * opts.c (common_handle_option): Handle the new option.
10583 * selftest-diagnostic.c
10584 (test_diagnostic_context::test_diagnostic_context): Enable
10586 * substring-locations.c: Include "gcc-rich-location.h".
10587 (format_warning_n_va): Add "fmt_label" and "param_label" params
10588 and use them as appropriate.
10589 (format_warning_va): Add "fmt_label" and "param_label" params,
10590 passing them on to format_warning_n_va.
10591 (format_warning_at_substring): Likewise.
10592 (format_warning_at_substring_n): Likewise.
10593 * substring-locations.h (format_warning_va): Add "fmt_label" and
10594 "param_label" params.
10595 (format_warning_n_va): Likewise.
10596 (format_warning_at_substring): Likewise.
10597 (format_warning_at_substring_n): Likewise.
10598 * toplev.c (general_init): Initialize global_dc->show_labels_p.
10600 2018-08-15 Qing Zhao <qing.zhao@oracle.com>
10603 * builtins.c (expand_builtin_memcmp): Do not expand the call
10604 when overflow is detected.
10606 2018-08-15 Martin Sebor <msebor@redhat.com>
10608 PR tree-optimization/71625
10609 * config/aarch64/aarch64-builtins.c
10610 (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
10612 2018-08-15 Ilya Leoshkevich <iii@linux.ibm.com>
10614 * config/s390/s390.c (s390_reorg): Remove loop.
10616 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
10619 (darwin_function_switched_text_sections): Delete.
10620 * gcc/config/darwin.h
10621 (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
10623 2018-08-15 Iain Sandoe <iain@sandoe.co.uk>
10626 * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
10627 DEBUG_RNGLISTS_SECTION) new macros. (DEBUG_PUBNAMES_SECTION,
10628 DEBUG_PUBTYPES_SECTION) update to include GNU variant.
10630 2018-08-15 Martin Liska <mliska@suse.cz>
10632 PR tree-optimization/86925
10633 * predict.c (expr_expected_value_1): When taking
10634 later predictor, assign also probability.
10635 Use fold_build2_initializer_loc in order to fold
10636 the expression in -frounding-math.
10638 2018-08-14 Allan Sandfeld Jensen <allan.jensen@qt.io>
10640 * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
10642 (expand_vec_perm_1): Try the new method.
10644 2018-08-14 Ilya Leoshkevich <iii@linux.ibm.com>
10647 * lra-lives.c (remove_some_program_points_and_update_live_ranges):
10648 Check whether lra_live_max_point is 0 before dividing.
10650 2018-08-14 Martin Sebor <msebor@redhat.com>
10652 PR tree-optimization/86650
10653 * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
10654 (vrp_prop::check_mem_ref): Same.
10656 2018-08-13 Liu Hao <lh_mouse@126.com>
10658 * pretty-print.c (eat_esc_sequence): Swap the foreground and
10659 background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
10660 and clear it thereafter, as it only works for DBCS.
10662 2018-08-13 Liu Hao <lh_mouse@126.com>
10664 * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
10665 handle returned by _get_osf_handle().
10667 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10669 * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
10670 for folding vec_perm.
10672 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10674 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
10675 Add support for gimple-folding of vec_pack() and vec_unpack()
10678 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com>
10680 * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
10681 vec_xst variants to the list.
10682 (rs6000_gimple_fold_builtin): Add support for folding unaligned
10683 vector loads and stores.
10685 2018-08-13 David Edelsohn <dje.gcc@gmail.com>
10687 * config.gcc (rs6000-ibm-aix4.x): Delete.
10688 (rs6000-ibm-aix5.1): Delete.
10689 (rs6000-ibm-aix5.2): Delete.
10690 (rs6000-ibm-aix5.3): Delete.
10691 * config/rs6000/aix43.h: Delete.
10692 * config/rs6000/aix51.h: Delete.
10693 * config/rs6000/aix52.h: Delete.
10694 * config/rs6000/t-aix43: Delete.
10696 2018-08-13 Ilya Leoshkevich <iii@linux.ibm.com>
10698 * config/s390/s390.c (s390_decompose_constant_pool_ref):
10700 (s390_decompose_address): Factor out constant pool ref
10703 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10705 * config/nds32/nds32-predicates.c
10706 (nds32_can_use_bclr_p): Change return type as bool.
10707 (nds32_can_use_bset_p): Ditto.
10708 (nds32_can_use_btgl_p): Ditto.
10709 (nds32_can_use_bitci_p): Ditto.
10710 * config/nds32/nds32-protos.h
10711 (nds32_can_use_bclr_p): Change declaration.
10712 (nds32_can_use_bset_p): Ditto.
10713 (nds32_can_use_btgl_p): Ditto.
10714 (nds32_can_use_bitci_p): Ditto.
10716 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10718 * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
10719 Support -msched-prolog-epilog option.
10720 * config/nds32/nds32.opt (msched-prolog-epilog): New option.
10722 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10724 * common/config/nds32/nds32-common.c
10725 (nds32_option_optimization_table): Enalbe -malways-align.
10727 2018-08-12 Chung-Ju Wu <jasonwucj@gmail.com>
10729 * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
10731 * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
10732 OPT_misr_secure_ case.
10733 * config/nds32/nds32-isr.c: Implementation of backward compatibility.
10734 * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
10735 * config/nds32/nds32.c (nds32_attribute_table): Add critical and
10737 * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
10738 (nds32_isr_info): New field security_level.
10739 (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
10740 * config/nds32/nds32.md (return_internal): Consider critical attribute.
10741 * config/nds32/nds32.opt (misr-secure): New option.
10742 * config/nds32/nds32_init.inc: New file.
10743 * config/nds32/nds32_isr.h: New file.
10745 2018-08-11 John David Anglin <danglin@gcc.gnu.org>
10747 * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
10748 Update comment for atomic instructions.
10749 (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
10750 atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
10752 (atomic_loaddi): Revise fence expansion to only emit fence prior to
10753 load for __ATOMIC_SEQ_CST model.
10754 (atomic_loaddi_1): Remove float register target.
10755 (atomic_storedi): Handle CONST_INT values.
10756 (atomic_storedi_1): Remove float register source. Add special case
10758 (memory_barrier): New expander and insn.
10760 2018-08-11 Jakub Jelinek <jakub@redhat.com>
10762 PR tree-optimization/86835
10763 * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
10764 new_stmt after def_gsi, make sure to insert new_square_stmt after
10765 that stmt, not 2 stmts before it.
10767 2018-08-10 Alexander Monakov <amonakov@ispras.ru>
10770 * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
10773 2018-08-10 Martin Liska <mliska@suse.cz>
10776 * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
10778 * builtins.c (expand_builtin_expect_with_probability):
10780 (expand_builtin_expect_with_probability): New function.
10781 (build_builtin_expect_predicate): Add new argumnet probability
10782 for BUILT_IN_EXPECT_WITH_PROBABILITY.
10783 (fold_builtin_expect):
10786 * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
10787 * builtins.h (fold_builtin_expect): Set new argument.
10788 * doc/extend.texi: Document __builtin_expect_with_probability.
10789 * doc/invoke.texi: Likewise.
10790 * gimple-fold.c (gimple_fold_call): Pass new argument.
10791 * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
10792 also BUILT_IN_EXPECT_WITH_PROBABILITY.
10793 * predict.c (get_predictor_value): New function.
10794 (expr_expected_value): Add new argument probability. Assume
10795 that predictor and probability are always non-null.
10796 (expr_expected_value_1): Likewise. For __builtin_expect and
10797 __builtin_expect_with_probability set probability. Handle
10798 combination in binary expressions.
10799 (tree_predict_by_opcode): Simplify code by simply calling
10800 get_predictor_value.
10801 (pass_strip_predict_hints::execute): Add handling of
10802 BUILT_IN_EXPECT_WITH_PROBABILITY.
10803 * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
10805 * tree.h (DECL_BUILT_IN_P): New function.
10807 2018-08-10 Martin Liska <mliska@suse.cz>
10809 PR tree-optimization/85799
10810 * passes.def: Add argument for pass_strip_predict_hints.
10811 * predict.c (class pass_strip_predict_hints): Add new argument
10813 (strip_predictor_early): New function.
10814 (pass_strip_predict_hints::execute): Call the function to
10816 (strip_predict_hints): New function.
10817 * predict.def: Fix comment.
10819 2018-08-10 Thomas Preud'homme <thomas.preudhomme@linaro.org>
10821 * Makefile.in: Clarify which tm.texi to copy over to assert the
10822 right to grant a GFDL license for all.
10824 2018-08-09 Jeff Law <law@redhat.com>
10826 * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
10829 2018-08-09 Andreas Schwab <schwab@linux-m68k.org>
10831 * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
10834 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10836 * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
10837 reductions for variable-length vectors.
10839 2018-08-09 David Malcolm <dmalcolm@redhat.com>
10842 * common.opt (fdiagnostics-show-line-numbers): New option.
10843 * diagnostic-show-locus.c (class layout): Add fields
10844 "m_show_line_numbers_p" and "m_linenum_width";
10845 (num_digits): New function.
10846 (test_num_digits): New function.
10847 (layout::layout): Initialize new fields. Update m_x_offset
10848 logic to handle any left margin.
10849 (layout::print_source_line): Print line number when requested.
10850 (layout::start_annotation_line): New member function.
10851 (layout::print_annotation_line): Call it.
10852 (layout::print_leading_fixits): Likewise.
10853 (layout::print_trailing_fixits): Likewise. Update calls to
10854 move_to_column for new parameter.
10855 (layout::get_x_bound_for_row): Add "add_left_margin" param and use
10856 it to potentially call start_annotation_line.
10857 (layout::show_ruler): Call start_annotation_line.
10858 (selftest::test_line_numbers_multiline_range): New selftest.
10859 (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
10860 and selftest::test_line_numbers_multiline_range.
10861 * diagnostic.c (diagnostic_initialize): Initialize
10862 show_line_numbers_p.
10863 * diagnostic.h (struct diagnostic_context): Add field
10864 "show_line_numbers_p".
10865 * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10866 -fno-diagnostics-show-line-numbers.
10867 * dwarf2out.c (gen_producer_string): Add
10868 OPT_fdiagnostics_show_line_numbers to the ignored options.
10869 * lto-wrapper.c (merge_and_complain): Likewise to the "pick
10870 one setting" options.
10871 (append_compiler_options): Likewise to the dropped options.
10872 (append_diag_options): Likewise to the passed-on options.
10873 * opts.c (common_handle_option): Handle the new option.
10874 * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
10876 2018-08-09 Kelvin Nilsen <kelvin@gcc.gnu.org>
10878 * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
10879 ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub. Add
10880 third argument of type "const signed char" to descriptions of
10881 __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
10882 __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
10883 __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
10884 __builtin_bcdsub_ov functions.
10886 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10888 PR tree-optimization/86858
10889 * tree-vect-loop.c (vect_is_simple_reduction): Restore
10890 flow_bb_inside_loop_p calls.
10892 2018-08-09 Richard Sandiford <richard.sandiford@arm.com>
10894 PR tree-optimization/86871
10895 * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
10896 instead of gimple_assign_lhs.
10898 2018-08-09 Richard Earnshaw <rearnsha@arm.com>
10901 * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
10902 register constraint to operand 0.
10903 (add<mode>3_carryinC): Likewise.
10904 (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
10906 2018-08-09 Martin Liska <mliska@suse.cz>
10909 * common.opt: Remove extra line.
10911 2018-08-09 Martin Liska <mliska@suse.cz>
10913 * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
10914 at the end of a line, make first letter capital and end up
10915 a sentence with a dot.
10916 (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
10917 (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
10918 (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
10919 (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
10920 (PARAM_MAX_ISL_OPERATIONS): Likewise.
10921 (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
10922 (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
10923 (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
10924 (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
10925 (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
10926 (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
10927 (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
10928 (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
10929 (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
10930 (PARAM_TREE_REASSOC_WIDTH): Likewise.
10931 (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
10932 (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
10933 (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
10935 2018-08-09 Andreas Krebbel <krebbel@linux.ibm.com>
10938 * config/s390/s390.c (s390_option_override_internal): Reduce the
10939 stack-clash-protection-probe-interval param if it would be too big
10942 2018-08-08 Andreas Schwab <schwab@linux-m68k.org>
10945 * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
10946 * config/m68k/m68k.c (handle_move_double): Don't call
10947 m68k_final_prescan_insn.
10948 (m68k_adjust_decorated_operand): Renamed from
10949 m68k_final_prescan_insn, remove first and third operand and
10951 (print_operand): Call it.
10952 (print_operand_address): Call it.
10954 2018-08-08 Nathan Sidwell <nathan@acm.org>
10956 * diagnostic.c (diagnostic_report_current_module): Use
10957 linemap_included_from & linemap_included_from_linemap.
10959 2018-08-08 Hongbo Zhang <hongbo.zhang@linaro.org>
10961 * config/aarch64/aarch64-cores.def: Add phecda core.
10962 * config/aarch64/aarch64-tune.md: Regenerate.
10963 * doc/invoke.texi: Add phecda core.
10965 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10968 * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
10970 * config/s390/s390.md ("movti"): Add more alternatives for
10971 constant to GPR copies.
10973 2018-08-08 Andreas Krebbel <krebbel@linux.ibm.com>
10975 * config/s390/s390.c: Fix whitespace damage throughout the file.
10976 * config/s390/s390.h: Likewise.
10977 * config/s390/tpf.h: Likewise.
10979 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
10981 * config/s390/s390.c (s390_loadrelative_operand_p):
10982 Remove TARGET_CPU_ZARCH usages.
10983 (s390_rtx_costs): Likewise.
10984 (s390_legitimate_constant_p): Likewise.
10985 (s390_cannot_force_const_mem): Likewise.
10986 (legitimate_reload_constant_p): Likewise.
10987 (s390_preferred_reload_class): Likewise.
10988 (legitimize_pic_address): Likewise.
10989 (legitimize_tls_address): Likewise.
10990 (s390_split_branches): Removed.
10991 (s390_add_execute): Removed.
10992 (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
10993 (s390_mainpool_start): Likewise.
10994 (s390_mainpool_finish): Likewise.
10995 (s390_mainpool_cancel): Removed.
10996 (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
10997 (s390_chunkify_cancel): Likewise.
10998 (s390_return_addr_rtx): Likewise.
10999 (s390_register_info): Remove split_branches_pending_p uages.
11000 (s390_optimize_register_info): Likewise.
11001 (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
11002 split_branches_pending_p usages.
11003 (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
11004 (s390_load_got): Likewise.
11005 (s390_expand_split_stack_prologue): Likewise.
11006 (output_asm_nops): Likewise.
11007 (s390_function_profiler): Likewise.
11008 (s390_emit_call): Likewise.
11009 (s390_conditional_register_usage): Likewise.
11010 (s390_optimize_prologue): Likewise.
11011 (s390_reorg): Remove TARGET_CPU_ZARCH and
11012 split_branches_pending_p usages.
11013 (s390_option_override_internal): Remove TARGET_CPU_ZARCH
11015 (s390_output_indirect_thunk_function): Likewise.
11016 * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
11017 (TARGET_CPU_ZARCH_P): Removed.
11018 (struct machine_function): Remove split_branches_pending_p.
11019 * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
11021 2018-08-08 Ilya Leoshkevich <iii@linux.ibm.com>
11023 * common/config/s390/s390-common.c (processor_flags_table):
11025 * config.gcc: Remove with_arch/with_tune support.
11026 * config/s390/2064.md: Remove cpu attribute comparisons.
11027 * config/s390/driver-native.c (s390_host_detect_local_cpu):
11029 * config/s390/linux.h (ASM_SPEC):
11030 Remove -march support.
11031 * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
11032 Use a table to get an arch level.
11033 * config/s390/s390-opts.h (enum processor_type):
11034 Remove enum values.
11035 * config/s390/s390.c
11036 (processor_table): Remove entries, add arch_level values.
11037 (s390_issue_rate): Remove cases.
11038 (s390_option_override): Adjust
11039 s390_option_override_internal() call.
11040 (s390_option_override_internal): Remove deprecation warning.
11041 (s390_valid_target_attribute_tree): Adjust
11042 s390_option_override_internal() call.
11043 * config/s390/s390.h (struct s390_processor):
11044 Share with s390-c.c, add arch_level field.
11045 * config/s390/s390.md:
11046 Remove occurrences in cpu attribute.
11047 * config/s390/s390.opt: Remove -march/-mtune support.
11048 * config/s390/tpf.h (ASM_SPEC): Remove -march support.
11049 * doc/invoke.texi: Remove deprecation warning.
11051 2018-08-08 Luis Machado <luis.machado@linaro.org>
11053 * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
11055 (qdf24xx_tunings): Set vector cost structure to
11056 qdf24xx_vector_cost.
11058 * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
11059 <register_sextend>: Set to 3.
11061 2018-08-07 Richard Sandiford <richard.sandiford@arm.com>
11064 * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
11065 * config/aarch64/aarch64-simd.md
11066 (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
11067 (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
11068 (aarch64_frecpx<mode>): ...this new pattern.
11069 * config/aarch64/aarch64-simd-builtins.def: Remove comment
11070 about aarch64_frecp<FRECP:frecp_suffix><mode>.
11072 2018-08-07 Martin Liska <mliska@suse.cz>
11074 PR middle-end/83023
11075 * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
11076 BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
11077 * predict.def (PRED_MALLOC_NONNULL): New predictor.
11078 * doc/extend.texi: Document that malloc attribute adds
11081 2018-08-06 John David Anglin <danglin@gcc.gnu.org>
11084 * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11085 Define to speculation_safe_value_not_needed.
11087 2018-08-06 Jeff Law <law@redhat.com>
11089 * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
11090 the vr_values instance to cprop_into_stmt.
11091 (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
11092 (cprop_operand): Also query EVRP to determine if OP is a constant.
11094 2018-08-06 Nathan Sidwell <nathan@acm.org>
11096 * diagnostic.c (diagnostic_report_current_module): Reroll
11097 included-at loop. Translate text.
11099 2018-08-06 David Malcolm <dmalcolm@redhat.com>
11101 * function-tests.c (selftest::test_expansion_to_rtl): Call
11102 free_after_compilation.
11104 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11106 * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
11108 2018-08-06 Andreas Krebbel <krebbel@linux.ibm.com>
11110 * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
11111 loops with memory block operations from getting unrolled.
11113 2018-08-06 Ulrich Weigand <uweigand@de.ibm.com>
11116 * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11117 Define to speculation_safe_value_not_needed.
11119 2018-08-06 Jeff Law <law@redhat.com>
11121 * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
11124 2018-08-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11127 * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
11128 with all enabled __intN types.
11130 * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
11132 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11134 * alias.c (record_set): Check for clobber high.
11135 * cfgexpand.c (expand_gimple_stmt): Likewise.
11136 * combine-stack-adj.c (single_set_for_csa): Likewise.
11137 * combine.c (find_single_use_1): Likewise.
11138 (set_nonzero_bits_and_sign_copies): Likewise.
11139 (get_combine_src_dest): Likewise.
11140 (is_parallel_of_n_reg_sets): Likewise.
11141 (try_combine): Likewise.
11142 (record_dead_and_set_regs_1): Likewise.
11143 (reg_dead_at_p_1): Likewise.
11144 (reg_dead_at_p): Likewise.
11145 * dce.c (deletable_insn_p): Likewise.
11146 (mark_nonreg_stores_1): Likewise.
11147 (mark_nonreg_stores_2): Likewise.
11148 * df-scan.c (df_find_hard_reg_defs): Likewise.
11149 (df_uses_record): Likewise.
11150 (df_get_call_refs): Likewise.
11151 * dwarf2out.c (mem_loc_descriptor): Likewise.
11152 * haifa-sched.c (haifa_classify_rtx): Likewise.
11153 * ira-build.c (create_insn_allocnos): Likewise.
11154 * ira-costs.c (scan_one_insn): Likewise.
11155 * ira.c (equiv_init_movable_p): Likewise.
11156 (rtx_moveable_p): Likewise.
11157 (interesting_dest_for_shprep): Likewise.
11158 * jump.c (mark_jump_label_1): Likewise.
11159 * postreload-gcse.c (record_opr_changes): Likewise.
11160 * postreload.c (reload_cse_simplify): Likewise.
11161 (struct reg_use): Add source expr.
11162 (reload_combine): Check for clobber high.
11163 (reload_combine_note_use): Likewise.
11164 (reload_cse_move2add): Likewise.
11165 (move2add_note_store): Likewise.
11166 * print-rtl.c (print_pattern): Likewise.
11167 * recog.c (decode_asm_operands): Likewise.
11168 (store_data_bypass_p): Likewise.
11169 (if_test_bypass_p): Likewise.
11170 * regcprop.c (kill_clobbered_value): Likewise.
11171 (kill_set_value): Likewise.
11172 * reginfo.c (reg_scan_mark_refs): Likewise.
11173 * reload1.c (maybe_fix_stack_asms): Likewise.
11174 (eliminate_regs_1): Likewise.
11175 (elimination_effects): Likewise.
11176 (mark_not_eliminable): Likewise.
11177 (scan_paradoxical_subregs): Likewise.
11178 (forget_old_reloads_1): Likewise.
11179 * reorg.c (find_end_label): Likewise.
11180 (try_merge_delay_insns): Likewise.
11181 (redundant_insn): Likewise.
11182 (own_thread_p): Likewise.
11183 (fill_simple_delay_slots): Likewise.
11184 (fill_slots_from_thread): Likewise.
11185 (dbr_schedule): Likewise.
11186 * resource.c (update_live_status): Likewise.
11187 (mark_referenced_resources): Likewise.
11188 (mark_set_resources): Likewise.
11189 * rtl.c (copy_rtx): Likewise.
11190 * rtlanal.c (reg_referenced_p): Likewise.
11191 (single_set_2): Likewise.
11192 (noop_move_p): Likewise.
11193 (note_stores): Likewise.
11194 * sched-deps.c (sched_analyze_reg): Likewise.
11195 (sched_analyze_insn): Likewise.
11197 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11199 * cse.c (invalidate_reg): New function extracted from...
11200 (invalidate): ...here.
11201 (canonicalize_insn): Check for clobber high.
11202 (invalidate_from_clobbers): invalidate clobber highs.
11203 (invalidate_from_sets_and_clobbers): Likewise.
11204 (count_reg_usage): Check for clobber high.
11205 (insn_live_p): Likewise.
11206 * cselib.c (cselib_expand_value_rtx_1):Likewise.
11207 (cselib_invalidate_regno): Check for clobber in setter.
11208 (cselib_invalidate_rtx): Pass through setter.
11209 (cselib_invalidate_rtx_note_stores):
11210 (cselib_process_insn): Check for clobber high.
11211 * cselib.h (cselib_invalidate_rtx): Add operand.
11213 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11215 * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
11216 (mark_not_eliminable): Likewise.
11217 * lra-int.h (struct lra_insn_reg): Add clobber high marker.
11218 * lra-lives.c (process_bb_lives): Check for clobber high.
11219 * lra.c (new_insn_reg): Remember clobber highs.
11220 (collect_non_operand_hard_regs): Check for clobber high.
11221 (lra_set_insn_recog_data): Likewise.
11222 (add_regs_to_insn_regno_info): Likewise.
11223 (lra_update_insn_regno_info): Likewise.
11225 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11227 * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
11228 * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
11230 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11232 * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
11233 (copy_insn_1): Likewise.
11234 (gen_hard_reg_clobber_high): New gen function.
11235 * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
11236 * genemit.c (gen_exp): Likewise.
11237 (gen_emit_seq): Pass through info.
11238 (gen_insn): Check for CLOBBER_HIGH.
11239 (gen_expand): Pass through info.
11240 (gen_split): Likewise.
11241 (output_add_clobbers): Likewise.
11242 * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
11243 (remove_clobbers): Likewise.
11244 * rtl.h (gen_hard_reg_clobber_high): New declaration.
11246 2018-08-06 Alan Hayward <alan.hayward@arm.com>
11248 * doc/rtl.texi (clobber_high): Add.
11249 (parallel): Add in clobber high
11250 * rtl.c (rtl_check_failed_code3): Add function.
11251 * rtl.def (CLOBBER_HIGH): Add expression.
11252 * rtl.h (RTL_CHECKC3): Add macro.
11253 (rtl_check_failed_code3): Add declaration.
11254 (XC3EXP): Add macro.
11256 2018-08-05 H.J. Lu <hongjiu.lu@intel.com>
11259 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
11260 cfun->machine->max_used_stack_alignment if needed.
11262 2018-08-04 Martin Sebor <msebor@redhat.com>
11264 PR tree-optimization/86571
11265 * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
11268 2018-08-03 Sandra Loosemore <sandra@codesourcery.com>
11271 * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11274 2018-08-03 Jeff Law <law@redhat.com>
11277 * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11278 Define to speculation_safe_value_not_needed.
11280 2018-08-03 David Malcolm <dmalcolm@redhat.com>
11282 * doc/gcov.texi (-x): Remove duplicate "to".
11283 * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
11284 (-Wif-not-aligned): Remove duplicate "is".
11285 (-flto): Remove duplicate "the".
11286 (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
11287 duplicate "v5.00.b".
11288 (MSP430 Options): Remove duplicate "and" from the description
11289 of "-mgprel-sec=regexp".
11290 (x86 Options): Remove duplicate copies of "vmldLog102" and
11291 vmlsLog104 from description of "-mveclibabi=type".
11293 2018-08-03 Richard Sandiford <richard.sandiford@arm.com>
11295 * internal-fn.h (first_commutative_argument): Declare.
11296 * internal-fn.c (first_commutative_argument): New function.
11297 * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
11298 restrictions for pattern statements. Use first_commutative_argument
11299 to look for commutative operands in calls to internal functions.
11301 2018-08-03 Aldy Hernandez <aldyh@redhat.com>
11303 * Makefile.in (wide-int-range.o): New.
11304 * tree-vrp.c: Move all the wide_int_* functions to...
11305 * wide-int-range.cc: ...here.
11306 * tree-vrp.h: Move all the wide_int_* prototypes to...
11307 * wide-int-range.h: ...here.
11309 2018-08-03 Tom de Vries <tdevries@suse.de>
11311 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
11313 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
11314 * except.c (output_function_exception_table): Do early exit if
11315 targetm_common.except_unwind_info (&global_options) == UI_NONE.
11317 2018-08-03 Martin Liska <mliska@suse.cz>
11319 * predict.c (dump_prediction): Change to 2 digits
11322 2018-08-03 Siddhesh Poyarekar <siddhesh@sourceware.org>
11324 * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
11326 (falkor_am_1_gtov_gtov): ... a new insn reservation.
11328 2018-07-19 Ilya Leoshkevich <iii@linux.ibm.com>
11330 * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
11331 * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
11332 * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
11333 * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
11334 * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
11336 2018-08-02 David Malcolm <dmalcolm@redhat.com>
11338 * diagnostic-show-locus.c (diagnostic_show_locus): Use
11339 pp_take_prefix when saving the existing prefix.
11340 * diagnostic.c (diagnostic_append_note): Likewise.
11341 * langhooks.c (lhd_print_error_function): Likewise.
11342 * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
11343 param's type. Free the existing prefix.
11344 (pp_take_prefix): New function.
11345 (pretty_printer::pretty_printer): Drop the prefix parameter.
11346 Rename the length parameter to match the comment.
11347 (pretty_printer::~pretty_printer): Free the prefix.
11348 * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
11350 (struct pretty_printer): Drop the "const" from "prefix" field's
11351 type and clarify memory management.
11352 (pp_set_prefix): Drop the "const" from the 2nd param.
11353 (pp_take_prefix): New decl.
11355 2018-08-02 Aaron Sawdey <acsawdey@linux.ibm.com>
11357 * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
11358 for word_mode_ok here instead of passing as argument.
11359 (expand_block_compare): Change select_block_compare_mode() call.
11360 (expand_strncmp_gpr_sequence): New function.
11361 (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
11363 2018-08-02 Jeff Law <law@redhat.com>
11366 * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11367 Define to speculation_safe_value_not_needed.
11370 * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11371 Define to speculation_safe_value_not_needed.
11373 2018-08-02 Tom de Vries <tdevries@suse.de>
11376 * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
11377 function. Return UI_TARGET unconditionally.
11378 (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
11379 * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
11381 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11383 * genemit.c (print_overload_test): Fix typo.
11385 2018-08-02 Richard Biener <rguenther@suse.de>
11387 PR tree-optimization/86816
11388 * tree-ssa-tail-merge.c (tail_merge_valueize): New function
11389 which checks for value availability before querying it.
11390 (gvn_uses_equal): Use it.
11391 (same_succ_hash): Likewise.
11392 (gimple_equal_p): Likewise.
11394 2018-08-02 Nick Clifton <nickc@redhat.com>
11397 * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11398 Define to speculation_safe_value_not_needed.
11401 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11402 Define to speculation_safe_value_not_needed.
11405 * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11406 Define to speculation_safe_value_not_needed.
11409 * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11410 Define to speculation_safe_value_not_needed.
11413 * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11414 Define to speculation_safe_value_not_needed.
11417 * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11418 Define to speculation_safe_value_not_needed.
11421 * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11422 Define to speculation_safe_value_not_needed.
11425 * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11426 Define to speculation_safe_value_not_needed.
11429 * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11430 speculation_safe_value_not_needed.
11433 * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
11434 to speculation_safe_value_not_needed.
11436 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11438 * doc/md.texi: Expand the documentation of instruction names
11439 to mention port-local uses. Document '@' in pattern names.
11440 * read-md.h (overloaded_instance, overloaded_name): New structs.
11441 (mapping): Declare.
11442 (md_reader::handle_overloaded_name): New member function.
11443 (md_reader::get_overloads): Likewise.
11444 (md_reader::m_first_overload): New member variable.
11445 (md_reader::m_next_overload_ptr): Likewise.
11446 (md_reader::m_overloads_htab): Likewise.
11447 * read-md.c (md_reader::md_reader): Initialize m_first_overload,
11448 m_next_overload_ptr and m_overloads_htab.
11449 * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
11450 (get_mode_token, get_code_token, get_int_token): New functions.
11451 (map_attr_string): Add an optional argument that passes back
11452 the associated iterator.
11453 (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
11454 (md_reader::handle_overloaded_name, add_overload_instance): New
11456 (apply_iterators): Handle '@' names. Report an error if '@'
11457 is used without iterators.
11458 (initialize_iterators): Initialize the new iterator_group fields.
11459 * genopinit.c (handle_overloaded_code_for)
11460 (handle_overloaded_gen): New functions.
11461 (main): Use them to print declarations of maybe_code_for_* and
11462 maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
11463 * genemit.c (print_overload_arguments, print_overload_test)
11464 (handle_overloaded_code_for, handle_overloaded_gen): New functions.
11465 (main): Use it to print definitions of maybe_code_for_* and
11466 maybe_gen_* functions.
11467 * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
11468 gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
11469 instead of explicit mode checks.
11470 (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
11471 (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
11472 (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
11473 (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
11474 (aarch64_expand_compare_and_swap): Likewise
11475 gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
11476 (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
11477 (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
11478 (aarch64_constant_pool_reload_icode): Delete.
11479 (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
11480 instead of aarch64_constant_pool_reload_icode. Use
11481 code_for_aarch64_reload_mov instead of explicit mode checks.
11482 (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
11483 (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
11484 get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
11485 (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
11486 (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
11487 get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
11488 (aarch64_atomic_load_op_code): Delete.
11489 (aarch64_emit_atomic_load_op): Likewise.
11490 (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
11491 aarch64_atomic_load_op_code. Use gen_aarch64_atomic_load
11492 instead of aarch64_emit_atomic_load_op.
11493 * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
11494 (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
11495 (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
11496 (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
11497 character before the pattern name.
11498 * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
11499 (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
11500 (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
11501 (aarch64_frecps<mode>): Likewise.
11502 * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
11503 (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
11504 (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
11505 (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
11506 (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
11508 2018-08-02 Richard Sandiford <richard.sandiford@arm.com>
11510 * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
11511 Allow HFmode constants if TARGET_FP_F16INST.
11513 2018-08-02 Jackson Woodruff <jackson.woodruff@arm.com>
11516 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
11517 No longer check last store for clobber of address register.
11519 2018-08-02 Martin Liska <mliska@suse.cz>
11521 PR gcov-profile/86817
11522 * gcov.c (process_all_functions): New function.
11524 (process_file): Move functions processing to
11525 process_all_functions.
11527 2018-08-02 David Malcolm <dmalcolm@redhat.com>
11529 * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
11530 "const" to the "gimple *" and "rtx_insn *" parameters.
11531 * dumpfile.h (dump_user_location_t::dump_user_location_t):
11533 (dump_location_t::dump_location_t): Likewise.
11535 2018-08-01 Martin Sebor <msebor@redhat.com>
11537 PR tree-optimization/86650
11538 * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
11539 rather than a "gcall *". Directly pass the data of interest
11540 to percent_K_format, rather than building a temporary CALL_EXPR
11542 * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
11543 (gimple_fold_builtin_strncat): Adjust.
11544 * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
11545 gcall* argument with gimple*.
11546 * gimple-ssa-warn-restrict.c (check_call): Same.
11547 (wrestrict_dom_walker::before_dom_children): Same.
11548 (builtin_access::builtin_access): Same.
11549 (check_bounds_or_overlap): Same
11550 (maybe_diag_overlap): Same.
11551 (maybe_diag_offset_bounds): Same.
11552 * tree-diagnostic.c (default_tree_printer): Move usage of
11553 EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
11555 * tree-pretty-print.c (percent_K_format): Add argument.
11556 * tree-pretty-print.h: Add argument.
11557 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
11558 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
11559 (maybe_diag_stxncpy_trunc): Same.
11560 (handle_builtin_stxncpy): Same.
11561 (handle_builtin_strcat): Same.
11563 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11565 * match.pd: Optimise pointer range checks.
11567 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11569 PR tree-optimization/86758
11570 * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
11571 to remove pattern statements.
11573 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11575 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
11576 result of dfs_enumerate_from when constructing stmt_vec_infos,
11577 instead of additionally calling get_loop_body.
11579 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11581 * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
11583 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
11584 When creating an iv, assert that the step is not known to be zero.
11585 (vect_setup_realignment): Update call accordingly.
11586 * tree-vect-stmts.c (vectorizable_store): Likewise.
11587 (vectorizable_load): Likewise. Handle VMAT_INVARIANT separately.
11589 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11591 * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
11592 * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
11593 (vectorizable_reduction): Likewise.
11594 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11595 (vect_detect_hybrid_slp_stmts): Likewise.
11596 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11598 2018-08-01 Aldy Hernandez <aldyh@redhat.com>
11600 * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
11601 (wide_int_set_zero_nonzero_bits): ...this.
11602 (zero_nonzero_bits_from_vr): Rename to...
11603 (vrp_set_zero_nonzero_bits): ...this.
11604 (extract_range_from_multiplicative_op_1): Abstract wide int
11606 (wide_int_range_multiplicative_op): ...here.
11607 (extract_range_from_binary_expr_1): Extract wide int binary
11608 operations into their own functions.
11609 (wide_int_range_lshift): New.
11610 (wide_int_range_can_optimize_bit_op): New.
11611 (wide_int_range_shift_undefined_p): New.
11612 (wide_int_range_bit_xor): New.
11613 (wide_int_range_bit_ior): New.
11614 (wide_int_range_bit_and): New.
11615 (wide_int_range_trunc_mod): New.
11616 (extract_range_into_wide_ints): New.
11617 (vrp_shift_undefined_p): New.
11618 (extract_range_from_multiplicative_op): New.
11619 (vrp_can_optimize_bit_op): New.
11620 * tree-vrp.h (value_range::dump): New.
11621 (wide_int_range_multiplicative_op): New.
11622 (wide_int_range_lshift):New.
11623 (wide_int_range_shift_undefined_p): New.
11624 (wide_int_range_bit_xor): New.
11625 (wide_int_range_bit_ior): New.
11626 (wide_int_range_bit_and): New.
11627 (wide_int_range_trunc_mod): New.
11628 (zero_nonzero_bits_from_bounds): Rename to...
11629 (wide_int_set_zero_nonzero_bits): ...this.
11630 (zero_nonzero_bits_from_vr): Rename to...
11631 (vrp_set_zero_nonzero_bits): ...this.
11632 (range_easy_mask_min_max): Rename to...
11633 (wide_int_range_can_optimize_bit_op): this.
11634 * vr-values.c (simplify_bit_ops_using_ranges): Rename
11635 zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
11637 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11639 * tree-vectorizer.h (vect_orig_stmt): New function.
11640 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
11641 * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
11642 (vect_create_epilog_for_reduction): Likewise.
11643 (vectorizable_live_operation): Likewise.
11644 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11645 (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
11646 * tree-vect-stmts.c (vectorizable_call): Likewise.
11647 (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
11649 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11651 * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
11653 * tree-vect-stmts.c (vect_transform_stmt): Likewise.
11654 * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
11655 (vect_transform_loop): Likewise.
11656 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11658 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11660 * tree-vectorizer.h (vect_schedule_slp): Return void.
11661 * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11662 (vect_schedule_slp): Likewise.
11664 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11666 * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
11668 (vect_transform_loop): Update calls accordingly. Schedule SLP
11669 instances before the main loop, if any exist.
11671 2018-08-01 Richard Sandiford <richard.sandiford@arm.com>
11673 PR tree-optimization/86749
11674 * tree-vect-patterns.c (vect_determine_min_output_precision_1):
11675 If the lhs is used in a COND_EXPR, check that it is being used
11676 as the "then" or "else" value.
11678 2018-08-01 Tom de Vries <tdevries@suse.de>
11681 * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11682 speculation_safe_value_not_needed.
11684 2018-08-01 Richard Biener <rguenther@suse.de>
11686 * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
11687 as base and offset.
11689 2018-08-01 Martin Liska <mliska@suse.cz>
11691 * value-prof.c (gimple_divmod_fixed_value_transform): Unify
11692 format how successful transformation is dumped.
11693 (gimple_mod_pow2_value_transform): Likewise.
11694 (gimple_mod_subtract_transform): Likewise.
11695 (gimple_stringops_transform): Likewise.
11697 2018-08-01 Martin Liska <mliska@suse.cz>
11699 PR value-prof/35543
11700 * value-prof.c (interesting_stringop_to_profile_p):
11701 Simplify the code and add BUILT_IN_MEMMOVE.
11702 (gimple_stringops_transform): Likewise.
11704 2018-08-01 Sam Tebbs <sam.tebbs@arm.com>
11706 * config/aarch64/aarch64-simd.md
11707 (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
11708 (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
11709 use GPI iterator instead of SI mode.
11711 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
11713 * config/rs6000/rs6000.md (speculation_barrier): Renamed from
11714 rs6000_speculation_barrier.
11715 * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
11716 new barrier pattern name.
11718 2018-08-01 Richard Earnshaw <rearnsha@arm.com>
11720 * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
11721 (speculation_barrier): New insn.
11723 2018-08-01 Richard Biener <rguenther@suse.de>
11726 * graphite.h: Include isl/id.h and isl/space.h to allow build
11729 2018-08-01 Jan Willem Jagersma <jwjagersma@gmail.com>
11732 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11733 mode for COFF targets.
11734 * defaults.h (TARGET_COFF): Define.
11735 * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
11736 TARGET_COFF): Define.
11737 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
11738 * config/i386/djgpp.c (saved_debug_info_level): New static variable.
11739 (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
11741 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11743 * gimple-streamer-in.c (input_bb): Restore BB discriminator.
11744 * gimple-streamer-out.c (output_bb): Save it.
11745 * lto-streamer-in.c (input_struct_function_base): Restore
11746 instance discriminator if available. Create map on demand.
11747 * lto-streamer-out.c (output_struct_function_base): Save it if
11749 * final.c (decl_to_instance_map): Document LTO strategy.
11751 2018-07-31 Alexandre Oliva <oliva@adacore.com>
11752 Olivier Hainque <hainque@adacore.com>
11754 * debug.h (decl_to_instance_map_t): New type.
11755 (decl_to_instance_map): Declare.
11756 (maybe_create_decl_to_instance_map): New inline function.
11757 * final.c (bb_discriminator, last_bb_discriminator): New statics,
11758 to track basic block discriminators.
11759 (final_start_function_1): Initialize them.
11760 (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
11762 (decl_to_instance_map): New variable.
11763 (map_decl_to_instance, maybe_set_discriminator): New functions.
11764 (notice_source_line): Set discriminator.
11766 2018-07-31 Ian Lance Taylor <iant@golang.org>
11768 * targhooks.c (default_have_speculation_safe_value): Add
11771 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11773 * dump-context.h: Include "pretty-print.h".
11774 (dump_context::refresh_dumps_are_enabled): New decl.
11775 (dump_context::emit_item): New decl.
11776 (class dump_context): Add fields "m_test_pp" and
11778 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11779 (temp_dump_context::get_dumped_text): New decl.
11780 (class temp_dump_context): Add field "m_pp".
11781 * dumpfile.c (refresh_dumps_are_enabled): Convert to...
11782 (dump_context::refresh_dumps_are_enabled): ...and add a test for
11784 (set_dump_file): Update for above change.
11785 (set_alt_dump_file): Likewise.
11786 (dump_loc): New overload, taking a pretty_printer *.
11787 (dump_context::dump_loc): Call end_any_optinfo. Dump the location
11788 to any test pretty-printer.
11789 (make_item_for_dump_gimple_stmt): New function, adapted from
11790 optinfo::add_gimple_stmt.
11791 (dump_context::dump_gimple_stmt): Call it, and use the result,
11792 eliminating the direct usage of dump_file and alt_dump_file in
11793 favor of indirectly using them via emit_item.
11794 (make_item_for_dump_gimple_expr): New function, adapted from
11795 optinfo::add_gimple_expr.
11796 (dump_context::dump_gimple_expr): Call it, and use the result,
11797 eliminating the direct usage of dump_file and alt_dump_file in
11798 favor of indirectly using them via emit_item.
11799 (make_item_for_dump_generic_expr): New function, adapted from
11801 (dump_context::dump_generic_expr): Call it, and use the result,
11802 eliminating the direct usage of dump_file and alt_dump_file in
11803 favor of indirectly using them via emit_item.
11804 (make_item_for_dump_printf_va): New function, adapted from
11805 optinfo::add_printf_va.
11806 (make_item_for_dump_printf): New function.
11807 (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
11808 and use the result, eliminating the direct usage of dump_file and
11809 alt_dump_file in favor of indirectly using them via emit_item.
11810 (make_item_for_dump_dec): New function.
11811 (dump_context::dump_dec): Call it, and use the result,
11812 eliminating the direct usage of dump_file and alt_dump_file in
11813 favor of indirectly using them via emit_item.
11814 (make_item_for_dump_symtab_node): New function, adapted from
11815 optinfo::add_symtab_node.
11816 (dump_context::dump_symtab_node): Call it, and use the result,
11817 eliminating the direct usage of dump_file and alt_dump_file in
11818 favor of indirectly using them via emit_item.
11819 (dump_context::begin_scope): Reimplement, avoiding direct usage
11820 of dump_file and alt_dump_file in favor of indirectly using them
11822 (dump_context::emit_item): New member function.
11823 (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11824 Set up test pretty-printer on the underlying context. Call
11825 refresh_dumps_are_enabled.
11826 (temp_dump_context::~temp_dump_context): Call
11827 refresh_dumps_are_enabled.
11828 (temp_dump_context::get_dumped_text): New member function.
11829 (selftest::verify_dumped_text): New function.
11830 (ASSERT_DUMPED_TEXT_EQ): New macro.
11831 (selftest::test_capture_of_dump_calls): Run all tests twice, with
11832 and then without optinfo enabled. Add uses of
11833 ASSERT_DUMPED_TEXT_EQ to all tests. Add test of nested scopes.
11834 * dumpfile.h: Update comment for the dump_* API.
11835 * optinfo-emit-json.cc
11836 (selftest::test_building_json_from_dump_calls): Update for new
11837 param for temp_dump_context ctor.
11838 * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
11839 and "m_owned" field.
11840 (optinfo_item::~optinfo_item): Likewise.
11841 (optinfo::add_item): New member function.
11842 (optinfo::emit): Update comment.
11843 (optinfo::add_string): Delete.
11844 (optinfo::add_printf): Delete.
11845 (optinfo::add_printf_va): Delete.
11846 (optinfo::add_gimple_stmt): Delete.
11847 (optinfo::add_gimple_expr): Delete.
11848 (optinfo::add_tree): Delete.
11849 (optinfo::add_symtab_node): Delete.
11850 (optinfo::add_dec): Delete.
11851 * optinfo.h (class dump_context): New forward decl.
11852 (optinfo::add_item): New decl.
11853 (optinfo::add_string): Delete.
11854 (optinfo::add_printf): Delete.
11855 (optinfo::add_printf_va): Delete.
11856 (optinfo::add_gimple_stmt): Delete.
11857 (optinfo::add_gimple_expr): Delete.
11858 (optinfo::add_tree): Delete.
11859 (optinfo::add_symtab_node): Delete.
11860 (optinfo::add_dec): Delete.
11861 (optinfo::add_poly_int): Delete.
11862 (optinfo_item::optinfo_item): Remove "owned" param.
11863 (class optinfo_item): Remove field "m_owned".
11865 2018-07-31 Jozef Lawrynowicz <jozef.l@mittosystems.com>
11867 PR middle-end/86705
11868 * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
11869 MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
11870 requested variable alignment.
11871 (expand_one_ssa_partition): Likewise.
11872 (expand_one_var): Likewise.
11874 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11876 * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11877 to speculation_safe_value_not_needed.
11879 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11881 * targhooks.h (speculation_safe_value_not_needed): New prototype.
11882 * targhooks.c (speculation_safe_value_not_needed): New function.
11883 * target.def (have_speculation_safe_value): Update documentation.
11884 * doc/tm.texi: Regenerated.
11886 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11888 * config/aarch64/iterators.md (ALLI_TI): New iterator.
11889 * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
11891 (despeculate_copy<ALLI:mode>_insn): New insn.
11892 (despeculate_copyti_insn): New insn.
11893 (despeculate_simple<ALLI:mode>): New insn
11894 (despeculate_simpleti): New insn.
11895 * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
11897 (TARGET_SPECULATION_SAFE_VALUE): Redefine to
11898 aarch64_speculation_safe_value.
11899 (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
11901 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11903 * config/aarch64/aarch64-speculation.cc: New file.
11904 * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
11905 before pass_reorder_blocks.
11906 * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
11908 * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
11909 X14 and X15 when tracking speculation.
11910 * config/aarch64/aarch64.md (register name constants): Add
11911 SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
11912 (unspec): Add UNSPEC_SPECULATION_TRACKER.
11913 (speculation_barrier): New insn attribute.
11914 (cmp<mode>): Allow SP in comparisons.
11915 (speculation_tracker): New insn.
11916 (speculation_barrier): Add speculation_barrier attribute.
11917 * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
11918 * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
11919 * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
11921 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11923 * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
11924 aarch64_track_speculation is true.
11925 (tb<optab><mode>1): Likewise.
11926 * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
11927 generate CB[N]Z when tracking speculation.
11928 (aarch64_split_compare_and_swap): Likewise.
11929 (aarch64_split_atomic_op): Likewise.
11931 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11933 * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
11935 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11937 * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
11938 (speculation_barrier): New insn.
11940 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11942 * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
11943 * config/arm/arm.md (speculation_barrier): New expand.
11944 (speculation_barrier_insn): New pattern.
11946 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
11948 * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
11949 (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
11950 (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
11951 * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
11953 * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
11954 (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
11955 (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
11956 (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
11957 (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
11958 (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
11959 (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
11960 * builtins.c (expand_speculation_safe_value): New function.
11961 (expand_builtin): Call it.
11962 * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
11963 * doc/extend.texi: Document __builtin_speculation_safe_value.
11964 * doc/md.texi: Document "speculation_barrier" pattern.
11965 * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
11966 TARGET_HAVE_SPECULATION_SAFE_VALUE.
11967 * doc/tm.texi: Regenerated.
11968 * target.def (have_speculation_safe_value, speculation_safe_value): New
11970 * targhooks.c (default_have_speculation_safe_value): New function.
11971 (default_speculation_safe_value): New function.
11972 * targhooks.h (default_have_speculation_safe_value): Add prototype.
11973 (default_speculation_safe_value): Add prototype.
11975 2018-07-31 David Malcolm <dmalcolm@redhat.com>
11977 * dump-context.h (dump_context::dump_loc): New decl.
11978 * dumpfile.c (dump_context::dump_loc): New member function.
11979 (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
11980 and dump_gimple_stmt.
11981 (dump_context::dump_gimple_expr_loc): Likewise, using
11983 (dump_context::dump_generic_expr_loc): Likewise, using
11985 (dump_context::dump_printf_loc_va): Likewise, using
11987 (dump_context::begin_scope): Explicitly using the global function
11988 "dump_loc", rather than the member function.
11990 2018-07-31 Martin Sebor <msebor@redhat.com>
11992 PR tree-optimization/86741
11993 * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
11995 2018-07-31 Andreas Krebbel <krebbel@linux.ibm.com>
11997 * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
11998 depend on whether prefetch instructions will be emitted or not.
11999 Use TARGET_SETMEM_PFD for checking whether prefetch instructions
12000 will be emitted or not.
12001 * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
12002 (TARGET_SETMEM_PFD): New macros.
12004 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12006 * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
12007 (NULL_STMT_VEC_INFO): Delete.
12008 (stmt_vec_info::operator*): Likewise.
12009 (stmt_vec_info::operator gimple *): Likewise.
12010 * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
12011 of NULL_STMT_VEC_INFO.
12012 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12013 (vect_reassociating_reduction_p): Likewise.
12014 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12015 (vectorizable_store): Likewise.
12016 * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
12017 (vec_info::free_stmt_vec_infos): Likewise.
12019 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12021 * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
12022 * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
12024 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12026 * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
12027 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12028 (vec_info::free_stmt_vec_info): New private member functions.
12029 (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
12030 (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
12031 * tree-parloops.c (gather_scalar_reductions): Remove calls to
12032 set_stmt_vec_info_vec and free_stmt_vec_infos.
12033 * tree-vect-loop.c (_loop_vec_info): Remove call to
12034 set_stmt_vec_info_vec.
12035 * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
12036 (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
12037 * tree-vectorizer.c (vec_info::new_stmt_vec_info)
12038 (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
12039 (vec_info::free_stmt_vec_info): ...these new functions. Remove
12040 assignments in {vec_info::,}new_stmt_vec_info that are redundant
12041 with the clearing in the xcalloc.
12042 (stmt_vec_info_vec): Delete.
12043 (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
12044 (vectorize_loops): Likewise.
12045 (vec_info::~vec_info): Remove argument from call to
12046 free_stmt_vec_infos.
12047 (vec_info::add_stmt): Remove vinfo argument from call to
12050 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12052 * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
12053 rather than a gimple stmt.
12054 * tree-vect-stmts.c (free_stmt_vec_info): Likewise. Don't free
12055 information for pattern statements when passed the original
12056 statement; instead wait to be passed the pattern statement itself.
12057 Don't call set_vinfo_for_stmt here.
12058 (free_stmt_vec_infos): Update call to free_stmt_vec_info.
12059 * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
12060 stmt_vec_infos here.
12061 * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
12062 * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
12063 stmt_vec_infos entry.
12065 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12067 * tree-vectorizer.h (vec_info::replace_stmt): Declare.
12068 * tree-vectorizer.c (vec_info::replace_stmt): New function.
12069 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
12070 * tree-vect-stmts.c (vectorizable_call): Likewise.
12071 (vectorizable_simd_clone_call): Likewise.
12073 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12075 * tree-vectorizer.h (vec_info::remove_stmt): Declare.
12076 * tree-vectorizer.c (vec_info::remove_stmt): New function.
12077 * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
12078 * tree-vect-loop.c (vect_transform_loop): Likewise.
12079 * tree-vect-slp.c (vect_schedule_slp): Likewise.
12080 * tree-vect-stmts.c (vect_remove_stores): Likewise.
12082 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12084 * tree-vectorizer.h (vec_info::lookup_dr): New member function.
12085 (vect_dr_stmt): Delete.
12086 * tree-vectorizer.c (vec_info::lookup_dr): New function.
12087 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
12089 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12090 (vect_analyze_data_ref_dependence, vect_record_base_alignments)
12091 (vect_verify_datarefs_alignment, vect_peeling_supportable)
12092 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12093 (vect_analyze_data_refs): Likewise.
12094 (vect_slp_analyze_data_ref_dependence): Likewise. Take a vec_info
12096 (vect_find_same_alignment_drs): Likewise.
12097 (vect_slp_analyze_node_dependences): Update calls accordingly.
12098 (vect_analyze_data_refs_alignment): Likewise. Use vec_info::lookup_dr
12099 instead of DR_VECT_AUX.
12100 (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
12101 of a vector data references. Use vec_info::lookup_dr instead of
12103 (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
12104 (vect_enhance_data_refs_alignment): Likewise. Use vec_info::lookup_dr
12105 instead of DR_VECT_AUX.
12107 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12109 * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
12111 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12113 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12114 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12115 (vect_gen_prolog_loop_niters): Likewise.
12117 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12119 * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
12120 (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
12121 (vect_known_alignment_in_bytes, vect_dr_behavior)
12122 (vect_get_scalar_dr_size): Take references as dr_vec_infos
12123 instead of data_references. Update calls to other routines for
12124 which the same change has been made.
12125 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
12126 dr_vec_infos instead of stmt_vec_infos.
12127 (vect_analyze_data_ref_dependence): Update call accordingly.
12128 (vect_slp_analyze_data_ref_dependence)
12129 (vect_record_base_alignments): Use DR_VECT_AUX.
12130 (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
12131 (vect_update_misalignment_for_peel, verify_data_ref_alignment)
12132 (vector_alignment_reachable_p, vect_get_data_access_cost)
12133 (vect_peeling_supportable, vect_analyze_group_access_1)
12134 (vect_analyze_group_access, vect_analyze_data_ref_access)
12135 (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
12136 (vect_compile_time_alias, vect_small_gap_p)
12137 (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
12138 (vect_supportable_dr_alignment): Take references as dr_vec_infos
12139 instead of data_references. Update calls to other routines for
12140 which the same change has been made.
12141 (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
12142 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12143 (vect_slp_analyze_and_verify_node_alignment)
12144 (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
12145 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12146 (vect_setup_realignment): Use dr_vec_infos. Update calls after
12148 (_vect_peel_info::dr): Replace with...
12149 (_vect_peel_info::dr_info): ...this new field.
12150 (vect_peeling_hash_get_most_frequent)
12151 (vect_peeling_hash_choose_best_peeling): Update accordingly.
12152 (vect_peeling_hash_get_lowest_cost):
12153 (vect_enhance_data_refs_alignment): Likewise. Update calls to other
12154 routines for which the same change has been made.
12155 (vect_peeling_hash_insert): Likewise. Take a dr_vec_info instead of a
12157 * tree-vect-loop-manip.c (get_misalign_in_elems)
12158 (vect_gen_prolog_loop_niters): Use dr_vec_infos. Update calls after
12160 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12161 * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
12162 (vect_truncate_gather_scatter_offset, compare_step_with_zero)
12163 (get_group_load_store_type, get_negative_load_store_type)
12164 (vect_get_data_ptr_increment, vectorizable_store)
12165 (vectorizable_load): Likewise.
12166 (ensure_base_align): Take a dr_vec_info instead of a data_reference.
12167 Update calls to other routines for which the same change has been made.
12169 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12171 * tree-vectorizer.h (vec_info::move_dr): New member function.
12172 (dataref_aux): Rename to...
12173 (dr_vec_info): ...this and add "dr" and "stmt" fields.
12174 (_stmt_vec_info::dr_aux): Update accordingly.
12175 (_stmt_vec_info::data_ref_info): Delete.
12176 (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
12177 (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
12178 (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
12179 (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
12181 (STMT_VINFO_DATA_REF): Likewise. Turn into an lvalue.
12182 (STMT_VINFO_DR_INFO): New macro.
12183 (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
12184 (set_dr_misalignment): Update after rename of dataref_aux.
12185 (vect_dr_stmt): Move earlier in file. Return dr_aux.stmt.
12186 * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
12187 initialization of STMT_VINFO_DATA_REF.
12188 * tree-vectorizer.c (vec_info::move_dr): New function.
12189 * tree-vect-patterns.c (vect_recog_bool_pattern)
12190 (vect_recog_mask_conversion_pattern)
12191 (vect_recog_gather_scatter_pattern): Use it.
12192 * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
12193 the "dr" and "stmt" fields of dr_vec_info instead of
12194 STMT_VINFO_DATA_REF.
12196 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12198 * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
12199 (is_pattern_stmt_p): Use it.
12200 * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
12201 on pattern statements.
12203 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12205 * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
12206 original stmt as a stmt_vec_info rather than a gimple stmt.
12207 (vect_pattern_recog_1): Take the statement directly as a
12208 stmt_vec_info, rather than via a gimple_stmt_iterator.
12209 Update call to vect_mark_pattern_stmts.
12210 (vect_pattern_recog): Update calls accordingly.
12212 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12214 * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
12215 (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
12216 a vect_def_type for the first argument.
12217 * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
12218 (vect_get_vec_def_for_stmt_copy): Likewise. Return the original
12219 operand if it isn't defined by a vectorized statement.
12220 (vect_build_gather_load_calls): Remove the mask_dt argument and
12221 update calls to vect_get_vec_def_for_stmt_copy.
12222 (vectorizable_bswap): Likewise the dt argument.
12223 (vectorizable_call): Update calls to vectorizable_bswap and
12224 vect_get_vec_def_for_stmt_copy.
12225 (vectorizable_simd_clone_call, vectorizable_assignment)
12226 (vectorizable_shift, vectorizable_operation, vectorizable_condition)
12227 (vectorizable_comparison): Update calls to
12228 vect_get_vec_def_for_stmt_copy.
12229 (vectorizable_store): Likewise. Remove now-unnecessary calls to
12230 vect_is_simple_use.
12231 (vect_get_loop_based_defs): Remove dt argument and update call
12232 to vect_get_vec_def_for_stmt_copy.
12233 (vectorizable_conversion): Update calls to vect_get_loop_based_defs
12234 and vect_get_vec_def_for_stmt_copy.
12235 (vectorizable_load): Update calls to vect_build_gather_load_calls
12236 and vect_get_vec_def_for_stmt_copy.
12237 * tree-vect-loop.c (vect_create_epilog_for_reduction)
12238 (vectorizable_reduction, vectorizable_live_operation): Update calls
12239 to vect_get_vec_def_for_stmt_copy.
12241 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12243 * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
12244 and gimple stmt arguments with a stmt_vec_info.
12245 (vect_record_base_alignments): Update calls accordingly.
12246 * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
12247 and gimple stmt arguments with a stmt_vec_info.
12248 (vect_build_slp_tree_1): Remove vinfo argument and update call
12249 to vect_record_max_nunits.
12250 (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
12251 and vect_record_max_nunits.
12253 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12255 * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
12256 file and take a stmt_vec_info instead of a gimple stmt.
12257 (supportable_widening_operation, vect_finish_replace_stmt)
12258 (vect_finish_stmt_generation, vect_get_store_rhs)
12259 (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
12260 (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
12261 (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
12262 (vect_get_smallest_scalar_type, vect_check_gather_scatter)
12263 (vect_create_data_ref_ptr, bump_vector_ptr)
12264 (vect_permute_store_chain, vect_setup_realignment)
12265 (vect_transform_grouped_load, vect_record_grouped_load_vectors)
12266 (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
12267 (vectorizable_reduction, vectorizable_induction)
12268 (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
12269 (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
12270 than gimple stmts as arguments.
12271 * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
12272 (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
12273 (can_group_stmts_p, vect_check_gather_scatter)
12274 (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
12275 (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
12276 (vect_permute_load_chain, vect_shift_permute_load_chain)
12277 (vect_transform_grouped_load)
12278 (vect_record_grouped_load_vectors): Likewise.
12279 * tree-vect-loop.c (vect_fixup_reduc_chain)
12280 (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
12281 (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
12282 (vectorizable_reduction, vectorizable_induction)
12283 (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
12284 * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
12285 (vect_get_load_store_mask): Likewise.
12286 * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
12287 (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
12288 * tree-vect-stmts.c (vect_mark_relevant)
12289 (is_simple_and_all_uses_invariant)
12290 (exist_non_indexing_operands_for_use_p, process_use)
12291 (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
12292 (vect_get_vec_def_for_operand, vect_get_vec_defs)
12293 (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
12294 (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
12295 (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
12296 (get_negative_load_store_type, get_load_store_type)
12297 (vect_check_load_store_mask, vect_check_store_rhs)
12298 (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
12299 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12300 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12301 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12302 (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
12303 (vectorizable_load, vectorizable_condition, vectorizable_comparison)
12304 (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
12305 (supportable_widening_operation): Likewise.
12307 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12309 * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
12310 a stmt_vec_info instead of a gcall.
12311 (vect_check_gather_scatter): Update call accordingly.
12312 * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
12314 (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
12315 (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
12316 * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
12317 instead of a gimple stmt.
12318 (vect_transform_loop): Update calls accordingly.
12319 * tree-vect-slp.c (vect_split_slp_store_group): Take and return
12320 stmt_vec_infos instead of gimple stmts.
12321 (vect_analyze_slp_instance): Update use accordingly.
12322 * tree-vect-stmts.c (read_vector_array, write_vector_array)
12323 (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
12324 (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
12325 (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
12326 (vect_gen_widened_results_half, vect_get_loop_based_defs)
12327 (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
12328 Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
12329 down to subroutines.
12331 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12333 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
12334 of the worklist from a vector of gimple stmts to a vector of
12336 * tree-vect-stmts.c (vect_mark_relevant, process_use)
12337 (vect_mark_stmts_to_be_vectorized): Likewise
12339 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12341 * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
12342 statement before passing it to vect_analyze_stmt.
12343 (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
12344 the chain of phi vector definitions. Track the exit phi via its
12346 (vectorizable_reduction): Set cond_stmt_vinfo directly from the
12347 STMT_VINFO_REDUC_DEF.
12348 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
12349 stmt_vec_infos to handle the statement chains.
12350 (vect_get_slp_defs): Record the first statement in the node
12351 using a stmt_vec_info.
12352 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
12353 statements here and pass their stmt_vec_info down to subroutines.
12354 (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
12355 down to vect_finish_stmt_generation.
12356 (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
12357 (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
12358 stmt_vec_infos to subroutines.
12359 (vect_remove_stores): Use stmt_vec_infos to handle the statement
12362 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12364 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
12365 (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
12366 (vect_permute_store_chain, vect_setup_realignment)
12367 (vect_permute_load_chain, vect_shift_permute_load_chain)
12368 (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
12369 stmts internally, and when passing values to other vectorizer routines.
12370 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12371 * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
12372 (vect_analyze_loop_operations, get_initial_def_for_reduction)
12373 (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
12374 (vectorizable_reduction, vectorizable_induction)
12375 (vectorizable_live_operation, vect_transform_loop_stmt)
12376 (vect_transform_loop): Likewise.
12377 * tree-vect-patterns.c (vect_reassociating_reduction_p)
12378 (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
12379 (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
12380 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12381 (vect_slp_analyze_node_operations_1): Likewise.
12382 * tree-vect-stmts.c (vect_mark_relevant, process_use)
12383 (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
12384 (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
12385 (vect_finish_stmt_generation_1, get_group_load_store_type)
12386 (get_load_store_type, vect_build_gather_load_calls)
12387 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12388 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12389 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12390 (vectorizable_store, vectorizable_load, vectorizable_condition)
12391 (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
12392 (supportable_widening_operation): Likewise.
12393 (vect_get_vector_types_for_stmt): Likewise.
12394 * tree-vectorizer.h (vect_dr_behavior): Likewise.
12396 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12398 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12399 (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
12400 (vect_permute_store_chain, vect_permute_load_chain)
12401 (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
12402 repeated stmt_vec_info lookups.
12403 * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12404 (vect_update_ivs_after_vectorizer): Likewise.
12405 * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
12406 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12407 * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
12408 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12409 (vect_bb_slp_scalar_cost): Likewise.
12410 * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
12412 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12414 * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
12415 gcall rather than the generic gimple stmt to gimple_call_internal_fn.
12416 (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
12417 to get gassigns and gcalls, rather than operating on generc gimple
12419 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
12420 (vect_mark_stmts_to_be_vectorized, vectorizable_store)
12421 (vectorizable_load, vect_analyze_stmt): Likewise.
12422 * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
12424 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12426 * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
12427 return stmt_vec_infos rather than gimple stmts. Do not accept
12429 (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
12431 * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12432 Update use of get_later_stmt.
12433 (vect_get_constant_vectors): Update call accordingly.
12434 (vect_schedule_slp_instance): Likewise
12435 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
12436 (vect_slp_analyze_instance_dependence): Likewise.
12437 (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
12439 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12441 * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
12442 (stmt_info_for_cost::stmt_info): ...this new field.
12443 (add_stmt_costs): Update accordingly.
12444 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12445 (vect_get_known_peeling_cost): Likewise.
12446 (vect_estimate_min_profitable_iters): Likewise.
12447 * tree-vect-stmts.c (record_stmt_cost): Likewise.
12449 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12451 * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
12452 from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12453 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12455 * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
12457 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12459 * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
12460 a gimple stmt to a stmt_vec_info.
12461 * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12463 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12465 * tree-vectorizer.h (vec_info::grouped_stores): Change from
12466 an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12467 (_loop_vec_info::reduction_chains): Likewise.
12468 * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
12470 * tree-vect-slp.c (vect_analyze_slp): Likewise.
12472 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12474 * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
12475 a gimple stmt to a stmt_vec_info.
12476 (_stmt_vec_info::next_element): Likewise.
12477 * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
12478 (vect_slp_analyze_and_verify_node_alignment)
12479 (vect_analyze_group_access_1, vect_analyze_group_access)
12480 (vect_small_gap_p, vect_prune_runtime_alias_test_list)
12481 (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
12482 (vect_supportable_dr_alignment): Update accordingly.
12483 * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
12484 (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
12485 (vect_is_simple_reduction, vectorizable_reduction): Likewise.
12486 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12487 * tree-vect-slp.c (vect_build_slp_tree_1)
12488 (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
12489 (vect_split_slp_store_group, vect_analyze_slp_instance)
12490 (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
12491 * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
12492 (get_group_load_store_type, get_load_store_type)
12493 (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
12494 (vect_transform_stmt, vect_remove_stores): Likewise.
12496 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12498 * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
12499 than a gimple stmt.
12500 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12501 (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
12502 (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
12503 (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
12504 (vector_alignment_reachable_p, vect_get_data_access_cost)
12505 (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
12506 (vect_peeling_supportable, vect_enhance_data_refs_alignment)
12507 (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12508 (vect_analyze_group_access_1, vect_analyze_group_access)
12509 (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
12510 (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
12511 (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
12512 result of vect_dr_stmt and use the stmt_vec_info instead of
12513 the associated gimple stmt.
12514 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12515 (vect_gen_prolog_loop_niters): Likewise.
12516 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12518 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12520 * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
12521 to a vec<stmt_vec_info>.
12522 * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
12523 (vect_create_new_slp_node): Take a vec<gimple *> instead of a
12524 vec<stmt_vec_info>.
12525 (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
12526 to a vec<stmt_vec_info>.
12527 (bst_traits::value_type, bst_traits::value_type): Likewise.
12528 (bst_traits::hash): Update accordingly.
12529 (vect_get_and_check_slp_defs): Change the stmts parameter from
12530 a vec<gimple *> to a vec<stmt_vec_info>.
12531 (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
12532 (vect_build_slp_tree): Likewise.
12533 (vect_build_slp_tree_2): Likewise. Update uses of
12534 SLP_TREE_SCALAR_STMTS.
12535 (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
12536 (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
12537 (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
12538 (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
12539 (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
12540 (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
12541 (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
12542 (vect_get_constant_vectors, vect_get_slp_defs)
12543 (vect_transform_slp_perm_load, vect_schedule_slp_instance)
12544 (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
12545 (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
12546 instead of gimple stmts.
12547 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
12548 the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
12549 (vect_slp_analyze_instance_dependence): Update uses of
12550 SLP_TREE_SCALAR_STMTS.
12551 (vect_slp_analyze_and_verify_node_alignment): Likewise.
12552 (vect_slp_analyze_and_verify_instance_alignment): Likewise.
12553 * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
12554 (get_initial_defs_for_reduction): Likewise.
12555 (vect_create_epilog_for_reduction): Likewise.
12556 (vectorize_fold_left_reduction): Likewise.
12557 * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
12558 (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
12559 (can_vectorize_live_stmts): Likewise.
12561 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12563 * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
12564 auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12565 (vect_force_simple_reduction): Take and return stmt_vec_infos rather
12567 * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
12569 (gather_scalar_reductions): Update after above interface changes.
12570 * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
12571 (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12573 (vect_force_simple_reduction): Likewise.
12574 * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
12575 LOOP_VINFO_REDUCTIONS.
12576 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12578 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12580 * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
12581 a gimple stmt to a stmt_vec_info.
12582 * tree-vect-loop.c (vect_active_double_reduction_p)
12583 (vect_force_simple_reduction, vectorizable_reduction): Update
12586 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12588 * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
12589 vec<gimple *> to a vec<stmt_vec_info>.
12590 * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
12591 the reduction_phis argument from a vec<gimple *> to a
12592 vec<stmt_vec_info>.
12593 (vectorizable_reduction): Likewise the phis local variable that
12594 is passed to vect_create_epilog_for_reduction. Update for new type
12595 of SLP_TREE_VEC_STMTS.
12596 (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
12597 (vectorizable_live_operation): Likewise.
12598 * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
12599 (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
12601 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12603 * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
12604 a gimple stmt to a stmt_vec_info.
12605 (vectorizable_condition, vectorizable_live_operation)
12606 (vectorizable_reduction, vectorizable_induction): Pass back the
12607 vectorized statement as a stmt_vec_info.
12608 * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
12609 use of STMT_VINFO_VEC_STMT.
12610 * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
12611 accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
12612 as stmt_vec_infos rather than gimple stmts.
12613 (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
12614 to a stmt_vec_info.
12615 (vectorizable_live_operation): Likewise.
12616 (vectorizable_reduction, vectorizable_induction): Likewise,
12617 updating use of STMT_VINFO_VEC_STMT.
12618 * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
12619 of STMT_VINFO_VEC_STMT.
12620 (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
12621 (vectorizable_simd_clone_call, vectorizable_conversion)
12622 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12623 (vectorizable_store, vectorizable_load, vectorizable_condition)
12624 (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
12625 from a gimple stmt to a stmt_vec_info.
12626 (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT. Pass a
12627 pointer to a stmt_vec_info to the vectorizable_* routines.
12629 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12631 * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
12632 a gimple stmt to a stmt_vec_info.
12633 (is_pattern_stmt_p): Update accordingly.
12634 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
12635 (vect_record_grouped_load_vectors): Likewise.
12636 * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
12637 (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
12638 (vect_model_reduction_cost): Likewise.
12639 (vect_create_epilog_for_reduction): Likewise.
12640 (vectorizable_reduction, vectorizable_induction): Likewise.
12641 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12642 Return the stmt_vec_info for the pattern statement.
12643 (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
12644 (vect_split_statement, vect_mark_pattern_stmts): Likewise.
12645 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12646 (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
12647 * tree-vect-stmts.c (vect_mark_relevant): Likewise.
12648 (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
12649 (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
12650 (free_stmt_vec_info, vect_is_simple_use): Likewise.
12652 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12654 * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
12655 (vect_finish_stmt_generation): Likewise.
12656 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12657 (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
12658 (vect_build_gather_load_calls): Use the return value of the above
12659 functions instead of a separate call to vinfo_for_stmt. Use narrow
12660 scopes for the input gimple stmt and wider scopes for the associated
12661 stmt_vec_info. Use vec_info::lookup_def when setting these
12662 stmt_vec_infos from an SSA_NAME definition.
12663 (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12664 (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12665 (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12666 (vectorizable_store, vectorizable_load, vectorizable_condition)
12667 (vectorizable_comparison): Likewise.
12668 * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
12669 (vectorizable_reduction): Likewise.
12671 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12673 * tree-vectorizer.h (vect_is_simple_use): Add an optional
12674 stmt_vec_info * parameter before the optional gimple **.
12675 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12676 (process_use, vect_get_vec_def_for_operand_1): Update callers.
12677 (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
12678 * tree-vect-loop.c (vectorizable_reduction): Likewise.
12679 (vectorizable_live_operation): Likewise.
12680 * tree-vect-patterns.c (type_conversion_p): Likewise.
12681 (vect_look_through_possible_promotion): Likewise.
12682 (vect_recog_rotate_pattern): Likewise.
12683 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12685 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12687 * tree-vectorizer.h (stmt_vec_info): Temporarily change from
12688 a typedef to a wrapper class.
12689 (NULL_STMT_VEC_INFO): New macro.
12690 (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
12691 (stmt_vec_info::operator*): New function.
12692 (stmt_vec_info::operator gimple *): Likewise.
12693 (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
12694 (add_stmt_costs): Likewise.
12695 * tree-vect-loop-manip.c (iv_phi_p): Likewise.
12696 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12697 (vect_get_known_peeling_cost): Likewise.
12698 (vect_estimate_min_profitable_iters): Likewise.
12699 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12700 * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
12701 * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12702 (vectorizable_store, free_stmt_vec_infos): Likewise.
12703 (new_stmt_vec_info): Change return type of xcalloc to
12706 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12708 * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
12709 * tree-vectorizer.c (vec_info::lookup_single_use): New function.
12710 * tree-vect-loop.c (vectorizable_reduction): Use it instead of
12711 a single_imm_use-based sequence.
12712 * tree-vect-stmts.c (supportable_widening_operation): Likewise.
12714 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12716 * tree-vectorizer.h (vec_info::lookup_def): Declare.
12717 * tree-vectorizer.c (vec_info::lookup_def): New function.
12718 * tree-vect-patterns.c (vect_get_internal_def): Use it.
12719 (vect_widened_op_tree): Likewise.
12720 * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12721 * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
12722 (vectorizable_reduction): Likewise.
12723 (vect_valid_reduction_input_p): Take a stmt_vec_info instead
12725 (vect_is_slp_reduction): Update calls accordingly. Use
12726 vec_info::lookup_def.
12727 (vect_is_simple_reduction): Likewise
12728 * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
12730 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12732 * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
12733 * tree-vectorizer.c (vec_info::lookup_stmt): New function.
12734 * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
12736 (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
12737 (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
12738 (vect_update_vf_for_slp, vect_analyze_loop_operations)
12739 (vect_is_slp_reduction, vectorizable_induction)
12740 (vect_transform_loop_stmt, vect_transform_loop): Likewise.
12741 * tree-vect-patterns.c (vect_init_pattern_stmt):
12742 (vect_determine_min_output_precision_1, vect_determine_precisions)
12743 (vect_pattern_recog): Likewise.
12744 * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
12745 * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
12746 * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
12747 * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12748 (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
12749 (vect_detect_hybrid_slp): Likewise. Change the walk_stmt_info
12750 info field from a loop to a loop_vec_info.
12752 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12754 * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
12755 (vec_info::add_stmt): Declare.
12756 * tree-vectorizer.c (vec_info::add_stmt): New function.
12757 * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
12758 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
12759 (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12760 (vectorizable_induction): Likewise.
12761 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
12762 * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12763 (vectorizable_simd_clone_call, vectorizable_store): Likewise.
12764 (vectorizable_load): Likewise.
12765 * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12766 (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
12767 (vect_recog_gather_scatter_pattern): Likewise.
12768 (append_pattern_def_seq): Likewise. Remove a check that is
12769 performed by add_stmt itself.
12771 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12773 * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
12774 which make_ssa_name was called with new_stmt before new_stmt
12777 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12779 * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
12781 (vect_is_slp_reduction): ...here...
12782 (vect_is_simple_reduction): ...and here. Remove repetition of tests
12783 that are already known to be false.
12785 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12787 * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
12788 * tree-vect-slp.c (vect_free_slp_tree): Likewise. Don't update
12789 STMT_VINFO_NUM_SLP_USES when it's true.
12790 (vect_free_slp_instance): Add a final_p parameter and pass it to
12791 vect_free_slp_tree.
12792 (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
12793 (vect_analyze_slp_instance): Likewise.
12794 (vect_slp_analyze_operations): Likewise.
12795 (vect_slp_analyze_bb_1): Likewise.
12796 * tree-vectorizer.c (vec_info): Likewise.
12797 * tree-vect-loop.c (vect_transform_loop): Likewise.
12799 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12801 * tree-vect-loop.c (vectorizable_reduction): Assert that the
12802 function is not called for second and subsequent members of
12805 2018-07-31 Richard Sandiford <richard.sandiford@arm.com>
12807 * tree-vect-loop.c (get_initial_def_for_reduction): Move special
12808 cases for nested loops from here to ...
12809 (vect_create_epilog_for_reduction): ...here. Only call
12810 vect_is_simple_use for inner-loop reductions.
12812 2018-07-31 Martin Liska <mliska@suse.cz>
12814 PR gcov-profile/85338
12815 PR gcov-profile/85350
12816 PR gcov-profile/85372
12817 * profile.c (struct location_triplet): New.
12818 (struct location_triplet_hash): Likewise.
12819 (output_location): Do not output a BB that
12820 is already recorded for a line.
12821 (branch_prob): Use streamed_locations.
12823 2018-07-31 Martin Liska <mliska@suse.cz>
12825 PR gcov-profile/85370
12826 * coverage.c (coverage_begin_function): Do not mark target
12827 clones as artificial functions.
12829 2018-07-31 Martin Liska <mliska@suse.cz>
12831 PR gcov-profile/83813
12832 PR gcov-profile/84758
12833 PR gcov-profile/85217
12834 PR gcov-profile/85332
12835 * profile.c (branch_prob): Do not record GOTO expressions
12836 for GIMPLE statements which locations are already streamed.
12838 2018-07-31 Olivier Hainque <hainque@adacore.com>
12840 * gcc.c (handle_spec_function): Accept a soft_matched_part
12841 argument, as do_spec_1. Pass it down to ...
12842 (eval_spec_function): Accept a soft_matched_part argument,
12843 and pass it down to ...
12844 (do_spec_2): Accept a soft_matched_part argument, and pass
12845 it down to do_spec_1.
12846 (do_spec_1): Pass soft_matched_part to handle_spec_function.
12847 (handle_braces): Update call to handle_spec_function.
12848 (driver::set_up_specs): Update calls to do_spec_2.
12849 (compare_debug_dump_opt_spec_function): Likewise.
12850 (compare_debug_self_opt_spec_function): Likewise.
12852 2018-07-31 Olivier Hainque <hainque@adacore.com>
12854 * common.opt (nolibc): New option.
12855 * doc/invoke.texi (Link Options): Document it.
12856 * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
12857 * config/alpha/linux.h: Likewise.
12858 * config/arc/elf.h: Likewise.
12859 * config/arm/uclinux-elf.h: Likewise.
12860 * config/arm/unknown-elf.h: Likewise.
12861 * config/avr/avrlibc.h: Likewise.
12862 * config/bfin/bfin.h: Likewise.
12863 * config/bfin/linux.h: Likewise.
12864 * config/bfin/uclinux.h: Likewise.
12865 * config/darwin.h: Likewise.
12866 * config/darwin10.h: Likewise.
12867 * config/darwin12.h: Likewise.
12868 * config/gnu-user.h: Likewise.
12869 * config/lm32/uclinux-elf.h: Likewise.
12870 * config/pa/pa-hpux11.h: Likewise.
12871 * config/pa/pa64-hpux.h: Likewise.
12872 * config/sparc/sparc.h: Likewise.
12874 2018-07-31 Olivier Hainque <hainque@adacore.com>
12876 * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
12877 undefined variables.
12879 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12882 * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
12883 instead of GEN_INT.
12885 2018-07-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
12887 * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
12888 terminated string literal.
12890 2018-07-30 Segher Boessenkool <segher@kernel.crashing.org>
12892 PR rtl-optimization/85160
12893 * combine.c (is_just_move): New function.
12894 (try_combine): Allow combining two instructions into two if neither of
12895 the original instructions was a move.
12897 2018-07-30 Alexander Monakov <amonakov@ispras.ru>
12900 * doc/extend.texi (Global Register Variables): Discourage use of type
12902 (Local Register Variables): Likewise.
12904 2018-07-30 Richard Sandiford <richard.sandiford@arm.com>
12906 PR tree-optimization/86506
12907 * hwint.h (ceil_log2): Resync with hwint.c implementation.
12909 2018-07-30 Ilya Leoshkevich <iii@linux.ibm.com>
12912 * lra-constraints.c (spill_hard_reg_in_range): When selecting the
12913 hard_regno, make sure no insn between `from` and `to` clobbers it.
12915 2018-07-30 Cesar Philippidis <cesar@codesourcery.com>
12916 Tom de Vries <tdevries@suse.de>
12918 * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
12919 (PTX_DEFAULT_RUNTIME_DIM): ... this.
12920 (nvptx_goacc_validate_dims): Set default worker and gang dims to
12921 PTX_DEFAULT_RUNTIME_DIM.
12922 (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
12924 2018-07-29 John David Anglin <danglin@gcc.gnu.org>
12926 * config/pa/pa.c (pa_output_addr_vec): Align address table.
12927 * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
12928 * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
12930 2018-07-27 Michael Meissner <meissner@linux.ibm.com>
12932 * config/rs6000/constraints.md (wG constraint): Delete, no longer
12934 * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
12935 predicate to reflect toc fusion has been deleted.
12936 (toc_fusion_mem_raw): Delete, no longer used.
12937 (toc_fusion_mem_wrapped): Likewise.
12938 * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
12940 * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
12941 Delete, no longer used.
12942 * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
12943 meant to be used for toc fusion.
12944 (rs6000_debug_print_mode): Delete toc fusion debugging.
12945 (rs6000_debug_reg_global): Likewise.
12946 (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
12947 fusion and secondary reload support that were never used.
12948 (rs6000_option_override_internal): Delete TOC fusion, that was only
12949 partially defined, and it did not work unless you also used the
12951 (rs6000_legitimate_address_p): Delete TOC fusion support.
12952 (rs6000_opt_masks): Likewise.
12953 (fusion_wrap_memory_address): Delete function, no longer used.
12954 (fusion_split_address); Delete TOC fusion support.
12955 * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
12956 longer used with toc fusion being deleted.
12957 (TARGET_TOC_FUSION_FP): Likewise.
12958 * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
12960 (toc fusion spliter): Delete TOC fusion support.
12961 (toc_fusionload_<mode>): Likewise.
12962 (toc_fusionload_di): Likewise.
12963 (fusion_gpr_load_<mode>): Delete generator function, this insn no
12964 longer needs to be named. Rename predicate to delete TOC fusion.
12965 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12966 (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12967 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12968 (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12969 (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
12971 2018-07-27 Kelvin Nilsen <kelvin@gcc.gnu.org>
12973 * doc/extend.texi (Basic PowerPC Built-in Functions Available on
12974 ISA 2.05): Replace __uint128_t with __uint128 and __int128_t with
12975 __int128 in built-in function prototypes.
12976 (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
12977 (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
12979 2018-07-27 Martin Sebor <msebor@redhat.com>
12981 PR tree-optimization/86696
12982 * tree-ssa-strlen.c (get_min_string_length): Handle all integer
12983 types, including enums.
12984 (handle_char_store): Be prepared for the above function to fail.
12986 2018-07-26 Qing Zhao <qing.zhao@oracle.com>
12988 * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
12989 when optimization level is lower than 2 or optimize for size.
12991 2018-07-26 Martin Sebor <msebor@redhat.com>
12993 PR tree-optimization/86043
12994 PR tree-optimization/86042
12995 * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
12996 (get_string_cst_length): Rename...
12997 (get_min_string_length): ...to this. Add argument.
12998 (handle_char_store): Extend to handle multi-character stores by
13000 * tree.c (initializer_zerop): Use new argument. Handle MEM_REF.
13001 * tree.h (initializer_zerop): Add argument.
13003 2018-07-26 Jakub Jelinek <jakub@redhat.com>
13005 PR middle-end/86660
13006 * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
13007 declare target to variables if they have always,{to,from,tofrom} map
13010 2018-07-26 Martin Liska <mliska@suse.cz>
13013 * lto-wrapper.c: Add linker_output as prefix
13014 for ltrans_output_file.
13016 2018-07-26 Segher Boessenkool <segher@kernel.crashing.org>
13018 PR rtl-optimization/85805
13019 * combine.c (reg_nonzero_bits_for_combine): Only use the last set
13020 value for hard registers if that was written in the same mode.
13022 2018-07-26 Martin Liska <mliska@suse.cz>
13024 PR gcov-profile/86536
13025 * gcov.c (format_gcov): Use printf format %.*f directly
13026 and do not handle special values.
13028 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13030 * common/config/arc/arc-common.c (arc_option_optimization_table):
13031 Update default optimizations for size.
13033 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13035 * config/arc/arc.md (movsf_insn): Add short instruction selection.
13036 * config/arc/constraints.md (CfZ): New constraint.
13037 * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
13038 (subsf3_fpu): Likewise.
13039 (cmpsf_fpu): Likewise.
13040 (cmpsf_fpu_uneq): Likewise.
13042 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13044 * config/arc/arc.c (compact_memory_operand_p): Check for uncached
13046 (arc_is_uncached_mem_p): uncached applies to both the variable and
13049 2018-07-25 Claudiu Zissulescu <claziss@synopsys.com>
13051 * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
13054 2018-07-25 David Malcolm <dmalcolm@redhat.com>
13056 * optinfo-emit-json.cc (class optrecord_json_writer): Convert
13057 field "m_scopes" from vec to auto_vec.
13059 2018-07-25 Martin Liska <mliska@suse.cz>
13061 * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
13064 2018-07-25 Richard Biener <rguenther@suse.de>
13067 * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
13068 special wrt context_die late.
13069 (gen_subprogram_die): Re-use DIEs in local scope.
13071 2018-07-25 Richard Sandiford <richard.sandiford@arm.com>
13073 PR tree-optimization/86644
13074 * hwint.c (ceil_log2): Fix comment. Return 0 for 0.
13076 2018-07-25 Martin Liska <mliska@suse.cz>
13078 PR middle-end/86645
13079 * dumpfile.c: And excluded values with TDF_ALL_VALUES.
13080 * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
13082 2018-07-25 Martin Liska <mliska@suse.cz>
13085 * params.def: Explain ASan abbreviation and provide
13086 a documentation link.
13088 2018-07-24 Martin Sebor <msebor@redhat.com>
13090 PR tree-optimization/86622
13091 PR tree-optimization/86532
13092 * builtins.h (string_length): Declare.
13093 * builtins.c (c_strlen): Correct handling of non-constant offsets.
13094 (check_access): Be prepared for non-constant length ranges.
13095 (string_length): Make extern.
13096 * expr.c (string_constant): Only handle the minor non-constant
13097 array index. Use string_constant to compute the length of
13098 a generic string constant.
13100 2018-07-24 Richard Sandiford <richard.sandiford@arm.com>
13102 PR tree-optimization/86618
13103 * tree-vect-stmts.c (vectorizable_call): Don't take the address
13104 of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
13106 2018-07-24 David Malcolm <dmalcolm@redhat.com>
13108 PR tree-optimization/86636
13109 * json.cc (json::object::set): Fix comment. Add assertions.
13110 (json::array::append): Move here from json.h. Add comment and an
13112 (json::string::string): Likewise.
13113 * json.h (json::array::append): Move to json.cc.
13114 (json::string::string): Likewise.
13115 * optinfo-emit-json.cc
13116 (optrecord_json_writer::impl_location_to_json): Assert that we
13117 aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
13118 wrapper around it. Expand the location once, rather than three
13120 (optrecord_json_writer::inlining_chain_to_json): Fix the check for
13121 UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
13123 (optrecord_json_writer::optinfo_to_json): Likewise, in four
13124 places. Fix some overlong lines.
13126 2018-07-24 Matthew Malcomson <matthew.malcomson@arm.com>
13128 * config/aarch64/aarch64-simd.md
13129 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
13130 (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
13131 (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
13132 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
13133 (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
13134 (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
13135 (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
13136 (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
13137 (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
13139 2018-07-24 Jakub Jelinek <jakub@redhat.com>
13141 PR middle-end/86627
13142 * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
13143 and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
13144 and abs_d == d, do the power of two handling if profitable.
13146 2018-07-24 Richard Biener <rguenther@suse.de>
13148 * match.pd: Add BIT_FIELD_REF canonicalizations.
13150 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13153 * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
13155 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13157 * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
13158 terminated STRING_CST object.
13160 2018-07-23 Bernd Edlinger <bernd.edlinger@hotmail.de>
13162 hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
13164 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
13166 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
13167 * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
13168 * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
13169 the elements into a register.
13170 (rs6000_split_v4si_init_di_reg): Delete.
13171 (rs6000_split_v4si_init): Delete.
13172 * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
13173 (vsx_init_v4si): Rewrite as a define_expand.
13175 2018-07-23 Segher Boessenkool <segher@kernel.crashing.org>
13177 * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
13178 zero_extend argument from memory): New.
13180 2018-07-22 Martin Sebor <msebor@redhat.com>
13183 * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
13184 diagnosing calls with unknown arguments unless -Walloca-larger-than
13185 is restricted to less than PTRDIFF_MAX bytes.
13187 2018-07-22 Gerald Pfeifer <gerald@pfeifer.com>
13189 * doc/gcov.texi (Invoking Gcov): Editorial changes.
13191 2018-07-20 David Malcolm <dmalcolm@redhat.com>
13193 * pretty-print.c (text_info::set_location): Remove redundant
13194 "line_table" parameter from call to rich_location::set_range.
13196 2018-07-20 Martin Sebor <msebor@redhat.com>
13198 PR middle-end/82063
13199 * builtins.c (expand_builtin_alloca): Adjust.
13200 * calls.c (alloc_max_size): Simplify.
13201 * cgraphunit.c (cgraph_node::expand): Adjust.
13202 * common.opt (larger_than_size, warn_frame_larger_than): Remove
13204 (frame_larger_than_size): Same.
13205 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
13206 to take a HOST_WIDE_INT argument and accept a byte-size suffix.
13208 * doc/invoke.texi (GCC Command Options): Document option arguments.
13209 Explain byte-size arguments and suffixes.
13210 (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
13211 (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
13212 (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
13213 * doc/options.texi (UInteger): Expand.
13214 (Host_Wide_Int, ByteSize): Document new properties.
13215 * final.c (final_start_function_1): Include sizes in an error message.
13216 * function.c (frame_offset_overflow): Same.
13217 * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
13218 (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
13219 Diagnose unbounded alloca calls only for limits of less than
13221 (alloca_call_type): Adjust. Diagnose possibly out-of-bounds alloca
13222 calls and VLA size only for limits of less than PTRDIFF_MAX. Same
13224 (pass_walloca::execute): Adjust. Diagnose alloca calls in loops
13225 only for limits of less than PTRDIFF_MAX.
13226 * langhooks-def.h (lhd_handle_option): Change function argument
13228 * langhooks.c (lhd_handle_option): Same.
13229 * langhooks.h (handle_option): Same.
13230 * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
13232 (var_type, var_type_struct): Same.
13233 (var_set): Handle ByteSize flag.
13234 * optc-gen.awk: Add comments to output to ease debugging. Make
13235 use of HOST_WIDE_INT where appropriate.
13236 * opts-gen-save.awk: Use %lx to format unsigned long.
13237 * opth-gen.awk: Change function argument to HOST_WIDE_INT.
13238 * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
13239 arguments. Parse bytes-size suffixes.
13240 (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
13241 (enum_value_to_arg): Same.
13242 (decode_cmdline_option): Handle cl_host_wide_int. Adjust.
13243 (handle_option): Adjust.
13244 (generate_option): Change function argument to HOST_WIDE_INT.
13245 (cmdline_handle_error): Adjust.
13246 (read_cmdline_option): Change function argument to HOST_WIDE_INT.
13247 (set_option): Change function argument to HOST_WIDE_INT.
13248 (option_enabled): Handle cl_host_wide_int.
13249 (get_option_state): Handle CLVC_SIZE.
13250 (control_warning_option): Same.
13251 * opts.c (common_handle_option): Change function argument to
13252 HOST_WIDE_INT. Remove handling of OPT_Walloca_larger_than_ and
13253 OPT_Wvla_larger_than_.
13254 * opts.h (enum cl_var_type): Add an enumerator.
13255 * stor-layout.c (layout_decl): Print a more meaningful warning.
13256 * toplev.c (output_stack_usage): Adjust.
13258 2018-07-20 Qing Zhao <qing.zhao@oracle.com>
13260 * builtins.c (expand_builtin_memcmp): Delete the last parameter for
13261 call to inline_expand_builtin_string_cmp.
13262 (expand_builtin_strcmp): Likewise.
13263 (expand_builtin_strncmp): Likewise.
13264 (inline_string_cmp): Delete the last parameter, change char_type_node
13265 to unsigned_char_type_node for strcmp/strncmp, add conversions to the
13267 (inline_expand_builtin_string_cmp): Delete the last parameter, give up
13268 the inlining expansion on target where the type of the call has same or
13269 narrower precision than unsigned char.
13271 2018-07-20 David Malcolm <dmalcolm@redhat.com>
13273 * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
13274 (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
13275 * common.opt (fsave-optimization-record): New option.
13276 * coretypes.h (struct kv_pair): Move here from dumpfile.c.
13277 * doc/invoke.texi (-fsave-optimization-record): New option.
13278 * dumpfile.c: Include "optinfo-emit-json.h".
13279 (struct kv_pair): Move to coretypes.h.
13280 (optgroup_options): Make non-static.
13281 (dump_context::end_scope): Call
13282 optimization_records_maybe_pop_dump_scope.
13283 * dumpfile.h (optgroup_options): New decl.
13284 * json.cc: New file.
13285 * json.h: New file.
13286 * optinfo-emit-json.cc: New file.
13287 * optinfo-emit-json.h: New file.
13288 * optinfo.cc: Include "optinfo-emit-json.h".
13289 (optinfo::emit): Call optimization_records_maybe_record_optinfo.
13290 (optinfo_enabled_p): Check optimization_records_enabled_p.
13291 (optinfo_wants_inlining_info_p): Likewise.
13292 * optinfo.h: Update comment.
13293 * profile-count.c (profile_quality_as_string): New function.
13294 * profile-count.h (profile_quality_as_string): New decl.
13295 (profile_count::quality): New accessor.
13296 * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
13297 and optinfo_emit_json_cc_tests.
13298 * selftest.h (selftest::json_cc_tests): New decl.
13299 (selftest::optinfo_emit_json_cc_tests): New decl.
13300 * toplev.c: Include "optinfo-emit-json.h".
13301 (compile_file): Call optimization_records_finish.
13302 (do_compile): Call optimization_records_start.
13303 * tree-ssa-live.c: Include optinfo.h.
13304 (remove_unused_scope_block_p): Retain inlining information if
13305 optinfo_wants_inlining_info_p returns true.
13307 2018-07-20 Richard Biener <rguenther@suse.de>
13310 * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
13311 to cover -flto-partition=none.
13313 2018-07-20 Martin Liska <mliska@suse.cz>
13315 * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
13316 (get_decl_source_range): Remove unused function.
13318 2018-07-20 Richard Biener <rguenther@suse.de>
13320 * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
13321 (struct vn_phi_s): Likewise.
13322 (struct vn_reference_s): Likewise.
13323 * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
13324 for searching the slot of an entry known to be in the hash itself.
13325 (vn_phi_hasher::equal): Likewise.
13326 (vn_reference_hasher::equal): Likewise.
13327 (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
13329 (optimistic_info, current_info): Remove, keeping only valid_info.
13330 (vn_reference_lookup_1): Remove fallback lookup.
13331 (vn_reference_lookup_2): Likewise.
13332 (vn_nary_op_lookup_1): Likewise.
13333 (vn_phi_lookup): Likewise.
13334 (vn_nary_build_or_lookup_1): Make sure to not chain the built
13336 (vn_reference_insert): Adjust, chain the inserted hash element
13337 at last_inserted_ref.
13338 (vn_reference_insert_pieces): Likewise.
13339 (visit_reference_op_call): Likewise.
13340 (vn_nary_op_insert_into): Chain the inserted hash element at
13341 last_inserted_nary.
13342 (vn_nary_op_insert_pieces): Adjust.
13343 (vn_nary_op_insert): Likewise.
13344 (vn_nary_op_insert_stmt): Likewise.
13345 (vn_phi_insert): Adjust, chain the inserted hash element at
13347 (process_scc): Remove clearing and copying the optimistic
13348 table. Instead remove elements inserted during an optimistic
13349 iteration from the single table we maintain.
13350 (init_scc_vn): Adjust.
13351 (free_scc_vn): Likewise.
13352 (sccvn_dom_walker::record_cond): Likewise.
13353 (sccvn_dom_walker::after_dom_children): Likewise.
13355 2018-07-19 Martin Sebor <msebor@redhat.com>
13357 PR tree-optimization/84047
13358 PR tree-optimization/83776
13359 * tree-vrp.c (vrp_prop::check_mem_ref): New function.
13360 (check_array_bounds): Call it.
13362 2018-07-19 Martin Sebor <msebor@redhat.com>
13364 * align.h (align_flags): Use member initialization.
13366 2018-07-19 David Malcolm <dmalcolm@redhat.com>
13368 * Makefile.in (OBJS): Add optinfo.o.
13369 * coretypes.h (class symtab_node): New forward decl.
13370 (struct cgraph_node): New forward decl.
13371 (class varpool_node): New forward decl.
13372 * dump-context.h: New file.
13373 * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
13375 (refresh_dumps_are_enabled): Use optinfo_enabled_p.
13376 (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
13377 (set_alt_dump_file): Likewise.
13378 (dump_context::~dump_context): New dtor.
13379 (dump_gimple_stmt): Move implementation to...
13380 (dump_context::dump_gimple_stmt): ...this new member function.
13381 Add the stmt to any pending optinfo, creating one if need be.
13382 (dump_gimple_stmt_loc): Move implementation to...
13383 (dump_context::dump_gimple_stmt_loc): ...this new member function.
13384 Start a new optinfo and add the stmt to it.
13385 (dump_gimple_expr): Move implementation to...
13386 (dump_context::dump_gimple_expr): ...this new member function.
13387 Add the stmt to any pending optinfo, creating one if need be.
13388 (dump_gimple_expr_loc): Move implementation to...
13389 (dump_context::dump_gimple_expr_loc): ...this new member function.
13390 Start a new optinfo and add the stmt to it.
13391 (dump_generic_expr): Move implementation to...
13392 (dump_context::dump_generic_expr): ...this new member function.
13393 Add the tree to any pending optinfo, creating one if need be.
13394 (dump_generic_expr_loc): Move implementation to...
13395 (dump_context::dump_generic_expr_loc): ...this new member
13396 function. Add the tree to any pending optinfo, creating one if
13398 (dump_printf): Move implementation to...
13399 (dump_context::dump_printf_va): ...this new member function. Add
13400 the text to any pending optinfo, creating one if need be.
13401 (dump_printf_loc): Move implementation to...
13402 (dump_context::dump_printf_loc_va): ...this new member function.
13403 Start a new optinfo and add the stmt to it.
13404 (dump_dec): Move implementation to...
13405 (dump_context::dump_dec): ...this new member function. Add the
13406 value to any pending optinfo, creating one if need be.
13407 (dump_context::dump_symtab_node): New member function.
13408 (dump_context::get_scope_depth): New member function.
13409 (dump_context::begin_scope): New member function.
13410 (dump_context::end_scope): New member function.
13411 (dump_context::ensure_pending_optinfo): New member function.
13412 (dump_context::begin_next_optinfo): New member function.
13413 (dump_context::end_any_optinfo): New member function.
13414 (dump_context::s_current): New global.
13415 (dump_context::s_default): New global.
13416 (dump_scope_depth): Delete global.
13417 (dumpfile_ensure_any_optinfo_are_flushed): New function.
13418 (dump_symtab_node): New function.
13419 (get_dump_scope_depth): Reimplement in terms of dump_context.
13420 (dump_begin_scope): Likewise.
13421 (dump_end_scope): Likewise.
13422 (selftest::temp_dump_context::temp_dump_context): New ctor.
13423 (selftest::temp_dump_context::~temp_dump_context): New dtor.
13424 (selftest::verify_item): New function.
13425 (ASSERT_IS_TEXT): New macro.
13426 (ASSERT_IS_TREE): New macro.
13427 (ASSERT_IS_GIMPLE): New macro.
13428 (selftest::test_capture_of_dump_calls): New test.
13429 (selftest::dumpfile_c_tests): Call it.
13430 * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
13431 (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
13432 (dump_gimple_stmt, dump_dec): Gather these related decls and add a
13433 descriptive comment.
13434 (dump_function, print_combine_total_stats, enable_rtl_dump_file)
13435 (dump_node, dump_bb): Move these unrelated decls.
13436 (class dump_manager): Add leading comment.
13437 * optinfo.cc: New file.
13438 * optinfo.h: New file.
13440 2018-07-19 Michael Collison <michael.collison@arm.com>
13441 Richard Henderson <rth@redhat.com>
13443 * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
13444 (subti): Handle op1 zero.
13445 (subvti4, usub4ti4): New.
13446 (*sub<GPI>3_compare1_imm): New.
13447 (sub<GPI>3_carryinCV): New.
13448 (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
13449 (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
13451 2018-07-19 Michael Collison <michael.collison@arm.com>
13452 Richard Henderson <rth@redhat.com>
13454 * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
13455 (addti3): Create simpler code if low part is already known to be 0.
13456 (addvti4, uaddvti4): New.
13457 (*add<GPI>3_compareC_cconly_imm): New.
13458 (*add<GPI>3_compareC_cconly): New.
13459 (*add<GPI>3_compareC_imm): New.
13460 (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
13461 handle constants within this pattern..
13462 (*add<GPI>3_compareV_cconly_imm): New.
13463 (*add<GPI>3_compareV_cconly): New.
13464 (*add<GPI>3_compareV_imm): New.
13465 (add<GPI>3_compareV): New.
13466 (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
13467 (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
13468 (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
13469 ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
13470 with 'comparison' operator.
13471 (*add<GPI>3_compareV_cconly_imm): Ditto.
13472 (*add<GPI>3_compareV_cconly): Ditto.
13473 (*add<GPI>3_compareV_imm): Ditto.
13474 (add<GPI>3_compareV): Ditto.
13475 (add<mode>3_carryinC): Ditto.
13476 (*add<mode>3_carryinC_zero): Ditto.
13477 (*add<mode>3_carryinC): Ditto.
13478 (add<mode>3_carryinV): Ditto.
13479 (*add<mode>3_carryinV_zero): Ditto.
13480 (*add<mode>3_carryinV): Ditto.
13482 2018-07-19 Michael Collison <michael.collison@arm.com>
13483 Richard Henderson <rth@redhat.com>
13485 * config/aarch64/aarch64-modes.def (CC_V): New.
13486 * config/aarch64/aarch64-protos.h
13487 (aarch64_addti_scratch_regs): Declare
13488 (aarch64_subvti_scratch_regs): Declare.
13489 (aarch64_expand_subvti): Declare.
13490 (aarch64_gen_unlikely_cbranch): Declare
13491 * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
13492 for signed overflow using CC_Vmode.
13493 (aarch64_get_condition_code_1): Handle CC_Vmode.
13494 (aarch64_gen_unlikely_cbranch): New function.
13495 (aarch64_addti_scratch_regs): New function.
13496 (aarch64_subvti_scratch_regs): New function.
13497 (aarch64_expand_subvti): New function.
13499 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13501 * config/aarch64/aarch64-option-extensions.def: New entry for profile
13503 * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
13504 * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
13507 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13510 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13511 address check not strict.
13513 2018-07-19 Andre Vieira <andre.simoesdiasvieira@arm.com>
13515 * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
13517 (store_pair_lanes<mode>): Likewise.
13518 * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
13519 enum value 'ADDR_QUERY_LDP_STP_N'.
13520 * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
13521 (aarch64_print_address_internal): Add declaration.
13522 (aarch64_print_ldpstp_address): Remove.
13523 (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
13524 (aarch64_print_operand): Change printing of 'y'.
13525 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
13526 new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
13527 'true' rather than '1'.
13528 * config/aarch64/constraints.md (Uml): Likewise.
13529 (Uml): Rename to Umn.
13532 2018-07-19 Richard Biener <rguenther@suse.de>
13534 * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
13536 * tree-ssa-sccvn.c: Remove alloc-pool.h use.
13537 (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
13538 (vn_reference_hasher): Likewise.
13539 (struct vn_tables_s): Remove obstack and alloc-pool members.
13540 (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
13541 (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
13542 (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
13543 (vn_reference_insert_pieces): Likewise.
13544 (alloc_vn_nary_op_noinit): Adjust.
13545 (vn_nary_op_insert_stmt): Allocate phiargs in-place.
13546 (vn_phi_eq): Adjust.
13547 (shared_lookup_phiargs): Remove.
13548 (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
13549 (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
13550 (visit_reference_op_call): Likewise.
13551 (copy_nary, copy_phi, copy_reference): Remove.
13552 (process_scc): Rewind the obstack when iterating. Do not
13553 copy the elements to valid_info but just move them from one
13554 hashtable to the other.
13555 (allocate_vn_table): Adjust.
13556 (free_vn_table): Likewise.
13557 (init_scc_vn): Likewise.
13558 (free_scc_vn): Likewise.
13560 2018-07-19 H.J. Lu <hongjiu.lu@intel.com>
13563 * config/i386/i386.c (rest_of_insert_endbranch): Lookup
13564 indirect_return as function type attribute.
13565 (ix86_attribute_table): Change indirect_return to function
13567 * doc/extend.texi: Update indirect_return attribute.
13569 2018-07-19 Aldy Hernandez <aldyh@redhat.com>
13571 * wide-int.h (widest2_int): New.
13572 * gimple-fold.c (arith_overflowed_p): Use it.
13573 * tree.h (widest2_int_cst): New.
13574 * tree-vrp.c (wide_int_binop_overflow): Rename from
13575 vrp_int_const_binop.
13576 Rewrite to work on trees.
13577 (extract_range_from_multiplicative_op_1): Abstract code to...
13578 (wide_int_range_min_max): ...here.
13579 (wide_int_range_cross_product): ...and here.
13580 (extract_range_from_binary_expr_1): Abstract overflow code to...
13581 (wide_int_range_mult_wrapping): ...here.
13582 * tree-vrp.h (wide_int_range_cross_product): New.
13583 (wide_int_range_mult_wrapping): New.
13585 2018-07-19 Andrew Senkevich <andrew.senkevich@intel.com>
13586 Julia Koval <julia.koval@intel.com>
13588 * config/i386/x86-tune-costs.h (skylake_memcpy,
13589 skylake_memset): Replace rep_prefix with unrolling for size 512.
13591 2018-07-18 Kugan Vivekanandarajah <kuganv@linaro.org>
13593 PR middle-end/86544
13594 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
13595 comparision with EQ_EXPR in last stmt.
13597 2018-07-18 Kelvin Nilsen <kelvin@gcc.gnu.org>
13599 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
13600 this subsection to "PowerPC AltiVec/VSX Built-in Functions".
13601 (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
13602 previously known as "PowerPC AltiVec Built-in Functions". Move
13603 some material to new subsubsections "PowerPC AltiVec Built-in
13604 Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
13606 (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
13607 (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
13608 (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
13609 (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
13611 2018-07-18 Richard Biener <rguenther@suse.de>
13613 PR tree-optimization/86557
13614 * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
13617 2018-07-18 Ilya Leoshkevich <iii@linux.ibm.com>
13619 * config/s390/s390.c (s390_function_profiler): Generate CFI.
13621 2018-07-17 Jeff Law <law@redhat.com>
13623 * config/arm/arm.c (get_label_padding): Update for recent
13624 changes to label_to_alignment.
13626 PR tree-optimization/86010
13627 * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
13629 * config/mips/mips.c (vr4130_align_insns): Update for recent
13630 changes to label_to_alignment.
13632 * config/frv/frv.c (frv_label_align): Update for recent changes
13633 to label_to_alignment.
13635 * config/nios2/nios2.c (nios2_label_align): Update for recent
13636 changes which dropped ALIGN_LABELS_LOG.
13638 2018-07-17 Andreas Schwab <schwab@linux-m68k.org>
13640 * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
13641 (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
13643 2018-07-17 Claudiu Zissulescu <claziss@synopsys.com>
13645 * config/arc/arc.c (arc_label_align): Use align_labels instead of
13646 deprecated align_labels_log.
13648 2018-07-17 Richard Biener <rguenther@suse.de>
13651 * dwarf2out.c (init_sections_and_labels): Always generate
13652 a debug_line_str_section for early LTO debug.
13653 (dwarf2out_finish): Reset debug_line_str_hash output early.
13654 Bump counter for extra dwarf5 .debug_loc labels to not conflict
13656 (dwarf2out_early_finish): Output debug_line_str.
13658 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
13660 * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
13661 index register on z196 or later.
13663 2018-07-17 Robin Dapp <rdapp@linux.ibm.com>
13665 * config/s390/s390.c (s390_default_align): Set default function
13667 (s390_override_options_after_change): Call s390_default align.
13668 (s390_option_override_internal): Call s390_default_align.
13669 (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
13671 2018-07-17 Jakub Jelinek <jakub@redhat.com>
13673 PR middle-end/86542
13674 * omp-low.c (create_task_copyfn): Copy over also fields corresponding
13675 to _looptemp_ clauses, other than the first two.
13677 2018-07-17 Martin Liska <mliska@suse.cz>
13679 * opts.c: Do not enable OPT_falign_* for -Os.
13681 2018-07-17 Martin Liska <mliska@suse.cz>
13683 * align.h (MAX_CODE_ALIGN): New.
13684 (MAX_CODE_ALIGN_VALUE): New.
13685 * common/config/i386/i386-common.c (ix86_handle_option):
13686 (MAX_CODE_ALIGN): Moved to align.h.
13687 * final.c (MAX_CODE_ALIGN): Likewise.
13688 * opts.c (parse_and_check_align_values):
13689 (MAX_CODE_ALIGN): Likewise.
13690 (MAX_CODE_ALIGN_VALUE): Likewise.
13692 2018-07-17 Martin Liska <mliska@suse.cz>
13694 * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
13695 in order to fulfil coding style.
13696 * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
13697 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13698 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13699 * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
13700 * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
13701 * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
13702 * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
13703 * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
13704 (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13706 2018-07-17 Martin Liska <mliska@suse.cz>
13708 * align.h: New file.
13709 * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
13711 * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
13712 align_flags of label_to_alignment.
13713 * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
13715 * config/m68k/m68k.c: Do not use removed align_labels_value and
13717 * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
13718 (LOOP_ALIGN): Likewise.
13719 (LABEL_ALIGN): Likewise.
13720 * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13721 Remove not used macro.
13722 (rs6000_loop_align): Change return type to align_flags.
13723 (rs6000_loop_align_max_skip): Remove.
13724 * config/rs6000/rs6000-protos.h (rs6000_loop_align):
13725 Change return type to align_flags.
13726 * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13727 Remove not used macro.
13728 (rs6000_loop_align): Change return type to align_flags.
13729 (rs6000_loop_align_max_skip): Remove.
13730 * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
13731 * config/rx/rx-protos.h (rx_align_for_label): Make it
13733 * config/rx/rx.c (rx_align_for_label): Change return type
13735 (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
13737 into align_flags class.
13738 (LABEL_ALIGN): Likewise.
13739 (LOOP_ALIGN): Likewise.
13740 * config/s390/s390.c (s390_label_align): Use align_flags
13742 (s390_asm_output_function_label): Likewise.
13743 * config/sh/sh.c (sh_override_options_after_change):
13744 Use align_flags class directly without macros.
13745 (find_barrier): Likewise.
13746 (barrier_align): Likewise.
13747 (sh_loop_align): Likewise.
13748 * config/spu/spu.c (spu_option_override):
13749 Use align_flags_tuple::get_value instead of removed macros.
13750 (spu_sched_init): Likewise.
13751 * config/spu/spu.h (GTY): Likewise.
13752 * config/visium/visium.c (visium_option_override):
13753 Set "8" as default secondary alignment.
13754 * config/visium/visium.h (SUBALIGN_LOG): Define to 3
13755 in order to guarantee secondary alignment of 8.
13756 * coretypes.h: Include align.h header file.
13757 * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
13758 TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
13759 and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
13760 * doc/tm.texi.in: Likewise.
13761 * final.c (struct label_alignment): Remove not used structure.
13762 (LABEL_ALIGN): Change type to align_flags.
13763 (LOOP_ALIGN): Likewise.
13764 (JUMP_ALIGN): Likewise.
13765 (default_loop_align_max_skip): Remove.
13766 (default_label_align_max_skip): Likewise.
13767 (default_jump_align_max_skip): Likewise.
13768 (default_label_align_after_barrier_max_skip):
13769 (LABEL_TO_ALIGNMENT): Change to access label_align vector.
13770 (LABEL_TO_MAX_SKIP): Remove.
13771 (label_to_alignment): Return align_flags type instead of integer.
13772 (label_to_max_skip): Remove.
13773 (align_fuzz): Use align_flags type.
13774 (compute_alignments): Use align_flags type and use align_flags::max
13775 to combine multiple alignments.
13776 (grow_label_align): Grow vec instead of C array.
13777 (update_alignments): Assign just LABEL_TO_ALIGNMENT.
13778 (shorten_branches): Use align_flags type and use align_flags::max
13779 to combine multiple alignments.
13780 (final_scan_insn_1): Remove usage of secondary alignment that comes
13781 from label alignment, but instead use proper secondary alignment
13782 which is computed in grow_label_align.
13783 * flags.h (struct align_flags_tuple): Move to align.h.
13784 (struct align_flags): Likewise.
13785 (state_align_loops): Rename to align_loops.
13786 (state_align_jumps): Rename to align_jumps.
13787 (state_align_labels): Rename to align_labels.
13788 (state_align_functions): Rename to align_functions.
13789 (align_loops_log): Remove.
13790 (align_jumps_log): Remove.
13791 (align_labels_log): Remove.
13792 (align_functions_log): Remove.
13793 (align_loops_max_skip): Remove.
13794 (align_jumps_max_skip): Remove.
13795 (align_labels_max_skip): Remove.
13796 (align_functions_max_skip): Remove.
13797 (align_loops_value): Remove.
13798 (align_jumps_value): Remove.
13799 (align_labels_value): Remove.
13800 (align_functions_value): Remove.
13801 * output.h (label_to_alignment): Change return type to align_flags.
13802 (label_to_max_skip): Remove.
13803 * target.def: Remove loop_align_max_skip, label_align_max_skip,
13804 jump_align_max_skip macros.
13805 * targhooks.h (default_loop_align_max_skip): Remove.
13806 (default_label_align_max_skip): Likewise.
13807 (default_jump_align_max_skip): Likewise.
13808 (default_label_align_after_barrier_max_skip): Remove.
13809 * toplev.c (read_log_maxskip): Use ::normalize function.
13810 (parse_N_M): Remove not used argument and also call ::normalize.
13811 (parse_alignment_opts): Do not pass unused arguments.
13812 * varasm.c (assemble_start_function): Use directly align_functions
13813 instead of removed macros.
13814 * system.h: Do not poison removed macros.
13816 2018-07-17 Jakub Jelinek <jakub@redhat.com>
13818 PR middle-end/86539
13819 * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
13820 and cond temporaries don't have reference type if iterator has
13821 pointer type. For init use &for_pre_body instead of pre_p if
13822 for_pre_body is non-empty.
13824 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13826 * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
13827 double-double modes to SFmode directly directly.
13828 (trunc<mode>sf2_fprs): Delete.
13830 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13832 * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
13833 for conversions between IFmode and the decimal floating point modes.
13834 (init_float128_ieee): Use the correct names for conversions between
13835 KFmode and the decimal floating point modes.
13837 2018-07-16 Segher Boessenkool <segher@kernel.crashing.org>
13839 * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
13840 for the conversions between TDmode and IFmode.
13841 (init_float128_ieee): Use more correct names for the conversions
13842 between TDmode and KFmode.
13844 2018-07-16 Jakub Jelinek <jakub@redhat.com>
13846 PR tree-optimization/86526
13847 * builtins.c (expand_builtin_memcmp): Formatting fixes.
13848 (inline_expand_builtin_string_cmp): Likewise.
13849 (inline_string_cmp): Likewise. Use c_readstr instead of
13850 builtin_memcpy_read_str. Add unit_mode temporary.
13852 2018-07-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
13854 PR middle-end/86528
13855 * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
13856 * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
13858 2018-07-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
13860 * doc/extend.texi (PowerPC AltiVec Built-in Functions):
13861 Alphabetize prototypes of built-in functions, separating out
13862 built-in functions that are listed in this section but should be
13863 described elsewhere.
13865 2018-07-16 Uros Bizjak <ubizjak@gmail.com>
13868 * expmed.c (emit_store_flag): Do not emit setcc followed by a
13869 conditional move when trapping comparison was split to a
13870 non-trapping one (and vice versa).
13872 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13874 * config/s390/s390.c (s390_function_profiler): Generate nops
13875 instead of profiler call sequences.
13876 * config/s390/s390.opt: Add the new option.
13878 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13880 * config/s390/s390.c (s390_function_profiler): Generate
13881 __mcount_loc section.
13882 * config/s390/s390.opt: Add the new option.
13884 2018-07-16 Ilya Leoshkevich <iii@linux.ibm.com>
13886 * common.opt: Add the new warning.
13887 * config/s390/s390.c (s390_function_profiler): Emit "brasl
13888 %r0,__fentry__" when -mfentry is specified.
13889 (s390_option_override_internal): Disallow -mfentry for 31-bit
13891 * config/s390/s390.opt: Add the new option.
13893 2018-07-16 Richard Biener <rguenther@suse.de>
13896 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
13897 for function-local FUNCTION_DECL and RESULT_DECL immediately.
13899 2018-07-16 Martin Liska <mliska@suse.cz>
13902 * ipa-pure-const.c (malloc_candidate_p): Revert ::get
13905 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13907 * config/arc/arcHS.md: Update ARCHS scheduling rules.
13909 2017-07-16 Claudiu Zissulescu <claziss@synopsys.com>
13911 * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
13913 * config/arc/arc-cpus.def (hs4x): New cpu.
13915 * config/arc/arc-tables.opt: Regenerate.
13916 * config/arc/arc.c (arc_sched_issue_rate): New function.
13917 (TARGET_SCHED_ISSUE_RATE): Define.
13918 (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
13919 * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
13921 (attr tune): Add ARCHS4x tune values.
13922 (attr tune_dspmpy): Define.
13923 (*tst): Correct instruction type.
13924 * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
13925 * config/arc/arcHS4x.md: New file.
13926 * config/arc/fpu.md: Update instruction type attributes.
13927 * config/arc/t-multilib: Regenerate.
13929 2018-07-16 Tom de Vries <tdevries@suse.de>
13932 * var-tracking.c (vt_initialize): Fix pre_dec handling.
13934 2018-07-16 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
13936 * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
13939 2018-07-16 Eric Botcazou <ebotcazou@adacore.com>
13941 PR tree-optimization/86514
13942 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
13943 conversion to a boolean type from a type with greater precision.
13945 2018-07-16 Tom de Vries <tdevries@suse.de>
13947 * var-tracking.c (vt_initialize): Print adjusted insn slim if
13948 dump_flags request TDF_SLIM.
13950 2018-07-16 Aldy Hernandez <aldyh@redhat.com>
13952 * fold-const.c (int_const_binop_1): Abstract...
13953 (wide_int_binop): ...wide int code here.
13954 (poly_int_binop): ...poly int code here.
13955 Abstract the rest of int_const_binop_1 into int_const_binop.
13956 * fold-const.h (wide_int_binop): New.
13957 * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
13958 Remove useless PLUS/MINUS_EXPR case.
13959 (zero_nonzero_bits_from_vr): Move wide int code...
13960 (zero_nonzero_bits_from_bounds): ...here.
13961 (extract_range_from_binary_expr_1): Move mask optimization code...
13962 (range_easy_mask_min_max): ...here.
13963 * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
13964 (range_easy_mask_min_max): New.
13966 2018-07-15 Jeff Law <law@redhat.com>
13969 * config/sh/sh.c (output_mi_thunk): Remove dead conditional
13972 2018-07-14 Jim Wilson <jimw@sifive.com>
13974 * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
13976 2018-07-14 Paul Koning <ni1d@arrl.net>
13978 * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
13980 2018-07-13 Jan Hubicka <hubicka@ucw.cz>
13982 * lto-streamer-out.c (copy_function_or_variable): Dump info about
13985 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com>
13986 Steve Munroe <munroesj52@gmail.com>
13988 * config/rs6000/emmintrin.h (_mm_and_si128): New function.
13989 (_mm_andnot_si128): Likewise.
13990 (_mm_or_si128): Likewise.
13991 (_mm_xor_si128): Likewise.
13993 2018-07-13 Qing Zhao <qing.zhao@oracle.com>
13995 PR middle-end/78809
13996 * builtins.c (expand_builtin_memcmp): Inline the calls first
13997 when result_eq is false.
13998 (expand_builtin_strcmp): Inline the calls first.
13999 (expand_builtin_strncmp): Likewise.
14000 (inline_string_cmp): New routine. Expand a string compare
14001 call by using a sequence of char comparison.
14002 (inline_expand_builtin_string_cmp): New routine. Inline expansion
14003 a call to str(n)cmp/memcmp.
14004 * doc/invoke.texi (--param builtin-string-cmp-inline-length):
14006 * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
14008 2018-07-13 Richard Earnshaw <rearnsha@arm.com>
14010 * config/arm/driver-arm.c: Include arm-native.h.
14011 (host_detect_local_cpu): Use auto-generated data tables.
14012 (vendors, arm_cpu_table): Delete. Move part information to ...
14013 * config/arm/arm-cpus.in: ... here.
14014 * config/arm/parsecpu.awk (gen_native): New function.
14015 (vendor, part): New CPU fields.
14016 (END): Add support for building the native CPU detection tables.
14017 * config/arm/t-arm (arm-native.h): Add build rule.
14018 (driver-arm.o): Add dependency on arm-native.h.
14020 2018-07-13 Richard Biener <rguenther@suse.de>
14022 PR middle-end/85974
14023 * match.pd (addr1 - addr2): Allow either of the operand to
14026 2018-07-13 Tom de Vries <tdevries@suse.de>
14028 * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
14031 2018-07-13 Jackson Woodruff <jackson.woodruff@arm.com>
14033 * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
14034 arrays instead of numbered variables.
14036 2018-07-13 Eric Botcazou <ebotcazou@adacore.com>
14038 * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
14039 * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
14041 2018-07-13 Richard Biener <rguenther@suse.de>
14044 * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
14045 instead of get_context_die.
14047 2018-07-13 Kugan Vivekanandarajah <kuganv@linaro.org>
14048 Richard Biener <rguenther@suse.de>
14050 PR middle-end/86489
14051 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
14052 that the loop latch destination where phi is defined.
14054 2018-07-12 Kito Cheng <kito.cheng@gmail.com>
14056 * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
14057 (riscv_expand_epilogue): Add assertion to check interrupt mode.
14058 (riscv_set_current_function): Extract getting interrupt type to new
14060 (riscv_get_interrupt_type): New function.
14061 (riscv_merge_decl_attributes): New function, checking interrupt type is
14063 (TARGET_MERGE_DECL_ATTRIBUTES): Define.
14065 2018-07-12 Paul Koning <ni1d@arrl.net>
14067 * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
14070 2018-07-12 Paul Koning <ni1d@arrl.net>
14072 * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
14073 zero reference, add doloop_end instead.
14074 * doc/md.texi (decrement_and_branch_until_zero): Remove.
14075 (Looping patterns): Remove decrement_and_branch_until_zero. Add
14076 detail for doloop_end.
14078 2018-07-12 Martin Sebor <msebor@redhat.com>
14081 * attribs.c (decl_attributes): Reject conflicting attributes before
14082 calling attribute handlers.
14084 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
14086 * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
14088 (gcc::dump_manager::get_dump_file_name): likewise.
14089 (dump_begin): Likewise.
14090 * dumpfile.h (dump_begin): Update prototype.
14091 (gcc::dump_manager::get_dump_file_name,
14092 gcc::dump_manager::get_dump_file_name): Update prototype.
14094 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14096 * internal-fn.h (vectorizable_internal_fn_p): New function.
14097 * tree-vect-slp.c (compatible_calls_p): Likewise.
14098 (vect_build_slp_tree_1): Remove nops argument. Handle calls
14099 to internal functions.
14100 (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
14102 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14104 * fold-const.h (inverse_conditions_p): Declare.
14105 * fold-const.c (inverse_conditions_p): New function.
14106 * match.pd: Use inverse_conditions_p. Add folds of view_converts
14107 that test the inverse condition of a conditional internal function.
14108 * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
14109 * internal-fn.c (internal_fn_mask_index): Handle conditional
14110 internal functions.
14111 (vectorized_internal_fn_supported_p): New function.
14112 * tree-if-conv.c: Include internal-fn.h and fold-const.h.
14113 (any_pred_load_store): Replace with...
14114 (need_to_predicate): ...this new variable.
14115 (redundant_ssa_names): New variable.
14116 (ifcvt_can_use_mask_load_store): Move initial checks to...
14117 (ifcvt_can_predicate): ...this new function. Handle tree codes
14118 for which a conditional internal function exists.
14119 (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
14120 instead of ifcvt_can_use_mask_load_store. Update after variable
14122 (predicate_load_or_store): New function, split out from
14123 predicate_mem_writes.
14124 (check_redundant_cond_expr): New function.
14125 (value_available_p): Likewise.
14126 (predicate_rhs_code): Likewise.
14127 (predicate_mem_writes): Rename to...
14128 (predicate_statements): ...this. Use predicate_load_or_store
14129 and predicate_rhs_code.
14130 (combine_blocks, tree_if_conversion): Update after above name changes.
14131 (ifcvt_local_dce): Handle redundant_ssa_names.
14132 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
14133 general conditional functions.
14134 * tree-vect-stmts.c (vectorizable_call): Likewise.
14136 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14137 Alan Hayward <alan.hayward@arm.com>
14138 David Sherwood <david.sherwood@arm.com>
14140 * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
14141 * internal-fn.c (can_interpret_as_conditional_op_p): New function.
14142 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
14143 plus and minus and convert them into IFN_COND_FMA-based sequences.
14144 (convert_mult_to_fma): Handle conditional plus and minus.
14146 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14148 * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
14149 * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
14150 (cond_fnms_optab): New optabs.
14151 * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
14152 internal functions.
14153 (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
14154 * internal-fn.h (get_conditional_internal_fn): Declare.
14155 (get_unconditional_internal_fn): Likewise.
14156 * internal-fn.c (cond_ternary_direct): New macro.
14157 (expand_cond_ternary_optab_fn): Likewise.
14158 (direct_cond_ternary_optab_supported_p): Likewise.
14159 (FOR_EACH_COND_FN_PAIR): Likewise.
14160 (get_conditional_internal_fn): New function.
14161 (get_unconditional_internal_fn): Likewise.
14162 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
14163 (gimple_match_op::gimple_match_op): Add a new overload for 5
14165 (gimple_match_op::set_op): Likewise.
14166 (gimple_resimplify5): Declare.
14167 * genmatch.c (decision_tree::gen): Generate simplifications for
14169 * gimple-match-head.c (gimple_simplify): Define an overload for
14170 5 operands. Handle calls with 5 arguments in the top-level overload.
14171 (convert_conditional_op): Handle conversions from unconditional
14172 internal functions to conditional ones.
14173 (gimple_resimplify5): New function.
14174 (build_call_internal): Pass a fifth operand.
14175 (maybe_push_res_to_seq): Likewise.
14176 (try_conditional_simplification): Try converting conditional
14177 internal functions to unconditional internal functions.
14178 Handle 3-operand unconditional forms.
14179 * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
14180 Define ternary equivalents of the current rules for binary conditional
14181 internal functions.
14182 * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
14183 ternary operations.
14184 * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
14185 (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
14186 (optab): Handle them.
14187 (SVE_COND_FP_TERNARY): New int iterator.
14188 (sve_fmla_op, sve_fmad_op): New int attributes.
14189 * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
14190 (*cond_<optab><mode>_2, *cond_<optab><mode_4)
14191 (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
14193 2018-07-12 Richard Sandiford <richard.sandiford@linaro.org>
14195 * target.def (preferred_else_value): New target hook.
14196 * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
14197 * doc/tm.texi: Regenerate.
14198 * targhooks.h (default_preferred_else_value): Declare.
14199 * targhooks.c (default_preferred_else_value): New function.
14200 * internal-fn.h (conditional_internal_fn_code): Declare.
14201 * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
14202 (get_conditional_internal_fn): Use it.
14203 (conditional_internal_fn_code): New function.
14204 * gimple-match.h (gimple_match_cond): New struct.
14205 (gimple_match_op): Add a cond member function.
14206 (gimple_match_op::gimple_match_op): Update all forms to take a
14208 * genmatch.c (expr::gen_transform): Use the same condition as res_op
14209 for the suboperation, but don't specify a particular else_value.
14210 * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
14211 (visit_nary_op, visit_reference_op_load): Pass
14212 gimple_match_cond::UNCOND to the gimple_match_op constructor.
14213 * gimple-match-head.c: Include tree-eh.h
14214 (convert_conditional_op): New function.
14215 (maybe_resimplify_conditional_op): Likewise.
14216 (gimple_resimplify1): Call maybe_resimplify_conditional_op.
14217 (gimple_resimplify2): Likewise.
14218 (gimple_resimplify3): Likewise.
14219 (gimple_resimplify4): Likewise.
14220 (maybe_push_res_to_seq): Return null for conditional operations.
14221 (try_conditional_simplification): New function.
14222 (gimple_simplify): Call it. Pass conditions to the gimple_match_op
14224 * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
14226 * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
14228 (TARGET_PREFERRED_ELSE_VALUE): Redefine.
14230 2018-07-12 Jan Hubicka <hubicka@ucw.cz>
14232 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14234 (hash_tree): Do not hash DECL_FCONTEXT
14235 * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
14236 Do not stream DECL_FCONTEXT.
14237 * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
14238 * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
14240 2018-07-12 Richard Biener <rguenther@suse.de>
14243 * dwarf2out.c (gen_block_die): Only output blocks when they have
14244 at least one !DECL_IGNORED_P variable.
14246 2018-07-12 Richard Biener <rguenther@suse.de>
14249 * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
14250 Remove -mieee-fp handling.
14252 2018-07-12 Richard Biener <rguenther@suse.de>
14254 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
14255 left-over from last patch.
14257 2018-07-12 Jakub Jelinek <jakub@redhat.com>
14259 PR tree-optimization/86492
14260 * gimple-ssa-store-merging.c
14261 (imm_store_chain_info::coalesce_immediate_stores): Call
14262 check_no_overlap even for the merge_overlapping case. Formatting fix.
14264 2018-07-12 Richard Biener <rguenther@suse.de>
14266 PR middle-end/86479
14267 * fold-const.c (fold_binary_op_with_conditional_arg): Do not
14268 move possibly trapping operations into the conditional.
14270 2018-07-12 Richard Biener <rguenther@suse.de>
14272 * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
14273 (vn_lookup_simplify_result): Remove recursion limit applied
14275 (vn_nary_build_or_lookup_1): Adjust.
14276 (try_to_simplify): Likewise.
14277 * gimple-match-head.c (gimple_resimplify1): Instead apply one
14279 (gimple_resimplify2): Likewise.
14280 (gimple_resimplify3): Likewise.
14281 (gimple_resimplify4): Likewise.
14283 2018-07-11 Jakub Jelinek <jakub@redhat.com>
14285 * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
14286 Use __mmask64 type instead of __mmask8 for __M argument.
14287 * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
14288 _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
14290 (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
14291 __mmask16 for __M argument.
14292 (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
14293 _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
14294 to __mmask16 instead of __mmask8.
14295 * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
14296 _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
14297 _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
14298 _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
14299 instead of __mmask16 for __U argument.
14300 * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
14301 __mmask16 instead of __mmask8 for __U argument.
14302 (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
14304 (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
14306 (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
14308 (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
14310 (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
14312 (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
14314 (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
14316 (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
14318 (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
14320 (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
14322 (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
14323 _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
14324 return type as well as __M argument type and all casts from __mmask8
14326 (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
14327 _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
14328 return type as well as __M argument type and all casts from __mmask8
14330 (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
14331 _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
14332 return type as well as __M argument type and all casts from __mmask8
14334 (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
14335 _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
14336 return type as well as __M argument type and all casts from __mmask8
14338 * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
14339 _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
14342 2018-07-11 Grazvydas Ignotas <notasas@gmail.com>
14344 * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
14345 _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
14348 2018-07-11 Paul Koning <ni1d@arrl.net>
14350 * doc/md.texi (define_subst): Document how multiple occurrences of
14351 the same argument in the replacement pattern are handled.
14353 2018-07-11 Paul Koning <ni1d@arrl.net>
14355 * doc/extend.texi (Common Variable Attributes): Move "mode" into
14356 alphabetical order.
14357 (Common Type Attributes): Add "mode" attribute.
14359 2018-07-11 Jan Hubicka <hubicka@ucw.cz>
14361 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
14362 stream DECL_ORIGINAL_TYPE.
14363 (DFS::DFS_write_tree_body): Drop hack handling local external decls.
14364 (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
14365 * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
14366 Do not walk original type.
14367 * tree-streamer-out.c (streamer_write_chain): Drop hack handling
14369 (write_ts_decl_non_common_tree_pointers): Do not stream
14371 * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
14372 (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
14374 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
14376 * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
14377 thread twice from the same starting edge.
14379 2018-07-11 Aldy Hernandez <aldyh@redhat.com>
14381 * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
14382 * gimple.c (gimple_call_nonnull_result_p): ...here...
14383 (gimple_call_nonnull_arg): ...and here.
14384 * gimple.h (gimple_call_nonnull_result_p): New.
14385 (gimple_call_nonnull_arg): New.
14387 2018-07-11 Richard Earnshaw <rearnsha@arm.com>
14389 * config/arm/arm-cpus.in: Move information from fpu field of each
14390 cpu definition to the isa field.
14391 * config/arm/parsecpu.awk (fpu): Delete match rule.
14392 (gen_comm_data): Don't add bits from the CPU's FPU entry.
14394 2018-07-11 Richard Biener <rguenther@suse.de>
14397 * dwarf2out.c (init_sections_and_labels): Use
14398 output_asm_line_debug_info consistently.
14399 (dwarf2out_early_finish): Likewise.
14400 (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
14403 2018-07-11 Richard Biener <rguenther@suse.de>
14405 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
14406 Rework father_bb setting in a way to avoid propagating constants
14407 multiple times on a loop body.
14409 2018-07-10 Mark Wielaard <mark@klomp.org>
14412 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
14414 2018-07-10 Richard Biener <rguenther@suse.de>
14416 * hash-map.h (hash_map::iterator::operator*): Return
14417 references to key and value.
14419 2018-07-10 Jakub Jelinek <jakub@redhat.com>
14422 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
14423 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
14424 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
14425 (gimplify_omp_for): For composite loops, move outer
14426 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
14427 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
14428 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
14429 TREE_LIST for both the original class iterator and the "last" helper
14430 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
14431 loop, remember has_decl_expr from outer composite loops for the
14432 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
14434 2018-07-09 Martin Sebor <msebor@redhat.com>
14436 PR middle-end/77357
14437 PR middle-end/86428
14438 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
14439 accessing implicitly initialized array elements.
14440 * expr.c (string_constant): Handle string initializers of
14441 character arrays within aggregates.
14442 * gimple-fold.c (fold_array_ctor_reference): Add argument.
14443 Store element offset. As a special case, handle zero size.
14444 (fold_nonarray_ctor_reference): Same.
14445 (fold_ctor_reference): Add argument. Store subobject offset.
14446 * gimple-fold.h (fold_ctor_reference): Add argument.
14448 2018-07-09 Paul Koning <ni1d@arrl.net>
14450 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
14451 (pdp11_insn_cost): New function.
14452 (pdp11_md_asm_adjust): New function.
14453 (TARGET_INVALID_WITHIN_DOLOOP): Define.
14454 (pdp11_rtx_costs): Update to match machine better.
14455 (output_addr_const_pdp11): Correct format mismatch warnings.
14456 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
14457 * config/pdp11/pdp11.md: General change to add base_cost and/or
14458 length attributes for use by new pdp11_insn_cost function.
14459 (MIN_BRANCH): Correct definition.
14461 (doloop_end): Use standard pattern name for looping pattern.
14462 (doloop_end_nocc): New.
14463 (movsf): Add another constraint alternative.
14464 (zero_extendqihi2): Add constraint alternatives for not in place
14466 (zero_extendhisi2): Remove.
14467 (shift patterns): Add CC handling variants.
14471 (define_peephole2): New peephole to recognize mov that sets CC for
14474 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
14476 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
14477 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
14480 2018-07-09 Jakub Jelinek <jakub@redhat.com>
14483 * real.c (real_nextafter): Return true if result is denormal.
14485 2018-07-09 Martin Liska <mliska@suse.cz>
14487 * common.opt: Add back wrongly removed attribute.
14489 2018-07-09 Richard Biener <rguenther@suse.de>
14492 * dwarf2out.c (gen_block_die): For an early generated DIE
14493 always output high/low PC attributes.
14495 2018-07-09 Tom de Vries <tdevries@suse.de>
14497 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
14498 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
14499 onto VAR_DECL with abstract origin.
14501 2018-07-07 Jim Wilson <jimw@sifive.com>
14503 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
14505 2018-07-07 Tom de Vries <tdevries@suse.de>
14507 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
14509 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
14511 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
14513 (combine_bound): Use wide-int overflow calculation instead of
14515 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
14517 * fold-const.c (int_const_binop_2): Same.
14518 (extract_muldiv_1): Same.
14519 (fold_div_compare): Same.
14520 (fold_abs_const): Same.
14522 * poly-int.h (add): Same.
14526 * predict.c (predict_iv_comparison): Same.
14527 * profile-count.c (slow_safe_scale_64bit): Same.
14528 * simplify-rtx.c (simplify_const_binary_operation): Same.
14529 * tree-chrec.c (tree_fold_binomial): Same.
14530 * tree-data-ref.c (split_constant_offset_1): Same.
14531 * tree-if-conv.c (idx_within_array_bound): Same.
14532 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
14533 * tree-ssa-phiopt.c (minmax_replacement): Same.
14534 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
14535 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
14536 * vr-values.c (vr_values::adjust_range_with_scev): Same.
14537 * wide-int.cc (wi::add_large): Same.
14538 (wi::mul_internal): Same.
14539 (wi::sub_large): Same.
14540 (wi::divmod_internal): Same.
14541 * wide-int.h: Change overflow type to overflow_type for neg, add,
14542 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
14543 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
14544 mul_internal, divmod_internal.
14545 (overflow_type): New enum.
14546 (accumulate_overflow): New.
14548 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
14550 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
14551 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
14553 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14555 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
14556 argument is checked for zero before entering loop, avoid checking again.
14558 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
14560 * gimplify.h (generic_expr_could_trap_p): Set as global function.
14561 * gimplify.h (generic_expr_could_trap_p): Likwise.
14562 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
14564 2018-07-06 Jakub Jelinek <jakub@redhat.com>
14566 PR tree-optimization/86401
14567 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
14568 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
14569 (fold_bit_and_mask): ... here. New helper function for match.pd.
14570 * fold-const.h (fold_bit_and_mask): Declare.
14571 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
14573 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
14576 * target.def (translate_mode_attribute): New hook.
14577 * targhooks.h (default_translate_mode_attribute): Declare.
14578 * targhooks.c (default_translate_mode_attribute): New function.
14579 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
14580 * doc/tm.texi: Regenerate.
14581 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
14582 (rs6000_translate_mode_attribute): New function.
14584 2018-07-06 Paul Koning <ni1d@arrl.net>
14586 * doc/md.texi (define_split): Document DONE and FAIL.
14587 (define_peephole2): Ditto.
14589 2018-07-05 Jeff Law <law@redhat.com>
14591 PR tree-optimization/86010
14592 * tree-ssa-dse.c (compute_trims): More aggressively trim at
14593 both the head and tail of mem* and str* calls.
14595 2018-07-05 Jim Wilson <jimw@sifive.com>
14597 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
14599 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
14601 * config/aarch64/aarch64-simd.md: correct flags text for
14602 MIN_EXPR replacement.
14604 2018-07-05 James Clarke <jrtc27@jrtc27.com>
14606 * configure: Regenerated.
14608 2018-07-05 Carl Love <cel@us.ibm.com>
14610 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
14611 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
14612 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
14613 VSX_BUILTIN_DOUBLEL_V4SF.
14615 2018-07-05 Martin Sebor <msebor@redhat.com>
14618 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
14619 than its domain to compute its the upper bound of a char array.
14621 2018-07-05 Nathan Sidwell <nathan@acm.org>
14623 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
14624 * doc/cpp.texi: Update comment.
14625 * doc/tm.texi: Rebuilt.
14626 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
14627 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
14628 * doc/extend.texi (Backwards Compatibility): Clarify it is system
14629 headers affected by extern "C".
14630 * system.h: Poison NO_IMPLICIT_EXTERN_C.
14631 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
14632 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
14633 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
14634 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
14635 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
14636 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
14637 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
14638 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
14639 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
14640 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
14641 config/sparc/sp64-elf.h, config/spu/spu.h,
14642 config/stormy16/stormy16.h, config/v850/v850.h,
14643 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
14644 define NO_IMPLICIT_EXTERN_C.
14645 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
14647 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14650 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14651 instead of GET_MODE_SIZE when comparing Units.
14653 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14656 * rtlanal.c (set_noop_p): Constrain on mode change,
14657 include hard-reg-set.h
14659 2018-07-05 Tamar Christina <tamar.christina@arm.com>
14661 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
14663 2018-07-05 Jakub Jelinek <jakub@redhat.com>
14666 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
14669 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14671 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14673 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
14676 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14678 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14680 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
14682 PR middle-end/86380
14683 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
14685 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
14687 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
14688 neg_*_op* variables.
14690 2018-07-04 Martin Liska <mliska@suse.cz>
14692 * tree-switch-conversion.c: Define
14693 max_ratio_for_speed and max_ratio_for_size constants.
14695 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
14696 Martin Liska <mliska@suse.cz>
14698 PR middle-end/66240
14701 * common.opt: Rename align options with 'str_' prefix.
14702 * common/config/i386/i386-common.c (set_malign_value): New
14704 (ix86_handle_option): Use it to set -falign-* options/
14705 * config/aarch64/aarch64-protos.h (struct tune_params): Change
14706 type from int to string.
14707 * config/aarch64/aarch64.c: Update default values from int
14709 * config/alpha/alpha.c (alpha_override_options_after_change):
14711 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
14712 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14713 max skip conditionally.
14714 * config/i386/freebsd.h (SUBALIGN_LOG): New.
14715 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14716 max skip conditionally.
14717 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14718 max skip conditionally.
14719 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
14720 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14721 max skip conditionally.
14722 * config/i386/i386.c (struct ptt): Change type from int to
14724 (ix86_default_align): Set default values.
14725 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
14726 max skip conditionally.
14727 * config/i386/iamcu.h (SUBALIGN_LOG): New.
14728 (ASM_OUTPUT_MAX_SKIP_ALIGN):
14729 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
14730 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14731 max skip conditionally.
14732 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
14733 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
14734 * config/i386/x86-64.h (SUBALIGN_LOG): New.
14735 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14736 max skip conditionally.
14737 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14738 * config/ia64/ia64.c (ia64_option_override): Set default values
14739 for alignment options.
14740 * config/m68k/m68k.c: Handle new str_align_* options.
14741 * config/mips/mips.c (mips_set_compression_mode): Change
14743 (mips_option_override): Set default values for options.
14744 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
14746 * config/rs6000/rs6000.c (rs6000_option_override_internal):
14748 * config/rx/rx.c (rx_option_override): Likewise.
14749 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
14750 (LABEL_ALIGN): Use align_labels_log.
14751 (LOOP_ALIGN): Use align_loops_align.
14752 * config/s390/s390.c (s390_asm_output_function_label): Use new
14754 * config/sh/sh.c (sh_override_options_after_change):
14755 Change type of constants.
14756 * config/spu/spu.c (spu_sched_init): Likewise.
14757 * config/sparc/sparc.c (sparc_option_override): Set default
14758 values for options.
14759 * config/visium/visium.c (visium_option_override): Likewise.
14760 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
14761 emit p2align format with last argument if it's not needed.
14762 * doc/invoke.texi: Document extended format of -falign-*.
14763 * final.c: Use align_labels alignment.
14764 * flags.h (struct target_flag_state): Change type to use
14766 (struct align_flags_tuple): New.
14767 (struct align_flags): Likewise.
14768 (align_loops_log): Redefine macro to use new types.
14769 (align_loops_max_skip): Redefine macro to use new types.
14770 (align_jumps_log): Redefine macro to use new types.
14771 (align_jumps_max_skip): Redefine macro to use new types.
14772 (align_labels_log): Redefine macro to use new types.
14773 (align_labels_max_skip): Redefine macro to use new types.
14774 (align_functions_log): Redefine macro to use new types.
14775 (align_loops): Redefine macro to use new types.
14776 (align_jumps): Redefine macro to use new types.
14777 (align_labels): Redefine macro to use new types.
14778 (align_functions): Redefine macro to use new types.
14779 (align_functions_max_skip): Redefine macro to use new types.
14780 (align_loops_value): New macro.
14781 (align_jumps_value): New macro.
14782 (align_labels_value): New macro.
14783 (align_functions_value): New macro.
14784 * function.c (invoke_set_current_function_hook): Propagate
14785 alignment values from flags to global variables default in
14787 * ipa-icf.c (sem_function::equals_wpa): Use
14788 cl_optimization_option_eq instead of memcmp.
14789 * lto-streamer.h (cl_optimization_stream_out): Support streaming
14791 (cl_optimization_stream_in): Likewise.
14792 * optc-save-gen.awk: Support strings in cl_optimization.
14793 * opth-gen.awk: Likewise.
14794 * opts.c (finish_options): Remove error checking of invalid
14796 (MAX_CODE_ALIGN): Remove.
14797 (MAX_CODE_ALIGN_VALUE): Likewise.
14798 (parse_and_check_align_values): New function.
14799 (check_alignment_argument): Likewise.
14800 (common_handle_option): Use check_alignment_argument.
14801 * opts.h (parse_and_check_align_values): Declare.
14802 * toplev.c (init_alignments): Remove.
14803 (read_log_maxskip): New.
14804 (parse_N_M): Likewise.
14805 (parse_alignment_opts): Likewise.
14806 (backend_init_target): Remove usage of init_alignments.
14807 * toplev.h (parse_alignment_opts): Declare.
14808 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
14810 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
14811 * tree.c (cl_option_hasher::equal): New.
14812 * varasm.c: Use new global macros.
14814 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
14816 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
14817 Use a simpler align directive also if MAXSKIP = ALIGN-1.
14818 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14819 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14820 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14821 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14822 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
14823 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
14824 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
14825 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14826 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14827 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14828 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14830 2018-07-04 Martin Liska <mliska@suse.cz>
14831 Jonathan Wakely <jwakely@redhat.com>
14833 * coverage.c: Use correct type.
14834 * doc/invoke.texi: Language correction.
14836 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
14839 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
14840 ENDBRANCH for non-tail call which may return via indirect branch.
14841 * doc/extend.texi: Document indirect_return attribute.
14843 2018-07-03 Martin Sebor <msebor@redhat.com>
14845 PR tree-optimization/86274
14846 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
14848 (format_floating): Correct handling of infinities and NaNs.
14850 2018-07-03 Martin Sebor <msebor@redhat.com>
14852 * print-tree.c (print_real_cst): New function.
14853 (print_node_brief): Call it.
14854 (print_node): Ditto.
14856 2018-07-03 Jeff Law <law@redhat.com>
14858 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
14859 into a single pattern.
14861 * config/h8300/h8300.md (ors code_iterator): New.
14862 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
14863 a single pattern and single splitter.
14864 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
14865 (iorqi3_1, xorqi3_1): Likewise.
14866 (iorqi3, xorqi3 expanders): Similarly.
14868 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
14869 (movmd_internal) into a single pattern using the P mode iterator.
14870 (movmd splitters): Similarly.
14871 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
14872 (movsd splitters): Similarly.
14874 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
14875 ADDB, ADDW and ADDL into a single ADD attribute which selects the
14876 right table based on the size of the operand.
14877 * config/h8300/h8300.md (length_table): Corresponding changes. All
14878 references to "addb", "addw" and "addl" changed to "add".
14879 (btst patterns): Merge two variants into a single pattern.
14880 (tstqi, tsthi): Likewise.
14881 (addhi3_incdec, addsi3_incdec): Likewise.
14882 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
14883 (mulhi3, mulsi3): Likewise.
14884 (udivhi3, udivsi3): Likewise.
14885 (divhi3, divsi3): Likewise.
14886 (andorqi3, andorhi3, andorsi3): Likewise.
14888 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
14891 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
14892 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
14894 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14896 PR tree-optimization/85694
14897 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
14898 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
14900 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
14901 (<u>avg<mode>3_ceil): New patterns.
14903 2018-07-03 David Malcolm <dmalcolm@redhat.com>
14905 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
14906 scan-tree-dump directive.
14907 * gcc.dg/vect/slp-perm-2.c: Likewise.
14908 * gcc.dg/vect/slp-perm-3.c: Likewise.
14909 * gcc.dg/vect/slp-perm-5.c: Likewise.
14910 * gcc.dg/vect/slp-perm-6.c: Likewise.
14911 * gcc.dg/vect/slp-perm-7.c: Likewise.
14912 * gcc.dg/vect/slp-perm-8.c: Likewise.
14914 2018-07-03 Marek Polacek <polacek@redhat.com>
14916 PR middle-end/86202
14917 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
14919 2018-07-03 Richard Biener <rguenther@suse.de>
14922 * tree-ssa-structalias.c (find_func_clobbers): Properly
14923 handle indirect calls.
14925 2018-07-03 Jeff Law <law@redhat.com>
14927 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
14928 (shifts): New code iterator.
14929 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
14930 expander. Fix HImode handling on H8/SX.
14931 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
14932 (subqi3, subhi3, subsi3 expanders): Likewise.
14933 (andqi3, andhi3, andsi3 expanders): Likewise.
14934 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
14935 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
14936 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
14937 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
14938 (zero_extendqihi2, zero_extendqisi2): Likewise.
14939 (extendqihi2, extendqisi2): Likewise.
14940 (rotlqi3, rotlhi3, rotlsi3): Likewise.
14941 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
14942 (rotlqi3_1, rotlhi3_1): Likewise.
14943 (logicalhi3_sn, logicalsi3_sn): Likewise.
14944 (logicalhi3, logicalsi3): Likewise.
14946 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14948 * tree-vect-patterns.c (vect_recog_rotate_pattern)
14949 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14950 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
14951 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
14952 type to append_pattern_def_seq instead of creating a stmt_vec_info
14954 (build_mask_conversion): Likewise. Remove vinfo argument.
14955 (vect_add_conversion_to_patterm): Likewise, renaming to...
14956 (vect_add_conversion_to_pattern): ...this.
14957 (vect_recog_mask_conversion_pattern): Update call to
14958 build_mask_conversion. Pass the vector type to
14959 append_pattern_def_seq here too.
14960 (vect_recog_gather_scatter_pattern): Update call to
14961 vect_add_conversion_to_pattern.
14963 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14965 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
14966 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14967 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
14968 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
14969 STMT_VINFO_PATTERN_DEF_SEQ to null here.
14970 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
14971 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
14972 append_pattern_def_seq instead of new_pattern_def_seq.
14973 (vect_recog_divmod_pattern): Do both of the above.
14974 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
14977 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
14979 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
14980 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
14981 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
14982 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
14983 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
14984 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14985 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
14986 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14987 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14988 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
14989 parameter with a single stmt_vec_info.
14990 (vect_recog_func_ptr): Likewise.
14991 (vect_recog_gather_scatter_pattern): Likewise, folding in...
14992 (vect_try_gather_scatter_pattern): ...this.
14993 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
14994 the stmt_vec_info of the statement to be matched. Don't clear
14995 STMT_VINFO_RELATED_STMT.
14996 (vect_pattern_recog): Update call accordingly.
14998 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15000 PR tree-optimization/85694
15001 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
15002 (uavgM3_ceil): Document new optabs.
15003 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
15004 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
15006 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
15007 (savg_ceil_optab): New optabs.
15008 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
15009 (vect_vect_recog_func_ptrs): Add it.
15010 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
15011 constant directly from the associated lhs.
15013 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15015 * tree-vect-patterns.c (vect_split_statement): New function.
15016 (vect_convert_input): Use it to try to split an existing cast.
15018 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15020 * poly-int.h (print_hex): New function.
15021 * dumpfile.h (dump_dec, dump_hex): Declare.
15022 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
15023 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
15024 min_input_precision, operation_precision and operation_sign.
15025 * tree-vect-patterns.c (vect_get_range_info): New function.
15026 (vect_same_loop_or_bb_p, vect_single_imm_use)
15027 (vect_operation_fits_smaller_type): Delete.
15028 (vect_look_through_possible_promotion): Add an optional
15029 single_use_p parameter.
15030 (vect_recog_over_widening_pattern): Rewrite to use new
15031 stmt_vec_info infomration. Handle one operation at a time.
15032 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
15033 (vect_truncatable_operation_p, vect_set_operation_type)
15034 (vect_set_min_input_precision): New functions.
15035 (vect_determine_min_output_precision_1): Likewise.
15036 (vect_determine_min_output_precision): Likewise.
15037 (vect_determine_precisions_from_range): Likewise.
15038 (vect_determine_precisions_from_users): Likewise.
15039 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
15040 (vect_vect_recog_func_ptrs): Put over_widening first.
15042 (vect_pattern_recog): Call vect_determine_precisions.
15044 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
15046 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
15047 statements that have been replaced by further pattern statements.
15048 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
15050 2018-07-03 Richard Biener <rguenther@suse.de>
15052 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
15053 always set *dt. Dump vectype in vectype overload.
15054 * dumpfile.h (dump_gimple_expr): New function.
15055 (dump_gimple_expr_loc): Likewise.
15056 * dumpfile.c (dump_gimple_expr): New function.
15057 (dump_gimple_expr_loc): Likewise.
15059 2018-07-02 Jeff Law <law@redhat.com>
15061 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
15062 the H8/300, H8/300H and H8/S variants into a single pattern.
15063 (movhi_h8300, movqi_h8300hs): Similarly.
15064 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
15065 (QHI mode iterator): New.
15067 * config/h8300/h8300.md: Remove trailing whitespace.
15069 2018-07-02 Jim Wilson <jimw@sifive.com>
15071 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
15072 instead of emit_insn for interrupt returns.
15073 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
15074 (riscv_sret, riscv_uret): Likewise.
15076 2018-07-02 David Malcolm <dmalcolm@redhat.com>
15078 * pretty-print.c (selftest::test_pp_format): Move save and restore
15079 of quotes to class auto_fix_quotes, and add an instance.
15080 * selftest.c: Include "intl.h".
15081 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
15082 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
15083 * selftest.h (selftest::auto_fix_quotes): New class.
15085 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
15087 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
15088 (aarch64_sve_prepare_conditional_op): Remove.
15089 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
15090 Allow aarch64_simd_reg_or_zero as select operand; remove
15091 the aarch64_sve_prepare_conditional_op call.
15092 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
15093 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15094 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
15095 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
15096 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
15097 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
15098 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
15099 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
15100 and a splitters to match all of the *_any patterns.
15101 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
15103 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
15104 (SVE_COND_FP_BINARY_REV): Remove.
15105 (sve_int_op_rev, sve_fp_op_rev): New.
15106 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
15107 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
15108 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
15109 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
15110 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
15111 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
15112 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
15113 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
15114 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
15116 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
15117 Remove match_dup 1 from the inner unspec.
15118 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
15120 * config/aarch64/aarch64.md (movprfx): New attr.
15121 (length): Default movprfx to 8.
15122 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
15123 (*madd<SVE_I>, *msub<SVE_I): Likewise.
15124 (*<su>mul<SVE_I>3_highpart): Likewise.
15125 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
15126 (*v<ASHIFT><SVE_I>3): Likewise.
15127 (*<su><MAXMIN><SVE_I>3): Likewise.
15128 (*<su><MAXMIN><SVE_F>3): Likewise.
15129 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
15130 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
15131 (*div<SVE_F>4): Likewise.
15133 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
15135 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
15138 2018-07-02 Richard Biener <rguenther@suse.de>
15140 PR tree-optimization/86363
15141 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
15142 memset argument refers to a non-variable address.
15144 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
15146 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
15147 {PLUS,MINUS}_EXPR code to...
15148 (adjust_symbolic_bound): ...here,
15149 (combine_bound): ...here,
15150 (set_value_range_with_overflow): ...and here.
15152 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
15154 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
15156 (extract_range_from_abs_expr): ...here.
15158 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
15160 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
15161 -fno-omit-frame-pointer when not optimizing.
15163 2018-07-02 Martin Liska <mliska@suse.cz>
15166 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
15167 (propagate_nothrow): Likewise.
15169 2018-07-02 Martin Liska <mliska@suse.cz>
15172 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
15174 2018-07-02 David Malcolm <dmalcolm@redhat.com>
15176 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
15177 function in r262149, changing "loc" param from source_location to
15178 const dump_location_t &.
15179 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
15180 declaration, as above.
15182 2018-07-01 Paul Koning <ni1d@arrl.net>
15184 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15185 -munit-asm, -mgnu-asm, -mdec-asm.
15186 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
15187 (pdp11_output_labelref): New.
15188 (pdp11_output_def): New.
15189 (pdp11_output_addr_vec_elt): New.
15190 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
15191 %# and %@ format codes.
15192 (pdp11_option_override): New.
15193 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
15194 (pdp11_output_ident): New.
15195 (pdp11_asm_named_section): New.
15196 (pdp11_asm_init_sections): New.
15197 (pdp11_file_start): New.
15198 (pdp11_file_end): New.
15199 (output_ascii): Use .ascii/.asciz for -mdec-asm.
15200 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
15201 %o, like %c but octal.
15202 (pdp11_option_override): New.
15203 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
15205 (DATA_SECTION_ASM_OP): Ditto.
15206 (READONLY_DATA_SECTION_ASM_OP): New.
15207 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
15208 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
15209 (ASM_OUTPUT_LABELREF): Ditto.
15210 (ASM_OUTPUT_DEF): Ditto.
15211 (ASM_OUTPUT_EXTERNAL): New.
15212 (ASM_OUTPUT_SOURCE_FILENAME): New.
15213 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
15214 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
15215 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
15216 %# and %@ format codes.
15217 * config/pdp11/pdp11.opt (mgnu-asm): New.
15218 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
15219 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
15220 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
15222 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
15224 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
15225 dereferencing path[] beyond its length.
15227 (debug_all_paths): New.
15228 (rewire_first_differing_edge): New.
15229 (adjust_paths_after_duplication): New.
15230 (duplicate_thread_path): Call adjust_paths_after_duplication.
15232 (thread_through_all_blocks): Add new argument to
15233 duplicate_thread_path.
15235 2018-06-30 Jim Wilson <jimw@sifive.com>
15237 * config/riscv/predicates.md (p2m1_shift_operand): New.
15238 (high_mask_shift_operand): New.
15239 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
15240 pattern using p2m1_shift_operand.
15241 (lshsi3_zero_extend_3+2): New combiner pattern using
15242 high_mask_shift_operand.
15244 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15246 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
15248 (vect_recog_rotate_pattern): ...here.
15249 (vect_convert_input): Try to insert casts of invariants in the
15251 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
15252 preheader to be empty.
15254 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15256 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
15257 vector type. If given, install it in the new statement's
15258 STMT_VINFO_VECTYPE.
15259 (vect_element_precision): New function.
15260 (vect_unpromoted_value): New struct.
15261 (vect_unpromoted_value::vect_unpromoted_value): New function.
15262 (vect_unpromoted_value::set_op): Likewise.
15263 (vect_look_through_possible_promotion): Likewise.
15264 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
15265 (vect_widened_op_tree, vect_convert_input): Likewise.
15266 (vect_convert_inputs, vect_convert_output): Likewise.
15267 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
15268 to handle the optional cast of the multiplication result and
15269 vect_widened_op_tree to detect the widened multiplication itself.
15270 Do not require the input and output of promotion casts to have
15271 the same sign, but base the signedness of the operation on the
15272 input rather than the result. If the pattern includes two
15273 promotions, check that those promotions have the same sign.
15274 Do not restrict the MULT_EXPR handling to a double-width result;
15275 handle quadruple-width results and wider. Use vect_convert_inputs
15276 to convert the inputs to the common type.
15277 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
15278 to handle the optional cast of the ABS result. Also allow a sign
15279 change or a sign extension between the ABS and MINUS.
15280 Use vect_widened_op_tree to detect the widened subtraction and use
15281 vect_convert_inputs to convert the inputs to the common type.
15282 (vect_handle_widen_op_by_const): Delete.
15283 (vect_recog_widen_op_pattern): New function.
15284 (vect_recog_widen_mult_pattern): Use it.
15285 (vect_recog_widen_shift_pattern): Likewise.
15286 (vect_recog_widen_sum_pattern): Use
15287 vect_look_through_possible_promotion to handle the promoted
15290 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15292 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
15293 the containing gimple_seq *.
15294 * gimple-iterator.h (gsi_for_stmt): Declare it.
15295 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
15296 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
15297 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
15298 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
15299 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
15301 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
15303 (vect_mark_pattern_stmts): ...here. Handle cases in which the
15304 statement being replaced is part of an existing pattern
15305 definition sequence, inserting the new pattern statements before
15307 (vect_pattern_recog_1): Don't return a bool. If the statement
15308 is already part of a pattern, instead apply pattern matching
15309 to the pattern definition statements. Don't clear the
15310 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
15311 (vect_pattern_recog): Don't break after the first match;
15312 continue processing the pattern definition statements instead.
15313 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
15315 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15317 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15318 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15319 (vect_recog_widen_sum_pattern): Use it.
15321 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15323 * tree-vect-loop.c (vectorizable_reduction): Assert that the
15324 phi is not a pattern statement and has not been replaced by
15325 a pattern statement.
15326 * tree-vect-patterns.c (type_conversion_p): Don't check
15327 STMT_VINFO_IN_PATTERN_P.
15328 (vect_recog_vector_vector_shift_pattern): Likewise.
15329 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
15330 the pattern statement rather than the original statement; check
15331 directly for a WIDEN_MULT_EXPR here.
15332 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
15333 vect_is_simple_use to return the pattern statement rather
15334 than the original statement; use is_pattern_stmt_p to check
15335 for such a pattern statement.
15336 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
15337 to return the pattern statement rather than the original statement;
15338 don't do the same transformation here.
15339 (vect_is_simple_use): If the defining statement has been replaced
15340 by a pattern statement, return the pattern statement instead.
15341 Remove the corresponding (local) transformation from the vectype
15344 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
15346 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
15347 end and default to null.
15348 * tree-vect-loop.c (vect_create_epilog_for_reduction)
15349 (vectorizable_reduction): Update calls accordingly, dropping the
15350 gimple ** argument if the passed-back statement isn't needed.
15351 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
15352 (vect_recog_rotate_pattern): Likewise.
15353 (vect_recog_mask_conversion_pattern): Likewise.
15354 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15355 (vect_mask_constant_operand_p): Likewise.
15356 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
15357 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
15358 (get_group_load_store_type, get_load_store_type): Likewise.
15359 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
15360 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
15361 (vectorizable_conversion, vectorizable_assignment): Likewise.
15362 (vectorizable_shift, vectorizable_operation): Likewise.
15363 (vectorizable_store, vect_is_simple_cond): Likewise.
15364 (vectorizable_condition, vectorizable_comparison): Likewise.
15365 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
15366 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
15367 and move it to the end. Cope with null def_stmt_outs.
15369 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
15371 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
15373 2018-06-29 Jeff Law <law@redhat.com>
15375 * config/v850/v850.c (v850_legitimate_address_p): Handle large
15376 displacements for TARGET_V850E2V3 and newer.
15377 (TARGET_LRA_P): Remove. Defaults to LRA now.
15378 * config/v850/v850.md (sign23byte_load): Remove.
15379 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
15380 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
15382 2018-06-29 Martin Liska <mliska@suse.cz>
15385 * coverage.c (coverage_init): Mangle full path name.
15386 * doc/invoke.texi: Document the change.
15387 * gcov-io.c (mangle_path): New.
15388 * gcov-io.h (mangle_path): Likewise.
15389 * gcov.c (mangle_name): Use mangle_path for path mangling.
15391 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15393 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
15394 if starting source register is not even.
15396 2018-06-29 Martin Liska <mliska@suse.cz>
15398 PR tree-optimization/86263
15399 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
15400 Make edge redirection.
15402 2018-06-29 David Malcolm <dmalcolm@redhat.com>
15404 * dumpfile.c (dump_loc): Add indentation based on scope depth.
15405 (dump_scope_depth): New variable.
15406 (get_dump_scope_depth): New function.
15407 (dump_begin_scope): New function.
15408 (dump_end_scope): New function.
15409 * dumpfile.h (get_dump_scope_depth): New declaration.
15410 (dump_begin_scope): New declaration.
15411 (dump_end_scope): New declaration.
15412 (class auto_dump_scope): New class.
15413 (AUTO_DUMP_SCOPE): New macro.
15414 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
15417 2018-06-29 Richard Biener <rguenther@suse.de>
15419 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
15420 compute_all_dependences succeeds.
15421 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
15422 exceed --param loop-max-datarefs-for-datadeps.
15424 2018-06-29 Jakub Jelinek <jakub@redhat.com>
15426 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
15428 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
15431 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
15432 alternative 0 in preferred_for_speed attribute.
15434 2018-06-28 Paul Koning <ni1d@arrl.net>
15436 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
15437 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
15438 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
15439 * config/pdp11/pdp11.md: Correct "length" attribute calculation
15440 for shift insn patterns.
15442 2018-06-28 David Malcolm <dmalcolm@redhat.com>
15444 * cgraph.c (cgraph_node::get_body): Replace assignments to
15445 "dump_file" with calls to set_dump_file.
15446 * dumpfile.c (alt_dump_file): Make static, and group with...
15447 (alt_flags): ...this definition.
15448 (dumps_are_enabled): New variable.
15449 (refresh_dumps_are_enabled): New function.
15450 (set_dump_file): New function.
15451 (set_alt_dump_file): New function.
15452 (gcc::dump_manager::dump_start): Replace assignments to
15453 "dump_file" and "alt_dump_file" with calls to set_dump_file and
15455 (gcc::dump_manager::dump_finish): Likewise.
15456 * dumpfile.h (alt_dump_file): Delete decl.
15457 (dumps_are_enabled): New variable decl.
15458 (set_dump_file): New function decl.
15459 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
15461 * tree-nested.c (lower_nested_functions): Replace assignments to
15462 "dump_file" with calls to set_dump_file.
15464 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
15466 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
15467 goto_locus of each outgoing edge of each basic block.
15469 2018-06-28 Richard Biener <rguenther@suse.de>
15471 * dwarf2out.c (decl_scope_table): Remove.
15472 (push_decl_scope): Likewise.
15473 (pop_decl_scope): Likewise.
15474 (gen_type_die_for_member): Do not call push/pop_decl_scope.
15475 (gen_struct_or_union_type_die): Likewise.
15476 (gen_tagged_type_die): Likewise.
15477 (dwarf2out_init): Do not initialize decl_scope_table.
15478 (dwarf2out_c_finalize): Do not free it.
15480 2018-06-28 Richard Biener <rguenther@suse.de>
15482 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
15483 deciding whether to not re-use a DIE.
15485 2018-06-28 Richard Biener <rguenther@suse.de>
15487 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
15488 DW_AT_abstract_origin attribute.
15490 2018-06-28 Martin Liska <mliska@suse.cz>
15492 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15493 Use newly introduced constants.
15494 * tree-switch-conversion.h (struct jump_table_cluster):
15495 Define max_ratio_for_size and max_ratio_for_speed.
15497 2018-06-28 Martin Liska <mliska@suse.cz>
15499 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15500 Add new checking assert to catch invalid state.
15501 (jump_table_cluster::can_be_handled): Handle single case
15503 (jump_table_cluster::is_beneficial): Bail out for such case.
15504 (bit_test_cluster::find_bit_tests):
15505 Add new checking assert to catch invalid state.
15506 (bit_test_cluster::can_be_handled): Handle single case
15508 (bit_test_cluster::is_beneficial): Bail out for such case.
15509 (switch_decision_tree::analyze_switch_statement):
15512 2018-06-28 Martin Liska <mliska@suse.cz>
15514 * common.opt: Introduce -completion option.
15515 * gcc.c (driver_handle_option): Handle it.
15516 (driver::main): Print completions if completion
15518 * opt-suggestions.c (option_proposer::get_completions):
15520 (option_proposer::suggest_completion): Likewise.
15521 (option_proposer::find_param_completions): Likewise.
15522 (verify_autocompletions): Likewise.
15523 (test_completion_valid_options): Likewise.
15524 (test_completion_valid_params): Likewise.
15525 (in_completion_p): Likewise.
15526 (empty_completion_p): Likewise.
15527 (test_completion_partial_match): Likewise.
15528 (test_completion_garbage): Likewise.
15529 (opt_proposer_c_tests): Likewise.
15530 * opt-suggestions.h: Declare new functions.
15531 * opts.c (common_handle_option): Handle OPT__completion_.
15532 * selftest-run-tests.c (selftest::run_tests): Add
15533 opt_proposer_c_tests.
15534 * selftest.c (assert_str_startswith): New.
15535 * selftest.h (assert_str_startswith): Likewise.
15536 (opt_proposer_c_tests): New.
15537 (ASSERT_STR_STARTSWITH): Likewise.
15539 2018-06-28 Martin Liska <mliska@suse.cz>
15541 * Makefile.in: Add opt-suggestions.o.
15542 * gcc-main.c: Include opt-suggestions.h.
15543 * gcc.c (driver::driver): Likewise.
15544 (driver::~driver): Remove m_option_suggestions.
15545 (driver::build_option_suggestions): Moved to option_proposer.
15546 (driver::suggest_option): Likewise.
15547 (driver::handle_unrecognized_options): Use option_proposer.
15548 * gcc.h (class driver): Add new memver m_option_proposer.
15549 * opt-suggestions.c: New file.
15550 * opt-suggestions.h: New file.
15552 2018-06-28 Martin Liska <mliska@suse.cz>
15554 * vec.h (class auto_string_vec): New (moved from auto_argvec).
15555 (auto_string_vec::~auto_string_vec): Likewise.
15557 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
15559 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
15560 prevent_decl_creation_for_types fields up and add reset_location field.
15561 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
15562 statement if id->reset_location is true.
15563 (copy_edges_for_bb): Do not set goto_locus on the new edges if
15564 id->reset_location is true.
15565 (copy_phis_for_bb): Force input_location on the arguments if
15566 id->reset_location is true.
15567 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
15568 is set on the function to be inlined.
15570 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
15572 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
15574 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
15576 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
15577 registers for Pmode.
15578 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
15579 hard registers for the clobbered pseudo.
15581 2018-06-27 Paul Koning <ni1d@arrl.net>
15583 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15584 mutually exclusive options.
15585 * config/pdp11/constraints.md (h): New constraint.
15586 (O): Update definition to match shift code generation.
15587 (D): New constraint.
15588 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
15590 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
15592 (output_jump): Change arguments.
15593 (pdp11_fixed_cc_regs): New function.
15594 (pdp11_cc_mode): Ditto.
15595 (pdp11_expand_shift): Ditto.
15596 (pdp11_assemble_shift): Ditto.
15597 (pdp11_small_shift): Ditto.
15598 (pdp11_branch_cost): Remove.
15599 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
15601 (pdp11_register_move_cost): Update for CC registers.
15602 (pdp11_rtx_costs): Add case for LSHIFTRT.
15603 (pdp11_output_jump): Add CCNZ mode conditional branches.
15604 (notice_update_cc_on_set): Remove.
15605 (pdp11_cc_mode): New function.
15606 (simple_memory_operand): Correct pre/post decrement case.
15607 (no_side_effect_operand): New function.
15608 (pdp11_regno_reg_class): Add CC_REGS class.
15609 (pdp11_fixed_cc_regs): New function.
15610 (pdp11_small_shift): New function.
15611 (pdp11_expand_shift): New function to expand shift insns.
15612 (pdp11_assemble_shift): New function to output shifts.
15613 (pdp11_branch_cost): Remove.
15614 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
15615 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
15616 (WCHAR_TYPE): Ditto.
15617 (PTRDIFF_TYPE): Ditto.
15618 (ADJUST_INSN_LENGTH): New macro.
15619 (FIXED_REGISTERS): Add CC registers.
15620 (CALL_USED_REGISTERS): Ditto.
15621 (reg_class): Ditto.
15622 (REG_CLASS_NAMES): Ditto.
15623 (REG_CLASS_CONTENTS): Ditto.
15624 (SELECT_CC_MODE): Use new function.
15625 (TARGET_FLAGS_REGNUM): New macro.
15626 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
15627 (cc0_reg_rtx): Remove.
15628 (CC_STATUS_MDEP): Remove.
15629 (CC_STATUS_MDEFP_INIT): Remove.
15630 (CC_IN_FPU): Remove.
15631 (NOTICE_UPDATE_CC): Remove.
15632 (REGISTER_NAMES): Add CC registers.
15633 (BRANCH_COST): Change to constant 1.
15634 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
15636 * config/pdp11/pdp11.opt (mbcopy): Remove.
15637 (mbcopy-builtin): Remove.
15638 (mbranch-cheap): Remove.
15639 (mbranch-expensive): Remove.
15640 * config/pdp11/predicates.md (expand_shift_operand): Update to
15641 match shift code generation.
15642 (ccnz_operator): New predicate.
15643 * doc/invoke.texi (PDP-11 Options): Remove deleted options
15644 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
15645 Remove non-existent option -mabshi, -mno-abshi. Document mutually
15647 * doc/md.texi (PDP-11): Document new D and h constraints. Update
15648 description of O constraint.
15650 2018-06-27 Jeff Law <law@redhat.com>
15651 Austin Law <austinklaw@gmail.com>
15653 * config/v850/v850.md (addsi3_set_flags): New pattern.
15654 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
15655 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
15656 (zero_extendhisi2_v850_set_flags): Likewise.
15657 (zero_extendqisi2_v850_set_flags): Likewise.
15658 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
15659 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
15660 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
15662 * config/v850/v850-protos.h (notice_update_cc): Remove.
15663 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
15664 (v850_print_operand): Handle 'D' and "d".
15665 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
15666 Add handling of arithmetic/logical operations compared against zero.
15667 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
15668 Do not look at v850_compare_op, instead get mode from last argument.
15669 (v850_gen_compare): Remove
15670 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
15671 after reload for prologue insns.
15672 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
15674 (construct_save_jarl): Likewise.
15675 (TARGET_FLAGS_REGNUM): Define.
15676 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
15677 (NOTICE_UPDATE_CC): Remove.
15678 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
15679 than cc0. Conditionalize on reload_completed.
15680 (cmpsi_insn, setfcc_insn): Likewise.
15681 (tst1 splitter): Turn into define_and_split which sets the flags
15683 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
15684 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
15685 (cstoresf4, cstoredf4): Clobber the flags.
15686 (cmpsi, cmpsf, cmpdf): Remove expanders.
15687 (setf_insn): Remove pattern.
15688 (addsi3): Turn into define_and_split which clobbers the flags after
15689 reload and a suitable pattern (addsi3_clobber_flags) for use after
15691 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
15692 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
15693 (ashrsi3, ashrsi3_v850e2): Likewise.
15694 (bins): Clobber the flags.
15695 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
15696 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
15697 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
15698 (call_value_internal_short, call_value_internal_long): Likewise.
15699 (callt_save_interrupt, callt_return_interrupt): Likewise.
15700 (save_interrupt, return_interrupt): Likewise.
15701 (callt_save_all_interrupt, save_all_interrupt): Likewise.
15702 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
15703 (restore_all_interrupt, _restore_all_interrupt): Likewise.
15704 (All FP comparisons): Only allow after reload has completed.
15706 (divh, divhu): Tweak output template.
15707 (branch_z_normal, branch_z_invert): Remove
15708 (branch_nz_normal, branch_nz_invert): Likewise.
15709 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
15711 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
15712 * config/v850/v850.c (notice_update_cc): Remove.
15713 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
15714 (CC_NO_CARRY): Likewise.
15715 (NOTICE_UPDATE_CC): Define to nothing.
15716 * config/v850/v850.md: Remove block comment on cc0 handling
15717 Remove "cc" attribute from all patterns. Remove cc_status handling
15718 from all patterns. Minor formatting fixes.
15720 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15722 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
15723 (cortex-a76.cortex-a55): Likewise.
15724 * config/aarch64/aarch64-tune.md: Regenerate.
15725 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
15726 cortex-a76.cortex-a55.
15728 2018-06-27 Jeff Law <law@redhat.com>
15730 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
15731 (MULTILIB_DIRNAMES): Similarly.
15733 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
15735 * gimple.h (gimple_return_retbnd): Delete.
15736 (gimple_return_set_retbnd): Likewise.
15737 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
15738 gimple_return_set_retbnd.
15739 * gimple-pretty-print.c (dump_gimple_return): Remove call to
15740 gimple_return_retbnd and adjust.
15741 * tree-inline.h (struct copy_body_data): Remove retbnd field.
15742 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
15743 Explicitly return NULL in a couple more cases. Move assertion
15744 on debug statements and remove unreachable code.
15745 (reset_debug_binding): Do not test id->retbnd.
15746 (expand_call_inline): Do not set it.
15748 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
15750 * configure.ac: Add --disable-gcov option.
15751 * configure: Regenerate.
15752 * Makefile.in: Honour @enable_gcov@.
15753 * doc/install.texi: Document --disable-gcov.
15755 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
15757 * config/arm/arm-cpus.in (cortex-a76): New entry.
15758 (cortex-a76.cortex-a55): Likewise.
15759 * config/arm/arm-tables.opt: Regenerate.
15760 * config/arm/arm-tune.md: Likewise.
15761 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
15762 * doc/invoke.texi (ARM Options): Document cortex-a76 and
15763 cortex-a76.cortex-a55.
15765 2018-06-27 Tamar Christina <tamar.christina@arm.com>
15768 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
15770 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
15772 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
15774 (EPILOGUE_USES): Likewise.
15776 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
15778 * tree-inline.c (remap_location): New function extracted from...
15779 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
15780 (copy_phis_for_bb): ...here. Call remap_location.
15781 (copy_cfg_body): Adjust call to copy_edges_for_bb.
15783 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
15785 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
15786 unaligned vsx for 16B memset.
15788 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
15791 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
15792 ieee128_float_type_node to long_double_type_node unless
15793 TARGET_LONG_DOUBLE_128 is set.
15795 2018-06-26 David Malcolm <dmalcolm@redhat.com>
15797 * cfgloop.c (get_loop_location): Convert return type from
15798 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
15799 by implicit construction from rtx_insn *, and using
15800 dump_user_location_t::from_function_decl for the fallback case.
15801 * cfgloop.h (get_loop_location): Convert return type from
15802 location_t to dump_user_location_t.
15803 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
15804 dump_printf_loc to pass in a dump_location_t rather than a
15805 location_t, via the gimple stmt.
15806 * coverage.c (get_coverage_counts): Update calls to
15807 dump_printf_loc to pass in dump_location_t rather than a
15809 * doc/optinfo.texi (Dump types): Convert example of
15810 dump_printf_loc from taking "locus" to taking "insn". Update
15811 description of the "_loc" calls to cover dump_location_t.
15812 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
15814 (dump_user_location_t::dump_user_location_t): New constructors,
15815 from gimple *stmt and rtx_insn *.
15816 (dump_user_location_t::from_function_decl): New function.
15817 (dump_loc): Make static.
15818 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
15819 const dump_location_t &.
15820 (dump_generic_expr_loc): Delete.
15821 (dump_printf_loc): Convert param "loc" from location_t to
15822 const dump_location_t &.
15823 (selftest::test_impl_location): New function.
15824 (selftest::dumpfile_c_tests): New function.
15825 * dumpfile.h: Include "profile-count.h".
15826 (class dump_user_location_t): New class.
15827 (struct dump_impl_location_t): New struct.
15828 (class dump_location_t): New class.
15829 (dump_printf_loc): Convert 2nd param from source_location to
15830 const dump_location_t &.
15831 (dump_generic_expr_loc): Delete.
15832 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
15833 const dump_location_t &.
15834 * gimple-fold.c (fold_gimple_assign): Update call to
15835 dump_printf_loc to pass in a dump_location_t rather than a
15836 location_t, via the gimple stmt.
15837 (gimple_fold_call): Likewise.
15838 * gimple-loop-interchange.cc
15839 (loop_cand::analyze_iloop_reduction_var): Update for change to
15840 check_reduction_path.
15841 (tree_loop_interchange::interchange): Update for change to
15842 find_loop_location.
15843 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
15844 change in return-type of find_loop_location.
15845 (graphite_regenerate_ast_isl): Likewise.
15846 * graphite-optimize-isl.c (optimize_isl): Likewise.
15847 * graphite.c (graphite_transform_loops): Likewise.
15848 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
15849 pass in a dump_location_t rather than a location_t, via the
15851 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15852 * ipa.c (walk_polymorphic_call_targets): Likewise.
15853 * loop-unroll.c (report_unroll): Convert "locus" param from
15854 location_t to dump_location_t.
15855 (decide_unrolling): Update for change to get_loop_location's
15857 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
15858 location_t to dump_user_location_t.
15859 (grid_find_single_omp_among_assignments_1): Updates calls to
15860 dump_printf_loc to pass in a dump_location_t rather than a
15861 location_t, via the gimple stmt.
15862 (grid_parallel_clauses_gridifiable): Convert "tloc" from
15863 location_t to dump_location_t. Updates calls to dump_printf_loc
15864 to pass in a dump_location_t rather than a location_t, via the
15866 (grid_inner_loop_gridifiable_p): Likewise.
15867 (grid_dist_follows_simple_pattern): Likewise.
15868 (grid_gfor_follows_tiling_pattern): Likewise.
15869 (grid_target_follows_gridifiable_pattern): Likewise.
15870 (grid_attempt_target_gridification): Convert initialization
15871 of local "grid" from memset to zero-initialization; FIXME: does
15872 this require C++11? Update call to dump_printf_loc to pass in a
15873 optinfo_location rather than a location_t, via the gimple stmt.
15874 * profile.c (read_profile_edge_counts): Updates call to
15875 dump_printf_loc to pass in a dump_location_t rather than a
15877 (compute_branch_probabilities): Likewise.
15878 * selftest-run-tests.c (selftest::run_tests): Call
15880 * selftest.h (dumpfile_c_tests): New decl.
15881 * tree-loop-distribution.c (pass_loop_distribution::execute):
15882 Update for change in return type of find_loop_location.
15883 * tree-parloops.c (parallelize_loops): Likewise.
15884 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
15885 "locus" from location_t to dump_user_location_t.
15886 (canonicalize_loop_induction_variables): Likewise.
15887 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
15888 for change in return type of find_loop_location.
15889 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
15890 to dump_printf_loc to pass in a dump_location_t rather than a
15891 location_t, via the stmt.
15892 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
15894 * tree-vect-loop-manip.c (find_loop_location): Convert return
15895 type from source_location to dump_user_location_t.
15896 (vect_do_peeling): Update for above change.
15897 (vect_loop_versioning): Update for change in type of
15899 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
15900 from location_t to dump_user_location_t.
15901 (vect_estimate_min_profitable_iters): Update for change in type
15903 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
15904 location_t to dump_location_t.
15905 (vect_slp_bb): Update for change in type of vect_location.
15906 * tree-vectorizer.c (vect_location): Convert from source_location
15907 to dump_user_location_t.
15908 (try_vectorize_loop_1): Update for change in vect_location's type.
15909 (vectorize_loops): Likewise.
15910 (increase_alignment): Likewise.
15911 * tree-vectorizer.h (vect_location): Convert from source_location
15912 to dump_user_location_t.
15913 (find_loop_location): Convert return type from source_location to
15914 dump_user_location_t.
15915 (check_reduction_path): Convert 1st param from location_t to
15916 dump_user_location_t.
15917 * value-prof.c (check_counter): Update call to dump_printf_loc to
15918 pass in a dump_user_location_t rather than a location_t; update
15919 call to error_at for change in type of "locus".
15920 (check_ic_target): Update call to dump_printf_loc to
15921 pass in a dump_user_location_t rather than a location_t, via the
15924 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
15926 * config/s390/s390.h (enum processor_flags): Do not use
15927 default tune parameter when -march was specified.
15929 2018-06-26 Jakub Jelinek <jakub@redhat.com>
15932 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
15933 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
15936 2018-06-26 Richard Biener <rguenther@suse.de>
15938 PR tree-optimization/86287
15940 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
15941 (vect_analyze_loop): Initialize n_stmts.
15943 2018-06-26 Richard Biener <rguenther@suse.de>
15945 PR middle-end/86271
15946 * fold-const.c (fold_convertible_p): Pointer extension
15949 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
15952 * dwarf2out.c (loc_list_has_views): Adjust comments.
15953 (dw_loc_list): Split single cross-partition range with
15956 2018-06-25 Jeff Law <law@redhat.com>
15958 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
15959 on -mbig-switch by default.
15961 * config/v850/predicates.md (const_float_1_operand): Fix match_code
15963 (const_float_0_operand): Remove unused predicate.
15964 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
15965 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
15966 (recipsf2): New expander. Original pattern now called
15968 (recipdf2, recipdf2_insn): Similarly.
15969 (rsqrtsf2, rsqrtsf2_insn): Similarly
15970 (rsqrtdf2, rsqrtdf2_insn): Similarly
15972 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
15974 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
15975 Simplify logic for FreeBSD (twice).
15977 2018-06-25 Martin Sebor <msebor@redhat.com>
15979 PR tree-optimization/86204
15980 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
15981 a strnlen result if it's less than the length of the string.
15983 2018-06-25 Martin Sebor <msebor@redhat.com>
15985 PR tree-optimization/85700
15986 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
15987 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
15988 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
15990 2018-06-25 Martin Sebor <msebor@redhat.com>
15992 * doc/extend.texi (Zero-length arrays): Update and clarify.
15994 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
15996 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
15997 added IEEE/IBM long double multilib support on PowerPC little
15998 endian Linux systems.
15999 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
16000 (MULTILIB_DEFAULTS): Likewise.
16001 * config/rs6000/rs6000.c (rs6000_option_override_internal):
16003 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
16004 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
16005 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
16007 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
16009 PR middle-end/86311
16010 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
16011 (REORDER_45): Likewise.
16013 2018-06-25 Jeff Law <law@redhat.com>
16015 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
16016 dividend to 32 bits. Adjust length.
16017 (udivmodhi4): Cleanup output template. Fix length.
16019 2018-06-25 Carl Love <cel@us.ibm.com>
16021 * config/rs6000/vsx.md: Change word selector to prefered location.
16023 2018-06-25 Richard Biener <rguenther@suse.de>
16025 PR tree-optimization/86304
16026 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
16027 epilogue-if-converted loops as well.
16029 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
16031 * lto-section-out.c (lto_begin_section): Do not print section
16032 name for noaddr and unnumbered dumps.
16034 2018-06-25 Richard Biener <rguenther@suse.de>
16036 * tree-vectorizer.h (struct vec_info_shared): New structure
16037 with parts split out from struct vec_info and loop_nest from
16038 struct _loop_vec_info.
16039 (struct vec_info): Adjust accordingly.
16040 (struct _loop_vec_info): Likewise.
16041 (LOOP_VINFO_LOOP_NEST): Adjust.
16042 (LOOP_VINFO_DATAREFS): Likewise.
16043 (LOOP_VINFO_DDRS): Likewise.
16044 (struct _bb_vec_info): Likewise.
16045 (BB_VINFO_DATAREFS): Likewise.
16046 (BB_VINFO_DDRS): Likewise.
16047 (struct _stmt_vec_info): Add dr_aux member.
16048 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
16049 (DR_MISALIGNMENT_UNINITIALIZED): New.
16050 (set_dr_misalignment): Adjust.
16051 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
16052 (vect_analyze_loop): Adjust prototype.
16053 (vect_analyze_loop_form): Likewise.
16054 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16055 Compute dependences lazily.
16056 (vect_record_base_alignments): Use shared datarefs/ddrs.
16057 (vect_verify_datarefs_alignment): Likewise.
16058 (vect_analyze_data_refs_alignment): Likewise.
16059 (vect_analyze_data_ref_accesses): Likewise.
16060 (vect_analyze_data_refs): Likewise.
16061 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
16062 constructor parameter for shared part.
16063 (vect_analyze_loop_form): Pass in shared part and adjust.
16064 (vect_analyze_loop_2): Pass in storage for the number of
16065 stmts. Move loop nest finding to the caller. Compute
16067 (vect_analyze_loop): Pass in shared part.
16068 (vect_transform_loop): Verify shared datarefs are unchanged.
16069 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
16070 constructor parameter for shared part.
16071 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
16072 (vect_slp_bb): Verify shared datarefs are unchanged before
16074 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
16076 (new_stmt_vec_info): Initialize DR_AUX misalignment to
16077 DR_MISALIGNMENT_UNINITIALIZED.
16078 * tree-vectorizer.c (vec_info::vec_info): Add constructor
16079 parameter for shared part.
16080 (vec_info::~vec_info): Adjust.
16081 (vec_info_shared::vec_info_shared): New.
16082 (vec_info_shared::~vec_info_shared): Likewise.
16083 (vec_info_shared::save_datarefs): Likewise.
16084 (vec_info_shared::check_datarefs): Likewise.
16085 (try_vectorize_loop_1): Construct shared part live for analyses
16086 of a single loop for multiple vector sizes.
16087 * tree-parloops.c (gather_scalar_reductions): Adjust.
16089 2018-06-25 Richard Biener <rguenther@suse.de>
16091 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
16092 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
16093 (vect_analyze_data_refs): Remove similar code from here and
16094 simplify accordingly.
16096 2018-06-25 Richard Biener <rguenther@suse.de>
16098 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
16099 for reverse storage order accesses rather than asserting
16100 they cannot happen here.
16102 2018-06-25 Tom de Vries <tdevries@suse.de>
16105 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
16106 Use data16 instead of .byte for insn prefix.
16108 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
16111 * parser.c (make_char_string_pack): Pass this literal chars
16112 through cpp_interpret_string.
16113 (cp_parser_userdef_numeric_literal): Check the result of
16114 make_char_string_pack.
16116 2018-06-24 Maya Rashish <coypu@sdf.org>
16118 * ginclude/stddef.h: Simplify conditions around avoiding
16119 re-definition of __size_t.
16121 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16123 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
16124 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
16126 2018-06-22 Maya Rashish <coypu@sdf.org>
16128 * doc/invoke.texi (mno-fancy-math-387): Update for changes
16129 made to OpenBSD and NetBSD through the years.
16131 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
16133 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16134 behavior of vec_pack (vector double, vector double) to match
16135 behavior of vec_float2 (vector double, vector double).
16137 2018-06-22 Olivier Hainque <hainque@adacore.com>
16139 * gimplify.c (gimplify_function_tree): Prevent creation
16140 of a trampoline for the address of the current function
16141 passed to entry/exit instrumentation hooks.
16143 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
16146 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
16149 2018-06-22 Martin Liska <mliska@suse.cz>
16151 PR tree-optimization/86263
16152 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16153 Bail out if is_enabled is false.
16154 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
16156 (jump_table_cluster::is_enabled): New function.
16158 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16160 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
16161 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
16162 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
16163 (lto_input_ts_binfo_tree_pointers): Likewise.
16164 * tree-streamer-out.c (streamer_write_tree_bitfields,
16165 write_ts_binfo_tree_pointers): Likewise.
16166 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
16168 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
16170 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
16172 2018-06-22 Martin Liska <mliska@suse.cz>
16174 * symbol-summary.h (get): Make it pure and inline move
16175 functionality from ::get function.
16176 (get): Remove and inline into ::get and ::get_create.
16177 (get_create): Move code from ::get function.
16179 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16182 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
16183 -x assembler-with-cpp.
16185 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16187 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
16188 _FILE_OFFSET_BITS=64 for C++.
16190 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
16192 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
16193 conversion insn that shows up when pr85657-3.c is compiled using
16194 IEEE 128-bit long double.
16195 (neg<mode>2_internal): Use the correct mode to check whether the
16196 mode is IBM extended.
16197 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
16198 multiply and divide external functions from being created more
16201 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16203 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
16205 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
16206 the edge can be forwarded.
16207 (cfg_layout_merge_blocks): Likewise.
16209 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16211 * except.c (finish_eh_generation): Commit edge insertions only after
16212 the EH edges have been redirected from post-landing to landing pads.
16214 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16216 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
16217 create_tmp_var_for to create the FRAME decl.
16218 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
16220 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
16222 * tree-inline.c (copy_edges_for_bb): Minor tweak.
16223 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
16224 debug statement when resetting its value.
16225 (expand_call_inline): Copy the locus of the call onto the assignment
16226 of the return value, if any. Use local variable in more cases.
16228 2018-06-21 Martin Liska <mliska@suse.cz>
16230 * ipa-pure-const.c (propagate_nothrow): Use
16231 funct_state_summaries->get.
16232 (dump_malloc_lattice): Likewise.
16233 (propagate_malloc): Likewise.
16235 2018-06-21 Richard Biener <rguenther@suse.de>
16237 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
16238 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
16239 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
16241 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
16242 BLOCK_ABSTRACT_ORIGIN unconditionally.
16244 2018-06-21 David Malcolm <dmalcolm@redhat.com>
16246 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
16248 * ipa-reference.c (ipa_reference_c_finalize): Delete
16249 ipa_ref_opt_sum_summaries and set it to NULL.
16251 2018-06-21 Tom de Vries <tdevries@suse.de>
16253 PR tree-optimization/85859
16254 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
16255 test with comment from bb_no_side_effects_p.
16257 2018-06-21 Richard Biener <rguenther@suse.de>
16259 PR tree-optimization/86232
16260 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
16261 max for constant niter.
16263 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
16265 * config/aarch64/aarch64-simd.md
16266 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
16268 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
16270 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
16271 Make opernads of the unspec commutative.
16273 2018-06-21 Richard Biener <rguenther@suse.de>
16275 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
16276 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
16277 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
16278 (vect_analyze_data_ref_dependence): Re-order checks to deal with
16280 (vect_record_base_alignments): Do not record base alignment
16281 for gathers or scatters.
16282 (vect_compute_data_ref_alignment): Drop return value that is always
16283 true. Bail out early for gathers or scatters.
16284 (vect_enhance_data_refs_alignment): Bail out early for gathers
16286 (vect_find_same_alignment_drs): Likewise.
16287 (vect_analyze_data_refs_alignment): Remove dead code.
16288 (vect_slp_analyze_and_verify_node_alignment): Likewise.
16289 (vect_analyze_data_refs): For possible gathers or scatters do
16290 not create an alternate DR, just check their possible validity
16291 and mark them. Adjust DECL_NONALIASED handling to not rely
16292 on DR_BASE_ADDRESS.
16293 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
16294 update inits of gathers or scatters.
16295 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
16296 Also copy gather/scatter flag to pattern vinfo.
16298 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
16300 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
16301 behavior of vec_packsu (vector unsigned long long, vector unsigned
16302 long long) to match behavior of vec_packs with same signature.
16304 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
16305 Thomas Schwinge <thomas@codesourcery.com>
16306 Cesar Philippidis <cesar@codesourcery.com>
16308 * gimplify.c (gimplify_scan_omp_clauses): Add support for
16309 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16310 (gimplify_adjust_omp_clauses): Likewise.
16311 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
16312 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
16313 (gimplify_omp_target_update): Update handling of acc update and
16315 * omp-low.c (install_var_field): Remove unused parameter
16316 base_pointers_restrict.
16317 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
16318 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
16320 (omp_target_base_pointers_restrict_p): Delete.
16321 (scan_omp_target): Update call to scan_sharing_clauses.
16322 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
16324 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
16325 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16326 (convert_local_omp_clauses): Likewise.
16327 * tree-pretty-print.c (dump_omp_clause): Likewise.
16328 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
16330 (omp_clause_code_name): Likewise.
16332 2018-06-20 Jakub Jelinek <jakub@redhat.com>
16335 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
16338 PR tree-optimization/86231
16339 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
16340 anti-range don't overwrite *vr0min before using it to compute *vr0max.
16342 2018-06-20 Tom de Vries <tdevries@suse.de>
16344 PR tree-optimization/86097
16345 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
16346 iv type if signedness of iv type is not the same as that of *nit.
16348 2018-06-20 Jakub Jelinek <jakub@redhat.com>
16350 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
16351 EDGE_EH edges, verify they are all EDGE_EH.
16353 2018-06-20 Maya Rashish <coypu@sdf.org>
16355 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
16357 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16359 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
16360 * config/aarch64/aarch64.c (xgene1_tunings): Add
16361 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
16362 (aarch64_mode_valid_for_sched_fusion_p):
16363 Allow 16-byte modes.
16364 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
16365 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
16367 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
16369 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
16370 * config/aarch64/iterators.md (VQ2): New mode iterator.
16372 2018-06-20 Martin Liska <mliska@suse.cz>
16374 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16375 Change default ratio from 10 to 8.
16377 2018-06-20 Martin Liska <mliska@suse.cz>
16379 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16381 (bit_test_cluster::find_bit_tests): Likewise.
16382 (switch_decision_tree::analyze_switch_statement): Find clusters.
16383 * tree-switch-conversion.h (struct jump_table_cluster): Document
16386 2018-06-20 Martin Liska <mliska@suse.cz>
16388 * tree-switch-conversion.c (switch_conversion::collect):
16389 Record m_uniq property.
16390 (switch_conversion::expand): Bail out for special conditions.
16391 (group_cluster::~group_cluster): New.
16392 (group_cluster::group_cluster): Likewise.
16393 (group_cluster::dump): Likewise.
16394 (jump_table_cluster::emit): New.
16395 (switch_decision_tree::fix_phi_operands_for_edges): New.
16396 (struct case_node): Remove struct.
16397 (jump_table_cluster::can_be_handled): New.
16398 (case_values_threshold): Moved to header.
16399 (reset_out_edges_aux): Likewise.
16400 (jump_table_cluster::is_beneficial): New.
16401 (bit_test_cluster::can_be_handled): Likewise.
16402 (add_case_node): Remove.
16403 (bit_test_cluster::is_beneficial): New.
16404 (case_bit_test::cmp): New.
16405 (bit_test_cluster::emit): New.
16406 (expand_switch_as_decision_tree_p): Remove.
16407 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
16408 (fix_phi_operands_for_edge): Likewise.
16409 (switch_decision_tree::analyze_switch_statement): New.
16410 (compute_cases_per_edge): Move ...
16411 (switch_decision_tree::compute_cases_per_edge): ... here.
16412 (try_switch_expansion): Likewise.
16413 (switch_decision_tree::try_switch_expansion): Likewise.
16414 (record_phi_operand_mapping): Likewise.
16415 (switch_decision_tree::record_phi_operand_mapping): Likewise.
16416 (emit_case_decision_tree): Likewise.
16417 (switch_decision_tree::emit): Likewise.
16418 (balance_case_nodes): Likewise.
16419 (switch_decision_tree::balance_case_nodes): Likewise.
16420 (dump_case_nodes): Likewise.
16421 (switch_decision_tree::dump_case_nodes): Likewise.
16422 (emit_jump): Likewise.
16423 (switch_decision_tree::emit_jump): Likewise.
16424 (emit_cmp_and_jump_insns): Likewise.
16425 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
16426 (emit_case_nodes): Likewise.
16427 (switch_decision_tree::emit_case_nodes): Likewise.
16428 (conditional_probability): Remove.
16429 * tree-switch-conversion.h (enum cluster_type): New.
16431 (struct cluster): Likewise.
16432 (cluster::cluster): Likewise.
16433 (struct simple_cluster): Likewise.
16434 (simple_cluster::simple_cluster): Likewise.
16435 (struct group_cluster): Likewise.
16436 (struct jump_table_cluster): Likewise.
16437 (struct bit_test_cluster): Likewise.
16438 (struct min_cluster_item): Likewise.
16439 (struct case_tree_node): Likewise.
16440 (case_tree_node::case_tree_node): Likewise.
16441 (jump_table_cluster::case_values_threshold): Likewise.
16442 (struct case_bit_test): Likewise.
16443 (struct switch_decision_tree): Likewise.
16444 (struct switch_conversion): Likewise.
16445 (switch_decision_tree::reset_out_edges_aux): Likewise.
16447 2018-06-20 Martin Liska <mliska@suse.cz>
16449 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
16450 (hoist_edge_and_branch_if_true): Likewise.
16451 (expand_switch_using_bit_tests_p): Likewise.
16452 (struct case_bit_test): Likewise.
16453 (case_bit_test_cmp): Likewise.
16454 (emit_case_bit_tests): Likewise.
16455 (switch_conversion::switch_conversion): New class.
16456 (struct switch_conv_info): Remove old struct.
16457 (collect_switch_conv_info): More to ...
16458 (switch_conversion::collect): ... this.
16459 (check_range): Likewise.
16460 (switch_conversion::check_range): Likewise.
16461 (check_all_empty_except_final): Likewise.
16462 (switch_conversion::check_all_empty_except_final): Likewise.
16463 (check_final_bb): Likewise.
16464 (switch_conversion::check_final_bb): Likewise.
16465 (create_temp_arrays): Likewise.
16466 (switch_conversion::create_temp_arrays): Likewise.
16467 (free_temp_arrays): Likewise.
16468 (gather_default_values): Likewise.
16469 (switch_conversion::gather_default_values): Likewise.
16470 (build_constructors): Likewise.
16471 (switch_conversion::build_constructors): Likewise.
16472 (constructor_contains_same_values_p): Likewise.
16473 (switch_conversion::contains_same_values_p): Likewise.
16474 (array_value_type): Likewise.
16475 (switch_conversion::array_value_type): Likewise.
16476 (build_one_array): Likewise.
16477 (switch_conversion::build_one_array): Likewise.
16478 (build_arrays): Likewise.
16479 (switch_conversion::build_arrays): Likewise.
16480 (gen_def_assigns): Likewise.
16481 (switch_conversion::gen_def_assigns): Likewise.
16482 (prune_bbs): Likewise.
16483 (switch_conversion::prune_bbs): Likewise.
16484 (fix_phi_nodes): Likewise.
16485 (switch_conversion::fix_phi_nodes): Likewise.
16486 (gen_inbound_check): Likewise.
16487 (switch_conversion::gen_inbound_check): Likewise.
16488 (process_switch): Use the newly created class.
16489 (switch_conversion::expand): New.
16490 (switch_conversion::~switch_conversion): New.
16491 * tree-switch-conversion.h: New file.
16493 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16495 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
16496 tree-vect-patterns.c.
16497 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
16498 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
16499 (vect_recog_sad_pattern): Likewise.
16500 (vect_recog_widen_sum_pattern): Likewise.
16501 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
16502 (vect_recog_widen_shift_pattern): Remove the type_in argument.
16503 (vect_recog_rotate_pattern): Likewise.
16504 (vect_recog_mult_pattern): Likewise.
16505 (vect_recog_vector_vector_shift_pattern): Likewise.
16506 (vect_recog_divmod_pattern): Likewise.
16507 (vect_recog_mixed_size_cond_pattern): Likewise.
16508 (vect_recog_bool_pattern): Likewise.
16509 (vect_recog_mask_conversion_pattern): Likewise.
16510 (vect_try_gather_scatter_pattern): Likewise.
16511 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
16512 (vect_recog_over_widening_pattern): Likewise.
16513 (vect_recog_gather_scatter_pattern): Likewise.
16514 (vect_recog_func_ptr): Move from tree-vectorizer.h
16515 (vect_vect_recog_func_ptrs): Move further down the file.
16516 (vect_recog_func): Likewise. Remove the third argument.
16517 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
16518 (vect_pattern_recog_1): Expect the pattern function to do any
16519 necessary target tests. Also expect it to provide a vector type.
16520 Remove the type_in handling.
16522 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16524 * tree-vect-patterns.c (vect_pattern_detected): New function.
16525 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
16526 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
16527 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
16528 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
16529 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16530 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16531 (vect_recog_mask_conversion_pattern)
16532 (vect_try_gather_scatter_pattern): Likewise.
16534 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16536 * tree-vect-patterns.c (vect_get_internal_def): New function.
16537 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16538 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
16539 (search_type_for_mask_1): Use it.
16541 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16543 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16544 redundant WIDEN_SUM_EXPR handling.
16545 (vect_recog_sad_pattern): Likewise.
16547 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16549 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16550 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
16551 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
16552 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
16553 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
16555 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16557 * tree-vect-stmts.c (vectorizable_call): Make sure that we
16558 use the stmt_vec_info of the original bb statement for the
16559 new zero assignment, even if the call is part of a pattern.
16561 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16563 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
16564 that the sequence is attached to the original statement rather
16565 than the pattern statement.
16566 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
16567 PATTERN_DEF_SEQ from the original statement rather than
16568 the main pattern statement.
16569 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
16570 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
16571 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
16573 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
16575 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
16576 definition statements before the early exit for statements that aren't
16578 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
16580 (vect_transform_loop): ...here. Process pattern definition
16581 statements without first checking whether the main pattern
16582 statement is live or relevant.
16584 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
16586 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
16587 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
16589 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
16591 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
16592 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
16593 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
16594 (expand_block_compare): Change select_block_compare_mode call.
16595 (expand_strncmp_align_check): Use new functions, fix comment.
16596 (emit_final_str_compare_gpr): New function.
16597 (expand_strn_compare): Refactor and clean up code.
16598 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
16600 2018-06-19 Tony Reix <tony.reix@atos.com>
16601 Damien Bergamini <damien.bergamini@atos.com>
16602 David Edelsohn <dje.gcc@gmail.com>
16604 * collect2.c (static_obj): New variable.
16605 (static_libs): New variable.
16606 (is_in_list): Uncomment declaration.
16607 (main): Track AIX libraries linked statically.
16608 (is_in_list): Uncomment definition.
16609 (scan_prog_file): Don't add AIX shared libraries initializer
16610 to constructor list if linking statically.
16612 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
16614 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
16616 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
16618 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
16620 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
16623 2018-06-19 Martin Liska <mliska@suse.cz>
16625 * config/i386/i386.c (ix86_can_inline_p): Do not use
16626 ipa_fn_summaries::get_create.
16627 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
16629 (devirtualization_time_bonus): Likewise.
16630 (ipcp_propagate_stage): Likewise.
16631 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16632 (edge_set_predicate): Likewise.
16633 (evaluate_conditions_for_known_args): Likewise.
16634 (evaluate_properties_for_edge): Likewise.
16635 (ipa_call_summary::reset): Tranform to ...
16636 (ipa_call_summary::~ipa_call_summary): ... this.
16637 (ipa_fn_summary::reset): Transform to ...
16638 (ipa_fn_summary::~ipa_fn_summary): ... this.
16639 (ipa_fn_summary_t::remove): Rename to ...
16640 (ipa_fn_summary_t::remove_callees): ... this.
16641 (ipa_fn_summary_t::duplicate): Use placement new
16642 instead of memory copy.
16643 (ipa_call_summary_t::duplicate): Likewise.
16644 (ipa_call_summary_t::remove): Remove.
16645 (dump_ipa_call_summary): Change get_create to get.
16646 (ipa_dump_fn_summary): Dump only when summary exists.
16647 (analyze_function_body): Use symbol_summary::get instead
16649 (compute_fn_summary): Likewise.
16650 (estimate_edge_devirt_benefit): Likewise.
16651 (estimate_edge_size_and_time): Likewise.
16652 (inline_update_callee_summaries): Likewise.
16653 (remap_edge_change_prob): Likewise.
16654 (remap_edge_summaries): Likewise.
16655 (ipa_merge_fn_summary_after_inlining): Likewise.
16656 (write_ipa_call_summary): Likewise.
16657 (ipa_fn_summary_write): Likewise.
16658 (ipa_free_fn_summary): Likewise.
16659 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
16660 (struct ipa_call_summary): Likewise.
16661 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
16663 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
16664 (estimate_size_after_inlining): Likewise.
16665 (estimate_growth): Likewise.
16666 (growth_likely_positive): Likewise.
16667 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16668 (inline_call): Likewise.
16669 * ipa-inline.c (caller_growth_limits): Likewise.
16670 (can_inline_edge_p): Likewise.
16671 (can_inline_edge_by_limits_p): Likewise.
16672 (compute_uninlined_call_time): Likewise.
16673 (compute_inlined_call_time): Likewise.
16674 (want_inline_small_function_p): Likewise.
16675 (edge_badness): Likewise.
16676 (update_caller_keys): Likewise.
16677 (update_callee_keys): Likewise.
16678 (inline_small_functions): Likewise.
16679 (inline_to_all_callers_1): Likewise.
16680 (dump_overall_stats): Likewise.
16681 (early_inline_small_functions): Likewise.
16682 (early_inliner): Likewise.
16683 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16684 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16685 * ipa-pure-const.c (malloc_candidate_p): Likewise.
16686 * ipa-split.c (execute_split_functions): Likewise.
16687 * symbol-summary.h: Likewise.
16688 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16690 2018-06-19 Richard Biener <rguenther@suse.de>
16692 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
16693 (vectorize_loops): ... here. Fix dbgcnt handling.
16694 (try_vectorize_loop): Wrap try_vectorize_loop_1.
16696 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
16699 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
16700 ieee128 argument takes up only one (vector) register, not two (floating
16703 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
16705 * gimplify.c (gimplify_init_constructor): Really never clear for an
16706 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
16708 2018-06-19 Richard Biener <rguenther@suse.de>
16710 PR tree-optimization/86179
16711 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
16712 after failed recognition.
16714 2018-06-18 Martin Sebor <msebor@redhat.com>
16716 PR middle-end/85602
16717 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
16718 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
16719 Handle integer subtraction.
16720 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
16721 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
16723 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16725 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
16726 param from rtx to rtx_insn *.
16727 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
16729 (frv_ifcvt_modify_insn): Likwise.
16730 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
16731 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
16732 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
16733 as_a <rtx_insn *> cast to local "unprotected_region" once
16734 it's been established that it's not NULL or pc_rtx.
16735 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
16736 param "sethi" from rtx to rtx_insn *.
16737 (nds32_group_float_insns): Likewise for param "insn".
16738 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
16740 (vax_output_int_subtract): Likewise.
16741 * config/vax/vax.c (vax_output_int_add): Likewise for param
16743 (vax_output_int_subtract): Likewise.
16744 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
16745 (emit_pattern_after): Likewise for param "after".
16746 (emit_insn_after): Likewise.
16747 (emit_jump_insn_after): Likewise.
16748 (emit_call_insn_after): Likewise.
16749 (emit_debug_insn_after): Likewise.
16750 (emit_pattern_before): Likewise for param "before".
16751 (emit_insn_before): Likewise.
16752 (emit_jump_insn_before): Likewise.
16753 * final.c (get_insn_template): Likewise for param "insn", removing
16755 * output.h (get_insn_template): Likewise for 2nd param.
16756 * rtl.h (emit_insn_before): Likewise.
16757 (emit_jump_insn_before): Likewise.
16758 (emit_debug_insn_before_noloc): Likewise.
16759 (emit_insn_after): Likewise.
16760 (emit_jump_insn_after): Likewise.
16761 (emit_call_insn_after): Likewise.
16762 (emit_debug_insn_after): Likewise.
16763 (set_insn_deleted): Likewise for param.
16765 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
16768 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
16769 floating point modes, so that IFmode is numerically greater than
16770 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
16771 to declare the ordering. This prevents IFmode from being
16772 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
16773 machine. Include rs6000-modes.h to share the fractional values
16774 between genmodes* and the rest of the compiler.
16775 (IFmode): Likewise.
16776 (KFmode): Likewise.
16777 (TFmode): Likewise.
16778 * config/rs6000/rs6000-modes.h: New file.
16779 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
16780 meaning of rs6000_long_double_size so that 126..128 selects an
16781 appropriate 128-bit floating point type.
16782 (rs6000_option_override_internal): Likewise.
16783 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
16784 (TARGET_LONG_DOUBLE_128): Change the meaning of
16785 rs6000_long_double_size so that 126..128 selects an appropriate
16786 128-bit floating point type.
16787 (LONG_DOUBLE_TYPE_SIZE): Update comment.
16788 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
16789 source and destination to match the standard usage.
16790 (truncifkf2): Likewise.
16791 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
16792 ISA 2.07 to use an explicit clobber, instead of passing in a
16794 (copysign<mode>3_soft): Likewise.
16796 2018-06-18 David Malcolm <dmalcolm@redhat.com>
16798 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16799 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
16800 (vect_slp_analyze_instance_dependence): Likewise.
16801 (vect_enhance_data_refs_alignment): Likewise.
16802 (vect_analyze_data_refs_alignment): Likewise.
16803 (vect_slp_analyze_and_verify_instance_alignment
16804 (vect_analyze_data_ref_accesses): Likewise.
16805 (vect_prune_runtime_alias_test_list): Likewise.
16806 (vect_analyze_data_refs): Likewise.
16807 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
16808 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16809 (vect_analyze_scalar_cycles_1): Likewise.
16810 (vect_get_loop_niters): Likewise.
16811 (vect_analyze_loop_form_1): Likewise.
16812 (vect_update_vf_for_slp): Likewise.
16813 (vect_analyze_loop_operations): Likewise.
16814 (vect_analyze_loop): Likewise.
16815 (vectorizable_induction): Likewise.
16816 (vect_transform_loop): Likewise.
16817 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
16818 * tree-vect-slp.c (vect_analyze_slp): Likewise.
16819 (vect_make_slp_decision): Likewise.
16820 (vect_detect_hybrid_slp): Likewise.
16821 (vect_slp_analyze_operations): Likewise.
16822 (vect_slp_bb): Likewise.
16823 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
16824 (vectorizable_bswap): Likewise.
16825 (vectorizable_call): Likewise.
16826 (vectorizable_simd_clone_call): Likewise.
16827 (vectorizable_conversion): Likewise.
16828 (vectorizable_assignment): Likewise.
16829 (vectorizable_shift): Likewise.
16830 (vectorizable_operation): Likewise.
16831 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
16833 2018-06-18 Martin Sebor <msebor@redhat.com>
16835 PR tree-optimization/81384
16836 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
16837 * builtins.c (expand_builtin_strnlen): New function.
16838 (expand_builtin): Call it.
16839 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
16840 * builtins.def (BUILT_IN_STRNLEN): New.
16841 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
16842 Warn for bounds in excess of maximum object size.
16843 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
16844 single-value ranges. Handle strnlen.
16845 (handle_builtin_strlen): Handle strnlen.
16846 (strlen_check_and_optimize_stmt): Same.
16847 * doc/extend.texi (Other Builtins): Document strnlen.
16849 2018-06-18 Maya Rashish <coypu@sdf.org>
16851 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
16852 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
16853 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
16855 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
16857 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
16859 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16861 * tree.c (escaped_string::escape): Replace cast to char * by
16862 const_cast<char *> (unescaped).
16864 2018-06-18 Nick Clifton <nickc@redhat.com>
16867 * tree.c (escaped_string): New class. Converts an unescaped
16868 string into its escaped equivalent.
16869 (warn_deprecated_use): Use the new class to convert the
16870 deprecation message, if present.
16871 (test_escaped_strings): New self test.
16872 (test_c_tests): Add test_escaped_strings.
16873 * doc/extend.texi (deprecated): Add a note that the
16874 deprecation message is affected by the -fmessage-length
16875 option, and that control characters will be escaped.
16876 (#pragma GCC error): Document this pragma.
16877 (#pragma GCC warning): Likewise.
16878 * doc/invoke.texi (-fmessage-length): Document this option's
16879 effect on the #warning and #error preprocessor directives and
16880 the deprecated attribute.
16882 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
16884 * tree.c (decl_value_expr_lookup): Revert latest change.
16885 (decl_value_expr_insert): Likewise.
16887 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
16889 * gimplify.c (nonlocal_vlas): Delete.
16890 (nonlocal_vla_vars): Likewise.
16891 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
16893 (gimplify_body): Do not create and destroy nonlocal_vlas.
16894 * tree-nested.c: Include diagnostic.h.
16895 (use_pointer_in_frame): Tweak.
16896 (lookup_field_for_decl): Add assertion and declare the transformation.
16897 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
16898 internal error when the reference is in a wrong context. Do not
16899 create a debug decl by default.
16900 (note_nonlocal_block_vlas): Delete.
16901 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
16902 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
16903 create a debug decl by default.
16904 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
16905 call is in a wrong context.
16906 (fixup_vla_decls): New function.
16907 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
16908 debug variables were created.
16909 * tree.c (decl_value_expr_lookup): Add checking assertion.
16910 (decl_value_expr_insert): Likewise.
16912 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16914 PR middle-end/82479
16915 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
16916 * tree-scalar-evolution.c (interpret_expr): Likewise.
16917 (expression_expensive_p): Likewise.
16918 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
16919 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
16920 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
16921 (ssa_defined_by_minus_one_stmt_p): New.
16923 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
16925 PR middle-end/64946
16926 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
16927 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
16928 * dojump.c (do_jump): Likewise.
16929 * expr.c (expand_expr_real_2): Check operand type's sign.
16930 * fold-const.c (const_unop): Handle ABSU_EXPR.
16931 (fold_abs_const): Likewise.
16932 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
16933 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
16934 (strip_sign_op_1): Likesise.
16935 * match.pd: Add new pattern to generate ABSU_EXPR.
16936 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
16937 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16938 * tree-eh.c (operation_could_trap_helper_p): Likewise.
16939 * tree-inline.c (estimate_operator_cost): Likewise.
16940 * tree-pretty-print.c (dump_generic_node): Likewise.
16941 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
16942 * tree.def (ABSU_EXPR): New.
16944 2018-06-16 Jakub Jelinek <jakub@redhat.com>
16946 PR middle-end/86095
16947 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
16948 documented as preserved for backward compatibility only.
16949 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
16951 PR rtl-optimization/86108
16952 * bb-reorder.c (create_forwarder_block): Renamed to ...
16953 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
16954 jump from new landing pad to the second part.
16955 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
16958 2018-06-15 Jakub Jelinek <jakub@redhat.com>
16960 PR middle-end/85878
16961 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
16962 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
16963 Only call store_expr for halves if the mode is the same.
16965 PR middle-end/86123
16966 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
16967 Fix up comment formatting.
16969 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
16971 * typed-splay-tree.h (typed_splay_tree::remove): New function.
16972 (typed_splay_tree::closure,
16973 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
16974 (typed_splay_tree::typed_splay_tree,
16975 typed_splay_tree::operator =): Declared private.
16976 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
16977 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
16978 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
16979 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
16980 typed_splay_tree::splay_tree_splay,
16981 typed_splay_tree::splay_tree_foreach_helper,
16982 typed_splay_tree::splay_tree_insert,
16983 typed_splay_tree::splay_tree_remove,
16984 typed_splay_tree::splay_tree_lookup,
16985 typed_splay_tree::splay_tree_predecessor,
16986 typed_splay_tree::splay_tree_successor,
16987 typed_splay_tree::splay_tree_min,
16988 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
16989 (typed_splay_tree::root, typed_splay_tree::comp,
16990 typed_splay_tree::delete_key,
16991 typed_splay_tree::delete_value): New data members.
16992 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
16993 typed_splay_tree::remove.
16995 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
16997 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
16998 -mginv and -mno-ginv to the assembler.
16999 * config/mips/mips.opt (-mcrc): New option.
17000 (-mginv): Likewise.
17001 * doc/invoke.text (-mcrc): Document.
17002 (-mginv): Likewise.
17004 2018-06-15 Nick Clifton <nickc@redhat.com>
17007 * tree.c (escaped_string): New class. Converts an unescaped
17008 string into its escaped equivalent.
17009 (warn_deprecated_use): Use the new class to convert the
17010 deprecation message, if present.
17011 (test_escaped_strings): New self test.
17012 (test_c_tests): Add test_escaped_strings.
17013 * doc/extend.texi (deprecated): Add a note that the
17014 deprecation message is affected by the -fmessage-length
17015 option, and that control characters will be escaped.
17016 (#pragma GCC error): Document this pragma.
17017 (#pragma GCC warning): Likewise.
17018 * doc/invoke.texi (-fmessage-length): Document this option's
17019 effect on the #warning and #error preprocessor directives and
17020 the deprecated attribute.
17022 2018-06-15 Richard Biener <rguenther@suse.de>
17024 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
17025 here, also noting vector size used.
17026 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
17027 size used in MSG_OPTIMIZED_LOCATIONS dump.
17028 (pass_slp_vectorize::execute): Adjust.
17030 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
17033 * config/arc/arc.c (arc_return_address_register): Fix
17036 2018-06-15 Richard Biener <rguenther@suse.de>
17038 PR middle-end/86159
17039 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
17040 leave useless conversion stripping to force_gimple_operand_gsi.
17041 (gimplify_build2): Likewise.
17042 (gimplify_build1): Likewise.
17044 2018-06-15 Richard Biener <rguenther@suse.de>
17046 PR middle-end/86076
17047 * tree-cfg.c (move_stmt_op): unshare invariant addresses
17048 before adjusting their block.
17050 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
17052 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
17053 multilibs for *-*-rtems*.
17054 * config/riscv/t-rtems: New file.
17056 2018-06-14 Jakub Jelinek <jakub@redhat.com>
17058 PR middle-end/86122
17059 * match.pd ((A +- CST1) +- CST2): Punt if last resort
17060 unsigned_type_for returns NULL.
17063 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
17064 subregs of multi-word pseudos unless the float mode has word size.
17066 2018-06-14 Richard Biener <rguenther@suse.de>
17068 PR middle-end/86139
17069 * tree-vect-generic.c (build_word_mode_vector_type): Remove
17070 duplicate and harmful type_hash_canon.
17071 * tree.c (type_hash_canon): Assert we didn't find ourselves.
17073 2018-06-14 Richard Biener <rguenther@suse.de>
17076 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
17079 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
17081 * config/rtems.h (STDINT_LONG32): Define.
17083 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
17084 Prachi Godbole <prachi.godbole@imgtec.com>
17086 * config/mips/mips-cpus.def: Define P6600.
17087 * config/mips/mips-tables.opt: Regenerate.
17088 * config/mips/mips.c (mips_ucbranch_type): New enum.
17089 (mips_rtx_cost_data): Add support for P6600.
17090 (mips_issue_rate): Likewise.
17091 (mips_multipass_dfa_lookahead): Likewise.
17092 (mips_avoid_hazard): Likewise.
17093 (mips_reorg_process_insns): Likewise.
17094 (mips_classify_branch_p6600): New function.
17095 * config/mips/mips.h (TUNE_P6600): New define.
17096 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
17097 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
17098 * config/mips/mips.md: Include p6600.md.
17099 (processor): Add p6600.
17100 * config/mips/p6600.md: New file.
17101 * doc/invoke.texi: Add p6600 to supported architectures.
17103 2018-06-13 Martin Sebor <msebor@redhat.com>
17105 PR tree-optimization/86114
17106 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
17108 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
17110 2018-06-13 Richard Biener <rguenther@suse.de>
17112 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
17113 Properly set vector type of the intermediate stmt.
17114 * tree-vect-stmts.c (vectorizable_operation): The destination
17115 var always has vectype_out type.
17117 2018-06-13 Jeff Law <law@redhat.com>
17119 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
17120 integer 0 for argument to print_rtl_with_bb.
17121 (rl78_reorg): Likewise.
17123 2018-06-13 David Malcolm <dmalcolm@redhat.com>
17125 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
17126 from rtx to rtx_insn *.
17127 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
17129 (add_sched_insns_for_speculation): Likewise for local "target",
17130 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17131 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
17132 from rtx_insn ** to rtx_code_label **.
17133 (reorg_emit_nops): Likewise.
17134 (c6x_reorg): Likewise for local "call_labels".
17135 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
17137 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
17138 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
17139 the loops over LABEL_REFS.
17140 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
17142 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
17143 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
17144 (split_branches): Strengthen local "olabel" from rtx to
17145 rtx_insn *, adding a safe_as_a cast.
17146 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
17148 (add_insn_after): Likewise for first two params.
17149 (add_insn_before): Likewise.
17150 (remove_insn): Likewise for param.
17151 (emit_pattern_before_noloc): Likewise for second and third params.
17152 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
17153 (emit_call_insn_before_noloc): Likewise.
17154 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
17156 (emit_barrier_before): Likewise.
17157 (emit_label_before): Strengthen "label" param from "rtx" to
17158 "rtx_code_label *". Strengthen "before" param from "rtx" to
17160 (emit_insn_after_1): Strengthen "after" param from "rtx" to
17162 (emit_pattern_after_noloc): Likewise.
17163 (emit_insn_after_noloc): Likewise.
17164 (emit_jump_insn_after_noloc): Likewise.
17165 (emit_call_insn_after_noloc): Likewise.
17166 (emit_debug_insn_after_noloc): Likewise.
17167 (emit_barrier_after): Likewise.
17168 (emit_label_after): Likewise for both params.
17169 (emit_pattern_after_setloc): Likewise for "after" param. Convert
17170 "loc" param from "int" to "location_t".
17171 (emit_insn_after_setloc): Likewise.
17172 (emit_jump_insn_after_setloc): Likewise.
17173 (emit_call_insn_after_setloc): Likewise.
17174 (emit_debug_insn_after_setloc): Likewise.
17175 (emit_pattern_before_setloc): Likewise for "before" param. Convert
17176 "loc" param from "int" to "location_t".
17177 (emit_pattern_before): Convert NULL_RTX to NULL.
17178 (emit_insn_before_setloc): Convert "loc" param from "int" to
17180 (emit_jump_insn_before_setloc): Likewise.
17181 (emit_call_insn_before_setloc): Likewise.
17182 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
17183 rtx_insn *. Convert "loc" param from "int" to "location_t".
17184 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
17185 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
17186 Convert 3rd param from "int" to "location_t".
17187 (emit_barrier_before, emit_barrier_after, next_real_insn):
17188 Strengthen param from rtx to rtx_insn *.
17189 (emit_label_before): Strengthen 1st param from "rtx" to
17190 "rtx_code_label *". Strengthen 2nd param from "rtx" to
17192 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
17193 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
17194 Strengthen 2nd param from "rtx" to "rtx_insn *".
17195 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
17196 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
17197 Likewise. Convert 3rd param from "int" to "location_t".
17198 (emit_label_after): Strengthen 1st param from "rtx" to
17199 "rtx_code_label *".
17200 (next_real_insn, remove_insn): Strengthen param from "rtx" to
17202 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
17203 from "rtx" to "rtx_insn *".
17205 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
17207 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
17208 bodies streamed in with -Q.
17209 * dumpfile.c (dump_files): Add lto-stream-out dump file.
17210 * dumpfile.h (tree_dump_index): Add lto_stream_out.
17211 * gimple-streamer-out.c: Include gimple-pretty-print.h
17212 (output_bb): Dump stmts streamed.
17213 * lto-section-out.c: Include print-tree.h
17214 (lto_begin_section): Dump sections created.
17215 (lto_output_decl_index): Dump decl encoded.
17216 * lto-streamer-out.c: Include print-tree.h
17217 (create_output_block): Dump output block created.
17218 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
17219 (output_function): Dump function output.
17220 (output_constructor): Dump constructor streamed.
17221 (write_global_stream): Output indexes encoded.
17222 (produce_asm_for_decls): Dump streams encoded.
17223 * lto-streamer.c (streamer_dump_file): New global var.
17224 * lto-streamer.h (streamer_dump_file): Declare.
17225 * passes.c (ipa_write_summaries): Initialize streamer dump.
17226 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
17229 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
17232 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
17233 offsets for register save directives. Emit a second batch of save
17234 directives, if need be, when the function accesses prior frames.
17236 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17238 * config/arc/fpu.md (fmasf4): Force operand to register.
17239 (fnmasf4): Likewise.
17241 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17243 * config/arc/arc-protos.h (arc_pad_return): Remove.
17244 * config/arc/arc.c (machine_function): Remove force_short_suffix
17246 (arc_print_operand): Adjust printing of '&'.
17247 (arc_verify_short): Remove conditional printing of short suffix.
17248 (arc_final_prescan_insn): Remove reference to size_reason.
17249 (pad_return): New function.
17250 (arc_reorg): Call pad_return.
17251 (arc_pad_return): Remove.
17252 (arc_init_machine_status): Remove reference to force_short_suffix.
17253 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
17254 (attr length): When attribute iscompact is true force to 2
17255 regardless; in the case of maybe check if we want to force the
17256 instruction to have 4 bytes length.
17257 (nopv): Change it to generate 4 byte long nop as well.
17258 (blockage): New pattern.
17259 (simple_return): Remove call to arc_pad_return.
17260 (p_return_i): Likewise.
17262 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17264 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
17266 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17268 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
17271 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17273 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
17274 for ARC700 and ARCv2.
17276 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
17279 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
17280 operands[2] instead of operands[1].
17283 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
17285 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
17286 case, check whether the outer register overlaps an unallocatable
17287 register, not just whether it fits the required class.
17289 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
17291 * poly-int.h (can_div_trunc_p): Add new overload in which all values
17293 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
17294 (memrefs_conflict_p): Likewise.
17295 (init_alias_analysis): Likewise.
17296 * cfgexpand.c (expand_debug_expr): Likewise.
17297 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
17298 * cse.c (fold_rtx): Likewise.
17299 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
17300 * expr.c (emit_block_move_hints): Likewise.
17301 (clear_storage_hints, push_block, emit_push_insn): Likewise.
17302 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
17303 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
17304 (emit_group_store): Likewise.
17305 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
17306 to read the PRE/POST_MODIFY increment.
17307 * calls.c (store_one_arg): Use strip_offset.
17308 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
17310 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
17312 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
17313 (simplify_binary_operation_1): Extend CONST_INT handling to
17315 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
17316 than a HOST_WIDE_INT.
17317 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
17319 (adjust_mems, add_stores): Update accodingly.
17320 (vt_canonicalize_addr): Track polynomial offsets.
17321 (emit_note_insn_var_location): Likewise.
17322 (vt_add_function_parameter): Likewise.
17323 (vt_initialize): Likewise.
17325 2018-06-12 Jeff Law <law@redhat.com>
17327 * config.gcc (alpha*-*-freebsd*): Remove.
17328 * config/alpha/freebsd.h: Remove.
17330 2018-06-12 David Malcolm <dmalcolm@redhat.com>
17333 * spellcheck-tree.c (levenshtein_distance): Rename to...
17334 (get_edit_distance): ...this, and update for underlying renaming.
17335 * spellcheck-tree.h (levenshtein_distance): Rename to...
17336 (get_edit_distance): ...this.
17337 * spellcheck.c (levenshtein_distance): Rename to...
17338 (get_edit_distance): ...this. Convert from Levenshtein distance
17339 to Damerau-Levenshtein distance by supporting transpositions of
17340 adjacent characters. Rename "v1" to "v_next" and "v0" to
17342 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
17343 (selftest::test_edit_distance_unit_test_oneway): ...this, and
17344 update for underlying renaming.
17345 (selftest::levenshtein_distance_unit_test): Rename to...
17346 (selftest::test_get_edit_distance_unit): ...this, and update for
17347 underlying renaming.
17348 (selftest::test_find_closest_string): Add example from PR 69968
17349 where transposition helps
17350 (selftest::test_metric_conditions): Update for renaming.
17351 (selftest::test_metric_conditions): Likewise.
17352 (selftest::spellcheck_c_tests): Likewise.
17353 * spellcheck.h (levenshtein_distance): Rename both overloads to...
17354 (get_edit_distance): ...this.
17355 (best_match::consider): Update for renaming.
17357 2018-06-12 Martin Sebor <msebor@redhat.com>
17359 PR tree-optimization/85259
17360 * builtins.c (compute_objsize): Handle constant offsets.
17361 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
17362 true iff a warning has been issued.
17363 * gimple.h (gimple_nonartificial_location): New function.
17364 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
17365 gimple_nonartificial_location and handle -Wno-system-headers.
17366 (handle_builtin_stxncpy): Same.
17368 2018-06-12 Martin Sebor <msebor@redhat.com>
17371 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
17373 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
17375 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17376 BUILTIN_VEC_XST entries for pointer to double and long long.
17378 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
17381 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17383 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17386 2018-06-12 Martin Liska <mliska@suse.cz>
17388 * doc/options.texi: Document IntegerRange.
17390 2018-06-12 Martin Liska <mliska@suse.cz>
17392 * config/i386/i386.opt: Make MPX-related options as Deprecated.
17393 * opt-functions.awk: Handle Deprecated flag.
17394 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
17396 (read_cmdline_option): Report warning for a deprecated option.
17397 * opts.h (struct cl_option): Add new field cl_deprecated.
17398 (CL_ERR_DEPRECATED): New.
17400 2018-06-12 Martin Liska <mliska@suse.cz>
17402 * doc/options.texi: Document Deprecated option flag.
17404 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17406 * config/arc/arc-arch.h (arc_extras): New enum.
17407 (arc_cpu_t):Add field extra.
17408 (arc_cpu_types): Consider the extras.
17409 * config/arc/arc-cpus.def: Add extras info.
17410 * config/arc/arc-opts.h (processor_type): Consider extra field.
17411 * config/arc/arc.c (arc_override_options): Handle extra field.
17413 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
17415 * config/arc/arc-arch.h: Update ARC_OPTX macro.
17416 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
17418 * config/arc/arc.c (arc_init): Update pic warning.
17419 (irq_range): Update irq range parsing warnings.
17420 (arc_override_options): Update various warning messages.
17421 (arc_handle_aux_attribute): Likewise.
17423 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
17425 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
17427 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
17429 * doc/sourcebuild.texi: Document usage of line number 0 in verify
17430 compiler messages directives.
17432 2018-06-12 Matthew Fortune <mfortune@gmail.com>
17434 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
17435 * config/mips/mips-tables.opt: Regenerate.
17436 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
17438 * doc/invoke.texi: Document -march=i6500.
17440 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
17442 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
17443 (i6400_gpmul): Add cpu_unit.
17444 (i6400_gpdiv): Likewise.
17445 (i6400_msa_add_d): Update reservations.
17446 (i6400_msa_int_add) Likewise.
17447 (i6400_msa_short_logic3) Likewise.
17448 (i6400_msa_short_logic2) Likewise.
17449 (i6400_msa_short_logic) Likewise.
17450 (i6400_msa_move) Likewise.
17451 (i6400_msa_cmp) Likewise.
17452 (i6400_msa_short_float2) Likewise.
17453 (i6400_msa_div_d) Likewise.
17454 (i6400_msa_long_logic1) Likewise.
17455 (i6400_msa_long_logic2) Likewise.
17456 (i6400_msa_mult) Likewise.
17457 (i6400_msa_long_float2) Likewise.
17458 (i6400_msa_long_float4) Likewise.
17459 (i6400_msa_long_float5) Likewise.
17460 (i6400_msa_long_float8) Likewise.
17461 (i6400_fpu_fadd): Include frint type.
17462 (i6400_fpu_store): New define_insn_reservation.
17463 (i6400_fpu_load): Likewise.
17464 (i6400_fpu_move): Likewise.
17465 (i6400_fpu_fcmp): Likewise.
17466 (i6400_fpu_fmadd): Likewise.
17467 (i6400_int_mult): Include imul3nc type and update reservation.
17468 (i6400_int_div): Include idiv3 type and update reservation.
17469 (i6400_int_load): Update to check type not move_type.
17470 (i6400_int_store): Likewise.
17471 (i6400_int_prefetch): Set zero latency.
17473 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
17475 * gcc.c: Document new %@{...} sequence.
17476 (LINK_COMMAND_SPEC): Use it for the -L switches.
17477 (cpp_unique_options): Use it for the -I switches.
17478 (at_file_argbuf): New global variable.
17479 (in_at_file): Likewise.
17480 (alloc_args): Create at_file_argbuf.
17481 (clear_args): Truncate at_file_argbuf.
17482 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
17483 (open_at_file): New function.
17484 (close_at_file): Likewise.
17485 (create_at_file): Delete.
17486 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
17489 (validate_switches_from_spec): Deal with %@{...} sequence.
17490 (validate_switches): Likewise.
17491 (driver::finalize): Call clear_args.
17493 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
17495 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
17497 2018-06-11 Martin Sebor <msebor@redhat.com>
17499 * doc/invoke.texi (-Wall): List -Wc++17-compat.
17500 (Wno-class-memaccess): Add @opindex.
17501 (Wno-templates, Wno-multiple-inheritance): Same.
17502 (Wno-virtual-inheritance, Wno-namespaces): Same.
17503 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
17504 (Wno-format-overflow, Wno-format-truncation): Same.
17505 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
17506 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
17507 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
17508 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
17509 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
17510 (Wno-misspelled-isr): Same.
17512 2018-06-11 Martin Sebor <msebor@redhat.com>
17514 * PR tree-optimization/86083
17515 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
17517 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
17519 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
17521 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
17524 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
17525 on the correct operand.
17526 (*movdi_internal64): Ditto.
17528 2018-06-11 Martin Liska <mliska@suse.cz>
17530 PR tree-optimization/86089
17531 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
17533 2018-06-11 Julia Koval <julia.koval@intel.com>
17535 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
17536 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
17537 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
17539 2018-06-11 Olivier Hainque <hainque@adacore.com>
17541 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
17542 for Ada with strict dwarf2.
17544 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
17547 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
17550 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
17552 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
17554 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
17556 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
17559 2018-06-08 Martin Liska <mliska@suse.cz>
17561 * tree-cfg.h (debug_function): Fix argument type to match
17564 2018-06-08 Martin Liska <mliska@suse.cz>
17566 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
17567 Remove usage of MPX-related (and removed) fields.
17568 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
17570 2018-06-08 David Malcolm <dmalcolm@redhat.com>
17572 * cfg.c (debug): Use TDF_NONE rather than 0.
17573 * cfghooks.c (debug): Likewise.
17574 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
17575 (struct dump_option_value_info): Convert to...
17576 (struct kv_pair): ...this template type.
17577 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
17579 (optinfo_verbosity_options): Likewise.
17580 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
17582 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
17583 than int for "optgroup_flags" param.
17584 (dump_generic_expr_loc): Use dump_flags_t rather than int for
17586 (dump_dec): Likewise.
17587 (dump_finish): Use TDF_NONE rather than 0.
17588 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
17589 rather than int for "optgroup_flags" param. Use TDF_NONE rather
17590 than 0. Update for change to option_ptr.
17591 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
17592 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
17593 0. Update for changes to optinfo_verbosity_options and
17595 (opt_info_switch_p): Convert optgroup_flags from int to
17597 (dump_basic_block): Use dump_flags_t rather than int
17598 for "dump_kind" param.
17599 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
17600 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
17601 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
17602 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
17603 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
17604 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
17605 TDF_NONE): Convert from macros to...
17606 (enum dump_flag): ...this new enum.
17607 (dump_flags_t): Update to use enum.
17608 (operator|, operator&, operator~, operator|=, operator&=):
17609 Implement for dump_flags_t.
17610 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
17611 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
17612 Convert from macros to...
17613 (enum optgroup_flag): ...this new enum.
17614 (optgroup_flags_t): New typedef.
17615 (operator|, operator|=): Implement for optgroup_flags_t.
17616 (struct dump_file_info): Convert field "alt_flags" to
17617 dump_flags_t. Convert field "optgroup_flags" to
17619 (dump_basic_block): Use dump_flags_t rather than int for param.
17620 (dump_generic_expr_loc): Likewise.
17621 (dump_dec): Likewise.
17622 (dump_register): Convert param "optgroup_flags" to
17624 (opt_info_enable_passes): Likewise.
17625 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
17627 * gimple-pretty-print.c (debug): Likewise.
17628 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
17629 (merged_store_group::apply_stores): Likewise.
17630 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
17631 * gimple.c (verify_gimple_pp): Likewise.
17632 * graphite-poly.c (print_pbb_body): Likewise.
17633 * passes.c (pass_manager::register_one_dump_file): Convert
17634 local "optgroup_flags" to optgroup_flags_t.
17635 * print-tree.c (print_node): Use TDF_NONE rather than 0.
17637 (debug_body): Likewise.
17638 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
17639 to optgroup_flags_t.
17640 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
17642 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
17643 (convert_mult_to_fma): Likewise.
17644 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
17645 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
17646 * tree-vect-data-refs.c (dump_lower_bound): Convert param
17647 "dump_kind" to dump_flags_t.
17649 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
17651 * config/rs6000/rs6000.c (min, max): Delete.
17653 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
17655 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
17656 -mabi=spe and -mabi=no-spe.
17658 2018-06-08 Martin Liska <mliska@suse.cz>
17660 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
17661 where we expect an existing summary.
17663 2018-06-08 Martin Liska <mliska@suse.cz>
17665 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
17666 * ipa-inline.h (estimate_edge_growth): Likewise.
17668 2018-06-08 Martin Liska <mliska@suse.cz>
17670 * cgraph.c (function_version_hasher::hash): Use
17671 cgraph_node::get_uid ().
17672 (function_version_hasher::equal):
17673 * cgraph.h (cgraph_node::get_uid): New method.
17674 * ipa-inline.c (update_caller_keys): Use
17675 cgraph_node::get_uid ().
17676 (update_callee_keys): Likewise.
17677 * ipa-utils.c (searchc): Likewise.
17678 (ipa_reduced_postorder): Likewise.
17679 * lto-cgraph.c (input_node): Likewise.
17680 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
17681 * symbol-summary.h (symtab_insertion): Likewise.
17682 (symtab_removal): Likewise.
17683 (symtab_duplication): Likewise.
17684 * tree-pretty-print.c (dump_function_header): Likewise.
17685 * tree-sra.c (convert_callers_for_node): Likewise.
17687 2018-06-08 Martin Liska <mliska@suse.cz>
17689 * cgraph.c (symbol_table::create_edge): Always assign a new
17691 (symbol_table::free_edge): Do not recycle numbers.
17692 * cgraph.h (cgraph_edge::get): New method.
17693 * symbol-summary.h (symtab_removal): Use it.
17694 (symtab_duplication): Likewise.
17695 (call_summary::hashable_uid): Remove.
17697 2018-06-08 Martin Liska <mliska@suse.cz>
17699 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
17700 (initialize_growth_caches): Remove.
17701 (free_growth_caches): Likewise.
17702 (do_estimate_edge_time): Use edge_growth_cache.
17703 (do_estimate_edge_size): Likewise.
17704 (do_estimate_edge_hints): Likewise.
17705 * ipa-inline.c (reset_edge_caches): Likewise.
17706 (recursive_inlining): Likewise.
17707 (inline_small_functions): Likewise.
17708 * ipa-inline.h (initialize_growth_caches): Remove.
17709 (estimate_edge_size): Likewise.
17710 (estimate_edge_time): Likewise.
17711 (estimate_edge_hints): Likewise.
17712 (reset_edge_growth_cache): Likewise.
17713 * symbol-summary.h (call_summary::remove): New method.
17715 2018-06-08 Martin Liska <mliska@suse.cz>
17717 * ipa-cp.c (class edge_clone_summary): New summary.
17718 (grow_edge_clone_vectors): Remove.
17719 (ipcp_edge_duplication_hook): Remove.
17720 (class edge_clone_summary_t): New call_summary class.
17721 (ipcp_edge_removal_hook): Remove.
17722 (edge_clone_summary_t::duplicate): New function.
17723 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
17724 (create_specialized_node): Likewise.
17725 (ipcp_driver): Initialize edge_clone_summaries and do not
17728 2018-06-08 Martin Liska <mliska@suse.cz>
17730 * symbol-summary.h (get): New function.
17731 (call_summary::m_initialize_when_cloning): New class member.
17733 2018-06-08 Martin Liska <mliska@suse.cz>
17735 * cgraph.c (cgraph_node::remove): Do not recycle uid.
17736 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
17737 (symbol_table::allocate_cgraph_symbol): Do not set uid.
17738 * passes.c (uid_hash_t): Record removed_nodes by their uids.
17739 (remove_cgraph_node_from_order): Use the removed_nodes set.
17740 (do_per_function_toporder): Likwise.
17741 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
17742 instead of summary_uid.
17743 (symtab_removal): Likewise.
17744 (symtab_duplication): Likewise.
17746 2018-06-08 Martin Liska <mliska@suse.cz>
17748 * ipa-cp.c (ipcp_store_bits_results): Use
17749 ipcp_transformation_sum.
17750 (ipcp_store_vr_results): Likewise.
17751 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
17753 (ipcp_transformation_initialize): ... this.
17754 (ipa_set_node_agg_value_chain):
17755 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
17756 (write_ipcp_transformation_info): Likewise.
17757 (read_ipcp_transformation_info): Likewise.
17758 (ipcp_update_bits): Likewise.
17759 (ipcp_update_vr): Likewise.
17760 (ipcp_transform_function): Likewise.
17761 * ipa-prop.h: Rename ipcp_transformation_summary to
17762 ipcp_transformation.
17763 (class ipcp_transformation_t): New function summary.
17764 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
17765 (ipa_get_agg_replacements_for_node): Likewise.
17767 2018-06-08 Martin Liska <mliska@suse.cz>
17769 * ipa-pure-const.c (struct funct_state_d): Do it class instead
17771 (class funct_state_summary_t): New function_summary class.
17772 (has_function_state): Remove.
17773 (get_function_state): Likewise.
17774 (set_function_state): Likewise.
17775 (add_new_function): Likewise.
17776 (funct_state_summary_t::insert): New function.
17777 (duplicate_node_data): Remove.
17778 (remove_node_data): Remove.
17779 (funct_state_summary_t::duplicate): New function.
17780 (register_hooks): Create new funct_state_summaries.
17781 (pure_const_generate_summary): Use it.
17782 (pure_const_write_summary): Likewise.
17783 (pure_const_read_summary): Likewise.
17784 (propagate_pure_const): Likewise.
17785 (propagate_nothrow): Likewise.
17786 (dump_malloc_lattice): Likewise.
17787 (propagate_malloc): Likewise.
17788 (execute): Do not register hooks, just remove summary
17790 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
17793 2018-06-08 Martin Liska <mliska@suse.cz>
17795 * ipa-reference.c (remove_node_data): Remove.
17796 (duplicate_node_data): Likewise.
17797 (class ipa_ref_var_info_summary_t): New class.
17798 (class ipa_ref_opt_summary_t): Likewise.
17799 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
17800 (get_reference_optimization_summary): Use
17801 ipa_ref_opt_sum_summaries.
17802 (set_reference_vars_info): Remove.
17803 (set_reference_optimization_summary): Likewise.
17804 (ipa_init): Create summaries.
17805 (init_function_info): Use function summary.
17806 (ipa_ref_opt_summary_t::duplicate): New function.
17807 (ipa_ref_opt_summary_t::remove): New function.
17808 (get_read_write_all_from_node): Fix GNU coding style.
17809 (propagate): Use function summary.
17810 (write_node_summary_p): Fix GNU coding style.
17811 (stream_out_bitmap): Likewise.
17812 (ipa_reference_read_optimization_summary): Use function summary.
17813 (ipa_reference_c_finalize): Do not release hooks.
17815 2018-06-08 Martin Liska <mliska@suse.cz>
17817 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
17818 (analyze_function_body): Extract multiple calls of get_create.
17819 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17820 * ipa-inline.c (recursive_inlining): Use ::get method.
17821 * ipa-inline.h (estimate_edge_growth): Likewise.
17823 2018-06-08 Martin Liska <mliska@suse.cz>
17825 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
17827 (hsa_function_summary::hsa_function_summary): Use the new enum
17829 (hsa_gpu_implementation_p): Use hsa_summaries::get.
17830 * hsa-gen.c (hsa_get_host_function): Likewise.
17831 (get_brig_function_name): Likewise.
17832 * ipa-hsa.c (process_hsa_functions): Likewise.
17833 (ipa_hsa_write_summary): Likewise.
17834 * symbol-summary.h (symtab_duplication): Use ::get function/
17835 (get): New function.
17837 2018-06-08 Martin Liska <mliska@suse.cz>
17839 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
17841 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
17842 (hsa_register_kernel): Likewise.
17843 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
17844 * hsa-gen.c (hsa_get_host_function): Likewise.
17845 (get_brig_function_name): Likewise.
17846 (generate_hsa): Likewise.
17847 (pass_gen_hsail::execute): Likewise.
17848 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
17849 (devirtualization_time_bonus): Likewise.
17850 (ipcp_propagate_stage): Likewise.
17851 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17852 (edge_set_predicate): Likewise.
17853 (evaluate_conditions_for_known_args): Likewise.
17854 (evaluate_properties_for_edge): Likewise.
17855 (ipa_fn_summary::reset): Likewise.
17856 (ipa_fn_summary_t::duplicate): Likewise.
17857 (dump_ipa_call_summary): Likewise.
17858 (ipa_dump_fn_summary): Likewise.
17859 (analyze_function_body): Likewise.
17860 (compute_fn_summary): Likewise.
17861 (estimate_edge_devirt_benefit): Likewise.
17862 (estimate_edge_size_and_time): Likewise.
17863 (estimate_calls_size_and_time): Likewise.
17864 (estimate_node_size_and_time): Likewise.
17865 (inline_update_callee_summaries): Likewise.
17866 (remap_edge_change_prob): Likewise.
17867 (remap_edge_summaries): Likewise.
17868 (ipa_merge_fn_summary_after_inlining): Likewise.
17869 (ipa_update_overall_fn_summary): Likewise.
17870 (read_ipa_call_summary): Likewise.
17871 (inline_read_section): Likewise.
17872 (write_ipa_call_summary): Likewise.
17873 (ipa_fn_summary_write): Likewise.
17874 (ipa_free_fn_summary): Likewise.
17875 * ipa-hsa.c (process_hsa_functions): Likewise.
17876 (ipa_hsa_write_summary): Likewise.
17877 (ipa_hsa_read_section): Likewise.
17878 * ipa-icf.c (sem_function::merge): Likewise.
17879 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17880 (do_estimate_edge_time): Likewise.
17881 (estimate_size_after_inlining): Likewise.
17882 (estimate_growth): Likewise.
17883 (growth_likely_positive): Likewise.
17884 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17885 (inline_call): Likewise.
17886 * ipa-inline.c (caller_growth_limits): Likewise.
17887 (can_inline_edge_p): Likewise.
17888 (can_inline_edge_by_limits_p): Likewise.
17889 (compute_uninlined_call_time): Likewise.
17890 (compute_inlined_call_time): Likewise.
17891 (want_inline_small_function_p): Likewise.
17892 (edge_badness): Likewise.
17893 (update_caller_keys): Likewise.
17894 (update_callee_keys): Likewise.
17895 (recursive_inlining): Likewise.
17896 (inline_small_functions): Likewise.
17897 (inline_to_all_callers_1): Likewise.
17898 (dump_overall_stats): Likewise.
17899 (early_inline_small_functions): Likewise.
17900 (early_inliner): Likewise.
17901 * ipa-inline.h (estimate_edge_growth): Likewise.
17902 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17903 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17904 * ipa-prop.h (IPA_NODE_REF): Likewise.
17905 (IPA_EDGE_REF): Likewise.
17906 * ipa-pure-const.c (malloc_candidate_p): Likewise.
17907 (propagate_malloc): Likewise.
17908 * ipa-split.c (execute_split_functions): Likewise.
17909 * symbol-summary.h: Rename get to get_create.
17911 (get_create): Likewise.
17912 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17914 2018-06-08 Martin Liska <mliska@suse.cz>
17916 * symbol-summary.h (release): Move definition out of class
17918 (symtab_removal): Likewise.
17919 (symtab_duplication): Likewise.
17921 2018-06-08 Martin Liska <mliska@suse.cz>
17923 * symbol-summary.h (function_summary): Move constructor
17924 implementation out of class declaration.
17925 (release): Likewise.
17926 (symtab_insertion): Likewise.
17927 (symtab_removal): Likewise.
17928 (symtab_duplication): Likewise.
17931 2018-06-08 Martin Liska <mliska@suse.cz>
17933 * Makefile.in: Remove support for MPX (macros, related functions,
17934 fields in cgraph_node, ...).
17935 * builtin-types.def (BT_BND): Likewise.
17936 (BT_FN_BND_CONST_PTR): Likewise.
17937 (BT_FN_CONST_PTR_BND): Likewise.
17938 (BT_FN_VOID_PTR_BND): Likewise.
17939 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
17940 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
17941 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
17942 (expand_builtin_mempcpy_with_bounds): Likewise.
17943 (expand_builtin_memset_with_bounds): Likewise.
17944 (expand_builtin_memset_args): Likewise.
17945 (std_expand_builtin_va_start): Likewise.
17946 (expand_builtin): Likewise.
17947 (expand_builtin_with_bounds): Likewise.
17948 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
17949 (DEF_LIB_BUILTIN_CHKP): Likewise.
17950 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
17951 (DEF_CHKP_BUILTIN): Likewise.
17952 (BUILT_IN_MEMCPY): Likewise.
17953 (BUILT_IN_MEMMOVE): Likewise.
17954 (BUILT_IN_MEMPCPY): Likewise.
17955 (BUILT_IN_MEMSET): Likewise.
17956 (BUILT_IN_STPCPY): Likewise.
17957 (BUILT_IN_STRCAT): Likewise.
17958 (BUILT_IN_STRCHR): Likewise.
17959 (BUILT_IN_STRCPY): Likewise.
17960 (BUILT_IN_STRLEN): Likewise.
17961 (BUILT_IN_MEMCPY_CHK): Likewise.
17962 (BUILT_IN_MEMMOVE_CHK): Likewise.
17963 (BUILT_IN_MEMPCPY_CHK): Likewise.
17964 (BUILT_IN_MEMSET_CHK): Likewise.
17965 (BUILT_IN_STPCPY_CHK): Likewise.
17966 (BUILT_IN_STRCAT_CHK): Likewise.
17967 (BUILT_IN_STRCPY_CHK): Likewise.
17968 * calls.c (store_bounds): Likewise.
17969 (emit_call_1): Likewise.
17970 (special_function_p): Likewise.
17971 (maybe_warn_nonstring_arg): Likewise.
17972 (initialize_argument_information): Likewise.
17973 (finalize_must_preallocate): Likewise.
17974 (compute_argument_addresses): Likewise.
17975 (expand_call): Likewise.
17976 * cfgexpand.c (expand_call_stmt): Likewise.
17977 (expand_return): Likewise.
17978 (expand_gimple_stmt_1): Likewise.
17979 (pass_expand::execute): Likewise.
17980 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
17981 (cgraph_node::remove): Likewise.
17982 (cgraph_node::dump): Likewise.
17983 (cgraph_node::verify_node): Likewise.
17984 * cgraph.h (chkp_function_instrumented_p): Likewise.
17985 (symtab_node::get_alias_target): Likewise.
17986 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
17987 (cgraph_local_p): Likewise.
17988 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
17989 (cgraph_edge::rebuild_references): Likewise.
17990 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
17991 (walk_polymorphic_call_targets): Likewise.
17992 (cgraph_node::expand_thunk): Likewise.
17993 (symbol_table::output_weakrefs): Likewise.
17994 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
17995 (ix86_handle_option): Likewise.
17996 * config/i386/constraints.md: Likewise.
17997 * config/i386/i386-builtin-types.def (BND): Likewise.
18001 * config/i386/i386-builtin.def (BDESC_END): Likewise.
18002 (BDESC_FIRST): Likewise.
18004 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
18005 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
18006 * config/i386/i386.c (enum reg_class): Likewise.
18007 (ix86_target_string): Likewise.
18008 (ix86_option_override_internal): Likewise.
18009 (ix86_conditional_register_usage): Likewise.
18010 (ix86_valid_target_attribute_inner_p): Likewise.
18011 (ix86_set_indirect_branch_type): Likewise.
18012 (ix86_set_current_function): Likewise.
18013 (ix86_function_arg_regno_p): Likewise.
18014 (init_cumulative_args): Likewise.
18015 (ix86_function_arg_advance): Likewise.
18016 (ix86_function_arg): Likewise.
18017 (ix86_pass_by_reference): Likewise.
18018 (ix86_function_value_regno_p): Likewise.
18019 (ix86_function_value_1): Likewise.
18020 (ix86_function_value_bounds): Likewise.
18021 (ix86_return_in_memory): Likewise.
18022 (ix86_setup_incoming_vararg_bounds): Likewise.
18023 (ix86_va_start): Likewise.
18024 (indirect_thunk_need_prefix): Likewise.
18025 (print_reg): Likewise.
18026 (ix86_print_operand): Likewise.
18027 (ix86_expand_call): Likewise.
18028 (ix86_output_function_return): Likewise.
18029 (reg_encoded_number): Likewise.
18030 (BDESC_VERIFYS): Likewise.
18031 (ix86_init_mpx_builtins): Likewise.
18032 (ix86_init_builtins): Likewise.
18033 (ix86_emit_cmove): Likewise.
18034 (ix86_emit_move_max): Likewise.
18035 (ix86_expand_builtin): Likewise.
18036 (ix86_builtin_mpx_function): Likewise.
18037 (ix86_get_arg_address_for_bt): Likewise.
18038 (ix86_load_bounds): Likewise.
18039 (ix86_store_bounds): Likewise.
18040 (ix86_load_returned_bounds): Likewise.
18041 (ix86_store_returned_bounds): Likewise.
18042 (ix86_class_likely_spilled_p): Likewise.
18043 (ix86_hard_regno_mode_ok): Likewise.
18044 (x86_order_regs_for_local_alloc): Likewise.
18045 (ix86_mitigate_rop): Likewise.
18046 (ix86_bnd_prefixed_insn_p): Likewise.
18047 (ix86_mpx_bound_mode): Likewise.
18048 (ix86_make_bounds_constant): Likewise.
18049 (ix86_initialize_bounds): Likewise.
18050 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
18051 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
18052 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
18053 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
18054 (TARGET_CHKP_BOUND_MODE): Likewise.
18055 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
18056 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
18057 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
18058 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
18059 * config/i386/i386.h (TARGET_MPX): Likewise.
18060 (TARGET_MPX_P): Likewise.
18061 (VALID_BND_REG_MODE): Likewise.
18062 (FIRST_BND_REG): Likewise.
18063 (LAST_BND_REG): Likewise.
18064 (enum reg_class): Likewise.
18065 (BND_REG_P): Likewise.
18066 (BND_REGNO_P): Likewise.
18067 (BNDmode): Likewise.
18068 (ADJUST_INSN_LENGTH): Likewise.
18069 * config/i386/i386.md: Likewise.
18070 * config/i386/i386.opt: Likewise.
18071 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
18072 (defined): Likewise.
18073 (LINK_MPX): Likewise.
18074 (MPX_SPEC): Likewise.
18075 (LIBMPX_SPEC): Likewise.
18076 (LIBMPXWRAPPERS_SPEC): Likewise.
18077 (CHKP_SPEC): Likewise.
18078 * config/i386/predicates.md: Likewise.
18079 * dbxout.c (dbxout_type): Likewise.
18080 * doc/extend.texi: Likewise.
18081 * doc/invoke.texi: Likewise.
18082 * doc/md.texi: Likewise.
18083 * doc/tm.texi: Likewise.
18084 * doc/tm.texi.in: Likewise.
18085 * dwarf2out.c (is_base_type): Likewise.
18086 (gen_formal_types_die): Likewise.
18087 (gen_subprogram_die): Likewise.
18088 (gen_type_die_with_usage): Likewise.
18089 (gen_decl_die): Likewise.
18090 (dwarf2out_late_global_decl): Likewise.
18091 * expr.c (expand_assignment): Likewise.
18092 (emit_storent_insn): Likewise.
18093 (store_expr_with_bounds): Likewise.
18094 (store_expr): Likewise.
18095 (expand_expr_real_1): Likewise.
18096 * expr.h (store_expr_with_bounds): Likewise.
18097 * function.c (use_register_for_decl): Likewise.
18098 (struct bounds_parm_data): Likewise.
18099 (assign_parms_augmented_arg_list): Likewise.
18100 (assign_parm_find_entry_rtl): Likewise.
18101 (assign_parm_is_stack_parm): Likewise.
18102 (assign_parm_load_bounds): Likewise.
18103 (assign_bounds): Likewise.
18104 (assign_parms): Likewise.
18105 (expand_function_start): Likewise.
18106 * gcc.c (CHKP_SPEC): Likewise.
18107 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
18108 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
18109 (wrestrict_dom_walker::check_call): Likewise.
18110 * gimple.c (gimple_build_call_from_tree): Likewise.
18111 * gimple.h (enum gf_mask): Likewise.
18112 (gimple_call_with_bounds_p): Likewise.
18113 (gimple_call_set_with_bounds): Likewise.
18114 * gimplify.c (gimplify_init_constructor): Likewise.
18115 * ipa-cp.c (initialize_node_lattices): Likewise.
18116 (propagate_constants_across_call): Likewise.
18117 (find_more_scalar_values_for_callers_subset): Likewise.
18118 * ipa-hsa.c (process_hsa_functions): Likewise.
18119 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
18120 * ipa-icf.c (sem_function::merge): Likewise.
18121 * ipa-inline.c (early_inliner): Likewise.
18122 * ipa-pure-const.c (warn_function_noreturn): Likewise.
18123 (warn_function_cold): Likewise.
18124 (propagate_pure_const): Likewise.
18125 * ipa-ref.h (enum GTY): Likewise.
18126 * ipa-split.c (find_retbnd): Likewise.
18127 (consider_split): Likewise.
18128 (split_function): Likewise.
18129 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
18130 * ipa.c (walk_polymorphic_call_targets): Likewise.
18131 (symbol_table::remove_unreachable_nodes): Likewise.
18132 (process_references): Likewise.
18133 (cgraph_build_static_cdtor_1): Likewise.
18134 * lto-cgraph.c (lto_output_node): Likewise.
18135 (output_refs): Likewise.
18136 (compute_ltrans_boundary): Likewise.
18137 (input_overwrite_node): Likewise.
18138 (input_node): Likewise.
18139 (input_cgraph_1): Likewise.
18140 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
18141 * passes.c (pass_manager::execute_early_local_passes): Likewise.
18142 (class pass_chkp_instrumentation_passes): Likewise.
18143 (make_pass_chkp_instrumentation_passes): Likewise.
18144 * passes.def: Likewise.
18145 * rtl.h (struct GTY): Likewise.
18146 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
18147 * stor-layout.c (layout_type): Likewise.
18148 * symtab.c: Likewise.
18149 * target.def: Likewise.
18150 * targhooks.c (default_chkp_bound_type): Likewise.
18151 (default_chkp_bound_mode): Likewise.
18152 (default_builtin_chkp_function): Likewise.
18153 (default_chkp_function_value_bounds): Likewise.
18154 (default_chkp_make_bounds_constant): Likewise.
18155 (default_chkp_initialize_bounds): Likewise.
18156 * targhooks.h (default_chkp_bound_type): Likewise.
18157 (default_chkp_bound_mode): Likewise.
18158 (default_builtin_chkp_function): Likewise.
18159 (default_chkp_function_value_bounds): Likewise.
18160 (default_chkp_make_bounds_constant): Likewise.
18161 (default_chkp_initialize_bounds): Likewise.
18162 * toplev.c (compile_file): Likewise.
18163 (process_options): Likewise.
18164 * tree-core.h (DEF_BUILTIN): Likewise.
18165 (DEF_BUILTIN_CHKP): Likewise.
18166 * tree-inline.c (declare_return_variable): Likewise.
18167 (remap_gimple_stmt): Likewise.
18168 (copy_bb): Likewise.
18169 (initialize_inlined_parameters): Likewise.
18170 (expand_call_inline): Likewise.
18171 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
18172 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
18173 (make_pass_ipa_chkp_produce_thunks): Likewise.
18174 (make_pass_chkp): Likewise.
18175 (make_pass_chkp_opt): Likewise.
18176 (make_pass_chkp_instrumentation_passes): Likewise.
18177 * tree-pretty-print.c (dump_generic_node): Likewise.
18178 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
18179 * tree-ssa-dce.c (propagate_necessity): Likewise.
18180 (eliminate_unnecessary_stmts): Likewise.
18181 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
18182 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
18183 * tree-ssa-sccvn.h: Likewise.
18184 * tree-ssa-strlen.c (get_string_length): Likewise.
18185 (valid_builtin_call): Likewise.
18186 (adjust_last_stmt): Likewise.
18187 (handle_builtin_strchr): Likewise.
18188 (handle_builtin_strcpy): Likewise.
18189 (handle_builtin_stxncpy): Likewise.
18190 (handle_builtin_memcpy): Likewise.
18191 (handle_builtin_strcat): Likewise.
18192 (strlen_check_and_optimize_stmt): Likewise.
18193 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
18194 * tree-streamer-in.c: Likewise.
18195 * tree-streamer.c (record_common_node): Likewise.
18196 * tree.c (tree_code_size): Likewise.
18197 (wide_int_to_tree_1): Likewise.
18198 (type_contains_placeholder_1): Likewise.
18199 (build_common_tree_nodes): Likewise.
18200 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
18201 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
18202 (POINTER_BOUNDS_P): Likewise.
18203 (BOUNDED_TYPE_P): Likewise.
18204 (BOUNDED_P): Likewise.
18205 (CALL_WITH_BOUNDS_P): Likewise.
18206 (pointer_bounds_type_node): Likewise.
18207 * value-prof.c (gimple_ic): Likewise.
18208 * var-tracking.c (vt_add_function_parameters): Likewise.
18209 * varasm.c (make_decl_rtl): Likewise.
18210 (assemble_start_function): Likewise.
18211 (output_constant): Likewise.
18212 (maybe_assemble_visibility): Likewise.
18213 * varpool.c (ctor_for_folding): Likewise.
18214 * chkp-builtins.def: Remove.
18215 * ipa-chkp.c: Remove.
18216 * ipa-chkp.h: Remove.
18217 * rtl-chkp.c: Remove.
18218 * rtl-chkp.h: Remove.
18219 * tree-chkp-opt.c: Remove.
18220 * tree-chkp.c: Remove.
18221 * tree-chkp.h: Remove.
18223 2018-06-07 Carl Love <cel@us.ibm.com>
18225 * config/rs6000/vsx.md (vextract_fp_from_shorth,
18226 vextract_fp_from_shortl): Add BE support.
18228 2018-06-07 Paul Koning <ni1d@arrl.net>
18230 * compare-elim.c (try_merge_compare): Don't merge compare if
18231 address contains a side effect.
18232 (try_eliminate_compare): Likewise.
18234 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
18236 * config.gcc: Support "tremont".
18237 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
18238 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18240 * config/i386/i386.c (m_TREMONT): Define.
18241 (processor_target_table): Add "tremont".
18242 (PTA_TREMONT): Define.
18243 (ix86_lea_outperforms): Add TARGET_TREMONT.
18244 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
18245 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
18246 and M_INTEL_GOLDMONT_PLUS.
18247 (fold_builtin_cpu): Add "tremont".
18248 (ix86_add_stmt_cost): Add TARGET_TREMONT.
18249 (ix86_option_override_internal): Add "tremont".
18250 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
18251 (processor_type): Add PROCESSOR_TREMONT.
18252 * config/i386/x86-tune.def: Add m_TREMONT.
18253 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
18255 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18257 * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
18258 symbol defined for msp430i* devices to be lower case.
18260 2018-06-07 Richard Biener <rguenther@suse.de>
18262 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
18263 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
18264 Properly wrap signed arithmetic if overflow wraps.
18266 2018-06-07 Jakub Jelinek <jakub@redhat.com>
18268 PR tree-optimization/69615
18269 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
18270 of a cast from a same precision integral SSA_NAME in a bb dominated
18271 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
18272 cast to utype if rhs2 has already a compatible type.
18274 2018-06-07 Richard Biener <rguenther@suse.de>
18276 PR tree-optimization/85935
18277 * graphite-scop-detection.c (find_params_in_bb): Analyze
18278 condition operands with respect to the correct loop. Assert
18279 the analysis doesn't fail.
18281 2018-06-04 Carl Love <cel@us.ibm.com>
18283 * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
18284 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
18285 as it is slightly cheaper.
18286 (first_match_or_eos_index_<mode>):
18287 Calculate index using natural element order.
18288 (first_match_index_<mode>):
18289 Calculate index using natural element order.
18290 (first_match_or_eos_index_<mode>):
18291 Calculate index using natural order.
18292 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
18293 for BE and LE modes.
18294 * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
18295 P9V_BUILTIN_VCLZLSBB_V16QI.
18296 * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
18299 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
18301 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
18302 indentation and line wrap for many prototypes. Add missing
18303 @smallexample directives around block of prototypes for vec_xl and
18306 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
18308 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
18309 track if we pass or return IEEE 128-bit floating point.
18310 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
18311 C++ mangling that is compatible with GCC 8.1.
18312 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
18313 (init_cumulative_args): Note if we pass or return IEEE 128-bit
18314 floating point types.
18315 (rs6000_function_arg_advance_1): Likewise.
18316 (rs6000_mangle_type): Optionally generate mangled names that match
18317 what GCC 8.1 generated for IEEE 128-bit floating point types.
18318 (rs6000_globalize_decl_name): If we have an external function that
18319 passes or returns IEEE 128-bit types, generate a weak reference
18320 from the mangled name used in GCC 8.1 to the current mangled
18322 (rs6000_init_builtins): Make __ibm128 use the long double type if
18323 long double is IBM extended double. Make __float128 use the long
18324 double type if long double is IEEE 128-bit.
18327 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
18328 macro for __ibm128 built-in functions.
18329 (PACK_IF): Add __ibm128 pack/unpack functions.
18330 (UNPACK_IF): Likewise.
18331 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
18332 enable long double built-in functions if long double is IEEE
18333 128-bit floating point.
18334 (rs6000_invalid_builtin): Update long double built-in function
18336 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
18337 functions, adjust the built-in function to use the long double
18338 built-in function if __ibm128 and long double are the same type.
18339 * doc/extend.texi (PowerPC builtins): Update documention for
18340 __builtin_{,un}pack_longdouble. Add documentation for
18341 __builtin_{,un}pack_ibm128.
18343 2018-06-06 Jim Wilson <jimw@sifive.com>
18345 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
18346 (struct machine_function): New field interrupt_mode.
18347 (riscv_handle_type_attribute): New function. Add forward declaration.
18348 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
18349 (riscv_expand_epilogue): Check interrupt_mode field.
18350 (riscv_set_current_function): Check interrupt attribute args and
18351 set interrupt_mode field.
18352 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
18353 (riscv_sret, riscv_uret): New.
18354 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
18355 new arguments to interrupt attribute.
18357 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
18360 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
18361 Don't handle -mcpu=power8 if -mpower9-vector is also used.
18363 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
18365 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
18366 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
18367 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18368 several redundant entries.
18370 2018-06-06 David Malcolm <dmalcolm@redhat.com>
18372 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
18373 type from "rtx" to "rtx_insn *".
18374 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
18375 for local "call_insn", removing cast.
18376 (ix86_expand_call): Likewise, introducing a "call_insn" local.
18378 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
18380 PR tree-optimization/86066
18381 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
18382 for BIT_INSERT_EXPR stores.
18384 2018-06-06 Richard Biener <rguenther@suse.de>
18386 PR tree-optimization/86062
18387 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18388 component refs ontop
18389 of to be offsetted base.
18391 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18393 * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
18394 to be static and remove check on interrupt attribute name.
18396 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
18398 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18399 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
18401 2018-06-05 Steve Ellcey <sellcey@cavium.com>
18404 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
18406 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
18407 Remove second argument, change how error is called.
18408 (aarch64_layout_arg): Remove second argument from
18409 aarch64_err_no_fpadvsimd call.
18410 (aarch64_init_cumulative_args): Ditto.
18411 (aarch64_gimplify_va_arg_expr): Ditto.
18412 * config/aarch64/aarch64.md (mov<mode>): Ditto.
18414 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
18416 * config/i386/i386.md (simple_return_indirect_internal): New expander.
18417 (*simple_return_indirect_internal<mode>): Rename from
18418 simple_return_indirect_internal. Use W mode iterator.
18419 (rstorssp): New expander.
18420 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
18421 (clrssbsy): New expander.
18422 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
18424 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
18426 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
18428 (cmse_check_pointed_object): Likewise.
18430 2018-06-05 Martin Liska <mliska@suse.cz>
18432 PR gcov-profile/47618
18433 * doc/invoke.texi: Document how -fprofile-dir format
18436 2018-06-05 Richard Biener <rguenther@suse.de>
18438 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
18439 removal pretend DOM info isn't available so we do not update
18440 it and only remove edges, not dominated blocks. Actually free
18441 DOM info in case we removed something. Remove unreachable blocks.
18442 (mfb_keep_latches): Work with either DOM info or marked backedges.
18443 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
18444 first. Mark backedges if DOM info isn't available.
18445 (Re-)compute DOM info after cleanup_control_flow_pre.
18447 2018-06-05 Richard Biener <rguenther@suse.de>
18449 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
18450 (locus_discrim_hasher::hash): Adjust.
18451 (locus_discrim_hasher::equal): Likewise.
18452 (next_discriminator_for_locus): Work on line directly.
18453 (same_line_p): Pass in expanded locus1 as well.
18454 (assign_discriminators): Avoid redundant location expansions.
18456 2018-06-05 Richard Biener <rguenther@suse.de>
18458 PR tree-optimization/86046
18459 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
18460 if required after clearing TREE_ADDRESSABLE.
18462 2018-06-05 Richard Biener <rguenther@suse.de>
18464 PR tree-optimization/86047
18465 * tree-ssa-loop.c (for_each_index): Glob handling of all
18466 decls and constants and really handle all of them.
18468 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18471 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
18472 qualifier_void_pointer and qualifier_const_void_pointer.
18473 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
18474 (arm_init_builtins): Handle the above.
18475 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
18476 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
18477 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
18480 2018-06-05 Martin Liska <mliska@suse.cz>
18482 * auto-profile.c (read_autofdo_file): Do not use
18483 gcov_ctr_summary struct.
18484 (afdo_callsite_hot_enough_for_early_inline): Likewise.
18485 * coverage.c (struct counts_entry): Likewise.
18486 (read_counts_file): Read just single summary entry.
18487 (get_coverage_counts): Use gcov_summary struct.
18488 * coverage.h (get_coverage_counts): Likewise.
18489 * gcov-dump.c (dump_working_sets): Likewise.
18490 (tag_summary): Dump just single summary.
18491 * gcov-io.c (gcov_write_summary): Write just histogram
18493 (gcov_read_summary): Read just single summary.
18494 (compute_working_sets): Use gcov_summary struct.
18495 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
18496 of GCOV_COUNTERS_SUMMABLE.
18497 (GCOV_COUNTERS_SUMMABLE): Remove.
18498 (GCOV_FIRST_VALUE_COUNTER): Replace with
18499 GCOV_COUNTER_V_INTERVAL.
18500 (struct gcov_ctr_summary): Remove.
18501 (struct gcov_summary): Directly use fields of former
18503 (compute_working_sets): Use gcov_summary struct.
18504 * gcov.c (read_count_file): Do not use ctrs fields.
18505 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
18507 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
18509 * profile.c: Likewise.
18510 * profile.h: Likewise.
18512 2018-06-05 Martin Liska <mliska@suse.cz>
18514 PR gcov-profile/84846
18515 * gcov.c (output_lines): Print working directory only
18516 in intermediate format.
18518 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
18520 * config/s390/s390-builtin-types.def: Add void function type.
18521 * config/s390/s390-builtins.def: Use the function type for the
18524 2018-06-04 Jim Wilson <jimw@sifive.com>
18526 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
18528 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
18529 and maybe_eh_return. Change regno to unsigned int. Use new args to
18530 handle EH_RETURN_DATA_REGNO registers properly.
18531 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
18532 (riscv_expand_epilogue): Update comment. Change argument name and
18533 type. Update code to use new name and type. Pass new args to
18534 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
18536 * config/riscv/riscv.md (NORMAL_RETURN): New.
18537 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
18538 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
18539 (eh_return): Call gen_eh_return_internal and emit barrier.
18540 (eh_return_internal): Call riscv_expand_epilogue.
18542 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
18544 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
18545 bit_insertion field and declare can_be_merged_into method.
18546 (merged_store_group::can_be_merged_into): New method.
18547 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
18548 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
18549 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
18551 2018-06-04 Richard Biener <rguenther@suse.de>
18553 PR tree-optimization/85955
18554 * builtins.c (fold_builtin_sincos): Convert pointers to
18555 destination to appropriate type before dereferencing.
18557 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
18559 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
18561 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
18563 * expr.c (expand_expr_real_1): Force the operand into memory if
18564 its TYPE_MODE is BLKmode and if there is no integer mode for
18565 the number of bits being extracted.
18567 2018-06-04 Jakub Jelinek <jakub@redhat.com>
18571 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18572 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
18574 2018-06-04 Richard Biener <rguenther@suse.de>
18576 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
18577 (cleanup_tree_cfg_noloop): ... single caller. Do
18578 start_recording_case_labels later.
18580 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
18582 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
18583 to _IMMINTRIN_H_INCLUDED.
18584 * config/i386/pconfigintrin.h: Ditto.
18585 * config/i386/waitpkgintrin.h: Ditto.
18586 * config/i386/immintrin.h: Add includes for sgxintrin.h,
18587 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
18588 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
18589 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
18590 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
18591 waitpkgintrin.h and cldemoteintrin.h.
18593 2018-06-04 Richard Biener <rguenther@suse.de>
18595 PR tree-optimization/86038
18596 * tracer.c (find_best_successor): Check probability for
18597 being initialized, bail out if not.
18599 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
18602 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
18603 of bits to ignore when comparing architectures.
18605 2018-06-04 Jakub Jelinek <jakub@redhat.com>
18607 PR tree-optimization/69615
18608 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
18609 maximum or minimum of the type, try to merge it also as if
18610 range1 is + [-, x - 1] or + [x + 1, -].
18613 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
18615 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
18617 PR tree-optimization/86034
18618 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
18619 the unsigned bitfield type in a bit insertion sequence if it does not
18620 have a larger precision than the bitfield size.
18621 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
18623 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
18625 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
18627 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
18629 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
18630 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
18631 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
18632 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
18634 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
18636 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
18637 Disable -fdelete-null-pointer-checks for ELF toolchain.
18639 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
18640 Kito Cheng <kito.cheng@gmail.com>
18642 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
18643 (nds32le-*-*, nds32be-*-*): Integrate checking process.
18644 (nds32*-*-*): Add glibc and uclibc conditions.
18645 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
18646 (TARGET_EXCEPT_UNWIND_INFO): Define.
18647 * config/nds32/elf.h: New file.
18648 * config/nds32/linux.h: New file.
18649 * config/nds32/nds32-elf.opt: New file.
18650 * config/nds32/nds32-linux.opt: New file.
18651 * config/nds32/nds32-fp-as-gp.c
18652 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
18653 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
18655 (nds32_asm_file_end): Ditto.
18656 (nds32_print_operand): Ditto.
18657 (nds32_insert_attributes): Ditto.
18658 (nds32_init_libfuncs): New function.
18659 (TARGET_HAVE_TLS): Define.
18660 (TARGET_INIT_LIBFUNCS): Define.
18661 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
18663 (TARGET_ELF): Apply different mcmodel setting.
18664 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
18665 been migrated into elf.h and linux.h files.
18666 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
18667 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
18668 (mcmodel): The content has been migrated into nds32-elf.opt and
18669 nds32-linux.opt files.
18670 * config/nds32/t-elf: New file.
18671 * config/nds32/t-linux: New file.
18673 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
18674 Shiva Chen <shiva0217@gmail.com>
18676 * config/nds32/constants.md (unspec_volatile_element): Add
18677 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
18678 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
18680 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
18681 (make_pass_nds32_fp_as_gp): Declare.
18682 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
18684 (nds32_asm_function_end_prologue): Remove unused asm output.
18685 (nds32_asm_function_begin_epilogue): Remove unused asm output.
18686 (nds32_asm_file_start): Output necessary fp_as_gp information.
18687 (nds32_option_override): Adjust register usage.
18688 (nds32_expand_prologue): Consider fp_as_gp situation.
18689 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
18690 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
18693 (simple_return): Ditto.
18694 (omit_fp_begin): Output special directive for fp_as_gp.
18695 (omit_fp_end): Output special directive for fp_as_gp.
18696 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
18697 mforbid-fp-as-gp): New options.
18699 2018-06-01 Mark Wielaard <mark@klomp.org>
18701 * dwarf2out.c (dwarf2out_finish): Remove generation of
18702 DW_AT_loclists_base.
18704 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
18706 * gimple-ssa-store-merging.c: Include gimple-fold.h.
18707 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
18708 (struct merged_store_group): Add bit_insertion field.
18709 (dump_char_array): Use standard hexadecimal format.
18710 (merged_store_group::merged_store_group): Set bit_insertion to false.
18711 (merged_store_group::apply_stores): Use optimal buffer size. Deal
18712 with BIT_INSERT_EXPR stores. Move up code updating the mask and
18713 also print the mask in the dump file.
18714 (pass_store_merging::gate): Minor tweak.
18715 (imm_store_chain_info::coalesce_immediate): Fix wrong association
18716 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
18717 stores with INTEGER_CST stores.
18718 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
18719 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
18720 and use it throughout. Generate bit insertion sequences if need be.
18721 (pass_store_merging::process_store): Remove redundant condition.
18722 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
18724 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
18726 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
18727 the 128-bit floating point types. Fix function comment.
18729 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
18731 * config/aarch64/aarch64-simd.md
18732 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
18734 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
18737 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18739 PR tree-optimization/85989
18740 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
18742 (backprop::intersect_uses): Check it when deciding whether this
18743 is a backedge reference.
18744 (backprop::process_block): Add each phi to m_visited_phis
18745 after visiting it, then clear it at the end.
18747 2018-06-01 Richard Biener <rguenther@suse.de>
18749 * tree-vectorizer.h (vect_dr_stmt): New function.
18750 (vect_get_load_cost): Adjust.
18751 (vect_get_store_cost): Likewise.
18752 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
18753 Use vect_dr_stmt instead of DR_SMTT.
18754 (vect_record_base_alignments): Likewise.
18755 (vect_calculate_target_alignment): Likewise.
18756 (vect_compute_data_ref_alignment): Likewise and make static.
18757 (vect_update_misalignment_for_peel): Likewise.
18758 (vect_verify_datarefs_alignment): Likewise.
18759 (vector_alignment_reachable_p): Likewise.
18760 (vect_get_data_access_cost): Likewise. Pass down
18761 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
18762 (vect_get_peeling_costs_all_drs): Likewise.
18763 (vect_peeling_hash_get_lowest_cost): Likewise.
18764 (vect_enhance_data_refs_alignment): Likewise.
18765 (vect_find_same_alignment_drs): Likewise.
18766 (vect_analyze_data_refs_alignment): Likewise.
18767 (vect_analyze_group_access_1): Likewise.
18768 (vect_analyze_group_access): Likewise.
18769 (vect_analyze_data_ref_access): Likewise.
18770 (vect_analyze_data_ref_accesses): Likewise.
18771 (vect_vfa_segment_size): Likewise.
18772 (vect_small_gap_p): Likewise.
18773 (vectorizable_with_step_bound_p): Likewise.
18774 (vect_prune_runtime_alias_test_list): Likewise.
18775 (vect_analyze_data_refs): Likewise.
18776 (vect_supportable_dr_alignment): Likewise.
18777 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
18778 (vect_gen_prolog_loop_niters): Likewise.
18779 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
18780 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
18782 (vect_recog_mask_conversion_pattern): Likewise.
18783 (vect_try_gather_scatter_pattern): Likewise.
18784 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
18785 to vect_get_store_cost.
18786 (vect_get_store_cost): Get stmt_info instead of DR.
18787 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
18788 (vect_get_load_cost): Get stmt_info instead of DR.
18790 2018-06-01 Richard Biener <rguenther@suse.de>
18792 PR middle-end/86017
18793 * gimple-fold.c (var_decl_component_p): Also allow offsetted
18794 vars wrapped in MEM_REFs.
18796 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
18798 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18799 Fix subreg tests so that we only return a choice between
18800 GENERAL_REGS and FP_REGS if the original classes included both.
18802 2018-06-01 Richard Biener <rguenther@suse.de>
18805 * tree-ssa-structalias.c (get_function_part_constraint):
18806 Handle NULL fi->decl.
18807 (find_func_aliases_for_call): Properly handle indirect
18808 fi from direct call.
18809 (find_func_clobbers): Likewise.
18810 (ipa_pta_execute): Likewise.
18811 (create_variable_info_for): For functions that are ifunc_resolver
18812 resolve to a varinfo that contains the result of the resolver call.
18813 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
18816 2018-05-31 Michael Collison <michael.collison@arm.com>
18818 * config/aarch64/aarch64.md:
18819 (*fix_to_zero_extenddfdi2): New pattern.
18820 * gcc.target/aarch64/fix_extend1.c: New testcase.
18822 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
18824 PR middle-end/78809
18825 PR middle-end/83026
18826 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
18827 and BUILT_IN_STRNCMP_EQ.
18828 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
18829 BUILT_IN_STRNCMP_EQ.
18830 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
18831 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18832 (gimple_fold_builtin): Likewise.
18833 * tree-ssa-strlen.c (compute_string_length): New function.
18834 (determine_min_obsize): New function.
18835 (handle_builtin_string_cmp): New function to handle calls to
18836 string compare functions.
18837 (strlen_optimize_stmt): Add handling to builtin string compare
18839 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
18840 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18841 * tree.c (build_common_builtin_nodes): Add new defines of
18842 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
18844 2018-05-31 Jakub Jelinek <jakub@redhat.com>
18847 * bb-reorder.c (pass_partition_blocks::gate): Return false for
18848 functions with naked attribute.
18850 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
18852 * config/i386/sse.md (avx_vec_concat<mode>):
18853 Substitute concat_tg_mode mode attribute with xtg_mode.
18854 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
18855 (concat_tg_mode): Remove mode attribute.
18857 2018-05-31 Martin Sebor <msebor@redhat.com>
18860 * calls.c (alloc_max_size): Correct a logic error/typo.
18861 Treat excessive arguments as infinite. Warn for invalid arguments.
18862 * doc/invoke.texi (-Walloc-size-larger-than): Update.
18864 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
18867 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
18868 and movx for Haswell.
18870 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
18871 Cesar Philippidis <cesar@codesourcery.com>
18873 PR middle-end/85879
18874 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
18875 when emitting error on private/firstprivate reductions.
18876 * omp-low.c (lower_omp_target): Avoid reference-type processing
18877 on pointers for firstprivate clause.
18879 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
18881 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
18884 * config/aarch64/aarch64-simd.md
18885 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
18886 (aarch64_ld1_x3_<mode>): Likewise
18887 (aarch64_st1x2<VALLDIF:mode>): Likewise
18888 (aarch64_st1_x2_<mode>): Likewise
18889 (aarch64_st1x3<VALLDIF:mode>): Likewise
18890 (aarch64_st1_x3_<mode>): Likewise
18891 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
18892 (vld1_s8_x3): Likewise.
18893 (vld1_u16_x3): Likewise.
18894 (vld1_s16_x3): Likewise.
18895 (vld1_u32_x3): Likewise.
18896 (vld1_s32_x3): Likewise.
18897 (vld1_u64_x3): Likewise.
18898 (vld1_s64_x3): Likewise.
18899 (vld1_f16_x3): Likewise.
18900 (vld1_f32_x3): Likewise.
18901 (vld1_f64_x3): Likewise.
18902 (vld1_p8_x3): Likewise.
18903 (vld1_p16_x3): Likewise.
18904 (vld1_p64_x3): Likewise.
18905 (vld1q_u8_x3): Likewise.
18906 (vld1q_s8_x3): Likewise.
18907 (vld1q_u16_x3): Likewise.
18908 (vld1q_s16_x3): Likewise.
18909 (vld1q_u32_x3): Likewise.
18910 (vld1q_s32_x3): Likewise.
18911 (vld1q_u64_x3): Likewise.
18912 (vld1q_s64_x3): Likewise.
18913 (vld1q_f16_x3): Likewise.
18914 (vld1q_f32_x3): Likewise.
18915 (vld1q_f64_x3): Likewise.
18916 (vld1q_p8_x3): Likewise.
18917 (vld1q_p16_x3): Likewise.
18918 (vld1q_p64_x3): Likewise.
18919 (vst1_s64_x2): Likewise.
18920 (vst1_u64_x2): Likewise.
18921 (vst1_f64_x2): Likewise.
18922 (vst1_s8_x2): Likewise.
18923 (vst1_p8_x2): Likewise.
18924 (vst1_s16_x2): Likewise.
18925 (vst1_p16_x2): Likewise.
18926 (vst1_s32_x2): Likewise.
18927 (vst1_u8_x2): Likewise.
18928 (vst1_u16_x2): Likewise.
18929 (vst1_u32_x2): Likewise.
18930 (vst1_f16_x2): Likewise.
18931 (vst1_f32_x2): Likewise.
18932 (vst1_p64_x2): Likewise.
18933 (vst1q_s8_x2): Likewise.
18934 (vst1q_p8_x2): Likewise.
18935 (vst1q_s16_x2): Likewise.
18936 (vst1q_p16_x2): Likewise.
18937 (vst1q_s32_x2): Likewise.
18938 (vst1q_s64_x2): Likewise.
18939 (vst1q_u8_x2): Likewise.
18940 (vst1q_u16_x2): Likewise.
18941 (vst1q_u32_x2): Likewise.
18942 (vst1q_u64_x2): Likewise.
18943 (vst1q_f16_x2): Likewise.
18944 (vst1q_f32_x2): Likewise.
18945 (vst1q_f64_x2): Likewise.
18946 (vst1q_p64_x2): Likewise.
18947 (vst1_s64_x3): Likewise.
18948 (vst1_u64_x3): Likewise.
18949 (vst1_f64_x3): Likewise.
18950 (vst1_s8_x3): Likewise.
18951 (vst1_p8_x3): Likewise.
18952 (vst1_s16_x3): Likewise.
18953 (vst1_p16_x3): Likewise.
18954 (vst1_s32_x3): Likewise.
18955 (vst1_u8_x3): Likewise.
18956 (vst1_u16_x3): Likewise.
18957 (vst1_u32_x3): Likewise.
18958 (vst1_f16_x3): Likewise.
18959 (vst1_f32_x3): Likewise.
18960 (vst1_p64_x3): Likewise.
18961 (vst1q_s8_x3): Likewise.
18962 (vst1q_p8_x3): Likewise.
18963 (vst1q_s16_x3): Likewise.
18964 (vst1q_p16_x3): Likewise.
18965 (vst1q_s32_x3): Likewise.
18966 (vst1q_s64_x3): Likewise.
18967 (vst1q_u8_x3): Likewise.
18968 (vst1q_u16_x3): Likewise.
18969 (vst1q_u32_x3): Likewise.
18970 (vst1q_u64_x3): Likewise.
18971 (vst1q_f16_x3): Likewise.
18972 (vst1q_f32_x3): Likewise.
18973 (vst1q_f64_x3): Likewise.
18974 (vst1q_p64_x3): Likewise.
18976 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
18978 * config/msp430/msp430.c (msp430_output_labelref): Prepend
18979 user_label_prefix to name.
18981 * tree-core.h: Update comment about the format of NAME string
18982 passed to handler in attribute_spec.
18984 * config/msp430/msp430.md: Remove erroneous subreg expression from
18985 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
18986 zero_extend{q,h}isi2.
18988 2018-05-30 Borislav Petkov <bp@suse.de>
18990 * doc/extend.texi: Document some architecture specific
18991 constraints and sort entries.
18993 2018-05-30 Martin Sebor <msebor@redhat.com>
18995 PR middle-end/85369
18996 * builtins.c (expand_builtin_stpcpy_1): New function.
18997 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
18998 only if the former succeeds.
19000 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
19002 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
19005 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19007 * doc/invoke.texi (-flinker-output): Document
19009 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19011 * passes.c (ipa_write_summaries): Only modify statements if body
19013 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
19014 incrementally linking.
19015 (ipa_passes): Likewise.
19016 * lto-cgraph.c (lto_output_node): When incrementally linking do not
19017 pass down resolution info.
19018 * common.opt (flag_incremental_link): Update info.
19019 * gcc.c (plugin specs): Turn flinker-output=* to
19020 -plugin-opt=-linker-output-known
19021 * toplev.c (compile_file): Also cut compilation when doing incremental
19023 * flag-types. (enum lto_partition_model): Add
19024 LTO_LINKER_OUTPUT_NOLTOREL.
19025 (invoke.texi): Add -flinker-output docs.
19026 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
19027 link same way as WPA; do not stream in dead initializers.
19029 * dwarf2out.c (dwarf2out_die_ref_for_decl,
19030 darf2out_register_external_decl): Support incremental link.
19032 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19034 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
19036 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
19038 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
19039 it down to simple_object_copy_lto_debug_sections.
19040 (run_gcc): Determine incremental LTO link time and configure
19041 lto1 into non-wpa mode, disable renaming of debug sections.
19043 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
19045 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
19046 descriptions of various incorrectly documented functions.
19048 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
19051 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19052 address check not strict.
19054 2018-05-30 Richard Biener <rguenther@suse.de>
19056 PR tree-optimization/85964
19057 * tracer.c (better_p): Drop initialized count check, we only
19058 call the function with initialized counts now.
19059 (find_best_successor): Do find a best edge if one
19060 has uninitialized count.
19061 (find_best_predecessor): Likewise. Do BB frequency check only
19062 if count is initialized.
19064 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
19066 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
19067 (aarch64_ldrstr_offset_compare): New.
19068 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
19069 load/store orderings.
19070 (aarch64_gen_adjusted_ldpstp): Likewise.
19072 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
19074 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
19075 Check for subset of GENERAL_REGS and FP_REGS.
19076 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
19079 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
19081 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
19082 and wi::to_poly_offset. Add the current offset and then check
19083 whether the sum fits, rather than using an unchecked addition of
19084 a checked term. Check for a shwi rather than a uhwi.
19085 * expr.c (get_bit_range): Use tree_to_poly_uint64.
19086 (store_constructor): Use poly_int_tree_p.
19087 (expand_expr_real_1): Likewise.
19088 * function.c (assign_temp): Likewise.
19089 * fold-const.c (const_binop): Use poly_int_tree_p and
19090 wi::to_poly_offset.
19091 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
19093 * ipa-icf-gimple.c (func_checker::compare_operand): Use
19094 to_poly_offset for MEM offsets.
19095 * ipa-icf.c (sem_variable::equals): Likewise.
19096 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
19097 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
19098 wi::to_poly_offset for BIT_FIELD_REF offsets.
19099 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
19100 wi::to_poly_offset.
19101 * var-tracking.c (emit_note_insn_var_location): Use
19102 tree_to_poly_uint64.
19104 2018-05-29 Jim Wilson <jimw@sifive.com>
19106 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
19108 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
19111 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
19112 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
19114 (sse4_1_round<mode>2): Use nonimmediate_operand
19115 for operand 1 predicate.
19117 2018-05-29 Martin Sebor <msebor@redhat.com>
19118 Richard Biener <rguenther@suse.de>
19121 * calls.c (get_size_range): Call determine_value_range instead
19122 of get_value_range..
19123 * tree-vrp.h (determine_value_range): Declared new function.
19124 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
19126 2018-05-29 Richard Biener <rguenther@suse.de>
19128 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
19129 sure to use non-pattern stmts for get_earlier_stmt arguments.
19130 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
19131 called on pattern stmts.
19132 (get_later_stmt): Likewise.
19134 2018-05-29 Martin Liska <mliska@suse.cz>
19136 PR gcov-profile/85759
19137 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
19140 2018-05-29 Jakub Jelinek <jakub@redhat.com>
19142 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
19144 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
19148 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19149 VEC_PACK_FLOAT_EXPR): New tree codes.
19150 * tree-pretty-print.c (op_code_prio): Handle
19151 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19152 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19153 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19154 * tree-inline.c (estimate_operator_cost): Likewise.
19155 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
19156 * fold-const.c (const_binop): Likewise.
19157 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
19158 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
19159 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
19160 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
19161 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
19162 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
19163 * expr.c (expand_expr_real_2): Likewise.
19164 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
19165 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
19166 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
19168 * optabs.c (expand_widen_pattern_expr): For
19169 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
19170 sign from result type rather than operand's type.
19171 (expand_binop_directly): For vec_packu_float_optab and
19172 vec_packs_float_optab allow result type to be different from operand's
19174 * optabs-tree.c (optab_for_tree_code): Handle
19175 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19176 VEC_PACK_FLOAT_EXPR. Formatting fixes.
19177 * tree-vect-generic.c (expand_vector_operations_1): Handle
19178 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
19179 VEC_PACK_FLOAT_EXPR.
19180 * tree-vect-stmts.c (supportable_widening_operation): Handle
19182 (supportable_narrowing_operation): Handle FLOAT_EXPR.
19183 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
19184 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
19185 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
19186 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
19188 (vec_pack<floatprefix>_float_<mode>): New expander.
19189 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
19191 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
19192 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
19193 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
19194 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
19195 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
19197 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
19198 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
19199 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
19200 VEC_PACK_FLOAT_EXPR): Document.
19202 2018-05-29 Richard Biener <rguenther@suse.de>
19204 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
19206 (stmt_vec_info_vec): Make pointer.
19207 (init_stmt_vec_info_vec): Remove.
19208 (free_stmt_vec_info_vec): Likewise.
19209 (set_stmt_vec_info_vec): New function.
19210 (free_stmt_vec_infos): Likewise.
19211 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
19212 (set_vinfo_for_stmt): Likewise.
19213 (get_earlier_stmt): Likewise.
19214 (get_later_stmt): Likewise.
19215 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
19216 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
19217 (vec_info::~vec_info): Free stmt_vec_infos.
19218 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
19219 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
19220 (pass_slp_vectorize::execute): Likewise.
19221 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
19222 (free_stmt_vec_info_vec): Likewise.
19223 (set_stmt_vec_info_vec): New function.
19224 (free_stmt_vec_infos): Likewise.
19225 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
19226 the global stmt_vec_info_vec.
19227 * tree-parloops.c (gather_scalar_reductions): Use
19228 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
19231 2018-05-29 Richard Biener <rguenther@suse.de>
19233 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
19235 2018-05-29 Martin Liska <mliska@suse.cz>
19236 David Malcolm <dmalcolm@redhat.com>
19238 * vec.c (test_reverse): New.
19239 (vec_c_tests): Add new test.
19240 * vec.h (vl_ptr>::reverse): New function.
19242 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
19244 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
19246 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
19249 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
19251 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
19253 2018-05-28 Richard Biener <rguenther@suse.de>
19255 PR tree-optimization/85933
19256 * tree-vect-data-refs.c (vect_record_base_alignments): Only
19257 look at stmts marked as vectorizable.
19259 2018-05-28 Richard Biener <rguenther@suse.de>
19261 PR tree-optimization/85934
19262 * tree-vect-generic.c (expand_vector_operations_1): Hoist
19263 vector boolean check before scalar optimization.
19265 2018-05-28 Jakub Jelinek <jakub@redhat.com>
19267 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
19270 2018-05-28 Mark Wielaard <mark@klomp.org>
19272 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
19273 if it is an expression containing a minus sign.
19275 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
19277 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
19279 2018-05-27 Paul Koning <ni1d@arrl.net>
19281 * config/pdp11/pdp11.md (truncsihi2): Remove.
19283 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
19284 Chung-Ju Wu <jasonwucj@gmail.com>
19286 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
19288 (unaligned_store_dw): Ditto.
19289 * config/nds32/nds32-memory-manipulation.c
19290 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
19291 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
19292 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
19293 (emit_setmem_word_loop): Rename to ...
19294 (emit_setmem_doubleword_loop): ... this.
19295 (nds32_gen_dup_4_byte_to_word_value): New function.
19296 (nds32_gen_dup_8_byte_to_double_word_value): New function.
19297 (nds32_expand_setmem_loop): Refine implementation.
19298 (nds32_expand_setmem_loop_v3m): Ditto.
19299 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
19302 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
19304 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
19306 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
19308 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
19309 (nds32_init_machine_status): Initialize machine->attr_naked_p and
19310 machine->attr_no_prologue_p.
19311 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
19312 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
19313 (nds32_expand_epilogue): Consider attr_naked_p.
19314 (nds32_expand_epilogue_v3pop): Likewise.
19315 (nds32_can_use_return_insn): Likewise.
19316 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
19317 attr_no_prologue_p fields.
19318 * config/nds32/nds32.opt (mret-in-naked-func): New option.
19320 2018-05-27 Jakub Jelinek <jakub@redhat.com>
19323 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
19325 * config/i386/sse.md
19326 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
19328 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
19330 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
19332 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
19334 (*<floatsuffix>floatv2div2sf2): Rename to ...
19335 (*float<floatunssuffix>v2div2sf2): ... this.
19336 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
19337 (float<floatunssuffix>v2div2sf2_mask): ... this.
19338 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
19339 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
19340 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
19342 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
19344 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19346 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19348 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19350 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19352 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
19353 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
19354 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
19355 gen_ufix_truncv8dfv8si2.
19356 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
19357 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
19358 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
19359 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
19360 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
19361 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
19362 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
19363 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
19365 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
19369 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
19371 2018-05-25 Jim Wilson <jimw@sifive.com>
19373 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
19374 * config/riscv/riscv.c (struct machine_function): Add
19375 interrupt_handler_p and attribute_checked_p fields.
19376 (riscv_attribute_table): Add interrupt.
19377 (riscv_interrupt_type_p): New.
19378 (riscv_save_reg_p): Save extra regs for interrupt handler.
19379 (riscv_use_save_libcall): Return false for interrupt handler.
19380 (riscv_first_stack_step): Add forward declaration.
19381 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
19382 for interrupt handler with large frame. Use it for saved reg list.
19383 (riscv_expand_prologue): Move flag_stack_usage_info support to
19384 eliminate duplication.
19385 (riscv_expand_epilogue): Generate mret for interrupt handler.
19386 (riscv_epilogue_uses): New.
19387 (riscv_can_use_return_insn): Return false for interrupt handler.
19388 (riscv_function_ok_for_sibcall): Likewise.
19389 (riscv_set_current_function): Add interrupt handler support.
19390 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
19391 * config/riscv/riscv.md (UNSPECV_MRET): New.
19393 (riscv_frflags, riscv_fsflags): Use tab after opcode.
19395 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
19397 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
19399 PR tree-optimization/85712
19400 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
19401 this candidate has already been replaced in-situ by a copy.
19403 2018-05-25 Jason Merrill <jason@redhat.com>
19405 PR c++/80485 - inline function non-zero address.
19406 * symtab.c (nonzero_address): Check DECL_COMDAT.
19408 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
19411 * config/alpha/alpha.md (ashlsi3): New insn pattern.
19412 (*ashlsi_se): Rename from *ashldi_se. Define as sign
19413 extension of SImode operation. Use const123_operand predicate.
19414 (*saddsi_1): Remove.
19415 (*saddl_se_1): Ditto.
19416 (*ssubsi_1): Ditto.
19417 (*ssubl_se_1): Ditto.
19418 * config/alpha/predicates.md (const123_operand): New predicate.
19419 * config/alpha/constraints.md (P): Use IN_RANGE.
19421 2018-05-25 Richard Biener <rguenther@suse.de>
19423 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
19425 (ref_maybe_used_by_stmt_p): Likewise.
19426 (stmt_may_clobber_ref_p): Likewise.
19427 (stmt_may_clobber_ref_p_1): Likewise.
19428 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
19430 (ref_maybe_used_by_stmt_p): Likewise.
19431 (stmt_may_clobber_ref_p): Likewise.
19432 (stmt_may_clobber_ref_p_1): Likewise.
19433 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
19434 the alias oracle to disambiguate DRs with stmts DR analysis
19436 (vect_analyze_data_refs): Do not give up on not analyzable
19437 DRs for BB vectorization. Remove code truncating the dataref
19440 2018-05-25 Jakub Jelinek <jakub@redhat.com>
19443 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19444 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
19445 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
19447 2018-05-25 Richard Biener <rguenther@suse.de>
19449 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
19450 function, combining stmt data ref gathering and fatal analysis
19452 (vect_analyze_data_refs): Remove now redudnant code and simplify.
19453 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
19454 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
19455 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
19456 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
19458 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19460 PR tree-optimization/85720
19461 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
19462 SCC if all partitions are builtins.
19463 (version_loop_by_alias_check): New parameter. Generate cancelable
19464 runtime alias check if all partitions are builtins.
19465 (distribute_loop): Update call to above function.
19467 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19469 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
19470 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
19471 (parm_default_def_partition_arg): Ditto.
19472 (set_parm_default_def_partition): Ditto.
19473 (get_parm_default_def_partitions): Ditto and make it static.
19474 (get_undefined_value_partitions): Ditto and make it static.
19475 (remove_ssa_form): Refactor call to init_var_map here.
19476 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
19477 computation for loop region.
19478 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
19479 (register_default_def): Delete.
19480 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
19481 (parm_default_def_partition_arg): Ditto.
19482 (set_parm_default_def_partition): Ditto.
19483 (get_parm_default_def_partitions): Ditto and make it static.
19484 (get_undefined_value_partitions): Ditto and make it static.
19485 (coalesce_with_default, coalesce_with_default): Update comment.
19486 (create_coalesce_list_for_region): New func factored out from
19487 create_outofssa_var_map.
19488 (populate_coalesce_list_for_outofssa): New func factored out from
19489 create_outofssa_var_map and coalesce_ssa_name.
19490 (create_outofssa_var_map): Delete.
19491 (coalesce_ssa_name): Refactor to support live range computation.
19492 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
19493 (get_parm_default_def_partitions): Delete.
19494 (get_undefined_value_partitions): Ditto.
19495 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
19496 computation for loop region.
19497 (new_tree_live_info, loe_visit_block): Ditto.
19498 (live_worklist, set_var_live_on_entry): Ditto.
19499 (calculate_live_on_exit, verify_live_on_entry): Ditto.
19500 * tree-ssa-live.h (struct _var_map): New fields.
19501 (init_var_map): Change decl.
19502 (region_contains_p): New.
19504 2018-05-25 Bin Cheng <bin.cheng@arm.com>
19506 * tree-ssa-live.h (live_merge_and_clear): Delete.
19508 2018-05-25 Richard Biener <rguenther@suse.de>
19511 * tree-dump.c (dequeue_and_dump): Remove access to removed
19512 operand 2 of a SWITCH_EXPR.
19514 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19516 * doc/sourcebuild.texi (vect_double_cond_arith): Include
19517 multiplication and division.
19518 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
19519 (cond_udiv@var{m}, cond_umod@var{m}): Document.
19520 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
19521 (cond_udiv_optab, cond_umod_optab): New optabs.
19522 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
19523 (IFN_COND_RDIV): New internal functions.
19524 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
19525 TRUNC_MOD_EXPR and RDIV_EXPR.
19526 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
19527 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
19529 (SVE_INT_BINARY): Include mult.
19530 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
19531 (optab, sve_int_op): Handle mult.
19532 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
19534 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
19535 for SVE_INT_BINARY_SD.
19537 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19539 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
19540 (optab, sve_int_op): Handle div and udiv.
19541 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
19542 for SVE_INT_BINARY_SD.
19543 (*<optab><mode>3): New insn for the same.
19545 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19547 * tree-vect-patterns.c: Include predict.h.
19548 (vect_recog_divmod_pattern): Restrict check for division support
19549 to when optimizing for size.
19551 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19553 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
19554 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19555 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
19556 (gimple_match_op::set_op): Likewise.
19557 (gimple_resimplify4): Declare.
19558 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
19559 (expr::gen_transform): Likewise.
19560 (decision_tree::gen): Generate a simplification routine for 4 operands.
19561 * gimple-match-head.c (gimple_simplify): Add an overload for
19562 4 operands. In the top-level function, handle up to 4 call
19563 arguments and call gimple_resimplify4.
19564 (gimple_resimplify4): New function.
19565 (build_call_internal): Pass a fourth operand.
19566 (maybe_push_to_seq): Likewise.
19567 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
19568 Fold VEC_COND_EXPRs of an operation and a default value into
19569 an IFN_COND_* function if possible.
19570 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
19572 (SVE_COND_FP_BINARY): Include them.
19573 (optab, sve_fp_op): Handle them.
19574 (SVE_INT_BINARY_REV): New code iterator.
19575 (SVE_COND_FP_BINARY_REV): New int iterator.
19576 (commutative): New int attribute.
19577 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
19579 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
19581 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
19582 (*cond_<optab><mode>): New patterns for reversed operands.
19584 2018-05-25 Richard Biener <rguenther@suse.de>
19586 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
19587 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
19588 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
19589 (STMT_VINFO_GROUPED_ACCESS): Adjust.
19590 * tree-vect-data-refs.c (everywhere): Adjust users.
19591 * tree-vect-loop.c (everywhere): Likewise.
19592 * tree-vect-slp.c (everywhere): Likewise.
19593 * tree-vect-stmts.c (everywhere): Likewise.
19594 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
19596 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
19598 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
19600 (gcc_cv_as_section_exclude): ... this.
19601 Try Solaris as #exclude syntax.
19602 * configure: Regenerate.
19603 * config.in: Regenerate.
19604 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
19606 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
19607 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
19609 * varasm.c (default_elf_asm_named_section): Don't check if
19610 HAVE_GAS_SECTION_EXCLUDE is defined.
19612 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19614 * doc/md.texi: Update the documentation of the cond_* optabs
19615 to mention the new final operand. Fix GET_MODE_NUNITS call.
19616 Describe the scalar case too.
19617 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
19618 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
19620 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
19621 (get_conditional_internal_fn): Update comment.
19622 * tree-vect-loop.c (vectorizable_reduction): Pass the original
19623 accumulator value as a final argument to conditional functions.
19624 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
19625 a define_expand and add an "else" operand. Assert for now that
19626 the else operand is equal to operand 2. Use SVE_INT_BINARY and
19627 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
19628 (*cond_<optab><mode>): New patterns.
19629 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
19630 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19631 (UNSPEC_COND_EOR): Delete.
19632 (optab): Remove associated mappings.
19633 (SVE_INT_BINARY): New code iterator.
19634 (sve_int_op): Remove int attribute and add "minus" to the code
19636 (SVE_COND_INT_OP): Delete.
19637 (SVE_COND_FP_OP): Rename to...
19638 (SVE_COND_FP_BINARY): ...this.
19640 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
19642 * optabs.c (can_reuse_operands_p): New function.
19643 (maybe_legitimize_operands): Try to reuse the results for
19646 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
19648 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
19649 Add {q} suffix to insn mnemonic.
19651 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
19653 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
19654 (msp430_warn_func_return): New.
19656 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
19658 * fold-const.c (tree_nonzero_bits): New function.
19659 * fold-const.h (tree_nonzero_bits): Likewise.
19660 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
19661 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
19663 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
19667 * varasm.c (assemble_alias): Check ifunc_resolver only on
19670 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
19673 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
19674 when memory input operand is handled.
19676 2018-05-24 Luis Machado <luis.machado@linaro.org>
19678 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
19680 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
19682 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
19684 * match.pd: Delay FMA folds until after vectorization.
19686 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
19689 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19690 address check not strict.
19692 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
19694 * gimple-match.h (gimple_match_op): New class.
19695 (mprts_hook): Replace parameters with a gimple_match_op *.
19696 (maybe_build_generic_op): Likewise.
19697 (gimple_simplified_result_is_gimple_val): Replace parameters with
19698 a const gimple_match_op *.
19699 (gimple_simplify): Replace code_helper * and tree * parameters with
19700 a gimple_match_op * parameter.
19701 (gimple_resimplify1): Replace code_helper *, tree and tree *
19702 parameters with a gimple_match_op * parameter.
19703 (gimple_resimplify2): Likewise.
19704 (gimple_resimplify3): Likewise.
19705 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
19706 parameters with a gimple_match_op * parameter.
19707 * gimple-match-head.c (gimple_simplify): Change prototypes of
19708 auto-generated functions to take a gimple_match_op * instead of
19709 separate code_helper * and tree * parameters. Make the same
19710 change in the top-level overload and update calls to the
19711 gimple_resimplify routines. Update calls to the auto-generated
19712 functions and to maybe_push_res_to_seq in the publicly-facing
19713 operation-specific gimple_simplify overloads.
19714 (gimple_match_op::MAX_NUM_OPS): Define.
19715 (gimple_resimplify1): Replace rcode and ops with a single res_op
19716 parameter. Update call to gimple_simplify.
19717 (gimple_resimplify2): Likewise.
19718 (gimple_resimplify3): Likewise.
19719 (mprts_hook): Replace parameters with a gimple_match_op *.
19720 (maybe_build_generic_op): Likewise.
19721 (build_call_internal): Replace type, nargs and ops with
19722 a gimple_match_op *.
19723 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
19724 with a single gimple_match_op *. Update calls to mprts_hook,
19725 build_call_internal and gimple_simplified_result_is_gimple_val.
19726 Factor out code that is common to the tree_code and combined_fn cases.
19727 * genmatch.c (expr::gen_transform): Replace tem_code and
19728 tem_ops with a gimple_match_op called tem_op. Update calls
19729 to the gimple_resimplify functions and maybe_push_res_to_seq.
19730 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
19731 res_ops. Update call to the gimple_resimplify functions.
19732 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
19733 (decision_tree::gen): Make the functions take a gimple_match_op *
19734 called res_op instead of separate res_code and res_ops parameters.
19735 Update call accordingly.
19736 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
19737 and ops with a single res_op parameter. Update calls to
19738 maybe_build_generic_op and maybe_push_res_to_seq.
19739 (fold_stmt_1): Update calls to gimple_simplify and
19740 replace_stmt_with_simplification.
19741 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
19742 and gimple_simplified_result_is_gimple_val.
19743 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
19745 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
19746 with a gimple_match_op *.
19747 (vn_nary_build_or_lookup): Likewise. Update call to
19748 vn_nary_build_or_lookup_1.
19749 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
19750 gimple_match_op *. Update calls to the gimple_resimplify routines
19751 and to gimple_simplified_result_is_gimple_val.
19752 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
19753 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
19754 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
19755 (visit_nary_op): Likewise.
19756 (visit_reference_op_load): Likewise.
19758 2018-05-23 Luis Machado <luis.machado@linaro.org>
19760 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
19761 modifier for printing the step amount.
19763 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
19766 * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
19769 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
19771 * doc/sourcebuild.texi (Endianness): New subsubsection.
19773 2018-05-23 Luis Machado <luis.machado@linaro.org>
19775 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19776 <prefetch_dynamic_strides>: New const bool field.
19777 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19778 prefetch_dynamic_strides.
19779 (exynosm1_prefetch_tune): Likewise.
19780 (thunderxt88_prefetch_tune): Likewise.
19781 (thunderx_prefetch_tune): Likewise.
19782 (thunderx2t99_prefetch_tune): Likewise.
19783 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
19785 (aarch64_override_options_internal): Update to set
19786 PARAM_PREFETCH_DYNAMIC_STRIDES.
19787 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19788 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19789 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19790 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19791 prefetch-dynamic-strides setting.
19793 2018-05-23 Luis Machado <luis.machado@linaro.org>
19795 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19796 <minimum_stride>: New const int field.
19797 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19798 minimum_stride field defaulting to -1.
19799 (exynosm1_prefetch_tune): Likewise.
19800 (thunderxt88_prefetch_tune): Likewise.
19801 (thunderx_prefetch_tune): Likewise.
19802 (thunderx2t99_prefetch_tune): Likewise.
19803 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
19804 <default_opt_level>: Set to 3.
19805 (aarch64_override_options_internal): Update to set
19806 PARAM_PREFETCH_MINIMUM_STRIDE.
19807 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19808 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19809 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19810 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19811 stride is constant and is below the minimum stride threshold.
19813 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19815 * config/arm/arm-cpus.in (mode26): Delete.
19816 (armv4): Delete mode26 reference.
19817 * config/arm/arm.c (arm_configure_build_target): Delete use of
19820 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19822 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
19824 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
19825 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
19827 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
19828 (floatunsdidf2): Ditto.
19830 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
19832 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
19833 (fixuns_trunc<mode>si2_avx512f): Ditto.
19834 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
19835 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
19836 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
19838 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19840 PR rtl-optimization/79985
19841 * df-scan.c (df_insn_refs_collect): Remove special case for
19842 global registers and asm statements.
19844 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
19846 * extend.texi (Global Register Variables): Rewrite the bullet list.
19847 Note that the register is available for allocation. Note that access
19848 via inline asm must use constraints. Add note about async-signal
19849 handlers. Remove paragraph about automagic register selection.
19851 2018-05-23 Richard Biener <rguenther@suse.de>
19853 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
19854 of fixed offset from memset VN.
19856 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
19858 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
19859 first_interp field.
19860 (alloc_cand_and_find_basis): Initialize first_interp field.
19861 (slsr_process_mul): Modify first_interp field.
19862 (slsr_process_add): Likewise.
19863 (slsr_process_cast): Modify first_interp field for each new
19865 (slsr_process_copy): Likewise.
19866 (dump_candidate): Dump first_interp field.
19867 (replace_mult_candidate): Process all interpretations, not just
19869 (replace_rhs_if_not_dup): Likewise.
19870 (replace_one_candidate): Likewise.
19872 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
19874 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
19876 (aarch64_needs_frame_chain): New function.
19877 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
19879 2018-05-23 Sudakshina Das <sudi.das@arm.com>
19882 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
19883 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
19884 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
19885 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
19886 as true for strict-align.
19887 (aarch64_can_inline_p): Perform checks even when callee has no
19888 attributes to check for strict alignment.
19889 * doc/extend.texi (AArch64 Function Attributes): Document
19891 * doc/invoke.texi: (AArch64 Options): Likewise.
19893 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
19895 PR tree-optimization/85853
19896 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
19897 the handling of the root of the node to...
19898 (vect_slp_analyze_node_operations_1): ...this new function,
19899 and run the whole thing with the child nodes' def types
19900 set according to their SLP node's def type.
19902 2018-05-23 Richard Biener <rguenther@suse.de>
19904 PR middle-end/85874
19905 * tree-data-ref.c (create_runtime_alias_checks): Defer
19906 and ignore overflow warnings.
19908 2018-05-23 Yury Gribov <tetra2005@gmail.com>
19910 PR tree-optimization/85822
19911 * tree-vrp.c (is_masked_range_test): Fix handling of negative
19914 2018-05-23 Richard Biener <rguenther@suse.de>
19916 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19917 memset constants via native_interpret_expr.
19919 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
19922 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
19924 (cgraph_node::create_alias): Likewise.
19925 (cgraph_node::get_availability): Check ifunc_resolver instead
19926 of looking up ifunc attribute.
19927 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
19928 * varasm.c (do_assemble_alias): Likewise.
19929 (assemble_alias): Likewise.
19930 (default_binds_local_p_3): Likewise.
19931 * cgraph.h (cgraph_node): Add ifunc_resolver.
19932 (cgraph_node::only_called_directly_or_aliased_p): Return false
19933 for IFUNC resolver.
19934 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
19936 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
19937 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
19938 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
19939 instead of looking up ifunc attribute.
19941 2018-05-22 Luis Machado <luis.machado@linaro.org>
19943 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
19945 2018-05-22 Martin Sebor <msebor@redhat.com>
19947 PR middle-end/85359
19948 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
19949 only when expasion succeeds.
19950 (expand_builtin_strcmp): Same.
19951 (expand_builtin_strncmp): Same.
19953 2018-05-22 Martin Sebor <msebor@redhat.com>
19955 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
19957 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19958 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19960 * config/aarch64/aarch64-ldpstp.md: Replace uses of
19961 aarch64_mem_pair_operand with memory_operand and delete operand swapping
19963 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19964 Add check for legitimate_address.
19965 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
19966 (aarch64_swap_ldrstr_operands): New.
19967 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
19970 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
19971 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
19973 * config/aarch64/aarch64.md: New patterns to generate stp
19975 (store_pair_sw, store_pair_dw): New patterns to generate stp for
19976 single words and double words.
19977 (load_pair_sw, load_pair_dw): Likewise.
19978 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
19980 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
19982 * config/aarch64/aarch64-ldpstp.md: Modify peephole
19983 for different mode ldpstp and add peephole for merged zero stores.
19984 Likewise for loads.
19985 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19987 (aarch64_gen_store_pair): Rename calls to match new patterns.
19988 (aarch64_gen_load_pair): Rename calls to match new patterns.
19989 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
19990 (load_pair<DREG:mode><DREG2:mode>): ... This.
19991 (store_pair<mode>): Rename to...
19992 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
19993 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
19994 New mode iterators.
19995 (V_INT_EQUIV): Handle SImode.
19996 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
19999 2018-05-22 Martin Sebor <msebor@redhat.com>
20002 * calls.c (maybe_warn_nonstring_arg): Use string length to set
20003 or ajust the presumed bound on an operation to avoid unnecessary
20006 2018-05-22 Martin Sebor <msebor@redhat.com>
20008 PR tree-optimization/85826
20009 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
20010 assuming that a DECL necesarily has a constant size.
20012 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
20014 PR middle-end/85862
20015 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
20017 2018-05-22 Richard Biener <rguenther@suse.de>
20019 PR tree-optimization/85834
20020 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
20021 non-constant and non-zero memset arguments.
20023 2018-05-22 Martin Liska <mliska@suse.cz>
20026 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
20028 2018-05-22 Richard Biener <rguenther@suse.de>
20030 PR tree-optimization/85863
20031 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
20032 comparisons when vectype is specified.
20033 (vectorizable_condition): Do not specify vectype for
20034 vect_is_simple_cond when SLP vectorizing.
20036 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
20039 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
20040 define __ibm128 as long double.
20041 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
20042 as a distinct type when IEEE 128-bit support is enabled.
20043 (init_float128_ieee): Fix up conversions between IFmode and IEEE
20044 128-bit types to use the correct functions.
20045 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
20046 convert between 128-bit floating point types that have different
20047 modes but the same representation, instead of using gen_lowpart to
20049 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
20051 (IFKF_reg): New attributes to give the register constraints for
20053 (extend<mode>tf2_internal): New insns to mark an explicit
20054 conversion between 128-bit floating point types that have a
20055 different mode but share the same representation.
20057 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
20059 PR tree-optimization/85814
20060 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
20061 a null return from get_strinfo when unsharing the next
20062 strinfo in the chain.
20064 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
20067 * varasm.c (weak_finish): Clean up weak_decls.
20069 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20071 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
20072 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
20073 UNSPEC_UADALP values.
20074 * config/aarch64/iterators.md (ABAL): New int iterator.
20077 (sur): Add mappings for the above.
20078 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
20080 (aarch64_<sur>abal<mode>_4): Likewise.
20081 (aarch64_<sur>adalp<mode>_3): Likewise.
20082 (<sur>sadv16qi): New define_expand.
20084 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
20086 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
20087 (*movdf_internal): Ditto.
20088 (*rcpsf2_sse): Ditto.
20089 (*rsqrtsf2_sse): Ditto.
20090 (*sqrt<mode>2_sse): Ditto.
20092 2018-05-21 Tamar Christina <tamar.christina@arm.com>
20094 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
20096 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
20097 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
20098 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
20099 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
20101 * config/aarch64/arm_neon.h: Likewise.
20102 * config/aarch64/iterators.md (VQ_I): New.
20104 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
20106 * config.gcc: Add arc/t-multilib-linux to tmake_file for
20108 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
20111 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
20113 * config/nds32/constraints.md (S): New constraint.
20114 * config/nds32/nds32.md (call_internal): Use constraint S.
20115 (call_value_internal): Likewise.
20116 (sibcall_internal): Likewise.
20117 (sibcall_value_internal): Likewise.
20119 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
20120 Chung-Ju Wu <jasonwucj@gmail.com>
20122 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
20123 into consideration.
20125 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
20126 Chung-Ju Wu <jasonwucj@gmail.com>
20128 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
20129 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
20130 (nds32_rtx_costs_impl): Simplify.
20131 (nds32_address_cost_impl): Simplify.
20132 (nds32_init_rtx_costs): New function.
20133 (nds32_rtx_costs_speed_prefer): Likewise.
20134 (nds32_rtx_costs_size_prefer): Likewise.
20135 (nds32_address_cost_speed_prefer): Likewise.
20136 (nds32_address_cost_speed_fwprop): Likewise.
20137 (nds32_address_cost_size_prefer): Likewise.
20138 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
20139 * config/nds32/nds32.c (nds32_option_override): Use
20140 nds32_init_rtx_costs function.
20142 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
20144 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
20145 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
20146 (TARGET_PIPELINE_N8): Likewise.
20147 (TARGET_PIPELINE_N10): Likewise.
20148 (TARGET_PIPELINE_N13): Likewise.
20149 (TARGET_PIPELINE_GRAYWOLF): Likewise.
20151 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
20153 * config/nds32/nds32-fpu.md: Update copyright year.
20155 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20157 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
20159 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20161 * config/nds32/nds32.c
20162 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
20163 * config/nds32/nds32.opt (minline-asm-r15): New option.
20165 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20167 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
20169 * config/nds32/nds32.md (abssi2): New pattern.
20171 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
20173 * config/i386/i386.md (rex64namesuffix): New mode attribute.
20174 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
20175 Merge insn pattern from sse_cvtsi2ss<round_name> and
20176 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
20177 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
20178 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
20179 using SWI48 mode iterator.
20180 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
20181 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
20182 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
20183 pattern from sse_cvttss2si<round_saeonly_name>
20184 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
20185 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
20186 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
20187 using SWI48 mode iterator.
20188 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
20189 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
20190 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
20191 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
20192 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
20193 using SWI48 mode iterator.
20194 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
20195 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
20196 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
20197 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
20198 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
20199 SWI48 mode iterator.
20200 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
20201 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
20202 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
20203 pattern from sse_cvttsd2si<round_saeonly_name>
20204 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
20206 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20208 * config/nds32/nds32-md-auxiliary.c
20209 (nds32_valid_smw_lwm_base_p): Refine.
20210 (nds32_output_smw_single_word): Refine.
20211 (nds32_output_smw_double_word): New.
20212 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
20214 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20216 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
20217 (nds32_output_stack_pop): Refine.
20218 (nds32_expand_unaligned_load): Refine.
20219 (nds32_expand_unaligned_store): Refine.
20221 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20222 Chung-Ju Wu <jasonwucj@gmail.com>
20224 * config/nds32/constants.md: Add TP_REGNUM constant.
20225 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
20226 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
20228 * config/nds32/nds32-doubleword.md: Consider flag_pic.
20229 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
20230 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
20231 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
20232 and PIC code generation.
20233 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
20235 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
20237 * config/nds32/nds32.md: Support TLS and PIC.
20238 * config/nds32/nds32.c: Support TLS and PIC.
20239 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
20240 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
20243 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
20245 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
20246 mode with E_ prefix.
20248 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
20249 Chung-Ju Wu <jasonwucj@gmail.com>
20251 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
20252 * config/nds32/nds32-md-auxiliary.c
20253 (symbolic_reference_mentioned_p): New.
20254 (nds32_legitimize_ict_address): New.
20255 (nds32_expand_ict_move): New.
20256 (nds32_indirect_call_referenced_p): New.
20257 (nds32_symbol_binds_local_p): Delete.
20258 (nds32_long_call_p): Modify.
20259 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
20260 * config/nds32/nds32-protos.h
20261 (symbolic_reference_mentioned_p): Declare.
20262 (nds32_legitimize_ict_address): Declare.
20263 (nds32_expand_ict_move): Declare.
20264 (nds32_indirect_call_referenced_p): Declare.
20265 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
20266 (nds32_relax_group): Use nds32_ict_const_p as condition.
20267 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
20268 (nds32_asm_file_start): Output ict_model directive in asm code.
20269 (nds32_legitimate_address_p): Consider indirect call.
20270 (nds32_print_operand): Consider indirect call.
20271 (nds32_print_operand_address): Consider indirect call.
20272 (nds32_insert_attributes): Handle "indirect_call" attribute.
20273 (TARGET_LEGITIMATE_ADDRESS_P): Define.
20274 (TARGET_LEGITIMATE_CONSTANT_P): Define.
20275 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
20276 (TARGET_DELEGITIMIZE_ADDRESS): Define.
20277 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
20278 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
20279 (TARGET_ICT_MODEL_SMALL): Define.
20280 (TARGET_ICT_MODEL_LARGE): Define.
20281 * config/nds32/nds32.md (movsi): Consider ict model.
20282 (call, call_value): Consider ict model.
20283 (sibcall, sibcall_value): Consider ict model.
20284 * config/nds32/nds32.opt (mict-model): New option.
20285 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
20288 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
20289 Monk Chiang <sh.chiang04@gmail.com>
20290 Jim Wilson <jimw@sifive.com>
20292 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
20293 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
20294 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
20295 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
20296 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
20297 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
20298 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
20299 compute save_libcall_adjustment properly.
20300 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
20301 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
20302 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
20303 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
20304 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
20305 (ABI_SPEC): Handle mabi=ilp32e.
20306 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
20307 (RVE): Add RVE mask.
20308 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
20309 <-march>: Add rv32e as an example.
20311 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
20314 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
20315 (intra_create_variable_infos): Handle C++ constructors.
20317 2018-05-18 Martin Liska <mliska@suse.cz>
20319 * passes.def: Remove a redundant pass.
20321 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
20324 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
20326 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20328 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
20330 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
20332 (armv2, armv2a, armv3, armv3m): Delete architectures.
20333 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
20334 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
20335 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
20337 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
20338 (*mulsidi3adddi): Likewise.
20339 (mulsidi3): Likewise.
20340 (*mulsidi3_nov6): Likewise.
20341 (umulsidi3): Likewise.
20342 (umulsidi3_nov6): Likewise.
20343 (umaddsidi4): Likewise.
20344 (*umulsidi3adddi): Likewise.
20345 (smulsi3_highpart): Likewise.
20346 (*smulsi3_highpart_nov6): Likewise.
20347 (umulsi3_highpart): Likewise.
20348 (*umulsi3_highpart_nov6): Likewise.
20349 * config/arm/arm.h (arm_arch3m): Delete.
20350 * config/arm/arm.c (arm_arch3m): Delete.
20351 (arm_option_override_internal): Update armv3-related comment.
20352 (arm_configure_build_target): Delete use of isa_bit_mode32.
20353 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
20354 (arm_rtx_costs_internal): Delete check of arm_arch3m.
20355 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
20356 (mulsa3): Likewise.
20357 (mulusa3): Likewise.
20358 * config/arm/arm-protos.h (arm_arch3m): Delete.
20359 * config/arm/arm-tables.opt: Regenerate.
20360 * config/arm/arm-tune.md: Likewise.
20361 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
20362 deleted architectures.
20364 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20366 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
20367 (armv5t, armv5te): New features.
20368 (ARMv5, ARMv5e): Delete fgroups.
20369 (ARMv5t, ARMv5te): Adjust for above changes.
20370 (ARMv6m): Likewise.
20371 (armv5, armv5e): Delete arches.
20372 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
20374 (*call_reg_arm): Likewise.
20375 (*call_value_reg_armv5): Likewise.
20376 (*call_value_reg_arm): Likewise.
20377 (*call_symbol): Likewise.
20378 (*call_value_symbol): Likewise.
20379 (*sibcall_insn): Likewise.
20380 (*sibcall_value_insn): Likewise.
20381 (clzsi2): Likewise.
20382 (prefetch): Likewise.
20383 (define_split and define_peephole2 dependent on arm_arch5):
20385 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
20387 (TARGET_ARM_QBIT): Likewise.
20388 (TARGET_DSP_MULTIPLY): Likewise.
20389 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
20390 (arm_arch5, arm_arch5e): Delete.
20391 (arm_arch5t, arm_arch5te): Declare.
20392 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
20393 (arm_arch5t): Declare.
20394 (arm_option_reconfigure_globals): Update for the above.
20395 (arm_options_perform_arch_sanity_checks): Update comment, replace
20396 use of arm_arch5 with arm_arch5t.
20397 (use_return_insn): Likewise.
20398 (arm_emit_call_insn): Likewise.
20399 (output_return_instruction): Likewise.
20400 (arm_final_prescan_insn): Likewise.
20401 (arm_coproc_builtin_available): Likewise.
20402 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
20403 arm_arch5e with arm_arch5t and arm_arch5te.
20404 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
20405 (arm_arch5t, arm_arch5te): Declare.
20406 * config/arm/arm-tables.opt: Regenerate.
20407 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
20408 * config/arm/t-multilib: Likewise.
20409 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
20410 instead of arm_arch5.
20411 (*call_reg_thumb1): Likewise.
20412 (*call_value_reg_thumb1_v5): Likewise.
20413 (*call_value_reg_thumb1): Likewise.
20414 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
20416 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
20418 2018-05-18 Martin Liska <mliska@suse.cz>
20420 PR gcov-profile/84846
20421 * doc/gcov.texi: Document -t option of gcov tool.
20423 2018-05-18 Martin Liska <mliska@suse.cz>
20425 PR gcov-profile/84846
20426 * gcov.c (print_usage): Add new -t option.
20427 (process_args): Handle the option.
20428 (generate_results): Use stdout as output when requested by
20431 2018-05-18 Martin Liska <mliska@suse.cz>
20433 PR gcov-profile/84846
20434 * coverage.c (coverage_init): Write PWD to .gcno file.
20435 * doc/gcov.texi: Document how working directory is printed.
20436 * gcov-dump.c (dump_gcov_file): Print PWD.
20437 * gcov.c (output_intermediate_file): Likewise.
20438 (read_graph_file): Read PWD string.
20439 (output_lines): Print PWD.
20441 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20443 PR middle-end/85817
20444 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
20445 for retval and return false if all args to phi are zero.
20447 2018-05-18 Richard Biener <rguenther@suse.de>
20449 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
20451 (evrp_dom_walker::before_dom_children): Call it.
20453 2018-05-18 Richard Biener <rguenther@suse.de>
20455 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
20456 results when processing array refs with variable index.
20458 2018-05-18 Toon Moene <toon@moene.org>
20460 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
20461 directly after that of -floop-interchange. Indicate that both
20462 options are enabled by default when specifying -O3.
20464 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20466 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
20467 iterator. Delete separate integer-mode vec_set<mode> expander.
20468 (aarch64_simd_vec_setv2di): Delete.
20469 (vec_setv2di): Delete.
20470 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
20471 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
20472 the "w, r" alternative.
20474 2018-05-18 Martin Liska <mliska@suse.cz>
20476 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
20477 * tree-pass.h (make_pass_lower_switch_O0): New function.
20478 * tree-switch-conversion.c (node_has_low_bound): Remove.
20479 (node_has_high_bound): Likewise.
20480 (node_is_bounded): Likewise.
20481 (class pass_lower_switch): Make it a template type and create
20483 (pass_lower_switch::execute): Add template argument.
20484 (make_pass_lower_switch): New function.
20485 (make_pass_lower_switch_O0): New function.
20486 (do_jump_if_equal): Remove.
20487 (emit_case_nodes): Simplify to just handle all 3 cases and leave
20488 all the hard work to tree optimization passes.
20490 2018-05-18 Martin Liska <mliska@suse.cz>
20492 * dbgcnt.c (limit_low): Renamed from limit.
20493 (limit_high): New variable.
20494 (dbg_cnt_is_enabled): Check for upper limit.
20495 (dbg_cnt): Adjust dumping.
20496 (dbg_cnt_set_limit_by_index): Add new argument for high
20498 (dbg_cnt_set_limit_by_name): Likewise.
20499 (dbg_cnt_process_single_pair): Parse new format.
20500 (dbg_cnt_process_opt): Use strtok.
20501 (dbg_cnt_list_all_counters): Remove 'value' and add
20503 * doc/invoke.texi: Document changes.
20505 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
20507 * doc/sourcebuild.texi (scalar_all_fma): Document.
20508 * tree.def (FMA_EXPR): Delete.
20509 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
20510 * internal-fn.c (ternary_direct): New macro.
20511 (expand_ternary_optab_fn): Likewise.
20512 (direct_ternary_optab_supported_p): Likewise.
20513 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
20514 * builtins.c (fold_builtin_fma): Delete.
20515 (fold_builtin_3): Don't call it.
20516 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
20517 * expr.c (expand_expr_real_2): Likewise.
20518 * fold-const.c (operand_equal_p): Likewise.
20519 (fold_ternary_loc): Likewise.
20520 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
20521 * gimple.c (DEFTREECODE): Likewise.
20522 * gimplify.c (gimplify_expr): Likewise.
20523 * optabs-tree.c (optab_for_tree_code): Likewise.
20524 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
20525 * tree-eh.c (operation_could_trap_p): Likewise.
20526 (stmt_could_throw_1_p): Likewise.
20527 * tree-inline.c (estimate_operator_cost): Likewise.
20528 * tree-pretty-print.c (dump_generic_node): Likewise.
20529 (op_code_prio): Likewise.
20530 * tree-ssa-loop-im.c (stmt_cost): Likewise.
20531 * tree-ssa-operands.c (get_expr_operands): Likewise.
20532 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
20533 * fold-const-call.h (fold_fma): Delete.
20534 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
20535 CFN_FNMA and CFN_FNMS.
20536 (fold_fma): Delete.
20537 * genmatch.c (combined_fn): New enum.
20538 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
20539 (commutative_op): New function.
20540 (commutate): Use it. Handle more than 2 operands.
20541 (dt_operand::gen_gimple_expr): Use commutative_op.
20542 (parser::parse_expr): Allow :c to be used with non-binary
20543 operators if the commutative operand is known.
20544 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
20545 CFN_FMS, CFN_FNMA and CFN_FNMS.
20546 (backprop::process_assign_use): Remove FMA_EXPR handling.
20547 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
20548 (gen_hsa_fma): New function.
20549 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
20550 IFN_FNMA and IFN_FNMS.
20551 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
20552 * gimple-fold.h (follow_all_ssa_edges): Declare.
20553 * gimple-fold.c (follow_all_ssa_edges): New function.
20554 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
20555 gimple_build interface and use follow_all_ssa_edges to fold the result.
20556 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
20557 instead of checking for optabs directly.
20558 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
20559 rather than FMA_EXPRs.
20560 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
20561 call to IFN_FMA instead of an FMA_EXPR.
20563 2018-05-17 Jim Wilson <jimw@sifive.com>
20565 * expr.c (do_tablejump): When converting index to Pmode, if we have a
20566 sign extended promoted subreg, and the range does not have the sign bit
20567 set, then do a sign extend.
20569 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
20570 test, check for sign extended subreg and/or constant operands, and
20571 do a sign extend in that case.
20573 2018-05-17 Steve Ellcey <sellcey@cavium.com>
20575 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
20576 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
20578 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
20579 Change logics_shift_reg to logics_shift_imm.
20580 (thunderx2t99_fp_loadpair_basic): Delete.
20581 (thunderx2t99_fp_storepair_basic): Delete.
20582 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
20583 (thunderx2t99_asimd_polynomial): Delete.
20584 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
20585 and neon_fp_mul_d_scalar_q.
20586 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
20587 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
20588 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
20589 (thunderx2t99_asimd_lut): Add missing tbl types.
20590 (thunderx2t99_asimd_ext): Delete.
20591 (thunderx2t99_asimd_load1_1_mult): Delete.
20592 (thunderx2t99_asimd_load1_2_mult): Delete.
20593 (thunderx2t99_asimd_load1_ldp): New.
20594 (thunderx2t99_asimd_load1): New.
20595 (thunderx2t99_asimd_load2): Add missing *load2* types.
20596 (thunderx2t99_asimd_load3): New.
20597 (thunderx2t99_asimd_load4): New.
20598 (thunderx2t99_asimd_store1_1_mult): Delete.
20599 (thunderx2t99_asimd_store1_2_mult): Delete.
20600 (thunderx2t99_asimd_store2_mult): Delete.
20601 (thunderx2t99_asimd_store2_onelane): Delete.
20602 (thunderx2t99_asimd_store_stp): New.
20603 (thunderx2t99_asimd_store1): New.
20604 (thunderx2t99_asimd_store2): New.
20605 (thunderx2t99_asimd_store3): New.
20606 (thunderx2t99_asimd_store4): New.
20608 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
20610 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
20611 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
20613 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
20614 Segher Boessenkool <segher@kernel.crashing.org>
20617 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
20620 2018-05-17 Richard Biener <rguenther@suse.de>
20622 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
20623 for pruning loop and prune defs feeding only already visited PHIs.
20625 2018-05-17 Richard Biener <rguenther@suse.de>
20627 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
20629 2018-05-17 Bin Cheng <bin.cheng@arm.com>
20630 Richard Biener <rguenther@suse.de>
20632 PR tree-optimization/85793
20633 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
20634 for VMAT_ELEMENTWISE.
20636 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
20638 * internal-fn.h (lookup_internal_fn): Declare
20639 * internal-fn.c (lookup_internal_fn): New function.
20640 * gimple.c (gimple_build_call_from_tree): Handle calls to
20641 internal functions.
20642 * gimple-pretty-print.c (dump_gimple_call): Print "." before
20643 internal function names.
20644 * tree-pretty-print.c (dump_generic_node): Likewise.
20645 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
20647 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
20649 * gimple-fold.h (gimple_build): Make the function forms take
20650 combined_fn rather than built_in_function.
20651 (gimple_simplify): Likewise.
20652 * gimple-match-head.c (gimple_simplify): Likewise.
20653 * gimple-fold.c (gimple_build): Likewise.
20654 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
20655 rather than gimple_build_call_internal.
20656 (get_initial_defs_for_reduction): Likewise.
20657 (vect_create_epilog_for_reduction): Likewise.
20658 (vectorizable_live_operation): Likewise.
20660 2018-05-17 Martin Liska <mliska@suse.cz>
20662 * gimple-ssa-sprintf.c (format_directive): Do not use
20663 space in between 'G_' and '('.
20665 2018-05-17 Jakub Jelinek <jakub@redhat.com>
20668 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
20669 even if the mask is not all ones.
20672 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
20674 (ix86_gimple_fold_builtin): Likewise.
20677 * config/i386/i386.c: Include tree-vector-builder.h.
20678 (ix86_vector_shift_count): New function.
20679 (ix86_fold_builtin): Fold shift builtins by scalar count.
20680 (ix86_gimple_fold_builtin): Likewise.
20682 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
20683 _mm512_setzero): New intrinsics.
20685 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
20686 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20688 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
20689 code generation for cases where splatting a value is not useful.
20690 * simplify-rtx.c (simplify_ternary_operation): Simplify
20691 vec_merge across a vec_duplicate and a paradoxical subreg forming
20692 a vector mode to a vec_concat.
20694 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
20696 * config.gcc: Support "goldmont-plus".
20697 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20699 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20700 PROCESSOR_GOLDMONT_PLUS.
20701 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
20702 (processor_target_table): Add "goldmont-plus".
20703 (PTA_GOLDMONT_PLUS): Define.
20704 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
20705 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
20706 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
20707 (fold_builtin_cpu): Add "goldmont-plus".
20708 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
20709 (ix86_option_override_internal): Add "goldmont-plus".
20710 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
20711 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
20712 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
20713 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
20715 2018-05-17 Richard Biener <rguenther@suse.de>
20717 PR tree-optimization/85757
20718 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
20719 remove defs that only feed that PHI from further processing.
20721 2018-05-16 Jim Wilson <jimw@sifive.com>
20723 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
20725 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
20727 2018-05-16 Mark Wielaard <mark@klomp.org>
20729 * dwarf2out.c (count_index_strings): New function.
20730 (output_indirect_strings): Call count_index_strings and generate
20731 header for dwarf_version >= 5.
20733 2018-05-16 Mark Wielaard <mark@klomp.org>
20735 * dwarf2out.c (dwarf_FORM): New function.
20736 (set_indirect_string): Use dwarf_FORM.
20737 (reset_indirect_string): Likewise.
20738 (size_of_die): Likewise.
20739 (value_format): Likewise.
20740 (output_die): Likewise.
20741 (add_skeleton_AT_string): Likewise.
20742 (output_macinfo_op): Likewise.
20743 (index_string): Likewise.
20744 (output_index_string_offset): Likewise.
20745 (output_index_string): Likewise.
20746 (count_index_strings): Likewise.
20748 2018-05-16 Carl Love <cel@us.ibm.com>
20750 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20751 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
20753 2018-05-16 Martin Jambor <mjambor@suse.cz>
20755 * ipa-prop.c (ipa_free_all_edge_args): Remove.
20756 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
20758 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
20760 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
20761 (fnma<mode>4): Likewise.
20762 (fms<mode>4): Likewise.
20763 (fnms<mode>4): Likewise.
20764 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
20765 (aarch64_fnma<mode>4): Likewise.
20766 (aarch64_fms<mode>4): Likewise.
20767 (aarch64_fnms<mode>4): Likewise.
20768 (aarch64_fnmadd<mode>4): Likewise.
20770 2018-05-16 Jason Merrill <jason@redhat.com>
20772 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
20774 2018-05-16 Richard Biener <rguenther@suse.de>
20776 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
20777 (dump_stmt_cost): Declare.
20778 (add_stmt_cost): Dump cost we add.
20779 (add_stmt_costs): New function.
20780 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
20781 No longer exported.
20782 (vect_analyze_stmt): Adjust prototype.
20783 (vectorizable_condition): Likewise.
20784 (vectorizable_live_operation): Likewise.
20785 (vectorizable_reduction): Likewise.
20786 (vectorizable_induction): Likewise.
20787 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
20788 cost vector to pass to vectorizable_ and record afterwards.
20789 (vect_model_reduction_cost): Take cost vector argument and adjust.
20790 (vect_model_induction_cost): Likewise.
20791 (vectorizable_reduction): Likewise.
20792 (vectorizable_induction): Likewise.
20793 (vectorizable_live_operation): Likewise.
20794 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
20795 SLP_TREE_NUMBER_OF_VEC_STMTS.
20796 (vect_analyze_slp_cost_1): Remove.
20797 (vect_analyze_slp_cost): Likewise.
20798 (vect_slp_analyze_node_operations): Take visited args and
20799 a target cost vector. Avoid processing already visited stmt sets.
20800 (vect_slp_analyze_operations): Use a local cost vector to gather
20801 costs and register those of non-discarded instances.
20802 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
20803 (vect_schedule_slp_instance): Remove copying of
20804 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
20806 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
20807 adding cost. Record cost entry location.
20808 (vect_prologue_cost_for_slp_op): Function to compute cost of
20809 a constant or invariant generated for SLP vect in the prologue,
20810 split out from vect_analyze_slp_cost_1.
20811 (vect_model_simple_cost): Make static. Adjust for SLP costing.
20812 (vect_model_promotion_demotion_cost): Likewise.
20813 (vect_model_store_cost): Likewise, make static.
20814 (vect_model_load_cost): Likewise.
20815 (vectorizable_bswap): Add cost vector arg and adjust.
20816 (vectorizable_call): Likewise.
20817 (vectorizable_simd_clone_call): Likewise.
20818 (vectorizable_conversion): Likewise.
20819 (vectorizable_assignment): Likewise.
20820 (vectorizable_shift): Likewise.
20821 (vectorizable_operation): Likewise.
20822 (vectorizable_store): Likewise.
20823 (vectorizable_load): Likewise.
20824 (vectorizable_condition): Likewise.
20825 (vectorizable_comparison): Likewise.
20826 (can_vectorize_live_stmts): Likewise.
20827 (vect_analyze_stmt): Likewise.
20828 (vect_transform_stmt): Adjust calls to vectorizable_*.
20829 * tree-vectorizer.c: Include gimple-pretty-print.h.
20830 (dump_stmt_cost): New function.
20832 2018-05-16 Richard Biener <rguenther@suse.de>
20834 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
20835 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
20836 * tree-ssa-dse.c: Include tree-ssa-loop.h.
20837 (check_name): New callback.
20838 (dse_classify_store): Track cycles via a visited bitmap of PHI
20839 defs and simplify handling of in-loop and across loop dead stores
20840 and properly fail for loop-variant refs. Handle byte-tracking with
20841 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
20844 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
20846 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
20847 (vect_get_mask_type_for_stmt): Likewise.
20848 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
20850 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
20851 to determine the statement's vector type and the vector type that
20852 should be used for calculating nunits. Deal with cases in which
20853 the type has to be deferred.
20854 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
20855 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
20856 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
20857 (vect_determine_vf_for_stmt): New functions, split out from...
20858 (vect_determine_vectorization_factor): ...here.
20859 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
20860 (vect_get_mask_type_for_stmt): New functions, split out from
20861 vect_determine_vectorization_factor.
20863 2018-05-16 Richard Biener <rguenther@suse.de>
20865 * tree-cfg.c (verify_gimple_assign_ternary): Properly
20866 verify the [VEC_]COND_EXPR embedded comparison.
20868 2018-05-15 Martin Sebor <msebor@redhat.com>
20870 PR tree-optimization/85753
20871 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
20872 RECORD_TYPE in addition to ARRAY_TYPE.
20874 2018-05-15 Martin Sebor <msebor@redhat.com>
20876 PR middle-end/85643
20877 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
20879 2018-05-15 Richard Biener <rguenther@suse.de>
20881 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
20882 add by_clobber_p one. Change algorithm to collect all defs
20883 representing uses we need to walk and try reducing them to
20884 a single one before failing.
20885 (dse_dom_walker::dse_optimize_stmt): Adjust.
20887 2018-05-13 Mark Wielaard <mark@klomp.org>
20889 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
20890 (size_of_loc_descr): Likewise.
20891 (output_loc_operands): Likewise.
20892 (output_loc_operands_raw): Likewise.
20893 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
20894 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
20895 (hash_loc_operands): Likewise.
20896 (compare_loc_operands): Likewise.
20898 2018-05-14 Mark Wielaard <mark@klomp.org>
20900 * dwarf2out.c (count_index_addrs): New function.
20901 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
20903 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20905 PR tree-optimization/83648
20906 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
20907 return value as malloc candidate.
20909 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
20912 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
20913 param as true in call to suggest_attribute.
20915 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
20917 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
20918 -mreadonly-in-sdata.
20920 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
20922 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
20924 (aarch64_crypto_aesd_fused): Likewise.
20926 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
20928 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
20929 (movsi_aarch64): Likewise.
20930 (load_pairsi): Likewise.
20931 (load_pairdi): Likewise.
20932 (store_pairsi): Likewise.
20933 (store_pairdi): Likewise.
20934 (load_pairsf): Likewise.
20935 (load_pairdf): Likewise.
20936 (store_pairsf): Likewise.
20937 (store_pairdf): Likewise.
20938 (zero_extend): Likewise.
20939 (trunc): Swap alternatives.
20940 (fcvt_target): Add '?' to prefer w over r.
20942 2018-05-14 Jakub Jelinek <jakub@redhat.com>
20945 * config/i386/i386.md: Disallow non-commutative arithmetics in
20946 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
20947 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
20948 in the peephole2 before it.
20950 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
20952 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
20953 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
20954 (ix86_handle_option): Handle -mcldemote.
20955 * config.gcc: New header.
20956 * config/i386/cldemoteintrin.h: New file.
20957 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
20958 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20960 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20961 OPTION_MASK_ISA_CLDEMOTE.
20962 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
20963 (ix86_valid_target_attribute_inner_p): Ditto.
20964 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
20965 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
20966 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
20967 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
20968 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
20970 * config/i386/i386.opt: Add -mcldemote.
20971 * config/i386/x86intrin.h: New header.
20972 * doc/invoke.texi: Add -mcldemote.
20974 2018-05-14 Richard Biener <rguenther@suse.de>
20976 * doc/match-and-simplify.texi: Adjust :s documentation.
20978 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
20980 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
20981 intended memcpy size.
20982 (REORDER_45): Likewise.
20984 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
20986 * sort.cc: New file.
20987 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
20988 * vec.c (qsort_chk): Use gcc_qsort.
20989 * Makefile.in (OBJS-libcommon): Add sort.o.
20990 (build/sort.o): New target. Use it...
20991 (BUILD_RTL): ... here, and...
20992 (build/gencfn-macros): ... here, and...
20993 (build/genmatch): ... here.
20995 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
20996 Chung-Ju Wu <jasonwucj@gmail.com>
20998 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
20999 * config/nds32/nds32-graywolf.md: New file.
21000 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
21001 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
21003 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
21004 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
21005 * config/nds32/nds32.md (pipeline_model): Add graywolf.
21006 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
21007 * config/nds32/pipelines.md: Include n15 settings.
21009 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21010 Chung-Ju Wu <jasonwucj@gmail.com>
21012 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
21013 * config/nds32/nds32-n13.md: New file.
21014 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
21015 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
21017 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
21018 * config/nds32/nds32.md (pipeline_model): Add n13.
21019 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
21020 * config/nds32/pipelines.md: Include n13 settings.
21022 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
21023 Chung-Ju Wu <jasonwucj@gmail.com>
21025 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
21026 * config/nds32/nds32-n10.md: New file.
21027 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
21028 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
21030 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
21031 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
21032 * config/nds32/nds32.md (pipeline_model): Add n10.
21033 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
21034 * config/nds32/pipelines.md: Include n10 settings.
21036 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
21037 Kito Cheng <kito.cheng@gmail.com>
21038 Chung-Ju Wu <jasonwucj@gmail.com>
21040 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
21041 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21042 Add enum values for DSP extension instructions.
21043 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
21045 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
21046 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
21047 New code iterators.
21048 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
21049 * config/nds32/nds32-dspext.md: New file for DSP implementation.
21050 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
21051 * config/nds32/nds32-intrinsic.md: Likewise.
21052 * config/nds32/nds32_intrinsic.h: Likewise.
21053 * config/nds32/nds32-md-auxiliary.c: Likewise.
21054 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
21055 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
21056 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
21057 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
21058 * config/nds32/nds32-protos.h: New declarations for DSP extension.
21059 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
21060 TYPE_DMAC in switch statement.
21061 * config/nds32/nds32.c: New checking and implementation for DSP
21062 extension instructions.
21063 * config/nds32/nds32.h: Likewise.
21064 * config/nds32/nds32.md: Likewise.
21065 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
21066 * config/nds32/predicates.md: Implement new predicates for DSP
21069 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
21071 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
21072 Reformat alternatives and attributes so it is easier to identify
21073 which constraints/attributes go with which instruction.
21074 (mov<mode>_hardfloat32, FMOVE64): Likewise.
21075 (mov<mode>_softfloat32, FMOVE64): Likewise.
21076 (mov<mode>_hardfloat64, FMOVE64): Likewise.
21077 (mov<mode>_softfloat64, FMOVE64): Likewise.
21079 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
21081 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21083 (Basic PowerPC Built-in Functions): The new name of the
21084 subsection previously known as "PowerPC Built-in Functions".
21085 (Basic PowerPC Built-in Functions Available on all Configurations):
21087 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
21088 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
21089 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
21090 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
21092 2018-05-11 Martin Jambor <mjambor@suse.cz>
21095 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
21098 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
21101 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
21103 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
21105 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
21106 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
21107 (ix86_handle_option): Handle -mwaitpkg.
21108 * config.gcc: New header.
21109 * config/i386/cpuid.h (bit_WAITPKG): New bit.
21110 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
21111 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
21113 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21114 OPTION_MASK_ISA_WAITPKG.
21115 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
21116 (ix86_option_override_internal): Add PTA_WAITPKG.
21117 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
21118 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
21119 IX86_BUILTIN_TPAUSE.
21120 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
21121 __builtin_ia32_umwait and __builtin_ia32_tpause.
21122 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
21123 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
21124 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
21125 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
21126 UNSPECV_TPAUSE): New.
21127 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
21128 * config/i386/i386.opt: Add -mwaitpkg.
21129 * config/i386/waitpkgintrin.h: New file.
21130 * config/i386/x86intrin.h: New header.
21131 * doc/invoke.texi: Add -mwaitpkg.
21133 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
21136 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
21138 (cortex-m0): Use armv6s-m isa.
21139 (cortex-m0plus): Likewise.
21140 (cortex-m1): Likewise.
21141 (cortex-m0.small-multiply): Likewise.
21142 (cortex-m0plus.small-multiply): Likewise.
21143 (cortex-m1.small-multiply): Likewise.
21145 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
21146 Jakub Jelinek <jakub@redhat.com>
21148 PR tree-optimization/85692
21149 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
21150 source permute as well.
21152 2018-05-11 Martin Liska <mliska@suse.cz>
21155 * doc/extend.texi: Document LLVM style format for no_sanitize
21158 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
21160 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
21161 mode_supports_vsx_dform_quad to mode_supports_dq_form.
21162 (mode_supports_vsx_dform_quad): Likewise.
21163 (mode_supports_vmx_dform): Move these functions to be next to the
21164 other mode_supports functions.
21165 (mode_supports_dq_form): Likewise.
21166 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
21167 mode_supports_dq_form.
21168 (reg_offset_addressing_ok_p): Likewise.
21169 (offsettable_ok_by_alignment): Likewise.
21170 (rs6000_legitimate_offset_address_p): Likewise.
21171 (legitimate_lo_sum_address_p): Likewise.
21172 (rs6000_legitimize_address): Likewise.
21173 (rs6000_legitimize_reload_address): Likewise.
21174 (rs6000_secondary_reload_inner): Likewise.
21175 (rs6000_preferred_reload_class): Likewise.
21176 (rs6000_output_move_128bit): Likewise.
21178 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
21180 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
21181 Generate SImode target register for null target.
21182 <case IX86_BUILTIN_XGETBV>: Ditto.
21183 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
21184 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
21186 2018-05-10 Carl Love <cel@us.ibm.com>
21188 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
21189 dcbtt and dcbtstt if operands[2] is 0.
21191 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
21194 * config/i386/sse.md (usadv64qi): New expander.
21196 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
21198 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
21199 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
21200 -maltivec=be support.
21201 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
21202 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
21203 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
21204 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
21205 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
21206 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
21207 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
21208 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
21209 altivec_vsumsws): Adjust.
21210 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
21211 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
21212 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
21214 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
21215 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
21216 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
21217 (altivec_lve<VI_char>x): Delete expand.
21218 (*altivec_lve<VI_char>x_internal): Rename to...
21219 (altivec_lve<VI_char>x): ... this.
21220 (altivec_lvxl_<mode>): Delete expand.
21221 (*altivec_lvxl_<mode>_internal): Rename to ...
21222 (altivec_lvxl_<mode>): ... this.
21223 (altivec_stvxl_<mode>): Delete expand.
21224 (*altivec_stvxl_<mode>_internal): Rename to ...
21225 (altivec_stvxl_<mode>): ... this.
21226 (altivec_stve<VI_char>x): Delete expand.
21227 (*altivec_stve<VI_char>x_internal): Rename to ...
21228 (altivec_stve<VI_char>x): ... this.
21229 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
21230 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
21231 reduc_plus_scal_<mode>): Adjust.
21232 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
21234 (rs6000_cpu_cpp_builtins): Adjust.
21235 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
21236 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
21237 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
21238 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
21239 -maltivec=be support.
21240 (rs6000_split_vec_extract_var): Adjust.
21241 (rs6000_split_v4si_init): Adjust.
21242 (swap_selector_for_mode): Delete.
21243 (altivec_expand_lvx_be, altivec_expand_stvx_be,
21244 altivec_expand_stvex_be): Delete.
21245 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
21246 -maltivec=be support.
21247 (rs6000_gimple_fold_builtin): Ditto.
21248 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
21250 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
21251 (TARGET_DIRECT_MOVE_64BIT): Adjust.
21252 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
21253 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
21254 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
21255 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
21256 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
21257 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
21258 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
21259 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
21260 anonymous split): Adjust.
21261 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
21262 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
21264 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
21266 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
21267 when --with-gxx-include-dir is also specified.
21268 * configure: Regenerate.
21270 2018-05-09 Jim Wilson <jimw@sifive.com>
21273 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
21274 * config/riscv/t-withmultilib: New.
21275 * config/riscv/withmultilib.h: New.
21276 * doc/install.texi: Document RISC-V --with-multilib-list support.
21278 2018-05-09 Richard Biener <rguenther@suse.de>
21280 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
21282 (vect_bb_vectorization_profitable_p): Adjust. Compute
21283 actual scalar cost using the cost vector and the add_stmt_cost
21286 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21288 PR rtl-optimization/85645
21289 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
21290 in the REG_CFA_REGISTER note for LR, don't leave it empty.
21292 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21294 PR rtl-optimization/85645
21295 * shrink-wrap.c (spread_components): Return a boolean saying if
21296 anything was changed.
21297 (try_shrink_wrapping_separate): Iterate spread_components until
21298 nothing changes anymore.
21300 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21302 PR rtl-optimization/85645
21303 * regrename.c (build_def_use): Also kill the chains that include the
21304 destination of a REG_CFA_REGISTER note.
21306 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
21308 PR rtl-optimization/85645
21309 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
21310 insn that has a REG_CFA_REGISTER note.
21312 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
21314 * cfgexpand.c (expand_clobber): New function.
21315 (expand_gimple_stmt_1): Use it.
21316 * tree-vect-stmts.c (vect_clobber_variable): New function,
21318 (vectorizable_simd_clone_call): ...here.
21319 (vectorizable_store): Emit a clobber either side of an
21320 IFN_STORE_LANES sequence.
21321 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
21323 2018-05-09 Tom de Vries <tom@codesourcery.com>
21326 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
21327 (define_insn "trap_if_false"): Add exit after trap.
21329 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
21331 PR rtl-optimization/85638
21332 * bb-reorder.c: Include common/common-target.h.
21333 (create_forwarder_block): New function extracted from...
21334 (fix_up_crossing_landing_pad): ...here. Rename into...
21335 (dw2_fix_up_crossing_landing_pad): ...this.
21336 (sjlj_fix_up_crossing_landing_pad): New function.
21337 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
21338 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
21339 from both partitions and exit the loop after one iteration.
21341 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
21344 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21346 (Basic PowerPC Built-in Functions): The new name of the
21347 subsection previously known as "PowerPC Built-in Functions".
21348 (Basic PowerPC Built-in Functions Available on all Configurations):
21350 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21352 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21354 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21356 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21359 2018-05-08 Jim Wilson <jimw@sifive.com>
21361 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
21362 (LD_EMUL_SUFFIX): New.
21363 (LINK_SPEC): Use it.
21365 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
21367 * doc/extend.texi (PowerPC Built-in Functions): Rename this
21369 (Basic PowerPC Built-in Functions): The new name of the
21370 subsection previously known as "PowerPC Built-in Functions".
21371 (Basic PowerPC Built-in Functions Available on all Configurations):
21373 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21375 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21377 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21379 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21382 2018-05-08 Jakub Jelinek <jakub@redhat.com>
21385 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
21386 after cmpelim optimization.
21388 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
21390 * config.gcc: Support "goldmont".
21391 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
21392 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21393 PROCESSOR_GOLDMONT.
21394 * config/i386/i386.c (m_GOLDMONT): Define.
21395 (processor_target_table): Add "goldmont".
21396 (PTA_GOLDMONT): Define.
21397 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
21398 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
21399 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
21400 (fold_builtin_cpu): Add "goldmont".
21401 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
21402 (ix86_option_override_internal): Add "goldmont".
21403 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
21404 (processor_type): Add PROCESSOR_GOLDMONT.
21405 * config/i386/i386.md: Add CPU "glm".
21406 * config/i386/glm.md: New file.
21407 * config/i386/x86-tune.def: Add m_GOLDMONT.
21408 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
21410 2018-05-08 Jakub Jelinek <jakub@redhat.com>
21413 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
21415 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
21416 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
21417 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
21420 * config/i386/i386.c (ix86_fold_builtin): Handle
21421 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
21424 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
21425 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
21427 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
21430 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
21431 (check_arch): Likewise.
21432 (check_fpu): Return the result rather than printing it.
21433 (end arch): Fix operator precedence.
21434 (end cpu): Likewise.
21435 (END): Print the result from check_fpu.
21437 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
21438 Alan Hayward <alan.hayward@arm.com>
21439 David Sherwood <david.sherwood@arm.com>
21441 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
21442 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
21443 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
21444 (*fcmuo<mode>_and): New patterns.
21446 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
21448 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
21449 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
21450 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
21451 (cmp_op, sve_imm_con): New code attributes.
21452 (SVE_COND_INT_CMP, imm_con): Delete.
21453 (cmp_op): Remove above unspecs from int attribute.
21454 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
21456 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
21457 comparison-specific unspecs.
21458 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
21459 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
21460 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
21461 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
21462 (*vec_fcm<cmp_op><mode>): Rename to...
21463 (*fcm<cmp_op><mode>): ...this and adjust likewise.
21464 (*vec_fcmuo<mode>): Rename to...
21465 (*fcmuo<mode>): ...this and adjust likewise.
21466 (*pred_fcm<cmp_op><mode>): New pattern.
21467 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
21468 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
21470 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
21472 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
21473 (aarch64_emit_sve_predicated_cond): New function.
21474 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
21475 (aarch64_emit_unspec_cond_or): Replace with...
21476 (aarch64_emit_sve_or_conds): ...this new function. Use
21477 aarch64_emit_sve_ptrue_op for the individual comparisons and
21478 aarch64_emit_binop to OR them together.
21479 (aarch64_emit_inverted_unspec_cond): Replace with...
21480 (aarch64_emit_sve_inverted_cond): ...this new function. Use
21481 aarch64_emit_sve_ptrue_op for the comparison and
21482 aarch64_emit_unop to invert the result.
21483 (aarch64_expand_sve_vec_cmp_float): Update after the above
21484 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
21486 2018-05-07 Nathan Sidwell <nathan@acm.org>
21488 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
21489 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
21490 (Backwards Compatibility): Likewise.
21492 2018-05-07 Luis Machado <luis.machado@linaro.org>
21496 2018-05-07 Luis Machado <luis.machado@linaro.org>
21498 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21499 <prefetch_dynamic_strides>: New const bool field.
21500 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21501 prefetch_dynamic_strides.
21502 (exynosm1_prefetch_tune): Likewise.
21503 (thunderxt88_prefetch_tune): Likewise.
21504 (thunderx_prefetch_tune): Likewise.
21505 (thunderx2t99_prefetch_tune): Likewise.
21506 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21508 (aarch64_override_options_internal): Update to set
21509 PARAM_PREFETCH_DYNAMIC_STRIDES.
21510 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21511 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21512 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21513 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21514 prefetch-dynamic-strides setting.
21516 2018-05-07 Luis Machado <luis.machado@linaro.org>
21518 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21519 <minimum_stride>: New const int field.
21520 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21521 minimum_stride field.
21522 (exynosm1_prefetch_tune): Likewise.
21523 (thunderxt88_prefetch_tune): Likewise.
21524 (thunderx_prefetch_tune): Likewise.
21525 (thunderx2t99_prefetch_tune): Likewise.
21526 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21527 (aarch64_override_options_internal): Update to set
21528 PARAM_PREFETCH_MINIMUM_STRIDE.
21529 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21530 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21531 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21532 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21533 stride is constant and is below the minimum stride threshold.
21535 2018-05-07 Luis Machado <luis.machado@linaro.org>
21537 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
21540 2018-05-07 Luis Machado <luis.machado@linaro.org>
21542 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21543 <prefetch_dynamic_strides>: New const bool field.
21544 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21545 prefetch_dynamic_strides.
21546 (exynosm1_prefetch_tune): Likewise.
21547 (thunderxt88_prefetch_tune): Likewise.
21548 (thunderx_prefetch_tune): Likewise.
21549 (thunderx2t99_prefetch_tune): Likewise.
21550 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21552 (aarch64_override_options_internal): Update to set
21553 PARAM_PREFETCH_DYNAMIC_STRIDES.
21554 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21555 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21556 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21557 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21558 prefetch-dynamic-strides setting.
21560 2018-05-07 Luis Machado <luis.machado@linaro.org>
21562 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21563 <minimum_stride>: New const int field.
21564 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21565 minimum_stride field.
21566 (exynosm1_prefetch_tune): Likewise.
21567 (thunderxt88_prefetch_tune): Likewise.
21568 (thunderx_prefetch_tune): Likewise.
21569 (thunderx2t99_prefetch_tune): Likewise.
21570 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21571 (aarch64_override_options_internal): Update to set
21572 PARAM_PREFETCH_MINIMUM_STRIDE.
21573 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21574 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21575 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21576 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21577 stride is constant and is below the minimum stride threshold.
21579 2018-05-06 Jakub Jelinek <jakub@redhat.com>
21582 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
21583 the type is addressable. Don't force op into register if it has
21586 2018-05-05 Roland McGrath <mcgrathr@google.com>
21589 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
21590 any section for which we don't know a specific type it should have,
21591 regardless of name. Previously this was done only for the exact
21592 names ".init_array", ".fini_array", and ".preinit_array".
21593 (default_elf_asm_named_section): Add comment about
21594 relationship with default_section_type_flags and SECTION_NOTYPE.
21595 (get_section): Don't consider it a type conflict if one side has
21596 SECTION_NOTYPE and the other doesn't, as long as neither has the
21597 SECTION_BSS et al used in the default_section_type_flags logic.
21599 2018-05-05 Tom de Vries <tom@codesourcery.com>
21602 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
21603 (workaround_barsyncs): New function.
21604 (nvptx_reorg): Use workaround_barsyncs.
21605 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21606 (define_expand "nvptx_membar_cta"): New define_expand.
21607 (define_insn "*nvptx_membar_cta"): New insn.
21609 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
21611 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
21612 To improve optimization opportunities.
21613 * builtin-types.def: The new needed builtin types for the above.
21615 2018-05-04 Richard Biener <rguenther@suse.de>
21617 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
21618 * gimple-ssa-store-merging.c
21619 (imm_store_chain_info::output_merged_store): Remove redundant create,
21620 release split_store vector contents on failure.
21621 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
21622 scalar stmt vector on cache hit.
21624 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
21626 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
21628 * config.gcc (powerpc-xilinx-eabi*): Remove.
21629 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
21631 (fusion_addis_mem_combo_load): Ditto.
21632 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
21634 (rs6000_cpu_cpp_builtins): Ditto.
21635 * config/rs6000/rs6000-linux.c
21636 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
21637 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
21638 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
21640 (rs6000_setup_reg_addr_masks): Ditto.
21641 (rs6000_init_hard_regno_mode_ok): Ditto.
21642 (rs6000_option_override_internal): Ditto.
21643 (legitimate_lo_sum_address_p): Ditto.
21644 (rs6000_legitimize_address): Ditto.
21645 (rs6000_legitimize_reload_address): Ditto.
21646 (rs6000_legitimate_address_p): Ditto.
21647 (abi_v4_pass_in_fpr): Ditto.
21648 (setup_incoming_varargs): Ditto.
21649 (rs6000_gimplify_va_arg): Ditto.
21650 (rs6000_split_multireg_move): Ditto.
21651 (rs6000_savres_strategy): Ditto.
21652 (rs6000_emit_prologue_components): Ditto.
21653 (rs6000_emit_epilogue_components): Ditto.
21654 (rs6000_emit_prologue): Ditto.
21655 (rs6000_emit_epilogue): Ditto.
21656 (rs6000_elf_file_end): Ditto.
21657 (rs6000_function_value): Ditto.
21658 (rs6000_libcall_value): Ditto.
21659 * config/rs6000/rs6000.h: Ditto.
21660 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
21661 (TARGET_MINMAX): ... this. New.
21662 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
21663 * config/rs6000/rs6000.md: Remove Xilinx FP support.
21664 (*movsi_internal1_single): Delete.
21665 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
21666 mfpu=, mxilinx-fpu): Delete.
21667 * config/rs6000/singlefp.h: Delete.
21668 * config/rs6000/sysv4.h: Remove Xilinx FP support.
21669 * config/rs6000/t-rs6000: Ditto.
21670 * config/rs6000/t-xilinx: Delete.
21671 * config/rs6000/titan.md: Adjust for fp_type removal.
21672 * config/rs6000/vsx.md: Remove Xilinx FP support.
21673 (VStype_simple): Delete.
21674 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
21675 * config/rs6000/xfpu.h: Delete.
21676 * config/rs6000/xfpu.md: Delete.
21677 * config/rs6000/xilinx.h: Delete.
21678 * config/rs6000/xilinx.opt: Delete.
21679 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
21680 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
21682 2018-05-04 Tom de Vries <tom@codesourcery.com>
21685 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
21688 2018-05-04 Richard Biener <rguenther@suse.de>
21690 PR middle-end/85627
21691 * tree-complex.c (update_complex_assignment): We are always in SSA form.
21692 (expand_complex_div_wide): Likewise.
21693 (expand_complex_operations_1): Likewise.
21694 (expand_complex_libcall): Preserve EH info of the original stmt.
21695 (tree_lower_complex): Handle removed blocks.
21696 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
21697 on complex multiplication and division libcall builtins.
21699 2018-05-04 Richard Biener <rguenther@suse.de>
21701 PR middle-end/85574
21702 * fold-const.c (negate_expr_p): Restrict negation of operand
21703 zero of a division to when we know that can happen without
21705 (fold_negate_expr_1): Likewise.
21707 2018-05-04 Jakub Jelinek <jakub@redhat.com>
21710 * real.h (real_nextafter): Declare.
21711 * real.c (real_nextafter): New function.
21712 * fold-const-call.c (fold_const_nextafter): New function.
21713 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
21714 CASE_CFN_NEXTTOWARD.
21715 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
21716 even when arg1_mode is different from arg0_mode.
21718 2018-05-03 Nathan Sidwell <nathan@acm.org>
21720 * doc/extend.texi (Deprecated Features): Remove
21721 -ffriend-injection.
21722 (Backwards Compatibility): Likewise.
21723 * doc/invoke.texi (C++ Language Options): Likewise.
21724 (C++ Dialect Options): Likewise.
21726 2018-05-03 Jakub Jelinek <jakub@redhat.com>
21729 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
21730 _mm512_mask_mullox_epi64): New intrinsics.
21732 2018-05-03 Tom de Vries <tom@codesourcery.com>
21735 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21736 dump files): Add offload-tree.
21738 2018-05-03 Richard Biener <rguenther@suse.de>
21740 PR tree-optimization/85615
21741 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
21742 to loops not nested in BBs loop father to avoid creating multi-entry
21745 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
21747 PR tree-optimization/70291
21748 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
21749 arguments. Change return type to tree. Emit libcall as a new
21750 statement rather than replacing existing one when inplace_p is true.
21751 (expand_complex_multiplication_components): New function.
21752 (expand_complex_multiplication): Expand floating-point complex
21753 multiplication using the above.
21754 (expand_complex_division): Rename inner_type parameter to type.
21755 Update expand_complex_libcall call-site.
21756 (expand_complex_operations_1): Update expand_complex_multiplication
21757 and expand_complex_division call-sites.
21759 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21762 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21763 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21764 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
21765 the highest significant bit of the shift count mask is clear. In
21766 check whether and[sq]i3 is needed verify that all significant bits
21767 of the shift count other than the highest are set.
21769 2018-05-02 Tom de Vries <tom@codesourcery.com>
21772 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
21773 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
21774 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
21775 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
21776 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
21777 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
21778 __builtin_goacc_parlevel_size.
21780 2018-05-02 Richard Biener <rguenther@suse.de>
21782 PR tree-optimization/85597
21783 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
21784 do not use split vect_get_vec_defs call but call vect_get_slp_defs
21787 2018-05-02 Tom de Vries <tom@codesourcery.com>
21790 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21791 dump files): Add ltrans-tree.
21793 2018-05-02 Tom de Vries <tom@codesourcery.com>
21796 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21797 dump files): Add wpa-ipa.
21799 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
21801 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
21802 powerpc*-*-linux*paired* target.
21803 * config/rs6000/750cl.h: Delete.
21804 * config/rs6000/paired.h: Delete.
21805 * config/rs6000/paired.md: Delete.
21806 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
21808 * config/rs6000/rs6000-builtin.def: Remove paired float support.
21809 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
21810 comment. Remove paired float support.
21811 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
21812 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
21814 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
21815 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
21817 * config/rs6000/rs6000.c: Remove paired float support.
21818 (paired_expand_vector_init, paired_expand_vector_move,
21819 paired_emit_vector_compare, paired_emit_vector_cond_expr,
21820 (paired_expand_lv_builtin, paired_expand_stv_builtin,
21821 paired_expand_builtin, paired_expand_predicate_builtin,
21822 paired_init_builtins): Delete.
21823 * config/rs6000/rs6000.h: Remove paired float support.
21824 * config/rs6000/rs6000.md: Remove paired float support.
21825 (move_from_CR_ov_bit): Delete.
21826 * config/rs6000/rs6000.opt (mpaired): Delete.
21827 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
21828 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
21830 2018-05-02 Richard Biener <rguenther@suse.de>
21832 PR middle-end/85567
21833 * gimplify.c (gimplify_save_expr): When in SSA form allow
21834 SAVE_EXPRs to compute to SSA vars.
21836 2018-05-02 Jakub Jelinek <jakub@redhat.com>
21839 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21840 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21841 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
21842 clobber operands[2], instead use a new pseudo. Formatting fixes.
21844 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
21846 PR tree-optimization/85586
21847 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
21848 exit early for statements in the same group if the accesses are
21851 2018-05-02 Tom de Vries <tom@codesourcery.com>
21854 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
21857 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
21859 PR tree-optimization/85143
21860 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
21862 2018-05-01 Tom de Vries <tom@codesourcery.com>
21865 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
21866 not found" error message.
21868 2018-05-01 Tom de Vries <tom@codesourcery.com>
21871 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
21872 * vec.c (test_ordered_remove_if): New function.
21873 (vec_c_tests): Call test_ordered_remove_if.
21874 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
21875 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
21876 * tree-vect-patterns.c (vect_pattern_recog_1): Use
21877 VEC_ORDERED_REMOVE_IF.
21879 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
21881 PR tree-optimization/82665
21882 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
21883 pointer subtraction where arguments come from a memchr call.
21885 2018-05-01 Jakub Jelinek <jakub@redhat.com>
21887 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
21888 --push-state --as-needed and --pop-state instead of --as-needed and
21889 --no-as-needed if ld supports it.
21890 * configure: Regenerated.
21893 * doc/install.texi2html: Replace _002d with - and _002a with * in
21894 generated html files using sed.
21896 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21899 * gcc-rich-location.c (blank_line_before_p): New function.
21900 (use_new_line): New function.
21901 (gcc_rich_location::add_fixit_insert_formatted): New function.
21902 * gcc-rich-location.h
21903 (gcc_rich_location::add_fixit_insert_formatted): New function.
21905 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21907 * selftest.c (assert_streq): Rename "expected" and "actual" to
21908 "val1" and "val2". Extend NULL-handling to cover both inputs
21909 symmetrically, while still requiring both to be non-NULL for a pass.
21910 * selftest.h (assert_streq): Rename "expected" and "actual" to
21912 (ASSERT_EQ): Likewise.
21913 (ASSERT_EQ_AT): Likewise.
21914 (ASSERT_KNOWN_EQ): Likewise.
21915 (ASSERT_KNOWN_EQ_AT): Likewise.
21916 (ASSERT_NE): Likewise.
21917 (ASSERT_MAYBE_NE): Likewise.
21918 (ASSERT_MAYBE_NE_AT): Likewise.
21919 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
21920 the assertion to pass.
21921 (ASSERT_STREQ_AT): Likewise.
21923 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
21925 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
21926 interaction with -pie.
21928 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21930 * selftest.h: Fix alphabetization of per-source-file selftest
21933 2018-04-30 Jason Merrill <jason@redhat.com>
21935 PR c++/61982 - dead stores to destroyed objects.
21936 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
21939 2018-04-30 Jason Merrill <jason@redhat.com>
21941 * tree.c (build_clobber): New.
21942 * tree.h: Declare it.
21943 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
21945 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21947 * diagnostic-show-locus.c (layout::layout): Update for
21948 location_get_source_line returning a char_span.
21949 (struct char_span): Move to input.h.
21950 (struct correction): Update for fields in char_span becoming
21952 (struct source_line): Update for location_get_source_line
21953 returning a char_span.
21954 (layout::print_line): Likewise.
21955 * edit-context.c (edited_file::print_content): Likewise.
21956 (edited_file::print_diff_hunk): Likewise.
21957 (edited_file::print_run_of_changed_lines): Likewise.
21958 (edited_file::get_num_lines): Likewise.
21959 (edited_line::edited_line): Likewise.
21960 * final.c (asm_show_source): Likewise.
21961 * input.c (location_get_source_line): Convert return type
21962 from const char * to char_span, losing the final "line_len"
21964 (dump_location_info): Update for the above.
21965 (get_substring_ranges_for_loc): Likewise. Use a char_span
21966 when handling the literal within the line.
21967 (test_reading_source_line): Update for location_get_source_line
21968 returning a char_span.
21969 * input.h (class char_span): Move here from
21970 diagnostic-show-locus.c, converting from a struct to a class.
21971 Make data members private.
21972 (char_span::operator bool): New.
21973 (char_span::length): New.
21974 (char_span::get_buffer): New.
21975 (char_span::operator[]): New.
21976 (char_span::subspan): Make const.
21977 (char_span::xstrdup): New.
21978 (location_get_source_line): Convert return type from const char *
21979 to char_span, losing the final "line_size" param.
21981 2018-04-30 Jan Hubicka <jh@suse.cz>
21983 * lto-wrapper.c (ltrans_priorities): New static var.
21984 (cmp_priority): New.
21985 (run_gcc): Read priorities and if doing parallel build order
21986 the Makefile by them.
21988 2018-04-30 David Malcolm <dmalcolm@redhat.com>
21990 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
21992 2018-04-30 Richard Biener <rguenther@suse.de>
21994 * tree-cfg.c (verify_address): Remove base argument, add
21995 flag whether to check TREE_ADDRESSABLE and do that.
21996 (verify_expr): Remove.
21997 (verify_types_in_gimple_reference): Add pieces from verify_expr.
21998 (verify_gimple_assign_single): Likewise.
21999 (verify_gimple_switch): Likewise.
22000 (verify_expr_location_1): Dereference tp once. Add (disabled)
22001 piece from verify_expr.
22002 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
22004 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22006 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
22008 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22010 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
22011 (small_data_pattern): Likewise.
22012 (arc_rewrite_small_data): Likewise.
22013 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
22014 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
22015 (get_symbol_alignment): New function.
22016 (legitimate_small_data_address_p): Likewise.
22017 (legitimate_scaled_address): Update, call
22018 legitimate_small_data_address_p.
22019 (output_sdata): New static variable.
22020 (arc_print_operand): Update how we handle small data operands.
22021 (arc_print_operand_address): Likewise.
22022 (arc_legitimate_address_p): Update, use
22023 legitimate_small_data_address_p.
22024 (arc_rewrite_small_data_p): Remove.
22025 (arc_rewrite_small_data_1): Likewise.
22026 (arc_rewrite_small_data): Likewise.
22027 (small_data_pattern): Likewise.
22028 (compact_sda_memory_operand): Update to use
22029 legitimate_small_data_address_p and get_symbol_alignment.
22030 (prepare_move_operands): Don't rewite sdata pattern.
22031 (prepare_extend_operands): Remove.
22032 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
22034 (zero_extendqisi2): Likewise.
22035 (zero_extendhisi2): Likewise.
22036 (extendqihi2): Likewise.
22037 (extendqisi2): Likewise.
22038 (extendhisi2): Likewise.
22039 (addsi3): Likewise.
22040 (subsi3): Likewise.
22041 (andsi3): Likewise.
22042 * config/arc/constraints.md (Usd): Change it to memory constraint.
22044 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
22046 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
22047 as source of std instructions.
22048 * config/arc/arc.md (movsi_insn): Update pattern predicate to
22049 allow 6-bit constants as source for store instructions.
22050 (movdi_insn): Update instruction pattern to allow 6-bit constants
22051 as source for store instructions.
22053 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
22055 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
22057 2018-04-30 Nathan Sidwell <nathan@acm.org>
22058 Sandra Loosemore <sandra@codesourcery.com>
22060 * dumpfile.c (dump_open): Allow '-' for stdout.
22061 * doc/invoke.texi (Developer Options): Document dump filename
22062 determination early. Document stdin/stdout selection.
22064 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
22066 Microblaze Target: PIC data text relative
22068 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
22069 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
22071 * config/microblaze/microblaze.h (microblaze_constant_address_p):
22072 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
22073 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
22074 New addressing mode for data-text relative position indepenedent code.
22075 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
22076 'ADDRESS_SYMBOLIC_TXT_REL'.
22077 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
22078 (microblaze_legitimate_pic_operand): Exclude function calls from
22079 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
22080 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
22082 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22083 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
22084 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
22085 for 'address + offset'.
22086 (microblaze_expand_prologue): Add new function prologue call for
22088 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
22089 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
22090 table in case of TARGET_PIC_DATA_TEXT_REL.
22091 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
22092 * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
22093 Add new macros 'UNSPEC_TEXT',
22094 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
22095 + exclude function calls from 'UNSPEC_PLT' in case of data text
22097 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22098 new target hook for generating address diff vector tables in case of
22100 * doc/tm.texi : Regenerate.
22101 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
22102 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
22103 of addr diff vector generation.
22104 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
22105 target hook definition.
22106 * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
22107 Add default function for generate_pic_addr_diff_vec -> flag_pic.
22108 * doc/invoke.texi (Add new pic option): Add new microblaze pic
22109 option for data text relative.
22111 2018-04-30 Richard Biener <rguenther@suse.de>
22113 * tree-chrec.h (evolution_function_is_constant_p): Remove
22115 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
22117 2018-04-30 Richard Biener <rguenther@suse.de>
22120 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
22122 2018-04-30 Richard Biener <rguenther@suse.de>
22124 PR tree-optimization/28364
22125 PR tree-optimization/85275
22126 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
22127 copying first exit test.
22129 2018-04-28 Mark Wielaard <mark@klomp.org>
22131 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
22132 dwarf_version >= 5.
22133 (dwarf_AT): Handle DW_AT_addr_base.
22134 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
22136 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
22139 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
22140 (*ashl<dwi>3_doubleword_mask_1): Ditto.
22141 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
22142 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
22144 2018-04-28 Richard Biener <rguenther@suse.de>
22146 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
22147 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
22148 to reflect use. Only add interesting stmts.
22150 2018-04-27 Martin Jambor <mjambor@suse.cz>
22153 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
22154 the jump function allows for passing through aggregate values.
22156 2018-04-27 David Malcolm <dmalcolm@redhat.com>
22158 * input.h (in_system_header_at): Convert from macro to inline
22160 (from_macro_expansion_at): Likewise.
22161 (from_macro_definition_at): Likewise.
22163 2018-04-27 Jeff Law <law@redhat.com>
22165 * config.gcc: Mark tile* targets as deprecated/obsolete.
22167 2018-04-27 Richard Biener <rguenther@suse.de>
22169 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
22172 2018-04-27 Richard Biener <rguenther@suse.de>
22174 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
22176 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
22178 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
22179 with Yd constraint. Set "preferred_for_speed" attribute from
22180 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
22181 with Yd constraint.
22182 (*movdi_internal): Ditto.
22183 (movti_interunit splitters): Remove
22184 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
22185 (movdi_interunit splitters): Ditto.
22186 * config/i386/constraints.md (Ye): Remove.
22187 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
22189 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22192 * config/aarch64/constraints.md (Usg): Limit to 31.
22193 (Usj): Limit to 63.
22195 2018-04-27 Jakub Jelinek <jakub@redhat.com>
22197 PR tree-optimization/85529
22198 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
22199 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
22200 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
22201 zero extension or masking of the MSB bit.
22202 (optimize_range_tests): Add FIRST_BB argument, pass it through
22203 to optimize_range_tests_var_bound.
22204 (maybe_optimize_range_tests, reassociate_bb): Adjust
22205 optimize_range_tests callers.
22207 2018-04-26 Richard Biener <rguenther@suse.de>
22208 Jakub Jelinek <jakub@redhat.com>
22210 * cgraph.h (symbol_table): Just declare debug method here.
22211 * symtab.c (symbol_table::debug): Define.
22213 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
22215 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
22217 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
22219 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
22220 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
22221 (*movdi_internal): Substitute Yi and Yj constraint with x
22222 and Ym and Yn constraint with y constraint. Update "isa"
22223 attribute and set "preferred_for_speed" attribute from
22224 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
22225 (*movsi_internal): Ditto.
22226 (*movdf_internal): Ditto.
22227 (*movsf_internal): Ditto.
22228 (*zero_extendsidi2): Ditto.
22229 * config/i386/sse.md (vec_set<mode>_0): Ditto.
22230 (sse2_loadld): Ditto.
22231 (*vec_extract<ssevecmodelower>_0): Ditto.
22232 (*vec_extractv4si_0_zext_sse4): Ditto.
22233 (vec_concatv2di): Ditto.
22234 (*vec_dup<mode>): Ditto.
22235 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
22236 * config/i386/constraints.md (Yi): Remove.
22241 2018-04-26 Nathan Sidwell <nathan@acm.org>
22243 * dumpfile.c (dump_open): New.
22244 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
22245 (dump_finish): Detect stdio/stderr by value not name.
22247 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
22249 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
22251 2018-04-26 Tom de Vries <tom@codesourcery.com>
22254 * config/nvptx/nvptx.c (verify_neutering_jumps)
22255 (verify_neutering_labels): New function
22256 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
22258 2018-04-26 Tom de Vries <tom@codesourcery.com>
22261 * config/nvptx/nvptx.c (needs_neutering_p): New function.
22262 (nvptx_single): Use needs_neutering_p to skip over insns that do not
22265 2018-04-26 Richard Biener <rguenther@suse.de>
22266 Tom de Vries <tom@codesourcery.com>
22269 * lto-streamer-out.c (output_function): Fixup loops if required to match
22270 discovery done in the reader.
22272 2018-04-26 Richard Biener <rguenther@suse.de>
22274 PR tree-optimization/85116
22275 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
22276 have a loop exit from the single latch predecessor. Remove
22277 case of header with just condition.
22278 (ch_base::copy_headers): Exclude infinite loops from any
22280 (pass_ch::execute): Record exits.
22282 2018-04-26 Richard Biener <rguenther@suse.de>
22284 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
22285 prologue cost vector and pass it to vect_get_load_cost.
22286 (vect_get_peeling_costs_all_drs): Likewise.
22287 (vect_peeling_hash_get_lowest_cost): Likewise.
22288 (vect_enhance_data_refs_alignment): Likewise.
22290 2018-04-26 Richard Biener <rguenther@suse.de>
22292 PR middle-end/85450
22293 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
22294 checking of integer<->pointer conversions.
22295 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
22296 sign-/zero-extending pointer types.
22297 (expand_omp_for_static_chunk): Likewise.
22299 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
22300 Jean Lee <xiaoyur347@gmail.com>
22302 * config/mips/mips.c (mips_asan_shadow_offset): New function.
22303 (TARGET_ASAN_SHADOW_OFFSET): Define.
22304 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
22305 true for -fsanitize=address.
22307 2018-04-25 Mark Wielaard <mark@klomp.org>
22309 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
22312 2018-04-25 Jakub Jelinek <jakub@redhat.com>
22314 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
22315 than "alu", remove explicit "memory" and "imm_disp" attributes.
22316 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
22318 PR middle-end/85414
22319 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
22320 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
22321 gen_lowpart_no_emit.
22323 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
22326 * config/i386/i386.c (ix86_expand_builtin): Change memory
22327 operand to XI, extend p0 to Pmode.
22328 * config/i386/i386.md: Change unspec volatile and operand
22329 1 mode to XI, change operand 0 mode to P.
22331 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22333 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
22334 GET_MODE_MASK before any checking.
22335 (nds32_can_use_bset_p): Likewise.
22336 (nds32_can_use_btgl_p): Likewise.
22338 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22340 * config/nds32/nds32-doubleword.md: New define_split pattern for
22341 illegal register number.
22343 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22345 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
22347 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
22349 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
22351 2018-04-25 Richard Biener <rguenther@suse.de>
22353 * lto-streamer.h (LTO_major_version): Bump to 8.
22355 2018-04-25 Jakub Jelinek <jakub@redhat.com>
22357 * BASE-VER: Set to 9.0.0.
22359 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
22361 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
22362 in __abskf2 and __powikf2.
22364 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
22367 * config/aarch64/constraints.md (Usg, Usj): New constraints.
22368 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
22369 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
22370 Use the above on operand 2. Reindent.
22371 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
22373 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
22376 * common/config/i386/i386-common.c (ix86_handle_option): Don't
22378 * config/i386/i386.opt (mcet): Removed.
22379 * doc/install.texi: Remove -mcet documentation.
22380 * doc/invoke.texi: Likewise.
22382 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
22385 * doc/install.texi: Remove -mcet from bootstrap-cet.
22387 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22390 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
22391 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
22395 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
22396 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
22397 containing a CONST_VECTOR.
22399 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
22401 * doc/install.texi: Update newlib dependency for nvptx.
22403 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22406 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
22407 instead of INTVAL when shifting x left.
22409 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
22411 PR tree-optimization/85478
22412 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
22413 vect_grouped_store_supported for single element vectors.
22415 2018-04-24 Richard Biener <rguenther@suse.de>
22418 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
22419 load cost increase to the case of non-constant step.
22421 2018-04-24 Jakub Jelinek <jakub@redhat.com>
22424 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
22425 destination if any_malformed_asm.
22427 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
22429 PR middle-end/85496
22430 * expr.c (store_field): In the bitfield case, if the value comes from
22431 a function call and is returned in registers by means of a PARALLEL,
22432 do not change the mode of the temporary unless BLKmode and VOIDmode.
22434 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
22436 PR rtl-optimization/85423
22437 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
22438 dependencies to debug insns when the previous insn is non-debug.
22440 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
22442 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
22443 enums into a single definition.
22444 (fls): Fix predicates and printing.
22447 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
22449 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
22450 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
22451 and short u6 immediate.
22452 (check_if_valid_sleep_operand): Remove.
22453 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
22455 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22457 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
22458 flag_always_save_lp condition.
22459 * config/nds32/nds32.opt (malways-save-lp): New option.
22461 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22463 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
22464 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
22465 * config/nds32/nds32.h
22466 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
22467 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
22469 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22471 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
22472 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
22474 2018-04-22 Shiva Chen <shiva0217@gmail.com>
22475 Chung-Ju Wu <jasonwucj@gmail.com>
22477 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
22479 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
22480 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
22482 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22484 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
22486 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22488 * config/nds32/nds32-protos.h (nds32_data_alignment,
22489 nds32_local_alignment): Declare.
22490 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
22491 nds32_local_alignment): New functions.
22492 (TARGET_CONSTANT_ALIGNMENT): Define.
22493 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
22495 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22497 * config/nds32/nds32.c
22498 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
22499 (TARGET_MODES_TIEABLE_P): Likewise.
22501 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
22503 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
22504 level Ofast and Og.
22506 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
22507 Chung-Ju Wu <jasonwucj@gmail.com>
22509 * config/nds32/constants.md (unspec_volatile_element): Add enum values
22510 for unaligned access.
22511 * config/nds32/nds32-intrinsic.c: Implementation of expanding
22513 * config/nds32/nds32-intrinsic.md: Likewise.
22514 * config/nds32/nds32_intrinsic.h: Likewise.
22515 * config/nds32/nds32.h (nds32_builtins): Likewise.
22516 * config/nds32/nds32.opt (munaligned-access): New option.
22517 * config/nds32/nds32.c (nds32_asm_file_start): Display
22518 flag_unaligned_access status.
22520 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22522 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
22523 -mno-relax is present.
22524 * config/riscv/linux.h (LINK_SPEC): Ditto.
22526 2018-04-20 Martin Sebor <msebor@redhat.com>
22529 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
22531 (gimple_fold_builtin_stxcpy_chk): Same.
22532 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
22534 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
22537 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
22538 __powikf2 when long double is IEEE 128-bit.
22540 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
22542 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
22543 step to make sure stack always aligned.
22545 2018-04-20 Carl Love <cel@us.ibm.com>
22548 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
22549 size check for arg0.
22551 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
22552 Tom de Vries <tom@codesourcery.com>
22555 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
22556 Emit insns for calls too.
22557 (nvptx_find_par): Always look for worker-level predecessor insn.
22558 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
22560 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
22561 (nvptx_process_pars): Propagate frames for calls.
22563 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
22566 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
22568 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
22569 (ix86_handle_option): Don't handle OPT_mibt.
22570 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
22572 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
22574 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
22575 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
22576 (ix86_target_macros): Define __CET__ with flag_cf_protection
22577 for -fcf-protection.
22578 * config/i386/i386.c (isa2_opts): Remove -mibt.
22579 * config/i386/i386.h (TARGET_IBT): Removed.
22580 (TARGET_IBT_P): Likewise.
22581 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
22582 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
22583 * config/i386/i386.opt (mcet): Update help message.
22584 (mshstk): Likewise.
22586 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
22587 -mcet as an alias for -mshstk.
22589 2018-04-20 Richard Biener <rguenther@suse.de>
22591 PR middle-end/85475
22592 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
22593 complexity by forcing a single use of the multiply operand.
22595 2018-04-20 Martin Jambor <mjambor@suse.cz>
22598 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
22599 recursion dependency to only apply to non-clones.
22601 2018-04-20 Martin Jambor <mjambor@suse.cz>
22604 * ipa-cp.c (create_specialized_node): Check that clones of
22605 self-recursive edges exist during IPA-CP.
22607 2018-04-19 Toon Moene <toon@moene.org>
22609 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
22612 2018-04-19 Jakub Jelinek <jakub@redhat.com>
22614 PR tree-optimization/85467
22615 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
22616 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
22617 VECTOR_CST element to type.
22619 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22622 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
22623 * config/i386/i386.md (builtin_setjmp_setup): Removed.
22624 (builtin_longjmp): Likewise.
22625 (save_stack_nonlocal): New pattern.
22626 (restore_stack_nonlocal): Likewise.
22628 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22631 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22632 Replace ASM_OUTPUT_LABEL with fprintf.
22634 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
22637 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22638 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
22639 * config/i386/i386-c.c (ix86_target_macros_internal): Also
22640 define __IBT__ and __SHSTK__ for -fcf-protection.
22641 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
22643 (ix86_trampoline_init): Likewise.
22644 (x86_output_mi_thunk): Likewise.
22645 (ix86_notrack_prefixed_insn_p): Likewise.
22646 (ix86_option_override_internal): Don't disallow -fcf-protection.
22647 * config/i386/i386.md (rdssp<mode>): Also enable for
22649 (incssp<mode>): Likewise.
22650 (nop_endbr): Likewise.
22651 * config/i386/i386.opt (mcet): Change help message to built-in
22654 (mshstk): Likewise.
22655 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
22656 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
22657 enable CET built-in functions.
22659 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
22661 * common/config/i386/i386-common.c
22662 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
22663 OPTION_MASK_ISA_MOVDIRI_UNSET,
22664 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
22665 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
22666 * config.gcc (movdirintrin.h): New header.
22667 * config/i386/cpuid.h (bit_MOVDIRI,
22668 bit_MOVDIR64B): New bits.
22669 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
22671 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
22672 (VOID, PVOID, PCVOID)): New function types.
22673 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
22674 __builtin_ia32_directstoreu_u64,
22675 __builtin_ia32_movdir64b): New builtins.
22676 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
22677 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
22679 (ix86_valid_target_attribute_inner_p): Ditto.
22680 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
22681 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
22682 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
22683 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
22684 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
22685 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
22686 (movdiri<mode>, movdir64b_<mode>): New.
22687 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
22688 * config/i386/immintrin.h: Include movdirintrin.h.
22689 * config/i386/movdirintrin.h: New file.
22690 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
22692 2018-04-19 Richard Biener <rguenther@suse.de>
22694 PR middle-end/85455
22695 * cfg.c (clear_bb_flags): When loop state says we have
22696 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
22698 2018-04-19 Richard Biener <rguenther@suse.de>
22700 PR tree-optimization/84737
22701 * tree-vect-data-refs.c (vect_copy_ref_info): New function
22702 copying restrict info.
22703 (vect_setup_realignment): Use it.
22704 * tree-vectorizer.h (vect_copy_ref_info): Declare.
22705 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
22706 the first DR to all generated stores.
22707 (vectorizable_load): Likewise for loads.
22709 2018-04-19 Jakub Jelinek <jakub@redhat.com>
22711 PR tree-optimization/85446
22712 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
22713 the integral and pointer types to have the same precision.
22715 * doc/install.texi: Document --disable-cet being the default and
22718 2018-04-18 Martin Liska <mliska@suse.cz>
22720 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
22723 2018-04-18 Martin Liska <mliska@suse.cz>
22726 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
22729 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22730 arguments if they are comparable.
22732 2018-04-18 Martin Liska <mliska@suse.cz>
22735 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
22738 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22741 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
22744 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
22745 ENDBR after calling __morestack.
22747 2018-04-18 David Malcolm <dmalcolm@redhat.com>
22750 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
22751 by using gcc_base_ver to generate a gcc_driver_version, and use
22752 it when generating GCC_DRIVER_NAME.
22753 * configure: Regenerate.
22755 2018-04-18 Jakub Jelinek <jakub@redhat.com>
22758 * config.gcc: Obsolete powerpc*-*-*spe*.
22760 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22763 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
22764 (stabstr_D): Change type of unum from unsigned int to
22765 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
22768 2018-04-17 Jim Wilson <jimw@sifive.com>
22771 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
22772 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
22773 Set arg_pointer_offset after using pretend_args_size.
22775 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22777 PR rtl-optimization/85431
22778 * dse.c (record_store): Ignore zero width stores.
22781 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
22782 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
22783 __builtin_stack_restore rather than after it.
22784 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
22785 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
22786 argument instead of virtual_dynamic_stack_rtx.
22788 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
22790 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
22792 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
22793 Add note to error message to explain internal mapping of overloaded
22794 built-in function name to non-overloaded built-in function name.
22795 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
22798 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
22801 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
22802 where the inputs overlap with the output.
22804 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22806 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
22807 (=v, v) alternative and explicit "memory" attribute.
22808 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
22809 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22811 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
22812 "sselog1" type instead of "sselog".
22813 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
22814 "sselog". Remove explicit "memory" attribute.
22815 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
22816 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22818 (vec_extract_hi_v32hi): Merge all alternatives into one, use
22819 "sselog1" type instead of "sselog". Remove explicit "memory"
22821 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
22822 use "sselog1" type instead of "sselog". Remove explicit "memory"
22824 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
22825 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22827 (vec_extract_hi_v64qi): Merge all alternatives into one, use
22828 "sselog1" type instead of "sselog". Remove explicit "memory"
22830 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
22831 use "sselog1" type instead of "sselog". Remove explicit "memory"
22835 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
22837 PR middle-end/85414
22838 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
22841 2018-04-17 Martin Jambor <mjambor@suse.cz>
22844 * ipa-cp.c (create_specialized_node): Call
22845 expand_all_artificial_thunks if necessary.
22847 2018-04-17 Martin Liska <mliska@suse.cz>
22850 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
22851 in message, remote space in between '_G' and '('.
22853 2018-04-17 Jakub Jelinek <jakub@redhat.com>
22856 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
22857 avx512f_vmcmp<mode>3<round_saeonly_name>,
22858 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
22859 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
22860 avx512f_rndscale<mode><round_saeonly_name>,
22861 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
22862 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
22863 Use %<iptr>2 instead of %2 for -masm=intel.
22864 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
22865 avx512f_vcvttss2usi<round_saeonly_name>,
22866 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
22868 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
22869 avx512f_vcvttsd2usi<round_saeonly_name>,
22870 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
22871 Use %q1 instead of %1 for -masm=intel.
22872 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
22873 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
22874 of %3 for -masm=intel.
22875 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
22877 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
22879 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
22881 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
22882 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
22884 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
22886 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
22887 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
22888 %g1 and one with %0 and %1.
22889 (avx512er_vmrcp28<mode><round_saeonly_name>,
22890 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
22891 %1 for -masm=intel.
22892 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
22893 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
22894 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
22895 of %0 and %{%4%} for -masm=intel.
22896 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
22897 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
22898 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
22899 order of %0 and %{%5%}%{z%} for -masm=intel.
22901 2018-04-17 Jan Hubicka <jh@suse.cz>
22904 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
22906 2018-04-17 Martin Liska <mliska@suse.cz>
22909 * multiple_target.c (create_dispatcher_calls): Set apostrophes
22910 for target_clone error message. Make default implementation
22911 clone to be a local declaration.
22912 (separate_attrs): Add new argument and check for an empty
22914 (expand_target_clones): Handle it.
22915 (ipa_target_clone): Make redirection just for target_clones
22918 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
22919 Tom de Vries <tom@codesourcery.com>
22921 PR middle-end/84955
22922 * omp-expand.c (expand_oacc_for): Add dummy false branch for
22923 tiled basic blocks without omp continue statements.
22925 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
22928 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
22929 vec_extract expression as having side effects to make sure it gets
22932 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
22935 * config/i386/i386.c (get_builtin_code_for_version): Check
22938 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
22941 * config.gcc: Support "skylake".
22942 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22944 * config/i386/i386.c (m_SKYLAKE): Define.
22945 (processor_target_table): Add "skylake".
22946 (ix86_option_override_internal): Add "skylake".
22947 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
22948 PROCESSOR_CANNONLAKE.
22949 (get_builtin_code_for_version): Fix priority for
22950 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
22951 PROCESSOR_SKYLAKE-AVX512.
22952 * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
22953 (processor_type): Add PROCESSOR_SKYLAKE.
22955 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
22956 Jason Merrill <jason@redhat.com>
22959 * convert.c (convert_to_integer_1): Use direct recursion for
22960 enumeral types and types with a precision less than the number
22961 of bits in their mode.
22963 2018-04-16 Julia Koval <julia.koval@intel.com>
22966 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
22967 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
22969 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
22972 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
22973 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
22974 and -mno-direct-move.
22976 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
22979 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
22980 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
22981 Ensure negative shifts result in {0}.
22983 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
22985 PR rtl-optimization/79916
22986 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
22987 regs (if any) to define how to gnerate SD moves when LRA is in
22990 2018-04-13 Jakub Jelinek <jakub@redhat.com>
22992 PR rtl-optimization/85393
22993 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
22994 * except.c (expand_dw2_landing_pad_for_region): Make static.
22995 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
22996 a label and unconditional jump to old_bb, rather than
22997 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
23000 PR rtl-optimization/85376
23001 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
23002 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
23003 instead of a specific value.
23005 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
23006 Bin Cheng <bin.cheng@arm.com>
23008 PR tree-optimization/82965
23009 PR tree-optimization/83991
23010 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
23011 by_profile_only parameter.
23012 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
23013 information if the loop was predicted to iterate too many times.
23014 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
23016 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
23019 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
23022 2018-04-13 Martin Liska <mliska@suse.cz>
23023 Jakub Jelinek <jakub@redhat.com>
23025 PR middle-end/81657
23026 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
23027 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
23028 * builtins.c (expand_builtin_memory_copy_args): Use
23029 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
23030 handle dest_addr == pc_rtx.
23032 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
23035 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
23036 asked to not generate direct moves.
23037 (fix_trunc<mode>si2_stfiwx): Similar.
23038 (fix_trunc<mode>si2_internal): Similar.
23040 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23043 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
23044 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
23045 lookup if dest in some wider mode is known to be const0_rtx and
23046 if so, record permanent equivalence for it to be ZERO_EXTEND of
23047 the narrower mode destination.
23049 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
23051 * lto-streamer-out.c (output_function): Revert 259346.
23052 * omp-expand.c (expand_oacc_for): Likewise.
23054 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
23056 PR rtl-optimization/85354
23057 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
23058 * sel-sched.c (sel_global_init): ... here.
23060 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
23063 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
23064 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
23065 mode for PE-COFF targets.
23066 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
23067 (i386_pe_asm_lto_end): Likewise.
23068 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
23069 (TARGET_ASM_LTO_END): Likewise.
23070 * config/i386/winnt.c (saved_debug_info_level): New static variable.
23071 (i386_pe_asm_lto_start): New function.
23072 (i386_pe_asm_lto_end): Likewise.
23074 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
23075 Richard Biener <rguenther@suse.de>
23077 PR middle-end/84955
23078 * lto-streamer-out.c (output_function): Fix CFG loop state before
23080 * omp-expand.c (expand_oacc_for): Handle calls to internal
23081 functions like regular functions.
23083 2018-04-12 Richard Biener <rguenther@suse.de>
23086 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
23087 for the early LTO debug to properly generate references to it
23088 during DIE emission. Do not re-use that for the skeleton for
23090 (dwarf2out_early_finish): Likewise.
23092 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23095 * config/i386/sse.md
23096 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
23097 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
23098 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
23099 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
23100 and output is a reg, avoid creating invalid lowpart subreg, but
23101 instead split into a 512-bit move. Don't split if not AVX512VL,
23102 input is xmm16+ reg and output is a mem.
23103 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
23104 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
23105 xmm16+ reg and output is a mem.
23107 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23109 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
23110 also for flag_dwarf2_cfi_asm.
23112 2018-04-12 Jakub Jelinek <jakub@redhat.com>
23114 PR rtl-optimization/85342
23115 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
23116 a bool scalar var inside of the loop instead. Don't try to update
23117 recog_data.operand after failed apply_change_group.
23119 2018-04-12 Tom de Vries <tom@codesourcery.com>
23122 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
23123 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
23124 array with flexible array member as array without given dimension.
23125 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
23126 argument for undefined param to true.
23128 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
23131 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23132 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
23133 from PowerPC section.
23134 * config/rs6000/sysv4.opt (mcall-): Improve help text.
23135 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
23136 help text that is too long.
23137 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
23138 help text that is too long.
23139 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
23140 help text that is too long.
23142 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
23144 * config/alpha/alpha.md (stack_probe_internal): Rename
23145 from "probe_stack". Update all callers.
23147 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23149 PR rtl-optimization/84566
23150 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
23151 sched_macro_fuse_insns.
23153 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23156 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
23157 (compute_block_dependences): ... from here.
23159 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23161 PR tree-optimization/85331
23162 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
23163 from int to HOST_WIDE_INT.
23165 2018-04-11 Martin Jambor <mjambor@suse.cz>
23168 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
23169 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
23170 not the same as the source val.
23171 (cgraph_edge_brings_value_p): New parameter.
23172 (gather_edges_for_value): Pass destination value to
23173 cgraph_edge_brings_value_p.
23174 (perhaps_add_new_callers): Likewise.
23175 (get_info_about_necessary_edges): Likewise and exclude values brought
23176 only by self-recursive edges.
23177 (create_specialized_node): Redirect only clones of self-calling edges.
23178 (+self_recursive_pass_through_p): New function.
23179 (find_more_scalar_values_for_callers_subset): Use it.
23180 (find_aggregate_values_for_callers_subset): Likewise.
23181 (known_aggs_to_agg_replacement_list): Removed.
23182 (decide_whether_version_node): Re-calculate known constants for all
23183 remaining context clones.
23185 2018-04-11 Richard Biener <rguenther@suse.de>
23188 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
23189 from early DWARF output.
23190 (dwarf2out_early_finish): Output line info unconditionally into
23191 early DWARF and add reference to it.
23193 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23196 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
23197 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
23198 other than V2DFmode using iptr mode attribute.
23199 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
23201 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
23203 PR rtl-optimization/84659
23204 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
23206 2018-04-11 Jakub Jelinek <jakub@redhat.com>
23209 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
23211 (output_loc_list): Pass address of a dummy size variable even in the
23212 locview handling loop.
23213 (index_location_lists): Add comment on why skip_loc_list_entry can't
23216 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
23219 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
23222 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
23225 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
23226 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
23227 and -mstring-compare-inline-limit.
23229 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23232 * config/rs6000/rs6000.md (allocate_stack): Put the residual size
23233 for stack clash protection in a register whenever we need it to be in
23236 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23238 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
23239 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
23241 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
23244 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
23246 (mlong-double-): Ditto.
23247 * config/rs6000/sysv4.opt (msdata=): Ditto.
23248 (mtls-size=): Ditto.
23250 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
23252 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
23253 erroneous entries for
23254 "vector int vec_ldl (int, long int *)", and
23255 "vector unsigned int vec_ldl (int, unsigned long int *)".
23256 Add comments and entries for
23257 "vector bool char vec_ldl (int, bool char *)",
23258 "vector bool short vec_ldl (int, bool short *)",
23259 "vector bool int vec_ldl (int, bool int *)",
23260 "vector bool long long vec_ldl (int, bool long long *)",
23261 "vector pixel vec_ldl (int, pixel *)",
23262 "vector long long vec_ldl (int, long long *)",
23263 "vector unsigned long long vec_ldl (int, unsigned long long *)".
23264 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
23265 type tree bool_long_long_type_node and correct definition of
23266 bool_V2DI_type_node to make reference to this new type tree.
23267 (rs6000_mangle_type): Replace erroneous reference to
23268 bool_long_type_node with bool_long_long_type_node.
23269 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
23270 comments to emphasize sign distinctions for char and int types and
23271 replace RS6000_BTI_bool_long constant with
23272 RS6000_BTI_bool_long_long constant. Also add comment to restrict
23273 use of RS6000_BTI_pixel.
23274 (bool_long_type_node): Remove this macro definition.
23275 (bool_long_long_type_node): New macro definition
23277 2018-04-10 Jakub Jelinek <jakub@redhat.com>
23279 PR rtl-optimization/85300
23280 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
23281 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
23282 simplify_unary_operation fails.
23284 2018-04-10 Martin Liska <mliska@suse.cz>
23286 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
23287 cgraph_edge and ipa_ref.
23289 2018-04-10 Jakub Jelinek <jakub@redhat.com>
23293 * config/i386/sse.md
23294 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
23295 computation of the VEC_MERGE selector from mask.
23296 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
23297 Fix decoding of the VEC_MERGE selector into mask.
23299 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
23301 PR tree-optimization/85286
23302 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
23304 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
23306 * final.c (final_1): Set insn_last_address as well as
23307 insn_current_address.
23309 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
23312 * explow.c (emit_stack_probe): Call validize_mem on memory location
23313 before passing it to gen_probe_stack. Create address operand and
23314 legitimize it for the probe_stack_address case.
23316 2018-04-09 Jan Hubicka <jh@suse.cz>
23319 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
23320 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
23321 * tree.c (free_lang_data_in_type): Fix handling of binfos;
23323 (free_lang_data): Rebuild type inheritance graph.
23325 2018-04-09 Martin Sebor <msebor@redhat.com>
23327 * invoke.texi (-finline-small-functions): Mention other optimization
23329 (-findirect-inlining, -fpartial-inlining): Same.
23330 (-finline-functions-called-once): Same.
23331 (-freorder-blocks-and-partition): Same.
23333 2018-04-09 Jan Hubicka <jh@suse.cz>
23336 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
23337 jumps; choose last target that matches the criteria (i.e.
23338 no partition changes for non-crossing jumps).
23339 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
23340 support for redirecting crossing jumps to non-crossing.
23342 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
23344 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
23345 also for naked functions.
23347 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
23349 * config/arc/arc.md (add_shift): New pattern.
23350 (add_shift2): Likewise.
23351 (sub_shift): Likewise.
23352 (sub_shift_cmp0_noout): Likewise.
23353 (compare_si_ashiftsi): Likewise.
23354 (xbfu_cmp0_noout): New combine pattern.
23355 (xbfu_cmp0"): Likewise.
23356 (movsi_set_cc_insn): Place the predicable variant first.
23357 (commutative_binary_cmp0_noout): Remove clobber.
23358 (commutative_binary_cmp0): New pattern.
23359 (noncommutative_binary_cmp0): Likewise.
23360 (noncommutative_binary_cmp0_noout): Likewise.
23361 (noncommutative_binary_comparison_result_used): Removed.
23362 (rsub_cmp0): New pattern.
23363 (rsub_cmp0_noout): Likewise.
23364 (extzvsi): Changed, keep only meaningful variants.
23365 (SQH, SEZ): New iterators.
23366 (SQH_postfix): New mode attribute.
23367 (SEZ_prefix): New code attribute.
23368 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
23369 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
23370 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
23371 of numerical value.
23372 (noncommutative_operator): Check the availability of barrel
23375 2018-04-09 Richard Biener <rguenther@suse.de>
23377 PR tree-optimization/85284
23378 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
23379 Only use the niter constraining form of simple_iv when the exit
23380 is always executed.
23382 2018-04-09 Tom de Vries <tom@codesourcery.com>
23385 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23386 (define_expand "*memory_barrier"): New define_expand.
23387 (define_insn "memory_barrier"): New insn.
23389 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23391 PR rtl-optimization/80463
23392 PR rtl-optimization/83972
23393 PR rtl-optimization/83480
23395 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
23396 correct producer for the insn.
23397 (tidy_control_flow): Fixup seqnos in case of debug insns.
23399 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23401 PR rtl-optimization/83913
23403 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
23404 different sched-times when merging exprs.
23406 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23408 PR rtl-optimization/83962
23410 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
23411 tidy_fallthru_edge and tidy_control_flow.
23413 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
23415 PR rtl-optimization/83530
23417 * sel-sched.c (force_next_insn): New global variable.
23418 (remove_insn_for_debug): When force_next_insn is true, also leave only
23419 next insn in the ready list.
23420 (sel_sched_region): When the region wasn't scheduled, make another pass
23421 over it with force_next_insn set to 1.
23423 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
23425 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
23427 * config/nds32/constants.md (unspec_volatile_element): Add enum values
23428 for interrupt control.
23429 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23430 functions for interrupt control.
23431 * config/nds32/nds32-intrinsic.md: Likewise.
23432 * config/nds32/nds32_intrinsic.h: Likewise.
23433 * config/nds32/nds32.h (nds32_builtins): Likewise.
23435 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
23437 * config/nds32/nds32.c (nds32_init_machine_status,
23438 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
23439 strict_aligned_p field.
23440 (nds32_expand_to_rtl_hook): New function.
23441 (TARGET_EXPAND_TO_RTL_HOOK): Define.
23442 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
23444 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23445 Chung-Ju Wu <jasonwucj@gmail.com>
23447 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
23448 * config/nds32/nds32-n7.md: New file.
23449 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
23450 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
23452 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
23453 * config/nds32/nds32.md (pipeline_model): Add n7.
23454 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
23455 * config/nds32/pipelines.md: Include n7 settings.
23457 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23458 Chung-Ju Wu <jasonwucj@gmail.com>
23460 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
23461 * config/nds32/nds32-e8.md: New file.
23462 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
23463 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
23465 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
23466 * config/nds32/nds32.md (pipeline_model): Add e8.
23467 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
23468 * config/nds32/pipelines.md: Include e8 settings.
23470 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23471 Chung-Ju Wu <jasonwucj@gmail.com>
23473 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
23474 * config/nds32/nds32-n8.md: New file.
23475 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
23476 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
23478 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
23479 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
23480 * config/nds32/nds32.md (pipeline_model): Add n8.
23481 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
23482 * config/nds32/pipelines.md: Include n8 settings.
23484 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
23485 Chung-Ju Wu <jasonwucj@gmail.com>
23487 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
23488 * config/nds32/nds32-n9-2r1w.md: New file.
23489 * config/nds32/nds32-n9-3r2w.md: New file.
23490 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
23491 nds32_register_ports): New or modify for cpu n9.
23492 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
23494 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
23495 * config/nds32/nds32-utils.c: New file.
23496 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
23497 TARGET_MUL_SLOW): Define.
23498 * config/nds32/nds32.md (pipeline_model): New attribute.
23499 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
23500 New options that support cpu n9.
23501 * config/nds32/pipelines.md: Include n9 settings.
23502 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
23504 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
23506 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
23507 information if necessary.
23508 (output_cond_branch_compare_zero): Likewise.
23509 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
23510 (nds32_target_alignment): Refine for alignment.
23511 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
23512 (FUNCTION_BOUNDARY): Modify.
23513 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
23515 * config/nds32/nds32.opt (malways-align, malign-functions): New.
23517 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
23519 * config/nds32/constants.md (unspec_volatile_element): Add values for
23520 TLB operation and data prefetch.
23521 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23522 functions for TLB operation and data prefetch.
23523 * config/nds32/nds32-intrinsic.md: Likewise.
23524 * config/nds32/nds32_intrinsic.h: Likewise.
23525 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
23526 (nds32_print_operand): Likewise.
23527 * config/nds32/nds32.h (nds32_builtins): Likewise.
23529 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
23530 Andrew Pinski <pinsika@gcc.gnu.org>
23532 PR middle-end/82976
23533 * match.pd: Use constant_boolean_node of correct type instead of
23534 boolean_true_node or boolean_false_node for simplifying
23535 pointer comparisons to zero.
23537 2018-04-07 Jakub Jelinek <jakub@redhat.com>
23539 PR tree-optimization/80021
23540 * tree.c (verify_type_variant): Make error call in verify_variant_match
23541 translatable and remove final full stop.
23543 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23545 * config/nds32/constants.md (unspec_volatile_element): Add
23546 UNSPEC_VOLATILE_EH_RETURN.
23547 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
23548 nds32_output_stack_pop): Support dwarf exception handling process.
23549 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
23550 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
23551 exception handling process.
23552 (nds32_compute_stack_frame): Likewise.
23553 (nds32_return_addr_rtx): Likewise.
23554 (nds32_initial_elimination_offset): Likewise.
23555 (nds32_expand_prologue): Likewise.
23556 (nds32_expand_epilogue): Likewise.
23557 (nds32_dynamic_chain_address): New function.
23558 * config/nds32/nds32.h (machine_function): Add fields for dwarf
23559 exception handling.
23560 (DYNAMIC_CHAIN_ADDRESS): Define.
23561 (EH_RETURN_DATA_REGNO): Define.
23562 (EH_RETURN_STACKADJ_RTX): Define.
23563 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
23564 patterns for dwarf exception handling.
23566 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23568 * config/nds32/nds32.h: Clean up obsolete macros.
23570 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23572 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23573 Add enum values for particular instructions.
23574 * config/nds32/nds32-intrinsic.c: Implementation of expanding
23575 particular intrinsic functions.
23576 * config/nds32/nds32-intrinsic.md: Likewise.
23577 * config/nds32/nds32_intrinsic.h: Likewise.
23578 * config/nds32/nds32.h (nds32_builtins): Likewise.
23579 * config/nds32/nds32.md (type): Add pbsad and pbsada.
23580 (btst, ave): New patterns for particular instructions.
23582 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23584 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23585 Add enum values for atomic load/store and memory sync.
23586 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
23588 * config/nds32/nds32-intrinsic.md: Likewise.
23589 * config/nds32/nds32_intrinsic.h: Likewise.
23590 * config/nds32/nds32.h (nds32_builtins): Likewise.
23592 2018-04-07 Jakub Jelinek <jakub@redhat.com>
23594 PR tree-optimization/85257
23595 * fold-const.c (native_encode_vector): If not all elts could fit
23596 and off is -1, return 0 rather than offset.
23597 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
23598 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
23599 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
23600 adjust buffer in native_interpret_expr call.
23602 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23604 * config/nds32/constants.md (unspec_volatile_element): Add cache
23605 control enum values.
23606 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
23607 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
23608 * config/nds32/nds32.c (nds32_cctl_names): New.
23609 (nds32_print_operand): Handle cache control register names.
23610 * config/nds32/nds32.h (nds32_builtins): New enum values.
23611 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
23613 * config/nds32/nds32.md (type): Add mmu.
23614 * config/nds32/pipelines.md (simple_insn): Add mmu.
23616 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23618 * config/nds32/nds32.md (type): Remove call.
23619 * config/nds32/pipelines.md (simple_insn): Likewise.
23621 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23623 * config/nds32/constants.md (unspec_volatile_element): Add
23624 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
23625 UNSPEC_VOLATILE_FMFCFG.
23626 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
23627 description for fmfcfg and fmfcsr.
23628 (bdesc_1arg): Add fmtcsr.
23629 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
23630 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
23631 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
23632 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
23633 unspec_fmfcfg): New patterns.
23634 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
23635 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
23636 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
23637 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
23638 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
23639 __nds32__fmfcfg): Define.
23641 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
23643 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
23644 intrinsic register names.
23645 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
23646 intrinsic register enum values and macros.
23648 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
23650 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
23651 for load/store addressing form.
23652 (nds32_print_operand_address): Likewise.
23654 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
23657 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
23658 based on LABEL_REF. Remove useless assertion.
23659 (pic_address_needs_scratch): Fix formatting.
23660 (sparc_legitimize_pic_address): Minor tweaks.
23661 (sparc_delegitimize_address): Adjust assertion accordingly.
23662 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
23663 into symbolic_operand.
23664 (movsi_high_pic_label_ref): Likewise.
23665 (movsi_lo_sum_pic_label_ref): Likewise.
23666 (movdi_pic_label_ref): Likewise.
23667 (movdi_high_pic_label_ref): Likewise.
23668 (movdi_lo_sum_pic_label_ref): Likewise.
23670 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
23672 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
23673 custom LIB_SPEC setup.
23675 2018-04-06 Ruslan Bukin <br@bsdpad.com>
23676 Kito Cheng <kito.cheng@gmail.com>
23678 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
23679 * config/riscv/freebsd.h: New.
23681 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23683 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
23684 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
23687 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23688 Kito Cheng <kito.cheng@gmail.com>
23690 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
23691 nds32_output_call, nds32_symbol_binds_local_p): New functions.
23692 * config/nds32/nds32-protos.h (nds32_output_call,
23693 nds32_output_return): Declare.
23694 * config/nds32/nds32.md: Refine all the call and return patterns.
23696 2018-04-06 Jakub Jelinek <jakub@redhat.com>
23699 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
23700 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
23702 PR rtl-optimization/84872
23703 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
23704 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
23705 EDGE_CROSSING edge.
23707 2018-04-06 Tamar Christina <tamar.christina@arm.com>
23709 * expr.c (copy_blkmode_to_reg): Revert 254862.
23710 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
23712 2018-04-06 Richard Biener <rguenther@suse.de>
23714 PR middle-end/85244
23715 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
23716 after seeing a component reference with an adjacent field. Treat
23717 refs to arrays at struct end of external decls similar to
23718 refs to unconstrained commons.
23720 2018-04-06 Jakub Jelinek <jakub@redhat.com>
23723 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
23724 look through SAVE_EXPRs with non-side-effects argument. Adjust
23726 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
23729 2018-04-06 Richard Biener <rguenther@suse.de>
23731 PR middle-end/85180
23732 * alias.c (find_base_term): New wrapper around find_base_term
23733 unwinding CSELIB_VAL_PTR changes.
23734 (find_base_term): Do not restore CSELIB_VAL_PTR during the
23737 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
23739 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
23741 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
23742 constant definitions.
23743 ("nop"): lr 0,0 -> nopr r0
23744 ("nop_lr0", "nop_lr1"): New insn definitions.
23746 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
23748 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
23749 NDS32_V3PUSH_AVAILABLE_P macro.
23751 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
23752 Chung-Ju Wu <jasonwucj@gmail.com>
23754 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
23755 (nds32*-*-*): Add float and fpu_config into supported_defaults.
23756 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
23757 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
23758 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
23759 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
23760 * config/nds32/constraints.md: New constraints and checking for hard
23761 float configuration.
23762 * config/nds32/iterators.md: New mode iterator and attribute for hard
23763 float configuration.
23764 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
23766 * config/nds32/nds32-fpu.md: New file.
23767 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
23768 deal with hard float code generation.
23769 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
23771 (abi_type, float_reg_number): New enum type.
23772 * config/nds32/nds32-predicates.c: New predicates for hard float.
23773 * config/nds32/nds32-protos.h: Declare functions for hard float.
23774 * config/nds32/nds32.c: Implementation for hard float configuration.
23775 * config/nds32/nds32.h: Definitions for hard float configuration.
23776 * config/nds32/nds32.md: Include hard float machine description and
23777 modify patterns for hard float configuration.
23778 * config/nds32/nds32.opt: New options for hard float configuration.
23779 * config/nds32/predicates.md: New predicates for hard float
23782 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
23784 * common/config/nds32/nds32-common.c
23785 (nds32_option_optimization_table): Enable -mreleax-hint by default.
23787 2018-04-05 Jakub Jelinek <jakub@redhat.com>
23789 PR middle-end/85195
23790 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
23791 CONSTRUCTOR_ELT (ctor, ...)->value.
23793 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
23796 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
23798 2018-04-05 Tom de Vries <tom@codesourcery.com>
23801 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
23804 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23805 Kito Cheng <kito.cheng@gmail.com>
23807 * config/nds32/constraints.md (U33): Fine-tune checking condition.
23808 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
23809 * config/nds32/nds32.h (nds32_16bit_address_type): Add
23810 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
23812 2018-04-05 Shiva Chen <shiva0217@gmail.com>
23813 Kito Cheng <kito.cheng@gmail.com>
23815 * config/nds32/constraints.md (Ufe): New memory constraint.
23816 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
23817 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
23818 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
23820 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
23821 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
23823 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23825 * config/nds32/nds32.md: Use optimize_size in the condition for
23826 alu-shift instructions.
23828 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23830 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
23832 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23834 * config/nds32/nds32.md (negsi2): Refine pattern.
23836 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23837 Chung-Ju Wu <jasonwucj@gmail.com>
23839 * config/nds32/iterators.md (shift_rotate): New code iterator.
23840 (shift): New code attribute.
23841 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
23842 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
23843 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
23844 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
23845 bit-wise operations.
23846 (andsi3, *andsi3): Ditto.
23847 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
23848 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
23849 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
23850 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
23851 nds32_ior_operand, nds32_xor_operand): New predicates.
23853 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23855 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
23856 (addsi3, subsi3): ... this.
23858 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23860 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
23862 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23864 * config/nds32/nds32.md: Adjust indention.
23866 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
23868 * config/nds32/nds32.md (feature): New attribute.
23870 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
23872 * config/nds32/nds32.md (subtype): New attribute.
23874 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
23877 * config/arm/arm-builtins.c (arm_expand_builtin): Change
23878 expansion to perform a bitwise AND of the argument followed by a
23879 boolean negation of the result.
23881 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
23883 PR rtl-optimization/84878
23884 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
23885 the basic block. Assert the use reference is not artificial and that
23886 it has an associated insn.
23888 2018-04-04 Michael Matz <matz@suse.de>
23890 * builtins.c (compute_objsize): Pass correct operand
23891 to array_at_struct_end_p.
23893 2018-04-04 Richard Biener <rguenther@suse.de>
23896 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
23897 from contexts for DINFO_LEVEL_TERSE and below.
23899 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23901 * config/nds32/nds32-doubleword.md (move_<mode>): Require
23902 resiter_operand condition.
23903 * config/nds32/nds32.md (*move<mode>): Ditto.
23905 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23906 Monk Chiang <sh.chiang04@gmail.com>
23908 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
23910 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23912 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
23914 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23915 Kito Cheng <kito.cheng@gmail.com>
23917 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
23918 nds32_cond_code_str, output_cond_branch,
23919 output_cond_branch_compare_zero, nds32_expand_cbranch,
23920 nds32_expand_cstore, nds32_expand_movcc,
23921 nds32_output_cbranchsi4_equality_zero,
23922 nds32_output_cbranchsi4_equality_reg,
23923 nds32_output_cbranchsi4_equality_reg_or_const_int,
23924 nds32_output_cbranchsi4_greater_less_zero: New functions.
23925 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
23926 nds32_expand_cstore, nds32_expand_movcc,
23927 nds32_output_cbranchsi4_equality_zero,
23928 nds32_output_cbranchsi4_equality_reg,
23929 nds32_output_cbranchsi4_equality_reg_or_const_int,
23930 nds32_output_cbranchsi4_greater_less_zero): Declare.
23931 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
23932 nds32_rimm11s_operand): New predicates.
23933 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
23934 * config/nds32/nds32.md: Rewrite all the branch and conditional move
23937 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
23939 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
23940 * config/nds32/nds32.md: Ditto.
23941 * config/nds32/pipelines.md: Ditto.
23943 2018-04-04 Richard Biener <rguenther@suse.de>
23945 PR tree-optimization/85168
23946 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
23947 propagating abnormals.
23949 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23951 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
23953 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
23954 Kito Cheng <kito.cheng@gmail.com>
23956 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
23957 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
23958 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
23959 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
23960 * config/nds32/nds32.md (sibcall_internal): New.
23961 (sibcall_register): Remove.
23962 (sibcall_immediate): Remove.
23963 (sibcall_value_internal): New.
23964 (sibcall_value_register): Remove.
23965 (sibcall_value_immediate): Remove.
23966 * config/nds32/predicates.md (nds32_general_register_operand): New.
23967 (nds32_call_address_operand): New.
23969 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23971 PR rtl-optimization/85167
23972 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
23973 bb_defs if *split_p, instead preinitialize it to NULL.
23975 PR tree-optimization/85156
23976 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
23977 evaluating the argument multiple times.
23979 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
23981 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
23983 (_mm_cvtpd_ps): Likewise.
23984 (_mm_cvttpd_epi32): Likewise.
23985 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
23986 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
23987 vector, pixel, and bool following altivec.h include.
23989 2018-04-03 Martin Sebor <msebor@redhat.com>
23991 * doc/extend.texi (Common Function Attributes): Clarify.
23992 (const attribute): Likewise.
23993 (pure attribute): Likewise.
23995 2018-04-03 Jakub Jelinek <jakub@redhat.com>
23998 * config/i386/i386.c (ix86_expand_vector_set): Use
23999 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
24001 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
24003 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
24004 instructions when changing rounding bits to preserve precision bits
24005 in the x87 control word.
24007 2018-04-03 Martin Liska <mliska@suse.cz>
24009 PR tree-optimization/82491
24010 * rtl.h (strip_offset_and_add): Replace += suboffset with
24011 poly_uint64 () + suboffset.
24013 2018-03-29 Martin Liska <mliska@suse.cz>
24014 Martin Jambor <mjambor@suse.cz>
24017 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
24018 param_type is not an integral or pointer type.
24020 2018-04-03 Richard Biener <rguenther@suse.de>
24022 * sese.h (recompute_all_dominators): Remove.
24024 2018-04-02 Martin Sebor <msebor@redhat.com>
24026 * doc/invoke.texi (-Wrestrict): Fix typos.
24028 2018-04-02 Jim Wilson <jimw@sifive.com>
24030 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
24031 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
24032 (<optab>di3, <optab>si3_extend): Likewise.
24033 (<optab>si3_mask, <optab>si3_mask_1): New.
24034 (<optab>di3_mask, <optab>di3_mask_1): New.
24035 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
24036 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
24037 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
24039 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
24041 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
24044 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
24046 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
24047 (nds32_canonicalize_comparison): New function.
24049 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24050 Kito Cheng <kito.cheng@gmail.com>
24051 Kuan-Lin Chen <kuanlinchentw@gmail.com>
24053 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
24054 * config/nds32/constants.md (unspec_volatile_element): Add
24055 UNSPEC_VOLATILE_RELAX_GROUP.
24056 * config/nds32/nds32-relax-opt.c: New file.
24057 * config/nds32/nds32-predicates.c
24058 (nds32_symbol_load_store_p): New function.
24059 * config/nds32/nds32-protos.h
24060 (nds32_symbol_load_store_p): Declare function.
24061 (make_pass_nds32_relax_opt): Declare new rtl pass function.
24062 * config/nds32/nds32.c
24063 (nds32_register_pass): New function to register pass.
24064 (nds32_register_passes): New function to register passes.
24065 * config/nds32/nds32.md (relax_group): New pattern.
24066 * config/nds32/nds32.opt (mrelax-hint): New option.
24067 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
24069 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
24071 * config/nds32/t-nds32: Modify files dependency.
24073 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24075 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
24076 (PROFILE_HOOK): Define its implementation.
24078 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
24080 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
24081 type and 32-bit size.
24083 2018-04-01 Jakub Jelinek <jakub@redhat.com>
24085 PR middle-end/85090
24086 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
24087 (V_128_256): New mode iterator.
24088 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
24089 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
24090 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
24092 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
24093 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
24095 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
24098 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
24099 NaN inputs correctly.
24101 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
24104 * config/rs6000/vsx.md (??r): New mode attribute.
24105 (*vsx_mov<mode>_64bit): Use it.
24106 (*vsx_mov<mode>_32bit): Likewise.
24108 2018-03-30 Martin Sebor <msebor@redhat.com>
24110 PR tree-optimization/84818
24111 * builtins.c (check_access): Use warning_n.
24113 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24116 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
24118 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
24121 2018-03-30 Julia Koval <julia.koval@intel.com>
24124 * x86-tune.def (movx, partial_reg_dependency): Enable for
24127 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
24129 PR inline-asm/84985
24130 * lra-constraints.c (process_alt_operands): Move setting
24131 this_alternative_matches below.
24133 2018-03-29 Martin Liska <mliska@suse.cz>
24136 * doc/invoke.texi: Document how LTO works with debug info.
24137 Describe auto-load support of binutils. Mention 'x86-64'
24138 as valid option value of -march option.
24140 2018-03-29 Jakub Jelinek <jakub@redhat.com>
24142 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
24145 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
24146 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
24147 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
24150 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
24153 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
24154 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
24155 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
24156 for RS6000_BTM_POWERPC64.
24157 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
24158 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
24159 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
24162 (DIVDEU): Likewise.
24164 2018-03-28 Carl Love <cel@us.ibm.com>
24167 2017-09-27 Carl Love <cel@us.ibm.com>
24169 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
24170 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
24171 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
24174 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
24176 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
24177 instead of __vector bool.
24178 (_mm_max_pu8): Likewise.
24179 (_mm_min_pi16): Likewise.
24181 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
24184 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
24185 (DIVWEUO): Likewise.
24186 (DIVDEO): Likewise.
24187 (DIVDEUO): Likewise.
24188 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
24189 DIVWEUO and DIVDEUO.
24190 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
24191 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
24192 (div_extend): Likewise.
24193 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
24195 (__builtin_divweuo): Likewise.
24196 (__builtin_divdeo): Likewise.
24197 (__builtin_divdeuo): Likewise.
24199 2018-03-28 Jakub Jelinek <jakub@redhat.com>
24202 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
24203 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
24205 PR tree-optimization/82004
24206 * gimple-match-head.c (optimize_pow_to_exp): New function.
24207 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
24208 Don't fold to exp if optimize_pow_to_exp is false.
24210 2018-03-28 Martin Liska <mliska@suse.cz>
24213 * calls.c (initialize_argument_information): Fix trailing space.
24214 * common.opt: Fix typo and provide better explanation for
24215 -fsanitize-coverage option.
24216 * config/i386/i386.opt: Fix typo.
24218 2018-03-28 Jakub Jelinek <jakub@redhat.com>
24219 Martin Liska <mliska@suse.cz>
24222 * gimplify.c (asan_poison_variable): Don't do the check for
24223 gimplify_omp_ctxp here.
24224 (gimplify_decl_expr): Do it here.
24225 (gimplify_target_expr): Likewise.
24227 2018-03-28 Martin Liska <mliska@suse.cz>
24230 * config/i386/i386.c (ix86_function_arg_advance): Do not call
24231 chkp_type_bounds_count if MPX is not enabled.
24233 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
24235 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
24237 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
24240 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
24241 function to create the function decl for complex long double
24242 multiply and divide for -mabi=ieeelongdouble.
24243 (init_float128_ieee): Call it.
24245 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
24248 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
24249 -fcf-protection=branch -mibt.
24250 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
24252 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24255 * config/arm/arm.c (arm_valid_symbolic_address): Handle
24256 arm_word_relocations.
24258 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
24261 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
24262 extern array declarations.
24264 2018-03-27 Richard Biener <rguenther@suse.de>
24266 PR middle-end/84067
24267 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
24268 explicit single_use checks.
24270 2018-03-27 Richard Biener <rguenther@suse.de>
24272 PR tree-optimization/85082
24273 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
24276 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
24278 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
24279 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
24280 Turn on fasynchronous-unwind-tables and funwind-tables.
24282 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
24285 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
24286 (*bmi_blsr_<mode>_ccz): Ditto.
24288 2018-03-26 Tom de Vries <tom@codesourcery.com>
24290 PR tree-optimization/85063
24291 * omp-general.c (offloading_function_p): New function. Factor out
24293 * omp-offload.c (pass_omp_target_link::gate): ... here.
24294 * omp-general.h (offloading_function_p): Declare.
24295 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
24296 with attribute omp declare target for offloading functions.
24298 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
24300 PR tree-optimization/84005
24301 * tree-data-ref.h (get_base_for_alignment): Declare.
24302 * tree-data-ref.c (get_base_for_alignment_1): New function.
24303 (get_base_for_alignment): Likewise.
24304 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
24305 get_base_for_alignment to find a suitable base object, instead
24306 of always using drb->base_address.
24308 2018-03-23 Jakub Jelinek <jakub@redhat.com>
24310 PR inline-asm/85022
24311 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
24312 known size by default.
24314 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
24316 PR inline-asm/85030
24317 * lra-constraints.c (process_alt_operands): Don't match BLKmode
24318 and non BLKmode operands.
24320 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24323 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
24324 Clean up attributes.
24326 2018-03-23 Richard Biener <rguenther@suse.de>
24329 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
24330 we are going to emit early debug for LTO.
24332 2018-03-23 Jakub Jelinek <jakub@redhat.com>
24334 PR inline-asm/85034
24335 * function.c (match_asm_constraints_1): Don't optimize if input
24336 doesn't satisfy general_operand predicate for output's mode.
24338 PR inline-asm/85022
24339 * alias.c (write_dependence_p): Don't require for x_canonicalized
24340 non-VOIDmode if x has VOIDmode.
24343 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
24344 just don't try to optimize it rather than assert it never happens.
24346 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
24348 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
24349 macro expansions for definition of ST_INTERNAL_<mode> and
24350 LD_INTERNAL_<mode> builtins.
24351 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
24353 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
24355 (altivec_expand_st_builtin): Likewise.
24356 (altivec_expand_builtin): Remove calls to deleted functions.
24357 (rs6000_address_for_altivec): Delete this function.
24358 * config/rs6000/vector.md: Remove expands for
24359 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
24361 2018-03-22 Sudakshina Das <sudi.das@arm.com>
24364 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
24365 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
24366 re-computing once computed.
24367 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
24368 (arm_init_machine_status): Initialize
24369 machine->static_chain_stack_bytes.
24371 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
24374 * doc/extend.texi: Add four new prototypes for vec_ld.
24375 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
24376 definitions for more logical presentation.
24377 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
24378 entries for V1TI variants of __builtin_altivec_ld builtin.
24379 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
24380 handling of V1TI variant of LVX icode pattern.
24381 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
24382 (rs6000_gimple_fold_builtin): Likewise.
24383 (altivec_init_builtins): Add code to define
24384 __builtin_altivec_lvx_v1ti function.
24386 2018-03-22 Jakub Jelinek <jakub@redhat.com>
24388 PR inline-asm/84941
24389 * function.c (match_asm_constraints_1): Don't do the optimization
24390 if input isn't a REG, SUBREG, MEM or constant.
24392 2018-03-22 Tom de Vries <tom@codesourcery.com>
24394 PR tree-optimization/84956
24395 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
24396 bb_has_abnormal_pred.
24398 2018-03-22 Jakub Jelinek <jakub@redhat.com>
24401 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
24402 DECL_INITIAL (decl) to decl at the end.
24403 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
24404 adjust the comment.
24406 2018-03-21 Joseph Myers <joseph@codesourcery.com>
24408 * doc/extend.texi (__builtin_tgmath): Document when complex
24409 integer types are treated as _Complex _Float64.
24411 2018-03-21 Tom de Vries <tom@codesourcery.com>
24413 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
24415 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24417 PR tree-optimization/84960
24418 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
24419 if it is ENTRY block, move them into single succ of ENTRY in that case.
24421 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
24423 PR tree-optimization/84811
24424 * poly-int.h (poly_span_traits): Remove the T3 parameter and
24425 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
24426 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
24427 (known_subrange_p): Update accordingly. Cast each value involved
24428 in the size comparison, rather than casting the result of the
24431 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24433 PR tree-optimization/84982
24434 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
24435 by flipping the least significant bit rather than all bits from
24436 bitpos to bitpos + bitsize - 1.
24438 2018-03-21 Nathan Sidwell <nathan@acm.org>
24440 * doc/extend.texi (Deprecated Features): Remove mention of
24441 long-deleted deprecations.
24443 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
24446 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
24447 * configure: Regenerate.
24449 2018-03-21 Tom de Vries <tom@codesourcery.com>
24451 PR tree-optimization/83126
24452 * tree-parloops.c (num_phis): New function.
24453 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
24455 2018-03-21 Nathan Sidwell <nathan@acm.org>
24457 * doc/extend.texi (Deprecated Features): Update deprecated flags,
24458 mention anon-struct/union members and trailing attributes.
24460 2018-03-21 Bin Cheng <bin.cheng@arm.com>
24462 PR tree-optimization/84969
24463 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
24464 builtin memset partitions if they set different rhs values.
24466 2018-03-21 Jakub Jelinek <jakub@redhat.com>
24468 PR rtl-optimization/84989
24469 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
24470 VEC_DUPLICATE with scalar result mode.
24472 2018-03-21 Martin Liska <mliska@suse.cz>
24475 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
24476 not intended return statement.
24478 2018-03-21 Martin Liska <mliska@suse.cz>
24481 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
24482 (chkp_find_bound_slots_1): Limit number of iterations.
24484 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
24487 * Minor grammar fixes for x86 options.
24489 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24492 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
24493 holding REG_CFA_RESTORE notes, instead turn them into a USE.
24495 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
24498 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
24499 (altivec_lvx_<mode>_1op): Likewise.
24500 (altivec_stvx_<mode>_2op): Likewise.
24501 (altivec_stvx_<mode>_1op): Likewise.
24502 (altivec_lvx_<VM2:mode>): New define_expand.
24503 (altivec_stvx_<VM2:mode>): Likewise.
24504 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
24505 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24506 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
24507 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24508 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
24509 (rs6000_gen_lvx): Likewise.
24510 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
24511 (altivec_expand_stv_builtin): Likewise.
24512 (altivec_expand_builtin): Likewise.
24513 * config/rs6000/vector.md: Likewise.
24515 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
24518 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
24521 2018-03-20 Richard Biener <rguenther@suse.de>
24524 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
24525 sign-conversions as zero, fall back to standard scalar_stmt
24528 2018-03-20 Martin Liska <mliska@suse.cz>
24531 * predict.c (rebuild_frequencies): Handle case when we have
24532 PROFILE_ABSENT, but flag_guess_branch_prob is false.
24534 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24537 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
24538 flag_section_anchors.
24539 * varasm.c (use_blocks_for_decl_p): Remove hack for
24540 dw2_force_const_mem.
24543 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
24545 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
24546 be created, use lowpart_subreg of operands[0] rather than operands[0]
24548 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
24549 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
24550 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
24551 and n constraint instead of aarch64_shift_imm_di and Usd.
24552 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
24553 (*aarch64_<optab>_reg_minus<mode>3): ... this.
24555 2018-03-20 Sudakshina Das <sudi.das@arm.com>
24558 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
24559 to favor GPR over NEON registers.
24560 (<shift>di3_neon): Likewise.
24562 2018-03-20 Tom de Vries <tom@codesourcery.com>
24565 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
24566 (nvptx_process_pars): Emit bar.sync asap and alap.
24568 2018-03-20 Tom de Vries <tom@codesourcery.com>
24571 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
24572 seen_label if seen_label is already set.
24574 2018-03-20 Jakub Jelinek <jakub@redhat.com>
24577 * config/i386/i386.c (fold_builtin_cpu): For features above 31
24578 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
24579 Use 1U instead of 1. Formatting fixes.
24582 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
24583 instead of TREE_TYPE (s1) for the return value.
24585 2018-03-19 Jakub Jelinek <jakub@redhat.com>
24587 PR tree-optimization/84946
24588 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
24589 bitsize + bitsize in poly_uint64 rather than poly_int64.
24592 * dwarf2asm.c: Include fold-const.c.
24593 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
24594 of decl rather than decl itself.
24596 PR rtl-optimization/84643
24597 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
24599 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
24602 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
24603 calling assemble_variable.
24605 2018-03-19 Sudakshina Das <sudi.das@arm.com>
24608 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
24609 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
24611 2018-03-19 Jim Wilson <jimw@sifive.com>
24614 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
24615 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
24616 (riscv_first_stack_step): Likewise.
24617 (riscv_option_override): Use STACK_BOUNDARY instead of
24618 MIN_STACK_BOUNDARY.
24619 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
24620 MIN_STACK_BOUNDARY.
24621 (BIGGEST_ALIGNMENT): Set to 128.
24622 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
24623 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
24626 2018-03-19 Richard Biener <rguenther@suse.de>
24628 PR tree-optimization/84933
24629 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
24630 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
24632 2018-03-19 Richard Biener <rguenther@suse.de>
24634 PR tree-optimization/84859
24635 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
24636 (cond_if_else_store_replacement): Perform sinking operation on
24637 single-store BBs regardless of MAX_STORES_TO_SINK setting.
24638 Generalize what a BB with a single eligible store is.
24640 2018-03-19 Richard Biener <rguenther@suse.de>
24642 PR tree-optimization/84929
24643 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
24644 chrec_is_positive against non-chrec arg.
24646 2018-03-19 Tamar Christina <tamar.christina@arm.com>
24649 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
24651 2018-03-18 Martin Liska <mliska@suse.cz>
24653 PR rtl-optimization/84635
24654 * regrename.c (build_def_use): Use matches_mode only when
24657 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
24659 PR tree-optimization/84913
24660 * tree-vect-loop.c (vectorizable_reduction): Don't try to
24661 vectorize chains of COND_EXPRs.
24663 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24665 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
24667 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24669 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
24671 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
24673 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
24675 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
24676 Kito Cheng <kito.cheng@gmail.com>
24678 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
24679 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
24680 (nds32_adjust_reg_alloc_order): New function.
24681 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
24683 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
24685 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
24686 nds32_print_operand, nds32_print_operand_address): Use
24687 HOST_WIDE_INT_PRINT_DEC instead.
24689 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
24691 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
24693 2018-03-17 Jakub Jelinek <jakub@redhat.com>
24696 * config/i386/i386.c (initial_ix86_tune_features,
24697 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
24698 unsigned long long.
24699 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
24700 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
24701 rather than 1u << ix86_tune. Formatting fix.
24702 (ix86_option_override_internal): Change ix86_arch_mask from
24703 unsigned int to unsigned HOST_WIDE_INT, initialize to
24704 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
24705 (ix86_function_specific_restore): Likewise.
24707 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24710 * postreload.c (reload_combine_recognize_pattern): Perform
24711 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
24712 truncate_int_for_mode the result for the destination's mode.
24715 * hsa-gen.c (mem_type_for_type): Fix comment typo.
24716 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
24718 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24721 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
24724 * lra-assigns.c (lra_split_hard_reg_for): Don't use
24725 regno_allocno_class_array and sorted_pseudos.
24726 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
24727 insns where regno is used.
24729 2018-03-16 Martin Liska <mliska@suse.cz>
24732 * multiple_target.c (create_dispatcher_calls): Redirect
24733 reference in the symbol table.
24735 2018-03-16 Martin Liska <mliska@suse.cz>
24738 * multiple_target.c (create_dispatcher_calls): Redirect also
24741 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24745 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
24746 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
24747 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
24749 2018-03-16 Julia Koval <julia.koval@intel.com>
24751 * doc/invoke.texi (Skylake Server): Add CLWB.
24752 Cannonlake): Remove CLWB.
24754 2018-03-16 Jakub Jelinek <jakub@redhat.com>
24756 PR tree-optimization/84841
24757 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
24759 (FLOAT_ONE_CONST_TYPE): Define.
24760 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
24761 (sort_by_operand_rank): Put entries with higher constant_type last
24762 rather than first to match comments.
24764 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
24766 * config/nios2/nios2.md (movsi_internal): Fix thinko in
24769 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24772 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
24773 check and use address of target always.
24775 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
24778 * config/i386/i386.c (indirect_thunk_needed): Update comments.
24779 (indirect_thunk_bnd_needed): Likewise.
24780 (indirect_thunks_used): Likewise.
24781 (indirect_thunks_bnd_used): Likewise.
24782 (indirect_return_needed): New.
24783 (indirect_return_bnd_needed): Likewise.
24784 (output_indirect_thunk_function): Add a bool argument for
24786 (output_indirect_thunk_function): Don't generate alias for
24787 function return thunk.
24788 (ix86_code_end): Call output_indirect_thunk_function to generate
24789 function return thunks.
24790 (ix86_output_function_return): Set indirect_return_bnd_needed
24791 and indirect_return_needed instead of indirect_thunk_bnd_needed
24792 and indirect_thunk_needed.
24794 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
24796 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
24797 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
24798 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
24800 2018-03-15 David Malcolm <dmalcolm@redhat.com>
24801 Paul Hua <paul.hua.gm@gmail.com>
24804 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
24806 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
24808 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
24809 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
24810 resp. SFmode cases.
24812 2018-03-15 Tamar Christina <tamar.christina@arm.com>
24815 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
24816 instead of GET_MODE_SIZE when comparing Units.
24818 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
24821 * varasm.c (hash_section): Return an unchangeble hash value
24822 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
24823 Return !aarch64_can_use_per_function_literal_pools_p ().
24825 2018-03-15 Jakub Jelinek <jakub@redhat.com>
24828 * optabs.c (emit_conditional_move): Pass address of cmode's copy
24829 rather than address of cmode as last argument to prepare_cmp_insn.
24831 2018-03-15 Julia Koval <julia.koval@intel.com>
24833 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
24834 F_AVX512VNNI, F_AVX512BITALG): New.
24836 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
24839 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
24840 insn for floating-point loads and stores.
24842 2018-03-14 Carl Love <cel@us.ibm.com>
24844 * config/rs6000/rs6000-c.c: Add macro definitions for
24845 ALTIVEC_BUILTIN_VEC_PERMXOR.
24846 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
24847 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
24848 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
24849 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
24851 * config/doc/extend.texi: Add prototypes for vec_permxor.
24853 2018-03-14 David Malcolm <dmalcolm@redhat.com>
24856 * diagnostic-show-locus.c (class layout_point): Convert m_line
24857 from int to linenum_type.
24858 (line_span::comparator): Use linenum "compare" function when
24859 comparing line numbers.
24860 (test_line_span): New function.
24861 (layout_range::contains_point): Convert param "row" from int to
24863 (layout_range::intersects_line_p): Likewise.
24864 (layout::will_show_line_p): Likewise.
24865 (layout::print_source_line): Likewise.
24866 (layout::should_print_annotation_line_p): Likewise.
24867 (layout::print_annotation_line): Likewise.
24868 (layout::print_leading_fixits): Likewise.
24869 (layout::annotation_line_showed_range_p): Likewise.
24870 (struct line_corrections): Likewise for field m_row.
24871 (line_corrections::line_corrections): Likewise for param "row".
24872 (layout::print_trailing_fixits): Likewise.
24873 (layout::get_state_at_point): Likewise.
24874 (layout::get_x_bound_for_row): Likewise.
24875 (layout::print_line): Likewise.
24876 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
24877 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
24878 * input.c (selftest::test_linenum_comparisons): New function.
24879 (selftest::input_c_tests): Call it.
24880 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
24881 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
24882 * selftest.h (ASSERT_GT): New macro.
24883 (ASSERT_GT_AT): New macro.
24884 (ASSERT_LT): New macro.
24885 (ASSERT_LT_AT): New macro.
24887 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
24889 PR rtl-optimization/84780
24890 * combine.c (distribute_links): Don't make a link based on pc_rtx.
24892 2018-03-14 Martin Liska <mliska@suse.cz>
24894 * tree.c (record_node_allocation_statistics): Use
24895 get_stats_node_kind.
24896 (get_stats_node_kind): New function extracted from
24897 record_node_allocation_statistics.
24898 (free_node): Use get_stats_node_kind.
24900 2018-03-14 Richard Biener <rguenther@suse.de>
24902 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
24903 that the value-set of ANTIC_IN doesn't grow.
24906 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24908 (BB_VISITED_WITH_VISITED_SUCCS): New define.
24909 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24911 2018-03-14 Julia Koval <julia.koval@intel.com>
24913 * config.gcc (icelake-client, icelake-server): New.
24915 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
24916 (initial_ix86_arch_features): Ditto.
24917 (PTA_SKYLAKE): Add SGX.
24918 (PTA_ICELAKE): Remove.
24919 (PTA_ICELAKE_CLIENT): New.
24920 (PTA_ICELAKE_SERVER): New.
24921 (ix86_option_override_internal): Split up icelake on icelake client and
24923 (get_builtin_code_for_version): Ditto.
24924 (fold_builtin_cpu): Ditto.
24925 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
24926 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
24927 * config/i386/i386.h (processor_type): Ditto.
24928 * doc/invoke.texi: Ditto.
24930 2018-03-14 Jakub Jelinek <jakub@redhat.com>
24933 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
24934 INTEGER_CST offset, add it together with bitpos / 8 and
24935 sign extend based on POINTER_SIZE.
24939 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
24942 * config/i386/constraints.md (Yc): New register constraint.
24943 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
24944 Use Yc constraint for alternative 2 of operand 0. Remove
24945 preferred_for_speed attribute.
24947 2018-03-14 Richard Biener <rguenther@suse.de>
24949 PR tree-optimization/84830
24950 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
24951 with the old one to avoid oscillations.
24953 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
24956 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
24958 (assign_by_spills): Return a flag of reload assignment failure.
24959 Do not process the reload assignment failures. Do not spill other
24960 reload pseudos if they has the same reg class. Update n if
24962 (lra_assign): Add a return arg. Set up from the result of
24963 assign_by_spills call.
24964 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24965 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
24966 usage_insns if it is not NULL.
24967 (spill_hard_reg_in_range): New function.
24968 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24969 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24970 function prototypes.
24971 (lra_assign): Change prototype.
24972 * lra.c (lra): Add code to deal with fails by splitting hard reg
24975 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
24977 * config/riscv/riscv.opt (mrelax): New option.
24978 * config/riscv/riscv.c (riscv_file_start): Emit ".option
24979 "norelax" when riscv_mrelax is disabled.
24980 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
24982 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
24985 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
24986 reassociation for int modes.
24988 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
24990 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
24991 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
24993 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
24994 * config/aarch64/aarch64-sve.md
24995 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
24996 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
24997 (*extend<mode><Vwide>2): Rename to...
24998 (aarch64_sve_extend<mode><Vwide>2): ...this.
24999 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
25000 renaming the old pattern to...
25001 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
25003 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
25004 define_expand, renaming the old pattern to...
25005 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
25006 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
25007 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
25008 account when deciding which SVE instruction the optab should use.
25009 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
25011 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25013 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
25014 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
25015 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
25016 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
25017 (tlsdesc_small_<mode>): Turn a define_expand and use
25018 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
25019 (tlsdesc_small_advsimd_<mode>): ...this.
25020 (tlsdesc_small_sve_<mode>): New pattern.
25022 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
25024 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
25025 (UNSPEC_UMUL_HIGHPART): New constants.
25026 (MUL_HIGHPART): New int iteraor.
25027 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
25028 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
25030 (*<su>mul<mode>3_highpart): New define_insn.
25032 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
25035 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
25038 2018-03-13 Martin Liska <mliska@suse.cz>
25041 * (sem_item_optimizer::sem_item_optimizer): Initialize new
25043 (sem_item_optimizer::~sem_item_optimizer): Release it.
25044 (sem_item_optimizer::merge_classes): Register variable aliases.
25045 (sem_item_optimizer::fixup_pt_set): New function.
25046 (sem_item_optimizer::fixup_points_to_sets): Likewise.
25047 * ipa-icf.h: Declare new variables and functions.
25049 2018-03-13 Jakub Jelinek <jakub@redhat.com>
25051 PR middle-end/84834
25052 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
25053 integer_pow2p@2 and test integer_pow2p in condition.
25054 (A < 0 ? C : 0): Similarly for @1.
25056 PR middle-end/84831
25057 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
25058 characters starting at p contain '\0' character, don't look beyond
25062 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
25063 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
25066 * reg-stack.c (change_stack): Change update_end var from int to
25067 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
25068 also call set_block_for_insn on the newly added insns and rescan.
25071 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
25072 on the last operand.
25075 * tree.c (stabilize_reference_1): Return save_expr (e) for
25076 STATEMENT_LIST even if it doesn't have side-effects.
25078 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
25080 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
25082 2018-03-12 Renlin Li <renlin.li@arm.com>
25084 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
25085 aarch64_output_scalar_simd_mov_immediate.
25087 2018-03-12 Martin Sebor <msebor@redhat.com>
25089 PR tree-optimization/83456
25090 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
25091 for perfectly overlapping calls to memcpy.
25092 (gimple_fold_builtin_memory_chk): Same.
25093 (gimple_fold_builtin_strcpy): Handle no-warning.
25094 (gimple_fold_builtin_stxcpy_chk): Same.
25095 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
25097 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
25099 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
25100 parameter. Use it for SFmode.
25101 (rs6000_function_arg_advance_1): Adjust.
25102 (rs6000_function_arg): Adjust.
25103 (rs6000_gimplify_va_arg): Pass false for that new parameter.
25105 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
25107 PR rtl-optimization/84169
25108 PR rtl-optimization/84780
25109 * combine.c (can_combine_p): Check for a 2-insn combination whether
25110 the destination register is used between the two insns, too.
25112 2018-03-12 Richard Biener <rguenther@suse.de>
25114 PR tree-optimization/84803
25115 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
25116 for refs DR analysis didn't process.
25118 2018-03-12 Richard Biener <rguenther@suse.de>
25120 PR tree-optimization/84777
25121 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
25122 force-vectorize loops ignore whether we are optimizing for size.
25124 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
25126 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
25127 (TARGET_MD_ASM_ADJUST): Define.
25129 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
25130 Kito Cheng <kito.cheng@gmail.com>
25131 Chung-Ju Wu <jasonwucj@gmail.com>
25133 * config/nds32/nds32.c (nds32_compute_stack_frame,
25134 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
25135 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
25136 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
25137 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
25138 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
25139 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
25140 * config/nds32/nds32.md (prologue, epilogue): Use macro
25141 NDS32_V3PUSH_AVAILABLE_P to do checking.
25143 2018-03-11 Jakub Jelinek <jakub@redhat.com>
25146 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
25147 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
25148 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
25149 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
25150 addition of most attributes on !orig_type_die or the attribute not
25151 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
25153 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25154 Chung-Ju Wu <jasonwucj@gmail.com>
25156 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
25157 __NDS32_VH__ macro.
25158 * config/nds32/nds32.opt (mvh): New option.
25160 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25161 Chung-Ju Wu <jasonwucj@gmail.com>
25163 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
25165 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
25166 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
25169 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
25170 Chung-Ju Wu <jasonwucj@gmail.com>
25172 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
25174 * config/nds32/nds32-multiple.md (strlensi): New pattern.
25175 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
25177 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
25178 Kito Cheng <kito.cheng@gmail.com>
25179 Chung-Ju Wu <jasonwucj@gmail.com>
25181 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
25182 UNSPEC_FFMISM and UNSPEC_FLMISM.
25183 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
25184 for ffb, ffmism and flmism.
25185 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
25186 (unspec_ffmism): Ditto.
25187 (unspec_flmism): Ditto.
25188 (nds32_expand_builtin_impl): Check if string extension is available.
25189 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
25190 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
25192 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
25195 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
25198 * lra-assigns.c (assign_by_spills): Return a flag of reload
25199 assignment failure. Do not process the reload assignment
25200 failures. Do not spill other reload pseudos if they has the same
25202 (lra_assign): Add a return arg. Set up from the result of
25203 assign_by_spills call.
25204 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25205 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25206 usage_insns if it is not NULL.
25207 (spill_hard_reg_in_range): New function.
25208 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25209 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25210 function prototypes.
25211 (lra_assign): Change prototype.
25212 * lra.c (lra): Add code to deal with fails by splitting hard reg
25215 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
25218 * config/i386/i386.opt: Replace Enforcment with Enforcement.
25220 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
25223 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
25224 (dw_val_node): Add val_symbolic_view.
25225 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
25226 (symview_upper_bound): New.
25227 (new_line_info_table): Initialize symviews_since_reset.
25228 (dwarf2out_source_line): Count symviews_since_reset and set
25229 symview_upper_bound.
25230 (dw_val_equal_p): Handle symview.
25231 (add_AT_symview): New.
25232 (print_dw_val): Handle symview.
25233 (attr_checksum, attr_checksum_ordered): Likewise.
25234 (same_dw_val_p, size_of_die): Likewise.
25235 (value_format, output_die): Likewise.
25236 (add_high_low_attributes): Use add_AT_symview for entry_view.
25237 (dwarf2out_finish): Reset symview_upper_bound, clear
25240 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
25243 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
25244 Add strict argument and use it.
25245 (rs6000_split_multireg_move): Update for new strict argument.
25246 (mem_operand_gpr): Disallow all non-offsettable addresses.
25247 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
25249 2018-03-09 Jakub Jelinek <jakub@redhat.com>
25252 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
25253 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
25254 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
25257 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
25258 decl, use remap_type if we want to use the type.
25260 2018-03-09 Martin Sebor <msebor@redhat.com>
25262 PR tree-optimization/84526
25263 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
25265 (builtin_access::generic_overlap): Be prepared to handle non-array
25268 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
25270 PR rtl-optimization/84682
25271 * lra-constraints.c (process_address_1): Check is_address flag
25272 for address constraints.
25273 (process_alt_operands): Likewise.
25274 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
25275 preprocess_constraints.
25276 * recog.h (preprocess_constraints): Add oploc parameter.
25278 * recog.c (preprocess_constraints): Test address_operand for
25279 CT_ADDRESS constraints.
25281 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
25284 * lra-assigns.c (assign_by_spills): Return a flag of reload
25285 assignment failure. Do not process the reload assignment
25286 failures. Do not spill other reload pseudos if they has the same
25288 (lra_assign): Add a return arg. Set up from the result of
25289 assign_by_spills call.
25290 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
25291 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
25292 usage_insns if it is not NULL.
25293 (spill_hard_reg_in_range): New function.
25294 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
25295 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
25296 function prototypes.
25297 (lra_assign): Change prototype.
25298 * lra.c (lra): Add code to deal with fails by splitting hard reg
25301 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25304 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
25305 Accept complain bool parameter. Only emit errors if it is true.
25306 (arm_parse_cpu_option_name): Likewise.
25307 (arm_target_thumb_only): Adjust callers of the above.
25308 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
25309 prototype to take a default true bool parameter.
25310 (arm_parse_arch_option_name): Likewise.
25312 2018-03-09 David Malcolm <dmalcolm@redhat.com>
25313 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
25317 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
25318 * configure: Regenerate.
25319 * configure.ac ("linker --version-script option"): New.
25320 ("linker soname option"): New.
25322 2018-03-09 Richard Biener <rguenther@suse.de>
25324 PR tree-optimization/84775
25325 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
25326 immediate uses of predicate stmts and mark them modified.
25329 PR tree-optimization/84178
25330 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25332 (version_loop_for_if_conversion): Delay update_ssa call.
25333 (tree_if_conversion): Delay update_ssa until after predicate
25336 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
25339 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
25340 when the function accesses prior frames.
25342 2018-03-08 Jakub Jelinek <jakub@redhat.com>
25345 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
25346 gen_llsym, otherwise call maybe_gen_llsym.
25348 PR inline-asm/84742
25349 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
25350 has ',' character inside of it.
25352 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
25355 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
25356 as clobbering CC_REGNUM.
25358 2018-03-08 Richard Biener <rguenther@suse.de>
25360 PR middle-end/84552
25361 * tree-scalar-evolution.c: Include tree-into-ssa.h.
25362 (follow_copies_to_constant): Do not follow SSA names registered
25365 2018-03-08 Richard Biener <rguenther@suse.de>
25367 PR tree-optimization/84178
25368 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25370 (version_loop_for_if_conversion): Delay update_ssa call.
25371 (tree_if_conversion): Delay update_ssa until after predicate
25374 2018-03-08 David Malcolm <dmalcolm@redhat.com>
25376 PR tree-optimization/84178
25377 * tree-if-conv.c (release_bb_predicate): Remove the
25378 the assertion that the stmts have NULL use_ops.
25379 Discard the statements, asserting that they haven't
25380 yet been added to a BB.
25382 2018-03-08 Richard Biener <rguenther@suse.de>
25384 PR tree-optimization/84746
25385 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
25386 (phi_translate): Pass in destination ANTIC_OUT set.
25387 (phi_translate_1): Likewise. For a simplified result lookup
25388 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
25389 (phi_translate_set): Adjust.
25390 (do_pre_regular_insertion): Likewise.
25391 (do_pre_partial_partial_insertion): Likewise.
25393 2018-03-08 Martin Liska <mliska@suse.cz>
25395 PR gcov-profile/84735
25396 * doc/gcov.texi: Document usage of profile files.
25397 * gcov-io.h: Document changes in the format.
25399 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
25403 * dwarf2out.c (struct dw_line_info_table): Update comments for
25405 (FORCE_RESET_NEXT_VIEW): New.
25406 (FORCE_RESETTING_VIEW_P): New.
25407 (RESETTING_VIEW_P): Check for -1 too.
25408 (ZERO_VIEW_P): Likewise.
25409 (new_line_info_table): Force-reset next view.
25410 (dwarf2out_begin_function): Likewise.
25411 (dwarf2out_source_line): Simplify zero_view_p initialization.
25412 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
25413 view directly. Omit view when omitting .loc at line 0.
25415 2018-03-08 Jakub Jelinek <jakub@redhat.com>
25417 PR tree-optimization/84740
25418 * tree-switch-conversion.c (process_switch): Call build_constructors
25419 only if info.phi_count is non-zero.
25421 PR tree-optimization/84739
25422 * tree-tailcall.c (find_tail_calls): Check call arguments against
25423 DECL_ARGUMENTS (current_function_decl) rather than
25424 DECL_ARGUMENTS (func) when checking for tail recursion.
25426 2018-03-07 Jakub Jelinek <jakub@redhat.com>
25428 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
25429 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
25430 Volker Reichelt's entry and add entries for people that perform
25431 GCC fuzzy testing and report numerous bugs.
25433 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
25436 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
25437 readonly data in sdata, if that is disabled.
25438 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
25439 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
25440 -mreadonly-in-sdata option.
25442 2018-03-07 Martin Sebor <msebor@redhat.com>
25444 PR tree-optimization/84468
25445 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
25446 basic block when looking for nul assignment.
25448 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
25451 * except.h (output_function_exception_table): Adjust prototype.
25452 * except.c (output_function_exception_table): Remove FNNAME parameter
25453 and add SECTION parameter. Ouput one part of the table at a time.
25454 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
25455 the first part of the exception table and emit unwind directives.
25456 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
25457 (i386_pe_seh_cold_init): Likewise.
25458 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
25459 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
25460 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
25461 (ix86_output_call_insn): Emit a nop in one more case for SEH.
25462 * config/i386/winnt.c: Include except.h.
25463 (struct seh_frame_state): Add reg_offset, after_prologue and
25464 in_cold_section fields.
25465 (i386_pe_seh_end_prologue): Set seh->after_prologue.
25466 (i386_pe_seh_cold_init): New function.
25467 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
25468 to seh->in_cold_section.
25469 (seh_emit_push): Record the offset of the push.
25470 (seh_emit_save): Record the offet of the save.
25471 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
25472 Test seh->after_prologue to disregard the epilogue.
25473 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
25474 (i386_pe_end_cold_function): New function.
25476 2018-03-07 Jakub Jelinek <jakub@redhat.com>
25479 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
25480 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
25483 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
25485 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
25486 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
25488 PR middle-end/84723
25489 * multiple_target.c: Include tree-inline.h and intl.h.
25490 (expand_target_clones): Diagnose and fail if node->definition and
25491 !tree_versionable_function_p (node->decl).
25493 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
25495 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
25497 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
25498 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
25499 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
25501 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25504 * combine.c (try_combine): Use reg_or_subregno instead of handling
25505 just paradoxical SUBREGs and REGs.
25507 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
25509 * config/arc/arc.c (arc_finalize_pic): Remove function.
25510 (arc_must_save_register): We use single base PIC register, remove
25511 checks to save/restore the PIC register.
25512 (arc_expand_prologue): Likewise.
25513 * config/arc/arc-protos.h (arc_set_default_type_attributes):
25515 (arc_verify_short): Likewise.
25516 (arc_attr_type): Likewise.
25517 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
25518 (walk_stores): Likewise.
25519 (arc_address_cost): Make it static.
25520 (arc_verify_short): Likewise.
25521 (branch_dest): Likewise.
25522 (arc_attr_type): Likewise.
25523 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
25524 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
25525 (arc_final_prescan_insn): Remove inserting the nops due to
25526 hardware hazards. It is done in reorg step.
25527 (insn_length_variant_t): Remove.
25528 (insn_length_parameters_t): Likewise.
25529 (arc_insn_length_parameters): Likewise.
25530 (arc_get_insn_variants): Likewise.
25531 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
25533 2018-03-06 Jakub Jelinek <jakub@redhat.com>
25535 PR inline-asm/84683
25536 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
25539 PR tree-optimization/84687
25540 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
25542 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
25544 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
25546 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
25547 Rename to ppc_speculation_barrier.
25548 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
25549 __builtin_ppc_speculation_barrier.
25551 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25554 * combine.c (combine_simplify_rtx): Don't try to simplify if
25555 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
25558 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
25560 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
25561 to 32 bytes when compiling for POWER9.
25563 2018-03-05 Jakub Jelinek <jakub@redhat.com>
25566 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
25567 regparm >= 3 with no arg reg available also for calls with
25568 flag_force_indirect_call. Pass decl to ix86_function_regparm.
25571 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
25573 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
25575 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
25578 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
25580 2018-03-05 Richard Biener <rguenther@suse.de>
25582 PR tree-optimization/84486
25583 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
25584 When inserting a __builtin_assume_aligned call set the LHS
25585 SSA name alignment info accordingly.
25587 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
25589 PR tree-optimization/84114
25590 * config/aarch64/aarch64.c (aarch64_reassociation_width)
25591 Avoid reassociation of FLOAT_MODE addition.
25593 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
25595 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
25596 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
25597 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
25598 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
25599 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
25600 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
25601 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
25603 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
25604 __builtin_ia32_wbinvd): New builtins.
25605 (SPECIAL_ARGS2): New.
25606 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
25607 (SPECIAL_ARGS2): New.
25608 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
25609 (ix86_valid_target_attribute_inner_p): Ditto.
25610 (ix86_init_mmx_sse_builtins): Add special_args2.
25611 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
25612 TARGET_WBNOINVD_P): New.
25613 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
25614 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
25615 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
25616 * config/i386/immintrin.h (_wbinvd): New intrinsic.
25617 * config/i386/pconfigintrin.h: New file.
25618 * config/i386/wbnoinvdintrin.h: Ditto.
25619 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
25621 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
25623 2018-03-05 Richard Biener <rguenther@suse.de>
25625 PR tree-optimization/84670
25626 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25628 (BB_VISITED_WITH_VISITED_SUCCS): New define.
25629 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25630 (compute_antic_aux): Only assert the number of values in ANTIC_IN
25631 doesn't grow if all successors (recursively) were visited at least
25634 2018-03-05 Richard Biener <rguenther@suse.de>
25636 PR tree-optimization/84650
25637 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
25638 if executed in the loop pipeline.
25640 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
25642 * doc/configfiles.texi (Configuration Files): Move info about
25643 conditionalizing $target-protos.h to...
25644 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
25645 differs from $target-protos.h.
25647 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
25648 Chung-Ju Wu <jasonwucj@gmail.com>
25650 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
25651 * config/nds32/nds32-multiple.md (setmemsi): Define.
25652 * config/nds32/nds32-memory-manipulation.c
25653 (nds32_gen_dup_4_byte_to_word_value): New.
25654 (emit_setmem_word_loop): New.
25655 (emit_setmem_byte_loop): New.
25656 (nds32_expand_setmem_loop): New.
25657 (nds32_expand_setmem_loop_v3m): New.
25658 (nds32_expand_setmem_unroll): New.
25659 (nds32_expand_setmem): New.
25661 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25662 Chung-Ju Wu <jasonwucj@gmail.com>
25664 * config/nds32/nds32-memory-manipulation.c
25665 (nds32_emit_load_store): New.
25666 (nds32_emit_post_inc_load_store): New.
25667 (nds32_emit_mem_move): New.
25668 (nds32_emit_mem_move_block): New.
25669 (nds32_expand_movmemsi_loop_unknown_size): New.
25670 (nds32_expand_movmemsi_loop_known_size): New.
25671 (nds32_expand_movmemsi_loop): New.
25672 (nds32_expand_movmemsi_unroll): New.
25673 (nds32_expand_movmemqi): Rename ...
25674 (nds32_expand_movmemsi): ... to this.
25675 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
25676 (movmemsi): ... to this.
25677 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
25678 (nds32_expand_movmemsi): ... to this.
25680 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25681 Monk Chiang <sh.chiang04@gmail.com>
25682 Chung-Ju Wu <jasonwucj@gmail.com>
25684 * config/nds32/nds32-protos.h
25685 (nds32_expand_load_multiple): New arguments.
25686 (nds32_expand_store_multiple): Ditto.
25687 (nds32_valid_multiple_load_store): Rename ...
25688 (nds32_valid_multiple_load_store_p): ... to this.
25689 * config/nds32/nds32-memory-manipulation.c
25690 (nds32_expand_load_multiple): Refine implementation.
25691 (nds32_expand_store_multiple): Ditto.
25692 * config/nds32/nds32-multiple.md
25693 (load_multiple): Update nds32_expand_load_multiple interface.
25694 (store_multiple): Update nds32_expand_store_multiple interface.
25695 * config/nds32/nds32-predicates.c
25696 (nds32_valid_multiple_load_store): Rename ...
25697 (nds32_valid_multiple_load_store_p): ... to this and refine
25699 * config/nds32/predicates.md
25700 (nds32_load_multiple_and_update_address_operation): New predicate.
25701 (nds32_store_multiple_and_update_address_operation): New predicate.
25703 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
25704 Chung-Ju Wu <jasonwucj@gmail.com>
25706 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
25707 (combo): New attribute.
25708 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
25710 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
25712 * config/nds32/nds32.opt: Change -mcmodel= default value.
25714 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
25715 Monk Chiang <sh.chiang04@gmail.com>
25716 Chung-Ju Wu <jasonwucj@gmail.com>
25718 * config/nds32/constants.md (unspec_element): New enum.
25719 * config/nds32/constraints.md (Umw): New constraint.
25720 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
25721 * config/nds32/nds32-intrinsic.md: Likewise.
25722 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
25723 (nds32_valid_smw_lwm_base_p): New.
25724 (nds32_output_smw_single_word): New.
25725 (nds32_output_lmw_single_word): New.
25726 (nds32_expand_unaligned_load): New.
25727 (nds32_expand_unaligned_store): New.
25728 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
25729 (nds32_output_smw_single_word): Declare.
25730 (nds32_output_lmw_single_word): Declare.
25731 (nds32_expand_unaligned_load): Declare.
25732 (nds32_expand_unaligned_store): Declare.
25733 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
25734 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
25735 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
25736 NDS32_BUILTIN_UASTORE_DW.
25737 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
25740 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
25741 Kito Cheng <kito.cheng@gmail.com>
25742 Chung-Ju Wu <jasonwucj@gmail.com>
25744 * config/nds32/nds32-intrinsic.c
25745 (nds32_expand_builtin_null_ftype_reg): Delete.
25746 (nds32_expand_builtin_reg_ftype_imm): Ditto.
25747 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
25748 (nds32_read_argument): New.
25749 (nds32_legitimize_target): Ditto.
25750 (nds32_legitimize_argument): Ditto.
25751 (nds32_check_constant_argument): Ditto.
25752 (nds32_expand_unop_builtin): Ditto.
25753 (nds32_expand_unopimm_builtin): Ditto.
25754 (nds32_expand_binop_builtin): Ditto.
25755 (nds32_builtin_decl_impl): Ditto.
25756 (builtin_description): Ditto.
25757 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
25758 (nds32_init_builtins_impl): Ditto.
25759 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
25760 (nds32_builtin_decl): New.
25761 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
25762 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
25764 2018-03-02 Jeff Law <law@redhat.com>
25766 * reorg.c (stop_search_p): Handle DEBUG_INSN.
25767 (redundant_insn, fill_simple_delay_slots): Likewise.
25768 (fill_slots_from_thread): Likewise.
25769 * resource.c (mark_referenced_resources): Likewise.
25770 (mark_set_resources, find_dead_or_set_registers): Likewise.
25772 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25774 * substring-locations.h (format_warning_va): Formatting fix for
25775 ATTRIBUTE_GCC_DIAG.
25776 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
25778 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
25779 * substring-locations.c: Include intl.h.
25780 (format_warning_va): Turned into small wrapper around
25781 format_warning_n_va, renamed to ...
25782 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
25783 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
25785 (format_warning_at_substring_n): New function.
25786 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
25787 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
25788 format_warning_at_substring with just a shorter name instead of
25789 const function pointer.
25790 (fmtwarn_n): New function.
25791 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
25792 appropriate, get rid of all the fmtstr temporaries, move conditionals
25793 with G_() wrapped string literals directly into fmtwarn arguments,
25794 cast dir.len to (int), formatting fixes.
25796 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
25798 * doc/invoke.texi: Remove "Cilk Plus" references.
25800 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25801 Richard Biener <rguenther@suse.de>
25804 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
25805 for error or warning attributes if CALL_FROM_THUNK_P is set.
25808 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25811 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
25812 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
25815 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
25816 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
25818 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
25819 instead of -1U in last predictors element's probability member.
25821 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
25824 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25825 arguments if they are comparable.
25827 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25829 PR tree-optimization/84634
25830 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
25831 masks and masked_loop_p with a single loop_masks, making sure it's
25832 null for bb vectorization.
25834 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
25836 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
25837 (vect_analyze_data_ref_access): Use loop->safe_len rather than
25838 loop->force_vectorize to check whether there is no alias.
25840 2018-03-02 Jakub Jelinek <jakub@redhat.com>
25843 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
25845 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
25847 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
25848 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
25849 instead of a loop around prev_real_insn.
25850 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
25853 PR inline-asm/84625
25854 * config/i386/i386.c (ix86_print_operand): Use conditional
25855 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
25858 2018-03-02 Richard Biener <rguenther@suse.de>
25860 PR tree-optimization/84427
25861 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
25862 (bitmap_set_subtract_values): Rewrite to handle multiple
25865 (prune_clobbered_mems): Likewise.
25866 (phi_translate): Take edge instead of pred/phiblock.
25867 (phi_translate_1): Likewise.
25868 (phi_translate_set): Likewise. Insert all translated
25869 exprs for a value into the set, keeping possibly multiple
25870 expressions per value.
25871 (compute_antic_aux): Adjust for phi_translate changes.
25872 When intersecting union the expressions and prune those
25873 not in the final value set, keeping possibly multiple
25874 expressions per value. Do not use value-insertion
25875 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
25876 all expressions. Add verification that the value-sets
25877 only shrink during iteration.
25878 (compute_partial_antic_aux): Adjust for the phi_translate changes.
25879 (do_pre_regular_insertion): Likewise.
25880 (do_pre_partial_partial_insertion): Likewise.
25882 2018-03-02 Richard Biener <rguenther@suse.de>
25885 * config/darwin.c (saved_debug_info_level): New static global.
25886 (darwin_asm_lto_start): Disable debug info generation for LTO out.
25887 (darwin_asm_lto_end): Restore debug info generation settings.
25889 2018-03-01 Martin Liska <mliska@suse.cz>
25892 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
25893 volatile arguments.
25895 2018-03-01 Richard Biener <rguenther@suse.de>
25898 * dwarf2out.c (gen_variable_die): Properly handle late VLA
25899 type annotation with LTO when debug was disabled at compile-time.
25901 2018-03-01 Matthew Fortune <mfortune@gmail.com>
25903 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
25905 (mips_final_postscan_insn): Likewise.
25907 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
25909 PR rtl-optimization/84528
25910 * alias.c (init_alias_target): Add commentary.
25911 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
25912 a unique base value if the frame pointer is not eliminated
25913 to the stack pointer.
25915 2018-03-01 Tom de Vries <tom@codesourcery.com>
25917 PR rtl-optimization/83327
25918 * lra-int.h (hard_regs_spilled_into): Declare.
25919 * lra.c (hard_regs_spilled_into): Define.
25920 (init_reg_info): Init hard_regs_spilled_into.
25921 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
25922 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
25923 (process_bb_lives): Handle hard_regs_spilled_into.
25924 (lra_create_live_ranges_1): Before doing liveness propagation, clear
25925 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
25927 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
25929 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
25930 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
25931 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
25932 * config/rs6000/aix72.h: New file.
25934 2018-02-28 Jakub Jelinek <jakub@redhat.com>
25936 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
25937 instead of warning_at with conditional singular and plural messages
25941 * stor-layout.c (update_alignment_for_field): For
25942 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
25943 && !DECL_PACKED (field), do the alignment update, just use
25944 only desired_align instead of MAX (type_align, desired_align)
25946 (place_field): Don't do known_align < desired_align handling
25947 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
25948 is non-NULL, instead do it after rli->prev_field handling and
25949 only if not within a bitfield word. For DECL_PACKED (field)
25950 use type_align of BITS_PER_UNIT.
25952 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
25954 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
25955 superfluous parentheses and trailing spaces.
25957 2018-02-28 Richard Biener <rguenther@suse.de>
25959 PR tree-optimization/84584
25960 * graphite-scop-detection.c (scop_detection::add_scop): Discard
25961 SCoPs with fake exit edge.
25963 2018-02-28 Martin Liska <mliska@suse.cz>
25966 * timevar.c (timer::print): Fix format to properly print 100%
25969 2018-02-28 Richard Biener <rguenther@suse.de>
25971 PR middle-end/84607
25972 * genmatch.c (capture_info::walk_match): Do not mark
25973 captured expressions without operands as expr_p given
25974 they act more like predicates and should be subject to
25975 "lost tail" side-effect preserving.
25977 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
25979 PR rtl-optimization/81611
25980 * auto-inc-dec.c (attempt_change): Move dead note from
25981 mem_insn if it's the next use of regno
25982 (find_address): Take address use of reg holding
25983 non-incremented value. Add parm to limit search to the named
25985 (merge_in_block): Attempt to use a mem insn that is the next
25986 use of the original regno.
25988 2018-02-27 Martin Sebor <msebor@redhat.com>
25991 * doc/invoke.texi (-Wmissing-attributes): New option.
25992 * print-tree.c (print_node): Handle DECL_UNINLINABLE.
25994 2018-02-27 Martin Sebor <msebor@redhat.com>
25996 PR translation/84207
25997 * diagnostic-core.h (warning_n, error_n, inform_n): Change
25998 n argument to unsigned HOST_WIDE_INT.
25999 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
26000 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
26001 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
26002 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
26004 2018-02-27 Richard Biener <rguenther@suse.de>
26006 PR tree-optimization/84512
26007 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
26008 Do not use the estimate returned from record_stmt_cost for
26009 the scalar iteration cost but sum properly using add_stmt_cost.
26011 2018-02-27 Richard Biener <rguenther@suse.de>
26013 PR tree-optimization/84466
26014 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26015 Adjust last change to less strictly validate use operands.
26017 2018-02-27 Martin Liska <mliska@suse.cz>
26019 PR gcov-profile/84548
26020 * gcov.c (process_file): Allow partial overlap and consider it
26021 also as group functions.
26022 (output_lines): Properly calculate range of lines for a group.
26024 2018-02-27 Martin Liska <mliska@suse.cz>
26026 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
26027 'ggc' suffixes. Change first column width.
26028 (timer::print): Fix formatting of the column.
26030 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
26032 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
26033 preserve inline entry blocks for the sake of debug inline
26034 entry point markers alone.
26035 (remove_unused_locals): Suggest in comments a better place to
26036 force the preservation of inline entry blocks that are
26037 otherwise unused, but do not preserve them.
26039 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26041 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
26043 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26046 * config/i386/constraints.md (Bs): Replace
26047 ix86_indirect_branch_register with
26048 TARGET_INDIRECT_BRANCH_REGISTER.
26050 * config/i386/i386.md (indirect_jump): Likewise.
26051 (tablejump): Likewise.
26052 (*sibcall_memory): Likewise.
26053 (*sibcall_value_memory): Likewise.
26054 Peepholes of indirect call and jump via memory: Likewise.
26055 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
26056 (*sibcall_value_GOT_32): Likewise.
26057 * config/i386/predicates.md (indirect_branch_operand): Likewise.
26058 (GOT_memory_operand): Likewise.
26059 (call_insn_operand): Likewise.
26060 (sibcall_insn_operand): Likewise.
26061 (GOT32_symbol_operand): Likewise.
26062 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
26064 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
26066 PR rtl-optimization/83496
26067 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
26068 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
26069 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
26070 redundant insn, if any.
26071 (relax_delay_slots): Likewise.
26072 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
26074 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
26076 PR tree-optimization/83965
26077 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
26078 that grouped statements are part of a reduction chain. Return
26079 true if the statement is not marked as a reduction itself but
26080 is part of a group.
26081 (vect_recog_dot_prod_pattern): Don't check whether the statement
26082 is part of a group here.
26083 (vect_recog_sad_pattern): Likewise.
26084 (vect_recog_widen_sum_pattern): Likewise.
26086 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
26089 * final.c (rest_of_clean_state): Also look for calls inside sequences.
26091 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
26094 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
26096 (ix86_output_indirect_function_return): New prototype.
26097 (ix86_split_simple_return_pop_internal): Likewise.
26098 * config/i386/i386.c (indirect_return_via_cx): New.
26099 (indirect_return_via_cx_bnd): Likewise.
26100 (indirect_thunk_name): Handle return va CX_REG.
26101 (output_indirect_thunk_function): Create alias for
26102 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
26103 (ix86_output_indirect_jmp): Remove the bool argument.
26104 (ix86_output_indirect_function_return): New function.
26105 (ix86_split_simple_return_pop_internal): Likewise.
26106 * config/i386/i386.md (*indirect_jump): Don't pass false
26107 to ix86_output_indirect_jmp.
26108 (*tablejump_1): Likewise.
26109 (simple_return_pop_internal): Change it to define_insn_and_split.
26110 Call ix86_split_simple_return_pop_internal to split it for
26111 -mfunction-return=.
26112 (simple_return_indirect_internal): Call
26113 ix86_output_indirect_function_return instead of
26114 ix86_output_indirect_jmp.
26116 2018-02-26 Jakub Jelinek <jakub@redhat.com>
26119 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
26120 memset and value initialization afterwards.
26122 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
26124 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
26126 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
26129 * common/config/aarch64/aarch64-common.c
26130 (aarch_option_optimization_table[]): Switch
26131 off fomit-frame-pointer
26133 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
26134 Chung-Ju Wu <jasonwucj@gmail.com>
26136 * config/nds32/nds32-multiple.md (load_multiple): Disallow
26138 (store_multiple): Ditto.
26140 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
26142 * config.gcc: Add --with-cpu support for nds32 target.
26143 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
26144 * config/nds32/nds32.opt: Add -mcpu= option.
26146 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
26148 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
26149 isel=yes): Warn for these deprecated options.
26151 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
26153 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
26154 ISA_2_5_MASKS_EMBEDDED.
26156 2018-02-23 Jakub Jelinek <jakub@redhat.com>
26158 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
26159 p->max as pointers rather than using iterative_hash_expr.
26161 2018-02-23 Carl Love <cel@us.ibm.com>
26163 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
26164 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
26166 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
26167 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
26168 P8V_BUILTIN_VEC_VUNSIGNED2.
26170 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
26173 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
26174 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
26176 * lra-constraints.c (curr_insn_transform): Set up
26177 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
26179 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
26180 * lra-eliminations.c (spill_pseudos): Ditto.
26181 (process_insn_for_elimination): Ditto.
26182 * lra-lives.c (reg_early_clobber_p): Use the new macros.
26183 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
26184 LRA_NON_CLOBBERED_ALT.
26186 2018-02-22 Martin Sebor <msebor@redhat.com>
26188 PR tree-optimization/84480
26189 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
26190 to maybe_diag_stxncpy_trunc. Call it.
26191 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
26192 from gimple_fold_builtin_strcpy. Print inlining stack.
26193 (handle_builtin_stxncpy): Print inlining stack.
26194 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
26196 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
26199 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
26200 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
26201 and -fcheck-pointer-bounds are used together.
26202 (indirect_thunk_prefix): New enum.
26203 (indirect_thunk_need_prefix): New function.
26204 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
26205 "_nt" instead of "_bnd" for NOTRACK prefix.
26206 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
26207 (output_indirect_thunk_function): Likewise.
26209 (ix86_code_end): Update output_indirect_thunk_function calls.
26210 (ix86_output_indirect_branch_via_reg): Replace
26211 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
26212 (ix86_output_indirect_branch_via_push): Likewise.
26213 (ix86_output_function_return): Likewise.
26214 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
26215 incompatible with -fcf-protection=branch and
26216 -fcheck-pointer-bounds.
26218 2018-02-22 Steve Ellcey <sellcey@cavium.com>
26221 * config/aarch64/aarch64.c (aarch64_print_address_internal):
26222 Change gcc_assert call to output_operand_lossage.
26224 2018-02-22 Steve Ellcey <sellcey@cavium.com>
26226 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
26228 2018-02-22 DJ Delorie <dj@redhat.com>
26229 Sebastian Perta <sebastian.perta@renesas.com>
26230 Oleg Endo <olegendo@gcc.gnu.org>
26232 * config/rx/rx.c (rx_rtx_costs): New function.
26233 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
26235 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
26237 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
26239 2018-02-22 Martin Liska <mliska@suse.cz>
26242 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
26243 Add "native" as a possible value.
26245 2018-02-22 Martin Liska <mliska@suse.cz>
26248 * config/i386/i386.c (ix86_option_override_internal):
26249 Add "native" as a possible value for -march and -mtune.
26251 2018-02-22 Jakub Jelinek <jakub@redhat.com>
26254 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
26255 to all type variants.
26257 PR tree-optimization/84503
26258 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
26259 width as info->bitpos + info->bitsize - start.
26260 (merged_store_group::merge_overlapping): Simplify width computation.
26261 (check_no_overlap): New function.
26262 (imm_store_chain_info::try_coalesce_bswap): Compute expected
26263 start + width and last_order of the group, fail if check_no_overlap
26265 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
26266 to group if check_no_overlap fails.
26268 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
26270 * config/rs6000/altivec.md: Delete contraint arguments to
26271 define_expand, define_split, and define_peephole2, and in
26272 define_insn_and_split if always unused.
26273 * config/rs6000/darwin.md: Ditto.
26274 * config/rs6000/dfp.md: Ditto.
26275 * config/rs6000/rs6000.md: Ditto.
26276 * config/rs6000/sync.md: Ditto.
26277 * config/rs6000/vector.md: Ditto.
26278 * config/rs6000/vsx.md: Ditto.
26280 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
26282 * config/rs6000/altivec.md: Write output control strings as braced
26283 blocks instead of double-quoted strings.
26284 * config/rs6000/darwin.md: Ditto.
26285 * config/rs6000/rs6000.md: Ditto.
26286 * config/rs6000/vector.md: Ditto.
26287 * config/rs6000/vsx.md: Ditto.
26289 2018-02-21 Jason Merrill <jason@redhat.com>
26291 PR c++/84314 - ICE with templates and fastcall attribute.
26292 * attribs.c (build_type_attribute_qual_variant): Remove assert.
26294 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
26296 * ipa-cp.c (determine_versionability): Fix comment typos.
26298 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
26301 * ipa-cp.c (determine_versionability): Do not version functions caling
26304 2018-02-21 Martin Liska <mliska@suse.cz>
26307 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
26308 Add "native" as a possible value.
26309 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
26310 the macro when native cpu detection is available.
26312 2018-02-21 Martin Liska <mliska@suse.cz>
26315 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
26316 Add "native" as a possible value.
26317 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
26318 when native cpu detection is available.
26320 2018-02-21 Jakub Jelinek <jakub@redhat.com>
26321 Martin Sebor <msebor@redhat.com>
26323 PR tree-optimization/84478
26324 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
26326 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
26327 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
26328 support which is conservatively correct, for 2 only stay conservative
26329 for maxlen. Formatting and comment capitalization fixes. Add STRICT
26330 argument to the 2 argument get_range_strlen, adjust 6 arg
26331 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
26333 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
26334 (gimple_fold_builtin_strlen): Pass true as last argument to
26337 2018-02-20 Martin Sebor <msebor@redhat.com>
26339 PR middle-end/84095
26340 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
26341 (builtin_memref::set_base_and_offset): Same. Handle inner references.
26342 (builtin_memref::builtin_memref): Factor out parts into
26343 set_base_and_offset and call it.
26345 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
26347 PR middle-end/84406
26348 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
26349 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
26350 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
26351 search at the associated MODE_INT.
26353 2018-02-20 Jeff Law <law@redhat.com>
26355 PR middle-end/82123
26356 PR tree-optimization/81592
26357 PR middle-end/79257
26358 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
26359 for range data rather than using global data.
26360 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
26361 range data rather than using global data.
26362 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
26363 pass it to children as needed.
26364 (struct directive::fmtresult): Similarly.
26365 (struct directive::set_width): Similarly.
26366 (struct directive::set_precision): Similarly.
26367 (format_integer, format_directive, parse_directive): Similarly.
26368 (format_none): Accept unnamed vr_values parameter.
26369 (format_percent, format_floating, format_character): Similarly.
26370 (format_string, format_plain): Similarly.
26371 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
26372 the EVRP range analyzer for range data rather than using global data.
26373 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
26374 gimple-ssa-evrp-analyze.h
26375 (class sprintf_dom_walker): Add after_dom_children member function.
26376 Add evrp_range_analyzer member.
26377 (sprintf_dom_walker::before_dom_children): Call into the EVRP
26378 range analyzer as needed.
26379 (sprintf_dom_walker::after_dom_children): New member function.
26380 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
26382 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
26383 (evrp_range_analyzer::pop_to_marker): Likewise.
26385 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
26387 PR tree-optimization/84419
26388 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
26389 with the required type if its current type is compatible but
26392 2018-02-20 Jakub Jelinek <jakub@redhat.com>
26394 PR middle-end/82004
26395 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
26396 after vectorization.
26398 2018-02-20 Martin Liska <mliska@suse.cz>
26401 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
26402 possible values if we don't have a hint.
26404 2018-02-20 Martin Liska <mliska@suse.cz>
26408 * final.c (shorten_branches): Build align_tab array with one
26410 * opts.c (finish_options): Add alignment option limit check.
26411 (MAX_CODE_ALIGN): Likewise.
26412 (MAX_CODE_ALIGN_VALUE): Likewise.
26413 * doc/invoke.texi: Document maximum allowed option value for
26414 all -falign-* options.
26416 2018-02-19 Jakub Jelinek <jakub@redhat.com>
26419 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
26420 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
26421 * var-tracking.c (emit_note_insn_var_location): Remove all references
26422 to NOTE_INSN_CALL_ARG_LOCATION.
26423 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
26424 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
26425 Use copy_rtx_if_shared.
26426 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
26427 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
26428 (dwarf2out_var_location): Remove handling of
26429 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
26431 * final.c (final_scan_insn): Remove all references to
26432 NOTE_INSN_CALL_ARG_LOCATION.
26433 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
26434 before dumping final insns.
26435 * except.c (emit_note_eh_region_end): Remove all references to
26436 NOTE_INSN_CALL_ARG_LOCATION.
26437 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
26438 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
26439 * config/arc/arc.c (hwloop_optimize): Likewise.
26440 * config/arm/arm.c (create_fix_barrier): Likewise.
26441 * config/s390/s390.c (s390_chunkify_start): Likewise.
26442 * config/sh/sh.c (find_barrier): Likewise.
26443 * config/i386/i386.c (rest_of_insert_endbranch,
26444 ix86_seh_fixup_eh_fallthru): Likewise.
26445 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
26446 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
26447 * config/frv/frv.c (frv_function_prologue): Likewise.
26448 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
26450 (note_outside_basic_block_p): Remove all references to
26451 NOTE_INSN_CALL_ARG_LOCATION.
26452 * gengtype.c (adjust_field_rtx_def): Likewise.
26453 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
26455 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
26456 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
26459 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
26462 PR tree-optimization/84452
26463 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
26464 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
26467 2018-02-19 Martin Liska <mliska@suse.cz>
26470 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
26472 2018-02-19 Martin Liska <mliska@suse.cz>
26473 Richard Sandiford <richard.sandiford@linaro.org>
26475 PR tree-optimization/82491
26476 * gimple-fold.c (get_base_constructor): Make earlier bail out
26479 2018-02-19 Carl Love <cel@us.ibm.com>
26481 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
26482 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
26484 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
26485 P8V_BUILTIN_VEC_NEG.
26487 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
26489 * config/rl78/rl78.md (movdf): New define expand.
26491 2018-02-19 Martin Liska <mliska@suse.cz>
26494 * doc/invoke.texi: Fix typo.
26495 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
26497 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
26499 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
26500 handle rs6000_single_float and rs6000_double_float specially for
26503 2018-02-16 Jeff Law <law@redhat.com>
26505 * config/rx/rx.c (add_pop_cfi_notes): New function.;
26506 (pop_regs): Use it.
26508 2018-02-16 Jakub Jelinek <jakub@redhat.com>
26511 * ipa-inline.c (inline_small_functions): Fix a typo.
26513 2018-02-16 Nathan Sidwell <nathan@acm.org>
26515 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
26517 2018-02-16 Carl Love <cel@us.ibm.com>
26519 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
26520 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
26521 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
26522 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
26523 expansion to P8V_BUILTIN_VEC_FLOAT2.
26525 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
26527 PR rtl-optimization/70023
26528 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
26529 src_regno into account.
26531 2018-02-16 Carl Love <cel@us.ibm.com>
26533 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
26534 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
26535 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
26536 * config/rs6000/rs6000.c: Remove case statements for
26537 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
26538 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
26539 and P9V_BUILTIN_VEC_VINSERT4B.
26540 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
26541 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
26542 * config/rs6000/vsx.md:
26543 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
26546 2018-02-16 Carl Love <cel@us.ibm.com>
26548 * config/rs6000/altivec.h: Add builtin names vec_extract4b
26550 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
26552 * config/rs6000/rs6000-c.c: Add the definitions for
26553 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
26554 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
26555 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
26556 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
26557 definition for insert4b and define insn *insert3b_internal.
26558 * doc/extend.texi: Add documentation for vec_extract4b.
26560 2018-02-16 Nathan Sidwell <nathan@acm.org>
26562 * doc/extend.texi (Backwards Compatibility): Mention friend
26563 injection. Note for-scope is deprecated.
26564 * doc/invoke.texi (-ffriend-injection): Deprecate.
26566 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
26568 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
26569 that moved to I2, also allow destinations that are a paradoxical
26570 subreg (instead of a normal reg).
26572 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
26575 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
26578 2018-02-16 Richard Biener <rguenther@suse.de>
26580 PR tree-optimization/84037
26581 PR tree-optimization/84016
26583 * config/i386/i386.c (ix86_builtin_vectorization_cost):
26584 Adjust vec_construct for the fact we need additional higher latency
26585 128bit inserts for AVX256 and AVX512 vector builds.
26586 (ix86_add_stmt_cost): Scale vector construction cost for
26589 2018-02-16 Richard Biener <rguenther@suse.de>
26591 PR tree-optimization/84417
26592 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
26593 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
26594 (non_rewritable_lvalue_p): Likewise, use poly-ints.
26596 2018-02-16 Martin Liska <mliska@suse.cz>
26599 * internal-fn.def (ASAN_CHECK): Set proper flags.
26600 (ASAN_MARK): Likewise.
26602 2018-02-16 Julia Koval <julia.koval@intel.com>
26604 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
26605 from PTA_CANNONLAKE.
26607 2018-02-16 Jakub Jelinek <jakub@redhat.com>
26610 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
26611 Use ++iter rather than iter++ for std::list iterators.
26612 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
26613 defer deleting them until all nodes in the forest are processed. Do
26614 free even leaf nodes. Change to_process into auto_vec.
26617 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
26618 * vec.h (vec_default_construct): Use memset instead of placement new
26619 if BROKEN_VALUE_INITIALIZATION is defined.
26620 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
26621 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
26624 PR rtl-optimization/83723
26625 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
26626 * lra.c (lra_substitute_pseudo): Likewise. If true, use
26627 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
26629 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
26631 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
26633 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
26635 PR rtl-optimization/81443
26636 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
26637 from inner REGs to paradoxical SUBREGs.
26639 2018-02-16 Richard Biener <rguenther@suse.de>
26641 PR tree-optimization/84399
26642 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26643 For operands we can analyze at their definition make sure we can
26644 analyze them at each use as well.
26646 2018-02-16 Richard Biener <rguenther@suse.de>
26648 PR tree-optimization/84190
26649 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
26650 volatile accesses if the decl isn't volatile.
26652 2018-02-15 Jason Merrill <jason@redhat.com>
26654 PR c++/84314 - ICE with templates and fastcall attribute.
26655 * attribs.c (build_type_attribute_qual_variant): Don't clobber
26656 TYPE_CANONICAL on an existing type.
26658 2018-02-15 Jakub Jelinek <jakub@redhat.com>
26660 PR tree-optimization/84383
26661 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
26662 dstoff nor call operand_equal_p if dstbase is NULL.
26664 PR tree-optimization/84334
26665 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
26666 also a CONSTANT_CLASS_P, punt.
26668 2018-02-14 Jim Wilson <jimw@sifive.com>
26670 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
26671 first SMALL_OPERAND check. New local min_second_step. Move assert
26672 to where locals are set. Add TARGET_RVC support.
26673 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
26675 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
26677 * doc/invoke.texi: Correct -Wformat-overflow code sample.
26679 2018-02-14 Martin Sebor <msebor@redhat.com>
26681 PR tree-optimization/83698
26682 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
26683 arrays constrain the offset range to their bounds.
26684 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
26685 (builtin_access::overlap): Avoid setting the size of overlap if it's
26687 (maybe_diag_overlap): Also consider arrays when deciding what values
26688 of offsets to include in diagnostics.
26690 2018-02-14 Martin Sebor <msebor@redhat.com>
26693 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
26694 that correspond to the kind of a declaration.
26696 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
26699 * config/pa/pa.md: Load address of PIC label using the linkage table
26700 if the label is nonlocal.
26702 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
26704 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
26705 warning message if user requests -maltivec=be.
26706 * doc/invoke.texi: Document deprecation of -maltivec=be.
26708 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
26711 * config/rs6000/rs6000-c.c: Update definitions for
26712 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
26713 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
26715 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
26718 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
26719 add _get_ssp intrinsics. Remove argument from
26720 __builtin_ia32_rdssp[d|q].
26721 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
26722 * config/i386/i386-builtin.def: Remove argument from
26723 __builtin_ia32_rdssp[d|q].
26724 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
26725 ix86_expand_special_args_builtin for _rdssp[d|q].
26726 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
26727 Clear register before usage.
26728 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
26729 Add documentation for new _get_ssp and _inc_ssp intrinsics.
26731 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
26733 PR tree-optimization/84357
26734 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
26735 operand 1 of an ARRAY_REF too.
26737 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
26740 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
26741 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26743 (set_of_reg): New struct.
26744 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
26745 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
26746 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26748 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
26749 Split into bitclr, bitset, bitinvert patterns if appropriate.
26750 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
26751 use rx_fuse_in_memory_bitop.
26752 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
26753 to named insn, correct maximum insn length.
26755 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
26758 * machmode.def: Define a complex mode for PARTIAL_INT.
26759 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
26761 * doc/rtl.texi: Document CSPImode.
26762 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
26764 (msp430_hard_regno_nregs_with_padding): Likewise.
26766 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
26769 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
26771 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
26773 PR rtl-optimization/84169
26774 * combine.c (try_combine): New variable split_i2i3. Set it to true if
26775 we generated a parallel as new i3 and we split that to new i2 and i3
26776 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
26777 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
26778 those to i2, not i1. Partially rewrite this scan code.
26780 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26783 * stor-layout.c (place_field): For variable length fields, adjust
26784 offset_align afterwards not just based on the field's alignment,
26785 but also on the size.
26787 PR middle-end/84309
26788 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
26789 of exps and logs in the use_exp2 case.
26791 2018-02-13 Jeff Law <law@redhat.com>
26793 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
26794 entry for "vector".
26796 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
26799 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
26803 * common.opt (gas-loc-support, gas-locview-support): New.
26804 (ginline-points, ginternal-reset-location-views): New.
26805 * doc/invoke.texi: Document them. Use @itemx where intended.
26806 (gvariable-location-views): Adjust.
26807 * target.def (reset_location_view): New.
26808 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
26809 (TARGET_RESET_LOCATION_VIEW): New.
26810 * doc/tm.texi: Rebuilt.
26811 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
26812 (dwarf2out_default_as_locview_support): New.
26813 (output_asm_line_debug_info): Use option variables.
26814 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
26815 (output_loc_list): Likewise.
26816 (add_high_low_attributes): Check option variables.
26817 Don't output entry view attribute in strict mode.
26818 (gen_inlined_subroutine_die): Check option variables.
26819 (dwarf2out_inline_entry): Likewise.
26820 (init_sections_and_labels): Likewise.
26821 (dwarf2out_early_finish): Likewise.
26822 (maybe_reset_location_view): New, from...
26823 (dwarf2out_var_location): ... here. Call it.
26824 * debug.h (dwarf2out_default_as_loc_support): Declare.
26825 (dwarf2out_default_as_locview_support): Declare.
26826 * hooks.c (hook_int_rtx_insn_0): New.
26827 * hooks.h (hook_int_rtx_insn_0): Declare.
26828 * toplev.c (process_options): Take -gas-loc-support and
26829 -gas-locview-support from dwarf2out. Enable
26830 -gvariable-location-views by default only with locview
26831 assembler support. Enable -ginternal-reset-location-views by
26832 default only if the target defines the corresponding hook.
26833 Enable -ginline-points by default if location views are
26834 enabled; force it disabled if statement frontiers are
26836 * tree-inline.c (expand_call_inline): Check option variables.
26837 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
26839 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
26841 PR tree-optimization/84321
26842 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
26843 handling. Also check whether the anti-range contains any values
26844 that satisfy the mask; switch to a VR_RANGE if not.
26846 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
26849 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
26851 2018-02-13 Martin Jambor <mjambor@suse.cz>
26854 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
26855 of call statements, also set location of a load to a temporary.
26857 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
26859 * config/rl78/rl78.c (add_vector_labels): New function.
26860 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
26861 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
26862 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
26863 which checks that no arguments are passed.
26864 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
26865 * doc/extend.texi: Documentation for the new attribute.
26867 2018-02-13 Andreas Schwab <schwab@suse.de>
26869 * config/riscv/linux.h (CPP_SPEC): Define.
26871 2018-02-13 Jakub Jelinek <jakub@redhat.com>
26874 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
26875 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
26876 OPTION_MASK_ISA_AES as first argument to def_builtin_const
26877 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
26878 instead of OPTION_MASK_ISA_PCLMUL as first argument to
26879 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
26880 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
26881 temporarily for AES and PCLMUL builtins.
26883 PR tree-optimization/84339
26884 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
26885 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
26888 PR middle-end/84309
26889 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
26890 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
26891 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
26893 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
26895 * omp-simd-clone.h: New file.
26896 * omp-simd-clone.c: Include omp-simd-clone.h.
26897 (expand_simd_clones): No longer static.
26898 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
26899 cgraph.h and omp-simd-clone.h.
26900 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
26901 (vect_recog_widen_shift_pattern): Formatting fix.
26902 (vect_pattern_recog_1): Don't check optab for calls.
26905 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
26906 operands[2] into a REG before using gen_lowpart on it.
26908 2018-02-12 Jeff Law <law@redhat.com>
26911 * config/sh/sh.c (find_barrier): Consider a sibling call
26914 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
26915 successfully back substituting a reg.
26917 2018-02-12 Richard Biener <rguenther@suse.de>
26919 PR tree-optimization/84037
26920 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
26921 parameter, move visited init to caller.
26922 (vect_slp_analyze_operations): Separate cost from validity
26923 check, initialize visited once for all instances.
26924 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
26926 * tree-vect-stmts.c (vect_model_simple_cost): Make early
26928 (vect_model_promotion_demotion_cost): Likewise.
26929 (vectorizable_bswap): Guard cost modeling with !slp_node
26930 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
26932 (vectorizable_call): Likewise.
26933 (vectorizable_conversion): Likewise.
26934 (vectorizable_assignment): Likewise.
26935 (vectorizable_shift): Likewise.
26936 (vectorizable_operation): Likewise.
26937 (vectorizable_store): Likewise.
26938 (vectorizable_load): Likewise.
26939 (vectorizable_condition): Likewise.
26940 (vectorizable_comparison): Likewise.
26942 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
26945 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
26946 (ASAN_MARK): Fix fnspec to account for return value, change pointer
26947 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
26949 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
26951 PR middle-end/83665
26952 * params.def (inline-min-speedup): Increase from 8 to 15.
26953 (max-inline-insns-auto): Decrease from 40 to 30.
26954 * ipa-split.c (consider_split): Add some buffer for function to
26955 be considered inlining candidate.
26956 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
26959 2018-02-12 Richard Biener <rguenther@suse.de>
26961 PR tree-optimization/84037
26962 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
26963 matched stmts if we cannot swap the non-matched ones.
26965 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26967 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
26968 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
26969 _mm_maskz_scalef_round_ss): New intrinsics.
26970 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
26971 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
26972 __builtin_ia32_scalefss_round): Remove.
26973 (__builtin_ia32_scalefsd_mask_round,
26974 __builtin_ia32_scalefss_mask_round): New intrinsics.
26975 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
26976 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
26977 ((match_operand:VF_128 2 "<round_nimm_predicate>"
26978 "<round_constraint>")): Changed to ...
26979 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
26980 "<round_scalar_constraint>")): ... this.
26981 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
26982 %0, %1, %2<round_op3>}"): Changed to ...
26983 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
26984 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
26985 %2<round_scalar_mask_op3>}"): ... this.
26986 * config/i386/subst.md (round_scalar_nimm_predicate): New.
26988 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
26990 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
26991 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
26992 (_mm_maskz_sqrt_round_ss): New intrinsics.
26993 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
26994 (__builtin_ia32_sqrtsd_mask_round)
26995 (__builtin_ia32_sqrtss_mask_round): New builtins.
26996 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
26997 (__builtin_ia32_sqrtss_round): Remove.
26998 (__builtin_ia32_sqrtsd_mask_round)
26999 (__builtin_ia32_sqrtss_mask_round): New builtins.
27000 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
27001 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
27002 ((match_operand:VF_128 1 "vector_operand"
27003 "xBm,<round_constraint>")): Changed to ...
27004 ((match_operand:VF_128 1 "vector_operand"
27005 "xBm,<round_scalar_constraint>")): ... this.
27006 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
27007 %0, %2, %<iptr>1<round_op3>}): Changed to ...
27008 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
27009 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
27010 %<iptr>1<round_scalar_mask_op3>}): ... this.
27011 ((set_attr "prefix" "<round_prefix>")): Changed to ...
27012 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
27014 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
27017 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
27018 Cast vec_cmpeq result to correct type.
27019 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
27020 Cast vec_cmpgt result to correct type.
27022 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
27024 * final.c (final_scan_insn_1): Renamed from...
27025 (final_scan_insn): ... this. New wrapper, to recover
27026 seen from the outermost call in recursive ones.
27027 * config/sparc/sparc.c (output_return): Drop seen from call.
27028 (output_sibcall): Likewise.
27029 * config/visium/visium.c (output_branch): Likewise.
27031 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
27033 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
27036 2018-02-10 Alan Modra <amodra@gmail.com>
27039 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
27040 Specify LR as an input.
27042 2018-02-10 Jakub Jelinek <jakub@redhat.com>
27045 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
27046 remove_member_access_dummy_vars): New functions.
27047 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
27048 lower_omp_1, execute_lower_omp): Use them.
27050 PR rtl-optimization/84308
27051 * shrink-wrap.c (spread_components): Release todo vector.
27053 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
27055 PR rtl-optimization/57193
27056 * ira-color.c (struct allocno_color_data): Add member
27057 conflict_allocno_hard_prefs.
27058 (update_conflict_allocno_hard_prefs): New.
27059 (bucket_allocno_compare_func): Add a preference based on
27060 conflict_allocno_hard_prefs.
27061 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
27062 (color_allocnos): Remove a dead code. Initiate
27063 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
27065 2018-02-09 Jakub Jelinek <jakub@redhat.com>
27068 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
27069 constraint from =wa to wa. Avoid a subreg on the output operand,
27070 instead use a pseudo and subreg it in a move.
27071 (p9_xxbrd_<mode>): Changed to ...
27072 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
27073 (p9_xxbrd_v2df): New expander.
27074 (p9_xxbrw_<mode>): Changed to ...
27075 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
27076 (p9_xxbrw_v4sf): New expander.
27078 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
27080 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
27082 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
27085 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
27086 multiply in 32-bit mode.
27087 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
27088 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
27091 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
27093 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
27094 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
27095 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
27096 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
27098 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
27101 * dwarf2out.c (is_trivial_indirect_ref): New function.
27102 (dwarf2out_late_global_decl): Do not generate a location
27103 attribute for variables that have a non-trivial DECL_VALUE_EXPR
27104 and that are not defined in the current unit.
27106 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
27108 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
27109 instead of a libcall for UNORDERED.
27111 2018-02-09 Tamar Christina <tamar.christina@arm.com>
27114 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
27115 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
27117 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27120 * config/s390/s390.c (s390_set_current_function): Invoke
27121 s390_indirect_branch_settings also if fndecl didn't change.
27123 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
27125 * config/rs6000/rs6000.md (blockage): Set length to zero.
27127 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
27129 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
27131 2018-02-09 Jakub Jelinek <jakub@redhat.com>
27134 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
27135 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
27139 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
27140 PARALLEL incoming that failed vt_get_decl_and_offset check.
27142 PR middle-end/84237
27143 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
27144 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
27146 (get_variable_section): For decls in named .bss* sections pass true as
27147 second argument to bss_initializer_p.
27149 2018-02-09 Marek Polacek <polacek@redhat.com>
27150 Jakub Jelinek <jakub@redhat.com>
27153 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
27154 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
27155 Sync some changes from cxx_fold_indirect_ref.
27157 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
27159 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
27161 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
27162 (BLOCK_INLINE_ENTRY_LABEL): New.
27163 (dwarf2out_var_location): Disregard inline entry markers.
27164 (inline_entry_data): New struct.
27165 (inline_entry_data_hasher): New hashtable type.
27166 (inline_entry_data_hasher::hash): New.
27167 (inline_entry_data_hasher::equal): New.
27168 (inline_entry_data_table): New variable.
27169 (add_high_low_attributes): Add DW_AT_entry_pc and
27170 DW_AT_GNU_entry_view attributes if a pending entry is found
27171 in inline_entry_data_table. Add old entry_pc attribute only
27172 if debug nonbinding markers are disabled.
27173 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
27174 markers are enabled.
27175 (block_within_block_p, dwarf2out_inline_entry): New.
27176 (dwarf2out_finish): Check that no entries remained in
27177 inline_entry_data_table.
27178 * final.c (reemit_insn_block_notes): Handle inline entry notes.
27179 (final_scan_insn, notice_source_line): Likewise.
27180 (rest_of_clean_state): Skip inline entry markers.
27181 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
27183 * gimple.c (gimple_build_debug_inline_entry): New.
27184 * gimple.h (enum gimple_debug_subcode): Add
27185 GIMPLE_DEBUG_INLINE_ENTRY.
27186 (gimple_build_debug_inline_entry): Declare.
27187 (gimple_debug_inline_entry_p): New.
27188 (gimple_debug_nonbind_marker_p): Adjust.
27189 * insn-notes.def (INLINE_ENTRY): New.
27190 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
27191 inline entry marker notes.
27192 (print_insn): Likewise.
27193 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
27194 (INSN_DEBUG_MARKER_KIND): Likewise.
27195 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
27196 * tree-inline.c (expand_call_inline): Build and insert
27197 debug_inline_entry stmt.
27198 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
27199 inline entry blocks early, if nonbind markers are enabled.
27200 (dump_scope_block): Dump fragment info.
27201 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
27202 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
27203 (gimple_build_debug_inline_entry): New.
27204 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
27205 Enable/disable inline entry points too.
27206 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
27207 (DEBUG_INSN): Describe inline entry markers.
27209 * common.opt (gvariable-location-views): New.
27210 (gvariable-location-views=incompat5): New.
27211 * config.in: Rebuilt.
27212 * configure: Rebuilt.
27213 * configure.ac: Test assembler for view support.
27214 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
27215 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
27216 * dwarf2out.c (var_loc_view): New typedef.
27217 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
27218 (dwarf2out_locviews_in_attribute): New.
27219 (dwarf2out_locviews_in_loclist): New.
27220 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
27221 (enum dw_line_info_opcode): Add LI_adv_address.
27222 (struct dw_line_info_table): Add view.
27223 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
27224 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
27225 (zero_view_p): New variable.
27226 (ZERO_VIEW_P): New macro.
27227 (output_asm_line_debug_info): New.
27228 (struct var_loc_node): Add view.
27229 (add_AT_view_list, AT_loc_list): New.
27230 (add_var_loc_to_decl): Add view param. Test it against last.
27231 (new_loc_list): Add view params. Record them.
27232 (AT_loc_list_ptr): Handle loc and view lists.
27233 (view_list_to_loc_list_val_node): New.
27234 (print_dw_val): Handle dw_val_class_view_list.
27235 (size_of_die): Likewise.
27236 (value_format): Likewise.
27237 (loc_list_has_views): New.
27238 (gen_llsym): Set vl_symbol too.
27239 (maybe_gen_llsym, skip_loc_list_entry): New.
27240 (dwarf2out_maybe_output_loclist_view_pair): New.
27241 (output_loc_list): Output view list or entries too.
27242 (output_view_list_offset): New.
27243 (output_die): Handle dw_val_class_view_list.
27244 (output_dwarf_version): New.
27245 (output_compilation_unit_header): Use it.
27246 (output_skeleton_debug_sections): Likewise.
27247 (output_rnglists, output_line_info): Likewise.
27248 (output_pubnames, output_aranges): Update version comments.
27249 (output_one_line_info_table): Output view numbers in asm comments.
27250 (dw_loc_list): Determine current endview, pass it to new_loc_list.
27251 Call maybe_gen_llsym.
27252 (loc_list_from_tree_1): Adjust.
27253 (add_AT_location_description): Create view list attribute if
27254 needed, check it's absent otherwise.
27255 (convert_cfa_to_fb_loc_list): Adjust.
27256 (maybe_emit_file): Call output_asm_line_debug_info for test.
27257 (dwarf2out_var_location): Reset views as needed. Precompute
27258 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
27259 attribute. Set view.
27260 (new_line_info_table): Reset next view.
27261 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
27262 (dwarf2out_source_line): Likewise. Output view resets and labels to
27263 the assembler, or select appropriate line info opcodes.
27264 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
27265 (optimize_string_length): Catch it. Adjust.
27266 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
27267 dw_val_class_view_list, and remove it if no longer needed.
27268 (hash_loc_list): Hash view numbers.
27269 (loc_list_hasher::equal): Compare them.
27270 (optimize_location_lists): Check whether a view list symbol is
27271 needed, and whether the locview attribute is present, and
27272 whether they match. Remove the locview attribute if no longer
27274 (index_location_lists): Call skip_loc_list_entry for test.
27275 (dwarf2out_finish): Call output_asm_line_debug_info for test.
27276 Use output_dwarf_version.
27277 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
27278 (struct dw_val_node): Add val_view_list.
27279 * final.c (SEEN_NEXT_VIEW): New.
27280 (set_next_view_needed): New.
27281 (clear_next_view_needed): New.
27282 (maybe_output_next_view): New.
27283 (final_start_function): Rename to...
27284 (final_start_function_1): ... this. Take pointer to FIRST,
27285 add SEEN parameter. Emit param bindings in the initial view.
27286 (final_start_function): Reintroduce SEEN-less interface.
27287 (final): Rename to...
27288 (final_1): ... this. Take SEEN parameter. Output final pending
27289 next view at the end.
27290 (final): Reintroduce seen-less interface.
27291 (final_scan_insn): Output pending next view before switching
27292 sections or ending a block. Mark the next view as needed when
27293 outputting variable locations. Notify debug backend of section
27294 changes, and of location view changes.
27295 (rest_of_handle_final): Adjust.
27296 * toplev.c (process_options): Autodetect value for debug variable
27297 location views option. Warn on incompat5 without -gdwarf-5.
27298 * doc/invoke.texi (gvariable-location-views): New.
27299 (gvariable-location-views=incompat5): New.
27300 (gno-variable-location-views): New.
27302 2018-02-08 David Malcolm <dmalcolm@redhat.com>
27304 PR tree-optimization/84136
27305 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
27306 that the result of find_edge is non-NULL.
27308 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
27311 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
27312 storing integer register in SImode. Fix cost of 256 and 512
27313 byte aligned SSE register store.
27315 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
27317 * config/i386/i386.c (ix86_multiplication_cost): Fix
27318 multiplication cost for TARGET_AVX512DQ.
27320 2018-02-08 Marek Polacek <polacek@redhat.com>
27322 PR tree-optimization/84238
27323 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
27326 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27328 PR tree-optimization/84265
27329 * tree-vect-stmts.c (vectorizable_store): Don't treat
27330 VMAT_CONTIGUOUS accesses as grouped.
27331 (vectorizable_load): Likewise.
27333 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27335 PR tree-optimization/81635
27336 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
27337 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
27338 (test_round_for_mask): New functions.
27339 (wide_int_cc_tests): Call test_round_for_mask.
27340 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
27341 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
27342 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
27343 range returned by get_range_info.
27345 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
27348 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
27349 * symtab.c: Include builtins.h
27350 (symtab_node::output_to_lto_symbol_table_p): Move here
27351 from lto-streamer-out.c:output_symbol_p.
27352 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
27353 (output_symbol_p): Move all logic to symtab.c
27354 (produce_symtab): Update.
27356 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
27358 * config/s390/s390-opts.h (enum indirect_branch): Define.
27359 * config/s390/s390-protos.h (s390_return_addr_from_memory)
27360 (s390_indirect_branch_via_thunk)
27361 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
27362 (enum s390_indirect_branch_type): Define.
27363 * config/s390/s390.c (struct s390_frame_layout, struct
27364 machine_function): Remove.
27365 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
27366 (indirect_branch_table_label_no, indirect_branch_table_name):
27368 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
27369 (enum s390_indirect_branch_option): Define.
27370 (s390_return_addr_from_memory): New function.
27371 (s390_handle_string_attribute): New function.
27372 (s390_attribute_table): Add new attribute handler.
27373 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
27374 (s390_indirect_branch_via_thunk): New function.
27375 (s390_indirect_branch_via_inline_thunk): New function.
27376 (s390_function_ok_for_sibcall): When jumping via thunk disallow
27377 sibling call optimization for non z10 compiles.
27378 (s390_emit_call): Force indirect branch target to be a single
27379 register. Add r1 clobber for non-z10 compiles.
27380 (s390_emit_epilogue): Emit return jump via return_use expander.
27381 (s390_reorg): Handle JUMP_INSNs as execute targets.
27382 (s390_option_override_internal): Perform validity checks for the
27383 new command line options.
27384 (s390_indirect_branch_attrvalue): New function.
27385 (s390_indirect_branch_settings): New function.
27386 (s390_set_current_function): Invoke s390_indirect_branch_settings.
27387 (s390_output_indirect_thunk_function): New function.
27388 (s390_code_end): Implement target hook.
27389 (s390_case_values_threshold): Implement target hook.
27390 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
27392 * config/s390/s390.h (struct s390_frame_layout)
27393 (struct machine_function): Move here from s390.c.
27394 (TARGET_INDIRECT_BRANCH_NOBP_RET)
27395 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
27396 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
27397 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
27398 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
27399 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
27400 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
27401 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
27402 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
27403 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
27404 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
27405 (mnemonic attribute): Add values which aren't recognized
27407 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
27408 pattern for branch conversion. Fix mnemonic attribute.
27409 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
27410 indirect branch via thunk if requested.
27411 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
27412 ("*indirect_jump"): Disable for branch conversion using out of
27414 ("indirect_jump_via_thunk<mode>_z10")
27415 ("indirect_jump_via_thunk<mode>")
27416 ("indirect_jump_via_inlinethunk<mode>_z10")
27417 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
27418 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
27419 ("casesi_jump_via_inlinethunk<mode>_z10")
27420 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
27421 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
27422 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
27423 ("*indirect2_jump"): Disable for branch conversion.
27424 ("casesi_jump"): Turn into expander and expand patterns for branch
27426 ("return_use"): New expander.
27427 ("*return"): Emit return via thunk and rename it to ...
27428 ("*return<mode>"): ... this one.
27429 * config/s390/s390.opt: Add new options and and enum for the
27432 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
27434 * lra-constraints.c (match_reload): Unconditionally use
27435 gen_lowpart_SUBREG, rather than selecting between that
27436 and equivalent gen_rtx_SUBREG code.
27438 2018-02-08 Richard Biener <rguenther@suse.de>
27440 PR tree-optimization/84233
27441 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
27442 changed flag instead of boguously re-using phi_inserted.
27444 2018-02-08 Martin Jambor <mjambor@suse.cz>
27446 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
27447 static local variables.
27449 2018-02-08 Richard Biener <rguenther@suse.de>
27451 PR tree-optimization/84278
27452 * tree-vect-stmts.c (vectorizable_store): When looking for
27453 smaller vector types to perform grouped strided loads/stores
27454 make sure the mode is supported by the target.
27455 (vectorizable_load): Likewise.
27457 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
27459 * config/aarch64/aarch64.c (aarch64_components_for_bb):
27460 Increase LDP/STP opportunities by adding adjacent callee-saves.
27462 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
27464 PR rtl-optimization/84068
27465 PR rtl-optimization/83459
27466 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
27468 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
27470 PR tree-optimization/84224
27471 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
27472 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
27473 non-zero arguments.
27475 2018-02-07 Iain Sandoe <iain@codesourcery.com>
27478 * config/rs6000/altivec.md (*restore_world): Remove LR use.
27479 * config/rs6000/predicates.md (restore_world_operation): Adjust op
27480 count, remove one USE.
27482 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
27484 * doc/install.texi (Configuration): Document the
27485 --with-long-double-format={ibm,ieee} PowerPC configuration
27489 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
27490 Convert from define_expand to be define_insn_and_split. Rework
27491 float/double/_Float128 conversions to QI/HI/SImode to work with
27492 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
27493 conversions to QI/HImode types did a store and then a load to
27494 truncate the value. For conversions to VSX registers, don't split
27495 the insn, instead emit the code directly. Use the code iterator
27496 any_fix to combine signed and unsigned conversions.
27497 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
27498 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
27499 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27500 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
27501 (fix_<mode>di2_hw): Likewise.
27502 (fixuns_<mode>di2_hw): Likewise.
27503 (fix_<mode>si2_hw): Likewise.
27504 (fixuns_<mode>si2_hw): Likewise.
27505 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
27506 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27507 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
27508 fix<uns>_trunc<SFDF:mode>si2_p8.
27509 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
27510 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
27511 (fix<uns>_<mode>_mem): Likewise.
27512 (fctiw<u>z_<mode>_mem): Likewise.
27513 (fix<uns>_<mode>_mem): Likewise.
27514 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
27515 the register allocator from doing a direct move to the GPRs to do
27516 a store, and instead use the ISA 3.0 store byte/half-word from
27517 vector register instruction. For IEEE 128-bit floating point,
27518 also optimize stores of 32-bit ints.
27519 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
27521 2018-02-07 Alan Hayward <alan.hayward@arm.com>
27523 * genextract.c (push_pathstr_operand): New function to support
27525 (walk_rtx): Call push_pathstr_operand.
27526 (print_path): Support [a-zA-Z].
27528 2018-02-07 Richard Biener <rguenther@suse.de>
27530 PR tree-optimization/84037
27531 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
27532 (cse_and_gimplify_to_preheader): Declare.
27533 (vect_get_place_in_interleaving_chain): Likewise.
27534 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27536 (_loop_vec_info::~_loop_vec_info): Delete it.
27537 (cse_and_gimplify_to_preheader): New function.
27538 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
27539 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
27540 (vectorizable_load): Likewise. For grouped stores always base
27541 the IV on the first element.
27542 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
27543 condition before gimplifying.
27545 2018-02-07 Jakub Jelinek <jakub@redhat.com>
27547 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
27548 *DIV_EXPR and *MOD_EXPR.
27550 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
27553 * config/i386/i386.c (ix86_option_override_internal): Mask out
27554 the CF_SET bit when checking -fcf-protection.
27556 2018-02-07 Tom de Vries <tom@codesourcery.com>
27559 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
27562 2018-02-07 Richard Biener <rguenther@suse.de>
27564 PR tree-optimization/84204
27565 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
27568 PR tree-optimization/84205
27569 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
27570 special-case isl_ast_op_zdiv_r.
27572 PR tree-optimization/84223
27573 * graphite-scop-detection.c (gather_bbs::before_dom_children):
27574 Only add conditions from within the region.
27575 (gather_bbs::after_dom_children): Adjust.
27577 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
27580 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
27581 * config/avr/avr.md: Only post-reload split REG-REG moves if
27582 either register is GENERAL_REG_P.
27584 2018-02-07 Jakub Jelinek <jakub@redhat.com>
27586 PR tree-optimization/84235
27587 * tree-ssa-scopedtables.c
27588 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
27589 if the subtraction is performed in floating point type where NaNs are
27590 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
27591 build 1. Formatting fix.
27593 2018-02-06 Jakub Jelinek <jakub@redhat.com>
27596 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
27597 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
27598 and skip it regardless of bb boundaries. Use CALL_P macro,
27599 don't test INSN_P (insn) together with CALL_P or JUMP_P check
27600 unnecessarily, formatting fix.
27602 2018-02-06 Michael Collison <michael.collison@arm.com>
27604 * config/arm/thumb2.md:
27605 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
27606 (*thumb_mov_notscc): Ditto.
27608 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
27611 * config/rs6000/rs6000.md (su code attribute): Use "u" for
27612 unsigned_fix, not "s".
27614 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27616 * configure.ac (gcc_fn_eh_frame_ro): New function.
27617 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
27618 correct .eh_frame permissions.
27619 * configure: Regenerate.
27621 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
27623 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
27624 irrelevant options.
27626 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
27628 * config/rs6000/rs6000.c (rs6000_option_override_internal):
27629 Display warning message for -mno-speculate-indirect-jumps.
27631 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
27633 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
27635 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
27637 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
27639 PR tree-optimization/84225
27640 * tree-eh.c (find_trapping_overflow): Only call
27641 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
27643 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27646 * config/i386/i386.c: Reimplement the check of possible options
27647 -mibt/-mshstk conbination. Change error messages.
27648 * doc/invoke.texi: Fix a typo: remove extra '='.
27650 2018-02-06 Marek Polacek <polacek@redhat.com>
27652 PR tree-optimization/84228
27653 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
27655 2018-02-06 Tamar Christina <tamar.christina@arm.com>
27658 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
27659 emitted arch directives.
27660 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
27661 __ARM_FEATURE_COPROC before changing architectures.
27663 2018-02-06 Richard Biener <rguenther@suse.de>
27665 * config/i386/i386.c (print_reg): Fix typo.
27666 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
27668 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
27670 * configure: Regenerate.
27672 2018-02-05 Martin Sebor <msebor@redhat.com>
27674 PR tree-optimization/83369
27675 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
27678 2018-02-05 Martin Liska <mliska@suse.cz>
27680 * doc/invoke.texi: Cherry-pick upstream r323995.
27682 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
27684 * ira.c (ira_init_register_move_cost): Adjust comment.
27686 2018-02-05 Martin Liska <mliska@suse.cz>
27688 PR gcov-profile/84137
27689 * doc/gcov.texi: Fix typo in documentation.
27691 2018-02-05 Martin Liska <mliska@suse.cz>
27693 PR gcov-profile/83879
27694 * doc/gcov.texi: Document necessity of --dynamic-list-data when
27695 using dlopen functionality.
27697 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
27699 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
27700 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
27701 _mm_maskz_range_ss, _mm_mask_range_round_ss,
27702 _mm_maskz_range_round_ss): New intrinsics.
27703 (__builtin_ia32_rangesd128_round)
27704 (__builtin_ia32_rangess128_round): Remove.
27705 (__builtin_ia32_rangesd128_mask_round,
27706 __builtin_ia32_rangess128_mask_round): New builtins.
27707 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
27708 __builtin_ia32_rangess128_round): Remove.
27709 (__builtin_ia32_rangesd128_mask_round,
27710 __builtin_ia32_rangess128_mask_round): New builtins.
27711 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
27712 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
27713 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
27714 "<round_saeonly_constraint>")): Changed to ...
27715 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
27716 "<round_saeonly_scalar_constraint>")): ... this.
27717 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
27718 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
27719 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
27720 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
27721 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
27723 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
27725 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
27727 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
27728 Remove all values except native, 8540 and 8548.
27730 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
27732 * config/i386/i386.c (ix86_output_function_return): Pass
27733 INVALID_REGNUM, instead of -1, as invalid register number to
27734 indirect_thunk_name and output_indirect_thunk.
27736 2018-02-02 Julia Koval <julia.koval@intel.com>
27738 * config.gcc: Add -march=icelake.
27739 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
27740 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
27741 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
27742 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
27743 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
27744 (processor_target_table): Add icelake.
27745 (ix86_option_override_internal): Handle new PTAs.
27746 (get_builtin_code_for_version): Handle icelake.
27747 (M_INTEL_COREI7_ICELAKE): New.
27748 (fold_builtin_cpu): Handle icelake.
27749 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
27750 * doc/invoke.texi: Add -march=icelake.
27752 2018-02-02 Julia Koval <julia.koval@intel.com>
27754 * config/i386/i386.c (ix86_option_override_internal): Change flags type
27755 to wide_int_bitmask.
27756 * wide-int-bitmask.h: New.
27758 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
27761 * config/i386/i386.md: Replace Pmode with word_mode in
27762 builtin_setjmp_setup and builtin_longjmp to support x32.
27764 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
27768 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
27770 (rs6000_supported_cpu_names): New static variable.
27771 (linux_cpu_translation_table): Likewise.
27772 (elf_platform) <cpu>: Define new static variable and use it.
27773 Translate kernel AT_PLATFORM name to canonical name if needed.
27774 Error if platform name is unknown.
27776 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
27779 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
27781 2018-02-01 Jeff Law <law@redhat.com>
27784 * config/i386/i386.c (release_scratch_register_on_entry): Add new
27785 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
27786 the scratch if RELEASE_VIA_POP is false.
27787 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
27788 If we have to save a temporary register, decrement SIZE appropriately.
27789 Pass new arguments to release_scratch_register_on_entry.
27790 (ix86_adjust_stack_and_probe): Likewise.
27791 (ix86_emit_probe_stack_range): Pass new arguments to
27792 release_scratch_register_on_entry.
27794 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
27796 PR rtl-optimization/84157
27797 * combine.c (change_zero_ext): Use REG_P predicate in
27798 front of HARD_REGISTER_P predicate.
27800 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
27802 * config/avr/avr.c (avr_option_override): Move disabling of
27803 -fdelete-null-pointer-checks to...
27804 * common/config/avr/avr-common.c (avr_option_optimization_table):
27807 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27809 PR tree-optimization/81635
27810 * tree-data-ref.c (split_constant_offset_1): For types that
27811 wrap on overflow, try to use range info to prove that wrapping
27814 2018-02-01 Renlin Li <renlin.li@arm.com>
27817 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
27818 TAILCALL_ADDR_REGS.
27819 (aarch64_register_move_cost): Likewise.
27820 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
27821 TAILCALL_ADDR_REGS.
27822 (REG_CLASS_NAMES): Likewise.
27823 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
27824 TAILCALL_ADDR_REGS. Remove IP registers.
27825 * config/aarch64/aarch64.md (Ucs): Update register constraint.
27827 2018-02-01 Richard Biener <rguenther@suse.de>
27829 * domwalk.h (dom_walker::dom_walker): Add additional constructor
27830 for specifying RPO order and allow NULL for that.
27831 * domwalk.c (dom_walker::dom_walker): Likewise.
27832 (dom_walker::walk): Handle NULL RPO order.
27833 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
27835 (rewrite_update_dom_walker): Likewise.
27836 (mark_def_dom_walker): Likewise.
27838 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27840 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
27841 (aarch64_maybe_expand_sve_subreg_move): Declare.
27842 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
27843 * config/aarch64/predicates.md (aarch64_any_register_operand): New
27845 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
27846 that are semantically a reverse operation.
27847 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
27848 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
27849 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
27851 (aarch64_can_change_mode_class): For big-endian, forbid changes
27852 between two SVE modes if they have different element sizes.
27854 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27856 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
27857 the TImode handling for big-endian targets.
27859 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27861 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
27862 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
27864 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
27865 Remove BSWAP handing for big-endian targets and use the form of
27866 LD1RQ appropariate for the mode.
27868 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27870 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
27871 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
27872 duplicated element.
27874 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
27877 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
27878 check for operands that need to go through aarch64_sve_reload_be.
27880 2018-02-01 Jakub Jelinek <jakub@redhat.com>
27882 PR tree-optimization/81661
27883 PR tree-optimization/84117
27884 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
27885 * tree-eh.c: Include gimplify.h.
27886 (find_trapping_overflow, replace_trapping_overflow,
27887 rewrite_to_non_trapping_overflow): New functions.
27888 * tree-vect-loop.c: Include tree-eh.h.
27889 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
27890 * tree-data-ref.c: Include tree-eh.h.
27891 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
27893 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
27895 PR rtl-optimization/84123
27896 * combine.c (change_zero_ext): Check if hard register satisfies
27897 can_change_dest_mode before calling gen_lowpart_SUBREG.
27899 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
27902 * ira.c (ira_init_register_move_cost): Remove assert.
27904 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27906 PR rtl-optimization/84071
27907 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
27908 * doc/tm.texi: Regenerate.
27910 2018-01-31 Richard Biener <rguenther@suse.de>
27912 PR tree-optimization/84132
27913 * tree-data-ref.c (analyze_miv_subscript): Properly
27914 check whether evolution_function_is_affine_multivariate_p
27915 before calling gcd_of_steps_may_divide_p.
27917 2018-01-31 Julia Koval <julia.koval@intel.com>
27920 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
27921 * config/i386/i386.md (rdpid_rex64) New.
27922 (rdpid): Make 32bit only.
27924 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
27927 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
27928 an IDENTIFIER_NODE for FUNCTION_TYPE's.
27930 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27933 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
27935 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27937 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
27939 PR rtl-optimization/84071
27940 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
27941 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
27943 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27945 * config/arc/arc.c (arc_handle_aux_attribute): New function.
27946 (arc_attribute_table): Add 'aux' attribute.
27947 (arc_in_small_data_p): Consider aux like variables.
27948 (arc_is_aux_reg_p): New function.
27949 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
27950 (arc_get_aux_arg): New function.
27951 (prepare_move_operands): Handle aux-register access.
27952 (arc_handle_aux_attribute): New function.
27953 * doc/extend.texi (ARC Variable attributes): Add subsection.
27955 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
27957 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
27958 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
27959 (arc_attribute_table): Add 'uncached' attribute.
27960 (arc_print_operand): Print '.di' flag for uncached memory
27962 (arc_in_small_data_p): Do not consider for small data the uncached
27964 (arc_is_uncached_mem_p): New function.
27965 * config/arc/predicates.md (compact_store_memory_operand): Check
27966 for uncached memory accesses.
27967 (nonvol_nonimm_operand): Likewise.
27968 * doc/extend.texi (ARC Type Attribute): New subsection.
27970 2018-01-31 Jakub Jelinek <jakub@redhat.com>
27973 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
27974 falign-loops=): Add Optimization flag.
27976 2018-01-30 Jeff Law <law@redhat.com>
27979 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
27980 INT_REGISTERS_SAVED. Check it prior to calling
27981 get_scratch_register_on_entry.
27982 (ix86_adjust_stack_and_probe): Similarly.
27983 (ix86_emit_probe_stack_range): Similarly.
27984 (ix86_expand_prologue): Corresponding changes.
27986 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
27989 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
27990 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
27992 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
27995 * lra-constraints.c (curr_insn_transform): Process AND in the
27998 2018-01-30 Jakub Jelinek <jakub@redhat.com>
28000 PR rtl-optimization/83986
28001 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
28002 dependence against last_pending_memory_flush in addition to
28003 pending_jump_insns.
28005 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
28007 PR tree-optimization/81611
28008 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
28011 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
28014 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
28017 2018-01-30 Richard Biener <rguenther@suse.de>
28018 Jakub Jelinek <jakub@redhat.com>
28020 PR tree-optimization/84111
28021 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
28022 inner loops added during recursion, as they don't have up-to-date
28025 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
28028 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
28029 (can_inline_edge_by_limits_p): ... here.
28030 (can_early_inline_edge_p, check_callers,
28031 update_caller_keys, update_callee_keys, recursive_inlining,
28032 add_new_edges_to_heap, speculation_useful_p,
28033 inline_small_functions,
28034 inline_small_functions, flatten_function,
28035 inline_to_all_callers_1): Update.
28037 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
28039 * profile-count.c (profile_count::combine_with_ipa_count): Handle
28042 2018-01-30 Richard Biener <rguenther@suse.de>
28044 PR tree-optimization/83008
28045 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
28046 invariant and constant vector uses in stmts when they need
28047 more than one stmt.
28049 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28052 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
28053 * configure: Regenerate.
28055 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28057 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
28059 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
28060 Use gen_rtx_REG rather than gen_lowpart.
28062 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28064 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
28065 rather than 0 when creating partial subregs.
28067 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
28069 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
28072 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
28075 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
28076 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
28077 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
28078 flags. This restores the settings used before the 2017-07-24.
28079 Turning off pre increment/decrement/modify allows IVOPTS to
28080 optimize DF/SF loops where the index is an int.
28082 2018-01-29 Richard Biener <rguenther@suse.de>
28083 Kelvin Nilsen <kelvin@gcc.gnu.org>
28086 * tree-vect-stmts.c (vectorizable_call): Don't call
28087 targetm.vectorize_builtin_md_vectorized_function if callee is
28090 2018-01-22 Carl Love <cel@us.ibm.com>
28092 * doc/extend.tex: Fix typo in second arg in
28093 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
28095 2018-01-29 Richard Biener <rguenther@suse.de>
28097 PR tree-optimization/84086
28098 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
28099 (flush_ssaname_freelist): When SSA names were released reset
28100 the SCEV hash table.
28102 2018-01-29 Richard Biener <rguenther@suse.de>
28104 PR tree-optimization/84057
28105 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
28106 removed paths when removing edges.
28108 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
28110 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
28111 -mfunction-return=@var{choice}.
28113 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
28115 PR diagnostic/84034
28116 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
28117 Handle CR like TAB.
28118 (layout::print_source_line): Likewise.
28119 (test_get_line_width_without_trailing_whitespace): Add test cases.
28121 2018-01-27 Jakub Jelinek <jakub@redhat.com>
28123 PR middle-end/84040
28124 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
28127 2018-01-26 Jim Wilson <jimw@sifive.com>
28129 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
28131 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
28134 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28136 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
28137 and CMP + SUB-immediate -> SUBS.
28139 2018-01-26 Martin Sebor <msebor@redhat.com>
28141 PR tree-optimization/83896
28142 * tree-ssa-strlen.c (get_string_len): Rename...
28143 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
28144 Avoid assuming length is constant.
28145 (handle_char_store): Use HOST_WIDE_INT for string length.
28147 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
28150 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
28151 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
28153 2018-01-26 Richard Biener <rguenther@suse.de>
28155 PR rtl-optimization/84003
28156 * dse.c (record_store): Only record redundant stores when
28157 the earlier store aliases at least all accesses the later one does.
28159 2018-01-26 Jakub Jelinek <jakub@redhat.com>
28161 PR rtl-optimization/83985
28162 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
28163 REG_CFA_RESTORE insns.
28164 (delete_unmarked_insns): Don't ignore separate shrink wrapping
28165 REG_CFA_RESTORE insns here.
28168 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
28169 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
28171 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28173 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
28174 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
28175 (arc_init): Likewise.
28176 (arc_override_options): Likewise.
28177 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
28179 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
28181 * config/arc/arc.h (TARGET_DBNZ): Define.
28182 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
28183 properly set the tune attribute.
28184 (dbnz): Use TARGET_DBNZ guard.
28185 * config/arc/arc.opt (mtune): Add core3 option.
28187 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28189 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
28190 recognize new pic like addresses.
28191 (arc_delegitimize_address): Clean up.
28193 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28195 * config/arc/arc-arches.def: Option mrf16 valid for all
28197 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
28198 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
28199 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
28200 * config/arc/arc-tables.opt: Regenerate.
28201 * config/arc/arc.c (arc_conditional_register_usage): Handle
28202 reduced register file case.
28203 (arc_file_start): Set must have build attributes.
28204 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
28205 mrf16 option value.
28206 * config/arc/arc.opt (mrf16): Add new option.
28207 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
28208 * config/arc/genmultilib.awk: Handle new mrf16 option.
28209 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
28210 * config/arc/t-multilib: Regenerate.
28211 * doc/invoke.texi (ARC Options): Document mrf16 option.
28213 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28215 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
28216 * config/arc/arc.c (arc_handle_secure_attribute): New function.
28217 (arc_attribute_table): Add 'secure_call' attribute.
28218 (arc_print_operand): Print secure call operand.
28219 (arc_function_ok_for_sibcall): Don't optimize tail calls when
28221 (arc_is_secure_call_p): New function. * config/arc/arc.md
28222 (call_i): Add support for sjli instruction.
28223 (call_value_i): Likewise.
28224 * config/arc/constraints.md (Csc): New constraint.
28226 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
28227 John Eric Martin <John.Martin@emmicro-us.com>
28229 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
28230 * config/arc/arc.c (_arc_jli_section): New struct.
28231 (arc_jli_section): New type.
28232 (rc_jli_sections): New static variable.
28233 (arc_handle_jli_attribute): New function.
28234 (arc_attribute_table): Add jli_always and jli_fixed attribute.
28235 (arc_file_end): New function.
28236 (TARGET_ASM_FILE_END): Define.
28237 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
28238 (arc_add_jli_section): New function.
28239 (jli_call_scan): Likewise.
28240 (arc_reorg): Call jli_call_scan.
28241 (arc_output_addsi): Remove 'S' from printing asm operand.
28242 (arc_is_jli_call_p): New function.
28243 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
28245 (movhi_insn): Likewise.
28246 (movsi_insn): Likewise.
28247 (movsi_set_cc_insn): Likewise.
28248 (loadqi_update): Likewise.
28249 (load_zeroextendqisi_update): Likewise.
28250 (load_signextendqisi_update): Likewise.
28251 (loadhi_update): Likewise.
28252 (load_zeroextendhisi_update): Likewise.
28253 (load_signextendhisi_update): Likewise.
28254 (loadsi_update): Likewise.
28255 (loadsf_update): Likewise.
28256 (movsicc_insn): Likewise.
28257 (bset_insn): Likewise.
28258 (bxor_insn): Likewise.
28259 (bclr_insn): Likewise.
28260 (bmsk_insn): Likewise.
28261 (bicsi3_insn): Likewise.
28262 (cmpsi_cc_c_insn): Likewise.
28263 (movsi_ne): Likewise.
28264 (movsi_cond_exec): Likewise.
28265 (clrsbsi2): Likewise.
28266 (norm_f): Likewise.
28276 (call_i): Remove 'S' asm letter, add jli instruction.
28277 (call_value_i): Likewise.
28278 * config/arc/arc.op (mjli-always): New option.
28279 * config/arc/constraints.md (Cji): New constraint.
28280 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
28282 (subsf3_fpx): Likewise.
28283 (mulsf3_fpx): Likewise.
28284 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
28286 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
28287 function attrbutes.
28288 * doc/invoke.texi (ARC): Document mjli-always option.
28290 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
28292 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
28293 avoid addition with 0 and use incw and decw where possible.
28295 2018-01-26 Richard Biener <rguenther@suse.de>
28297 PR tree-optimization/81082
28298 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
28299 association if it requires casting to unsigned.
28300 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
28301 from fold_plusminus_mult_expr to catch important cases late when
28302 range info is available.
28304 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
28306 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
28307 * configure.ac (hidden_linkonce): New test.
28308 * configure: Regenerate.
28309 * config.in: Regenerate.
28311 2018-01-26 Julia Koval <julia.koval@intel.com>
28313 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
28314 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
28315 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
28316 _mm_mask_bitshuffle_epi64_mask): Fix type.
28317 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
28318 USI_FTYPE_V4DI_V4DI_USI): Remove.
28319 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
28320 __builtin_ia32_vpshufbitqmb256_mask,
28321 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
28322 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
28323 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
28325 2018-01-26 Alan Modra <amodra@gmail.com>
28328 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
28329 UNSPEC_VBPERMQ. Sort other unspecs.
28331 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
28333 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
28335 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
28337 PR middle-end/83055
28338 * predict.c (drop_profile): Do not push/pop cfun; update also
28340 (handle_missing_profiles): Fix logic looking for zero profiles.
28342 2018-01-25 Jakub Jelinek <jakub@redhat.com>
28344 PR middle-end/83977
28345 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
28346 on functions with #pragma omp declare simd or functions with simd
28348 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
28349 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
28350 Remove trailing \n from warning_at calls.
28352 2018-01-25 Tom de Vries <tom@codesourcery.com>
28355 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28356 for neutered workers.
28358 2018-01-24 Joseph Myers <joseph@codesourcery.com>
28361 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
28362 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
28364 2018-01-24 Jeff Law <law@redhat.com>
28367 * i386.c (get_probe_interval): Move to earlier point.
28368 (ix86_compute_frame_layout): If -fstack-clash-protection and
28369 the frame is larger than the probe interval, then use pushes
28370 to save registers rather than reg->mem moves.
28371 (ix86_expand_prologue): Remove conditional for int_registers_saved
28374 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
28377 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
28378 min/max for never referenced object.
28380 2018-01-24 Jakub Jelinek <jakub@redhat.com>
28382 PR middle-end/83977
28383 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
28385 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
28386 attributes from DECL_ATTRIBUTES (decl) without affecting
28387 DECL_ATTRIBUTES (current_function_decl).
28388 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
28389 functions with non-NULL DECL_ABSTRACT_ORIGIN.
28391 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
28393 PR tree-optimization/83979
28394 * fold-const.c (fold_comparison): Use constant_boolean_node
28395 instead of boolean_{true,false}_node.
28397 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
28399 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
28402 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28404 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28405 Simplify the clause that sets the length attribute.
28406 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28407 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
28408 clause that sets the length attribute.
28409 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28411 2018-01-24 Tom de Vries <tom@codesourcery.com>
28414 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
28415 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
28416 Add strict parameter.
28417 (prevent_branch_around_nothing): Insert dummy insn between branch to
28418 label and label with no ptx insn inbetween.
28419 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
28421 2018-01-24 Tom de Vries <tom@codesourcery.com>
28424 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28425 for neutered threads in warp.
28426 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
28428 2018-01-24 Richard Biener <rguenther@suse.de>
28430 PR tree-optimization/83176
28431 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
28434 2018-01-24 Richard Biener <rguenther@suse.de>
28436 PR tree-optimization/82819
28437 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
28438 code generating pluses that are no-ops in the target precision.
28440 2018-01-24 Richard Biener <rguenther@suse.de>
28442 PR middle-end/84000
28443 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
28445 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28447 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
28448 to merge probabilities.
28449 * predict.c (probably_never_executed): Also mark as cold functions
28450 with global 0 profile and guessed local profile.
28451 * profile-count.c (profile_probability::combine_with_count): New
28453 * profile-count.h (profile_probability::operator*,
28454 profile_probability::operator*=, profile_probability::operator/,
28455 profile_probability::operator/=): Reduce precision to adjusted
28456 and set value to guessed on contradictory divisions.
28457 (profile_probability::combine_with_freq): Remove.
28458 (profile_probability::combine_wiht_count): Declare.
28459 (profile_count::force_nonzero):: Set to adjusted.
28460 (profile_count::probability_in):: Set quality to adjusted.
28461 * tree-ssa-tail-merge.c (replace_block_by): Use
28462 combine_with_count.
28464 2018-01-23 Andrew Waterman <andrew@sifive.com>
28465 Jim Wilson <jimw@sifive.com>
28467 * config/riscv/riscv.c (riscv_stack_boundary): New.
28468 (riscv_option_override): Set riscv_stack_boundary. Handle
28469 riscv_preferred_stack_boundary_arg.
28470 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
28471 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
28472 (STACK_BOUNDARY): Set to riscv_stack_boundary.
28473 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
28474 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
28475 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
28477 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
28480 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
28481 of struct ix86_frame.
28482 (ix86_expand_epilogue): Likewise. Add a local variable for
28483 the reg_save_offset field in struct ix86_frame.
28485 2018-01-23 Bin Cheng <bin.cheng@arm.com>
28487 PR tree-optimization/82604
28488 * tree-loop-distribution.c (enum partition_kind): New enum item
28489 PKIND_PARTIAL_MEMSET.
28490 (partition_builtin_p): Support above new enum item.
28491 (generate_code_for_partition): Ditto.
28492 (compute_access_range): Differentiate cases that equality can be
28493 proven at all loops, the innermost loops or no loops.
28494 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
28495 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
28496 (finalize_partitions, distribute_loop): Don't fuse partition of
28497 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
28498 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
28499 parloop is enabled.
28501 2018-01-23 Martin Liska <mliska@suse.cz>
28503 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
28504 order to ignore the predictor.
28505 (PRED_POLYMORPHIC_CALL): Likewise.
28506 (PRED_RECURSIVE_CALL): Likewise.
28508 2018-01-23 Martin Liska <mliska@suse.cz>
28510 * tree-profile.c (tree_profiling): Print function header to
28511 aware reader which function we are working on.
28512 * value-prof.c (gimple_find_values_to_profile): Do not print
28513 not interesting value histograms.
28515 2018-01-23 Martin Liska <mliska@suse.cz>
28517 * profile-count.h (enum profile_quality): Add
28518 profile_uninitialized as the first value. Do not number values
28519 as they are zero based.
28520 (profile_count::verify): Update sanity check.
28521 (profile_probability::verify): Likewise.
28523 2018-01-23 Nathan Sidwell <nathan@acm.org>
28525 * doc/invoke.texi (ffor-scope): Deprecate.
28527 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28529 PR tree-optimization/83510
28530 * domwalk.c (set_all_edges_as_executable): New function.
28531 (dom_walker::dom_walker): Convert bool param
28532 "skip_unreachable_blocks" to enum reachability. Move setup of
28533 edge flags to set_all_edges_as_executable and only do it when
28534 reachability is REACHABLE_BLOCKS.
28535 * domwalk.h (enum dom_walker::reachability): New enum.
28536 (dom_walker::dom_walker): Convert bool param
28537 "skip_unreachable_blocks" to enum reachability.
28538 (set_all_edges_as_executable): New decl.
28539 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
28540 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
28542 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
28543 but converting true to REACHABLE_BLOCKS.
28544 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
28546 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
28547 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
28548 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
28550 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
28551 if check_all_array_refs will be called.
28553 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28555 * tree.c (selftest::test_location_wrappers): Add more test
28558 2018-01-23 David Malcolm <dmalcolm@redhat.com>
28560 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
28561 (selftest::test_bit_in_range): Likewise.
28563 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28566 * doc/sourcebuild.texi (vect_float): Say that the selector
28567 only describes the situation when -funsafe-math-optimizations is on.
28568 (vect_float_strict): Document.
28570 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
28572 PR tree-optimization/83965
28573 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
28574 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
28575 instead of checking only for a reduction.
28576 (vect_recog_widen_sum_pattern): Likewise.
28578 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28580 * predict.c (probably_never_executed): Only use precise profile info.
28581 (compute_function_frequency): Skip after inlining hack since we now
28582 have quality checking.
28584 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
28586 * profile-count.h (profile_probability::very_unlikely,
28587 profile_probability::unlikely, profile_probability::even): Set
28588 precision to guessed.
28590 2018-01-23 Richard Biener <rguenther@suse.de>
28592 PR tree-optimization/83963
28593 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
28594 Properly terminate dominator walk when crossing the exit edge not
28595 when visiting its source block.
28597 2018-01-23 Jakub Jelinek <jakub@redhat.com>
28600 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
28601 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
28603 2018-01-22 Jakub Jelinek <jakub@redhat.com>
28605 PR tree-optimization/83957
28606 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
28607 semicolon after for body surrounded by braces.
28609 PR tree-optimization/83081
28610 * profile-count.h (profile_probability::split): New method.
28611 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
28612 Use profile_probability::split.
28613 (do_compare_rtx_and_jump): Fix adjustment of probabilities
28614 when splitting a single conditional jump into 2.
28616 2018-01-22 David Malcolm <dmalcolm@redhat.com>
28618 PR tree-optimization/69452
28619 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
28622 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28624 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
28625 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
28626 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
28628 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28630 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
28632 * config/rl78/rl78.md (movdi): New define_expand.
28633 * config/rl78/rl78.c (rl78_split_movdi): New function.
28635 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
28638 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
28640 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
28641 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
28642 128-bit to produce an UNSPEC move to get the double word with the
28643 signbit and then a shift directly to do signbit.
28644 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
28645 implementation with a new version that just does either a direct
28646 move or a regular move. Move memory interface to separate insns.
28647 Move insns so they are next to the expander.
28648 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
28649 with signbit move. Split big and little endian case.
28650 (signbit<mode>2_dm_mem_le): Likewise.
28651 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
28652 (signbit<mode>2_dm2): Likewise.
28654 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28656 * config/rl78/rl78.md (anddi3): New define_expand.
28658 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28660 * config/rl78/rl78.md (umindi3): New define_expand.
28662 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28664 * config/rl78/rl78.md (smindi3): New define_expand.
28666 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28668 * config/rl78/rl78.md (smaxdi3): New define_expand.
28670 2018-01-22 Carl Love <cel@us.ibm.com>
28672 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
28673 LVX_V1TI): Add macro expansion.
28674 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
28675 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
28676 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
28677 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
28678 Change check to determine if the instruction is a byte reversing
28679 entry. Fix typo in comment.
28680 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
28681 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
28682 Add def_builtin calls for new builtins.
28683 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
28684 Add define_insn expansion.
28686 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28688 * config/rl78/rl78.md (umaxdi3): New define_expand.
28690 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
28692 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
28693 for non-QImode registers.
28695 2018-01-22 Richard Biener <rguenther@suse.de>
28697 PR tree-optimization/83963
28698 * graphite-scop-detection.c (scop_detection::get_sese): Delay
28699 including the loop exit block.
28700 (scop_detection::merge_sese): Likewise.
28701 (scop_detection::add_scop): Do it here instead.
28703 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28705 * doc/sourcebuild.texi (arm_softfloat): Document.
28707 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
28710 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
28711 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
28712 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
28714 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28715 David Edelsohn <dje.gcc@gmail.com>
28718 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28719 Change "crset eq" to "crset 2".
28720 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28721 (*call_indirect_aix<mode>_nospec): Likewise.
28722 (*call_value_indirect_aix<mode>_nospec): Likewise.
28723 (*call_indirect_elfv2<mode>_nospec): Likewise.
28724 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
28725 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
28726 change assembly output from . to $.
28727 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28728 (indirect_jump<mode>_nospec): Change assembly output from . to $.
28729 (*tablejump<mode>_internal1_nospec): Likewise.
28731 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
28734 * config/sh/sh_optimize_sett_clrt.cc:
28735 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
28737 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
28739 PR tree-optimization/83940
28740 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
28741 offset_dt to vect_constant_def rather than vect_unknown_def_type.
28742 (vect_check_load_store_mask): Add a mask_dt_out parameter and
28743 use it to pass back the definition type.
28744 (vect_check_store_rhs): Likewise rhs_dt_out.
28745 (vect_build_gather_load_calls): Add a mask_dt argument and use
28746 it instead of a call to vect_is_simple_use.
28747 (vectorizable_store): Update calls to vect_check_load_store_mask
28748 and vect_check_store_rhs. Use the dt returned by the latter instead
28749 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
28750 instead of calls to vect_is_simple_use. Pass the scalar rather
28751 than the vector operand to vect_is_simple_use when handling
28752 second and subsequent copies of an rhs value.
28753 (vectorizable_load): Update calls to vect_check_load_store_mask
28754 and vect_build_gather_load_calls. Use the cached mask_dt and
28755 gs_info.offset_dt instead of calls to vect_is_simple_use.
28757 2018-01-20 Jakub Jelinek <jakub@redhat.com>
28759 PR middle-end/83945
28760 * tree-emutls.c: Include gimplify.h.
28761 (lower_emutls_2): New function.
28762 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
28763 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
28764 it before further processing.
28767 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
28768 UINTVAL (trueop1) instead of INTVAL (op1).
28770 2018-01-19 Jakub Jelinek <jakub@redhat.com>
28774 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
28775 INCOMING_FRAME_SP_OFFSET if not defined.
28776 (scan_trace): Add ENTRY argument. If true and
28777 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
28778 emit a note to adjust the CFA offset.
28779 (create_cfi_notes): Adjust scan_trace callers.
28780 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
28781 INCOMING_FRAME_SP_OFFSET in the CIE.
28782 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
28783 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
28785 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
28786 * doc/tm.texi: Regenerated.
28788 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
28790 PR rtl-optimization/83147
28791 * lra-constraints.c (remove_inheritance_pseudos): Use
28792 lra_substitute_pseudo_within_insn.
28794 2018-01-19 Tom de Vries <tom@codesourcery.com>
28795 Cesar Philippidis <cesar@codesourcery.com>
28798 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
28800 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
28803 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
28804 spaces for function labels.
28806 2018-01-19 Martin Liska <mliska@suse.cz>
28808 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
28809 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
28810 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
28811 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
28812 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
28813 (PRED_CONST_RETURN): Change from 69 to 65.
28814 (PRED_NULL_RETURN): Change from 91 to 71.
28815 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
28816 (PRED_LOOP_GUARD): Change from 66 to 73.
28818 2018-01-19 Martin Liska <mliska@suse.cz>
28820 * predict.c (predict_insn_def): Add new assert.
28821 (struct branch_predictor): Change type to signed integer.
28822 (test_prediction_value_range): Amend test to cover
28823 PROB_UNINITIALIZED.
28824 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
28825 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
28826 (PRED_LOOP_ITERATIONS_MAX): Likewise.
28827 (PRED_LOOP_IV_COMPARE): Likewise.
28828 * predict.h (PROB_UNINITIALIZED): Define new constant.
28830 2018-01-19 Martin Liska <mliska@suse.cz>
28832 * predict.c (dump_prediction): Add new format for
28833 analyze_brprob.py script which is enabled with -details
28835 * profile-count.h (precise_p): New function.
28837 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28839 PR tree-optimization/83922
28840 * tree-vect-loop.c (vect_verify_full_masking): Return false if
28841 there are no statements that need masking.
28842 (vect_active_double_reduction_p): New function.
28843 (vect_analyze_loop_operations): Use it when handling phis that
28844 are not in the loop header.
28846 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
28848 PR tree-optimization/83914
28849 * tree-vect-loop.c (vectorizable_induction): Don't convert
28850 init_expr or apply the peeling adjustment for inductions
28851 that are nested within the vectorized loop.
28853 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
28855 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
28858 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28862 * function.h (gimplify_parameters): Add gimple_seq * argument.
28863 * function.c: Include gimple.h and options.h.
28864 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
28865 for the added local temporaries if needed.
28866 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
28867 if there are any parameter cleanups, wrap whole body into a
28868 try/finally with the cleanups.
28870 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
28873 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
28874 Use GET_MODE_CLASS for scalar floating point.
28876 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28880 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
28881 Fix call of call_cgraph_insertion_hooks.
28883 2018-01-18 Martin Sebor <msebor@redhat.com>
28885 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
28887 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
28890 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
28893 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
28896 * common.opt: (-ffile-prefix-map): New option.
28897 * opts.c (common_handle_option): Defer it.
28898 * opts-global.c (handle_common_deferred_options): Handle it.
28899 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
28900 * file-prefix-map.h: New file.
28901 (remap_debug_filename, add_debug_prefix_map): ...here.
28902 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
28903 * final.c (debug_prefix_map, add_debug_prefix_map
28904 remap_debug_filename): Move to...
28905 * file-prefix-map.c: New file.
28906 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
28907 generalize, get rid of alloca(), use strrchr() instead of strchr().
28908 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
28909 Implement in terms of add_prefix_map().
28910 (remap_macro_filename, remap_debug_filename): Implement in term of
28912 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
28913 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
28914 * dbxout.c: Include file-prefix-map.h.
28915 * varasm.c: Likewise.
28916 * vmsdbgout.c: Likewise.
28917 * xcoffout.c: Likewise.
28918 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
28919 * doc/cppopts.texi (-fmacro-prefix-map): Document.
28920 * doc/invoke.texi (-ffile-prefix-map): Document.
28921 (-fdebug-prefix-map): Update description.
28923 2018-01-18 Martin Liska <mliska@suse.cz>
28925 * config/i386/i386.c (indirect_thunk_name): Document that also
28927 (output_indirect_thunk): Document why both instructions
28928 (pause and lfence) are generated.
28930 2018-01-18 Richard Biener <rguenther@suse.de>
28932 PR tree-optimization/83887
28933 * graphite-scop-detection.c
28934 (scop_detection::get_nearest_dom_with_single_entry): Remove.
28935 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
28936 (scop_detection::merge_sese): Re-implement with a flood-fill
28937 algorithm that properly finds a SESE region if it exists.
28939 2018-01-18 Jakub Jelinek <jakub@redhat.com>
28942 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
28943 pointer_diff optimizations use view_convert instead of convert.
28945 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
28947 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28948 Generate different code for -mno-speculate-indirect-jumps.
28949 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28950 (*call_indirect_aix<mode>): Disable for
28951 -mno-speculate-indirect-jumps.
28952 (*call_indirect_aix<mode>_nospec): New define_insn.
28953 (*call_value_indirect_aix<mode>): Disable for
28954 -mno-speculate-indirect-jumps.
28955 (*call_value_indirect_aix<mode>_nospec): New define_insn.
28956 (*sibcall_nonlocal_sysv<mode>): Generate different code for
28957 -mno-speculate-indirect-jumps.
28958 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28960 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
28962 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
28963 long double type, set the flags for noting the default long double
28964 type, even if we don't pass or return a long double type.
28966 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
28969 * ipa-inline.c (flatten_function): Do not overwrite final inlining
28972 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
28974 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
28975 support for merge[hl].
28976 (fold_mergehl_helper): New helper function.
28977 (tree-vector-builder.h): New #include for tree_vector_builder usage.
28978 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
28979 (altivec_vmrglw_direct): Add xxmrglw insn.
28981 2018-01-17 Andrew Waterman <andrew@sifive.com>
28983 * config/riscv/riscv.c (riscv_conditional_register_usage): If
28984 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
28986 2018-01-17 David Malcolm <dmalcolm@redhat.com>
28989 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
28990 call the lto_location_cache before reading the
28991 DECL_SOURCE_LOCATION of the types.
28993 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
28994 Richard Sandiford <richard.sandiford@linaro.org>
28996 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
28997 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
28998 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
28999 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
29000 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
29002 * config/aarch64/constraints.md (aarch64_movti_operand):
29004 * config/aarch64/predicates.md (Uti): Add new constraint.
29006 2018-01-17 Carl Love <cel@us.ibm.com>
29008 * config/rs6000/vsx.md (define_expand xl_len_r,
29009 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
29010 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
29012 (define_expand, define_insn): Move the shift left from the
29013 define_insn to the define_expand for lxvl and stxvl instructions.
29014 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
29015 and XL_LEN_R definitions to PURE.
29017 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
29019 * config/i386/i386.c (indirect_thunk_name): Declare regno
29020 as unsigned int. Compare regno with INVALID_REGNUM.
29021 (output_indirect_thunk): Ditto.
29022 (output_indirect_thunk_function): Ditto.
29023 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
29024 in the call to output_indirect_thunk_function.
29026 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
29028 PR middle-end/83884
29029 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
29030 rather than the size of inner_type to determine the stack slot size
29031 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
29033 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
29036 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
29039 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
29041 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
29042 endian Linux systems to optionally enable multilibs for selecting
29043 the long double type if the user configured an explicit type.
29044 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
29045 have no long double multilibs if not defined.
29046 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
29047 warn if the user used -mabi={ieee,ibm}longdouble and we built
29048 multilibs for long double.
29049 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
29050 appropriate multilib option.
29051 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
29053 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
29054 for building long double multilibs.
29055 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
29057 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
29059 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
29062 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
29064 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
29067 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
29070 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
29073 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
29075 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
29076 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
29078 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
29080 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
29081 different rtl trees depending on TARGET_64BIT.
29082 (rs6000_gen_lvx): Likewise.
29084 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
29086 * config/visium/visium.md (nop): Tweak comment.
29087 (hazard_nop): Likewise.
29089 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
29091 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
29092 -mspeculate-indirect-jumps.
29093 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
29094 for -mno-speculate-indirect-jumps.
29095 (*call_indirect_elfv2<mode>_nospec): New define_insn.
29096 (*call_value_indirect_elfv2<mode>): Disable for
29097 -mno-speculate-indirect-jumps.
29098 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
29099 (indirect_jump): Emit different RTL for
29100 -mno-speculate-indirect-jumps.
29101 (*indirect_jump<mode>): Disable for
29102 -mno-speculate-indirect-jumps.
29103 (*indirect_jump<mode>_nospec): New define_insn.
29104 (tablejump): Emit different RTL for
29105 -mno-speculate-indirect-jumps.
29106 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
29107 (tablejumpsi_nospec): New define_expand.
29108 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
29109 (tablejumpdi_nospec): New define_expand.
29110 (*tablejump<mode>_internal1): Disable for
29111 -mno-speculate-indirect-jumps.
29112 (*tablejump<mode>_internal1_nospec): New define_insn.
29113 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
29116 2018-01-16 Artyom Skrobov tyomitch@gmail.com
29118 * caller-save.c (insert_save): Drop unnecessary parameter. All
29121 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29122 Richard Biener <rguenth@suse.de>
29125 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
29126 return early, inline manually is_gimple_sizepos. Make sure if we
29127 call gimplify_expr we don't end up with a gimple constant.
29128 * tree.c (variably_modified_type_p): Don't return true for
29129 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
29130 * gimplify.h (is_gimple_sizepos): Remove.
29132 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29134 PR tree-optimization/83857
29135 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
29136 vectorizable_live_operation for pure SLP statements.
29137 (vectorizable_live_operation): Handle PHIs.
29139 2018-01-16 Richard Biener <rguenther@suse.de>
29141 PR tree-optimization/83867
29142 * tree-vect-stmts.c (vect_transform_stmt): Precompute
29143 nested_in_vect_loop_p since the scalar stmt may get invalidated.
29145 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29148 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
29149 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
29150 If off is not INTEGER_CST, issue a may not be aligned warning
29151 rather than isn't aligned. Use isn%'t rather than isn't.
29152 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
29154 <case MULT_EXPR>: Improve the case when bottom and one of the
29155 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
29156 operand, in that case check if the other operand is multiple of
29157 bottom divided by the INTEGER_CST operand.
29159 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29162 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
29163 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
29164 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
29165 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
29166 * config/pa/pa.c (pa_function_arg_advance): Likewise.
29167 (pa_function_arg, pa_arg_partial_bytes): Likewise.
29168 (pa_function_arg_size): New function.
29170 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29172 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
29173 in a separate statement.
29175 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
29177 PR tree-optimization/83847
29178 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
29179 group gathers and scatters.
29181 2018-01-16 Jakub Jelinek <jakub@redhat.com>
29183 PR rtl-optimization/86620
29184 * params.def (max-sched-ready-insns): Bump minimum value to 1.
29186 PR rtl-optimization/83213
29187 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
29188 to last if both are JUMP_INSNs.
29190 PR tree-optimization/83843
29191 * gimple-ssa-store-merging.c
29192 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
29193 store_immediate_info for bswap/nop orig_stores.
29195 2018-01-15 Andrew Waterman <andrew@sifive.com>
29197 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
29199 <UDIV>: Increase cost if !TARGET_DIV.
29201 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
29203 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
29204 (define_attr "cr_logical_3op"): New.
29205 (cceq_ior_compare): Adjust.
29206 (cceq_ior_compare_complement): Adjust.
29207 (*cceq_rev_compare): Adjust.
29208 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
29209 (is_cracked_insn): Adjust.
29210 (insn_must_be_first_in_group): Adjust.
29211 * config/rs6000/40x.md: Adjust.
29212 * config/rs6000/440.md: Adjust.
29213 * config/rs6000/476.md: Adjust.
29214 * config/rs6000/601.md: Adjust.
29215 * config/rs6000/603.md: Adjust.
29216 * config/rs6000/6xx.md: Adjust.
29217 * config/rs6000/7450.md: Adjust.
29218 * config/rs6000/7xx.md: Adjust.
29219 * config/rs6000/8540.md: Adjust.
29220 * config/rs6000/cell.md: Adjust.
29221 * config/rs6000/e300c2c3.md: Adjust.
29222 * config/rs6000/e500mc.md: Adjust.
29223 * config/rs6000/e500mc64.md: Adjust.
29224 * config/rs6000/e5500.md: Adjust.
29225 * config/rs6000/e6500.md: Adjust.
29226 * config/rs6000/mpc.md: Adjust.
29227 * config/rs6000/power4.md: Adjust.
29228 * config/rs6000/power5.md: Adjust.
29229 * config/rs6000/power6.md: Adjust.
29230 * config/rs6000/power7.md: Adjust.
29231 * config/rs6000/power8.md: Adjust.
29232 * config/rs6000/power9.md: Adjust.
29233 * config/rs6000/rs64.md: Adjust.
29234 * config/rs6000/titan.md: Adjust.
29236 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29238 * config/i386/predicates.md (indirect_branch_operand): Rewrite
29239 ix86_indirect_branch_register logic.
29241 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29243 * config/i386/constraints.md (Bs): Update
29244 ix86_indirect_branch_register check. Don't check
29245 ix86_indirect_branch_register with GOT_memory_operand.
29247 * config/i386/predicates.md (GOT_memory_operand): Don't check
29248 ix86_indirect_branch_register here.
29249 (GOT32_symbol_operand): Likewise.
29251 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29253 * config/i386/predicates.md (constant_call_address_operand):
29254 Rewrite ix86_indirect_branch_register logic.
29255 (sibcall_insn_operand): Likewise.
29257 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29259 * config/i386/constraints.md (Bs): Replace
29260 ix86_indirect_branch_thunk_register with
29261 ix86_indirect_branch_register.
29263 * config/i386/i386.md (indirect_jump): Likewise.
29264 (tablejump): Likewise.
29265 (*sibcall_memory): Likewise.
29266 (*sibcall_value_memory): Likewise.
29267 Peepholes of indirect call and jump via memory: Likewise.
29268 * config/i386/i386.opt: Likewise.
29269 * config/i386/predicates.md (indirect_branch_operand): Likewise.
29270 (GOT_memory_operand): Likewise.
29271 (call_insn_operand): Likewise.
29272 (sibcall_insn_operand): Likewise.
29273 (GOT32_symbol_operand): Likewise.
29275 2018-01-15 Jakub Jelinek <jakub@redhat.com>
29277 PR middle-end/83837
29278 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
29279 type rather than type addr's type points to.
29280 (expand_omp_atomic_mutex): Likewise.
29281 (expand_omp_atomic): Likewise.
29283 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
29286 * config/i386/i386.c (output_indirect_thunk_function): Use
29287 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
29288 for __x86_return_thunk.
29290 2018-01-15 Richard Biener <rguenther@suse.de>
29292 PR middle-end/83850
29293 * expmed.c (extract_bit_field_1): Fix typo.
29295 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
29298 * config/arm/iterators.md (VF): New mode iterator.
29299 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
29300 Remove integer-related logic from pattern.
29301 (neon_vabd<mode>_3): Likewise.
29303 2018-01-15 Jakub Jelinek <jakub@redhat.com>
29305 PR middle-end/82694
29306 * common.opt (fstrict-overflow): No longer an alias.
29307 (fwrapv-pointer): New option.
29308 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
29309 also for pointer types based on flag_wrapv_pointer.
29310 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
29311 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
29312 opts->x_flag_wrapv got set.
29313 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
29314 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
29315 POINTER_TYPE_OVERFLOW_UNDEFINED.
29316 * match.pd: Likewise in address comparison pattern.
29317 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
29319 2018-01-15 Richard Biener <rguenther@suse.de>
29322 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
29323 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
29324 Reset type names to their identifier if their TYPE_DECL doesn't
29325 have linkage (and thus is used for ODR and devirt).
29326 (save_debug_info_for_decl): Remove.
29327 (save_debug_info_for_type): Likewise.
29328 (add_tree_to_fld_list): Adjust.
29329 * tree-pretty-print.c (dump_generic_node): Make dumping of
29330 type names more robust.
29332 2018-01-15 Richard Biener <rguenther@suse.de>
29334 * BASE-VER: Bump to 8.0.1.
29336 2018-01-14 Martin Sebor <msebor@redhat.com>
29339 * builtins.c (check_access): Avoid warning when the no-warning bit
29342 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
29344 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
29345 * ira-color (allocno_hard_regs_compare): Likewise.
29347 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
29350 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
29351 Use .pushsection/.popsection.
29353 2018-01-14 Martin Sebor <msebor@redhat.com>
29356 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
29358 2018-01-14 Jakub Jelinek <jakub@redhat.com>
29360 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
29361 entry from extra_headers.
29362 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
29363 extra_headers, make the list bitwise identical to the i?86-*-* one.
29365 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29367 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
29368 -mcmodel=large with -mindirect-branch=thunk,
29369 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
29370 -mfunction-return=thunk-extern.
29371 * doc/invoke.texi: Document -mcmodel=large is incompatible with
29372 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
29373 -mfunction-return=thunk and -mfunction-return=thunk-extern.
29375 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29377 * config/i386/i386.c (print_reg): Print the name of the full
29378 integer register without '%'.
29379 (ix86_print_operand): Handle 'V'.
29380 * doc/extend.texi: Document 'V' modifier.
29382 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29384 * config/i386/constraints.md (Bs): Disallow memory operand for
29385 -mindirect-branch-register.
29387 * config/i386/predicates.md (indirect_branch_operand): Likewise.
29388 (GOT_memory_operand): Likewise.
29389 (call_insn_operand): Likewise.
29390 (sibcall_insn_operand): Likewise.
29391 (GOT32_symbol_operand): Likewise.
29392 * config/i386/i386.md (indirect_jump): Call convert_memory_address
29393 for -mindirect-branch-register.
29394 (tablejump): Likewise.
29395 (*sibcall_memory): Likewise.
29396 (*sibcall_value_memory): Likewise.
29397 Disallow peepholes of indirect call and jump via memory for
29398 -mindirect-branch-register.
29399 (*call_pop): Replace m with Bw.
29400 (*call_value_pop): Likewise.
29401 (*sibcall_pop_memory): Replace m with Bs.
29402 * config/i386/i386.opt (mindirect-branch-register): New option.
29403 * doc/invoke.texi: Document -mindirect-branch-register option.
29405 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29407 * config/i386/i386-protos.h (ix86_output_function_return): New.
29408 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
29409 set function_return_type.
29410 (indirect_thunk_name): Add ret_p to indicate thunk for function
29412 (output_indirect_thunk_function): Pass false to
29413 indirect_thunk_name.
29414 (ix86_output_indirect_branch_via_reg): Likewise.
29415 (ix86_output_indirect_branch_via_push): Likewise.
29416 (output_indirect_thunk_function): Create alias for function
29417 return thunk if regno < 0.
29418 (ix86_output_function_return): New function.
29419 (ix86_handle_fndecl_attribute): Handle function_return.
29420 (ix86_attribute_table): Add function_return.
29421 * config/i386/i386.h (machine_function): Add
29422 function_return_type.
29423 * config/i386/i386.md (simple_return_internal): Use
29424 ix86_output_function_return.
29425 (simple_return_internal_long): Likewise.
29426 * config/i386/i386.opt (mfunction-return=): New option.
29427 (indirect_branch): Mention -mfunction-return=.
29428 * doc/extend.texi: Document function_return function attribute.
29429 * doc/invoke.texi: Document -mfunction-return= option.
29431 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
29433 * config/i386/i386-opts.h (indirect_branch): New.
29434 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
29435 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
29436 with local indirect jump when converting indirect call and jump.
29437 (ix86_set_indirect_branch_type): New.
29438 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
29439 (indirectlabelno): New.
29440 (indirect_thunk_needed): Likewise.
29441 (indirect_thunk_bnd_needed): Likewise.
29442 (indirect_thunks_used): Likewise.
29443 (indirect_thunks_bnd_used): Likewise.
29444 (INDIRECT_LABEL): Likewise.
29445 (indirect_thunk_name): Likewise.
29446 (output_indirect_thunk): Likewise.
29447 (output_indirect_thunk_function): Likewise.
29448 (ix86_output_indirect_branch_via_reg): Likewise.
29449 (ix86_output_indirect_branch_via_push): Likewise.
29450 (ix86_output_indirect_branch): Likewise.
29451 (ix86_output_indirect_jmp): Likewise.
29452 (ix86_code_end): Call output_indirect_thunk_function if needed.
29453 (ix86_output_call_insn): Call ix86_output_indirect_branch if
29455 (ix86_handle_fndecl_attribute): Handle indirect_branch.
29456 (ix86_attribute_table): Add indirect_branch.
29457 * config/i386/i386.h (machine_function): Add indirect_branch_type
29458 and has_local_indirect_jump.
29459 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
29461 (tablejump): Likewise.
29462 (*indirect_jump): Use ix86_output_indirect_jmp.
29463 (*tablejump_1): Likewise.
29464 (simple_return_indirect_internal): Likewise.
29465 * config/i386/i386.opt (mindirect-branch=): New option.
29466 (indirect_branch): New.
29469 (thunk-inline): Likewise.
29470 (thunk-extern): Likewise.
29471 * doc/extend.texi: Document indirect_branch function attribute.
29472 * doc/invoke.texi: Document -mindirect-branch= option.
29474 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
29477 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
29479 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
29481 * ipa-inline.c (want_inline_small_function_p): Return false if
29482 inlining has already failed with CIF_FINAL_ERROR.
29483 (update_caller_keys): Call want_inline_small_function_p before
29485 (update_callee_keys): Likewise.
29487 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
29489 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
29491 (rs6000_quadword_masked_address_p): Likewise.
29492 (quad_aligned_load_p): Likewise.
29493 (quad_aligned_store_p): Likewise.
29494 (const_load_sequence_p): Add comment to describe the outer-most loop.
29495 (mimic_memory_attributes_and_flags): New function.
29496 (rs6000_gen_stvx): Likewise.
29497 (replace_swapped_aligned_store): Likewise.
29498 (rs6000_gen_lvx): Likewise.
29499 (replace_swapped_aligned_load): Likewise.
29500 (replace_swapped_load_constant): Capitalize argument name in
29501 comment describing this function.
29502 (rs6000_analyze_swaps): Add a third pass to search for vector loads
29503 and stores that access quad-word aligned addresses and replace
29504 with stvx or lvx instructions when appropriate.
29505 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
29506 New function prototype.
29507 (rs6000_quadword_masked_address_p): Likewise.
29508 (rs6000_gen_lvx): Likewise.
29509 (rs6000_gen_stvx): Likewise.
29510 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
29511 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
29512 when memory address is aligned.
29513 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
29514 this split to select lvx instruction when memory address is aligned.
29515 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
29516 instruction when memory address is aligned.
29517 (*vsx_le_perm_load_v16qi): Likewise.
29518 (four unnamed splitters): Modify to select the stvx instruction
29519 when memory is aligned.
29521 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
29523 * predict.c (determine_unlikely_bbs): Handle correctly BBs
29524 which appears in the queue multiple times.
29526 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29527 Alan Hayward <alan.hayward@arm.com>
29528 David Sherwood <david.sherwood@arm.com>
29530 * tree-vectorizer.h (vec_lower_bound): New structure.
29531 (_loop_vec_info): Add check_nonzero and lower_bounds.
29532 (LOOP_VINFO_CHECK_NONZERO): New macro.
29533 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
29534 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
29535 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
29536 fields. Make seg_len the distance travelled, not including the
29538 (dr_direction_indicator): Declare.
29539 (dr_zero_step_indicator): Likewise.
29540 (dr_known_forward_stride_p): Likewise.
29541 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
29543 (runtime_alias_check_p): Allow runtime alias checks with
29545 (operator ==): Compare access_size and align.
29546 (prune_runtime_alias_test_list): Rework for new distinction between
29547 the access_size and seg_len.
29548 (create_intersect_range_checks_index): Likewise. Cope with polynomial
29550 (get_segment_min_max): New function.
29551 (create_intersect_range_checks): Use it.
29552 (dr_step_indicator): New function.
29553 (dr_direction_indicator): Likewise.
29554 (dr_zero_step_indicator): Likewise.
29555 (dr_known_forward_stride_p): Likewise.
29556 * tree-loop-distribution.c (data_ref_segment_size): Return
29557 DR_STEP * (niters - 1).
29558 (compute_alias_check_pairs): Update call to the dr_with_seg_len
29560 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
29561 (vect_preserves_scalar_order_p): New function, split out from...
29562 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
29563 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
29564 (vect_vfa_access_size): New function.
29565 (vect_vfa_align): Likewise.
29566 (vect_compile_time_alias): Take access_size_a and access_b arguments.
29567 (dump_lower_bound): New function.
29568 (vect_check_lower_bound): Likewise.
29569 (vect_small_gap_p): Likewise.
29570 (vectorizable_with_step_bound_p): Likewise.
29571 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
29572 depencies if the vectorization factor is 1. Convert the checks
29573 for nonzero steps into checks on the bounds of DR_STEP. Try using
29574 a bunds check for variable steps if the minimum required step is
29575 relatively small. Update calls to the dr_with_seg_len
29576 constructor and to vect_compile_time_alias.
29577 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
29579 (vect_loop_versioning): Call it.
29580 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
29582 (vect_estimate_min_profitable_iters): Account for any bounds checks.
29584 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29585 Alan Hayward <alan.hayward@arm.com>
29586 David Sherwood <david.sherwood@arm.com>
29588 * doc/sourcebuild.texi (vect_scatter_store): Document.
29589 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
29591 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
29593 * genopinit.c (main): Add supports_vec_scatter_store and
29594 supports_vec_scatter_store_cached to target_optabs.
29595 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
29596 IFN_MASK_SCATTER_STORE.
29597 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
29599 * internal-fn.h (internal_store_fn_p): Declare.
29600 (internal_fn_stored_value_index): Likewise.
29601 * internal-fn.c (scatter_store_direct): New macro.
29602 (expand_scatter_store_optab_fn): New function.
29603 (direct_scatter_store_optab_supported_p): New macro.
29604 (internal_store_fn_p): New function.
29605 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
29606 IFN_MASK_SCATTER_STORE.
29607 (internal_fn_mask_index): Likewise.
29608 (internal_fn_stored_value_index): New function.
29609 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
29610 for scatter stores.
29611 * optabs-query.h (supports_vec_scatter_store_p): Declare.
29612 * optabs-query.c (supports_vec_scatter_store_p): New function.
29613 * tree-vectorizer.h (vect_get_store_rhs): Declare.
29614 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
29615 true for scatter stores.
29616 (vect_gather_scatter_fn_p): Handle scatter stores too.
29617 (vect_check_gather_scatter): Consider using scatter stores if
29618 supports_vec_scatter_store_p.
29619 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
29620 scatter stores too.
29621 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29622 internal_fn_stored_value_index.
29623 (check_load_store_masking): Handle scatter stores too.
29624 (vect_get_store_rhs): Make public.
29625 (vectorizable_call): Use internal_store_fn_p.
29626 (vectorizable_store): Handle scatter store internal functions.
29627 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
29628 when deciding whether the end of the group has been reached.
29629 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
29630 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
29631 (mask_scatter_store<mode>): New insns.
29633 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29634 Alan Hayward <alan.hayward@arm.com>
29635 David Sherwood <david.sherwood@arm.com>
29637 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
29638 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
29639 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
29641 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
29642 Use vect_truncate_gather_scatter_offset if we can't treat the
29643 operation as a normal gather load or scatter store.
29644 (get_group_load_store_type): Take the gather_scatter_info
29645 as argument. Try using a gather load or scatter store for
29646 single-element groups.
29647 (get_load_store_type): Update calls to get_group_load_store_type
29648 and vect_use_strided_gather_scatters_p.
29650 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29651 Alan Hayward <alan.hayward@arm.com>
29652 David Sherwood <david.sherwood@arm.com>
29654 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
29655 optional tree argument.
29656 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
29658 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
29659 but continue to use the current value as a fallback.
29660 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
29661 to compare the updates.
29662 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
29663 (get_load_store_type): Use it when handling a strided access.
29664 (vect_get_strided_load_store_ops): New function.
29665 (vect_get_data_ptr_increment): Likewise.
29666 (vectorizable_load): Handle strided gather loads. Always pass
29667 a step to vect_create_data_ref_ptr and bump_vector_ptr.
29669 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29670 Alan Hayward <alan.hayward@arm.com>
29671 David Sherwood <david.sherwood@arm.com>
29673 * doc/md.texi (gather_load@var{m}): Document.
29674 (mask_gather_load@var{m}): Likewise.
29675 * genopinit.c (main): Add supports_vec_gather_load and
29676 supports_vec_gather_load_cached to target_optabs.
29677 * optabs-tree.c (init_tree_optimization_optabs): Use
29678 ggc_cleared_alloc to allocate target_optabs.
29679 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
29680 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
29682 * internal-fn.h (internal_load_fn_p): Declare.
29683 (internal_gather_scatter_fn_p): Likewise.
29684 (internal_fn_mask_index): Likewise.
29685 (internal_gather_scatter_fn_supported_p): Likewise.
29686 * internal-fn.c (gather_load_direct): New macro.
29687 (expand_gather_load_optab_fn): New function.
29688 (direct_gather_load_optab_supported_p): New macro.
29689 (direct_internal_fn_optab): New function.
29690 (internal_load_fn_p): Likewise.
29691 (internal_gather_scatter_fn_p): Likewise.
29692 (internal_fn_mask_index): Likewise.
29693 (internal_gather_scatter_fn_supported_p): Likewise.
29694 * optabs-query.c (supports_at_least_one_mode_p): New function.
29695 (supports_vec_gather_load_p): Likewise.
29696 * optabs-query.h (supports_vec_gather_load_p): Declare.
29697 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
29698 and memory_type field.
29699 (NUM_PATTERNS): Bump to 15.
29700 * tree-vect-data-refs.c: Include internal-fn.h.
29701 (vect_gather_scatter_fn_p): New function.
29702 (vect_describe_gather_scatter_call): Likewise.
29703 (vect_check_gather_scatter): Try using internal functions for
29704 gather loads. Recognize existing calls to a gather load function.
29705 (vect_analyze_data_refs): Consider using gather loads if
29706 supports_vec_gather_load_p.
29707 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
29708 (vect_get_gather_scatter_offset_type): Likewise.
29709 (vect_convert_mask_for_vectype): Likewise.
29710 (vect_add_conversion_to_patterm): Likewise.
29711 (vect_try_gather_scatter_pattern): Likewise.
29712 (vect_recog_gather_scatter_pattern): New pattern recognizer.
29713 (vect_vect_recog_func_ptrs): Add it.
29714 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29715 internal_fn_mask_index and internal_gather_scatter_fn_p.
29716 (check_load_store_masking): Take the gather_scatter_info as an
29717 argument and handle gather loads.
29718 (vect_get_gather_scatter_ops): New function.
29719 (vectorizable_call): Check internal_load_fn_p.
29720 (vectorizable_load): Likewise. Handle gather load internal
29722 (vectorizable_store): Update call to check_load_store_masking.
29723 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
29724 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
29725 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
29726 (aarch64_gather_scale_operand_d): New predicates.
29727 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
29728 (mask_gather_load<mode>): New insns.
29730 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29731 Alan Hayward <alan.hayward@arm.com>
29732 David Sherwood <david.sherwood@arm.com>
29734 * optabs.def (fold_left_plus_optab): New optab.
29735 * doc/md.texi (fold_left_plus_@var{m}): Document.
29736 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
29737 * internal-fn.c (fold_left_direct): Define.
29738 (expand_fold_left_optab_fn): Likewise.
29739 (direct_fold_left_optab_supported_p): Likewise.
29740 * fold-const-call.c (fold_const_fold_left): New function.
29741 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
29742 * tree-parloops.c (valid_reduction_p): New function.
29743 (gather_scalar_reductions): Use it.
29744 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
29745 (vect_finish_replace_stmt): Declare.
29746 * tree-vect-loop.c (fold_left_reduction_fn): New function.
29747 (needs_fold_left_reduction_p): New function, split out from...
29748 (vect_is_simple_reduction): ...here. Accept reductions that
29749 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
29750 (vect_force_simple_reduction): Also store the reduction type in
29751 the assignment's STMT_VINFO_REDUC_TYPE.
29752 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
29753 (merge_with_identity): New function.
29754 (vect_expand_fold_left): Likewise.
29755 (vectorize_fold_left_reduction): Likewise.
29756 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
29757 scalar phi in place for it. Check for target support and reject
29758 cases that would reassociate the operation. Defer the transform
29759 phase to vectorize_fold_left_reduction.
29760 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
29761 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
29762 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
29764 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29766 * tree-if-conv.c (predicate_mem_writes): Remove redundant
29767 call to ifc_temp_var.
29769 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29770 Alan Hayward <alan.hayward@arm.com>
29771 David Sherwood <david.sherwood@arm.com>
29773 * target.def (legitimize_address_displacement): Take the original
29774 offset as a poly_int.
29775 * targhooks.h (default_legitimize_address_displacement): Update
29777 * targhooks.c (default_legitimize_address_displacement): Likewise.
29778 * doc/tm.texi: Regenerate.
29779 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
29780 as an argument, moving assert of ad->disp == ad->disp_term to...
29781 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
29782 Try calling targetm.legitimize_address_displacement before expanding
29783 the address rather than afterwards, and adjust for the new interface.
29784 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
29785 Match the new hook interface. Handle SVE addresses.
29786 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
29787 new hook interface.
29789 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29791 * Makefile.in (OBJS): Add early-remat.o.
29792 * target.def (select_early_remat_modes): New hook.
29793 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
29794 * doc/tm.texi: Regenerate.
29795 * targhooks.h (default_select_early_remat_modes): Declare.
29796 * targhooks.c (default_select_early_remat_modes): New function.
29797 * timevar.def (TV_EARLY_REMAT): New timevar.
29798 * passes.def (pass_early_remat): New pass.
29799 * tree-pass.h (make_pass_early_remat): Declare.
29800 * early-remat.c: New file.
29801 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
29803 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
29805 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29806 Alan Hayward <alan.hayward@arm.com>
29807 David Sherwood <david.sherwood@arm.com>
29809 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
29810 vfm1 with a bound_epilog parameter.
29811 (vect_do_peeling): Update calls accordingly, and move the prologue
29812 call earlier in the function. Treat the base bound_epilog as 0 for
29813 fully-masked loops and retain vf - 1 for other loops. Add 1 to
29814 this base when peeling for gaps.
29815 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
29816 with fully-masked loops.
29817 (vect_estimate_min_profitable_iters): Handle the single peeled
29818 iteration in that case.
29820 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29821 Alan Hayward <alan.hayward@arm.com>
29822 David Sherwood <david.sherwood@arm.com>
29824 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
29825 single-element interleaving even if the size is not a power of 2.
29826 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
29827 accesses for single-element interleaving if the group size is
29830 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29831 Alan Hayward <alan.hayward@arm.com>
29832 David Sherwood <david.sherwood@arm.com>
29834 * doc/md.texi (fold_extract_last_@var{m}): Document.
29835 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
29836 * optabs.def (fold_extract_last_optab): New optab.
29837 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
29838 * internal-fn.c (fold_extract_direct): New macro.
29839 (expand_fold_extract_optab_fn): Likewise.
29840 (direct_fold_extract_optab_supported_p): Likewise.
29841 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
29842 * tree-vect-loop.c (vect_model_reduction_cost): Handle
29843 EXTRACT_LAST_REDUCTION.
29844 (get_initial_def_for_reduction): Do not create an initial vector
29845 for EXTRACT_LAST_REDUCTION reductions.
29846 (vectorizable_reduction): Leave the scalar phi in place for
29847 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
29848 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
29849 epilogue code for EXTRACT_LAST_REDUCTION and defer the
29850 transform phase to vectorizable_condition.
29851 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
29853 (vect_finish_stmt_generation): ...here.
29854 (vect_finish_replace_stmt): New function.
29855 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
29856 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
29858 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
29860 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29861 Alan Hayward <alan.hayward@arm.com>
29862 David Sherwood <david.sherwood@arm.com>
29864 * doc/md.texi (extract_last_@var{m}): Document.
29865 * optabs.def (extract_last_optab): New optab.
29866 * internal-fn.def (EXTRACT_LAST): New internal function.
29867 * internal-fn.c (cond_unary_direct): New macro.
29868 (expand_cond_unary_optab_fn): Likewise.
29869 (direct_cond_unary_optab_supported_p): Likewise.
29870 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
29871 loops using EXTRACT_LAST.
29872 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
29873 (extract_last_<mode>): ...this optab.
29874 (vec_extract<mode><Vel>): Update accordingly.
29876 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29877 Alan Hayward <alan.hayward@arm.com>
29878 David Sherwood <david.sherwood@arm.com>
29880 * target.def (empty_mask_is_expensive): New hook.
29881 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
29882 * doc/tm.texi: Regenerate.
29883 * targhooks.h (default_empty_mask_is_expensive): Declare.
29884 * targhooks.c (default_empty_mask_is_expensive): New function.
29885 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
29886 if the target says that empty masks are expensive.
29887 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
29889 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
29891 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29892 Alan Hayward <alan.hayward@arm.com>
29893 David Sherwood <david.sherwood@arm.com>
29895 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
29896 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
29897 (vect_use_loop_mask_for_alignment_p): New function.
29898 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
29899 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
29900 niters_skip argument. Make sure that the first niters_skip elements
29901 of the first iteration are inactive.
29902 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
29903 Update call to vect_set_loop_masks_directly.
29904 (get_misalign_in_elems): New function, split out from...
29905 (vect_gen_prolog_loop_niters): ...here.
29906 (vect_update_init_of_dr): Take a code argument that specifies whether
29907 the adjustment should be added or subtracted.
29908 (vect_update_init_of_drs): Likewise.
29909 (vect_prepare_for_masked_peels): New function.
29910 (vect_do_peeling): Skip prologue peeling if we're using a mask
29911 instead. Update call to vect_update_inits_of_drs.
29912 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29914 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
29915 alignment. Do not include the number of peeled iterations in
29916 the minimum threshold in that case.
29917 (vectorizable_induction): Adjust the start value down by
29918 LOOP_VINFO_MASK_SKIP_NITERS iterations.
29919 (vect_transform_loop): Call vect_prepare_for_masked_peels.
29920 Take the number of skipped iterations into account when calculating
29922 * tree-vect-stmts.c (vect_gen_while_not): New function.
29924 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29925 Alan Hayward <alan.hayward@arm.com>
29926 David Sherwood <david.sherwood@arm.com>
29928 * doc/sourcebuild.texi (vect_fully_masked): Document.
29929 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
29930 default value to 0.
29931 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
29933 (vect_analyze_loop_2): ...here. Don't check the vectorization
29934 factor against the number of loop iterations if the loop is
29937 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29938 Alan Hayward <alan.hayward@arm.com>
29939 David Sherwood <david.sherwood@arm.com>
29941 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
29942 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
29943 (dump_groups): Update accordingly.
29944 (iv_use::mem_type): New member variable.
29945 (address_p): New function.
29946 (record_use): Add a mem_type argument and initialize the new
29948 (record_group_use): Add a mem_type argument. Use address_p.
29949 Remove obsolete null checks of base_object. Update call to record_use.
29950 (find_interesting_uses_op): Update call to record_group_use.
29951 (find_interesting_uses_cond): Likewise.
29952 (find_interesting_uses_address): Likewise.
29953 (get_mem_type_for_internal_fn): New function.
29954 (find_address_like_use): Likewise.
29955 (find_interesting_uses_stmt): Try find_address_like_use before
29956 calling find_interesting_uses_op.
29957 (addr_offset_valid_p): Use the iv mem_type field as the type
29958 of the addressed memory.
29959 (add_autoinc_candidates): Likewise.
29960 (get_address_cost): Likewise.
29961 (split_small_address_groups_p): Use address_p.
29962 (split_address_groups): Likewise.
29963 (add_iv_candidate_for_use): Likewise.
29964 (autoinc_possible_for_pair): Likewise.
29965 (rewrite_groups): Likewise.
29966 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
29967 (determine_group_iv_cost): Update after split of USE_ADDRESS.
29968 (get_alias_ptr_type_for_ptr_address): New function.
29969 (rewrite_use_address): Rewrite address uses in calls that were
29970 identified by find_address_like_use.
29972 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29973 Alan Hayward <alan.hayward@arm.com>
29974 David Sherwood <david.sherwood@arm.com>
29976 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
29978 * gimple-expr.h (is_gimple_addressable: Likewise.
29979 * gimple-expr.c (is_gimple_address): Likewise.
29980 * internal-fn.c (expand_call_mem_ref): New function.
29981 (expand_mask_load_optab_fn): Use it.
29982 (expand_mask_store_optab_fn): Likewise.
29984 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
29985 Alan Hayward <alan.hayward@arm.com>
29986 David Sherwood <david.sherwood@arm.com>
29988 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
29989 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
29990 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
29991 (cond_umax@var{mode}): Document.
29992 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
29993 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
29994 (cond_umin_optab, cond_umax_optab): New optabs.
29995 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
29996 (COND_IOR, COND_XOR): New internal functions.
29997 * internal-fn.h (get_conditional_internal_fn): Declare.
29998 * internal-fn.c (cond_binary_direct): New macro.
29999 (expand_cond_binary_optab_fn): Likewise.
30000 (direct_cond_binary_optab_supported_p): Likewise.
30001 (get_conditional_internal_fn): New function.
30002 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
30003 Cope with reduction statements that are vectorized as calls rather
30005 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
30006 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
30007 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
30008 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
30009 (UNSPEC_COND_EOR): New unspecs.
30010 (optab): Add mappings for them.
30011 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
30012 (sve_int_op, sve_fp_op): New int attributes.
30014 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30015 Alan Hayward <alan.hayward@arm.com>
30016 David Sherwood <david.sherwood@arm.com>
30018 * optabs.def (while_ult_optab): New optab.
30019 * doc/md.texi (while_ult@var{m}@var{n}): Document.
30020 * internal-fn.def (WHILE_ULT): New internal function.
30021 * internal-fn.h (direct_internal_fn_supported_p): New override
30022 that takes two types as argument.
30023 * internal-fn.c (while_direct): New macro.
30024 (expand_while_optab_fn): New function.
30025 (convert_optab_supported_p): Likewise.
30026 (direct_while_optab_supported_p): New macro.
30027 * wide-int.h (wi::udiv_ceil): New function.
30028 * tree-vectorizer.h (rgroup_masks): New structure.
30029 (vec_loop_masks): New typedef.
30030 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
30031 and fully_masked_p.
30032 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
30033 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
30034 (vect_max_vf): New function.
30035 (slpeel_make_loop_iterate_ntimes): Delete.
30036 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
30037 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
30038 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
30039 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
30040 internal-fn.h, stor-layout.h and optabs-query.h.
30041 (vect_set_loop_mask): New function.
30042 (add_preheader_seq): Likewise.
30043 (add_header_seq): Likewise.
30044 (interleave_supported_p): Likewise.
30045 (vect_maybe_permute_loop_masks): Likewise.
30046 (vect_set_loop_masks_directly): Likewise.
30047 (vect_set_loop_condition_masked): Likewise.
30048 (vect_set_loop_condition_unmasked): New function, split out from
30049 slpeel_make_loop_iterate_ntimes.
30050 (slpeel_make_loop_iterate_ntimes): Rename to..
30051 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
30052 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
30053 (vect_do_peeling): Update call accordingly.
30054 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
30056 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
30057 mask_compare_type, can_fully_mask_p and fully_masked_p.
30058 (release_vec_loop_masks): New function.
30059 (_loop_vec_info): Use it to free the loop masks.
30060 (can_produce_all_loop_masks_p): New function.
30061 (vect_get_max_nscalars_per_iter): Likewise.
30062 (vect_verify_full_masking): Likewise.
30063 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
30064 retries, and free the mask rgroups before retrying. Check loop-wide
30065 reasons for disallowing fully-masked loops. Make the final decision
30066 about whether use a fully-masked loop or not.
30067 (vect_estimate_min_profitable_iters): Do not assume that peeling
30068 for the number of iterations will be needed for fully-masked loops.
30069 (vectorizable_reduction): Disable fully-masked loops.
30070 (vectorizable_live_operation): Likewise.
30071 (vect_halve_mask_nunits): New function.
30072 (vect_double_mask_nunits): Likewise.
30073 (vect_record_loop_mask): Likewise.
30074 (vect_get_loop_mask): Likewise.
30075 (vect_transform_loop): Handle the case in which the final loop
30076 iteration might handle a partial vector. Call vect_set_loop_condition
30077 instead of slpeel_make_loop_iterate_ntimes.
30078 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
30079 (check_load_store_masking): New function.
30080 (prepare_load_store_mask): Likewise.
30081 (vectorizable_store): Handle fully-masked loops.
30082 (vectorizable_load): Likewise.
30083 (supportable_widening_operation): Use vect_halve_mask_nunits for
30085 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
30086 (vect_gen_while): New function.
30087 * config/aarch64/aarch64.md (umax<mode>3): New expander.
30088 (aarch64_uqdec<mode>): New insn.
30090 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30091 Alan Hayward <alan.hayward@arm.com>
30092 David Sherwood <david.sherwood@arm.com>
30094 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
30095 (reduc_xor_scal_optab): New optabs.
30096 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
30097 (reduc_xor_scal_@var{m}): Document.
30098 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
30099 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
30100 internal functions.
30101 * fold-const-call.c (fold_const_call): Handle them.
30102 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
30103 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
30104 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
30105 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
30106 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
30107 (UNSPEC_XORV): New unspecs.
30108 (optab): Add entries for them.
30109 (BITWISEV): New int iterator.
30110 (bit_reduc_op): New int attributes.
30112 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30113 Alan Hayward <alan.hayward@arm.com>
30114 David Sherwood <david.sherwood@arm.com>
30116 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
30117 * internal-fn.def (VEC_SHL_INSERT): New internal function.
30118 * optabs.def (vec_shl_insert_optab): New optab.
30119 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
30120 (duplicate_and_interleave): Likewise.
30121 * tree-vect-loop.c: Include internal-fn.h.
30122 (neutral_op_for_slp_reduction): New function, split out from
30123 get_initial_defs_for_reduction.
30124 (get_initial_def_for_reduction): Handle option 2 for variable-length
30125 vectors by loading the neutral value into a vector and then shifting
30126 the initial value into element 0.
30127 (get_initial_defs_for_reduction): Replace the code argument with
30128 the neutral value calculated by neutral_op_for_slp_reduction.
30129 Use gimple_build_vector for constant-length vectors.
30130 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
30131 but the first group_size elements have a neutral value.
30132 Use duplicate_and_interleave otherwise.
30133 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
30134 Update call to get_initial_defs_for_reduction. Handle SLP
30135 reductions for variable-length vectors by creating one vector
30136 result for each scalar result, with the elements associated
30137 with other scalar results stubbed out with the neutral value.
30138 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
30139 Require IFN_VEC_SHL_INSERT for double reductions on
30140 variable-length vectors, or SLP reductions that have
30141 a neutral value. Require can_duplicate_and_interleave_p
30142 support for variable-length unchained SLP reductions if there
30143 is no neutral value, such as for MIN/MAX reductions. Also require
30144 the number of vector elements to be a multiple of the number of
30145 SLP statements when doing variable-length unchained SLP reductions.
30146 Update call to vect_create_epilog_for_reduction.
30147 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
30148 and remove initial values.
30149 (duplicate_and_interleave): Make public.
30150 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
30151 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
30153 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30154 Alan Hayward <alan.hayward@arm.com>
30155 David Sherwood <david.sherwood@arm.com>
30157 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
30158 (can_duplicate_and_interleave_p): New function.
30159 (vect_get_and_check_slp_defs): Take the vector of statements
30160 rather than just the current one. Remove excess parentheses.
30161 Restriction rejectinon of vect_constant_def and vect_external_def
30162 for variable-length vectors to boolean types, or types for which
30163 can_duplicate_and_interleave_p is false.
30164 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
30165 (duplicate_and_interleave): New function.
30166 (vect_get_constant_vectors): Use gimple_build_vector for
30167 constant-length vectors and suitable variable-length constant
30168 vectors. Use duplicate_and_interleave for other variable-length
30169 vectors. Don't defer the update when inserting new statements.
30171 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30172 Alan Hayward <alan.hayward@arm.com>
30173 David Sherwood <david.sherwood@arm.com>
30175 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
30176 min_profitable_iters doesn't go negative.
30178 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30179 Alan Hayward <alan.hayward@arm.com>
30180 David Sherwood <david.sherwood@arm.com>
30182 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
30183 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
30184 * optabs.def (vec_mask_load_lanes_optab): New optab.
30185 (vec_mask_store_lanes_optab): Likewise.
30186 * internal-fn.def (MASK_LOAD_LANES): New internal function.
30187 (MASK_STORE_LANES): Likewise.
30188 * internal-fn.c (mask_load_lanes_direct): New macro.
30189 (mask_store_lanes_direct): Likewise.
30190 (expand_mask_load_optab_fn): Handle masked operations.
30191 (expand_mask_load_lanes_optab_fn): New macro.
30192 (expand_mask_store_optab_fn): Handle masked operations.
30193 (expand_mask_store_lanes_optab_fn): New macro.
30194 (direct_mask_load_lanes_optab_supported_p): Likewise.
30195 (direct_mask_store_lanes_optab_supported_p): Likewise.
30196 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
30198 (vect_load_lanes_supported): Likewise.
30199 * tree-vect-data-refs.c (strip_conversion): New function.
30200 (can_group_stmts_p): Likewise.
30201 (vect_analyze_data_ref_accesses): Use it instead of checking
30202 for a pair of assignments.
30203 (vect_store_lanes_supported): Take a masked_p parameter.
30204 (vect_load_lanes_supported): Likewise.
30205 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
30206 vect_store_lanes_supported and vect_load_lanes_supported.
30207 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
30208 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
30209 parameter. Don't allow gaps for masked accesses.
30210 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
30211 and vect_load_lanes_supported.
30212 (get_load_store_type): Take a masked_p parameter and update
30213 call to get_group_load_store_type.
30214 (vectorizable_store): Update call to get_load_store_type.
30215 Handle IFN_MASK_STORE_LANES.
30216 (vectorizable_load): Update call to get_load_store_type.
30217 Handle IFN_MASK_LOAD_LANES.
30219 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30220 Alan Hayward <alan.hayward@arm.com>
30221 David Sherwood <david.sherwood@arm.com>
30223 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
30225 * config/aarch64/aarch64-protos.h
30226 (aarch64_sve_struct_memory_operand_p): Declare.
30227 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
30228 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
30229 (VPRED, vpred): Handle SVE structure modes.
30230 * config/aarch64/constraints.md (Utx): New constraint.
30231 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
30232 (aarch64_sve_struct_nonimmediate_operand): New predicates.
30233 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
30234 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
30235 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
30236 structure modes. Split into pieces after RA.
30237 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
30238 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
30240 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
30241 SVE structure modes.
30242 (aarch64_classify_address): Likewise.
30243 (sizetochar): Move earlier in file.
30244 (aarch64_print_operand): Handle SVE register lists.
30245 (aarch64_array_mode): New function.
30246 (aarch64_sve_struct_memory_operand_p): Likewise.
30247 (TARGET_ARRAY_MODE): Redefine.
30249 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30250 Alan Hayward <alan.hayward@arm.com>
30251 David Sherwood <david.sherwood@arm.com>
30253 * target.def (array_mode): New target hook.
30254 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
30255 * doc/tm.texi: Regenerate.
30256 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
30257 * hooks.c (hook_optmode_mode_uhwi_none): New function.
30258 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
30259 targetm.array_mode.
30260 * stor-layout.c (mode_for_array): Likewise. Support polynomial
30263 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30264 Alan Hayward <alan.hayward@arm.com>
30265 David Sherwood <david.sherwood@arm.com>
30267 * fold-const.c (fold_binary_loc): Check the argument types
30268 rather than the result type when testing for a vector operation.
30270 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30272 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
30273 * doc/tm.texi: Regenerate.
30275 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30276 Alan Hayward <alan.hayward@arm.com>
30277 David Sherwood <david.sherwood@arm.com>
30279 * doc/invoke.texi (-msve-vector-bits=): Document new option.
30280 (sve): Document new AArch64 extension.
30281 * doc/md.texi (w): Extend the description of the AArch64
30282 constraint to include SVE vectors.
30283 (Upl, Upa): Document new AArch64 predicate constraints.
30284 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
30286 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
30287 (msve-vector-bits=): New option.
30288 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
30289 SVE when these are disabled.
30290 (sve): New extension.
30291 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
30292 modes. Adjust their number of units based on aarch64_sve_vg.
30293 (MAX_BITSIZE_MODE_ANY_MODE): Define.
30294 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
30295 aarch64_addr_query_type.
30296 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
30297 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
30298 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
30299 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
30300 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
30301 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
30302 (aarch64_simd_imm_zero_p): Delete.
30303 (aarch64_check_zero_based_sve_index_immediate): Declare.
30304 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30305 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30306 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30307 (aarch64_sve_float_mul_immediate_p): Likewise.
30308 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30309 rather than an rtx.
30310 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
30311 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
30312 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
30313 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
30314 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
30315 (aarch64_regmode_natural_size): Likewise.
30316 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
30317 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
30319 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
30320 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
30321 for VG and the SVE predicate registers.
30322 (V_ALIASES): Add a "z"-prefixed alias.
30323 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
30324 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
30325 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
30326 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
30327 (REG_CLASS_NAMES): Add entries for them.
30328 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
30329 and the predicate registers.
30330 (aarch64_sve_vg): Declare.
30331 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
30332 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
30333 (REGMODE_NATURAL_SIZE): Define.
30334 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
30336 * config/aarch64/aarch64.c: Include cfgrtl.h.
30337 (simd_immediate_info): Add a constructor for series vectors,
30338 and an associated step field.
30339 (aarch64_sve_vg): New variable.
30340 (aarch64_dbx_register_number): Handle VG and the predicate registers.
30341 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
30342 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
30343 (VEC_ANY_DATA, VEC_STRUCT): New constants.
30344 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
30345 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
30346 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
30347 (aarch64_get_mask_mode): New functions.
30348 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
30349 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
30350 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
30351 predicate modes and predicate registers. Explicitly restrict
30352 GPRs to modes of 16 bytes or smaller. Only allow FP registers
30353 to store a vector mode if it is recognized by
30354 aarch64_classify_vector_mode.
30355 (aarch64_regmode_natural_size): New function.
30356 (aarch64_hard_regno_caller_save_mode): Return the original mode
30358 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
30359 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
30360 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
30361 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
30363 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
30364 does not overlap dest if the function is frame-related. Handle
30366 (aarch64_split_add_offset): New function.
30367 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
30368 them aarch64_add_offset.
30369 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
30370 and update call to aarch64_sub_sp.
30371 (aarch64_add_cfa_expression): New function.
30372 (aarch64_expand_prologue): Pass extra temporary registers to the
30373 functions above. Handle the case in which we need to emit new
30374 DW_CFA_expressions for registers that were originally saved
30375 relative to the stack pointer, but now have to be expressed
30376 relative to the frame pointer.
30377 (aarch64_output_mi_thunk): Pass extra temporary registers to the
30379 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
30380 IP0 and IP1 values for SVE frames.
30381 (aarch64_expand_vec_series): New function.
30382 (aarch64_expand_sve_widened_duplicate): Likewise.
30383 (aarch64_expand_sve_const_vector): Likewise.
30384 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
30385 Handle SVE constants. Use emit_move_insn to move a force_const_mem
30386 into the register, rather than emitting a SET directly.
30387 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
30388 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
30389 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
30390 (offset_9bit_signed_scaled_p): New functions.
30391 (aarch64_replicate_bitmask_imm): New function.
30392 (aarch64_bitmask_imm): Use it.
30393 (aarch64_cannot_force_const_mem): Reject expressions involving
30394 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
30395 (aarch64_classify_index): Handle SVE indices, by requiring
30396 a plain register index with a scale that matches the element size.
30397 (aarch64_classify_address): Handle SVE addresses. Assert that
30398 the mode of the address is VOIDmode or an integer mode.
30399 Update call to aarch64_classify_symbol.
30400 (aarch64_classify_symbolic_expression): Update call to
30401 aarch64_classify_symbol.
30402 (aarch64_const_vec_all_in_range_p): New function.
30403 (aarch64_print_vector_float_operand): Likewise.
30404 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
30405 "vN" for FP registers with SVE modes. Handle (const ...) vectors
30406 and the FP immediates 1.0 and 0.5.
30407 (aarch64_print_address_internal): Handle SVE addresses.
30408 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
30409 (aarch64_regno_regclass): Handle predicate registers.
30410 (aarch64_secondary_reload): Handle big-endian reloads of SVE
30412 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
30413 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
30414 (aarch64_convert_sve_vector_bits): New function.
30415 (aarch64_override_options): Use it to handle -msve-vector-bits=.
30416 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30417 rather than an rtx.
30418 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
30419 Handle SVE vector and predicate modes. Accept VL-based constants
30420 that need only one temporary register, and VL offsets that require
30421 no temporary registers.
30422 (aarch64_conditional_register_usage): Mark the predicate registers
30423 as fixed if SVE isn't available.
30424 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
30425 Return true for SVE vector and predicate modes.
30426 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
30427 rather than an unsigned int. Handle SVE modes.
30428 (aarch64_preferred_simd_mode): Update call accordingly. Handle
30430 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
30432 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30433 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30434 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30435 (aarch64_sve_float_mul_immediate_p): New functions.
30436 (aarch64_sve_valid_immediate): New function.
30437 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
30438 Explicitly reject structure modes. Check for INDEX constants.
30439 Handle PTRUE and PFALSE constants.
30440 (aarch64_check_zero_based_sve_index_immediate): New function.
30441 (aarch64_simd_imm_zero_p): Delete.
30442 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
30443 vector modes. Accept constants in the range of CNT[BHWD].
30444 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
30445 ask for an Advanced SIMD mode.
30446 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
30447 (aarch64_simd_vector_alignment): Handle SVE predicates.
30448 (aarch64_vectorize_preferred_vector_alignment): New function.
30449 (aarch64_simd_vector_alignment_reachable): Use it instead of
30451 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
30452 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
30454 (MAX_VECT_LEN): Delete.
30455 (expand_vec_perm_d): Add a vec_flags field.
30456 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
30457 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
30458 (aarch64_evpc_ext): Don't apply a big-endian lane correction
30460 (aarch64_evpc_rev): Rename to...
30461 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
30462 (aarch64_evpc_rev_global): New function.
30463 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
30464 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
30466 (aarch64_evpc_sve_tbl): New function.
30467 (aarch64_expand_vec_perm_const_1): Update after rename of
30468 aarch64_evpc_rev. Handle SVE permutes too, trying
30469 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
30470 than aarch64_evpc_tbl.
30471 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
30472 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
30473 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
30474 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
30475 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
30476 (aarch64_expand_sve_vcond): New functions.
30477 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
30478 of aarch64_vector_mode_p.
30479 (aarch64_dwarf_poly_indeterminate_value): New function.
30480 (aarch64_compute_pressure_classes): Likewise.
30481 (aarch64_can_change_mode_class): Likewise.
30482 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
30483 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
30484 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
30485 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
30486 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
30487 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
30488 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
30489 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
30491 (Dn, Dl, Dr): Accept const as well as const_vector.
30492 (Dz): Likewise. Compare against CONST0_RTX.
30493 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
30494 of "vector" where appropriate.
30495 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
30496 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
30497 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
30498 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
30499 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
30500 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
30501 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
30502 (v_int_equiv): Extend to SVE modes.
30503 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
30505 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
30506 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
30507 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
30508 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
30509 (SVE_COND_FP_CMP): New int iterators.
30510 (perm_hilo): Handle the new unpack unspecs.
30511 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
30513 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
30514 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
30515 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
30516 (aarch64_equality_operator, aarch64_constant_vector_operand)
30517 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
30518 (aarch64_sve_nonimmediate_operand): Likewise.
30519 (aarch64_sve_general_operand): Likewise.
30520 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
30521 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
30522 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
30523 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
30524 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
30525 (aarch64_sve_float_arith_immediate): Likewise.
30526 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
30527 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
30528 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
30529 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
30530 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
30531 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
30532 (aarch64_sve_float_arith_operand): Likewise.
30533 (aarch64_sve_float_arith_with_sub_operand): Likewise.
30534 (aarch64_sve_float_mul_operand): Likewise.
30535 (aarch64_sve_vec_perm_operand): Likewise.
30536 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
30537 (aarch64_mov_operand): Accept const_poly_int and const_vector.
30538 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
30539 as well as const_vector.
30540 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
30541 in file. Use CONST0_RTX and CONSTM1_RTX.
30542 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
30543 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
30544 Use aarch64_simd_imm_zero.
30545 * config/aarch64/aarch64-sve.md: New file.
30546 * config/aarch64/aarch64.md: Include it.
30547 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
30548 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
30549 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
30550 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
30551 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
30552 (sve): New attribute.
30553 (enabled): Disable instructions with the sve attribute unless
30555 (movqi, movhi): Pass CONST_POLY_INT operaneds through
30556 aarch64_expand_mov_immediate.
30557 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
30558 CNT[BHSD] immediates.
30559 (movti): Split CONST_POLY_INT moves into two halves.
30560 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
30561 Split additions that need a temporary here if the destination
30562 is the stack pointer.
30563 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
30564 (*add<mode>3_poly_1): New instruction.
30565 (set_clobber_cc): New expander.
30567 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30569 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
30570 parameter and use it instead of GET_MODE_SIZE (innermode). Use
30571 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
30572 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
30573 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
30574 Change innermode from fixed_mode_size to machine_mode.
30575 (simplify_subreg): Update call accordingly. Handle a constant-sized
30576 subreg of a variable-length CONST_VECTOR.
30578 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
30579 Alan Hayward <alan.hayward@arm.com>
30580 David Sherwood <david.sherwood@arm.com>
30582 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
30583 (add_offset_to_base): New function, split out from...
30584 (create_mem_ref): ...here. When handling a scale other than 1,
30585 check first whether the address is valid without the offset.
30586 Add it into the base if so, leaving the index and scale as-is.
30588 2018-01-12 Jakub Jelinek <jakub@redhat.com>
30591 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
30592 fold_for_warn before checking if arg2 is INTEGER_CST.
30594 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
30596 * config/rs6000/predicates.md (load_multiple_operation): Delete.
30597 (store_multiple_operation): Delete.
30598 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
30599 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
30600 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
30601 guarded by TARGET_STRING.
30602 (rs6000_output_load_multiple): Delete.
30603 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
30604 OPTION_MASK_STRING / TARGET_STRING handling.
30605 (print_operand) <'N', 'O'>: Add comment that these are unused now.
30606 (const rs6000_opt_masks) <"string">: Change mask to 0.
30607 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
30608 (MASK_STRING): Delete.
30609 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
30611 (load_multiple): Delete.
30618 (store_multiple): Delete.
30625 (movmemsi_8reg): Delete.
30626 (corresponding unnamed define_insn): Delete.
30627 (movmemsi_6reg): Delete.
30628 (corresponding unnamed define_insn): Delete.
30629 (movmemsi_4reg): Delete.
30630 (corresponding unnamed define_insn): Delete.
30631 (movmemsi_2reg): Delete.
30632 (corresponding unnamed define_insn): Delete.
30633 (movmemsi_1reg): Delete.
30634 (corresponding unnamed define_insn): Delete.
30635 * config/rs6000/rs6000.opt (mno-string): New.
30636 (mstring): Replace by deprecation warning stub.
30637 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
30639 2018-01-12 Jakub Jelinek <jakub@redhat.com>
30641 * regrename.c (regrename_do_replace): If replacing the same
30642 reg multiple times, try to reuse last created gen_raw_REG.
30645 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
30646 main to workaround a bug in GDB.
30648 2018-01-12 Tom de Vries <tom@codesourcery.com>
30651 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
30653 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
30655 PR rtl-optimization/80481
30656 * ira-color.c (get_cap_member): New function.
30657 (allocnos_conflict_by_live_ranges_p): Use it.
30658 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
30659 (setup_slot_coalesced_allocno_live_ranges): Ditto.
30661 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
30664 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
30665 (*saddl_se_1): Ditto.
30666 (*ssubsi_1): Ditto.
30667 (*ssubl_se_1): Ditto.
30669 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30671 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
30672 rather than wi::to_widest for DR_INITs.
30673 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
30674 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
30675 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
30677 (vect_analyze_group_access_1): Note that here.
30679 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30681 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
30682 polynomial type sizes.
30684 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
30686 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
30687 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
30688 (gimple_add_tmp_var): Likewise.
30690 2018-01-12 Martin Liska <mliska@suse.cz>
30692 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
30693 (gimple_alloc_sizes): Likewise.
30694 (dump_gimple_statistics): Use PRIu64 in printf format.
30695 * gimple.h: Change uint64_t to int.
30697 2018-01-12 Martin Liska <mliska@suse.cz>
30699 * tree-core.h: Use uint64_t instead of int.
30700 * tree.c (tree_node_counts): Likewise.
30701 (tree_node_sizes): Likewise.
30702 (dump_tree_statistics): Use PRIu64 in printf format.
30704 2018-01-12 Martin Liska <mliska@suse.cz>
30706 * Makefile.in: As qsort_chk is implemented in vec.c, add
30707 vec.o to linkage of gencfn-macros.
30708 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
30709 passing the info to record_node_allocation_statistics.
30710 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
30712 * ggc-common.c (struct ggc_usage): Add operator== and use
30713 it in operator< and compare function.
30714 * mem-stats.h (struct mem_usage): Likewise.
30715 * vec.c (struct vec_usage): Remove operator< and compare
30716 function. Can be simply inherited.
30718 2018-01-12 Martin Jambor <mjambor@suse.cz>
30721 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
30722 * tree-ssa-math-opts.c: Include domwalk.h.
30723 (convert_mult_to_fma_1): New function.
30724 (fma_transformation_info): New type.
30725 (fma_deferring_state): Likewise.
30726 (cancel_fma_deferring): New function.
30727 (result_of_phi): Likewise.
30728 (last_fma_candidate_feeds_initial_phi): Likewise.
30729 (convert_mult_to_fma): Added deferring logic, split actual
30730 transformation to convert_mult_to_fma_1.
30731 (math_opts_dom_walker): New type.
30732 (math_opts_dom_walker::after_dom_children): New method, body moved
30733 here from pass_optimize_widening_mul::execute, added deferring logic
30735 (pass_optimize_widening_mul::execute): Moved most of code to
30736 math_opts_dom_walker::after_dom_children.
30737 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
30738 * config/i386/i386.c (ix86_option_override_internal): Added
30739 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
30741 2018-01-12 Richard Biener <rguenther@suse.de>
30744 * dwarf2out.c (gen_variable_die): Do not reset old_die for
30745 inline instance vars.
30747 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
30750 * config/rx/rx.c (rx_is_restricted_memory_address):
30751 Handle SUBREG case.
30753 2018-01-12 Richard Biener <rguenther@suse.de>
30755 PR tree-optimization/80846
30756 * target.def (split_reduction): New target hook.
30757 * targhooks.c (default_split_reduction): New function.
30758 * targhooks.h (default_split_reduction): Declare.
30759 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
30760 target requests first reduce vectors by combining low and high
30762 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
30763 (get_vectype_for_scalar_type_and_size): Export.
30764 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
30765 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
30766 * doc/tm.texi: Regenerate.
30767 * config/i386/i386.c (ix86_split_reduction): Implement
30768 TARGET_VECTORIZE_SPLIT_REDUCTION.
30770 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30773 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
30774 in PIC mode except for TARGET_VXWORKS_RTP.
30775 * config/sparc/sparc.c: Include cfgrtl.h.
30776 (TARGET_INIT_PIC_REG): Define.
30777 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
30778 (sparc_pic_register_p): New predicate.
30779 (sparc_legitimate_address_p): Use it.
30780 (sparc_legitimize_pic_address): Likewise.
30781 (sparc_delegitimize_address): Likewise.
30782 (sparc_mode_dependent_address_p): Likewise.
30783 (gen_load_pcrel_sym): Remove 4th parameter.
30784 (load_got_register): Adjust call to above. Remove obsolete stuff.
30785 (sparc_expand_prologue): Do not call load_got_register here.
30786 (sparc_flat_expand_prologue): Likewise.
30787 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
30788 (sparc_use_pseudo_pic_reg): New function.
30789 (sparc_init_pic_reg): Likewise.
30790 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30791 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
30793 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
30795 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
30796 Add item for branch_cost.
30798 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
30800 PR rtl-optimization/83565
30801 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
30802 not extend the result to a larger mode for rotate operations.
30803 (num_sign_bit_copies1): Likewise.
30805 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
30808 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
30810 Use values-Xc.o for -pedantic.
30811 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
30813 2018-01-12 Martin Liska <mliska@suse.cz>
30816 * ipa-devirt.c (final_warning_record::grow_type_warnings):
30818 (possible_polymorphic_call_targets): Use it.
30819 (ipa_devirt): Likewise.
30821 2018-01-12 Martin Liska <mliska@suse.cz>
30823 * profile-count.h (enum profile_quality): Use 0 as invalid
30824 enum value of profile_quality.
30826 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
30828 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
30829 -mext-string options.
30831 2018-01-12 Richard Biener <rguenther@suse.de>
30833 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
30834 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
30835 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
30837 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
30839 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
30841 * configure.ac (--with-long-double-format): Add support for the
30842 configuration option to change the default long double format on
30844 * config.gcc (powerpc*-linux*-*): Likewise.
30845 * configure: Regenerate.
30846 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
30847 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
30848 used without modification.
30850 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
30852 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
30853 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
30854 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
30855 MISC_BUILTIN_SPEC_BARRIER.
30856 (rs6000_init_builtins): Likewise.
30857 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
30859 (speculation_barrier): New define_insn.
30860 * doc/extend.texi: Document __builtin_speculation_barrier.
30862 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30865 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
30866 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
30867 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
30869 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
30870 integral modes instead of "ss" and "sd".
30871 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
30872 vectors with 32-bit and 64-bit elements.
30873 (vecdupssescalarmodesuffix): New mode attribute.
30874 (vec_dup<mode>): Use it.
30876 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
30879 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
30880 frame if argument is passed on stack.
30882 2018-01-11 Jakub Jelinek <jakub@redhat.com>
30885 * ree.c (combine_reaching_defs): Optimize also
30886 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
30887 reg2=any_extend(exp); reg1=reg2;, formatting fix.
30889 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30891 PR middle-end/83189
30892 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
30894 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
30896 PR middle-end/83718
30897 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
30898 after they are computed.
30900 2018-01-11 Bin Cheng <bin.cheng@arm.com>
30902 PR tree-optimization/83695
30903 * gimple-loop-linterchange.cc
30904 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
30905 reset cached scev information after interchange.
30906 (pass_linterchange::execute): Remove call to scev_reset_htab.
30908 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30910 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
30911 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
30912 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
30913 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
30914 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
30915 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
30916 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
30917 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
30918 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
30919 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
30920 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
30921 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
30922 (V_lane_reg): Likewise.
30923 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
30925 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
30926 (vfmal_lane_low<mode>_intrinsic,
30927 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
30928 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
30929 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
30930 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
30931 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
30932 vfmsl_lane_high<mode>_intrinsic): New define_insns.
30934 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30936 * config/arm/arm-cpus.in (fp16fml): New feature.
30937 (ALL_SIMD): Add fp16fml.
30938 (armv8.2-a): Add fp16fml as an option.
30939 (armv8.3-a): Likewise.
30940 (armv8.4-a): Add fp16fml as part of fp16.
30941 * config/arm/arm.h (TARGET_FP16FML): Define.
30942 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
30944 * config/arm/arm-modes.def (V2HF): Define.
30945 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
30946 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
30947 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
30948 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
30949 vfmsl_low, vfmsl_high): New set of builtins.
30950 * config/arm/iterators.md (PLUSMINUS): New code iterator.
30951 (vfml_op): New code attribute.
30952 (VFMLHALVES): New int iterator.
30953 (VFML, VFMLSEL): New mode attributes.
30954 (V_reg): Define mapping for V2HF.
30955 (V_hi, V_lo): New mode attributes.
30956 (VF_constraint): Likewise.
30957 (vfml_half, vfml_half_selector): New int attributes.
30958 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
30960 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
30961 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
30963 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
30964 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
30965 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
30966 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
30968 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
30969 Document new effective target and option set.
30971 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
30973 * config/arm/arm-cpus.in (armv8_4): New feature.
30974 (ARMv8_4a): New fgroup.
30975 (armv8.4-a): New arch.
30976 * config/arm/arm-tables.opt: Regenerate.
30977 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
30978 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
30979 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
30980 Add matching rules for -march=armv8.4-a and extensions.
30981 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
30983 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
30986 * config/rx/rx.md (BW): New mode attribute.
30987 (sync_lock_test_and_setsi): Add mode suffix to insn output.
30989 2018-01-11 Richard Biener <rguenther@suse.de>
30991 PR tree-optimization/83435
30992 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
30993 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
30994 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
30996 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
30997 Alan Hayward <alan.hayward@arm.com>
30998 David Sherwood <david.sherwood@arm.com>
31000 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
31002 (aarch64_classify_address): Initialize it. Track polynomial offsets.
31003 (aarch64_print_address_internal): Use it to check for a zero offset.
31005 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31006 Alan Hayward <alan.hayward@arm.com>
31007 David Sherwood <david.sherwood@arm.com>
31009 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
31010 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
31011 Return a poly_int64 rather than a HOST_WIDE_INT.
31012 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
31013 rather than a HOST_WIDE_INT.
31014 * config/aarch64/aarch64.h (aarch64_frame): Protect with
31015 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
31016 hard_fp_offset, frame_size, initial_adjust, callee_offset and
31017 final_offset from HOST_WIDE_INT to poly_int64.
31018 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
31019 to_constant when getting the number of units in an Advanced SIMD
31021 (aarch64_builtin_vectorized_function): Check for a constant number
31023 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
31025 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
31026 attribute instead of GET_MODE_NUNITS.
31027 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
31028 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
31029 GET_MODE_SIZE for fixed-size registers.
31030 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
31031 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
31032 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
31033 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
31034 (aarch64_print_operand, aarch64_print_address_internal)
31035 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
31036 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
31037 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
31038 Handle polynomial GET_MODE_SIZE.
31039 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
31040 wider than SImode without modification.
31041 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
31042 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
31043 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
31044 passing and returning SVE modes.
31045 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
31046 rather than GEN_INT.
31047 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
31048 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
31049 (aarch64_allocate_and_probe_stack_space): Likewise.
31050 (aarch64_layout_frame): Cope with polynomial offsets.
31051 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
31052 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
31053 polynomial offsets.
31054 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
31055 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
31056 poly_int64 rather than a HOST_WIDE_INT.
31057 (aarch64_get_separate_components, aarch64_process_components)
31058 (aarch64_expand_prologue, aarch64_expand_epilogue)
31059 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
31060 (aarch64_anchor_offset): New function, split out from...
31061 (aarch64_legitimize_address): ...here.
31062 (aarch64_builtin_vectorization_cost): Handle polynomial
31063 TYPE_VECTOR_SUBPARTS.
31064 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
31066 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
31067 number of elements from the PARALLEL rather than the mode.
31068 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
31069 rather than GET_MODE_BITSIZE.
31070 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
31071 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
31072 (aarch64_expand_vec_perm_const_1): Handle polynomial
31073 d->perm.length () and d->perm elements.
31074 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
31075 Apply to_constant to d->perm elements.
31076 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
31077 polynomial CONST_VECTOR_NUNITS.
31078 (aarch64_move_pointer): Take amount as a poly_int64 rather
31080 (aarch64_progress_pointer): Avoid temporary variable.
31081 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
31082 the mode attribute instead of GET_MODE.
31084 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31085 Alan Hayward <alan.hayward@arm.com>
31086 David Sherwood <david.sherwood@arm.com>
31088 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
31089 x exists before using it.
31090 (aarch64_add_constant_internal): Rename to...
31091 (aarch64_add_offset_1): ...this. Replace regnum with separate
31092 src and dest rtxes. Handle the case in which they're different,
31093 including when the offset is zero. Replace scratchreg with an rtx.
31094 Use 2 additions if there is no spare register into which we can
31095 move a 16-bit constant.
31096 (aarch64_add_constant): Delete.
31097 (aarch64_add_offset): Replace reg with separate src and dest
31098 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
31099 Use aarch64_add_offset_1.
31100 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
31101 an rtx rather than an int. Take the delta as a poly_int64
31102 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
31103 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
31104 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
31105 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
31106 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
31107 and aarch64_add_sp.
31108 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
31109 aarch64_add_constant.
31111 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31113 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
31114 Use scalar_float_mode.
31116 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31118 * config/aarch64/aarch64-simd.md
31119 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
31120 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
31121 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
31122 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
31123 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
31124 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
31125 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
31126 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
31127 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
31128 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
31130 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31133 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
31134 targ_options->x_arm_arch_string is non NULL.
31136 2018-01-11 Tamar Christina <tamar.christina@arm.com>
31138 * config/aarch64/aarch64.h
31139 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
31141 2018-01-11 Sudakshina Das <sudi.das@arm.com>
31144 * expmed.c (emit_store_flag_force): Swap if const op0
31145 and change VOIDmode to mode of op0.
31147 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
31149 PR rtl-optimization/83761
31150 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
31151 than bytes to mode_for_size.
31153 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31155 PR middle-end/83189
31156 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
31157 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
31160 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31162 PR middle-end/83575
31163 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
31164 when in layout mode.
31165 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
31166 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
31169 2018-01-10 Michael Collison <michael.collison@arm.com>
31171 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
31172 * config/aarch64/aarch64-option-extension.def: Add
31173 AARCH64_OPT_EXTENSION of 'fp16fml'.
31174 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31175 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
31176 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
31177 * config/aarch64/constraints.md (Ui7): New constraint.
31178 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
31179 (VFMLA_SEL_W): Ditto.
31182 (VFMLA16_LOW): New int iterator.
31183 (VFMLA16_HIGH): Ditto.
31184 (UNSPEC_FMLAL): New unspec.
31185 (UNSPEC_FMLSL): Ditto.
31186 (UNSPEC_FMLAL2): Ditto.
31187 (UNSPEC_FMLSL2): Ditto.
31188 (f16mac): New code attribute.
31189 * config/aarch64/aarch64-simd-builtins.def
31190 (aarch64_fmlal_lowv2sf): Ditto.
31191 (aarch64_fmlsl_lowv2sf): Ditto.
31192 (aarch64_fmlalq_lowv4sf): Ditto.
31193 (aarch64_fmlslq_lowv4sf): Ditto.
31194 (aarch64_fmlal_highv2sf): Ditto.
31195 (aarch64_fmlsl_highv2sf): Ditto.
31196 (aarch64_fmlalq_highv4sf): Ditto.
31197 (aarch64_fmlslq_highv4sf): Ditto.
31198 (aarch64_fmlal_lane_lowv2sf): Ditto.
31199 (aarch64_fmlsl_lane_lowv2sf): Ditto.
31200 (aarch64_fmlal_laneq_lowv2sf): Ditto.
31201 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
31202 (aarch64_fmlalq_lane_lowv4sf): Ditto.
31203 (aarch64_fmlsl_lane_lowv4sf): Ditto.
31204 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
31205 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
31206 (aarch64_fmlal_lane_highv2sf): Ditto.
31207 (aarch64_fmlsl_lane_highv2sf): Ditto.
31208 (aarch64_fmlal_laneq_highv2sf): Ditto.
31209 (aarch64_fmlsl_laneq_highv2sf): Ditto.
31210 (aarch64_fmlalq_lane_highv4sf): Ditto.
31211 (aarch64_fmlsl_lane_highv4sf): Ditto.
31212 (aarch64_fmlalq_laneq_highv4sf): Ditto.
31213 (aarch64_fmlsl_laneq_highv4sf): Ditto.
31214 * config/aarch64/aarch64-simd.md:
31215 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
31216 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31217 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
31218 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
31219 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
31220 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
31221 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
31222 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
31223 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
31224 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
31225 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
31226 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
31227 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
31228 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
31229 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
31230 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
31231 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
31232 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
31233 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
31234 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
31235 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
31236 (vfmlsl_low_u32): Ditto.
31237 (vfmlalq_low_u32): Ditto.
31238 (vfmlslq_low_u32): Ditto.
31239 (vfmlal_high_u32): Ditto.
31240 (vfmlsl_high_u32): Ditto.
31241 (vfmlalq_high_u32): Ditto.
31242 (vfmlslq_high_u32): Ditto.
31243 (vfmlal_lane_low_u32): Ditto.
31244 (vfmlsl_lane_low_u32): Ditto.
31245 (vfmlal_laneq_low_u32): Ditto.
31246 (vfmlsl_laneq_low_u32): Ditto.
31247 (vfmlalq_lane_low_u32): Ditto.
31248 (vfmlslq_lane_low_u32): Ditto.
31249 (vfmlalq_laneq_low_u32): Ditto.
31250 (vfmlslq_laneq_low_u32): Ditto.
31251 (vfmlal_lane_high_u32): Ditto.
31252 (vfmlsl_lane_high_u32): Ditto.
31253 (vfmlal_laneq_high_u32): Ditto.
31254 (vfmlsl_laneq_high_u32): Ditto.
31255 (vfmlalq_lane_high_u32): Ditto.
31256 (vfmlslq_lane_high_u32): Ditto.
31257 (vfmlalq_laneq_high_u32): Ditto.
31258 (vfmlslq_laneq_high_u32): Ditto.
31259 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
31260 (AARCH64_FL_FOR_ARCH8_4): New.
31261 (AARCH64_ISA_F16FML): New ISA flag.
31262 (TARGET_F16FML): New feature flag for fp16fml.
31263 (doc/invoke.texi): Document new fp16fml option.
31265 2018-01-10 Michael Collison <michael.collison@arm.com>
31267 * config/aarch64/aarch64-builtins.c:
31268 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
31269 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31270 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
31271 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
31272 (AARCH64_ISA_SHA3): New ISA flag.
31273 (TARGET_SHA3): New feature flag for sha3.
31274 * config/aarch64/iterators.md (sha512_op): New int attribute.
31275 (CRYPTO_SHA512): New int iterator.
31276 (UNSPEC_SHA512H): New unspec.
31277 (UNSPEC_SHA512H2): Ditto.
31278 (UNSPEC_SHA512SU0): Ditto.
31279 (UNSPEC_SHA512SU1): Ditto.
31280 * config/aarch64/aarch64-simd-builtins.def
31281 (aarch64_crypto_sha512hqv2di): New builtin.
31282 (aarch64_crypto_sha512h2qv2di): Ditto.
31283 (aarch64_crypto_sha512su0qv2di): Ditto.
31284 (aarch64_crypto_sha512su1qv2di): Ditto.
31285 (aarch64_eor3qv8hi): Ditto.
31286 (aarch64_rax1qv2di): Ditto.
31287 (aarch64_xarqv2di): Ditto.
31288 (aarch64_bcaxqv8hi): Ditto.
31289 * config/aarch64/aarch64-simd.md:
31290 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
31291 (aarch64_crypto_sha512su0qv2di): Ditto.
31292 (aarch64_crypto_sha512su1qv2di): Ditto.
31293 (aarch64_eor3qv8hi): Ditto.
31294 (aarch64_rax1qv2di): Ditto.
31295 (aarch64_xarqv2di): Ditto.
31296 (aarch64_bcaxqv8hi): Ditto.
31297 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
31298 (vsha512h2q_u64): Ditto.
31299 (vsha512su0q_u64): Ditto.
31300 (vsha512su1q_u64): Ditto.
31301 (veor3q_u16): Ditto.
31302 (vrax1q_u64): Ditto.
31303 (vxarq_u64): Ditto.
31304 (vbcaxq_u16): Ditto.
31305 * config/arm/types.md (crypto_sha512): New type attribute.
31306 (crypto_sha3): Ditto.
31307 (doc/invoke.texi): Document new sha3 option.
31309 2018-01-10 Michael Collison <michael.collison@arm.com>
31311 * config/aarch64/aarch64-builtins.c:
31312 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
31313 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31314 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
31315 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
31316 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
31317 (AARCH64_ISA_SM4): New ISA flag.
31318 (TARGET_SM4): New feature flag for sm4.
31319 * config/aarch64/aarch64-simd-builtins.def
31320 (aarch64_sm3ss1qv4si): Ditto.
31321 (aarch64_sm3tt1aq4si): Ditto.
31322 (aarch64_sm3tt1bq4si): Ditto.
31323 (aarch64_sm3tt2aq4si): Ditto.
31324 (aarch64_sm3tt2bq4si): Ditto.
31325 (aarch64_sm3partw1qv4si): Ditto.
31326 (aarch64_sm3partw2qv4si): Ditto.
31327 (aarch64_sm4eqv4si): Ditto.
31328 (aarch64_sm4ekeyqv4si): Ditto.
31329 * config/aarch64/aarch64-simd.md:
31330 (aarch64_sm3ss1qv4si): Ditto.
31331 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
31332 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
31333 (aarch64_sm4eqv4si): Ditto.
31334 (aarch64_sm4ekeyqv4si): Ditto.
31335 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
31336 (sm3part_op): Ditto.
31337 (CRYPTO_SM3TT): Ditto.
31338 (CRYPTO_SM3PART): Ditto.
31339 (UNSPEC_SM3SS1): New unspec.
31340 (UNSPEC_SM3TT1A): Ditto.
31341 (UNSPEC_SM3TT1B): Ditto.
31342 (UNSPEC_SM3TT2A): Ditto.
31343 (UNSPEC_SM3TT2B): Ditto.
31344 (UNSPEC_SM3PARTW1): Ditto.
31345 (UNSPEC_SM3PARTW2): Ditto.
31346 (UNSPEC_SM4E): Ditto.
31347 (UNSPEC_SM4EKEY): Ditto.
31348 * config/aarch64/constraints.md (Ui2): New constraint.
31349 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
31350 * config/arm/types.md (crypto_sm3): New type attribute.
31351 (crypto_sm4): Ditto.
31352 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
31353 (vsm3tt1aq_u32): Ditto.
31354 (vsm3tt1bq_u32): Ditto.
31355 (vsm3tt2aq_u32): Ditto.
31356 (vsm3tt2bq_u32): Ditto.
31357 (vsm3partw1q_u32): Ditto.
31358 (vsm3partw2q_u32): Ditto.
31359 (vsm4eq_u32): Ditto.
31360 (vsm4ekeyq_u32): Ditto.
31361 (doc/invoke.texi): Document new sm4 option.
31363 2018-01-10 Michael Collison <michael.collison@arm.com>
31365 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
31366 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
31367 (AARCH64_FL_FOR_ARCH8_4): New.
31368 (AARCH64_FL_V8_4): New flag.
31369 (doc/invoke.texi): Document new armv8.4-a option.
31371 2018-01-10 Michael Collison <michael.collison@arm.com>
31373 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31374 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
31375 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
31376 * config/aarch64/aarch64-option-extension.def: Add
31377 AARCH64_OPT_EXTENSION of 'sha2'.
31378 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
31379 (crypto): Disable sha2 and aes if crypto disabled.
31380 (crypto): Enable aes and sha2 if enabled.
31381 (simd): Disable sha2 and aes if simd disabled.
31382 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
31384 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
31385 (TARGET_SHA2): New feature flag for sha2.
31386 (TARGET_AES): New feature flag for aes.
31387 * config/aarch64/aarch64-simd.md:
31388 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
31389 conditional on TARGET_AES.
31390 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
31391 (aarch64_crypto_sha1hsi): Make pattern conditional
31393 (aarch64_crypto_sha1hv4si): Ditto.
31394 (aarch64_be_crypto_sha1hv4si): Ditto.
31395 (aarch64_crypto_sha1su1v4si): Ditto.
31396 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
31397 (aarch64_crypto_sha1su0v4si): Ditto.
31398 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
31399 (aarch64_crypto_sha256su0v4si): Ditto.
31400 (aarch64_crypto_sha256su1v4si): Ditto.
31401 (doc/invoke.texi): Document new aes and sha2 options.
31403 2018-01-10 Martin Sebor <msebor@redhat.com>
31405 PR tree-optimization/83781
31406 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
31409 2018-01-11 Martin Sebor <msebor@gmail.com>
31410 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
31412 PR tree-optimization/83501
31413 PR tree-optimization/81703
31415 * tree-ssa-strlen.c (get_string_cst): Rename...
31416 (get_string_len): ...to this. Handle global constants.
31417 (handle_char_store): Adjust.
31419 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
31420 Jim Wilson <jimw@sifive.com>
31422 * config/riscv/riscv-protos.h (riscv_output_return): New.
31423 * config/riscv/riscv.c (struct machine_function): New naked_p field.
31424 (riscv_attribute_table, riscv_output_return),
31425 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
31426 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
31427 (riscv_compute_frame_info): Only compute frame->mask if not a naked
31429 (riscv_expand_prologue): Add early return for naked function.
31430 (riscv_expand_epilogue): Likewise.
31431 (riscv_function_ok_for_sibcall): Return false for naked function.
31432 (riscv_set_current_function): New.
31433 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
31434 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
31435 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
31436 * doc/extend.texi (RISC-V Function Attributes): New.
31438 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
31440 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
31441 check for 128-bit long double before checking TCmode.
31442 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
31443 128-bit long doubles before checking TFmode or TCmode.
31444 (FLOAT128_IBM_P): Likewise.
31446 2018-01-10 Martin Sebor <msebor@redhat.com>
31448 PR tree-optimization/83671
31449 * builtins.c (c_strlen): Unconditionally return zero for the empty
31451 Use -Warray-bounds for warnings.
31452 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
31453 for non-constant array indices with COMPONENT_REF, arrays of
31454 arrays, and pointers to arrays.
31455 (gimple_fold_builtin_strlen): Determine and set length range for
31456 non-constant character arrays.
31458 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
31460 PR middle-end/81897
31461 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
31464 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
31466 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
31468 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
31471 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
31472 VECTOR_MEM_ALTIVEC_OR_VSX_P.
31473 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
31474 indexed_or_indirect_operand predicate.
31475 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
31476 (*vsx_le_perm_load_v8hi): Likewise.
31477 (*vsx_le_perm_load_v16qi): Likewise.
31478 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
31479 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
31480 (*vsx_le_perm_store_v8hi): Likewise.
31481 (*vsx_le_perm_store_v16qi): Likewise.
31482 (eight unnamed splitters): Likewise.
31484 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
31486 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
31487 * config/rs6000/emmintrin.h: Likewise.
31488 * config/rs6000/mmintrin.h: Likewise.
31489 * config/rs6000/xmmintrin.h: Likewise.
31491 2018-01-10 David Malcolm <dmalcolm@redhat.com>
31494 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
31496 * tree.c (tree_nop_conversion): Return true for location wrapper
31498 (maybe_wrap_with_location): New function.
31499 (selftest::check_strip_nops): New function.
31500 (selftest::test_location_wrappers): New function.
31501 (selftest::tree_c_tests): Call it.
31502 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
31503 (maybe_wrap_with_location): New decl.
31504 (EXPR_LOCATION_WRAPPER_P): New macro.
31505 (location_wrapper_p): New inline function.
31506 (tree_strip_any_location_wrapper): New inline function.
31508 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
31511 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
31512 stack_realign_offset for the largest alignment of stack slot
31514 (ix86_find_max_used_stack_alignment): New function.
31515 (ix86_finalize_stack_frame_flags): Use it. Set
31516 max_used_stack_alignment if we don't realign stack.
31517 * config/i386/i386.h (machine_function): Add
31518 max_used_stack_alignment.
31520 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
31522 * config/arm/arm.opt (-mbranch-cost): New option.
31523 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
31526 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
31529 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
31530 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
31532 2018-01-10 Richard Biener <rguenther@suse.de>
31535 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
31536 early out so it also covers the case where we have a non-NULL
31539 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31541 PR tree-optimization/83753
31542 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
31543 for non-strided grouped accesses if the number of elements is 1.
31545 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
31548 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
31549 * i386.h (TARGET_USE_GATHER): Define.
31550 * x86-tune.def (X86_TUNE_USE_GATHER): New.
31552 2018-01-10 Martin Liska <mliska@suse.cz>
31555 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
31556 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
31558 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
31559 CLEANUP_NO_PARTITIONING is not set.
31561 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
31563 * doc/rtl.texi: Remove documentation of (const ...) wrappers
31564 for vectors, as a partial revert of r254296.
31565 * rtl.h (const_vec_p): Delete.
31566 (const_vec_duplicate_p): Don't test for vector CONSTs.
31567 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
31568 * expmed.c (make_tree): Likewise.
31571 * common.md (E, F): Use CONSTANT_P instead of checking for
31573 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
31574 checking for CONST_VECTOR.
31576 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31578 PR middle-end/83575
31579 * predict.c (force_edge_cold): Handle in more sane way edges
31580 with no prediction.
31582 2018-01-09 Carl Love <cel@us.ibm.com>
31584 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
31586 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
31587 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
31588 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
31589 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
31590 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
31591 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
31592 * config/rs6000/rs6000-protos.h: Add extern defition for
31593 rs6000_generate_float2_double_code.
31594 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
31596 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
31597 (float2_v2df): Add define_expand.
31599 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
31602 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
31603 op_mode in the force_to_mode call.
31605 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31607 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
31608 instead of checking each element individually.
31609 (aarch64_evpc_uzp): Likewise.
31610 (aarch64_evpc_zip): Likewise.
31611 (aarch64_evpc_ext): Likewise.
31612 (aarch64_evpc_rev): Likewise.
31613 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
31614 instead of checking each element individually. Return true without
31616 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
31617 whether all selected elements come from the same input, instead of
31618 checking each element individually. Remove calls to gen_rtx_REG,
31619 start_sequence and end_sequence and instead assert that no rtl is
31622 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31624 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
31625 order of HIGH and CONST checks.
31627 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
31629 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
31630 if the destination isn't an SSA_NAME.
31632 2018-01-09 Richard Biener <rguenther@suse.de>
31634 PR tree-optimization/83668
31635 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
31637 (canonicalize_loop_form): ... here, renamed from ...
31638 (canonicalize_loop_closed_ssa_form): ... this and amended to
31639 swap successor edges for loop exit blocks to make us use
31640 the RPO order we need for initial schedule generation.
31642 2018-01-09 Joseph Myers <joseph@codesourcery.com>
31644 PR tree-optimization/64811
31645 * match.pd: When optimizing comparisons with Inf, avoid
31646 introducing or losing exceptions from comparisons with NaN.
31648 2018-01-09 Martin Liska <mliska@suse.cz>
31651 * asan.c (shadow_mem_size): Add gcc_assert.
31653 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
31655 Don't save registers in main().
31658 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
31659 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
31660 * config/avr/avr.c (avr_set_current_function): Don't error if
31661 naked, OS_task or OS_main are specified at the same time.
31662 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
31664 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
31666 * common/config/avr/avr-common.c (avr_option_optimization_table):
31667 Switch on -mmain-is-OS_task for optimizing compilations.
31669 2018-01-09 Richard Biener <rguenther@suse.de>
31671 PR tree-optimization/83572
31672 * graphite.c: Include cfganal.h.
31673 (graphite_transform_loops): Connect infinite loops to exit
31674 and remove fake edges at the end.
31676 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31678 * ipa-inline.c (edge_badness): Revert accidental checkin.
31680 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
31683 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
31684 symbols; not inline clones.
31686 2018-01-09 Jakub Jelinek <jakub@redhat.com>
31689 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
31690 hard registers. Formatting fixes.
31692 PR preprocessor/83722
31693 * gcc.c (try_generate_repro): Pass
31694 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
31695 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
31698 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
31699 Kito Cheng <kito.cheng@gmail.com>
31701 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
31702 (riscv_leaf_function_p): Delete.
31703 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
31705 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31707 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
31709 (do_ifelse): New function.
31710 (do_isel): New function.
31711 (do_sub3): New function.
31712 (do_add3): New function.
31713 (do_load_mask_compare): New function.
31714 (do_overlap_load_compare): New function.
31715 (expand_compare_loop): New function.
31716 (expand_block_compare): Call expand_compare_loop() when appropriate.
31717 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
31718 option description.
31719 (-mblock-compare-inline-loop-limit): New option.
31721 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
31724 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
31725 Reverse order of second and third operands in first alternative.
31726 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
31727 of first and second elements in UNSPEC_VPERMR vector.
31728 (altivec_expand_vec_perm_le): Likewise.
31730 2018-01-08 Jeff Law <law@redhat.com>
31732 PR rtl-optimizatin/81308
31733 * tree-switch-conversion.c (cfg_altered): New file scoped static.
31734 (process_switch): If group_case_labels makes a change, then set
31736 (pass_convert_switch::execute): If a switch is converted, then
31737 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
31739 PR rtl-optimization/81308
31740 * recog.c (split_all_insns): Conditionally cleanup the CFG after
31743 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
31745 PR target/83663 - Revert r255946
31746 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
31747 generation for cases where splatting a value is not useful.
31748 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
31749 across a vec_duplicate and a paradoxical subreg forming a vector
31750 mode to a vec_concat.
31752 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
31754 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
31755 -march=armv8.3-a variants.
31756 * config/arm/t-multilib: Likewise.
31757 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
31759 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
31761 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
31763 (cceq_ior_compare_complement): Give it a name so I can use it, and
31764 change boolean_or_operator predicate to boolean_operator so it can
31765 be used to generate a crand.
31766 (eqne): New code iterator.
31767 (bd/bd_neg): New code_attrs.
31768 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
31769 a single define_insn.
31770 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
31771 decrement (bdnzt/bdnzf/bdzt/bdzf).
31772 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
31773 with the new names of the branch decrement patterns, and added the
31774 names of the branch decrement conditional patterns.
31776 2018-01-08 Richard Biener <rguenther@suse.de>
31778 PR tree-optimization/83563
31779 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
31782 2018-01-08 Richard Biener <rguenther@suse.de>
31784 PR middle-end/83713
31785 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
31787 2018-01-08 Richard Biener <rguenther@suse.de>
31789 PR tree-optimization/83685
31790 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
31791 references to abnormals.
31793 2018-01-08 Richard Biener <rguenther@suse.de>
31796 * dwarf2out.c (output_indirect_strings): Handle empty
31797 skeleton_debug_str_hash.
31798 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
31800 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31802 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
31803 (emit_store_direct): Likewise.
31804 (arc_trampoline_adjust_address): Likewise.
31805 (arc_asm_trampoline_template): New function.
31806 (arc_initialize_trampoline): Use asm_trampoline_template.
31807 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
31808 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
31809 * config/arc/arc.md (flush_icache): Delete pattern.
31811 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
31813 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
31814 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
31817 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31820 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
31821 by not USED_FOR_TARGET.
31822 (make_pass_resolve_sw_modes): Likewise.
31824 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
31826 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
31829 2018-01-08 Richard Biener <rguenther@suse.de>
31831 PR middle-end/83580
31832 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
31834 2018-01-08 Richard Biener <rguenther@suse.de>
31836 PR middle-end/83517
31837 * match.pd ((t * 2) / 2) -> t): Add missing :c.
31839 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
31841 PR middle-end/81897
31842 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
31843 basic blocks with a small number of successors.
31844 (convert_control_dep_chain_into_preds): Improve handling of
31846 (dump_predicates): Split apart into...
31847 (dump_pred_chain): ...here...
31848 (dump_pred_info): ...and here.
31849 (can_one_predicate_be_invalidated_p): Add debugging printfs.
31850 (can_chain_union_be_invalidated_p): Improve check for invalidation
31852 (uninit_uses_cannot_happen): Avoid unnecessary if
31853 convert_control_dep_chain_into_preds yielded nothing.
31855 2018-01-06 Martin Sebor <msebor@redhat.com>
31857 PR tree-optimization/83640
31858 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
31859 subtracting negative offset from size.
31860 (builtin_access::overlap): Adjust offset bounds of the access to fall
31861 within the size of the object if possible.
31863 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
31865 PR rtl-optimization/83699
31866 * expmed.c (extract_bit_field_1): Restrict the vector usage of
31867 extract_bit_field_as_subreg to cases in which the extracted
31868 value is also a vector.
31870 * lra-constraints.c (process_alt_operands): Test for the equivalence
31871 substitutions when detecting a possible reload cycle.
31873 2018-01-06 Jakub Jelinek <jakub@redhat.com>
31876 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
31877 by default if flag_selective_schedling{,2}. Formatting fixes.
31879 PR rtl-optimization/83682
31880 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
31881 if it has non-VECTOR_MODE element mode.
31882 (vec_duplicate_p): Likewise.
31884 PR middle-end/83694
31885 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
31886 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
31888 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31891 * config/i386/i386-builtin.def
31892 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
31893 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
31894 Require also OPTION_MASK_ISA_AVX512F in addition to
31895 OPTION_MASK_ISA_GFNI.
31896 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
31897 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
31898 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
31899 to OPTION_MASK_ISA_GFNI.
31900 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
31901 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
31902 OPTION_MASK_ISA_AVX512BW.
31903 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
31904 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
31905 addition to OPTION_MASK_ISA_GFNI.
31906 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
31907 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
31908 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
31909 to OPTION_MASK_ISA_GFNI.
31910 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
31911 a requirement for all ISAs rather than any of them with a few
31913 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
31915 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
31916 bitmasks to be enabled with 3 exceptions, instead of requiring any
31917 enabled ISA with lots of exceptions.
31918 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
31919 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
31920 Change avx512bw in isa attribute to avx512f.
31921 * config/i386/sgxintrin.h: Add license boilerplate.
31922 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
31923 to __AVX512F__ and __AVX512VL to __AVX512VL__.
31924 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
31925 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
31927 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
31928 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
31929 temporarily sse2 rather than sse if not enabled already.
31932 * config/i386/sse.md (VI248_VLBW): Rename to ...
31933 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
31934 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
31935 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
31936 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
31937 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
31938 mode iterator instead of VI248_VLBW.
31940 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
31942 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
31943 (record_modified): Skip clobbers; add debug output.
31944 (param_change_prob): Use sreal frequencies.
31946 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31948 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
31949 punt for user-aligned variables.
31951 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
31953 * tree-chrec.c (chrec_contains_symbols): Return true for
31956 2018-01-05 Sudakshina Das <sudi.das@arm.com>
31959 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
31960 of (x|y) == x for BICS pattern.
31962 2018-01-05 Jakub Jelinek <jakub@redhat.com>
31964 PR tree-optimization/83605
31965 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
31966 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
31969 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
31971 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
31972 * config/epiphany/rtems.h: New file.
31974 2018-01-04 Jakub Jelinek <jakub@redhat.com>
31975 Uros Bizjak <ubizjak@gmail.com>
31978 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
31979 QIreg_operand instead of register_operand predicate.
31980 * config/i386/i386.c (ix86_rop_should_change_byte_p,
31981 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
31982 comments instead of -fmitigate[-_]rop.
31984 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
31987 * cgraphunit.c (symbol_table::compile): Switch to text_section
31988 before calling assembly_start debug hook.
31989 * run-rtl-passes.c (run_rtl_passes): Likewise.
31992 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
31994 * tree-vrp.c (extract_range_from_binary_expr_1): Check
31995 range_int_cst_p rather than !symbolic_range_p before calling
31996 extract_range_from_multiplicative_op_1.
31998 2018-01-04 Jeff Law <law@redhat.com>
32000 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
32001 redundant test in assertion.
32003 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32005 * doc/rtl.texi: Document machine_mode wrapper classes.
32007 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32009 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
32010 using tree_to_uhwi.
32012 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32014 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
32015 the VEC_PERM_EXPR fold to fail.
32017 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32020 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
32021 to switched_sections.
32023 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32026 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
32027 test for d.testing.
32029 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
32032 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
32033 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
32035 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32038 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
32039 is BLKmode and bitpos not zero or mode change is needed.
32041 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
32044 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
32047 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
32050 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
32051 instead of MULT rtx. Update all corresponding splitters.
32052 (*saddl_se): Ditto.
32053 (*ssub<modesuffix>): Ditto.
32054 (*ssubl_se): Ditto.
32055 (*cmp_sadd_di): Update split patterns.
32056 (*cmp_sadd_si): Ditto.
32057 (*cmp_sadd_sidi): Ditto.
32058 (*cmp_ssub_di): Ditto.
32059 (*cmp_ssub_si): Ditto.
32060 (*cmp_ssub_sidi): Ditto.
32061 * config/alpha/predicates.md (const23_operand): New predicate.
32062 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
32063 Look for ASHIFT, not MULT inner operand.
32064 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
32066 2018-01-04 Martin Liska <mliska@suse.cz>
32068 PR gcov-profile/83669
32069 * gcov.c (output_intermediate_file): Add version to intermediate
32071 * doc/gcov.texi: Document new field 'version' in intermediate
32072 file format. Fix location of '-k' option of gcov command.
32074 2018-01-04 Martin Liska <mliska@suse.cz>
32077 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
32079 2018-01-04 Jakub Jelinek <jakub@redhat.com>
32081 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
32083 2018-01-03 Martin Sebor <msebor@redhat.com>
32085 PR tree-optimization/83655
32086 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
32087 checking calls with invalid arguments.
32089 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32091 * tree-vect-stmts.c (vect_get_store_rhs): New function.
32092 (vectorizable_mask_load_store): Delete.
32093 (vectorizable_call): Return false for masked loads and stores.
32094 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
32095 instead of gimple_assign_rhs1.
32096 (vectorizable_load): Handle IFN_MASK_LOAD.
32097 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
32099 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32101 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
32103 (vectorizable_mask_load_store): ...here.
32104 (vectorizable_load): ...and here.
32106 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32108 * tree-vect-stmts.c (vect_build_all_ones_mask)
32109 (vect_build_zero_merge_argument): New functions, split out from...
32110 (vectorizable_load): ...here.
32112 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32114 * tree-vect-stmts.c (vect_check_store_rhs): New function,
32116 (vectorizable_mask_load_store): ...here.
32117 (vectorizable_store): ...and here.
32119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32121 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
32123 (vectorizable_mask_load_store): ...here.
32125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32127 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
32128 (vect_model_store_cost): Take a vec_load_store_type instead of a
32130 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
32131 (vect_model_store_cost): Take a vec_load_store_type instead of a
32133 (vectorizable_mask_load_store): Update accordingly.
32134 (vectorizable_store): Likewise.
32135 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
32137 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32139 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
32140 IFN_MASK_LOAD calls here rather than...
32141 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
32143 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32144 Alan Hayward <alan.hayward@arm.com>
32145 David Sherwood <david.sherwood@arm.com>
32147 * expmed.c (extract_bit_field_1): For vector extracts,
32148 fall back to extract_bit_field_as_subreg if vec_extract
32151 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32152 Alan Hayward <alan.hayward@arm.com>
32153 David Sherwood <david.sherwood@arm.com>
32155 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
32156 they are variable or constant sized.
32157 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
32158 slots for constant-sized data.
32160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32161 Alan Hayward <alan.hayward@arm.com>
32162 David Sherwood <david.sherwood@arm.com>
32164 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
32165 handling COND_EXPRs with boolean comparisons, try to find a better
32166 basis for the mask type than the boolean itself.
32168 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32170 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
32171 is calculated and how it can be overridden.
32172 * genmodes.c (max_bitsize_mode_any_mode): New variable.
32173 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
32175 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
32178 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32179 Alan Hayward <alan.hayward@arm.com>
32180 David Sherwood <david.sherwood@arm.com>
32182 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
32183 Remove the mode argument.
32184 (aarch64_simd_valid_immediate): Remove the mode and inverse
32186 * config/aarch64/iterators.md (bitsize): New iterator.
32187 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
32188 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
32189 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
32190 aarch64_simd_valid_immediate.
32191 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
32192 (aarch64_reg_or_bic_imm): Likewise.
32193 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
32194 with an insn_type enum and msl with a modifier_type enum.
32195 Replace element_width with a scalar_mode. Change the shift
32196 to unsigned int. Add constructors for scalar_float_mode and
32197 scalar_int_mode elements.
32198 (aarch64_vect_float_const_representable_p): Delete.
32199 (aarch64_can_const_movi_rtx_p)
32200 (aarch64_simd_scalar_immediate_valid_for_move)
32201 (aarch64_simd_make_constant): Update call to
32202 aarch64_simd_valid_immediate.
32203 (aarch64_advsimd_valid_immediate_hs): New function.
32204 (aarch64_advsimd_valid_immediate): Likewise.
32205 (aarch64_simd_valid_immediate): Remove mode and inverse
32206 arguments. Rewrite to use the above. Use const_vec_duplicate_p
32207 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
32208 and aarch64_float_const_representable_p on the result.
32209 (aarch64_output_simd_mov_immediate): Remove mode argument.
32210 Update call to aarch64_simd_valid_immediate and use of
32211 simd_immediate_info.
32212 (aarch64_output_scalar_simd_mov_immediate): Update call
32215 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32216 Alan Hayward <alan.hayward@arm.com>
32217 David Sherwood <david.sherwood@arm.com>
32219 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
32220 (mode_nunits): Likewise CONST_MODE_NUNITS.
32221 * machmode.def (ADJUST_NUNITS): Document.
32222 * genmodes.c (mode_data::need_nunits_adj): New field.
32223 (blank_mode): Update accordingly.
32224 (adj_nunits): New variable.
32225 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
32227 (emit_mode_size_inline): Set need_bytesize_adj for all modes
32228 listed in adj_nunits.
32229 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
32230 listed in adj_nunits. Don't emit case statements for such modes.
32231 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
32232 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
32233 nothing if adj_nunits is nonnull.
32234 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
32235 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
32236 (emit_mode_fbit): Update use of print_maybe_const_decl.
32237 (emit_move_size): Likewise. Treat the array as non-const
32239 (emit_mode_adjustments): Handle adj_nunits.
32241 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32243 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
32244 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
32245 (VECTOR_MODES): Use it.
32246 (make_vector_modes): Take the prefix as an argument.
32248 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32249 Alan Hayward <alan.hayward@arm.com>
32250 David Sherwood <david.sherwood@arm.com>
32252 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
32253 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
32254 for MODE_VECTOR_BOOL.
32255 * machmode.def (VECTOR_BOOL_MODE): Document.
32256 * genmodes.c (VECTOR_BOOL_MODE): New macro.
32257 (make_vector_bool_mode): New function.
32258 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
32260 * lto-streamer-in.c (lto_input_mode_table): Likewise.
32261 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
32263 * stor-layout.c (int_mode_for_mode): Likewise.
32264 * tree.c (build_vector_type_for_mode): Likewise.
32265 * varasm.c (output_constant_pool_2): Likewise.
32266 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
32267 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
32268 for MODE_VECTOR_BOOL.
32269 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
32270 of mode class checks.
32271 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
32272 instead of a list of mode class checks.
32273 (expand_vector_scalar_condition): Likewise.
32274 (type_for_widest_vector_mode): Handle BImode as an inner mode.
32276 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32277 Alan Hayward <alan.hayward@arm.com>
32278 David Sherwood <david.sherwood@arm.com>
32280 * machmode.h (mode_size): Change from unsigned short to
32282 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
32283 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32284 or if measurement_type is not polynomial.
32285 (fixed_size_mode::includes_p): Check for constant-sized modes.
32286 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
32287 return a poly_uint16 rather than an unsigned short.
32288 (emit_mode_size): Change the type of mode_size from unsigned short
32289 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
32290 (emit_mode_adjustments): Cope with polynomial vector sizes.
32291 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32293 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32295 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
32296 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
32297 * caller-save.c (setup_save_areas): Likewise.
32298 (replace_reg_with_saved_mem): Likewise.
32299 * calls.c (emit_library_call_value_1): Likewise.
32300 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
32301 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
32302 (gen_lowpart_for_combine): Likewise.
32303 * convert.c (convert_to_integer_1): Likewise.
32304 * cse.c (equiv_constant, cse_insn): Likewise.
32305 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
32306 (cselib_subst_to_values): Likewise.
32307 * dce.c (word_dce_process_block): Likewise.
32308 * df-problems.c (df_word_lr_mark_ref): Likewise.
32309 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
32310 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
32311 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
32312 (rtl_for_decl_location): Likewise.
32313 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
32314 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
32315 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
32316 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
32317 (expand_expr_real_1): Likewise.
32318 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
32319 (pad_below): Likewise.
32320 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32321 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
32322 * ira.c (get_subreg_tracking_sizes): Likewise.
32323 * ira-build.c (ira_create_allocno_objects): Likewise.
32324 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
32325 (ira_sort_regnos_for_alter_reg): Likewise.
32326 * ira-costs.c (record_operand_costs): Likewise.
32327 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
32328 (resolve_simple_move): Likewise.
32329 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
32330 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
32331 (lra_constraints): Likewise.
32332 (CONST_POOL_OK_P): Reject variable-sized modes.
32333 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
32334 (add_pseudo_to_slot, lra_spill): Likewise.
32335 * omp-low.c (omp_clause_aligned_alignment): Likewise.
32336 * optabs-query.c (get_best_extraction_insn): Likewise.
32337 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32338 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
32339 (expand_mult_highpart, valid_multiword_target_p): Likewise.
32340 * recog.c (offsettable_address_addr_space_p): Likewise.
32341 * regcprop.c (maybe_mode_change): Likewise.
32342 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
32343 * regrename.c (build_def_use): Likewise.
32344 * regstat.c (dump_reg_info): Likewise.
32345 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
32346 (find_reloads, find_reloads_subreg_address): Likewise.
32347 * reload1.c (eliminate_regs_1): Likewise.
32348 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
32349 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
32350 (simplify_binary_operation_1, simplify_subreg): Likewise.
32351 * targhooks.c (default_function_arg_padding): Likewise.
32352 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
32353 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
32354 (verify_gimple_assign_ternary): Likewise.
32355 * tree-inline.c (estimate_move_cost): Likewise.
32356 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32357 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
32358 (get_address_cost_ainc): Likewise.
32359 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
32360 (vect_supportable_dr_alignment): Likewise.
32361 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32362 (vectorizable_reduction): Likewise.
32363 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
32364 (vectorizable_operation, vectorizable_load): Likewise.
32365 * tree.c (build_same_sized_truth_vector_type): Likewise.
32366 * valtrack.c (cleanup_auto_inc_dec): Likewise.
32367 * var-tracking.c (emit_note_insn_var_location): Likewise.
32368 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
32369 (ADDR_VEC_ALIGN): Likewise.
32371 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32372 Alan Hayward <alan.hayward@arm.com>
32373 David Sherwood <david.sherwood@arm.com>
32375 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
32377 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32378 or if measurement_type is polynomial.
32379 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
32380 * combine.c (make_extraction): Likewise.
32381 * dse.c (find_shift_sequence): Likewise.
32382 * dwarf2out.c (mem_loc_descriptor): Likewise.
32383 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
32384 (extract_bit_field, extract_low_bits): Likewise.
32385 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
32386 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
32387 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
32388 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
32389 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32390 * reload.c (find_reloads): Likewise.
32391 * reload1.c (alter_reg): Likewise.
32392 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
32393 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
32394 * tree-if-conv.c (predicate_mem_writes): Likewise.
32395 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
32396 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
32397 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
32398 * valtrack.c (dead_debug_insert_temp): Likewise.
32399 * varasm.c (mergeable_constant_section): Likewise.
32400 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
32402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32403 Alan Hayward <alan.hayward@arm.com>
32404 David Sherwood <david.sherwood@arm.com>
32406 * expr.c (expand_assignment): Cope with polynomial mode sizes
32407 when assigning to a CONCAT.
32409 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32410 Alan Hayward <alan.hayward@arm.com>
32411 David Sherwood <david.sherwood@arm.com>
32413 * machmode.h (mode_precision): Change from unsigned short to
32415 (mode_to_precision): Return a poly_uint16 rather than an unsigned
32417 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
32418 or if measurement_type is not polynomial.
32419 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
32420 in which the mode is already known to be a scalar_int_mode.
32421 * genmodes.c (emit_mode_precision): Change the type of mode_precision
32422 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
32424 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32425 for GET_MODE_PRECISION.
32426 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32427 for GET_MODE_PRECISION.
32428 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
32430 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
32431 (expand_field_assignment, make_extraction): Likewise.
32432 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
32433 (get_last_value): Likewise.
32434 * convert.c (convert_to_integer_1): Likewise.
32435 * cse.c (cse_insn): Likewise.
32436 * expr.c (expand_expr_real_1): Likewise.
32437 * lra-constraints.c (simplify_operand_subreg): Likewise.
32438 * optabs-query.c (can_atomic_load_p): Likewise.
32439 * optabs.c (expand_atomic_load): Likewise.
32440 (expand_atomic_store): Likewise.
32441 * ree.c (combine_reaching_defs): Likewise.
32442 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
32443 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
32444 * tree.h (type_has_mode_precision_p): Likewise.
32445 * ubsan.c (instrument_si_overflow): Likewise.
32447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32448 Alan Hayward <alan.hayward@arm.com>
32449 David Sherwood <david.sherwood@arm.com>
32451 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
32452 polynomial numbers of units.
32453 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
32454 (valid_vector_subparts_p): New function.
32455 (build_vector_type): Remove temporary shim and take the number
32456 of units as a poly_uint64 rather than an int.
32457 (build_opaque_vector_type): Take the number of units as a
32458 poly_uint64 rather than an int.
32459 * tree.c (build_vector_from_ctor): Handle polynomial
32460 TYPE_VECTOR_SUBPARTS.
32461 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
32462 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
32463 (build_vector_from_val): If the number of units is variable,
32464 use build_vec_duplicate_cst for constant operands and
32465 VEC_DUPLICATE_EXPR otherwise.
32466 (make_vector_type): Remove temporary is_constant ().
32467 (build_vector_type, build_opaque_vector_type): Take the number of
32468 units as a poly_uint64 rather than an int.
32469 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
32471 * cfgexpand.c (expand_debug_expr): Likewise.
32472 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
32473 (store_constructor, expand_expr_real_1): Likewise.
32474 (const_scalar_mask_from_tree): Likewise.
32475 * fold-const-call.c (fold_const_reduction): Likewise.
32476 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
32477 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
32478 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
32479 (fold_relational_const): Likewise.
32480 (native_interpret_vector): Likewise. Change the size from an
32481 int to an unsigned int.
32482 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
32483 TYPE_VECTOR_SUBPARTS.
32484 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
32485 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
32486 duplicating a non-constant operand into a variable-length vector.
32487 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
32488 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
32489 * ipa-icf.c (sem_variable::equals): Likewise.
32490 * match.pd: Likewise.
32491 * omp-simd-clone.c (simd_clone_subparts): Likewise.
32492 * print-tree.c (print_node): Likewise.
32493 * stor-layout.c (layout_type): Likewise.
32494 * targhooks.c (default_builtin_vectorization_cost): Likewise.
32495 * tree-cfg.c (verify_gimple_comparison): Likewise.
32496 (verify_gimple_assign_binary): Likewise.
32497 (verify_gimple_assign_ternary): Likewise.
32498 (verify_gimple_assign_single): Likewise.
32499 * tree-pretty-print.c (dump_generic_node): Likewise.
32500 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32501 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
32502 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
32503 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
32504 (vect_shift_permute_load_chain): Likewise.
32505 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
32506 (expand_vector_condition, optimize_vector_constructor): Likewise.
32507 (lower_vec_perm, get_compute_type): Likewise.
32508 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32509 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
32510 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
32511 (vect_recog_mask_conversion_pattern): Likewise.
32512 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
32513 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
32514 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32515 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
32516 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
32517 (vectorizable_shift, vectorizable_operation, vectorizable_store)
32518 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
32519 (supportable_widening_operation): Likewise.
32520 (supportable_narrowing_operation): Likewise.
32521 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
32523 * varasm.c (output_constant): Likewise.
32525 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32526 Alan Hayward <alan.hayward@arm.com>
32527 David Sherwood <david.sherwood@arm.com>
32529 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
32530 so that both the length == 3 and length != 3 cases set up their
32531 own permute vectors. Add comments explaining why we know the
32532 number of elements is constant.
32533 (vect_permute_load_chain): Likewise.
32535 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32536 Alan Hayward <alan.hayward@arm.com>
32537 David Sherwood <david.sherwood@arm.com>
32539 * machmode.h (mode_nunits): Change from unsigned char to
32541 (ONLY_FIXED_SIZE_MODES): New macro.
32542 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
32543 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
32544 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
32546 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
32547 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
32548 or if measurement_type is not polynomial.
32549 * genmodes.c (ZERO_COEFFS): New macro.
32550 (emit_mode_nunits_inline): Make mode_nunits_inline return a
32552 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
32553 Use ZERO_COEFFS when emitting initializers.
32554 * data-streamer.h (bp_pack_poly_value): New function.
32555 (bp_unpack_poly_value): Likewise.
32556 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32557 for GET_MODE_NUNITS.
32558 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32559 for GET_MODE_NUNITS.
32560 * tree.c (make_vector_type): Remove temporary shim and make
32561 the real function take the number of units as a poly_uint64
32562 rather than an int.
32563 (build_vector_type_for_mode): Handle polynomial nunits.
32564 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
32565 * emit-rtl.c (const_vec_series_p_1): Likewise.
32566 (gen_rtx_CONST_VECTOR): Likewise.
32567 * fold-const.c (test_vec_duplicate_folding): Likewise.
32568 * genrecog.c (validate_pattern): Likewise.
32569 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
32570 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32571 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
32572 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
32573 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
32574 * rtlanal.c (subreg_get_info): Likewise.
32575 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32576 (vect_grouped_load_supported): Likewise.
32577 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
32578 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
32579 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
32580 (simplify_const_unary_operation, simplify_binary_operation_1)
32581 (simplify_const_binary_operation, simplify_ternary_operation)
32582 (test_vector_ops_duplicate, test_vector_ops): Likewise.
32583 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
32584 instead of CONST_VECTOR_NUNITS.
32585 * varasm.c (output_constant_pool_2): Likewise.
32586 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
32587 explicit-encoded elements in the XVEC for variable-length vectors.
32589 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32591 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
32593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32594 Alan Hayward <alan.hayward@arm.com>
32595 David Sherwood <david.sherwood@arm.com>
32597 * coretypes.h (fixed_size_mode): Declare.
32598 (fixed_size_mode_pod): New typedef.
32599 * builtins.h (target_builtins::x_apply_args_mode)
32600 (target_builtins::x_apply_result_mode): Change type to
32601 fixed_size_mode_pod.
32602 * builtins.c (apply_args_size, apply_result_size, result_vector)
32603 (expand_builtin_apply_args_1, expand_builtin_apply)
32604 (expand_builtin_return): Update accordingly.
32606 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32608 * cse.c (hash_rtx_cb): Hash only the encoded elements.
32609 * cselib.c (cselib_hash_rtx): Likewise.
32610 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
32611 CONST_VECTOR encoding.
32613 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32614 Jeff Law <law@redhat.com>
32617 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
32618 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
32619 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
32620 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
32623 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
32624 explicitly probe *sp in a noreturn function if there were any callee
32625 register saves or frame pointer is needed.
32627 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32630 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
32631 BLKmode for ternary, binary or unary expressions.
32634 * var-tracking.c (delete_vta_debug_insn): New inline function.
32635 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
32636 insns from get_insns () to NULL instead of each bb separately.
32637 Use delete_vta_debug_insn. No longer static.
32638 (vt_debug_insns_local, variable_tracking_main_1): Adjust
32639 delete_vta_debug_insns callers.
32640 * rtl.h (delete_vta_debug_insns): Declare.
32641 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
32642 instead of variable_tracking_main.
32644 2018-01-03 Martin Sebor <msebor@redhat.com>
32646 PR tree-optimization/83603
32647 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
32648 arguments past the endof the argument list in functions declared
32649 without a prototype.
32650 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
32651 Avoid checking when arguments are null.
32653 2018-01-03 Martin Sebor <msebor@redhat.com>
32656 * doc/extend.texi (attribute const): Fix a typo.
32657 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
32658 issuing -Wsuggest-attribute for void functions.
32660 2018-01-03 Martin Sebor <msebor@redhat.com>
32662 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
32663 offset_int::from instead of wide_int::to_shwi.
32664 (maybe_diag_overlap): Remove assertion.
32665 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
32666 * gimple-ssa-sprintf.c (format_directive): Same.
32667 (parse_directive): Same.
32668 (sprintf_dom_walker::compute_format_length): Same.
32669 (try_substitute_return_value): Same.
32671 2018-01-03 Jeff Law <law@redhat.com>
32673 PR middle-end/83654
32674 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
32675 non-constant residual for zero at runtime and avoid probing in
32676 that case. Reorganize code for trailing problem to mirror handling
32679 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
32681 PR tree-optimization/83501
32682 * tree-ssa-strlen.c (get_string_cst): New.
32683 (handle_char_store): Call get_string_cst.
32685 2018-01-03 Martin Liska <mliska@suse.cz>
32687 PR tree-optimization/83593
32688 * tree-ssa-strlen.c: Include tree-cfg.h.
32689 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
32690 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
32691 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
32693 (strlen_dom_walker::before_dom_children): Call
32694 gimple_purge_dead_eh_edges. Dump tranformation with details
32696 (strlen_dom_walker::before_dom_children): Update call by adding
32697 new argument cleanup_eh.
32698 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
32700 2018-01-03 Martin Liska <mliska@suse.cz>
32703 * cif-code.def (VARIADIC_THUNK): New enum value.
32704 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
32707 2018-01-03 Jan Beulich <jbeulich@suse.com>
32709 * sse.md (mov<mode>_internal): Tighten condition for when to use
32710 vmovdqu<ssescalarsize> for TI and OI modes.
32712 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32714 Update copyright years.
32716 2018-01-03 Martin Liska <mliska@suse.cz>
32719 * ipa-visibility.c (function_and_variable_visibility): Skip
32720 functions with noipa attribure.
32722 2018-01-03 Jakub Jelinek <jakub@redhat.com>
32724 * gcc.c (process_command): Update copyright notice dates.
32725 * gcov-dump.c (print_version): Ditto.
32726 * gcov.c (print_version): Ditto.
32727 * gcov-tool.c (print_version): Ditto.
32728 * gengtype.c (create_file): Ditto.
32729 * doc/cpp.texi: Bump @copying's copyright year.
32730 * doc/cppinternals.texi: Ditto.
32731 * doc/gcc.texi: Ditto.
32732 * doc/gccint.texi: Ditto.
32733 * doc/gcov.texi: Ditto.
32734 * doc/install.texi: Ditto.
32735 * doc/invoke.texi: Ditto.
32737 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32739 * vector-builder.h (vector_builder::m_full_nelts): Change from
32740 unsigned int to poly_uint64.
32741 (vector_builder::full_nelts): Update prototype accordingly.
32742 (vector_builder::new_vector): Likewise.
32743 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
32744 (vector_builder::operator ==): Likewise.
32745 (vector_builder::finalize): Likewise.
32746 * int-vector-builder.h (int_vector_builder::int_vector_builder):
32747 Take the number of elements as a poly_uint64 rather than an
32749 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
32750 from unsigned int to poly_uint64.
32751 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
32752 (vec_perm_indices::new_vector): Likewise.
32753 (vec_perm_indices::length): Likewise.
32754 (vec_perm_indices::nelts_per_input): Likewise.
32755 (vec_perm_indices::input_nelts): Likewise.
32756 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
32757 number of elements per input as a poly_uint64 rather than an
32758 unsigned int. Use the original encoding for variable-length
32759 vectors, rather than clamping each individual element.
32760 For the second and subsequent elements in each pattern,
32761 clamp the step and base before clamping their sum.
32762 (vec_perm_indices::series_p): Handle polynomial element counts.
32763 (vec_perm_indices::all_in_range_p): Likewise.
32764 (vec_perm_indices_to_tree): Likewise.
32765 (vec_perm_indices_to_rtx): Likewise.
32766 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
32767 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
32768 (tree_vector_builder::new_binary_operation): Handle polynomial
32769 element counts. Return false if we need to know the number
32770 of elements at compile time.
32771 * fold-const.c (fold_vec_perm): Punt if the number of elements
32772 isn't known at compile time.
32774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32776 * vec-perm-indices.h (vec_perm_builder): Change element type
32777 from HOST_WIDE_INT to poly_int64.
32778 (vec_perm_indices::element_type): Update accordingly.
32779 (vec_perm_indices::clamp): Handle polynomial element_types.
32780 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32781 (vec_perm_indices::all_in_range_p): Likewise.
32782 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
32784 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
32785 polynomial vec_perm_indices element types.
32786 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
32787 * fold-const.c (fold_vec_perm): Likewise.
32788 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
32789 * tree-vect-generic.c (lower_vec_perm): Likewise.
32790 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32791 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
32792 element type to HOST_WIDE_INT.
32794 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32795 Alan Hayward <alan.hayward@arm.com>
32796 David Sherwood <david.sherwood@arm.com>
32798 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
32799 rather than an int. Use plus_constant.
32800 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
32801 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
32803 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32804 Alan Hayward <alan.hayward@arm.com>
32805 David Sherwood <david.sherwood@arm.com>
32807 * calls.c (emit_call_1, expand_call): Change struct_value_size from
32808 a HOST_WIDE_INT to a poly_int64.
32810 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32811 Alan Hayward <alan.hayward@arm.com>
32812 David Sherwood <david.sherwood@arm.com>
32814 * calls.c (load_register_parameters): Cope with polynomial
32815 mode sizes. Require a constant size for BLKmode parameters
32816 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
32817 forces a parameter to be padded at the lsb end in order to
32818 fill a complete number of words, require the parameter size
32819 to be ordered wrt UNITS_PER_WORD.
32821 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32822 Alan Hayward <alan.hayward@arm.com>
32823 David Sherwood <david.sherwood@arm.com>
32825 * reload1.c (spill_stack_slot_width): Change element type
32826 from unsigned int to poly_uint64_pod.
32827 (alter_reg): Treat mode sizes as polynomial.
32829 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32830 Alan Hayward <alan.hayward@arm.com>
32831 David Sherwood <david.sherwood@arm.com>
32833 * reload.c (complex_word_subreg_p): New function.
32834 (reload_inner_reg_of_subreg, push_reload): Use it.
32836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32837 Alan Hayward <alan.hayward@arm.com>
32838 David Sherwood <david.sherwood@arm.com>
32840 * lra-constraints.c (process_alt_operands): Reject matched
32841 operands whose sizes aren't ordered.
32842 (match_reload): Refer to this check here.
32844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32845 Alan Hayward <alan.hayward@arm.com>
32846 David Sherwood <david.sherwood@arm.com>
32848 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
32849 that the mode size is in the set {1, 2, 4, 8, 16}.
32851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32852 Alan Hayward <alan.hayward@arm.com>
32853 David Sherwood <david.sherwood@arm.com>
32855 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
32856 Use plus_constant instead of gen_rtx_PLUS.
32858 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32859 Alan Hayward <alan.hayward@arm.com>
32860 David Sherwood <david.sherwood@arm.com>
32862 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
32863 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
32864 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
32865 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
32866 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
32867 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
32868 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
32869 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
32870 * config/i386/i386.c (ix86_push_rounding): ...this new function.
32871 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
32873 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
32874 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
32875 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
32876 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
32877 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
32878 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
32879 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
32880 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
32881 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
32882 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
32884 * expr.c (emit_move_resolve_push): Treat the input and result
32885 of PUSH_ROUNDING as a poly_int64.
32886 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
32887 (emit_push_insn): Likewise.
32888 * lra-eliminations.c (mark_not_eliminable): Likewise.
32889 * recog.c (push_operand): Likewise.
32890 * reload1.c (elimination_effects): Likewise.
32891 * rtlanal.c (nonzero_bits1): Likewise.
32892 * calls.c (store_one_arg): Likewise. Require the padding to be
32893 known at compile time.
32895 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32896 Alan Hayward <alan.hayward@arm.com>
32897 David Sherwood <david.sherwood@arm.com>
32899 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
32900 Use plus_constant instead of gen_rtx_PLUS.
32902 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32903 Alan Hayward <alan.hayward@arm.com>
32904 David Sherwood <david.sherwood@arm.com>
32906 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
32907 rather than an int.
32909 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32910 Alan Hayward <alan.hayward@arm.com>
32911 David Sherwood <david.sherwood@arm.com>
32913 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
32914 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
32915 via stack temporaries. Treat the mode size as polynomial too.
32917 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32918 Alan Hayward <alan.hayward@arm.com>
32919 David Sherwood <david.sherwood@arm.com>
32921 * expr.c (expand_expr_real_2): When handling conversions involving
32922 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
32923 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
32924 as a poly_uint64 too.
32926 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32927 Alan Hayward <alan.hayward@arm.com>
32928 David Sherwood <david.sherwood@arm.com>
32930 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
32932 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32933 Alan Hayward <alan.hayward@arm.com>
32934 David Sherwood <david.sherwood@arm.com>
32936 * combine.c (can_change_dest_mode): Handle polynomial
32937 REGMODE_NATURAL_SIZE.
32938 * expmed.c (store_bit_field_1): Likewise.
32939 * expr.c (store_constructor): Likewise.
32940 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
32941 and polynomial REGMODE_NATURAL_SIZE.
32942 (gen_lowpart_common): Likewise.
32943 * reginfo.c (record_subregs_of_mode): Likewise.
32944 * rtlanal.c (read_modify_subreg_p): Likewise.
32946 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32947 Alan Hayward <alan.hayward@arm.com>
32948 David Sherwood <david.sherwood@arm.com>
32950 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
32951 numbers of elements.
32953 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32954 Alan Hayward <alan.hayward@arm.com>
32955 David Sherwood <david.sherwood@arm.com>
32957 * match.pd: Cope with polynomial numbers of vector elements.
32959 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32960 Alan Hayward <alan.hayward@arm.com>
32961 David Sherwood <david.sherwood@arm.com>
32963 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
32964 in a POINTER_PLUS_EXPR.
32966 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32967 Alan Hayward <alan.hayward@arm.com>
32968 David Sherwood <david.sherwood@arm.com>
32970 * omp-simd-clone.c (simd_clone_subparts): New function.
32971 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
32972 (ipa_simd_modify_function_body): Likewise.
32974 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32975 Alan Hayward <alan.hayward@arm.com>
32976 David Sherwood <david.sherwood@arm.com>
32978 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
32979 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
32980 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
32981 (expand_vector_condition, vector_element): Likewise.
32982 (subparts_gt): New function.
32983 (get_compute_type): Use subparts_gt.
32984 (count_type_subparts): Delete.
32985 (expand_vector_operations_1): Use subparts_gt instead of
32986 count_type_subparts.
32988 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32989 Alan Hayward <alan.hayward@arm.com>
32990 David Sherwood <david.sherwood@arm.com>
32992 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
32993 (vect_compile_time_alias): ...this new function. Do the calculation
32994 on poly_ints rather than trees.
32995 (vect_prune_runtime_alias_test_list): Update call accordingly.
32997 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
32998 Alan Hayward <alan.hayward@arm.com>
32999 David Sherwood <david.sherwood@arm.com>
33001 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
33003 (vect_schedule_slp_instance): Likewise.
33005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33006 Alan Hayward <alan.hayward@arm.com>
33007 David Sherwood <david.sherwood@arm.com>
33009 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
33010 constant and extern definitions for variable-length vectors.
33011 (vect_get_constant_vectors): Note that the number of units
33012 is known to be constant.
33014 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33015 Alan Hayward <alan.hayward@arm.com>
33016 David Sherwood <david.sherwood@arm.com>
33018 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
33019 of units as polynomial. Choose between WIDE and NARROW based
33022 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33023 Alan Hayward <alan.hayward@arm.com>
33024 David Sherwood <david.sherwood@arm.com>
33026 * tree-vect-stmts.c (simd_clone_subparts): New function.
33027 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
33029 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33030 Alan Hayward <alan.hayward@arm.com>
33031 David Sherwood <david.sherwood@arm.com>
33033 * tree-vect-stmts.c (vectorizable_call): Treat the number of
33034 vectors as polynomial. Use build_index_vector for
33035 IFN_GOMP_SIMD_LANE.
33037 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33038 Alan Hayward <alan.hayward@arm.com>
33039 David Sherwood <david.sherwood@arm.com>
33041 * tree-vect-stmts.c (get_load_store_type): Treat the number of
33042 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
33043 for variable-length vectors.
33044 (vectorizable_mask_load_store): Treat the number of units as
33045 polynomial, asserting that it is constant if the condition has
33046 already been enforced.
33047 (vectorizable_store, vectorizable_load): Likewise.
33049 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33050 Alan Hayward <alan.hayward@arm.com>
33051 David Sherwood <david.sherwood@arm.com>
33053 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
33054 of units as polynomial. Punt if we can't tell at compile time
33055 which vector contains the final result.
33057 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33058 Alan Hayward <alan.hayward@arm.com>
33059 David Sherwood <david.sherwood@arm.com>
33061 * tree-vect-loop.c (vectorizable_induction): Treat the number
33062 of units as polynomial. Punt on SLP inductions. Use an integer
33063 VEC_SERIES_EXPR for variable-length integer reductions. Use a
33064 cast of such a series for variable-length floating-point
33067 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33068 Alan Hayward <alan.hayward@arm.com>
33069 David Sherwood <david.sherwood@arm.com>
33071 * tree.h (build_index_vector): Declare.
33072 * tree.c (build_index_vector): New function.
33073 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
33074 of units as polynomial, forcibly converting it to a constant if
33075 vectorizable_reduction has already enforced the condition.
33076 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
33077 to create a {1,2,3,...} vector.
33078 (vectorizable_reduction): Treat the number of units as polynomial.
33079 Choose vectype_in based on the largest scalar element size rather
33080 than the smallest number of units. Enforce the restrictions
33083 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33084 Alan Hayward <alan.hayward@arm.com>
33085 David Sherwood <david.sherwood@arm.com>
33087 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
33088 number of units as polynomial.
33090 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33091 Alan Hayward <alan.hayward@arm.com>
33092 David Sherwood <david.sherwood@arm.com>
33094 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
33095 * target.def (autovectorize_vector_sizes): Return the vector sizes
33096 by pointer, using vector_sizes rather than a bitmask.
33097 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
33098 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
33099 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
33101 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
33102 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
33103 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
33104 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
33105 * omp-general.c (omp_max_vf): Likewise.
33106 * omp-low.c (omp_clause_aligned_alignment): Likewise.
33107 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
33108 * tree-vect-loop.c (vect_analyze_loop): Likewise.
33109 * tree-vect-slp.c (vect_slp_bb): Likewise.
33110 * doc/tm.texi: Regenerate.
33111 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
33113 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
33114 the vector size as a poly_uint64 rather than an unsigned int.
33115 (current_vector_size): Change from an unsigned int to a poly_uint64.
33116 (get_vectype_for_scalar_type): Update accordingly.
33117 * tree.h (build_truth_vector_type): Take the size and number of
33118 units as a poly_uint64 rather than an unsigned int.
33119 (build_vector_type): Add a temporary overload that takes
33120 the number of units as a poly_uint64 rather than an unsigned int.
33121 * tree.c (make_vector_type): Likewise.
33122 (build_truth_vector_type): Take the number of units as a poly_uint64
33123 rather than an unsigned int.
33125 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33126 Alan Hayward <alan.hayward@arm.com>
33127 David Sherwood <david.sherwood@arm.com>
33129 * target.def (get_mask_mode): Take the number of units and length
33130 as poly_uint64s rather than unsigned ints.
33131 * targhooks.h (default_get_mask_mode): Update accordingly.
33132 * targhooks.c (default_get_mask_mode): Likewise.
33133 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
33134 * doc/tm.texi: Regenerate.
33136 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33137 Alan Hayward <alan.hayward@arm.com>
33138 David Sherwood <david.sherwood@arm.com>
33140 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
33141 * omp-general.c (omp_max_vf): Likewise.
33142 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
33143 (expand_omp_simd): Handle polynomial safelen.
33144 * omp-low.c (omplow_simd_context): Add a default constructor.
33145 (omplow_simd_context::max_vf): Change from int to poly_uint64.
33146 (lower_rec_simd_input_clauses): Update accordingly.
33147 (lower_rec_input_clauses): Likewise.
33149 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33150 Alan Hayward <alan.hayward@arm.com>
33151 David Sherwood <david.sherwood@arm.com>
33153 * tree-vectorizer.h (vect_nunits_for_cost): New function.
33154 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
33155 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
33156 (vect_analyze_slp_cost): Likewise.
33157 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
33158 (vect_model_load_cost): Likewise.
33160 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33161 Alan Hayward <alan.hayward@arm.com>
33162 David Sherwood <david.sherwood@arm.com>
33164 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
33165 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
33166 from an unsigned int * to a poly_uint64_pod *.
33167 (calculate_unrolling_factor): New function.
33168 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
33170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33171 Alan Hayward <alan.hayward@arm.com>
33172 David Sherwood <david.sherwood@arm.com>
33174 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
33175 from an unsigned int to a poly_uint64.
33176 (_loop_vec_info::slp_unrolling_factor): Likewise.
33177 (_loop_vec_info::vectorization_factor): Change from an int
33179 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
33180 (vect_get_num_vectors): New function.
33181 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
33182 (vect_get_num_copies): Use vect_get_num_vectors.
33183 (vect_analyze_data_ref_dependences): Change max_vf from an int *
33184 to an unsigned int *.
33185 (vect_analyze_data_refs): Change min_vf from an int * to a
33187 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33188 than an unsigned HOST_WIDE_INT.
33189 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
33190 (vect_analyze_data_ref_dependence): Change max_vf from an int *
33191 to an unsigned int *.
33192 (vect_analyze_data_ref_dependences): Likewise.
33193 (vect_compute_data_ref_alignment): Handle polynomial vf.
33194 (vect_enhance_data_refs_alignment): Likewise.
33195 (vect_prune_runtime_alias_test_list): Likewise.
33196 (vect_shift_permute_load_chain): Likewise.
33197 (vect_supportable_dr_alignment): Likewise.
33198 (dependence_distance_ge_vf): Take the vectorization factor as a
33199 poly_uint64 rather than an unsigned HOST_WIDE_INT.
33200 (vect_analyze_data_refs): Change min_vf from an int * to a
33202 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
33203 vfm1 as a poly_uint64 rather than an int. Make the same change
33204 for the returned bound_scalar.
33205 (vect_gen_vector_loop_niters): Handle polynomial vf.
33206 (vect_do_peeling): Likewise. Update call to
33207 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
33208 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
33210 * tree-vect-loop.c (vect_determine_vectorization_factor)
33211 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
33212 (vect_get_known_peeling_cost): Likewise.
33213 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
33214 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
33215 (vect_transform_loop): Likewise. Use the lowest possible VF when
33216 updating the upper bounds of the loop.
33217 (vect_min_worthwhile_factor): Make static. Return an unsigned int
33218 rather than an int.
33219 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
33220 polynomial unroll factors.
33221 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
33222 (vect_make_slp_decision): Likewise.
33223 (vect_supported_load_permutation_p): Likewise, and polynomial
33225 (vect_analyze_slp_cost): Handle polynomial vf.
33226 (vect_slp_analyze_node_operations): Likewise.
33227 (vect_slp_analyze_bb_1): Likewise.
33228 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
33229 than an unsigned HOST_WIDE_INT.
33230 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
33231 (vectorizable_load): Handle polynomial vf.
33232 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
33234 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
33236 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33237 Alan Hayward <alan.hayward@arm.com>
33238 David Sherwood <david.sherwood@arm.com>
33240 * match.pd: Handle bit operations involving three constants
33241 and try to fold one pair.
33243 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
33245 * tree-vect-loop-manip.c: Include gimple-fold.h.
33246 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
33247 niters_maybe_zero parameters. Handle other cases besides a step of 1.
33248 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
33249 Add a path that uses a step of VF instead of 1, but disable it
33251 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
33252 and niters_no_overflow parameters. Update calls to
33253 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
33254 Create a new SSA name if the latter choses to use a ste other
33255 than zero, and return it via niters_vector_mult_vf_var.
33256 * tree-vect-loop.c (vect_transform_loop): Update calls to
33257 vect_do_peeling, vect_gen_vector_loop_niters and
33258 slpeel_make_loop_iterate_ntimes.
33259 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
33260 (vect_gen_vector_loop_niters): Update declarations after above changes.
33262 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
33264 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
33265 128-bit round to integer instructions.
33266 (ceil<mode>2): Likewise.
33267 (btrunc<mode>2): Likewise.
33268 (round<mode>2): Likewise.
33270 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33272 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
33273 unaligned VSX load/store on P8/P9.
33274 (expand_block_clear): Allow the use of unaligned VSX
33275 load/store on P8/P9.
33277 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
33279 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
33281 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
33282 swap associated with both a load and a store.
33284 2018-01-02 Andrew Waterman <andrew@sifive.com>
33286 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
33287 * config/riscv/riscv.md (clear_cache): Use it.
33289 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
33291 * web.c: Remove out-of-date comment.
33293 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33295 * expr.c (fixup_args_size_notes): Check that any existing
33296 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
33297 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
33298 (emit_single_push_insn): ...here.
33300 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33302 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
33303 (const_vector_encoded_nelts): New function.
33304 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
33305 (const_vector_int_elt, const_vector_elt): Declare.
33306 * emit-rtl.c (const_vector_int_elt_1): New function.
33307 (const_vector_elt): Likewise.
33308 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
33309 of CONST_VECTOR_ELT.
33311 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33313 * expr.c: Include rtx-vector-builder.h.
33314 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
33315 directly on the tree encoding.
33316 (const_vector_from_tree): Likewise.
33317 * optabs.c: Include rtx-vector-builder.h.
33318 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
33319 sequence of "u" values.
33320 * vec-perm-indices.c: Include rtx-vector-builder.h.
33321 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
33322 directly on the vec_perm_indices encoding.
33324 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33326 * doc/rtl.texi (const_vector): Describe new encoding scheme.
33327 * Makefile.in (OBJS): Add rtx-vector-builder.o.
33328 * rtx-vector-builder.h: New file.
33329 * rtx-vector-builder.c: Likewise.
33330 * rtl.h (rtx_def::u2): Add a const_vector field.
33331 (CONST_VECTOR_NPATTERNS): New macro.
33332 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
33333 (CONST_VECTOR_DUPLICATE_P): Likewise.
33334 (CONST_VECTOR_STEPPED_P): Likewise.
33335 (CONST_VECTOR_ENCODED_ELT): Likewise.
33336 (const_vec_duplicate_p): Check for a duplicated vector encoding.
33337 (unwrap_const_vec_duplicate): Likewise.
33338 (const_vec_series_p): Check for a non-duplicated vector encoding.
33339 Say that the function only returns true for integer vectors.
33340 * emit-rtl.c: Include rtx-vector-builder.h.
33341 (gen_const_vec_duplicate_1): Delete.
33342 (gen_const_vector): Call gen_const_vec_duplicate instead of
33343 gen_const_vec_duplicate_1.
33344 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
33345 (gen_const_vec_duplicate): Use rtx_vector_builder.
33346 (gen_const_vec_series): Likewise.
33347 (gen_rtx_CONST_VECTOR): Likewise.
33348 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
33349 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33350 Build a new vector rather than modifying a CONST_VECTOR in-place.
33351 (handle_special_swappables): Update call accordingly.
33352 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
33353 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33354 Build a new vector rather than modifying a CONST_VECTOR in-place.
33355 (handle_special_swappables): Update call accordingly.
33357 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33359 * simplify-rtx.c (simplify_const_binary_operation): Use
33360 CONST_VECTOR_ELT instead of XVECEXP.
33362 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33364 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
33365 the selector elements to be different from the data elements
33366 if the selector is a VECTOR_CST.
33367 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
33368 ssizetype for the selector.
33370 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33372 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
33373 before testing each element individually.
33374 * tree-vect-generic.c (lower_vec_perm): Likewise.
33376 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33378 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
33379 * selftest-run-tests.c (selftest::run_tests): Call it.
33380 * vector-builder.h (vector_builder::operator ==): New function.
33381 (vector_builder::operator !=): Likewise.
33382 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
33383 (vec_perm_indices::all_from_input_p): New function.
33384 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33385 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
33386 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
33387 instead of reading the VECTOR_CST directly. Detect whether both
33388 vector inputs are the same before constructing the vec_perm_indices,
33389 and update the number of inputs argument accordingly. Use the
33390 utility functions added above. Only construct sel2 if we need to.
33392 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33394 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
33395 the broadcast of the low byte.
33396 (expand_mult_highpart): Use an explicit encoding for the permutes.
33397 * optabs-query.c (can_mult_highpart_p): Likewise.
33398 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
33399 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33400 (vectorizable_bswap): Likewise.
33401 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
33402 explicit encoding for the power-of-2 permutes.
33403 (vect_permute_store_chain): Likewise.
33404 (vect_grouped_load_supported): Likewise.
33405 (vect_permute_load_chain): Likewise.
33407 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33409 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
33410 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
33411 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
33412 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33413 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
33414 (vect_gen_perm_mask_any): Likewise.
33416 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33418 * int-vector-builder.h: New file.
33419 * vec-perm-indices.h: Include int-vector-builder.h.
33420 (vec_perm_indices): Redefine as an int_vector_builder.
33421 (auto_vec_perm_indices): Delete.
33422 (vec_perm_builder): Redefine as a stand-alone class.
33423 (vec_perm_indices::vec_perm_indices): New function.
33424 (vec_perm_indices::clamp): Likewise.
33425 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
33426 (vec_perm_indices::new_vector): New function.
33427 (vec_perm_indices::new_expanded_vector): Update for new
33428 vec_perm_indices class.
33429 (vec_perm_indices::rotate_inputs): New function.
33430 (vec_perm_indices::all_in_range_p): Operate directly on the
33431 encoded form, without computing elided elements.
33432 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
33433 encoding. Update for new vec_perm_indices class.
33434 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
33435 the given vec_perm_builder.
33436 (expand_vec_perm_var): Update vec_perm_builder constructor.
33437 (expand_mult_highpart): Use vec_perm_builder instead of
33438 auto_vec_perm_indices.
33439 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
33440 vec_perm_indices instead of auto_vec_perm_indices. Use a single
33441 or double series encoding as appropriate.
33442 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
33443 vec_perm_indices instead of auto_vec_perm_indices.
33444 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33445 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33446 (vect_permute_store_chain): Likewise.
33447 (vect_grouped_load_supported): Likewise.
33448 (vect_permute_load_chain): Likewise.
33449 (vect_shift_permute_load_chain): Likewise.
33450 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33451 (vect_transform_slp_perm_load): Likewise.
33452 (vect_schedule_slp_instance): Likewise.
33453 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33454 (vectorizable_mask_load_store): Likewise.
33455 (vectorizable_bswap): Likewise.
33456 (vectorizable_store): Likewise.
33457 (vectorizable_load): Likewise.
33458 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
33459 vec_perm_indices instead of auto_vec_perm_indices. Use
33460 tree_to_vec_perm_builder to read the vector from a tree.
33461 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
33462 vec_perm_builder instead of a vec_perm_indices.
33463 (have_whole_vector_shift): Use vec_perm_builder and
33464 vec_perm_indices instead of auto_vec_perm_indices. Leave the
33465 truncation to calc_vec_perm_mask_for_shift.
33466 (vect_create_epilog_for_reduction): Likewise.
33467 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
33468 from auto_vec_perm_indices to vec_perm_indices.
33469 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33470 instead of changing individual elements.
33471 (aarch64_vectorize_vec_perm_const): Use new_vector to install
33472 the vector in d.perm.
33473 * config/arm/arm.c (expand_vec_perm_d::perm): Change
33474 from auto_vec_perm_indices to vec_perm_indices.
33475 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33476 instead of changing individual elements.
33477 (arm_vectorize_vec_perm_const): Use new_vector to install
33478 the vector in d.perm.
33479 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
33480 Update vec_perm_builder constructor.
33481 (rs6000_expand_interleave): Likewise.
33482 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
33483 (rs6000_expand_interleave): Likewise.
33485 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33487 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
33488 to qimode could truncate the indices.
33489 * optabs.c (expand_vec_perm_var): Likewise.
33491 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33493 * Makefile.in (OBJS): Add vec-perm-indices.o.
33494 * vec-perm-indices.h: New file.
33495 * vec-perm-indices.c: Likewise.
33496 * target.h (vec_perm_indices): Replace with a forward class
33498 (auto_vec_perm_indices): Move to vec-perm-indices.h.
33499 * optabs.h: Include vec-perm-indices.h.
33500 (expand_vec_perm): Delete.
33501 (selector_fits_mode_p, expand_vec_perm_var): Declare.
33502 (expand_vec_perm_const): Declare.
33503 * target.def (vec_perm_const_ok): Replace with...
33504 (vec_perm_const): ...this new hook.
33505 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
33506 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
33507 * doc/tm.texi: Regenerate.
33508 * optabs.def (vec_perm_const): Delete.
33509 * doc/md.texi (vec_perm_const): Likewise.
33510 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
33511 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
33512 expand_vec_perm for constant permutation vectors. Assert that
33513 the mode of variable permutation vectors is the integer equivalent
33514 of the mode that is being permuted.
33515 * optabs-query.h (selector_fits_mode_p): Declare.
33516 * optabs-query.c: Include vec-perm-indices.h.
33517 (selector_fits_mode_p): New function.
33518 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
33519 is defined, instead of checking whether the vec_perm_const_optab
33520 exists. Use targetm.vectorize.vec_perm_const instead of
33521 targetm.vectorize.vec_perm_const_ok. Check whether the indices
33522 fit in the vector mode before using a variable permute.
33523 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
33524 vec_perm_indices instead of an rtx.
33525 (expand_vec_perm): Replace with...
33526 (expand_vec_perm_const): ...this new function. Take the selector
33527 as a vec_perm_indices rather than an rtx. Also take the mode of
33528 the selector. Update call to shift_amt_for_vec_perm_mask.
33529 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
33530 Use vec_perm_indices::new_expanded_vector to expand the original
33531 selector into bytes. Check whether the indices fit in the vector
33532 mode before using a variable permute.
33533 (expand_vec_perm_var): Make global.
33534 (expand_mult_highpart): Use expand_vec_perm_const.
33535 * fold-const.c: Includes vec-perm-indices.h.
33536 * tree-ssa-forwprop.c: Likewise.
33537 * tree-vect-data-refs.c: Likewise.
33538 * tree-vect-generic.c: Likewise.
33539 * tree-vect-loop.c: Likewise.
33540 * tree-vect-slp.c: Likewise.
33541 * tree-vect-stmts.c: Likewise.
33542 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
33544 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
33545 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
33546 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
33547 (aarch64_vectorize_vec_perm_const): ...this new function.
33548 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33549 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33550 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
33551 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
33552 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33553 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33554 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
33556 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
33557 check for NEON modes.
33558 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
33559 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
33560 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
33561 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
33563 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
33564 the old VEC_PERM_CONST conditions.
33565 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
33566 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
33567 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
33568 (ia64_vectorize_vec_perm_const_ok): Merge into...
33569 (ia64_vectorize_vec_perm_const): ...this new function.
33570 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
33571 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
33572 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
33573 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
33574 * config/mips/mips.c (mips_expand_vec_perm_const)
33575 (mips_vectorize_vec_perm_const_ok): Merge into...
33576 (mips_vectorize_vec_perm_const): ...this new function.
33577 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
33578 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
33579 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
33580 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
33581 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
33582 (rs6000_expand_vec_perm_const): Delete.
33583 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
33585 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33586 (altivec_expand_vec_perm_const_le): Take each operand individually.
33587 Operate on constant selectors rather than rtxes.
33588 (altivec_expand_vec_perm_const): Likewise. Update call to
33589 altivec_expand_vec_perm_const_le.
33590 (rs6000_expand_vec_perm_const): Delete.
33591 (rs6000_vectorize_vec_perm_const_ok): Delete.
33592 (rs6000_vectorize_vec_perm_const): New function.
33593 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33594 an element count and rtx array.
33595 (rs6000_expand_extract_even): Update call accordingly.
33596 (rs6000_expand_interleave): Likewise.
33597 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
33598 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
33599 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
33600 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
33601 (rs6000_expand_vec_perm_const): Delete.
33602 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33603 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33604 (altivec_expand_vec_perm_const_le): Take each operand individually.
33605 Operate on constant selectors rather than rtxes.
33606 (altivec_expand_vec_perm_const): Likewise. Update call to
33607 altivec_expand_vec_perm_const_le.
33608 (rs6000_expand_vec_perm_const): Delete.
33609 (rs6000_vectorize_vec_perm_const_ok): Delete.
33610 (rs6000_vectorize_vec_perm_const): New function. Remove stray
33611 reference to the SPE evmerge intructions.
33612 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33613 an element count and rtx array.
33614 (rs6000_expand_extract_even): Update call accordingly.
33615 (rs6000_expand_interleave): Likewise.
33616 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
33617 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
33619 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33621 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33623 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
33624 vector mode and that that mode matches the mode of the data
33626 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
33627 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
33628 directly using expand_vec_perm_1 when forcing selectors into
33630 (expand_vec_perm_var): New function, split out from expand_vec_perm.
33632 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33634 * optabs-query.h (can_vec_perm_p): Delete.
33635 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
33636 * optabs-query.c (can_vec_perm_p): Split into...
33637 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
33638 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
33639 particular selector is valid.
33640 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33641 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33642 (vect_grouped_load_supported): Likewise.
33643 (vect_shift_permute_load_chain): Likewise.
33644 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33645 (vect_transform_slp_perm_load): Likewise.
33646 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33647 (vectorizable_bswap): Likewise.
33648 (vect_gen_perm_mask_checked): Likewise.
33649 * fold-const.c (fold_ternary_loc): Likewise. Don't take
33650 implementations of variable permutation vectors into account
33651 when deciding which selector to use.
33652 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
33653 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
33654 with a false third argument.
33655 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
33656 to test whether the constant selector is valid and can_vec_perm_var_p
33657 to test whether a variable selector is valid.
33659 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33661 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
33662 * optabs-query.c (can_vec_perm_p): Likewise.
33663 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
33664 instead of vec_perm_indices.
33665 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
33666 (vect_gen_perm_mask_checked): Likewise,
33667 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
33668 (vect_gen_perm_mask_checked): Likewise,
33670 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
33672 * optabs-query.h (qimode_for_vec_perm): Declare.
33673 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
33674 (qimode_for_vec_perm): ...this new function.
33675 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
33677 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
33679 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
33680 does not have a conditional at the top.
33682 2018-01-02 Richard Biener <rguenther@suse.de>
33684 * ipa-inline.c (big_speedup_p): Fix expression.
33686 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
33689 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
33692 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
33696 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
33697 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
33698 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
33699 cond_taken_branch_cost 3->4.
33701 2018-01-01 Jakub Jelinek <jakub@redhat.com>
33703 PR tree-optimization/83581
33704 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
33705 TODO_cleanup_cfg if any changes have been made.
33707 PR middle-end/83608
33708 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
33709 convert_modes if target mode has the right side, but different mode
33712 PR middle-end/83609
33713 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
33714 last argument when extracting from CONCAT. If either from_real or
33715 from_imag is NULL, use expansion through memory. If result is not
33716 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
33717 the parts directly to inner mode, if even that fails, use expansion
33720 PR middle-end/83623
33721 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
33722 check for bswap in mode rather than HImode and use that in expand_unop
33725 Copyright (C) 2018 Free Software Foundation, Inc.
33727 Copying and distribution of this file, with or without modification,
33728 are permitted in any medium without royalty provided the copyright
33729 notice and this notice are preserved.