Commit Graph

197836 Commits

Author SHA1 Message Date
Eric Botcazou
48d9f7cb21 ada: Another small adjustment to special resolution of membership test
This goes back to the original implementation but keeps the special size
test with universal_integer to cope with its limited range.

gcc/ada/

	* sem_res.adb (Resolve_Membership_Op): Adjust again latest change.
2023-01-03 10:29:53 +01:00
Eric Botcazou
83d52e6de2 ada: Make Sem_Util.Is_Aliased_View predicate more robust
The predicate implements the rules of the language so it needs to cope with
constructs rewritten by the expander, in particular explicit dereferences
that the expander uses liberally for various purposes.

This change makes the detection of rewritten calls more robust, plugging an
existing loophole for specific objects and exposing a missing propagation of
the Is_Aliased flag for certain build-in-place objects, as well as adds the
detection of rewritten return objects.

It also contains a small enhancement to Set_Debug_Info_Defining_Id aimed at
making it easier to debug the generated code by means of -gnatD.

gcc/ada/

	* sem_util.ads (Set_Debug_Info_Defining_Id): Adjust comment.
	* sem_util.adb (Is_Aliased_View) <N_Explicit_Dereference>: Return
	false for more artificial dereferences generated by the expander.
	(Set_Debug_Info_Defining_Id): Set Debug_Info_Needed unconditionally
	in -gnatD mode.
	* exp_ch6.adb (Replace_Renaming_Declaration_Id): Also preserve the
	Is_Aliased flag.
2023-01-03 10:29:53 +01:00
Joel Brobecker
1fc93c2437 ada: GNAT UGN: Adjust wording in "Platform-specific Information" chapter
The wording of the introduction paragraph specified an incomplete
list of OSes. Rather than trying to update the list, this commit
changes the text to make it more general. For those parts of
this chapter which only apply to specific OSes, the documentation
is written in a way that it is clear which OS it applies to.

gcc/ada/

	* doc/gnat_ugn/platform_specific_information.rst
	(_Platform_Specific_Information): Minor rewording of intro text.
	* gnat_ugn.texi: Regenerate.
2023-01-03 10:29:53 +01:00
Eric Botcazou
7caa684181 ada: Fix detection of function calls in object declarations
The current code has relied on Original_Node to detect rewritten function
calls in object declarations but that's not robust enough in the presence
of function calls written in object notation.

gcc/ada/

	* exp_util.ads (Is_Captured_Function_Call): Declare.
	* exp_util.adb (Is_Captured_Function_Call): New predicate.
	* exp_ch3.adb (Expand_N_Object_Declaration): Use it to detect a
	rewritten function call as the initializing expression.
	* exp_ch6.adb (Expand_Simple_Function_Return): Use it to detect a
	rewritten function call as the returned expression.
2023-01-03 10:29:53 +01:00
Bob Duff
7512dcc942 ada: Simplify [Small_]Integer_Type_For
Make Small_Integer_Type_For call Integer_Type_For,
so they share most of the code.

Remove Standard_Long_Integer from consideration,
because that's different on different machines (32- or 64-bit).
Standard_Integer or Standard_Long_Long_Integer will be
chosen.

gcc/ada/

	* exp_util.adb (Integer_Type_For): Assertion and comment.
	(Small_Integer_Type_For): Remove some code and call
	Integer_Type_For instead.
	* sem_util.ads (Rep_To_Pos_Flag): Improve comments. "Standard_..."
	seems overly pedantic here.
	* exp_attr.adb (Succ, Pred): Clean up: make the code as similar as
	possible.
	* exp_ch4.adb: Minor: named notation.
2023-01-03 10:29:52 +01:00
Javier Miranda
930b81af5b ada: Cannot reference ghost entity in class-wide precondition
gcc/ada/

	* ghost.adb (Is_OK_Declaration): A reference to a Ghost entity may
	appear within the class-wide precondition of a helper subprogram.
	This context is treated as suitable because it was already
	verified when we were analyzing the original class-wide
	precondition.
