aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-10-20libffi: Sync with libffi 3.4.2H.J. Lu236-30147/+17051
Merged commit: f9ea41683444ebe11cfa45b05223899764df28fb
2021-10-20libffi: Add HOWTO_MERGE, autogen.sh and merge.shH.J. Lu3-0/+75
Add scripts for syncing with libffi upstream: 1. Clone libffi repo. 2. Checkout the specific commit. 3. Remove the unused files. 4. Add new files and remove old files if needed. * HOWTO_MERGE: New file. * autogen.sh: Likewise. * merge.sh: Likewise.
2021-10-20Rename asm_out_file function arguments.Martin Liska6-108/+106
As preparation for a new global object that will encapsulate asm_out_file, we would need to live with a macro that will define asm_out_file as casm->out_file and thus the name can't be used in function arguments. gcc/ChangeLog: * config/arm/arm.c (arm_unwind_emit_sequence): Do not declare already declared global variable. (arm_unwind_emit_set): Use out_file as function argument. (arm_unwind_emit): Likewise. * config/darwin.c (machopic_output_data_section_indirection): Likewise. (machopic_output_stub_indirection): Likewise. (machopic_output_indirection): Likewise. (machopic_finish): Likewise. * config/i386/i386.c (ix86_asm_output_function_label): Likewise. * config/i386/winnt.c (i386_pe_seh_unwind_emit): Likewise. * config/ia64/ia64.c (process_epilogue): Likewise. (process_cfa_adjust_cfa): Likewise. (process_cfa_register): Likewise. (process_cfa_offset): Likewise. (ia64_asm_unwind_emit): Likewise. * config/s390/s390.c (s390_asm_output_function_label): Likewise.
2021-10-20gcc-changelog: Add libffi/ to ignored_prefixesH.J. Lu1-0/+1
Add libffi/ to ignored_prefixes for syncing with libffi upstream: commit c095f8f2e6f26bfc2ff8e3276c6af23ab153f5ff Author: H.J. Lu <hjl.tools@gmail.com> Date: Tue Aug 31 07:14:47 2021 -0700 libffi: Sync with libffi 3.4.2 Merged commit: f9ea41683444ebe11cfa45b05223899764df28fb to avoid remote: *** The following commit was rejected by your hooks.commit-extra-checker script (status: 1) remote: *** commit: c095f8f2e6f26bfc2ff8e3276c6af23ab153f5ff remote: *** ChangeLog format failed: remote: *** ERR: cannot find a ChangeLog location in message remote: *** remote: *** Please see: https://gcc.gnu.org/codingconventions.html#ChangeLogs remote: *** remote: error: hook declined to update refs/heads/master * gcc-changelog/git_commit.py (ignored_prefixes): Add libffi/.
2021-10-20[Patch][GCC][AArch64] - Lower store and load neon builtins to gimpleAndre Simoes Dias Vieira12-252/+371
20-10-2021 Andre Vieira <andre.simoesdiasvieira@arm.com> Jirui Wu <jirui.wu@arm.com> gcc/ChangeLog: * config/aarch64/aarch64-builtins.c (aarch64_general_gimple_fold_builtin): lower vld1 and vst1 variants of the neon builtins * config/aarch64/aarch64-protos.h: (aarch64_general_gimple_fold_builtin): Add gsi parameter. * config/aarch64/aarch64.c (aarch64_general_gimple_fold_builtin): Likwise. gcc/testsuite/ChangeLog: * gcc.target/aarch64/fmla_intrinsic_1.c: prevent over optimization. * gcc.target/aarch64/fmls_intrinsic_1.c: Likewise. * gcc.target/aarch64/fmul_intrinsic_1.c: Likewise. * gcc.target/aarch64/mla_intrinsic_1.c: Likewise. * gcc.target/aarch64/mls_intrinsic_1.c: Likewise. * gcc.target/aarch64/mul_intrinsic_1.c: Likewise. * gcc.target/aarch64/simd/vmul_elem_1.c: Likewise. * gcc.target/aarch64/vclz.c: Likewise. * gcc.target/aarch64/vneg_s.c: Likewise.
2021-10-20[Patch][GCC][middle-end] - Generate FRINTZ for (double)(int) under ↵Andre Simoes Dias Vieira2-0/+54
-ffast-math on aarch64 20-10-2021 Andre Vieira <andre.simoesdiasvieira@arm.com> Jirui Wu <jirui.wu@arm.com> gcc/ChangeLog: * match.pd: Generate IFN_TRUNC. gcc/testsuite/ChangeLog: * gcc.target/aarch64/merge_trunc1.c: New test.
2021-10-20tree-optimization/102853 - avoid trapping types in split_constant_offsetRichard Biener1-0/+3
This avoids running into the assert in compute_distributive_range when starting the analysis with operations in a trapping type. 2021-10-20 Richard Biener <rguenther@suse.de> PR tree-optimization/102853 * tree-data-ref.c (split_constant_offset_1): Bail out immediately if the expression traps on overflow.
2021-10-20Remove unused back_threader destructor.Aldy Hernandez1-5/+0
Tested on x86-64 Linux. gcc/ChangeLog: * tree-ssa-threadbackward.c (back_threader::~back_threader): Remove.
2021-10-20Remove superflous debugging messages from the threading registry.Aldy Hernandez1-12/+0
These are some random obvious cleanups to the threading dumps, since it seems I'm not the only one looking at dumps these days. The "just threaded" debugging message is redundant since there's already an equivalent "Registering jump thread" message. The "about to thread" message is actually confusing, because the source block doesn't match the IL, since the CFG update is mid-flight. Tested on x86-64 Linux. gcc/ChangeLog: * tree-ssa-threadupdate.c (back_jt_path_registry::adjust_paths_after_duplication): Remove superflous debugging message. (back_jt_path_registry::duplicate_thread_path): Same.
2021-10-20[Ada] Remove unnecessary call to No_Uint_To_0Bob Duff1-1/+1
gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Remove unnecessary call to No_Uint_To_0.
2021-10-20[Ada] Never treat intrinsic subprograms as nestedRichard Kenner1-0/+1
gcc/ada/ * exp_unst.adb (Visit_Node, when N_Subprogram_Call): Never treat instrinsic subprograms as nested.
2021-10-20[Ada] Proof of the runtime support for attribute 'WidthYannick Moy4-6/+116
gcc/ada/ * libgnat/s-widlllu.ads: Mark in SPARK. * libgnat/s-widllu.ads: Likewise. * libgnat/s-widuns.ads: Likewise. * libgnat/s-widthu.adb: Add ghost code and a pseudo-postcondition.
2021-10-20[Ada] Provide dummy body for big integers library used in reduced runtimesYannick Moy2-4/+76
gcc/ada/ * libgnat/a-nbnbin__ghost.adb (Signed_Conversions, Unsigned_Conversions): Mark subprograms as not imported. * libgnat/a-nbnbin__ghost.ads: Provide a dummy body.
2021-10-20[Ada] Fix problematic conversion of real literal in static contextEric Botcazou1-12/+23
gcc/ada/ * sem_eval.adb (Eval_Type_Conversion): If the target subtype is a static floating-point subtype and the result is a real literal, consider its machine-rounded value to raise Constraint_Error. (Test_In_Range): Turn local variables into constants.
2021-10-20[Ada] Delete unused runtime filesDoug Rupp4-504/+0
gcc/ada/ * libgnat/g-io-put__vxworks.adb: Remove (unused) * libgnat/s-parame__ae653.ads: Likewise. * libgnat/s-thread.ads: Likewise. * libgnat/s-thread__ae653.adb: Likewise.
2021-10-20[Ada] Factor out machine rounding operationsEric Botcazou4-23/+39
gcc/ada/ * sem_eval.ads (Machine_Number): New inline function. * sem_eval.adb (Machine_Number): New function body implementing the machine rounding operation specified by RM 4.9(38/2). (Check_Non_Static_Context): Call Machine_Number and set the Is_Machine_Number flag consistently on the resulting node. * sem_attr.adb (Eval_Attribute) <Attribute_Machine>: Likewise. * checks.adb (Apply_Float_Conversion_Check): Call Machine_Number. (Round_Machine): Likewise.
2021-10-20[Ada] Define __wrs_rtp_base in linker specJohannes Kliemann1-0/+1
gcc/ada/ * vxworks7-cert-rtp-link.spec: Add the definition of __wrs_rtp_base.
2021-10-20[Ada] Reject boxes in delta record aggregatesPiotr Trojanek1-1/+13
gcc/ada/ * sem_aggr.adb (Resolve_Delta_Record_Aggregate): Reject boxes in record delta aggregates.
2021-10-20[Ada] Missing accessibility check when returning discriminated typesJustin Squirek2-28/+32
gcc/ada/ * sem_ch6.adb (Check_Return_Construct_Accessibility): Modify generation of accessibility checks to be more consolidated and get triggered properly in required cases. * sem_util.adb (Accessibility_Level): Add extra check within condition to handle aliased formals properly in more cases.
2021-10-20[Ada] Crash on object of protected type with defaulted access componentJustin Squirek1-7/+21
gcc/ada/ * exp_ch7.adb (Make_Final_Call): Detect expanded protected types and use original protected type in order to calculate appropriate finalization routine.
2021-10-20[Ada] Add ghost code version of Ada.Numerics.Big_Numbers.Big_IntegersJohannes Kliemann1-0/+206
gcc/ada/ * libgnat/a-nbnbin__ghost.ads: Add ghost package.
2021-10-20[Ada] Refine type of a counter function for record delta aggregatePiotr Trojanek1-5/+4
gcc/ada/ * sem_aggr.adb (Variant_Depth): Refine type from Integer to Natural.
2021-10-20[Ada] tech debt: Clean up Uint fields, such as EsizeBob Duff33-377/+431
gcc/ada/ * atree.ads: Comment improvements. How is a "completely new node" different from a "new node"? Document default values corresponding to field types. * exp_ch7.adb (Process_Tagged_Type_Declaration): Use higher-level Scope_Depth instead of Scope_Depth_Value. Remove confusing comment: not clear what a "true" library level package is. * uintp.adb (Image_Out): Print No_Uint in a more readable way. * gen_il-gen.adb, gen_il-gen-gen_entities.adb, gen_il-gen-gen_nodes.adb, gen_il-types.ads: Tighten up the subtypes of fields whose type is Uint, where possible; use more-constrained subtypes such as Unat. * einfo-utils.adb, einfo-utils.ads, exp_attr.adb, exp_ch3.adb, exp_intr.adb, exp_unst.adb, exp_util.adb, freeze.adb, repinfo.adb, sem.adb, sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_util.adb, sprint.adb, treepr.adb: No longer use Uint_0 to indicate "unknown" or "not yet known" for various fields whose type is Uint. Use No_Uint for that, except in a small number of legacy cases that cause test failures. Protect many queries of such fields with calls to Known_... functions. Improve comments. * exp_aggr.adb: Likewise. (Is_OK_Aggregate): Check whether Csiz is present. (Aggr_Assignment_OK_For_Backend): Ensure we do not access an uninitialized size. * exp_strm.adb (Build_Elementary_Input_Call, Build_Elementary_Write_Call): Check whether P_Size is present. * cstand.adb: Leave Component_Size of Any_Composite unknown. Similar for RM_Size of Standard_Exception_Type. These should not be used. * einfo.ads: Comment improvements. * exp_disp.ads: Minor. * gen_il-internals.ads, gen_il-internals.adb: Minor. * sinfo-utils.adb: Take advantage of full-coverage rules. * types.h: Minor.
2021-10-20[Ada] Warning on nonmatching subtypes in fully conforming subprogram specs ↵Gary Dismukes6-1/+185
and bodies gcc/ada/ * sem_ch6.adb: Add with and use of Warnsw. (Check_Conformance): Report a warning when subtypes or designated subtypes of formal parameters or result subtypes denote different declarations between the spec and body of the (Subprogram_Subtypes_Have_Same_Declaration): New function nested within Check_Conformance that determines whether two subtype entities referenced in a subprogram come from the same declaration. Returns True immediately if the subprogram is in a generic instantiation, or the subprogram is marked Is_Internal or is declared in an internal (GNAT library) unit, or GNAT_Mode is enabled, otherwise compares the nonlimited views of the entities (or their designated subtypes' nonlimited views in the anonymous access cases). (Nonlimited_View_Of_Subtype): New function nested within function Subprogram_Subtypes_Have_Same_Declaration that returns Non_Limited_View of a type or subtype that is an incomplete or class-wide type that comes from a limited of a package (From_Limited_With is True for the entity), or returns Full_View when the nonlimited view is an incomplete type. Otherwise returns the entity passed in. * warnsw.ads (Warn_On_Pedantic_Checks): New warning flag. (type Warning_Record): New component Warn_On_Pedantic_Checks. * warnsw.adb (All_Warnings): Set Warn_On_Pedantic_Checks from parameter Setting. (Restore_Warnings): Restore the value of the Warn_On_Pedantic_Checks flag. (Save_Warnings): Save the value of the Warn_On_Pedantic_Checks flag. (Set_Underscore_Warning_Switch): Add settings of the Warn_On_Pedantic flag according to the switch ("-gnatw_p" vs. "-gnatw_P"). * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Add documentation of new switches -gnatw_p and -gnatw_P (warnings for pedantic checks). * gnat_ugn.texi: Regenerate. * usage.adb: Add Warn_On_Pedantic_Checks.
2021-10-20[Ada] Prevent use of an uninitialized AST field with universal integerPiotr Trojanek1-0/+1
gcc/ada/ * exp_spark.adb (Expand_SPARK_N_Attribute_Reference): Guard against equality of an uninitialized RM_Size field.
2021-10-20[Ada] Expose and use type-generic GCC atomic builtinsEric Botcazou6-430/+123
gcc/ada/ * sem_ch12.adb (Analyze_Subprogram_Instantiation): Also propagate an interface name on an intrinsic subprogram. Remove obsolete comment. * libgnat/s-atopri.ads (Atomic_Load): New generic intrinsic function (Atomic_Load_8): Rewrite into instantiation. (Atomic_Load_16): Likewise. (Atomic_Load_32): Likewise. (Atomic_Load_64): Likewise. (Sync_Compare_And_Swap): New generic intrinsic function. (Sync_Compare_And_Swap_8): Rewrite into instantiation. (Sync_Compare_And_Swap_16): Likewise. (Sync_Compare_And_Swap_32): Likewise. (Sync_Compare_And_Swap_64): Likewise. (Lock_Free_Read): New generic inline function. (Lock_Free_Read_8): Rewrite into instantiation. (Lock_Free_Read_16): Likewise. (Lock_Free_Read_32): Likewise. (Lock_Free_Read_64): Likewise. (Lock_Free_Try_Write): New generic inline function. (Lock_Free_Try_Write_8): Rewrite into instantiation. (Lock_Free_Try_Write_16): Likewise. (Lock_Free_Try_Write_32): Likewise. (Lock_Free_Try_Write_64): Likewise. * libgnat/s-atopri.adb (Lock_Free_Read): New function body. (Lock_Free_Read_8): Delete. (Lock_Free_Read_16): Likewise. (Lock_Free_Read_32): Likewise. (Lock_Free_Read_64): Likewise. (Lock_Free_Try_Write): New function body. (Lock_Free_Try_Write_8): Delete. (Lock_Free_Try_Write_16): Likewise. (Lock_Free_Try_Write_32): Likewise. (Lock_Free_Try_Write_64): Likewise. * libgnat/s-aoinar.adb (Atomic_Fetch_And_Add): Use type-generic GCC atomic builtin and tidy up implementation. (Atomic_Fetch_And_Subtract): Likewise. * libgnat/s-aomoar.adb (Atomic_Fetch_And_Add): Likewise. (Atomic_Fetch_And_Subtract): Likewise. * libgnat/s-atopex.adb (Atomic_Exchange): Likewise. (Atomic_Compare_And_Exchange): Likewise.
2021-10-20[Ada] Rewrite tests on Convention_IntrinsicEric Botcazou2-10/+12
gcc/ada/ * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Replace test on Convention_Intrinsic with Is_Intrinsic_Subprogram. (gnat_to_gnu_param): Likewise. (gnat_to_gnu_subprog_type): Likewise. * gcc-interface/trans.c (elaborate_all_entities_for_package): Ditto.
2021-10-20[Ada] Small cleanup in Eval_Integer_LiteralEric Botcazou2-19/+15
gcc/ada/ * sem_eval.ads (Check_Non_Static_Context): Update documentation. * sem_eval.adb (In_Any_Integer_Context): Change parameter type, adjust accordingly and remove unreachable case. (Eval_Integer_Literal): Consider the node kind throughout and trim down verbose condition.
2021-10-20[Ada] Get rid of Frontend_Exceptions refsDoug Rupp4-518/+0
gcc/ada/ * Makefile.rtl: Remove references to system-vxworks-ppc.ads and system-vxworks-x86.ads. * libgnat/system-vxworks-ppc.ads: Remove. * libgnat/system-vxworks-ppc-ravenscar.ads: Likewise. * libgnat/system-vxworks-x86.ads: Likewise.
2021-10-20[Ada] Issue warning on unused quantified expressionYannick Moy1-13/+59
gcc/ada/ * sem_ch4.adb (Analyze_QUantified_Expression): Issue warning on conjunct/disjunct sub-expression of the full expression inside a quantified expression, when it does not reference the quantified variable.
2021-10-20[Ada] Fix type conversion handling in validity checksMarc Poulhiès1-1/+10
gcc/ada/ * checks.adb (Insert_Valid_Check): in case of checked type conversion, update Typ to match Exp's type and add call to Analyze_And_Resolve.
2021-10-20Remove unused back_threader_registry::m_threaded_paths.Aldy Hernandez1-10/+1
Tested on x86-64 Linux. gcc/ChangeLog: * tree-ssa-threadbackward.c (back_threader_registry::back_threader_registry): Remove. (back_threader_registry::register_path): Remove m_threaded_paths.
2021-10-20Restore --param=max-fsm-thread-lengthAldy Hernandez3-0/+16
The removal of --param=max-fsm-thread-length is causing code explosion. I thought that --param=max-fsm-thread-path-insns was a better gague for path profitability than raw BB length, but it turns out that we don't take into account PHIs when estimating the number of statements. In this PR, we have a sequence of very large PHIs that have us traversing extremely large paths that blow up the compilation. We could fix this a couple of different ways. We could avoid traversing more than a certain number of PHI arguments, or ignore large PHIs altogether. The old implementation certainly had this knob, and we could cut things off before we even got to the ranger. We could also adjust the instruction estimation to take into account PHIs, but I'm sure we'll mess something else in the process ;-). The easiest thing to do is just restore the knob. At a later time we could tweak this further, for instance, disregarding empty blocks in the count. BTW, this is the reason I didn't chop things off in the lowlevel registry for all threaders: the forward threader can't really explore too deep paths, but it could theoretically get there while threading over empty blocks. This fixes 102814, 102852, and I bet it solves the Linux kernel cross compile issue. Tested on x86-64 Linux. gcc/ChangeLog: PR tree-optimization/102814 * doc/invoke.texi: Document --param=max-fsm-thread-length. * params.opt: Add --param=max-fsm-thread-length. * tree-ssa-threadbackward.c (back_threader_profitability::profitable_path_p): Fail on paths longer than max-fsm-thread-length.
2021-10-20Fix PR middle-end/102764Eric Botcazou2-1/+15
This is a regression present on the mainline in the form of -fcompare-debug failure at -O3 on a compiler-generated testcase. Fixed by disregarding a debug statement in the last position of a basic block to reset the current location for the outgoing edges. gcc/ PR middle-end/102764 * cfgexpand.c (expand_gimple_basic_block): Disregard a final debug statement to reset the current location for the outgoing edges. gcc/testsuite/ * gcc.dg/pr102764.c: New test.
2021-10-20Avoid exception propagation during bootstrapArnaud Charlet1-5/+69
This addresses PR ada/100486, which is the bootstrap failure of GCC 11 for 32-bit Windows in the MSYS setup. The PR shows that we cannot rely on exception propagation being operational during the bootstrap, at least on the 11 branch, so fix this by removing the problematic raise statement. gcc/ada/ PR ada/100486 * sem_prag.adb (Check_Valid_Library_Unit_Pragma): Do not raise an exception as part of the bootstrap.
2021-10-20openmp: Fix up struct gomp_work_share handling [PR102838]Jakub Jelinek2-0/+40
If GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is not defined, the intent was to treat the split of the structure between first cacheline (64 bytes) as mostly write-once, use afterwards and second cacheline as rw just as an optimization. But as has been reported, with vectorization enabled at -O2 it can now result in aligned vector 16-byte or larger stores. When not having posix_memalign/aligned_alloc/memalign or other similar API, alloc.c emulates it but it needs to allocate extra memory for the dynamic realignment. So, for the GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC not defined case, this patch stops using aligned (64) attribute in the middle of the structure and instead inserts padding that puts the second half of the structure at offset 64 bytes. And when GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined, usually it was allocated as aligned, but for the orphaned case it could still be allocated just with gomp_malloc without guaranteed proper alignment. 2021-10-20 Jakub Jelinek <jakub@redhat.com> PR libgomp/102838 * libgomp.h (struct gomp_work_share_1st_cacheline): New type. (struct gomp_work_share): Only use aligned(64) attribute if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC is defined, otherwise just add padding before lock to ensure lock is at offset 64 bytes into the structure. (gomp_workshare_struct_check1, gomp_workshare_struct_check2): New poor man's static assertions. * work.c (gomp_work_share_start): Use gomp_aligned_alloc instead of gomp_malloc if GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC.
2021-10-20gfortran.dg/bind-c-contiguous-5.c: Big-endian fixTobias Burnus1-0/+101
gcc/testsuite/ PR fortran/102815 * gfortran.dg/bind-c-contiguous-5.c (do_call, reset_var): Handle big andian.
2021-10-20c++: Fix up push_local_extern_decl_alias error recovery [PR102642]Jakub Jelinek4-4/+19
My recent push_local_extern_decl_alias change broke error-recovery, do_pushdecl can return error_mark_node and set_decl_tls_model can't be called on that. There are other code paths that store error_mark_node into DECL_LOCAL_DECL_ALIAS, with the intent to differentiate the cases where we haven't yet tried to push it into the namespace scope (NULL) and one where we have tried it but it failed (error_mark_node), but looking around, there are other spots where we call functions or do processing which doesn't tolerate error_mark_node. So, the first hunk with the testcase fixes the testcase, the others fix what I've spotted and the fix was easy to figure out (there are I think 3 other spots mainly for function multiversioning). 2021-10-20 Jakub Jelinek <jakub@redhat.com> PR c++/102642 * name-lookup.c (push_local_extern_decl_alias): Don't call set_decl_tls_model on error_mark_node. * decl.c (make_rtl_for_nonlocal_decl): Don't call set_user_assembler_name on error_mark_node. * parser.c (cp_parser_oacc_declare): Ignore DECL_LOCAL_DECL_ALIAS if it is error_mark_node. (cp_parser_omp_declare_target): Likewise. * g++.dg/tls/pr102642.C: New test.
2021-10-20Disallow loop rotation and loop header crossing in jump threaders.Aldy Hernandez21-219/+207
There is a lot of fall-out from this patch, as there were many threading tests that assumed the restrictions introduced by this patch were valid. Some tests have merely shifted the threading to after loop optimizations, but others ended up with no threading opportunities at all. Surprisingly some tests ended up with more total threads. It was a crapshoot all around. On a postive note, there are 6 tests that no longer XFAIL, and one guality test which now passes. I felt a bit queasy about such a fundamental change wrt threading, so I ran it through my callgrind test harness (.ii files from a bootstrap). There was no change in overall compilation, DOM, or the VRP threaders. However, there was a slight increase of 1.63% in the backward threader. I'm pretty sure we could reduce this if we incorporated the restrictions into their profitability code. This way we could stop the search when we ran into one of these restrictions. Not sure it's worth it at this point. Tested on x86-64 Linux. Co-authored-by: Richard Biener <rguenther@suse.de> gcc/ChangeLog: * tree-ssa-threadupdate.c (cancel_thread): Dump threading reason on the same line as the threading cancellation. (jt_path_registry::cancel_invalid_paths): Avoid rotating loops. Avoid threading through loop headers where the path remains in the loop. libgomp/ChangeLog: * testsuite/libgomp.graphite/force-parallel-5.c: Remove xfail. gcc/testsuite/ChangeLog: * gcc.dg/Warray-bounds-87.c: Remove xfail. * gcc.dg/analyzer/pr94851-2.c: Remove xfail. * gcc.dg/graphite/pr69728.c: Remove xfail. * gcc.dg/graphite/scop-dsyr2k.c: Remove xfail. * gcc.dg/graphite/scop-dsyrk.c: Remove xfail. * gcc.dg/shrink-wrap-loop.c: Remove xfail. * gcc.dg/loop-8.c: Adjust for new threading restrictions. * gcc.dg/tree-ssa/ifc-20040816-1.c: Same. * gcc.dg/tree-ssa/pr21559.c: Same. * gcc.dg/tree-ssa/pr59597.c: Same. * gcc.dg/tree-ssa/pr71437.c: Same. * gcc.dg/tree-ssa/pr77445-2.c: Same. * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Same. * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Same. * gcc.dg/vect/bb-slp-16.c: Same. * gcc.dg/tree-ssa/ssa-dom-thread-6.c: Remove. * gcc.dg/tree-ssa/ssa-dom-thread-18.c: Remove. * gcc.dg/tree-ssa/ssa-dom-thread-2a.c: Remove. * gcc.dg/tree-ssa/ssa-thread-invalid.c: New test.
2021-10-20Trivial fix to gil-1.c when analyzer is not enabledJeff Law1-0/+1
gcc/testsuite * gcc.dg/plugin/gil-1.c: Add dg-require-effective-target marker.
2021-10-20tree-object-size: Make unknown a computationSiddhesh Poyarekar1-57/+43
Compute the unknown size value as a function of the min/max bit of object_size_type. This transforms into a neat little branchless sequence on x86_64: movl %edi, %eax sarl %eax xorl $1, %eax negl %eax cltq which should be faster than loading the value from memory. A quick unscientific test using `time make check-gcc RUNTESTFLAGS="dg.exp=builtin*"` shaves about half a second off execution time with this. Also simplify implementation of unknown_object_size. gcc/ChangeLog: * tree-object-size.c (unknown): Make into a function. Adjust all uses. (unknown_object_size): Simplify implementation. Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
2021-10-20Adjust testcase for O2 vectorization.liuhongt19-34/+967
As discussed in [1], this patch add xfail/target selector to those testcases, also make a copy of them so that they can be tested w/o vectorization. Newly added xfail/target selectors are used to check the vectorization capability of continuous byte/double bytes storage, these scenarios are exactly the part of the testcases that regressed after O2 vectorization. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581456.html. 2021-10-19 Hongtao Liu <hongtao.liu@intel.com> Kewen Lin <linkw@linux.ibm.com> gcc/ChangeLog * doc/sourcebuild.texi (Effective-Target Keywords): Document vect_slp_v2qi_store, vect_slp_v4qi_store, vect_slp_v8qi_store, vect_slp_v16qi_store, vect_slp_v2hi_store, vect_slp_v4hi_store, vect_slp_v2si_store, vect_slp_v4si_store. gcc/testsuite/ChangeLog PR middle-end/102722 PR middle-end/102697 PR middle-end/102462 PR middle-end/102706 PR middle-end/102744 * c-c++-common/Wstringop-overflow-2.c: Adjust testcase with new xfail/target selector. * gcc.dg/Warray-bounds-51.c: Ditto. * gcc.dg/Warray-parameter-3.c: Ditto. * gcc.dg/Wstringop-overflow-14.c: Ditto. * gcc.dg/Wstringop-overflow-21.c: Ditto. * gcc.dg/Wstringop-overflow-68.c: Ditto. * gcc.dg/Wstringop-overflow-76.c: Ditto. * gcc.dg/Warray-bounds-48.c: Ditto. * gcc.dg/Wzero-length-array-bounds-2.c: Ditto. * lib/target-supports.exp (check_vect_slp_aligned_store_usage): New function. (check_effective_target_vect_slp_v2qi_store): Ditto. (check_effective_target_vect_slp_v4qi_store): Ditto. (check_effective_target_vect_slp_v8qi_store): Ditto. (check_effective_target_vect_slp_v16qi_store): Ditto. (check_effective_target_vect_slp_v2hi_store): Ditto. (check_effective_target_vect_slp_v4hi_store): Ditto. (check_effective_target_vect_slp_v2si_store): Ditto. (check_effective_target_vect_slp_v4si_store): Ditto. * c-c++-common/Wstringop-overflow-2-novec.c: New test. * gcc.dg/Warray-bounds-51-novec.c: New test. * gcc.dg/Warray-bounds-48-novec.c: New test. * gcc.dg/Warray-parameter-3-novec.c: New test. * gcc.dg/Wstringop-overflow-14-novec.c: New test. * gcc.dg/Wstringop-overflow-21-novec.c: New test. * gcc.dg/Wstringop-overflow-76-novec.c: New test. * gcc.dg/Wzero-length-array-bounds-2-novec.c: New test.
2021-10-20Daily bump.GCC Administrator8-1/+342
2021-10-19libstdc++: Implement LWG 3580 change to ranges::iota_viewPatrick Palka1-2/+8
libstdc++-v3/ChangeLog: * include/std/ranges (iota_view::_Iterator::operator+): Adjust definition as per LWG 3580. (iota_view::_Iterator::operator-): Likewise.
2021-10-19libstdc++: Implement LWG 3568 change to ranges::basic_istream_viewPatrick Palka1-1/+1
libstdc++-v3/ChangeLog: * include/std/ranges (basic_istream_view::_M_object): Value initialize as per LWG 3568.
2021-10-19libstdc++: Implement LWG 3470 change to ranges::subrangePatrick Palka2-4/+28
libstdc++-v3/ChangeLog: * include/bits/ranges_util.h (__detail::__uses_nonqualification_pointer_conversion): Define and use it ... (__detail::__convertible_to_nonslicing): ... here, as per LWG 3470. * testsuite/std/ranges/subrange/1.cc: New test.
2021-10-19libstdc++: Implement LWG 3523 changes to ranges::iota_viewPatrick Palka2-0/+42
libstdc++-v3/ChangeLog: * include/std/ranges (iota_view::_Iterator): Befriend iota_view. (iota_view::_Sentinel): Likewise. (iota_view::iota_view): Add three overloads, each taking an iterator/sentinel pair as per LWG 3523. * testsuite/std/ranges/iota/iota_view.cc (test06): New test.
2021-10-19libstdc++: Implement LWG 3549 changes to ranges::enable_viewPatrick Palka5-32/+70
This patch also reverts r11-3504 since that workaround is now obsolete after this resolution. libstdc++-v3/ChangeLog: * include/bits/ranges_base.h (view_interface): Forward declare. (__detail::__is_derived_from_view_interface_fn): Declare. (__detail::__is_derived_from_view_interface): Define as per LWG 3549. (enable_view): Adjust as per LWG 3549. * include/bits/ranges_util.h (view_interface): Don't derive from view_base. * include/std/ranges (filter_view): Revert r11-3504 change. (transform_view): Likewise. (take_view): Likewise. (take_while_view): Likewise. (drop_view): Likewise. (drop_while_view): Likewise. (join_view): Likewise. (lazy_split_view): Likewise. (split_view): Likewise. (reverse_view): Likewise. * testsuite/std/ranges/adaptors/sizeof.cc: Update expected sizes. * testsuite/std/ranges/view.cc (test_view::test_view): Remove this default ctor since views no longer need to be default initable. (test01): New test.
2021-10-19doc: Fix typo in name of PowerPC __builtin_cpu_supports built-inJonathan Wakely1-1/+1
gcc/ChangeLog: * doc/extend.texi (Basic PowerPC Built-in Functions): Fix typo.
2021-10-19libstdc++: Implement std::random_device::entropy() for other sourcesJonathan Wakely2-7/+100
Currently this function only returns a non-zero value for /dev/random and /dev/urandom. When a hardware instruction such as RDRAND is in use it should (in theory) be perfectly random and produce 32 bits of entropy in each 32-bit result. Add a helper function to identify the source of randomness from the _M_func and _M_file data members, and return a suitable value when RDRAND or RDSEED is being used. libstdc++-v3/ChangeLog: * src/c++11/random.cc (which_source): New helper function. (random_device::_M_getentropy()): Use which_source and return suitable values for sources other than device files. * testsuite/26_numerics/random/random_device/entropy.cc: New test.