Commit Graph

184839 Commits

Author SHA1 Message Date
Richard Biener
2326627eb1 tree-optimization/100398 - avoid DSE of control flow stmt
The following makes sure to preserve control altering stmts
when removing trivially dead stmts in DSE.

2021-05-04  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/100398
	* tree-ssa-dse.c (pass_dse::execute): Preserve control
	altering stmts.

	* gcc.dg/torture/pr100398.c: New testcase.
2021-05-04 12:31:50 +02:00
Piotr Trojanek
00d8545d70 [Ada] Remove arbitrary and redundant qualification with Sinfo
gcc/ada/

	* pprint.adb: Remove qualification of arbitrary calls to
	Sinfo.Expressions and Sinfo.Parameter_Associations.
2021-05-04 05:17:36 -04:00
Piotr Trojanek
2ae4fcfa87 [Ada] Use function and not procedure UI_Image in pretty-printing
gcc/ada/

	* pprint.adb (Expr_Name): Simplify with functional variant of
	UI_Image.
2021-05-04 05:17:35 -04:00
Piotr Trojanek
8ee1a28114 [Ada] Reuse existing To_Mixed routine in pretty-printer
gcc/ada/

	* pprint.adb (To_Mixed): Removed.
2021-05-04 05:17:35 -04:00
Piotr Trojanek
6c1655399b [Ada] Refine type of a counter variable from Integer to Natural
gcc/ada/

	* pprint.adb (List_Name_Count): Change type from Integer to
	Natural.
2021-05-04 05:17:35 -04:00
Yannick Moy
e243bf2349 [Ada] Minor tweak in pretty-printing of expressions
gcc/ada/

	* pprint.adb (Expression_Image): Special case for
	expression-with-actions.
2021-05-04 05:17:35 -04:00
Bob Duff
9b6a2de07d [Ada] Do not "optimize" by converting Positive to Unsigned
gcc/ada/

	* exp_ch4.adb (Expand_Concatenate): Remove the non-optimization.
2021-05-04 05:17:34 -04:00
Piotr Trojanek
d20bab53d0 [Ada] Reuse First_Formal for generic subprograms
gcc/ada/

	* lib-xref.adb (Generate_Reference_To_Formals): Remove dedicated
	branch for generic subprograms (they are now handled together
	with non-generic subprograms in the ELSE branch); replace a
	low-level Ekind membership test with a high-level call to
	Is_Access_Subprogram_Type.
2021-05-04 05:17:34 -04:00
Piotr Trojanek
86203b44de [Ada] Fix inconsistent iteration with First_Formal and Next_Entity
gcc/ada/

	* sem_ch12.adb (Check_Abstract_Primitives): Match First_Formal
	with Next_Formal.
	* sem_ch6.adb (Is_Non_Overriding_Operation): Likewise.
2021-05-04 05:17:34 -04:00
Piotr Trojanek
5a3070dff1 [Ada] Simplify iteration over formal parameters for Global/Depends check
gcc/ada/

	* sem_prag.adb (Collect_Global_Item): Iterate directly over
	formals.
2021-05-04 05:17:34 -04:00
Piotr Trojanek
7f9f8889fe [Ada] Fix handling of access-to-variable objects in Global and Depends
gcc/ada/

	* sem_prag.ads (Collect_Subprogram_Inputs_Outputs): Update
	comment; this routine is no longer used by GNATprove.
	* sem_prag.adb (Find_Role): The IN parameter is on output only
	when it belongs to non-function; also, the otherwise constant
	object can only be written by a non-function.
	(Collect_Global_Item): The IN parameter can only be written when
	it belongs to non-function; also, unnest this check to make it
	easier to read.