2023-01-03 10:29:52 +01:00
Eric Botcazou
e1e2b00703 ada: Fix support of Default_Component_Value aspect on derived types
The support of the Default_Component_Value aspect on derived constrained
array types is broken because of a couple of issues: 1) the derived types
incorrectly inherit the initialization procedure of the ancestor types
and 2) the propagation of the aspect does not work for constrained array
types (unlike for unconstrained array types).

gcc/ada/

	* exp_tss.adb (Base_Init_Proc): Do not return the Init_Proc of the
	ancestor type for a derived array type.
	* sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): Factor out the
	common processing done on representation items.
	For Default_Component_Value and Default_Value, look into the first
	subtype to find out the representation items.
2023-01-03 10:29:52 +01:00
GCC Administrator
fee53a3194 Daily bump. 2023-01-03 00:17:09 +00:00
Alexander Monakov
ec1db90179 i386: correct division modeling in lujiazui.md
Model the divider in Lujiazui processors as a separate automaton to
significantly reduce the overall model size. This should also result
in improved accuracy, as pipe 0 should be able to accept new
instructions while the divider is occupied.

It is unclear why integer divisions are modeled as if pipes 0-3 are all
occupied. I've opted to keep a single-cycle reservation of all four
pipes together, so GCC should continue trying to pack instructions
around a division accordingly.

Currently top three symbols in insn-automata.o are:

106102 r lujiazui_core_check
106102 r lujiazui_core_transitions
196123 r lujiazui_core_min_issue_delay

This patch shrinks all lujiazui tables to:

3 r lujiazui_decoder_min_issue_delay
20 r lujiazui_decoder_transitions
32 r lujiazui_agu_min_issue_delay
126 r lujiazui_agu_transitions
304 r lujiazui_div_base
352 r lujiazui_div_check
352 r lujiazui_div_transitions
1152 r lujiazui_core_min_issue_delay
1592 r lujiazui_agu_translate
1592 r lujiazui_core_translate
1592 r lujiazui_decoder_translate
1592 r lujiazui_div_translate
3952 r lujiazui_div_min_issue_delay
9216 r lujiazui_core_transitions

This continues the work on reducing i386 insn-automata.o size started
with similar fixes for division and multiplication instructions in
znver.md.

gcc/ChangeLog:

	PR target/87832
	* config/i386/lujiazui.md (lujiazui_div): New automaton.
	(lua_div): New unit.
	(lua_idiv_qi): Correct unit in the reservation.
	(lua_idiv_qi_load): Ditto.
	(lua_idiv_hi): Ditto.
	(lua_idiv_hi_load): Ditto.
	(lua_idiv_si): Ditto.
	(lua_idiv_si_load): Ditto.
	(lua_idiv_di): Ditto.
	(lua_idiv_di_load): Ditto.
	(lua_fdiv_SF): Ditto.
	(lua_fdiv_SF_load): Ditto.
	(lua_fdiv_DF): Ditto.
	(lua_fdiv_DF_load): Ditto.
	(lua_fdiv_XF): Ditto.
	(lua_fdiv_XF_load): Ditto.
	(lua_ssediv_SF): Ditto.
	(lua_ssediv_load_SF): Ditto.
	(lua_ssediv_V4SF): Ditto.
	(lua_ssediv_load_V4SF): Ditto.
	(lua_ssediv_V8SF): Ditto.
	(lua_ssediv_load_V8SF): Ditto.
	(lua_ssediv_SD): Ditto.
	(lua_ssediv_load_SD): Ditto.
	(lua_ssediv_V2DF): Ditto.
	(lua_ssediv_load_V2DF): Ditto.
	(lua_ssediv_V4DF): Ditto.
	(lua_ssediv_load_V4DF): Ditto.
2023-01-02 19:38:56 +03:00
Florian Weimer
cb775ecd6e libgcc: Specialize execute_cfa_program in DWARF unwinder for alignments
The parameters fs->data_align and fs->code_align always have fixed
values for a particular target in GCC-generated code.  Specialize
execute_cfa_program for these values, to avoid multiplications.

gcc/c-family/

	* c-cppbuiltin.cc (c_cpp_builtins): Define
	__LIBGCC_DWARF_CIE_DATA_ALIGNMENT__.

libgcc/

	* unwind-dw2-execute_cfa.h: New file.  Extracted from
	the execute_cfa_program function in unwind-dw2.c.
	* unwind-dw2.c (execute_cfa_program_generic): New function.
	(execute_cfa_program_specialized): Likewise.
	(execute_cfa_program): Call execute_cfa_program_specialized
	or execute_cfa_program_generic, as appropriate.
2023-01-02 16:18:02 +01:00
Florian Weimer
97bbdb726a Define __LIBGCC_DWARF_REG_SIZES_CONSTANT__ if DWARF register size is constant
And use that to speed up the libgcc unwinder.

gcc/

	* debug.h (dwarf_reg_sizes_constant): Declare.
	* dwarf2cfi.cc (dwarf_reg_sizes_constant): New function.

gcc/c-family/

	* c-cppbuiltin.cc (__LIBGCC_DWARF_REG_SIZES_CONSTANT__):
	Define if constant is known.

libgcc/

	* unwind-dw2.c (dwarf_reg_size): New function.
	(_Unwind_GetGR, _Unwind_SetGR, _Unwind_SetGRPtr)
	(_Unwind_SetSpColumn, uw_install_context_1): Use it.
	(uw_init_context_1): Do not initialize dwarf_reg_size_table
	if not in use.
2023-01-02 16:18:02 +01:00
Florian Weimer
3b6cac2b44 Compute a table of DWARF register sizes at compile
The sizes are compile-time constants.  Create a vector with them,
so that they can be inspected at compile time.

gcc/

	* dwarf2cfi.cc (init_return_column_size): Remove.
	(init_one_dwarf_reg_size): Adjust.
	(generate_dwarf_reg_sizes): New function.  Extracted
	from expand_builtin_init_dwarf_reg_sizes.
	(expand_builtin_init_dwarf_reg_sizes): Call
	generate_dwarf_reg_sizes.
	* target.def (init_dwarf_reg_sizes_extra): Adjust
	hook signature.
	* config/msp430/msp430.cc
	(msp430_init_dwarf_reg_sizes_extra): Adjust.
	* config/rs6000/rs6000.cc
	(rs6000_init_dwarf_reg_sizes_extra): Likewise.
	* doc/tm.texi: Update.
2023-01-02 16:18:02 +01:00
Iain Sandoe
8385088039 Ada,Darwin: Do not link libgcc statically on Darwin 8 and 9 [PR108202].
Normally, GCC executables are built with -static-libstdc++ -static-libgcc
on Darwin.  This is fine in most cases, because GCC executables typically
do no use exceptions.   However gnat1 does use exceptions and also pulls
in system libraries that are linked against the installed shared libgcc
which contains the system unwinder.  This means that gnat1 effectively has
two unwinder instances (which does not work reliably since the unwinders
have global state).

A recent change in the initialization of FDEs has made this a hard error
now on Darwin versions (8 and 9) with libgcc installed in /usr/lib (gnat1
now hangs when an exception is thrown).

The solution is to link libgcc dynamically, picking up the installed
system version.  To do this we strip -static-libgcc from the link flags.

	PR ada/108202

gcc/ada/ChangeLog:

	* gcc-interface/Make-lang.in (GCC_LINKERFLAGS, GCC_LDFLAGS):
	Versions of ALL_LINKERFLAGS, LDFLAGS with -Werror and
	-static-libgcc filtered out for Darwin8 and 9 (-Werror is filtered
	out for other hosts).
2023-01-02 10:52:59 +00:00
Jakub Jelinek
46c0ea7704 Update copyright years. 2023-01-02 09:46:13 +01:00
Jakub Jelinek
aeee481244 Update copyright years. 2023-01-02 09:40:19 +01:00
Jakub Jelinek
ff59f76fb8 Update Copyright year in ChangeLog files
2022 -> 2023
2023-01-02 09:36:59 +01:00
Jakub Jelinek
74d5206fb6 Update copyright dates.
Manual part of copyright year updates.

