From 50e9ff8378be0c7353d3f3fb6fa4e4dc3c3367e6 Mon Sep 17 00:00:00 2001 From: James Greenhalgh Date: Sat, 6 Dec 2014 19:19:37 +0000 Subject: extend jump thread for finite state automata PR tree-optimization/54742 * params.def (max-fsm-thread-path-insns, max-fsm-thread-length, max-fsm-thread-paths): New. * doc/invoke.texi (max-fsm-thread-path-insns, max-fsm-thread-length, max-fsm-thread-paths): Documented. * tree-cfg.c (split_edge_bb_loc): Export. * tree-cfg.h (split_edge_bb_loc): Declared extern. * tree-ssa-threadedge.c (simplify_control_stmt_condition): Restore the original value of cond when simplification fails. (fsm_find_thread_path): New. (fsm_find_control_statement_thread_paths): New. (thread_through_normal_block): Call find_control_statement_thread_paths. * tree-ssa-threadupdate.c (dump_jump_thread_path): Pretty print EDGE_FSM_THREAD. (verify_seme): New. (duplicate_seme_region): New. (thread_through_all_blocks): Generate code for EDGE_FSM_THREAD edges calling duplicate_seme_region. * tree-ssa-threadupdate.h (jump_thread_edge_type): Add EDGE_FSM_THREAD. * testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c: New test. * testsuite/gcc.dg/tree-ssa/ssa-dom-thread-7.c: New test. Co-Authored-By: Brian Rzycki Co-Authored-By: Sebastian Pop From-SVN: r218451 --- gcc/tree-cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/tree-cfg.c') diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index fbbe9c8..6aca58d 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2666,7 +2666,7 @@ reinstall_phi_args (edge new_edge, edge old_edge) near its "logical" location. This is of most help to humans looking at debugging dumps. */ -static basic_block +basic_block split_edge_bb_loc (edge edge_in) { basic_block dest = edge_in->dest; -- cgit v1.1