2021-05-04 05:17:33 -04:00
Arnaud Charlet
7367cd5949 [Ada] Assert_Failure vs Assertion_Error
gcc/ada/

	* libgnat/s-assert.ads (Assert_Failure): Now a renaming of
	Assertion_Error.
	* libgnat/a-assert.ads (Assertion_Error): Now a first class
	citizen.  Remove dependency on System.Assertions.
	* gcc-interface/a-assert.ads, gcc-interface/a-assert.adb: New.
	* gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Add
	a-assert.o from gcc-interface.
2021-05-04 05:17:33 -04:00
Yannick Moy
716e7c15ab [Ada] Move match function for pragma Warnings to public spec
gcc/ada/

	* erroutc.adb (Matches): Move spec...
	* erroutc.ads (Matches): ...here.
2021-05-04 05:17:33 -04:00
Yannick Moy
f5a7c656e5 [Ada] Use error marker for messages in GNATprove mode
gcc/ada/

	* gnat1drv.adb (Adjust_Global_Switches): Force error marker in
	GNATprove mode.
2021-05-04 05:17:32 -04:00
Bob Duff
0964be0713 [Ada] Clean up ??? marks
gcc/ada/

	* binde.adb: No need for ??? marks in Binde, because it is
	superseded by Bindo.
	* bindo-writers.adb (Write_Unit_Closure): Verified that -Ra
	works.
	* exp_ch4.adb, sinfo.ads (Expand_N_Type_Conversion): Rules for
	conversions passed to gigi are documented in sinfo.ads.
	(Expand_N_Unchecked_Type_Conversion): Comment is a duplicate of
	one in sinfo.ads.
	(Expand_N_In): Robert already added sufficient comments years
	after the ??? comment was inserted.
	(Expand_Membership_Minimize_Eliminate_Overflow): I don't see any
	reason why Stand should export Long_Long_Integer'Base -- it
	doesn't export any other base types.
	(Size_In_Storage_Elements): We are doing an allocator, so we
	don't care about sizes in bits.
	(Expand_N_Allocator): PolyORB isn't going to be significantly
	improved, so we're not going to mess with remote access to
	class-wide types.
	(Optimize_Return_Stmt): It's not important to optimize return
	statements in predicate functions -- there are many
	more-important optimizations we could do. Keep part of the
	comment without "???", to clarify why the "and then ...".
	(User_Defined_Primitive_Equality_Op): The optimization doesn't
	seem important enough.
	(Expand_N_Unchecked_Type_Conversion): Refactor to use
	Expand_N_Unchecked_Expression.
	(Make_Array_Comparison_Op): This seems like a case of "it it's
	not broken, don't fix it". Too much risk of causing bugs.
	* debug_a.adb: Remove ??? comments asking why Current_Error_Node
	is maintained unconditionally, and add a comment explaining why.
	* errout.adb: These kinds of minor bugs do indeed exist, but
	we're never going to get around to fixing them "properly", so we
	need this code for robustness.
	* gnatchop.adb (Read_File): Document when read can fail.
	* gnatdll.adb (Parse_Command_Line): Nobody is complaining about
	these arbitrary limits, so no need to use Table. Increase the
	limits just in case.  It is clear from the names what they are
	limits on.
	* gnatlink.adb: Add needed comments.
	(Delete): An existing comment makes clear it's intentional, and
	it's been like that since 1996.
	(Process_Args): Improve comments.
	(Search_Library_Path): Refactoring to avoid deep nesting.
	* inline.adb (Build_Body_To_Inline): Probably won't get around
	to doing that optimization.
	(Is_Unit_Subprogram): No, this should not be moved to Sem_Aux,
	because it is too specialized to this context.
	(Do_Reset): No comment is needed here; it's clear from the
	comment on Reset_Dispatching_Calls. Do_Reset is an artificial
	subprogram; if we had proper iterators, it would just be an if
	statement in the loop.
	(Rewrite_Function_Call): Probably won't get around to doing that
	optimization.
	* layout.adb (Layout_Type): The gigi comment doesn't need to be
	a ??? comment, and it's been that way since 2000.  The
	limitation to scalars will likely never be investigated, and
	it's been that way since 2009.
	* lib.adb (Check_Same_Extended_Unit): This doesn't look like
	something that needs fixing; it looks like a permanent
	workaround.
	* lib-load.adb (Change_Main_Unit_To_Spec): It is good enough in
	practice.
	(Load_Unit): Nobody will ever get around to investigating the
	obscure PMES oddity, and the optimization is not worth the
	trouble.
	* live.adb: It's not worth documenting this. It is used only
	with a debug switch. Nobody who has done significant work on it
	is still around, so it would require substantial investigation.
	* mdll.ads: I see no reason for USE.
	* namet.ads: Routines are obsolete, but they're not going
	anywhere anytime soon (too much work, and surprisingly delicate
	because of dependences on global variables).
	* osint.ads: Minor.
	* osint.adb: Improve comments.
	(Full_Lib_File_Name): Use Smart_Find_File.
