This is the mail archive of the 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]

Re: [PATCH] pass filtering for -fopt-info

On Tue, Oct 30, 2012 at 9:21 AM, Sharad Singhai <> wrote:
> As per discussion in,
> 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.

What I'd expect from that would be both vec.miss and vec.opt being
populated ... (thus go away from the duality of dump files to
primary dump file plus a set of alternate dump files).

> I have updated the documentation to include -fopt-info examples, and
> added some details about -fopt-info command line conflicts.

I like it overall, not sure if we want to pre-populate the OPTGROUP
set too much at this point.  Like what is 'tree' or 'rtl' to users?
nothing I think.
'ipa' yes.  'lto'?  sounds redundant with 'ipa' to me.  'omp'?  we don't have
any optimizations here.

Thus please drop TREE, RTL, LTO and OMP for now.

Otherwise I'm leaving it for comments from other folks.


> Thanks,
> Sharad

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]