public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/marxin/heads/enable-all-dumps-to-devnull)] Enable all dumps and redirect them to /dev/null.
Date: Fri, 19 Nov 2021 12:51:09 +0000 (GMT)	[thread overview]
Message-ID: <20211119125109.087D7385801D@sourceware.org> (raw)

https://gcc.gnu.org/g:7c0fbeb3954534a78697fd6a0ab69a6f2ba42fda

commit 7c0fbeb3954534a78697fd6a0ab69a6f2ba42fda
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Nov 19 13:50:40 2021 +0100

    Enable all dumps and redirect them to /dev/null.

Diff:
---
 gcc/passes.c | 6 ++++++
 gcc/toplev.c | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/gcc/passes.c b/gcc/passes.c
index 64550b00b43..4179b952350 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -63,6 +63,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic-core.h" /* for fnotice */
 #include "stringpool.h"
 #include "attribs.h"
+#include <cstdio>
 
 using namespace gcc;
 
@@ -2565,6 +2566,11 @@ execute_one_pass (opt_pass *pass)
 
   /* Do it!  */
   todo_after = pass->execute (cfun);
+  if (getenv ("DEBUG") && cfun && cfun->decl)
+    {
+      fprintf (stderr, "=== %s-%d ===\n", pass->name, pass->static_pass_number);
+      debug_function (cfun->decl, TDF_DETAILS);
+    }
 
   if (todo_after & TODO_discard_function)
     {
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 99276bde87d..68833de2be6 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2278,6 +2278,12 @@ toplev::main (int argc, char **argv)
 		  targetm.target_option.override);
 
   handle_common_deferred_options ();
+  if (getenv ("DUMP"))
+    {
+      g->get_dumps ()->dump_switch_p ("ipa-all=/dev/null");
+      g->get_dumps ()->dump_switch_p ("tree-all=/dev/null");
+      g->get_dumps ()->dump_switch_p ("rtl-all=/dev/null");
+    }
 
   init_local_tick ();


                 reply	other threads:[~2021-11-19 12:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211119125109.087D7385801D@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).