2021-05-04 05:17:32 -04:00
Piotr Trojanek
86a9605014 [Ada] Reuse Is_Formal_Object where convenient
gcc/ada/

	* exp_prag.adb, sem_prag.adb: Replace low-level Ekind membership
	tests with a high-level call to Is_Formal_Object.
2021-05-04 05:17:32 -04:00
Arnaud Charlet
2d5e5d89ad [Ada] Address some ??? comments
gcc/ada/

	* cstand.adb, sprint.adb, switch-c.adb, xr_tabls.ads,
	xr_tabls.adb, xref_lib.adb: Address ??? comments.
2021-05-04 05:17:32 -04:00
Piotr Trojanek
0a272ac33f [Ada] Reject constants of access-to-variable type as function globals
gcc/ada/

	* sem_prag.adb (Analyze_Global_Item): Take subprogram kind into
	account when accepting or rejecting a constant of an
	access-to-variable type as a global Output/In_Out; do this check
	inside an ELSIF branch to avoid unnecessary evaluation of the
	subsequent condition.
2021-05-04 05:17:31 -04:00
Piotr Trojanek
43758c2cff [Ada] Simplify use of a global name buffer for Global/Depends errors
gcc/ada/

	* sem_prag.adb (Role_Error, Usage_Error): Replace calls to
	Name_Find and Get_Name_String with a call to To_String.
2021-05-04 05:17:31 -04:00
Ed Schonberg
13112239f8 [Ada] Ongoing work for AI12-0212: container aggregates
gcc/ada/

	* exp_aggr.adb (Build_Siz_Exp): new function, subsidiary of
	Expand_Container_Aggregate, to create an expression to be used
	in the dynamic allocation of a container with a single container
	element association.
	(Add_Range): Handle static bounds of ranges over enumerations.
	(Expand_Container_Aggregate): Add declaration for size
	expression when needed, and use it in container object
	declaration for container.
2021-05-04 05:17:31 -04:00
Arnaud Charlet
213c9dc78e [Ada] Missing finalization on generic instantiation
gcc/ada/

	* exp_ch7.adb (Build_Finalizer_Helper.New_Finalizer_Name):
	Unnest so that it can be reused.
	(Build_Finalizer_Helper.Process_Declarations): Call the
	xxx__finalize_body procedure of a package instantiation in case
	it contains finalization statements.  Code clean ups.
	(Build_Finalizer_Helper.Create_Finalizer): Export and set an
	Interface_Name for library level finalizers since these may be
	imported now.
	(Build_Finalizer_Helper): Need to process library level package
	body instantiations which may contain objects requiring
	finalization.
	* libgnat/s-finmas.ads: Fix typo.
2021-05-04 05:17:31 -04:00
Arnaud Charlet
869a06d981 [Ada] Address some ??? comments in checks.adb
gcc/ada/

	* checks.adb (Append_Range_Checks, Apply_Selected_Length_Checks,
	Determine_Range, Insert_Range_Checks,
	Install_Null_Excluding_Check, Selected_Length_Checks,
	Selected_Range_Checks): Address ??? comments and code cleanups.
