summaryrefslogtreecommitdiff
path: root/gcc/tree-tailcall.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-02-08 09:07:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-02-08 09:07:49 +0000
commit0d5049b238172839e3cddbe4d8befe62d701dc07 (patch)
tree9bca4cf2b5d36002a2728c433192b80cd309a75c /gcc/tree-tailcall.c
parentce3aef7d2b5bf49fedcb36950012f50f94a13953 (diff)
downloadgcc-0d5049b238172839e3cddbe4d8befe62d701dc07.tar.gz
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
Diffstat (limited to 'gcc/tree-tailcall.c')
-rw-r--r--gcc/tree-tailcall.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-tailcall.c b/gcc/tree-tailcall.c
index e08978ca257..80c0521d831 100644
--- a/gcc/tree-tailcall.c
+++ b/gcc/tree-tailcall.c
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "langhooks.h"
#include "dbgcnt.h"
#include "target.h"
+#include "cfgloop.h"
#include "common/common-target.h"
/* The file implements the tail recursion elimination. It is also used to
@@ -1011,7 +1012,12 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
}
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
header of the loop created by tail recursion elimination. Do so