2023-01-02  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* gcc.cc (process_command): Update copyright notice dates.
	* gcov-dump.cc (print_version): Ditto.
	* gcov.cc (print_version): Ditto.
	* gcov-tool.cc (print_version): Ditto.
	* gengtype.cc (create_file): Ditto.
	* doc/cpp.texi: Bump @copying's copyright year.
	* doc/cppinternals.texi: Ditto.
	* doc/gcc.texi: Ditto.
	* doc/gccint.texi: Ditto.
	* doc/gcov.texi: Ditto.
	* doc/install.texi: Ditto.
	* doc/invoke.texi: Ditto.
gcc/ada/
	* gnat_ugn.texi: Bump @copying's copyright year.
	* gnat_rm.texi: Likewise.
gcc/d/
	* gdc.texi: Bump @copyrights-d year.
gcc/fortran/
	* gfortranspec.cc (lang_specific_driver): Update copyright notice
	dates.
	* gfc-internals.texi: Bump @copying's copyright year.
	* gfortran.texi: Ditto.
	* intrinsic.texi: Ditto.
	* invoke.texi: Ditto.
gcc/go/
	* gccgo.texi: Bump @copyrights-go year.
libgomp/
	* libgomp.texi: Bump @copying's copyright year.
libitm/
	* libitm.texi: Bump @copying's copyright year.
libquadmath/
	* libquadmath.texi: Bump @copying's copyright year.
2023-01-02 09:26:59 +01:00
Jakub Jelinek
68127a8e87 Update Copyright year in ChangeLog files
2022 -> 2023
2023-01-02 09:23:36 +01:00
GCC Administrator
d4382aedcd Daily bump. 2023-01-02 00:16:34 +00:00
Roger Sayle
4f1314f547 Add post-reload splitter for extendditi2 on x86_64.
This is another step towards a possible solution for PR 105137.
This patch introduces a define_insn for extendditi2 that allows
DImode to TImode sign-extension to be represented in the early
RTL optimizers, before being split post-reload into the exact
same idiom as currently produced by RTL expansion.

Typically this produces the identical code, so the first new
test case:
__int128 foo(long long x) { return (__int128)x; }

continues to generate:
foo:	movq    %rdi, %rax
        cqto
        ret

The "magic" is that this representation allows combine and the
other RTL optimizers to do a better job.  Hence, the second
test case:

__int128 foo(__int128 a, long long b) {
    a += ((__int128)b) << 70;
    return a;
}

which mainline with -O2 currently generates as:

foo:	movq    %rsi, %rax
        movq    %rdx, %rcx
        movq    %rdi, %rsi
        salq    $6, %rcx
        movq    %rax, %rdi
        xorl    %eax, %eax
        movq    %rcx, %rdx
        addq    %rsi, %rax
        adcq    %rdi, %rdx
        ret

with this patch now becomes:
foo:    movl    $0, %eax
        salq    $6, %rdx
        addq    %rdi, %rax
        adcq    %rsi, %rdx
        ret

i.e. the same code for the signed and unsigned extension variants.

2023-01-01  Roger Sayle  <roger@nextmovesoftware.com>
	    Uroš Bizjak  <ubizjak@gmail.com>

gcc/ChangeLog
	* config/i386/i386.md (extendditi2): New define_insn.
	(define_split): Use DWIH mode iterator to treat new extendditi2
	identically to existing extendsidi2_1.
	(define_peephole2): Likewise.
	(define_peephole2): Likewise.
	(define_Split): Likewise.

gcc/testsuite/ChangeLog
	* gcc.target/i386/extendditi2-1.c: New test case.
	* gcc.target/i386/extendditi2-2.c: Likewise.
2023-01-01 17:00:28 +00:00
Jakub Jelinek
d64f877906 Rotate ChangeLog files.
Rotate ChangeLog files for ChangeLogs with yearly cadence.
2023-01-01 16:20:13 +01:00
Iain Sandoe
d423e8dc59 modula2: Ensure that module registration constructors are 'extern' [PR108183].
The symbols for module registration constructors need to be external
or we get wrong code generated for targets that allow direct access to
local symbol definitions.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

	PR modula2/108183

gcc/m2/ChangeLog:

	* gm2-compiler/M2GCCDeclare.mod: Module registration constructors are
	externs to the builder of m2_link.

