Commit 0d5049b2 by Richard Biener Committed by Richard Biener

Makefile.in (tree-tailcall.o): Add $(CFGLOOP_H) dependency.

2013-02-08  Richard Biener  <rguenther@suse.de>

	* Makefile.in (tree-tailcall.o): Add $(CFGLOOP_H) dependency.
	* ipa-pure-const.c (analyze_function): Avoid calling
	mark_irreducible_loops twice.
	* tree-tailcall.c (tree_optimize_tail_calls_1): Mark loops
	for fixup.

From-SVN: r195876
parent ce3aef7d
2013-02-08 Richard Biener <rguenther@suse.de>
* Makefile.in (tree-tailcall.o): Add $(CFGLOOP_H) dependency.
* ipa-pure-const.c (analyze_function): Avoid calling
mark_irreducible_loops twice.
* tree-tailcall.c (tree_optimize_tail_calls_1): Mark loops
for fixup.
2013-02-07 David S. Miller <davem@davemloft.net> 2013-02-07 David S. Miller <davem@davemloft.net>
* dwarf2out.c (based_loc_descr): Perform leaf register remapping * dwarf2out.c (based_loc_descr): Perform leaf register remapping
......
...@@ -2391,7 +2391,7 @@ tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \ ...@@ -2391,7 +2391,7 @@ tree-tailcall.o : tree-tailcall.c $(TREE_FLOW_H) $(CONFIG_H) $(SYSTEM_H) \
$(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \ $(TREE_H) $(TM_P_H) $(FUNCTION_H) $(TM_H) coretypes.h \
$(EXCEPT_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \ $(EXCEPT_H) $(TREE_PASS_H) $(FLAGS_H) langhooks.h \
$(BASIC_BLOCK_H) $(DBGCNT_H) $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) \ $(BASIC_BLOCK_H) $(DBGCNT_H) $(GIMPLE_PRETTY_PRINT_H) $(TARGET_H) \
$(COMMON_TARGET_H) $(COMMON_TARGET_H) $(CFGLOOP_H)
tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \ tree-ssa-sink.o : tree-ssa-sink.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) \ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) \
$(TM_H) coretypes.h $(TREE_PASS_H) $(FLAGS_H) alloc-pool.h \ $(TM_H) coretypes.h $(TREE_PASS_H) $(FLAGS_H) alloc-pool.h \
......
...@@ -779,8 +779,10 @@ end: ...@@ -779,8 +779,10 @@ end:
{ {
/* Preheaders are needed for SCEV to work. /* Preheaders are needed for SCEV to work.
Simple latches and recorded exits improve chances that loop will Simple latches and recorded exits improve chances that loop will
proved to be finite in testcases such as in loop-15.c and loop-24.c */ proved to be finite in testcases such as in loop-15.c
loop_optimizer_init (LOOPS_NORMAL and loop-24.c */
loop_optimizer_init (LOOPS_HAVE_PREHEADERS
| LOOPS_HAVE_SIMPLE_LATCHES
| LOOPS_HAVE_RECORDED_EXITS); | LOOPS_HAVE_RECORDED_EXITS);
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
flow_loops_dump (dump_file, NULL, 0); flow_loops_dump (dump_file, NULL, 0);
...@@ -799,7 +801,8 @@ end: ...@@ -799,7 +801,8 @@ end:
if (!finite_loop_p (loop)) if (!finite_loop_p (loop))
{ {
if (dump_file) if (dump_file)
fprintf (dump_file, " can not prove finiteness of loop %i\n", loop->num); fprintf (dump_file, " can not prove finiteness of "
"loop %i\n", loop->num);
l->looping =true; l->looping =true;
FOR_EACH_LOOP_BREAK (li); FOR_EACH_LOOP_BREAK (li);
} }
......
...@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h" #include "langhooks.h"
#include "dbgcnt.h" #include "dbgcnt.h"
#include "target.h" #include "target.h"
#include "cfgloop.h"
#include "common/common-target.h" #include "common/common-target.h"
/* The file implements the tail recursion elimination. It is also used to /* The file implements the tail recursion elimination. It is also used to
...@@ -1011,7 +1012,12 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls) ...@@ -1011,7 +1012,12 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
} }
if (changed) if (changed)
free_dominance_info (CDI_DOMINATORS); {
/* We may have created new loops. Make them magically appear. */
if (current_loops)
loops_state_set (LOOPS_NEED_FIXUP);
free_dominance_info (CDI_DOMINATORS);
}
/* Add phi nodes for the virtual operands defined in the function to the /* Add phi nodes for the virtual operands defined in the function to the
header of the loop created by tail recursion elimination. Do so header of the loop created by tail recursion elimination. Do so
......
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