public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "greenrecyclebin at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/85614] Documentation: -fdump-tree should mention "original" Date: Wed, 03 Nov 2021 23:58:51 +0000 [thread overview] Message-ID: <bug-85614-4-k9jDYzSuJi@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-85614-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85614 Daniel Le Duc Khoi Nguyen <greenrecyclebin at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |greenrecyclebin at gmail dot com --- Comment #1 from Daniel Le Duc Khoi Nguyen <greenrecyclebin at gmail dot com> --- (In reply to krblock from comment #0) > In the -fdump-tree option a "switch" is specified to select when you want > the dump. To determine the "switch", it suggests "-fdump-passes" be used. > However, this does not list "original" which is also a possible choice. This > should be explicitly listed in the documentation. Not sure if there are > other not listed "switches". Also the term "switch" is odd. "pass" might be > a more intuitive name. I noticed the same thing too. In other words, some options are no longer discoverable after the changes in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32003#c8. The below code lists the options that were previously documented but have since become no longer discoverable: $ g++ --version | head -n 1 g++ (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 $ ruby --version | head -n 1 ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu] $ touch a.cpp $ cat <<'EOF' > tree-passes-presence-in-fdump-passes-output.rb > all_passes = `g++ -S -fdump-passes -o /dev/null a.cpp 2>&1 > /dev/null` > > tree_passes = > %w(split-paths original optimized gimple cfg ch ssa alias ccp storeccp pre fre > copyprop store_copyprop dce sra sink dom dse phiopt backprop forwprop nrv vect > slp vrp evrp oaccdevlow all) > > tree_passes.each do |pass| > tree_pass = "tree-#{pass}" > > i = all_passes.index(tree_pass) > > print "#{tree_pass}: " > > if i > next_char = all_passes[i + tree_pass.size] > > if next_char.match?('\d') > puts 'prefix match (followed by a digit).' > elsif next_char == ' ' > puts 'exact match.' > else > puts 'prefix match.' > end > else > puts 'no match.' > end > end > EOF $ ruby tree-passes-presence-in-fdump-passes-output.rb | ag -F 'no match' tree-original: no match. tree-gimple: no match. tree-storeccp: no match. tree-store_copyprop: no match. tree-all: no match. $ for i in $(!!); do \ > if g++ -fdump-"$i" -S -o /dev/null a.cpp; then \ > echo "$i: works."; \ > else \ > echo "$i: fails."; \ > fi \ > done tree-original: works. tree-gimple: works. cc1plus: error: unrecognized command line option ‘-fdump-tree-storeccp’ tree-storeccp: fails. cc1plus: error: unrecognized command line option ‘-fdump-tree-store_copyprop’ tree-store_copyprop: fails. tree-all: works. Improvements: 1. Change "switch" to "pass" to be more accurate 2. Make default passes, e.g., tree-original (is this considered a pass?), tree-gimple and tree-all (already documented) discoverable by: 2.1. Adding them in -fdump-passes output 2.2. Or documenting them explicitly 2.3. Or some other options? I prefer 2.1. since it improves things in the direction set out in the previous changes. Let me know your thoughts and I will consider submitting a patch. Thank you.
next parent reply other threads:[~2021-11-03 23:58 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-85614-4@http.gcc.gnu.org/bugzilla/> 2021-11-03 23:58 ` greenrecyclebin at gmail dot com [this message] 2021-11-04 0:05 ` greenrecyclebin at gmail dot com 2021-11-04 0:23 ` greenrecyclebin at gmail dot com 2023-05-14 20:37 ` pinskia at gcc dot gnu.org
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=bug-85614-4-k9jDYzSuJi@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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).