2021-05-04 05:17:30 -04:00
Piotr Trojanek
c356dfdd6f [Ada] Reject formals of mode IN appearing as global outputs
gcc/ada/

	* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context):
	Apply the rule even with no explicit Global contract (and remove
	a dead condition for Refined_Global).
2021-05-04 05:17:30 -04:00
Piotr Trojanek
98a54aa504 [Ada] Check entries for formals of mode IN appearing as global outputs
gcc/ada/

	* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context):
	Extend check to protected entries.
2021-05-04 05:17:30 -04:00
Piotr Trojanek
6aca8cf819 [Ada] Fix reference to SPARK RM rule in comment
gcc/ada/

	* sem_prag.adb (Check_Mode_Restriction_In_Enclosing_Context):
	Fix reference to SPARK RM rule number.
2021-05-04 05:17:30 -04:00
Eric Botcazou
c63bb4f3aa [Ada] Preliminary cleanup in floating-point output implementation
gcc/ada/

	* exp_intr.adb: Remove with/use clauses for Urealp.
	(Expand_Is_Negative): Delete.
	(Expand_Intrinsic_Call): Do not call it.
	* rtsfind.ads (RE_Id): Remove RE_Float_Unsigned.
	(RE_Unit_Table): Remove entry for RE_Float_Unsigned.
	* snames.ads-tmpl (Name_Is_Negative): Delete.
	* libgnat/s-imgrea.ads (Set_Image_Real): Fix mode of S parameter.
	* libgnat/s-imgrea.adb: Add with/use clauses for System.Img_Util.
	(LLU): New subtype.
	(Maxdigs): Use it.
	(Is_Negative): Reimplement.
	(Image_Floating_Point): Simplify.
	(Set_Image_Real): Fix mode of S parameter.  Remove the low-level
	processing on characters.  Flip the sign of the Scale variable.
	Compute the maximum number of digits for the straight notation.
	Call Set_Decimal_Digits at the end to do the final formatting.
	* libgnat/s-imguti.ads (Floating_Invalid_Value): New type.
	(Set_Floating_Invalid_Value): New procedure.
	* libgnat/s-imguti.adb (Set_Floating_Invalid_Value): Implement it
	based on existing code from Set_Image_Real.
	* libgnat/s-unstyp.ads (Float_Unsigned): Delete.
2021-05-04 05:17:29 -04:00
Piotr Trojanek
d4b0a29469 [Ada] Fix inconsistent handling of character set control switches
gcc/ada/

	* csets.adb (Initialize): Refactor into CASE statement; raise
	exception on unsupported code of character set (it will be
	gently rejected earlier when scanning command line switches).
	* switch-b.adb (Scan_Binder_Switches): Refactor into a
	membership expression; add missing '9' choice; reorder as
	described by GNAT UG, section 4.3.11.
	* switch-c.adb (Scan_Front_End_Switches): Refactor into a
	membership expression and reorder as above.
	* doc/gnat_ugn/building_executable_programs_with_gnat.rst
	(gnatic): Mention '5' as an allowed value for "c".
	* gnat_ugn.texi: Regenerate.
2021-05-04 05:17:29 -04:00
Piotr Trojanek
b65d9aff59 [Ada] Guard against leading and trailing spaces reappearing in errors
gcc/ada/

	* errout.adb (Error_Msg_Internal): Add assertion to prevent
	style mistakes reappearing in the future.
2021-05-04 05:17:29 -04:00
Javier Miranda
6d326562ff [Ada] Wrong membership test computation for interface type
gcc/ada/

	* exp_ch4.adb (Tagged_Membership): Remove wrong condition that
	is not consistent with the documentation of this subprogram.
