dumpfile.h (TDF_FLAGS): New.
authorNathan Sidwell <nathan@acm.org>
Thu, 11 May 2017 14:23:16 +0000 (14:23 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 11 May 2017 14:23:16 +0000 (14:23 +0000)
* dumpfile.h (TDF_FLAGS): New.
* dumpfile.c (dump_start): Use TDF_FLAGS.
(dump_enable_all): Fix TDF_KIND check thinko.

From-SVN: r247908

gcc/ChangeLog
gcc/dumpfile.c
gcc/dumpfile.h

index 447f72f..7d60118 100644 (file)
@@ -1,3 +1,9 @@
+2017-05-11  Nathan Sidwell  <nathan@acm.org>
+
+       * dumpfile.h (TDF_FLAGS): New.
+       * dumpfile.c (dump_start): Use TDF_FLAGS.
+       (dump_enable_all): Fix TDF_KIND check thinko.
+
 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
 
        * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
index 66b81a8..d2e6d3e 100644 (file)
@@ -490,7 +490,7 @@ dump_start (int phase, int *flag_ptr)
       dfi->pstream = stream;
       dump_file = dfi->pstream;
       /* Initialize current dump flags. */
-      pflags = dfi->pflags;
+      pflags = TDF_FLAGS (dfi->pflags);
     }
 
   stream = dump_open_alternate_stream (dfi);
@@ -500,7 +500,7 @@ dump_start (int phase, int *flag_ptr)
       count++;
       alt_dump_file = dfi->alt_stream;
       /* Initialize current -fopt-info flags. */
-      alt_flags = dfi->alt_flags;
+      alt_flags = TDF_FLAGS (dfi->alt_flags);
     }
 
   if (flag_ptr)
@@ -682,7 +682,7 @@ dump_enable_all (int flags, const char *filename)
 
   for (i = 0; i < m_extra_dump_files_in_use; i++)
     {
-      if (TDF_KIND (m_extra_dump_files[i].pflags) & ir_dump_type)
+      if (TDF_KIND (m_extra_dump_files[i].pflags) == ir_dump_type)
         {
           const char *old_filename = m_extra_dump_files[i].pfilename;
           m_extra_dump_files[i].pstate = -1;
index df52037..df0f11a 100644 (file)
@@ -55,6 +55,7 @@ enum tree_dump_index
 #define TDF_IPA                3       /* is an IPA dump */
 #define TDF_KIND_MASK   3
 #define TDF_KIND(X) ((X) & TDF_KIND_MASK)
+#define TDF_FLAGS(X) ((X) & ~TDF_KIND_MASK)
 
 /* Bit 2 unused, available for hire.  */
 #define TDF_ADDRESS    (1 << 3)        /* dump node addresses */