This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH GCC][07/13]Preserve data references for whole distribution life time
- 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: Tue, 13 Jun 2017 13:14:12 +0200
- Subject: Re: [PATCH GCC][07/13]Preserve data references for whole distribution life time
- Authentication-results: sourceware.org; auth=none
- References: <VI1PR0802MB21761F72C857B9C8E4229F62E7CD0@VI1PR0802MB2176.eurprd08.prod.outlook.com>
On Mon, Jun 12, 2017 at 7:02 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> This patch collects and preserves all data references in loop for whole
> distribution life time. It will be used afterwards.
> Bootstrap and test on x86_64 and AArch64. Is it OK?
+/* Vector of data references in the loop to be distributed. */
+static vec<data_reference_p> *datarefs_vec;
+/* Map of data reference in the loop to a unique id. */
+static hash_map<data_reference_p, int> *datarefs_map;
no need to make those pointers. It's not a unique id but
the index into the datarefs_vec vector, right?
loop distribution doesn't yet use dr->aux so it would be nice
to avoid the hash_map in favor of using that field.
#define DR_INDEX (dr) ((uintptr_t)(dr)->aux)
+ if (datarefs_vec->length () > 64)
There is PARAM_VALUE (PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS)
with a default value of 1000. Please use that instead of magic numbers.
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ fprintf (dump_file,
+ "Loop %d not distributed: more than 64 memory references.\n",
+ free_rdg (rdg);
+ loop_nest->release ();
+ delete loop_nest;
+ free_data_refs (*datarefs_vec);
+ delete datarefs_vec;
+ return 0;
auto_* were so nice ...
> 2017-06-07 Bin Cheng <firstname.lastname@example.org>
> * tree-loop-distribution.c (datarefs_vec, datarefs_map): New
> global var.
> (create_rdg_vertices): Use datarefs_vec directly.
> (free_rdg): Don't free data references.
> (build_rdg): Update use. Don't free data references.
> (distribute_loop): Compute global variable for data references.
> Bail out if there are too many data references.