2021-05-04 05:17:28 -04:00
Yannick Moy
2175592bf7 [Ada] Fix continuation message for missing ALL in access type
gcc/ada/

	* sem_res.adb (Valid_Conversion): Make message a continuation.
2021-05-04 05:17:28 -04:00
Arnaud Charlet
d90be3279f [Ada] Address ??? comments in styleg.adb
gcc/ada/

	* styleg.adb: Address ??? comments.
2021-05-04 05:17:28 -04:00
Tobias Burnus
08fff201c9 OpenMP/Fortran - fix pasto + testcase in depobj [PR100397]
gcc/fortran/ChangeLog:

	PR testsuite/100397
	* trans-openmp.c (gfc_trans_omp_depobj): Fix pasto in enum values.

libgomp/ChangeLog:

	PR testsuite/100397
	* testsuite/libgomp.fortran/depobj-1.f90 (dep2, dep3): Move var
	declaration to scope of non-'depend'-guarded assignment to avoid races.
2021-05-04 09:22:36 +02:00
Prathamesh Kulkarni
5fbe6a8e73 Fix typo in builtins.c.
gcc/ChangeLog:

2021-05-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

	* builtins.c (try_store_by_multiple_pieces): Fix constfun's prototype.
2021-05-04 11:11:18 +05:30
Alexandre Oliva
da9e6e63d1 introduce try store by multiple pieces
The ldist pass turns even very short loops into memset calls.  E.g.,
the TFmode emulation calls end with a loop of up to 3 iterations, to
zero out trailing words, and the loop distribution pass turns them
into calls of the memset builtin.

Though short constant-length clearing memsets are usually dealt with
efficiently, for non-constant-length ones, the options are setmemM, or
a function calls.

RISC-V doesn't have any setmemM pattern, so the loops above end up
"optimized" into memset calls, incurring not only the overhead of an
explicit call, but also discarding the information the compiler has
about the alignment of the destination, and that the length is a
multiple of the word alignment.

This patch handles variable lengths with multiple conditional
power-of-2-constant-sized stores-by-pieces, so as to reduce the
overhead of length compares.

It also changes the last copy-prop pass into ccp, so that pointer
alignment and length's nonzero bits are detected and made available
for the expander, even for ldist-introduced SSA_NAMEs.


for  gcc/ChangeLog

	* builtins.c (try_store_by_multiple_pieces): New.
	(expand_builtin_memset_args): Use it.  If target_char_cast
	fails, proceed as for non-constant val.  Pass len's ctz to...
	* expr.c (clear_storage_hints): ... this.  Try store by
	multiple pieces after setmem.
	(clear_storage): Adjust.
	* expr.h (clear_storage_hints): Likewise.
	(try_store_by_multiple_pieces): Declare.
	* passes.def: Replace the last copy_prop with ccp.
2021-05-03 22:48:47 -03:00
GCC Administrator
e690396da7 Daily bump. 2021-05-04 00:16:53 +00:00
Tom de Vries
f87990a2a8 [openmp, simt] Disable SIMT for user-defined reduction
The test-case included in this patch contains this target region:
...
  for (int i0 = 0 ; i0 < N0 ; i0++ )
    counter_N0.i += 1;
...

When running with nvptx accelerator, the counter variable is expected to
be N0 after the region, but instead is N0 / 32.  The problem is that rather
than getting the result for all warp lanes, we get it for just one lane.

This is caused by the implementation of SIMT being incomplete.  It handles
regular reductions, but appearantly not user-defined reductions.

For now, handle this by disabling SIMT in this case, specifically by setting
sctx->max_vf to 1.

Tested libgomp on x86_64-linux with nvptx accelerator.

gcc/ChangeLog:

2021-05-03  Tom de Vries  <tdevries@suse.de>

	PR target/100321
	* omp-low.c (lower_rec_input_clauses): Disable SIMT for user-defined
	reduction.

libgomp/ChangeLog:

