summaryrefslogtreecommitdiff
path: root/gcc/bitmap.h
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-05 00:49:03 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1999-11-05 00:49:03 +0000
commitaeee2a4ba470685dfddec7e01b2ffff41d37c5ed (patch)
tree36caca6632c74bf9cd783c44f1c99239c1b55570 /gcc/bitmap.h
parent49fa4c0a7b6d6cee5261743243ecf3464c81152a (diff)
downloadgcc-aeee2a4ba470685dfddec7e01b2ffff41d37c5ed.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30404 138bc75d-0d04-0410-961f-82ee72b054a4
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 9b8875a0185..99f45492e22 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. */