On Mon, Jun 19, 2017 at 3:40 PM, Bin.Cheng <amker.ch...@gmail.com> wrote:
> On Wed, Jun 14, 2017 at 2:54 PM, Richard Biener
> <richard.guent...@gmail.com> wrote:
>> On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng <bin.ch...@arm.com> wrote:
>>> Hi,
>>> Current primitive cost model merges partitions with data references sharing 
>>> the same
>>> base address.  I believe it's designed to maximize data reuse in 
>>> distribution, but
>>> that should be done by dedicated data reusing algorithm.  At this stage of 
>>> merging,
>>> we should be conservative and only merge partitions with the same 
>>> references.
>>> Bootstrap and test on x86_64 and AArch64.  Is it OK?
>>
>> Well, I'd say "conservative" is merging more, not less.  For example
>> splitting a[i+1] from a[i]
>> would be bad(?), so I'd see to allow unequal DR_INIT as "equal" for
>> merging.  Maybe
>> DR_INIT within a cacheline or so.
>>
>> How many extra distributions in say SPEC do you get from this change alone?
> Hi,
> I collected data for spec2006 only with/without this patch.  I am a
> bit surprised that it doesn't change the number of distributed loops.
>>
>> It shows also that having partition->reads_and_writes would be nice
>> ...  the code duplication
> Yeah, I merged read/write data references in previous patch, now this
> duplication is gone.  Update patch attached.  Is it OK?

+      gcc_assert (i < datarefs_vec.length ());
+      dr1 = datarefs_vec[i];

these asserts are superfluous -- vec::operator[] does them as well.

Ok if you remove them.

Richard.

> Thanks.
> bin
> 2017-06-07  Bin Cheng  <bin.ch...@arm.com>
>
>     * tree-loop-distribution.c (ref_base_address): Delete.
>     (similar_memory_accesses): Rename ...
>     (share_memory_accesses): ... to this.  Check if partitions access
>     the same memory reference.
>     (distribute_loop): Call share_memory_accesses.

Reply via email to