public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/85614] Documentation: -fdump-tree should mention "original"
[not found] <bug-85614-4@http.gcc.gnu.org/bugzilla/>
@ 2021-11-03 23:58 ` greenrecyclebin at gmail dot com
2021-11-04 0:05 ` greenrecyclebin at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: greenrecyclebin at gmail dot com @ 2021-11-03 23:58 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/85614] Documentation: -fdump-tree should mention "original"
[not found] <bug-85614-4@http.gcc.gnu.org/bugzilla/>
2021-11-03 23:58 ` [Bug middle-end/85614] Documentation: -fdump-tree should mention "original" greenrecyclebin at gmail dot com
@ 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
3 siblings, 0 replies; 4+ messages in thread
From: greenrecyclebin at gmail dot com @ 2021-11-04 0:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85614
--- Comment #2 from Daniel Le <greenrecyclebin at gmail dot com> ---
(In reply to Daniel Le from comment #1)
> $ for i in $(!!); do \
> > if g++ -fdump-"$i" -S -o /dev/null a.cpp; then \
> > echo "$i: works."; \
> > else \
> > echo "$i: fails."; \
> > fi \
> > done
!! should really be "ruby tree-passes-presence-in-fdump-passes-output.rb | ag
-F 'no match' | cut -d ':' -f 1".
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/85614] Documentation: -fdump-tree should mention "original"
[not found] <bug-85614-4@http.gcc.gnu.org/bugzilla/>
2021-11-03 23:58 ` [Bug middle-end/85614] Documentation: -fdump-tree should mention "original" greenrecyclebin at gmail dot com
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
3 siblings, 0 replies; 4+ messages in thread
From: greenrecyclebin at gmail dot com @ 2021-11-04 0:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85614
--- Comment #3 from Daniel Le <greenrecyclebin at gmail dot com> ---
Created attachment 51733
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51733&action=edit
List -fdump-tree pass options that are no longer discoverable
Here's the code again without any formatting issues that can be copy-pasted and
run to list -fdump-tree pass options that are no longer discoverable.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug middle-end/85614] Documentation: -fdump-tree should mention "original"
[not found] <bug-85614-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-11-04 0:23 ` greenrecyclebin at gmail dot com
@ 2023-05-14 20:37 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-14 20:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85614
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-05-14
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-14 20:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-85614-4@http.gcc.gnu.org/bugzilla/>
2021-11-03 23:58 ` [Bug middle-end/85614] Documentation: -fdump-tree should mention "original" greenrecyclebin at gmail dot com
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
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).