* [PATCH] [PR tree-optimization/69196] Consider two anonymous SSA_NAMEs unassociated
@ 2016-03-05 5:14 Jeff Law
0 siblings, 0 replies; only message in thread
From: Jeff Law @ 2016-03-05 5:14 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 505 bytes --]
As pointed out by Richi, the code did not precisely match the comment in
the case of two anonymous SSA_NAMEs.
In that case we don't have enough information to determine if the names
are associated. Until we do something like build partitions (similar to
what's done in tree-ssa-coalesce), it seems best to consider two
anonymous SSA_NAMEs to be unassociated and count the PHI against the
statement count for threading.
Bootstrapped and regression tested on x86-64. Installed on the trunk.
Jeff
[-- Attachment #2: P --]
[-- Type: text/plain, Size: 1671 bytes --]
commit 2ef58c4014fc23573d8ff10e50381c6cbdcba6e6
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sat Mar 5 05:10:58 2016 +0000
PR tree-optimization/69196
* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
If the both SSA_NAMEs are anonymous, then consider them unassociated
and include the PHI in the statement count.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233999 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5c23836..09a2714 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-03-04 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/69196
+ * tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths):
+ If the both SSA_NAMEs are anonymous, then consider them unassociated
+ and include the PHI in the statement count.
+
2016-03-05 Tom de Vries <tom@codesourcery.com>
* omp-low.c (check_omp_nesting_restrictions): Check for non-oacc
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 747296b..6f1b757 100644
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -311,7 +311,11 @@ fsm_find_control_statement_thread_paths (tree name,
gphi *phi = gsip.phi ();
tree dst = gimple_phi_result (phi);
- if (SSA_NAME_VAR (dst) != SSA_NAME_VAR (name)
+ /* Note that if both NAME and DST are anonymous
+ SSA_NAMEs, then we do not have enough information
+ to consider them associated. */
+ if ((SSA_NAME_VAR (dst) != SSA_NAME_VAR (name)
+ || !SSA_NAME_VAR (dst))
&& !virtual_operand_p (dst))
++n_insns;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-03-05 5:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-05 5:14 [PATCH] [PR tree-optimization/69196] Consider two anonymous SSA_NAMEs unassociated Jeff Law
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).