+2010-01-06 Sebastian Pop <sebastian.pop@amd.com>
+
+ * graphite-clast-to-gimple.c (save_clast_name_index): Free slot
+ before allocating a new one.
+ (copy_renames): Check that slot is not NULL.
+ (mark_bb_with_pbb): Same.
+ (compute_cloog_iv_types_1): Same.
+ * graphite-interchange.c (lst_perfect_nestify): Free the before,
+ nest, and after LSTs.
+ (lst_try_interchange_loops): Same.
+
2010-01-05 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42178
slot = htab_find_slot (index_table, &tmp, INSERT);
if (slot)
- *slot = new_clast_name_index (name, index);
+ {
+ if (*slot)
+ free (*slot);
+
+ *slot = new_clast_name_index (name, index);
+ }
}
/* Print to stderr the element ELT. */
tmp.old_name = old_name;
x = htab_find_slot (res, &tmp, INSERT);
- if (!*x)
+ if (x && !*x)
*x = new_rename_map_elt (old_name, expr);
return 1;
tmp.bb = bb;
x = htab_find_slot (bb_pbb_mapping, &tmp, INSERT);
- if (!*x)
+ if (x && !*x)
*x = new_bb_pbb_def (bb, pbb);
}
slot = htab_find_slot (GBB_CLOOG_IV_TYPES (gbb), &tmp, INSERT);
- if (!*slot)
+ if (slot && !*slot)
{
tree oldiv = pbb_to_depth_to_oldiv (pbb, index);
tree type = oldiv ? TREE_TYPE (oldiv) : integer_type_node;
lst_remove_all_before_excluding_pbb (*nest, last, false);
if (lst_empty_p (*before))
- *before = NULL;
+ {
+ free_lst (*before);
+ *before = NULL;
+ }
if (lst_empty_p (*after))
- *after = NULL;
+ {
+ free_lst (*after);
+ *after = NULL;
+ }
if (lst_empty_p (*nest))
- *nest = NULL;
+ {
+ free_lst (*nest);
+ *nest = NULL;
+ }
}
/* Try to interchange LOOP1 with LOOP2 for all the statements of the
}
/* Undo the transform. */
+ free_lst (before);
+ free_lst (nest);
+ free_lst (after);
lst_apply_interchange (loop2, depth2, depth1);
return false;
}