Peter Bergner <berg...@linux.ibm.com> writes:
> On 3/30/20 3:50 AM, Richard Sandiford wrote:
>> Peter Bergner via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
>>>     * lower-subreg.c (pass_lower_subreg3::gate): Remove test for
>>>     flag_split_wide_types_early.
>>>
>>> diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
>>> index 4c8bc835f93..807ad398b64 100644
>>> --- a/gcc/lower-subreg.c
>>> +++ b/gcc/lower-subreg.c
>>> @@ -1844,8 +1844,7 @@ public:
>>>    {}
>>>  
>>>    /* opt_pass methods: */
>>> -  virtual bool gate (function *) { return flag_split_wide_types
>>> -                                     && !flag_split_wide_types_early; }
>>> +  virtual bool gate (function *) { return flag_split_wide_types != 0; }
>>>    virtual unsigned int execute (function *)
>>>      {
>>>        decompose_multiword_subregs (true);
>> 
>> Looks good to me with the s/ != 0// that Segher mentioned.
>> 
>> With this change, the only remaining function of -fsplit-wide-types-early
>> is to act as a double lock on one pass.  IMO it'd make more sense to remove
>> that double lock and make -fsplit-wide-types-early and -fsplit-wide-types
>> act as independent options, a bit like -fschedule-insns{,2}.
>
> Have we come to consensus on whether to split the options or not?
> I think Segher is against it given we actually have 3 passes of
> lower-subreg and -fsplit-wide-types would control the 1st and 3rd
> passes and -fsplit-wide-types-early would control the second.
> That does seem strange to me too.

I guess the name of the option is a bit weird, since it'll control
the middle pass of three.  That's going to be true either way though.

We're talking about having independent options controlling independent
passes, which seems like a Good Thing in general and doesn't seem that
strange to me in this case.  But I'm certainly happy to yield given the
strong opinions the other way.

Thanks,
Richard

Reply via email to