aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2015-09-20 00:37:39 -0600
committerJeff Law <law@gcc.gnu.org>2015-09-20 00:37:39 -0600
commit7c3e70560bcf162884f414c54720efcd8e68304f (patch)
tree87f5dbd47dbca4f2aefeff30e3c2a034cfa4be0b /gcc/tree-ssa-threadedge.c
parent355fe0884b8097c32e859f0df57c83bde0c6bd26 (diff)
downloadgcc-7c3e70560bcf162884f414c54720efcd8e68304f.zip
gcc-7c3e70560bcf162884f414c54720efcd8e68304f.tar.gz
gcc-7c3e70560bcf162884f414c54720efcd8e68304f.tar.bz2
[PATCH] Fix 47679 by improving jump threading
PR tree-optimization/47679 * tree-ssa-dom.c (record_temporary_equivalences): No longer static. * tree-ssa-dom.h (record_temporary_equivalences): Add prototype. * tree-ssa-threadedge.c: Include tree-ssa-dom.h. (thread_through_normal_block): Use record_temporary_equivalences. PR tree-optimization/47679 * g++.dg/warn/Wuninitialized-6.C: New test. From-SVN: r227942
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
-rw-r--r--gcc/tree-ssa-threadedge.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index b28fff3..c58b5e3 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-scopedtables.h"
#include "tree-ssa-threadedge.h"
#include "tree-ssa-loop.h"
+#include "tree-ssa-dom.h"
#include "builtins.h"
#include "cfganal.h"
@@ -1213,6 +1214,10 @@ thread_through_normal_block (edge e,
if (*backedge_seen_p)
simplify = dummy_simplify;
+ /* We want to record any equivalences created by traversing E. */
+ if (!handle_dominating_asserts)
+ record_temporary_equivalences (e, const_and_copies, avail_exprs_stack);
+
/* PHIs create temporary equivalences.
Note that if we found a PHI that made the block non-threadable, then
we need to bubble that up to our caller in the same manner we do