aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadbackward.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2015-10-12 10:26:09 -0600
committerJeff Law <law@gcc.gnu.org>2015-10-12 10:26:09 -0600
commitbba71f811c1d6e46cc22399e2be401640e7eb0cd (patch)
treef4680d8079492521c929b8fd10c724766b61c8e4 /gcc/tree-ssa-threadbackward.c
parent56102c7f975bf2442c7e456ba58869aa8cbd40c7 (diff)
downloadgcc-bba71f811c1d6e46cc22399e2be401640e7eb0cd.zip
gcc-bba71f811c1d6e46cc22399e2be401640e7eb0cd.tar.gz
gcc-bba71f811c1d6e46cc22399e2be401640e7eb0cd.tar.bz2
[PATCH] Improve FSM threader to handle compiler temporaries too
* tree-ssa-threadbackward.c (fsm_find_thread_path): Remove restriction that traced SSA_NAME is a user variable. * gcc.dg/tree-ssa/ssa-dom-thread-11.c: New test. From-SVN: r228727
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r--gcc/tree-ssa-threadbackward.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 0012aa3..ff6481c 100644
--- a/gcc/tree-ssa-threadbackward.c
+++ b/gcc/tree-ssa-threadbackward.c
@@ -70,7 +70,7 @@ fsm_find_thread_path (basic_block start_bb, basic_block end_bb,
return false;
}
-/* We trace the value of the variable EXPR back through any phi nodes looking
+/* We trace the value of the SSA_NAME EXPR back through any phi nodes looking
for places where it gets a constant value and save the path. Stop after
having recorded MAX_PATHS jump threading paths. */
@@ -80,11 +80,10 @@ fsm_find_control_statement_thread_paths (tree expr,
vec<basic_block, va_gc> *&path,
bool seen_loop_phi)
{
- tree var = SSA_NAME_VAR (expr);
gimple *def_stmt = SSA_NAME_DEF_STMT (expr);
basic_block var_bb = gimple_bb (def_stmt);
- if (var == NULL || var_bb == NULL)
+ if (var_bb == NULL)
return;
/* For the moment we assume that an SSA chain only contains phi nodes, and