basic-block.h (EXECUTE_IF_SET_IN_SBITMAP): New macro.
authorRichard Henderson <rth@cygnus.com>
Sat, 10 Oct 1998 22:03:34 +0000 (15:03 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Sat, 10 Oct 1998 22:03:34 +0000 (15:03 -0700)
        * basic-block.h (EXECUTE_IF_SET_IN_SBITMAP): New macro.
        (sbitmap_free, sbitmap_vector_free): New macros.
        * output.h (rtl_dump_file): Declare.

From-SVN: r22978

gcc/ChangeLog
gcc/basic-block.h
gcc/output.h

index a60d9eed2c705fd5030680ae23e5b7b810512b5e..d22e9d7951cf91167f4899da1a48f6565008a458 100644 (file)
@@ -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.
index 552f74a5d9f6cd4cfd12a0859c8656742b2ae383..5f146286222a6adc29eb3f3e0d5f94680adc5883 100644 (file)
@@ -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));
index 1d1a2afd8cd5e4dfaa935fd3429e22ea0089dfd4..353a9d6b9bfa0e0454bff6c11c8367c001772312 100644 (file)
@@ -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.  */