summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-27 18:47:43 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-27 18:47:43 +0000
commitd2644aa0855cce719b9fc8698354b1c5b11f3a39 (patch)
tree18d719205b7e22b159b9aa3ff8951d111fc69d3c
parent374ef6c0e7ab3f9c7dcbe536dfc070151ad5abaf (diff)
downloadgcc-d2644aa0855cce719b9fc8698354b1c5b11f3a39.tar.gz
* tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
clobber the loop structure thread_block was unsuccessful. If thread_block was unsuccessful, cleanup appropriately. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205459 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-threadupdate.c21
2 files changed, 20 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 404d7858c9b..ad6468e233e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-27 Jeff Law <law@redhat.com>
+
+ * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not
+ clobber the loop structure thread_block was unsuccessful. If
+ thread_block was unsuccessful, cleanup appropriately.
+
2013-11-27 Chen Liqin <liqin.gcc@gmail.com>
* config/score/score.h (REG_CLASS_FROM_LETTER): Delete.
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 1a52e4702fa..24d0f42a168 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -1676,13 +1676,20 @@ thread_through_all_blocks (bool may_peel_loop_headers)
{
struct loop *loop = (*path)[0]->e->dest->loop_father;
- retval |= thread_block ((*path)[0]->e->dest, false);
- e->aux = NULL;
-
- /* This jump thread likely totally scrambled this loop.
- So arrange for it to be fixed up. */
- loop->header = NULL;
- loop->latch = NULL;
+ if (thread_block ((*path)[0]->e->dest, false))
+ {
+ /* This jump thread likely totally scrambled this loop.
+ So arrange for it to be fixed up. */
+ loop->header = NULL;
+ loop->latch = NULL;
+ e->aux = NULL;
+ }
+ else
+ {
+ delete_jump_thread_path (path);
+ e->aux = NULL;
+ ei_next (&ei);
+ }
}
}
else