2021-05-03  Tom de Vries  <tdevries@suse.de>

	PR target/100321
	* testsuite/libgomp.c/target-44.c: New test.
2021-05-03 23:13:59 +02:00
Christophe Lyon
49e6bb44ff testsuite: Fix dg directives order in arm/aarch64 vml[as]_float_not_fused.c
dg-do must come before dg-skip-if, this patch fixes this oversight in
these two tests.

2021-05-03  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* gcc.target/aarch64/advsimd-intrinsics/vmla_float_not_fused.c:
	Fix dg directives order.
	* gcc.target/aarch64/advsimd-intrinsics/vmls_float_not_fused.c:
	Likewise.
2021-05-03 21:02:02 +00:00
Jeff Law
2c339b2a59 Fix expected output for nds32le and m32r
gcc/testsuite
	* gcc.dg/tree-ssa/ssa-dse-26.c: Fix expected output for nds32le
	and m32r.
2021-05-03 12:32:11 -06:00
Patrick Palka
2a6fc19e65 c++: base-clause parsing and implicit 'this' [PR100362]
My r11-6815 change to defer access checking when processing a
base-clause removed a pair of pushclass / popclass calls that seemed to
be unnecessary now that we'd also defer access checking while parsing
the base-clause.

But it turns out these calls make a difference in the below testcase,
where we have a local class whose base-clause implicitly uses the 'this'
of the enclosing class.  Before r11-6815, while parsing the base-clause
of the local class, maybe_resolve_dummy would fail to resolve the dummy
'this' object because the current scope would be the local class.  Now,
since the current scope is the lambda, maybe_resolve_dummy succeeds and
returns the 'this' for the enclosing class Qux.  Later, during deferred
instantiation of the local class, we get confused trying to resolve the
access of 'a_' through this non-dummy 'this'.

So this patch just reinstates the calls to pushclass / popclass that
were removed in r11-6815.

gcc/cp/ChangeLog:

	PR c++/100362
	* parser.c (cp_parser_class_head): Reinstate calls to pushclass
	and popclass when parsing the base-clause that were removed in
	r11-6815.

gcc/testsuite/ChangeLog:

	PR c++/100362
	* g++.dg/cpp1y/lambda-generic-100362.C: New test.
2021-05-03 13:35:37 -04:00
Patrick Palka
eef4fa6968 c++: mark_used and ADL with template-id [PR100344]
My r11-295 patch for PR68942 didn't consider that the callee of an
ADL-eligible function call can be a TEMPLATE_ID_EXPR, and we don't want
to disable mark_used when substituting into the template arguments of
this TEMPLATE_ID_EXPR because the arguments are clearly used regardless
of the outcome of ADL.  In the first testcase below, this oversight
causes us to trip over the assert in build_call_a for the call to
find_index<int> because the function no longer had its TREE_USED bit set
from mark_used.

So this patch restricts the original fix to disable mark_used only when
the callee is a FUNCTION_DECL, which seems to be the only case that
matters for PR68942.  For instance, in the second testcase below we
already don't mark_used the deleted function specialization even before
r11-295.

gcc/cp/ChangeLog:

	PR c++/68942
	PR c++/100344
	* pt.c (tsubst_copy_and_build) <case CALL_EXPR>: Set tf_conv
	only when the callee is a FUNCTION_DECL.

gcc/testsuite/ChangeLog:

	PR c++/68942
	PR c++/100344
	* g++.dg/template/call8.C: New test.
	* g++.dg/template/koenig12a.C: New test.
2021-05-03 13:35:26 -04:00
Jeff Law
34b51ea718 Fix expected output for lm32 and bfin
gcc/testsuite
	* gcc.dg/tree-ssa/ssa-dse-26.c: Fix expected output for bfin and lm32.
2021-05-03 11:05:19 -06:00
Marek Polacek
c9b6890d0b c++: Fix ICE with invalid requires-expression [PR100055]
This fixes a crash on invalid requires-expression: in this test,
current_template_parms is null so accessing TEMPLATE_PARMS_CONSTRAINTS
is going to fail.  So don't crash, but make sure we've complained
already.

