diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-12 16:26:09 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-12 16:26:09 +0000 |
commit | 4df11acd6d99c5b5898c2114c2baa477df9d2e18 (patch) | |
tree | f4680d8079492521c929b8fd10c724766b61c8e4 /gcc/tree-ssa-threadbackward.c | |
parent | 2131a1a91b2685892d435c7aadac08ef4353aa66 (diff) | |
download | gcc-4df11acd6d99c5b5898c2114c2baa477df9d2e18.tar.gz |
[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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228727 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r-- | gcc/tree-ssa-threadbackward.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index 0012aa39180..ff6481c9547 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 |