aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2022-01-05rs6000: Skip overload instances with uninitialized fntype (PR103622)Bill Schmidt1-0/+6
2022-01-05 Bill Schmidt <wschmidt@linux.ibm.com> gcc/ PR target/103622 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Skip over instances with undefined function types.
2022-01-05Fix target/103910: missing GTY on x86_mfence causing PCH usage to ICEAndrew Pinski1-1/+1
With -O3 -march=opteron, a mfence builtin is added after the loop to say the nontemporal stores are no longer needed. This all good without precompiled headers as the function decl that is referneced by x86_mfence is referenced in another variable but with precompiled headers, x86_mfence is all messed up and the decl was GC'ed away. This fixes the problem by marking x86_mfence as GTY to save/restore during precompiled headers just like most other variables in the header file. Committed as obvious after a bootstrap/test on x86_64-linux-gnu. gcc/ChangeLog: PR target/103910 * config/i386/i386.h (x86_mfence): Mark with GTY.
2022-01-05i386: Introduce V2QImode minmax, abs and uavgv2hi3_ceil [PR103861]Uros Bizjak3-17/+109
Add V2QImode minmax, abs and uavxv2qi3_ceil operations with SSE registers. 2022-01-05 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/103861 * config/i386/mmx.md (VI_16_32): New mode iterator. (VI1_16_32): Ditto. (mmxvecsize): Handle V2QI mode. (<smaxmin:code><mode>3): Rename from <smaxmin:code>v4qi3. Use VI1_16_32 mode iterator. (<umaxmin:code><mode>3): Rename from <umaxmin:code>v4qi3. Use VI1_16_32 mode iterator. (abs<mode>2): Use VI_16_32 mode iterator. (uavgv2qi3_ceil): New insn pattern. gcc/testsuite/ChangeLog: PR target/103861 * gcc.target/i386/pr103861-3.c: New test. * g++.dg/vect/slp-pr98855.cc (dg-final): Check that no vectorization using SLP was performed.
2022-01-05Avoid -Wformat-diag.Martin Sebor1-1/+1
gcc/ChangeLog: * gimple-ssa-warn-access.cc (pass_waccess::maybe_warn_memmodel): Use %qs to avoid -Wformat-diag.
2022-01-05i386: Fix type of one_cmplv2qi2 alternatives 1,2 [PR103915]Uros Bizjak2-1/+12
2022-01-05 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/103915 * config/i386/mmx.md (one_cmplv2qi2): Change alternatives 1,2 type from sselog to sselog1. gcc/testsuite/ChangeLog: PR target/103915 * gcc.target/i386/pr103915.c: New test.
2022-01-05i386: Fix expand_vec_perm_pshufb for narrow modes [PR103905]Uros Bizjak2-11/+37
2022-01-05 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/103905 * config/i386/i386-expand.c (expand_vec_perm_pshufb): Fix number of narrow mode remapped elements for !one_operand_p case. gcc/testsuite/ChangeLog: PR target/103905 * gcc.target/i386/pr103905.c: New test.
2022-01-05Fortran: Fix ICE caused by missing error for untyped symbol [PR103258]Sandra Loosemore5-1/+27
The bit on a symbol to mark that it had already been diagnosed as lacking a type was getting set even when the error was suppressed or discarded, specifically when doing early resolution on a character length expression to see if it can be constant-folded. Explicitly suppress errors before doing that, then check whether they are suppressed before setting the bit. 2022-01-04 Sandra Loosemore <sandra@codesourcery.com> PR fortran/103258 gcc/fortran/ * decl.c (gfc_match_char_spec): Suppress errors around call to gfc_reduce_init_expr. * error.c (gfc_query_suppress_errors): New. * gfortran.h (gfc_query_suppress_errors): Declare. * symbol.c (gfc_set_default_type): Check gfc_query_suppress_errors. gcc/testsuite/ * gfortran.dg/pr103258.f90: New.
2022-01-05[c++] Adjust mark used member in instantiated class scopeNathan Sidwell2-5/+24
The fix for PR97966 caused a regression with (non-template) member functions of template classes. We need to mark them used in the instantiated class's scope, rather than the scope we were in before instantiating, as the latter may itself be in template and change the behaviour of marking a function as used. gcc/cp/ * pt.c (instantiate_class_template_1): Process attribute((used)) set in class's context. gcc/testsuite/ * g++.dg/template/attr-used.C: New.
2022-01-05Fix diagnostic recursion ICENathan Sidwell2-1/+21
The [with T = $TYPE] diagnostic machinery must not cause recursion. So let's not unilaterally warn about new alignment. (template extracted from Open3D.) gcc/cp/ * init.c (build_new_1): Check complain before alignment warning. gcc/testsuite/ * g++.dg/diagnostic/recur-align.C: New.
2022-01-05[Ada] Improve support for casing on types with controlled partsSteve Baird1-4/+4
gcc/ada/ * exp_ch5.adb (Finish_Binding_Object_Declaration): Fix a bug that was introduced in the previous commit. The previous version initialized a Boolean constant Declare_Copy before the variable Decl had been initialized properly.
2022-01-05[Ada] Simplify detection of alphabetic characters with membership testPiotr Trojanek1-4/+2
gcc/ada/ * sem_prag.adb (Adjust_External_Name_Case): Use membership test.
2022-01-05[Ada] Expand controlling function wrapper into expression functionPiotr Trojanek1-20/+33
gcc/ada/ * exp_ch3.adb (Make_Controlling_Function_Wrappers): For GNATprove build the wrapper as an expression function.
2022-01-05[Ada] Expand controlling functions wrappers in GNATprove modePiotr Trojanek3-11/+43
gcc/ada/ * exp_ch3.ads (Make_Controlling_Function_Wrappers): Move declaration from body to spec, so it can be called by SPARK-specific expansion. * exp_ch3.adb (Make_Controlling_Function_Wrappers): Likewise. * exp_spark.adb (SPARK_Freeze_Type): Enable expansion of wrappers for function with controlling result types.
2022-01-05[Ada] Use Add_Char_To_Name_Buffer for 1-character stringsPiotr Trojanek2-6/+6
gcc/ada/ * exp_dbug.adb, sem_dim.adb: Replace Add_Str_To_Name_Buffer with Add_Char_To_Name_Buffer.
2022-01-05[Ada] Simplify calls to Name_Find with known string parameterPiotr Trojanek2-8/+2
gcc/ada/ * gnatls.adb (Gnatls): Use Name_Find function. * targparm.adb (Get_Target_Parameters): Likewise.
2022-01-05[Ada] Compiler crash with -gnatR2 and with of childBob Duff1-4/+6
gcc/ada/ * repinfo.adb (List_Entities): The code was assuming that if we encounter a package in the current scope, then it must be a (physically) nested package. That was wrong, because it could be a child package. Avoid recursing into child packages; they have not been annotated with representation information, and -gnatR2 queries that information.
2022-01-05[Ada] Remove obsolete s-sopco* and s-strops unitsMarc Poulhiès10-497/+2
gcc/ada/ * libgnat/s-sopco3.ads, libgnat/s-sopco3.adb: Remove. * libgnat/s-sopco4.ads, libgnat/s-sopco4.adb: Remove. * libgnat/s-sopco5.ads, libgnat/s-sopco5.adb: Remove. * libgnat/s-strops.ads, libgnat/s-strops.adb: Remove. * Makefile.rtl (ADA_EXCLUDE_SRCS): Remove occurences of removed units. * gcc-interface/Make-lang.in (ada/sdefault.o): Remove dependencies on removed units. (GNATBIND_OBJS): Remove occurences of removed units.
2022-01-05[Ada] Remove extra whitespace in declarations and parameters listsPiotr Trojanek2-28/+28
gcc/ada/ * exp_ch3.adb (Build_Dcheck_Function): Remove extra whitespace. * libgnarl/s-taskin.adb (Initialize_ATCB): Likewise.
2022-01-05[Ada] Remove explicit "in" in internal parameter associationPiotr Trojanek1-2/+0
gcc/ada/ * exp_attr.adb (Build_Array_VS_Func): Remove explicit "IN" in spec of the generated array validation function; it was redundant, just like it would be in a user-written code.
2022-01-05[Ada] Align arrows in parameter associationsPiotr Trojanek2-4/+4
gcc/ada/ * exp_ch4.adb (Expand_N_Op_Ne): Fix whitespace. * sem_dim.adb (Expand_Put_Call_With_Symbol): Likewise. (Reduce): Likewise.
2022-01-05[Ada] Remove extra space in parameter associationsPiotr Trojanek3-4/+4
gcc/ada/ * exp_aggr.adb (Two_Pass_Aggregate_Expansion): Fix whitespace. * libgnat/a-cofuve.ads (Add): Likewise. * sem_ch3.adb (Build_Access_Subprogram_Wrapper): Likewise.
2022-01-05[Ada] Fix layout of parameters in calls to Predef_Spec_Or_BodyPiotr Trojanek1-13/+13
gcc/ada/ * exp_ch3.adb (Make_Eq_Body, Make_Neq_Body, Make_Predefined_Primitive_Eq_Spec, Make_Predefined_Primitive_Specs): Fix whitespace.
2022-01-05[Ada] Fix condition to build subtype for discriminated typesEtienne Servais1-17/+88
gcc/ada/ * sem_ch3.adb (Analyze_Component_Declaration): Rework condition to build subtypes. (Analyze_Object_Declaration): Likewise. (Should_Build_Subtype): New.
2022-01-05[Ada] Add contracts for the proof of System.Arith_128Yannick Moy2-8/+96
gcc/ada/ * libgnat/s-arit128.adb: Mark in SPARK. * libgnat/s-arit128.ads: Add functional contracts.
2022-01-05[Ada] Simplify handling of user-defined numeric literalsPiotr Trojanek1-5/+3
gcc/ada/ * sem_util.adb (String_From_Numeric_Literal): Simplify using membership tests and ranges; fix whitespace.
2022-01-05[Ada] Proof of runtime units for integer exponentiation (checks on)Yannick Moy5-26/+261
gcc/ada/ * libgnat/s-expint.ads: Mark in SPARK. Adapt to change to package. * libgnat/s-explli.ads: Likewise. * libgnat/s-expllli.ads: Likewise. * libgnat/s-expont.adb: Add lemmas and ghost code. * libgnat/s-expont.ads: Add functional contract.
2022-01-05[Ada] Remove unnecessary check for missing parameter specificationsPiotr Trojanek1-13/+11
gcc/ada/ * exp_disp.adb (Gen_Parameters_Profile): Remove redundant guard.
2022-01-05[Ada] Introduce expression functions for contract of Scan_ExponentClaire Dross1-38/+54
gcc/ada/ * libgnat/s-valuti.ads (Starts_As_Exponent_Format_Ghost): Ghost function to determine if a string is recognized as something which might be an exponent. (Is_Opt_Exponent_Format_Ghost): Ghost function to determine if a string has the correct format for an optional exponent. (Scan_Exponent): Use ghost functions to factorize contracts.
2022-01-05[Ada] Prevent Get_Current_Value_Condition from returning the same nodeBob Duff2-1/+8
gcc/ada/ * exp_util.ads (Get_Current_Value_Condition): Belt: Add a postcondition that Val /= Var. * sem_util.adb (Known_Null): Suspenders: Raise Program_Error if Get_Current_Value_Condition returned the same value. This will be enabled even without assertions, because infinite recursion is a nuisance -- better to crash if this bug ever occurs.
2022-01-05[Ada] Simplify making of null procedure wrappersPiotr Trojanek3-47/+41
gcc/ada/ * exp_ch3.adb (Make_Null_Procedure_Specs): Simplify by reusing Copy_Subprogram_Spec. * sem_util.ads (Copy_Subprogram_Spec): Add New_Sloc parameter. * sem_util.adb (Copy_Subprogram_Spec): Pass New_Sloc to New_Copy_Tree.
2022-01-05[Ada] Proof of runtime units for integer exponentiation (checks off)Yannick Moy5-26/+261
gcc/ada/ * libgnat/s-exnint.ads: Mark in SPARK. Adapt to change to package. * libgnat/s-exnlli.ads: Likewise. * libgnat/s-exnllli.ads: Likewise. * libgnat/s-exponn.adb: Add lemmas and ghost code. Secial case value zero as Left or Right to simplify proof. * libgnat/s-exponn.ads: Transform the generic function into a generic package with a function inside. Add a functional contract.
2022-01-05[Ada] Remove redundant code related to instances with formal subprogramsPiotr Trojanek1-1/+0
gcc/ada/ * sem_ch12.adb (Instantiate_Formal_Subprogram): Remove redundant call to Set_Defining_Unit_Name; a similar call is done few lines below.
2022-01-05[Ada] Fix sharing of formal parameters between wrapper spec and bodyPiotr Trojanek1-75/+64
gcc/ada/ * exp_ch3.adb (Make_Controlling_Function_Wrappers): Create distinct copies of parameter lists for spec and body with Copy_Parameter_List; cleanup. (Make_Null_Procedure_Specs): Fix style in comments; remove a potentially unnecessary initialization of a local variable.
2022-01-05[Ada] Renamed_Entity should return Entity_IdBob Duff2-10/+10
gcc/ada/ * einfo-utils.ads, einfo-utils.adb (Renamed_Entity Alias): Change Node_Id to Entity_Id.
2022-01-05[Ada] Deconstruct dead wrappers added for external axiomatizationPiotr Trojanek2-222/+0
gcc/ada/ * sem_ch12.ads (Build_Function_Wrapper, Build_Operator_Wrapper): Remove unreferenced spec. * sem_ch12.adb (Build_Function_Wrapper, Build_Operator_Wrapper): Remove dead bodies.
2022-01-05[Ada] Rename parameter-dependent constants in generic unitYannick Moy1-171/+194
gcc/ada/ * libgnat/s-aridou.adb: Apply replacement.
2022-01-05[Ada] Fix lemma in generic unit System.Arith_DoubleYannick Moy1-1/+2
gcc/ada/ * libgnat/s-aridou.adb (Lemma_Word_Commutation): Fix for instances with other values of Single_Size.
2022-01-05[Ada] Remove Compiler_Unit[_Warning] pragmasMarc Poulhiès134-1266/+844
gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (Compiler_Unit) (Compiler_Unit_Warning): Remove. * gnat-style.texi, gnat_rm.texi, gnat_ugn.texi: Regenerate. * libgnat/g-dynhta.ads: Add comment indicating this unit is built during stage1. * libgnat/g-dyntab.ads: Likewise. * libgnat/g-graphs.ads: Likewise. * libgnat/g-lists.ads: Likewise. * libgnat/g-sets.ads: Likewise. * libgnat/gnat.ads: Likewise. * libgnat/s-pehage.ads: Likewise. * libgnat/s-resfil.ads: Likewise. * libgnat/s-rident.ads: Likewise. * libgnat/s-utf_32.ads: Likewise. * errout.ads: Update comment. * opt.ads (Opt): Remove Compiler_Unit. * par-ch5.adb (All_Pragmas): Remove call to Check_Compiler_Unit. * sem_prag.adb (Analyze_Pragma): Likewise. * sem_ch4.adb (Non_Static_Choice_Error, Analyze_If_Expression) (Analyze_Set_Membership, Record_Interp): Likewise. * sem_ch11.adb (Analyze_Raise_Expression): Likewise. * sem_ch6.adb: Remove Restric package reference. (Analyze_Extended_Return_Statement): Remove call to Check_Compiler_Unit. * par-prag.adb (Process_Restrictions_Or_Restriction_Warnings): Remove handling of Pragma_Compiler_Unit[_Warning}. * restrict.adb (Check_Compiler_Unit): Remove both. * restrict.ads: Likewise. * snames.ads-tmpl (Pragma_Id): Remove Pragma_Compiler_Unit[_Warning]. * libgnat/a-assert.ads: Remove pragma Compiler_Unit_Warning. * libgnat/a-chlat1.ads: Likewise. * libgnat/a-elchha.adb: Likewise. * libgnat/a-elchha.ads: Likewise. * libgnat/a-ioexce.ads: Likewise. * libgnat/a-strhas.ads: Likewise. * libgnat/g-byorma.adb: Likewise. * libgnat/g-byorma.ads: Likewise. * libgnat/g-dyntab.adb: Likewise. * libgnat/g-heasor.ads: Likewise. * libgnat/g-hesora.adb: Likewise. * libgnat/g-hesora.ads: Likewise. * libgnat/g-htable.adb: Likewise. * libgnat/g-htable.ads: Likewise. * libgnat/g-spchge.adb: Likewise. * libgnat/g-spchge.ads: Likewise. * libgnat/g-speche.adb: Likewise. * libgnat/g-speche.ads: Likewise. * libgnat/g-table.ads: Likewise. * libgnat/g-u3spch.adb: Likewise. * libgnat/g-u3spch.ads: Likewise. * libgnat/interfac.ads: Likewise. * libgnat/s-addope.adb: Likewise. * libgnat/s-addope.ads: Likewise. * libgnat/s-assert.adb: Likewise. * libgnat/s-assert.ads: Likewise. * libgnat/s-bitops.adb: Likewise. * libgnat/s-bitops.ads: Likewise. * libgnat/s-carun8.adb: Likewise. * libgnat/s-carun8.ads: Likewise. * libgnat/s-casuti.adb: Likewise. * libgnat/s-casuti.ads: Likewise. * libgnat/s-conca2.adb: Likewise. * libgnat/s-conca2.ads: Likewise. * libgnat/s-conca3.adb: Likewise. * libgnat/s-conca3.ads: Likewise. * libgnat/s-conca4.adb: Likewise. * libgnat/s-conca4.ads: Likewise. * libgnat/s-conca5.adb: Likewise. * libgnat/s-conca5.ads: Likewise. * libgnat/s-conca6.adb: Likewise. * libgnat/s-conca6.ads: Likewise. * libgnat/s-conca7.adb: Likewise. * libgnat/s-conca7.ads: Likewise. * libgnat/s-conca8.adb: Likewise. * libgnat/s-conca8.ads: Likewise. * libgnat/s-conca9.adb: Likewise. * libgnat/s-conca9.ads: Likewise. * libgnat/s-crc32.adb: Likewise. * libgnat/s-crc32.ads: Likewise. * libgnat/s-crtl.ads: Likewise. * libgnat/s-excdeb.adb: Likewise. * libgnat/s-excdeb.ads: Likewise. * libgnat/s-except.ads: Likewise. * libgnat/s-exctab.adb: Likewise. * libgnat/s-exctab.ads: Likewise. * libgnat/s-finmas.ads: Likewise. * libgnat/s-htable.adb: Likewise. * libgnat/s-htable.ads: Likewise. * libgnat/s-mastop.adb: Likewise. * libgnat/s-mastop.ads: Likewise. * libgnat/s-memory.adb: Likewise. * libgnat/s-memory.ads: Likewise. * libgnat/s-os_lib.ads: Likewise. * libgnat/s-parame.adb: Likewise. * libgnat/s-parame.ads: Likewise. * libgnat/s-parame__posix2008.ads: Likewise. * libgnat/s-purexc.ads: Likewise. * libgnat/s-resfil.adb: Likewise. * libgnat/s-restri.adb: Likewise. * libgnat/s-restri.ads: Likewise. * libgnat/s-secsta.adb: Likewise. * libgnat/s-secsta.ads: Likewise. * libgnat/s-soflin.adb: Likewise. * libgnat/s-soflin.ads: Likewise. * libgnat/s-sopco3.adb: Likewise. * libgnat/s-sopco3.ads: Likewise. * libgnat/s-sopco4.adb: Likewise. * libgnat/s-sopco4.ads: Likewise. * libgnat/s-sopco5.adb: Likewise. * libgnat/s-sopco5.ads: Likewise. * libgnat/s-spsufi.ads: Likewise. * libgnat/s-stache.adb: Likewise. * libgnat/s-stache.ads: Likewise. * libgnat/s-stalib.adb: Likewise. * libgnat/s-stalib.ads: Likewise. * libgnat/s-stoele.adb: Likewise. * libgnat/s-stoele.ads: Likewise. * libgnat/s-strcom.adb: Likewise. * libgnat/s-strcom.ads: Likewise. * libgnat/s-strhas.adb: Likewise. * libgnat/s-string.adb: Likewise. * libgnat/s-string.ads: Likewise. * libgnat/s-strops.adb: Likewise. * libgnat/s-strops.ads: Likewise. * libgnat/s-ststop.adb: Likewise. * libgnat/s-ststop.ads: Likewise. * libgnat/s-traceb.adb: Likewise. * libgnat/s-traceb.ads: Likewise. * libgnat/s-traent.adb: Likewise. * libgnat/s-traent.ads: Likewise. * libgnat/s-utf_32.adb: Likewise. * libgnat/s-unstyp.ads: Likewise. * libgnat/s-wchcnv.adb: Likewise. * libgnat/s-wchcnv.ads: Likewise. * libgnat/s-wchcon.adb: Likewise. * libgnat/s-wchcon.ads: Likewise. * libgnat/s-wchjis.adb: Likewise. * libgnat/s-wchjis.ads: Likewise.
2022-01-05[Ada] Reduce runtime dependencies on stage1Arnaud Charlet6-4/+23
gcc/ada/ * osint.adb (File_Names_Equal): Declare To_Lower locally. * osint.ads (Null_FD): New. * fmap.adb, sinput-l.adb, targparm.adb: Adapt to changes above. * switch-b.adb (Scan_Debug_Switches): Use Is_Regular_File to simplify the bootstrap dependencies.
2022-01-05tree-optimization/103816 - detect offset overflow in SLP group analysisRichard Biener2-1/+24
This makes sure to detect overflow when computing DR_GROUP_GAP and DR_GROUP_SIZE more thoroughly so artificial testcases like the added one are not fooling the existing check. 2022-01-05 Richard Biener <rguenther@suse.de> PR tree-optimization/103816 * tree-vect-data-refs.c (vect_analyze_group_access_1): Also check DR_GROUP_GAP compute for overflow and representability. * gcc.dg/torture/pr103816.c: New testcase.
2022-01-05gimple-fold: Remove incorrect folding of debug stmts [PR103691]Jakub Jelinek2-14/+10
For ADDR_EXPR gimple_debug_bind_get_value fold_stmt_1 uses maybe_canonicalize_mem_ref_addr earlier and I think that should resolve the concerns raised in PR52329. But folding ADDR_EXPR operand using maybe_fold_reference and then taking address of that looks like an invalid transformation, it can transform # DEBUG D.4293 => &a[0] into # DEBUG D.4293 => &2.0e+0 etc., all we want to allow are the lhs folding of the operand which maybe_fold_reference no longer does since r12-21-g0bf8cd9d5e8ac. 2022-01-05 Jakub Jelinek <jakub@redhat.com> PR fortran/103691 * gimple-fold.c (fold_stmt_1): Don't call maybe_fold_reference for DEBUG stmts with ADDR_EXPR gimple_debug_bind_get_value, it can do unwanted rhs folding like &a[0] into &2.0 etc. * gfortran.dg/pr103691.f90: New test.
2022-01-05testsuite: Fix gcc.target/i386/pr103895.c testcase [PR103895]Jakub Jelinek1-1/+1
The testcase uses SSE and SSE2 intrinsics, so fails on i686-linux if -msse2 isn't enabled by default. Fixed by adding -msse2 to dg-options. 2022-01-05 Jakub Jelinek <jakub@redhat.com> PR target/103895 * gcc.target/i386/pr103895.c: Add -msse2 to dg-options.
2022-01-04ipa-inline: Add target info into fn summary [PR102059]Kewen Lin18-6/+331
Power ISA 2.07 (Power8) introduces transactional memory feature but ISA3.1 (Power10) removes it. It exposes one troublesome issue as PR102059 shows. Users define some function with target pragma cpu=power10 then it calls one function with attribute always_inline which inherits command line option -mcpu=power8 which enables HTM implicitly. The current isa_flags check doesn't allow this inlining due to "target specific option mismatch" and error mesasge is emitted. Normally, the callee function isn't intended to exploit HTM feature, but the default flag setting make it look it has. As Richi raised in the PR, we have fp_expressions flag in function summary, and allow us to check the function actually contains any floating point expressions to avoid overkill. So this patch follows the similar idea but is more target specific, for this rs6000 port specific requirement on HTM feature check, we would like to check rs6000 specific HTM built-in functions and inline assembly, it allows targets to do their own customized checks and updates. It introduces two target hooks need_ipa_fn_target_info and update_ipa_fn_target_info. The former allows target to do some previous check and decides to collect target specific information for this function or not. For some special case, it can predict the analysis result and set it early without any scannings. The latter allows the analyze_function_body to pass gimple stmts down just like fp_expressions handlings, target can do its own tricks. I put them together as one hook initially with one boolean to indicate whether it's initial time, but the code looks a bit ugly, to separate them seems to have better readability. gcc/ChangeLog: PR ipa/102059 * config/rs6000/rs6000.c (TARGET_NEED_IPA_FN_TARGET_INFO): New macro. (TARGET_UPDATE_IPA_FN_TARGET_INFO): Likewise. (rs6000_need_ipa_fn_target_info): New function. (rs6000_update_ipa_fn_target_info): Likewise. (rs6000_can_inline_p): Adjust for ipa function summary target info. * config/rs6000/rs6000.h (RS6000_FN_TARGET_INFO_HTM): New macro. * ipa-fnsummary.c (ipa_dump_fn_summary): Adjust for ipa function summary target info. (analyze_function_body): Adjust for ipa function summary target info and call hook rs6000_need_ipa_fn_target_info and rs6000_update_ipa_fn_target_info. (ipa_merge_fn_summary_after_inlining): Adjust for ipa function summary target info. (inline_read_section): Likewise. (ipa_fn_summary_write): Likewise. * ipa-fnsummary.h (ipa_fn_summary::target_info): New member. * doc/tm.texi: Regenerate. * doc/tm.texi.in (TARGET_UPDATE_IPA_FN_TARGET_INFO): Document new hook. (TARGET_NEED_IPA_FN_TARGET_INFO): Likewise. * target.def (update_ipa_fn_target_info): New hook. (need_ipa_fn_target_info): Likewise. * targhooks.c (default_need_ipa_fn_target_info): New function. (default_update_ipa_fn_target_info): Likewise. * targhooks.h (default_update_ipa_fn_target_info): New declare. (default_need_ipa_fn_target_info): Likewise. gcc/testsuite/ChangeLog: PR ipa/102059 * gcc.dg/lto/pr102059-1_0.c: New test. * gcc.dg/lto/pr102059-1_1.c: New test. * gcc.dg/lto/pr102059-1_2.c: New test. * gcc.dg/lto/pr102059-2_0.c: New test. * gcc.dg/lto/pr102059-2_1.c: New test. * gcc.dg/lto/pr102059-2_2.c: New test. * gcc.target/powerpc/pr102059-1.c: New test. * gcc.target/powerpc/pr102059-2.c: New test. * gcc.target/powerpc/pr102059-3.c: New test.
2022-01-04compiler: remove duplication of Named_object traversalIan Lance Taylor3-151/+100
Adding type parameters was about to add a partial third version. Remove the duplication to avoid that. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/375234
2022-01-05Daily bump.GCC Administrator4-1/+151
2022-01-04Eenable -Winvalid-memory-order for C++ [PR99612].Martin Sebor10-120/+736
Resolves: PR middle-end/99612 - Remove "#pragma GCC system_header" from atomic file to warn on incorrect memory order gcc/ChangeLog: PR middle-end/99612 * builtins.c (get_memmodel): Move warning code to gimple-ssa-warn-access.cc. (expand_builtin_atomic_compare_exchange): Same. (expand_ifn_atomic_compare_exchange): Same. (expand_builtin_atomic_load): Same. (expand_builtin_atomic_store): Same. (expand_builtin_atomic_clear): Same. * doc/extend.texi (__atomic_exchange_n): Update valid memory models. * gimple-ssa-warn-access.cc (memmodel_to_uhwi): New function. (struct memmodel_pair): New struct. (memmodel_name): New function. (pass_waccess::maybe_warn_memmodel): New function. (pass_waccess::check_atomic_memmodel): New function. (pass_waccess::check_atomic_builtin): Handle memory model. * input.c (expansion_point_location_if_in_system_header): Return original location if expansion location is in a system header. gcc/testsuite/ChangeLog: PR middle-end/99612 * c-c++-common/pr83059.c: Adjust text of expected diagnostics. * gcc.dg/atomic-invalid-2.c: Same. * gcc.dg/atomic-invalid.c: Same. * c-c++-common/Winvalid-memory-model.c: New test. * g++.dg/warn/Winvalid-memory-model-2.C: New test. * g++.dg/warn/Winvalid-memory-model.C: New test.
2022-01-04i386: Introduce V2QImode vectorized logic [PR103861]Uros Bizjak3-1/+172
Add V2QImode logic operations with SSE and GP registers and split them to V4QImode SSE instructions or SImode GP instructions. The patch also fixes PR target/103900. 2022-01-04 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/103861 * config/i386/mmx.md (one_cmplv2qi3): New insn pattern. (one_cmplv2qi3 splitters): New post-reload splitters. (*andnotv2qi3): New insn pattern. (andnotv2qi3 splitters): New post-reload splitters. (<any_logic:code>v2qi3): New insn pattern. (<any_logic:insn>v2qi3 splitters): New post-reload splitters. gcc/testsuite/ChangeLog: PR target/103861 * gcc.target/i386/warn-vect-op-2.c: Adjust warnings. * gcc.target/i386/pr103900.c: New test.
2022-01-04c++: add begin/end to releasing_vecJason Merrill1-0/+3
So C++11 range-for will work. gcc/cp/ChangeLog: * cp-tree.h (class releasing_vec): Add begin/end fns.
2022-01-04c++: add emacs c++-mode markerJason Merrill1-1/+1
gcc/cp/ChangeLog: * init.c: Include -*- C++ -*- on first line.
2022-01-04tree-optimization/103800 - sanity check more PHI vectorizationRichard Biener2-6/+21
Bool pattern detection doesn't really handle PHIs well so we have to be prepared for mismatched vector types in more cases than originally thought. 2022-01-04 Richard Biener <rguenther@suse.de> PR tree-optimization/103800 * tree-vect-loop.c (vectorizable_phi): Remove assert and expand comment. * gcc.dg/vect/bb-slp-pr103800.c: New testcase.