public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r15-74] MATCH: change single_non_singleton_phi_for_edges for singleton phis
@ 2024-04-30 16:12 Andrew Pinski
0 siblings, 0 replies; only message in thread
From: Andrew Pinski @ 2024-04-30 16:12 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9c18bdb07e299b25e7526fea16659c7ff8f0d14e
commit r15-74-g9c18bdb07e299b25e7526fea16659c7ff8f0d14e
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date: Sat Apr 27 18:54:44 2024 -0700
MATCH: change single_non_singleton_phi_for_edges for singleton phis
I noticed that single_non_singleton_phi_for_edges could
return a phi whos entry are all the same for the edge.
This happens only if there was a single phis in the first place.
Also gimple_seq_singleton_p walks the sequence to see if it the one
element in the sequence so there is removing that check actually
reduces the number of pointer walks needed.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
* tree-ssa-phiopt.cc (single_non_singleton_phi_for_edges):
Remove the special case of gimple_seq_singleton_p.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diff:
---
gcc/tree-ssa-phiopt.cc | 8 --------
1 file changed, 8 deletions(-)
diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc
index d1746c4b468..f1e07502b02 100644
--- a/gcc/tree-ssa-phiopt.cc
+++ b/gcc/tree-ssa-phiopt.cc
@@ -62,14 +62,6 @@ single_non_singleton_phi_for_edges (gimple_seq seq, edge e0, edge e1)
{
gimple_stmt_iterator i;
gphi *phi = NULL;
- if (gimple_seq_singleton_p (seq))
- {
- phi = as_a <gphi *> (gsi_stmt (gsi_start (seq)));
- /* Never return virtual phis. */
- if (virtual_operand_p (gimple_phi_result (phi)))
- return NULL;
- return phi;
- }
for (i = gsi_start (seq); !gsi_end_p (i); gsi_next (&i))
{
gphi *p = as_a <gphi *> (gsi_stmt (i));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-30 16:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-30 16:12 [gcc r15-74] MATCH: change single_non_singleton_phi_for_edges for singleton phis Andrew Pinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).