Co-Authored-By: Gaius Mulley <gaiusmod2@gmail.com>
2023-01-01 09:29:07 +00:00
GCC Administrator
90323d0b4b Daily bump. 2023-01-01 00:17:17 +00:00
Iain Sandoe
70a5e6280d configure: Do not build the ununsed libffi shared library.
We do not use the shared libffi libraray, nor do we install it.
However, on at least Darwin, the shared version will be picked
up for testing, so it is preferrable not to build it.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

ChangeLog:

	* Makefile.def: Do not build shared libffi.
	* Makefile.in: Regenerate.
2022-12-31 17:51:47 +00:00
Iain Sandoe
2d8c2fdc29 modula-2,libgm2: Add undefined, dynamic_lookup to m2 libs links.
The libm2 libraries are cross-linked, which means that we need to allow
symbols to be undefined at link time and then to be found at runtime.

This is implemented on Darwin by adding -undefined, dynamic_lookup to
the link command.

NOTE: It would probably be a better solution to rework the libraries
either to combine those that have inter-dependencies, or to reorder
the layering so the there is a fixed dependency tree.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

libgm2/ChangeLog:

	* configure: Regenerate.
	* configure.ac: Make a conditional for configurations targeting
	Darwin.
	* libm2cor/Makefile.am: Use -undefined,dynamic_lookup on Darwin.
	* libm2iso/Makefile.am: Likewise.
	* libm2log/Makefile.am: Likewise.
	* libm2pim/Makefile.am: Likewise
	* libm2min/Makefile.am: Likewise
	* libm2cor/Makefile.in: Regenerate.
	* libm2iso/Makefile.in: Regenerate.
	* libm2log/Makefile.in: Regenerate.
	* libm2min/Makefile.in: Regenerate.
	* libm2pim/Makefile.in: Regenerate.
2022-12-31 16:16:30 +00:00
Rainer Orth
ebc41f9a81 modula-2: Fix building the plugin for Darwin [PR107612].
* Makes the configured value for INCINTL available as a variable so that
it can be used in language makefile fragements.  It is then used in the m2
fragment to make the include path available to the plugin compile.

 * Updates the DSO suffix  to use .dylib for Darwin.

 * Adds '-Wl,-undefined,dynamic_lookup' to the link flags so that symbols can
   be resolved at runtime.

 * Removes the extraneous $(exeext) from the DSO names.

Since the linking is driven by CXX, we also need to supress the addition of
default libraries otherwise:
 (1) we will get a reference to an uninstalled libstdc++
 (2) the process opening the plugin would have two instances 0f libstdc++ -
     one statically linked into gm2 and one dynamically linked into the plugin.

	PR modula2/107612

gcc/ChangeLog:

	* Makefile.in: Make the configured libintl includes avaiable in INCINTL.
	(BUILD_CPPFLAGS): Use INCINTL.

gcc/m2/ChangeLog:

	* Make-lang.in (soext): Use .dylib for Darwin.
	(PLUGINLDFLAGS): Use dynmic lookup, set the plugin name, and append
	-nodefaultlibs to suppress the linking of libstdc++.
	Use INCINTL in compile lines for the plugin.

Co-Authored-By: Iain Sandoe <iain@sandoe.co.uk>
2022-12-31 15:49:04 +00:00
GCC Administrator
0e8c946508 Daily bump. 2022-12-31 00:17:04 +00:00
Alexandre Oliva
012fdbc142 check hash table insertions
I've noticed a number of potential problems in hash tables, of three
kinds: insertion of entries that seem empty, dangling insertions, and
lookups during insertions.

These problems may all have the effect of replacing a deleted entry
with one that seems empty, which may disconnect double-hashing chains
involving that entry, and thus cause entries to go missing.

This patch detects such problems by recording a pending insertion and
checking that it's completed before other potentially-conflicting
operations.  The additional field is only introduced when checking is
enabled.


