This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH GCC][09/13]Simply cost model merges partitions with the same references
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Bin Cheng <Bin dot Cheng at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, nd <nd at arm dot com>
- Date: Wed, 14 Jun 2017 15:54:26 +0200
- Subject: Re: [PATCH GCC][09/13]Simply cost model merges partitions with the same references
- Authentication-results: sourceware.org; auth=none
- References: <VI1PR0802MB2176931CED7602FD019479E1E7CD0@VI1PR0802MB2176.eurprd08.prod.outlook.com>
On Mon, Jun 12, 2017 at 7:03 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> 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
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?
> 2017-06-07 Bin Cheng <email@example.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.