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?

It shows also that having partition->reads_and_writes would be nice
...  the code duplication
really looks awkward.  Eventually a EXECUTE_IF_IOR_IN_BITMAP would help as well.

Well.  Can you at least factor out the core DR comparison into a function?

Otherwise ok.

Thanks,
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