for  gcc/ChnageLog

	* hash-table.h (check_complete_insertion, check_insert_slot):
	New hash_table methods.
	(m_inserting_slot): New hash_table field.
	(begin, hash_table ctors, ~hash_table): Check previous insert.
	(expand, empty_slow, clear_slot, find_with_hash): Likewise.
	(remote_elt_with_hash, traverse_noresize): Likewise.
	(gt_pch_nx): Likewise.
	(find_slot_with_hash): Likewise.  Record requested insert.
2022-12-30 13:44:50 -03:00
Martin Uecker
ebf7dd754a regressions tests for PR103770
This adds tests from bugzilla for PR103770 and duplicates.

gcc/testsuite/
	* gcc.dg/pr103770.c: New test.
	* gcc.dg/pr103859.c: New test.
	* gcc.dg/pr105065.c: New test.
2022-12-30 14:51:37 +01:00
Stam Markianos-Wright
4269a6567e Fix memory constraint on MVE v[ld/st][2/4] instructions [PR107714]
In the M-Class Arm-ARM:

https://developer.arm.com/documentation/ddi0553/bu/?lang=en

these MVE instructions only have '!' writeback variant and at:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107714

we found that the Um constraint would also allow through a
register offset writeback, resulting in an assembler error.

Here I have added a new constraint and predicate for these
instructions, which (uniquely, AFAICT), only support a `!` writeback
increment by the data size (inside the compiler this is a POST_INC).

No regressions in arm-none-eabi with MVE and MVE.FP.

gcc/ChangeLog:
	PR target/107714
	* config/arm/arm-protos.h (mve_struct_mem_operand): New protoype.
	* config/arm/arm.cc (mve_struct_mem_operand): New function.
	* config/arm/constraints.md (Ug): New constraint.
	* config/arm/mve.md (mve_vst4q<mode>): Change constraint.
	(mve_vst2q<mode>): Likewise.
	(mve_vld4q<mode>): Likewise.
	(mve_vld2q<mode>): Likewise.
	* config/arm/predicates.md (mve_struct_operand): New predicate.

gcc/testsuite/ChangeLog:
	PR target/107714
	* gcc.target/arm/mve/intrinsics/vldst24q_reg_offset.c: New test.
2022-12-30 11:25:22 +00:00
Steve Kargl
cdc6bf44ee Modify checks to avoid referencing NULL pointer.
Update test cases with error messages that changed as a result.

gcc/fortran/ChangeLog:

	PR fortran/102595
	* decl.cc (attr_decl1): Guard against NULL pointer.
	* parse.cc (match_deferred_characteristics): Include BT_CLASS in check for
	derived being undefined.

gcc/testsuite/ChangeLog:

	PR fortran/102595
	* gfortran.dg/class_result_4.f90: Update error message check.
	* gfortran.dg/pr85779_3.f90: Update error message check.
2022-12-29 19:25:17 -08:00
GCC Administrator
bbab9c83f2 Daily bump. 2022-12-30 00:16:36 +00:00
Alexandre Oliva
603da20168 prevent hash set/map insertion of deleted entries
Just like the recently-added checks for empty entries, add checks for
deleted entries as well.  This didn't catch any problems, but it might
prevent future accidents.  Suggested by David Malcolm.


for  gcc/ChangeLog

	* hash-map.h (put, get_or_insert): Check that added entry
	doesn't look deleted either.
	* hash-set.h (add): Likewise.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
512af6c380 parloops: don't request insert that won't be completed
In take_address_of, we may refrain from completing a decl_address
INSERT if gsi is NULL, so dnn't even ask for an INSERT in this case.


for  gcc/ChangeLog

	* tree-parloops.cc (take_address_of): Skip INSERT if !gsi.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
8d48107702 hash-map: reject empty-looking insertions
Check, after inserting entries, that they don't look empty.


for  gcc/ChangeLog

	* hash-map.h (put, get_or_insert): Check that entry does not
	look empty after insertion.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
1b92708520 hash set: reject attempts to add empty values
Check, after adding a key to a hash set, that the entry does not look
empty.


for  gcc/ChangeLog

	* hash-set.h (add): Check that the inserted entry does not
	look empty.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
025e3d5799 ada: don't map NULL decl to locus
When decl is NULL, don't record its mapping in the
decl_to_instance_map.


