aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/tree-vect-loop.c18
2 files changed, 10 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e94430a..e58e46a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2013-03-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56461
+ * tree-vect-loop.c (destroy_loop_vec_info): For !clean_stmts, just
+ set nbbs to 0 instead of having separate code path.
+ (vect_analyze_loop_form): Call destroy_loop_vec_info with true
+ instead of false as last argument if returning NULL.
+
2013-03-03 Sandra Loosemore <sandra@codesourcery.com>
* target.def (TARGET_OPTION_VALID_ATTRIBUTE_P): Update comments;
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 6f71016..8be53bb 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -905,23 +905,9 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo, bool clean_stmts)
loop = LOOP_VINFO_LOOP (loop_vinfo);
bbs = LOOP_VINFO_BBS (loop_vinfo);
- nbbs = loop->num_nodes;
+ nbbs = clean_stmts ? loop->num_nodes : 0;
swapped = LOOP_VINFO_OPERANDS_SWAPPED (loop_vinfo);
- if (!clean_stmts)
- {
- free (LOOP_VINFO_BBS (loop_vinfo));
- free_data_refs (LOOP_VINFO_DATAREFS (loop_vinfo));
- free_dependence_relations (LOOP_VINFO_DDRS (loop_vinfo));
- LOOP_VINFO_LOOP_NEST (loop_vinfo).release ();
- LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo).release ();
- LOOP_VINFO_MAY_ALIAS_DDRS (loop_vinfo).release ();
-
- free (loop_vinfo);
- loop->aux = NULL;
- return;
- }
-
for (j = 0; j < nbbs; j++)
{
basic_block bb = bbs[j];
@@ -1244,7 +1230,7 @@ vect_analyze_loop_form (struct loop *loop)
dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
"not vectorized: number of iterations = 0.");
if (inner_loop_vinfo)
- destroy_loop_vec_info (inner_loop_vinfo, false);
+ destroy_loop_vec_info (inner_loop_vinfo, true);
return NULL;
}