From: Richard Biener <richard.guenther@gmail.com>
To: Bin Cheng <Bin.Cheng@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>, nd <nd@arm.com>
Subject: Re: [PATCH GCC][07/13]Preserve data references for whole distribution life time
Date: Tue, 13 Jun 2017 11:14:00 -0000 [thread overview]
Message-ID: <CAFiYyc2EwCxnWGqC5Csjtf9oYsd6+7c4Gn0MCPspM=knsvb-8w@mail.gmail.com> (raw)
In-Reply-To: <VI1PR0802MB21761F72C857B9C8E4229F62E7CD0@VI1PR0802MB2176.eurprd08.prod.outlook.com>
On Mon, Jun 12, 2017 at 7:02 PM, Bin Cheng <Bin.Cheng@arm.com> wrote:
> Hi,
> 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",
+ loop->num);
+
+ free_rdg (rdg);
+ loop_nest->release ();
+ delete loop_nest;
+ free_data_refs (*datarefs_vec);
+ delete datarefs_vec;
+ return 0;
+ }
auto_* were so nice ...
> Thanks,
> bin
> 2017-06-07 Bin Cheng <bin.cheng@arm.com>
>
> * 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.
next prev parent reply other threads:[~2017-06-13 11:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 17:03 Bin Cheng
2017-06-13 11:14 ` Richard Biener [this message]
2017-06-19 13:34 ` Bin.Cheng
2017-06-19 15:16 ` Richard Biener
2017-06-19 15:59 ` Bin.Cheng
2017-06-20 11:25 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFiYyc2EwCxnWGqC5Csjtf9oYsd6+7c4Gn0MCPspM=knsvb-8w@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=Bin.Cheng@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).