- 16 Jul, 2018 16 commits
-
-
This patch prevents the compiler from entering infinite recursion when processing an illegal deferred constant. ------------ -- Source -- ------------ -- types.ads package Types is type Enum is (One, Two); end Types; -- types2.ads with Types; package Types2 is type Enum is private; One : constant Enum; Two : constant Enum; private type Enum is new Types.Enum; One : constant Enum := One; Two : constant Enum := Two; end Types2; ---------------------------- -- Compilation and output -- ---------------------------- $ gcc -c types2.ads types2.ads:10:04: full constant declaration appears too late types2.ads:11:04: full constant declaration appears too late 2018-07-16 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * sem_eval.adb (Compile_Time_Known_Value): Add a guard which prevents the compiler from entering infinite recursion when trying to determine whether a deferred constant has a compile time known value, and the initialization expression of the constant is a reference to the constant itself. From-SVN: r262698
Hristian Kirtchev committed -
This will reduce significantly the number of allocations done when doing consecutive append operations. 2018-07-16 Nicolas Roche <roche@adacore.com> gcc/ada/ * libgnat/a-strunb.adb, libgnat/a-strunb__shared.adb: Adjust growth factor from 1/32 to 1/2 for Unbounded_String. From-SVN: r262697
Nicolas Roche committed -
2018-07-16 Richard Biener <rguenther@suse.de> PR lto/86523 * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents for function-local FUNCTION_DECL and RESULT_DECL immediately. * g++.dg/lto/pr86523-1_0.C: New testcase. * g++.dg/lto/pr86523-2_0.C: Likewise. From-SVN: r262696
Richard Biener committed -
2018-07-16 Martin Liska <mliska@suse.cz> PR ipa/86529 * ipa-pure-const.c (malloc_candidate_p): Revert ::get to ::get_create. 2018-07-16 Martin Liska <mliska@suse.cz> PR ipa/86529 * g++.dg/ipa/pr86529.C: New test. From-SVN: r262695
Martin Liska committed -
2017-07-16 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arcHS.md: Update ARCHS scheduling rules. From-SVN: r262689
Claudiu Zissulescu committed -
gcc/ 2017-03-10 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters for ARCHS4x. * config/arc/arc-cpus.def (hs4x): New cpu. (hs4xd): Likewise. * config/arc/arc-tables.opt: Regenerate. * config/arc/arc.c (arc_sched_issue_rate): New function. (TARGET_SCHED_ISSUE_RATE): Define. (TARGET_SCHED_EXPOSED_PIPELINE): Likewise. * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv, fpu_cvt. (attr tune): Add ARCHS4x tune values. (attr tune_dspmpy): Define. (*tst): Correct instruction type. * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus. * config/arc/arcHS4x.md: New file. * config/arc/fpu.md: Update instruction type attributes. * config/arc/t-multilib: Regenerate. From-SVN: r262688
Claudiu Zissulescu committed -
When compiling test-case gcc.target/i386/vartrack-1.c with -O1 -g, register bx is pushed in the prologue and popped in the epilogue: ... (insn/f 26 3 27 2 (set (mem:DI (pre_dec:DI (reg/f:DI 7 sp)) [0 S8 A8]) (reg:DI 3 bx)) "vartrack-1.c":10 61 {*pushdi2_rex64} (expr_list:REG_DEAD (reg:DI 3 bx) (nil))) ... (insn/f 29 28 30 2 (set (reg:DI 3 bx) (mem:DI (post_inc:DI (reg/f:DI 7 sp)) [0 S8 A8])) "vartrack-1.c":15 71 {*popdi1} (expr_list:REG_CFA_ADJUST_CFA (set (reg/f:DI 7 sp) (plus:DI (reg/f:DI 7 sp) (const_int 8 [0x8]))) (nil))) ... However, when we adjust those insns in vartrack to eliminate the pre_dec and post_inc, the frame location for the push is at argp - 24, while the one for the pop is at argp - 16: ... (insn/f 26 3 27 2 (parallel [ (set (mem:DI (plus:DI (reg/f:DI 16 argp) (const_int -24 [0xffffffffffffffe8])) [0 S8 A8]) (reg:DI 3 bx)) (set (reg/f:DI 7 sp) (plus:DI (reg/f:DI 16 argp) (const_int -24 [0xffffffffffffffe8]))) ]) "vartrack-1.c":10 61 {*pushdi2_rex64} (expr_list:REG_DEAD (reg:DI 3 bx) (nil))) ... (insn/f 29 28 30 2 (parallel [ (set (reg:DI 3 bx) (mem:DI (plus:DI (reg/f:DI 16 argp) (const_int -16 [0xfffffffffffffff0])) [0 S8 A8])) (set (reg/f:DI 7 sp) (plus:DI (reg/f:DI 16 argp) (const_int -8 [0xfffffffffffffff8]))) ]) "vartrack-1.c":15 71 {*popdi1} (expr_list:REG_CFA_ADJUST_CFA (set (reg/f:DI 7 sp) (plus:DI (reg/f:DI 7 sp) (const_int 8 [0x8]))) (nil))) ... This patch fixes that by moving the stack_adjust modification after adjust_insn in vt_initialize. Bootstrapped and reg-tested on x86_64. 2018-07-16 Tom de Vries <tdevries@suse.de> PR debug/86455 * var-tracking.c (vt_initialize): Fix pre_dec handling. * gcc.target/i386/vartrack-1.c: New test. From-SVN: r262687
Tom de Vries committed -
From-SVN: r262686
Ramana Radhakrishnan committed -
PR tree-optimization/86514 * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a conversion to a boolean type from a type with greater precision. From-SVN: r262684
Eric Botcazou committed -
2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com> * MAINTAINERS: Adjust email address for me and my colleague Robin Dapp. From-SVN: r262683
Andreas Krebbel committed -
libstdc++-v3/ChangeLog: 2018-07-16 Andreas Krebbel <krebbel@linux.ibm.com> * config/abi/post/s390-linux-gnu/baseline_symbols.txt: Update. * config/abi/post/s390x-linux-gnu/32/baseline_symbols.txt: Update. * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update. From-SVN: r262681
Andreas Krebbel committed -
2018-07-16 Tom de Vries <tdevries@suse.de> * var-tracking.c (vt_initialize): Print adjusted insn slim if dump_flags request TDF_SLIM. From-SVN: r262680
Tom de Vries committed -
PR c++/3698 PR c++/86208 * cp-gimplify.c (cp_genericize_r): When using extern_decl_map, or in TREE_USED flag from stmt to h->to. * g++.dg/opt/pr3698.C: New test. From-SVN: r262678
Jakub Jelinek committed -
2018-07-16 Richard Biener <rguenther@suse.de> PR ipa/86389 * gcc.dg/torture/pr86389.c: Require trampolines. From-SVN: r262677
Richard Biener committed -
* fold-const.c (int_const_binop_1): Abstract... (wide_int_binop): ...wide int code here. (poly_int_binop): ...poly int code here. (tree_binop): ...tree code here. * fold-const.h (wide_int_binop): New. * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop. Remove useless PLUS/MINUS_EXPR case. (zero_nonzero_bits_from_vr): Move wide int code... (zero_nonzero_bits_from_bounds): ...here. (extract_range_from_binary_expr_1): Move mask optimization code... (range_easy_mask_min_max): ...here. * tree-vrp.h (zero_nonzero_bits_from_bounds): New. (range_easy_mask_min_max): New. From-SVN: r262676
Aldy Hernandez committed -
From-SVN: r262675
GCC Administrator committed
-
- 15 Jul, 2018 5 commits
-
-
PR target/85993 * config/sh/sh.c (output_mi_thunk): Remove dead conditional block. From-SVN: r262671
Jeff Law committed -
We advertise Og as the optimization level of choice for the standard edit-compile-debug cycle, but do not run the guality tests for Og with the default torture options. This patch ensures that we test -Og in the guality tests. F.i., for gcc.dg/guality there are 45 fails for Og (while there are none for O1), in these test-cases: ... gcc.dg/guality/pr54200.c gcc.dg/guality/pr54970.c gcc.dg/guality/pr56154-1.c gcc.dg/guality/pr59776.c gcc.dg/guality/sra-1.c ... 2018-07-15 Tom de Vries <tdevries@suse.de> * lib/gcc-gdb-test.exp (guality_minimal_options): New proc. * lib/gfortran-dg.exp (gfortran-dg-runtest): Don't call torture-init if already called. * g++.dg/guality/guality.exp: Ensure Og is part of torture options. * gcc.dg/guality/guality.exp: Same. * gfortran.dg/guality/guality.exp: Same. From-SVN: r262668
Tom de Vries committed -
This reverts commit 6b84828445f7875d1dddbd90a8d86b10c4e8e776. From-SVN: r262667
Tom de Vries committed -
We advertise Og as the optimization level of choice for the standard edit-compile-debug cycle, but do not run the guality tests for Og with the default torture options. This patch ensures that we test -Og in the guality tests. F.i., for gcc.dg/guality there are 45 fails for Og (while there are none for O1), in these test-cases: ... gcc.dg/guality/pr54200.c gcc.dg/guality/pr54970.c gcc.dg/guality/pr56154-1.c gcc.dg/guality/pr59776.c gcc.dg/guality/sra-1.c ... 2018-07-15 Tom de Vries <tdevries@suse.de> * lib/gcc-gdb-test.exp (guality_minimal_options): New proc. * g++.dg/guality/guality.exp: Ensure Og is part of torture options. * gcc.dg/guality/guality.exp: Same. * gfortran.dg/guality/guality.exp: Same. From-SVN: r262666
Tom de Vries committed -
From-SVN: r262665
GCC Administrator committed
-
- 14 Jul, 2018 3 commits
-
-
gcc/ * config/riscv/linux.h (TARGET_ASM_FILE_END): New. From-SVN: r262660
Jim Wilson committed -
From-SVN: r262659
Paul Koning committed -
From-SVN: r262658
GCC Administrator committed
-
- 13 Jul, 2018 16 commits
-
-
The libffi library doesn't understand zero-sized objects. When we see a zero-sized field in a struct, just skip it when converting to the FFI data structures. There is no value to pass in any case, so not telling libffi about the field doesn't affect anything. The test case for this is https://golang.org/cl/123316. Fixes golang/go#26335 Reviewed-on: https://go-review.googlesource.com/123335 From-SVN: r262651
Ian Lance Taylor committed -
r259399, which added PROCESSOR_SKYLAKE, disabled many x86 optimizations which are enabled by PROCESSOR_HASWELL. As the result, -mtune=skylake generates slower codes on Skylake than before. The same also applies to Cannonlake and Icelak tuning. This patch changes -mtune={skylake|cannonlake|icelake} to tune like -mtune=haswell for until their tuning is properly adjusted. It also enables -mprefer-vector-width=256 for -mtune=haswell, which has no impact on codegen when AVX512 isn't enabled. Performance impacts on SPEC CPU 2017 rate with 1 copy using -march=native -mfpmath=sse -O2 -m64 are 1. On Broadwell server: 500.perlbench_r -0.56% 502.gcc_r -0.18% 505.mcf_r 0.24% 520.omnetpp_r 0.00% 523.xalancbmk_r -0.32% 525.x264_r -0.17% 531.deepsjeng_r 0.00% 541.leela_r 0.00% 548.exchange2_r 0.12% 557.xz_r 0.00% Geomean 0.00% 503.bwaves_r 0.00% 507.cactuBSSN_r 0.21% 508.namd_r 0.00% 510.parest_r 0.19% 511.povray_r -0.48% 519.lbm_r 0.00% 521.wrf_r 0.28% 526.blender_r 0.19% 527.cam4_r 0.39% 538.imagick_r 0.00% 544.nab_r -0.36% 549.fotonik3d_r 0.51% 554.roms_r 0.00% Geomean 0.17% On Skylake client: 500.perlbench_r 0.96% 502.gcc_r 0.13% 505.mcf_r -1.03% 520.omnetpp_r -1.11% 523.xalancbmk_r 1.02% 525.x264_r 0.50% 531.deepsjeng_r 2.97% 541.leela_r 0.50% 548.exchange2_r -0.95% 557.xz_r 2.41% Geomean 0.56% 503.bwaves_r 0.49% 507.cactuBSSN_r 3.17% 508.namd_r 4.05% 510.parest_r 0.15% 511.povray_r 0.80% 519.lbm_r 3.15% 521.wrf_r 10.56% 526.blender_r 2.97% 527.cam4_r 2.36% 538.imagick_r 46.40% 544.nab_r 2.04% 549.fotonik3d_r 0.00% 554.roms_r 1.27% Geomean 5.49% On Skylake server: 500.perlbench_r 0.71% 502.gcc_r -0.51% 505.mcf_r -1.06% 520.omnetpp_r -0.33% 523.xalancbmk_r -0.22% 525.x264_r 1.72% 531.deepsjeng_r -0.26% 541.leela_r 0.57% 548.exchange2_r -0.75% 557.xz_r -1.28% Geomean -0.21% 503.bwaves_r 0.00% 507.cactuBSSN_r 2.66% 508.namd_r 3.67% 510.parest_r 1.25% 511.povray_r 2.26% 519.lbm_r 1.69% 521.wrf_r 11.03% 526.blender_r 3.39% 527.cam4_r 1.69% 538.imagick_r 64.59% 544.nab_r -0.54% 549.fotonik3d_r 2.68% 554.roms_r 0.00% Geomean 6.19% This patch improves -march=native performance on Skylake up to 60% and leaves -march=native performance unchanged on Haswell. gcc/ 2018-07-13 H.J. Lu <hongjiu.lu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/84413 * config/i386/i386.c (m_CORE_AVX512): New. (m_CORE_AVX2): Likewise. (m_CORE_ALL): Add m_CORE_AVX2. * config/i386/x86-tune.def: Replace m_HASWELL with m_CORE_AVX2. Replace m_SKYLAKE_AVX512 with m_CORE_AVX512 on avx256_optimal and remove the rest of m_SKYLAKE_AVX512. gcc/testsuite/ 2018-07-13 H.J. Lu <hongjiu.lu@intel.com> Sunil K Pandey <sunil.k.pandey@intel.com> PR target/84413 * gcc.target/i386/pr84413-1.c: New test. * gcc.target/i386/pr84413-2.c: Likewise. * gcc.target/i386/pr84413-3.c: Likewise. Co-Authored-By: Sunil K Pandey <sunil.k.pandey@intel.com> From-SVN: r262649
H.J. Lu committed -
* lto.c (do_stream_out): Add PART parameter; open dump file. (stream_out): Add PART parameter; pass it to do_stream_out. (lto_wpa_write_files): Update call of stream_out. * lto-streamer-out.c (copy_function_or_variable): Dump info about copying section. From-SVN: r262645
Jan Hubicka committed -
[gcc] 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com> Steve Munroe <munroesj52@gmail.com> * config/rs6000/emmintrin.h (_mm_and_si128): New function. (_mm_andnot_si128): Likewise. (_mm_or_si128): Likewise. (_mm_xor_si128): Likewise. [gcc/testsuite] 2018-07-13 Bill Schmidt <wschmidt@linux.ibm.com> Steve Munroe <munroesj52@gmail.com> * gcc.target/powerpc/sse2-pand-1.c: New file. * gcc.target/powerpc/sse2-pandn-1.c: Likewise. * gcc.target/powerpc/sse2-por-1.c: Likewise. * gcc.target/powerpc/sse2-pxor-1.c: Likewise. Co-Authored-By: Steve Munroe <munroesj52@gmail.com> From-SVN: r262642
Bill Schmidt committed -
The frontend could parse omitted pointer typess at the end of the type, but not in the middle, so code like []*[][]int{{{1}}} failed. Test case is in https://golang.org/cl/123477. Fixes golang/go#26340 Reviewed-on: https://go-review.googlesource.com/123479 From-SVN: r262641
Ian Lance Taylor committed -
https://gcc.gnu.org/ml/gcc-patches/2018-07/msg00701.html PR c++/86374 * pt.c (lookup_template_class_1): Use tsubst_aggr_type for contexts that are classes. * parser.c (cp_parser_template_id): Combine entering_scope decl & initializer. PR c++/86374 * g++.dg/pr86374.C: New. From-SVN: r262637
Nathan Sidwell committed -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809 Inline strcmp with small constant strings The design doc for PR78809 is at: https://www.mail-archive.com/gcc@gcc.gnu.org/msg83822.html this patch is for the third part of change of PR78809. C. for strcmp (s1, s2), strncmp (s1, s2, n), and memcmp (s1, s2, n) if the result is NOT used to do simple equality test against zero, one of "s1" or "s2" is a small constant string, n is a constant, and the Min value of the length of the constant string and "n" is smaller than a predefined threshold T, inline the call by a byte-to-byte comparision sequence to avoid calling overhead. adding test case strcmpopt_5.c into gcc.dg for part C of PR78809. adding test case strcmpopt_6.c into gcc.dg to test the following case: When the specified length exceeds one of the arguments of the call to memcmp, the call to memcmp should NOT be inlined. From-SVN: r262636
Qing Zhao committed -
This patch moves the vendor and CPU id data from driver-arm.c to the main table of CPU data in arm-cpus.in. It then adds rules to parsecpu.awk to build data tables that can be used by the driver for automatic CPU detection when running natively. This is the last major bit of CPU-specific data that can be usefully moved to the CPU data tables (I don't think it is sensible to move the per-cpu tuning data from its current location). The syntax and parser can support revision ranges, but at present nothing is done with that data: no supported cpu currently needs that capability. * config/arm/driver-arm.c: Include arm-native.h. (host_detect_local_cpu): Use auto-generated data tables. (vendors, arm_cpu_table): Delete. Move part information to ... * config/arm/arm-cpus.in: ... here. * config/arm/parsecpu.awk (gen_native): New function. (vendor, part): New CPU fields. (END): Add support for building the native CPU detection tables. * config/arm/t-arm (arm-native.h): Add build rule. (driver-arm.o): Add dependency on arm-native.h. From-SVN: r262633
Richard Earnshaw committed -
re PR middle-end/85974 (Failure to optimize difference of two pointers into a compile time constant) 2018-07-13 Richard Biener <rguenther@suse.de> PR middle-end/85974 * match.pd (addr1 - addr2): Allow either of the operand to have a conversion. * gcc.c-torture/compile/930326-1.c: Adjust to cover widening. From-SVN: r262632
Richard Biener committed -
Optimization fipa-icf breaks debug info (as is noted in PR63572 - "ICF breaks user debugging experience"), which make guality tests clztest.c, ctztest.c and sra-1.c unsupported for option combination "-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects". F.i., in clztest.c foo and bar are merged, and gdb can set a breakpoint on a line in foo, but trying to set a breakpoint on a line in bar results in a breakpoint in main instead. This patch works around the problem by adding -fno-ipa-icf (as is already done in csttest.c and pr43077-1.c) to those testcases: ... -UNSUPPORTED: gcc.dg/guality/clztest.c ... line . g == f +PASS: gcc.dg/guality/clztest.c ... line . g == f -UNSUPPORTED: gcc.dg/guality/ctztest.c ... line . g == f +PASS: gcc.dg/guality/ctztest.c ... line . g == f -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4 +PASS: gcc.dg/guality/sra-1.c ... line .+1 a[0] == 4 -UNSUPPORTED: gcc.dg/guality/sra-1.c ... line . a[1] == 14 +PASS: gcc.dg/guality/sra-1.c ... line . a[1] == 14 ... Tested on x86_64. 2018-07-13 Tom de Vries <tdevries@suse.de> * gcc.dg/guality/clztest.c: Add -fno-ipa-icf in dg-options. * gcc.dg/guality/ctztest.c: Same. * gcc.dg/guality/sra-1.c: Same. From-SVN: r262631
Tom de Vries committed -
From-SVN: r262630
Eric Botcazou committed -
* gcc-interface/lang.opt (funsigned-char): New option. * gcc-interface/misc.c (gnat_handle_option): Accept it. * gcc-interface/utils.c (finish_character_type): Tweak comment. From-SVN: r262629
Eric Botcazou committed -
When compiling gcc.dg/vla-1.c with -O3 -g, vla a and b in f1 are optimized away, and f1 is cloned to a version f1.constprop with no parameters, eliminating parameter i. Debug info is generated to describe the sizes of a and b, but that process generates debug expressions that are not reused. Fix the duplication by saving and reusing the generated debug expressions in remap_ssa_name. Concretely: reuse D#7 here instead of generating D#8: ... __attribute__((noinline)) f1.constprop () { intD.6 iD.1935; <bb 3> # DEBUG D#10 s=> iD.1897 # DEBUG iD.1935 => D#10 <bb 2> - # DEBUG D#8 s=> iD.1935 # DEBUG D#7 s=> iD.1935 saved_stack.2_1 = __builtin_stack_save (); # DEBUG BEGIN_STMT # DEBUG D#6 => D#7 + 1 # DEBUG D#5 => (long intD.8) D#6 # DEBUG D#4 => D#5 + -1 # DEBUG D.1937 => (sizetype) D#4 # DEBUG a.0D.1942 => NULL # DEBUG BEGIN_STMT - # DEBUG D#3 => D#8 + 2 + # DEBUG D#3 => D#7 + 2 # DEBUG D#2 => (long intD.8) D#3 # DEBUG D#1 => D#2 + -1 # DEBUG D.1944 => (sizetype) D#1 # DEBUG b.1D.1949 => NULL ... Bootstrapped and reg-tested on x86_64. 2018-07-13 Tom de Vries <tdevries@suse.de> * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated in remap_ssa_name. * gcc.dg/vla-1.c: Update. From-SVN: r262628
Tom de Vries committed -
2018-07-13 Tom de Vries <tdevries@suse.de> * maintainers-verify.sh: New file. * gcc.src/maintainers.exp: New file. From-SVN: r262627
Tom de Vries committed -
* config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use arrays instead of numbered variables. From-SVN: r262626
Jackson Woodruff committed -
* config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete. * config/sparc/sparc.c (sparc_compute_frame_size): Make static From-SVN: r262625
Eric Botcazou committed
-