summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-10 22:03:34 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>1998-10-10 22:03:34 +0000
commit9f1379d723185dcae00a770676eb548c18df351b (patch)
tree901ab52e1327f069c4f7c0164e45b06ededaebd0
parent5d92a54845c0cd1ca923744a5334b7459520f4ec (diff)
downloadgcc-9f1379d723185dcae00a770676eb548c18df351b.tar.gz
* basic-block.h (EXECUTE_IF_SET_IN_SBITMAP): New macro.
(sbitmap_free, sbitmap_vector_free): New macros. * output.h (rtl_dump_file): Declare. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22978 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/basic-block.h36
-rw-r--r--gcc/output.h6
3 files changed, 47 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a60d9eed2c7..d22e9d7951c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Sat Oct 10 22:00:34 1998 Richard Henderson <rth@cygnus.com>
+
+ * basic-block.h (EXECUTE_IF_SET_IN_SBITMAP): New macro.
+ (sbitmap_free, sbitmap_vector_free): New macros.
+ * output.h (rtl_dump_file): Declare.
+
Sat Oct 10 17:01:42 1998 Jeffrey A Law (law@cygnus.com)
* regmove.c (optimize_reg_copy_3): Honor TRULY_NOOP_TRUNCATION.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index 552f74a5d9f..5f146286222 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -235,7 +235,41 @@ do { \
(bitmap)->elms [(bitno) / SBITMAP_ELT_BITS] &= ~((SBITMAP_ELT_TYPE) 1 << (bitno) % SBITMAP_ELT_BITS); \
} while (0)
-extern void dump_sbitmap PROTO ((FILE *, sbitmap));
+/* Loop over all elements of SBITSET, starting with MIN. */
+#define EXECUTE_IF_SET_IN_SBITMAP(SBITMAP, MIN, N, CODE) \
+do { \
+ unsigned int bit_num_ = (MIN) % (unsigned) SBITMAP_ELT_BITS; \
+ unsigned int word_num_ = (MIN) / (unsigned) SBITMAP_ELT_BITS; \
+ unsigned int size_ = (SBITMAP)->size; \
+ SBITMAP_ELT_TYPE *ptr_ = (SBITMAP)->elms; \
+ \
+ while (word_num_ < size_) \
+ { \
+ SBITMAP_ELT_TYPE word_ = ptr_[word_num_]; \
+ if (word_ != 0) \
+ { \
+ for (; bit_num_ < SBITMAP_ELT_BITS; ++bit_num_) \
+ { \
+ SBITMAP_ELT_TYPE mask_ = (SBITMAP_ELT_TYPE)1 << bit_num_; \
+ if ((word_ & mask_) != 0) \
+ { \
+ word_ &= ~mask_; \
+ (N) = word_num_ * SBITMAP_ELT_BITS + bit_num_; \
+ CODE; \
+ if (word_ == 0) \
+ break; \
+ } \
+ } \
+ } \
+ bit_num_ = 0; \
+ word_num_++; \
+ } \
+} while (0)
+
+#define sbitmap_free(map) free(map)
+#define sbitmap_vector_free(vec) free(vec)
+
+extern void dump_sbitmap PROTO ((FILE *, sbitmap));
extern void dump_sbitmap_vector PROTO ((FILE *, char *, char *,
sbitmap *, int));
extern sbitmap sbitmap_alloc PROTO ((int));
diff --git a/gcc/output.h b/gcc/output.h
index 1d1a2afd8cd..353a9d6b9bf 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -460,6 +460,12 @@ extern int sdb_begin_function_line;
extern FILE *asm_out_file;
#endif
+/* Default file in which to dump debug output. */
+
+#ifdef BUFSIZ
+extern FILE *rtl_dump_file;
+#endif
+
/* Decide whether DECL needs to be in a writable section. RELOC is the same
as for SELECT_SECTION. */