On Tue, May 13, 2014 at 1:39 AM, Richard Biener <richard.guent...@gmail.com> wrote: > On Fri, May 9, 2014 at 5:54 PM, Teresa Johnson <tejohn...@google.com> wrote: >> I discovered that the support for the documented -fdump-* options >> "optimized", "missed", "note" and "optall" was missing. Added that and >> fixed a minor typo in the documentation. >> >> Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk? > > I'm not sure they were intented for user-consumption. ISTR they > are just an implementation detail exposed by -fopt-info-X (which is > where they are documented).
I'm not sure what was intended originally, but they are documented as sub options both for -fopt-info-X and for -fdump-tree-X. The typo that I fixed was in the -fdump-tree-X option description in fact. Since they were documented, which I noticed when I was doing something where I wanted to be able to get these in the dump, I added the implementation. Note that because of the way the -fdump-tree-all flag is setup (by taking the NOT of a few flags that are not wanted in the 'all' dump), you already get these MSG_* flags enabled in dumps when you specify -fdump-tree-all, and it seems like it therefore makes sense to be able to specify getting just those by adding the documented support. Teresa > > The typo fix is ok, also adding a comment before the dump flags > definition to the above fact. > > David, do I remember correctly? > > Thanks, > Richard. > >> Thanks, >> Teresa >> >> 2014-05-09 Teresa Johnson <tejohn...@google.com> >> >> * doc/invoke.texi: Fix typo. >> * dumpfile.c: Add support for documented -fdump-* options >> optimized/missed/note/optall. >> >> Index: doc/invoke.texi >> =================================================================== >> --- doc/invoke.texi (revision 210157) >> +++ doc/invoke.texi (working copy) >> @@ -6278,7 +6278,7 @@ passes). >> @item missed >> Enable showing missed optimization information (only available in certain >> passes). >> -@item notes >> +@item note >> Enable other detailed optimization information (only available in >> certain passes). >> @item =@var{filename} >> Index: dumpfile.c >> =================================================================== >> --- dumpfile.c (revision 210157) >> +++ dumpfile.c (working copy) >> @@ -107,6 +107,10 @@ static const struct dump_option_value_info dump_op >> {"nouid", TDF_NOUID}, >> {"enumerate_locals", TDF_ENUMERATE_LOCALS}, >> {"scev", TDF_SCEV}, >> + {"optimized", MSG_OPTIMIZED_LOCATIONS}, >> + {"missed", MSG_MISSED_OPTIMIZATION}, >> + {"note", MSG_NOTE}, >> + {"optall", MSG_ALL}, >> {"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA >> | TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE >> | TDF_RHS_ONLY | TDF_NOUID | TDF_ENUMERATE_LOCALS | TDF_SCEV)}, >> >> >> -- >> Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413 -- Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413