for  gcc/ada/ChangeLog

	* gcc-interface/trans.cc (Sloc_to_locus): Don't map NULL decl.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
3d40144cb4 lto: drop dummy partition mapping
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-29 14:39:47 -03:00
Alexandre Oliva
6ec8079e0b [C++] constexpr: request insert iff depth is ok
cxx_eval_call_expression requests an INSERT even in cases when it
would later decide not to insert.  This could break double-hashing
chains.  Arrange for it to use NO_INSERT when the insertion would not
be completed.


for  gcc/cp/ChangeLog

	* constexpr.cc (cxx_eval_call_expression): Do not request an
	INSERT that would not be completed.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
06be65894f tm: complete tm_restart insertion
Insertion of a tm_restart_node in tm_restart failed to record the
newly-allocated node in the hash table.


for  gcc/ChangeLog

	* trans-mem.cc (split_bb_make_tm_edge): Record new node in
	tm_restart.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
184278b93f postreload-gcse: no insert on mere lookup
lookup_expr_in_table is not used for insertions, but it mistakenly
used INSERT rather than NO_INSERT.


for  gcc/ChangeLog

	* postreload-gcse.cc (lookup_expr_in_table): Use NO_INSERT.
2022-12-29 14:39:47 -03:00
Alexandre Oliva
a7d397bf6f tree-inline decl_map: skip mapping result's NULL default def
If a result doesn't have a default def, don't attempt to remap it.


for  gcc/ChangeLog

	* tree-inline.cc (declare_return_variable): Don't remap NULL
	default def of result.
2022-12-29 14:39:46 -03:00
Alexandre Oliva
e2535c6035 ssa-loop-niter: skip caching of null operands
When a TREE_OPERAND is NULL, do not cache it.


for  gcc/ChangeLog

	* tree-ssa-loop-niter.cc (expand_simple_operands): Refrain
	from caching NULL TREE_OPERANDs.
2022-12-29 14:39:46 -03:00
Alexandre Oliva
8251f31943 [C++] constraint: insert norm entry once
Use NO_INSERT to test whether inserting should be attempted.


for  gcc/cp/ChangeLog

	* constraint.cc (normalize_concept_check): Use NO_INSERT for
	pre-insertion check.
2022-12-29 14:39:46 -03:00
Alexandre Oliva
d7c8a16537 tree-inline decl_map: skip mapping NULL to itself
Mapping a NULL key is no use, skip it.


for  gcc/ChangeLog

	* tree-inline.cc (insert_decl_map): Skip mapping a NULL decl
	as value to itself.
2022-12-29 14:39:46 -03:00
Alexandre Oliva
50a0270389 varpool: do not add NULL vnodes to referenced
Avoid adding NULL vnodes to referenced tables.


for  gcc/ChangeLog

	* varpool.cc (symbol_table::remove_unreferenced_decls): Do not
	add NULL vnodes to referenced table.
2022-12-29 14:32:48 -03:00
Alexandre Oliva
26be8b8460 scoped tables: insert before further lookups
Avoid hash table lookups between requesting an insert and storing the
inserted value in avail_exprs_stack.  Lookups before the insert is
completed could fail to find double-hashed elements.


for  gcc/ChangeLog

	* tree-ssa-scopedtables.cc
	(avail_exprs_stack::lookup_avail_expr): Finish hash table
	insertion before further lookups.
2022-12-29 14:32:46 -03:00
Max Filippov
da086e472b gcc: xtensa: use GP_RETURN_* instead of magic constant
gcc/
	* config/xtensa/xtensa.cc (xtensa_return_in_memory): Use
	GP_RETURN_* instead of magic constant.
2022-12-29 07:04:59 -08:00
Takayuki 'January June' Suwa
65fed695f7 xtensa: Check DF availability before use
Perhaps no problem, but for safety.

gcc/ChangeLog:

	* config/xtensa/xtensa.cc (xtensa_expand_prologue): Fix to check
	DF availability before use of DF_* macros.
2022-12-29 07:04:25 -08:00
GCC Administrator
9b111debbf Daily bump. 2022-12-29 00:17:39 +00:00