Commit 7c3e7056 by Jeff Law Committed by Jeff Law

[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
parent 355fe088
2015-09-20 Jeff Law <law@redhat.com>
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.
2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org> 2015-09-19 Trevor Saunders <tbsaunde@tbsaunde.org>
* coretypes.h (gimple): Change typedef to be a forward * coretypes.h (gimple): Change typedef to be a forward
2015-09-20 Jeff Law <law@redhat.com>
PR tree-optimization/47679
* g++.dg/warn/Wuninitialized-6.C: New test.
2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com> 2015-09-18 Ville Voutilainen <ville.voutilainen@gmail.com>
Implement nested namespace definitions. Implement nested namespace definitions.
......
...@@ -780,7 +780,7 @@ dom_valueize (tree t) ...@@ -780,7 +780,7 @@ dom_valueize (tree t)
by traversing edge E (which are cached in E->aux). by traversing edge E (which are cached in E->aux).
Callers are responsible for managing the unwinding markers. */ Callers are responsible for managing the unwinding markers. */
static void void
record_temporary_equivalences (edge e, record_temporary_equivalences (edge e,
class const_and_copies *const_and_copies, class const_and_copies *const_and_copies,
class avail_exprs_stack *avail_exprs_stack) class avail_exprs_stack *avail_exprs_stack)
......
...@@ -21,5 +21,8 @@ along with GCC; see the file COPYING3. If not see ...@@ -21,5 +21,8 @@ along with GCC; see the file COPYING3. If not see
#define GCC_TREE_SSA_DOM_H #define GCC_TREE_SSA_DOM_H
extern bool simple_iv_increment_p (gimple *); extern bool simple_iv_increment_p (gimple *);
extern void record_temporary_equivalences (edge,
class const_and_copies *,
class avail_exprs_stack *);
#endif /* GCC_TREE_SSA_DOM_H */ #endif /* GCC_TREE_SSA_DOM_H */
...@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssa-scopedtables.h" #include "tree-ssa-scopedtables.h"
#include "tree-ssa-threadedge.h" #include "tree-ssa-threadedge.h"
#include "tree-ssa-loop.h" #include "tree-ssa-loop.h"
#include "tree-ssa-dom.h"
#include "builtins.h" #include "builtins.h"
#include "cfganal.h" #include "cfganal.h"
...@@ -1213,6 +1214,10 @@ thread_through_normal_block (edge e, ...@@ -1213,6 +1214,10 @@ thread_through_normal_block (edge e,
if (*backedge_seen_p) if (*backedge_seen_p)
simplify = dummy_simplify; 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. /* PHIs create temporary equivalences.
Note that if we found a PHI that made the block non-threadable, then 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 we need to bubble that up to our caller in the same manner we do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment