Richard Biener [Wed, 4 Sep 2019 07:27:42 +0000 (07:27 +0000)]
re PR middle-end/36262 (Extreme memory usage of VRP compared to older versions)
2019-09-04 Richard Biener <rguenther@suse.de>
PR rtl-optimization/36262
* postreload-gcse.c: Include intl.h and gcse.h.
(insert_expr_in_table): Insert at the head of cur_expr->avail_occr
to avoid linear list walk.
(record_last_mem_set_info): Gate off if not computing transparentness.
(get_bb_avail_insn): If transparentness isn't computed give up
early.
(gcse_after_reload_main): Skip compute_transp and extended PRE
if gcse_or_cprop_is_too_expensive says so.
compiler: only import variable into . if same package
If we dot-import a package, we should only add an imported variable to
the package bindings if the variable is in the package being imported.
A test case for this is the 1.13 os package, in which ErrClosed and
friends are defined both locally and in the imported internal/oserror package.
MSP430: Use default_elf_select_section to determine sections for data
2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_init_sections): Remove handling of the
noinit section.
(msp430_select_section): Handle decls with the "noinit" attribute with
default_elf_select_section.
Handle SECCAT_RODATA_MERGE_* section types with
default_elf_select_section.
Add comments about handling of unsupported section types.
(msp430_section_type_flags): Remove handling of the noinit section.
MSP430: Setup exclusion tables for function and data attributes
gcc/ChangeLog:
2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* config/msp430/msp430.c (msp430_attr): Remove warnings about
conflicting msp430-specific attributes.
(msp430_section_attr): Likewise.
Add warnings about conflicts with generic "noinit" and "section"
attributes.
Fix grammar in -mlarge error message.
(msp430_data_attr): Rename to msp430_persist_attr.
Add warnings about conflicts with generic "noinit" and "section"
attributes.
Add warning for when variable is not initialized.
Chain conditionals which prevent the attribute being added.
(ATTR_EXCL): New helper.
(attr_reent_exclusions): New exclusion table.
(attr_naked_exclusions): Likewise.
(attr_crit_exclusions): Likewise.
(attr_lower_exclusions): Likewise.
(attr_upper_exclusions): Likewise.
(attr_either_exclusions): Likewise.
(attr_persist_exclusions): Likewise.
(msp430_attribute_table): Update with exclusion rules.
(msp430_output_aligned_decl_common): Don't output common symbol if decl
has a section.
gcc/testsuite/ChangeLog:
2019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* rust-demangle.c (unescape): Remove.
(parse_lower_hex_nibble): New function.
(parse_legacy_escape): New function.
(is_prefixed_hash): Use parse_lower_hex_nibble.
(looks_like_rust): Use parse_legacy_escape.
(rust_demangle_sym): Use parse_legacy_escape.
* testsuite/rust-demangle-expected: Add 'llv$u6d$' test.
Jakub Jelinek [Tue, 3 Sep 2019 16:46:06 +0000 (18:46 +0200)]
re PR target/91604 (ICE in extract_insn at recog.c:2310 since r272323)
PR target/91604
* config/i386/i386-expand.c (split_double_mode): If there is more than
one MEM operand and they are rtx_equal_p, reuse lo_half/hi_half from
already split matching MEM operand instead of calling adjust_address
again.
libatomic/
PR other/79543
* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libffi/
PR other/79543
* acinclude.m4 (LIBAT_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libgomp/
PR other/79543
* acinclude.m4 (LIBGOMP_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libitm/
PR other/79543
* acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
libstdc++-v3/
PR other/79543
* acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Fix GNU ld --version
scanning to conform to the GNU Coding Standards.
* configure: Regenerate.
S/390: Fix failing RTL check in s390_canonicalize_comparison
The new sigfpe-eh.c fails with
internal compiler error: RTL check: expected elt 0 type 'e' or 'u', have 'w' (rtx const_int)
This is most likely due to a typo: XEXP (*op1, 0) was used, when
XEXP (*op0, 1) was intended. This did not cause any user-visible
problems, because reversed_comparison_code_parts ignores the
respective argument, and the release compiler is built without RTL
checks.
gcc/ChangeLog:
2019-09-03 Ilya Leoshkevich <iii@linux.ibm.com>
* config/s390/s390.c (s390_canonicalize_comparison): Use XEXP
(*op0, 1) instead of XEXP (*op1, 0).
This patch implements the __jcvt ACLE intrinsic [1] that maps down to the FJCVTZS [2] instruction from Armv8.3-a.
No fancy mode iterators or nothing. Just a single builtin, UNSPEC and define_insn and the associate plumbing.
This patch also defines __ARM_FEATURE_JCVT to indicate when the intrinsic is available.
[AArch64] Implement ACLE intrinsics for FRINT[32,64][Z,X]
This patch implements the ACLE intrinsics to access the FRINT[32,64][Z,X] scalar[1] and vector[2][3] instructions
from Armv8.5-a. These are enabled when the __ARM_FEATURE_FRINT macro is defined.
They're added in a fairly standard way through builtins and unspecs at the RTL level.
Dennis Zhang [Tue, 3 Sep 2019 08:27:58 +0000 (08:27 +0000)]
[AArch64] Add support for missing CPUs
This patch adds '-mcpu' options for following CPUs:
Cortex-A77, Cortex-A76AE, Cortex-A65, Cortex-A65AE, and Cortex-A34.
Related specifications are as following:
https://developer.arm.com/ip-products/processors/cortex-a
Bootstraped/regtested for aarch64-none-linux-gnu.
2019-09-03 Dennis Zhang <dennis.zhang@arm.com>
* config/aarch64/aarch64-cores.def (AARCH64_CORE): New entries
for Cortex-A77, Cortex-A76AE, Cortex-A65, Cortex-A65AE, and
Cortex-A34.
* config/aarch64/aarch64-tune.md: Regenerated.
* doc/invoke.texi: Document the new processors.
[AArch64] Add Linux hwcap strings for some extensions
This patch adds feature strings for some of the extensions. This string is what is read from /proc/cpuinfo on Linux systems
and used during -march=native detection.
The strings are taken from the kernel source tree at:
https://github.com/torvalds/linux/blob/master/arch/arm64/kernel/cpuinfo.c#L45
Jakub Jelinek [Tue, 3 Sep 2019 07:50:46 +0000 (09:50 +0200)]
re PR tree-optimization/91597 (GCC miscompiles a branch depending on a pointer tag)
PR tree-optimization/91597
* tree-vrp.c (extract_range_from_binary_expr): Remove unsafe
BIT_AND_EXPR optimization for pointers, even if both operand
ranges don't include NULL, the result can be NULL.
* gcc.c-torture/execute/pr91597.c: New test.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r275330
[x86 testsuite] preserve full register across main
This test uses a call-saved register as a global variable. It
attempts to preserve its value across main, but only the lower int
part is preserved, which is not good enough for x86_64, when the
runtime that calls main() happens to hold something in the chosen
register that is not a zero-extension from the 32-bit value, and
rightfully expects the full register to remain unchanged when main()
returns.
for gcc/testsuite/ChangeLog
* gcc.target/i386/20020616-1.c: Preserve full register across
main.
contrib/vimrc: override formatting options for more files
* vim-gcc-dev/syntax/gcc-match.vim: Do not override 'tabstop' here.
* vimrc: Set preferred values for 'tabstop', 'softtabstop',
'shiftwidth', 'noexpandtab', 'textwidth', 'formatoptions' for all
files, not just C-like files.
Eric Botcazou [Mon, 2 Sep 2019 08:14:47 +0000 (08:14 +0000)]
gimple-ssa-strength-reduction.c (valid_mem_ref_cand_p): New function.
* gimple-ssa-strength-reduction.c (valid_mem_ref_cand_p): New function.
(replace_ref): Do not replace a chain of only two candidates which are
valid memory references.
Martin Liska [Mon, 2 Sep 2019 07:09:39 +0000 (09:09 +0200)]
Fix thinko in early bail out in tree-switch-conversion.
2019-09-02 Martin Liska <mliska@suse.cz>
* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
Bail out when we'll end up with the same number of clusters as
at the beginning.
(bit_test_cluster::find_bit_tests): Likewise for bit tests.
(jump_table_cluster::can_be_handled): Remove the guard
as it's already handled in ::is_enabled. Allocate output
after early bail out.
Martin Liska [Mon, 2 Sep 2019 07:07:11 +0000 (09:07 +0200)]
Use cxx_printable_name for __PRETTY_FUNCTION__ in cp_fname_init.
2019-09-02 Martin Liska <mliska@suse.cz>
PR c++/91155
* c-common.c (fname_as_string): Use cxx_printable_name for
__PRETTY_FUNCTION__ same as was used before r265711.
2019-09-02 Martin Liska <mliska@suse.cz>
PR c++/91155
* g++.dg/torture/pr91155.C: New test.
Martin Liska [Mon, 2 Sep 2019 07:06:54 +0000 (09:06 +0200)]
Consider also negative edges in cycle detection.
2019-09-02 Martin Liska <mliska@suse.cz>
PR gcov-profile/91601
* gcov.c (path_contains_zero_cycle_arc): Rename to ...
(path_contains_zero_or_negative_cycle_arc): ... this and handle
also negative edges.
(circuit): Handle also negative edges as they can happen
in some situations.
Eric Botcazou [Sun, 1 Sep 2019 12:55:22 +0000 (12:55 +0000)]
re PR target/91472 (gmp testsuite segfaults with gcc-8 and gcc-9, works fine with gcc-7)
PR target/91472
* config/sparc/sparc.c (sparc_cannot_force_const_mem): Return true
during LRA/reload in PIC mode if the PIC register hasn't been used yet.
(sparc_pic_register_p): Test reload_in_progress for consistency's sake.
Paul Thomas [Sun, 1 Sep 2019 12:53:02 +0000 (12:53 +0000)]
array.c (spec_dimen_size): Check for the presence of expressions for the bounds.
2019-09-01 Paul Thomas <pault@gcc.gnu.org>
* array.c (spec_dimen_size): Check for the presence of
expressions for the bounds.
* decl.c (gfc_match_end): Add case COMP_SELECT_RANK.
* dump-parse-tree.c(show_symbol): Show the arrayspec of class
entities.
(show_code_node): Show the code for SELECT_RANK.
* expr.c (gfc_check_vardef_context): Omit the context of
variable definition for select rank associate names since the
ASSUMED RANK throws.
* gfortran.h : Add ST_SELECT_RANK and ST_RANK to enum
gfc_statement. Add select_rank_temporary to symbol attribute
structure. Add EXEC_SELECT_RANK to enum gfc_exec_op.
* match.c (match_exit_cycle): Add COMP_SELECT_RANK.
(copy_ts_from_selector_to_associate): Add as special case for
assumed rank class variables.
(select_intrinsic_set_tmp): Clean up the code by using symbols
for references to the temporary and the selector.
(select_type_set_tmp): Ditto.
(select_rank_set_tmp): New function.
(gfc_match_select_rank): New function.
(gfc_match_rank_is): New function.
* match.h : Add prototypes for gfc_match_select_rank and
gfc_match_rank_is.
* parse.c (decode_statement): Attempt to match select_rank and
rank statements.
(next_statement, gfc_ascii_statement): Add ST_SELECT_RANK.
(parse_select_rank_block): New function.
(parse_executable): Parse select rank block for ST_SELECT_RANK.
* parse.h : Add COMP_SELECT_RANK to enum gfc_compile_state.
* resolve.c (resolve_variable): Exclude select_rank_temporaries
from the check on use of ASSUMED RANK.
(gfc_resolve_expr): Make sure that unlimited polymorphic select
rank temporaries expressions are not resolved again after being
successfully resolved.
(resolve_assoc_var): Do not do the rank check for select rank
temporaries.
(resolve_select_rank): New function.
(gfc_resolve_blocks): Deal with case EXEC_SELECT_RANK.
(resolve_symbol): Exclude select rank temporaries for check on
use of ASSUMED RANK.
* st.c (gfc_free_statement): Include EXEC_SELECT_RANK.
* trans-array.c (gfc_conv_array_ref): Select rank temporaries
may have dimen == 0.
(gfc_conv_expr_descriptor): Zero the offset of select rank
temporaries.
* trans-stmt.c (copy_descriptor): New function.
(trans_associate_var): Add code to associate select rank temps.
(gfc_trans_select_rank_cases): New function.
(gfc_trans_select_rank): New function.
* trans-stmt.h : Add prototype for gfc_trans_select_rank.
trans.c (trans_code): Add select rank case.
2019-09-01 Paul Thomas <pault@gcc.gnu.org>
* gfortran.dg/select_rank_1.f90 : New test.
* gfortran.dg/select_rank_2.f90 : New test.
Jakub Jelinek [Sun, 1 Sep 2019 11:57:10 +0000 (13:57 +0200)]
re PR middle-end/91623 (-msse4.1 -O3 segfault in /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/smmintrin.h:270:10)
PR middle-end/91623
* optabs.c (expand_vec_cond_expr): If op0 is a VECTOR_CST and only
EQ_EXPR/NE_EXPR is supported, verify that op0 only contains
zeros or negative elements and use NE_EXPR instead of LT_EXPR against
zero vector.
Stafford Horne [Sat, 31 Aug 2019 06:00:56 +0000 (06:00 +0000)]
or1k: Fix issue with set_got clobbering LR (r9)
When compiling glibc we found that the GOT register was being allocated
r9 when the instruction was still set_got_tmp. That is a problem
because r9 is the Link Register (LR) in OpenRISC which is used/clobbered
in set_got. We cannot use r9 as the GOT register. Also, we cannot
simply say set_got_tmp clobbers r9 as this is the reason for having the
temporary set_got_tmp.
Fix by using a register class constraint that does not allow r9 during
register allocation.
gcc/ChangeLog:
* config/or1k/constraints.md (t): New constraint.
* config/or1k/or1k.h (GOT_REGS): New register class.
* config/or1k/or1k.md (set_got_tmp, set_got): Use t contraint.
Ian Lance Taylor [Sat, 31 Aug 2019 03:07:48 +0000 (03:07 +0000)]
compiler: check for notinheap struct at each struct field
When generating write barriers, we were only checking for a notinheap
struct at the outermost struct. That mishandled the case of setting a
pointer to a notinheap struct as a field of another struct that is not
notinheap. This caused an invalid write barrier error when building
the 1.13 version of the runtime.
Ian Lance Taylor [Sat, 31 Aug 2019 03:01:15 +0000 (03:01 +0000)]
compiler, runtime: support and use single argument go:linkname
The gc compiler has started permitting go:linkname comments with a
single argument to mean that a function should be externally visible
outside the package. Implement this in the Go frontend.
Change the libgo runtime package to use it, rather than repeating the
name just to export a function.
Remove a couple of unnecessary go:linkname comments on declarations.
Ian Lance Taylor [Sat, 31 Aug 2019 02:56:55 +0000 (02:56 +0000)]
compiler: don't report runtime escapes if we've seen errors
If we get errors during compilation, we skip the escape analysis pass.
If we are compiling the runtime package, we report an error if a bound
method expression escapes. The effect is that if we get an error
while compiling the runtime package, we would report confusing and
meaningless errors about bound method expressions escaping.
Ian Lance Taylor [Sat, 31 Aug 2019 02:55:09 +0000 (02:55 +0000)]
runtime: always build panic32.go
Avoids problems with arm64 ILP32 mode. We might want to handle that
mode better in general, but always building panic32.go is simple and
fixes the build.
Jim Wilson [Fri, 30 Aug 2019 23:32:52 +0000 (23:32 +0000)]
RISC-V: Disable -msave-restore for shared libraries.
This was noticed while trying to test -msave-restore support. The
save/restore routines use the alternate return register t0/x5 which is
clobbered by the PLT header, so we can't use them in shared libraries.
This patch disables -msave-restore when -fpic (and -mplt), and emits a
warning if the user explicitly turned on -msave-restore.
gcc/
* config/riscv/riscv.c (riscv_option_override): If -msave-restore
and -fpic and -mplt then disable -msave-restore and warn.
Ian Lance Taylor [Fri, 30 Aug 2019 21:49:49 +0000 (21:49 +0000)]
compile, runtime: permit anonymous and empty fields in C header
Permit putting structs with anonymous and empty fields in the C header
file runtime.inc that is used to build the C runtime code. This is
required for upcoming 1.13 support, as the m struct has picked up an
anonymous field.
Doing this lets the C header contain all the type descriptor structs,
so start using those in the C code. This cuts the number of copies of
type descriptor definitions from 3 to 2.
Martin Sebor [Fri, 30 Aug 2019 17:49:17 +0000 (17:49 +0000)]
PR middle-end/91599 - GCC does not say where warning is happening
gcc/ChangeLog:
PR middle-end/91599
* tree-ssa-strlen.c (handle_store): Use a fallback location if
the statement doesn't have one.
* gimple-pretty-print.c (percent_G_format): Same.
gcc/testsuite/ChangeLog:
PR middle-end/91599
* gcc.dg/Wstringop-overflow-16.c: New test.
Antony Polukhin [Fri, 30 Aug 2019 16:25:24 +0000 (16:25 +0000)]
Optimize std::to_chars
Bunch of micro optimizations for std::to_chars:
* For base == 8 replacing the lookup in __digits table with arithmetic
computations leads to a same CPU cycles for a loop (exchanges two movzx
with 3 bit ops). However this saves 129 bytes of data and totally avoids
a chance of cache misses on __digits.
* For base == 16 replacing the lookup in __digits table with
arithmetic computations leads to a few additional instructions, but
totally avoids a chance of cache misses on __digits (- ~9 cache misses
for worst case) and saves 513 bytes of const data.
* Replacing __first[pos] and __first[pos - 1] with __first[1] and
__first[0] on final iterations saves ~2% of code size.
* Removing trailing '\0' from arrays of digits allows the linker to
merge the symbols (so that "0123456789abcdefghijklmnopqrstuvwxyz" and
"0123456789abcdef" could share the same address). This improves data
locality and reduces binary sizes.
* Using __detail::__to_chars_len_2 instead of a generic
__detail::__to_chars_len makes the operation O(1) instead of O(N). It
also makes the code two times shorter.
In sum: this significantly reduces the size of a binary (for about 4KBs
only for base-8 conversion), deals with latency (CPU cache misses)
without changing the iterations count and without adding costly
instructions into the loops.
2019-08-30 Antony Polukhin <antoshkka@gmail.com>
* include/std/charconv (__detail::__to_chars_8)
__detail::__to_chars_16): Replace array of precomputed digits with
arithmetic operations to avoid CPU cache misses. Remove zero
termination from array of digits to allow symbol merge with generic
implementation of __detail::__to_chars. Replace final offsets with
constants. Use __detail::__to_chars_len_2 instead of a generic
__detail::__to_chars_len.
(__detail::__to_chars): Remove zero termination from array of digits.
(__detail::__to_chars_2): Leading digit is always '1'.
Eric Botcazou [Fri, 30 Aug 2019 15:32:51 +0000 (15:32 +0000)]
decl.c (maybe_saturate_size): New function.
* gcc-interface/decl.c (maybe_saturate_size): New function.
(gnat_to_gnu_entity): Invoke it on the Esize of types before sending
it for back-annotations.
* gcc-interface/trans.c: Fix typo.
Eric Botcazou [Fri, 30 Aug 2019 15:22:34 +0000 (15:22 +0000)]
ada-tree.h (DECL_FORCED_BY_REF_P): New macro.
* gcc-interface/ada-tree.h (DECL_FORCED_BY_REF_P): New macro.
* gcc-interface/decl.c (gnat_to_gnu_param): Set it on parameters
whose mechanism was forced to by-reference.
* gcc-interface/trans.c (Call_to_gnu): Do not issue a warning about a
misaligned actual parameter if it is based on a CONSTRUCTOR. Remove
obsolete warning for users of Starlet. Issue a warning if a temporary
is make around the call for a parameter with DECL_FORCED_BY_REF_P set.
(addressable_p): Return true for REAL_CST and ADDR_EXPR.
* gcc-interface/gigi.h (aggregate_type_contains_array_p): Declare.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: For an
extension, test Has_Record_Rep_Clause instead of Has_Specified_Layout.
(adjust_packed): Return 0 if the type of the field is an aggregate
type that contains (or is) a self-referential array.
(type_has_variable_size): Delete.
* gcc-interface/utils.c (inish_record_type): Constify a variable.
(aggregate_type_contains_array_p): Add parameter SELF_REFERENTIAL.
<RECORD_TYPE>: Pass it in the recursive call.
<ARRAY_TYPE>: If it is true, return true only if the array type is
self-referential.
(create_field_decl): Streamline the setting of the alignment on the
field. Pass false to aggregate_type_contains_array_p.
Jonathan Wakely [Fri, 30 Aug 2019 13:54:49 +0000 (14:54 +0100)]
PR libstdc++/89164 enforce constraints for uninitialized algos
The memmove optimizations for std::uninitialized_copy/fill/_n will
compile even if the type is not copy constructible, because std::copy
doesn't require copy construction to work. But the uninitialized
algorithms do require it.
This adds explicit static assertions to ensure we don't allow ill-formed
initializations.
PR libstdc++/89164
* include/bits/stl_algobase.h (__copy_move): Give descriptive names
to template parameters.
* include/bits/stl_uninitialized.h (uninitialized_copy)
(uninitialized_fill, uninitialized_fill_n): Add static assertions to
diagnose invalid uses.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
Adjust expected error.
* testsuite/20_util/specialized_algorithms/uninitialized_copy/89164.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_copy_n/
89164.cc: New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill/89164.cc:
New test.
* testsuite/20_util/specialized_algorithms/uninitialized_fill_n/
89164.cc: New test.
* testsuite/23_containers/vector/cons/89164.cc: New test.
* testsuite/23_containers/vector/cons/89164_c++17.cc: New test.
Eric Botcazou [Fri, 30 Aug 2019 13:50:34 +0000 (13:50 +0000)]
gigi.h (gigi_checking_assert): New macro.
* gcc-interface/gigi.h (gigi_checking_assert): New macro.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Type>:
Remove redundant test and adjust comments. Minor tweaks.
* gcc-interface/trans.c (Call_to_gnu): Do not generate range checks,
instead assert that the Do_Range_Check flag is not set. Adjust call
to convert_with_check.
(gnat_to_gnu): Likewise.
(assoc_to_constructor): Likewise.
(pos_to_constructor): Likewise. Remove GNAT_COMPONENT_TYPE parameter.
(emit_range_check): Delete.
(convert_with_check): Remove RANGE_P parameter and adjust. Do a single
overflow check for modular types.
* config/arm/arm.md (unaligned_loaddi,
unaligned_storedi): New unspec insn patterns.
* config/arm/neon.md (unaligned_storev8qi): Likewise.
* config/arm/arm.c (gen_cpymem_ldrd_strd): Use unaligned_loaddi
and unaligned_storedi for 4-byte aligned memory.
(arm_block_set_aligned_vect): Use unaligned_storev8qi for
4-byte aligned memory.
Martin Jambor [Fri, 30 Aug 2019 08:08:42 +0000 (10:08 +0200)]
[PR 91579] Avoid creating redundant PHI nodes in tail-call pass
2019-08-30 Martin Jambor <mjambor@suse.cz>
tree-optimization/91579
* tree-tailcall.c (tailr_arg_needs_copy): New variable.
(find_tail_calls): Allocate tailr_arg_needs_copy and set its bits as
appropriate.
(arg_needs_copy_p): Removed.
(eliminate_tail_call): Test tailr_arg_needs_copy instead of calling
arg_needs_copy_p.
(tree_optimize_tail_calls_1): Likewise. Free tailr_arg_needs_copy.
Uros Bizjak [Thu, 29 Aug 2019 18:15:13 +0000 (20:15 +0200)]
i386.c (inline_secondary_memory_needed): Return true for moves between SSE and non-general registers and between mask...
* config/i386/i386.c (inline_secondary_memory_needed): Return true
for moves between SSE and non-general registers and between
mask and non-general registers.
(ix86_register_move_cost): Remove stalled comment.
Nathan Sidwell [Thu, 29 Aug 2019 14:06:32 +0000 (14:06 +0000)]
[preprocessor] Include stacking
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg01971.html
* internal.h (enum include_type): Add IT_MAIN, IT_DIRECTIVE_HWM,
IT_HEADER_HWM.
(_cpp_stack_file): Take include_type, not a bool.
* files.c (_cpp_find_file): Refactor to not hide an if inside a
for conditional.
(should_stack_file): Break apart to ...
(is_known_idempotent_file, has_unique_contents): ... these.
(_cpp_stack_file): Replace IMPORT boolean with include_type enum.
Refactor to use new predicates. Do linemap compensation here ...
(_cpp_stack_include): ... not here.
* init.c (cpp_read_main_file): Pass IT_MAIN to _cpp_stack_file.
Richard Biener [Thu, 29 Aug 2019 10:30:48 +0000 (10:30 +0000)]
re PR bootstrap/91580 (i686-{darwin, linux} bootstrap fails after r274926)
2019-08-29 Richard Biener <rguenther@suse.de>
PR bootstrap/91580
* config/i386/i386-features.c (general_scalar_chain::convert_insn):
Do not emit scalar copies for debug-insns, instead replace
their uses with the reg copy used in the chain or reset them
if there is a reaching definition outside of the chain as well.
Jakub Jelinek [Thu, 29 Aug 2019 09:20:54 +0000 (11:20 +0200)]
re PR tree-optimization/91351 (-fstrict-enums generates incorrect code)
PR tree-optimization/91351
* tree-cfg.c (generate_range_test): Use range_check_type instead of
unsigned_type_for.
* tree-cfgcleanup.c (convert_single_case_switch): Punt if
range_check_type returns NULL.
* tree-switch-conversion.c (switch_conversion::build_one_array):
Use range_check_type instead of unsigned_type_for, don't perform
linear opt if it returns NULL.
(bit_test_cluster::find_bit_tests): Formatting fix.
(bit_test_cluster::emit): Use range_check_type instead of
unsigned_type_for.
(switch_decision_tree::try_switch_expansion): Punt if range_check_type
returns NULL.
Richard Biener [Thu, 29 Aug 2019 08:07:35 +0000 (08:07 +0000)]
re PR tree-optimization/91568 (internal compiler error: in vect_schedule_slp_instance, at tree-vect-slp.c:3922)
2019-08-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/91568
* tree-vectorizer.h (_slp_tree::max_nunits): Add.
(vect_update_max_nunits): Add overload for poly_uint64.
* tree-vect-slp.c (vect_create_new_slp_node): Initialize it.
(vect_build_slp_tree): Record max_nunits into the subtree
and merge it upwards.
(vect_print_slp_tree): Print max_nunits.