aboutsummaryrefslogtreecommitdiff
path: root/gcc/bitmap.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1999-11-04 16:49:03 -0800
committerRichard Henderson <rth@gcc.gnu.org>1999-11-04 16:49:03 -0800
commite7749837caaa5c7a7fddea3e8eb90b852cead3d6 (patch)
tree36caca6632c74bf9cd783c44f1c99239c1b55570 /gcc/bitmap.h
parent920a303df913c5bcc6912ce722bee38e8fc04197 (diff)
downloadgcc-e7749837caaa5c7a7fddea3e8eb90b852cead3d6.zip
gcc-e7749837caaa5c7a7fddea3e8eb90b852cead3d6.tar.gz
gcc-e7749837caaa5c7a7fddea3e8eb90b852cead3d6.tar.bz2
bitmap.h (BITMAP_XFREE): New.
* bitmap.h (BITMAP_XFREE): New. * flow.c (life_analysis): Use it. (life_analysis_1): Free blocks. * combine.c (undo_commit): New. (try_combine): Use it. Don't zap undobuf.undos. (combine_instructions): Don't zap undobuf.undos; free the undobuf.frees list. * local-alloc.c (local_alloc): Free qty_phys_num_sugg. * stmt.c (cost_table_): New. (estimate_case_costs): Use it instead of xmalloc. * toplev.c (compile_file): Reuse dumpname memory instead of strdup'ing it. From-SVN: r30404
Diffstat (limited to 'gcc/bitmap.h')
-rw-r--r--gcc/bitmap.h25
1 files changed, 18 insertions, 7 deletions
diff --git a/gcc/bitmap.h b/gcc/bitmap.h
index 9b8875a..99f4549 100644
--- a/gcc/bitmap.h
+++ b/gcc/bitmap.h
@@ -119,13 +119,24 @@ extern void debug_bitmap PROTO((bitmap));
bitmap_initialize ((bitmap) xmalloc (sizeof (bitmap_head)))
/* Do any cleanup needed on a bitmap when it is no longer used. */
-#define BITMAP_FREE(BITMAP) \
-do { \
- if (BITMAP) \
- { \
- bitmap_clear (BITMAP); \
- (BITMAP) = 0; \
- } \
+#define BITMAP_FREE(BITMAP) \
+do { \
+ if (BITMAP) \
+ { \
+ bitmap_clear (BITMAP); \
+ (BITMAP) = 0; \
+ } \
+} while (0)
+
+/* Do any cleanup needed on an xmalloced bitmap when it is no longer used. */
+#define BITMAP_XFREE(BITMAP) \
+do { \
+ if (BITMAP) \
+ { \
+ bitmap_clear (BITMAP); \
+ free (BITMAP); \
+ (BITMAP) = 0; \
+ } \
} while (0)
/* Do any one-time initializations needed for bitmaps. */