public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/enable-all-dumps-to-devnull)] Enable all dumps and redirect them to /dev/null.
@ 2021-11-19 12:51 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-11-19 12:51 UTC (permalink / raw)
To: gcc-cvs
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 ();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-19 12:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 12:51 [gcc(refs/users/marxin/heads/enable-all-dumps-to-devnull)] Enable all dumps and redirect them to /dev/null Martin Liska
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).