From 00852255e4a0d3b67ed853aacbc4aa4f4dfe724a Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 6 Oct 2015 20:25:57 -0600 Subject: [PATCH][PR tree-optimization/67816] Fix jump threading when DOM removes conditionals in jump threading path PR tree-optimization/67816 * tree-ssa-threadupdate.h (remove_jump_threads_including): Renamed from remove_jump_threads_starting_at. Accept an edge rather than a basic block. * tree-ssa-threadupdate.c (removed_edges): New hash table. (remove_jump_threads_including): Note edges that get removed from the CFG for later pruning of jump threading paths including them. (thread_through_all_blocks): Remove paths which include edges that have been removed. * tree-ssa-dom.c (optimize_stmt): Call remove_jump_threads_including on each outgoing edges when optimizing away a control statement. * gcc.c-torture/compile/pr67816.c: New test. From-SVN: r228559 --- gcc/tree-ssa-threadupdate.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-ssa-threadupdate.h') diff --git a/gcc/tree-ssa-threadupdate.h b/gcc/tree-ssa-threadupdate.h index 30428e8..984b6c4 100644 --- a/gcc/tree-ssa-threadupdate.h +++ b/gcc/tree-ssa-threadupdate.h @@ -43,7 +43,7 @@ public: }; extern void register_jump_thread (vec *); -extern void remove_jump_threads_starting_at (basic_block); +extern void remove_jump_threads_including (edge); extern void delete_jump_thread_path (vec *); extern void remove_ctrl_stmt_and_useless_edges (basic_block, basic_block); #endif -- cgit v1.1