aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
AgeCommit message (Collapse)AuthorFilesLines
2024-08-01Update ChangeLog and version files for releasereleases/gcc-14.2.0Jakub Jelinek1-0/+4
2024-05-07Update ChangeLog and version files for releasereleases/gcc-14.1.0Jakub Jelinek1-0/+4
2024-02-22Daily bump.GCC Administrator1-0/+7
2024-02-21ipa: Convert lattices from pure array to vector (PR 113476)Martin Jambor3-1/+6
In PR 113476 we have discovered that ipcp_param_lattices is no longer a POD and should be destructed. In a follow-up discussion it transpired that their initialization done by memsetting their backing memory to zero is also invalid because now any write there before construction can be considered dead. Plus that having them in an array is a little bit old-school and does not get the extra checking offered by vector along with automatic construction and destruction when necessary. So this patch converts the array to a vector. That however means that ipcp_param_lattices cannot be just a forward declared type but must be known to all code that deals with ipa_node_params and thus to all code that includes ipa-prop.h. Therefore I have moved ipcp_param_lattices and the type it depends on to a new header ipa-cp.h which now ipa-prop.h depends on. Because we have the (IMHO not a very wise) rule that headers don't include what they need themselves, I had to add inclusions of ipa-cp.h and sreal.h (on which it depends) to very many files, which made the patch rather ugly. gcc/lto/ChangeLog: 2024-02-16 Martin Jambor <mjambor@suse.cz> PR ipa/113476 * lto-common.cc: Include sreal.h and ipa-cp.h. * lto-partition.cc: Include ipa-cp.h, move inclusion of sreal higher. * lto.cc: Include sreal.h and ipa-cp.h. gcc/ChangeLog: 2024-02-16 Martin Jambor <mjambor@suse.cz> PR ipa/113476 * ipa-prop.h (ipa_node_params): Convert lattices to a vector, adjust initializers in the contructor. (ipa_node_params::~ipa_node_params): Release lattices as a vector. * ipa-cp.h: New file. * ipa-cp.cc: Include sreal.h and ipa-cp.h. (ipcp_value_source): Move to ipa-cp.h. (ipcp_value_base): Likewise. (ipcp_value): Likewise. (ipcp_lattice): Likewise. (ipcp_agg_lattice): Likewise. (ipcp_bits_lattice): Likewise. (ipcp_vr_lattice): Likewise. (ipcp_param_lattices): Likewise. (ipa_get_parm_lattices): Remove assert latticess is non-NULL. (ipa_value_from_jfunc): Adjust a check for empty lattices. (ipa_context_from_jfunc): Likewise. (ipa_agg_value_from_jfunc): Likewise. (merge_agg_lats_step): Do not memset new aggregate lattices to zero. (ipcp_propagate_stage): Allocate lattices in a vector as opposed to just in contiguous memory. (ipcp_store_vr_results): Adjust a check for empty lattices. * auto-profile.cc: Include sreal.h and ipa-cp.h. * cgraph.cc: Likewise. * cgraphclones.cc: Likewise. * cgraphunit.cc: Likewise. * config/aarch64/aarch64.cc: Likewise. * config/i386/i386-builtins.cc: Likewise. * config/i386/i386-expand.cc: Likewise. * config/i386/i386-features.cc: Likewise. * config/i386/i386-options.cc: Likewise. * config/i386/i386.cc: Likewise. * config/rs6000/rs6000.cc: Likewise. * config/s390/s390.cc: Likewise. * gengtype.cc (open_base_files): Added sreal.h and ipa-cp.h to the files to be included in gtype-desc.cc. * gimple-range-fold.cc: Include sreal.h and ipa-cp.h. * ipa-devirt.cc: Likewise. * ipa-fnsummary.cc: Likewise. * ipa-icf.cc: Likewise. * ipa-inline-analysis.cc: Likewise. * ipa-inline-transform.cc: Likewise. * ipa-inline.cc: Include ipa-cp.h, move inclusion of sreal.h higher. * ipa-modref.cc: Include sreal.h and ipa-cp.h. * ipa-param-manipulation.cc: Likewise. * ipa-predicate.cc: Likewise. * ipa-profile.cc: Likewise. * ipa-prop.cc: Likewise. (ipa_node_params_t::duplicate): Assert new lattices remain empty instead of setting them to NULL. * ipa-pure-const.cc: Include sreal.h and ipa-cp.h. * ipa-split.cc: Likewise. * ipa-sra.cc: Likewise. * ipa-strub.cc: Likewise. * ipa-utils.cc: Likewise. * ipa.cc: Likewise. * toplev.cc: Likewise. * tree-ssa-ccp.cc: Likewise. * tree-ssa-sccvn.cc: Likewise. * tree-vrp.cc: Likewise.
2024-02-11Daily bump.GCC Administrator1-0/+6
2024-02-10Use HOST_SIZE_T_PRINT_* and HOST_WIDE_INT_T_PRINT_* some moreJakub Jelinek1-10/+11
I went through suspicios %l in format strings of *printf family functions combined with casts to (long) or (unsigned long) and tried to find out the types of the original expressions that were cast. Quite a few had size_t type, so I've used the new HOST_SIZE_T_PRINT_* macros together with cast to fmt_size_t for those, and then there were quite a few HOST_WIDE_INTs cast to long, used HOST_WIDE_INT_PRINT_* for those without casts. There was one case of a weird unsigned int variable used with %lu and (long) cast too. 2024-02-10 Jakub Jelinek <jakub@redhat.com> gcc/ * ipa-icf.cc (sem_item_optimizer::process_cong_reduction, sem_item_optimizer::dump_cong_classes): Use HOST_SIZE_T_PRINT_UNSIGNED and casts to fmt_size_t instead of "%lu" and casts to unsigned long. * tree.cc (print_debug_expr_statistics): Use HOST_SIZE_T_PRINT_DEC and casts to fmt_size_t instead of "%ld" and casts to long. (print_value_expr_statistics, print_type_hash_statistics): Likewise. * dwarf2out.cc (output_macinfo_op): Use HOST_WIDE_INT_PRINT_UNSIGNED instead of "%lu" and casts to unsigned long. * gcov-dump.cc (dump_gcov_file): Use %u instead of %lu and casts to unsigned long. * tree-ssa-dom.cc (htab_statistics): Use HOST_SIZE_T_PRINT_DEC and casts to fmt_size_t instead of "%ld" and casts to long. * cfgexpand.cc (dump_stack_var_partition): Use HOST_SIZE_T_PRINT_UNSIGNED and casts to fmt_size_t instead of "%lu" and casts to unsigned long. * gengtype.cc (adjust_field_rtx_def): Likewise. * tree-into-ssa.cc (htab_statistics): Use HOST_SIZE_T_PRINT_DEC and casts to fmt_size_t instead of "%ld" and casts to long. * postreload-gcse.cc (dump_hash_table): Likewise. * ggc-page.cc (alloc_page): Use HOST_SIZE_T_PRINT_UNSIGNED and casts to fmt_size_t instead of "%lu" and casts to unsigned long. (ggc_internal_alloc, ggc_free): Likewise. * genpreds.cc (write_lookup_constraint_1): Likewise. (write_insn_constraint_len): Likewise. * tree-dfa.cc (dump_dfa_stats): Use HOST_SIZE_T_PRINT_DEC and casts to fmt_size_t instead of "%ld" and casts to long. * varasm.cc (output_constant_pool_contents): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld" and casts to long. * var-tracking.cc (dump_var): Likewise. gcc/c-family/ * c-ada-spec.cc (dump_template_types): Use HOST_SIZE_T_PRINT_UNSIGNED and casts to fmt_size_t instead of "%lu" and casts to unsigned long. gcc/c/ * c-decl.cc (get_parm_array_spec): Use HOST_WIDE_INT_PRINT_UNSIGNED instead of "%lu" and casts to unsigned long or unsigned long long. gcc/cp/ * tree.cc (debug_binfo): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld" and casts to long. * pt.cc (print_template_statistics): Use HOST_SIZE_T_PRINT_DEC and casts to fmt_size_t instead of "%ld" and casts to long. * class.cc (dump_class_hierarchy_1): Use HOST_WIDE_INT_PRINT_UNSIGNED instead of "%lu" and casts to unsigned long. For TYPE_ALIGN, use %u instead of %lu and drop casts to unsigned long. * parser.cc (cp_lexer_peek_nth_token): Use HOST_SIZE_T_PRINT_DEC and casts to fmt_size_t instead of "%ld" and casts to long. gcc/fortran/ * trans-common.cc (build_common_decl): Use %wu instead of %lu and casts to unsigned long. * resolve.cc (resolve_ordinary_assign): Use %wd instead of %ld and casts to long. * array.cc (gfc_resolve_character_array_constructor): Likewise. * data.cc (create_character_initializer): Likewise. gcc/jit/ * jit-playback.cc (new_bitcast): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld" and casts to long. gcc/lto/ * lto-common.cc (print_lto_report_1): Use HOST_SIZE_T_PRINT_DEC and casts to fmt_size_t instead of "%ld" and casts to long. Use %d instead of %ld and casts to long for searches and collisions.
2024-01-05Daily bump.GCC Administrator1-0/+5
2024-01-04Add generated .opt.urls filesDavid Malcolm1-0/+8
Changed in v5: regenerated Changed in v4: regenerated Changed in v3: regenerated Changed in v2: the files now contain some lang-specific URLs. gcc/ada/ChangeLog: * gcc-interface/lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/analyzer/ChangeLog: * analyzer.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/c-family/ChangeLog: * c.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/ChangeLog: * common.opt.urls: New file, autogenerated by regenerate-opt-urls.py. * config/aarch64/aarch64.opt.urls: Likewise. * config/alpha/alpha.opt.urls: Likewise. * config/alpha/elf.opt.urls: Likewise. * config/arc/arc-tables.opt.urls: Likewise. * config/arc/arc.opt.urls: Likewise. * config/arm/arm-tables.opt.urls: Likewise. * config/arm/arm.opt.urls: Likewise. * config/arm/vxworks.opt.urls: Likewise. * config/avr/avr.opt.urls: Likewise. * config/bpf/bpf.opt.urls: Likewise. * config/c6x/c6x-tables.opt.urls: Likewise. * config/c6x/c6x.opt.urls: Likewise. * config/cris/cris.opt.urls: Likewise. * config/cris/elf.opt.urls: Likewise. * config/csky/csky.opt.urls: Likewise. * config/csky/csky_tables.opt.urls: Likewise. * config/darwin.opt.urls: Likewise. * config/dragonfly.opt.urls: Likewise. * config/epiphany/epiphany.opt.urls: Likewise. * config/fr30/fr30.opt.urls: Likewise. * config/freebsd.opt.urls: Likewise. * config/frv/frv.opt.urls: Likewise. * config/ft32/ft32.opt.urls: Likewise. * config/fused-madd.opt.urls: Likewise. * config/g.opt.urls: Likewise. * config/gcn/gcn.opt.urls: Likewise. * config/gnu-user.opt.urls: Likewise. * config/h8300/h8300.opt.urls: Likewise. * config/hpux11.opt.urls: Likewise. * config/i386/cygming.opt.urls: Likewise. * config/i386/cygwin.opt.urls: Likewise. * config/i386/djgpp.opt.urls: Likewise. * config/i386/i386.opt.urls: Likewise. * config/i386/mingw-w64.opt.urls: Likewise. * config/i386/mingw.opt.urls: Likewise. * config/i386/nto.opt.urls: Likewise. * config/ia64/ia64.opt.urls: Likewise. * config/ia64/ilp32.opt.urls: Likewise. * config/ia64/vms.opt.urls: Likewise. * config/iq2000/iq2000.opt.urls: Likewise. * config/linux-android.opt.urls: Likewise. * config/linux.opt.urls: Likewise. * config/lm32/lm32.opt.urls: Likewise. * config/loongarch/loongarch.opt.urls: Likewise. * config/lynx.opt.urls: Likewise. * config/m32c/m32c.opt.urls: Likewise. * config/m32r/m32r.opt.urls: Likewise. * config/m68k/ieee.opt.urls: Likewise. * config/m68k/m68k-tables.opt.urls: Likewise. * config/m68k/m68k.opt.urls: Likewise. * config/m68k/uclinux.opt.urls: Likewise. * config/mcore/mcore.opt.urls: Likewise. * config/microblaze/microblaze.opt.urls: Likewise. * config/mips/mips-tables.opt.urls: Likewise. * config/mips/mips.opt.urls: Likewise. * config/mips/sde.opt.urls: Likewise. * config/mmix/mmix.opt.urls: Likewise. * config/mn10300/mn10300.opt.urls: Likewise. * config/moxie/moxie.opt.urls: Likewise. * config/msp430/msp430.opt.urls: Likewise. * config/nds32/nds32-elf.opt.urls: Likewise. * config/nds32/nds32-linux.opt.urls: Likewise. * config/nds32/nds32.opt.urls: Likewise. * config/netbsd-elf.opt.urls: Likewise. * config/netbsd.opt.urls: Likewise. * config/nios2/elf.opt.urls: Likewise. * config/nios2/nios2.opt.urls: Likewise. * config/nvptx/nvptx-gen.opt.urls: Likewise. * config/nvptx/nvptx.opt.urls: Likewise. * config/openbsd.opt.urls: Likewise. * config/or1k/elf.opt.urls: Likewise. * config/or1k/or1k.opt.urls: Likewise. * config/pa/pa-hpux.opt.urls: Likewise. * config/pa/pa-hpux1010.opt.urls: Likewise. * config/pa/pa-hpux1111.opt.urls: Likewise. * config/pa/pa-hpux1131.opt.urls: Likewise. * config/pa/pa.opt.urls: Likewise. * config/pa/pa64-hpux.opt.urls: Likewise. * config/pdp11/pdp11.opt.urls: Likewise. * config/pru/pru.opt.urls: Likewise. * config/riscv/riscv.opt.urls: Likewise. * config/rl78/rl78.opt.urls: Likewise. * config/rpath.opt.urls: Likewise. * config/rs6000/476.opt.urls: Likewise. * config/rs6000/aix64.opt.urls: Likewise. * config/rs6000/darwin.opt.urls: Likewise. * config/rs6000/linux64.opt.urls: Likewise. * config/rs6000/rs6000-tables.opt.urls: Likewise. * config/rs6000/rs6000.opt.urls: Likewise. * config/rs6000/sysv4.opt.urls: Likewise. * config/rtems.opt.urls: Likewise. * config/rx/elf.opt.urls: Likewise. * config/rx/rx.opt.urls: Likewise. * config/s390/s390.opt.urls: Likewise. * config/s390/tpf.opt.urls: Likewise. * config/sh/sh.opt.urls: Likewise. * config/sh/superh.opt.urls: Likewise. * config/sol2.opt.urls: Likewise. * config/sparc/long-double-switch.opt.urls: Likewise. * config/sparc/sparc.opt.urls: Likewise. * config/stormy16/stormy16.opt.urls: Likewise. * config/v850/v850.opt.urls: Likewise. * config/vax/elf.opt.urls: Likewise. * config/vax/vax.opt.urls: Likewise. * config/visium/visium.opt.urls: Likewise. * config/vms/vms.opt.urls: Likewise. * config/vxworks-smp.opt.urls: Likewise. * config/vxworks.opt.urls: Likewise. * config/xtensa/elf.opt.urls: Likewise. * config/xtensa/uclinux.opt.urls: Likewise. * config/xtensa/xtensa.opt.urls: Likewise. gcc/d/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/fortran/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/go/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/lto/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/m2/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/ChangeLog: * params.opt.urls: New file, autogenerated by regenerate-opt-urls.py. gcc/rust/ChangeLog: * lang.opt.urls: New file, autogenerated by regenerate-opt-urls.py. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2024-01-03Update copyright years.Jakub Jelinek18-18/+18
2024-01-03Update Copyright year in ChangeLog filesJakub Jelinek1-1/+1
2023 -> 2024
2023-12-06Daily bump.GCC Administrator1-0/+6
2023-12-05Restore build with GCC 4.8 to GCC 5Richard Sandiford1-2/+2
GCC 5 and earlier applied array-to-pointer decay too early, which affected the new attribute namespace code. A reduced example of the construct that the attribute code uses is: struct S { template<__SIZE_TYPE__ N> S(int (&)[N]); }; struct T { int a; S b; }; int a[] = { 1 }; T t = { 1, a }; This was fixed by f85e1317f8ea933f5c615680353bd646f480f7d3 (PR 16333 et al). This patch tries to add a minimally-invasive workaround. gcc/ada/ * gcc-interface/utils.cc (gnat_internal_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/ * attribs.cc (handle_ignored_attributes_option): Add extra braces to work around PR 16333 in older compilers. * config/aarch64/aarch64.cc (aarch64_gnu_attribute_table): Likewise. (aarch64_arm_attribute_table): Likewise. * config/arm/arm.cc (arm_gnu_attribute_table): Likewise. * config/i386/i386-options.cc (ix86_gnu_attribute_table): Likewise. * config/ia64/ia64.cc (ia64_gnu_attribute_table): Likewise. * config/rs6000/rs6000.cc (rs6000_gnu_attribute_table): Likewise. * target-def.h (TARGET_GNU_ATTRIBUTES): Likewise. * genhooks.cc (emit_init_macros): Likewise, when emitting the instantiation of TARGET_ATTRIBUTE_TABLE. * langhooks-def.h (LANG_HOOKS_INITIALIZER): Likewise, when instantiating LANG_HOOKS_ATTRIBUTE_TABLE. (LANG_HOOKS_ATTRIBUTE_TABLE): Define to be empty by default. * target.def (attribute_table): Likewise. gcc/c-family/ * c-attribs.cc (c_common_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/c/ * c-decl.cc (std_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/cp/ * tree.cc (cxx_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/d/ * d-attribs.cc (d_langhook_common_attribute_table): Add extra braces to work around PR 16333 in older compilers. (d_langhook_gnu_attribute_table): Likewise. gcc/fortran/ * f95-lang.cc (gfc_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. gcc/jit/ * dummy-frontend.cc (jit_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. (jit_format_attribute_table): Likewise. gcc/lto/ * lto-lang.cc (lto_gnu_attribute_table): Add extra braces to work around PR 16333 in older compilers. (lto_format_attribute_table): Likewise.
2023-12-03Daily bump.GCC Administrator1-0/+13
2023-12-02Allow target attributes in non-gnu namespacesRichard Sandiford1-9/+21
Currently there are four static sources of attributes: - LANG_HOOKS_ATTRIBUTE_TABLE - LANG_HOOKS_COMMON_ATTRIBUTE_TABLE - LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE - TARGET_ATTRIBUTE_TABLE All of the attributes in these tables go in the "gnu" namespace. This means that they can use the traditional GNU __attribute__((...)) syntax and the standard [[gnu::...]] syntax. Standard attributes are registered dynamically with a null namespace. There are no supported attributes in other namespaces (clang, vendor namespaces, etc.). This patch tries to generalise things by making the namespace part of the attribute specification. It's usual for multiple attributes to be defined in the same namespace, so rather than adding the namespace to each individual definition, it seemed better to group attributes in the same namespace together. This would also allow us to reuse the same table for clang attributes that are written with the GNU syntax, or other similar situations where the attribute can be accessed via multiple "spellings". The patch therefore adds a scoped_attribute_specs that contains a namespace and a list of attributes in that namespace. It's still possible to have multiple scoped_attribute_specs for the same namespace. E.g. it makes sense to keep the C++-specific, C/C++-common, and format-related attributes in separate tables, even though they're all GNU attributes. Current lists of attributes are terminated by a null name. Rather than keep that for the new structure, it seemed neater to use an array_slice. This also makes the tables slighly more compact. In general, a target might want to support attributes in multiple namespaces. Rather than have a separate hook for each possibility (like the three langhooks above), it seemed better to make TARGET_ATTRIBUTE_TABLE a table of tables. Specifically, it's an array_slice of scoped_attribute_specs. We can do the same thing for langhooks, which allows the three hooks above to be merged into a single LANG_HOOKS_ATTRIBUTE_TABLE. It also allows the standard attributes to be registered statically and checked by the usual attribs.cc checks. The patch adds a TARGET_GNU_ATTRIBUTES helper for the common case in which a target wants a single table of gnu attributes. It can only be used if the table is free of preprocessor directives. There are probably other things we need to do to make vendor namespaces work smoothly. E.g. in principle it would be good to make exclusion sets namespace-aware. But to some extent we have that with standard vs. gnu attributes too. This patch is just supposed to be a first step. gcc/ * attribs.h (scoped_attribute_specs): New structure. (register_scoped_attributes): Take a reference to a scoped_attribute_specs instead of separate namespace and array parameters. * plugin.h (register_scoped_attributes): Likewise. * attribs.cc (register_scoped_attributes): Likewise. (attribute_tables): Change into an array of scoped_attribute_specs pointers. Reduce to 1 element for frontends and 1 element for targets. (empty_attribute_table): Delete. (check_attribute_tables): Update for changes to attribute_tables. Use a hash_set to identify duplicates. (handle_ignored_attributes_option): Update for above changes. (init_attributes): Likewise. (excl_pair): Delete. (test_attribute_exclusions): Update for above changes. Don't enforce symmetry for standard attributes in the top-level namespace. * langhooks-def.h (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Likewise. (LANG_HOOKS_INITIALIZER): Update accordingly. (LANG_HOOKS_ATTRIBUTE_TABLE): Define to an empty constructor. * langhooks.h (lang_hooks::common_attribute_table): Delete. (lang_hooks::format_attribute_table): Likewise. (lang_hooks::attribute_table): Redefine to an array of scoped_attribute_specs pointers. * target-def.h (TARGET_GNU_ATTRIBUTES): New macro. * target.def (attribute_spec): Redefine to return an array of scoped_attribute_specs pointers. * tree-inline.cc (function_attribute_inlinable_p): Update accordingly. * doc/tm.texi: Regenerate. * config/aarch64/aarch64.cc (aarch64_attribute_table): Define using TARGET_GNU_ATTRIBUTES. * config/alpha/alpha.cc (vms_attribute_table): Likewise. * config/avr/avr.cc (avr_attribute_table): Likewise. * config/bfin/bfin.cc (bfin_attribute_table): Likewise. * config/bpf/bpf.cc (bpf_attribute_table): Likewise. * config/csky/csky.cc (csky_attribute_table): Likewise. * config/epiphany/epiphany.cc (epiphany_attribute_table): Likewise. * config/gcn/gcn.cc (gcn_attribute_table): Likewise. * config/h8300/h8300.cc (h8300_attribute_table): Likewise. * config/loongarch/loongarch.cc (loongarch_attribute_table): Likewise. * config/m32c/m32c.cc (m32c_attribute_table): Likewise. * config/m32r/m32r.cc (m32r_attribute_table): Likewise. * config/m68k/m68k.cc (m68k_attribute_table): Likewise. * config/mcore/mcore.cc (mcore_attribute_table): Likewise. * config/microblaze/microblaze.cc (microblaze_attribute_table): Likewise. * config/mips/mips.cc (mips_attribute_table): Likewise. * config/msp430/msp430.cc (msp430_attribute_table): Likewise. * config/nds32/nds32.cc (nds32_attribute_table): Likewise. * config/nvptx/nvptx.cc (nvptx_attribute_table): Likewise. * config/riscv/riscv.cc (riscv_attribute_table): Likewise. * config/rl78/rl78.cc (rl78_attribute_table): Likewise. * config/rx/rx.cc (rx_attribute_table): Likewise. * config/s390/s390.cc (s390_attribute_table): Likewise. * config/sh/sh.cc (sh_attribute_table): Likewise. * config/sparc/sparc.cc (sparc_attribute_table): Likewise. * config/stormy16/stormy16.cc (xstormy16_attribute_table): Likewise. * config/v850/v850.cc (v850_attribute_table): Likewise. * config/visium/visium.cc (visium_attribute_table): Likewise. * config/arc/arc.cc (arc_attribute_table): Likewise. Move further down file. * config/arm/arm.cc (arm_attribute_table): Update for above changes, using... (arm_gnu_attributes, arm_gnu_attribute_table): ...these new globals. * config/i386/i386-options.h (ix86_attribute_table): Delete. (ix86_gnu_attribute_table): Declare. * config/i386/i386-options.cc (ix86_attribute_table): Replace with... (ix86_gnu_attributes, ix86_gnu_attribute_table): ...these two globals. * config/i386/i386.cc (ix86_attribute_table): Define as an array of scoped_attribute_specs pointers. * config/ia64/ia64.cc (ia64_attribute_table): Update for above changes, using... (ia64_gnu_attributes, ia64_gnu_attribute_table): ...these new globals. * config/rs6000/rs6000.cc (rs6000_attribute_table): Update for above changes, using... (rs6000_gnu_attributes, rs6000_gnu_attribute_table): ...these new globals. gcc/ada/ * gcc-interface/gigi.h (gnat_internal_attribute_table): Change type to scoped_attribute_specs. * gcc-interface/utils.cc (gnat_internal_attribute_table): Likewise, using... (gnat_internal_attributes): ...this as the underlying array. * gcc-interface/misc.cc (gnat_attribute_table): New global. (LANG_HOOKS_ATTRIBUTE_TABLE): Use it. gcc/c-family/ * c-common.h (c_common_attribute_table): Replace with... (c_common_gnu_attribute_table): ...this. (c_common_format_attribute_table): Change type to scoped_attribute_specs. * c-attribs.cc (c_common_attribute_table): Replace with... (c_common_gnu_attributes, c_common_gnu_attribute_table): ...these new globals. (c_common_format_attribute_table): Change type to scoped_attribute_specs, using... (c_common_format_attributes): ...this as the underlying array. gcc/c/ * c-tree.h (std_attribute_table): Declare. * c-decl.cc (std_attribute_table): Change type to scoped_attribute_specs, using... (std_attributes): ...this as the underlying array. (c_init_decl_processing): Remove call to register_scoped_attributes. * c-objc-common.h (c_objc_attribute_table): New global. (LANG_HOOKS_ATTRIBUTE_TABLE): Use it. (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete. gcc/cp/ * cp-tree.h (cxx_attribute_table): Delete. (cxx_gnu_attribute_table, std_attribute_table): Declare. * cp-objcp-common.h (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete. (cp_objcp_attribute_table): New table. (LANG_HOOKS_ATTRIBUTE_TABLE): Redefine. * tree.cc (cxx_attribute_table): Replace with... (cxx_gnu_attributes, cxx_gnu_attribute_table): ...these globals. (std_attribute_table): Change type to scoped_attribute_specs, using... (std_attributes): ...this as the underlying array. (init_tree): Remove call to register_scoped_attributes. gcc/d/ * d-tree.h (d_langhook_attribute_table): Replace with... (d_langhook_gnu_attribute_table): ...this. (d_langhook_common_attribute_table): Change type to scoped_attribute_specs. * d-attribs.cc (d_langhook_common_attribute_table): Change type to scoped_attribute_specs, using... (d_langhook_common_attributes): ...this as the underlying array. (d_langhook_attribute_table): Replace with... (d_langhook_gnu_attributes, d_langhook_gnu_attribute_table): ...these new globals. (uda_attribute_p): Update accordingly, and update for new targetm.attribute_table type. * d-lang.cc (d_langhook_attribute_table): New global. (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. gcc/fortran/ * f95-lang.cc: Include attribs.h. (gfc_attribute_table): Change to an array of scoped_attribute_specs pointers, using... (gfc_gnu_attributes, gfc_gnu_attribute_table): ...these new globals. gcc/jit/ * dummy-frontend.cc (jit_format_attribute_table): Change type to scoped_attribute_specs, using... (jit_format_attributes): ...this as the underlying array. (jit_attribute_table): Change to an array of scoped_attribute_specs pointers, using... (jit_gnu_attributes, jit_gnu_attribute_table): ...these new globals for the original array. Include the format attributes. (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_ATTRIBUTE_TABLE): Define. gcc/lto/ * lto-lang.cc (lto_format_attribute_table): Change type to scoped_attribute_specs, using... (lto_format_attributes): ...this as the underlying array. (lto_attribute_table): Change to an array of scoped_attribute_specs pointers, using... (lto_gnu_attributes, lto_gnu_attribute_table): ...these new globals for the original array. Include the format attributes. (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE): Delete. (LANG_HOOKS_ATTRIBUTE_TABLE): Define.
2023-11-08Daily bump.GCC Administrator1-0/+4
2023-11-07c: Refer more consistently to C23 not C2XJoseph Myers1-1/+1
Continuing the move to refer to C23 in place of C2X throughout the source tree, update documentation, diagnostics, comments, variable and function names, etc., to use the C23 name. Testsuite updates are left for a future patch, except for testcases that test diagnostics that previously mentioned C2X (but in those testcases, sometimes other comments are updated, not just the diagnostic expectations). Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/ * builtins.def (DEF_C2X_BUILTIN): Rename to DEF_C23_BUILTIN and use flag_isoc23 and function_c23_misc. * config/rl78/rl78.cc (rl78_option_override): Compare lang_hooks.name with "GNU C23" not "GNU C2X". * coretypes.h (function_c2x_misc): Rename to function_c23_misc. * doc/cpp.texi (@code{__has_attribute}): Refer to C23 instead of C2x. * doc/extend.texi: Likewise. * doc/invoke.texi: Likewise. * dwarf2out.cc (highest_c_language, gen_compile_unit_die): Compare against and return "GNU C23" language string instead of "GNU C2X". * ginclude/float.h: Refer to C23 instead of C2X in comments. * ginclude/stdint-gcc.h: Likewise. * glimits.h: Likewise. * tree.h: Likewise. gcc/ada/ * gcc-interface/utils.cc (flag_isoc2x): Rename to flag_isoc23. gcc/c-family/ * c-common.cc (flag_isoc2x): Rename to flag_isoc23. (c_common_reswords): Use D_C23 instead of D_C2X. * c-common.h: Refer throughout to C23 instead of C2X in comments. (D_C2X): Rename to D_C23. (flag_isoc2x): Rename to flag_isoc23. * c-cppbuiltin.cc (builtin_define_float_constants): Use flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2x in comments. * c-format.cc: Use STD_C23 instead of STD_C2X and flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2X in comments. * c-format.h: Use STD_C23 instead of STD_C2X. * c-lex.cc: Use warn_c11_c23_compat instead of warn_c11_c2x_compat and flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2X in diagnostics. * c-opts.cc: Use flag_isoc23 instead of flag_isoc2x. Refer to C23 instead of C2X in comments. (set_std_c2x): Rename to set_std_c23. * c.opt (Wc11-c23-compat): Use CPP(cpp_warn_c11_c23_compat) CppReason(CPP_W_C11_C23_COMPAT) Var(warn_c11_c23_compat) instead of CPP(cpp_warn_c11_c2x_compat) CppReason(CPP_W_C11_C2X_COMPAT) Var(warn_c11_c2x_compat). gcc/c/ * c-decl.cc: Use flag_isoc23 instead of flag_isoc2x and c23_auto_p instead of c2x_auto_p. Refer to C23 instead of C2X in diagnostics and comments. * c-errors.cc: Use flag_isoc23 instead of flag_isoc2x and warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23 instead of C2X in comments. * c-parser.cc: Use flag_isoc23 instead of flag_isoc2x, warn_c11_c23_compat instead of warn_c11_c2x_compat, c23_auto_p instead of c2x_auto_p and D_C23 instead of D_C2X. Refer to C23 instead of C2X in diagnostics and comments. * c-tree.h: Refer to C23 instead of C2X in comments. (struct c_declspecs): Rename c2x_auto_p to c23_auto_p. * c-typeck.cc: Use flag_isoc23 instead of flag_isoc2x and warn_c11_c23_compat instead of warn_c11_c2x_compat. Refer to C23 instead of C2X in diagnostics and comments. gcc/fortran/ * gfortran.h (gfc_real_info): Refer to C23 instead of C2X in comment. gcc/lto/ * lto-lang.cc (flag_isoc2x): Rename to flag_isoc23. gcc/testsuite/ * gcc.dg/binary-constants-2.c: Refer to C23 instead of C2X. * gcc.dg/binary-constants-3.c: Likewise. * gcc.dg/bitint-23.c: Likewise. * gcc.dg/bitint-26.c: Likewise. * gcc.dg/bitint-27.c: Likewise. * gcc.dg/c11-attr-syntax-1.c: Likewise. * gcc.dg/c11-attr-syntax-2.c: Likewise. * gcc.dg/c11-floatn-1.c: Likewise. * gcc.dg/c11-floatn-2.c: Likewise. * gcc.dg/c11-floatn-3.c: Likewise. * gcc.dg/c11-floatn-4.c: Likewise. * gcc.dg/c11-floatn-5.c: Likewise. * gcc.dg/c11-floatn-6.c: Likewise. * gcc.dg/c11-floatn-7.c: Likewise. * gcc.dg/c11-floatn-8.c: Likewise. * gcc.dg/c2x-attr-syntax-4.c: Likewise. * gcc.dg/c2x-attr-syntax-6.c: Likewise. * gcc.dg/c2x-attr-syntax-7.c: Likewise. * gcc.dg/c2x-binary-constants-2.c: Likewise. * gcc.dg/c2x-floatn-5.c: Likewise. * gcc.dg/c2x-floatn-6.c: Likewise. * gcc.dg/c2x-floatn-7.c: Likewise. * gcc.dg/c2x-floatn-8.c: Likewise. * gcc.dg/c2x-nullptr-4.c: Likewise. * gcc.dg/c2x-qual-2.c: Likewise. * gcc.dg/c2x-qual-3.c: Likewise. * gcc.dg/c2x-qual-6.c: Likewise. * gcc.dg/cpp/c11-warning-1.c: Likewise. * gcc.dg/cpp/c11-warning-2.c: Likewise. * gcc.dg/cpp/c11-warning-3.c: Likewise. * gcc.dg/cpp/c2x-warning-2.c: Likewise. * gcc.dg/cpp/gnu11-elifdef-3.c: Likewise. * gcc.dg/cpp/gnu11-elifdef-4.c: Likewise. * gcc.dg/cpp/gnu11-warning-1.c: Likewise. * gcc.dg/cpp/gnu11-warning-2.c: Likewise. * gcc.dg/cpp/gnu11-warning-3.c: Likewise. * gcc.dg/cpp/gnu2x-warning-2.c: Likewise. * gcc.dg/dfp/c11-constants-1.c: Likewise. * gcc.dg/dfp/c11-constants-2.c: Likewise. * gcc.dg/dfp/c2x-constants-2.c: Likewise. * gcc.dg/dfp/constants-pedantic.c: Likewise. * gcc.dg/pr30260.c: Likewise. * gcc.dg/system-binary-constants-1.c: Likewise. libcpp/ * directives.cc: Refer to C23 instead of C2X in diagnostics and comments. (STDC2X): Rename to STDC23. * expr.cc: Use cpp_warn_c11_c23_compat instead of cpp_warn_c11_c2x_compat and CPP_W_C11_C23_COMPAT instead of CPP_W_C11_C2X_COMPAT. Refer to C23 instead of C2X in diagnostics and comments. * include/cpplib.h: Refer to C23 instead of C2X in diagnostics and comments. (CLK_GNUC2X): Rename to CLK_GNUC23. (CLK_STDC2X): Rename to CLK_STDC23. (CPP_W_C11_C2X_COMPAT): Rename to CPP_W_C11_C23_COMPAT. * init.cc: Use GNUC23 instead of GNUC2X, STDC23 instead of STDC2X and cpp_warn_c11_c23_compat instead of cpp_warn_c11_c2x_compat. * lex.cc (maybe_va_opt_error): Refer to C23 instead of C2X in diagnostic. * macro.cc (_cpp_arguments_ok): Refer to C23 instead of C2X in comment.
2023-10-01Daily bump.GCC Administrator1-0/+4
2023-09-29Remove .PHONY targets when building .fda files during autoprofiledbootstrapEugene Rozenfeld1-2/+2
These .PHONY targets are always executed and were breaking `make install` for autoprofiledbootstrap build. Tested on x86_64-pc-linux-gnu. gcc/c/ChangeLog: * Make-lang.in: Make create_fdas_for_cc1 target not .PHONY gcc/cp/ChangeLog: * Make-lang.in: Make create_fdas_for_cc1plus target not .PHONY gcc/lto/ChangeLog: * Make-lang.in: Make create_fdas_for_lto1 target not .PHONY
2023-09-20Daily bump.GCC Administrator1-0/+9
2023-09-19LTO: Get rid of 'lto_mode_identity_table'Thomas Schwinge2-11/+1
This, in particular, resolves LTO ICEs with big 'machine_mode's, as for RISC-V. ('mode_table' in 'lto_file_decl_data' still is 'unsigned char'; changing that is still to be done (for use in offloading compilation), but is not trivial.) For now, get rid of 'lto_mode_identity_table' to resolve the RISC-V LTO ICEs; we don't need an actual table for a 1-to-1 mapping. gcc/lto/ * lto-common.cc (lto_mode_identity_table): Remove. (lto_file_finalize) [!ACCEL_COMPILER]: 'NULL'-intialize 'file_data->mode_table'. (lto_fe_init): Don't initialize 'lto_mode_identity_table'. * lto-common.h (lto_mode_identity_table): Remove. gcc/ * tree-streamer.h (bp_unpack_machine_mode): If 'ib->file_data->mode_table' not available, apply 1-to-1 mapping. Co-authored-by: Pan Li <pan2.li@intel.com>
2023-07-06Daily bump.GCC Administrator1-0/+5
2023-07-05Change MODE_BITSIZE to MODE_PRECISION for MODE_VECTOR_BOOL.Robin Dapp1-1/+1
RISC-V lowers the TYPE_PRECISION for MODE_VECTOR_BOOL vectors in order to distinguish between VNx1BI, VNx2BI, VNx4BI and VNx8BI. This patch adjusts uses of MODE_VECTOR_BOOL to use GET_MODE_PRECISION instead of GET_MODE_BITSIZE. The RISC-V tests are provided by Juzhe. Co-Authored-By: Juzhe-Zhong <juzhe.zhong@rivai.ai> gcc/c-family/ChangeLog: * c-common.cc (c_common_type_for_mode): Use GET_MODE_PRECISION. gcc/ChangeLog: * simplify-rtx.cc (native_encode_rtx): Ditto. (native_decode_vector_rtx): Ditto. (simplify_const_vector_byte_offset): Ditto. (simplify_const_vector_subreg): Ditto. * tree.cc (build_truth_vector_type_for_mode): Ditto. * varasm.cc (output_constant_pool_2): Ditto. gcc/fortran/ChangeLog: * trans-types.cc (gfc_type_for_mode): Ditto. gcc/go/ChangeLog: * go-lang.cc (go_langhook_type_for_mode): Ditto. gcc/lto/ChangeLog: * lto-lang.cc (lto_type_for_mode): Ditto. gcc/rust/ChangeLog: * backend/rust-tree.cc (c_common_type_for_mode): Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-1.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-10.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-11.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-12.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-13.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-14.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-2.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-3.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-4.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-5.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-6.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-7.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-8.c: New test. * gcc.target/riscv/rvv/autovec/vls-vlmax/bitmask-9.c: New test.
2023-07-05Daily bump.GCC Administrator1-0/+10
2023-07-04Streamer: Fix out of range memory access of machine modePan Li1-0/+1
We extend the machine mode from 8 to 16 bits already. But there still one placing missing from the streamer. It has one hard coded array for the machine code like size 256. In the lto pass, we memset the array by MAX_MACHINE_MODE count but the value of the MAX_MACHINE_MODE will grow as more and more modes are added. While the machine mode array in tree-streamer still leave 256 as is. Then, when the MAX_MACHINE_MODE is greater than 256, the memset of lto_output_init_mode_table will touch the memory out of range unexpected. This patch would like to take the MAX_MACHINE_MODE as the size of the array in streamer, to make sure there is no potential unexpected memory access in future. Meanwhile, this patch also adjust some place which has MAX_MACHINE_MODE <= 256 assumption. Care is taken that for offload compilation, we interpret the stream-in data in terms of the host 'MAX_MACHINE_MODE' ('file_data->mode_bits'), which very likely is different from the offload device 'MAX_MACHINE_MODE'. gcc/ * lto-streamer-in.cc (lto_input_mode_table): Stream in the mode bits for machine mode table. * lto-streamer-out.cc (lto_write_mode_table): Stream out the HOST machine mode bits. * lto-streamer.h (struct lto_file_decl_data): New fields mode_bits. * tree-streamer.cc (streamer_mode_table): Take MAX_MACHINE_MODE as the table size. * tree-streamer.h (streamer_mode_table): Ditto. (bp_pack_machine_mode): Take 1 << ceil_log2 (MAX_MACHINE_MODE) as the packing limit. (bp_unpack_machine_mode): Ditto with 'file_data->mode_bits'. gcc/lto/ * lto-common.cc (lto_file_finalize) [!ACCEL_COMPILER]: Initialize 'file_data->mode_bits'. Signed-off-by: Pan Li <pan2.li@intel.com> Co-authored-by: Thomas Schwinge <thomas@codesourcery.com>
2023-07-04LTO: Capture 'lto_file_decl_data *file_data' in 'class lto_input_block'Thomas Schwinge1-1/+1
... instead of just 'unsigned char *mode_table'. Preparation for a forthcoming change, where we need to capture an additional 'file_data' item, so it seems easier to just capture that one proper. gcc/ * lto-streamer.h (class lto_input_block): Capture 'lto_file_decl_data *file_data' instead of just 'unsigned char *mode_table'. * ipa-devirt.cc (ipa_odr_read_section): Adjust. * ipa-fnsummary.cc (inline_read_section): Likewise. * ipa-icf.cc (sem_item_optimizer::read_section): Likewise. * ipa-modref.cc (read_section): Likewise. * ipa-prop.cc (ipa_prop_read_section, read_replacements_section): Likewise. * ipa-sra.cc (isra_read_summary_section): Likewise. * lto-cgraph.cc (input_cgraph_opt_section): Likewise. * lto-section-in.cc (lto_create_simple_input_block): Likewise. * lto-streamer-in.cc (lto_read_body_or_constructor) (lto_input_toplevel_asms): Likewise. * tree-streamer.h (bp_unpack_machine_mode): Likewise. gcc/lto/ * lto-common.cc (lto_read_decls): Adjust.
2023-06-30Daily bump.GCC Administrator1-0/+11
2023-06-29Introduce IR bit TYPE_INCLUDES_FLEXARRAY for the GCC extensionQing Zhao1-1/+4
on a structure with a C99 flexible array member being nested in another structure GCC extension accepts the case when a struct with a flexible array member is embedded into another struct or union (possibly recursively) as the last field. This patch is to introduce the IR bit TYPE_INCLUDES_FLEXARRAY (reuse the existing IR bit TYPE_NO_NAMED_ARGS_SATDARG_P), set it correctly in C FE, stream it correctly in Middle-end, and print it during IR dumping. gcc/c/ChangeLog: * c-decl.cc (finish_struct): Set TYPE_INCLUDES_FLEXARRAY for struct/union type. gcc/lto/ChangeLog: * lto-common.cc (compare_tree_sccs_1): Compare bit TYPE_NO_NAMED_ARGS_STDARG_P or TYPE_INCLUDES_FLEXARRAY properly for its corresponding type. gcc/ChangeLog: * print-tree.cc (print_node): Print new bit type_include_flexarray. * tree-core.h (struct tree_type_common): Use bit no_named_args_stdarg_p as type_include_flexarray for RECORD_TYPE or UNION_TYPE. * tree-streamer-in.cc (unpack_ts_type_common_value_fields): Stream in bit no_named_args_stdarg_p properly for its corresponding type. * tree-streamer-out.cc (pack_ts_type_common_value_fields): Stream out bit no_named_args_stdarg_p properly for its corresponding type. * tree.h (TYPE_INCLUDES_FLEXARRAY): New macro TYPE_INCLUDES_FLEXARRAY.
2023-06-28Fix collection and processing of autoprofile data for target libsEugene Rozenfeld1-1/+1
cc1, cc1plus, and lto built during STAGEautoprofile need to be built with debug info since they are used to build target libs. -gtoggle was turning off debug info for this stage. create_gcov should be passed prev-gcc/cc1, prev-gcc/cc1plus, and prev-gcc/lto instead of stage1-gcc/cc1, stage1-gcc/cc1plus, and stage1-gcc/lto when processing profile data collected while building target libraries. Tested on x86_64-pc-linux-gnu. ChangeLog: * Makefile.in: Remove -gtoggle for STAGEautoprofile * Makefile.tpl: Remove -gtoggle for STAGEautoprofile gcc/c/ChangeLog: * Make-lang.in: Pass correct stage cc1 when processing profile data collected while building target libraries gcc/cp/ChangeLog: * Make-lang.in: Pass correct stage cc1plus when processing profile data collected while building target libraries gcc/lto/ChangeLog: * Make-lang.in: Pass correct stage lto when processing profile data collected while building target libraries
2023-06-29Daily bump.GCC Administrator1-0/+4
2023-06-28Prevent TYPE_PRECISION on VECTOR_TYPEsRichard Biener1-1/+1
The following makes sure that using TYPE_PRECISION on VECTOR_TYPE ICEs when tree checking is enabled. This should avoid wrong-code in cases like PR110182 and instead ICE. It also introduces a TYPE_PRECISION_RAW accessor and adjusts places I found that are eligible to use that. * tree.h (TYPE_PRECISION): Check for non-VECTOR_TYPE. (TYPE_PRECISION_RAW): Provide raw access to the precision field. * tree.cc (verify_type_variant): Compare TYPE_PRECISION_RAW. (gimple_canonical_types_compatible_p): Likewise. * tree-streamer-out.cc (pack_ts_type_common_value_fields): Stream TYPE_PRECISION_RAW. * tree-streamer-in.cc (unpack_ts_type_common_value_fields): Likewise. * lto-streamer-out.cc (hash_tree): Hash TYPE_PRECISION_RAW. gcc/lto/ * lto-common.cc (compare_tree_sccs_1): Use TYPE_PRECISION_RAW.
2023-05-19Daily bump.GCC Administrator1-0/+8
2023-05-18lto: use _P() defines from tree.hBernhard Reutner-Fischer3-6/+6
gcc/ChangeLog: * lto-streamer-in.cc (lto_input_var_decl_ref): Use _P defines from tree.h. (lto_read_body_or_constructor): Ditto. * lto-streamer-out.cc (tree_is_indexable): Ditto. (lto_output_var_decl_ref): Ditto. (DFS::DFS_write_tree_body): Ditto. (wrap_refs): Ditto. (write_symbol_extension_info): Ditto. gcc/lto/ChangeLog: * lto-common.cc (lto_maybe_register_decl): Use _P defines from tree.h. * lto-symtab.cc (warn_type_compatibility_p): Ditto. (lto_symtab_resolve_replaceable_p): Ditto. (lto_symtab_merge_decls_1): Ditto. * lto-symtab.h (lto_symtab_prevailing_decl): Ditto.
2023-04-29Daily bump.GCC Administrator1-0/+4
2023-04-28Fix autoprofiledbootstrap buildEugene Rozenfeld1-3/+29
1. Fix gcov version 2. Merge perf data collected when compiling the compiler and runtime libraries 3. Fix documentation typo Tested on x86_64-pc-linux-gnu. ChangeLog: * Makefile.in: Define PROFILE_MERGER * Makefile.tpl: Define PROFILE_MERGER gcc/c/ChangeLog: * Make-lang.in: Merge perf data collected when compiling cc1 and runtime libraries gcc/cp/ChangeLog: * Make-lang.in: Merge perf data collected when compiling cc1plus and runtime libraries gcc/lto/ChangeLog: * Make-lang.in: Merge perf data collected when compiling lto1 and runtime libraries gcc/ChangeLog: * doc/install.texi: Fix documentation typo
2023-03-02Daily bump.GCC Administrator1-0/+7
2023-03-01lto: Fix up lto_fixup_prevailing_type [PR108910]Jakub Jelinek1-15/+19
Without LTO, TYPE_POINTER_TO/TYPE_REFERENCE_TO chains are only maintained inside of build_{pointer,reference}_type_for_mode and those routines ensure that the pointer/reference type added to the chain is really without any user attributes (unless something would modify the types in place, but that would be wrong). Now, LTO adds stuff to these chains in lto_fixup_prevailing_type but doesn't guarantee that. The testcase in the PR (which I'm not including for testsuite because when (I hope) the aarch64 backend bug will be fixed, the testcase would work either way) shows a case where user has TYPE_USER_ALIGN type with very high alignment, as there aren't enough pointers to float in the code left that one becomes the prevailing one (because types with attributes are created with build_distinct_type_copy and thus their own TYPE_MAIN_VARIANTs), lto_fixup_prevailing_type puts it into the TYPE_POINTER_TO chain of float and later on during expansion of __builtin_cexpif expander uses build_pointer_type (float_type_node) to emit a sincosf call and instead of getting a normal pointer type gets this non-standard one. The following patch fixes that by not adding into those chains types with TYPE_ATTRIBUTES, and for REFERENCE_TYPEs not even with TYPE_REF_IS_RVALUE - while the C++ FE adds those into those chains, it always ensures such a type goes immediately after the corresponding non-TYPE_REF_IS_RVALUE REFERENCE_TYPE with the same mode/TYPE_REF_CAN_ALIAS_ALL, so LTO would need to ensure that too, but TYPE_REF_IS_RVALUE types are looked that way only in the C++ FE. 2023-03-01 Jakub Jelinek <jakub@redhat.com> PR target/108910 * lto-common.cc (lto_fixup_prevailing_type): Don't add t to TYPE_POINTER_TO or TYPE_REFERENCE_TO chain if it has TYPE_ATTRIBUTES or is TYPE_REF_IS_RVALUE.
2023-01-16Update copyright years.Jakub Jelinek18-18/+18
2023-01-15Daily bump.GCC Administrator1-0/+5
2023-01-13Sync LTO type_for_mode with c-family/Richard Biener1-3/+17
The following adds _FloatN mode support to the LTO copy of c_common_type_for_mode and also implements the fix for PR94072. gcc/lto/ * lto-lang.cc (lto_type_for_mode): Sync with c_common_type_for_mode.
2023-01-05Daily bump.GCC Administrator1-0/+5
2023-01-04Avoid quadratic behaviour of LTO symbol promotionJan Hubicka1-2/+5
LTO partitioning does renaming of symbols that ends up in same partition and clash with assembler name. This is done for "ordinary" symbols (such as static functions) but also for symbols that are kept only as master clones holding bodies of functions to be specialized later. This is done only becuase we stream bodies to named section and clash in names would mean that ltrans will load wrong body and crash. Martin recently added bit to stream body for clones that are needed since this makes it easier to bookeep what summaries are output. THis however triggers mass renaming of inline clones that is very slow and unnecesary since their bodies are never streamed. Bootstrapped/regtested x86_64-linux, comitted. gcc/lto/ChangeLog: 2023-01-04 Jan Hubicka <hubicka@ucw.cz> * lto-partition.cc (may_need_named_section_p): Clones with no body need no remaning.
2023-01-02Update Copyright year in ChangeLog filesJakub Jelinek1-1/+1
2022 -> 2023
2022-12-30Daily bump.GCC Administrator1-0/+5
2022-12-29lto: drop dummy partition mappingAlexandre Oliva1-1/+0
When adding a catch-all partition, we map NULL to it. That mapping is ineffective and unnecessary. Drop it. for gcc/lto/ChangeLog * lto-partition.cc (lto_1_to_1_map): Drop NULL partition mapping.
2022-12-23Daily bump.GCC Administrator1-0/+4
2022-12-22Compare DECL_NOT_FLEXARRAY for LTO tree mergingRichard Biener1-0/+1
This was missing. gcc/lto/ * lto-common.cc (compare_tree_sccs_1): Compare DECL_NOT_FLEXARRAY.
2022-12-22Daily bump.GCC Administrator1-0/+8
2022-12-21Make -fwhole-program to work with incremental LTO linkingJan Hubicka2-1/+11
Update documentation of -fwhole-program which was wrongly claiming that it is useless with LTO whole it is useful for LTO without plugin and extends -fwhole-program to also work with incremental linking. This is useful when building kernel where the incremental link is de-facto fina binary and only some explicitly marked symbols needs to remain. Bootstrapped/regtested x86_64-linux, comitted. gcc/ChangeLog: 2022-12-21 Jan Hubicka <hubicka@ucw.cz> * doc/invoke.texi: Fix documentation of -fwhole-program with LTO and document behaviour for incremental linking. gcc/lto/ChangeLog: 2022-12-21 Jan Hubicka <hubicka@ucw.cz> * lto-common.cc (lto_resolution_read): With incremental linking and whole program ignore turn LDPR_PREVAILING_DEF_IRONLY to LDPR_PREVAILING_DEF_IRONLY_EXP * lto-lang.cc (lto_post_options): Do not clear flag_whole_program for incremental link
2022-11-25Daily bump.GCC Administrator1-0/+6
2022-11-25lto: fix usage of timer in materialize_cgraphMartin Liska1-8/+6
PR lto/107829 gcc/lto/ChangeLog: * lto.cc (materialize_cgraph): Call timevar_push before materialization starts.