On Tue, Oct 30, 2012 at 1:21 AM, Sharad Singhai <sing...@google.com> wrote: > As per discussion in http://gcc.gnu.org/ml/gcc/2012-10/msg00225.html, > I have added the -fopt-info pass filtering in the attached patch. > > The basic idea is that there are optimization pass groups and a user > can selectively enable dumps for these group(s) via command-line > syntax. Currently, I define the following optimization groups: 'loop', > 'lto', 'inline', 'vec', and 'omp'. A pass can be in multiple groups. > > If a pass doesn't explicitly specify an optimization group, (denoted > by OPTGROUP_NONE) then a group is assigned based on the pass type. > These three are the obvious implicit groups: 'tree', 'ipa', and 'rtl'.
I agree with Richard -- we don't need these implicit groups. > > Also there is a catch-all group, called 'optall'. Why is this needed? Isn't that the default? > > The options for -fopt-info dumps verbosity remain 'optimized', > 'missed', 'note', and 'all'. Since these two types of options, > verbosity and optimization groups are non-overlapping, I have decided > to freely mix them. Something like this works as expected, i.e., dump > missed vectorizer info into vec.missed. > > gcc ... -fopt-info-vec-missed=vec.missed > > which is equivalent to > > gcc ... -fopt-info-missed-vec=vec.missed > > However, the order still matters, and it can be somewhat confusing. For > example, > > gcc -fopt-info-vec-missed=vec.miss -fopt-info-vec-optimized=vec.opt > > will dump missed and optimized vectorizer info into vec.opt, while no > vec.miss is produced. This is due to the fact that the latter group > specifier, 'vec' overrides the first one. However, the 'missed' and > 'optimized' are both honored as there is no conflict there. This is > somewhat confusing. Hopefully, this type of usage would not be common. Please document that only one alt dump file per optimization-group is supported. > > I have updated the documentation to include -fopt-info examples, and > added some details about -fopt-info command line conflicts. thanks, David > > Thanks, > Sharad