aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadbackward.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-25re PR tree-optimization/69196 (code size regression with jump threading at -O2)Jeff Law1-29/+124
PR tree-optimization/69196 PR tree-optimization/68398 * tree-ssa-threadupdate.h (enum bb_dom_status): Moved here from tree-ssa-threadupdate.c. (determine_bb_domination_status): Prototype * tree-ssa-threadupdate.c (enum bb_dom_status): Remove (determine_bb_domination_status): No longer static. (valid_jump_thread_path): Remove code to detect characteristics of the jump thread path not associated with correctness. * tree-ssa-threadbackward.c (fsm_find_control_statment_thread_paths): Correct test for thread path length. Count PHIs for real operands as statements that need to be copied. Do not count ASSERT_EXPRs. Look at all the blocks in the thread path. Compute and selectively filter thread paths based on threading through the latch, threading a multiway branch or crossing a multiway branch. PR tree-optimization/69196 PR tree-optimization/68398 * gcc.dg/tree-ssa/pr66752-3.c: Update expected output * gcc.dg/tree-ssa/pr68198.c: Likewise. From-SVN: r232802
2016-01-21[PATCH] [PR tree-optimization/69347] Fix memory consumption in threader & ↵Jeff Law1-2/+2
minor speed improvement PR middle-end/69347 * tree-ssa-dom.c (dom_opt_dom_walker::thread_across_edge): Avoid useless call to record_temporary_equivalences. * tree-ssa-threadbackward.c (find_jump_threads_backwards): Just allocate 10 slots in the bb_path vector and let it grow as needed. (fsm_find_control_statement_thread_paths): Similarly for the next_path vector. From-SVN: r232711
2016-01-19re PR tree-optimization/69347 (excessive compile time with -O2)Jeff Law1-0/+5
PR middle-end/69347 * tree-ssa-threadbackwards.c (fsm_find_control_statement_thread_paths): Do not try to lookup FSM paths for SSA_NAMEs appearing in abnormal PHIs. From-SVN: r232593
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-10-29[PATCH][PR tree-optimization/67892] Use FSM threader to handle backedgesJeff Law1-7/+38
PR tree-optimization/67892 * tree-ssa-threadedge.c (simplify_controL_stmt_condition): Fix typo in comment. (thread_through_normal_block): If we have seen a backedge, then do nothing. No longer call find_jump_threads_backwards here. (thread_across_edge): Use find_jump_threads_backwards to find jump threads if the old style threader was not successful. * tree-ssa-threadbackward.c (get_gimple_control_stmt): Use gsi_last_nondebug_bb. Return NULL if the block does not end with a control statement. (find_jump_threads_backwards): Setup code moved here from tree-ssa-threadedge.c::thread_through_normal_block. Accept single edge argument instead of name & block. * tree-ssa-threadbackward.h (find_jump_threads_backwards): Update prototype. PR tree-optimization/67892 * gcc.dg/tree-ssa/pr21417: Update expected output. * gcc.dg/tree-ssa/ssa-dom-thread-2b.c: Likewise. From-SVN: r229538
2015-10-26[PATCH] [PR tree-optimization/68013] Make sure first block in FSM pathJeff Law1-0/+5
is in VISITED_BBs PR tree-optimization/68013 * tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths): Make sure the first block in the path is in VISITED_BBs. PR tree-optimization/68013 * gcc.c-torture/compile/pr68013.c: New test. From-SVN: r229375
2015-10-13[PATCH] Allow FSM to thread single block cases tooJeff Law1-4/+0
* tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths): Allow single block jump threading paths. * gcc.dg/tree-ssa/ssa-thread-13.c: New test. From-SVN: r228757
2015-10-12[PATCH] Allow FSM threader to thread more complex conditionsJeff Law1-3/+33
* tree-ssa-threadbackward.c (get_gimple_control_stmt): New function. (fsm_find_control_stmt_paths): Change name of first argument to more accurately relfect what it really is. Handle simplification of GIMPLE_COND after finding a thread path for NAME. * tree-ssa-threadedge.c (simplify_control_stmt_condition): Allow nontrivial conditions to be handled by FSM threader. (thread_through_normal_block): Extract the name to looup via FSM threader from COND_EXPR. * gcc.dg/tree-ssa/ssa-thread-12.c: New test. * gcc.dg/tree-ssa/ssa-dom-thread-7.c: Update expected output. * gcc.dg/tree-ssa/ssa-thread-11.c: Renamed from ssa-dom-thread-11.c. From-SVN: r228739
2015-10-12[PATCH] Improve FSM threader to handle compiler temporaries tooJeff Law1-3/+2
* 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
2015-10-11[PATCH] Refactoring FSM bits into their own fileJeff Law1-0/+325
[PATCH] Refactoring FSM bits into their own file * tree-ssa-threadedge.c (fsm_find_thread_path): Moved from here into tree-ssa-threadbackward.c. (fsm_find_control_statement_thread_paths): Likewise. (thread_through_normal_block): Break out FSM bits and move them into a new function in tree-ssa-threadbackward.c. Call new function instead. Minimize header file usage. * tree-ssa-threadbackward.h: New file. * tree-ssa-threadbackward.c: Likewise. * Makefile.in (OBJS): Add tree-ssa-threadbackward.o From-SVN: r228700