gcc/cp/ChangeLog:

	PR c++/100055
	* decl.c (grokfndecl): Check current_template_parms.

gcc/testsuite/ChangeLog:

	PR c++/100055
	* g++.dg/concepts/diagnostic18.C: New test.
2021-05-03 12:39:43 -04:00
Marek Polacek
6252e35cf5 c++: Remove GCC12 FIXME for DR1312
This patch removes a FIXME I left for myself for GCC 12, along with
adjusting the relevant test.

gcc/cp/ChangeLog:

	DR 1312
	* constexpr.c (cxx_eval_constant_expression): Don't check
	integer_zerop.

gcc/testsuite/ChangeLog:

	DR 1312
	* g++.dg/cpp0x/constexpr-cast2.C: Remove XFAILs.
2021-05-03 12:27:30 -04:00
Jeff Law
0871fe27c2 Fix xstormy16 selector
gcc/testsuite
	* gcc.dg/tree-ssa/ssa-dse-26.c: Fix xstormy selector.
2021-05-03 09:35:30 -06:00
Jeff Law
8a359a3375 Fix test results on rx
gcc/testsuite
	* gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for rx too.
2021-05-03 09:19:49 -06:00
Jeff Law
b4579166f8 Fix test results on or1k
gcc/testsuite
	* gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for or1k too.
2021-05-03 09:07:41 -06:00
Jeff Law
e2c378a5ef Fix test results on cr16 and xstormy16
gcc/testsuite
	* gcc.dg/tree-ssa/ssa-dse-26.c: Update expected output for
	cr16 and xstormy16 targets.
2021-05-03 08:52:57 -06:00
Richard Biener
32955416d8 Improve PHI handling in DSE
This improves handling of PHI defs when walking uses in
dse_classify_store to track two PHI defs.  This happens
when there are CFG merges and one PHI feeds into another.
If we decide to want more then using a sbitmap for this might be
the way to go.

2021-05-03  Richard Biener  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_classify_store): Track two PHI defs.

	* gcc.dg/tree-ssa/ssa-dse-42.c: New testcase.
	* gcc.dg/pr81192.c: Disable DSE.
2021-05-03 15:11:03 +02:00
Richard Biener
ed3c43224c Perform reverse program order walk for GIMPLE DSE
The following changes the post-dominator domwalk done by GIMPLE DSE
to a reverse program order walk.  This enables 2% more stmts do be
DSEd during bootstrap and in particular for testcases like the one
added where it is important to visit post dominators in a particular
order.

2021-05-03  Richard Biener  <rguenther@suse.de>

	* tree-ssa-dse.c: Do not include domwalk.h but cfganal.h.
	(dse_dom_walker): Remove.
	(dse_dom_walker::dse_optimize_stmt): Rename...
	(dse_optimize_stmt): ... to this, pass in live_bytes sbitmap.
	(dse_dom_walker::before_dom_children): Inline ...
	(pass_dse::execute): ... here.  Perform a reverse program
	order walk.

	* gcc.dg/tree-ssa/ssa-dse-41.c: New testcase.
2021-05-03 15:11:03 +02:00
H.J. Lu
3f57062135 GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
Check if host supports multi-byte NOPs before enabling CET on host.

gcc/

	PR bootstrap/99703
	* configure: Regenerated.

libbacktrace/

	PR bootstrap/99703
	* configure: Regenerated.

libcc1/

	PR bootstrap/99703
	* configure: Regenerated.

libcpp/

	PR bootstrap/99703
	* configure: Regenerated.

libdecnumber/

	PR bootstrap/99703
	* configure: Regenerated.

lto-plugin/

	PR bootstrap/99703
	* configure: Regenerated.
2021-05-03 05:01:23 -07:00