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 r13-3538] lto-dump: modernize a bit Date: Fri, 28 Oct 2022 07:16:43 +0000 (GMT) [thread overview] Message-ID: <20221028071643.C72453858417@sourceware.org> (raw) https://gcc.gnu.org/g:bd891730b26a6854d9b8f341bd43110085752007 commit r13-3538-gbd891730b26a6854d9b8f341bd43110085752007 Author: Martin Liska <mliska@suse.cz> Date: Thu Oct 27 10:40:58 2022 +0200 lto-dump: modernize a bit gcc/lto/ChangeLog: * lto-dump.cc (dump_list): Remove trailing return. (dump_symbol): Likewise. (dump_body): Filter name based on mangled name. (dump_tool_help): Use GIMPLE wording. (lto_main): Update wording. Diff: --- gcc/lto/lto-dump.cc | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/gcc/lto/lto-dump.cc b/gcc/lto/lto-dump.cc index cb9782722a9..5c4dbf5d297 100644 --- a/gcc/lto/lto-dump.cc +++ b/gcc/lto/lto-dump.cc @@ -227,7 +227,6 @@ void dump_list (void) { dump_list_functions (); dump_list_variables (); - return; } /* Dump specific variables and functions used in IL. */ @@ -243,7 +242,6 @@ void dump_symbol () printf ("\n"); } } - return; } /* Dump specific gimple body of specified function. */ @@ -259,19 +257,17 @@ void dump_body () return; } cgraph_node *cnode; - FOR_EACH_FUNCTION (cnode) - if (cnode->definition - && !cnode->alias - && !strcmp (cnode->name (), flag_dump_body)) + FOR_EACH_DEFINED_FUNCTION (cnode) + if (!cnode->alias + && !strcmp (cnode->asm_name (), flag_dump_body)) { - printf ("Gimple Body of Function: %s\n", cnode->name ()); + printf ("GIMPLE body of function: %s\n\n", cnode->asm_name ()); cnode->get_untransformed_body (); debug_function (cnode->decl, flags); flag = 1; } if (!flag) error_at (input_location, "Function not found."); - return; } /* List of command line options for dumping. */ @@ -292,13 +288,12 @@ void dump_tool_help () " -callgraph Dump the callgraph in graphviz format.\n" " -type-stats Dump statistics of tree types.\n" " -tree-stats Dump statistics of trees.\n" - " -gimple-stats Dump statistics of gimple statements.\n" - " -dump-body= Dump the specific gimple body.\n" + " -gimple-stats Dump statistics of GIMPLE statements.\n" + " -dump-body= Dump the specific GIMPLE body.\n" " -dump-level= Deciding the optimization level of body.\n" " -help Display the dump tool help.\n"; fputs (msg, stdout); - return; } unsigned int @@ -365,7 +360,7 @@ lto_main (void) "%<--enable-gather-detailed-mem-stats%>."); else { - printf ("Tree Statistics\n"); + printf ("Tree statistics\n"); dump_tree_statistics (); } }
reply other threads:[~2022-10-28 7:16 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=20221028071643.C72453858417@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: linkBe 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).