On Tue, Oct 30, 2012 at 8:28 AM, Richard Biener
<richard.guent...@gmail.com> wrote:
> On Tue, Oct 30, 2012 at 9: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'.
>>
>> 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.


OMP is a high level transformation, and it seems to be a good
candidate group, but this part does not need to be designed now. For
instance, there are a bunch of FDO related transformation (indirect
call promotion, memcpy transformation etc), and coverage mismatch
notes etc a good candidate to be filtered.

thanks,

David


>
> Thus please drop TREE, RTL, LTO and OMP for now.
>
> Otherwise I'm leaving it for comments from other folks.
>
> Thanks,
> Richard.
>
>> Thanks,
>> Sharad

Reply via email to