This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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'. Also there is a catch-all group, called 'optall'. 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. I have updated the documentation to include -fopt-info examples, and added some details about -fopt-info command line conflicts. Thanks, Sharad
Attachment:
opt_dump_group.4.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |