aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-03-04 10:02:26 +0000
committerJakub Jelinek <jakub@redhat.com>2013-03-04 10:02:26 +0000
commit09254393aa008efa0b965289a95852c88b895293 (patch)
tree32f6e5da84f82a6d3a199d817dbceefd31af90ca /gcc/tree-vect-loop.c
parent8e9ad8cedf0400f8ef025c987bc793fee5a081b0 (diff)
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. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@196424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 6f71016080e..8be53bb02c8 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;
}