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]

Re: [PATCH] Come up with debug counter for store-merging.


On 9/19/19 4:57 PM, Bernhard Reutner-Fischer wrote:
> On Wed, 18 Sep 2019 11:01:59 +0200
> Richard Biener <richard.guenther@gmail.com> wrote:
> 
>> On Wed, Sep 18, 2019 at 9:22 AM Martin Liška <mliska@suse.cz> wrote:
>>>
>>> Hi.
>>>
>>> After I spent quite some time with PR91758, I would like
>>> to see a debug counter in store merging for the next time.
>>>
>>> Ready to be installed?  
>> OK.
> 
>> @@ -4195,7 +4196,8 @@ imm_store_chain_info::output_merged_stores ()
>>    bool ret = false;
>>    FOR_EACH_VEC_ELT (m_merged_store_groups, i, merged_store)
>>      {
>> -      if (output_merged_store (merged_store))
>> +      if (dbg_cnt (store_merging)
>> +	  && output_merged_store (merged_store))
> 
> Doesn't this over-count actual merged stores? You really count the number of attempted store merges, not the actual successful stores merged. As i would expect to count the latter, i would have expected ..
> 
>>  	{
>>  	  unsigned int j;
>>  	  store_immediate_info *store;
> 
> dbg_cnt (store_merging) here, i.e. after the guard that determines if
> the merge is benefical, no?

Hi.

You are right. It's more about attempts rather than number of transformations.
However, the function imm_store_chain_info::output_merged_store emits GIMPLE statements
and I was unable to find a single place where to put the debug counter.

Martin

> 
> thanks,
> 


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